1import{a as ht,b as vt,c as St}from"./chunk-KVFSJBDU.js";import{a as dt,h as ut}from"./chunk-I4H5NGJW.js";import"./chunk-VZ5G2PSB.js";import{a as ft}from"./chunk-3AIXYS4E.js";import{a as _t,b as gt}from"./chunk-HLCRCG3F.js";import"./chunk-BLNVKCCC.js";import{c as z,d as ct}from"./chunk-MPYXIJAB.js";import"./chunk-DBZ5GYNN.js";import"./chunk-NMLKT6IY.js";import"./chunk-S5GXKYX5.js";import"./chunk-25LAZVWZ.js";import"./chunk-KZMW7UME.js";import{f as mt}from"./chunk-5FGXMDP7.js";import"./chunk-X3GWJDFX.js";import"./chunk-HSVNW533.js";import{c as lt}from"./chunk-7GZG4GDV.js";import{a as pt}from"./chunk-EEXULECG.js";import{a as oe}from"./chunk-7QPZBM2T.js";import"./chunk-S3H2QQCI.js";import"./chunk-X5ORTLLR.js";import{$a as s,$c as De,$d as Be,Aa as n,Ab as f,Ac as me,Cg as ke,Ef as Ve,Fh as Re,Ga as d,Hb as te,Jd as Pe,Jh as Fe,Ka as N,Kg as k,La as be,Lb as Ne,Lj as Ze,Oa as ee,Ob as Ie,Pa as u,Pj as et,Qi as je,Qn as T,Rd as Ae,Ri as H,Rn as st,S as Z,Ua as D,Ub as h,Ui as Le,Vb as v,Vc as ie,Vi as qe,Yc as Te,Yd as ne,Z as Se,Zk as se,_ as we,_a as p,_b as O,_i as Ge,aa as Ce,ab as o,ah as q,al as I,bb as g,bc as Ee,ch as R,cj as We,dj as Ye,ea as w,ej as He,fa as C,fb as A,fj as ze,fk as tt,gb as B,gd as V,gj as $e,gk as it,ib as b,ij as G,jc as U,jj as Qe,ka as P,kb as S,kj as Je,ln as rt,m as K,mb as m,mh as re,mj as Ke,mk as nt,n as fe,nd as Me,nh as F,nj as Xe,o as _e,p as ge,pc as ye,pn as ot,r as he,rc as Ue,se as Oe,tb as y,vb as L,wa as xe,x as ve,yb as c,yg as Y,z as X,zb as x,zj as Bt,zo as at}from"./chunk-5FIO62PX.js";import"./chunk-CCWZEKOQ.js";import"./chunk-UXQYALUZ.js";import{a as Q,b as J,h as At}from"./chunk-CJZK3ASG.js";var ae=class{constructor(l){this.maxSteps=l,this.currentStep={step:1,valid:!1}}getCurrentStep(){return this.currentStep}isCurrentStep(...l){return l.indexOf(this.currentStep.step)>-1}setCurrentStep(l){l>this.maxSteps?this.currentStep={step:this.maxSteps,valid:!1}:l<1?this.currentStep={step:1,valid:!1}:this.currentStep={step:l,valid:!1}}nextStep(){this.currentStep.valid&&this.setCurrentStep(this.currentStep.step+1)}previousStep(){this.setCurrentStep(this.currentStep.step-1)}isCurrentStepValid(){return this.currentStep.valid}validateCurrentStep(l){l!=null?this.currentStep.valid=l:this.currentStep.valid=!0}};var M=At(Bt());function kt(t,l){if(t&1&&g(0,"app-orion-message",32),t&2){let e=m(2);p("messages",e.errorMessages)}}function Rt(t,l){if(t&1&&(s(0,"div",30),u(1,kt,1,1,"app-orion-message",31),o()),t&2){let e=m();n(),p("ngIf",e.errorMessages&&e.errorMessages.length>0)}}function Ft(t,l){if(t&1&&(s(0,"div",11)(1,"span",33),c(2),o()()),t&2){let e=m();n(2),f(" ",e.dict.entry("orion.login-new-user.ROOT_ACCOUNT_TOUCHED")," ")}}function jt(t,l){if(t&1&&(s(0,"mat-error"),c(1),o()),t&2){let e=m(2);n(),f(" ",e.dict.entry("orion.login-new-user.ERROR_ACCOUNT")," ")}}function Lt(t,l){if(t&1&&(s(0,"mat-error"),c(1),o()),t&2){let e=m(2);n(),f(" ",e.dict.entry("orion.login-new-user.ERROR_FIELD_MANDATORY")," ")}}function qt(t,l){if(t&1&&(s(0,"div",34),u(1,jt,2,1,"mat-error",35)(2,Lt,2,1,"mat-error",35),o()),t&2){let e=m();n(),p("ngIf",(e.form.get("accountNumber").hasError("invalidAlphanum")||e.form.get("accountNumber").errors.minlength)&&e.form.get("accountNumber").value!==""),n(),p("ngIf",e.form.get("accountNumber").errors.required&&e.form.get("accountNumber").value==="")}}function Gt(t,l){if(t&1&&(s(0,"mat-error"),c(1),o()),t&2){let e=m(2);n(),f(" ",e.dict.entry("orion.login-new-user.ERROR_EMAIL")," ")}}function Wt(t,l){if(t&1&&(s(0,"mat-error"),c(1),o()),t&2){let e=m(2);n(),f(" ",e.dict.entry("orion.login-new-user.ERROR_FIELD_MANDATORY")," ")}}function Yt(t,l){if(t&1&&(s(0,"div",34),u(1,Gt,2,1,"mat-error",35)(2,Wt,2,1,"mat-error",35),o()),t&2){let e=m();n(),p("ngIf",e.form.get("email").hasError("invalidEmail")),n(),p("ngIf",e.form.get("email").errors.required&&e.form.get("email").value==="")}}function Ht(t,l){if(t&1&&(s(0,"mat-error"),c(1),o()),t&2){let e=m(2);n(),f(" ",e.dict.entry("orion.login-new-user.ERROR_FIELD_MANDATORY")," ")}}function zt(t,l){if(t&1&&(s(0,"div",11),u(1,Ht,2,1,"mat-error",35),o()),t&2){let e=m();n(),p("ngIf",e.form.get("firstName").hasError("required")&&e.form.get("firstName").value==="")}}function $t(t,l){if(t&1&&(s(0,"mat-error"),c(1),o()),t&2){let e=m(2);n(),f(" ",e.dict.entry("orion.login-new-user.ERROR_FIELD_MANDATORY")," ")}}function Qt(t,l){if(t&1&&(s(0,"div",11),u(1,$t,2,1,"mat-error",35),o()),t&2){let e=m();n(),p("ngIf",e.form.get("lastName").hasError("required")&&e.form.get("lastName").value==="")}}function Jt(t,l){if(t&1&&(s(0,"mat-error"),c(1),o()),t&2){let e=m(2);n(),f(" ",e.dict.entry("orion.login-new-user.DATE_FORMAT_VALID")," ")}}function Kt(t,l){if(t&1&&(s(0,"div",11),u(1,Jt,2,1,"mat-error",35),o()),t&2){let e=m();n(),p("ngIf",e.form.get("birthDate").invalid)}}var wt={firstName:["First name","Pr\xE9nom"],lastName:["Last name","Nom de famille"],sinMiddle:["S.I.N.","N.A.S."],birthDate:["Date of Birth","Date de naissance"]},Nt=(()=>{class t{constructor(e,r,i,a,_,E){this.fb=e,this.orionValidatorsService=r,this.newUserService=i,this.orionConfig=a,this.dict=_,this.identityService=E,this.updateStep=new P,this.minAge=18,this.badUser=!1,this.siteC
1d=a.siteCode,this.initDates(),this.initForm()}initForm(){this.form=this.fb.group({accountNumber:["",[I.alphanumericValidator]],firstName:["",[I.nameValidator]],lastName:["",[I.nameValidator]],sinMiddle:["",[I.partialSinValidator]],birthDate:[""],email:["",[H.required,I.emailValidator]]})}initDates(){let e=new Date;this.minDate=new Date(1900,0,1),this.maxDate=(0,M.startOfDay)((0,M.setYear)(e,(0,M.getYear)(e)-this.minAge))}setFocus(e){this.focus=e}continue(){let e=this.form.get("firstName").value,r=this.form.get("lastName").value;e=e.replace(/\s*$/,""),r=r.replace(/\s*$/,"");let i={acctNo:this.form.get("accountNumber").value,givenName:e,lastName:r,siteCd:this.siteCd,birthDt:(0,M.format)(this.form.get("birthDate").value,"YYYY-MM-DD"),sinMiddle3Digits:this.form.get("sinMiddle").value,email:this.form.get("email").value};this.errorMessages=[],this.newUserService.createNewUser(i).subscribe(a=>{if(a){this.badUser=!1;let _=this.orionConfig.siteCode.toLowerCase(),E={passwdTemp:a.passwdTemp,username:a.userId,flowToken:a.flowToken,stepCompleted1:!0},W={siteCode:this.newUserService.siteCode,siteName:this.newUserService.siteName};_.toLowerCase()===a.siteCode.toLowerCase()?this.updateStep.emit(!0):this.newUserService.redirect(W,"new-user",E)}},a=>{this.badUser=!0,a.error&&(this.errorMessages=this.getListMessagesError(a.error.messageList))}),this.scrollTop()}cancel(){this.form.reset(),this.newUserService.redirectLogin(),this.scrollTop()}scrollTop(){window.scroll(0,0)}getListMessagesError(e){let r=[];for(let i of e)if(i!=null)switch(i.msgId){case"55000041":Object.keys(wt).forEach(_=>{wt[_].reduce((W,Pt)=>(W||(W=i.message.search(Pt)>-1),W),!1)&&this.form.get(_).setErrors({notValid:!0})});break;case"55000039":case"55000042":case"55000052":case"55000055":let a=["55000039","55000042"].some(_=>_===i.msgId)?"DIRECT":"ADVISOR";r.push(J(Q({},i),{message:`orion.login-new-user.error.${a}`})),this.form.get("accountNumber").setErrors({notValid:!0});break;default:r.push(i);break}return r}get birthDateCalendarInitialDate(){let e=this.form.get("birthDate").value;return e?(0,M.parse)(e):this.maxDate}get birthDateCalendarStartingView(){return this.form.get("birthDate").value?"month":"multi-year"}static{this.\u0275fac=function(r){return new(r||t)(d(G),d(I),d(T),d(V),d(q),d(k))}}static{this.\u0275cmp=N({type:t,selectors:[["app-new-user-step-1"]],outputs:{updateStep:"updateStep"},standalone:!1,decls:69,vars:59,consts:[["birthDatePicker",""],["class","has-error",4,"ngIf"],[1,"or-display-flex","or-column","or-full-height",3,"formGroup"],[1,"or-box-margin"],[1,"or-h3"],[1,"or-label_small","mb-3"],[1,"or-box-child","or-stretch","or-box-align-items-top","mb
1-3"],[1,"or-box-child","or-flex-one","or-column","or-stretch","or-box-align-items-top","or-no-margin-right-mobile"],[1,"or-box-child","or-stretch","or-xsmall-gap","or-box-align-items-bottom"],[1,"or-h4","or-black"],[1,"or-label_small"],[1,"or-box-child","or-stretch"],["matInput","","type","text","id","accountNumber","formControlName","accountNumber","maxlength","6","minlength","6","required","",1,"or-input-width-full","mb-1",3,"blur","click"],["class","or-box-child or-stretch",4,"ngIf"],["class","or-box-child or-column or-stretch",4,"ngIf"],[1,"or-box-child","or-flex-one","or-column","or-stretch","or-box-align-items-top"],["matInput","","type","email","formControlName","email","aria-label","Email",1,"or-input-width-full","mb-1"],["matInput","","type","text","id","firstName","formControlName","firstName","required","",1,"or-input-width-full","mb-1","mt-2"],["matInput","","type","text","id","lastName","formControlName","lastName","required","",1,"or-input-width-full","mb-1","mt-2"],[3,"form"],[1,"or-pos-rel","or-stretch"],["matInput","","type","text","id","birthDate","formControlName","birthDate","required","",1,"or-input-width-full","mb-1","mt-2",3,"placeholder","min","max","matDatepicker"],["matSuffix","","name","ico_calendar","size","big","tabindex","0",3,"click","keydown.enter"],[3,"startAt","startView"],[3,"ngIf"],[1,"or-box","or-stretch","flex-reverse","or-flex-one","or-align-items-end"],[1,"or-box-child"],["mat-button","",1,"or-ghost","or-big",3,"click"],[1,"or-box-child","or-box-end-desktop"],["mat-button","",1,"or-extra-big",3,"click","disabled"],[1,"has-error"],[3,"messages",4,"ngIf"],[3,"messages"],[1,"or-label-blue"],[1,"or-box-child","or-column","or-stretch"],[4,"ngIf"]],template:function(r,i){if(r&1){let a=b();u(0,Rt,2,1,"div",1),s(1,"form",2)(2,"div",3)(3,"div")(4,"span",4),c(5),o()(),s(6,"div",5),c(7),o(),s(8,"div",6)(9,"div",7)(10,"div",8)(11,"span",9),c(12),o(),s(13,"span",10),c(14),o()(),s(15,"div",11)(16,"input",12),h(17,"dict"),S("blur",function(){return i.setFocus(!1)})("click",function(){return i.setFocus(!0)}),o()(),u(18,Ft,3,1,"div",13)(19,qt,3,2,"div",14),o(),s(20,"div",15)(21,"div",11)(22,"span",9),c(23,"Email * "),o()(),s(24,"div",11),g(25,"input",16),o(),u(26,Yt,3,2,"div",14),o()(),s(27,"div",6)(28,"div",7)(29,"div",11)(30,"span",9),c(31),o()(),s(32,"div",11),g(33,"input",17),h(34,"dict"),o(),u(35,zt,2,1,"div",13),o(),s(36,"div",15)(37,"div",11)(38,"span",9),c(39),o()(),s(40,"div",11),g(41,"input",18),h(42,"dict"),o(),u(43,Qt,2,1,"div",13),o()(),s(44,"div",6)(45,"div",15),g(46,"app-sin",19),o(),s(47,"div",15)(48,"div",11)(49,"span",9),c(50),o()(),s(51,"div",11)(52,"div",20),g(53,"input",21),h(54,"dict"),s(55,"app-icon",22),h(56,"dict"),S("click",function(){w(a);let E=y(58);return C(E.open())})("keydown.enter",function(){w(a);let E=y(58);return C(E.open())}),o(),g(57,"mat-datepicker",23,0),o()(),u(59,Kt,2,1,"ng-template",24),o()()(),s(60,"div",25)(61,"div",26)(62,"button",27),h(63,"dict"),S("click",function(){return i.cancel()}),c(64),o()(),s(65,"div",28)(66,"button",29),h(67,"dict"),S("click",function(){return i.continue()}),c(68),o()()()()}if(r&2){let a=y(58);p("ngIf",i.badUser),n(),p("formGroup",i.form),n(4),x(i.dict.entry("orion.login-new-user.PERSONAL_INFO")),n(2),x(i.dict.entry("orion.login-new-user.MESSAGE")),n(5),f(" ",i.dict.entry("orion.login-new-user.ROOT_NUM")," * "),n(2),f(" (",i.dict.entry("orion.login-new-user.ROOT_NUM_SUB_TITLE"),") "),n(2),L("root-num-touched",i.focus)("or-error-input",i.form.get("accountNumber").invalid&&i.form.get("accountNumber").dirty&&i.form.get("accountNumber").touched||i.form.get("accountNumber").invalid&&i.form.get("accountNumber").touched),D("aria-label",v(17,45,"orion.login-new-user.ROOT_NUM")),n(2),p("ngIf",i.focus),n(),p("ngIf",!i.focus&&(i.identityService==null?null:i.identityService.isErrorOnTouching(i.form,"accountNumber"))),n(6),L("or-error-input",(i.form.get("email").invalid&&i.form.get("email").dirty||i.form.get("email").value==="")&&i.form.get("email").touched),n(),p("ngIf",i.identityService==null?null:i.identityService.isErrorOnTouching(i.form,"email")),n(5),f("",i.dict.entry("orion.login-new-user.FIRSTNAME")," * "),n(2),L("or-error-input",i.form.get("firstName").hasError("required")&&i.form.get("firstName").touched||i.form.get("firstName").invalid&&i.form.get("firstName").touched),D("aria-label",v(34,47,"orion.login-new-user.FIRSTNAME")),n(2),p("ngIf",i.identityService==null?null:i.identityService.isErrorOnTouching(i.form,"firstName")),n(4),f("",i.dict.entry("orion.login-new-user.LASTNAME")," * "),n(2),L("or-error-input",i.form.get("lastName").hasError("required")&&i.form.get("lastName").touched||i.form.get("lastName").invalid&&i.form.get("lastName").touched),D("aria-label",v(42,49,"orion.login-new-user.LASTNAME")),n(2),p("ngIf",i.identityService==null?null:i.identityService.isErrorOnTouching(i.form,"lastName")),n(3),p("form",i.form),n(4),f("",i.dict.entry("orion.login-new-user.BIRTH_DATE")," * "),n(3),L("or-error-input",i.form.get("birthDate").invalid&&i.form.get("birthDate").touched),p("placeholder",te(i.dict.entry("orion.login-new-user.DATE_FORMAT")))("min",i.minDate)("max",i.maxDate)("matDatepicker",a),D("aria-label",v(54,51,"orion.login-new-user.BIRTH_DATE")),n(2),D("aria-label",v(56,53,"orion.login-new-user.CALENDAR")),n(2),p("startAt",i.birthDateCalendarInitialDate)("startView",i.birthDateCalendarStartingView),n(2),p("ngIf",i.identityService==null?null:i.identityService.isErrorOnTouching(i.form,"birthDate")),n(3),D("aria-label",v(63,55,"orion.login-new-user.BTN_CANCEL")),n(2),f(" ",i.dict.entry("orion.login-new-user.BTN_CANCEL")," "),n(2),p("disabled",!i.form.valid),D("aria-label",v(67,57,"orion.login-new-user.BTN-CONTINUE")),n(2),f(" ",i.dict.entry("orion.login-new-user.BTN-CONTINUE")," ")}},dependencies:[U,Ge,je,Le,qe,He,ze,$e,Ye,We,se,tt,it,Ke,Xe,nt,R,re,vt,F],encapsulation:2})}}return t})();function Zt(t,l){if(t&1&&(s(0,"div",8)(1,"div",9)(2,"span",10),c(3),h(4,"dict"),o(),s(5,"span",11),c(6),h(7,"dict"),o()(),s(8,"div",0),c(9),o()()),t&2){let e=m();n(3),x(v(4,3,"orion.login-new-user.USERNAME")),n(3),x(v(7,5,"orion.login-new-user.REQUIRED_EACH_TIME_SIGN_IN")),n(3),f(" ",e.username," ")}}function ei(t,l){if(t&1){let e=b();s(0,"div",12)(1,"app-password",13),S("success",function(i){w(e);let a=m();return C(a.next(i))})("enableContinueButton",function(i){w(e);let a=m();return C(a.enableContinueBtn(i))}),o()()}if(t&2){let e=m();n(),p("mode","EDIT")("insert",e.insert)("passTemp",e.tempPassword)("username",e.username)}}function ti(t,l){if(t&1){let e=b();s(0,"div",12)(1,"app-password",14),S("success",function(i){w(e);let a=m();return C(a.next(i))})("enableContinueButton",function(i){w(e);let a=m();return C(a.enableContinueBtn(i))}),o()()}if(t&2){let e=m();n(),p("mode","SET")("insert",e.insert)("passTemp",e.tempPassword)("flowToken",e.flowToken)("username",e.username)}}var It=(()=>{class t{constructor(e,r,i){this.fb=e,this.identityService=r,this.newUserService=i,this.insert=!1,this.enableCtnBtn=!0,this.updateStep=new P}ngOnInit(){this.form=this.fb.group({newPassword:["",[H.required,I.strengthPasswordValidator]],confirmPassword:["",H.required]},{validator:I.matchPasswordValidator}),this.profilIncomplet=this.identityService.incompleteProfileMode}get flowToken(){return this.newUserService.flowToken}next(e){this.enableCtnBtn=!e,this.insert=e,e&&this.updateStep.emit
1(!0)}enableContinueBtn(e){this.enableCtnBtn=!e}continue(){this.insert=!this.enableCtnBtn,window.scroll(0,0)}get username(){return this.newUserService.username}get tempPassword(){return this.newUserService.password}static{this.\u0275fac=function(r){return new(r||t)(d(G),d(k),d(T))}}static{this.\u0275cmp=N({type:t,selectors:[["app-new-user-step-2"]],outputs:{updateStep:"updateStep"},standalone:!1,decls:19,vars:16,consts:[[1,"w-100"],[1,"d-inline-flex","w-100"],[1,"d-inline-flex","w-100","pt-3"],[1,"font-weight-bold"],["class","w-100 pt-2",4,"ngIf"],["class","w-100 align-top",4,"ngIf"],[1,"d-flex","align-items-end","flex-column","mt-4"],["mat-button","",1,"or-extra-big",3,"click","disabled"],[1,"w-100","pt-2"],[1,"font-weight-bold","d-flex","flex-wrap"],[1,"pr-2"],[1,"or-color-red"],[1,"w-100","align-top"],[1,"w-100",3,"success","enableContinueButton","mode","insert","passTemp","username"],[1,"w-100",3,"success","enableContinueButton","mode","insert","passTemp","flowToken","username"]],template:function(r,i){r&1&&(s(0,"div",0)(1,"div",1)(2,"h3"),c(3),h(4,"dict"),o()(),s(5,"div",2)(6,"span",3)(7,"u"),c(8),h(9,"dict"),o(),c(10),h(11,"dict"),o()(),u(12,Zt,10,7,"div",4)(13,ei,2,4,"div",5)(14,ti,2,5,"div",5),o(),s(15,"div",6)(16,"button",7),S("click",function(){return i.continue()}),c(17),h(18,"dict"),o()()),r&2&&(n(3),x(v(4,8,"orion.login-new-user.SELECT_NEW_PASSWORD")),n(5),x(v(9,10,"orion.login-new-user.NOTE_USERNAME")),n(2),f(" ",v(11,12,"orion.login-new-user.USERNAME_MESSAGE")," "),n(2),p("ngIf",i.username),n(),p("ngIf",i.profilIncomplet),n(),p("ngIf",!i.profilIncomplet),n(2),p("disabled",i.enableCtnBtn),n(),f(" ",v(18,14,"orion.login-new-user.BTN-CONTINUE")," "))},dependencies:[U,R,ot,F],encapsulation:2})}}return t})();function ni(t,l){if(t&1&&(s(0,"div",10)(1,"p"),c(2),o(),s(3,"p"),c(4),o(),s(5,"p"),
1c(6),o(),s(7,"p"),c(8),o()()),t&2){let e=m();n(2),x(e.dict.entry("orion.login-new-user.secret-question_TIPS_MESSAGE_1")),n(2),x(e.dict.entry("orion.login-new-user.secret-question_TIPS_MESSAGE_2")),n(2),x(e.dict.entry("orion.login-new-user.secret-question_TIPS_MESSAGE_3")),n(2),x(e.dict.entry("orion.login-new-user.secret-question_TIPS_MESSAGE_4"))}}var Et=(()=>{class t extends ne{constructor(e,r,i){super(),this.dict=e,this.newUserService=r,this.breakpointObserver=i,this.validate=!1,this.enableButton=!1,this.reset=!1,this.mobile=!1,this.updateStep=new P,i.observe([Ae.MOBILE]).pipe(Z(this.destroyed$)).subscribe(a=>{this.mobile=a.matches})}ngOnInit(){this.newUserService.isAuthorizationsInitialized()?this.newUserService.hasStep3Access()||this.updateStep.emit(!0):this.newUserService.getUserInfo().subscribe(()=>{this.newUserService.hasStep3Access()||this.updateStep.emit(!0)})}cancel(){this.reset=!0,this.resetTriggers(),this.scrollToTop()}next(e){e&&(this.updateStep.emit(!0),this.resetTriggers(),this.scrollToTop())}scrollToTop(){window.scroll(0,0)}resetTriggers(){this.validate=!1,this.enableButton=!1}static{this.\u0275fac=function(r){return new(r||t)(d(q),d(T),d(Oe))}}static{this.\u0275cmp=N({type:t,selectors:[["app-new-user-step-3"]],outputs:{updateStep:"updateStep"},standalone:!1,features:[ee],decls:14,vars:10,consts:[["tips1",""],[1,"or-box","or-stretch","or-column"],[1,"or-box-child","or-small-gap","or-box-no-wrap"],[1,"or-label_small"],["href","javascript:void(0)",1,"or-box-child","or-colored-link",3,"bncPopover","bncPopoverPosition"],["name","ico_info","color","customColor"],[3,"enableContinueButton","success","insert","reset"],[1,"or-btn-continue-wrapper","or-box","or-stretch","flex-reverse","or-flex-one"],[1,"or-btn-continue","or-box-child","or-box-end-desktop"],["mat-button","",1,"or-extra-big",3,"click","disabled"],["id","why-my-sin"]],template:function(r,i){if(r&1&&(s(0,"div",1)(1,"div",2)(2,"span",3),c(3),o(),s(4,"a",4),g(5,"app-icon",5),h(6,"dict"),o()(),u(7,ni,9,4,"ng-template",null,0,O),s(9,"app-secrets-questions",6),S("enableContinueButton",function(_){return i.enableButton=_})("success",function(_){return i.next(_)}),o()(),s(10,"div",7)(11,"div",8)(12,"button",9),S("click",function(){return i.validate=!0}),c(13),o()()()),r&2){let a=y(8);n(3),f(" ",i.dict.entry("orion.login-new-user.SECRET_QUESTIONS_TITLE")," "),n(),p("bncPopover",a)("bncPopoverPosition",i.mobile?"bottom":"right"),n(),D("aria-label",v(6,8,"orion.login-new-user.TOOLTIPS")),n(4),p("insert",i.validate)("reset",i.reset),n(3),p("disabled",!i.enableButton),n(),f(" ",i.dict.entry("orion.login-new-user.BTN-CONTINUE")," ")}},dependencies:[Re,st,R,re,F],styles:['@charset "UTF-8";.or-btn-continue[_ngcontent-%COMP%]{align-self:flex-end}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.or-btn-continue-wrapper[_ngcontent-%COMP%]{padding-top:24px}}']})}}return t})();function si(t,l){if(t&1&&(s(0,"div",5),g(1,"app-orion-message",6),o()),t&2){let e=m(2);n(),p("messages",e.errorMessages)}}function ai(t,l){if(t&1&&(s(0,"div",7)(1,"div",8)(2,"span",9),c(3),h(4,"dict"),o()(),g(5,"app-micro-frontend",10),o()),t&2){let e=m(2);n(3),x(v(4,2,"orion.login-new-user.PAGE_NAME_NEW_VERSION")),n(2),p("props",e.initProps())}}function pi(t,l){if(t&1&&(A(0),s(1,"div",2),u(2,si,2,1,"div",3)(3,ai,6,4,"div",4),o(),B()),t&2){let e=m();n(2),p("ngIf",e.errorMessages&&e.errorMessages.length>0),n(),p("ngIf",e.showDeliveryPreferences())}}function li(t,l){if(t&1&&(s(0,"div",5),g(1,"app-orion-message",6),o()),t&2){let e=m(2);n(),p("messages",e.errorMessages)}}function mi(t,l){t&1&&(s(0,"div",18),g(1,"app-documents",19),o()),t&2&&(n(),p("stepNewUser",!0)("showOnlineByMailButtons",!1))}function ci(t,l){if(t&1){let e=b();s(0,"button",20),S("click",function(){w(e);let i=m(2);return C(i.previous())}),c(1),h(2,"dict"),o()}t&2&&(n(),f(" ",v(2,1,"orion.login-new-user.BTN_PREVIOUS")," "))}function di(t,l){if(t&1){let e=b();s(0,"div",11),u(1,li,2,1,"div",3)(2,mi,2,2,"div",12),s(3,"div",13)(4,"div",14),u(5,ci,3,3,"button",15),o(),s(6,"div",16)(7,"button",17),S("click",function(){w(e);let i=m();return C(i.continue())}),c(8),h(9,"dict"),o()()()()}if(t&2){let e=m();n(),p("ngIf",e.errorMessages&&e.errorMessages.length>0),n(),p("ngIf",e.showDeliveryPreferences()),n(3),p("ngIf",!e.blockPreviousButton),n(3),f(" ",v(9,4,"orion.login-new-user.START")," ")}}var yt=(()=>{class t{constructor(e,r,i,a,_,E){this.fb=e,this.profileService=r,this.newUserService=i,this.userProfile=a,this.featureFlagsService=_,this.cdr=E,this.blockPreviousButton=!1,this.updateStep=new P,this.errorMessages=[],this.listDocuments=[],this.listEmail=[],this.mailChoice=!1,this.PAPER="paper",this.form=this.fb.group({emailInput:["",[I.emailValidator]],emailInput2:["",[I.emailValidator]]}),this.displayNewOnboardingFlow=this.featureFlagsService.isEnabled("front-end",Ve)}ngOnInit(){if(this.userProfile.hasDeliveryMethodAccess||this.updateStep.emit
1(!0),this.newUserService.getDocumentChoice&&this.newUserService.getDocumentChoice.length>0){this.listDocuments=this.newUserService.getDocumentChoice;let e=this.newUserService.getMailChoice[1].list[0].value,r=this.newUserService.getMailChoice[1].list[1].value;e!=null&&e!==""&&this.listEmail.push(e),r!=null&&r!==""&&this.listEmail.push(r),this.profileService.getDocumentsPreferences(!0).subscribe(i=>{this.listInput=i}),this.newUserService.getMailChoice&&(this.mailChoice=this.newUserService.getMailChoice[0],this.mailSelection=this.newUserService.getMailChoice[1])}else this.profileService.getDocumentsPreferences(!0).subscribe(e=>{this.listInput=e;let r=this.listInput.notifEmails.emailAdd1,i=this.listInput.notifEmails.emailAdd2;r!=null&&r!==""&&this.listEmail.push(r),i!=null&&i!==""&&this.listEmail.push(i),this.mailSelection=this.createMailList(),this.listDocuments=lt(this.listEmail,e.cltDocsCorrespPrefList),this.cdr.detectChanges()})}createMailList(){return{selected:this.listEmail[0],list:[{value:this.listEmail[0],label:this.listEmail[0]},{value:this.listEmail[1],label:this.listEmail[1]}]}}previous(){this.newUserService.setDocumentChoice=this.listDocuments,this.newUserService.setMailChoices=[this.mailChoice,this.mailSelection],this.updateStep.emit(!1),this.updateStep.emit(!1),this.scrollToTop()}continue(){this.profileService.updatePreferences().pipe(X(e=>e?.error?.messageList?.some(r=>r.msgId==="WS30000")?K(!0):fe(e))).subscribe(e=>{e&&this.updateStep.emit(!0)}),this.scrollToTop()}scrollToTop(){window.scroll(0,0)}showDeliveryPreferences(){return this.displayNewOnboardingFlow?this.displayNewOnboardingFlow:this.listDocuments&&this.listDocuments.length>0}initProps(){return{subAppToRender:2}}static{this.\u0275fac=function(r){return new(r||t)(d(G),d(mt),d(T),d(Be),d(ke),d(Ee))}}static{this.\u0275cmp=N({type:t,selectors:[["app-new-user-step-6"]],inputs:{blockPreviousButton:"blockPreviousButton"},outputs:{updateStep:"updateStep"},standalone:!1,decls:3,vars:2,consts:[["oldOnboardingFlow",""],[4,"ngIf","ngIfElse"],[1,"new-user-step6","or-display-flex","or-column","mc-w-100"],["class","has-error",4,"ngIf"],["class","or-form-documents mc-w-100",4,"ngIf"],[1,"has-error"],[3,"messages"],[1,"or-form-documents","mc-w-100"],[1,"or-box","or-stretch","mc-fw-medium","mc-fs-900","or-box","mc-mb-medium","mc-justify-content-center","mc-align-items-center","mc-text-center","new-user-container"],[1,"or-content-center"],["appName","signup","withErrorHandling","true","isShowLoading","true",3,"props"],[1,"new-user-step6","or-display-flex","or-column","w-100"],["class","or-form-documents w-100",4,"ngIf"],[1,"or-box","or-stretch","or-padding-around","flex-reverse","or-flex-one"],[1,"or-box-child"],["mat-button","","class","or-ghost or-big",3,"click",4,"ngIf"],[1,"or-box-child","or-box-end-desktop"],["mat-button","",1,"or-extra-big",3,"click"],[1,"or-form-documents","w-100"],[1,"or-no-padding",3,"stepNewUser","showOnlineByMailButtons"],["mat-button","",1,"or-ghost","or-big",3,"click"]],template:function(r,i){if(r&1&&u(0,pi,4,2,"ng-container",1)(1,di,10,6,"ng-template",null,0,O),r&2){let a=y(2);p("ngIf",i.displayNewOnboardingFlow)("ngIfElse",a)}},dependencies:[U,se,R,dt,oe,F],encapsulation:2})}}return t})();var _i=t=>({width:t});function gi(t,l){if(t&1&&(s(0,"div",10)(1,"span",11),c(2),o()()),t&2){let e=m(2);n(2),x(e.dict.entry("orion.login-new-user.PAGE_NAME"))}}function hi(t,l){if(t&1){let e=b();s(0,"app-new-user-step-1",12),S("updateStep",function(i){w(e);let a=m(2);return C(a.updateStep(i))}),o()}}function vi(t,l){if(t&1){let e=b();s(0,"app-new-user-step-2",12),S("updateStep",function(i){w(e);let a=m(2);return C(a.updateStep(i))}),o()}}function Si(t,l){if(t&1){let e=b();s(0,"app-new-user-step-3",12),S("updateStep",function(i){w(e);let a=m(2);return C(a.updateStep(i))}),o()}}function wi(t,l){if(t&1){let e=b();s(0,"app-agreements",13),S("updateStep",function(i){w(e);let a=m(2);return C(a.updateStep(i))}),o()}if(t&2){let e=m(2);p("blockPreviousButton",e.blockPreviousButton)("currentstepView",e.currentStep)}}function Ci(t,l){if(t&1){let e=b();s(0,"app-new-user-step-6",14),S("updateStep",function(i){w(e);let a=m(2);return C(a.updateStep(i))}),o()}if(t&2){let e=m(2);p("blockPreviousButton",e.blockPreviousButton)}}function xi(t,l){if(t&1&&(A(0),s(1,"div",2)(2,"div",3),g(3,"img",4),o(),u(4,gi,3,1,"div",5),s(5,"div",6),u(6,hi,1,0,"app-new-user-step-1",7)(7,vi,1,0,"app-new-user-step-2",7)(8,Si,1,0,"app-new-user-step-3",7)(9,wi,1,2,"app-agreements",8)(10,Ci,1,1,"app-new-user-step-6",9),o()(),B()),t&2){let e=m();n(3),p("src",te(e.orionConfig.logoLG),xe)("ngStyle",Ie(9,_i,e.orionConfig.logoLGWidth)),n(),p("ngIf",!e.steps.isCurrentStep(4,5,6)),n(2),p("ngIf",e.steps.isCurrentStep(1)),n(),p("ngIf",e.steps.isCurrentStep(2)),n(),p("ngIf",e.steps.isCurrentStep(3)),n(),p("ngIf",e.steps.isCurrentStep(4,5)),n(),p("ngIf",e.steps.isCurrentStep(6))}}function bi(t,l){if(t&1){let e=b();s(0,"app-agreements",16),S("updateStep",function(i){w(e);let a=m(2);return C(a.updateStep(i))}),o()}if(t&2){let e=m(2);p("blockPreviousButton",e.blockPreviousButton)("currentstepView",e.currentStep)("listingAgreement",!1)("readOnly",!0)}}function Ni(t,l){if(t&1&&u(0,bi,1,4,"app-agreements",15),t&2){let e=m();p("ngIf",e.steps.isCurrentStep(4,5))}}var Ut=(()=>{class t extends ne{constructor(e,r,i,a,_,E){super(),this.dict=e,this.newUserService=r,this.orionConfig=i,this.router=a,this.route=_,this.identityService=E,this.maxSteps=6}ngOnInit(){this.steps=new ae(this.maxSteps),this.route.queryParams.pipe(Z(this.destroyed$)).subscribe(r=>{r.read_only_conv_fr?(this.isDisplayingAgreement=!0,this.steps.validateCurrentStep(),this.steps.setCurrentStep(4)):r[z]&&(this.steps.validateCurrentStep(),this.steps.setCurrentStep(4))}),Y.getToken()&&this.checkUserProfil();let e=JSON.parse(Y.getStoredElement("userinfo"));e&&e.stepCompleted1&&(this.steps.validateCurrentStep(),this.steps.setCurrentStep(2),Y.removeStoredElement("userinfo"))}
1checkUserProfil(){if(this.identityService.userProfile)this.newUserService.incompleteProfileMode()&&(this.steps.validateCurrentStep(),this.steps.setCurrentStep(this.newUserService.getStepFromProfile()));else{let e=Y.getUserName();this.identityService.getUserProfile(e).pipe(he(()=>this.newUserService.getUserInfo())).subscribe(()=>{this.newUserService.incompleteProfileMode()&&(this.steps.validateCurrentStep(),this.steps.setCurrentStep(this.newUserService.getStepFromProfile()))})}}updateStep(e){if(this.steps.validateCurrentStep(),this.newUserService.initializeAuthorizationsList(),this.newUserService.incompleteProfileMode())if(e){let r=this.newUserService.getStepFromProfile(this.steps.getCurrentStep().step);r?this.steps.setCurrentStep(r):this.completeAndRedirectHome()}else this.newUserService.resetStepFromProfile(this.steps.getCurrentStep().step),this.steps.previousStep();else e?this.steps.getCurrentStep().step===this.steps.maxSteps?this.completeAndRedirectHome():this.steps.nextStep():this.steps.previousStep()}completeAndRedirectHome(){this.identityService.completeProfileMode(),this.route.snapshot.queryParams[z]&&window.ReactNativeWebView?.postMessage?window.ReactNativeWebView?.postMessage(JSON.stringify({finished:!0})):this.router.navigate([Me.HOME])}get currentStep(){return this.steps.getCurrentStep().step}get blockPreviousButton(){return this.newUserService.blockPreviousButton(this.steps.getCurrentStep().step)}static{this.\u0275fac=function(r){return new(r||t)(d(q),d(T),d(V),d(Te),d(ie),d(k))}}static{this.\u0275cmp=N({type:t,selectors:[["app-new-user"]],standalone:!1,features:[Ne([T]),ee],decls:3,vars:2,consts:[["agreement_template",""],[4,"ngIf","ngIfElse"],[1,"mc-d-flex","mc-flex-column","mc-w-100","mc-justify-content-center","mc-justify-items-center"],[1,"or-stretch","or-box-center","or-box","or-box-margin"],[1,"logo-lg",3,"src","ngStyle"],["class","or-box or-stretch mc-fw-medium mc-fs-900 or-box mc-mb-medium mc-justify-content-center mc-align-items-center mc-text-center new-user-container",4,"ngIf"],[1,"mc-w-100","or-full-height","mc-d-flex","mc-align-items-center","mc-justify-content-center","new-user-container"],["class","or-stretch or-display-flex or-column or-full-height",3,"updateStep",4,"ngIf"],["class","or-stretch or-display-flex or-full-height",3,"blockPreviousButton","currentstepView","updateStep",4,"ngIf"],["class","or-stretch or-display-flex or-full-height",3,"blockPreviousButton","updateStep",4,"ngIf"],[1,"or-box","or-stretch","mc-fw-medium","mc-fs-900","or-box","mc-mb-medium","mc-justify-content-center","mc-align-items-center","mc-text-center","new-user-container"],[1,"or-content-center"],[1,"or-stretch","or-display-flex","or-column","or-full-height",3,"updateStep"],[1,"or-stretch","or-display-flex","or-full-height",3,"updateStep","blockPreviousButton","currentstepView"],[1,"or-stretch","or-display-flex","or-full-height",3,"updateStep","blockPreviousButton"],["class","or-stretch or-display-flex or-full-height",3,"blockPreviousButton","currentstepView","listingAgreement","readOnly","updateStep",4,"ngIf"],[1,"or-stretch","or-display-flex","or-full-height",3,"updateStep","blockPreviousButton","currentstepView","listingAgreement","readOnly"]],template:function(r,i){if(r&1&&u(0,xi,11,11,"ng-container",1)(1,Ni,1,1,"ng-template",null,0,O),r&2){let a=y(2);p("ngIf",!i.isDisplayingAgreement)("ngIfElse",a)}},dependencies:[U,ye,ct,Nt,It,Et,yt],styles:["[_nghost-%COMP%]{display:flex;min-height:100%;overflow-y:auto;max-width:50rem!important}@media screen and (min-width:960px),print{.new-user-container[_ngcontent-%COMP%]{min-width:43.75rem}}"]})}}return t})();function Ei(t,l){if(t&1&&(A(0),g(1,"app-micro-frontend",2),B()),t&2){let e=l.ngIf;n(),p("props",e)}}var yi=5e3,Tt=(()=>{class t{constructor(e,r){this.store=e,this.orionConfig=r;let i={helpPhoneNumberLogin:void 0,ciamEndpoint:this.orionConfig.ciamEndpoint,mfaContextCode:this.orionConfig.mfaContextCode,cloudBeesApiKey:this.orionConfig.cloudBeesApiKey};this.extraProps$=this.store.select(rt).pipe(ve(a=>!!a),_e(yi),ge(a=>J(Q({},i),{helpPhoneNumberLogin:a?.helpPhoneNumberLogin})),X(()=>K(i)))}static{this.\u0275fac=function(r){return new(r||t)(d(Pe),d(V))}}static{this.\u0275cmp=N({type:t,selectors:[["app-sign-up"]],standalone:!1,decls:4,vars:3,consts:[[1,"d-flex","justify-content-center","pt-3"],[4,"ngIf"],["appName","signup",3,"props"]],template:function(r,i){r&1&&(s(0,"div",0),g(1,"app-logo"),o(),u(2,Ei,2,1,"ng-container",1),h(3,"async")),r&2&&(n(2),p("ngIf",v(3,1,i.extraProps$)))},dependencies:[U,oe,_t,Ue],encapsulation:2,changeDetection:0})}}return t})();function Ti(t,l){t&1&&(A(0),g(1,"app-new-user"),B())}function Di(t,l){t&1&&g(0,"app-sign-up")}var Dt=(()=>{class t{constructor(e,r,i){this.orionConfig=e,this.identityService=r,this.route=i;
1let a=!!this.route.snapshot.queryParams.read_only_conv_fr,_=!!this.route.snapshot.queryParams[z];this.legacySignup=this.identityService.incompleteProfileMode||a||_||!this.orionConfig.bnc&&!this.orionConfig.siteMfa}static{this.\u0275fac=function(r){return new(r||t)(d(V),d(k),d(ie))}}static{this.\u0275cmp=N({type:t,selectors:[["app-sign-up-dispatcher"]],standalone:!1,decls:3,vars:2,consts:[["regularSignup",""],[4,"ngIf","ngIfElse"]],template:function(r,i){if(r&1&&u(0,Ti,2,0,"ng-container",1)(1,Di,1,0,"ng-template",null,0,O),r&2){let a=y(2);p("ngIf",i.legacySignup)("ngIfElse",a)}},dependencies:[U,Ut,Tt],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;min-height:100vh}"]})}}return t})();var le=(()=>{class t{constructor(e){this.nbinDecomService=e}canActivate(){return this.nbinDecomService.isNbinDecomSignup()?(this.nbinDecomService.redirect(),!1):!0}static{this.\u0275fac=function(r){return new(r||t)(Ce(ft))}}static{this.\u0275prov=Se({token:t,factory:t.\u0275fac})}}return t})();var Mt=[{path:"",component:Dt,data:{dict:["app","login-new-user","progress-bar"]},resolve:{dict:Fe},canActivate:[le]}];var fr=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275mod=be({type:t})}static{this.\u0275inj=we({providers:[le],imports:[De.forChild(Mt),me,me,et,at,Qe,Je,ut,St,ht,pt,gt,Ze]})}}return t})();export{fr as SignUpModule};
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.