1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[1327],{1327:(b,u,_)=>{_.r(u),_.d(u,{Modal2faNewDeviceComponent:()=>N});var f=_(74523),e=_(54438),s=_(89079),h=_(89417),A=_(45853),c=_(50308),C=_(83038),l=_(29601),g=_(51136),D=_(45398),m=_(534),E=_(88141),p=_(16475),M=_(50779);function T(i,d){if(1&i){const t=e.RV6();e.j41(0,"div",16),e.nrm(1,"input",19),e.j41(2,"button",20),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.copyLink())}),e.nrm(3,"xetf-icon",21),e.k0s()()}if(2&i){const t=e.XpG(2);e.R7$(),e.Y8G("value",t.qrCode()),e.R7$(2),e.Y8G("name","copy")}}function v(i,d){if(1&i){const t=e.RV6();e.j41(0,"p"),e.PLo(1,1),e.nrm(2,"a",9),e.YFu(),e.k0s(),e.j41(3,"div",10),e.nrm(4,"qrcode",11),e.k0s(),e.SS7(5),e.j41(6,"div",12),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.toggleShowManuelEnter())})("keyup",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.toggleShowManuelEnter())}),e.j41(7,"span",13),e.PLo(8,2),e.nrm(9,"a",14),e.YFu(),e.k0s(),e.nrm(10,"xetf-icon",15),e.k0s(),e.DNE(11,T,4,2,"div",16),e.j41(12,"div",17)(13,"button",18),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.toApprove())}),e.qex(14),e.pXf(15,3),e.bVm(),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(2),e.Y8G("href",t.supportArticleUrl,e.B4B),e.R7$(2),e.Y8G("qrdata",t.qrAuthUrl())("width",256)("margin",0);const n=t.manualSecuryKey();e.R7$(6),e.xc7("vertical-align",n?"top":"bottom"),e.AVh("rotate-180",n),e.Y8G("name","chevron"),e.R7$(),e.vxM(n?11:-1)}}function F(i,d){if(1&i){const t=e.RV6();e.j41(0,"app-2fa-code",22),e.bIt("resetError",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.otpError.set(!1))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("loading",t.isLoading())("error",t.otpError())("description",t.optCodeDescription)("buttonText",t.otpCodeNext)}}function S(i,d){if(1&i){const t=e.RV6();e.j41(0,"app-2fa-code",23),e.bIt("resetError",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.otpError.set(!1))})("back",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.back())}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("loading","in_progress"===t.saving())("error",t.otpError())("useBackButton",!0)}}let N=(()=>{class i{constructor(){this.service=(0,e.WQX)(p.A),this.twoFaService=(0,e.WQX)(l.l),this.notifier=(0,e.WQX)(g.C),this._destroyRef=(0,e.WQX)(e.abz),this._modalRef=(0,e.WQX)(M.Y$),this.otpError=(0,e.vPA)(!1),this.loading=(0,e.vPA)("none"),this.saving=(0,e.vPA)("none"),this.manualSecuryKey=(0,e.vPA)(!1),this.qrCode=(0,e.vPA)(""),this.qrAuthUrl=(0,e.vPA)(""),this.isLoading=(0,e.EWP)(()=>"in_progress"===this.loading()),this.isSaving=(0,e.EWP)(()=>"in_progress"===this.saving()),this.supportArticleUrl="https://support.extraetf.com/hc/de/articles/23717991724700-Schritt-f\xfcr-Schritt-Anleitung-zur-Zwei-Faktor-Authentifizierung-2FA",this.modeView=(0,e.vPA)("otp-code"),this.optCodeDescription="Um einen weiteren zweiten Faktor hinzuzuf\xFCgen gibt bitte den Code aus deiner bisherigen Authenticator App ein",this.otpCodeNext=" Weiter "}ngOnInit(){this.twoFaService.entered.pipe((0,s.pQ)(this._destroyRef)).subscribe(()=>{"otp-code"===this.modeView()?this.getLink():this.enable()})}toggleShowManuelEnter(){this.manualSecuryKey.update(t=>!t)}getLink(){this.loading.set("in_progress"),this.service.getLinkForNewDevice(this.twoFaService.otp()).pipe((0,s.pQ)(this._destroyRef),(0,E.M)(t=>{this.qrCode.set(t.otp_secret),this.qrAuthUrl.set(t.otp_auth_url),this.loading.set("success"),this.next()},t=>{this.loading.set("error"),t===l.w?this.otpError.set(!0):this.notifier.error(c.k9)})).subscribe()}enable(){this.saving.set("in_progress"),this.service.sendCode(this.twoFaService.otp()).pipe((0,s.pQ)(this._destroyRef),(0,E.M)(()=>{this.saving.set("success"),this.notifier.success("2FA erfolgreich aktiviert"),this._modalRef.hide()},t=>{this.saving.set("error"),t===l.w?this.otpError.set(!0):this.notifier.error(c.k9)})).subscribe()}next(){this.modeView.set("qr-code")}toApprove(){this.modeView.set("approve-code")}back(){this.modeView.set("qr-code")}copyLink(){var t=this;return(0,f.A)(function*(){yield navigator.clipboard.writeText(t.qrCode()),t.notifier.info(c.SI)})()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-modal-2fa-new-device"]],standalone:!0,features:[e.Jv_([p.A]),e.aNF],decls:8,vars:1,consts:()=>{let t,n,o,r;return t="Zwei-Faktor-Authentifizierung hinzuf\xFCgen",n=" \xD6ffne die Authenticator-App und scanne den folgenden QR-Code. Wenn du eine Authenticator-App bisher noch nicht benutzt hast oder Hilfe ben\xF6tigst, schau dir den entsprechenden " + "\ufffd#2\ufffd" + "Hilfeartikel" + "\ufffd/#2\ufffd" + " an. ",o=" Alternativ kannst du deinen Sicherheitsschl\xFCssel auch " + "\ufffd#9\ufffd" + "manuell eintragen" + "\ufffd/#9\ufffd" + "",r=" Weiter ",[t,n,o,r,[1,"modal-header"],[1,"modal-title"],[1,"modal-body"],[3,"loading","error","description","buttonText"],[3,"loading","error","useBackButton"],["target","_blank",1,"tw-link-primary",3,"href"],[1,"text-center","mt-3","mb-3"],[3,"qrdata","width","margin"],["tabindex","0",3,"click","keyup"],["role","button"],[1,"text-primary","text-nowrap"],["role","button",1,"text-primary","d-inline-block","ms-1",3,"name"],[1,"d-flex","gap-1","align-items-center"],[1,"mt-4","text-end"],["type","button",1,"btn","btn-primary","wmin-200",3,"click"],["id","qrcode","disabled","",1,"form-control","form-control-sm",3,"value"],["type","button",1,"btn","btn-primary","d-flex","align-items-center",3,"click"],[3,"name"],[3,"resetError","loading","error","description","buttonText"],[3,"resetError","back","loading","error","useBackButton"]]},template:function(n,o){if(1&n&&(e.SS7(0),e.j41(1,"div",4)(2,"h4",5),e.pXf(3,0),e.k0s()(),e.j41(4,"div",6),e.DNE(5,v,16,10)(6,F,1,4,"app-2fa-code",7)(7,S,1,3,"app-2fa-code",8),e.k0s()),2&n){let r;const a=o.modeView();e.R7$(5),e.vxM("qr-code"===(r=a)?5:"otp-code"===r?6:"approve-code"===r?7:-1)}}
1,dependencies:[h.X1,m.Ss,C.Rl,D.c,A.s],encapsulation:2,changeDetection:0})}}return i})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.