(self.webpackChunkInstiKit=self.webpackChunkInstiKit||[]).push([[9709],{67304:(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});const r={methods:{getConfig:function(t){return helper.getConfig(t)}}};const s=(0,o(51900).Z)(r,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("p",{staticClass:"text-center"},[o("small",[t._v("Designed with ❤️ by "),o("a",{attrs:{href:"https://scriptmint.com",target:"_blank"}},[t._v("ScriptMint")]),t._v(" "+t._s(t.trans("general.version")+" "+t.getConfig("v")))])])])}),[],!1,null,null,null).exports},17960:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>s});const r={components:{guestFooter:o(67304).Z},data:function(){return{twoFactorForm:new Form({two_factor_code:""})}},mounted:function(){helper.getConfig("two_factor_security")||this.$router.push("/dashboard"),helper.getConfig("mode")||(this.twoFactorForm.two_factor_code=helper.getAuthUser("two_factor_code"))},methods:{logout:function(){var t=this;helper.logout().then((function(){t.$store.dispatch("resetAuthUserDetail"),t.$router.push("/login")}))},submit:function(){var t=this,e=this.$loading.show();this.twoFactorForm.post("/api/auth/security").then((function(o){toastr.success(i18n.auth.two_factor_security_verified),e.hide();var r="/dashboard";helper.hasRole("admin")&&helper.getConfig("setup_wizard")&&(r="/setup"),t.$router.push(r)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},getAuthUser:function(t){return helper.getAuthUser(t)}},computed:{getLogo:function(){return helper.getLogo()}}};const s=(0,o(51900).Z)(r,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("section",{attrs:{id:"wrapper"}},[o("div",{staticClass:"login-register guest-page"},[o("div",{staticClass:"login-box card guest-box"},[o("div",{staticClass:"card-body p-4"},[o("img",{staticClass:"mx-auto d-block",staticStyle:{"max-width":"250px"},attrs:{src:t.getLogo}}),t._v(" "),o("center",{staticClass:"m-t-30"},[o("h4",{staticClass:"card-title m-t-10"},[t._v(t._s(t.getAuthUser("name")))])]),t._v(" "),o("form",{staticClass:"form-horizontal form-material",attrs:{id:"twoFactorForm"},on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)},keydown:function(e){return t.twoFactorForm.errors.clear(e.target.name)}}},[o("h3",{staticClass:"box-title m-b-20 text-center"},[t._v(t._s(t.trans("auth.two_factor_security")))]),t._v(" "),o("div",{staticClass:"form-group "},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.twoFactorForm.two_factor_code,expression:"twoFactorForm.two_factor_code"}],staticClass:"form-control text-center",attrs:{type:"text",name:"two_factor_code",placeholder:t.trans("auth.two_factor_code")},domProps:{value:t.twoFactorForm.two_factor_code},on:{input:function(e){e.target.composing||t.$set(t.twoFactorForm,"two_factor_code",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.twoFactorForm,"prop-name":"two_factor_code"}})],1),t._v(" "),o("div",{staticClass:"form-group text-center m-t-20"},[o("div",{staticClass:"col-xs-12"},[o("button",{staticClass:"btn btn-info btn-lg btn-block text-uppercase waves-effect waves-light",attrs:{type:"submit"}},[t._v(t._s(t.trans("auth.confirm")))])])]),t._v(" "),o("div",{staticClass:"form-group m-b-0"},[o("div",{staticClass:"col-sm-12 text-center"},[o("p",[o("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.logout.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-power-off"}),t._v(" "+t._s(t.trans("auth.logout")))])])])])])],1),t._v(" "),o("guest-footer")],1)])])}),[],!1,null,null,null).exports}}]);
//# sourceMappingURL=security.js.map?id=592eb1cdea147323b3ae