1import{a as E,b as he}from"./chunk-Y2CRDR26.js";import{a as be}from"./chunk-K4R2IQH7.js";import{b as S}from"./chunk-O4L5QC24.js";import"./chunk-OTH52NOW.js";import{I as ae,J as y,O as fe,P as ue,T as ge,U as _e,c as Z,e as b,g as ee,h as te,i as ne,l as C,o as ie,w as oe,x as re}from"./chunk-2V5JL75X.js";import{A as X,Ed as de,Fd as me,Hc as w,Ic as I,Od as se,Pd as ce,ea as v,fa as le,ha as pe,s as W}from"./chunk-ZWEJHNXH.js";import{Ac as c,Dd as r,Ed as a,Fa as z,Ga as Y,Ja as x,Lb as t,Pc as Q,a as j,bc as H,bd as O,cc as J,ed as l,fc as K,fd as _,gd as h,jb as $,qc as f,qd as F,sc as u,vd as k,w as D,xc as g,yc as o,zc as i}from"./chunk-NEZQPKWQ.js";import{h as L}from"./chunk-EMLWB7XO.js";var Me=()=>[],xe=()=>({cxRoute:"yourProfile"});function Oe(n,m){}function ye(n,m){n&1&&c(0,"cx-icon",10)}function ve(n,m){n&1&&(o(0,"span",11),l(1),r(2,"cxTranslate"),i()),n&2&&(t(),h(" ",a(2,1,"errorMessages.requiredFieldError")," "))}function we(n,m){n&1&&c(0,"cx-icon",10)}function Se(n,m){n&1&&(o(0,"span",11),l(1),r(2,"cxTranslate"),i()),n&2&&(t(),h(" ",a(2,1,"errorMessages.requiredFieldError")," "))}function Ee(n,m){n&1&&c(0,"cx-icon",10)}function Ne(n,m){n&1&&(o(0,"span",11),l(1),r(2,"cxTranslate"),i()),n&2&&(t(),h(" ",a(2,1,"errorMessages.phoneNumberMinLengthError")," "))}function Te(n,m){n&1&&(o(0,"span",11),l(1),r(2,"cxTranslate"),i()),n&2&&(t(),h(" ",a(2,1,"errorMessages.phoneNmberInvalidCharactersError")," "))}var p=class extends he{constructor(){super(...arguments);this.subscriptions=new j;this.showValidation=!1;this.titles$=this.service.titles$.pipe(D(d=>d.map(s=>({id:s.code,name:s.name}))))}ngOnInit(){let d=this.form.valueChanges.subscribe(()=>{this.showValidation&&(this.showValidation=!1)});this.subscriptions.add(d)}};p.\u0275fac=(()=>{let d;return function(e){return(d||(d=$(p)))(e||p)}})(),p.\u0275cmp=H({type:p,selectors:[["app-alcon-edit-your-profile"]],features:[K],decls:64,vars:60,consts:[[1,"profile-edit"],[3,"ngSubmit","formGroup"],[1,"profile-edit__container"],[1,"profile-edit__user-title"],[1,"label-content"],["bindLabel","name","bindValue","id","dropdownPosition","bottom","formControlName","titleCode",1,"select",3,"items","searchable","clearable"],[1,"profile-edit__user-info"],[1,"asterisk"],[1,"position-relative"],["aria-required","true","type","text","name","firstName","formControlName","firstName",1,"form-control","OneLinkNoTx",3,"placeholder"],["type","ERROR",1,"d-block","position-absolute","error-flag"],[1,"profile-edit__error-message"],["aria-required","true","type","text","name","lastName","formControlName","lastName",1,"form-control","OneLinkNoTx",3,"placeholder"],[1,"disabled"],["aria-required","true","type","text","name","email","formControlName","email","readonly","",1,"form-control","OneLinkNoTx"],["aria-required","true","type","text","name","contactNumber","formControlName","contactNumber",1,"form-control","OneLinkNoTx"],[1,"profile-edit__controls","align-items-center"],[1,"link",3,"routerLink"],[1,"btn","btn-block","btn-primary","profile-edit__controls--button",3,"disabled"],[1,"profile-edit__change-password"],["disabled","",1,"profile-edit__change-password-button"],["type","Lock"],[1,"profile-edit__change-password-button--text"]],template:function(s,e){if(s&1&&(f(0,Oe,0,0),r(1,"async"),o(2,"div",0)(3,"form",1),Q("ngSubmit",function(){return e.onSubmit(),e.form.invalid?e.showValidation=!0:e.showValidation=!1}),o(4,"div",2)(5,"div",3)(6,"label")(7,"span",4),l(8),r(9,"cxTranslate"),i(),c(10,"ng-select",5),r(11,"async"),i()(),o(12,"div",6)(13,"label")(14,"span",4),l(15),r(16,"cxTranslate"),i(),o(17,"span",7),l(18,"*"),i(),o(19,"div",8),c(20,"input",9),r(21,"cxTranslate"),f(22,ye,1,0,"cx-icon",10),i(),f(23,ve,3,3,"span",11),i(),o(24,"label")(25,"span",4),l(26),r(27,"cxTranslate"),i(),o(28,"span",7),l(29,"*"),i(),o(30,"div",8),c(31,"input",12),r(32,"cxTranslate"),f(33,we,1,0,"cx-icon",10),i(),f(34,Se,3,3,"span",11),i(),o(35,"label",13)(36,"span",4),l(37),r(38,"cxTranslate"),i(),c(39,"input",14),i(),o(40,"label")(41,"span",4),l(42),r(43,"cxTranslate"),i(),o(44,"div",8),c(45,"input",15),f(46,Ee,1,0,"cx-icon",10),i(),f(47,Ne,3,3,"span",11),f(48,Te,3,3,"span",11),i()()(),o(49,"div",16)(50,"div")(51,"a",17),r(52,"cxUrl"),l(53),r(54,"cxTranslate"),i()(),o(55,"button",18),l(56),r(57,"cxTranslate"),i()(),o(58,"div",19)(59,"button",20),c(60,"cx-icon",21),o(61,"span",22),l(62),r(63,"cxTranslate"),i()()()()()),s&2){let T,V,B,R,q,U,P,M,A,G;u(a(1,32,e.isUpdating$)?0:-1),t(3),g("formGroup",e.form),t(5),_(a(9,34,"updateProfileForm.title")),t(2),g("items",a(11,36,e.titles$)??k(58,Me))("searchable",!1)("clearable",!1),t(5),_(a(16,38,"updateProfileForm.firstName.label")),t(5),O("invalid",((T=e.form.get("firstName"))==null?null:T.hasError("required"))&&e.showValidation),g("placeholder",F(a(21,40,"updateProfileForm.firstName.placeholder"))),t(2),u((V=e.form.get("firstName"))!=null&&V.hasError("required")&&e.showValidation?22:-1),t(),u((B=e.form.get("firstName"))!=null&&B.hasError("required")&&e.showValidation?23:-1),t(3),_(a(27,42,"updateProfileForm.lastName.label")),t(5),O("invalid",((R=e.form.get("lastName"))==null?null:R.hasError("required"))&&e.showValidation),g("placeholder",F(a(32,44,"updateProfileForm.lastName.placeholder"))),t(2),u((q=e.form.get("lastName"))!=null&&q.hasError("required")&&e.showValidation?33:-1),t(),u((U=e.form.get("lastName"))!=null&&U.hasError("required")&&e.showValidation?34:-1),t(3),_(a(38,46,"myAccount.yourProfileEdit.email")),t(5),_(a(43,48,"myAccount.yourProfileEdit.phoneNumber")),t(3),O("invalid",(((P=e.form.get("contactNumber"))==null?null:P.hasError("pattern"))||((P=e.form.get("contactNumber"))==null?null:P.hasError("minlength")))&&e.showValidation),t(),u((M=e.form.get("contactNumber"))!=null&&M.hasError("minlength")||(M=e.form.get("contactNumber"))!=null&&M.hasError("pattern")&&e.showValidation?46:-1),t(),u((A=e.form.get("contactNumber"))!=null&&A.hasError("minlength")&&e.showValidation?47:-1),t(),u((G=e.form.get("contactNumber"))!=null&&G.hasError("pattern")&&e.showValidation?48:-1),t(3),g("routerLink",a(52,50,k(59,xe))),t(2),h(" ",a(54,52,"common.cancel")," "),t(2),g("disabled",e.form.disabled),t(),h(" ",a(57,54,"common.save")," "),t(6),_(a(63,56,"myAccount.yourProfile.changePassword"))}},dependencies:[ae,ie,Z,ee,te,y,re,oe,fe,ge,le,W,se,de],styles:[`[_nghost-%COMP%]{padding:0 1rem;width:100%}@media(min-width:768px){[_nghost-%COMP%]{padding:0 1.5rem}}@media(max-width:1199.98px){[_nghost-%COMP%]{padding:0 1.5rem}}@media(min-width:992px){[_nghost-%COMP%]{margin-top:.875rem;width:50%}}.profile-edit[_ngcontent-%COMP%]{background:linear-gradient(45deg,#ffffffe6,#fff3);border:1px solid #ffffff;border-radius:.75rem;box-shadow:0 .3125rem 1.25rem #00359526;padding:1.5rem;margin-top:2rem;flex:1}.profile-edit__user-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.profile-edit__user-info[_ngcontent-%COMP%] .error-flag[_ngcontent-%COMP%]{right:15px;top:8px}@media(max-width:767.98px){.profile-edit__user-info[_ngcontent-%COMP%] .error-flag[_ngcontent-%COMP%]{top:12px}}.profile-edit[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin:0}.profile-edit[_ngcontent-%COMP%] .label-content[_ngcontent-%COMP%]{display:inline-block}.profile-edit[_ngcontent-%COMP%] .asterisk[_ngcontent-%COMP%]{color:#003595;font-family:Open Sans,Open Sans Fallback;font-size:.75rem;font-style:normal;font-weight:400;padding-left:.3125rem}.profile-edit[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{display:inline-block;height:16px;width:16px}.profile-edit__controls[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #e9e9e9;gap:1.5rem;margin-top:2.5rem;padding:0 2.125rem 2.5rem}.profile-edit__controls--button[_ngcontent-%COMP%]{flex:1;padding:0;margin:0;height:38px;min-height:38px}.profile-edit__user-title[_ngcontent-%COMP%]{width:5.25rem}.profile-edit__error-message[_ngcontent-%COMP%]{color:#e6062a;font-family:Open Sans,Open Sans Fallback;font-size:.75rem;font-style:normal;font-weight:400;display:block;padding-left:1rem}.profile-edit[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{pointer-events:none}.profile-edit[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#4f4e4f}.profile-edit[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:1px solid #727780;background:#f4f4f4}
1.profile-edit[_ngcontent-%COMP%] .invalid[_ngcontent-%COMP%]{border:1px solid #e6062a}.profile-edit[_ngcontent-%COMP%] .invalid[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]::placeholder{color:transparent}.profile-edit[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{color:#003595;font-family:Open Sans,Open Sans Fallback;font-size:.75rem;font-style:normal;font-weight:600;flex:0;min-height:auto;min-width:auto;text-decoration:underline;text-underline-offset:.25rem}.profile-edit[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]:hover{color:#003595}.profile-edit__change-password-button[_ngcontent-%COMP%]{background:#fff;border:.0625rem solid #003595;border-radius:100px;display:flex;gap:.5rem;margin-top:2rem;padding:.5rem 4rem;width:100%}.profile-edit__change-password-button--text[_ngcontent-%COMP%]{color:#003595;font-family:Open Sans,Open Sans Fallback;font-size:1rem;font-style:normal;font-weight:600}.profile-edit__change-password-button[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}@media(min-width:768px){.profile-edit__container[_ngcontent-%COMP%]{width:70%}.profile-edit__user-info[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,250px);grid-column-gap:1.5rem;grid-row-gap:1.5rem}.profile-edit__controls[_ngcontent-%COMP%]{margin-top:1.5rem;justify-content:center}.profile-edit__controls--button[_ngcontent-%COMP%]{flex:0 0 auto;width:100%;max-width:165px}.profile-edit__change-password[_ngcontent-%COMP%]{width:100%;max-width:295px;margin:0 auto}.profile-edit__error-message[_ngcontent-%COMP%]{display:inline-block}}@media(min-width:992px){.profile-edit__container[_ngcontent-%COMP%]{width:100%}.profile-edit__controls--button[_ngcontent-%COMP%]{font-size:1rem}.profile-edit__change-password[_ngcontent-%COMP%]{max-width:100%;width:auto;display:inline-block;margin:0}.profile-edit__change-password-button[_ngcontent-%COMP%]{padding:.25rem 1.5rem;gap:.25rem}.profile-edit__change-password-button--text[_ngcontent-%COMP%]{color:#003595;font-family:Open Sans,Open Sans Fallback;font-size:.875rem;font-style:normal;font-weight:600}.profile-edit__error-message[_ngcontent-%COMP%]{margin:0}.profile-edit__controls[_ngcontent-%COMP%]{margin-top:2.5rem;padding:0 0 2.5rem}.profile-edit[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{margin-bottom:1.5rem}}.form-control.invalid[_ngcontent-%COMP%]::placeholder{color:transparent}.form-control[_ngcontent-%COMP%]{color:#232223;font-family:Open Sans,Open Sans Fallback;font-size:.875rem;font-style:normal;font-weight:400;height:44px}@media(min-width:768px){.form-control[_ngcontent-%COMP%]{height:36px}}@media(min-width:992px){.form-control[_ngcontent-%COMP%]{margin:0}}.form-control.ng-invalid[_ngcontent-%COMP%]{border-color:inherit} 2 3 4 5 6 7 8 9`],changeDetection:0}),p=L([be()],p);var N=class n extends E{constructor(d,s,e){super(d,s);this.router=e;this.form=new ne({email:new C(""),titleCode:new C(""),firstName:new C("",b.required),lastName:new C("",b.required),contactNumber:new C("",b.compose([b.pattern("^[+]?\\d+$"),b.minLength(9)]))})}onSuccess(){this.globalMessageService.add({key:"successMessages.profileEditSuccess"},I.MSG_TYPE_CONFIRMATION),this.busy$.next(!1),this.form.reset(),this.router.navigate(["/my-account/your-profile"])}onError(){this.globalMessageService.add({key:"errorMessages.userEditError"},I.MSG_TYPE_ERROR),this.busy$.next(!1),this.router.navigate(["/my-account/your-profile"])}static{this.\u0275fac=function(s){return new(s||n)(x(S),x(w),x(v))}}static{this.\u0275prov=z({token:n,factory:n.\u0275fac})}};var Fe=[{path:"",component:p}],Pe=class n{static{this.\u0275fac=function(d){return new(d||n)}}static{this.\u0275mod=J({type:n})}static{this.\u0275inj=Y({providers:[{provide:E,useClass:N,deps:[S,w,v]}],imports:[_e,X,y,ue,ce,me,pe.forChild(Fe),p]})}};export{Pe as AlconEditYourProfileModule};
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.