PageSourceSearch

https://www.zus.pl/ezus/chunk-FZVA5AZO.js

js zus.pl collected 2026-09-24 09:02:11 UTC 33,927 bytes, 1 lines download raw bytes

1import{a as ae}from"./chunk-OGNY6U43.js";import{a as k}from"./chunk-CVHOMOE5.js";import{a as M}from"./chunk-GRNBNSXG.js";import{a as oe}from"./chunk-NJJZW2GO.js";import{a as g}from"./chunk-USJMRUC4.js";import{a as ne}from"./chunk-QUL2GZSN.js";import{c as I,p as u}from"./chunk-WUST5ATB.js";import{a as S}from"./chunk-MVLFF5M4.js";import{f as A,i as V,l as ee,m as te,n as ie}from"./chunk-OVX7EWVG.js";import{a as f}from"./chunk-FQL535RB.js";import{a as D,b as R,g as l}from"./chunk-GAL4ENT6.js";import{Injector as ke,inject as x,runInInjectionContext as Me}from"@angular/core";import{Router as Ze}from"@angular/router";import{firstValueFrom as j}from"rxjs";import{commonAuthStoreActions as Ke,LocalStorageService as Le,EssentialLocalStorageKeys as G}from"ezus-common";import{Store as Fe}from"@ngrx/store";import{inject as _,signal as we}from"@angular/core";import{Router as Ne}from"@angular/router";import{firstValueFrom as W}from"rxjs";import{commonAuthStoreActions as Pe,TranslocoToastService as xe,AuditService as be,LocalStorageService as Oe,EssentialLocalStorageKeys as Z,ParamsService as Re}from"ezus-common";import{Store as Ve}from"@ngrx/store";import{inject as B}from"@angular/core";import{HttpClient as ze}from"@angular/common/http";import{catchError as ye,tap as De}from"rxjs";import{LocalStorageService as Ae,EssentialLocalStorageKeys as Ie,AuditService as Ue}from"ezus-common";import*as re from"@angular/core";var U=(()=>{class i{constructor(){this.httpClient=B(ze),this.localStorageSrv=B(Ae),this.auditSrv=B(Ue)}sendNewCode(e){return this.httpClient.post("api/auth/wyslij-nowy-kod",{czyPonownaWysylka:e.czyPonownaWysylka}).pipe(De(n=>{this.localStorageSrv.setEssentialData(Ie.DEVICE_TRUST_CODE,n),this.auditDeviceTrustCodeResult(e.czyPonownaWysylka??!1,!0)}),ye(n=>{throw this.auditDeviceTrustCodeResult(e.czyPonownaWysylka??!1,!1),n}))}verifyCode(e){return this.httpClient.post("api/auth/potwierdz-logowanie",e)}auditDeviceTrustCodeResult(e,t){e?this.auditSrv.log(t?"ZAUFANIE_URZADZENIA_WERYFIKACJA_KODEM_PONOWNA_WYSYLKA_UDANE":"ZAUFANIE_URZADZENIA_WERYFIKACJA_KODEM_PONOWNA_WYSYLKA_NIEUDANE"):this.auditSrv.log(t?"ZAUFANIE_URZADZENIA_WERYFIKACJA_KODEM_PIERWSZA_WYSYLKA_UDANE":"ZAUFANIE_URZADZENIA_WERYFIKACJA_KODEM_PIERWSZA_WYSYLKA_NIEUDANE")}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=re.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();import*as se from"@angular/core";var P=(()=>{class i{constructor(){this.store=_(Ve),this.router=_(Ne),this.auditSrv=_(be),this.paramService=_(Re),this.localStorageSrv=_(Oe),this.translocoToastSrv=_(xe),this.broadcastChannelSrv=_(S),this.logoutConfirmationSrv=_(g),this.httpCodeSrv=_(U),this.deviceTrustTime=we("")}startDeviceTrustProcess(){this.localStorageSrv.setEssentialData(Z.DEVICE_TRUST_STEP,"NAMING"),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"DEVICE_TRUST_NAMING_STEP"}),this.router.navigateByUrl(u.DEVICE_TRUST_DEVICE_NAMING)}oneTimeAccess(){return l(this,null,function*(){try{let e=yield W(this.store.select(A));if(!e){this.store.dispatch(Pe.logout({logoutParams:null,navigatePath:u.LOGOWANIE}));return}let t=yield W(this.httpCodeSrv.sendNewCode({czyPonownaWysylka:!1}));this.localStorageSrv.removeItem(Z.DEVICE_TRUST_STEP),this.localStorageSrv.setEssentialData(Z.IS_USER_LOGGED_IN,!0),this.localStorageSrv.setEssentialData(Z.IS_SECOND_STEP_ACTIVE,!0),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"SECOND_STEP",sessionData:R(D({},e),{kodWeryfikacyjny:t})}),this.store.dispatch(f.setVerificationCode({code:t})),this.router.navigateByUrl(u.LOGOWANIE_DRUGI_ETAP)}catch{this.translocoToastSrv.error({key:"ezus.zaufanieUrzadzenia.wysylkaKodu.nieoczekiwanyBlad"})}})}logout(){this.logoutConfirmationSrv.open({headerLabelTranslationKey:"ezus.anulowanieProcesu.naglowek",contentTranslationKey:"ezus.anulowanieProcesu.komunikat",confirmButtonLabelTranslationKey:"ezus.anulowanieProcesu.przycisk.tak",cancelButtonLabelTranslationKey:"ezus.anulowanieProcesu.przycisk.nie",auditLogoutConfirmationFn:()=>this.auditSrv.log("ANULOWANIE_PROCESU_ZAUFANIA_URZADZENIA")})}fetchDeviceTrustTimeParam(){return l(this,null,function*(){let e=yield W(this.paramService.getSingleParamEzus("CZAS_WAZN_URZADZENIA_ZAUFANEGO"));this.deviceTrustTime.set(e)})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=se.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var O=(i,d)=>l(void 0,null,function*(){let e=x(Fe),t=x(Ze),n=x(ke),p=x(Le),L=p.get(G.IS_SECOND_STEP_ACTIVE),y=p.get(G.DEVICE_TRUST_STEP),F=x(P),E=d.url.split("?")[0];if(L)return t.createUrlTree([u.LOGOWANIE_DRUGI_ETAP]);if(!y)return t.createUrlTree([u.LOGOWANIE]);try{(yield j(e.select(A)))||(yield Me(n,()=>l(void 0,null,function*(){yield ae()})));let X=yield j(e.select(ee)),Te=yield j(e.select(V));
1return e.selectSignal(ie)()&&(yield F.oneTimeAccess()),y==="PROMPT"?(e.dispatch(f.clearCodeVerificationData({isCodeRequired:!0})),b(E,u.DEVICE_TRUST_PROMPT,t)):X&&y==="NAMING"?(e.dispatch(f.clearCodeVerificationData({isCodeRequired:!0})),b(E,u.DEVICE_TRUST_DEVICE_NAMING,t)):Te?b(E,u.DEVICE_TRUST_CODE,t):X===!1?y==="SUCCESS"?b(E,u.DEVICE_TRUST_SUCCESS,t):(p.removeItem(G.DEVICE_TRUST_STEP),t.createUrlTree([`${u.WYBOR_KONTEKSTU}?default=true`])):b(E,u.DEVICE_TRUST_PROMPT,t)}catch(Q){return console.error(Q),e.dispatch(Ke.displayLoader({displayLoader:!1})),e.dispatch(f.getCurrentUserFailure({logoutParams:null})),!1}}),b=(i,d,e)=>i!==d?e.createUrlTree([d]):!0;import"@angular/core";import{RouterOutlet as Be}from"@angular/router";import*as v from"@angular/core";var ce=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=v.\u0275\u0275defineComponent({type:i,selectors:[["ng-component"]],standalone:!0,features:[v.\u0275\u0275StandaloneFeature],decls:2,vars:0,consts:[[1,"main-container"]],template:function(t,n){t&1&&(v.\u0275\u0275elementStart(0,"div",0),v.\u0275\u0275element(1,"router-outlet"),v.\u0275\u0275elementEnd())},dependencies:[Be],styles:["[_nghost-%COMP%]{width:100dvw;max-width:100%;display:flex;flex-direction:column;align-items:center;padding:104px 16px 170px;background-color:#f0f5fa}.main-container[_ngcontent-%COMP%]{max-width:809px;display:flex;justify-content:center}@media (min-width: 1920px){.main-container[_ngcontent-%COMP%]{width:1177px;max-width:1177px}}"]})}}return i})();import{inject as Qe}from"@angular/core";import{TranslocoDirective as Xe}from"@jsverse/transloco";import{ContentBoxComponent as et}from"ezus-design-system";import{input as We}from"@angular/core";import{TranslocoDirective as je}from"@jsverse/transloco";import{ButtonComponent as Ge}from"ezus-design-system";import{AuditDirective as Ye}from"ezus-common";import*as o from"@angular/core";function qe(i,d){if(i&1){let e=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"eds-button",6),o.\u0275\u0275listener("onClick",function(){let n=o.\u0275\u0275restoreView(e);return o.\u0275\u0275resetView(n.function())}),o.\u0275\u0275elementEnd()}if(i&2){let e=d,t=o.\u0275\u0275nextContext().$implicit;o.\u0275\u0275property("disabled",e.disabled)("label",t(e.translationKey))("auditEvent",e.auditEvent)}}function Je(i,d){if(i&1){let e=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"eds-button",7),o.\u0275\u0275listener("onClick",function(){let n=o.\u0275\u0275restoreView(e);return o.\u0275\u0275resetView(n.function())}),o.\u0275\u0275elementEnd()}if(i&2){let e=d,t=o.\u0275\u0275nextContext().$implicit;o.\u0275\u0275property("label",t(e.translationKey))("auditEvent",e.auditEvent)}}function $e(i,d){if(i&1){let e=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"eds-button",8),o.\u0275\u0275listener("onClick",function(){let n=o.\u0275\u0275restoreView(e);return o.\u0275\u0275resetView(n.function())}),o.\u0275\u0275elementEnd()}if(i&2){let e=d,t=o.\u0275\u0275nextContext().$implicit;o.\u0275\u0275property("label",t(e.translationKey))("auditEvent",e.auditEvent)}}function He(i,d){if(i&1&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",1),o.\u0275\u0275template(2,qe,1,3,"eds-button",2)(3,Je,1,2,"eds-button",3),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"div",4),o.\u0275\u0275template(5,$e,1,2,"eds-button",5),o.\u
10275\u0275elementEnd(),o.\u0275\u0275elementContainerEnd()),i&2){let e,t,n,p=o.\u0275\u0275nextContext();o.\u0275\u0275advance(2),o.\u0275\u0275conditional((e=p.buttonConfig().firstButton)?2:-1,e),o.\u0275\u0275advance(),o.\u0275\u0275conditional((t=p.buttonConfig().secondButton)?3:-1,t),o.\u0275\u0275advance(2),o.\u0275\u0275conditional((n=p.buttonConfig().thirdButton)?5:-1,n)}}var w=(()=>{class i{constructor(){this.buttonConfig=We.required()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=o.\u0275\u0275defineComponent({type:i,selectors:[["ezus-main-device-trust-actions"]],inputs:{buttonConfig:[1,"buttonConfig"]},standalone:!0,features:[o.\u0275\u0275StandaloneFeature],decls:1,vars:0,consts:[[4,"transloco"],[1,"right-actions"],["type","submit","data-testId","submit-button",3,"disabled","label","auditEvent"],["styleClass","eds-button-secondary",3,"label","auditEvent"],[1,"left-actions"],["styleClass","eds-button-quaternary",3,"label","auditEvent"],["type","submit","data-testId","submit-button",3,"onClick","disabled","label","auditEvent"],["styleClass","eds-button-secondary",3,"onClick","label","auditEvent"],["styleClass","eds-button-quaternary",3,"onClick","label","auditEvent"]],template:function(t,n){t&1&&o.\u0275\u0275template(0,He,6,3,"ng-container",0)},dependencies:[je,Ge,Ye],styles:["[_nghost-%COMP%]{display:block;margin-top:20px}[_nghost-%COMP%]   eds-button[_ngcontent-%COMP%]{margin-bottom:16px}@media (min-width: 1023.5px){[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;margin-top:30px}[_nghost-%COMP%]   .right-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse}[_nghost-%COMP%]   .right-actions[_ngcontent-%COMP%] > eds-button[_ngcontent-%COMP%]{margin-left:16px}[_nghost-%COMP%]   .left-actions[_ngcontent-%COMP%]{grid-row:1/2;display:flex}}"]})}}return i})();import*as s from"@angular/core";var tt=i=>({days:i});function it(i,d){if(i&1&&(s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275elementStart(1,"eds-content-box",1)(2,"p"),s.\u0275\u0275text(3),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"p"),s.\u0275\u0275text(5),s.\u0275\u0275elementEnd()(),s.\u0275\u0275element(6,"ezus-main-device-trust-actions",2),s.\u0275\u0275elementContainerEnd()),i&2){let e=d.$implicit,t=s.\u0275\u0275nextContext();s.\u0275\u0275advance(),s.\u0275\u0275property("headerLabel",e("ezus.zaufanieUrzadzenia.prompt.tytul"))("divider",!0),s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(e("ezus.zaufanieUrzadzenia.prompt.tresc.pierwszyAkapit",s.\u0275\u0275pureFunction1(5,tt,t.deviceTrustTime()))),s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(e("ezus.zaufanieUrzadzenia.prompt.tresc.drugiAkapit")),s.\u0275\u0275advance(),s.\u0275\u0275property("buttonConfig",t.buttonConfig)}}var ue=(()=>{class i{constructor(){this.facade=Qe(P),this.deviceTrustTime=this.facade.deviceTrustTime,this.buttonConfig={firstButton:{translationKey:"ezus.zaufanieUrzadzenia.prompt.przyciski.dodajDoZaufanych",function:()=>this.onStartDeviceTrustProcess(),auditEvent:"WYRAZENIE_ZGODY_NA_ZAUFANIE_URZADZENIA"},secondButton:{translationKey:"ezus.zaufanieUrzadzenia.prompt.przyciski.dostepJednorazowy",function:()=>this.onOneTimeAccess(),auditEvent:"REZYGNACJA_Z_ZAUFANIA_URZADZENIA_W_PROCESIE_LOGOWANIA"},thirdButton:{translationKey:"ezus.zaufanieUrzadzenia.prompt.przyciski.anuluj",function:()=>this.onLogout()}}}ngOnInit(){this.facade.fetchDeviceTrustTimeParam()}onStartDeviceTrustProcess(){this.facade.startDeviceTrustProcess()}onOneTimeAccess(){this.facade.oneTimeAccess()}onLogout(){this.facade.logout()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=s.\u0275\u0275defineComponent({type:i,selectors:[["ezus-main-device-trust-prompt"]],standalone:!0,features:[s.\u0275\u0275ProvidersFeature([P]),s.\u0275\u0275StandaloneFeature],decls:1,vars:0,consts:[[4,"transloco"],[3,"headerLabel","divider"],[3,"buttonConfig"]],template:function(t,n){t&1&&s.\u0275\u0275template(0,it,7,7,"ng-container",0)},dependencies:[et,Xe,w],styles:["@media (min-width: 1023.5px){[_nghost-%COMP%] > eds-content-box[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{padding-bottom:12px}}"]})}}return i})();import{inject as ft}from"@angular/core";import{TranslocoDirective as vt}from"@jsverse/transloco";
1import{CodeVerificationService as _t,CodeVerificationComponent as Ct}from"ezus-common";import{inject as C,signal as ot}from"@angular/core";import{Router as nt}from"@angular/router";import{toSignal as at}from"@angular/core/rxjs-interop";import{first as rt,firstValueFrom as st,tap as ct}from"rxjs";import{Store as ut}from"@ngrx/store";import{TranslocoToastService as dt,EssentialLocalStorageKeys as Y,DeviceNameService as lt}from"ezus-common";import{AuditService as mt,LocalStorageService as pt}from"ezus-common";import*as de from"@angular/core";var q=(()=>{class i{constructor(){this.codeVerificationInProgressSig=ot(!1),this.codeVerificationHttpService=C(U),this.store=C(ut),this.router=C(nt),this.auditSrv=C(mt),this.localStorageSrv=C(pt),this.translocoToastSrv=C(dt),this.broadcastChannelSrv=C(S),this.deviceNameSrv=C(lt),this.logoutConfirmationSrv=C(g),this.verificationCodeDataSig=at(this.store.select(V).pipe(rt(),ct(e=>{e?.dataWaznosci||this.logout()})))}submit(e){return l(this,null,function*(){if(!this.codeVerificationInProgressSig()){this.co
1deVerificationInProgressSig.set(!0);try{yield this.verifyCode(e)}catch(t){this.codeVerificationInProgressSig.set(!1),this.handleVerificationCodeError(t)}}})}logout(){this.logoutConfirmationSrv.open({headerLabelTranslationKey:"ezus.anulowanieProcesu.naglowek",contentTranslationKey:"ezus.anulowanieProcesu.komunikat",confirmButtonLabelTranslationKey:"ezus.anulowanieProcesu.przycisk.tak",cancelButtonLabelTranslationKey:"ezus.anulowanieProcesu.przycisk.nie",auditLogoutConfirmationFn:()=>this.auditSrv.log("ANULOWANIE_PROCESU_ZAUFANIA_URZADZENIA_NA_KROKU_WERYFIKACJI_KODEM")})}navigateToPreviousStep(){this.localStorageSrv.setEssentialData(Y.DEVICE_TRUST_STEP,"NAMING"),this.store.dispatch(f.clearCodeVerificationData({isCodeRequired:!0})),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"DEVICE_TRUST_NAMING_STEP"}),this.router.navigateByUrl(u.DEVICE_TRUST_DEVICE_NAMING),this.auditSrv.log("COFNIECIE_Z_KROKU_WALIDACJI_KODEM_ZAUFANIA_URZADZENIA")}auditCodeExpired(e){let t={daneDodatkowe:[{nazwaPola:"NUMER_KODU",wartoscPola:e.toString()}]},n={additionalData:{i:D({},t)}};this.auditSrv.logWithData("WYGASNIECIE_KODU_PODCZAS_ZAUFANIA_URZADZENIA",n)}verifyCode(p){return l(this,arguments,function*({code:e,codeNumber:t,codeDate:n}){let{browser:L,browser_version:y,deviceType:F,os:E}=this.deviceNameSrv.getDeviceProps();yield st(this.codeVerificationHttpService.verifyCode({wpisanyKod:e,numerKodu:t,data:n,urzadzenie:{czyDostepJednorazowy:!1,nazwaDomyslna:this.deviceNameSrv.getDefaultDeviceName(),nazwaPrzyjazna:this.deviceNameSrv.getDeviceName(),przegladarka:L,wersjaPrzegladarki:y,kategoriaUrzadzenia:F,systemOperacyjny:E}})),this.localStorageSrv.removeItem(Y.DEVICE_NAME),this.store.dispatch(f.clearCodeVerificationData({isCodeRequired:!1})),this.codeVerificationInProgressSig.set(!1),this.localStorageSrv.setEssentialData(Y.DEVICE_TRUST_STEP,"SUCCESS"),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"DEVICE_TRUST_SUCCESS_STEP"}),this.router.navigateByUrl(u.DEVICE_TRUST_SUCCESS)})}handleVerificationCodeError(e){let t=e?.error;if(!M(t)){this.translocoToastSrv.open("error",{key:"ezus.weryfikacjaKodem.nieoczekiwanyBlad"});return}if(t.kod==="ezus.blad.logowanie.kodZablokowany"){this.translocoToastSrv.open("warn",{key:"ezus.weryfikacjaKodem.kodZablokowany"});return}this.translocoToastSrv.open("error",{key:"ezus.weryfikacjaKodem.kodNiepoprawny"})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=de.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac})}}return i})();import*as a from"@angular/core";var ht=()=>({key:"ezus.bladPonownejWysylkiKodu"});function St(i,d){if(i&1){let e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"ec-code-verification",3),a.\u0275\u0275listener("onCodeExpired",function(n){a.\u0275\u0275restoreView(e);let p=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(p.onCodeExpired(n))})("onCancel",function(){a.\u0275\u0275restoreView(e);let n=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(n.onLogout())})("onGoBack",function(){a.\u0275\u0275restoreView(e);let n=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(n.onPreviousStep())})("onSubmit",function(n){a.\u0275\u0275restoreView(e);let p=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(p.onSubmit(n))}),a.\u0275\u0275elementEnd()}if(i&2){let e=d.$implicit,t=a.\u0275\u0275nextContext(),n=a.\u0275\u0275nextContext();a.\u0275\u0275property("firstVerificationCode",t)("headerText",e("ezus.zaufanieUrzadzenia.weryfikacjaKodu.tytul"))("cancelButtonLabel",e("ezus.zaufanieUrzadzenia.weryfikacjaKodu.anuluj"))("submitButtonLabel",e("ezus.zaufanieUrzadzenia.weryfikacjaKodu.dalej"))("goBackButtonLabel",e("ezus.zaufanieUrzadzenia.weryfikacjaKodu.wstecz"))("submitButtonDisabled",n.facade.codeVerificationInProgressSig())("resendVerificationCodeSrv",n.facade.codeVerificationHttpService)("errorNotification",a.\u0275\u0275pureFunction0(8,ht))}}function gt(i,d){i&1&&a.\u0275\u0275template(0,St,1,9,"ec-code-verification",2)}function Et(i,d){i&1&&a.\u0275\u0275element(0,"div",1)}var le=(()=>{class i{constructor(){this.facade=ft(q)}onSubmit(e){this.facade.submit(e)}onPreviousStep(){this.facade.navigateToPreviousStep()}onLogout(){this.facade.logout()}
1onCodeExpired(e){this.facade.auditCodeExpired(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=a.\u0275\u0275defineComponent({type:i,selectors:[["ezus-main-device-trust-confirmation"]],standalone:!0,features:[a.\u0275\u0275ProvidersFeature([q,_t]),a.\u0275\u0275StandaloneFeature],decls:2,vars:1,consts:[["phoneInfoTranslationCode","ezus.logowanie.drugiEtap.wyslanoKodNaTelefon",3,"firstVerificationCode","headerText","cancelButtonLabel","submitButtonLabel","goBackButtonLabel","submitButtonDisabled","resendVerificationCodeSrv","errorNotification"],[1,"placeholder-container"],["phoneInfoTranslationCode","ezus.logowanie.drugiEtap.wyslanoKodNaTelefon",3,"firstVerificationCode","headerText","cancelButtonLabel","submitButtonLabel","goBackButtonLabel","submitButtonDisabled","resendVerificationCodeSrv","errorNotification","onCodeExpired","onCancel","onGoBack","onSubmit",4,"transloco"],["phoneInfoTranslationCode","ezus.logowanie.drugiEtap.wyslanoKodNaTelefon",3,"onCodeExpired","onCancel","onGoBack","onSubmit","firstVerificationCode","headerText","cancelButtonLabel","submitButtonLabel","goBackButtonLabel","submitButtonDisabled","resendVerificationCodeSrv","errorNotification"]],template:function(t,n){if(t&1&&a.\u0275\u0275template(0,gt,1,0,"ec-code-verification",0)(1,Et,1,0,"div",1),t&2){let p;a.\u0275\u0275conditional((p=n.facade.verificationCodeDataSig())?0:1,p)}},dependencies:[vt,Ct],styles:[".placeholder-container[_ngcontent-%COMP%]{display:block;width:100dvw;height:500px}"]})}}return i})();import{inject as Nt}from"@angular/core";import{ReactiveFormsModule as Pt}from"@angular/forms";import{TranslocoDirective as xt}from"@jsverse/transloco";import{ContentBoxComponent as bt,EdsInputDirective as Ot,InputWrapperComponent as Rt}from"ezus-design-system";import{inject as h}from"@angular/core";import{Router as Tt}from"@angular/router";import{FormControl as zt,Validators as J}from"@angular/forms";import{firstValueFrom as me}from"rxjs";import{Store as yt}from"@ngrx/store";import{commonAuthStoreActions as Dt,TranslocoToastService as At,EssentialLocalStorageKeys as K,DeviceNameService as It}from"ezus-common";import{AuditService as Ut,LocalStorageService as wt}from"ezus-common";import*as pe from"@angular/core";var $=(()=>{class i{constructor(){this.store=h(yt),this.router=h(Tt),this.auditSrv=h(Ut),this.localStorageSrv=h(wt),this.translocoToastSrv=h(At),this.broadcastChannelSrv=h(S),this.deviceNameSrv=h(It),this.logoutConfirmationSrv=h(g),this.httpCodeSrv=h(U),this.deviceName=new zt(this.deviceNameSrv.getDeviceName(),[J.required,J.pattern(/^(?!\s*$)[A-Za-zĄąĆćĘꣳŃńÓóŚśŹźŻż0-9 .()_\-\[\]]*$/),J.maxLength(100)])}setDeviceName(){return l(this,null,function*(){let e=this.getDeviceNameIfValid();if(!e)return;this.localStorageSrv.setEssentialData(K.DEVICE_NAME,e);let t=this.localStorageSrv.get(K.DEVICE_TRUST_CODE);if(t){this.setupAndNavigateToCodeVerification(t,e);return}try{let n=yield me(this.httpCodeSrv.sendNewCode({czyPonownaWysylka:!1}));this.setupAndNavigateToCodeVerification(n,e)}catch(n){this.auditSrv.log("PRZEJSCIE_DO_WERYFIKACJI_KODEM_W_PROCESIE_ZAUFANIA_URZADZENIA_NIEUDANE"),M(n.error)?this.translocoToastSrv.error({key:n.error.kod}):this.translocoToastSrv.error({key:"ezus.zaufanieUrzadzenia.wysylkaKodu.nieoczekiwanyBlad"})}})}getDeviceNameIfValid(){this.deviceName.markAsTouched();let e=this.deviceName.value;return e&&this.deviceName.valid?e:null}navigateToPreviousStep(){return l(this,null,function*(){let e=yield me(this.store.select(te));if(!e){let t="ezus.zaufanieUrzadzenia.nazwaUrzadzenia.blad.brakWymaganychDanych";this.translocoToastSrv.open("error",{key:t}),this.store.dispatch(Dt.logout({logoutParams:null,navigatePath:u.LOGOWANIE})),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"LOGOUT_IF_ERROR",toastTranslationKey:t});return}this.localStorageSrv.setEssentialData(K.DEVICE_TRUST_STEP,"PROMPT"),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"DEVICE_TRUST_PROMPT_STEP",sessionData:e}),this.router.navigateByUrl(u.DEVICE_TRUST_PROMPT)})}logout(){this.logoutConfirmationSrv.open({headerLabelTranslationKey:"ezus.anulowanieProcesu.naglowek",contentTranslationKey:"ezus.anulowanieProcesu.komunikat",confirmButtonLabelTranslationKey:"ezus.anulowanieProcesu.przycisk.tak",cancelButtonLabelTranslationKey:"ezus.anulowanieProcesu.przycisk.nie",auditLogoutConfirmationFn:()=>this.auditSrv.log("ANULOWANIE_PROCESU_ZAUFANIA_URZADZENIA_NA_KROKU_DODANIA_OPISU")})}getDeviceNameValidationMessage(){let{errors:e,touched:t,dirty:n}=this.deviceName;return e&&(t||n)?e.maxlength?"ezus.zaufanieUrzadzenia.nazwaUrzadzenia.inputOpisUrzadzenia.error.przekroczonoMaxDlugoscNazwy":e.pattern?"ezus.zaufanieUrzadzenia.nazwaUrzadzenia.inputOpisUrzadzenia.error.
1nazwaNieSpelniaWymagan":"ezus.zaufanieUrzadzenia.nazwaUrzadzenia.inputOpisUrzadzenia.error.wymagane":""}setupAndNavigateToCodeVerification(e,t){this.localStorageSrv.setEssentialData(K.DEVICE_TRUST_STEP,"CODE"),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"DEVICE_TRUST_CODE_STEP",code:e,deviceName:t}),this.store.dispatch(f.setVerificationCode({code:e})),this.router.navigateByUrl(u.DEVICE_TRUST_CODE),this.auditSetDeviceName(t)}auditSetDeviceName(e){this.auditSrv.logWithData("PRZEJSCIE_DO_WERYFIKACJI_KODEM_W_PROCESIE_ZAUFANIA_URZADZENIA_UDANE",{additionalData:{i:{daneDodatkowe:[{nazwaPola:"NAZWA_URZADZENIA",wartoscPola:e}]}}})}clearIfFirstFocus(){this.deviceName.touched||this.deviceName.setValue("")}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=pe.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac})}}return i})();import*as r from"@angular/core";import*as N from"@angular/forms";function Vt(i,d){if(i&1){let e=r.\u0275\u0275getCurrentView();r.\u0275\u0275elementContainerStart(0),r.\u0275\u0275elementStart(1,"eds-content-box",1)(2,"eds-input-wrapper",2)(3,"input",3),r.\u0275\u0275listener("focus",function(){r.\u0275\u0275restoreView(e);let n=r.\u0275\u0275nextContext();return r.\u0275\u0275resetView(n.clearOnFirstFocus())})("keydown.enter",function(){r.\u0275\u0275restoreView(e);let n=r.\u0275\u0275nextContext();return r.\u0275\u0275resetView(n.onSetDeviceName())}),r.\u0275\u0275elementEnd()()(),r.\u0275\u0275element(4,"ezus-main-device-trust-actions",4),r.\u0275\u0275elementContainerEnd()}if(i&2){let e=d.$implicit,t=r.\u0275\u0275nextContext();r.\u0275\u0275advance(),r.\u0275\u0275property("headerLabel",e("ezus.zaufanieUrzadzenia.nazwaUrzadzenia.tytul"))("divider",!0),r.\u0275\u0275advance(),r.\u0275\u0275property("label",e("ezus.zaufanieUrzadzenia.nazwaUrzadzenia.inputOpisUrzadzenia.label"))("clearIcon",!0)("formProperty",t.facade.deviceName)("errorMessage",e(t.facade.getDeviceNameValidationMessage()))("isRequired",!0),r.\u0275\u0275advance(),r.\u0275\u0275property("formControl",t.facade.deviceName),r.\u0275\u0275advance(),r.\u0275\u0275property("buttonConfig",t.buttonConfig)}}var fe=(()=>{class i{constructor(){this.facade=Nt($),this.buttonConfig={firstButton:{translationKey:"ezus.zaufanieUrzadzenia.nazwaUrzadzenia.przyciski.dalej",function:()=>this.onSetDeviceName()},secondButton:{translationKey:"ezus.zaufanieUrzadzenia.nazwaUrzadzenia.przyciski.wstecz",function:()=>this.onPreviousStep(),auditEvent:"COFNIECIE_Z_KROKU_DODANIA_OPISU_URZADZENIA_ZAUFANEGO"},thirdButton:{translationKey:"ezus.zaufanieUrzadzenia.nazwaUrzadzenia.przyciski.anuluj",function:()=>this.onLogout()}}}onSetDeviceName(){this.facade.setDeviceName()}onPreviousStep(){return l(this,null,function*(){yield this.facade.navigateToPreviousStep()})}onLogout(){this.facade.logout()}clearOnFirstFocus(){this.facade.clearIfFirstFocus()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=r.\u0275\u0275defineComponent({type:i,selectors:[["ezus-main-device-trust-naming"]],standalone:!0,features:[r.\u0275\u0275ProvidersFeature([$]),r.\u0275\u0275StandaloneFeature],decls:1,vars:0,consts:[[4,"transloco"],[3,"headerLabel","divider"],[3,"label","clearIcon","formProperty","errorMessage","isRequired"],["edsInput","","autocomplete","off","type","text","id","code-verification-input",3,"focus","keydown.enter","formControl"],[3,"buttonConfig"]],template:function(t,n){t&1&&r.\u0275\u0275template(0,Vt,5,9,"ng-container",0)},dependencies:[xt,bt,Pt,N.DefaultValueAccessor,N.NgControlStatus,N.FormControlDirective,Rt,Ot,w],styles:["[_nghost-%COMP%]{display:block;width:90vw;max-width:550px}[_nghost-%COMP%]   eds-input-wrapper[_ngcontent-%COMP%]{display:block;min-height:106px}@media (min-width: 1023.5px){[_nghost-%COMP%]{width:809px;max-width:809px}[_nghost-%COMP%]   eds-input-wrapper[_ngcontent-%COMP%]{max-width:500px}[_nghost-%COMP%] > eds-content-box[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{padding-bottom:12px}}"]})}}return i})();import{inject as qt}from"@angular/core";import{TranslocoDirective as Jt}from"@jsverse/transloco";import{ContentBoxComponent as $t}from"ezus-design-system";import"@angular/core";import*as m from"@angular/core";var ve=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=m.\u0275\u0275defineComponent({type:i,selectors:[["ezus-main-input-info"]],inputs:{infoContent:"infoContent"},standalone:!0,features:[m.\u0275\u0275StandaloneFeature],decls:4,vars:1,consts:[[1,"eds-i","eds-i-info","icon"],[1,"content"]],template:function(t,n){t&1&&(m.\u0275\u0275element(0,"i",0),m.\u0275\u0275elementStart(1,"div",1)(2,"span"),m.\u0275\u0275text(3),m.\u0275\u0275elementEnd()()),t&2&&(m.\u0275\u0275advance(3),m.\u0275\u0275textInterpolate(n.infoContent))},styles:["[_nghost-%COMP%]{display:flex;justify-content:flex-start;width:100%;border-radius:10px;margin-top:10px}.icon[_ngcontent-%COMP%]{margin:4px 0 0;font-size:20px;color:#767676}.content[_ngcontent-%COMP%]{padding:0 16px 20px 8px;line-height:26px;color:#393939}.content[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:14px}"],changeDetection:0})}}return i})();import{inject as z,signal as Ft}from"@angular/core";import{firstValueFrom as Bt}from"rxjs";import{Store as Wt}from"@ngrx/store";import{inject as T}from"@angular/core";import{firstValueFrom as _e}from"rxjs";import{Router as kt}from"@angular/router";import{AuditService as Mt,LocalStorageService as Zt,EssentialLocalStorageKeys as Kt}from"ezus-common";import{Store as Lt}from"@ngrx/store";import*as Ce from"@angular/core";var he=(()=>{class i{constructor(){this.store=T(Lt),this.router=T(kt),this.authSrv=T(ne),this.auditSrv=T(Mt),this.localStorageSrv=T(Zt),this.userActivitySrv=T(k),this.broadcastChannelSrv=T(S)}completeDeviceTrustProcess(){return l(this,null,function*(){let e=yield _e(this.store.select(A));if(!e)try{e=yield _e(this.authSrv.getCurrentUser(!0)),this.store.dispatch(f.getCurrentUserSuccess({currentUser:e}))}catch{throw new Error("Fetching user data failed.")}let t=e.wymaganeAkcje;this.localStorageSrv.removeItem(Kt.DEVICE_TRUST_STEP),this.broadcastChannelSrv.postMessage("ACTIVE_USER",{type:"USER_IS_LOGGED_IN",userData:R(D({},e),{czyWymaganyKod:!1,wymaganeAkcje:t})}),this.navigateToNextView(t)})}navigateToNextView(e){if(e.length>0){let t=oe(e);this.router.navigateByUrl(t);return}this.userActivitySrv.startListening(!0),this.store.dispatch(f.clearCodeVerificationData({isCodeRequired:!1})),this.auditSrv.log("PRZEJSCIE_DO_EZUS_Z_EKRANU_SUKCESU_ZAUFANIA_URZADZENIA"),this.router.navigateByUrl(`${u.WYBOR_KONTEKSTU}?default=true`)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=Ce.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();import{commonAuthStoreActions as Se,TranslocoToastService as jt,AuditService as Gt,ParamsService as Yt}from"ezus-common";import*as ge from"@angular/core";var H=(()=>{class i{constructor(){this.deviceTrustExpirationDaysSig=Ft(0),this.store=z(Wt),this.auditSrv=z(Gt),this.paramsSrv=z(Yt),this.userActivitySrv=z(k),this.translocoToastSrv=z(jt),this.logoutConfirmationSrv=z(g),this.postDeviceTrustActionsSrv=z(he),this.userActivitySrv.startListening(!1)}continueToApp(){return l(this,null,function*(){try{yield this.postDeviceTrustActionsSrv.completeDeviceTrustProcess()}catch{this.store.dispatch(Se.logout({logoutParams:null,navigatePath:u.LOGOWANIE}))}})}logout(){this.logoutConfirmationSrv.open({headerLabelTranslationKey:"ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.potwierdzenieWylogowania.tytul",contentTranslationKey:"ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.potwierdzenieWylogowania.tresc",confirmButtonLabelTranslationKey:"ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.potwierdzenieWylogowania.przyciskPotwierdz",cancelButtonLabelTranslationKey:"ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.potwierdzenieWylogowania.przyciskAnuluj",auditLogoutConfirmationFn:()=>{this.auditSrv.log("WYLOGOWANIE_Z_EKRANU_SUKCESU_ZAUFANIA_URZADZENIA")}})}fetchDeviceTrustExpirationDays(){return l(this,null,function*(){try{let e=yield Bt(this.paramsSrv.getSingleParamEzus("CZAS_WAZN_URZADZENIA_ZAUFANEGO"));this.deviceTrustExpirationDaysSig.set(+e)}catch{this.translocoToastSrv.error({key:"ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.bladPobraniaCzasuWaznosciZaufania"}),this.store.dispatch(Se.logout({logoutParams:null,navigatePath:u.LOGOWANIE}))}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=ge.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac})}}return i})();import*as c from"@angular/core";var Ht=i=>({days:i});function Qt(i,d){if(i&1&&(c.\u0275\u0275elementContainerStart(0),c.\u0275\u0275elementStart(1,"eds-content-box",1)(2,"span",2),c.\u0275\u0275text(3),c.\u0275\u0275elementEnd(),c.\u0275\u0275element(4,"ezus-main-input-info",3),c.\u0275\u0275elementEnd(),c.\u0275\u0275element(5,"ezus-main-device-trust-actions",4),c.\u0275\u0275elementContainerEnd()),i&2){let e=d.$implicit,t=c.\u0275\u0275nextContext();c.\u0275\u0275advance(),c.\u0275\u0275property("headerLabel",e("ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.tytul")),c.\u0275\u0275advance(2),c.\u0275\u0275textInterpolate(e("ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.tresc")),c.\u0275\u0275advance(),c.\u0275\u0275property("infoContent",e("ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.info",c.\u0275\u0275pureFunction1(4,Ht,t.deviceTrustExpirationDaysSig()))),c.\u0275\u0275advance(),c.\u0275\u0275property("buttonConfig",t.buttonConfig)}}var Ee=(()=>{class i{constructor(){this.facade=qt(H),this.deviceTrustExpirationDaysSig=this.facade.deviceTrustExpirationDaysSig,this.buttonConfig={firstButton:{translationKey:"ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.przyciski.przejdzDalej",function:()=>this.onContinue()},secondButton:{translationKey:"ezus.zaufanieUrzadzenia.potwierdzenieZaufaniaUrzadzenia.przyciski.wyloguj",function:()=>this.onLogout()}}}ngOnInit(){return l(this,null,function*(){yield this.facade.fetchDeviceTrustExpirationDays()})}onContinue(){this.facade.continueToApp()}onLogout(){this.facade.logout()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=c.\u0275\u0275defineComponent({type:i,selectors:[["ezus-main-device-trust-success"]],standalone:!0,features:[c.\u0275\u0275ProvidersFeature([H]),c.\u0275\u0275StandaloneFeature],decls:1,vars:0,consts:[[4,"transloco"],["headerIcon","eds-i-check",3,"headerLabel"],[1,"main-content"],[3,"infoContent"],[3,"buttonConfig"]],template:function(t,n){t&1&&c.\u0275\u0275template(0,Qt,6,6,"ng-container",0)},dependencies:[Jt,$t,w,ve],styles:["[_nghost-%COMP%]{display:block;width:90vw;max-width:550px}[_nghost-%COMP%]  .header-text-and-icon i{padding:12px;border-radius:50%;font-size:18px;color:#fff;background-color:#598527}@media (min-width: 1023.5px){[_nghost-%COMP%]{width:809px;max-width:809px}}"]})}}return i})();var Mn=[{path:"",component:ce,children:[{path:"",redirectTo:I.PROMPT,pathMatch:"full"},{path:I.PROMPT,component:ue,canActivate:[O]},{path:I.CODE,component:le,canActivate:[O]},{path:I.DEVICE_NAMING,component:fe,canActivate:[O]},{path:I.SUCCESS,component:Ee,canActivate:[O]}]}];export{Mn as DEVICE_TRUST_ROUTES};

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.