From f027aab9ac418d7f8e32fc7c14a07ed225ff58be Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Wed, 13 Sep 2023 07:57:59 +0000 Subject: [PATCH] Bundled output for commit e94f8e0d3a539b33d5deb94d8ac6e9a1171aaf31 Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- js/dist-typings/forum/components/TwoFactorEnableModal.d.ts | 2 ++ js/dist/forum.js | 2 +- js/dist/forum.js.map | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/dist-typings/forum/components/TwoFactorEnableModal.d.ts b/js/dist-typings/forum/components/TwoFactorEnableModal.d.ts index 60c000b..bbc6464 100644 --- a/js/dist-typings/forum/components/TwoFactorEnableModal.d.ts +++ b/js/dist-typings/forum/components/TwoFactorEnableModal.d.ts @@ -11,8 +11,10 @@ export default class TwoFactorEnableModal extends Modal{var t={n:o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return t.d(a,{a}),a},d:(o,a)=>{for(var r in a)t.o(a,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:a[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>Z});const a=flarum.core.compat["common/app"];t.n(a)().initializers.add("ianm/twofactor",(function(){}));const r=flarum.core.compat["forum/app"];var n=t.n(r);const e=flarum.core.compat["common/extend"],i=flarum.core.compat["forum/components/UserSecurityPage"];var s=t.n(i);function c(t,o){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},c(t,o)}function l(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,c(t,o)}const u=flarum.core.compat["common/Component"];var d=t.n(u);const f=flarum.core.compat["common/components/Button"];var p=t.n(f);const h=flarum.core.compat["common/utils/ItemList"];var b=t.n(h);const w=flarum.core.compat["common/helpers/listItems"];var y=t.n(w);const v=flarum.core.compat["common/helpers/icon"];var _=t.n(v),F=function(t){function o(){return t.apply(this,arguments)||this}return l(o,t),o.prototype.view=function(){var t=this.attrs,o=t.icon,a=t.title,r=t.value,n=t.action,e=t.helpText;return m("li",{className:"TwoFactorGrid-item"},m("span",{className:"TwoFactorGrid-icon"},_()(o)),m("div",{className:"TwoFactorGrid-content"},m("span",{className:"TwoFactorGrid-title"},a),m("span",{className:"TwoFactorGrid-value"},r),e&&m("span",{className:"helpText TwoFactorGrid-helpText"},e)),n&&m("span",{className:"TwoFactorGrid-actions"},n))},o}(d());const g=flarum.core.compat["common/components/Tooltip"];var T=t.n(g);const k=flarum.core.compat["common/components/Modal"];var N=t.n(k);const E=flarum.core.compat["common/utils/Stream"];var q=t.n(E);const x=flarum.core.compat["common/components/LoadingIndicator"];var B=t.n(x),C=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.user=this.attrs.user,this.status="loading",this.qrCodeUrl=null,this.backupCodes=[],this.token=q()(""),this.code=null,this.activeTab="qrcode"},a.className=function(){return"TwoFactorEnableModal Modal--small"},a.title=function(){return n().translator.trans("ianm-twofactor.forum.security.two_factor_heading")},a.oncreate=function(o){var a=this;t.prototype.oncreate.call(this,o);var r=this.user.id();n().request({method:"GET",url:n().forum.attribute("apiUrl")+"/users/"+r+"/twofactor/qrcode"}).then((function(t){a.qrCodeUrl=t.svg,a.code=t.code,a.status="displayQR",m.redraw()}))},a.content=function(){var t=this;return m("div",{className:"Modal-body"},"loading"===this.status&&m("div",{className:"loading"},m(B(),null),m("p",null,n().translator.trans("ianm-twofactor.forum.security.loading_qr"))),"displayQR"===this.status&&m("div",null,m("div",{className:"tabs"},m(p(),{className:"qrcode"===this.activeTab?"active":"",onclick:function(){t.activeTab="qrcode",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.qr_tab")),m(p(),{className:"manual"===this.activeTab?"active":"",onclick:function(){t.activeTab="manual",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.manual_tab"))),"qrcode"===this.activeTab&&m("div",{className:"qrSection"},m("img",{className:"qrImage",src:this.qrCodeUrl,alt:n().translator.trans("ianm-twofactor.forum.security.qr_code_alt")}),m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.scan_qr_instruction"))),"manual"===this.activeTab&&m("div",{className:"manualEntrySection"},m("code",{className:"manualEntryCode"},this.code),m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.manual_entry_instruction"))),m("div",{className:"Form"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.token,placeholder:n().translator.trans("ianm-twofactor.forum.security.enter_token")})),m("div",{className:"Form-group"},m(p(),{className:"Button Button--primary",onclick:this.verifyToken.bind(this)},n().translator.trans("ianm-twofactor.forum.security.verify_button"))))),"displayBackupCodes"===this.status&&m("div",null,m("p",null,n().translator.trans("ianm-twofactor.forum.security.backup_codes")),m("ul",null,this.backupCodes.map((function(t){return m("li",null,m("code",null,t))}))),m("p",null,n().translator.trans("ianm-twofactor.forum.security.backup_codes_instruction")),m(p(),{className:"Button Button--primary",onclick:function(){t.status="final",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.saved_backup_codes_button"))),"final"===this.status&&m("div",null,m("p",null,n().translator.trans("ianm-twofactor.forum.security.two_factor_enabled_confirmation")),m(p(),{className:"Button Button--primary",onclick:this.finish.bind(this)},n().translator.trans("ianm-twofactor.forum.security.ok_button"))))},a.verifyToken=function(){var t=this;n().request({method:"POST",url:n().forum.attribute("apiUrl")+"/users/twofactor/verify",body:{token:this.token()}}).then((function(o){t.backupCodes=o.backupCodes,t.status="displayBackupCodes",t.user.twoFactorEnabled(!0),m.redraw()})).catch((function(t){alert("Verification failed. Please try again.")}))},a.finish=function(){this.attrs.onEnabled(),this.hide()},o}(N()),A=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.loading=!1},a.className=function(){return"TwoFactorDisableConfirmModal Modal--small"},a.title=function(){return n().translator.trans("ianm-twofactor.forum.security.confirm_disable_2fa_title")},a.content=function(){return m("div",{className:"Modal-body"},m("p",null,n().translator.trans("ianm-twofactor.forum.security.confirm_disable_2fa_text")),m("div",{className:"Form-group"},m(p(),{className:"Button Button--danger",onclick:this.disable.bind(this),loading:this.loading},n().translator.trans("ianm-twofactor.forum.security.disable_2fa_button")),m(p(),{className:"Button Button--cancel",onclick:this.hide.bind(this)},n().translator.trans("ianm-twofactor.forum.security.cancel_button"))))},a.disable=function(){var t=this;this.loading=!0;var o=this.attrs.user.id();n().request({method:"DELETE",url:n().forum.attribute("apiUrl")+"/users/"+o+"/twofactor/disable"}).then((function(){t.loading=!1,t.attrs.onDisabled(),t.hide()})).catch((function(t){}))},o}(N()),D=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.user=this.attrs.user,this.twoFactorEnabled=this.user.twoFactorEnabled(),this.canDisableTwoFactor=this.user.canDisable2FA(),this.backupCodesRemaining=this.user.backupCodesRemaining()||0},a.view=function(){return m("div",{className:"TwoFactorGrid"},m("ul",null,y()(this.twoFactorItems().toArray())))},a.twoFactorItems=function(){var t=new(b()),o=this.getDisableAction(),a=m(p(),{className:"Button Button--primary",onclick:this.enableTwoFactor.bind(this)},n().translator.trans("ianm-twofactor.forum.security.enable_2fa_button"));return t.add("status",m(F,{icon:"fas fa-shield-alt",title:n().translator.trans("ianm-twofactor.forum.security.two_factor_title"),value:this.twoFactorEnabled?n().translator.trans("ianm-twofactor.forum.security.two_factor_enabled"):n().translator.trans("ianm-twofactor.forum.security.two_factor_disabled"),action:this.twoFactorEnabled?o:a,helpText:!this.canDisableTwoFactor&&n().translator.trans("ianm-twofactor.forum.security.cannot_disable")})),this.twoFactorEnabled?(t.add("backupCodes",m(F,{icon:"fas fa-key",title:"Backup Codes Remaining:",value:this.backupCodesRemaining})),t):t},a.getDisableAction=function(){var t=m(p(),{className:"Button Button--danger",onclick:this.disableTwoFactor.bind(this),disabled:!this.canDisableTwoFactor},n().translator.trans("ianm-twofactor.forum.security.disable_2fa_button"));return this.canDisableTwoFactor?t:m(T(),{text:n().translator.trans("ianm-twofactor.forum.security.cannot_disable_tooltip")},t)},a.enableTwoFactor=function(){n().modal.show(C,{onEnabled:this.onTwoFactorEnabled.bind(this),user:this.user})},a.onTwoFactorEnabled=function(){this.twoFactorEnabled=!0,m.redraw()},a.disableTwoFactor=function(){n().modal.show(A,{onDisabled:this.onTwoFactorDisabled.bind(this),user:this.user})},a.onTwoFactorDisabled=function(){this.twoFactorEnabled=!1,m.redraw()},a.generateBackupCodes=function(){m.redraw()},o}(d()),O=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.twoFactorEnabled=this.attrs.user.twoFactorEnabled(),this.canDisableTwoFactor=this.attrs.user.canDisable2FA(),this.loading=!1},a.view=function(){return m("div",null,m(D,{user:this.attrs.user}))},o}(d());const M=flarum.core.compat["common/components/FieldSet"];var G=t.n(M);const P=flarum.core.compat["common/components/LinkButton"];var S=t.n(P);const j=flarum.core.compat["forum/components/LogInModal"];var R=t.n(j);const I=flarum.core.compat["forum/ForumApplication"];var U=t.n(I);function L(){return L=Object.assign?Object.assign.bind():function(t){for(var o=1;o').insertBefore("#content")[0];m.mount(n,{view:function(){return m(r,{dismissible:!1,controls:[m(a,null)],className:"Alert--2faEnable"},t.translator.trans("ianm-twofactor.forum.user_2fa.alert_message"))}})}}(n())}))}))})(),module.exports=o})(); +(()=>{var t={n:o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return t.d(a,{a}),a},d:(o,a)=>{for(var r in a)t.o(a,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:a[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>Z});const a=flarum.core.compat["common/app"];t.n(a)().initializers.add("ianm/twofactor",(function(){}));const r=flarum.core.compat["forum/app"];var n=t.n(r);const e=flarum.core.compat["common/extend"],i=flarum.core.compat["forum/components/UserSecurityPage"];var s=t.n(i);function c(t,o){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},c(t,o)}function l(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,c(t,o)}const u=flarum.core.compat["common/Component"];var d=t.n(u);const f=flarum.core.compat["common/components/Button"];var p=t.n(f);const h=flarum.core.compat["common/utils/ItemList"];var b=t.n(h);const w=flarum.core.compat["common/helpers/listItems"];var y=t.n(w);const v=flarum.core.compat["common/helpers/icon"];var _=t.n(v),F=function(t){function o(){return t.apply(this,arguments)||this}return l(o,t),o.prototype.view=function(){var t=this.attrs,o=t.icon,a=t.title,r=t.value,n=t.action,e=t.helpText;return m("li",{className:"TwoFactorGrid-item"},m("span",{className:"TwoFactorGrid-icon"},_()(o)),m("div",{className:"TwoFactorGrid-content"},m("span",{className:"TwoFactorGrid-title"},a),m("span",{className:"TwoFactorGrid-value"},r),e&&m("span",{className:"helpText TwoFactorGrid-helpText"},e)),n&&m("span",{className:"TwoFactorGrid-actions"},n))},o}(d());const g=flarum.core.compat["common/components/Tooltip"];var T=t.n(g);const k=flarum.core.compat["common/components/Modal"];var N=t.n(k);const E=flarum.core.compat["common/utils/Stream"];var q=t.n(E);const x=flarum.core.compat["common/components/LoadingIndicator"];var B=t.n(x),C=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.user=this.attrs.user,this.status="loading",this.qrCodeUrl=null,this.backupCodes=[],this.token=q()(""),this.code=null,this.activeTab="qrcode"},a.className=function(){return"TwoFactorEnableModal Modal--small"},a.title=function(){return n().translator.trans("ianm-twofactor.forum.security.two_factor_heading")},a.oncreate=function(o){var a=this;t.prototype.oncreate.call(this,o);var r=this.user.id();n().request({method:"GET",url:n().forum.attribute("apiUrl")+"/users/"+r+"/twofactor/qrcode"}).then((function(t){a.qrCodeUrl=t.svg,a.code=t.code,a.status="displayQR",m.redraw()}))},a.onupdate=function(){var t=document.querySelector(".TwoFactorEnableModal [name=token]");t&&document.activeElement!==t&&t.focus()},a.content=function(){var t=this;return m("div",{className:"Modal-body"},"loading"===this.status&&m("div",{className:"loading"},m(B(),null),m("p",null,n().translator.trans("ianm-twofactor.forum.security.loading_qr"))),"displayQR"===this.status&&m("div",null,m("div",{className:"tabs"},m(p(),{className:"qrcode"===this.activeTab?"active":"",onclick:function(){t.activeTab="qrcode",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.qr_tab")),m(p(),{className:"manual"===this.activeTab?"active":"",onclick:function(){t.activeTab="manual",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.manual_tab"))),"qrcode"===this.activeTab&&m("div",{className:"qrSection"},m("img",{className:"qrImage",src:this.qrCodeUrl,alt:n().translator.trans("ianm-twofactor.forum.security.qr_code_alt")}),m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.scan_qr_instruction"))),"manual"===this.activeTab&&m("div",{className:"manualEntrySection"},m("code",{className:"manualEntryCode"},this.code),m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.manual_entry_instruction"))),m("div",{className:"Form"},m("form",{onsubmit:this.onSubmit.bind(this)},m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"token",bidi:this.token,placeholder:n().translator.trans("ianm-twofactor.forum.security.enter_token")})),m("div",{className:"Form-group"},m(p(),{type:"submit",className:"Button Button--primary",onclick:this.verifyToken.bind(this)},n().translator.trans("ianm-twofactor.forum.security.verify_button")))))),"displayBackupCodes"===this.status&&m("div",null,m("p",null,n().translator.trans("ianm-twofactor.forum.security.backup_codes")),m("ul",null,this.backupCodes.map((function(t){return m("li",null,m("code",null,t))}))),m("p",null,n().translator.trans("ianm-twofactor.forum.security.backup_codes_instruction")),m(p(),{className:"Button Button--primary",onclick:function(){t.status="final",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.saved_backup_codes_button"))),"final"===this.status&&m("div",null,m("p",null,n().translator.trans("ianm-twofactor.forum.security.two_factor_enabled_confirmation")),m(p(),{className:"Button Button--primary",onclick:this.finish.bind(this)},n().translator.trans("ianm-twofactor.forum.security.ok_button"))))},a.verifyToken=function(){var t=this;n().request({method:"POST",url:n().forum.attribute("apiUrl")+"/users/twofactor/verify",body:{token:this.token()}}).then((function(o){t.backupCodes=o.backupCodes,t.status="displayBackupCodes",t.user.twoFactorEnabled(!0),m.redraw()})).catch((function(t){}))},a.finish=function(){this.attrs.onEnabled(),this.hide()},a.onSubmit=function(t){t.preventDefault(),this.verifyToken()},o}(N()),A=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.loading=!1},a.className=function(){return"TwoFactorDisableConfirmModal Modal--small"},a.title=function(){return n().translator.trans("ianm-twofactor.forum.security.confirm_disable_2fa_title")},a.content=function(){return m("div",{className:"Modal-body"},m("p",null,n().translator.trans("ianm-twofactor.forum.security.confirm_disable_2fa_text")),m("div",{className:"Form-group"},m(p(),{className:"Button Button--danger",onclick:this.disable.bind(this),loading:this.loading},n().translator.trans("ianm-twofactor.forum.security.disable_2fa_button")),m(p(),{className:"Button Button--cancel",onclick:this.hide.bind(this)},n().translator.trans("ianm-twofactor.forum.security.cancel_button"))))},a.disable=function(){var t=this;this.loading=!0;var o=this.attrs.user.id();n().request({method:"DELETE",url:n().forum.attribute("apiUrl")+"/users/"+o+"/twofactor/disable"}).then((function(){t.loading=!1,t.attrs.onDisabled(),t.hide()})).catch((function(t){}))},o}(N()),D=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.user=this.attrs.user,this.twoFactorEnabled=this.user.twoFactorEnabled(),this.canDisableTwoFactor=this.user.canDisable2FA(),this.backupCodesRemaining=this.user.backupCodesRemaining()||0},a.view=function(){return m("div",{className:"TwoFactorGrid"},m("ul",null,y()(this.twoFactorItems().toArray())))},a.twoFactorItems=function(){var t=new(b()),o=this.getDisableAction(),a=m(p(),{className:"Button Button--primary",onclick:this.enableTwoFactor.bind(this)},n().translator.trans("ianm-twofactor.forum.security.enable_2fa_button"));return t.add("status",m(F,{icon:"fas fa-shield-alt",title:n().translator.trans("ianm-twofactor.forum.security.two_factor_title"),value:this.twoFactorEnabled?n().translator.trans("ianm-twofactor.forum.security.two_factor_enabled"):n().translator.trans("ianm-twofactor.forum.security.two_factor_disabled"),action:this.twoFactorEnabled?o:a,helpText:!this.canDisableTwoFactor&&n().translator.trans("ianm-twofactor.forum.security.cannot_disable")})),this.twoFactorEnabled?(t.add("backupCodes",m(F,{icon:"fas fa-key",title:"Backup Codes Remaining:",value:this.backupCodesRemaining})),t):t},a.getDisableAction=function(){var t=m(p(),{className:"Button Button--danger",onclick:this.disableTwoFactor.bind(this),disabled:!this.canDisableTwoFactor},n().translator.trans("ianm-twofactor.forum.security.disable_2fa_button"));return this.canDisableTwoFactor?t:m(T(),{text:n().translator.trans("ianm-twofactor.forum.security.cannot_disable_tooltip")},t)},a.enableTwoFactor=function(){n().modal.show(C,{onEnabled:this.onTwoFactorEnabled.bind(this),user:this.user})},a.onTwoFactorEnabled=function(){this.twoFactorEnabled=!0,m.redraw()},a.disableTwoFactor=function(){n().modal.show(A,{onDisabled:this.onTwoFactorDisabled.bind(this),user:this.user})},a.onTwoFactorDisabled=function(){this.twoFactorEnabled=!1,m.redraw()},a.generateBackupCodes=function(){m.redraw()},o}(d()),M=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.twoFactorEnabled=this.attrs.user.twoFactorEnabled(),this.canDisableTwoFactor=this.attrs.user.canDisable2FA(),this.loading=!1},a.view=function(){return m("div",null,m(D,{user:this.attrs.user}))},o}(d());const O=flarum.core.compat["common/components/FieldSet"];var S=t.n(O);const G=flarum.core.compat["common/components/LinkButton"];var j=t.n(G);const P=flarum.core.compat["forum/components/LogInModal"];var R=t.n(P);const I=flarum.core.compat["forum/ForumApplication"];var U=t.n(I);function L(){return L=Object.assign?Object.assign.bind():function(t){for(var o=1;o').insertBefore("#content")[0];m.mount(n,{view:function(){return m(r,{dismissible:!1,controls:[m(a,null)],className:"Alert--2faEnable"},t.translator.trans("ianm-twofactor.forum.user_2fa.alert_message"))}})}}(n())}))}))})(),module.exports=o})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 0a2c552..0213663 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,c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D,EAAKyG,eAAc,GACnBjH,EAAE2B,SAGF3B,EAAEqH,MAAMC,EAAgB,KAC1B,EAACJ,CAAA,CAnBkB,CAAShH,KAsBxBqH,EAAc,SAAAC,GAAA,SAAAD,IAAA,OAAAC,EAAAnI,MAAA,KAAAC,YAAA,KAIjB,OAJiBR,EAAAyI,EAAAC,GAAAD,EAAAzJ,UAClByB,KAAA,SAAKgB,GACH,IAAMkH,EAAID,EAAA1J,UAASyB,KAAIvB,KAAC,KAAAuC,GACxB,OAAAoE,EAAA,GAAY8C,EAAM,CAAAC,SAAU,CAAC1H,EAAA,OAAKC,UAAU,aAAawH,EAAKC,YAChE,EAACH,CAAA,CAJiB,CAASI,KAOvBL,EAAiBM,EAAE,kCAAkCC,aAAa,YAAY,GAEpF7H,EAAEqH,MAAMC,EAAgB,CACtB/H,KAAM,kBACJS,EAACuH,EAAc,CAACO,aAAa,EAAOC,SAAU,CAAC/H,EAACkH,EAAe,OAAMjH,UAAU,oBAC5E1B,EAAI4I,WAAWnG,MAAM,+CACP,GArCqB,CAwC5C,CD/CIgH,CAA6BzJ,IAC/B,GHGF,G","sources":["webpack://@ianm/twofactor/webpack/bootstrap","webpack://@ianm/twofactor/webpack/runtime/compat get default export","webpack://@ianm/twofactor/webpack/runtime/define property getters","webpack://@ianm/twofactor/webpack/runtime/hasOwnProperty shorthand","webpack://@ianm/twofactor/webpack/runtime/make namespace object","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/app']\"","webpack://@ianm/twofactor/./src/common/index.ts","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/app']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/extend']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/components/UserSecurityPage']\"","webpack://@ianm/twofactor/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@ianm/twofactor/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/Component']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Button']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@ianm/twofactor/./src/forum/components/TwoFactorGridItem.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@ianm/twofactor/./src/forum/components/TwoFactorEnableModal.js","webpack://@ianm/twofactor/./src/forum/components/TwoFactorDisableConfirmModal .js","webpack://@ianm/twofactor/./src/forum/components/TwoFactorGrid.js","webpack://@ianm/twofactor/./src/forum/components/TwoFactorSettings.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/FieldSet']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/ForumApplication']\"","webpack://@ianm/twofactor/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/extenders']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/models/Group']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/models/User']\"","webpack://@ianm/twofactor/./src/common/extend.ts","webpack://@ianm/twofactor/./src/forum/extend.ts","webpack://@ianm/twofactor/./src/forum/index.ts","webpack://@ianm/twofactor/./src/forum/extendUserSecurityPage.js","webpack://@ianm/twofactor/./src/forum/extendLogInModal.js","webpack://@ianm/twofactor/./src/forum/extendForumApplication.js","webpack://@ianm/twofactor/./src/forum/alertTwoFactorAuthentication.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\napp.initializers.add('ianm/twofactor', () => {});\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserSecurityPage'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default class TwoFactorGridItem extends Component {\n view() {\n const { icon: iconName, title, value, action, helpText } = this.attrs;\n\n return (\n
  • \n {icon(iconName)}\n
    \n {title}\n {value}\n {helpText && {helpText}}\n
    \n {action && {action}}\n
  • \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport Stream from 'flarum/common/utils/Stream';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default class TwoFactorEnableModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.user = this.attrs.user;\n // Statuses: 'loading', 'displayQR', 'displayBackupCodes', 'final'\n this.status = 'loading';\n this.qrCodeUrl = null;\n this.backupCodes = [];\n this.token = Stream('');\n this.code = null;\n this.activeTab = 'qrcode';\n }\n\n className() {\n return 'TwoFactorEnableModal Modal--small';\n }\n\n title() {\n return app.translator.trans('ianm-twofactor.forum.security.two_factor_heading');\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const userId = this.user.id();\n app\n .request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + `/users/${userId}/twofactor/qrcode`,\n })\n .then((response) => {\n this.qrCodeUrl = response.svg;\n this.code = response.code;\n this.status = 'displayQR';\n m.redraw();\n });\n }\n\n content() {\n return (\n
    \n {this.status === 'loading' && (\n
    \n \n

    {app.translator.trans('ianm-twofactor.forum.security.loading_qr')}

    \n
    \n )}\n\n {this.status === 'displayQR' && (\n
    \n
    \n {\n this.activeTab = 'qrcode';\n m.redraw();\n }}\n >\n {app.translator.trans('ianm-twofactor.forum.security.qr_tab')}\n \n {\n this.activeTab = 'manual';\n m.redraw();\n }}\n >\n {app.translator.trans('ianm-twofactor.forum.security.manual_tab')}\n \n
    \n\n {this.activeTab === 'qrcode' && (\n
    \n {app.translator.trans('ianm-twofactor.forum.security.qr_code_alt')}\n

    {app.translator.trans('ianm-twofactor.forum.security.scan_qr_instruction')}

    \n
    \n )}\n\n {this.activeTab === 'manual' && (\n
    \n {this.code}\n

    {app.translator.trans('ianm-twofactor.forum.security.manual_entry_instruction')}

    \n
    \n )}\n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n )}\n\n {this.status === 'displayBackupCodes' && (\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.backup_codes')}

    \n
      \n {this.backupCodes.map((code) => (\n
    • \n {code}\n
    • \n ))}\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.backup_codes_instruction')}

    \n {\n this.status = 'final';\n m.redraw();\n }}\n >\n {app.translator.trans('ianm-twofactor.forum.security.saved_backup_codes_button')}\n \n
    \n )}\n\n {this.status === 'final' && (\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.two_factor_enabled_confirmation')}

    \n \n
    \n )}\n
    \n );\n }\n\n verifyToken() {\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/users/twofactor/verify',\n body: {\n token: this.token(),\n },\n })\n .then((response) => {\n this.backupCodes = response.backupCodes;\n this.status = 'displayBackupCodes';\n this.user.twoFactorEnabled(true);\n m.redraw();\n })\n .catch((error) => {\n alert('Verification failed. Please try again.');\n });\n }\n\n finish() {\n this.attrs.onEnabled();\n this.hide();\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\n\nexport default class TwoFactorDisableConfirmModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = false;\n }\n\n className() {\n return 'TwoFactorDisableConfirmModal Modal--small';\n }\n\n title() {\n return app.translator.trans('ianm-twofactor.forum.security.confirm_disable_2fa_title');\n }\n\n content() {\n return (\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.confirm_disable_2fa_text')}

    \n
    \n \n \n
    \n
    \n );\n }\n\n disable() {\n this.loading = true;\n const userId = this.attrs.user.id();\n\n app\n .request({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + `/users/${userId}/twofactor/disable`,\n })\n .then(() => {\n this.loading = false;\n this.attrs.onDisabled();\n this.hide();\n })\n .catch((error) => {\n // Handle any errors.\n });\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport TwoFactorGridItem from './TwoFactorGridItem';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport TwoFactorEnableModal from './TwoFactorEnableModal';\nimport TwoFactorDisableConfirmModal from './TwoFactorDisableConfirmModal ';\n\nexport default class TwoFactorGrid extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.user = this.attrs.user;\n this.twoFactorEnabled = this.user.twoFactorEnabled();\n this.canDisableTwoFactor = this.user.canDisable2FA();\n this.backupCodesRemaining = this.user.backupCodesRemaining() || 0;\n }\n\n view() {\n return (\n
    \n
      {listItems(this.twoFactorItems().toArray())}
    \n
    \n );\n }\n\n twoFactorItems() {\n const items = new ItemList();\n\n const disableAction = this.getDisableAction();\n const enableAction = (\n \n );\n\n items.add(\n 'status',\n \n );\n\n // Only continue to add other items if Two Factor Authentication is enabled\n if (!this.twoFactorEnabled) return items;\n\n items.add(\n 'backupCodes',\n \n // Generate More\n // \n // ) : null\n // }\n />\n );\n\n // Add other items as needed\n\n return items;\n }\n\n getDisableAction() {\n const disableButton = (\n \n );\n\n return !this.canDisableTwoFactor ? (\n {disableButton}\n ) : (\n disableButton\n );\n }\n\n enableTwoFactor() {\n app.modal.show(TwoFactorEnableModal, { onEnabled: this.onTwoFactorEnabled.bind(this), user: this.user });\n }\n\n onTwoFactorEnabled() {\n this.twoFactorEnabled = true;\n m.redraw();\n }\n\n disableTwoFactor() {\n app.modal.show(TwoFactorDisableConfirmModal, { onDisabled: this.onTwoFactorDisabled.bind(this), user: this.user });\n }\n\n onTwoFactorDisabled() {\n this.twoFactorEnabled = false;\n m.redraw();\n }\n\n generateBackupCodes() {\n // Logic to generate more backup codes\n // Update this.backupCodesRemaining accordingly\n m.redraw();\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport TwoFactorGrid from './TwoFactorGrid';\n\nexport default class TwoFactorSettings extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.twoFactorEnabled = this.attrs.user.twoFactorEnabled();\n this.canDisableTwoFactor = this.attrs.user.canDisable2FA();\n this.loading = false;\n }\n\n view() {\n return (\n
    \n \n
    \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/FieldSet'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/LogInModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/ForumApplication'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Group'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","import Extend from 'flarum/common/extenders';\nimport Group from 'flarum/common/models/Group';\nimport User from 'flarum/common/models/User';\n\nexport default [\n new Extend.Model(User) //\n .attribute('twoFactorEnabled')\n .attribute('canDisable2FA')\n .attribute('mustEnable2FA')\n .attribute('backupCodesRemaining'),\n\n new Extend.Model(Group) //\n .attribute('requires2FA'),\n];\n","import commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/forum/app';\nimport extendUserSecurityPage from './extendUserSecurityPage';\nimport extendLogInModal from './extendLogInModal';\nimport extendForumApplication from './extendForumApplication';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('ianm/twofactor', () => {\n extendUserSecurityPage();\n extendLogInModal();\n extendForumApplication();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport UserSecurityPage from 'flarum/forum/components/UserSecurityPage';\nimport TwoFactorSettings from './components/TwoFactorSettings';\nimport FieldSet from 'flarum/common/components/FieldSet';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function extendUserSecurityPage() {\n extend(UserSecurityPage.prototype, 'settingsItems', function (items) {\n items.add(\n 'twoFactor',\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.two_factor_help')}

    \n

    \n {app.translator.trans('ianm-twofactor.forum.security.two_factor_apps', {\n google: (\n \n Google Authenticator\n \n ),\n microsoft: (\n \n Microsoft Authenticator\n \n ),\n authy: (\n \n Authy\n \n ),\n })}\n

    \n \n
    ,\n 100\n );\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport default function extendLogInModal() {\n extend(LogInModal.prototype, 'oninit', function (vnode) {\n // Initialize the 2FA token stream\n this.twoFactorToken = Stream('');\n this.twoFactorRequired = false;\n });\n\n extend(LogInModal.prototype, 'fields', function (items) {\n // Add the 2FA input field to the form\n if (this.twoFactorRequired) {\n items.add(\n 'twoFactor',\n
    \n \n
    ,\n 19\n );\n\n items.remove('identification');\n items.remove('password');\n items.remove('remember');\n }\n });\n\n extend(LogInModal.prototype, 'loginParams', function (data) {\n // Add the twoFactorToken to the login params\n data.twoFactorToken = this.twoFactorToken();\n\n return data;\n });\n\n override(LogInModal.prototype, 'onerror', function (original, error) {\n if (error.status === 401) {\n const errors = error.response && error.response.errors;\n const firstErrorDetail = (errors && errors[0] && errors[0].detail) || '';\n\n if (firstErrorDetail.includes('two_factor_required')) {\n // If the error indicates that 2FA is required, show the 2FA input field\n this.twoFactorRequired = true;\n error.alert.content = app.translator.trans('ianm-twofactor.forum.log_in.two_factor_required_message');\n this.alertAttrs = error.alert;\n } else {\n // Handle other types of 401 errors here\n error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n this.alertAttrs = error.alert;\n }\n m.redraw();\n this.onready();\n } else {\n original(error);\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport ForumApplication from 'flarum/forum/ForumApplication';\nimport alertTwoFactorAuthentication from './alertTwoFactorAuthentication';\n\nexport default function extendForumApplication() {\n extend(ForumApplication.prototype, 'mount', function () {\n alertTwoFactorAuthentication(app);\n });\n}\n","import Alert from 'flarum/common/components/Alert';\nimport Button from 'flarum/common/components/Button';\nimport icon from 'flarum/common/helpers/icon';\nimport Component from 'flarum/common/Component';\nimport TwoFactorEnableModal from './components/TwoFactorEnableModal';\n\n/**\n * Shows an alert if the user has not enabled 2FA.\n *\n * @param {import('../ForumApplication').default} app\n */\nexport default function alertTwoFactorAuthentication(app) {\n const user = app.session.user;\n\n if (!user || !user.mustEnable2FA()) return;\n\n class Enable2FAButton extends Component {\n view() {\n return (\n \n );\n }\n\n onclick() {\n app.modal.show(TwoFactorEnableModal, { onEnabled: this.onTwoFactorEnabled.bind(this), user });\n }\n\n onTwoFactorEnabled() {\n user.mustEnable2FA(false);\n m.redraw();\n\n // Unmount the ContainedAlert\n m.mount(alertContainer, null);\n }\n }\n\n class ContainedAlert extends Alert {\n view(vnode) {\n const vdom = super.view(vnode);\n return { ...vdom, children: [
    {vdom.children}
    ] };\n }\n }\n\n const alertContainer = $('
    ').insertBefore('#content')[0];\n\n m.mount(alertContainer, {\n view: () => (\n ]} className=\"Alert--2faEnable\">\n {app.translator.trans('ianm-twofactor.forum.user_2fa.alert_message')}\n \n ),\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","add","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","TwoFactorGridItem","_Component","apply","arguments","view","_this$attrs","this","attrs","iconName","icon","title","action","helpText","m","className","Component","TwoFactorEnableModal","_Modal","_proto","oninit","vnode","user","status","qrCodeUrl","backupCodes","token","Stream","code","activeTab","trans","oncreate","_this","userId","id","method","url","attribute","then","response","svg","redraw","content","_this2","LoadingIndicator","Button","onclick","src","alt","bidi","placeholder","verifyToken","map","finish","_this3","body","twoFactorEnabled","error","alert","onEnabled","hide","Modal","TwoFactorDisableConfirmModal","loading","disable","onDisabled","TwoFactorGrid","canDisableTwoFactor","canDisable2FA","backupCodesRemaining","listItems","twoFactorItems","toArray","items","ItemList","disableAction","getDisableAction","enableAction","enableTwoFactor","disableButton","disableTwoFactor","disabled","Tooltip","text","show","onTwoFactorEnabled","onTwoFactorDisabled","generateBackupCodes","TwoFactorSettings","_extends","assign","target","i","length","source","Extend","User","Group","concat","commonExtend","extend","UserSecurityPage","FieldSet","label","google","LinkButton","external","href","rel","microsoft","authy","LogInModal","twoFactorToken","twoFactorRequired","name","type","remove","data","override","original","errors","detail","includes","alertAttrs","onready","ForumApplication","session","mustEnable2FA","Enable2FAButton","translator","modal","mount","alertContainer","ContainedAlert","_Alert","vdom","children","Alert","$","insertBefore","dismissible","controls","alertTwoFactorAuthentication"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,c,MCExDC,GAAAA,aAAiBC,IAAI,kBAAkB,WAAO,ICF9C,MAAM,EAA+BJ,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,qC,aCAzC,SAASG,EAAgBlB,EAAGmB,GAKzC,OAJAD,EAAkBjB,OAAOmB,eAAiBnB,OAAOmB,eAAeC,OAAS,SAAyBrB,EAAGmB,GAEnG,OADAnB,EAAEsB,UAAYH,EACPnB,CACT,EACOkB,EAAgBlB,EAAGmB,EAC5B,CCLe,SAASI,EAAeC,EAAUC,GAC/CD,EAASjB,UAAYN,OAAOyB,OAAOD,EAAWlB,WAC9CiB,EAASjB,UAAUoB,YAAcH,EACjCJ,EAAeI,EAAUC,EAC3B,CCLA,MAAM,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B,KAAC,KAAAuC,GACxB,OAAA+E,EAAA,GAAY6C,EAAM,CAAAC,SAAU,CAACpI,EAAA,OAAKC,UAAU,aAAakI,EAAKC,YAChE,EAACH,CAAA,CAJiB,CAASI,KAOvBL,EAAiBM,EAAE,kCAAkCC,aAAa,YAAY,GAEpFvI,EAAE+H,MAAMC,EAAgB,CACtBzI,KAAM,kBACJS,EAACiI,EAAc,CAACO,aAAa,EAAOC,SAAU,CAACzI,EAAC4H,EAAe,OAAM3H,UAAU,oBAC5E1B,EAAIsJ,WAAW7G,MAAM,+CACP,GArCqB,CAwC5C,CD/CI0H,CAA6BnK,IAC/B,GHGF,G","sources":["webpack://@ianm/twofactor/webpack/bootstrap","webpack://@ianm/twofactor/webpack/runtime/compat get default export","webpack://@ianm/twofactor/webpack/runtime/define property getters","webpack://@ianm/twofactor/webpack/runtime/hasOwnProperty shorthand","webpack://@ianm/twofactor/webpack/runtime/make namespace object","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/app']\"","webpack://@ianm/twofactor/./src/common/index.ts","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/app']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/extend']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/components/UserSecurityPage']\"","webpack://@ianm/twofactor/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@ianm/twofactor/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/Component']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Button']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@ianm/twofactor/./src/forum/components/TwoFactorGridItem.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@ianm/twofactor/./src/forum/components/TwoFactorEnableModal.js","webpack://@ianm/twofactor/./src/forum/components/TwoFactorDisableConfirmModal .js","webpack://@ianm/twofactor/./src/forum/components/TwoFactorGrid.js","webpack://@ianm/twofactor/./src/forum/components/TwoFactorSettings.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/FieldSet']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['forum/ForumApplication']\"","webpack://@ianm/twofactor/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/extenders']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/models/Group']\"","webpack://@ianm/twofactor/external root \"flarum.core.compat['common/models/User']\"","webpack://@ianm/twofactor/./src/common/extend.ts","webpack://@ianm/twofactor/./src/forum/extend.ts","webpack://@ianm/twofactor/./src/forum/index.ts","webpack://@ianm/twofactor/./src/forum/extendUserSecurityPage.js","webpack://@ianm/twofactor/./src/forum/extendLogInModal.js","webpack://@ianm/twofactor/./src/forum/extendForumApplication.js","webpack://@ianm/twofactor/./src/forum/alertTwoFactorAuthentication.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\napp.initializers.add('ianm/twofactor', () => {});\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserSecurityPage'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default class TwoFactorGridItem extends Component {\n view() {\n const { icon: iconName, title, value, action, helpText } = this.attrs;\n\n return (\n
  • \n {icon(iconName)}\n
    \n {title}\n {value}\n {helpText && {helpText}}\n
    \n {action && {action}}\n
  • \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport Stream from 'flarum/common/utils/Stream';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default class TwoFactorEnableModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.user = this.attrs.user;\n // Statuses: 'loading', 'displayQR', 'displayBackupCodes', 'final'\n this.status = 'loading';\n this.qrCodeUrl = null;\n this.backupCodes = [];\n this.token = Stream('');\n this.code = null;\n this.activeTab = 'qrcode';\n }\n\n className() {\n return 'TwoFactorEnableModal Modal--small';\n }\n\n title() {\n return app.translator.trans('ianm-twofactor.forum.security.two_factor_heading');\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const userId = this.user.id();\n app\n .request({\n method: 'GET',\n url: app.forum.attribute('apiUrl') + `/users/${userId}/twofactor/qrcode`,\n })\n .then((response) => {\n this.qrCodeUrl = response.svg;\n this.code = response.code;\n this.status = 'displayQR';\n m.redraw();\n });\n }\n\n onupdate() {\n const tokenInput = document.querySelector('.TwoFactorEnableModal [name=token]');\n if (tokenInput && document.activeElement !== tokenInput) {\n tokenInput.focus();\n }\n }\n\n content() {\n return (\n
    \n {this.status === 'loading' && (\n
    \n \n

    {app.translator.trans('ianm-twofactor.forum.security.loading_qr')}

    \n
    \n )}\n\n {this.status === 'displayQR' && (\n
    \n
    \n {\n this.activeTab = 'qrcode';\n m.redraw();\n }}\n >\n {app.translator.trans('ianm-twofactor.forum.security.qr_tab')}\n \n {\n this.activeTab = 'manual';\n m.redraw();\n }}\n >\n {app.translator.trans('ianm-twofactor.forum.security.manual_tab')}\n \n
    \n\n {this.activeTab === 'qrcode' && (\n
    \n {app.translator.trans('ianm-twofactor.forum.security.qr_code_alt')}\n

    {app.translator.trans('ianm-twofactor.forum.security.scan_qr_instruction')}

    \n
    \n )}\n\n {this.activeTab === 'manual' && (\n
    \n {this.code}\n

    {app.translator.trans('ianm-twofactor.forum.security.manual_entry_instruction')}

    \n
    \n )}\n\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n )}\n\n {this.status === 'displayBackupCodes' && (\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.backup_codes')}

    \n
      \n {this.backupCodes.map((code) => (\n
    • \n {code}\n
    • \n ))}\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.backup_codes_instruction')}

    \n {\n this.status = 'final';\n m.redraw();\n }}\n >\n {app.translator.trans('ianm-twofactor.forum.security.saved_backup_codes_button')}\n \n
    \n )}\n\n {this.status === 'final' && (\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.two_factor_enabled_confirmation')}

    \n \n
    \n )}\n
    \n );\n }\n\n verifyToken() {\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/users/twofactor/verify',\n body: {\n token: this.token(),\n },\n })\n .then((response) => {\n this.backupCodes = response.backupCodes;\n this.status = 'displayBackupCodes';\n this.user.twoFactorEnabled(true);\n m.redraw();\n })\n .catch((error) => {\n //alert('Verification failed. Please try again.');\n //error.alert.content = 'Verification failed. Please try again.';\n });\n }\n\n finish() {\n this.attrs.onEnabled();\n this.hide();\n }\n\n onSubmit(e) {\n e.preventDefault();\n this.verifyToken();\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\n\nexport default class TwoFactorDisableConfirmModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = false;\n }\n\n className() {\n return 'TwoFactorDisableConfirmModal Modal--small';\n }\n\n title() {\n return app.translator.trans('ianm-twofactor.forum.security.confirm_disable_2fa_title');\n }\n\n content() {\n return (\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.confirm_disable_2fa_text')}

    \n
    \n \n \n
    \n
    \n );\n }\n\n disable() {\n this.loading = true;\n const userId = this.attrs.user.id();\n\n app\n .request({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + `/users/${userId}/twofactor/disable`,\n })\n .then(() => {\n this.loading = false;\n this.attrs.onDisabled();\n this.hide();\n })\n .catch((error) => {\n // Handle any errors.\n });\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport TwoFactorGridItem from './TwoFactorGridItem';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport TwoFactorEnableModal from './TwoFactorEnableModal';\nimport TwoFactorDisableConfirmModal from './TwoFactorDisableConfirmModal ';\n\nexport default class TwoFactorGrid extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.user = this.attrs.user;\n this.twoFactorEnabled = this.user.twoFactorEnabled();\n this.canDisableTwoFactor = this.user.canDisable2FA();\n this.backupCodesRemaining = this.user.backupCodesRemaining() || 0;\n }\n\n view() {\n return (\n
    \n
      {listItems(this.twoFactorItems().toArray())}
    \n
    \n );\n }\n\n twoFactorItems() {\n const items = new ItemList();\n\n const disableAction = this.getDisableAction();\n const enableAction = (\n \n );\n\n items.add(\n 'status',\n \n );\n\n // Only continue to add other items if Two Factor Authentication is enabled\n if (!this.twoFactorEnabled) return items;\n\n items.add(\n 'backupCodes',\n \n // Generate More\n // \n // ) : null\n // }\n />\n );\n\n // Add other items as needed\n\n return items;\n }\n\n getDisableAction() {\n const disableButton = (\n \n );\n\n return !this.canDisableTwoFactor ? (\n {disableButton}\n ) : (\n disableButton\n );\n }\n\n enableTwoFactor() {\n app.modal.show(TwoFactorEnableModal, { onEnabled: this.onTwoFactorEnabled.bind(this), user: this.user });\n }\n\n onTwoFactorEnabled() {\n this.twoFactorEnabled = true;\n m.redraw();\n }\n\n disableTwoFactor() {\n app.modal.show(TwoFactorDisableConfirmModal, { onDisabled: this.onTwoFactorDisabled.bind(this), user: this.user });\n }\n\n onTwoFactorDisabled() {\n this.twoFactorEnabled = false;\n m.redraw();\n }\n\n generateBackupCodes() {\n // Logic to generate more backup codes\n // Update this.backupCodesRemaining accordingly\n m.redraw();\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport TwoFactorGrid from './TwoFactorGrid';\n\nexport default class TwoFactorSettings extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.twoFactorEnabled = this.attrs.user.twoFactorEnabled();\n this.canDisableTwoFactor = this.attrs.user.canDisable2FA();\n this.loading = false;\n }\n\n view() {\n return (\n
    \n \n
    \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/FieldSet'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/LogInModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/ForumApplication'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Group'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","import Extend from 'flarum/common/extenders';\nimport Group from 'flarum/common/models/Group';\nimport User from 'flarum/common/models/User';\n\nexport default [\n new Extend.Model(User) //\n .attribute('twoFactorEnabled')\n .attribute('canDisable2FA')\n .attribute('mustEnable2FA')\n .attribute('backupCodesRemaining'),\n\n new Extend.Model(Group) //\n .attribute('requires2FA'),\n];\n","import commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/forum/app';\nimport extendUserSecurityPage from './extendUserSecurityPage';\nimport extendLogInModal from './extendLogInModal';\nimport extendForumApplication from './extendForumApplication';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('ianm/twofactor', () => {\n extendUserSecurityPage();\n extendLogInModal();\n extendForumApplication();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport UserSecurityPage from 'flarum/forum/components/UserSecurityPage';\nimport TwoFactorSettings from './components/TwoFactorSettings';\nimport FieldSet from 'flarum/common/components/FieldSet';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function extendUserSecurityPage() {\n extend(UserSecurityPage.prototype, 'settingsItems', function (items) {\n items.add(\n 'twoFactor',\n
    \n

    {app.translator.trans('ianm-twofactor.forum.security.two_factor_help')}

    \n

    \n {app.translator.trans('ianm-twofactor.forum.security.two_factor_apps', {\n google: (\n \n Google Authenticator\n \n ),\n microsoft: (\n \n Microsoft Authenticator\n \n ),\n authy: (\n \n Authy\n \n ),\n })}\n

    \n \n
    ,\n 100\n );\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport default function extendLogInModal() {\n extend(LogInModal.prototype, 'oninit', function (vnode) {\n // Initialize the 2FA token stream\n this.twoFactorToken = Stream('');\n this.twoFactorRequired = false;\n });\n\n extend(LogInModal.prototype, 'fields', function (items) {\n // Add the 2FA input field to the form\n if (this.twoFactorRequired) {\n items.add(\n 'twoFactor',\n
    \n \n
    ,\n 19\n );\n\n items.remove('identification');\n items.remove('password');\n items.remove('remember');\n }\n });\n\n extend(LogInModal.prototype, 'loginParams', function (data) {\n // Add the twoFactorToken to the login params\n data.twoFactorToken = this.twoFactorToken();\n\n return data;\n });\n\n override(LogInModal.prototype, 'onerror', function (original, error) {\n if (error.status === 401) {\n const errors = error.response && error.response.errors;\n const firstErrorDetail = (errors && errors[0] && errors[0].detail) || '';\n\n if (firstErrorDetail.includes('two_factor_required')) {\n // If the error indicates that 2FA is required, show the 2FA input field\n this.twoFactorRequired = true;\n error.alert.content = app.translator.trans('ianm-twofactor.forum.log_in.two_factor_required_message');\n this.alertAttrs = error.alert;\n } else {\n // Handle other types of 401 errors here\n error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n this.alertAttrs = error.alert;\n }\n m.redraw();\n this.onready();\n } else {\n original(error);\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport ForumApplication from 'flarum/forum/ForumApplication';\nimport alertTwoFactorAuthentication from './alertTwoFactorAuthentication';\n\nexport default function extendForumApplication() {\n extend(ForumApplication.prototype, 'mount', function () {\n alertTwoFactorAuthentication(app);\n });\n}\n","import Alert from 'flarum/common/components/Alert';\nimport Button from 'flarum/common/components/Button';\nimport icon from 'flarum/common/helpers/icon';\nimport Component from 'flarum/common/Component';\nimport TwoFactorEnableModal from './components/TwoFactorEnableModal';\n\n/**\n * Shows an alert if the user has not enabled 2FA.\n *\n * @param {import('../ForumApplication').default} app\n */\nexport default function alertTwoFactorAuthentication(app) {\n const user = app.session.user;\n\n if (!user || !user.mustEnable2FA()) return;\n\n class Enable2FAButton extends Component {\n view() {\n return (\n \n );\n }\n\n onclick() {\n app.modal.show(TwoFactorEnableModal, { onEnabled: this.onTwoFactorEnabled.bind(this), user });\n }\n\n onTwoFactorEnabled() {\n user.mustEnable2FA(false);\n m.redraw();\n\n // Unmount the ContainedAlert\n m.mount(alertContainer, null);\n }\n }\n\n class ContainedAlert extends Alert {\n view(vnode) {\n const vdom = super.view(vnode);\n return { ...vdom, children: [
    {vdom.children}
    ] };\n }\n }\n\n const alertContainer = $('
    ').insertBefore('#content')[0];\n\n m.mount(alertContainer, {\n view: () => (\n ]} className=\"Alert--2faEnable\">\n {app.translator.trans('ianm-twofactor.forum.user_2fa.alert_message')}\n \n ),\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","add","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","TwoFactorGridItem","_Component","apply","arguments","view","_this$attrs","this","attrs","iconName","icon","title","action","helpText","m","className","Component","TwoFactorEnableModal","_Modal","_proto","oninit","vnode","user","status","qrCodeUrl","backupCodes","token","Stream","code","activeTab","trans","oncreate","_this","userId","id","method","url","attribute","then","response","svg","redraw","onupdate","tokenInput","document","querySelector","activeElement","focus","content","_this2","LoadingIndicator","Button","onclick","src","alt","onsubmit","onSubmit","name","bidi","placeholder","type","verifyToken","map","finish","_this3","body","twoFactorEnabled","error","onEnabled","hide","e","preventDefault","Modal","TwoFactorDisableConfirmModal","loading","disable","onDisabled","TwoFactorGrid","canDisableTwoFactor","canDisable2FA","backupCodesRemaining","listItems","twoFactorItems","toArray","items","ItemList","disableAction","getDisableAction","enableAction","enableTwoFactor","disableButton","disableTwoFactor","disabled","Tooltip","text","show","onTwoFactorEnabled","onTwoFactorDisabled","generateBackupCodes","TwoFactorSettings","_extends","assign","target","i","length","source","Extend","User","Group","concat","commonExtend","extend","UserSecurityPage","FieldSet","label","google","LinkButton","external","href","rel","microsoft","authy","LogInModal","twoFactorToken","twoFactorRequired","remove","data","override","original","errors","detail","includes","alert","alertAttrs","onready","ForumApplication","session","mustEnable2FA","Enable2FAButton","translator","modal","mount","alertContainer","ContainedAlert","_Alert","vdom","children","Alert","$","insertBefore","dismissible","controls","alertTwoFactorAuthentication"],"sourceRoot":""} \ No newline at end of file