"use strict";(self.webpackChunkserver_side_rendering=self.webpackChunkserver_side_rendering||[]).push([[2756],{35039:(e,t,i)=>{i.d(t,{j:()=>u});var o=i(4309),n=i(42998),r=i(9180),s=i(44382),a=i(63468),l=i(23550),c=i(57826);const d="phoneAttemptExpirationTime",p="phoneCurrentAttemptCounter",h="phoneLastNumber";let u=(()=>{class e{constructor(e,t,i){this.http=e,this.browserStorageService=t,this.siteConfigService=i}getPhoneValidationStatus(e){return this.http.get(this.getPhoneProfilingUrl(e)).pipe((0,n.catchError)((()=>(0,o.of)({phoneStatus:a.k.ERROR}))))}getPhoneProfilingUrl(t){return`${e.PROFILE_PROFILING_STATUS}/${t}`}updatePhoneAttempts(e){let t=this.hasPhoneExpirationTimeReached();return!!this.hasReachedMaxPhoneAttempts()||!(!e||e===this.getLastPhoneNumberAttempt())&&(this.incrementPhoneAttempt(),this.storePhoneNumberAttemptInLocalStorage(e),t&&this.setPhoneAttemptExpirationTimeInLocalStorage(e),!0)}hasReachedMaxPhoneAttempts(){return this.getCurrentAttempt()>=this.getMaxAttempts()}hasPhoneExpirationTimeReached(){let e=this.getExpirationTimeForPhoneAttempt();return!(e&&!(e&&Date.now()>e)||(this.clearPhoneAttemptsDataFromLocalStorage(),0))}clearPhoneAttemptsDataFromLocalStorage(){this.browserStorageService.remove(d),this.browserStorageService.remove(h),this.browserStorageService.remove(p)}setPhoneAttemptExpirationTimeInLocalStorage(e){let t=Date.now()+this.getPhoneExpirationTime();this.browserStorageService.set(d,t.toString())}incrementPhoneAttempt(){this.setCurrentAttempt(this.getCurrentAttempt()+1)}storePhoneNumberAttemptInLocalStorage(e){this.browserStorageService.set(h,e.toString())}getExpirationTimeForPhoneAttempt(){return parseInt(this.browserStorageService.get(d))||0}getMaxAttempts(){return this.siteConfigService.getSiteConfigProp("phoneJoinMaxPhoneAttempts")}getPhoneExpirationTime(){return 1e3*this.siteConfigService.getSiteConfigProp("phoneJoinExpirationTimeAttempts")}getLastPhoneNumberAttempt(){return this.browserStorageService.get(h)||"0"}getCurrentAttempt(){return parseInt(this.browserStorageService.get(p))||0}setCurrentAttempt(e){this.browserStorageService.set(p,e.toString())}}return e.PROFILE_PROFILING_STATUS="/services/profile-profiling/v1/phone-validation/phone-number",e.ɵfac=function(t){return new(t||e)(c["ɵɵinject"](l.HttpClient),c["ɵɵinject"](r.z),c["ɵɵinject"](s.r))},e.ɵprov=c["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},63468:(e,t,i)=>{i.d(t,{k:()=>o});var o=(()=>(function(e){e.VALID="VALID",e.INVALID="INVALID",e.ERROR="ERROR"}(o||(o={})),o))()},78693:(e,t,i)=>{i.d(t,{F:()=>c});var o=i(12495),n=i(10693),r=i(4309),s=i(42998),a=i(23550),l=i(57826);class c{constructor(e){this.http=e}getLanguages(){let e=this.http.get(c.LANGUAGES_URL,{withCredentials:!0});return this.handleBackendResponse(e,(e=>e.items))}getTimeZones(){let e=this.http.get(c.TIME_ZONES_URL,{withCredentials:!0});return this.handleBackendResponse(e,(e=>e.items))}getCountries(){return this.http.get(c.COUNTRIES_URL,{withCredentials:!0}).pipe((0,s.map)((e=>n(o("name"))(e.items))),(0,s.catchError)((e=>(0,r.of)([]))))}getTimeZonesForThePlayer(){let e=this.http.get(c.TIME_ZONES_URL_FOR_PLAYER,{withCredentials:!0});return this.handleBackendResponse(e,(e=>e.items))}handleBackendResponse(e,t){return e.pipe((0,s.map)(t),(0,s.catchError)((e=>(0,r.throwError)(e.error||"Internal Server Error"))))}}c.BASE_URL="/services/reference-data/v1",c.LANGUAGES_URL=`${c.BASE_URL}/languages`,c.TIME_ZONES_URL=`${c.BASE_URL}/time-zones`,c.COUNTRIES_URL=`${c.BASE_URL}/countries`,c.TIME_ZONES_URL_FOR_PLAYER="/services/web/v1/time-zones",c.ɵfac=function(e){return new(e||c)(l["ɵɵinject"](a.HttpClient))},c.ɵprov=l["ɵɵdefineInjectable"]({token:c,factory:c.ɵfac})},47052:(e,t,i)=>{i.d(t,{J:()=>o});const o=new(i(57826).InjectionToken)("OddsSelectorConfig")},52661:(e,t,i)=>{i.d(t,{U:()=>l,W:()=>a}),i(73753);var o=i(4309),n=i(42998),r=i(48661),s=i(57826);let a=(()=>{class e{constructor(e){this.translateService=e}resolve(e){let t=[];return this.categories.forEach((e=>{t.push(this.translateService.loadTranslations(e).pipe((0,n.take)(1)))})),(0,o.forkJoin)(t).pipe((0,n.map)((e=>{let t={};for(let i in this.categories)t[this.categories[i]]=e[i];return t})))}}return e.ɵfac=function(t){return new(t||e)(s["ɵɵinject"](r.s))},e.ɵprov=s["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();function l(e){return t=>class extends t{constructor(){super(...arguments),this.categories=e}}}},72465:(e,t,i)=>{i.d(t,{G:()=>l});var o=i(4309),n=i(42998),r=i(20561),s=i(74923),a=i(57826);let l=(()=>{class e{constructor(e){this.phoneStatusStore=e}getPhoneType(e=1e3,t=5){let i=0,s=r.y.PENDING;const a=function(){return s===r.y.PENDING&&i<t};let l=!1;return new o.Observable((t=>{(0,o.interval)(e).pipe((0,n.takeWhile)((()=>a())),(0,n.filter)((()=>!l)),(0,n.flatMap)((()=>(i++,l=!0,this.phoneStatusStore.getPhoneStatus())))).subscribe((e=>{l=!1,s=this.phoneTypeFromResponse(e),a()||t.next(s!==r.y.PENDING?s:r.y.VALID)}))}))}phoneTypeFromResponse(e){return e.phoneProfilingStatus?e.phoneProfilingStatus:r.y.VALID}}return e.ɵfac=function(t){return new(t||e)(a["ɵɵinject"](s.G))},e.ɵprov=a["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},4633:(e,t,i)=>{i.d(t,{W:()=>o});class o{shouldBeRendered(e){return!0}}},12353:(e,t,i)=>{i.d(t,{A3:()=>me,AN:()=>J,A_:()=>Ae,Bb:()=>y,CS:()=>Pe,DL:()=>ee,Et:()=>re,Fj:()=>L,GT:()=>F,Gk:()=>R,HV:()=>E,Hz:()=>x,IM:()=>oe,J$:()=>te,JR:()=>w,Jd:()=>s,L6:()=>Ce,Md:()=>r,O0:()=>ce,P_:()=>M,Pf:()=>fe,Qi:()=>b,Rp:()=>j,SB:()=>Y,Sk:()=>ae,Sz:()=>de,TC:()=>ue,TE:()=>ve,TH:()=>C,Tk:()=>xe,Ty:()=>pe,V:()=>p,Vo:()=>A,WC:()=>z,XL:()=>ie,XU:()=>$,XW:()=>B,Yy:()=>W,Z$:()=>O,ZY:()=>c,b7:()=>Ne,be:()=>m,c2:()=>le,c_:()=>n,ci:()=>T,du:()=>X,eT:()=>S,fc:()=>h,gP:()=>P,iY:()=>u,ix:()=>we,jQ:()=>D,jg:()=>a,kQ:()=>Ee,lg:()=>Te,mi:()=>q,ml:()=>se,nJ:()=>I,nk:()=>k,nr:()=>G,oi:()=>_,pb:()=>Fe,qC:()=>Z,sN:()=>d,sz:()=>v,ti:()=>f,uK:()=>Ie,uz:()=>ge,vd:()=>ye,yE:()=>V,yN:()=>l,zA:()=>ne,zc:()=>g,zh:()=>be});var o=i(57826);const n="password",r=new o.InjectionToken(n),s="email",a=new o.InjectionToken(s),l="username",c=new o.InjectionToken(l),d="nickname",p=new o.InjectionToken(d),h="firstName",u=new o.InjectionToken(h),f="lastName",m=new o.InjectionToken(f),g="city",v=new o.InjectionToken(g),b="currency",C=new o.InjectionToken(b),S="currencyMbtcInfo",y="dateOfBirth",P=new o.InjectionToken(y),E="country",x=new o.InjectionToken(E),I="countrySelector",F=new o.InjectionToken(I),T="phone",w=new o.InjectionToken(T),N="phoneMasked",A=new o.InjectionToken(N),k="termsConditions",M="fourDigitPinCode",O=new o.InjectionToken(M),_="termsConditionsCheckbox",R=new o.InjectionToken(_),j="postalCode",G=new o.InjectionToken(j),U="referralEMail",D=new o.InjectionToken(U),L="addressLine",V=new o.InjectionToken(L),H="subdivision",B=new o.InjectionToken(H),z="passwordAffiliate",q=new o.InjectionToken(z),W="companyName",$=new o.InjectionToken(W),J="targetMarket",K=new o.InjectionToken(J),Y="targetMarketSelector",Z=new o.InjectionToken(Y),X="targetProduct",Q=new o.InjectionToken(X),ee="targetProductSelector",te=new o.InjectionToken(ee),ie="websiteUrl",oe=new o.InjectionToken(ie),ne="instantMessageSelector",re=new o.InjectionToken(ne),se="language",ae=new o.InjectionToken(se),le="timeZone",ce=new o.InjectionToken(le),de="oddsFormat",pe=new o.InjectionToken(de),he="subscriptionChannels",ue=new o.InjectionToken(he),fe="wantHost",me=new o.InjectionToken(fe),ge="acceptsGifts",ve=new o.InjectionToken(ge),be="preferredContact",Ce=new o.InjectionToken(be),Se="title",ye=new o.InjectionToken(Se),Pe="frequency",Ee=new o.InjectionToken(Pe),xe="from",Ie=new o.InjectionToken(xe),Fe="to",Te=new o.InjectionToken(Fe),we="relatedAccount",Ne=new o.InjectionToken(we),Ae={[n]:r,[s]:a,[l]:c,[d]:p,[h]:u,[f]:m,[g]:v,[b]:C,[y]:P,[M]:O,[E]:x,[I]:F,[T]:w,[N]:A,[_]:R,[j]:G,[U]:D,[L]:V,[H]:B,[z]:q,[W]:$,[J]:K,[Y]:Z,[X]:Q,[ee]:te,[ne]:re,[ie]:oe,[se]:ae,[le]:ce,[de]:pe,[he]:ue,[we]:Ne,[fe]:me,[Se]:ye,[xe]:Ie,[Fe]:Te,[Pe]:Ee,[ge]:ve,[be]:Ce}},75532:(e,t,i)=>{i.d(t,{U:()=>d});var o=i(85538),n=i(60763),r=i(12353),s=i(92920),a=i(12473),l=i(8394);class c extends l.j{constructor(e){super(e),this.modelType="header",this.label=e.label,this.labelPrefix=e.labelPrefix,this.beforeOf=e.beforeOf}}class d{constructor(e,t){this.injector=e,this.deviceService=t,this._availableFields=r.A_}set availableFields(e){this._availableFields=e}formHasTwoColumns(e){return e.fields.some((e=>-1!==e.indexOf(",")))}generate(e,t,i){let n={},l={},d={},p=(e,t,o,r)=>{const s=this.returnKeyIfTitle(e),c=this.injector.get(this._availableFields[s]);if(c.shouldBeRendered(o)){const s=-1!=o.optionalFields.indexOf(e),p=this.renderFormElementComponent(c,t,s,o,i,e),h=this.applyCustomization(t,e,p,o,r);h.formElement&&(l=a(l,h.formElement.groupValidator),d=a(d,h.formElement.groupAsyncValidator)),this.shouldHaveFocus(r.position,h)&&this.setFocus(h.formElement),n[h.fieldId]=h.formElement}};const h=(t.fieldGroups||[]).map((e=>{const t=e.split("#");return{label:t[0],beforeOf:t[1]}}));let u=0;return t.fields.forEach((i=>{const o=i.split(","),s=h.filter((e=>e.beforeOf===o[0]))[0];s&&(n[s.label]=new c({id:s.label,label:s.label,beforeOf:s.beforeOf})),o.forEach(((i,n)=>{const s=this.returnKeyIfTitle(i);r.A_.hasOwnProperty(s)&&(p(i,e,t,{position:u,layoutClass:this.getLayoutClass(o,n)}),u++)}))})),new o.f({id:e,elements:n,validator:s(l)?void 0:l,asyncValidator:s(d)?void 0:d})}getLayoutClass(e,t){let i;return 1===e.length?i="field-alone":(i=0===t?"field-left":"field-right","empty"===e[(t+1)%2]&&(i+=" field-alone")),i}shouldHaveFocus(e,t){let i=0==e;return this.deviceService.isDesktop()&&i&&t.formElement instanceof n.b}setFocus(e){e.focused=!0}applyCustomization(e,t,i,o,n){return n&&n.layoutClass&&(i.layoutClass=(i.layoutClass||"")+" "+n.layoutClass),{fieldId:t,formElement:i}}renderFormElementComponent(e,t,i,o,n,r){return e.render(t,i,o,n,r)}returnKeyIfTitle(e){return e.includes("title:")?e.split(":")[0]:e}}},69524:(e,t,i)=>{i.d(t,{u:()=>l});var o=i(4633),n=i(60763),r=i(23472),s=i(48443),a=i(57826);let l=(()=>{class e extends o.W{render(t,i,o,r){let s=new n.b({disabled:this.isUsernameFieldDisabled(t,r),id:`${t}-${e.USERNAME}`,type:"text",label:"profileFields.username.label",validators:{minLength:6,maxLength:20,bxUsername:null},errorMessages:{minLength:"profileFields.username.error_minLength",maxLength:"profileFields.username.error_maxLength",bxUsername:"profileFields.username.error_bxUsername",alreadyTaken:"profileFields.username.error_alreadyTaken"}});return i||(s.validators.required=null,s.errorMessages.required="profileFields.username.error_required"),s}isUsernameFieldDisabled(e,t){return e==s.fh.formId?t&&!!t.username:e!=r.CY.formId}}return e.USERNAME="username",e.ɵfac=function(){let t;return function(i){return(t||(t=a["ɵɵgetInheritedFactory"](e)))(i||e)}}(),e.ɵprov=a["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},9253:(e,t,i)=>{i.d(t,{p:()=>l});var o=i(12353),n=i(63253),r=i(31264),s=i(17128),a=i(57826);let l=(()=>{class e{constructor(e){this.windowService=e,this.AFFILIATE_METADATA_TYPE="affiliate",this.targetMarket=o.SB+"."+o.AN,this.targetProduct=o.DL+"."+o.du,this.METADATA_PATH_SEPARATOR=".",this.METADATA_FIELDS=[{type:this.AFFILIATE_METADATA_TYPE,mandatoryField:o.WC,fields:[o.Yy,o.XL,"password","targetMarket","termsConditions","targetProduct","instantMessage"],fieldsForm:[o.Yy,o.XL,o.WC,this.targetMarket,o.oi,this.targetProduct,o.zA]}]}fillMetadataFields(e){const t=this.getMetadataFieldsForm(e);t&&(e.metadata={type:t.type,content:{}},this.setAndCleanMetadataContent(t,e),this.mapInstantMessage(e))}getMetadataFieldsForm(e){const t=this.METADATA_FIELDS.filter((t=>void 0!==e[t.mandatoryField]));if(1===t.length)return t[0]}getMetadataFromURLParams(){const e=this.windowService.getUrlSearchParams().get(s.Rc);return e?{referringSiteToken:e}:{}}setAndCleanMetadataContent(e,t){e.fieldsForm.forEach(((i,o)=>{let n=e.fields[o];const r=this.getFieldFormValueMetadata(i,t);r&&(t.metadata.content[n]=r),delete t[this.getParentKeyFromKey(i)]})),t.metadata.content=Object.assign(t.metadata.content,this.getMetadataFromURLParams())}getFieldFormValueMetadata(e,t){return n(e.split(this.METADATA_PATH_SEPARATOR),t)}getParentKeyFromKey(e){return e.split(this.METADATA_PATH_SEPARATOR)[0]}mapInstantMessage(e){const t=e.metadata.content.instantMessage;t&&(t.usernameOrPhone?(e.metadata.content.instantMessage.username=t.usernameOrPhone,delete t.usernameOrPhone):""===t.usernameOrPhone&&delete t.usernameOrPhone)}}return e.ɵfac=function(t){return new(t||e)(a["ɵɵinject"](r.u))},e.ɵprov=a["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},31829:(e,t,i)=>{i.d(t,{J:()=>c});var o=i(72437),n=i(9109),r=i(17602),s=i(4309),a=i(42998),l=i(57826);let c=(()=>{class e{constructor(e,t,i){this.marketingPageService=e,this.impressionHelper=t,this.cmsFeatureFlagService=i}resolve(){const e=this.getPresetFilter();return this.cmsFeatureFlagService.isFeatureEnabled(r.u.REGISTRATION_FORM_CONTENT_FF)?this.marketingPageService.getMarketingPageBySlug("join",null,{filter:e}).pipe((0,a.tap)((e=>this.impressionHelper.pageView(e))),(0,a.first)(),(0,a.catchError)((()=>(0,s.of)(null)))):(0,s.of)(null)}getPresetFilter(){}}return e.ɵfac=function(t){return new(t||e)(l["ɵɵinject"](o.F),l["ɵɵinject"](n.P),l["ɵɵinject"](r.u))},e.ɵprov=l["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},23472:(e,t,i)=>{i.d(t,{CY:()=>ee,hx:()=>Q});var o,n=i(64762),r=i(57826),s=i(40475),a=i(73753),l=i(70586),c=i(71227),d=i(20417),p=i(90866),h=i(59288),u=i(9180),f=i(63468),m=i(35039),g=i(44382),v=i(48661),b=i(70794),C=i(13965),S=i(37337),y=i(80526),P=i(85538),E=i(32711),x=i(4309),I=i(42998),F=i(12353),T=i(68423),w=i(69524),N=i(70547),A=i(42590),k=i(80298),M=i(69566),O=i(71777),_=i(30331),R=i(6856),j=i(60567),G=i(9601),U=i(10476);const D=function(){return{tag:"textContent",label:"profileRegistration.duplicateSignupAttempted"}},L=function(e){return[e]};function V(e,t){1&e&&(r["ɵɵelementStart"](0,"figure",12),r["ɵɵtext"](1,"\n                "),r["ɵɵelement"](2,"i",13),r["ɵɵtext"](3,"\n                "),r["ɵɵelement"](4,"figcaption",14),r["ɵɵtext"](5,"\n            "),r["ɵɵelementEnd"]()),2&e&&(r["ɵɵadvance"](4),r["ɵɵproperty"]("bxTranslate",r["ɵɵpureFunction1"](2,L,r["ɵɵpureFunction0"](1,D))))}const H=function(e){return{referralName:e}},B=function(e){return{tag:"textContent",label:"profileRegistration.alert.referral",values:e}};function z(e,t){if(1&e&&(r["ɵɵelementStart"](0,"figure",15),r["ɵɵtext"](1,"\n                "),r["ɵɵelement"](2,"i",13),r["ɵɵtext"](3,"\n                "),r["ɵɵelement"](4,"figcaption",14),r["ɵɵtext"](5,"\n            "),r["ɵɵelementEnd"]()),2&e){const e=r["ɵɵnextContext"](2);r["ɵɵadvance"](4),r["ɵɵproperty"]("bxTranslate",r["ɵɵpureFunction1"](5,L,r["ɵɵpureFunction1"](3,B,r["ɵɵpureFunction1"](1,H,e.referralName))))}}function q(e,t){1&e&&(r["ɵɵelementStart"](0,"figure",16),r["ɵɵtext"](1,"\n                    "),r["ɵɵelement"](2,"i",17),r["ɵɵtext"](3,"\n                    "),r["ɵɵelementStart"](4,"figcaption",18),r["ɵɵtext"](5,"\n                        profileRegistration.message.phone.invalid\n                    "),r["ɵɵelementEnd"](),r["ɵɵtext"](6,"\n                "),r["ɵɵelementEnd"]())}const W=function(){return["/terms-of-service"]};function $(e,t){1&e&&(r["ɵɵelementStart"](0,"div",19),r["ɵɵtext"](1,"\n                    "),r["ɵɵelementStart"](2,"span",14),r["ɵɵtext"](3,"profileRegistration.terms.beforeLink"),r["ɵɵelementEnd"](),r["ɵɵtext"](4,"\n                    "),r["ɵɵelementStart"](5,"span"),r["ɵɵtext"](6,"\n                        "),r["ɵɵelementStart"](7,"a",20),r["ɵɵtext"](8,"\n                            profileRegistration.terms.link\n                        "),r["ɵɵelementEnd"](),r["ɵɵtext"](9,"\n                    "),r["ɵɵelementEnd"](),r["ɵɵtext"](10,"\n                    "),r["ɵɵelementStart"](11,"span",14),r["ɵɵtext"](12,"profileRegistration.terms.afterLink"),r["ɵɵelementEnd"](),r["ɵɵtext"](13,"\n                "),r["ɵɵelementEnd"]()),2&e&&(r["ɵɵadvance"](7),r["ɵɵproperty"]("routerLink",r["ɵɵpureFunction0"](1,W)))}function J(e,t){1&e&&(r["ɵɵelementStart"](0,"figure",21),r["ɵɵtext"](1,"\n                        "),r["ɵɵelement"](2,"i",22),r["ɵɵtext"](3,"\n                    "),r["ɵɵelementEnd"]())}function K(e,t){1&e&&(r["ɵɵelementStart"](0,"span",14),r["ɵɵtext"](1,"\n                            profileRegistration.submit.phone.invalid.label\n                        "),r["ɵɵelementEnd"]())}function Y(e,t){1&e&&(r["ɵɵelementStart"](0,"span",14),r["ɵɵtext"](1,"\n                            profileRegistration.submit.label\n                        "),r["ɵɵelementEnd"]())}const Z=function(e){return{"two-columns":e}};function X(e,t){if(1&e){const e=r["ɵɵgetCurrentView"]();r["ɵɵelementStart"](0,"div",1),r["ɵɵtext"](1,"\n            "),r["ɵɵtemplate"](2,V,6,4,"figure",2),r["ɵɵtext"](3,"\n            "),r["ɵɵtemplate"](4,z,6,7,"figure",3),r["ɵɵtext"](5,"\n            "),r["ɵɵelementStart"](6,"form",4),r["ɵɵlistener"]("ngSubmit",(function(){return r["ɵɵrestoreView"](e),r["ɵɵnextContext"]().submit()})),r["ɵɵtext"](7,"\n                "),r["ɵɵtemplate"](8,q,7,0,"figure",5),r["ɵɵtext"](9,"\n                "),r["ɵɵelementStart"](10,"bx-form-group",6),r["ɵɵpipe"](11,"bxTranslationKeys"),r["ɵɵtext"](12,"\n                "),r["ɵɵelementEnd"](),r["ɵɵtext"](13,"\n                "),r["ɵɵtemplate"](14,$,14,2,"div",7),r["ɵɵtext"](15,"\n                "),r["ɵɵelementStart"](16,"div",8),r["ɵɵtext"](17,"\n                    "),r["ɵɵtemplate"](18,J,4,0,"figure",9),r["ɵɵtext"](19,"\n                    "),r["ɵɵelementStart"](20,"button",10),r["ɵɵtext"](21,"\n                        "),r["ɵɵtemplate"](22,K,2,0,"span",11),r["ɵɵtext"](23,"\n                        "),r["ɵɵtemplate"](24,Y,2,0,"span",11),r["ɵɵtext"](25,"\n                    "),r["ɵɵelementEnd"](),r["ɵɵtext"](26,"\n                "),r["ɵɵelementEnd"](),r["ɵɵtext"](27,"\n            "),r["ɵɵelementEnd"](),r["ɵɵtext"](28,"\n        "),r["ɵɵelementEnd"]()}if(2&e){const e=r["ɵɵnextContext"]();r["ɵɵadvance"](2),r["ɵɵproperty"]("ngIf",e.duplicateSignupAttempted),r["ɵɵadvance"](2),r["ɵɵproperty"]("ngIf",e.referralName),r["ɵɵadvance"](2),r["ɵɵproperty"]("formGroup",e.formGroup)("ngClass",r["ɵɵpureFunction1"](17,Z,e.formHasTwoColumns)),r["ɵɵadvance"](2),r["ɵɵproperty"]("ngIf",e.isPhoneInvalid),r["ɵɵadvance"](2),r["ɵɵproperty"]("model",r["ɵɵpipeBind2"](11,14,e.formModel,"profileRegistration"))("controlGroup",e.formGroup),r["ɵɵadvance"](4),r["ɵɵproperty"]("ngIf",e.existTermsConditions),r["ɵɵadvance"](4),r["ɵɵproperty"]("ngIf",e.processingCall&&e.phoneTypeValidationEnabled),r["ɵɵadvance"](2),r["ɵɵclassProp"]("full-opacity",e.registrationConfig.joinButtonFullOpacity),r["ɵɵproperty"]("disabled",e.processingCall),r["ɵɵadvance"](2),r["ɵɵproperty"]("ngIf",e.isPhoneInvalid),r["ɵɵadvance"](2),r["ɵɵproperty"]("ngIf",!e.isPhoneInvalid)}}const Q="phoneTypeValidationEnabled";let ee=o=class{constructor(e,t,i,o,n,r,s,a,l,c,d,p,h,u,f,m,g,v,b,C){this.formService=e,this.formBuilder=t,this.registrationService=i,this.translateService=o,this.toastNotificationService=n,this.analyticsService=r,this.deviceProtectService=s,this.profileRegistrationFormGeneratorService=a,this.profileRegistrationFormMapper=l,this.registrationConfig=d,this.siteConfigService=p,this.profileFormService=h,this.profileStore=u,this.overlay=f,this.storageService=m,this.affiliateService=g,this.phoneValidationService=b,this.changeDetectorRef=C,this.CUSTOMERID_KEY="customerId",this.formConfiguration$=new x.ReplaySubject(1),this.formModel=new P.f({id:"",elements:{}}),this.processingCall=!1,this.duplicateSignupAttempted=!1,this.formIteractionSent=!1,this.errorProcessed=!1,this.isPhoneInvalid=!1,this.phoneTypeValidationEnabled=!1,this.publishNotification=e=>this.toastNotificationService.add(e),this.closeNotification=()=>this.toastNotificationService.close(),this.toLoadingNotification=e=>this.toNotification("loading",e,0,2e3),v.resolve(c).subscribe((({registration:e,referral:t})=>{const i=e.formConfiguration;if(t){let e=t.referralData;e&&(this.referralName=e.firstName?e.firstName:e.username,i.referrerEmail=e.email)}this.formConfiguration$.next(i)})),this.postCFUrl=c.snapshot.data.postCFUrl}ngOnInit(){this.formConfiguration$.subscribe((e=>{this.formGroup=this.formBuilder.group({}),this.existTermsConditions=this.checkTermsConditions(e),this.phoneTypeValidationEnabled=this.siteConfigService.getSiteConfigProp(Q),this.phoneTypeValidationTimeout=this.siteConfigService.getSiteConfigProp("phoneTypeValidationTimeout"),this.generateForm(e),this.checkColumnsInForm(e),this.enabledBonusSelection=this.siteConfigService.getSiteConfigProp("bonusSelectionCfEnabled"),this.enabledDeferredMsg=this.siteConfigService.getSiteConfigProp("conversionFunnelDeferredMsgEnabled"),this.profileFormService.getRefreshFormEvent().subscribe((e=>{this.refreshForm(e)})),this.deviceProtectService.generateBlackBox(),this.phoneTypeValidationEnabled&&this.forcePhoneNumberIfMaxAttemptReached()}))}ngOnDestroy(){this.retrievePhoneValidationStatus&&this.retrievePhoneValidationStatus.unsubscribe()}ngAfterViewInit(){}submit(){if(this.track("user_click_submit"),this.formGroup.valid){if(this.processingCall)return;this.processingCall=!0,this.formService.formDataTrim(this.formGroup.value);let e=this.phoneTypeValidationEnabled&&this.phoneValidationService.hasReachedMaxPhoneAttempts();e&&this.formGroup.get("phone.phoneNumber").enable({emitEvent:!1});let t=this.profileRegistrationFormMapper.toSignupRequest(this.formGroup.value,this.deviceProtectService.getBlackBox());e&&this.formGroup.get("phone.phoneNumber").disable({emitEvent:!1}),this.enabledBonusSelection||this.publishLoadingNotification(),this.registrationService.createProfile(t).subscribe((e=>{e.sessionId?(this.disposer=(0,E.gx)((()=>!!this.profileStore.profile.accountNumber),(()=>{this.track("success_pageview"),this.dispose(),this.storageService.set(this.CUSTOMERID_KEY,this.profileStore.profile.accountNumber)})),this.affiliateService.removeAffiliateReferringCookies(),this.phoneValidationService.clearPhoneAttemptsDataFromLocalStorage(),this.publishRegistrationSuccess(e.sessionId,t.nickname||t.email)):this.enabledDeferredMsg?(this.registrationService.sendDuplicatedEmailEvent(),this.closeNotification()):(this.publishRegistrationDeferred(),this.closeDialog())}),(e=>{this.publishRegistrationFailure(e),this.errorProcessed?this.errorProcessed=!1:this.trackError(e)}))}else this.markAsTouched(this.formGroup),this.publishInvalidFormFailure(),this.trackError({message:"form validation error"})}refreshForm(e){let t=this.formGroup.value;this.existTermsConditions=this.checkTermsConditions(e),this.generateForm(e),setTimeout((()=>{Object.keys(t).forEach((e=>{this.formGroup.controls[e]&&this.formGroup.controls[e].patchValue(t[e])}))}))}publishLoadingNotification(){this.translateService.translate("profileRegistration.loading_message").pipe((0,I.map)(this.toLoadingNotification)).subscribe((e=>this.publishNotification(e)))}publishRegistrationSuccess(e,t){this.translateService.translate("profileRegistration.success_message",{name:t}).pipe((0,I.map)(this.toSuccessNotification(e))).subscribe((e=>this.publishNotification(e)))}publishRegistrationDeferred(){this.translateService.translate("profileRegistration.deferred_message").pipe((0,I.map)(this.toDeferredNotification())).subscribe((e=>this.publishNotification(e)))}checkTermsConditions(e){return this.existTermsConditions=Array.isArray(e.fields)&&e.fields.indexOf(F.nk)>=0}publishRegistrationFailure(e){let t=e.status,i=e.error;404===t&&"RELATED_PROFILE_ID_NOT_FOUND"===i.errorCode?(this.formGroup.controls.relatedAccount.setErrors({notFoundRelatedAccount:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):409===t&&"DUPLICATE_SIGNUP_ATTEMPTED"===i.errorCode?(this.duplicateSignupAttempted=!0,this.processingCall=!1,this.closeNotification()):409===t&&"PROFILE_ALREADY_EXISTS"===i.errorCode&&i.message==="duplicated_"+w.u.USERNAME?(this.formGroup.controls[w.u.USERNAME].setErrors({alreadyTaken:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):409===t&&"DUPLICATED_PHONE"===i.errorCode?(this.formGroup.controls.phone.controls.phoneNumber.setErrors({phoneDuplicated:!0}),this.markAsTouched(this.formGroup),this.trackError({message:"phone_number_is_already_associated_with_another_account"}),this.errorProcessed=!0,this.processingCall=!1,this.closeNotification()):412===t&&"RELATED_PROFILE_ID_INVALID"===i.errorCode?(this.formGroup.controls.relatedAccount.setErrors({duplicatedAssociation:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):412===t&&"PRECONDITION_FAILED"===i.errorCode?(this.formGroup.controls.instantMessageSelector.controls.username.setErrors({pattern:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1,this.closeNotification()):this.translateService.translate("profileRegistration.error_message").pipe((0,I.map)(this.toErrorNotification())).subscribe((e=>this.publishNotification(e)))}publishInvalidFormFailure(){this.translateService.translate("profileRegistration.error_message_invalid").pipe((0,I.map)(this.toErrorNotification())).subscribe((e=>this.publishNotification(e)))}toErrorNotification(){return e=>{let t=this.toNotification("error",e);return t.onRemove=()=>{this.processingCall=!1},t}}toSuccessNotification(e){return t=>{let i=this.toNotification("success",t);return this.publishRegistrationEvent(e),i.onRemove=()=>{this.processingCall=!1},i}}toDeferredNotification(){return e=>{let t=this.toNotification("success",e);return t.onRemove=()=>{this.processingCall=!1},t}}toNotification(e,t,i=3e3,o=0){return{msg:t,modal:!0,type:e,timeout:i,delay:o}}publishRegistrationEvent(e){this.registrationService.publishRegistrationEvent(new O.Yc(e,this.postCFUrl))}markAsTouched(e){e instanceof s.FormGroup||e instanceof s.FormArray?Object.keys(e.controls).map((t=>this.markAsTouched(e.get(t)))):e.markAsTouched()}track(e){this.analyticsService.sendEvent("pageUpdate",this.formModel.id+":"+e.toString(),!0,null)}trackError(e){let t={1:e.message||e.toString()};this.analyticsService.sendEvent("click",this.formModel.id+"_error",!0,t,{contentId:this.formModel.id+":error"})}generateForm(e){e.phoneTypeValidationEnabled=this.phoneTypeValidationEnabled;let t=this.profileRegistrationFormGeneratorService.generate(o.formId,e);this.formGroup=this.formService.createFormControl(t),this.formModel=t,this.formGroup.valueChanges.subscribe((()=>{this.formGroup.touched&&!this.formIteractionSent&&(this.formIteractionSent=!0,this.track("form_interaction"))})),this.phoneTypeValidationEnabled&&this.checkPhoneValidation()}checkColumnsInForm(e){this.formHasTwoColumns=this.profileRegistrationFormGeneratorService.formHasTwoColumns(e)}dispose(){this.disposer&&this.disposer()}closeDialog(){this.overlay.closeOverlay()}checkPhoneValidation(){this.formGroup.controls.phone&&this.formGroup.controls.phone.statusChanges.subscribe((e=>{let t=this.formGroup.controls.phone.value.phoneNumber;if(!this.processingCall&&"VALID"===e&&this.phoneValidationService.updatePhoneAttempts(t)){this.processingCall=!0,this.formGroup.get("phone.phoneNumber").disable({emitEvent:!1});let e=setTimeout((()=>{this.processingCall=!1,this.enablePhoneNumberWhenMaxAttemptHasBeenReached()}),this.phoneTypeValidationTimeout);this.retrievePhoneValidationStatus&&this.retrievePhoneValidationStatus.unsubscribe(),this.retrievePhoneValidationStatus=this.phoneValidationService.getPhoneValidationStatus(this.formGroup.controls.phone.value.phoneNumber).pipe((0,I.take)(1)).subscribe((t=>{clearTimeout(e),this.processingCall=!1,this.enablePhoneNumberWhenMaxAttemptHasBeenReached(),this.isPhoneInvalid=t.phoneStatus===f.k.INVALID,this.storageService.set("phoneStatus",t.phoneStatus)}))}}))}forcePhoneNumberIfMaxAttemptReached(){!this.phoneValidationService.hasPhoneExpirationTimeReached()&&this.phoneValidationService.hasReachedMaxPhoneAttempts()&&(this.changeDetectorRef.detectChanges(),this.formGroup.get("phone.phoneNumber").patchValue(this.phoneValidationService.getLastPhoneNumberAttempt()),this.formGroup.get("phone.phoneNumber").disable({emitEvent:!1}),this.enablePhoneNumberAfterExpirationTime())}enablePhoneNumberAfterExpirationTime(){setTimeout((()=>{this.phoneValidationService.clearPhoneAttemptsDataFromLocalStorage(),this.formGroup.get("phone.phoneNumber").patchValue(""),this.formGroup.get("phone.phoneNumber").enable({emitEvent:!1}),this.changeDetectorRef.detectChanges()}),this.phoneValidationService.getPhoneExpirationTime())}enablePhoneNumberWhenMaxAttemptHasBeenReached(){this.phoneValidationService.hasReachedMaxPhoneAttempts()?this.enablePhoneNumberAfterExpirationTime():this.formGroup.get("phone.phoneNumber").enable({emitEvent:!1})}};ee.formId="registration",ee.ɵfac=function(e){return new(e||ee)(r["ɵɵdirectiveInject"](y.o),r["ɵɵdirectiveInject"](s.FormBuilder),r["ɵɵdirectiveInject"](O.H8),r["ɵɵdirectiveInject"](v.s),r["ɵɵdirectiveInject"](C.i),r["ɵɵdirectiveInject"](h.y),r["ɵɵdirectiveInject"](S.Xp),r["ɵɵdirectiveInject"](A.N),r["ɵɵdirectiveInject"](k.c),r["ɵɵdirectiveInject"](a.ActivatedRoute),r["ɵɵdirectiveInject"](_.M),r["ɵɵdirectiveInject"](g.r),r["ɵɵdirectiveInject"](T.m),r["ɵɵdirectiveInject"](N.s),r["ɵɵdirectiveInject"](b.Bs),r["ɵɵdirectiveInject"](u.z),r["ɵɵdirectiveInject"](l.Cw),r["ɵɵdirectiveInject"](M.E),r["ɵɵdirectiveInject"](m.j),r["ɵɵdirectiveInject"](r.ChangeDetectorRef))},ee.ɵcmp=r["ɵɵdefineComponent"]({type:ee,selectors:[["bx-profile-registration-form"]],decls:3,vars:1,consts:[["class","registration",4,"ngIf"],[1,"registration"],["class","custom-notification alert info",4,"ngIf"],["role","alert","class","raf custom-notification alert info high-contrast",4,"ngIf"],[3,"formGroup","ngClass","ngSubmit"],["class","custom-notification alert warning",4,"ngIf"],[3,"model","controlGroup"],["class","footnote",4,"ngIf"],[1,"full-width-ctas"],["class","loading-spinner",4,"ngIf"],["type","submit","id","registration-submit",1,"custom-cta","primary","cta-large",3,"disabled"],[3,"bxTranslate",4,"ngIf"],[1,"custom-notification","alert","info"],[1,"icon","icon-info"],[3,"bxTranslate"],["role","alert",1,"raf","custom-notification","alert","info","high-contrast"],[1,"custom-notification","alert","warning"],[1,"icon","icon-warning"],[1,"bx-truncate",3,"bxTranslate"],[1,"footnote"],[1,"custom-link",3,"routerLink","bxTranslate"],[1,"loading-spinner"],[1,"icon","icon-loading"]],template:function(e,t){1&e&&(r["ɵɵtext"](0,"\n        "),r["ɵɵtemplate"](1,X,29,19,"div",0),r["ɵɵtext"](2,"\n    ")),2&e&&(r["ɵɵadvance"](1),r["ɵɵproperty"]("ngIf",t.formGroup))},directives:[R.NgIf,s["ɵNgNoValidate"],s.NgControlStatusGroup,s.FormGroupDirective,R.NgClass,j.E,G.P,a.RouterLinkWithHref],pipes:[U.o],styles:["[_nghost-%COMP%]     .registration h2.h2-heading {\n  padding-top: .875rem;\n  padding-bottom: .5rem; }\n\n[_nghost-%COMP%]     .registration .field-alone {\n  display: block;\n  clear: both; }\n\n[_nghost-%COMP%]     .registration .field-left, [_nghost-%COMP%]     .registration .field-right {\n  display: block;\n  float: left;\n  width: calc(50% - 10px); }\n\n[_nghost-%COMP%]     .registration .field-left label, [_nghost-%COMP%]     .registration .field-right label {\n    white-space: nowrap;\n    overflow: hidden; }\n\n[_nghost-%COMP%]     .registration .field-left {\n  margin-right: 10px;\n  clear: left; }\n\n[_nghost-%COMP%]     .registration .field-right {\n  margin-left: 10px;\n  clear: right; }\n\n[_nghost-%COMP%]     .registration .field-right.field-alone {\n    margin-left: calc(50% + 10px); }\n\n[_nghost-%COMP%]     .registration .field-alone {\n  clear: both; }\n\n[_nghost-%COMP%]     .registration .phone-group.field-right .phone-number, [_nghost-%COMP%]     .registration .phone-group.field-left .phone-number {\n  margin-left: 50px; }\n\n[_nghost-%COMP%]     .registration .phone-invalid {\n  font-weight: bold;\n  color: red; }\n\n[_nghost-%COMP%]     .registration .custom-notification.alert.warning {\n  margin-bottom: 2em; }\n\n[_nghost-%COMP%]     .registration .loading-spinner {\n  margin-bottom: 1em; }"]}),(0,n.__decorate)([(0,p.uh)("registration:form_view",!0),(0,n.__metadata)("design:type",Function),(0,n.__metadata)("design:paramtypes",[]),(0,n.__metadata)("design:returntype",void 0)],ee.prototype,"ngAfterViewInit",null),ee=o=(0,n.__decorate)([(0,c.DE)({name:"Profile Registration form Functional Placeholder",matcher:e=>e.contentType===d.z.FUNCTIONAL&&e.fields.tags&&e.fields.tags.split(",").indexOf("joinform")>=0}),(0,n.__metadata)("design:paramtypes",[y.o,s.FormBuilder,O.H8,v.s,C.i,h.y,S.Xp,A.N,k.c,a.ActivatedRoute,_.M,g.r,T.m,N.s,b.Bs,u.z,l.Cw,M.E,m.j,r.ChangeDetectorRef])],ee)},42590:(e,t,i)=>{i.d(t,{N:()=>d});var o=i(57826),n=i(91934),r=i(95111),s=i(75532),a=i(12353),l=i(30331),c=i(60763);let d=(()=>{class e extends s.U{constructor(e,t,i){super(e,t),this.injector=e,this.deviceService=t,this.registrationConfig=i}applyCustomization(e,t,i,o,r){switch(t){case a.sN:let s=new n.R({id:`${e}-nameFieldSet`,layoutClass:"formFieldset",legendClass:this.registrationConfig.hideLegend?"hidden":"formLegend",elements:{}});return s.elements[t]=i,{fieldId:"nameFieldSet",formElement:s};case a.ci:let l=i;return this.registrationConfig.transparentPhonePrefix&&(l.elements.phonePrefix.layoutClass+=" transparent-background"),o.phoneValidationEnabled&&(l.elements.phoneNumber.info="profileFields.phone.duplicated_msg"),r&&(l.layoutClass+=" "+r.layoutClass),o.phoneTypeValidationEnabled&&l.elements.phoneNumber instanceof c.b&&(l.elements.phoneNumber.updateOn="blur"),{fieldId:t,formElement:l};default:return super.applyCustomization(e,t,i,o,r)}}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](o.Injector),o["ɵɵinject"](r.U),o["ɵɵinject"](l.M))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},80298:(e,t,i)=>{i.d(t,{c:()=>c});var o=i(68321),n=i(12353),r=i(24426),s=i(28019),a=i(9253),l=i(57826);let c=(()=>{class e{constructor(e,t){this.profileDateService=e,this.metadataMapperService=t,this.phoneNumber="phoneNumber",this.postalCode="postalCode",this.city="city",this.subdivision="subdivision"}toSignupRequest(e,t){let i=r(e);if(i[n.c_]&&(i.security={password:i[n.c_]},delete i[n.c_]),i[n.Bb]&&(i.birthdate=this.profileDateService.parseDateToBackend(i[n.Bb]),delete i[n.Bb]),i.attributes=new o.m(""),i[n.Qi]&&(i.attributes.currency=i[n.Qi].currency,delete i[n.Qi]),i[n.P_]&&(i.attributes.pin_code=i[n.P_],delete i[n.P_]),i[n.HV]&&delete i[n.HV],i[n.ci]){let e=i[n.ci][this.phoneNumber];i[n.ci]=e}return i[n.Rp]&&(i.address={postalCode:i[n.Rp][this.postalCode]},i[n.Rp][this.city]&&(i.address.city=i[n.Rp][this.city]),i[n.Rp][this.subdivision]&&(i.address.subdivision=i[n.Rp][this.subdivision]),delete i[n.Rp]),i[n.Fj]&&(i.address||(i.address={}),i.address.addressLine=i[n.Fj],delete i[n.Fj]),i[n.nJ]&&(i.address||(i.address={}),i.address.countryCode=i[n.nJ].country,delete i[n.nJ]),t&&(i.encodedBlackBox=t),this.metadataMapperService.fillMetadataFields(i),i[n.oi]&&delete i[n.oi],i[n.ix]&&(i.sourceProfileId=i[n.ix],delete i[n.ix]),i}}return e.ɵfac=function(t){return new(t||e)(l["ɵɵinject"](s.f),l["ɵɵinject"](a.p))},e.ɵprov=l["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},8468:(e,t,i)=>{i.d(t,{X:()=>d}),i(73753);var o=i(67198),n=i(59288),r=i(9180),s=i(44382),a=i(42998),l=i(68423),c=i(57826);let d=(()=>{class e{constructor(e,t,i,o){this.profileFormService=e,this.siteConfigService=t,this.browserStorageService=i,this.analyticsService=o}resolve(e){return this.profileFormService.loadRegistrationForm().pipe((0,a.map)((e=>(this.isDefined(e.bonusSelectionCfEnabled)&&(this.siteConfigService.setBonusSelectionCfEnabled(e.bonusSelectionCfEnabled),this.browserStorageService.set(o.HE,String(e.bonusSelectionCfEnabled))),e.abtStudies&&(this.browserStorageService.set(o.be,JSON.stringify(e.abtStudies)),this.analyticsService.updateAbtStudy()),{formConfiguration:e}))))}isDefined(e){return void 0!==e}}return e.ɵfac=function(t){return new(t||e)(c["ɵɵinject"](l.m),c["ɵɵinject"](s.r),c["ɵɵinject"](r.z),c["ɵɵinject"](n.y))},e.ɵprov=c["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},36074:(e,t,i)=>{i.d(t,{S:()=>s});var o=i(64762),n=i(52661),r=i(57826);let s=class extends n.W{};s.ɵfac=function(){let e;return function(t){return(e||(e=r["ɵɵgetInheritedFactory"](s)))(t||s)}}(),s.ɵprov=r["ɵɵdefineInjectable"]({token:s,factory:s.ɵfac}),s=(0,o.__decorate)([(0,n.U)(["profileFields","profileRegistration","countries"])],s)},69566:(e,t,i)=>{i.d(t,{E:()=>d});var o=i(4309),n=i(42998),r=i(31829),s=i(8468),a=i(36074),l=i(76651),c=i(57826);let d=(()=>{class e{constructor(e,t,i,o){this.profileRegistrationFormResolver=e,this.referrerEmailFieldResolver=t,this.profileRegistrationFormTranslationsResolver=i,this.profileRegistrationContentResolver=o}resolve(e){const{registration:t,referral:i,translations:r,marketingPage:s}=e.snapshot.data;return(0,o.forkJoin)({registration:this.resolveIfUndefined(t,(()=>this.profileRegistrationFormResolver.resolve(e.snapshot))),referral:this.resolveIfUndefined(i,(()=>this.referrerEmailFieldResolver.resolve(e.snapshot))),translations:this.resolveIfUndefined(r,(()=>this.profileRegistrationFormTranslationsResolver.resolve(e.snapshot))),marketingPage:this.resolveIfUndefined(s,(()=>this.profileRegistrationContentResolver.resolve()))}).pipe((0,n.map)(Object.assign.bind(null,e.snapshot.data)))}resolveIfUndefined(e,t){return void 0===e?t():(0,o.of)(e)}}return e.ɵfac=function(t){return new(t||e)(c["ɵɵinject"](s.X),c["ɵɵinject"](l.w),c["ɵɵinject"](a.S),c["ɵɵinject"](r.J))},e.ɵprov=c["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},76651:(e,t,i)=>{i.d(t,{w:()=>p});var o=i(73753),n=i(4309),r=i(42998),s=i(77602),a=i(85709),l=i(9180),c=i(44382),d=i(57826);let p=(()=>{class e{constructor(e,t,i,o){this.referralService=e,this.browserStorageService=t,this.siteConfigService=i,this.router=o}resolve(e){let t=this.browserStorageService.get(a.EI);return t?this.referralService.getEmailFromTrackingCode(t).pipe((0,r.map)((e=>this.storeReferralAffiliateTypeKey(t,e))),(0,r.catchError)((e=>(this.markAsAffiliateIfCodeIsNotRaf(t),(0,n.of)(null))))):(0,n.of)(null)}storeReferralAffiliateTypeKey(e,t){return t?this.siteConfigService.evalFeature(a.AB)?(this.browserStorageService.set(a.HM,a.g3),{referralData:t}):void this.router.navigate([a.wF]):(this.markAsAffiliateIfCodeIsNotRaf(e),null)}markAsAffiliateIfCodeIsNotRaf(e){this.isRafSharingMethod()||this.isTrackingCodeWithRafFormat(e)||this.browserStorageService.set(a.HM,a.as)}isRafSharingMethod(){const e=this.browserStorageService.get(a.jj);return e&&e.startsWith("raf")}isTrackingCodeWithRafFormat(e){return e&&e.startsWith("P")&&e.length<10}}return e.ɵfac=function(t){return new(t||e)(d["ɵɵinject"](s.C),d["ɵɵinject"](l.z),d["ɵɵinject"](c.r),d["ɵɵinject"](o.Router))},e.ɵprov=d["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},44773:(e,t,i)=>{i.d(t,{z:()=>a});var o=i(44382),n=i(47052),r=i(57826);const s="SPORTS";let a=(()=>{class e{constructor(e,t){this.siteConfigService=e,this.oddsSelectorService=t,this.initSportsEnabled()}initSportsEnabled(){const e=[].concat(this.siteConfigService.getSiteConfigProp("products")),t=[].concat(this.siteConfigService.getSiteConfigProp("disabledMultiproducts"));this.isSportsEnabled=e.includes(s)&&!t.includes(s)}getSelectedFormat(){return this.oddsSelectorService.selectedOddFormat}getOddsFormats(){return this.oddsSelectorService.getOddsFormats()}showOddsFormat(){return!!this.oddsSelectorService&&this.isSportsEnabled}saveOddsFormat(e){this.oddsSelectorService.saveOddsFormat(e)}}return e.ɵfac=function(t){return new(t||e)(r["ɵɵinject"](o.r),r["ɵɵinject"](n.J,8))},e.ɵprov=r["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},48443:(e,t,i)=>{i.d(t,{fh:()=>Se});var o=i(57826),n=i(40475),r=i(73753),s=i(43591),a=i(83274),l=i(90138),c=i(22057),d=i(78693),p=i(44382),h=i(48661),u=i(41039),f=i(83921),m=i(50437),g=i(24426),v=i(11607),b=i(65299),C=i(84956),S=i(91886),y=i(12495),P=i(10693),E=i(60703),x=i(4309),I=i(42998),F=i(97762),T=i(17070),w=i(20561),N=i(72465),A=i(74923),k=i(12353),M=i(80951),O=i(70547),_=i(60766),R=i(17294),j=i(44773),G=i(80183),U=i(6028),D=i(48510),L=i(37690),V=i(4295);const H=["Not selected","Anytime","Daily","Weekly","Fortnightly","Monthly","No Contact"];var B=i(31264),z=i(47723),q=i(6856),W=i(60567),$=i(9601),J=i(2987),K=i(69535),Y=i(61627),Z=i(1541),X=i(73225),Q=i(84881),ee=i(68842),te=i(13965);function ie(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"div",8),o["ɵɵtext"](1,"\n                    "),o["ɵɵelementStart"](2,"bx-pin-code",9),o["ɵɵlistener"]("amountOfDigitsEntered",(function(t){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().onPinCodeInputChanged(t)})),o["ɵɵtext"](3,"\n                    "),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n                "),o["ɵɵelementEnd"]()}if(2&e){const e=o["ɵɵnextContext"]();o["ɵɵadvance"](2),o["ɵɵproperty"]("errorMessage",e.pinCodeFieldErrorMessage)("hidePinCodeEye",e.pinCodeOperationConfig.hidePinCodeEye)("alwaysShowPinCode",e.pinCodeOperationConfig.alwaysShowPinCode)("showPinCodeLegend",e.pinCodeOperationConfig.showPinCodeLegend)("showPinCodeInfoTooltip",e.pinCodeOperationConfig.showPinCodeInfoTooltip)("fieldLabel","pinCodeOperations.overlay.updateProfile.actual.pin")}}const oe=function(e){return{attempts:e}},ne=function(e,t){return{tag:"textContent",label:e,values:t}};function re(e,t){if(1&e&&(o["ɵɵelementStart"](0,"div",10),o["ɵɵtext"](1,"\n                "),o["ɵɵelementStart"](2,"p",11),o["ɵɵtext"](3,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n            "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵadvance"](2),o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction2"](3,ne,e.errorMessage,o["ɵɵpureFunction1"](1,oe,e.errorAttempt)))}}function se(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"div"),o["ɵɵtext"](1,"\n                "),o["ɵɵelementStart"](2,"a",12),o["ɵɵlistener"]("click",(function(){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().forgotPincode()})),o["ɵɵtext"](3,"pinCodeOperations.forgot.pincode"),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n            "),o["ɵɵelementEnd"]()}}const ae=function(e){return{tag:"textContent",label:e}};let le=(()=>{class e{constructor(t,i,o,n,r,s,a){this.formBuilder=t,this.translateService=i,this.toastNotificationService=o,this.forgotPinService=n,this.pinCodeUpdateProfileConfig=r,this.updateProfilePinCodeService=s,this.siteConfigService=a,this.pinCodeDigitsEntered=0,this.showPin=!1,this.processingCall=!1,this.isForgotPinEnabled=!1,this.publishNotification=e=>this.toastNotificationService.add(e),this.toLoadingNotification=t=>e.toNotification("loading",t,0,2e3),this.pinCodeOperationConfig=this.pinCodeUpdateProfileConfig}ngOnInit(){this.isForgotPinEnabled=this.siteConfigService.evalFeature("site.config.forgot.pincode.enabled"),this.advertisement="pinCodeOperations.updateProfile.overlay.form.advertisement",this.createForm()}createForm(){this.pinCodeForm=this.formBuilder.group({pinCode:this.formBuilder.control("",[n.Validators.required,n.Validators.minLength(4),n.Validators.maxLength(4)])}),this.showPin=!0}forgotPincode(){this.forgotPinService.requestForgotPin().subscribe((()=>{}),(()=>{this.errorMessage="pinCodeOperations.form.error.something.wrong"}))}verifyPinCode(){let t=this.pinCodeForm.value.pinCode;if(this.pinCodeForm.valid&&!this.newPinCodeFieldErrorMessage){if(this.processingCall)return;this.processingCall=!0,this.resetErrors(),this.translateService.translate("pinCodeOperations.loading").pipe((0,I.map)(this.toLoadingNotification)).subscribe((e=>this.publishNotification(e))),this.updateProfilePinCodeService.verifyPin(t).subscribe((e=>{this.toastNotificationService.close(),this.toastNotificationService.doClose.subscribe((()=>{this.processingCall=!1}))}),(e=>{if(this.processingCall=!1,this.toastNotificationService.close(),403==e.status){let t=e.error;if(t.errors&&t.errors.length){let e=t.errors.find((e=>{if("remainingAttempts"===e.field)return!0}));1==e.value?this.errorMessage="pinCodeOperations.forceUpdate.form.error.pin.code.lastAttempt":(this.errorMessage="pinCodeOperations.updateProfile.form.error.pin.code.leftAttempts",this.errorAttempt=e.value)}else this.errorMessage="pinCodeOperations.forceUpdate.form.error.login.attempt.timeout"}else 423==e.status?this.errorMessage="pinCodeOperations.updateProfile.form.error.account.blocked":this.errorMessage="pinCodeOperations.form.error.something.wrong"}))}else e.areAllDigitsEntered(t)?"pinCodeOperations.form.error.pin.code.required"===this.pinCodeFieldErrorMessage&&(this.pinCodeFieldErrorMessage=null):this.pinCodeFieldErrorMessage="pinCodeOperations.form.error.pin.code.required",this.errorMessage="pinCodeOperations.form.error.fields.in.red"}resetErrors(){this.errorMessage=null,this.pinCodeFieldErrorMessage=null}onPinCodeInputChanged(e){this.pinCodeDigitsEntered=e}shouldHideSubmitButton(){return this.pinCodeOperationConfig.autoHideSubmitButton&&!(this.pinCodeDigitsEntered==ee.b.PIN_DIGITS)}static areAllDigitsEntered(e){return e&&e.length==ee.b.PIN_DIGITS}static toNotification(e,t,i=3e3,o=0){return{msg:t,modal:!0,type:e,timeout:i,delay:o}}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵdirectiveInject"](n.FormBuilder),o["ɵɵdirectiveInject"](h.s),o["ɵɵdirectiveInject"](te.i),o["ɵɵdirectiveInject"](F.k),o["ɵɵdirectiveInject"](Y.S),o["ɵɵdirectiveInject"](L.a),o["ɵɵdirectiveInject"](p.r))},e.ɵcmp=o["ɵɵdefineComponent"]({type:e,selectors:[["bx-pin-code-update-profile-form"]],decls:22,vars:10,consts:[["novalidate","",3,"formGroup","submit"],[1,"pin-code-form"],[1,"align-left",3,"bxTranslate"],["id","pinCodeDiv",4,"ngIf"],["class","custom-field invalid-field",4,"ngIf"],[4,"ngIf"],[1,"full-width-ctas"],["type","submit",1,"custom-cta","primary","cta-large",3,"disabled","bxTranslate"],["id","pinCodeDiv"],["formControlName","pinCode",3,"errorMessage","hidePinCodeEye","alwaysShowPinCode","showPinCodeLegend","showPinCodeInfoTooltip","fieldLabel","amountOfDigitsEntered"],[1,"custom-field","invalid-field"],[1,"error-msg",3,"bxTranslate"],["id","forgot-pincode",1,"custom-link",3,"bxTranslate","click"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"form",0),o["ɵɵlistener"]("submit",(function(){return t.verifyPinCode()})),o["ɵɵtext"](2,"\n            "),o["ɵɵelementStart"](3,"div",1),o["ɵɵtext"](4,"\n                "),o["ɵɵelementStart"](5,"p",2),o["ɵɵtext"](6,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](7,"\n\n                "),o["ɵɵtemplate"](8,ie,5,6,"div",3),o["ɵɵtext"](9,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](10,"\n            "),o["ɵɵtemplate"](11,re,5,6,"div",4),o["ɵɵtext"](12,"\n            "),o["ɵɵtemplate"](13,se,5,0,"div",5),o["ɵɵtext"](14,"\n            "),o["ɵɵelementStart"](15,"div",6),o["ɵɵtext"](16,"\n                "),o["ɵɵelementStart"](17,"button",7),o["ɵɵtext"](18,"\n                    pinCodeOperations.form.button.update\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](19,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](20,"\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](21,"\n    ")),2&e&&(o["ɵɵadvance"](1),o["ɵɵproperty"]("formGroup",t.pinCodeForm),o["ɵɵadvance"](4),o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction1"](8,ae,t.advertisement)),o["ɵɵadvance"](3),o["ɵɵproperty"]("ngIf",t.showPin),o["ɵɵadvance"](3),o["ɵɵproperty"]("ngIf",t.errorMessage),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",t.isForgotPinEnabled&&t.showPin),o["ɵɵadvance"](2),o["ɵɵclassProp"]("invisible",t.shouldHideSubmitButton()),o["ɵɵadvance"](2),o["ɵɵproperty"]("disabled",t.processingCall))},directives:[n["ɵNgNoValidate"],n.NgControlStatusGroup,n.FormGroupDirective,$.P,q.NgIf,ee.b,n.NgControlStatus,n.FormControlName],encapsulation:2}),e})();const ce=function(e){return{tag:"textContent",label:e}};function de(e,t){if(1&e&&(o["ɵɵelementStart"](0,"h2",4),o["ɵɵtext"](1,"\n                "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction1"](1,ce,e.overlayTitle))}}function pe(e,t){if(1&e&&(o["ɵɵelementStart"](0,"h3",5),o["ɵɵtext"](1,"\n                "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵproperty"]("bxTranslate",o["ɵɵpureFunction1"](1,ce,e.overlayTitle))}}let he=(()=>{class e{constructor(e){this.pinCodeUpdateProfileConfig=e,this.pinCodeOperationConfig=this.pinCodeUpdateProfileConfig,this.overlayTitle="pinCodeOperations.updateProfile.overlay.title"}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵdirectiveInject"](Y.S))},e.ɵcmp=o["ɵɵdefineComponent"]({type:e,selectors:[["bx-pin-code-update-profile-overlay"]],decls:16,vars:3,consts:[["overlayType","medium"],[3,"closeButton"],["role","heading","class","h2-heading",3,"bxTranslate",4,"ngIf"],["role","heading","class","h1-heading",3,"bxTranslate",4,"ngIf"],["role","heading",1,"h2-heading",3,"bxTranslate"],["role","heading",1,"h1-heading",3,"bxTranslate"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"bx-overlay-container",0),o["ɵɵtext"](2,"\n            "),o["ɵɵelementStart"](3,"bx-overlay-header",1),o["ɵɵtext"](4,"\n                "),o["ɵɵtemplate"](5,de,2,3,"h2",2),o["ɵɵtext"](6,"\n                "),o["ɵɵtemplate"](7,pe,2,3,"h3",3),o["ɵɵtext"](8,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](9,"\n            "),o["ɵɵelementStart"](10,"bx-overlay-body"),o["ɵɵtext"](11,"\n                "),o["ɵɵelement"](12,"bx-pin-code-update-profile-form"),o["ɵɵtext"](13,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](14,"\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](15,"\n    ")),2&e&&(o["ɵɵadvance"](3),o["ɵɵproperty"]("closeButton",t.pinCodeOperationConfig.alwaysKeepCloseButtonHidden),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",t.pinCodeOperationConfig.headerLevel2&&t.overlayTitle),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",!t.pinCodeOperationConfig.headerLevel2&&t.overlayTitle))},directives:[Z.l,X.z,q.NgIf,Q.l,le,$.P],encapsulation:2}),e})();var ue=i(10476);function fe(e,t){1&e&&(o["ɵɵelementStart"](0,"figure",8),o["ɵɵtext"](1,"\n                "),o["ɵɵelement"](2,"i",9),o["ɵɵtext"](3,"\n                "),o["ɵɵelementStart"](4,"figcaption",10),o["ɵɵtext"](5,"profileUpdateAccount.updateBlocked"),o["ɵɵelementEnd"](),o["ɵɵtext"](6,"\n            "),o["ɵɵelementEnd"]())}const me=function(){return["updatePassword"]};function ge(e,t){if(1&e&&(o["ɵɵelementStart"](0,"bx-single-accordion",11),o["ɵɵtext"](1,"\n\n                "),o["ɵɵelementStart"](2,"bx-form-group",4),o["ɵɵpipe"](3,"bxTranslationKeys"),o["ɵɵtext"](4,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](5,"\n            "),o["ɵɵelementEnd"]()),2&e){const e=o["ɵɵnextContext"]();o["ɵɵproperty"]("title","profileUpdateAccount.accordionLabel.changePassword")("type","secondary")("inverse",!0),o["ɵɵadvance"](2),o["ɵɵproperty"]("model",o["ɵɵpipeBind2"](3,6,e.formModel,"profileUpdateAccount"))("controlGroup",e.formGroup)("filterElements",o["ɵɵpureFunction0"](9,me))}}function ve(e,t){1&e&&(o["ɵɵelementStart"](0,"div",12),o["ɵɵtext"](1,"\n                "),o["ɵɵelementStart"](2,"button",13),o["ɵɵtext"](3,"\n                    profileUpdateAccount.submit.button\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](4,"\n            "),o["ɵɵelementEnd"]())}function be(e,t){if(1&e){const e=o["ɵɵgetCurrentView"]();o["ɵɵelementStart"](0,"bx-overlay",14),o["ɵɵlistener"]("close",(function(t){return o["ɵɵrestoreView"](e),o["ɵɵnextContext"]().onVerifyPinCodeOverlayClose(t)})),o["ɵɵtext"](1,"\n            "),o["ɵɵelement"](2,"bx-pin-code-update-profile-overlay"),o["ɵɵtext"](3,"\n        "),o["ɵɵelementEnd"]()}}const Ce=function(){return["general"]};class Se{constructor(e,t,i,o,n,r,s,a,l,c,d,p,h,u,f,m,g,v,b,C,S,y,P,E){this.referenceDataService=e,this.brandLanguageService=t,this.translate=i,this.formService=o,this.changeDetectionRef=n,this.profileService=r,this.toastNotificationService=s,this.languageService=a,this.notificationService=l,this.route=c,this.formGeneratorService=d,this.profileStore=p,this.profileUpdateAccountFormMapper=h,this.siteConfigService=u,this.profileOddsFormatService=f,this.updateProfilePinCodeService=m,this.forgotPinService=g,this.phoneStatusPollingService=v,this.phoneStatusStore=b,this.router=C,this.mfaProperties=S,this.phoneSubjectService=y,this.hoursGeneratorService=P,this.windowService=E,this.showChangePassword=!0,this.processingCall=!1,this.isDisplayed=!1,this.formConfiguration=this.route.snapshot.data.profileUpdate.formConfiguration,this.profile=this.route.snapshot.data.profileUpdate.profile,this.hostedPlayer=this.route.snapshot.data.profileUpdate.hostedPlayer,this.playerVerificationMethod=this.siteConfigService.getSiteConfigProp("updatePlayerVerificationMethod")}checkDisplayOfHostPreferencesFields(e){"profileUpdateAccount-hostRequested"===e.id&&this.isWantHostOptionalField()&&this.showOrHideHostPreferencesFields(e.checked)}showOrHideHostPreferencesFields(e){Se.HOST_PREFERENCES_FIELD_HTML_IDS.forEach((t=>this.showOrHideHostPreferencesField(t,e)))}showOrHideHostPreferencesField(e,t){const i=this.windowService.document().getElementById(e);if(i){const e=t?"inherit":"none";i.parentElement.parentElement.style.display=e}}ngOnDestroy(){this.profileInputPasswordSubscription&&this.profileInputPasswordSubscription.unsubscribe(),this.profileUpdateSubscription&&this.profileUpdateSubscription.unsubscribe()}ngOnInit(){this.hasMfaVerificationEnabled=this.mfaProperties.hasOperationEnabled("updateProfile"),this.formModel=this.formGeneratorService.generate(Se.formId,this.formConfiguration,this.profile),this.formGroup=this.formService.createFormControl(this.formModel);const e=this.profileUpdateAccountFormMapper.buildFormValues(this.profile,this.hostedPlayer);this.fillValues(e),this.getTranslations("profileUpdateAccount").subscribe((t=>this.fillAndPatchTranslatedFields(t,e))),this.showChangePassword=!this.hasChangePasswordMenuItem(),this.ensureAllowUpdate(),this.profileStore.getProfile().subscribe((e=>{this.route.snapshot.data.profileUpdate.profile=e,this.profile=e,this.ensureAllowUpdate()})),this.phoneTypePollingRetries=this.siteConfigService.getSiteConfigProp("phoneTypeValidPollingRetries")}ngAfterViewInit(){this.shouldHideHostPreferences()&&this.showOrHideHostPreferencesFields(!1)}shouldHideHostPreferences(){return this.isWantHostOptionalField()&&this.isWantHostUnchecked()}isWantHostOptionalField(){return this.formConfiguration.optionalFields.includes(k.Pf)}isWantHostUnchecked(){return this.formGroup.value.wantHost&&!this.formGroup.value.wantHost.hostRequested}ensureAllowUpdate(){void 0===this.profile.allowUpdate&&(this.profile.allowUpdate=!0)}formModelContains(e){return this.formModel.elements.general&&!!this.formModel.elements.general.elements[e]}hasChangePasswordMenuItem(){return this.siteConfigService.evalFeature("site.config.item-change-password.enabled")}fillValues(e){this.fillTextValues(S(Se.DROPDOWN_VALUES,e)),this.fillDropdownValues(e)}fillTextValues(e){this.changeDetectionRef.detectChanges(),this.formGroup.patchValue(e),this.lastSavedFormValues=g(this.formGroup.value)}fillDropdownValues(e){this.formModelContains(k.ml)&&this.fillLanguage(e[k.ml]),this.formModelContains(k.c2)&&this.fillTimezone(e[k.c2]),this.formModelContains(k.Sz)&&this.fillOddsFormats(),this.formModelContains(k.CS)&&this.fillContactFrequency(e[k.CS]),this.formModelContains(k.Tk)&&this.fillHourPicker(k.Tk,e[k.Tk]),this.formModelContains(k.pb)&&this.fillHourPicker(k.pb,e[k.pb])}fillLanguage(e){this.translateLanguages(this.brandLanguageService.getAvailableLanguages()).subscribe((t=>{let i=this.formModel.elements.general.elements[k.ml];t.forEach((e=>i.options.push({code:e.code,name:e.label}))),this.formGroup.patchValue({[k.ml]:e}),this.lastSavedFormValues=g(this.formGroup.value)}))}translateLanguages(e){return(0,x.forkJoin)(e,this.getTranslations(l.S),((e,t)=>(e.map((e=>e.label=t[l.S+"."+e.code]||e.code)),e)))}getTranslations(e){return this.translate.loadTranslations(e).pipe((0,I.first)((e=>e&&Object.keys(e).length>0)))}fillTimezone(e){this.referenceDataService.getTimeZonesForThePlayer().subscribe((t=>{let i=this.formModel.elements.general.elements[k.c2];(t=P(v(E,y("name")))(t)).forEach((e=>i.options.push({code:e.code,name:e.name}))),this.formGroup.patchValue({[k.c2]:e}),this.lastSavedFormValues=g(this.formGroup.value)}))}fillOddsFormats(){this.profileOddsFormatService.getOddsFormats().subscribe((e=>{const t=this.formModel.elements.general.elements[k.Sz];e.forEach((e=>t.options.push({code:e.value,name:e.label}))),this.formGroup.patchValue({[k.Sz]:this.profileOddsFormatService.getSelectedFormat()}),this.lastSavedFormValues=g(this.formGroup.value)}))}patchFieldValue(e,t){this.changeDetectionRef.detectChanges(),this.formGroup.patchValue({[e]:t}),this.lastSavedFormValues=g(this.formGroup.value)}fillAndPatchTranslatedFields(e,t){this.formModelContains(k.zh)&&(this.fillPreferredContactMethodOptions(e),this.patchFieldValue(k.zh,t[k.zh])),this.formModelContains(k.uz)&&(this.fillAcceptsGifts(e),this.patchFieldValue(k.uz,t[k.uz]))}fillPreferredContactMethodOptions(e){const t=this.formModel.elements.general.elements[k.zh];this.formConfiguration.hostedContactMethods.forEach((i=>{const o=`profileUpdateAccount.hostPreferences.preferredContactMethod.${i}.label`;t.options.push({label:e[o]||o,brandAdminKey:i})}))}fillAcceptsGifts(e){const t=this.formModel.elements.general.elements[k.uz].elements.acceptsGiftsModel;this.populateOptionsAcceptsGifts(t,e)}populateOptionsAcceptsGifts(e,t){e.options=Se.OPTIONS_ACCEPTS_GIFTS.map((e=>({code:e,name:t[`profileUpdateAccount.general.acceptsGifts.options.${e.toLowerCase()}`]})))}fillHourPicker(e,t){const i=this.formModel.elements.general.elements[e];this.hoursGeneratorService.generate24HoursList().forEach((e=>i.options.push({value:e}))),this.formGroup.patchValue({[e]:t}),this.lastSavedFormValues=g(this.formGroup.value)}fillContactFrequency(e){const t=this.formModel.elements.general.elements[k.CS];this.getTranslations("contactFrequency").subscribe((i=>{H.forEach((e=>t.options.push({code:e,text:i[e]||e}))),this.formGroup.patchValue({[k.CS]:e}),this.lastSavedFormValues=g(this.formGroup.value)}))}checkConfirmationDialog(){if(this.lastSavedFormValues=this.copyNonEditableValues(this.lastSavedFormValues,this.formGroup.value),b(this.lastSavedFormValues,this.formGroup.value))this.displayNotification("profileUpdateAccount.success_message","success");else{this.formService.formDataTrim(this.formGroup.value);const e=this.profileUpdateAccountFormMapper.formUpdateToUpdateFormProfile(this.lastSavedFormValues,this.formGroup.value),t=this.profileUpdateAccountFormMapper.formUpdateToUpdateFormHostedPlayer(this.lastSavedFormValues,this.formGroup.value,this.isWantHostOptionalField());this.needProfileUpdateConfirmation(e)?"PASSWORD"===this.playerVerificationMethod?this.openConfirmationDialog(e,t):(this.isDisplayed=!0,this.profileUpdateSubscription=this.updateProfilePinCodeService.getVerifyPinRequested().subscribe((i=>{this.isDisplayed=!1,this.updateProfile(e,t,this.playerVerificationMethod,i)})),this.forgotPinService.getForgotPinRequested().subscribe((()=>{this.isDisplayed=!1,this.displayNotification("pinCodeOperations.updateProfile.form.email.sent","success")}))):this.updateProfile(e,t)}}copyNonEditableValues(e,t){return C({postalCode:{subdivisionStatus:()=>e.postalCode.subdivisionStatus||t.postalCode.subdivisionStatus}},e)}openConfirmationDialog(e,t){void 0!==e.newPassword?this.profileUpdateConfirmationMessage="profileUpdateConfirmation.password.title":this.profileUpdateConfirmationMessage="profileUpdateConfirmation.title",this.notificationService.open({content:D._,contentContext:{title:this.profileUpdateConfirmationMessage,message:"profileUpdateConfirmation.confirmationMsg",okButton:"profileUpdateConfirmation.ok"},modal:!0,type:"warning",showIcon:!1,customClass:"profileUpdateConfiguration"}).close.subscribe((i=>{i.proceedToUpdate&&this.updateProfile(e,t,this.playerVerificationMethod,i.password)}))}updateProfile(e,t,i,o){const n=new _.f(e,t);this.hasMfaVerificationEnabled||("PASSWORD"===i?n.security=new R.c(o):"PIN"===i&&(this.profileUpdateSubscription.unsubscribe(),n.security=new R.c(void 0,o)),this.translate.translate("profileUpdateAccount.loading").subscribe((e=>{this.toastNotificationService.add({msg:e,type:"loading",delay:2e3})}))),this.profileService.patchProfile(n).subscribe((()=>{this.formModelContains(k.Sz)&&this.profileOddsFormatService.saveOddsFormat(this.formGroup.value[k.Sz]),this.clearFields();let t=e.phoneNumber&&this.lastSavedFormValues.phoneMasked&&e.phoneNumber!=this.lastSavedFormValues.phoneMasked.phoneNumber;this.lastSavedFormValues=this.updateLastSavedFormValues(),this.handleProfileUpdateSuccess(t),t&&this.formGroup.value.phoneMasked&&this.phoneSubjectService.changePhone(this.formGroup.get("phoneMasked.phoneNumber").value),this.displayNotification("profileUpdateAccount.success_message","success",(()=>{e.attributes&&e.attributes.language&&this.languageService.setLanguage(e.attributes.language),this.phoneStatusStore.updateToNotValidated(n,(()=>this.router.navigate(["/","send-validation-code"])))})),this.formGroup.value.username&&this.formGroup.controls.username.disable()}),(e=>{if(403===e.status){let t=e.error;t&&t.errorCode&&"EMAIL_UPDATE_OPERATION_NOT_ALLOWED"===t.errorCode?this.displayNotification("profileUpdateAccount.email.blocked_change_message","warning"):"PASSWORD"===i?this.displayNotification("profileUpdateAccount.wrong_password","error"):"PIN"===i&&this.displayNotification("pinCodeOperations.updateProfile.error.wrong_password","error")}else if(409===e.status&&"DUPLICATED_PHONE"===e.error.errorCode){this.displayNotification("profileUpdateAccount.error_message","error");const e=this.formGroup.controls.phoneMasked;this.markFieldAsError(e,"phoneNumber","phoneDuplicatedUpdate");const t=this.formGroup.controls.phone;this.markFieldAsError(t,"phoneNumber","phoneDuplicatedUpdate")}else 409===e.status&&"PROFILE_ALREADY_EXISTS"===e.error.errorCode&&"duplicated_username"===e.error.message?(this.displayNotification("profileFields.username.error_alreadyTaken","error"),this.markFieldAsError(this.formGroup,"username","alreadyTaken")):this.displayNotification("profileUpdateAccount.error_message","error")}))}updateLastSavedFormValues(){if(this.shouldHideHostPreferences()){const e=this.lastSavedFormValues,t=g(this.formGroup.value);return this.overrideValue(this.formGroup.value,t,e,k.CS),this.overrideValue(this.formGroup.value,t,e,k.Tk),this.overrideValue(this.formGroup.value,t,e,k.zh),this.overrideValue(this.formGroup.value,t,e,k.pb),t}return g(this.formGroup.value)}overrideValue(e,t,i,o){e[o]&&(t[o]=i[o])}markFieldAsError(e,t,i){e.controls[t].setErrors({[i]:!0}),this.markAsTouched(this.formGroup),this.processingCall=!1}handleProfileUpdateSuccess(e){this.profileStore.refresh(),e&&this.phoneStatusPollingService.getPhoneType(1e3,this.phoneTypePollingRetries).subscribe((e=>{this.phoneStatusStore.setPhoneTypeValid(!(e==w.y.INVALID))}))}displayNotification(e,t,i){this.translate.translate(e).subscribe((e=>{this.toastNotificationService.add({msg:e,type:t,onRemove:i})}))}clearFields(){this.markAsUntouched(),this.formGroup.patchValue({newPassword:""}),this.changeDetectionRef.detectChanges()}markAsUntouched(){this.shouldHideHostPreferences()?this.markNonHostPreferencesFieldsAsUntouched():this.formGroup.markAsUntouched()}markNonHostPreferencesFieldsAsUntouched(){Object.keys(this.formGroup.controls).filter(this.skipHostPreferencesFields()).forEach((e=>this.formGroup.get(e).markAsUntouched()))}skipHostPreferencesFields(){return e=>!Se.HOST_PREFERENCES_FIELD_IDS.includes(e)}markAsTouched(e){e instanceof n.FormGroup||e instanceof n.FormArray?Object.keys(e.controls).map((t=>this.markAsTouched(e.get(t)))):e.markAsTouched()}needProfileUpdateConfirmation(e){return!this.hasMfaVerificationEnabled&&(void 0!==e.email||void 0!==e.newPassword||void 0!==e.firstName||void 0!==e.lastName||void 0!==e.birthdate||void 0!==e.phoneNumber||void 0!==e.address.city||void 0!==e.address.addressLine||void 0!==e.address.postalCode||void 0!==e.address.subdivision)}onVerifyPinCodeOverlayClose(e){event&&(this.profileUpdateSubscription.unsubscribe(),this.isDisplayed=!1)}}Se.formId="profileUpdateAccount",Se.OPTIONS_ACCEPTS_GIFTS=["YES","NO"],Se.DROPDOWN_VALUES=[k.uz,k.CS,k.Tk,k.ml,k.Sz,k.zh,k.c2,k.pb],Se.HOST_PREFERENCES_FIELD_IDS=[k.Tk,k.CS,k.zh,k.pb],Se.HOST_PREFERENCES_FIELD_HTML_IDS=[`${Se.formId}-${k.CS}`,`${Se.formId}-${k.zh}`,`${Se.formId}-hourPicker-${k.Tk}`,`${Se.formId}-hourPicker-${k.pb}`],Se.ɵfac=function(e){return new(e||Se)(o["ɵɵdirectiveInject"](d.F),o["ɵɵdirectiveInject"](a.F),o["ɵɵdirectiveInject"](h.s),o["ɵɵdirectiveInject"](m.oL),o["ɵɵdirectiveInject"](o.ChangeDetectorRef),o["ɵɵdirectiveInject"](M.H),o["ɵɵdirectiveInject"](u.il),o["ɵɵdirectiveInject"](c.T),o["ɵɵdirectiveInject"](f.d),o["ɵɵdirectiveInject"](r.ActivatedRoute),o["ɵɵdirectiveInject"](G.U),o["ɵɵdirectiveInject"](O.s),o["ɵɵdirectiveInject"](U.g),o["ɵɵdirectiveInject"](p.r),o["ɵɵdirectiveInject"](j.z),o["ɵɵdirectiveInject"](L.a),o["ɵɵdirectiveInject"](F.k),o["ɵɵdirectiveInject"](N.G),o["ɵɵdirectiveInject"](A.G),o["ɵɵdirectiveInject"](r.Router),o["ɵɵdirectiveInject"](s.K),o["ɵɵdirectiveInject"](V.$),o["ɵɵdirectiveInject"](T.E),o["ɵɵdirectiveInject"](B.u))},Se.ɵcmp=o["ɵɵdefineComponent"]({type:Se,selectors:[["bx-profile-update-account-form"]],hostBindings:function(e,t){1&e&&o["ɵɵlistener"]("change",(function(e){return t.checkDisplayOfHostPreferencesFields(e.target)}))},decls:21,vars:12,consts:[[1,"profile-settings-form",3,"formGroup","ngSubmit"],["type","text",2,"position","absolute","top","-1000px"],["type","password",2,"position","absolute","top","-1000px"],["role","alert","class","custom-notification alert info","id","profileUpdateAccount-blocked-message",4,"ngIf"],[3,"model","controlGroup","filterElements"],[3,"title","type","inverse",4,"ngIf"],["class","full-width-ctas",4,"ngIf"],[3,"close",4,"ngIf"],["role","alert","id","profileUpdateAccount-blocked-message",1,"custom-notification","alert","info"],[1,"icon","icon-info"],[3,"bxTranslate"],[3,"title","type","inverse"],[1,"full-width-ctas"],["type","submit","id","profileUpdateAccount-submit",1,"custom-cta","primary","cta-large",3,"bxTranslate"],[3,"close"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"bx-form",0),o["ɵɵlistener"]("ngSubmit",(function(){return t.checkConfirmationDialog()})),o["ɵɵtext"](2,"\n\n            "),o["ɵɵtext"](3,"\n            "),o["ɵɵelement"](4,"input",1),o["ɵɵtext"](5,"\n            "),o["ɵɵelement"](6,"input",2),o["ɵɵtext"](7,"\n\n            "),o["ɵɵtemplate"](8,fe,7,0,"figure",3),o["ɵɵtext"](9,"\n\n            "),o["ɵɵelementStart"](10,"bx-form-group",4),o["ɵɵpipe"](11,"bxTranslationKeys"),o["ɵɵtext"](12,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](13,"\n\n            "),o["ɵɵtemplate"](14,ge,6,10,"bx-single-accordion",5),o["ɵɵtext"](15,"\n\n\n            "),o["ɵɵtemplate"](16,ve,5,0,"div",6),o["ɵɵtext"](17,"\n\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](18,"\n\n        "),o["ɵɵtemplate"](19,be,4,0,"bx-overlay",7),o["ɵɵtext"](20,"\n    ")),2&e&&(o["ɵɵadvance"](1),o["ɵɵproperty"]("formGroup",t.formGroup),o["ɵɵadvance"](7),o["ɵɵproperty"]("ngIf",!t.profile.allowUpdate),o["ɵɵadvance"](2),o["ɵɵproperty"]("model",o["ɵɵpipeBind2"](11,8,t.formModel,"profileUpdateAccount"))("controlGroup",t.formGroup)("filterElements",o["ɵɵpureFunction0"](11,Ce)),o["ɵɵadvance"](4),o["ɵɵproperty"]("ngIf",t.showChangePassword),o["ɵɵadvance"](2),o["ɵɵproperty"]("ngIf",t.profile.allowUpdate),o["ɵɵadvance"](3),o["ɵɵproperty"]("ngIf",t.isDisplayed))},directives:[z.U,n.NgControlStatusGroup,n.FormGroupDirective,q.NgIf,W.E,$.P,J.g,K.B,he],pipes:[ue.o],styles:[".buttons[_ngcontent-%COMP%] {\n  width: 100%; }\n  .buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] {\n    width: 100%; }\n  @media only screen and (min-width: 769px) {\n    .buttons[_ngcontent-%COMP%] {\n      float: right;\n      width: 33.3%; } }\n  #profileUpdateAccount-blocked-message[_ngcontent-%COMP%] {\n  margin-bottom: 15px; }\n  [_nghost-%COMP%]     .custom-droplist {\n  max-height: 300px;\n  overflow-y: auto; }\n  @media only screen and (min-width: 769px) {\n    [_nghost-%COMP%]     .custom-droplist {\n      max-height: 200px; } }\n  [_nghost-%COMP%]     button.toggle-password-btn {\n  padding: 0; }\n  [_nghost-%COMP%]     button.toggle-password-btn .icon {\n    font-size: 22px; }\n  [_nghost-%COMP%]     bx-single-accordion .bx-single-accordion {\n  padding: 0 0 20px 0; }\n  [_nghost-%COMP%]     bx-single-accordion .bx-single-accordion .custom-field {\n    margin-bottom: 0; }\n  [_nghost-%COMP%]     bx-single-accordion .bx-single-accordion .custom-field .error-msg {\n      color: #da5056; }\n  @media only screen and (min-width: 769px) {\n  [_nghost-%COMP%]     .field-alone {\n    display: block;\n    clear: both; }\n  [_nghost-%COMP%]     .field-left, [_nghost-%COMP%]     .field-right {\n    display: block;\n    float: left;\n    width: calc(50% - 10px); }\n    [_nghost-%COMP%]     .field-left label, [_nghost-%COMP%]     .field-right label {\n      white-space: nowrap; }\n  [_nghost-%COMP%]     .field-left {\n    margin-right: 10px;\n    clear: left; }\n  [_nghost-%COMP%]     .field-right {\n    margin-left: 10px;\n    clear: right; }\n    [_nghost-%COMP%]     .field-right.field-alone {\n      margin-left: calc(50% + 10px); }\n  [_nghost-%COMP%]     .field-alone {\n    clear: both; } }\n  [_nghost-%COMP%]     .phone-group .phone-prefix {\n  width: 50px;\n  float: left;\n  margin-bottom: -2px; }\n  [_nghost-%COMP%]     .phone-group .phone-prefix input {\n    text-align: center;\n    padding: 14px 8px;\n    color: gray; }\n  [_nghost-%COMP%]     .phone-group .phone-prefix label {\n    background-color: #333;\n    border-color: gray; }\n  [_nghost-%COMP%]     .phone-group .phone-number {\n  margin-left: 70px; }\n  [_nghost-%COMP%]     .country {\n  margin: 10px 0;\n  text-align: right; }\n  [_nghost-%COMP%]     .country span {\n    font-size: 1.1em;\n    vertical-align: top; }\n  [_nghost-%COMP%]     .country .icon-location {\n    font-size: 1.4em; }\n  [_nghost-%COMP%]     .country-group {\n  margin-top: 5px; }\n  [_nghost-%COMP%]     .country-group .custom-field {\n    display: none; }\n  [_nghost-%COMP%]     .postalCode {\n  margin-bottom: 4px; }\n  [_nghost-%COMP%]     .city {\n  display: none; }"]})},80183:(e,t,i)=>{i.d(t,{U:()=>d});var o=i(57826),n=i(95111),r=i(50437),s=i(84956),a=i(75532),l=i(12353),c=i(44773);let d=(()=>{class e extends a.U{constructor(e,t,i){super(e,t),this.injector=e,this.deviceService=t,this.profileOddsFormatService=i}generate(e,t,i){const o=super.generate(e,this.removeOddsFormatFieldIfNotSupported(t),i);if(Object.keys(o.elements).length){const t=o.elements;o.elements={general:new r.R3({id:`${e}-data`,layoutClass:"formFieldset",legendClass:"formLegend",elements:t})}}return this.addFixedFields(e,o),o}addFixedFields(e,t){t.elements.updatePassword=this.createUpdatePasswordModel(e)}removeOddsFormatFieldIfNotSupported(e){return this.profileOddsFormatService.showOddsFormat()?e:s({fields:e=>e.map((e=>e.replace(`${l.Sz},`,"").replace(`,${l.Sz}`,"").replace(l.Sz,""))).filter((e=>!!e))},e)}applyCustomization(e,t,i,o,n){let r=super.applyCustomization(e,t,i,o,n);return t===l.Jd&&"profileUpdateAccount"==e&&(r.formElement.errorMessages.profileExists="profileUpdateAccount.general.email.error_profileExists"),t===l.ci&&o.phoneValidationEnabled&&(r.formElement.elements.phoneNumber.tapHint="profileUpdateAccount.general.phoneNumber.sms_warning"),r}createUpdatePasswordModel(e){return new r.R3({id:`${e}-optionalupdate`,layoutClass:"formFieldset",legendClass:"formLegend",elements:{newPassword:new r.bx({id:`${e}-newPassword`,layoutClass:"field-left field-alone",type:"password",validators:{minLength:8,maxLength:64,password:null}})}})}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](o.Injector),o["ɵɵinject"](n.U),o["ɵɵinject"](c.z))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},6028:(e,t,i)=>{i.d(t,{g:()=>c});var o=i(40564),n=i(72902),r=i(63253),s=i(28019);class a{constructor(e,t,i,o,n){this.isHostRequested=e,this.contactFrequency=t,this.preferredContactType=i,this.preferredContactTimeFrom=o,this.preferredContactTimeTo=n}}var l=i(57826);let c=(()=>{class e{constructor(e){this.profileDateService=e}isNotEmpty(e){return!!e&&e.trim().length>0}formUpdateToUpdateFormProfile(e,t){let i=new o.s;if(this.isNotEmpty(t.username)&&e.username!==t.username&&(i.username=t.username),this.isNotEmpty(t.email)&&e.email!==t.email&&(i.email=t.email),this.isNotEmpty(t.nickname)&&e.nickname!==t.nickname&&(i.nickname=t.nickname),this.isNotEmpty(t.firstName)&&e.firstName!==t.firstName&&(i.firstName=t.firstName),this.isNotEmpty(t.lastName)&&e.lastName!==t.lastName&&(i.lastName=t.lastName),e.dateOfBirth!==t.dateOfBirth&&(i.birthdate=this.profileDateService.parseDateToBackend(t.dateOfBirth)),this.isNotEmpty(r(["phone","phoneNumber"],t))&&r(["phone","phoneNumber"],e)!==r(["phone","phoneNumber"],t)&&(i.phoneNumber=t.phone.phoneNumber),this.isNotEmpty(r(["phoneMasked","phoneNumber"],t))&&r(["phoneMasked","phoneNumber"],e)!==r(["phoneMasked","phoneNumber"],t)&&(i.phoneNumber=t.phoneMasked.phoneNumber),this.isNotEmpty(t.newPassword)&&(i.newPassword=t.newPassword),i.attributes={},this.isNotEmpty(t.language)&&e.language!==t.language&&(i.attributes.language=t.language),this.isNotEmpty(t.timeZone)&&e.timeZone!==t.timeZone&&(i.attributes.time_zone=t.timeZone),i.address={},this.isNotEmpty(t.addressLine)&&e.addressLine!==t.addressLine&&(i.address.addressLine=t.addressLine),n("postalCode")(t)){const o=["postalCode","postalCode"];this.isNotEmpty(t.postalCode.postalCode)&&r(o,e)!==r(o,t)&&(i.address.postalCode=t.postalCode.postalCode);const s=["postalCode","subdivision"];!n("subdivision")(t)&&this.isNotEmpty(t.postalCode.subdivision)&&r(s,e)!==r(s,t)&&(i.address.subdivision=t.postalCode.subdivision);const a=["postalCode","city"];!n("city")(t)&&this.isNotEmpty(t.postalCode.city)&&r(a,e)!==r(a,t)&&(i.address.city=t.postalCode.city)}return this.isNotEmpty(t.city)&&e.city!=t.city&&(i.address.city=t.city),this.isNotEmpty(t.subdivision)&&e.subdivision!=t.subdivision&&(i.address.subdivision=t.subdivision),JSON.stringify(e.subscriptionChannels)!=JSON.stringify(t.subscriptionChannels)&&(i.subscriptionChannels=this.mapSubscriptionChannels(t.subscriptionChannels)),this.isAcceptsGiftsNotEqual(t,e)&&(i.acceptsGifts=t.acceptsGifts.acceptsGiftsModel),i}formUpdateToUpdateFormHostedPlayer(e,t,i){const o=new a;return this.areWantHostsDifferent(t.wantHost,e.wantHost)&&(o.isHostRequested=t.wantHost.hostRequested),this.shouldMapHostedPreferencesFields(t.wantHost,i)&&this.mapHostedPlayerFields(t,e,o),o}mapHostedPlayerFields(e,t,i){this.isNotEmpty(e.frequency)&&t.frequency!==e.frequency&&(i.contactFrequency=e.frequency),this.isNotEmpty(e.preferredContact)&&t.preferredContact!==e.preferredContact&&(i.preferredContactType=e.preferredContact),this.isNotEmpty(e.from)&&t.from!==e.from&&(i.preferredContactTimeFrom=e.from),this.isNotEmpty(e.to)&&t.to!==e.to&&(i.preferredContactTimeTo=e.to)}areWantHostsDifferent(e,t){return e&&(t&&e.hostRequested!==t.hostRequested||!t)}shouldMapHostedPreferencesFields(e,t){return!t||this.wantHostAllowToMapHostedPreferencesFields(e)}wantHostAllowToMapHostedPreferencesFields(e){return!e||this.wantHostIsChecked(e)}wantHostIsChecked(e){return e&&e.hostRequested}mapSubscriptionChannels(e){return Object.keys(e).filter((t=>e[t]))}buildFormValues(e,t){return Object.assign(this.profileToForm(e),this.hostedPlayerToForm(t))}profileToForm(e){return{email:e.email,phone:{phoneNumber:e.phones?e.phones[0]:void 0},phoneMasked:{phoneNumber:e.phones?e.phones[0]:void 0},username:e.username,nickname:e.nickname,firstName:e.firstName,lastName:e.lastName,dateOfBirth:this.profileDateService.parseDateFromBackend(e.birthdate),language:e.attributes?e.attributes.language:void 0,timeZone:e.attributes?e.attributes.time_zone:void 0,city:e.address&&e.address.city?e.address.city:void 0,subdivision:e.address&&e.address.subdivision?e.address.subdivision:void 0,addressLine:e.address&&e.address.addressLine?e.address.addressLine:void 0,postalCode:{postalCode:r(["address","postalCode"],e),subdivision:r(["address","subdivision"],e),city:r(["address","city"],e)},subscriptionChannels:e.subscriptionChannels,allowUpdate:!!e.allowUpdate,acceptsGifts:{acceptsGiftsModel:e.acceptsGifts}}}hostedPlayerToForm(e){return{wantHost:{hostRequested:!!e&&e.isHostRequested},from:e?e.preferredContactTimeFrom:void 0,to:e?e.preferredContactTimeTo:void 0,frequency:e?e.contactFrequency:void 0,preferredContact:e?e.preferredContactType:void 0}}isAcceptsGiftsNotEqual(e,t){return e.acceptsGifts&&t.acceptsGifts&&e.acceptsGifts.acceptsGiftsModel!==t.acceptsGifts.acceptsGiftsModel}}return e.ɵfac=function(t){return new(t||e)(l["ɵɵinject"](s.f))},e.ɵprov=l["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()},48510:(e,t,i)=>{i.d(t,{_:()=>f});var o=i(57826),n=i(50437);const r="profileUpdateConfirmation";let s=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var a=i(6856),l=i(9601),c=i(47723),d=i(40475),p=i(60567),h=i(10476);const u=function(e){return[e]};let f=(()=>{class e{constructor(e,t){this.formService=e,this.profileUpdateConfig=t}ok(){this.result.next({proceedToUpdate:!0,password:this.formGroup.value.password})}cancel(){this.emptyForm(),this.result.next({proceedToUpdate:!1})}ngOnInit(){this.formModel=new n.fk({id:`${r}`,elements:{password:new n.bx({id:`${r}-password`,type:"password",label:"profileUpdateConfirmation.password.label",validators:{required:null},focused:!0})}}),this.formGroup=this.formService.createFormControl(this.formModel)}emptyForm(){this.formGroup.reset()}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵdirectiveInject"](n.oL),o["ɵɵdirectiveInject"](s,8))},e.ɵcmp=o["ɵɵdefineComponent"]({type:e,selectors:[["ng-component"]],inputs:{context:"context"},outputs:{result:"result"},decls:28,vars:11,consts:[[1,"wrapper","profile-update-confirmation"],[1,"icon","confirmation-icon",3,"ngClass"],[1,"confirmation-figcaption",3,"bxTranslate"],[3,"formGroup","ngSubmit"],[3,"model","controlGroup"],[1,"buttons"],["type","button",1,"custom-cta","tertiary",3,"bxTranslate","click"],["type","submit",1,"custom-cta","primary",3,"bxTranslate"]],template:function(e,t){1&e&&(o["ɵɵtext"](0,"\n        "),o["ɵɵelementStart"](1,"div",0),o["ɵɵtext"](2,"\n            "),o["ɵɵelementStart"](3,"figure"),o["ɵɵtext"](4,"\n                "),o["ɵɵelement"](5,"i",1),o["ɵɵtext"](6,"\n                "),o["ɵɵelementStart"](7,"figcaption",2),o["ɵɵtext"](8),o["ɵɵelementEnd"](),o["ɵɵtext"](9,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](10,"\n             "),o["ɵɵelementStart"](11,"bx-form",3),o["ɵɵlistener"]("ngSubmit",(function(){return t.ok()})),o["ɵɵtext"](12,"\n                "),o["ɵɵelementStart"](13,"bx-form-group",4),o["ɵɵpipe"](14,"bxTranslationKeys"),o["ɵɵtext"](15,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](16,"\n                "),o["ɵɵelementStart"](17,"div",5),o["ɵɵtext"](18,"\n                    "),o["ɵɵelementStart"](19,"button",6),o["ɵɵlistener"]("click",(function(){return t.cancel()})),o["ɵɵtext"](20,"\n                        profileUpdateConfirmation.cancel\n                    "),o["ɵɵelementEnd"](),o["ɵɵtext"](21,"\n                    "),o["ɵɵelementStart"](22,"button",7),o["ɵɵtext"](23),o["ɵɵelementEnd"](),o["ɵɵtext"](24,"\n                "),o["ɵɵelementEnd"](),o["ɵɵtext"](25,"\n            "),o["ɵɵelementEnd"](),o["ɵɵtext"](26,"\n        "),o["ɵɵelementEnd"](),o["ɵɵtext"](27,"\n    ")),2&e&&(o["ɵɵadvance"](5),o["ɵɵproperty"]("ngClass",o["ɵɵpureFunction1"](9,u,(null==t.profileUpdateConfig||null==t.profileUpdateConfig.confirmation?null:t.profileUpdateConfig.confirmation.icon)||"icon-warning")),o["ɵɵadvance"](3),o["ɵɵtextInterpolate"](t.context.title),o["ɵɵadvance"](3),o["ɵɵproperty"]("formGroup",t.formGroup),o["ɵɵadvance"](2),o["ɵɵproperty"]("model",o["ɵɵpipeBind2"](14,6,t.formModel,"profileUpdateConfirmation"))("controlGroup",t.formGroup),o["ɵɵadvance"](10),o["ɵɵtextInterpolate1"]("\n                        ",t.context.okButton,"\n                    "))},directives:[a.NgClass,l.P,c.U,d.NgControlStatusGroup,d.FormGroupDirective,p.E],pipes:[h.o],encapsulation:2}),e})()},60766:(e,t,i)=>{i.d(t,{f:()=>o});class o{constructor(e,t,i,o){this.profile=e,this.hostedPlayer=t,this.security=i,this.operation=o}hasPhoneChanged(){return this.profile.hasPhoneChanged()}}},17294:(e,t,i)=>{i.d(t,{c:()=>o});class o{constructor(e,t){this.password=e,this.pinCode=t}}},40564:(e,t,i)=>{i.d(t,{s:()=>o});class o{constructor(e,t,i,o,n,r,s,a,l,c,d,p,h){this.username=e,this.email=t,this.attributes=i,this.nickname=o,this.phoneNumber=n,this.newPassword=r,this.firstName=s,this.lastName=a,this.birthdate=l,this.address=c,this.allowUpdate=d,this.subscriptionChannels=p,this.acceptsGifts=h}hasPhoneChanged(){return void 0!==this.phoneNumber}}},17070:(e,t,i)=>{i.d(t,{E:()=>n});var o=i(57826);let n=(()=>{class e{generate24HoursList(){return Array.from({length:24},((e,t)=>("0"+t).slice(-2)+":00"))}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})()}}]);