1"use strict";(self.webpackChunkcelebrity=self.webpackChunkcelebrity||[]).push([[2851],{12851:(R,u,a)=>{a.r(u),a.d(u,{SignInInformationComponent:()=>M});var n=a(54438),o=a(89417),m=a(68018),h=a(66693),d=a(49287),C=a(84887),E=a(45312),l=a(89469),S=a(31369),I=a(47328),p=a(75901),_=a(33002),c=a(64291),g=a(16769),P=a(35274);function O(s,v){if(1&s&&(n.nrm(0,"app-input",5),n.nI1(1,"translate")),2&s){const e=n.XpG();n.Y8G("brand",e.brand)("label",n.bMT(1,2,"COMMON.EMAIL_ADDRESS"))}}function b(s,v){if(1&s&&(n.nrm(0,"app-input-phone",6),n.nI1(1,"translate")),2&s){const e=n.XpG();n.Y8G("brand",e.brand)("label",n.bMT(1,3,"COMMON.FULL_MOBILE_NBR"))("phoneCallingCodes",e.phoneCallingCodes())}}let M=(()=>{class s{constructor(){this.formBuilder=(0,n.WQX)(o.ok),this.formService=(0,n.WQX)(d.ux),this.accountFacade=(0,n.WQX)(d.PP),this.securityQuestionsFacade=(0,n.WQX)(p.Hj),this.countriesFacade=(0,n.WQX)(C.y),this.utilityService=(0,n.WQX)(d.QY),this.injector=(0,n.WQX)(n.zZn),this.analyticInteraction=(0,n.WQX)(d.Ue),this.asyncValidators=(0,n.WQX)(P.k),this.translateService=(0,n.WQX)(m.c$),this.unSavedChangesFacade=(0,n.WQX)(p.nH),this.defaultPasswordValue="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",this.accountLoading=this.accountFacade.getAccountLoading,this.accountData=this.accountFacade.getAccountData,this.questionOptions=(0,n.EWP)(()=>this.securityQuestionsFacade.questions().map(e=>({name:e.question,value:e.questionKey}))),this.isUidTypeEmail=this.accountFacade.isUidTypeEmail,this.brand=E.qt,this.signInForm=this.formBuilder.group({uid:[null],password:[null,(0,g.Sb)()],question:[""],answer:[null,(0,c.N0)([(0,c.yt)(_.y.REQUIRED_SECURITY_ANSWER),(0,c.xh)(3,_.y.INVALID_SECURITY_ANSWER)])]}),this.phoneCallingCodes=this.countriesFacade.phoneCallingCodes,this.passwordPlaceholder=(0,n.vPA)(""),this.answerPlaceholder=(0,n.vPA)(""),this.passwordFieldHasInteracted=!1,this.passwordStrengthLabels=(0,n.EWP)(()=>JSON.stringify({label:this.translateService.instant("PASSWORD_STRENGTH.LABEL"),veryWeak:this.translateService.instant("PASSWORD_STRENGTH.VERY_WEAK"),weak:this.translateService.instant("PASSWORD_STRENGTH.WEAK"),good:this.translateService.instant("PASSWORD_STRENGTH.GOOD"),strong:this.translateService.instant("PASSWORD_STRENGTH.STRONG"),passwordRequirements:this.translateService.instant("PASSWORD_STRENGTH.PASSWORD_REQUIREMENTS"),letter:this.translateService.instant("PASSWORD_STRENGTH.LETTER"),number:this.translateService.instant("PASSWORD_STRENGTH.NUMBER"),characters:this.translateService.instant("PASSWORD_STRENGTH.CHARACTER")}))}ngOnInit(){this.setFormDefaultValues(),this.trackPageView(),this.unSavedChangesFacade.setHasUnSavedChangesSubscription(this.signInForm)}ngOnDestroy(){this.unSavedChangesFacade.destroyUnSavedChangesSubscription(),this.unSavedChangesFacade.clearSate()}setFormDefaultValues(){(0,n.QZP)(()=>{this.accountData().accountId&&this.resetFormToDefaults()},{injector:this.injector,allowSignalWrites:!0})}setValidationsForUid(){const e=this.isUidTypeEmail()?[(0,c.lE)(S.Xw,_.y.INVALID_EMAIL)]:[(0,g._G)()];this.signInForm.controls.uid.setValidators(e),this.setAdditionalValidators()}setAdditionalValidators(){this.isUidTypeEmail()?this.signInForm.controls.uid.setAsyncValidators([this.asyncValidators.guestExistingAccount(()=>this.defaultEmail,this.translateService.instant("VALIDATORS.EMAIL_ALREADY_USED"),"email",!0)]):this.signInForm.controls.uid.setAsyncValidators([this.asyncValidators.guestExistingAccount(()=>this.signInForm.controls.uid.value,this.translateService.instant("VALIDATORS.MOBILE_NUMBER_ALREADY_USE"),"mobileNumber",!0)])}handleSubmit(){if(this.signInForm.valid){const e=this.formService.getChangedProperties(this.signInForm);this.accountFacade.updateSignInData(e,{channel:h.sg.SETTINGS,currentPage:"signinandsecurity",interaction:"signinandsecurityupdated",content:""}),this.unSavedChangesFacade.setHasUnSavedChanges(!1)}}handleQuestionChanges(){this.cleanDefaultValueOnFocus("answer"),this.answerPlaceholder.set("")}handlePasswordFocus(){this.passwordFieldHasInteracted=!0,this.cleanDefaultValueOnFocus("password"),this.passwordPlaceholder.set(""),this.resetPasswordValidations=!1}handlePasswordChange(){this.passwordFieldHasInteracted||(this.signInForm.controls.password.markAsPristine(),this.unSavedChangesFacade.setHasUnSavedChanges(!1))}handleCancel(){this.accountData()?.accountId&&(this.resetFormToDefaults(),this.unSavedChangesFacade.setHasUnSavedChanges(!1))}cleanDefaultValueOnFocus(e){const i=this.signInForm.get(e);(i.value===this.defaultPasswordValue||null===i.value)&&(i.setValue(""),i.markAsDirty())}setUidDefaultValue(){const e=this.isUidTypeEmail(),i=this.accountData();if(e)return this.defaultEmail=i.uid,i.uid;const{contactInformation:{mobileNumberCallingCode:t,mobileNumber:r,mobileNumberCountryCode:f}}=i,D=this.phoneCallingCodes(),T=this.utilityService.removeCountryCodeFromNumber(t,r);return{countryCode:f||D.find(y=>y.callingCode===t).countryCode,phoneNumber:T}}resetFormToDefaults(){const e=this.accountData();this.signInForm.reset({uid:this.setUidDefaultValue(),question:e.signInInformation.securityQuestions[0].questionKey,answer:null,password:null}
1),Object.values(this.signInForm.controls).forEach(i=>{i.setErrors(null)}),this.passwordPlaceholder.set(this.defaultPasswordValue),this.answerPlaceholder.set(this.defaultPasswordValue),this.setValidationsForUid(),this.resetPasswordValidations=!0,this.passwordFieldHasInteracted=!1}trackPageView(){this.analyticInteraction.trackPageView({channel:h.sg.SETTINGS,pageName:"signinandsecurity"})}static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275cmp=n.VBU({type:s,selectors:[["app-sign-in-information"]],standalone:!0,features:[n.aNF],decls:21,vars:33,consts:[[1,"sign-in-information"],["tabindex","0",1,"sign-in-information__title"],[1,"sign-in-information__content"],[1,"form",3,"ngSubmit","formGroup"],[1,"form__fields"],["id","email","name","email","type","email","formControlName","uid",1,"form__field",3,"brand","label"],["id","phone","name","phone","formControlName","uid",1,"form__field",3,"brand","label","phoneCallingCodes"],["id","password","name","password","formControlName","password",1,"form__field",3,"onFocus","onChanges","brand","label","strengthLevelEnabled","passwordStrengthLabels","resetValidations","placeholder"],["id","question","name","question","formControlName","question",1,"form__field",3,"onChanges","brand","label","options"],["id","answer","name","answer","formControlName","answer",1,"form__field",3,"onFocus","brand","label","placeholder"],[1,"form__actions"],["theme","light","type","button",1,"form__cancel-btn",3,"onClick","brand","text","disabled"],["type","submit",1,"form__save-btn",3,"brand","disabled","text"]],template:function(i,t){1&i&&(n.j41(0,"div",0)(1,"h2",1),n.EFF(2),n.nI1(3,"translate"),n.k0s(),n.j41(4,"div",2)(5,"form",3),n.bIt("ngSubmit",function(){return t.handleSubmit()}),n.j41(6,"div",4),n.DNE(7,O,2,4,"app-input",5)(8,b,2,5,"app-input-phone",6),n.j41(9,"app-input-password",7),n.nI1(10,"translate"),n.bIt("onFocus",function(){return t.handlePasswordFocus()})("onChanges",function(){return t.handlePasswordChange()}),n.k0s(),n.j41(11,"app-dropdown",8),n.nI1(12,"translate"),n.bIt("onChanges",function(){return t.handleQuestionChanges()}),n.k0s(),n.j41(13,"app-input-password",9),n.nI1(14,"translate"),n.bIt("onFocus",function(){return t.cleanDefaultValueOnFocus("answer"),t.answerPlaceholder.set("")}),n.k0s()(),n.j41(15,"div",10)(16,"app-primary-button",11),n.nI1(17,"translate"),n.bIt("onClick",function(){return t.handleCancel()}),n.k0s(),n.nrm(18,"app-primary-button",12),n.nI1(19,"translate"),n.k0s()()()(),n.nrm(20,"delete-account-card")),2&i&&(n.R7$(2),n.SpI(" ",n.bMT(3,21,"CUSTOMER_JOURNEY.SETTINGS.SIGN_IN_TITLE")," "),n.R7$(3),n.Y8G("formGroup",t.signInForm),n.R7$(2),n.vxM(t.isUidTypeEmail()?7:8),n.R7$(2),n.Y8G("brand",t.brand)("label",n.bMT(10,23,"LOGIN.PASSWORD"))("strengthLevelEnabled",!0)("passwordStrengthLabels",t.passwordStrengthLabels())("resetValidations",t.resetPasswordValidations)("placeholder",t.passwordPlaceholder()),n.R7$(2),n.Y8G("brand",t.brand)("label",n.bMT(12,25,"COMMON.SECURITY_QUESTION"))("options",t.questionOptions()),n.R7$(2),n.Y8G("brand",t.brand)("label",n.bMT(14,27,"COMMON.ANSWER"))("placeholder",t.answerPlaceholder()),n.R7$(3),n.Y8G("brand",t.brand)("text",n.bMT(17,29,"COMMON.CANCEL"))("disabled",t.accountLoading()||!t.signInForm.dirty),n.R7$(2),n.Y8G("brand",t.brand)("disabled",t.accountLoading()||!t.signInForm.dirty||t.signInForm.invalid)("text",n.bMT(19,31,"COMMON.SAVE")))},dependencies:[m.h,m.D9,l.Sj,l.Mr,l.tu,l.A1,l.Ps,o.X1,o.qT,o.BC,o.cb,o.j4,o.JD,I.Ct],styles:["[_ngcontent-%COMP%]:root{--celebrity-primary-blue: #2588CD;--celebrity-error-color: #a8151a;--celebrity-input-disabled-background-color: #EFF0F1;--celebrity-input-disabled-border-color: #8E8F90}.margin-top-38-33[_ngcontent-%COMP%]{margin-top:38px}@media screen and (max-width: 768px){.margin-top-38-33[_ngcontent-%COMP%]{margin-top:33px}}.flex-direction-responsive[_ngcontent-%COMP%]{display:flex;flex-direction:row}@media screen and (max-width: 768px){.flex-direction-responsive[_ngcontent-%COMP%]{flex-direction:column}}.cover[_ngcontent-%COMP%]{object-fit:cover}.center-elements[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.sign-in-information[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:24px;gap:24px;border-radius:4px;background:#fff;box-shadow:0 2px 4px #35363726}@media screen and (max-width: 480px){.sign-in-information[_ngcontent-%COMP%]{padding:0}}@media screen and (max-width: 480px){.sign-in-information[_ngcontent-%COMP%]{box-shadow:none;background:none}}.sign-in-information__title[_ngcontent-%COMP%]{color:#002859;font-size:24px;font-style:normal;font-weight:600;line-height:32px;padding-bottom:32px;margin:0;border-bottom:1px solid #d3d4d5}@media screen and (max-width: 480px){.sign-in-information__title[_ngcontent-%COMP%]{font-size:30px}}.sign-in-information__title.empty-state[_ngcontent-%COMP%]{display:none}@media screen and (max-width: 480px){.sign-in-information__title.empty-state[_ngcontent-%COMP%]{width:89.3333333333%;margin:0 auto;display:flex;padding-bottom:22px;border-bottom:none}}@media screen and (max-width: 480px) and (min-width: 768px){.sign-in-information__title.empty-state[_ngcontent-%COMP%]{width:77.734375%;max-width:1300px}}.sign-in-information__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.form__fields[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.form__field[_ngcontent-%COMP%]{min-height:80px}.form__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
1gap:24px}@media screen and (max-width: 480px){.form__actions[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:stretch;padding-top:12px;gap:16px}}.form__cancel-btn[_ngcontent-%COMP%]{width:120px}.form__save-btn[_ngcontent-%COMP%]{width:224px}@media screen and (max-width: 480px){.form__fields[_ngcontent-%COMP%]{grid-template-columns:repeat(1,minmax(0,1fr))}.form__cancel-btn[_ngcontent-%COMP%], .form__save-btn[_ngcontent-%COMP%]{width:100%}}"]})}}return s})()}}]);
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.