1"use strict";var Qa,ka,Ba,Va,Ga,Ja,Za,za,Ya,Xa,Ha,Wa,Ka,ja,er,tr,or,nr,ir,ar,rr,sr,lr,_r,dr,cr,ur,pr,mr,gr,fr,Or,hr,Cr,Sr,Tr,Er,Mr,vr,Nr,Rr,xr,yr,Ir,Pr,Lr,br,Fr,Ar,Dr,qr,Ur,wr,$r,Qr,kr,Br,Vr,Gr,Jr,Zr,zr,Yr,Xr,Hr,Wr,Kr,jr,es,ts,os,ns,is,as,rs,ss,ls,_s,ds,cs,us,ps,ms,gs,fs,Os,hs,Cs,Ss,Ts,Es,Ms,vs,Ns,Rs,xs,ys,Is,Ps,Ls,bs,Fs,As,Ds,qs,Us,ws,$s,Qs,ks,Bs,Vs,Gs,Js,Zs,zs,Ys,Xs,Hs,Ws,Ks,js,el,tl,ol,nl,il,al,rl,sl,ll,_l,dl,cl,ul,pl,ml,gl,fl,Ol,hl,Cl,Sl,Tl,El,Ml,vl,Nl,Rl,xl,yl,Il,Pl,Ll,bl,Fl,Al,Dl,ql,Ul,wl,$l,Ql,kl,Bl,Vl,Gl,Jl,Zl,zl,Yl,$a=Object.freeze,sp=Object.defineProperty,c=($e,Ne)=>$a(sp($e,"raw",{value:$a(Ne||$e.slice())}));(self["klg-quote-tool"]=self["klg-quote-tool"]||[]).push([[807],{1807:($e,Ne,p)=>{p.r(Ne),p.d(Ne,{FormComponent:()=>Ua.U,FormLeadsService:()=>oa,PriceRequestFiltersService:()=>Kt,PriceRequestFormGoogleAnalyticsDataLayerService:()=>ip.N,PriceRequestFormGoogleAnalyticsEvent:()=>H,QuoteInputFormMapper:()=>ta,QuoteToolFormModule:()=>np});var h=p(6814),M=p(95),Xl=p(2315),Hl=p(8660),Wl=p(9775),Kl=p(4637),ft=p(9653),Ot=p(174),Qe=p(5659),jl=p(5555),e_=p(9737),Re=p(9184),e=p(9212),ht=p(8876),Oe=p(8197),m=p(1677),Y=p(2780);const t_=()=>({property:"code"}),o_=i=>[i];let ke=(()=>{var i;class l{constructor(){this.disabled=!1,this.required=!1,this.iconValidation=!1,this.dates=[],this.valueChange=new e.vpe,this.dataSource=[],this.dateFormatService=(0,e.f3M)(ht.f)}ngOnInit(){this.initializeData()}ngOnChanges({dates:t,value:o}){(t||o)&&this.initializeData()}handleDateSelected(t){this.valueChange.emit(t)}initializeData(){var t;if(null===(t=this.dates)||void 0===t||!t.length)return void(this.dataSource=[]);const o=[...new Set(this.dates.filter(n=>!!n))];this.dataSource=o.map(n=>({code:n,name:this.dateFormatService.formatDate((0,m.bl)(n),Oe.t.SHORT_MONTH_NAME)}))}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-date-list-selector"]],inputs:{value:"value",label:"label",placeholder:"placeholder",disabled:"disabled",required:"required",iconValidation:"iconValidation",dates:"dates"},outputs:{valueChange:"valueChange"},standalone:!0,features:[e.TTD,e.jDz],decls:1,vars:12,consts:[["valueExpr","code",3,"valueChange","label","placeholder","disabled","required","iconValidation","value","itemList","sortCriteria","buttonView"]],template:function(t,o){1&t&&(e.TgZ(0,"lx-form-field-selector",0),e.NdJ("valueChange",function(r){return o.handleDateSelected(r)}),e.qZA()),2&t&&e.Q6J("label",o.label)("placeholder",o.placeholder)("disabled",o.disabled)("required",o.required)("iconValidation",o.iconValidation)("value",o.value)("itemList",o.dataSource)("sortCriteria",e.VKq(10,o_,e.DdM(9,t_)))("buttonView",!1)},dependencies:[h.ez,Y.p]}),l})();var xe=p(4275),Be=p(9915);let Ct=(()=>{var i;class l{constructor(){this.small=!1,this.disabled=!1,this.value=void 0,this.itemList=[],this.required=!1,this.valueChange=new e.vpe,this.dropdownClosed=new e.vpe,this.dirty=!1}ngOnChanges(t){var o;null!==(o=t.value)&&void 0!==o&&o.currentValue&&(this.selectedValue=t.value.currentValue)}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-title-selector"]],inputs:{small:"small",label:"label",disabled:"disabled",placeholder:"placeholder",value:"value",itemList:"itemList",required:"required"},outputs:{valueChange:"valueChange",dropdownClosed:"dropdownClosed"},standalone:!0,features:[e.TTD,e.jDz],decls:1,vars:10,consts:[["valueExpr","code",3,"valueChange","dropdownClosed","small","label","disabled","value","itemList","buttonView","placeholder","required","searchEnabled","iconValidation"]],template:function(t,o){1&t&&(e.TgZ(0,"lx-form-field-selector",0),e.NdJ("valueChange",function(r){return o.dirty=!0,o.valueChange.emit(r)})("dropdownClosed",function(){return o.dropdownClosed.emit()}),e.qZA()),2&t&&e.Q6J("small",o.small)("label",o.label)("disabled",o.disabled)("value",o.value)("itemList",o.itemList)("buttonView",!1)("placeholder",o.placeholder)("required",o.required)("searchEnabled",!1)("iconValidation",!0)},dependencies:[Y.p],styles:[".form-field__validated-selector-padding[_nghost-%COMP%] .form-field, .form-field__validated-selector-padding [_nghost-%COMP%] .form-field{margin-top:0;margin-bottom:0;background-color:#fff;border:none}.form-field__validated-selector-padding[_nghost-%COMP%] .form-field__control, .form-field__validated-selector-padding [_nghost-%COMP%] .form-field__control{border:none}.form-field__validated-selector-padding[_nghost-%COMP%] .form-field__control--valid:after, .form-field__validated-selector-padding [_nghost-%COMP%] .form-field__control--valid:after{display:none}"]}),l})();var ye=p(5596),ae=p(9299),re=p(9633),j=p(9768),n_=p(3614),he=p(8057),me=p(3714),Ie=p(6218);let St,Tt,Et,Mt,vt,Nt,Rt,xt,yt,It,Pt,Lt,bt,Ft=(()=>{var i;class l{constructor(){var t;this.valueChanges=new e.vpe,this.hostFamilyOptions=[{code:1,name:$localize(St||(St=Qa||(Qa=c(["Yes"]))))}
1,{code:2,name:$localize(Tt||(Tt=ka||(ka=c(["No"]))))},{code:3,name:$localize(Et||(Et=Ba||(Ba=c(["Don't mind"]))))}],this.placeholderText=null===(t=this.hostFamilyOptions[2])||void 0===t?void 0:t.name}onItemChange(t,o){const n=3===o.code?void 0:1===o.code;switch(t){case"isNonSmokingFamily":this.isNonSmokingFamily=n;break;case"hasChildrenFamily":this.hasChildrenFamily=n;break;case"hasPetsFamily":this.hasPetsFamily=n;break;case"hasStudentsFamily":this.hasStudentsFamily=n}this.valueChanges.emit({isNonSmokingFamily:this.isNonSmokingFamily,hasChildrenFamily:this.hasChildrenFamily,hasPetsFamily:this.hasPetsFamily,hasStudentsFamily:this.hasStudentsFamily})}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-host-family-selection"]],outputs:{valueChanges:"valueChanges"},standalone:!0,features:[e.jDz],decls:17,vars:16,consts:()=>{let a,t,o,n,r,s,_,d,u,g;return a=$localize(Mt||(Mt=Va||(Va=c(["Non Smokers"])))),t=$localize(vt||(vt=Ga||(Ga=c(["With Children"])))),o=$localize(Nt||(Nt=Ja||(Ja=c(["With Pets"])))),n=$localize(Rt||(Rt=Za||(Za=c(["With Students"])))),r=$localize(xt||(xt=za||(za=c(["",":INTERPOLATION:"]))),"\ufffd0\ufffd"),s=$localize(yt||(yt=Ya||(Ya=c(["",":INTERPOLATION:"]))),"\ufffd0\ufffd"),_=$localize(It||(It=Xa||(Xa=c(["",":INTERPOLATION:"]))),"\ufffd0\ufffd"),d=$localize(Pt||(Pt=Ha||(Ha=c(["",":INTERPOLATION:"]))),"\ufffd0\ufffd"),u=$localize(Lt||(Lt=Wa||(Wa=c(["Homestay Preferences"])))),g=$localize(bt||(bt=Ka||(Ka=c(["Not Guaranteed"])))),[u,g,["placeholder",r],["placeholder",s],["placeholder",_],["placeholder",d],[1,"host-family-selection__title"],[1,"host-family-selection__sub-title"],[1,"host-family-selection__selection"],["label",a,"valueExpr","code","data-qa","qt-host-family-selector-non-smokers",3,"itemChange","itemList","required","searchEnabled",6,"placeholder"],["label",t,"valueExpr","code","data-qa","qt-host-family-selector-with-children",3,"itemChange","itemList","required","searchEnabled",6,"placeholder"],["label",o,"valueExpr","code","data-qa","qt-host-family-selector-with-pets",3,"itemChange","itemList","required","searchEnabled",6,"placeholder"],["label",n,"valueExpr","code","data-qa","qt-host-family-selector-with-students",3,"itemChange","itemList","required","searchEnabled",6,"placeholder"]]},template:function(t,o){1&t&&(e.TgZ(0,"div",6)(1,"div"),e.SDv(2,0),e.qZA(),e.TgZ(3,"div",7),e._uU(4,"("),e.TgZ(5,"span"),e.SDv(6,1),e.qZA(),e._uU(7,")"),e.qZA()(),e.TgZ(8,"div",8)(9,"lx-form-field-selector",9),e.NdJ("itemChange",function(r){return o.onItemChange("isNonSmokingFamily",r)}),e.DtL(10,2),e.qZA(),e.TgZ(11,"lx-form-field-selector",10),e.NdJ("itemChange",function(r){return o.onItemChange("hasChildrenFamily",r)}),e.DtL(12,3),e.qZA(),e.TgZ(13,"lx-form-field-selector",11),e.NdJ("itemChange",function(r){return o.onItemChange("hasPetsFamily",r)}),e.DtL(14,4),e.qZA(),e.TgZ(15,"lx-form-field-selector",12),e.NdJ("itemChange",function(r){return o.onItemChange("hasStudentsFamily",r)}),e.DtL(16,5),e.qZA()()),2&t&&(e.xp6(9),e.pQV(o.placeholderText),e.QtT(10),e.Q6J("itemList",o.hostFamilyOptions)("required",!1)("searchEnabled",!1),e.xp6(2),e.pQV(o.placeholderText),e.QtT(12),e.Q6J("itemList",o.hostFamilyOptions)("required",!1)("searchEnabled",!1),e.xp6(2),e.pQV(o.placeholderText),e.QtT(14),e.Q6J("itemList",o.hostFamilyOptions)("required",!1)("searchEnabled",!1),e.xp6(2),e.pQV(o.placeholderText),e.QtT(16),e.Q6J("itemList",o.hostFamilyOptions)("required",!1)("searchEnabled",!1))},dependencies:[Y.p],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}
1[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}[_nghost-%COMP%] .host-family-selection__title[_ngcontent-%COMP%]{color:var(--color-grey-7, #606060);display:flex;font-size:var(--font-size-normal, 14px);font-weight:var(--font-weight-regular, 400);padding-top:15px;padding-bottom:20px}[_nghost-%COMP%] .host-family-selection__sub-title[_ngcontent-%COMP%]{margin-left:5px}[_nghost-%COMP%] .host-family-selection__selection[_ngcontent-%COMP%]{gap:15px;display:grid;grid-template-columns:none}@media (min-width: 768px){[_nghost-%COMP%] .host-family-selection__selection[_ngcontent-%COMP%]{gap:20px;width:100%;grid-template-columns:1fr 1fr}}"]}),l})();var S=p(532),L=p(8645),F=p(9773),i_=p(7098),Ce=p(3160),I=p(2026);let At,Dt,qt,Ut;function a_(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div",5)(1,"div",6)(2,"p-checkbox",12),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.agreeToTerms.value,o)||(n.formData.agreeToTerms.value=o),e.KtG(o)}),e.NdJ("ngModelChange",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onValueChanges("agreeToTerms"))}),e.qZA()(),e.TgZ(3,"div",8)(4,"span",13),e.NdJ("click",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.formData.agreeToTerms.value=!o.formData.agreeToTerms.value)})("mouseenter",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.isTermsTextHovered=!0)})("mouseleave",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.isTermsTextHovered=!1)}),e.tHW(5,3),e._UZ(6,"a",14),e.N_p(),e.qZA(),e.TgZ(7,"span",15),e._uU(8,"*"),e.qZA()()()}if(2&i){const a=e.oxw();e.xp6(2),e.Q6J("value",a.formData.agreeToTerms.value)("binary",!0),e.E3D("ngModel",a.formData.agreeToTerms.value),e.xp6(),e.ekj("terms-and-promotions__checkbox-container__text--error",(a.formData.agreeToTerms.isDirty||a.formData.agreeToTerms.isValid)&&!a.formData.agreeToTerms.value),e.xp6(3),e.Q6J("href",a.termsAndConditionsLink,e.LSH)}}let Le=(()=>{var i;class l extends Ce.h{constructor(t){super(t),this.agreeToPromotionsChanged=new e.vpe,this.isTermsTextHovered=!1,this.destroy$=new L.x,this.linkUrlsService=(0,e.f3M)(i_.S),this.isEnrollmentFormType=()=>this.stepService.getFormType()===S.d.ENROLLMENT}ngOnInit(){this.initFormFields(),this.initLinks()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onValueChanges(t){this.formData[t].validate(),this.storeSectionData(),"agreeToPromotions"===t&&this.agreeToPromotionsChanged.emit(this.getFieldValue("agreeToPromotions"))}getFormFields(){return{agreeToPromotions:{value:this.getFieldValue("agreeToPromotions"),validator:()=>!0,required:!1},agreeToTerms:{group:"checkboxRequiredDefaultsToFalse",value:this.getFieldValue("agreeToTerms"),validator:Boolean,required:!0}}}initLinks(){this.linkUrlsService.getLinkUrls$().pipe((0,F.R)(this.destroy$)).subscribe(({moreInfoLinkUrl:t,termsAndConditionsLinkUrl:o})=>{this.moreInfoLink=t,this.termsAndConditionsLink=o})}initFormFields(){this.stepService.quoteRequest$.pipe((0,F.R)(this.destroy$)).subscribe(({agreeToPromotions:t,agreeToTerms:o})=>{this.termsAndPromotionsData={agreeToPromotions:null!=t&&t,agreeToTerms:null!=o&&o},super.ngOnInit()})}storeSectionData(){const{agreeToTerms:t,agreeToPromotions:o}=this.getFormValues();this.stepService.updatePartialRequest({agreeToTerms:t||!1,agreeToPromotions:o||!1}),this.stepService.setPartialStudentDetails({consentResellers:!1,consentMarketing:o||!1})}getFieldValue(t){var o;return null!==(o=this.getDataFromFields()[t])&&void 0!==o?o:this.termsAndPromotionsData[t]}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(I.Q))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-terms-and-promotions-form-section"]],outputs:{agreeToPromotionsChanged:"agreeToPromotionsChanged"},standalone:!0,features:[e.qOj,e.jDz],decls:13,vars:5,consts:()=>{let a,t,o,n;return a=$localize(At||(At=ja||(ja=c([" We'd like to keep in touch to share the latest news and special offers from ESL. If this isn't for you, tick the box to opt out. "])))),t=$localize(Dt||(Dt=er||(er=c(["We will use your phone number to call or message you about your enquiry. To find out more about how we handle and share your personal data see our "])))),o=$localize(qt||(qt=tr||(tr=c(["Privacy Policy"])))),n=$localize(Ut||(Ut=or||(or=c(["I completely agree with the ",":START_LINK:terms and conditions",":CLOSE_LINK: of ESL "]))),"\ufffd#6\ufffd","\ufffd/#6\ufffd"),[a,t,o,n,[1,"terms-and-promotions"],[1,"terms-and-promotions__checkbox-container"],[1,"terms-and-promotions__checkbox-container__box"],["data-qa","qt-terms-and-promotions-checkbox",3,"ngModelChange","value","binary","ngModel"],[1,"terms-and-promotions__checkbox-container__text"],["class","terms-and-promotions__checkbox-container",4,"ngIf"],[1,"terms-and-promotions__privacy-information"],["target","_blank",1,"terms-and-promotions__privacy-information-link",3,"href"],["data-qa","qt-terms-and-conditions-checkbox",3,"ngModelChange","value","binary","ngModel"],[1,"qt-form__check-box-label",3,"click","mouseenter","mouseleave"],["target","_blank",1,"terms-and-promotions__terms-link",3,"href"],[1,"terms-and-promotions__checkbox-container__star"]]},template:function(t,o){1&t&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"p-checkbox",7),e.Uc_("ngModelChange",function(r){return e.nJJ(o.formData.agreeToPromotions.value,r)||(o.formData.agreeToPromotions.value=r),r}),e.NdJ("ngModelChange",function(){return o.onValueChanges("agreeToPromotions")}),e.qZA()(),e.TgZ(4,"div",8),e.SDv(5,0),e.qZA()(),e.YNc(6,a_,9,6,"div",9),e.TgZ(7,"div",10)(8,"span"),e.SDv(9,1),e.qZA(),e.TgZ(10,"a",11),e.SDv(11,2),e.qZA(),e._uU(12,". "),e.qZA()()),2&t&&(e.xp6(3),e.Q6J("value",o.formData.agreeToPromotions.value)("binary",!0),e.E3D("ngModel",o.formData.agreeToPromotions.value),e.xp6(3),e.Q6J("ngIf",o.isEnrollmentFormType()),e.xp6(4),e.Q6J("href",o.moreInfoLink,e.LSH))},dependencies:[he.nD,he.XZ,M.u5,M.JJ,M.On,h.O5],styles:["[_nghost-%COMP%] .terms-and-promotions[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] .terms-and-promotions__checkbox-container[_ngcontent-%COMP%]{display:grid;padding-bottom:20px;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto}[_nghost-%COMP%] .terms-and-promotions__checkbox-container__box[_ngcontent-%COMP%]{font-size:var(--font-size-normal, 14px);align-self:center;margin-bottom:10px}[_nghost-%COMP%] .terms-and-promotions__checkbox-container__text[_ngcontent-%COMP%]{color:var(--color-grey-7, #606060);font-size:var(--font-size-normal, 14px);-webkit-padding-start:10px;padding-inline-start:10px}[_nghost-%COMP%] .terms-and-promotions__checkbox-container__text--error[_ngcontent-%COMP%]{color:var(--color-error, )}[_nghost-%COMP%] .terms-and-promotions__checkbox-container__star[_ngcontent-%COMP%]{color:var(--color-error, )}[_nghost-%COMP%] .terms-and-promotions__terms-agreement[_ngcontent-%COMP%] .qt-form__check-box-label[_ngcontent-%COMP%]{padding-left:5px;vertical-align:bottom;font-size:var(--font-size-normal, 14px);color:var(--color-grey-7, #606060)}[_nghost-%COMP%] .terms-and-promotions__terms-link[_ngcontent-%COMP%]{font-weight:var(--font-weight-bold, 700);color:var(--color-primary, #000000);text-decoration:underline}[_nghost-%COMP%] .terms-and-promotions__privacy-information[_ngcontent-%COMP%]{color:var(--color-grey-7, #606060);font-size:var(--font-size-normal, 14px);padding-bottom:20px}[_nghost-%COMP%] .terms-and-promotions__privacy-information-link[_ngcontent-%COMP%]{font-weight:var(--font-weight-bold, 700);color:var(--color-primary, #000000)}"]}),l})();var be=p(8559),r_=p(3206),Ve=p(5960),Ge=p(9464),wt=p(4667),Je=p(5389),s_=p(707),X=p(5619),D=p(2572),H=function(i){return i.ViewPriceRequestForm="view_price_request_form",i.BeginPriceRequestForm="begin_price_request_form",i.QuoteStep1="quote_step_1",i.QuoteStep2="quote_step_2",i.QuoteNext="quote_next",i.QuoteClickSend="quote_click_send",i.QuoteLeadGen="quote_lead_gen",i.ErrorForm="error_form",i}(H||{}),$t=p(459);const Qt="klg.features.QTpriceRequestInlineCTAExperiment";let l_=(()=>{var i;class l{constructor(){this.cookieService=(0,e.f3M)($t.N)}isPriceRequestInlineCtaExperimentActive(){return this.cookieService.check(Qt)&&"true"===this.cookieService.get(Qt)}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();var Ze=p(1755),U=p(1993),Se=p(7346),kt=p(3997);let __=(()=>{var i;class l{constructor(){this.lxCourseDetailsLoggingFocusOut=!1,this.uuidExtraLoggingService=(0,e.f3M)(be.W),this.valueChangeSubject=ne
1w L.x,this.destroyRef=(0,e.f3M)(e.ktI)}onValueChange(t){this.valueChangeSubject.next(t)}onFocusOut(t){this.lxCourseDetailsLoggingFocusOut&&this.valueChangeSubject.next(t)}onDateChange(t){this.valueChangeSubject.next(t.dateString)}ngOnInit(){this.valueChangeSubject.pipe((0,kt.x)((t,o)=>t===o),(0,U.sL)(this.destroyRef)).subscribe(t=>{this.uuidExtraLoggingService.logCourseDetails(this.lxCourseDetailsLogging||"unknown",t)})}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275dir=e.lG2({type:i,selectors:[["","lxCourseDetailsLogging",""]],hostBindings:function(t,o){1&t&&e.NdJ("valueChange",function(r){return o.onValueChange(r)})("focusout",function(r){return o.onFocusOut(r.target.value)})("dateChanged",function(r){return o.onDateChange(r)})},inputs:{lxCourseDetailsLogging:"lxCourseDetailsLogging",lxCourseDetailsLoggingFocusOut:[e.lbL.HasDecoratorInputTransform,"lxCourseDetailsLoggingFocusOut","lxCourseDetailsLoggingFocusOut",e.VuI]},standalone:!0,features:[e.Xq5]}),l})();function ze(i,l,a,t){return i.filter(o=>(!l||((i,l)=>i.courseLanguages.some(a=>a.code===l))(o,l))&&(!a||o.country===a)&&(!t||o.city===t))}var u_=p(1186),Bt=p(9439),Vt=p(6074),Ye=p(8891),se=p(5538),q=p(9397),k=p(4664),Gt=function(i){return i.AccommodationsEnum={FAMILY_STAY:"FAMILY_STAY",RESIDENCE:"RESIDENCE",SHARED_APARTMENT:"SHARED_APARTMENT",CAMPUS:"CAMPUS",WITHOUT_ACCOMMODATION:"WITHOUT_ACCOMMODATION"},i}(Gt||{});const Te=Gt.AccommodationsEnum;let Jt,Zt,zt,Yt,Xt;
1const Xe=()=>{const i={[Te.FAMILY_STAY]:$localize(Jt||(Jt=nr||(nr=c(["Family stay"])))),[Te.RESIDENCE]:$localize(Zt||(Zt=ir||(ir=c(["Residence"])))),[Te.SHARED_APARTMENT]:$localize(zt||(zt=ar||(ar=c(["Shared apartment"])))),[Te.CAMPUS]:$localize(Yt||(Yt=rr||(rr=c(["Campus"])))),[Te.WITHOUT_ACCOMMODATION]:$localize(Xt||(Xt=sr||(sr=c(["Without accommodation"]))))};return Object.entries(i).map(([l,a],t)=>({code:t,key:l,name:a}))};var ee=p(7582),Ht=p(3337),He=p(5142),p_=p(1600),Wt=p(3562);let Kt=(()=>{var i;class l{constructor(){this.locale=(0,He.K)(),this.companyHeader=(0,p_.d)(),this.productsControllerApiService=(0,e.f3M)(Ht.R)}getPriceRequestFilters(t,o,n){return this.productsControllerApiService.getPriceRequestFilters(t,o,n,this.locale,this.companyHeader,(0,m.SZ)((0,m.x2)()))}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),(0,ee.gn)([(0,Wt.PW)((a,t,o)=>[a,t,o].join("|")),(0,ee.w6)("design:type",Function),(0,ee.w6)("design:paramtypes",[String,Number,Number]),(0,ee.w6)("design:returntype",void 0)],l.prototype,"getPriceRequestFilters",null),l})();const m_=[[["additional-info"]],"*"],g_=["additional-info","*"];function f_(i,l){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const a=e.oxw();e.xp6(),e.hij("",a.sectionIndex,".")}}let W=(()=>{var i;class l{constructor(){this.columns=2}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-section-template"]],inputs:{sectionIndex:"sectionIndex",sectionTitle:"sectionTitle",columns:"columns"},standalone:!0,features:[e.jDz],ngContentSelectors:g_,decls:7,vars:4,consts:[[1,"qt-form-section"],[1,"qt-form-section__title"],[4,"ngIf"],[1,"qt-form-section__form"]],template:function(t,o){1&t&&(e.F$t(m_),e.TgZ(0,"div",0)(1,"h3",1),e.YNc(2,f_,2,1,"span",2),e._uU(3),e.qZA(),e.Hsn(4),e.TgZ(5,"div",3),e.Hsn(6,1),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",o.sectionIndex),e.xp6(),e.hij(" ",o.sectionTitle," "),e.xp6(2),e.ekj("qt-form-section__form--two-columns",2===o.columns))},dependencies:[h.O5],styles:["[_nghost-%COMP%] .qt-form-section{margin-bottom:30px}[_nghost-%COMP%] .qt-form-section__title{margin:0 0 30px;font-size:var(--font-size-large2xl, 24px);font-weight:var(--font-weight-bold, 700);color:var(--color-primary, #000000)}[_nghost-%COMP%] .qt-form-section__form{display:grid;grid-template-columns:minmax(0,1fr);-moz-column-gap:15px;column-gap:15px;row-gap:15px}@media (min-width: 768px){[_nghost-%COMP%] .qt-form-section__form--two-columns{grid-template-columns:repeat(2,minmax(0,1fr));-moz-column-gap:20px;column-gap:20px;row-gap:20px}}[_nghost-%COMP%] .qt-form-section__start-new-line{grid-column:1}@media (min-width: 768px){[_nghost-%COMP%] .qt-form-section__double-column-span{grid-column:1/span 2}}[_nghost-%COMP%] .qt-form-section__textarea{width:100%}[_nghost-%COMP%] lx-form-field .form-field--small, [_nghost-%COMP%] lx-form-field .form-field--small.form-field--valid{box-shadow:none;border:none}[_nghost-%COMP%] lx-form-field .form-field--small.form-field--disabled{border:none;box-shadow:none}[_nghost-%COMP%] lx-form-field .form-field--small .form-field__label{padding:10px 0;font-weight:var(--font-weight-regular, 400);color:var(--color-grey-7, #606060);font-size:var(--font-size-normal, 14px);line-height:var(--font-size-small, 13px);text-transform:lowercase}[_nghost-%COMP%] lx-form-field .form-field--small .form-field__label:first-letter{text-transform:uppercase}[_nghost-%COMP%] lx-form-field .form-field--small .form-field__control>*, [_nghost-%COMP%] lx-form-field .form-field--small .form-field__control input{display:block}[_nghost-%COMP%] lx-form-field .form-field--small .form-field__control input{width:100%;box-shadow:none}[_nghost-%COMP%] lx-form-field .form-field--small .form-field__control input::placeholder{font-weight:var(--font-weight-regular, 400);color:var(--color-grey-5, #aaaaaa)}[_nghost-%COMP%] lx-form-field .form-field--small .p-inputtextarea{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-normal, 14px)}[_nghost-%COMP%] lx-form-field .form-field__checkbox-field{min-height:60px}[_nghost-%COMP%] .p-datepicker{border-radius:8px}[_nghost-%COMP%] .form-field--small.form-field--invalid{padding:10px}"]}),l})();var jt=p(2212),eo=p(8381);let to=(()=>{var i;class l{constructor(){this.disabled=!1,this.autofill=!1,this.value=void 0,this.availableCities=[],this.countryCode=null,this.buttonView=!1,this.isOpen=!1,this.required=!1,this.sortCriteria=[{property:"isAtTheTeachers"},{property:"name"}],this.valueChange=new e.vpe,this.itemChange=new e.vpe,this.itemList=null}ngOnChanges({value:t,countryCode:o,availableCities:n}){var r,s;null!=t&&t.currentValue&&(this.selectedValue=t.currentValue),(null!=o&&o.currentValue||null!=n&&n.currentValue)&&(this.itemList=this.filterCitiesByCountryCode(null!==(r=null==n?void 0:n.currentValue)&&void 0!==r?r:this.availableCities,null!==(s=null==o?void 0:o.currentValue)&&void 0!==s?s:this.countryCode))}filterCitiesByCountryCode(t,o){return(null==t?void 0:t.filter(n=>{var r;return(null==n||null===(r=n.country)||void 0===r?void 0:r.code)===o&&!1!==(null==n?void 0:n.hasQuotableSchools)}))||[]}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-city-selector"]],inputs:{label:"label",disabled:"disabled",autofill:"autofill",value:"value",availableCities:"availableCities",countryCode:"countryCode",buttonView:"buttonView",placeholder:"placeholder",isOpen:"isOpen",required:"required",sortCriteria:"sortCriteria"},outputs:{valueChange:"valueChange",itemChange:"itemChange"},features:[e.TTD],decls:1,vars:11,consts:[["valueExpr","code",3,"valueChange","itemChange","label","disabled","value","itemList","buttonView","placeholder","isOpen","required","sortCriteria","iconValidation","autofill"]],template:function(t,o){1&t&&(e.TgZ(0,"lx-form-field-selector",0),e.NdJ("valueChange",function(r){return o.valueChange.emit(r)})("itemChange",function(r){return o.itemChange.emit(r)}),e.qZA()),2&t&&e.Q6J("label",o.label)("disabled",o.disabled)("value",o.value)("itemList",o.itemList)("buttonView",o.buttonView)("placeholder",o.placeholder)("isOpen",o.isOpen)("required",o.required)("sortCriteria",o.sortCriteria)("iconValidation",!0)("autofill",o.autofill)},dependencies:[Y.p]}),l})();var oo=p(7029);let no,io,ao,ro,so,lo,_o,co,uo,po,mo,go;function O_(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-date-list-selector",14),e.ALo(1,"async"),e.ALo(2,"async"),e.ALo(3,"async"),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.handleStartDateSelection(o))}),e.qZA()}if(2&i){let a,t;const o=e.oxw();e.Q6J("value",null==(a=e.lcZ(1,5,o.quoteInput$))?null:a.startDate)("required",!0)("disabled",!(null!=(t=e.lcZ(2,7,o.quoteInput$))&&t.courseType&&null!=(t=e.lcZ(3,9,o.quoteInput$))&&t.destinationCity&&null!=o.availableStartDates&&o.availableStartDates.length))("iconValidation",!0)("dates",o.availableStartDates)}}function h_(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-date-picker-field",15),e.ALo(1,"async"),e.ALo(2,"async"),e.ALo(3,"async"),e.NdJ("dateChanged",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.processSelectedStartDateChange(o))}),e.qZA()}if(2&i){let a,t;const o=e.oxw();e.Q6J("minDate",o.minDate)("maxDate",o.maxDate)("required",!0)("disabled",!(null!=(a=e.lcZ(1,9,o.quoteInput$))&&a.courseType&&null!=(a=e.lcZ(2,11,o.quoteInput$))&&a.destinationCity&&null!=o.disabledDates&&o.disabledDates.length))("dateValue",null==(t=e.lcZ(3,13,o.quoteInput$))?null:t.startDate)("defaultDate",o.firstAvailableDate)("disabledDates",o.disabledDates)("iconValidation",!0)("showCalendarIcon",!0)}}let C_=(()=>{var i;class l{constructor(){this.columns=2,this.title="",this.selectedAccommodationType={},this.selectedLanguage="",this.availableCountries=[],this.filteredCountries=[],this.availableCities=[],this.availableCourseTypes=[],this.availableWeeks=[],this.disabledDates=[],this.accommodationTypes=Xe(),this.dateListEnabled=!1,this.availableStartDates=[],this.ageGroup=void 0,this.loading=!1,this.minDate=(0,m.x2)(),this.maxDate=(0,m.x2)(),this.firstAvailableDate=(0,m.x2)(),this.isStepValid$=new X.X(!1),this.languageSelectorClickEvent$=new X.X(H.BeginPriceRequestForm),this.allSchools=[],this.destroySubscription$=new L.x,this.route=(0,e.f3M)(Se.gz),this.stepService=(0,e.f3M)(I.Q),this.countryService=(0,e.f3M)(Bt.Y),this.cityService=(0,e.f3M)(Vt.b),this.priceRequestStore=(0,e.f3M)(Ze.j),this.priceRequestFiltersService=(0,e.f3M)(Kt),this.configuration=(0,Ye.P)(),this.destroyRef=(0,e.f3M)(e.ktI),this.priceRequestStoreHandlers={languageCode:t=>this.priceRequestStore.updateQuoteInput({languageCode:t,country:void 0,countryCode:void 0,destinationCity:void 0,courseType:void 0,tuitionWeeks:void 0,startDate:void 0}),courseType:t=>{this.priceRequestStore.updateQuoteInput({courseType:null==t?void 0:t.code}),this.priceRequestStore.updateCourseType(t)},country:({country:t,countryCode:o})=>this.priceRequestStore.updateQuoteInput({country:t,countryCode:o,destinationCity:void 0,tuitionWeeks:void 0,startDate:void 0}),destinationCity:t=>this.priceRequestStore.updateQuoteInput({destinationCity:t,tuitionWeeks:void 0,startDate:void 0}),startDate:t=>this.priceRequestStore.updateQuoteInput({startDate:t}),tuitionWeeks:t=>this.priceRequestStore.updateQuoteInput({tuitionWeeks:t}),accommodationType:t=>this.priceRequestStore.updateQuoteInput({accommodationType:t}),specialRequests:t=>this.priceRequestStore.updateStudentDetails({specialRequests:t})}}ngOnInit(){var t;this.quoteInput$=this.priceRequestStore.quoteInput$.pipe((0,q.b)(o=>{this.selectedAccommodationType=this.getSelectedAccommodationType(o)})),this.priceRequestStore.selectedCourseTypeAndSelectedLanguageAndDestinationCity$.pipe((0,U.sL)(this.destroyRef)).subscribe(({courseType:o,languageCode:n,destinationCityId:r})=>{this.selectedCourseType=o,this.selectedLanguage=n,r&&this.getPriceRequestFilters(Number(r))}),this.priceRequestStore.destinationCountriesAndCourseType$.pipe((0,U.sL)(this.destroyRef)).subscribe(({destinationCountries:o,courseType:n})=>{var r,s;this.availableCountries=o||[];const _=null===(r=ze(this.allSchools,this.selectedLanguage))||void 0===r?void 0:r.filter(d=>{var u;return null==d||null===(u=d.courseTypes)||void 0===u?void 0:u.includes(n)});this.filteredCountries=null===(s=this.availableCountries)||void 0===s?void 0:s.filter(d=>null==_?void 0:_.some(u=>(null==u?void 0:u.country)===(null==d?void 0:d.code)))}),this.priceRequestStore.destinationCities$.pipe((0,U.sL)(this.destroyRef)).subscribe(o=>this.availableCities=o||[]),this.priceRequestStore.courseTypes$.pipe((0,U.sL)(this.destroyRef)).subscribe(o=>this.availableCourseTypes=o||[]),this.priceRequestStore.specialRequests$.pipe((0,U.sL)(this.destroyRef)).subscribe(o=>this.specialRequests=o||""),this.allSchools=(0,se.I8)((null===(t=this.route.
1snapshot.data)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.schools)||[]),this.ageGroup=this.stepService.getActiveAgeGroup()}processSelectedLanguageChange(t){this.languageSelectorClickEvent$.next(H.QuoteStep1),this.priceRequestStore.quoteLanguage$.pipe((0,k.w)(o=>this.countryService.getAllCountriesWithParameters({courseLanguageCode:o})),(0,F.R)(this.destroySubscription$)).subscribe(o=>{this.availableCountries=o,this.priceRequestStore.updateDestinationCountries(o),this.destroySubscription$.next()}),this.availableCourseTypes=this.getAvailablePriceRequestCourseTypes(t),this.applyInputChangeToStore("languageCode",t)}processSelectedCountryChanged(t){var o;const n=null===(o=this.allSchools)||void 0===o?void 0:o.filter(r=>{var s,_,d;return(null==r?void 0:r.country)===(null==t?void 0:t.code)&&(null==r||null===(s=r.courseTypes)||void 0===s?void 0:s.includes(null===(_=this.courseType)||void 0===_||null===(_=_.code)||void 0===_?void 0:_.toString()))&&(null==r||null===(d=r.courseLanguages)||void 0===d?void 0:d.some(u=>(null==u?void 0:u.code)===this.selectedLanguage))});this.loading=!0,this.cityService.getAllCitiesWithParameters({courseLanguageCode:this.selectedLanguage,countryCode:null==t?void 0:t.code}).pipe((0,F.R)(this.destroySubscription$)).subscribe(r=>{this.loading=!1,this.availableCities=null==r?void 0:r.filter(s=>null==n?void 0:n.some(_=>(null==_?void 0:_.city)===(null==s?void 0:s.code))),this.priceRequestStore.updateDestinationCities(this.availableCities),this.destroySubscription$.next()}),this.applyInputChangeToStore("country",{country:t,countryCode:null==t?void 0:t.code})}processSelectedDestinationCityChanged(t){this.getPriceRequestFilters(Number((null==t?void 0:t.code)||"")),this.applyInputChangeToStore("destinationCity",t)}processSelectedCourseTypeChanged(t){this.courseType=t,this.filteredCountries=this.availableCountries,this.applyInputChangeToStore("courseType",t)}processSelectedStartDateChange(t){this.handleStartDateSelection(null==t?void 0:t.dateString)}handleStartDateSelection(t){var o;if(!t)return this.availableWeeks=[],void this.applyInputChangeToStore("startDate",void 0);const n=null===(o=this.priceRequestFilters)||void 0===o||null===(o=o.startDates)||void 0===o?void 0:o.courseDates.filter(_=>_.from===t);var r,s;null!=n&&n.some(_=>null===_.length)?this.setAvailableWeeks(null===(r=this.priceRequestFilters)||void 0===r?void 0:r.durationMin,null===(s=this.priceRequestFilters)||void 0===s?void 0:s.durationMax):this.availableWeeks=n.map(_=>_.length).filter(_=>!!_),this.applyInputChangeToStore("startDate",t)}processSelectedAccommodationTypeChanged(t){var o;this.selectedAccommodationType=t,this.applyInputChangeToStore("accommodationType",(null===(o=this.selectedAccommodationType)||void 0===o?void 0:o.name)||"")}setSpecialRequests(t){this.specialRequests=t,this.applyInputChangeToStore("specialRequests",this.specialRequests)}applyInputChangeToStore(t,o){(0,this.priceRequestStoreHandlers[t])(o)}getPriceRequestFilters(t){this.disabledDates=[],this.priceRequestFiltersService.getPriceRequestFilters(this.selectedLanguage,t,Number(this.selectedCourseType||"")).pipe((0,F.R)(this.destroySubscription$)).subscribe(o=>{var n,r,s,_;this.loading=!1,this.priceRequestFilters=o,this.dateListEnabled=(null==o||null===(n=o.startDates)||void 0===n?void 0:n.showDatesAsList)||!1,this.availableStartDates=(null==o||null===(r=o.startDates)||void 0===r||null===(r=r.courseDates)||void 0===r?void 0:r.map(u=>u.from))||[];const d=Xe();this.accommodationTypes=d.filter(u=>{var g;return null===(g=this.priceRequestFilters)||void 0===g||null===(g=g.accommodations)||void 0===g?void 0:g.includes(u.key)}),this.setAvailableWeeks(null===(s=this.priceRequestFilters)||void 0===s?void 0:s.durationMin,null===(_=this.priceRequestFilters)||void 0===_?void 0:_.durationMax),this.dateListEnabled||this.prepareDates(),this.destroySubscription$.next()})}prepareDates(){var t,o;const n=null!==(t=null===(o=this.priceRequestFilters)||void 0===o||null===(o=o.startDates)||void 0===o?void 0:o.courseDates)&&void 0!==t?t:[];this.minDate=this.getMinDate(n),this.maxDate=this.getMaxDate(n),this.disabledDates=this.getDisabledDates(n),this.firstAvailableDate=this.getFirstAvailableStartDate(n)}getMinDate(t){const o=null==t?void 0:t.map(n=>n.from).reduce((n,r)=>n<r?n:r,"");return o?(0,m.bl)(o):(0,m.x2)()}getMaxDate(t){const o=null==t?void 0:t.map(n=>n.from).reduce((n,r)=>n>r?n:r,"");return o?(0,m.bl)(o):(0,m.x2)()}getDisabledDates(t){var o;return null===(o=(0,m.Y_)(this.minDate,this.maxDate))||void 0===o?void 0:o.filter(n=>!(null!=t&&t.some(r=>r.from===(0,m.SZ)(n))))}getFirstAvailableStartDate(t){const o=new Date,n=(null!=t?t:[]).filter(({from:r})=>!!r).map(({from:r})=>(0,m.bl)(r)).filter(r=>r.getTime()>=o.getTime());return 0===n.length?this.minDate:(n.sort((r,s)=>r.getTime()-s.getTime()),n[0])}setAvailableWeeks(t,o){this.availableWeeks=Array.from({length:o-t+1},(n,r)=>r+t)}getAvailablePriceRequestCourseTypes(t){const o=ze(this.allSchools,t).reduce((s,{courseTypes:_})=>_?[...s,..._.filter(d=>!s.includes(d))]:s,[]),n=(0,u_.a)(this.configuration.PRICE_REQUEST_ALLOWED_COURSE_TYPES),r=o.filter(s=>n.includes(s));return 0===r.length?o:r}getSelectedAccommodationType(t){if(null!=t&&t.accommodationType)return this.accommodationTypes.find(o=>o.name===t.accommodationType)}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-price-request-course-form"]],inputs:{columns:"columns",title:"title"},standalone:!0,features:[e.jDz],decls:39,vars:87,consts:()=>{let a,t,o,n,r,s,_,d,u,g,f,O;return a=$localize(no||(no=lr||(lr=c(["Loading..."])))),t=$localize(io||(io=_r||(_r=c(["Language"])))),o=$localize(ao||(ao=dr||(dr=c(["Program"])))),n=$localize(ro||(ro=cr||(cr=c(["Country"])))),r=$localize(so||(so=ur||(ur=c(["City"])))),s=$localize(lo||(lo=pr||(pr=c(["Start date"])))),_=$localize(_o||(_o=mr||(mr=c(["\u2014 Please select \u2014"])))),d=$localize(co||(co=gr||(gr=c(["Start date"])))),u=$localize(uo||(uo=fr||(fr=c(["\u2014 Please select \u2014"])))),g=$localize(po||(po=Or||(Or=c(["Duration"])))),f=$localize(mo||(mo=hr||(hr=c(["Accommodation"])))),O=$localize(go||(go=Cr||(Cr=c(["Tell us more about your objective and needs if you\u2019d be interested in other programmes or destinations."])))),[["message",a,"shadingColor","rgba(0,0,0,0.5)",3,"loading"],[3,"columns","sectionTitle"],[1,"price-request-course-form__form-group"],["label",t,"lxCourseDetailsLogging","languageCode","data-qa","qt-language-selector",1,"form-field__validated-selector-padding",3,"valueChange","value","required","buttonView","lxGAClickEvent"],["label",o,"lxCourseDetailsLogging","courseType",1,"qt-form-section__start-new-line","form-field__validated-selector-padding",3,"itemChange","value","codes","required","ageGroup","disabled","buttonView","schoolCompany","iconValidation"],["label",n,"lxCourseDetailsLogging","country","data-qa","qt-country-selector",1,"form-field__validated-selector-padding",3,"itemChange","value","autofill","disabled","required","countries","buttonView","iconValidation"],["label",r,"lxCourseDetailsLogging","destinationCity","data-qa","qt-city-selector",1,"form-field__validated-selector-padding",3,"itemChange","value","autofill","disabled","required","buttonView","countryCode","availableCities"],[3,"columns"],["class","form-field__validated-selector-padding","label",s,"placeholder",_,"lxCourseDetailsLogging","startDate","data-qa","qt-start-date-selector",3,"value","required","disabled","iconValidation","dates","valueChange",4,"ngIf"],["class","form-field__validated-selector-padding","label",d,"placeholder",u,"lxCourseDetailsLogging","startDate","data-qa","qt-start-date-field",3,"minDate","maxDate","required","disabled","dateValue","defaultDate","disabledDates","iconValidation","showCalendarIcon","dateChanged",4,"ngIf"],["label",g,"lxCourseDetailsLogging","tuitionWeeks",1,"form-field__validated-selector-padding",3,"valueChange","value","required","disabled","iconValidation","availableWeeksValues"],["label",f,"valueExpr","code","lxCourseDetailsLogging","accommodationType","data-qa","pr-accommodation-type-field",1,"form-field__validated-selector-padding",3,"itemChange","required","value","itemList","disabled","iconValidation"],["label",O,"data-qa","pr-customer-project-field",1,"qt-form-section__double-column-span","form-field__no-validation",3,"small","isValid","required","disabled","iconValidation"],["pInputTextarea","","lxCourseDetailsLogging","specialRequests","lxCourseDetailsLoggingFocusOut","true",1,"qt-form-section__textarea",3,"ngModelChange","ngModel","autoResize"],["label",s,"placeholder",_,"lxCourseDetailsLogging","startDate","data-qa","qt-start-date-selector",1,"form-field__validated-selector-padding",3,"valueChange","value","required","disabled","iconValidation","dates"],["label",d,"placeholder",u,"lxCourseDetailsLogging","startDate","data-qa","qt-start-date-field",1,"form-field__validated-selector-padding",3,"dateChanged","minDate","maxDate","required","disabled","dateValue","defaultDate","disabledDates","iconValidation","showCalendarIcon"]]},template:function(t,o){if(1&t&&(e._UZ(0,"lx-loading-spinner",0),e.TgZ(1,"lx-section-template",1)(2,"div",2)(3,"lx-language-selector",3),e.ALo(4,"async"),e.ALo(5,"async"),e.NdJ("valueChange",function(r){return o.processSelectedLanguageChange(r)}),e.qZA()(),e.TgZ(6,"div",2)(7,"lx-course-type-selector",4),e.ALo(8,"async"),e.ALo(9,"async"),e.NdJ("itemChange",function(r){return o.processSelectedCourseTypeChanged(r)}),e.qZA()(),e.TgZ(10,"div",2)(11,"lx-destination-country-selector",5),e.ALo(12,"async"),e.ALo(13,"async"),e.ALo(14,"async"),e.NdJ("itemChange",function(r){return o.processSelectedCountryChanged(r)}),e.qZA()(),e.TgZ(15,"div",2)(16,"lx-city-selector",6),e.ALo(17,"async"),e.ALo(18,"async"),e.ALo(19,"async"),e.ALo(20,"async"),e.NdJ("itemChange",function(r){return o.processSelectedDestinationCityChanged(r)}),e.qZA()()(),e.TgZ(21,"lx-section-template",7)(22,"div"),e.YNc(23,O_,4,11,"lx-date-list-selector",8)(24,h_,4,15,"lx-date-picker-field",9),e.qZA(),e.TgZ(25,"div",2)(26,"lx-weeks-selector",10),e.ALo(27,"async"),e.ALo(28,"async"),e.ALo(29,"async"),e.NdJ("valueChange",function(r){return o.applyInputChangeToStore("tuitionWeeks",r)}
1),e.qZA()()(),e.TgZ(30,"lx-section-template",7)(31,"div",2)(32,"lx-form-field-selector",11),e.ALo(33,"async"),e.ALo(34,"async"),e.NdJ("itemChange",function(r){return o.processSelectedAccommodationTypeChanged(r)}),e.qZA()()(),e.TgZ(35,"lx-section-template",7)(36,"lx-form-field",12),e.ALo(37,"async"),e.TgZ(38,"textarea",13),e.Uc_("ngModelChange",function(r){return e.nJJ(o.specialRequests,r)||(o.specialRequests=r),r}),e.NdJ("ngModelChange",function(r){return o.setSpecialRequests(r)}),e.qZA()()()),2&t){let n,r,s,_,d,u,g,f,O,T,v,x,C,Ue;e.Q6J("loading",o.loading),e.xp6(),e.Q6J("columns",o.columns)("sectionTitle",o.title),e.xp6(2),e.Q6J("value",null==(n=e.lcZ(4,53,o.quoteInput$))?null:n.languageCode)("required",!0)("buttonView",!1)("lxGAClickEvent",e.lcZ(5,55,o.languageSelectorClickEvent$)),e.xp6(4),e.Q6J("value",null==(r=e.lcZ(8,57,o.quoteInput$))?null:r.courseType)("codes",o.availableCourseTypes)("required",!0)("ageGroup",o.ageGroup)("disabled",!(null!=(s=e.lcZ(9,59,o.quoteInput$))&&s.languageCode))("buttonView",!1)("schoolCompany","ESL")("iconValidation",!0),e.uIk("data-qa","qt-course-type-selector"),e.xp6(4),e.Q6J("value",null==(_=e.lcZ(12,61,o.quoteInput$))?null:_.countryCode)("autofill",!(null==(d=e.lcZ(13,63,o.quoteInput$))||!d.courseType))("disabled",!(null!=(u=e.lcZ(14,65,o.quoteInput$))&&u.courseType))("required",!0)("countries",o.filteredCountries)("buttonView",!1)("iconValidation",!0),e.xp6(5),e.Q6J("value",null==(g=e.lcZ(17,67,o.quoteInput$))||null==g.destinationCity?null:g.destinationCity.code)("autofill",!(null==(f=e.lcZ(18,69,o.quoteInput$))||!f.countryCode))("disabled",!(null!=(O=e.lcZ(19,71,o.quoteInput$))&&O.countryCode))("required",!0)("buttonView",!1)("countryCode",null==(T=e.lcZ(20,73,o.quoteInput$))?null:T.countryCode)("availableCities",o.availableCities),e.xp6(5),e.Q6J("columns",2),e.xp6(2),e.Q6J("ngIf",o.dateListEnabled),e.xp6(),e.Q6J("ngIf",!o.dateListEnabled),e.xp6(2),e.Q6J("value",null==(v=e.lcZ(27,75,o.quoteInput$))?null:v.tuitionWeeks)("required",!0)("disabled",!(null!=(x=e.lcZ(28,77,o.quoteInput$))&&x.startDate&&null!=(x=e.lcZ(29,79,o.quoteInput$))&&x.courseType))("iconValidation",!0)("availableWeeksValues",o.availableWeeks),e.uIk("data-qa","qt-duration-field"),e.xp6(4),e.Q6J("columns",o.columns),e.xp6(2),e.Q6J("required",!0)("value",null==o.selectedAccommodationType?null:o.selectedAccommodationType.code)("itemList",o.accommodationTypes)("disabled",!(null!=(C=e.lcZ(33,81,o.quoteInput$))&&C.startDate&&null!=(C=e.lcZ(34,83,o.quoteInput$))&&C.tuitionWeeks))("iconValidation",!0),e.xp6(3),e.Q6J("columns",1),e.xp6(),e.Q6J("small",!0)("isValid",!0)("required",!1)("disabled",!(null!=(Ue=e.lcZ(37,85,o.quoteInput$))&&Ue.startDate))("iconValidation",!0),e.xp6(2),e.E3D("ngModel",o.specialRequests),e.Q6J("autoResize",!1)}},dependencies:[h.ez,h.O5,h.Ov,Ot.J,jt.S,Qe.x,eo.T,to,ft.B,oo.b,ke,j.g,W,Re.K,xe.i,re.h,Y.p,Ie.A,Ie.g,M.UX,M.Fj,M.JJ,M.u5,M.On,wt.j,__],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}
1[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}"]}),l})();var We=p(9041),fo=p(368),Ke=p(5138),je=p(9419),et=p(6822),Oo=p(9721),ge=p(3620);let S_=(()=>{var i;class l{constructor(){this.fieldsExcludedFromLoggingOnInnerInputChange=["countryOfResidence","dateOfBirth"],this.uuidExtraLoggingService=(0,e.f3M)(be.W),this.valueChangeSubject=new L.x,this.destroyRef=(0,e.f3M)(e.ktI)}onChange(t){this.fieldsExcludedFromLoggingOnInnerInputChange.includes(this.lxStudentDetailsLogging||"")||this.valueChangeSubject.next(t)}onValueChange(t){this.valueChangeSubject.next(t)}onDateChange(t){this.valueChangeSubject.next((0,m.SZ)(t))}ngOnInit(){this.valueChangeSubject.pipe((0,kt.x)((t,o)=>t===o),(0,ge.b)(500),(0,U.sL)(this.destroyRef)).subscribe(t=>{this.uuidExtraLoggingService.logStudentDetails(this.lxStudentDetailsLogging||"unknown",t)})}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275dir=e.lG2({type:i,selectors:[["","lxStudentDetailsLogging",""]],hostBindings:function(t,o){1&t&&e.NdJ("change",function(r){return o.onChange(r.target.value)})("valueChange",function(r){return o.onValueChange(r)})("dateChange",function(r){return o.onDateChange(r)})},inputs:{lxStudentDetailsLogging:"lxStudentDetailsLogging"},standalone:!0}),l})();var tt=p(7141),ho=p(4749),ot=p(1307),te=p(7043),y=p(5484);let nt=(()=>{var i;class l{constructor(){this.counter=0}incrementCounter(){this.counter++}getCounter(){return this.counter}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac}),l})(),T_=(()=>{var i;class l{constructor(){this.clickCount=new e.vpe,this.clickCounterService=(0,e.f3M)(e.zs3).get(nt,new nt)}onClick(t){this.clickCounterService.incrementCounter(),this.clickCount.emit(this.clickCounterService.getCounter()),t.stopImmediatePropagation()}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275dir=e.lG2({type:i,selectors:[["","lxClickCounter",""]],hostBindings:function(t,o){1&t&&e.NdJ("click",function(r){return o.onClick(r)})},outputs:{clickCount:"clickCount"},standalone:!0}),l})();var Co=p(1374),So=p(1978),To=p(8731);let Eo,Mo,vo,No,Ro,xo,yo;function E_(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div",2)(1,"lx-nationality-selector",17),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.onSelectNationality(o))}),e.Uc_("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.nationality.value,o)||(n.formData.nationality.value=o),e.KtG(o)}),e.NdJ("clickCount",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.trackClickEvent(o))}),e.qZA()()}if(2&i){const a=e.oxw();e.xp6(),e.E3D("value",a.formData.nationality.value),e.Q6J("isValid",a.formData.nationality.isValid)("required",a.formData.nationality.required)("small",!0)}}let M_=(()=>{var i;class l extends Ce.h{constructor(t){super(t),this.columns=2,this.title="",this.validationRequests=0,this.validForm=new e.vpe,this.validStep$=new X.X(!1),this.withNationalityField=!1,this.phoneCode="",this.phoneNumber="",this.calendarMaxDate=(0,m.x2)(),this.calendarMinDate=new Date("01/01/1900"),this.priceRequestStore=(0,e.f3M)(Ze.j),this.googleAnalyticsService=(0,e.f3M)(Ge.$),this.locale=(0,He.K)(),this.destroyRef=(0,e.f3M)(e.ktI)}ngOnInit(){this.withNationalityField="fr-FR"===this.locale,this.priceRequestStore.studentDetails$.pipe((0,Co.P)(),(0,U.sL)(this.destroyRef)).subscribe(t=>{this.initializeDataFromStoredStudentDetails(t),this.initFormFields(t),this.formData=this.getFormData()}),this.validStep$.pipe((0,U.sL)(this.destroyRef)).subscribe(t=>{t&&this.storeStudentDetails(),this.validForm.next(t)})}ngOnChanges({withValidationErrors:t}){t&&t.currentValue&&this.recalculateFormValidation("all")}validateField(t){this.storeStudentDetails(),this.formData[t].validate(),this.validStep$.next(this.isFormValid())}onAutoFill(){this.recalculateFormValidation("preFilled")}setCountryOfResidence(t){const o="countryOfResidence";this.formData[o].value=t,this.validateField(o)}onSelectBirthDate(t){const o="dateOfBirth";this.formData[o].value=(0,m.SZ)(t),this.validateField(o)}
1onSelectPhoneNumber(t){const o="phoneNumber";this.phoneCode=(0,te.Jy)(t,0),this.phoneNumber=(0,te.Jy)(t,1),this.formData[o].value=t,this.validateField(o)}onSelectNationality(t){const o="nationality";this.formData[o].value=t,this.validateField(o)}updateAgreeToPromotions(t){this.priceRequestStore.updateConsentMarketing(t||!1)}trackClickEvent(t){t>1||this.googleAnalyticsService.trackClickEvent(H.QuoteStep2)}getFormFields(){return this.formFields}getFieldsValues(t){const o={};return t.forEach(n=>{(void 0!==this.getFieldValueIfValid(n)||this.getFormFields()[n].required)&&(o[n]=this.getFieldValueIfValid(n))}),o}storeStudentDetails(){const t=this.getFormValues();this.priceRequestStore.updateStudentDetails(t)}recalculateFormValidation(t){Object.entries(this.formData).forEach(([o,n])=>{n.recalculateRequired(),("all"===t||o===t||"preFilled"===t&&n.value)&&n.validate()})}initFormFields(t){this.formFields={firstName:{value:(null==t?void 0:t.firstName)||"",validator:o=>o&&o.length<=80,errorMessage:y.cl,required:!0},lastName:{value:(null==t?void 0:t.lastName)||"",validator:o=>o&&o.length<=40,errorMessage:y.cl,required:!0},email:{value:(null==t?void 0:t.email)||"",validator:o=>(0,We.L)(o),errorMessage:null,required:!0},phoneNumber:{value:(null==t?void 0:t.phoneNumber)||"",validator:o=>(0,te.FU)(o),errorMessage:null,required:!0},postcode:{value:(null==t?void 0:t.postcode)||"",validator:o=>o&&o.length>3&&o.length<=20,errorMessage:y.cl,required:!0},countryOfResidence:{value:(null==t?void 0:t.countryOfResidence)||"",validator:Boolean,errorMessage:y.cl,required:!0},dateOfBirth:{value:(null==t?void 0:t.dateOfBirth)||"",validator:o=>{const n=new Date(o).getTime();return n<this.calendarMaxDate.getTime()&&n>=this.calendarMinDate.getTime()},errorMessage:y.cl,required:!0}},this.withNationalityField&&(this.formFields={...this.formFields,nationality:{value:(null==t?void 0:t.nationality)||"",validator:Boolean,errorMessage:y.cl,required:!0}})}isFormValid(){const t=Object.values(this.formData);return!t.some(o=>o.isFieldRequiredAndPristineAndEmpty())&&(t.filter(o=>void 0===o.isValid).forEach(o=>o.validate(o.isDirty)),t.every(o=>o.isValid))}initializeDataFromStoredStudentDetails(t){const o=(null==t?void 0:t.phoneNumber)||"";this.phoneCode=(0,te.Jy)(o,0),this.phoneNumber=(0,te.Jy)(o,1),this.preselectedDateOfBirth=(0,m.bl)(null==t?void 0:t.dateOfBirth)}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(I.Q))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-price-request-student-form"]],inputs:{columns:"columns",title:"title",withValidationErrors:"withValidationErrors",validationRequests:"validationRequests"},outputs:{validForm:"validForm"},standalone:!0,features:[e._Bn([nt]),e.qOj,e.TTD,e.jDz],decls:25,vars:63,consts:()=>{let a,t,o,n,r,s,_;return a=$localize(Eo||(Eo=Sr||(Sr=c(["First name"])))),t=$localize(Mo||(Mo=Tr||(Tr=c(["Last name"])))),o=$localize(vo||(vo=Er||(Er=c(["Email address"])))),n=$localize(No||(No=Mr||(Mr=c(["Phone number"])))),r=$localize(Ro||(Ro=vr||(vr=c(["Country"])))),s=$localize(xo||(xo=Nr||(Nr=c(["Postcode"])))),_=$localize(yo||(yo=Rr||(Rr=c(["Nationality"])))),[["validity","lxFormDataCustomComponentValidity"],[3,"columns","sectionTitle"],[1,"price-request-student-form__form-group"],["label",a,"lxClickCounter","",3,"clickCount","small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","","lxStudentDetailsLogging","firstName","data-qa","qt-first-name-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",t,"lxClickCounter","",3,"clickCount","small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","","lxStudentDetailsLogging","lastName","data-qa","qt-last-name-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",o,"lxClickCounter","",3,"clickCount","small","isValid","required","errorMessage","iconValidation"],["type","email","pInputText","","lxFormDataEmailValidity","","lxBlockSpaces","","lxStudentDetailsLogging","email","data-qa","enrolment-email",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",n,"lxCl
1ickCounter","","data-qa","qt-phone-number-field","lxStudentDetailsLogging","phoneNumber",3,"valueChange","focusout","clickCount","phoneCode","phoneNumber","isValid","required","validationRequests"],["label",r,"lxClickCounter","",1,"form-field__validated-selector-padding","form-field__no-border-dropdown",3,"clickCount","small","isValid","required","errorMessage","iconValidation"],["lxStudentDetailsLogging","countryOfResidence","data-qa","qt-country-selector","lxFormDataDropdownValidity","",3,"valueChange","value","formData"],["label",s,"lxClickCounter","",3,"clickCount","small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataPostcodeValidity","","lxStudentDetailsLogging","postcode","data-qa","qt-postcode-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["lxFormDataCustomComponentValidity","","lxClickCounter","","data-qa","qt-date-of-birth-field","lxStudentDetailsLogging","dateOfBirth",3,"dateChange","focusout","clickCount","formData","validationRequests","isValid","required","errorMessage","date"],["class","price-request-student-form__form-group",4,"ngIf"],[3,"agreeToPromotionsChanged"],["label",_,"lxClickCounter","","data-qa","qt-nationality-field","lxStudentDetailsLogging","nationality",3,"valueChange","clickCount","value","isValid","required","small"]]},template:function(t,o){if(1&t){const n=e.EpF();e.TgZ(0,"lx-section-template",1)(1,"div",2)(2,"lx-form-field",3),e.NdJ("clickCount",function(s){return e.CHM(n),e.KtG(o.trackClickEvent(s))}),e.TgZ(3,"input",4),e.Uc_("ngModelChange",function(s){return e.CHM(n),e.nJJ(o.formData.firstName.value,s)||(o.formData.firstName.value=s),e.KtG(s)}),e.NdJ("lxNativeAutofill",function(){return e.CHM(n),e.KtG(o.onAutoFill())})("focusout",function(){return e.CHM(n),e.KtG(o.validateField("firstName"))}),e.qZA()()(),e.TgZ(4,"div",2)(5,"lx-form-field",5),e.NdJ("clickCount",function(s){return e.CHM(n),e.KtG(o.trackClickEvent(s))}),e.TgZ(6,"input",6),e.Uc_("ngModelChange",function(s){return e.CHM(n),e.nJJ(o.formData.lastName.value,s)||(o.formData.lastName.value=s),e.KtG(s)}),e.NdJ("lxNativeAutofill",function(){return e.CHM(n),e.KtG(o.onAutoFill())})("focusout",function(){return e.CHM(n),e.KtG(o.validateField("lastName"))}),e.qZA()()(),e.TgZ(7,"div",2)(8,"lx-form-field",7),e.ALo(9,"lxEmailError"),e.NdJ("clickCount",function(s){return e.CHM(n),e.KtG(o.trackClickEvent(s))}),e.TgZ(10,"input",8),e.Uc_("ngModelChange",function(s){return e.CHM(n),e.nJJ(o.formData.email.value,s)||(o.formData.email.value=s),e.KtG(s)}),e.NdJ("lxNativeAutofill",function(){return e.CHM(n),e.KtG(o.onAutoFill())})("focusout",function(){return e.CHM(n),e.KtG(o.validateField("email"))}),e.qZA()()(),e.TgZ(11,"div",2)(12,"lx-phone-number-field",9),e.NdJ("valueChange",function(s){return e.CHM(n),e.KtG(o.onSelectPhoneNumber(s))})("focusout",function(){return e.CHM(n),e.KtG(o.storeStudentDetails())})("clickCount",function(s){return e.CHM(n),e.KtG(o.trackClickEvent(s))}),e.qZA()(),e.TgZ(13,"div",2)(14,"lx-form-field",10),e.NdJ("clickCount",function(s){return e.CHM(n),e.KtG(o.trackClickEvent(s))}),e.TgZ(15,"lx-residence-country-selector",11),e.Uc_("valueChange",function(s){return e.CHM(n),e.nJJ(o.formData.countryOfResidence.value,s)||(o.formData.countryOfResidence.value=s),e.KtG(s)}),e.NdJ("valueChange",function(s){return e.CHM(n),e.KtG(o.setCountryOfResidence(s))}),e.qZA()()(),e.TgZ(16,"div",2)(17,"lx-form-field",12),e.NdJ("clickCount",function(s){return e.CHM(n),e.KtG(o.trackClickEvent(s))}),e.TgZ(18,"input",13),e.Uc_("ngModelChange",function(s){return e.CHM(n),e.nJJ(o.formData.postcode.value,s)||(o.formData.postcode.value=s),e.KtG(s)}),e.NdJ("lxNativeAutofill",function(){return e.CHM(n),e.KtG(o.onAutoFill())})("focusout",function(){return e.CHM(n),e.KtG(o.validateField("postcode"))}),e.qZA()()(),e.TgZ(19,"div",2)(20,"lx-date-of-birth-field",14,0),e.ALo(22,"async"),e.NdJ("dateChange",function(s){return e.CHM(n),e.KtG(o.onSelectBirthDate(s))})("focusout",function(){return e.CHM(n),e.KtG(o.validateField("dateOfBirth"))})("clickCount",function(s){return e.CHM(n),e.KtG(o.trackClickEvent(s))}),e.qZA()(),e.YNc(23,E_,2,4,"div",15),e.qZA(),e.TgZ(24,"lx-terms-and-promotions-form-section",16),e.NdJ("agreeToPromotionsChanged",function(s){return e.CHM(n),e.KtG(o.updateAgreeToPromotions(s))}),e.qZA()}if(2&t){const n=e.MAs(21);e.Q6J("columns",o.columns)("sectionTitle",o.title),e.xp6(2),e.Q6J("small",!0)("isValid",o.formData.firstName.isValid)("required",o.formData.firstName.required)("errorMessage",o.formData.firstName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",o.formData.firstName),e.E3D("ngModel",o.formData.firstName.value),e.Q6J("validationRequests",o.validationRequests),e.uIk("autocomplete","given-name"),e.xp6(2),e.Q6J("small",!0)("isValid",o.formData.lastName.isValid)("required",o.formData.lastName.required)("errorMessage",o.formData.lastName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",o.formData.lastName),e.E3D("ngModel",o.formData.lastName.value),e.Q6J("validationRequests",o.validationRequests),e.uIk("autocomplete","family-name"),e.xp6(2),e.Q6J("small",!0)("isValid",o.formData.email.isValid)("required",o.formData.email.required)("errorMessage",e.lcZ(9,59,o.formData.email.value))("iconValidation",!0),e.xp6(2),e.Q6J("formData",o.formData.email),e.E3D("ngModel",o.formData.email.value),e.Q6J("validationRequests",o.validationRequests),e.uIk("autocomplete","email"),e.xp6(2),e.Q6J("phoneCode",o.phoneCode)("phoneNumber",o.phoneNumber)("isValid",o.formData.phoneNumber.isValid)("required",o.formData.phoneNumber.required)("validationRequests",o.validationRequests),e.xp6(2),e.ekj("form-field__no-validation",!o.formData.countryOfResidence.value&&o.formData.countryOfResidence.isValid),e.Q6J("small",!0)("isValid",o.formData.countryOfResidence.isValid)("required",o.formData.countryOfResidence.required)("errorMessage",o.formData.countryOfResidence.errorMessage)("iconValidation",!0),e.xp6(),e.E3D("value",o.formData.countryOfResidence.value),e.Q6J("formData",o.formData.countryOfResidence),e.xp6(2),e.Q6J("small",!0)("isValid",o.formData.postcode.isValid)("required",o.formData.postcode.required)("errorMessage",o.formData.postcode.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",o.formData.postcode),e.E3D("ngModel",o.formData.postcode.value),e.Q6J("validationRequests",o.validationRequests),e.uIk("autocomplete","postal-code"),e.xp6(2),e.Q6J("formData",o.formData.dateOfBirth)("validationRequests",o.validationRequests)("isValid",e.lcZ(22,61,n.enabledValidation$)?o.formData.dateOfBirth.isValid:null)("required",o.formData.dateOfBirth.required)("errorMessage",o.formData.dateOfBirth.errorMessage)("date",o.preselectedDateOfBirth),e.xp6(3),e.Q6J("ngIf",o.withNationalityField)}},dependencies:[W,re.h,me.j,me.o,M.UX,M.Fj,M.JJ,M.u5,M.On,h.O5,Le,Qe.x,So.a,To.W,fo.y,Ke.l,je.q,Be.$,ye.K,et.M,ot.y,T_,Oo.X,S_,tt.s,h.Ov,ho.e],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}
1[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}[_nghost-%COMP%] .price-request-student-form__form-group[_ngcontent-%COMP%] lx-date-of-birth-field lx-form-field.date-of-birth-field div.form-field{background-color:unset}[_nghost-%COMP%] .price-request-student-form__form-group[_ngcontent-%COMP%] lx-date-of-birth-field lx-form-field.date-of-birth-field div.form-field div.form-field__control{background-color:unset}"]}),l})();var v_=p(5219);let Io,Po,Lo,bo,Fo,Ao,Do,qo,Uo;const N_=["priceRequestForm"],wo=(i,l)=>({"pi-circle-off":i,"pi-check-circle":l}),R_=i=>({studentDetails:i}),x_=()=>({height:"72px"});function y_(i,l){1&i&&(e.TgZ(0,"div",12),e._UZ(1,"lx-form-error-message",13),e.qZA())}function I_(i,l){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",21)(2,"div",22),e._uU(3),e.qZA(),e.TgZ(4,"div",23)(5,"lx-button",24),e.NdJ("buttonClick",function(o){e.CHM(a);const n=e.oxw(2);return e.KtG(n.editForm(o,n.formIndexes.courseForm))}),e.qZA()()(),e.BQk()}if(2&i){const a=e.oxw(2);e.xp6(3),e.hij(" ",a.quoteInputSummary," "),e.xp6(2),e.Q6J("uppercase",!0)("buttonStyle","link")}}function P_(i,l){if(1&i&&(e.TgZ(0,"div",14,0)(2,"div",15)(3,"div",16)(4,"div",17),e.SDv(5,2),e.qZA(),e.TgZ(6,"div"),e.SDv(7,3),e.qZA()(),e.TgZ(8,"div",18),e._UZ(9,"i",19),e.ALo(10,"async"),e.ALo(11,"async"),e.qZA()(),e.YNc(12,I_,6,3,"ng-container",20),e.qZA()),2&i){const a=e.oxw();e.xp6(9),e.Q6J("ngClass",e.WLB(6,wo,!1===e.lcZ(10,2,a.courseFormValid$),!0===e.lcZ(11,4,a.courseFormValid$))),e.xp6(3),e.Q6J("ngIf",a.quoteInputSummary.length>0&&a.quoteInputSummaryVisible)}}function L_(i,l){if(1&i){const a=e.EpF();e._UZ(0,"lx-price-request-course-form",25),e.TgZ(1,"div",26)(2,"lx-button",27),e.ALo(3,"async"),e.NdJ("buttonClick",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.activeIndexChange(o.formIndexes.studentForm))}),e.qZA()()}if(2&i){const a=e.oxw();e.Q6J("columns",1),e.xp6(2),e.ekj("price-request-form__button-container__button--inline-cta",a.withPriceRequestInlineCtaExperimentActive),e.Q6J("hasText",!0)("block",!0)("disabled",!1===e.lcZ(3,9,a.courseFormValid$))("uppercase",!0)("buttonStyle","primary")("lxGAClickEvent",a.PriceRequestFormGoogleAnalyticsEvent.QuoteNext)}}function b_(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-button",35),e.NdJ("buttonClick",function(){e.CHM(a);const o=e.oxw(4);return e.KtG(o.sendEnquiry())}),e.qZA()}2&i&&(e.Akn(e.DdM(5,x_)),e.Q6J("hasText",!0)("block",!0)("buttonStyle","primary"))}function F_(i,l){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",21)(2,"div",22)(3,"div",29)(4,"div",30),e._uU(5),e.qZA(),e.TgZ(6,"div",31),e._uU(7),e.qZA(),e.TgZ(8,"div",32),e._uU(9),e.qZA()()(),e.TgZ(10,"div",23)(11,"lx-button",33),e.NdJ("buttonClick",function(o){e.CHM(a);const n=e.oxw(3);return e.KtG(n.editForm(o,n.formIndexes.studentForm))}),e.qZA()()(),e.YNc(12,b_,1,6,"lx-button",34),e.ALo(13,"async"),e.BQk()}if(2&i){const a=e.oxw().studentDetails,t=e.oxw(2);e.xp6(5),e.AsE(" ",null==a?null:a.firstName," ",null==a?null:a.lastName," "),e.xp6(2),e.hij(" ",t.studentDetailsContactInfoSummary," "),e.xp6(2),e.hij(" ",t.studentDetailsAddressSummary," "),e.xp6(2),e.Q6J("uppercase",!0)("buttonStyle","link"),e.xp6(),e.Q6J("ngIf",!0===e.lcZ(13,7,t.studentFormV
1alid$))}}function A_(i,l){if(1&i&&e.YNc(0,F_,14,9,"ng-container",20),2&i){const a=e.oxw(2);e.Q6J("ngIf",a.filledStudentDetails&&a.studentDetailsSummaryVisible)}}function D_(i,l){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"div",16)(3,"div",17),e.SDv(4,4),e.qZA(),e.TgZ(5,"div"),e.SDv(6,5),e.qZA()(),e.TgZ(7,"div",18),e._UZ(8,"i",19),e.ALo(9,"async"),e.ALo(10,"async"),e.qZA()(),e.GkF(11,28),e.ALo(12,"async"),e.YNc(13,A_,1,1,"ng-template",null,1,e.W1O),e.qZA()),2&i){const a=e.MAs(14),t=e.oxw();e.xp6(8),e.Q6J("ngClass",e.WLB(9,wo,!1===e.lcZ(9,3,t.studentFormValid$),!0===e.lcZ(10,5,t.studentFormValid$))),e.xp6(3),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(12,R_,e.lcZ(12,7,t.studentDetails$)))}}function q_(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-price-request-student-form",36),e.ALo(1,"async"),e.NdJ("validForm",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.studentFormValid$.next(o))}),e.qZA(),e.TgZ(2,"div",26)(3,"lx-button",37),e.ALo(4,"async"),e.NdJ("buttonClick",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.sendEnquiry())}),e.qZA()()}if(2&i){const a=e.oxw();e.Q6J("columns",1)("validationRequests",a.validationRequests)("withValidationErrors",!!a.formError&&!1===e.lcZ(1,10,a.studentFormV
1alid$)),e.xp6(3),e.ekj("price-request-form__button-container__button--inline-cta",a.withPriceRequestInlineCtaExperimentActive),e.Q6J("hasText",!0)("block",!0)("disabled",!!a.formError&&!1===e.lcZ(4,12,a.studentFormValid$))("uppercase",!0)("buttonStyle","primary")}}let $o=(()=>{var i;class l{constructor(){this.activeIndex=0,this.quoteInputSummary="",this.filledStudentDetails=!1,this.studentDetailsContactInfoSummary="",this.studentDetailsAddressSummary="",this.quoteInputSummaryVisible=!1,this.studentDetailsSummaryVisible=!1,this.formError=!1,this.validationRequests=0,this.courseFormValid$=new X.X(!1),this.studentFormValid$=new X.X(!1),this.withPriceRequestInlineCtaExperimentActive=!1,this.formIndexes={courseForm:0,studentForm:1},this.PriceRequestFormGoogleAnalyticsEvent=H,this.closeSubscription$=new L.x,this.closeSubscriptions$=new L.x,this.dateFormatService=(0,e.f3M)(ht.f),this.priceRequestStore=(0,e.f3M)(Ze.j),this.quoteToolStore=(0,e.f3M)(r_.B),this.stepService=(0,e.f3M)(I.Q),this.googleAnalyticsService=(0,e.f3M)(Ge.$),this.uuidExtraLoggingService=(0,e.f3M)(be.W),this.priceRequestExperimentService=(0,e.f3M)(l_)}ngOnInit(){this.priceRequestStore.initUuidExtraLogging(),this.quoteInput$=this.priceRequestStore.quoteInput$,this.courseType$=this.priceRequestStore.quoteCourseType$,this.studentDetails$=this.priceRequestStore.studentDetails$,this.googleAnalyticsService.trackViewEvent(H.ViewPriceRequestForm),(0,D.a)([this.priceRequestStore.quoteInput$,this.priceRequestStore.quoteCourseType$]).pipe((0,F.R)(this.closeSubscriptions$)).subscribe(([t,o])=>{if(t&&o){const{languageCode:n,countryCode:r,destinationCity:s,tuitionWeeks:_,startDate:d,accommodationType:u}=t;this.courseFormValid$.next(!!(n&&r&&s&&_>0&&d&&u))}else this.courseFormValid$.next(!1)}),this.prepareQuoteInputSummary(),this.prepareStudentDetailsSummary(),this.withPriceRequestInlineCtaExperimentActive=this.priceRequestExperimentService.isPriceRequestInlineCtaExperimentActive()}ngOnDestroy(){this.closeSubscription$.next()}displayStudentForm(){this.activeIndex=this.formIndexes.studentForm,this.showSummary(this.formIndexes.courseForm),this.hideSummary(this.formIndexes.studentForm)}displayCourseForm(){this.activeIndex=this.formIndexes.courseForm,this.showSummary(this.formIndexes.studentForm),this.hideSummary(this.formIndexes.courseForm)}editForm(t,o){this.activeIndexChange(o),t.preventDefault(),t.stopPropagation()}sendEnquiry(){this.googleAnalyticsService.trackClickEvent(H.QuoteClickSend),(0,D.a)([this.priceRequestStore.quoteInput$,this.priceRequestStore.studentDetails$,this.priceRequestStore.quoteCourseType$]).pipe((0,F.R)(this.closeSubscriptions$)).subscribe(([t,o,n])=>{var r;if(this.stepService.updatePartialRequest({...t,courses:[{courseType:n,weeks:t.tuitionWeeks,startDate:t.startDate}]}),this.stepService.setPartialStudentDetails({...o}
1),this.closeSubscriptions$.next(),!this.studentFormValid$.value)return this.validationRequests=1,this.formError=!this.formError,null===(r=this.priceRequestFormRef)||void 0===r||null===(r=r.nativeElement)||void 0===r||r.scrollIntoView({behavior:"smooth"}),void this.uuidExtraLoggingService.logMessage("was prevented from submitting the price request form x".concat(this.validationRequests,"."));this.uuidExtraLoggingService.logMessage("successfully submitted the price request form."),this.stepService.navigateToNextStep()})}activeIndexChange(t){var o;switch(this.activeIndex=null==t?void 0:"number"==typeof t?t:t[0],this.activeIndex){case this.formIndexes.courseForm:this.displayCourseForm();break;case this.formIndexes.studentForm:this.displayStudentForm()}null===(o=this.priceRequestFormRef)||void 0===o||null===(o=o.nativeElement)||void 0===o||o.scrollIntoView({behavior:"smooth"})}showSummary(t){switch(t){case this.formIndexes.courseForm:this.quoteInputSummaryVisible=!0;break;case this.formIndexes.studentForm:this.studentDetailsSummaryVisible=!0}}hideSummary(t){switch(t){case this.formIndexes.courseForm:this.quoteInputSummaryVisible=!1;break;case this.formIndexes.studentForm:this.studentDetailsSummaryVisible=!1}}prepareQuoteInputSummary(){(0,D.a)([this.priceRequestStore.quoteInput$,this.priceRequestStore.quoteCourseType$]).pipe((0,F.R)(this.closeSubscription$)).subscribe(([t,o])=>{if(this.quoteInputSummary="",!t||!o)return;const{country:n,destinationCity:r,startDate:s,tuitionWeeks:_}=t;if(n&&_&&s){this.quoteInputSummary+=o.name,this.quoteInputSummary+=" | ".concat(n.name," "),this.quoteInputSummary+=r?" | ".concat(r.name," "):"";const d=(0,m.jh)((0,m.bl)(s),_),u=this.dateFormatService.formatDate(s,Oe.t.FULL_MONTH_NAME),g=this.dateFormatService.formatDate(d,Oe.t.FULL_MONTH_NAME);this.quoteInputSummary+=" | ".concat(u," - ").concat(g)}})}prepareStudentDetailsSummary(){(0,D.a)([this.studentDetails$,this.quoteToolStore.countriesOfResidence$]).pipe((0,F.R)(this.closeSubscription$)).subscribe(([t,o])=>{if(!t)return;const{firstName:n,lastName:r,email:s,phoneNumber:_,postcode:d,countryOfResidence:u}=t;if(this.filledStudentDetails=!!(n&&r&&s&&_&&d&&u),this.studentDetailsContactInfoSummary=s&&_?"".concat(s," | ").concat(_):"",d&&u){var g;const f=(null===(g=o.find(({code:O})=>O===u))||void 0===g?void 0:g.name)||u;this.studentDetailsAddressSummary="".concat(d," | ").concat(f)}else this.studentDetailsAddressSummary=""})}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-price-request-form"]],viewQuery:function(t,o){if(1&t&&e.Gf(N_,5),2&t){let n;e.iGM(n=e.CRH())&&(o.priceRequestFormRef=n.first)}},standalone:!0,features:[e.jDz],decls:10,vars:9,consts:()=>{let a,t,o,n,r,s,_,d,u;return a=$localize(Io||(Io=xr||(xr=c(["Step 1 of 2"])))),t=$localize(Po||(Po=yr||(yr=c(["Program and school"])))),o=$localize(Lo||(Lo=Ir||(Ir=c(["Edit"])))),n=$localize(bo||(bo=Pr||(Pr=c(["Next"])))),r=$localize(Fo||(Fo=Lr||(Lr=c(["Step 2 of 2"])))),s=$localize(Ao||(Ao=br||(br=c(["Your details"])))),_=$localize(Do||(Do=Fr||(Fr=c(["Edit"])))),d=$localize(qo||(qo=Ar||(Ar=c(["Send enquiry"])))),u=$localize(Uo||(Uo=Dr||(Dr=c(["Send enquiry"])))),[["priceRequestForm",""],["studentDetailsTemplate",""],a,t,r,s,["class","price-request-form__error-message",4,"ngIf"],[1,"form-field__single-border-input",3,"activeIndexChange","onClose","onOpen","activeIndex","expandIcon","collapseIcon"],["iconPos","end"],["pTemplate","header"],["pTemplate","content"],["iconPos","end",3,"disabled"],[1,"price-request-form__error-message"],["ngProjectAs","additional-info",5,["additional-info"]],[1,"price-request-form__tab-header"],[1,"price-request-form__tab-header__header"],[1,"price-request-form__tab-header__header__title"],[1,"price-request-form__tab-header__header__title__step"],[1,"price-request-form__tab-header__header__icon"],[1,"pi",3,"ngClass"],[4,"ngIf"],[1,"price-request-form__tab-header__info-panel"],[1,"price-request-form__tab-header__info-panel__summary-info"],[1,"price-request-form__tab-header__info-panel__edit-button"],["
1id","btn-edit-course-form","data-qa","qt-edit-course-form","text",o,3,"buttonClick","uppercase","buttonStyle"],[3,"columns"],[1,"price-request-form__button-container"],["id","btn-next","data-qa","qt-next-button","icon","pi pi-chevron-down","text",n,"iconPos","after",1,"price-request-form__button-container__button",3,"buttonClick","hasText","block","disabled","uppercase","buttonStyle","lxGAClickEvent"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"price-request-form__tab-header__info-panel__summary-info__student-details"],[1,"price-request-form__tab-header__info-panel__summary-info__student-details__name"],[1,"price-request-form__tab-header__info-panel__summary-info__student-details__contact"],[1,"price-request-form__tab-header__info-panel__summary-info__student-details__address"],["id","btn-edit-student-form","data-qa","qt-edit-student-form","text",_,3,"buttonClick","uppercase","buttonStyle"],["class","price-request-form__tab-header__send-enquiry-button","id","btn-send-enquiry-from-header","data-qa","qt-send-enquiry-from-header","icon","pi pi-chevron-right","text",d,"iconPos","after",3,"style","hasText","block","buttonStyle","buttonClick",4,"ngIf"],["id","btn-send-enquiry-from-header","data-qa","qt-send-enquiry-from-header","icon","pi pi-chevron-right","text",d,"iconPos","after",1,"price-request-form__tab-header__send-enquiry-button",3,"buttonClick","hasText","block","buttonStyle"],[3,"validForm","columns","validationRequests","withValidationErrors"],["id","btn-send-enquiry","data-qa","qt-send-enquiry","icon","pi pi-chevron-right","text",u,"iconPos","after",1,"price-request-form__button-container__button",3,"buttonClick","hasText","block","disabled","uppercase","buttonStyle"]]},template:function(t,o){1&t&&(e.YNc(0,y_,2,0,"div",6),e.ALo(1,"async"),e.TgZ(2,"p-accordion",7),e.NdJ("activeIndexChange",function(r){return o.activeIndexChange(r)})("onClose",function(r){return o.showSummary(null==r?null:r.index)})("onOpen",function(r){return o.hideSummary(null==r?null:r.index)}),e.TgZ(3,"p-accordionTab",8),e.YNc(4,P_,13,9,"ng-template",9)(5,L_,4,11,"ng-template",10),e.qZA(),e.TgZ(6,"p-accordionTab",11),e.ALo(7,"async"),e.YNc(8,D_,15,14,"ng-template",9)(9,q_,5,14,"ng-template",10),e.qZA()()),2&t&&(e.Q6J("ngIf",!!o.formError&&!1===e.lcZ(1,5,o.studentFormV
1alid$)),e.xp6(2),e.Q6J("activeIndex",o.activeIndex)("expandIcon"," ")("collapseIcon"," "),e.xp6(4),e.Q6J("disabled",!1===e.lcZ(7,7,o.courseFormValid$)))},dependencies:[Je.fx,Je.UQ,Je.US,v_.jx,h.O5,M_,C_,h.Ov,h.tP,ae.r,h.mk,s_.hJ,Ve.J,wt.j],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}[_nghost-%COMP%] .price-request-form__tab-header[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .price-request-form__tab-header__header[_ngcontent-%COMP%], [_nghost-%COMP%] .price-request-form__tab-header__info-panel[_ngcontent-%COMP%]{padding:20px}[_nghost-%COMP%] .price-request-form__tab-header__header[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);background:#0046b433;color:var(--color-primary, #000000);font-size:var(--font-size-largexl, 20px);font-weight:var(--font-weight-semibold, 600)}[_nghost-%COMP%] .price-request-form__tab-header__header__title__step[_ngcontent-%COMP%]{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-small, 13px)}[_nghost-%COMP%] .price-request-form__tab-header__header__icon[_ngcontent-%COMP%]{justify-self:flex-end}[_nghost-%COMP%] .price-request-form__tab-header__header__icon[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:var(--font-size-largexl, 20px)}[_nghost-%COMP%] .price-request-form__tab-header__info-panel__summary-info[_ngcontent-%COMP%]{display:inherit;font-size:var(--font-size-normal, 14px);color:var(--color-grey-9, #202020)}[_nghost-%COMP%] .price-request-form__tab-header__info-panel__edit-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}[_nghost-%COMP%] .price-request-form__button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}[_nghost-%COMP%] .price-request-form__button-container__button[_ngcontent-%COMP%]{height:50px;width:264px}[_nghost-%COMP%] .price-request-form__button-container__button--inline-cta[_ngcontent-%COMP%]{width:100%}@media (min-width: 768px){[_nghost-%COMP%] .price-request-form__button-container__button--inline-cta[_ngcontent-%COMP%]{width:264px}}[_nghost-%COMP%] .price-request-form__error-message[_ngcontent-%COMP%]{margin-top:150px;margin-bottom:20px}[_nghost-%COMP%] .p-accordion .p-accordion-header .p-accordion-header-link{padding:0}[_nghost-%COMP%] .p-accordion .p-accordion-header .p-accordion-header-link, [_nghost-%COMP%] .p-accordion .p-accordion-header:not(.p-disabled).p-highlight .p-accordion-header-link{background-color:#fff;border-color:var(--color-primary, #000000)}[_nghost-%COMP%] .p-accordion .p-accordion-header:not(.p-highlight):not(.p-disabled):hover .p-accordion-header-link{background:inherit;border-color:inherit}[_nghost-%COMP%] .price-request-form__tab-header .price-request-form__tab-header__info-panel__edit-button .lx-button--link button span.lx-button__text--uppercase{font-weight:var(--font-weight-bold, 700)}[_nghost-%COMP%] .price-request-form__tab-header .price-request-form__tab-header__send-enquiry-button button{display:grid;grid-template-columns:10fr 1fr;border-radius:0;font-size:var(--font-size-largexl, 20px)}[_nghost-%COMP%] .price-request-form__tab-header .price-request-form__tab-header__send-enquiry-button button span{justify-self:flex-start;text-transform:capitalize}[_nghost-%COMP%] .price-request-form__tab-header .price-request-form__tab-header__send-enquiry-button button .lx-button__icon.lx-button__icon-after{justify-self:flex-end}"]}),l})();function Qo(i,l){return i===S.d.FREE_QUOTE||i===S.d.ENROLLMENT?l?5:4:3}var N=p(5212),ko=p(6920),Bo=p(4056);function Vo(i){const{languageCode:l,countryCode:a,destinationCity:t,schoolObject:o}=i;return!!(l&&a&&t&&o)}function Go(i){var l,a,t;return i.formType===S.d.PRICE_REQUEST?(null===(l=i.courses)||void 0===l?void 0:l.length)&&(null===(a=(0,N.OC)(i))||void 0===a?void 0:a.length)>0&&null!=i.accommodationType:(null===(t=(0,N.OC)(i))||void 0===t?void 0:t.length)>0}function it(i,{title:l,firstName:a,lastName:t,identityDocument:o,email:n,phoneNumber:r,postcode:s,city:_,countryOfResidence:d,address:u,placeOfBirth:g,nationality:f,motherTongue:O,dateOfBirth:T}){const v=l&&a&&t&&n&&r&&s&&_&&d;switch(i){case S.d.ENROLLMENT:{const x=v&&u&&g&&T&&f&&O;return!!(Bo.e.getValue("ENROLLMENT_IDENTITY_DOCUMENT_ENABLED")?x&&o:x)}case S.d.PRICE_REQUEST:return!!(v&&T&&f);default:return!!v}}function Jo(i,l){const a=function Q_(i){switch(i.formType){case S.d.PRICE_REQUEST:return Vo(i)&&Go(i);case S.d.ENROLLMENT:case S.d.QUICK_QUOTE_TOOL:case S.d.FREE_QUOTE:return Vo(i)&&Go(i)&&function U_(i){var l;return!(0,N.q2)(i)&&((null==i?void 0:i.schoolType)===ko.K.ADULT||(0,N.kM)(i)||(null===(l=(0,N.Q2)(i))||void 0===l?void 0:l.length)>0)}(i);default:return!1}}(i);switch(i.formType){case S.d.PRICE_REQUEST:return a&&it(S.d.PRICE_REQUEST,l);case S.d.FREE_QUOTE:return a&&it(S.d.FREE_QUOTE,l);case S.d.ENROLLMENT:case S.d.QUICK_QUOTE_TOOL:return a;default:return!1}}const Zo=(i,l)=>it(S.d.ENROLLMENT,l)&&function $_(i,l){if(!l.duringYourStay)return!1;
1if(i===ko.K.ADULT){const{contactPersonFirstName:a,contactPersonLastName:t,contactPersonPhone:o}=l.duringYourStay;return!!(a&&t&&o)}{const{legalRepresentativeFirstName:a,legalRepresentativeLastName:t,legalRepresentativeEmail:o,legalRepresentativeMobile:n}=l.duringYourStay;return!!(a&&t&&o&&n)}}(i.schoolType,l)&&function w_(i){const{agreeToTerms:l}=i;return l}(i);var Fe=p(6550),oe=p(4573),k_=p(1703);let zo,Yo,Xo,Ho,Wo,Ko,jo,en,tn,on,nn,an,rn,sn,ln,_n,dn;const B_=()=>({fullAddress:!1}),V_=()=>({fullAddress:!0});function G_(i,l){1&i&&e._UZ(0,"lx-form-error-message",12)}function J_(i,l){1&i&&e.GkF(0)}function Z_(i,l){1&i&&e.GkF(0)}function z_(i,l){1&i&&e.GkF(0)}function Y_(i,l){1&i&&e.GkF(0)}function X_(i,l){1&i&&e.GkF(0)}function H_(i,l){1&i&&e.GkF(0)}function W_(i,l){if(1&i&&e.YNc(0,Z_,1,0,"ng-container",11)(1,z_,1,0,"ng-container",11)(2,Y_,1,0,"ng-container",11)(3,X_,1,0,"ng-container",13)(4,H_,1,0,"ng-container",11),2&i){const a=e.oxw(),t=e.MAs(9),o=e.MAs(11),n=e.MAs(13),r=e.MAs(15),s=e.MAs(17);e.Q6J("ngTemplateOutlet",t),e.xp6(),e.Q6J("ngTemplateOutlet",a.isPriceRequestForm()?o:null),e.xp6(),e.Q6J("ngTemplateOutlet",n),e.xp6(),e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(6,B_)),e.xp6(),e.Q6J("ngTemplateOutlet",a.isPriceRequestForm()?s:null)}}function K_(i,l){1&i&&e.GkF(0)}function j_(i,l){1&i&&e.GkF(0)}function ed(i,l){1&i&&e.GkF(0)}function td(i,l){1&i&&e.GkF(0)}function od(i,l){1&i&&e.GkF(0)}function nd(i,l){if(1&i){const a=e.EpF();e.YNc(0,K_,1,0,"ng-container",11)(1,j_,1,0,"ng-container",13)(2,ed,1,0,"ng-container",11)(3,td,1,0,"ng-container",11),e.TgZ(4,"lx-form-field",14)(5,"input",15),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.placeOfBirth.value,o)||(n.formData.placeOfBirth.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("placeOfBirth"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("placeOfBirth"))}),e.qZA()(),e.YNc(6,od,1,0,"ng-container",11),e.TgZ(7,"lx-form-field",16)(8,"lx-mother-tongue",17),e.Uc_("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.motherTongue.value,o)||(n.formData.motherTongue.value=o),e.KtG(o)}),e.NdJ("valueChange",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onValueChanges("motherTongue"))}),e.qZA()()}if(2&i){const a=e.oxw(),t=e.MAs(9),o=e.MAs(11),n=e.MAs(13),r=e.MAs(15),s=e.MAs(17);e.Q6J("ngTemplateOutlet",t),e.xp6(),e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(23,V_)),e.xp6(),e.Q6J("ngTemplateOutlet",n),e.xp6(),e.Q6J("ngTemplateOutlet",o),e.xp6(),e.Q6J("small",!0)("isValid",a.formData.placeOfBirth.isValid)("required",a.formData.placeOfBirth.required)("errorMessage",a.formData.placeOfBirth.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.placeOfBirth),e.E3D("ngModel",a.formData.placeOfBirth.value),e.Q6J("validationRequests",a.validationRequests),e.xp6(),e.Q6J("ngTemplateOutlet",s),e.xp6(),e.ekj("form-field__no-validation",!a.formData.motherTongue.value&&a.formData.motherTongue.isValid),e.Q6J("small",!0)("isValid",a.formData.motherTongue.isValid)("required",a.formData.motherTongue.required)("errorMessage",a.formData.motherTongue.errorMessage)("iconValidation",!0),e.xp6(),e.E3D("value",a.formData.motherTongue.value),e.Q6J("formData",a.formData.motherTongue)}}function id(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",25)(1,"input",15),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw(2);return e.nJJ(n.formData.identityDocument.value,o)||(n.formData.identityDocument.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw(2);return e.KtG(o.onAutoFill("identityDocument"))})("focusout",function(){e.CHM(a);const o=e.oxw(2);return e.KtG(o.recalculateFormValidation("identityDocument"))}),e.qZA()()}if(2&i){const a=e.oxw(2);e.Q6J("small",!0)("isValid",a.formData.identityDocument.isValid)("required",a.formData.identityDocument.required)("errorMessage",a.formData.identityDocument.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.identityDocument),e.
1E3D("ngModel",a.formData.identityDocument.value),e.Q6J("validationRequests",a.validationRequests)}}function ad(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",18)(1,"lx-title-selector",19),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.onSelectChanged("title",o))}),e.qZA()(),e.YNc(2,id,2,8,"lx-form-field",20),e.TgZ(3,"lx-form-field",21)(4,"input",22),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.firstName.value,o)||(n.formData.firstName.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("firstName"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("firstName"))}),e.qZA()(),e.TgZ(5,"lx-form-field",23)(6,"input",24),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.lastName.value,o)||(n.formData.lastName.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("lastName"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("lastName"))}),e.qZA()()}if(2&i){const a=e.oxw();e.ekj("form-field__no-validation",!a.formData.title.value&&a.formData.title.isValid),e.Q6J("small",!0)("isValid",a.formData.title.isValid)("required",a.formData.title.required)("errorMessage",a.formData.title.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("itemList",a.titleOptions)("formData",a.formData.title),e.xp6(),e.Q6J("ngIf",a.formData.identityDocument&&a.identityDocumentFieldIsEnabled),e.xp6(),e.Q6J("small",!0)("isValid",a.formData.firstName.isValid)("required",a.formData.firstName.required)("errorMessage",a.formData.firstName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.firstName),e.E3D("ngModel",a.formData.firstName.value),e.Q6J("validationRequests",a.validationRequests),e.uIk("autocomplete","given-name"),e.xp6(),e.Q6J("small",!0)("isValid",a.formData.lastName.isValid)("required",a.formData.lastName.required)("errorMessage",a.formData.lastName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.lastName),e.E3D("ngModel",a.formData.lastName.value),e.Q6J("validationRequests",a.validationRequests),e.uIk("autocomplete","family-name")}}function rd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-date-of-birth-field",26,7),e.ALo(2,"async"),e.NdJ("dateChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.onSelectBirthDate(o))}),e.qZA()}if(2&i){const a=e.MAs(1),t=e.oxw();e.Q6J("formData",t.formData.dateOfBirth)("validationRequests",t.validationRequests)("isValid",e.lcZ(2,5,a.enabledValidation$)?t.formData.dateOfBirth.isValid:null)("required",t.formData.dateOfBirth.required)("errorMessage",t.formData.dateOfBirth.errorMessage)}}function sd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",27),e.ALo(1,"lxEmailError"),e.TgZ(2,"input",28),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.email.value,o)||(n.formData.email.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("email"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("email"))}),e.qZA()(),e.TgZ(3,"lx-phone-number-field",29),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.updatePhoneNumber(o,"phoneNumber"))}),e.qZA()}if(2&i){const a=e.oxw();e.Q6J("small",!0)("isValid",a.formData.email.isValid)("required",a.formData.email.required)("errorMessage",e.lcZ(1,12,a.formData.email.value))("iconValidation",!0),e.xp6(2),e.Q6J("formData",a.formData.email),e.E3D("ngModel",a.formData.email.value),e.Q6J("validationRequests",a.validationRequests),e.uIk("autocomplete","email"),e.xp6(),e.Q6J("isValid",a.formData.phoneNumber.isValid)("required",a.formData.phoneNumber.required)("validationRequests",a.validationRequests)}}function ld(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",37)(1,"input",38),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw(2);return e.nJJ(n.formData.address.value,o)||(n.formData.address.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw(2);return e.KtG(o.onAutoFill("address"))})("focusout",function(){e.CHM(a);const o=e.oxw(2);return e.KtG(o.recalculateFormValidation("address"))}),e.qZA()()}if(2&i){const a=e.oxw(2);e.Q6J("small",!0)("isValid",a.formData.address.isValid)("required",a.formData.address.required)("errorMessage",a.formData.address.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.address),e.E3D("ngModel",a.formData.address.value),e.Q6J("validationRequests",a.validationRequests),e.uIk("autocomplete","address-line1")}}function _d(i,l){if(1&i){const a=e.EpF();e.YNc(0,ld,2,9,"lx-form-field",30),e.TgZ(1,"lx-form-field",31)(2,"input",32),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.postcode.value,o)||(n.formData.postcode.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("postcode"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("postcode"))}),e.qZA()(),e.TgZ(3,"lx-form-field",33)(4,"input",34),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.city.value,o)||(n.formData.city.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("city"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("city"))}),e.qZA()(),e.TgZ(5,"lx-form-field",35)(6,"lx-residence-country-selector",36),e.Uc_("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.countryOfResidence.value,o)||(n.formData.countryOfResidence.value=o),e.KtG(o)}),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.onSelectChanged("countryOfResidence",o))}),e.qZA()()}if(2&i){const a=l.fullAddress,t=e.oxw();e.Q6J("ngIf",a),e.xp6(),e.Q6J("small",!0)("isValid",t.formData.postcode.isValid)("required",t.formData.postcode.required)("errorMessage",t.formData.postcode.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",t.formData.postcode),e.E3D("ngModel",t.formData.postcode.value),e.Q6J("validationRequests",t.validationRequests),e.uIk("autocomplete","postal-code"),e.xp6(),e.Q6J("small",!0)("isValid",t.formData.city.isValid)("required",t.formData.city.required)("errorMessage",t.formData.city.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",t.formData.city),e.E3D("ngModel",t.formData.city.value),e.Q6J("validationRequests",t.validationRequests),e.uIk("autocomplete","address-level2"),e.xp6(),e.ekj("form-field__no-validation",!t.formData.countryOfResidence.value&&t.formData.countryOfResidence.isValid),e.Q6J("small",!0)("isValid",t.formData.countryOfResidence.isValid)("required",t.formData.countryOfResidence.required)("errorMessage",t.formData.countryOfResidence.errorMessage)("iconValidation",!0),e.xp6(),e.E3D("value",t.formData.countryOfResidence.value),e.Q6J("formData",t.formData.countryOfResidence)}}function dd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",39)(1,"lx-nationality-selector",40),e.Uc_("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.nationality.value,o)||(n.formData.nationality.value=o),e.KtG(o)}),e.NdJ("valueChange",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onValueChanges("nationality"))}),e.qZA()()}if(2&i){const a=e.oxw();e.ekj("form-field__no-validation",!a.formData.nationality.value&&a.formData.nationality.isValid),e.Q6J("small",!0)("isValid",a.formData.nationality.isValid)("required",a.formData.nationality.required)("errorMessage",a.formData.nationality.errorMessage)("iconValidation",!0),e.xp6(),e.E3D("value",a.formData.nationality.value),e.Q6J("formData",a.formData.nationality)}}let un,pn,mn,gn,fn,On,hn,Cn,Sn,Tn,cn=(()=>{var i;class l extends Ce.h{constructor(t){super(t),this.validationRequests=0,this.calendarMaxDate=(0,m.x2)(),this.titleOptions=[{code:oe.b.MR,name:$localize(zo||(zo=qr||(qr=c(["Mr."]))))},{code:oe.b.MS,name:$localize(Yo||(Yo=Ur||(Ur=c(["Ms."]))))}],this.identityDocumentFieldIsEnabled=!1}ngOnInit(){this.identityDocumentFieldIsEnabled=Bo.e.getValue("ENROLLMENT_IDENTITY_DOCUMENT_ENABLED"),super.ngOnInit()}onValueChanges(t){this.formData[t].validate(),this.storeStudentDetails()}onSelectChanged(t,o){this.formData[t].value=o,this.onValueChanges(t)}onSelectBirthDate(t){this.formData.dateOfBirth.value=(0,m.SZ)(t),this.onValueChanges("dateOfBirth")}updatePhoneNumber(t,o){this.formData.phoneNumber.value=t||void 0,this.onValueChanges(o)}splitPhoneDigits(t,o){return null==t?void 0:t.split(" ")[o]}
1isEnrolmentForm(){return this.formType===S.d.ENROLLMENT}isPriceRequestForm(){return this.formType===S.d.PRICE_REQUEST}recalculateFormValidation(t){this.onValueChanges(t),Object.entries(this.formData).forEach(([o,n])=>{n.recalculateRequired(),n.value&&n.validate()})}onAutoFill(t){this.recalculateFormValidation(t)}getFormFields(){const t={title:{value:null,validator:s=>{var _;return(null===(_=this.titleOptions)||void 0===_?void 0:_.findIndex(({code:d})=>d===s))>=0},errorMessage:y.cl,required:!0},firstName:{value:"",validator:s=>s&&s.length<=80,errorMessage:y.cl,required:!0},lastName:{value:"",validator:s=>s&&s.length<=40,errorMessage:y.cl,required:!0},email:{value:"",validator:s=>(0,We.L)(s),errorMessage:null,required:!0},phoneNumber:{value:"",validator:s=>s&&(0,te.tH)(s)&&this.splitPhoneDigits(s,1).length>4&&/\d/.test(s),errorMessage:null,required:!0},postcode:{value:"",validator:s=>s&&s.length>3&&s.length<=20,errorMessage:y.cl,required:!0},city:{value:"",validator:s=>s&&s.length<=40,errorMessage:y.cl,required:!0},countryOfResidence:{value:this.getCountryOfResidence(),validator:Boolean,errorMessage:y.cl,required:!0}},o={identityDocument:{value:"",validator:s=>s&&s.length>0,errorMessage:y.cl,required:this.identityDocumentFieldIsEnabled},address:{value:"",validator:s=>s&&s.length<80,errorMessage:y.cl,required:!0},placeOfBirth:{value:"",validator:s=>s&&s.length<80,errorMessage:y.cl,required:!0},motherTongue:{value:"",validator:s=>!!s,errorMessage:y.cl,required:!0}},n={dateOfBirth:{value:null,validator:s=>new Date(s).getTime()<this.calendarMaxDate.getTime(),errorMessage:y.cl,required:!0}},r={nationality:{value:"",validator:s=>!!s,errorMessage:y.cl,required:!0}};return{...t,...this.isEnrolmentForm()||this.isPriceRequestForm()?n:{},...this.isEnrolmentForm()||this.isPriceRequestForm()?r:{},...this.isEnrolmentForm()?o:{}}}getFieldsValues(t){const o={};return t.forEach(n=>{(void 0!==this.getFieldValueIfValid(n)||this.getFormFields()[n].required)&&(o[n]=this.getFieldValueIfValid(n))}),o}getCountryOfResidence(){var t,o;return null!==(t=null===(o=this.stepService.getResidenceData())||void 0===o?void 0:o.countryOfResidence)&&void 0!==t?t:""}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(I.Q))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-tell-us-about-you-section"]],inputs:{formType:"formType",validationRequests:"validationRequests",withValidationErrors:"withValidationErrors"},features:[e.qOj],decls:18,vars:3,consts:()=>{let a,t,o,n,r,s,_,d,u,g,f,O,T,v,x;return a=$localize(Xo||(Xo=wr||(wr=c(["Tell Us About You"])))),t=$localize(Ho||(Ho=$r||($r=c(["Place of birth"])))),o=$localize(Wo||(Wo=Qr||(Qr=c(["Mother tongue"])))),n=$localize(Ko||(Ko=kr||(kr=c(["Title"])))),r=$localize(jo||(jo=Br||(Br=c(["N.I.F / N.I.E / PASAPORTE"])))),s=$localize(en||(en=Vr||(Vr=c(["First name"])))),_=$localize(tn||(tn=Gr||(Gr=c(["Last name"])))),d=$localize(on||(on=Jr||(Jr=c(["Date of birth"])))),u=$localize(nn||(nn=Zr||(Zr=c(["Email address"])))),g=$localize(an||(an=zr||(zr=c(["Phone number"])))),f=$localize(rn||(rn=Yr||(Yr=c(["Address"])))),O=$localize(sn||(sn=Xr||(Xr=c(["Postcode"])))),T=$localize(ln||(ln=Hr||(Hr=c(["City/Town"])))),v=$localize(_n||(_n=Wr||(Wr=c(["Country"])))),x=$localize(dn||(dn=Kr||(Kr=c(["Nationality"])))),[["freeQuoteFormFields",""],["enrollmentFormFields",""],["fullNameFields",""],["dateOfBirthField",""],["contactFields",""],["addressFields",""],["nationalityField",""],["validity","lxFormDataCustomComponentValidity"],[1,"error-message"],["ngProjectAs","additional-info",5,["additional-info"],4,"ngIf"],["sectionTitle",a,"data-qa","enrolment-tell-us",3,"sectionIndex"],[4,"ngTemplateOutlet"],["ngProjectAs","additional-info",5,["additional-info"]],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["label",t,"data-qa","enrolment-place-of-birthday",1,"form-field__single-border-input",3,"small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",o,1,"enrolment-form__field-mother-tongue","form-field__validated-selector-padding",3,"small","isValid","required","errorMessage","iconValidation"],["data-qa","enrolment-mother-language","lxFormDataDropdownValidity","",3,"valueChange","value","formData"],["label",n,1,"form-field__validated-selector-padding",3,"small","isValid","required","errorMessage","iconValidation"],["data-qa","enrolment-mother-language","lxFormDataDropdownValidity","",3,"valueChange","itemList","formData"],["label",r,"data-qa","qt-identity-document-field",3,"small","isValid","required","errorMessage","iconValidation",4,"ngIf"],["label",s,1,"qt-form-section__start-new-line","form-field__single-border-input",3,"small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","","data-qa","qt-first-name-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",_,1,"form-field__single-border-input",3,"small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","","data-qa","qt-last-name-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",r,"data-qa","qt-identity-document-field",3,"small","isValid","required","errorMessage","iconValidation"],["label",d,"lxFormDataCustomComponentValidity","","data-qa","enrolment-date-birthday-date-picker",3,"dateChange","formData","validationRequests","isValid","required","errorMessage"],["label",u,1,"form-field__single-border-input",3,"small","isValid","required","errorMessage","iconValidation"],["type","email","pInputText","","lxFormDataEmailValidity","","lxBlockSpaces","","data-qa","qt-email-selector",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",g,1,"form-field__search-bar","form-field__single-border-input",3,"valueChange","isValid","required","validationRequests"],["class","form-field__single-border-input","label",f,3,"small","isValid","required","errorMessage","iconValidation",4,"ngIf"],["label",O,1,"form-field__single-border-input",3,"small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataPostcodeValidity","","data-qa","qt-post-code-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",T,1,"form-field__single-border-input",3,"small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","","data-qa","qt-city-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",v,1,"form-field__validated-selector-padding","form-field__no-border-dropdown",3,"small","isValid","required","errorMessage","iconValidation"],["data-qa","qt-country-selector","lxFormDataDropdownValidity","",3,"valueChange","value","formData"],["label",f,1,"form-field__single-border-input",3,"small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","","data-qa","qt-address-field",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",x,1,"form-field__validated-selector-padding",3,"small","isValid","required","errorMessage","iconValidation"],["data-qa","enrolment-nationality-field","lxFormDataDropdownValidity","",3,"valueChange","value","formData"]]},template:function(t,o){if(1&t&&(e.TgZ(0,"div",8),e.YNc(1,G_,1,0,"lx-form-error-message",9),e.qZA(),e.TgZ(2,"lx-section-template",10),e.YNc(3,J_,1,0,"ng-container",11),e.qZA(),e.YNc(4,W_,5,7,"ng-template",null,0,e.W1O)(6,nd,9,24,"ng-template",null,1,e.W1O)(8,ad,7,28,"ng-template",null,2,e.W1O)(10,rd,3,7,"ng-template",null,3,e.W1O)(12,sd,4,14,"ng-template",null,4,e.W1O)(14,_d,7,28,"ng-template",null,5,e.W1O)(16,dd,2,9,"
1ng-template",null,6,e.W1O)),2&t){const n=e.MAs(5),r=e.MAs(7);e.xp6(),e.Q6J("ngIf",o.withValidationErrors),e.xp6(),e.Q6J("sectionIndex",o.sectionIndex),e.xp6(),e.Q6J("ngTemplateOutlet",o.isEnrolmentForm()?r:n)}},dependencies:[h.O5,h.tP,M.Fj,M.JJ,M.On,k_.b,So.a,To.W,tt.s,me.o,re.h,Be.$,W,Ct,Ve.J,fo.y,Ke.l,je.q,ye.K,Oo.X,et.M,ho.e,h.Ov,ot.y],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}[_nghost-%COMP%] .error-message[_ngcontent-%COMP%]{margin-bottom:20px}"]}),l})();function cd(i,l){1&i&&e.GkF(0)}function ud(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",4)(1,"input",5),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.contactPersonFirstName.value,o)||(n.formData.contactPersonFirstName.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("contactPersonFirstName"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("contactPersonFirstName"))}),e.qZA()(),e.TgZ(2,"lx-form-field",6)(3,"input",7),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.contactPersonLastName.value,o)||(n.formData.contactPersonLastName.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("contactPersonLastName"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("contactPersonLastName"))}),e.qZA()(),e.TgZ(4,"lx-phone-number-field",8),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.updatePhoneNumber(o,"contactPersonPhone"))}),e.qZA()}if(2&i){const a=e.oxw();e.Q6J("small",!0)("isValid",a.formData.contactPersonFirstName.isValid)("required",a.formData.contactPersonFirstName.required)("errorMessage",a.formData.contactPersonFirstName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.contactPersonFirstName),e.E3D("ngModel",a.formData.contactPersonFirstName.value),e.Q6J("validationRequests",a.validationRequests),e.xp6(),e.Q6J("small",!0)("isValid",a.formData.contactPersonLastName.isValid)("required",a.formData.contactPersonLastName.required)("errorMessage",a.formData.contactPersonLastName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.contactPersonLastName),e.E3D("ngModel",a.formData.contactPersonLastName.value),e.Q6J("validationRequests",a.validationRequests),e.xp6(),e.Q6J("isValid",a.formData.contactPersonPhone.isValid)("required",a.formData.contactPersonPhone.required)("validationRequests",a.validationRequests)}}function pd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",9)(1,"input",5),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.legalRepresentativeFirstName.value,o)||(n.formData.legalRepresentativeFirstName.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("legalRepresentativeFirstName"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("legalRepresentativeFirstName"))}),e.qZA()(),e.TgZ(2,"lx-form-field",10)(3,"input",5),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.legalRepresentativeLastName.value,o)||(n.formData.legalRepresentativeLastName.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("legalRepresentativeLastName"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("legalRepresentativeLastName"))}),e.qZA()(),e.TgZ(4,"lx-form-field",11),e.ALo(5,"lxEmailError"),e.TgZ(6,"input",12),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.legalRepresentativeEmail.value,o)||(n.formData.legalRepresentativeEmail.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("legalRepresentativeEmail"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("legalRepresentativeEmail"))}),e.qZA()(),e.TgZ(7,"lx-phone-number-field",13),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.updatePhoneNumber(o,"legalRepresentativeMobile"))}),e.qZA(),e.TgZ(8,"lx-form-field",14)(9,"input",5),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.legalRepresentativeAddress.value,o)||(n.formData.legalRepresentativeAddress.value=o),e.KtG(o)}),e.NdJ("lxNativeAutofill",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onAutoFill("legalRepresentativeAddress"))})("focusout",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.recalculateFormValidation("legalRepresentativeAddress"))}),e.qZA()()}if(2&i){const a=e.oxw();e.Q6J("small",!0)("isValid",a.formData.legalRepresentativeFirstName.isValid)("required",a.formData.legalRepresentativeFirstName.required)("errorMessage",a.formData.legalRepresentativeFirstName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.legalRepresentativeFirstName),e.E3D("ngModel",a.formData.legalRepresentativeFirstName.value),e.Q6J("validationRequests",a.validationRequests),e.xp6(),e.Q6J("small",!0)("isValid",a.formData.legalRepresentativeLastName.isValid)("required",a.formData.legalRepresentativeLastName.required)("errorMessage",a.formData.legalRepresentativeLastName.errorMessage)("iconValidation",!0),e.xp6(),e.Q6J("formData",a.formData.legalRepresentativeLastName),e.E3D("ngModel",a.formData.legalRepresentativeLastName.value),e.Q6J("validationRequests",a.validationRequests),e.xp6(),e.Q6J("small",!0)("isValid",a.formData.legalRepresentativeEmail.isValid)("required",a.formData.legalRepresentativeEmail.required)("errorMessage",e.lcZ(5,34,a.formData.legalRepresentativeEmail.value))("iconValidation",!0),e.xp6(2),e.Q6J("formData",a.formData.legalRepresentativeEmail),e.E3D("ngModel",a.formData.legalRepresentativeEmail.value),e.Q6J("validationRequests",a.validationRequests),e.xp6(),e.Q6J("isValid",a.formData.legalRepresentativeMobile.isValid)("required",a.formData.legalRepresentativeMobile.required)("validationRequests",a.validationRequests),e.xp6(),e.Q6J("small",!0)("isValid",a.formData.legalRepresentativeAddress.isValid)("required",a.formData.legalRepresentativeAddress.required)("errorMessage",a.formData.legalRepresentativeAddress.errorMessage),e.xp6(),e.Q6J("formData",a.formData.legalRepresentativeAddress),e.E3D("ngModel",a.formData.legalRepresentativeAddress.value),e.Q6J("validationRequests",a.validationRequests)}}let md=(()=>{var i;class l extends Ce.h{constructor(){super(...arguments),this.formChanges=new e.vpe,this.validationRequests=0}ngOnChanges(){this.sectionTitle=this.isAdultSchool()?$localize(un||(un=jr||(jr=c(["Emergency contact details"])))):$localize(pn||(pn=es||(es=c(["Parents or guardian/legal representative"]))))}onValueChanges(t){var o;this.formData[t].validate(),this.storeStudentDetails({duringYourStay:{...null===(o=this.getStudentDetails())||void 0===o?void 0:o.duringYourStay,...this.getFormValues()}})}updatePhoneNumber(t,o){this.getPhoneNumberType(t,o),this.onValueChanges(o),this.recalculateFormValidation(o)}getPhoneNumberType(t,o){switch(o){case"contactPersonPhone":return this.formData.contactPersonPhone.value=t||void 0;case"legalRepresentativeMobile":return this.formData.legalRepresentativeMobile.value=t||void 0;default:return}}splitPhoneDigits(t,o){return null==t?void 0:t.split(" ")[o]}recalculateFormValidation(t){this.onValueChanges(t),Object.entries(this.formData).forEac
1h(([o,n])=>{n.recalculateRequired(),n.value&&n.validate()})}onAutoFill(t){this.recalculateFormValidation(t)}getFormFields(){return{legalRepresentativeFirstName:{value:"",validator:t=>t&&t.length<80,errorMessage:y.cl,required:!0},legalRepresentativeLastName:{value:"",validator:t=>t&&t.length<80,errorMessage:y.cl,required:!0},legalRepresentativeEmail:{value:"",validator:t=>(0,We.L)(t),errorMessage:null,required:!0},legalRepresentativeAddress:{value:null,validator:t=>t&&t.length<80,errorMessage:y.cl,required:!1},legalRepresentativeMobile:{value:null,validator:t=>t&&(0,te.tH)(t)&&this.splitPhoneDigits(t,1).length>4&&/\d/.test(t),errorMessage:null,required:!0},contactPersonFirstName:{value:null,validator:t=>t&&(null==t?void 0:t.length)<=80,errorMessage:y.cl,required:!0},contactPersonLastName:{value:null,validator:t=>t&&(null==t?void 0:t.length)<=80,errorMessage:y.cl,required:!0},contactPersonPhone:{value:null,validator:t=>t&&(0,te.tH)(t)&&this.splitPhoneDigits(t,1).length>4&&/\d/.test(t),errorMessage:null,required:!0}}}getFieldsValues(t){const o={};return t.forEach(n=>{(void 0!==this.getFieldValueIfValid(n)||this.getFormFields()[n].required)&&(o[n]=this.getFieldValueIfValid(n))}),o}}return(i=l).\u0275fac=(()=>{let a;return function(o){return(a||(a=e.n5z(i)))(o||i)}})(),i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-contact-person-section"]],inputs:{validationRequests:"validationRequests"},outputs:{formChanges:"formChanges"},features:[e.qOj,e.TTD],decls:6,vars:3,consts:()=>{let a,t,o,n,r,s,_,d;return a=$localize(mn||(mn=ts||(ts=c(["Emergency Contact person - First name"])))),t=$localize(gn||(gn=os||(os=c(["Emergency Contact person - Last name"])))),o=$localize(fn||(fn=ns||(ns=c(["Emergency Contact person - mobile"])))),n=$localize(On||(On=is||(is=c(["First name"])))),r=$localize(hn||(hn=as||(as=c(["Last name"])))),s=$localize(Cn||(Cn=rs||(rs=c(["Email address"])))),_=$localize(Sn||(Sn=ss||(ss=c(["Phone number"])))),d=$localize(Tn||(Tn=ls||(ls=c(["Address (if different)"])))),[["adultTemplate",""],["juniorTemplate",""],[3,"sectionIndex","sectionTitle"],[4,"ngTemplateOutlet"],["label",a,"data-qa","enrolment-emergency-contact-first-name",3,"small","isValid","required","errorMessage","iconValidation"],["pInputText","","type","text","lxFormDataInputValidity","",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",t,"data-qa","enrolment-emergency-contact-last-name",3,"small","isValid","required","errorMessage","iconValidation"],["type","text","pInputText","","lxFormDataInputValidity","",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",o,"data-qa","enrolment-emergency-contact-mobile",1,"form-field__search-bar",3,"valueChange","isValid","required","validationRequests"],["label",n,"data-qa","enrolment-juniors-legal-representative-first-name",3,"small","isValid","required","errorMessage","iconValidation"],["label",r,"data-qa","enrolment-juniors-legal-representative-last-name",3,"small","isValid","required","errorMessage","iconValidation"],["label",s,"data-qa","enrolment-juniors-legal-representative-email",3,"small","isValid","required","errorMessage","iconValidation"],["pInputText","","type","text","lxFormDataEmailValidity","","lxBlockSpaces","",3,"ngModelChange","lxNativeAutofill","focusout","formData","ngModel","validationRequests"],["label",_,"data-qa","enrolment-juniors-legal-representative-phone",1,"form-field__search-bar",3,"valueChange","isValid","required","validationRequests"],["label",d,"data-qa","enrolment-juniors-legal-representative-address-different",3,"small","isValid","required","errorMessage"]]},template:function(t,o){if(1&t&&(e.TgZ(0,"lx-section-template",2),e.YNc(1,cd,1,0,"ng-container",3),e.qZA(),e.YNc(2,ud,5,19,"ng-template",null,0,e.W1O)(4,pd,10,36,"ng-template",null,1,e.W1O)),2&t){const n=e.MAs(3),r=e.MAs(5);e.Q6J("sectionIndex",o.sectionIndex)("sectionTitle",o.sectionTitle),e.xp6(),e.Q6J("ngTemplateOutlet",o.isAdultSchool()?n:r)}},dependencies:[h.tP,M.Fj,M.JJ,M.On,tt.s,me.o,re.h,W,Ke.l,je.q,ye.K,et.M,ot.y],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}
1[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}"]}),l})();var En=p(4801),Mn=p(75),R=p(2096);let gd=(()=>{var i;class l extends En.b{constructor(){super(...arguments),this.productsApiService=(0,e.f3M)(Ht.R),this.responseCache=new Mn.Y(()=>this.productsApiService.getInsuranceOptions(this.locale,this.companyHeader),this.cacheSettings.get)}getResponseCache$(){return(0,R.of)(this.responseCache)}}return(i=l).\u0275fac=(()=>{let a;return function(o){return(a||(a=e.n5z(i)))(o||i)}})(),i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();var ne=p(7394);const fd=["*"];let vn,Nn,Rn,xn,yn,In,Pn,Ln,Od=(()=>{var i;class l{constructor(){this.valueChange=new e.vpe,this.isHovered=!1}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-checkbox"]],inputs:{value:"value"},outputs:{valueChange:"valueChange"},ngContentSelectors:fd,decls:5,vars:3,consts:[[1,"checkbox-container"],[1,"checkbox-container__box"],[3,"ngModelChange","value","binary","ngModel"],[1,"checkbox-container__text",3,"click","mouseenter","mouseleave"]],template:function(t,o){1&t&&(e.F$t(),e.TgZ(0,"div",0)(1,"div",1)(2,"p-checkbox",2),e.Uc_("ngModelChange",function(r){return e.nJJ(o.value,r)||(o.value=r),r}),e.NdJ("ngModelChange",function(r){return o.valueChange.emit(r)}),e.qZA()(),e.TgZ(3,"div",3),e.NdJ("click",function(){return o.value=!o.value})("mouseenter",function(){return o.isHovered=!0})("mouseleave",function(){return o.isHovered=!1}),e.Hsn(4),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("value",o.value)("binary",!0),e.E3D("ngModel",o.value))},dependencies:[M.JJ,M.On,he.XZ],styles:["[_nghost-%COMP%] .checkbox-container[_ngcontent-%COMP%]{display:grid;padding:15px;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto}[_nghost-%COMP%] .checkbox-container__box[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .checkbox-container__text[_ngcontent-%COMP%]{color:var(--color-grey-8, #404040);cursor:pointer;font-size:var(--font-size-normal, 14px);font-weight:var(--font-weight-regular, 400);align-content:center;-webkit-padding-start:10px;padding-inline-start:10px}"]}),l})();function hd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",8)(1,"lx-checkbox",9),e.Uc_("valueChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.formData.smoker.value,o)||(n.formData.smoker.value=o),e.KtG(o)}),e.NdJ("valueChange",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.onValueChanges("smoker"))}),e.SDv(2,1),e.qZA()()}if(2&i){const a=e.oxw();e.Q6J("isValid",a.formData.smoker.isValid)("small",!0),e.xp6(),e.E3D("value",a.formData.smoker.value)}}function Cd(i,l){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"p-checkbox",16),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.selectedInsuranceOptions,o)||(n.selectedInsuranceOptions=o),e.KtG(o)}),e.NdJ("ngModelChange",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.saveInsuranceOptions())}),e.qZA(),e.BQk()}if(2&i){const a=l.$implicit,t=e.oxw();e.xp6(),e.Q6J("value",a.insuranceType)("label",a.name),e.E3D("ngModel",t.selectedInsuranceOptions)}}const _e="duringYourStay";let Td=(()=>{var i;class l extends Ce.h{constructor(){super(...arguments),this.selectedHostFamilyOptions={isNonSmokingFamily:void 0,hasChildrenFamily:void 0,hasPetsFamily:void 0,hasStudentsFamily:void 0},this.stepService=(0,e.f3M)(I.Q),this.insuranceOptionService=(0,e.f3M)(gd),this.subscription=new ne.w0}ngOnInit(){super.ngOnInit(),this.getItemList()}saveInsuranceOptions(){this.storeStudentDetails({selectedInsuranceOptions:this.selectedInsuranceOptions})}updateFamilyOptions(t){this.selectedHostFamilyOptions=t,this.onValueChanges("hostFamilyOptions")}ngOnDestroy(){this.subscription.unsubscribe()}onValueChanges(t){this.formData[t].validate();const o=this.getStudentDetails();this.storeStudentDetails({duringYourStay:{...o.duringYourStay,...this.getGroupValues(_e),...this.selectedHostFamilyOptions},extras:{...o.selectedInsuranceOptions,...this.selectedInsuranceOptions}})}getFormFields(){return{leisure:{value:null,validator:()=>!0,required:!1,group:_e},specialDiet:{value:null,validator:()=>!0,required:!1,group:_e},allergies:{value:null,validator:()=>!0,required:!1,group:_e},vegetarian:{value:!1,validator:()=>!0,required:!1,group:_e},smoker:{value:!1,validator:()=>!0,required:!1,group:_e},otherWishes:{value:null,validator:()=>!0,required:!1,group:_e},hostFamilyOptions:{value:{isNonSmokingFamily:void 0,hasChildrenFamily:void 0,hasPetsFamily:void 0,hasStudentsFamily:void 0},validator:()=>!0,required:!1,group:"hostFamilyOptions"}}}getItemList(){this.subscription.add(this.insuranceOptionService.getAll().subscribe(t=>{this.insuranceOptions=t.map(se.I8)}))}}return(i=l).\u0275fac=(()=>{let a;return function(o){return(a||(a=e.n5z(i)))(o||i)}})(),i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-extras-selection"]],features:[e.qOj],decls:18,vars:25,consts:()=>{let a,t,o,n,r,s,_,d;return a=$localize(vn||(vn=_s||(_s=c(["Further information"])))),t=$localize(Nn||(Nn=ds||(ds=c(["Leisure/Interest"])))),o=$localize(Rn||(Rn=cs||(cs=c(["Special diet"])))),n=$localize(xn||(xn=us||(us=c(["Allergies"])))),r=$localize(yn||(yn=ps||(ps=c(["Other wishes"])))),s=$localize(In||(In=ms||(ms=c(["Insurance"])))),_=$localize(Pn||(Pn=gs||(gs=c(["Vegetarian"])))),d=$localize(Ln||(Ln=fs||(fs=c(["Smoker"])))),[_,d,["sectionTitle",a,3,"sectionIndex"],["label",t,"data-qa","enrolment-leisure-field",3,"small","isValid"],["pInputText","","type","text",3,"focusout","ngModelChange","ngModel"],["label",o,"data-qa","enrolment-special-diet-field",3,"small","isValid"],["label",n,"data-qa","enrolment-allergies-field",3,"small","isValid"],[1,"extras__check-box-container"],[3,"isValid","small"],[3,"valueChange","value"],[3,"isValid","small",4,"ngIf"],["label",r,"data-qa","enrolment-other-wishes-field",1,"qt-form-section__double-column-span",3,"small","isValid"],[1,"extras-selection__host-family-selection",3,"valueChanges"],["label",s,1,"qt-form-section__double-column-span",3,"small","isValid","required"],[1,"insurance-option-container"],[4,"ngFor","ngForOf"],["name","insuranceOption",3,"ngModelChange","value","label","ngModel"]]},template:function(t,o){1&t&&(e.TgZ(0,"lx-section-template",2)(1,"lx-form-field",3)(2,"input",4),e.NdJ("focusout",function(){return o.onValueChanges("leisure")}),e.Uc_("ngModelChange",function(r){return e.nJJ(o.formData.leisure.value,r)||(o.formData.leisure.value=r),r}),e.qZA()(),e.TgZ(3,"lx-form-field",5)(4,"input",4),e.NdJ("focusout",function(){return o.onValueChanges("specialDiet")}),e.Uc_("ngModelChange",function(r){return e.nJJ(o.formData.specialDiet.value,r)||(o.formData.specialDiet.value=r),r}),e.qZA()(),e.TgZ(5,"lx-form-field",6)(6,"input",4),e.NdJ("focusout",function(){return o.onValueChanges("allergies")}),e.Uc_("ngModelChange",function(r){return e.nJJ(o.formData.allergies.value,r)||(o.formData.allergies.value=r),r}),e.qZA()(),e.TgZ(7,"div",7)(8,"lx-form-field",8)(9,"lx-checkbox",9),e.Uc_("valueChange",function(r){return e.nJJ(o.formData.vegetarian.value,r)||(o.formData.vegetarian.value=r),r}),e.NdJ("valueChange",function(){return o.onValueChanges("vegetarian")}),e.SDv(10,0),e.qZA()(),e.YNc(11,hd,3,3,"lx-form-field",10),e.qZA(),e.TgZ(12,"lx-form-field",11)(13,"input",4),e.NdJ("focusout",function(){return o.onValueChanges("otherWishes")}),e.Uc_("ngModelChange",function(r){return e.nJJ(o.formData.otherWishes.value,r)||(o.formData.otherWishes.value=r),r}),e.qZA()(),e.TgZ(14,"lx-host-family-selection",12),e.NdJ("valueChanges",function(r){return o.updateFamilyOptions(r)}),e.qZA(),e.TgZ(15,"lx-form-field",13)(16,"div",14),e.YNc(17,Cd,2,3,"ng-container",15),e.qZA()()()),2&t&&(e.Q6J("sectionIndex",o.sectionIndex),e.xp6(),e.Q6J("small",!0)("isValid",o.formData.leisure.isValid),e.xp6(),e.E3D("ngModel",o.formData.leisure.value),e.xp6(),e.Q6J("small",!0)("isValid",o.formData.specialDiet.isValid),e.xp6(),e.E3D("ngModel",o.formData.specialDiet.value),e.xp6(),e.Q6J("small",!0)("isValid",o.formData.allergies.isValid),e.xp6(),e.E3D("ngModel",o.formData.allergies.value),e.xp6(),e.ekj("extras__check-box-container--one-column",!o.isAdultSchool())("extras__check-box-container--two-columns",o.isAdultSchool()),e.xp6(),e.Q6J("isValid",o.formData.vegetarian.isValid)("small",!0),e.xp6(),e.E3D("value",o.formData.vegetarian.value),e.xp6(2),e.Q6J("ngIf",o.isAdultSchool()),e.xp6(),e.Q6J("small",!0)("isValid",o.formData.otherWishes.isValid),e.xp6(),e.E3D("ngModel",o.formData.otherWishes.value),e.xp6(2),e.Q6J("small",!0)("isValid",!0)("required",!1),e.xp6(2),e.Q6J("ngForOf",o.insuranceOptions))},dependencies:[h.sg,h.O5,Od,M.Fj,M.JJ,M.On,he.XZ,me.o,re.h,Ft,W],styles:["[_nghost-%COMP%] .extras__check-box-container[_ngcontent-%COMP%]{display:grid;row-gap:20px}[_nghost-%COMP%] .extras__check-box-container--one-column[_ngcontent-%COMP%]{grid-template-columns:none}@media (min-width: 768px){[_nghost-%COMP%] .extras__check-box-container--one-column[_ngcontent-%COMP%]{margin-top:32px;display:grid}}[_nghost-%COMP%] .extras__check-box-container--two-columns[_ngcontent-%COMP%]{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;grid-template-columns:none}@media (min-width: 768px){[_nghost-%COMP%] .extras__check-box-container--two-columns[_ngcontent-%COMP%]{margin-top:32px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));-moz-column-gap:20px;column-gap:20px}}[_nghost-%COMP%] .insurance-option-container[_ngcontent-%COMP%] p-checkbox[_ngcontent-%COMP%]{display:block;margin:20px}[_nghost-%COMP%] .insurance-option-container[_ngcontent-%COMP%] p-checkbox[_ngcontent-%COMP%] .p-checkbox-label{font-size:var(--font-size-normal, 14px);font-weight:var(--font-weight-regular, 400);
1cursor:pointer;color:var(--color-grey-7, #606060)}@media (min-width: 768px){[_nghost-%COMP%] .extras-selection__host-family-selection[_ngcontent-%COMP%]{grid-column:1/span 2}}"]}),l})();const Ed=["tellUsAboutYouForm"],Md=["contactPersonForm"],vd=["termsAndPromotionsForm"],Nd=["bookingForm"];function Rd(i,l){1&i&&(e.TgZ(0,"div",8),e._UZ(1,"lx-form-error-message",9),e.qZA())}let xd=(()=>{var i;class l{constructor(){this.validationRequests=0,this.stepValid$=new X.X(!1),this.destroyRef=(0,e.f3M)(e.ktI),this.destroy$=new L.x,this.stepService=(0,e.f3M)(I.Q),this.quoteToolFormStore=(0,e.f3M)(Fe.z)}ngOnInit(){this.stepService.setStepValid(this.stepValid$),this.formType=this.stepService.getFormType(),this.withValidationErrors$=this.quoteToolFormStore.disabledNextButton$,this.withValidationErrors$.pipe((0,U.sL)(this.destroyRef)).subscribe(t=>{t&&(this.validationRequests=1)}),(0,D.a)([this.stepService.quoteRequest$,this.stepService.studentDetails$]).pipe((0,ge.b)(160),(0,q.b)(([t])=>{this.schoolType=t.schoolType,this.tellUsAboutYouSectionIndex=Qo(this.formType,t.hasSupplementsAvailable)}),(0,F.R)(this.destroy$)).subscribe(([t,o])=>{this.stepValid$.next(Zo(t,o))}),(0,D.a)([this.quoteToolFormStore.validationRequests$,this.stepValid$]).pipe((0,F.R)(this.destroy$)).subscribe(([t,o])=>{this.quoteToolFormStore.updateDisabledNextButton(!o&&t>0)}),this.stepService.currentStepDefinition$.pipe((0,q.b)(({submittableForm$:t})=>{this.submittableForm$=t}),(0,k.w)(({requestValidation$:t})=>t||new L.x),(0,F.R)(this.destroy$)).subscribe(()=>this.validateForms())}ngOnDestroy(){this.destroy$.next()}validateForms(){var t,o,n,r;[null===(t=this.tellUsAboutYouForm)||void 0===t?void 0:t.formData,null===(o=this.contactPersonForm)||void 0===o?void 0:o.formData,null===(n=this.termsAndPromotionsForm)||void 0===n?void 0:n.formData].forEach(s=>{s&&Object.entries(s).forEach(([,_])=>{_.recalculateRequired(),_.validate()})}),this.submittableForm$.next(this.stepValid$.value),null===(r=this.bookingFormRef)||void 0===r||null===(r=r.nativeElement)||void 0===r||r.scrollIntoView({behavior:"smooth"})}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-booking-form-step"]],viewQuery:function(t,o){if(1&t&&(e.Gf(Ed,5),e.Gf(Md,5),e.Gf(vd,5),e.Gf(Nd,5)),2&t){let n;e.iGM(n=e.CRH())&&(o.tellUsAboutYouForm=n.first),e.iGM(n=e.CRH())&&(o.contactPersonForm=n.first),e.iGM(n=e.CRH())&&(o.termsAndPromotionsForm=n.first),e.iGM(n=e.CRH())&&(o.bookingFormRef=n.first)}},decls:11,vars:11,consts:[["bookingForm",""],["tellUsAboutYouForm",""],["contactPersonForm",""],["termsAndPromotionsForm",""],["class","booking-form__error-message",4,"ngIf"],[3,"formType","sectionIndex","validationRequests"],[1,"form-field__single-border-input",3,"schoolType","sectionIndex"],[1,"form-field__single-border-input",3,"schoolType","sectionIndex","validationRequests"],[1,"booking-form__error-message"],["ngProjectAs","additional-info",5,["additional-info"]]],template:function(t,o){1&t&&(e.YNc(0,Rd,2,0,"div",4),e.ALo(1,"async"),e.TgZ(2,"div",null,0),e._UZ(4,"lx-tell-us-about-you-section",5,1)(6,"lx-extras-selection",6)(7,"lx-contact-person-section",7,2)(9,"lx-terms-and-promotions-form-section",null,3),e.qZA()),2&t&&(e.Q6J("ngIf",!0===e.lcZ(1,9,o.withValidationErrors$)),e.xp6(4),e.Q6J("formType",o.formType)("sectionIndex",o.tellUsAboutYouSectionIndex)("validationRequests",o.validationRequests),e.xp6(2),e.Q6J("schoolType",o.schoolType)("sectionIndex",o.tellUsAboutYouSectionIndex+1),e.xp6(),e.Q6J("schoolType",o.schoolType)("sectionIndex",o.tellUsAboutYouSectionIndex+2)("validationRequests",o.validationRequests))},dependencies:[h.O5,Le,Ve.J,cn,md,Td,h.Ov],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}
1[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}[_nghost-%COMP%] .booking-form__error-message[_ngcontent-%COMP%]{margin-top:150px;margin-bottom:20px}"]}),l})();var E=p(2748);let An,Dn,bn=(()=>{var i;class l{constructor(){this.quoteToolFormStore=(0,e.f3M)(Fe.z)}getRouteIdToNavigateWithValidationForm({requestValidation$:t,submittableForm$:o},n){return setTimeout(()=>{t.next(),this.quoteToolFormStore.incrementValidationRequests(1)},100),o.pipe((0,k.w)(r=>(0,R.of)(r?n:void 0)))}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();const qn=E.l.BOOKING_FORM;let yd=(()=>{var i;class l{constructor(){this.requestValidation$=new L.x,this.submittableForm$=new L.x,this.stepDefinition={nextButton:$localize(An||(An=Os||(Os=c(["Book Now"])))),nextButtonId:"enrolment-button",prevButton:$localize(Dn||(Dn=hs||(hs=c(["Back"])))),displayQuote:!0,stepId:qn,requestValidation$:this.requestValidation$,submittableForm$:this.submittableForm$,previousStep:()=>(this.quoteToolFormStore.resetStore(),E.l.QUOTE_FORM),nextStep:()=>this.stepDefinitionHelper.getRouteIdToNavigateWithValidationForm({requestValidation$:this.requestValidation$,submittableForm$:this.submittableForm$},E.l.SEND_QUOTE_TO_EMAIL)},this.quoteToolFormStore=(0,e.f3M)(Fe.z),this.stepDefinitionHelper=(0,e.f3M)(bn)}resolve(){return this.stepDefinition}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();const Id={path:qn,resolve:{stepDefinition:()=>(0,e.f3M)(yd).resolve()},component:xd};var de=p(8180),V=p(1631),Me=p(7398),Pd=p(7790),Ld=p(844),bd=p(662),Fd=p(5061),Ad=p(5721),at=p(638);let Dd=(()=>{var i;class l{constructor(t,o,n,r,s,_,d){this.languageService=t,this.countryService=o,this.schoolService=n,this.courseTypeService=r,this.residenceCountryService=s,this.hostDataReader=_,this.document=d}resolve(){return(0,D.a)([this.languageService.getAll(),this.countryService.getAll(),this.schoolService.getAll(),this.courseTypeService.getAll(),this.residenceCountryService.getAll()]).pipe((0,de.q)(1),(0,V.z)(([t,o,n,r,s])=>this.hostDataReader.getPrefilledSchoolCourse$().pipe((0,Me.U)(_=>({languages:t,countries:o,schools:n,courseTypes:r,residenceCountries:s,prefilled:_,referrer:this.document.referrer})))))}}return(i=l).\u0275fac=function(t){return new(t||i)(e.LFG(Pd.T),e.LFG(Ld.T),e.LFG(bd.e),e.LFG(Fd._),e.LFG(Ad.J),e.LFG(at.j),e.LFG(h.K0))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();const qd={de:"DE","de-at":"AT","de-ch":"CH",fr:"FR","fr-ch":"CH","fr-be":"BE",it:"IT","it-ch":"CH",nl:"NL","en-gb":"GB",es:"ES",sv:"SE"},Ud=()=>{var i,l;const a=null===(i=document)||void 0===i||null===(i=i.documentElement)||void 0===i?void 0:i.lang;return null!==(l=qd[a])&&void 0!==l?l:""};
1var rt=p(120),wd=p(2466),$d=p(2110);let Un,wn,$n,Qn,kn,Bn,Vn,Qd=(()=>{var i;class l{constructor(){this.allSchools=[],this.allProgramTypes=[],this.availableCountries=[],this.availableCities=[],this.loading=!1,this.unknownOption={code:"",name:$localize(Un||(Un=Cs||(Cs=c(["I don't know"]))))},this.sectionModel={},this.subscription=new ne.w0,this.stepService=(0,e.f3M)(I.Q),this.cityService=(0,e.f3M)(Vt.b),this.countryService=(0,e.f3M)(Bt.Y),this.route=(0,e.f3M)(Se.gz),this.schoolFilterFn=t=>{var o;const n=null===(o=this.sectionModel.destinationCity)||void 0===o?void 0:o.code,r=this.sectionModel.countryCode,s=this.sectionModel.languageCode;return t.courseLanguages.some(_=>!s||_.code===s)&&(t.isOnline||(!r||t.country===r)&&(t.hasTeachersHome||!n||t.city===n))}}loadStoredData$(){return this.stepService.quoteRequest$.pipe((0,de.q)(1),(0,q.b)(({languageCode:t,country:o,destinationCity:n,schoolObject:r})=>{this.selectedLanguageChanged(t,!0),this.selectedCountryChanged(o,!0),this.selectedDestinationCityChanged(n,!0),this.selectedSchoolChanged(r,!1)}))}storeSectionData(){this.stepService.updatePartialRequest(this.sectionModel)}ngOnInit(){var t,o;this.allSchools=(0,se.I8)((null===(t=this.route.snapshot.data)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.schools)||[]),this.allProgramTypes=(0,se.I8)((null===(o=this.route.snapshot.data)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.programTypes)||[]),this.subscription.add(this.loadStoredData$().subscribe())}ngOnDestroy(){this.subscription.unsubscribe()}selectedLanguageChanged(t,o=!1){this.sectionModel.languageCode!==t&&(this.sectionModel.languageCode=t,this.loading=!0,this.subscription.add(this.countryService.getAllCountriesWithParameters({courseLanguageCode:t}).subscribe({next:n=>{this.availableCountries=n,this.loading=!1,o||(this.selectedCountryChanged(void 0),this.storeSectionData())},error:()=>this.loading=!1})))}selectedCountryChanged(t,o=!1){if(this.sectionModel.countryCode!==(null==t?void 0:t.code)&&(o||this.selectedDestinationCityChanged(void 0),this.sectionModel.countryCode=null==t?void 0:t.code,this.sectionModel.country=t,this.sectionModel.countryCode)){this.loading=!0;const{languageCode:n,countryCode:r}=this.sectionModel;this.cityService.getAllCitiesWithParameters({courseLanguageCode:n,countryCode:r}).subscribe({next:s=>{this.availableCities=s,this.loading=!1,o||this.storeSectionData()},error:()=>this.loading=!1})}}selectedDestinationCityChanged(t,o=!1){var n;(null===(n=this.sectionModel.destinationCity)||void 0===n?void 0:n.code)!==(null==t?void 0:t.code)&&(this.sectionModel.destinationCity=t,o||(this.selectedSchoolChanged(void 0,!1),this.storeSectionData()))}selectedSchoolChanged(t,o=!1){this.sectionModel.school!==(null==t?void 0:t.code)&&(this.sectionModel.schoolObject=t,this.sectionModel.school=null==t?void 0:t.code,o||this.storeSectionData())}addUnknownOptionItem(){return this.formType===S.d.PRICE_REQUEST?this.unknownOption:null}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-destination-school-form-section"]],inputs:{sectionIndex:"sectionIndex",formType:"formType"},decls:6,vars:31,consts:()=>{let a,t,o,n,r,s;return a=$localize(wn||(wn=Ss||(Ss=c(["Loading School Info..."])))),t=$localize($n||($n=Ts||(Ts=c(["Select destination and school"])))),o=$localize(Qn||(Qn=Es||(Es=c(["Language"])))),n=$localize(kn||(kn=Ms||(Ms=c(["Country"])))),r=$localize(Bn||(Bn=vs||(vs=c(["City"])))),s=$localize(Vn||(Vn=Ns||(Ns=c(["School"])))),[["message",a,"shadingColor","rgba(0,0,0,0.5)",3,"loading"],["sectionTitle",t,"data-qa","qt-select-destination",3,"sectionIndex"],["label",o,"data-qa","qt-language-selector",1,"form-field__validated-selector-padding",3,"valueChange","buttonView","value","required"],["label",n,"data-qa","qt-country-selector",1,"form-field__validated-selector-padding",3,"itemChange","autofill","disabled","buttonView","countries","value","required","iconValidation"],["label",r,"data-qa","qt-city-selector",1,"form-field__validated-selector-padding",3,"itemChange","autofill","disabled","buttonView","availableCities","value","countryCode","required"],["label",s,"data-qa","qt-school-selector",1,"form-field__validated-selector-padding",3,"itemChange","autofill","disabled","customDisabled","buttonView","value","language","country","city","withFilterFn","firstItem","required","iconValidation"]]},template:function(t,o){1&t&&(e._UZ(0,"lx-loading-spinner",0),e.TgZ(1,"lx-section-template",1)(2,"lx-language-selector",2),e.NdJ("valueChange",function(r){return o.selectedLanguageChanged(r)}),e.qZA(),e.TgZ(3,"lx-destination-country-selector",3),e.NdJ("itemChange",function(r){return o.selectedCountryChanged(r)}),e.qZA(),e.TgZ(4,"lx-city-selector",4),e.NdJ("itemChange",function(r){return o.selectedDestinationCityChanged(r)}),e.qZA(),e.TgZ(5,"lx-school-selector",5),e.NdJ("itemChange",function(r){return o.selectedSchoolChanged(r)}),e.qZA()()),2&t&&(e.Q6J("loading",o.loading),e.xp6(),e.Q6J("sectionIndex",o.sectionIndex),e.xp6(),e.Q6J("buttonView",!1)("value",o.sectionModel.languageCode)("required",!0),e.xp6(),e.Q6J("autofill",!!o.sectionModel.languageCode)("disabled",!o.sectionModel.languageCode)("buttonView",!1)("countries",o.availableCountries)("value",o.sectionModel.countryCode)("required",!0)("iconValidation",!0),e.xp6(),e.Q6J("autofill",!!o.sectionModel.countryCode)("disabled",!o.sectionModel.countryCode)("buttonView",!1)("availableCities",o.availableCities)("value",null==o.sectionModel.destinationCity?null:o.sectionModel.destinationCity.code)("countryCode",o.sectionModel.countryCode)("required",!0),e.xp6(),e.Q6J("autofill",!!o.sectionModel.destinationCity)("disabled",!o.sectionModel.destinationCity)("customDisabled",!0)("buttonView",!1)("value",o.sectionModel.school)("language",o.sectionModel.languageCode)("country",o.sectionModel.countryCode)("city",null==o.sectionModel.destinationCity?null:o.sectionModel.destinationCity.code)("withFilterFn",o.schoolFilterFn)("firstItem",o.addUnknownOptionItem())("required",!0)("iconValidation",!0))},dependencies:[$d.X,jt.S,eo.T,to,j.g,W],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}
1[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}"]}),l})();var G=p(7971);var Ae=p(6306);function Bd(i,l){var a;return null==i||null===(a=i.courseDates)||void 0===a?void 0:a.some(t=>new Date(t.from)>=l)}var Jn=p(1247);let Zn,zn,Yn,Xn,Hn,Wn,Kn,jn,ei,ti,oi,ni,ii,ai,ri,si,li,Jd=(()=>{var i;class l{constructor(t){this.productSchoolService=t,this.disabled=!1,this.value=void 0,this.schoolCode=void 0,this.codes=[],this.required=!1,this.valueChange=new e.vpe,this.itemChange=new e.vpe,this.levelOptions=[],this.subscription=new ne.w0}ngOnChanges({schoolCode:t,codes:o}){(t||o)&&this.subscription.add(this.productSchoolService.get(this.schoolCode).subscribe(n=>{var r;this.levelOptions=null==n||null===(r=n.availableLevels)||void 0===r?void 0:r.map(({code:s,name:_})=>({code:s,name:_.replace(/^./,_[0].toUpperCase())})).filter(({code:s})=>{var _;return!(null!==(_=this.codes)&&void 0!==_&&_.length)||this.codes.includes(s)})}))}ngOnDestroy(){this.subscription.unsubscribe()}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(Jn.a))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-level-selector"]],inputs:{disabled:"disabled",value:"value",schoolCode:"schoolCode",codes:"codes",required:"required"},outputs:{valueChange:"valueChange",itemChange:"itemChange"},features:[e.TTD],decls:1,vars:6,consts:()=>{let a;return a=$localize(Zn||(Zn=Rs||(Rs=c(["Language Level"])))),[["label",a,"valueExpr","code",3,"valueChange","itemChange","value","disabled","itemList","autofill","required","iconValidation"]]},template:function(t,o){1&t&&(e.TgZ(0,"lx-form-field-selector",0),e.NdJ("valueChange",function(r){return o.valueChange.emit(r)})("itemChange",function(r){return o.itemChange.emit(r)}),e.qZA()),2&t&&e.Q6J("value",o.value)("disabled",o.disabled)("itemList",o.levelOptions)("autofill",!0)("required",o.required)("iconValidation",!0)},dependencies:[Y.p]}),l})();const st=i=>({"qt-form-section__start-new-line":i});function Zd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-course-type-selector",14),e.NdJ("itemChange",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.courseTypeChanged(n,o))}),e.qZA()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index,n=e.oxw();e.Q6J("disabled",!n.productSchool)("codes",n.availableCourseTypes)("buttonView",!1)("value",null==t.courseType?null:t.courseType.code)("required",0===o)("ageGroup",n.ageGroup)("iconValidation",!0),e.uIk("data-qa","qt-course-type-selector-"+o)}}function zd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field-selector",15),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.courseChanged(n,o))}),e.qZA()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index,n=e.oxw();e.Q6J("disabled",!t.level||n.courseTypeSelectorEnabled&&!t.courseType||!n.productSchool)("value",n.courseOptionExist(o,t.relatedCourseCode)?t.relatedCourseCode:t.code)("itemList",null==n.courseOptions[o]?null:n.courseOptions[o].courses)("autofill",!0)("required",0===o)("iconValidation",!0),e.uIk("data-qa","qt-course-selector-"+o)}}function Yd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-date-list-selector",16),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.startDateChangeFromSelector(n,o))}),e.qZA()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index,n=e.oxw();e.Q6J("disabled",n.courseSelectorEnabled?!t.code:!t.level)("value",t.startDate)("dates",null==n.courseOptions[o]?null:n.courseOptions[o].availableStartDates)("required",0===o)("iconValidation",!0)("ngClass",e.VKq(7,st,!n.courseTypeSelectorEnabled&&!n.courseSelectorEnabled)),e.uIk("data-qa","qt-start-date-selector-"+o)}}function Xd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-date-picker-field",17),e.NdJ("dateChanged",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.startDateChange(n,o))})("calendarShown",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.prepareCalendar(n,o))})("monthChanged",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.monthChanged(n,o))}),e.qZA()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index,n=e.oxw();e.Q6J("disabled",n.courseSelectorEnabled?!t.code:!t.level)("dateValue",t.startDate)("minDate",null==n.courseOptions[o]?null:n.courseOptions[o].minDate)("defaultDate",null==n.courseOptions[o]?null:n.courseOptions[o].minDate)("disabledDates",null==n.courseOptions[o]?null:n.courseOptions[o].disabledDates)("showCalendarIcon",!0)("required",0===o)("iconValidation",!0)("ngClass",e.VKq(10,st,!n.courseTypeSelectorEnabled&&!n.courseSelectorEnabled)),e.uIk("data-qa","qt-start-date-field-"+o)}}function Hd(i,l){1&i&&(e.TgZ(0,"div",18),e.SDv(1,0),e.qZA())}function Wd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div")(1,"lx-button",19),e.NdJ("buttonClick",function(){e.CHM(a);const o=e.oxw().index,n=e.oxw();return e.KtG(n.removeCourse(o))}),e.qZA()()}if(2&i){const a=e.oxw().index,t=e.oxw();e.xp6(),e.Q6J("icon","pi pi-times")("iconPos","before")("iconFill",!0)("disabled",!t.productSchool||t.sectionModel.courses.length<2)("iconRounded",!0)("buttonStyle","plain-text"),e.uIk("data-qa","qt-remove-course-"+a)}}function Kd(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div")(1,"lx-button",20),e.NdJ("buttonClick",function(){e.CHM(a);const o=e.oxw(2);return e.KtG(o.addCourse())}),e.qZA()()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index;e.xp6(),e.Q6J("icon","pi pi-plus")("iconPos","before")("iconFill",!0)("disabled",!t.weeks)("iconRounded",!0)("buttonStyle","plain-text"),e.uIk("data-qa","qt-add-course-"+o)}}
1function jd(i,l){if(1&i){const a=e.EpF();e.ynx(0),e.YNc(1,Zd,1,8,"lx-course-type-selector",6),e.TgZ(2,"lx-level-selector",7),e.NdJ("itemChange",function(o){const n=e.CHM(a).index,r=e.oxw();return e.KtG(r.levelChange(n,o))}),e.qZA(),e.YNc(3,zd,1,7,"lx-form-field-selector",8),e.TgZ(4,"div"),e.YNc(5,Yd,1,9,"lx-date-list-selector",9)(6,Xd,1,12,"lx-date-picker-field",10)(7,Hd,2,0,"div",11),e.qZA(),e.TgZ(8,"lx-weeks-selector",12),e.NdJ("valueChange",function(o){const n=e.CHM(a).index,r=e.oxw();return e.KtG(r.durationChange(n,o))}),e.qZA(),e.YNc(9,Wd,2,7,"div",13)(10,Kd,2,7,"div",13),e.BQk()}if(2&i){const a=l.$implicit,t=l.index,o=l.last,n=e.oxw();e.xp6(),e.Q6J("ngIf",n.courseTypeSelectorEnabled),e.xp6(),e.Q6J("value",null==a.level?null:a.level.code)("disabled",!n.productSchool||n.courseTypeSelectorEnabled&&!a.courseType)("schoolCode",n.schoolCodeForLevels)("codes",null==n.courseOptions[t]?null:n.courseOptions[t].availableLevels)("required",0===t)("ngClass",e.VKq(20,st,!n.courseTypeSelectorEnabled)),e.uIk("data-qa","qt-language-level-selector-"+t),e.xp6(),e.Q6J("ngIf",n.courseSelectorEnabled),e.xp6(2),e.Q6J("ngIf",null==n.courseOptions[t]?null:n.courseOptions[t].dateListEnabled),e.xp6(),e.Q6J("ngIf",!(null!=n.courseOptions[t]&&n.courseOptions[t].dateListEnabled)),e.xp6(),e.Q6J("ngIf",n.showDisclaimerDatesToBeConfirmed),e.xp6(),e.Q6J("disabled",!a.startDate)("value",a.weeks)("availableWeeksValues",null==n.courseOptions[t]?null:n.courseOptions[t].availableWeeksValues)("required",0===t)("iconValidation",!0),e.uIk("data-qa","qt-duration-field-"+t),e.xp6(),e.Q6J("ngIf",n.courseSelectorEnabled),e.xp6(),e.Q6J("ngIf",o&&n.courseSelectorEnabled&&n.hasAvailableCourseOptions())}}function ec(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field-selector",21),e.NdJ("itemChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.accommodationTypeChanged(o))}),e.qZA()}if(2&i){const a=e.oxw();e.Q6J("disabled",!a.sectionModel.courses[0].weeks)("itemList",a.accommodationTypes)("required",!0)("iconValidation",!0)}}function tc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-form-field",22)(1,"textarea",23),e.NdJ("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.KtG(n.specialRequestsChanged(o))}),e.Uc_("ngModelChange",function(o){e.CHM(a);const n=e.oxw();return e.nJJ(n.specialRequests,o)||(n.specialRequests=o),e.KtG(o)}),e.qZA()()}if(2&i){const a=e.oxw();e.Q6J("disabled",!a.sectionModel.courses[0].weeks)("required",!1)("small",!0)("isValid",!0)("iconValidation",!0),e.xp6(),e.E3D("ngModel",a.specialRequests),e.Q6J("autoResize",!1)}}let oc=(()=>{var i;class l{constructor(t,o,n,r){this.stepService=t,this.productSchoolService=o,this.hostDataReader=n,this.route=r,this.sectionModel={},this.specialRequests="",this.accommodationTypes=Xe(),this.courseTypeSelectorEnabled=!1,this.courseSelectorEnabled=!1,this.accommodationTypeSelectorEnabled=!1,this.specialRequestsFieldEnabled=!1,this.showDisclaimerDatesToBeConfirmed=!1,this.allSchools=[],this.today=(0,m.x2)(),this.latestEndDate=null,this.locale=(0,He.K)(),this.subscription=new ne.w0,this.ageGroup=this.stepService.getActiveAgeGroup()}ngOnInit(){var t;this.initializeProperties(),this.allSchools=(0,se.I8)((null===(t=this.route.snapshot.data)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.schools)||[]),this.resetCourses(!1),this.subscription.add(this.loadStoredData$().pipe((0,V.z)(()=>this.resetOnChanges$())).subscribe()),this.subscription.add(this.getEndDateFromActiveQuote$().subscribe())}ngOnDestroy(){this.subscription.unsubscribe()}addCourse(t,o=!0){var n;null!==(n=this.sectionModel)&&void 0!==n&&null!==(n=n.courses)&&void 0!==n&&n.length||(this.sectionModel.courses=[],this.courseOptions=[]);const r={},s={};t>=0?(this.sectionModel.courses[t]=r,this.courseOptions[t]=s):(this.sectionModel.courses.push(r),this.courseOptions.push(s)),o&&this.storeSectionData()}removeCourse(t,o=!0){this.sectionModel.courses.splice(t,1),this.courseOptions.splice(t,1),o&&this.storeSectionData()}resetCourses(t=!0){this.sectionModel.courses=void 0,this.courseOptions=void 0,this.addCourse(0,t)}courseTypeChanged(t,o,n=!0){var r;(null===(r=this.getCourseInput(t).courseType)||void 0===r?void 0:r.code)!==(null==o?void 0:o.code)&&(this.getCourseInput(t).courseType=o,this.levelChange(t,void 0,!1),this.fillLevels(t),n&&this.storeSectionData())}levelChange(t,o,n=!0){var r;(null===(r=this.getCourseInput(t).level)||void 0===r?void 0:r.code)!==(null==o?void 0:o.code)&&(this.getCourseInput(t).level=o,this.courseChanged(t,void 0,!1),this.courseSelectorEnabled?this.fillCourses(t):this.courseOptions[0].minDate=this.today,n&&this.storeSectionData())}courseChanged(t,o,n=!0){if(this.getCourseInput(t).code!==o){this.getCourseInput(t).code=o;const r=this.selectedCourse(t);this.getCourseInput(t).name=null==r?void 0:r.name,this.getCourseInput(t).accommodationMandatory=null==r?void 0:r.accommodationMandatory,this.getCourseInput(t).relatedCourseCode=null,this.resetCourseDates(t),n&&this.storeSectionData()}}prepareCalendar(t,o){var n,r;this.fillCalendar(t,null==o||null===(n=o.dateObject)||void 0===n?void 0:n.getFullYear(),null==o||null===(r=o.dateObject)||void 0===r?void 0:r.getMonth())}startDateChangeFromSelector(t,o,n=!0){const r=(0,m.bl)(o);this.startDateChange(t,{dateString:o,dateObject:r},n)}startDateChange(t,o,n=!0){var r,s,_,d;if(this.getCourseInput(t).startDate===(null==o?void 0:o.dateString))return;this.showDisclaimerDatesToBeConfirmed=!1;const u=null===(r=this.getCourseStartDates(t))||void 0===r?void 0:r.find(T=>T.from===(null==o?void 0:o.dateString));this.showDisclaimerDatesToBeConfirmed=!1===(null==u?void 0:u.confirmed),this.fillCalendar(t,null==o||null===(s=o.dateObject)||void 0===s?void 0:s.getFullYear(),null==o||null===(_=o.dateObject)||void 0===_?void 0:_.getMonth()),this.getCourseInput(t).startDate=null==o?void 0:o.dateString,this.getCourseInput(t).startDateObject=null==o?void 0:o.dateObject,this.getCourseInput(t).dateConfirmed=null!==(d=null==u?void 0:u.confirmed)&&void 0!==d&&d,this.fillDuration(t,this.getCourseInput(t).startDate);const g=this.selectedCourse(t);if(null!=g&&g.relatedProducts){var f,O;const T=(0,G.HT)(null===(f=this.productSchool)||void 0===f?void 0:f.courses,g.relatedProducts);let v=(0,G.XG)(T,null===(O=g.relatedProducts)||void 0===O?void 0:O[0]);const x=g.courseDates.find(({from:C})=>C===(null==o?void 0:o.dateString));x||(v=(0,G.Op)(T,null==o?void 0:o.dateString)),!x&&v&&this.switchByRelatedCourse(t,g,v)}n&&this.storeSectionData()}
1monthChanged(t,{year:o,month:n}){this.fillCalendar(t,o,n+1)}durationChange(t,o,n=!0){this.getCourseInput(t).weeks!==o&&(this.getCourseInput(t).weeks=o,this.removeCoursesAfter(t,!1),n&&this.storeSectionData())}accommodationTypeChanged(t,o=!0){var n;this.sectionModel.accommodationType=null!==(n=null==t?void 0:t.name.toString())&&void 0!==n?n:"",o&&this.storeSectionData()}specialRequestsChanged(t,o=!0){this.specialRequests!==t&&(this.specialRequests=t,o&&this.storeSectionData())}courseOptionExist(t,o){return!!this.selectedCourseOption(t,o)}hasAvailableCourseOptions(){const t=this.getMinYearAvailable(this.courseOptions.length-1);return this.filterCourses(null,null,t).length>0}initializeProperties(){this.courseTypeSelectorEnabled=this.formType===S.d.PRICE_REQUEST,this.courseSelectorEnabled=this.formType===S.d.FREE_QUOTE||this.formType===S.d.ENROLLMENT||this.formType===S.d.QUICK_QUOTE_TOOL,this.accommodationTypeSelectorEnabled=this.formType===S.d.PRICE_REQUEST,this.specialRequestsFieldEnabled=this.formType===S.d.PRICE_REQUEST}loadStoredData$(){return this.hostDataReader.getPrefilledSchoolCourse$().pipe((0,V.z)(()=>this.stepService.quoteRequest$),(0,de.q)(1),(0,q.b)(({destinationCurrency:t,schoolType:o})=>{Object.assign(this.sectionModel,{destinationCurrency:t,schoolType:o})}),(0,V.z)(t=>this.loadSchool$(t.school).pipe((0,Me.U)(()=>t))),(0,de.q)(1),(0,q.b)(({courses:t})=>{null!=t&&t.length&&t.forEach(({level:o,code:n,startDate:r,startDateObject:s,weeks:_,courseType:d},u)=>{null!=o&&o.code&&(this.addCourse(u,!1),this.courseTypeSelectorEnabled&&d&&this.courseTypeChanged(u,d),o&&this.levelChange(u,o,!1),this.courseSelectorEnabled&&this.courseChanged(u,n,!1),this.startDateChange(u,{dateObject:null!=s?s:(0,m.bl)(r),dateString:r},!1),this.durationChange(u,_,!1))})}))}loadSchool$(t){if(t)return this.loading=!0,this.productSchoolService.get(t).pipe((0,q.b)(o=>{var n;this.productSchool={...o,courses:null==o||null===(n=o.courses)||void 0===n?void 0:n.filter(_=>!(!_.quotable||!(0,G.ae)(_,this.today)))},this.schoolCodeForLevels=this.productSchool?this.productSchool.code||"1671":void 0;let r={};(null==o?void 0:o.currencyCode)!==this.sectionModel.destinationCurrency&&(this.sectionModel.destinationCurrency=null==o?void 0:o.currencyCode,r={destinationCurrency:null==o?void 0:o.currencyCode});const s=(({types:i})=>{if(!i)return;const[l]=i;return l})(o);this.sectionModel.schoolType!==s&&(this.sectionModel.schoolType=s,r={...r,schoolType:s}),(0,se.fL)(r)||this.stepService.updatePartialRequest(r),this.sectionModel.courses.forEach((_,d)=>{(_.level||this.courseTypeSelectorEnabled&&_.courseType)&&this.fillCourses(d)}),this.loading=!1}),(0,Ae.K)(o=>(console.error(o),this.loading=!1,(0,R.of)(null))));if(""===t&&this.formType===S.d.PRICE_REQUEST){const o={code:t,name:$localize(zn||(zn=xs||(xs=c(["I don't know"]))))};return this.productSchool=o,(0,R.of)(o)}return(0,R.of)(null)}resetOnChanges$(){return this.stepService.quoteRequest$.pipe((0,ge.b)(100),(0,V.z)(t=>{var o;const{languageCode:n,country:r,destinationCity:s,schoolObject:_,schoolType:d}=t,u=this.productSchool&&!_||(null==_?void 0:_.code)!==(null===(o=this.productSchool)||void 0===o?void 0:o.code),g=this.formType===S.d.PRICE_REQUEST?null!=(null==_?void 0:_.code):!(null==_||!_.code);return u&&(void 0!==d&&(this.sectionModel.schoolType=void 0),this.resetCourses(!0)),this.availableCourseTypes=null!=_&&_.code?_.courseTypes:function c_(i,l,a,t){return ze(i,l,a,t).reduce((o,{courseTypes:n})=>n?[...o,...n.filter(r=>!o.includes(r))]:o,[])}(this.allSchools,n,null==r?void 0:r.code,null==s?void 0:s.code),g||(this.productSchool=void 0),u&&g?this.loadSchool$(_.code).pipe((0,Me.U)(()=>t)):(0,R.of)(t)}))}removeCoursesAfter(t,o=!0){for(let r=(null===(n=this.sectionModel.courses)||void 0===n?void 0:n.length)-1;r>t;r--){var n;this.removeCourse(r,!1)}o&&this.storeSectionData()}storeSectionData(){this.stepService.updatePartialRequest(this.sectionModel),this.specialRequests&&this.stepService.setPartialStudentDetails({specialRequests:this.specialRequests})}isAtLeastOneCourseSelected(){var t;return(null===(t=this.sectionModel.courses)||void 0===t?void 0:t.length)>1}resetCourseDates(t){var o,n;this.startDateChange(t,void 0,!1),this.durationChange(t,void 0,!1);const r=this.isAtLeastOneCourseSelected()?this.getLastCourseEndDate(t):this.today,s=this.getCourseInput(t),_=this.getProductSchoolCourseByCode(s.code),d=(0,G.vS)(null===(o=this.productSchool)||void 0===o?void 0:o.courses,_,s.level),u=(0,G.vk)(d,r,t>0);this.courseOptions[t].minDate=new Date(u),null!==(n=this.courseOptions[t].disabledDates)&&void 0!==n&&n.length&&(this.courseOptions[t].disabledDates=void 0),(null==_?void 0:_.showDatesAsList)?this.prepareDateListData(t,d):(this.courseOptions[t].dateListEnabled=!1,this.courseOptions[t].availableStartDates=[],this.fillCalendar(t,this.courseOptions[t].minDate.getFullYear(),this.courseOptions[t].minDate.getMonth())),this.fillDuration(t)}prepareDateListData(t,o){var n;this.courseOptions[t].dateListEnabled=!0,this.courseOptions[t].availableStartDates=(null==o||null===(n=o.map(r=>r.from))||void 0===n?void 0:n.filter(r=>!!r))||[]}
1getLastCourseEndDate(t){return this.latestEndDate?this.latestEndDate:(0,N.I)(this.getCourseInput(t-1))}getMinYearAvailable(t){const o=this.getCourseInput(t);var n;return o&&o.startDate?(0,m.jh)(new Date(o.startDate),null!==(n=o.weeks)&&void 0!==n?n:0).getFullYear():(new Date).getFullYear()}fillLevels(t){var o,n,r;const s=null===(o=this.getCourseInput(t))||void 0===o||null===(o=o.courseType)||void 0===o?void 0:o.code,_=this.getMinYearAvailable(t-1);this.courseOptions[t].availableLevels=null!==(n=null===(r=this.filterCourses(s,null,_))||void 0===r?void 0:r.reduce((d,u)=>(u.supportedLevels.forEach(({code:g})=>{d.includes(g)||d.push(g)}),d),[]))&&void 0!==n?n:[]}fillCourses(t){var o,n,r,s;const _=null===(o=this.getCourseInput(t))||void 0===o||null===(o=o.courseType)||void 0===o?void 0:o.code,d=null===(n=this.getCourseInput(t).level)||void 0===n?void 0:n.code,u=this.getMinYearAvailable(t-1);this.courseOptions[t].courses=null!==(r=null===(s=this.filterCourses(_,d,u))||void 0===s?void 0:s.map(({code:g,name:f,type:O})=>({code:g,name:f,weight:null==O?void 0:O.weight})))&&void 0!==r?r:[]}fillCalendar(t,o,n){if(o&&"number"==typeof n&&n>=0){var r;const s=null===(r=this.getCourseStartDates(t))||void 0===r?void 0:r.map(({from:_})=>_);if(s){const _=new Date;_.setFullYear(o,n,1),this.setDisabledDates(t,s,_)}}}getCourseStartDates(t){var o;const n=this.getCourseInput(t).level,r=this.selectedCourse(t);return(0,G.vS)(null===(o=this.productSchool)||void 0===o?void 0:o.courses,r,n)}fillDuration(t,o){const n=this.sectionModel.courses[t].level,r=this.selectedCourse(t);this.courseOptions[t].availableWeeksValues=r?(0,G.Jp)(r,n,o):[]}filterCourses(t,o,n){var r,s;return null===(r=function Vd(i=[]){const l=[];for(const a of i){const{relatedProducts:t}=a,o=new Set(t||[]),n=l.find(r=>o.has(r.code));n?Bd(n,new Date)||(l[l.indexOf(n)]=a):l.push(a)}return l}(null===(s=this.productSchool)||void 0===s?void 0:s.courses))||void 0===r?void 0:r.filter(_=>{var d,u;return(!t||(null===(d=_.type)||void 0===d?void 0:d.code)===t)&&(!o||(null===(u=_.supportedLevels)||void 0===u?void 0:u.some(g=>g.code===o)))&&(!n||(0,G.c7)(_,o,n))})}setDisabledDates(t,o,n){if(this.formType===S.d.PRICE_REQUEST)this.courseOptions[t].disabledDates=null;else{const _=(0,m.UE)((0,m.jh)(n,-12),(0,m.jh)(n,12),[],[],[],"backward").filter(u=>!o.find(g=>g.includes(this.formatDate(u))));this.courseOptions[t].disabledDates=(this.courseOptions[t].disabledDates||[]).concat(_).filter(this.distinctDates)}}distinctDates(t,o,n){return n.findIndex(r=>r.getTime()===t.getTime())===o}getCourseInput(t){var o;return t>=0&&(null===(o=this.sectionModel.courses)||void 0===o?void 0:o.length)>t?this.sectionModel.courses[t]:void 0}getLatestCourseInput(){var t;return this.getCourseInput((null===(t=this.sectionModel.courses)||void 0===t?void 0:t.length)-1)}formatDate(t){return(0,h.p6)(t,"yyyy-MM-dd",this.locale)}selectedCourse(t){var o;const n=null===(o=this.getCourseInput(t))||void 0===o?void 0:o.code;return this.getProductSchoolCourseByCode(n)}getProductSchoolCourseByCode(t){var o;return(0,G.XG)(null===(o=this.productSchool)||void 0===o?void 0:o.courses,t)}selectedCourseOption(t,o){var n;return null===(n=this.courseOptions[t])||void 0===n||null===(n=n.courses)||void 0===n?void 0:n.find(({code:r})=>r===o)}getEndDateFromActiveQuote$(){return this.stepService.requestActiveQuote().pipe((0,q.b)(({endDate:t})=>{var o;(null===(o=this.getLatestCourseInput())||void 0===o?void 0:o.code)&&t&&(this.latestEndDate=(0,m.bl)(t))}))}switchByRelatedCourse(t,o,n){const r=this.getCourseInput(t);if(!r||!n)return;const{code:s,name:_,accommodationMandatory:d}=n;this.sectionModel.courses[t]={...r,code:s,name:_,accommodationMandatory:d,relatedCourseCode:null==o?void 0:o.code}}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(I.Q),e.Y36(Jn.a),e.Y36(at.j),e.Y36(Se.gz))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-course-dates-form-section"]],inputs:{sectionIndex:"sectionIndex",formType:"formType"},decls:5,vars:5,consts:()=>{let a,t,o,n,r,s,_,d,u,g,f,O,T,v,x;return a=$localize(Yn||(Yn=ys||(ys=c(["Loading School Info..."])))),t=$localize(Xn||(Xn=Is||(Is=c(["Select course"])))),o=$localize(Hn||(Hn=Ps||(Ps=c(["Accommodation Type"])))),n=$localize(Wn||(Wn=Ls||(Ls=c(["Please tell us more about your project"])))),r=$localize(Kn||(Kn=bs||(bs=c(["Course Type"])))),s=$localize(jn||(jn=Fs||(Fs=c(["Course"])))),_=$localize(ei||(ei=As||(As=c(["Start Date"])))),d=$localize(ti||(ti=Ds||(Ds=c(["\u2014 Please select \u2014"])))),u=$localize(oi||(oi=qs||
1(qs=c(["Start Date"])))),g=$localize(ni||(ni=Us||(Us=c(["\u2014 Please select \u2014"])))),f=$localize(ii||(ii=ws||(ws=c(["Duration"])))),O=$localize(ai||(ai=$s||($s=c(["Dates to be confirmed"])))),T=$localize(ri||(ri=Qs||(Qs=c(["Delete the course above"])))),v=$localize(si||(si=ks||(ks=c(["Add a course"])))),x=$localize(li||(li=Bs||(Bs=c(["Leave your message here"])))),[O,["message",a,"shadingColor","rgba(0,0,0,0.5)",3,"loading"],["sectionTitle",t,3,"sectionIndex"],[4,"ngFor","ngForOf"],["class","form-field__validated-selector-padding","label",o,"valueExpr","code","data-qa","pr-accommodation-type-field",3,"disabled","itemList","required","iconValidation","itemChange",4,"ngIf"],["label",n,"class","qt-form-section__double-column-span form-field__no-validation","data-qa","pr-customer-project-field",3,"disabled","required","small","isValid","iconValidation",4,"ngIf"],["label",r,"class","qt-form-section__start-new-line form-field__validated-selector-padding",3,"disabled","codes","buttonView","value","required","ageGroup","iconValidation","itemChange",4,"ngIf"],[1,"form-field__validated-selector-padding",3,"itemChange","value","disabled","schoolCode","codes","required","ngClass"],["label",s,"class","form-field__validated-selector-padding","valueExpr","code",3,"disabled","value","itemList","autofill","required","iconValidation","valueChange",4,"ngIf"],["label",_,"placeholder",d,"class","form-field__validated-selector-padding",3,"disabled","value","dates","required","iconValidation","ngClass","valueChange",4,"ngIf"],["label",u,"placeholder",g,"class","form-field__validated-selector-padding",3,"disabled","dateValue","minDate","defaultDate","disabledDates","showCalendarIcon","required","iconValidation","ngClass","dateChanged","calendarShown","monthChanged",4,"ngIf"],["class","form-field-sections__disclaimer",4,"ngIf"],["label",f,1,"form-field__validated-selector-padding",3,"valueChange","disabled","value","availableWeeksValues","required","iconValidation"],[4,"ngIf"],["label",r,1,"qt-form-section__start-new-line","form-field__validated-selector-padding",3,"itemChange","disabled","codes","buttonView","value","required","ageGroup","iconValidation"],["label",s,"valueExpr","code",1,"form-field__validated-selector-padding",3,"valueChange","disabled","value","itemList","autofill","required","iconValidation"],["label",_,"placeholder",d,1,"form-field__validated-selector-padding",3,"valueChange","disabled","value","dates","required","iconValidation","ngClass"],["label",u,"placeholder",g,1,"form-field__validated-selector-padding",3,"dateChanged","calendarShown","monthChanged","disabled","dateValue","minDate","defaultDate","disabledDates","showCalendarIcon","required","iconValidation","ngClass"],[1,"form-field-sections__disclaimer"],["text",T,3,"buttonClick","icon","iconPos","iconFill","disabled","iconRounded","buttonStyle"],["text",v,3,"buttonClick","icon","iconPos","iconFill","disabled","iconRounded","buttonStyle"],["label",o,"valueExpr","code","data-qa","pr-accommodation-type-field",1,"form-field__validated-selector-padding",3,"itemChange","disabled","itemList","required","iconValidation"],["label",n,"data-qa","pr-customer-project-field",1,"qt-form-section__double-column-span","form-field__no-validation",3,"disabled","required","small","isValid","iconValidation"],["placeholder",x,"pInputTextarea","",1,"qt-form-section__textarea",3,"ngModelChange","ngModel","autoResize"]]},template:function(t,o){1&t&&(e._UZ(0,"lx-loading-spinner",1),e.TgZ(1,"lx-section-template",2),e.YNc(2,jd,11,22,"ng-container",3)(3,ec,1,4,"lx-form-field-selector",4)(4,tc,2,7,"lx-form-field",5),e.qZA()),2&t&&(e.Q6J("loading",o.loading),e.xp6(),e.Q6J("sectionIndex",o.sectionIndex),e.xp6(),e.Q6J("ngForOf",o.sectionModel.courses),e.xp6(),e.Q6J("ngIf",o.accommodationTypeSelectorEnabled),e.xp6(),e.Q6J("ngIf",o.specialRequestsFieldEnabled))},dependencies:[h.mk,h.sg,h.O5,M.Fj,M.JJ,M.On,oo.b,ae.r,Ie.g,j.g,Re.K,ke,xe.i,Y.p,re.h,W,Jd],styles:['[_nghost-%COMP%] .form-field-sections__disclaimer[_ngcontent-%COMP%]{font-size:var(--font-size-small2xs, 11px);padding:3px 15px;color:var(--color-primary, #000000);position:relative}[_nghost-%COMP%] .form-field-sections__disclaimer[_ngcontent-%COMP%]:before{content:"";-webkit-mask:url(/assets/images/icons/icon-information.svg);mask:url(/assets/images/icons/icon-information.svg);-webkit-mask-size:var(--icon-size-xxs, 10px);mask-size:var(--icon-size-xxs, 10px);height:var(--icon-size-xxs, 10px);width:var(--icon-size-xxs, 10px);position:absolute;
1left:0;top:5px;background-color:var(--color-primary, #000000)}[_nghost-%COMP%] .form-field-sections__disclaimer__items[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}']}),l})();var nc=p(8910),_i=p(4920),ic=p(3735),lt=p(6232);function di(i){return null==i?void 0:i.reduce((l,a)=>(l.some(t=>t.code===a.code)||l.push(a),l),[])}function ci(i,l,a=0,t=[]){if(!i)return l;let o=l;const n=(0,m.jh)(i,-a);if((0,m.Sl)(l,n)&&(o=n),null!=t&&t.length){const r=(0,m.iH)(t[0].until,"sunday"),s=(0,m.jh)(r,-a);(0,m.Sl)(o,s)&&(o=s)}return o}var ui=p(15);let pi,mi,gi,fi,Oi,hi,Ci,Si,Ti,Ei;const rc=()=>({property:"productPosition"}),sc=()=>({property:"weight"}),lc=()=>({property:"name"}),_c=(i,l,a)=>[i,l,a];function dc(i,l){if(1&i&&(e.TgZ(0,"span",12),e._uU(1),e.ALo(2,"lxDate"),e.ALo(3,"lxDate"),e.qZA()),2&i){const a=l.$implicit,t=e.oxw(3);e.xp6(),e.AsE(" ",e.xi3(2,2,a.from,t.DateFormat.SHORT_MONTH_NAME)," - ",e.xi3(3,5,a.until,t.DateFormat.SHORT_MONTH_NAME)," ")}}function cc(i,l){if(1&i&&(e.TgZ(0,"div",10)(1,"span"),e.SDv(2,0),e.qZA(),e.YNc(3,dc,4,8,"span",11),e.qZA()),2&i){const a=e.oxw().index,t=e.oxw();e.xp6(3),e.Q6J("ngForOf",t.accommodationOptions[a].availability)}}function uc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-weeks-selector",13),e.NdJ("valueChange",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.durationChange(n,o))}),e.qZA()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index,n=e.oxw();e.Q6J("disabled",!(null!=t&&t.code))("autofill",!(null==t||!t.code))("value",t.weeks)("minWeeks",n.accommodationOptions[o].durationMin)("maxWeeks",n.accommodationOptions[o].durationMax)("required",0===o)("iconValidation",!0),e.uIk("data-qa","qt-accommodation-duration-selector-"+o)}}function pc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-date-picker-field",14),e.ALo(1,"lxDate"),e.NdJ("dateChanged",function(o){e.CHM(a);const n=e.oxw().index,r=e.oxw();return e.KtG(r.accommodationStartDateChange(n,o))}),e.qZA()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index,n=e.oxw();e.Q6J("placeholder",t.startDate?e.xi3(1,13,t.startDate,n.DateFormat.SHORT_MONTH_NAME):n.selectPlaceholder)("disabled",!t.weeks)("dateValue",t.startDate)("dateObject",t.startDateObject)("minDate",n.accommodationOptions[o].minDate)("maxDate",n.accommodationOptions[o].maxDate)("defaultDate",n.accommodationOptions[o].minDate)("disabledDays",n.accommodationOptions[o].disabledDays)("disabledDates",n.accommodationOptions[o].disabledDates)("showCalendarIcon",!0)("required",0===o)("iconValidation",!0),e.uIk("data-qa","qt-accommodation-start-date-selector-"+o)}}function mc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div",15)(1,"lx-button",16),e.NdJ("buttonClick",function(){e.CHM(a);const o=e.oxw().index,n=e.oxw();return e.KtG(n.removeAccommodationItem(o))}),e.qZA()()}if(2&i){const a=e.oxw().index,t=e.oxw();e.xp6(),e.Q6J("icon","pi pi-times")("iconPos","before")("iconFill",!0)("disabled",!(null!=t.selectedCourses&&t.selectedCourses.length)||t.sectionModel.accommodations.length<2)("iconRounded",!0)("buttonStyle","plain-text"),e.uIk("data-qa","qt-remove-accommodation-"+a)}}function gc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div")(1,"lx-button",17),e.NdJ("buttonClick",function(){e.CHM(a);const o=e.oxw().index,n=e.oxw();return e.KtG(n.addAccommodationItem(o+1))}),e.qZA()()}if(2&i){const a=e.oxw(),t=a.$implicit,o=a.index,n=e.oxw();e.xp6(),e.Q6J("icon","pi pi-plus")("iconPos","before")("iconFill",!0)("disabled",!(null!=n.selectedCourses&&n.selectedCourses.length)||n.incompletedCourse||!t.startDate||!n.calculateDurationMax(o+1))("iconRounded",!0)("buttonStyle","plain-text"),e.uIk("data-qa","qt-add-accommodation-"+o)}}function fc(i,l){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"lx-form-field-selector",4),e.NdJ("valueChange",function(o){const n=e.CHM(a).index,r=e.oxw();return e.KtG(r.accommodationChanged(n,o))}),e.qZA(),e.YNc(3,cc,4,1,"div",5),e.qZA(),e.YNc(4,uc,1,8,"lx-weeks-selector",6)(5,pc,2,16,"lx-date-picker-field",7)(6,mc,2,7,"div",8)(7,gc,2,7,"div",9),e.BQk()}if(2&i){let a;const t=l.$implicit,o=l.index,n=l.last,r=e.oxw();e.xp6(2),e.Q6J("disabled",!(null!=r.selectedCourses&&r.selectedCourses.length)||r.incompletedCourse)("autofill",(null==r.selectedCourses?null:r.selectedCourses.length)&&!r.incompletedCourse)("value",t.code)("itemList",0===o?r.accommodationsWithEmptyOption:r.accommodationOptions[o].items)("required",r.accommodationMandatory)("iconValidation",!0)("sortCriteria",e.kEZ(16,_c,e.DdM(13,rc),e.DdM(14,sc),e.DdM(15,lc))),e.uIk("data-qa","qt-accommodation-selector-"+o),e.xp6(),e.Q6J("ngIf",null==r.accommodationOptions[o]||null==r.accommodationOptions[o].availability?null:r.accommodationOptions[o].availability.length),e.xp6(),e.Q6J("ngIf",!r.isWithoutAccommodation(t)),e.xp6(),e.Q6J("ngIf",!r.isWithoutAccommodation(t)&&(null!==(a=r.datePickerRenderKey[o])&&void 0!==a?a:0)>=0),e.xp6(),e.Q6J("ngIf",r.hasButtons()),e.xp6(),e.Q6J("ngIf",n&&r.hasButtons())}}let hc=(()=>{var i;class l{constructor(){this.sectionModel={},this.DateFormat=Oe.t,this.datePickerRenderKey={},this.selectPlaceholder=$localize(pi||(pi=Vs||(Vs=c(["\u2014 Please select \u2014"])))),this.noAccommodationOption={...ic.N,name:$localize(mi||(mi=Gs||(Gs=c(["Without accommodation"]))))},this.tuitionWeeks=0,this.quoteOutputCourses=[],this.destroyRef=(0,e.f3M)(e.ktI),this.changeDetectorRef=(0,e.f3M)(e.sBO),this.stepService=(0,e.f3M)(I.Q),this.accommodationService=(0,e.f3M)(nc.f),this.loggerService=(0,e.f3M)(rt.m),this.datePickerTimeoutIds=new Map}ngOnInit(){this.resetAccommodations(void 0,void 0,!1),this.prepareLoadStoredData(),this.prepareResetOnChanges()}calculateAccommodationDisabledDays(t){let o=[];if(t&&this.selectedCourses.length){const r=t.startingDaysOfTheWeek;o=[0,1,2,3,4,5,6].filter(s=>!r.includes(s))}return o}calculateAccommodationDisabledDates(t){return t?this.vacationPeriods.map(o=>this.normalizeWithAccommodation(o,t.startingDaysOfTheWeek,t.endingDaysOfTheWeek)).map(o=>(0,m.UE)(o.startDate,o.endDate)).flat():this.vacationPeriods.map(o=>(0,m.UE)(o.startDate,o.endDate)).flat()}calculateMinDate(t,o){var n;const r=this.getLimitMinDateSchoolYear(o),s=this.getLimitMaxDateSchoolYear(o),_=this.sectionModel.accommodations[t-1];let d,u;if(0===t)u=this.getFirstSelectedCourseStartDate(),d=u?(0,m.jh)(u,-1):void 0;else if(o)d=this.calculateStartDateFromAccommodation(_,this.getAccommodationByIndex(t-1));else{const T=this.sectionModel.accommodations[t-1];d=T.startDate&&T.weeks?(0,m.jh)((0,m.bl)(T.startDate),T.weeks,[],!1):void 0}const g=function ac(i,l,a,t){if(!i||t&&(0,m.pA)(t))return a;const o=(0,m.Sl)(i,a)?i:a;return(0,m.Sl)(o,l)?l:o}(r,s,d,u);if(!o)return g;const f=this.getMinDateWithVacations(o,g,t),O=null===(n=this.accommodationOptions[t])||void 0===n?void 0:n.availability;return null!=O&&O.length&&(0,m.Sl)(O[0].from,f)?O[0].from:f}calculateMaxDate(t,o){if(this.accommodationMandatory)return this.getFirstSelectedCourseStartDate();{var n,r,s;const _=this.getLimitMaxDateSchoolYear(o),d=null===(n=this.accommodationOptions[t])||void 0===n?void 0:n.availability;if(null!=o&&o.durationMaxUnbounded){const f=this.getFirstSelectedCourseStartDate();return ci(_,(0,m.jh)(f,52),0,d)}const u=null!==(r=null===(s=this.sectionModel.accommodations[t])||void 0===s?void 0:s.weeks)&&void 0!==r?r:0;return ci(_,this.getMaxDateWithVacations(u,t,o),u,d)}}calculateStartDateFromAccommodation({startDate:t,weeks:o},{startingDaysOfTheWeek:n,endingDaysOfTheWeek:r}){const s=this.vacationPeriods.map(d=>this.normalizeWithAccommodation(d,n,r)),_=this.calculateEndDateWithVacations((0,m.bl)(t),o,s);return(0,m.Gv)(n,_)}getMinDateWithVacations(t,o,n){const r=(0,m.xd)(null==t?void 0:t.startingDaysOfTheWeek,o);if(0===n)return r;let s=0;const _=this.vacationPeriods.map(d=>this.normalizeWithAccommodation(d,t.startingDaysOfTheWeek,t.endingDaysOfTheWeek));if(_.some(d=>(0,m.VO)(r,[d.startDate,d.endDate]))){const d=this.sectionModel.accommodations[n-1],u=(0,m.bl)(d.startDate),f=(0,m.jh)(u,d.weeks);s=this.getVacationWeeksWithinDates(u,f,_)}return(0,m.jh)(r,s)}getMaxDateWithVacations(t,o,n){const r=this.getLastCourseDateOrLimitDate(n),s=(0,m.zh)(r),_=t?(0,m.jh)(s,-t):s,d=this.vacationPeriods.filter(O=>_.getTime()<O.startDate.getTime()),u=this.getAccommodationByIndex(o),g=(0,m.zh)(this.calculateMinDate(o,u)),f=this.getVacationWeeksWithinDates(g,s,d);return t?(0,m.jh)((0,m.zh)(s),-(t+f)):s}getLastCourseDateOrLimitDate(t){return this.shouldDateBeLimitedToEndOfYear(t)?new Date(this.getCurrentYear(),11,31):this.getLastCourseDate(t)}shouldDateBeLimitedToEndOfYear(t){const{inPriceShiftPeriod:o,schoolYears:n,schoolYear:r}=t||{},s=this.getCurrentYear();return o&&1==(null==n?void 0:n.length)&&r===s}getLimitMinDateSchoolYear(t){if(t){const o=new Date(Math.min(...t.schoolYears),0,1),n=this.getNormalizedVacationPeriods(o,t).reduce((r,s)=>r&&r.endDate.getTime()>=s.endDate.getTime()?r:s,void 0);return n?n.endDate:o}}getLimitMaxDateSchoolYear(t){if(t){const o=new Date(Math.max(...t.schoolYears)+2,11,31),n=this.getNormalizedVacationPeriods(o,t).reduce((r,s)=>r&&r.startDate.getTime()<=s.startDate.getTime()?r:s,void 0);return n?n.startDate:o}}getVacationWeeksWithinDates(t,o,n){return n.filter(r=>(0,m.VO)(r.startDate,[t,o])||(0,m.VO)(r.endDate,[t,o])).reduce((r,s)=>r+s.weeks,0)}getNormalizedVacationPeriods(t,o){return this.vacationPeriods.filter(n=>(0,m.VO)(t,[n.startDate,n.endDate])).map(n=>this.normalizeWithAccommodation(n,o.startingDaysOfTheWeek,o.endingDaysOfTheWeek))}normalizeWithAccommodation(t,o,n){return{startDate:(0,m.Gv)(o,t.startDate),endDate:(0,m.Gv)(n,t.endDate),weeks:t.weeks}}calculateDurationMin(t){return this.accommodationMandatory?this.tuitionWeeks:null==t?void 0:t.durationMin}calculateEndDateWithVacations(t,o,n){return o<1?t:n.some(r=>(0,m.VO)(t,[r.startDate,r.endDate]))?this.calculateEndDateWithVacations((0,m.jh)(t,1),o,n):this.calculateEndDateWithVacations((0,m.jh)(t,1),o-1,n)}getLastSelectedCourse(){return this.selectedCourses[this.selectedCourses.length-1]}getFirstSelectedCourseStartDate(){var t;return(0,m.bl)(null===(t=this.selectedCourses[0])||void 0===t?void 0:t.startDate)}removeAccommodationsAfter(t,o=!0){for(let r=(null===(n=this.sectionModel.accommodations)||void 0===n?void 0:n.length)-1;r>t;r--){var n;this.removeAccommodationItem(r,!1)}o&&this.storeSectionData()}fillAccommodationList(t=[],o=!0){this.accommodations=t.filter(n=>n.durationMin<=this.tuitionWeeks).filter(n=>n.durationMin<=this.calculateDurationMax(0,n)).filter(n=>this.isOpenDuringAnyCoursePeriod(n)),this.accommodationsWithEmptyOption=this.hasNoAccommodationOption()?[this.noAccommodationOption,...this.accommodations.map(n=>({...n,weight:this.noAccommodationOption.weight+1}))]:this.accommodations,this.accommodationChanged(0,void 0,!1),o&&this.storeSectionData()}prepareLoadStoredData(){this.stepService.requestActiveQuote().pipe((0,k.w)(t=>(0,D.a)([(0,R.of)(t),this.loadSchoolAccommodations(null==t?void 0:t.input)])),(0,de.q)(1),(0,U.sL)(this.destroyRef)).subscribe(([t,o])=>{const{input:n}=t,{accommodations:r}=n,s=di(o.flat());this.resetAccommodations(n,s,!1),this.quoteOutputCourses=(0,_i._E)(t.products),null!=r&&r.length&&r.forEach(({code:_,weeks:d,startDate:u},g)=>{let f;this.addAccommodationItem(g,!1),this.accommodationChanged(g,_,!1),this.durationChange(g,d,!1),u&&(f={dateString:u,dateObject:(0,m.bl)(u)}),this.accommodationStartDateChange(g,f,!1)}),this.storeSectionData()})}loadSchoolAccommodations(t){const o=t.school,n=(0,N.OC)(t);return!isNaN(+o)&&(null==n?void 0:n.some(s=>!isNaN(+(null==s?void 0:s.code))&&s.weeks>0))?(this.loading=!0,(0,D.a)(n.map(s=>this.accommodationService.getByCourse(o,null==s?void 0:s.code,null==s?void 0:s.startDate))).pipe((0,q.b)(()=>this.loading=!1),(0,Ae.K)(s=>(this.loading=!1,this.loggerService.error(s),this.resetAccommodations(t),lt.E)))):(0,R.of)([])}
1resetAccommodations(t,o,n=!0){this.schoolType=null==t?void 0:t.schoolType,this.selectedSchool=null==t?void 0:t.school,this.selectedCourses=(0,se.I8)((0,N.OC)(t)),this.tuitionWeeks=(0,N.Ew)(t),this.accommodationMandatory=(0,N.$H)(t),this.incompletedCourse=(0,N.bL)(t),this.endDateLastCourse=this.selectedCourses.length&&(0,N.I)(this.getLastSelectedCourse()),this.vacationPeriods=this.extractVacationsFromAccommodation(o),this.sectionModel.accommodations=null,this.accommodationOptions=null,this.addAccommodationItem(0,!1),this.fillAccommodationList(o,n),this.resetDateOptions(0)}resetDateOptions(t){const o=this.getAccommodationByIndex(t),n=this.accommodationOptions[t];n.availability=this.buildAccommodationAvailability(o),n.minDate=this.calculateMinDate(t,o),n.maxDate=this.calculateMaxDate(t,o),n.disabledDays=this.calculateAccommodationDisabledDays(o),n.disabledDates=this.calculateAccommodationDisabledDates(o),n.durationMin=this.calculateDurationMin(o),n.durationMax=this.calculateDurationMax(t,o)}prepareResetOnChanges(){this.stepService.requestActiveQuote().pipe((0,k.w)(t=>{const{input:o}=t,{school:n,schoolType:r}=o,s=(0,N.OC)(o),_=n&&(null==s?void 0:s.length),d=this.selectedSchool!==n,u=this.schoolType!==r,g=this.hasCourseChanged(s);return(0,D.a)(_&&(d||u||g)?[(0,R.of)(t),this.loadSchoolAccommodations(o)]:[(0,R.of)(t),(0,R.of)([])])}),(0,U.sL)(this.destroyRef)).subscribe(([t,o])=>{const{input:n}=t,{school:r,schoolType:s}=n,_=this.selectedSchool!==r,d=this.schoolType!==s,u=(0,_i._E)(null==t?void 0:t.products);if(u&&(this.quoteOutputCourses=u),(_||d)&&(this.schoolType=s,this.fillAccommodationList()),(0,N.bL)(n))this.resetAccommodations(n);else if(null!=o&&o.length){const g=di(o.flat());this.resetAccommodations(n,g)}})}hasCourseChanged(t){var o;return(null===(o=this.selectedCourses)||void 0===o?void 0:o.length)!==(null==t?void 0:t.length)||(null==t?void 0:t.some((n,r)=>n.code!==this.selectedCourses[r].code||n.startDate!==this.selectedCourses[r].startDate||n.weeks!==this.selectedCourses[r].weeks))}extractVacationsFromAccommodation(t){var o;return null!=t&&t.length?this.convertVacations(null!==(o=t[0].vacations)&&void 0!==o?o:[]):[]}convertVacations(t){return t.filter(o=>o.durationWeeks>0).map(({startDate:o,endDate:n,durationWeeks:r})=>({startDate:(0,m.bl)(o),endDate:(0,m.bl)(n),weeks:r}))}getAccommodationByIndex(t){var o,n;const r=null===(o=this.sectionModel.accommodations[t])||void 0===o?void 0:o.code;return r?null===(n=this.accommodations)||void 0===n?void 0:n.find(s=>s.code===r):null}storeSectionData(){this.stepService.updatePartialRequest(this.sectionModel)}accommodationChanged(t,o,n=!0){var r;const s=null===(r=this.sectionModel.accommodations)||void 0===r?void 0:r[t];if(!s)return;const d=s.code!==o;o===this.noAccommodationOption.code?(s.code=o,s.weeks=void 0,this.accommodationStartDateChange(t,void 0,!1),n&&this.storeSectionData()):d&&(s.code=o,this.durationChange(t,void 0,!1),this.resetDateOptions(t),n&&this.storeSectionData());const u=this.getProductAccommodationByCode(o);this.isFullyOpenDuringAnyCoursePeriod(u)||(this.accommodationOptions[t].availability=this.buildAccommodationAvailability(u),this.accommodationOptions[t].durationMax=this.calculateDurationMax(t,u))}calculateDurationMax(t,o){var n,r,s;if(null!=o&&o.durationMaxUnbounded)return 52;if(this.accommodationMandatory&&0===t)return this.tuitionWeeks;const _=null!==(n=this.tuitionWeeks)&&void 0!==n?n:0,d=null!==(r=null==o?void 0:o.durationMax)&&void 0!==r?r:52,u=null!==(s=(0,m.Fb)(this.calculateMinDate(t,o),this.calculateMaxDate(t,o)))&&void 0!==s?s:0;let g=_;for(let O=0;O<t;O++){var f;g-=null!==(f=this.sectionModel.accommodations[O].weeks)&&void 0!==f?f:0}return Math.min(_,d,g,u)}hasNoAccommodationOption(){return!this.accommodationMandatory||this.accommodations.length<1}hasButtons(){return!this.accommodationMandatory&&!this.isWithoutAccommodation(this.sectionModel.accommodations[0])}isWithoutAccommodation(t){return(null==t?void 0:t.code)===this.noAccommodationOption.code}addAccommodationItem(t,o=!0){var n;null!==(n=this.sectionModel)&&void 0!==n&&null!==(n=n.accommodations)&&void 0!==n&&n.length||(this.sectionModel.accommodations=[],this.accommodationOptions=[]);const r={},s={};t>=0&&!o?(this.sectionModel.accommodations[t]=r,this.accommodationOptions[t]=s):(this.sectionModel.accommodations.push(r),this.accommodationOptions.push(s),this.accommodationOptions[t].items=this.getAccommodationList(t)),o&&this.storeSectionData()}getAccommodationList(t){var o;return 0===t?this.accommodations:null===(o=this.accommodations)||void 0===o?void 0:o.filter(n=>n.durationMin<=this.calculateDurationMax(t,n))}removeAccommodationItem(t,o=!0){this.sectionModel.accommodations.splice(t,1);for(let n=t;n<this.sectionModel.accommodations.length;n++)this.resetDateOptions(t);o&&this.storeSectionData()}durationChange(t,o,n=!0){const r=this.sectionModel.accommodations[t];if(!r||r.weeks===o)return;r.weeks=o;const s=this.getAccommodationByIndex(t);this.accommodationOptions[t].minDate=new Date(this.accommodationOptions[t].minDate),this.accommodationOptions[t].maxDate=this.calculateMaxDate(t,s);const _=this.accommodationOptions[t].maxDate,d=(0,m.bl)(this.sectionModel.accommodations[t].startDate);d&&d>_&&this.resetAccommodationStartDate(t,n);for(let u=this.sectionModel.accommodations.length-1;u>t;u--)this.removeAccommodationItem(u,!1);n&&this.storeSectionData()}
1resetAccommodationStartDate(t,o=!0){this.accommodationStartDateChange(t,void 0,o),this.forceRenderDatePicker(t)}forceRenderDatePicker(t){clearTimeout(this.datePickerTimeoutIds.get(t)),this.datePickerRenderKey[t]=-1,this.changeDetectorRef.detectChanges(),this.datePickerTimeoutIds.set(t,window.setTimeout(()=>{this.datePickerRenderKey[t]=0,this.datePickerTimeoutIds.delete(t),this.changeDetectorRef.detectChanges()}))}accommodationStartDateChange(t,o,n=!0){var r,s;this.sectionModel.accommodations[t].startDate=null!==(r=null==o?void 0:o.dateString)&&void 0!==r?r:null,this.sectionModel.accommodations[t].startDateObject=null!==(s=null==o?void 0:o.dateObject)&&void 0!==s?s:null,this.removeAccommodationsAfter(t,!1),n&&this.storeSectionData()}isOpenDuringAnyCoursePeriod(t){var o;return 0==(null===(o=t.openingPeriods)||void 0===o?void 0:o.length)||this.getOpeningPerCoursePeriod(t).length>0}isFullyOpenDuringAnyCoursePeriod(t){const o=this.getFirstSelectedCourseStartDate();return 0==(null==t?void 0:t.openingPeriods.length)||null!=(null==t?void 0:t.openingPeriods.find(n=>{const r=[(0,m.bl)(n.from),(0,m.bl)(n.until)];return(0,m.VO)(o,r)&&(0,m.VO)(this.endDateLastCourse,r)}))}getOpeningPerCoursePeriod(t){return this.selectedCourses.map(o=>({openPeriod:null==t?void 0:t.openingPeriods.find(r=>{const s=(0,m.bl)(o.startDate),_=this.getQuoteProductEndDate(o),d=[(0,m.bl)(r.from),(0,m.bl)(r.until)];return(0,m.VO)(s,d)||(0,m.VO)(_,d)}),course:o})).filter(o=>void 0!==o.openPeriod)}getQuoteProductEndDate(t){const o=this.quoteOutputCourses.find(n=>n.code===t.code);return o&&o.endDate?(0,m.bl)(o.endDate):(0,m.Eg)((0,N.I)(t))}getProductAccommodationByCode(t){return this.accommodations.find(o=>o.code===t)}buildAccommodationAvailability(t){if(!t)return[];const o=this.getOpeningPerCoursePeriod(t),{startingDaysOfTheWeek:n,endingDaysOfTheWeek:r}=t;return(null!=o?o:[]).map(s=>this.calculateAccommodationAvailability(s,n,r)).filter(s=>!!s)}calculateAccommodationAvailability(t,o,n){const{course:r}=t,s=(0,m.bl)(r.startDate),_=this.getQuoteProductEndDate(r),d=(0,m.bl)(t.openPeriod.from),u=(0,m.bl)(t.openPeriod.until),g=[d,u],f=(0,m.VO)(s,g),O=(0,m.VO)(_,g);if(!f||!O){if(f)return{from:(0,m.tZ)(s,o,"backward"),until:u};if(O)return{from:d,until:(0,m.tZ)(_,n,"forward")}}}getLastCourseDate(t){if(!this.endDateLastCourse)return;const o=(0,m.bl)(this.getLastSelectedCourse().startDate),n=this.getVacationWeeksWithinDates(o,this.endDateLastCourse,this.vacationPeriods),r=(0,m.jh)(this.endDateLastCourse,n);return t?(0,m.Gv)(t.startingDaysOfTheWeek,r):r}getCurrentYear(){return(new Date).getFullYear()}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-accommodation-dates-form-section"]],inputs:{sectionIndex:"sectionIndex"},decls:3,vars:3,consts:()=>{let a,t,o,n,r,s,_,d;return a=$localize(gi||(gi=Js||(Js=c(["Loading Accommodations..."])))),t=$localize(fi||(fi=Zs||(Zs=c(["Select accommodation"])))),o=$localize(Oi||(Oi=zs||(zs=c(["Accommodation"])))),n=$localize(hi||(hi=Ys||(Ys=c(["Duration"])))),r=$localize(Ci||(Ci=Xs||(Xs=c(["Start Date"])))),s=$localize(Si||(Si=Hs||(Hs=c(["This accommodation is only available for the following dates during your stay:"])))),_=$localize(Ti||(Ti=Ws||(Ws=c(["Delete the accommodation above"])))),d=$localize(Ei||(Ei=Ks||(Ks=c(["Add an accommodation"])))),[s,["message",a,"shadingColor","rgba(0,0,0,0.5)",3,"loading"],["sectionTitle",t,3,"sectionIndex"],[4,"ngFor","ngForOf"],["label",o,"valueExpr","code",1,"qt-form-section__start-new-line","form-field__validated-selector-padding",3,"valueChange","disabled","autofill","value","itemList","required","iconValidation","sortCriteria"],["class","form-field-sections__disclaimer",4,"ngIf"],["label",n,"class","form-field__validated-selector-padding",3,"disabled","autofill","value","minWeeks","maxWeeks","required","iconValidation","valueChange",4,"ngIf"],["label",r,"class","form-field__validated-selector-padding",3,"placeholder","disabled","dateValue","dateObject","minDate","maxDate","defaultDate","disabledDays","disabledDates","showCalendarIcon","required","iconValidation","dateChanged",4,"ngIf"],["class","qt-form-section__start-new-line",4,"ngIf"],[4,"ngIf"],[1,"form-field-sections__disclaimer"],["class","form-field-sections__disclaimer__items",4,"ngFor","ngForOf"],[1,"form-field-sections__disclaimer__items"],["label",n,1,"form-field__validated-selector-padding",3,"valueChange","disabled","autofill","value","minWeeks","maxWeeks","required","iconValidation"],["label",r,1,"form-field__validated-selector-padding",3,"dateChanged","placeholder","disabled","dateValue","dateObject","minDate","maxDate","defaultDate","disabledDays","disabledDates","showCalendarIcon","required","iconValidation"],[1,"qt-form-section__start-new-line"],["text",_,3,"buttonClick","icon","iconPos","iconFill","disabled","iconRounded","buttonStyle"],["text",d,3,"buttonClick","icon","iconPos","iconFill","disabled","iconRounded","buttonStyle"]]},template:function(t,o){1&t&&(e._UZ(0,"lx-loading-spinner",1),e.TgZ(1,"lx-section-template",2),e.YNc(2,fc,8,20,"ng-container",3),e.qZA()),2&t&&(e.Q6J("loading",o.loading),e.xp6(),e.Q6J("sectionIndex",o.sectionIndex),e.xp6(),e.Q6J("ngForOf",o.sectionModel.accommodations))},dependencies:[h.sg,h.O5,ae.r,j.g,Re.K,xe.i,Y.p,W,ui.u],styles:['[_nghost-%COMP%] .form-field-sections__disclaimer[_ngcontent-%COMP%]{font-size:var(--font-size-small2xs, 11px);padding:3px 15px;color:var(--color-primary, #000000);position:relative}[_nghost-%COMP%] .form-field-sections__disclaimer[_ngcontent-%COMP%]:before{content:"";-webkit-mask:url(/assets/images/icons/icon-information.svg);mask:url(/assets/images/icons/icon-information.svg);-webkit-mask-size:var(--icon-size-xxs, 10px);mask-size:var(--icon-size-xxs, 10px);height:var(--icon-size-xxs, 10px);width:var(--icon-size-xxs, 10px);position:absolute;
1left:0;top:5px;background-color:var(--color-primary, #000000)}[_nghost-%COMP%] .form-field-sections__disclaimer__items[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}']}),l})();var De=function(i){return i[i.FOR_INFO=0]="FOR_INFO",i[i.SELECTABLE=1]="SELECTABLE",i[i.BY_QUANTITY=2]="BY_QUANTITY",i}(De||{}),Cc=p(1494),Sc=p(5592),ve=p(9862),Tc=p(9111),Ec=p(2562),Mc=p(1834);let vc=(()=>{var i;class l extends Ec.b{constructor(t,o,n){super(o,n),this.httpClient=t}findSupplementsByCoursesAndAccommodations(t,o,n,r,s,_,d,u="body",g=!1,f){var O,T;if(null==t)throw new Error("Required parameter schoolId was null or undefined when calling findSupplementsByCoursesAndAccommodations.");if(null==o)throw new Error("Required parameter courseIds was null or undefined when calling findSupplementsByCoursesAndAccommodations.");if(null==n)throw new Error("Required parameter acceptLanguage was null or undefined when calling findSupplementsByCoursesAndAccommodations.");if(null==r)throw new Error("Required parameter acceptCompany was null or undefined when calling findSupplementsByCoursesAndAccommodations.");let v=new ve.LE({encoder:this.encoder});v=this.addToHttpParams(v,t,"schoolId"),o&&o.forEach(gt=>{v=this.addToHttpParams(v,gt,"courseIds")}),s&&s.forEach(gt=>{v=this.addToHttpParams(v,gt,"accommodationIds")}),v=this.addToHttpParams(v,_,"tripStartDate"),v=this.addToHttpParams(v,d,"tripEndDate");let x=this.defaultHeaders;null!=n&&(x=x.set("Accept-Language",String(n))),null!=r&&(x=x.set("Accept-Company",String(r)));const C=null!==(O=null==f?void 0:f.httpHeaderAccept)&&void 0!==O?O:this.configuration.selectHeaderAccept(["application/json"]);void 0!==C&&(x=x.set("Accept",C));const Ue=null!==(T=null==f?void 0:f.context)&&void 0!==T?T:new ve.qT;let we="json";C&&(we=C.startsWith("text")?"text":this.configuration.isJsonMime(C)?"json":"blob");const{basePath:rp,withCredentials:wa}=this.configuration;return this.httpClient.request("get","".concat(rp).concat("/products/v2/supplements"),{context:Ue,params:v,responseType:we,...wa?{withCredentials:wa}:{},headers:x,observe:u,reportProgress:g})}}return(i=l).\u0275fac=function(t){return new(t||i)(e.LFG(ve.eN),e.LFG(Tc.G,8),e.LFG(Mc.V,8))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})(),Nc=(()=>{var i;class l extends En.b{constructor(t){super(),this.supplementsControllerApiService=t,this.responseCache=new Mn.Y(()=>(0,R.of)([]),this.cacheSettings.get)}getByCoursesAndAccommodations(t,o,n,r,s){var _;return this.supplementsControllerApiService.findSupplementsByCoursesAndAccommodations(+t,null!==(_=null==o?void 0:o.map(d=>+d))&&void 0!==_?_:[],this.locale,this.companyHeader,n?n.map(d=>+d):null,r,s)}
1getResponseCache$(){return(0,R.of)(this.responseCache)}}return(i=l).\u0275fac=function(t){return new(t||i)(e.LFG(vc))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),(0,ee.gn)([(0,Wt.PW)((a,t,o,n,r)=>[a,t,o,n,r].join("|")),(0,ee.w6)("design:type",Function),(0,ee.w6)("design:paramtypes",[String,Array,Array,String,String]),(0,ee.w6)("design:returntype",Sc.y)],l.prototype,"getByCoursesAndAccommodations",null),l})();var P=p(6825);const Rc=[(0,P.X$)("addOrRemove",[(0,P.SB)("add",(0,P.oB)("*")),(0,P.SB)("remove",(0,P.oB)({transform:"rotate(45deg)"})),(0,P.eR)("void => *",(0,P.jt)(0)),(0,P.eR)("add <=> remove",(0,P.jt)("200ms ease-in-out"))]),(0,P.X$)("showOrHide",[(0,P.SB)("show",(0,P.oB)("*")),(0,P.SB)("hide",(0,P.oB)({width:0,padding:0,margin:0,opacity:0,visibility:"hidden"})),(0,P.eR)("void => *",(0,P.jt)(0)),(0,P.eR)("show <=> hide",(0,P.jt)("200ms ease-in-out"))])];var Mi=p(4440),ue=function(i){return i[i.NOT_AVAILABLE=0]="NOT_AVAILABLE",i[i.PARTIALLY_AVAILABLE=1]="PARTIALLY_AVAILABLE",i[i.FULLY_AVAILABLE=2]="FULLY_AVAILABLE",i}(ue||{}),xc=p(3902),pe=p(6949);let vi,Ni,Ri,xi,yi,Ii,Pi,Li,bi,Fi,Ai,Di,qi=(()=>{var i;class l{constructor(){this.durationUnitMap=(0,e.f3M)(xc.I)}getPerDurationText(t="WEEKS",o=!1){switch(t){case pe.f.EACH:return o?$localize(vi||(vi=js||(js=c(["per extra lesson"])))):$localize(Ni||(Ni=el||(el=c(["per lesson"]))));case pe.f.HOURS:return o?$localize(Ri||(Ri=tl||(tl=c(["per extra hour"])))):$localize(xi||(xi=ol||(ol=c(["per hour"]))));case pe.f.DAYS:return o?$localize(yi||(yi=nl||(nl=c(["per extra day"])))):$localize(Ii||(Ii=il||(il=c(["per day"]))));case pe.f.MONTH:return o?$localize(Pi||(Pi=al||(al=c(["per extra month"])))):$localize(Li||(Li=rl||(rl=c(["per month"]))));case pe.f.YEARS:return o?$localize(bi||(bi=sl||(sl=c(["per extra year"])))):$localize(Fi||(Fi=ll||(ll=c(["per year"]))));default:return o?$localize(Ai||(Ai=_l||(_l=c(["per extra week"])))):$localize(Di||(Di=dl||(dl=c(["per week"]))))}}getDurationPluralText(t=pe.f.WEEKS){var o;return null!==(o=this.durationUnitMap.plural[t])&&void 0!==o?o:""}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();var yc=p(4305),Ui=p(2488);let wi,$i,Qi,ki,Bi,Vi,Ic=(()=>{var i;class l{constructor(){this.eslDurationService=(0,e.f3M)(qi),this.durationService=(0,e.f3M)(yc.D)}transform(t){if(!t)return"";const{durationUnit:o,minQuantity:n,maxQuantity:r}=t,s=!(0,Ui.q)(n),_=!(0,Ui.q)(r),d=s&&_;if(!s&&!_)return"";if(!o)return d?"(".concat(n,"-").concat(r,")"):s?"(".concat(n,"+)"):"(".concat(r,")");if(d){const g=this.durationService.getDurationRange({durationMin:n,durationMax:r,durationUnit:o});return"(".concat(g,")")}if(s){const u=this.eslDurationService.getDurationPluralText(o);return"(".concat(n,"+ ").concat(u,")")}return""}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275pipe=e.Yjl({name:"lxOptionalPriceDuration",type:i,pure:!0,standalone:!0}),l})(),Pc=(()=>{var i;class l{constructor(){this.durationService=(0,e.f3M)(qi)}transform(t){var o,n;const r=null==t||null===(o=t.optionals)||void 0===o?void 0:o[0];if(null==r||!r.durationUnit)return null;const s=this.durationService.getPerDurationText(r.durationUnit,r.afterFixedPrice);return s?(null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(s.toLowerCase()))?null:s:null}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275pipe=e.Yjl({name:"lxSupplementDurationUnit",type:i,pure:!0,standalone:!0}),l})();const Lc=i=>({"course-supplement--selected":i}),dt=i=>({currency:i}),Gi=i=>({"course-supplement__action-icon--disabled":i});function bc(i,l){}function Fc(i,l){if(1&i&&(e.ynx(0),e.YNc(1,bc,0,0,"ng-template",19),e.BQk()),2&i){e.oxw();const a=e.MAs(22);e.xp6(),e.Q6J("ngTemplateOutlet",a)}}function Ac(i,l){if(1&i&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e.BQk()),2&i){const a=l.ngIf;e.xp6(2),e.hij(" (",a,")")}}function Dc(i,l){if(1&i&&(e.ynx(0),e._UZ(1,"br"),e.TgZ(2,"span",20),e._uU(3),e.qZA(),e.BQk()),2&i){const a=e.oxw();e.xp6(3),e.Oqu(a.supplement.description)}}function qc(i,l){if(1&i&&(e.TgZ(0,"div",22),e._uU(1),e.ALo(2,"lxPrice"),e.qZA()),2&i){const a=e.oxw(3);e.xp6(),e.Oqu(e.xi3(2,1,a.supplement.price,e.VKq(4,dt,a.displayCurrency())))}}function Uc(i,l){if(1&i&&(e.ynx(0),e.YNc(1,qc,3,6,"div",21),e.BQk()),2&i){const a=e.oxw(2);e.xp6(),e.Q6J("ngIf",null==a.supplement?null:a.supplement.price)}}function wc(i,l){1&i&&(e.TgZ(0,"div",23),e.SDv(1,4),e.qZA())}function $c(i,l){if(1&i&&(e.ynx(0),e.YNc(1,Uc,2,1,"ng-container",10)(2,wc,2,0,"ng-template",null,3,e.W1O),e.BQk()),2&i){const a=e.MAs(3),t=e.oxw();e.xp6(),e.Q6J("ngIf",!(null!=t.supplement&&t.supplement.priceOnRequest))("ngIfElse",a)}}function Qc(i,l){}function kc(i,l){if(1&i&&(e.ynx(0),e._uU(1),e.ALo(2,"lxDate"),e.ALo(3,"lxDate"),e.BQk()),2&i){const a=l.$implicit,t=l.first,o=l.last,n=e.oxw(2);e.xp6(),e.HOy(" ",t?"(":"","",e.xi3(2,4,a.from,n.DateFormat.NUMBERS_ONLY)," - ",e.xi3(3,7,a.until,n.DateFormat.NUMBERS_ONLY),"",o?")":", "," ")}}function Bc(i,l){1&i&&(e.TgZ(0,"span",28),e.SDv(1,5),e.qZA())}function Vc(i,l){1&i&&(e.TgZ(0,"span",28),e.SDv(1,6),e.qZA())}function Gc(i,l){if(1&i&&(e.ynx(0),e.TgZ(1,"span",24),e.YNc(2,kc,4,10,"ng-container",25),e.qZA(),e._UZ(3,"br"),e.ynx(4,26),e.YNc(5,Bc,2,0,"span",27)(6,Vc,2,0,"span",27),e.BQk()()),2&i){const a=e.oxw();e.xp6(2),e.Q6J("ngForOf",a.supplement.availableDates.periods),e.xp6(2),e.Q6J("ngSwitch",a.availabilityStatus),e.xp6(),e.Q6J("ngSwitchCase",a.AvailabilityStatus.NOT_AVAILABLE),e.xp6(),e.Q6J("ngSwitchCase",a.AvailabilityStatus.PARTIALLY_AVAILABLE)}}
1function Jc(i,l){if(1&i&&(e.TgZ(0,"div",29)(1,"div",30)(2,"span",31),e._uU(3),e.ALo(4,"lxOptionalPriceDuration"),e.qZA()(),e.TgZ(5,"div",32)(6,"span",33),e._uU(7),e.ALo(8,"lxPrice"),e.qZA()()()),2&i){let a,t;const o=e.oxw();e.xp6(3),e.AsE("",e.lcZ(4,3,o.firstOptional())," ",null==(a=o.firstOptional())?null:a.label," "),e.xp6(4),e.Oqu(e.xi3(8,5,null==(t=o.firstOptional())?null:t.price,e.VKq(8,dt,o.displayCurrency())))}}function Zc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"button",34),e.NdJ("click",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.toggleOptionsExpansion())}),e.TgZ(1,"span",35),e.SDv(2,7),e.qZA(),e.TgZ(3,"span",36),e._UZ(4,"i",37),e.qZA()()}if(2&i){const a=e.oxw();e.uIk("aria-expanded",a.optionsExpanded()),e.xp6(2),e.pQV(a.toggleOptionsLabel()),e.QtT(2),e.xp6(2),e.Q6J("ngClass",a.optionsExpanded()?"pi pi-chevron-up":"pi pi-chevron-down")}}function zc(i,l){if(1&i&&(e.TgZ(0,"div",40)(1,"span",31),e._uU(2),e.ALo(3,"lxOptionalPriceDuration"),e.qZA(),e.TgZ(4,"span",41),e._uU(5),e.ALo(6,"lxPrice"),e.qZA()()),2&i){const a=l.$implicit,t=e.oxw(2);e.xp6(2),e.AsE("",e.lcZ(3,3,a)," ",a.label,""),e.xp6(3),e.Oqu(e.xi3(6,5,a.price,e.VKq(8,dt,t.displayCurrency())))}}function Yc(i,l){if(1&i&&(e.TgZ(0,"div",38),e.YNc(1,zc,7,10,"div",39),e.qZA()),2&i){const a=e.oxw();e.xp6(),e.Q6J("ngForOf",a.remainingOptionals())}}function Xc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div",42)(1,"span",43),e.NdJ("click",function(){e.CHM(a);const o=e.oxw();return e.KtG(o.toggleSelected())}),e._UZ(2,"i",44),e.qZA()()}if(2&i){const a=e.oxw();e.xp6(),e.Q6J("ngClass",e.VKq(2,Gi,a.disabled))("@addOrRemove",a.supplementSelected?"remove":"add")}}function Hc(i,l){if(1&i){const a=e.EpF();e.ynx(0),e.TgZ(1,"div",46),e.NdJ("click",function(){e.CHM(a);const o=e.oxw(2);return e.KtG(o.removeSupplement())}),e._UZ(2,"i",47),e.qZA(),e.TgZ(3,"div",48),e._uU(4),e.qZA(),e.BQk()}if(2&i){const a=e.oxw(2);e.xp6(),e.Q6J("@showOrHide",a.supplementSelected?"show":"hide"),e.xp6(2),e.Q6J("@showOrHide",a.supplementSelected?"show":"hide"),e.xp6(),e.hij(" ",a.quantity," ")}}function Wc(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div",45),e.YNc(1,Hc,5,3,"ng-container",14),e.TgZ(2,"div",43),e.NdJ("click",function(){e.CHM(a);const o=e.oxw();return e.KtG(!o.expired&&o.addSupplement())}),e._UZ(3,"i",44),e.qZA()()}if(2&i){const a=e.oxw();e.xp6(),e.Q6J("ngIf",a.supplementSelected),e.xp6(),e.Q6J("ngClass",e.VKq(2,Gi,!a.canSelectSupplement||a.expired||a.quantity>=a.supplement.maxUnit))}}let Ji=(()=>{var i;class l{constructor(){this.quantity=0,this.showDescription=!1,this.selectedSupplementIds=[],this.quantityChange=new e.vpe,this.DateFormat=Oe.t,this.AvailabilityStatus=ue,this.supplementSignal=(0,e.tdS)(void 0),this.optionsExpanded=(0,e.tdS)(!1),this.optionalsExist=(0,e.Flj)(()=>{var t,o;return(null!==(t=null===(o=this.supplementSignal())||void 0===o||null===(o=o.optionals)||void 0===o?void 0:o.length)&&void 0!==t?t:0)>0}),this.firstOptional=(0,e.Flj)(()=>{var t;const o=null===(t=this.supplementSignal())||void 0===t?void 0:t.optionals;return null==o?void 0:o[0]}),this.remainingOptionals=(0,e.Flj)(()=>{var t;const o=null===(t=this.supplementSignal())||void 0===t?void 0:t.optionals;return o&&o.length>1?o.slice(1):[]}),this.multipleOptionalsExist=(0,e.Flj)(()=>{var t,o;return(null!==(t=null===(o=this.supplementSignal())||void 0===o||null===(o=o.optionals)||void 0===o?void 0:o.length)&&void 0!==t?t:0)>1}),this.toggleOptionsLabel=(0,e.Flj)(()=>this.optionsExpanded()?$localize(wi||(wi=cl||(cl=c(["See less options"])))):$localize($i||($i=ul||(ul=c(["See all options"]))))),this.expired=!1,this.disabled=!0}ngOnInit(){this.supplementSignal.set(this.supplement),this.updateAvailabilityAndSelection(),this.isMultiSelect=this.supplement.allowOrder!==De.SELECTABLE,this.updateSupplementState(),this.updateIsExpired(),this.updateDisabledState()}ngOnChanges(t){const{supplement:o,quoteStart:n,quoteEnd:r,selectedSupplementIds:s}=t;if(o&&this.supplementSignal.set(this.supplement),(n||r)&&this.updateAvailabilityAndSelection(),s&&this.supplement){const _=this.selectedSupplementIds.includes(this.supplement.code);this.supplementSelected=_,_?0===this.quantity&&(this.quantity=this.supplement.quantity>0?this.supplement.quantity:this.getSupplementMinUnit()):this.quantity=0}this.updateSupplementState(),this.updateIsExpired(),this.updateDisabledState()}toggleSelected(){!this.canSelectSupplement||this.expired||(this.quantity=this.quantity?0:this.supplement.quantity>0?this.supplement.quantity:1,this.updateSupplementState(),this.quantityChange.emit(this.quantity))}addSupplement(){if(this.canSelectSupplement&&!this.expired&&this.quantity<this.supplement.maxUnit){const t=0===this.quantity?this.get
1SupplementMinUnit():1;this.quantity+=t,this.updateSupplementState(),this.quantityChange.emit(this.quantity)}}removeSupplement(){if(this.quantity>0){const t=this.getSupplementMinUnit();this.quantity-=this.quantity===t?t:1,this.updateSupplementState(),this.quantityChange.emit(this.quantity)}}displayCurrency(){var t,o,n,r;const s=null!==(t=null===(o=this.supplement)||void 0===o?void 0:o.price)&&void 0!==t?t:[];return this.currency&&s.some(_=>(null==_?void 0:_.currency)===this.currency)?this.currency:null!==(n=null===(r=s[0])||void 0===r?void 0:r.currency)&&void 0!==n?n:""}toggleOptionsExpansion(){this.optionsExpanded.set(!this.optionsExpanded())}updateAvailabilityAndSelection(){this.availabilityStatus=this.getAvailabilityStatus(),this.canSelectSupplement=this.isAvailableForSelection()}getAvailabilityStatus(){var t;return null===(t=this.supplement)||void 0===t||null===(t=t.availableDates)||void 0===t||null===(t=t.periods)||void 0===t||!t.length||this.isFullyAvailable()?ue.FULLY_AVAILABLE:this.isPartiallyAvailable()?ue.PARTIALLY_AVAILABLE:ue.NOT_AVAILABLE}isAvailableForSelection(){return this.availabilityStatus===ue.FULLY_AVAILABLE||this.availabilityStatus===ue.PARTIALLY_AVAILABLE}updateSupplementState(){this.supplementSelected=this.quantity>0}getSupplementMinUnit(){return this.supplement.minUnit||1}isPartiallyAvailable(){var t,o;return!(this.isFullyAvailable()||null===(t=this.supplement)||void 0===t||!t.availableDates)&&(null===(o=this.supplement.availableDates)||void 0===o||null===(o=o.periods)||void 0===o?void 0:o.some(n=>{const r=(0,m.bl)(n.from),s=(0,m.bl)(n.until),_=[r,s],d=[this.quoteStart,this.quoteEnd],u=(0,m.sm)(this.quoteStart,_),g=(0,m.sm)(this.quoteEnd,_),f=(0,m.sm)(r,d)&&(0,m.sm)(s,d);return u||g||f}))}isFullyAvailable(){var t;return null===(t=this.supplement)||void 0===t||null===(t=t.availableDates)||void 0===t||null===(t=t.periods)||void 0===t?void 0:t.some(o=>{const n=[(0,m.bl)(o.from),(0,m.bl)(o.until)];return(0,m.sm)(this.quoteStart,n)&&(0,m.sm)(this.quoteEnd,n)})}updateIsExpired(){var t;this.expired=!(null===(t=this.supplement)||void 0===t||null===(t=t.availableDates)||void 0===t||!t.expired)}updateDisabledState(){this.disabled=this.isMultiSelect?!this.canSelectSupplement||this.expired&&!this.supplementSelected:!this.canSelectSupplement||this.expired||this.quantity>=this.supplement.maxUnit}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-course-supplement"]],inputs:{supplement:"supplement",quantity:"quantity",currency:"currency",showDescription:"showDescription",quoteStart:"quoteStart",quoteEnd:"quoteEnd",selectedSupplementIds:"selectedSupplementIds"},outputs:{quantityChange:"quantityChange"},standalone:!0,features:[e.TTD,e.jDz],decls:23,vars:16,consts:()=>{let a,t,o,n;return a=$localize(Qi||(Qi=pl||(pl=c(["On request"])))),t=$localize(ki||(ki=ml||(ml=c(["Not available during your stay"])))),o=$localize(Bi||(Bi=gl||(gl=c(["Partially available during your stay"])))),n=$localize(Vi||(Vi=fl||(fl=c(["",":INTERPOLATION:"]))),"\ufffd0\ufffd"),[["emptyPriceSlot",""],["singleSelect",""],["multiSelect",""],["supplementPriceRequest",""],a,t,o,n,[1,"course-supplement",3,"ngClass"],[1,"course-supplement__actions"],[4,"ngIf","ngIfElse"],[1,"course-supplement__details"],[1,"course-supplement__details-row"],[1,"course-supplement__details-text"],[4,"ngIf"],[1,"course-supplement__details-price"],["class","course-supplement__optional-summary",4,"ngIf"],["type","button","class","course-supplement__optionals-toggle",3,"click",4,"ngIf"],["class","course-supplement__optionals-panel",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"course-supplement__details-description"],["class","course-supplement__price",4,"ngIf"],[1,"course-supplement__price"],[1,"course-supplement__on-request"],[1,"course-supplement__details-dates"],[4,"ngFor","ngForOf"],[3,"ngSwitch"],["class","course-supplement__details-dates-warning",4,"ngSwitchCase"],[1,"course-supplement__details-dates-warning"],[1,"course-supplement__optional-summary"],[1,"course-supplement__optional-summary-duration"],[1,"course-supplement__optionals-duration"],[1,"course-supplement__optional-summary-price"],[1,"course-supplement__price-value"],["type","button",1,"course-supplement__optionals-toggle",3,"click"],[1,"course-supplement__optionals-toggle-label"],["aria-hidden","true",1,"course-supplement__optionals-toggle-icon"],[3,"ngClass"],[1,"course-supplement__optionals-panel"],["class","course-supplement__optionals-row course-supplement__optionals-row--secondary",4,"ngFor","ngForOf"],[1,"course-supplement__optionals-row","course-supplement__optionals-row--secondary"],[1,"course-supplement__optionals-price"],[1,"course-supplement__single-select"],[1,"course-supplement__action-icon",3,"click","ngClass"],[1,"pi","pi-plus"],[1,"course-supplement__multi-select"],[1,"course-supplement__action-icon",3,"click"],[1,"pi","pi-minus"],[1,"course-supplement__quantity"]]},template:function(t,o){if(1&t&&(e.TgZ(0,"div",8)(1,"div",9),e.YNc(2,Fc,2,1,"ng-container",10),e.qZA(),e.TgZ(3,"div",11)(4,"div",12)(5,"div",13)(6,"span"),e._uU(7),e.qZA(),e.YNc(8,Ac,3,1,"ng-container",14),e.ALo(9,"lxSupplementDurationUnit"),e.YNc(10,Dc,4,1,"ng-container",14),e.qZA(),e.TgZ(11,"div",15),e.YNc(12,$c,4,2,"ng-container",10)(13,Qc,0,0,"ng-template",null,0,e.W1O),e.qZA()(),e.YNc(15,Gc,7,4,"ng-container",14)(16,Jc,9,10,"div",16)(17,Zc,5,3,"button",17)(18,Yc,2,1,"div",18),e.qZA()(),e.YNc(19,Xc,3,4,"ng-template",null,1,e.W1O)(21,Wc,4,4,"ng-template",null,2,e.W1O)),2&t){const n=e.MAs(14),r=e.MAs(20);e.Q6J("ngClass",e.VKq(14,Lc,o.supplementSelected)),e.xp6(2),e.Q6J("ngIf",o.isMultiSelect)("ngIfElse",r),e.xp6(5),e.Oqu(o.supplement.name),e.xp6(),e.Q6J("ngIf",e.lcZ(9,12,o.supplement)),e.xp6(2),e.Q6J("ngIf",o.showDescription&&o.supplement.description),e.xp6(2),e.Q6J("ngIf",!o.optionalsExist())("ngIfElse",n),e.xp6(3),e.Q6J("ngIf",null==o.supplement||null==o.supplement.availableDates||null==o.supplement.availableDates.periods?null:o.supplement.availableDates.periods.length),e.xp6(),e.Q6J("ngIf",o.optionalsExist()),e.xp6(),e.Q6J("ngIf",o.multipleOptionalsExist()),e.xp6(),e.Q6J("ngIf",o.optionsExpanded())}},dependencies:[h.ez,h.mk,h.sg,h.O5,h.tP,h.RF,h.n9,ui.u,Ic,Mi.d,Pc],styles:["[_nghost-%COMP%]{display:block;position:relative;overflow:visible}[_nghost-%COMP%] .course-supplement[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:#fff;border-radius:8px;padding:15px;position:relative;overflow:hidden;width:100%;border:1px solid var(--color-grey-3, #dddddd)}[_nghost-%COMP%] .course-supplement__single-select[_ngcontent-%COMP%], [_nghost-%COMP%] .course-supplement__multi-select[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%] .course-supplement__action-icon[_ngcontent-%COMP%]{display:block;width:24px;height:24px;line-height:24px;border-radius:12px;background-color:var(--color-primary, #000000);color:#fff;text-align:center;cursor:pointer}[_nghost-%COMP%] .course-supplement__action-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:24px;height:24px;text-align:center;color:#fff;font-size:14px;padding-top:4px}[_nghost-%COMP%] .course-supplement__action-icon--disabled[_ngcontent-%COMP%]{background-color:var(--color-grey-4, #cccccc);cursor:default}[_nghost-%COMP%] .course-supplement__actions[_ngcontent-%COMP%]{white-space:nowrap;justify-self:flex-start;align-self:center;flex-grow:0}[_nghost-%COMP%] .course-supplement__quantity[_ngcontent-%COMP%], [_nghost-%COMP%] .course-supplement__price[_ngcontent-%COMP%]{font-size:var(--font-size-normal, 14px);line-height:var(--font-size-normal2xl, 16px)}[_nghost-%COMP%] .course-supplement__quantity[_ngcontent-%COMP%]{text-align:center;padding:0 5px;margin:0 3px;font-weight:var(--font-weight-regular, 400);color:var(--color-grey-9, #202020);box-sizing:border-box}[_nghost-%COMP%] .course-supplement__details[_ngcontent-%COMP%]{justify-self:flex-start;align-self:center;flex-grow:1;font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-normal, 14px);line-height:var(--font-size-normal2xl, 16px);color:var(--color-grey-8, #404040);padding:0 15px}[_nghost-%COMP%] .course-supplement__details-dates[_ngcontent-%COMP%], [_nghost-%COMP%] .course-supplement__details-dates-warning[_ngcontent-%COMP%], [_nghost-%COMP%] .course-supplement__details-description[_ngcontent-%COMP%]{font-size:var(--font-size-smallxs, 12px);margin-top:10px;font-style:italic}[_nghost-%COMP%] .course-supplement__details-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:15px}[_nghost-%COMP%] .course-supplement__details-text[_ngcontent-%COMP%]{flex:1 1 auto}[_nghost-%COMP%] .course-supplement__details-price[_ngcontent-%COMP%]{flex:0 0 auto;white-space:nowrap}[_nghost-%COMP%] .course-supplement__optional-summary[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:10px}[_nghost-%COMP%] .course-supplement__optional-summary-duration[_ngcontent-%COMP%]{color:var(--color-grey-8, #404040);font-size:var(--font-size-normal, 14px)}[_nghost-%COMP%] .course-supplement__optional-summary-price[_ngcontent-%COMP%] .course-supplement__price-value[_ngcontent-%COMP%]{font-size:var(--font-size-normal2xl, 16px);font-weight:var(--font-weight-bold, 700);color:var(--color-primary, #000000);opacity:.5}[_nghost-%COMP%] .course-supplement__price[_ngcontent-%COMP%], [_nghost-%COMP%] .course-supplement__on-request[_ngcontent-%COMP%]{font-size:var(--font-size-normal2xl, 16px);line-height:var(--font-size-normal2xl, 16px);white-space:nowrap;justify-self:flex-end;align-self:center;flex-grow:0;font-weight:var(--font-weight-bold, 700);color:var(--color-primary, #000000);opacity:.5}[_nghost-%COMP%] .course-supplement__optionals-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:15px}[_nghost-%COMP%] .course-supplement__optionals-row--secondary[_ngcontent-%COMP%]{color:var(--color-grey-7, #606060)}[_nghost-%COMP%] .course-supplement__optionals-duration[_ngcontent-%COMP%]{text-align:left;flex-grow:1}[_nghost-%COMP%] .course-supplement__optionals-price[_ngcontent-%COMP%]{font-weight:var(--font-weight-regular, 400);text-align:right;white-space:nowrap}[_nghost-%COMP%] .course-supplement__optionals-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:0;margin:5px 0;font:inherit;text-align:left;-webkit-appearance:none;appearance:none;cursor:pointer;display:inline-flex;align-items:center;gap:5px}[_nghost-%COMP%] .course-supplement__optionals-toggle-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-primary, #000000);font-size:var(--font-size-smallxxs, 10px);margin-left:5px}[_nghost-%COMP%] .course-supplement__optionals-toggle-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--font-size-smallxxs, 10px);line-height:1}[_nghost-%COMP%] .course-supplement__optionals-toggle-label[_ngcontent-%COMP%]{font-size:var(--font-size-small, 13px);color:var(--color-primary, #000000);text-decoration:none;cursor:pointer}[_nghost-%COMP%] .course-supplement__optionals-toggle-label[_ngcontent-%COMP%]:hover{opacity:.8;text-decoration:none}[_nghost-%COMP%] .course-supplement__optionals-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding-top:5px;border-top:1px solid var(--color-grey-3, #dddddd)}[_nghost-%COMP%] .course-supplement--selected[_ngcontent-%COMP%] .course-supplement__price[_ngcontent-%COMP%], [_nghost-%COMP%] .course-supplement--selected[_ngcontent-%COMP%] .course-supplement__price-value[_ngcontent-%COMP%], [_nghost-%COMP%] .course-supplement--selected[_ngcontent-%COMP%] .course-supplement__on-request[_ngcontent-%COMP%]{opacity:1}"],data:{animation:[Rc]}}),l})();
1var Kc=p(1721);let zi,Yi;const jc=i=>({"supplements__accordion--open":i}),eu=()=>({property:"productPosition"}),tu=i=>[i];function ou(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"lx-course-supplement",9),e.NdJ("quantityChange",function(o){const n=e.CHM(a).$implicit,r=e.oxw(4);return e.KtG(r.quantityChange(n.code,o))}),e.qZA()}if(2&i){const a=l.$implicit,t=e.oxw(4);e.Q6J("supplement",a)("showDescription",!0)("currency",t.selectedCurrency)("quantity",t.getSupplementStoredQuantity(a))("quoteStart",t.quoteStart)("quoteEnd",t.quoteEnd)("selectedSupplementIds",t.selectedSupplementIds)}}function nu(i,l){if(1&i&&(e.TgZ(0,"div",7),e.YNc(1,ou,1,7,"lx-course-supplement",8),e.ALo(2,"lxSortBy"),e.qZA()),2&i){const a=e.oxw().$implicit;e.Q6J("@accordionAnimation",void 0),e.xp6(),e.Q6J("ngForOf",e.xi3(2,2,a.supplements,e.VKq(6,tu,e.DdM(5,eu))))}}function iu(i,l){if(1&i){const a=e.EpF();e.TgZ(0,"div",4)(1,"div",5),e.NdJ("click",function(){const o=e.CHM(a).$implicit;return e.KtG(o.isOpen=!o.isOpen)}),e._uU(2),e.qZA(),e.YNc(3,nu,3,8,"div",6),e.qZA()}if(2&i){const a=l.$implicit;e.Q6J("ngClass",e.VKq(3,jc,a.isOpen)),e.xp6(2),e.hij(" ",a.group," "),e.xp6(),e.Q6J("ngIf",a.isOpen)}}function au(i,l){if(1&i&&(e.TgZ(0,"lx-section-template",2),e.YNc(1,iu,4,5,"div",3),e.qZA()),2&i){const a=e.oxw();e.Q6J("columns",1)("sectionIndex",a.sectionIndex),e.xp6(),e.Q6J("ngForOf",a.supplementGroups)}}let ru=(()=>{var i;class l{constructor(t,o){this.stepService=t,this.supplementService=o,this.WEEKLY="W",this.sectionModel={},this.selectedSupplementIds=[],this.subscription=new ne.w0,this.selectedSupplementsChanged$=new L.x,this.sortByWeight=(n,r)=>null==(null==n?void 0:n.groupWeight)?null==(null==r?void 0:r.groupWeight)?0:1:null==(null==r?void 0:r.groupWeight)?-1:n.groupWeight-r.groupWeight}ngOnInit(){this.subscription.add(this.loadStoredData$().pipe((0,q.b)(t=>{var o;null!=t&&null!==(o=t.supplements)&&void 0!==o&&o.length||this.resetSupplements()}),(0,V.z)(()=>this.resetOnChanges$())).subscribe()),this.subscription.add(this.stepService.requestActiveQuote().subscribe(({endDate:t})=>{this.quoteEnd=(0,m.bl)(t)})),this.selectedSupplementIds=this.getSelectedSupplementIds()}ngAfterViewInit(){this.subscription.add(this.selectedSupplementsChanged$.pipe((0,ge.b)(400)).subscribe(()=>{this.storeSectionData()}))}ngOnDestroy(){this.subscription.unsubscribe()}getSelectedSupplementIds(){var t,o;return null!==(t=null===(o=this.sectionModel.supplements)||void 0===o?void 0:o.map(n=>null==n?void 0:n.code))&&void 0!==t?t:[]}loadStoredData$(){return this.stepService.quoteRequest$.pipe((0,de.q)(1),(0,V.z)(t=>{if(this.selectedCurrency=t.exchangeCurrencyCode,(0,N.b2)(t)){const o=t.school,n=(0,N.OC)(t),r=(0,N.Q2)(t);return this.loadSchoolSupplements$(o,n,r).pipe((0,Me.U)(()=>t))}return(0,R.of)(t)}),(0,de.q)(1),(0,q.b)(({supplements:t})=>{null!=t&&t.length&&t.forEach(({code:o,quantity:n})=>{this.quantityChange(o,n)})}))}concatCodes(t){return null==t?void 0:t.map(({code:o})=>o).join(",")}concatDates(t){return null==t?void 0:t.map(({startDate:o})=>o).join(",")}loadSchoolSupplements$(t,o,n){var r;this.loading=!0;const s=null===(r=o[0])||void 0===r?void 0:r.startDate;return this.quoteStart=(0,m.bl)(s),this.supplementService.getByCoursesAndAccommodations(t,null==o?void 0:o.map(({code:_})=>_),null==n?void 0:n.map(({code:_})=>_),o?s:null,o?this.getLastCourseEndDate(o):null).pipe((0,q.b)(_=>{this.selectedSchool=t,this.selectedCourses=this.concatCodes(o),this.selectedCoursesDates=this.concatDates(o),this.selectedAccommodations=this.concatCodes(n),this.selectedAccommodationsDates=this.concatDates(n);const d=[];_.forEach(u=>{if(this.isSupplementWeekly(u)){var g;const f=this.calculateSupplementDuration(n,o,u),O=null===(g=this.sectionModel.supplements)||void 0===g?void 0:g.find(this.supplementMatcher(u.code));O&&(O.quantity=f),d.push({...u,quantity:f})}else d.push(u)}),this.prepareSupplements(d),this.storeSectionData(),this.loading=!1}),(0,Ae.K)(_=>(console.error(_),this.loading=!1,this.supplementGroups=[],this.sectionModel.hasSupplementsAvailable=!1,this.storeSectionData(),lt.E)))}getLastCourseEndDate(t){return(0,m.SZ)((0,N.I)(t[t.length-1]))}calculateSupplementDuration(t,o,{related:n,maxUnit:r}){let s=0;return n.length>
10?n.forEach(_=>{s+=o.filter(d=>Number(d.code)===_).reduce((d,{weeks:u})=>d+u,0),s+=t.filter(d=>Number(d.code)===_).reduce((d,{weeks:u})=>d+u,0)}):s=o.reduce((_,{weeks:d})=>_+d,0),Math.min(r,s)}isSupplementWeekly({allowOrder:t,unit:o}){return t===De.SELECTABLE&&o===this.WEEKLY}resetOnChanges$(){return this.stepService.quoteRequest$.pipe((0,ge.b)(120),(0,V.z)(t=>{const o=t.school,n=(0,N.OC)(t),r=(0,N.Q2)(t);this.selectedCurrency=t.exchangeCurrencyCode;const s=this.concatCodes(n),_=this.concatDates(n),d=this.concatCodes(r),u=this.concatDates(r),g=(0,N.b2)(t);return!g||o===this.selectedSchool&&s===this.selectedCourses&&d===this.selectedAccommodations&&_===this.selectedCoursesDates&&u===this.selectedAccommodationsDates?(!g&&(null!==(O=this.supplementGroups)&&void 0!==O&&O.length||null!==(T=this.sectionModel.supplements)&&void 0!==T&&T.length)&&(this.supplementGroups=[],this.sectionModel.hasSupplementsAvailable=!1,this.resetSupplements(),this.storeSectionData()),(0,R.of)(t)):this.loadSchoolSupplements$(o,n,r).pipe((0,Me.U)(()=>t));var O,T}))}supplementMatcher(t){return o=>o.code===t}storeSectionData(){this.stepService.updatePartialRequest(this.sectionModel)}resetSupplements(){this.sectionModel.supplements=null}getSupplementStoredQuantity({code:t}){var o;return(null===(o=this.sectionModel.supplements)||void 0===o||null===(o=o.find(this.supplementMatcher(t)))||void 0===o?void 0:o.quantity)||0}quantityChange(t,o){if(this.sectionModel||(this.sectionModel={}),0===o){var n,r;this.sectionModel.supplements=null!==(n=null===(r=this.sectionModel.supplements)||void 0===r?void 0:r.filter(_=>(null==_?void 0:_.code)!==t))&&void 0!==n?n:[]}else{var s;const _=null===(s=this.sectionModel.supplements)||void 0===s?void 0:s.find(this.supplementMatcher(t)),d=this.getSupplementQuantityByCode(t,o);_?_.quantity=d:(this.sectionModel.supplements||(this.sectionModel.supplements=[]),this.sectionModel.supplements.push({code:t,quantity:d}))}this.selectedSupplementIds=this.getSelectedSupplementIds(),this.selectedSupplementsChanged$.next()}getSupplementQuantityByCode(t,o){const n=this.supplementGroups.flatMap(r=>r.supplements).find(r=>r.code===t);return De.SELECTABLE===(null==n?void 0:n.allowOrder)?null:o}prepareSupplements(t){var o;const n=t.filter(({type:r})=>!!r).reduce((r,s)=>{const{type:_,typeWeight:d}=s;return _ in r||(r[_]={weight:d,supplements:[]}),r[_]={weight:d,supplements:[...r[_].supplements,s]},r},{});n&&(this.supplementGroups=Object.entries(n).map(([r,{weight:s,supplements:_}])=>({isOpen:!1,group:r,groupWeight:s,supplements:_})).sort(this.sortByWeight)),this.sectionModel.hasSupplementsAvailable=(null===(o=this.supplementGroups)||void 0===o?void 0:o.length)>0}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(I.Q),e.Y36(Nc))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-select-options-form-section"]],inputs:{sectionIndex:"sectionIndex"},decls:2,vars:2,consts:()=>{let a,t;return a=$localize(zi||(zi=Ol||(Ol=c(["Loading Options for your selection..."])))),t=$localize(Yi||(Yi=hl||(hl=c(["Select options"])))),[["message",a,"shadingColor","rgba(0,0,0,0.5)",3,"loading"],["sectionTitle",t,3,"columns","sectionIndex",4,"ngIf"],["sectionTitle",t,3,"columns","sectionIndex"],["class","supplements__accordion",3,"ngClass",4,"ngFor","ngForOf"],[1,"supplements__accordion",3,"ngClass"],[1,"supplements__accordion-title",3,"click"],["class","supplements__accordion-body",4,"ngIf"],[1,"supplements__accordion-body"],[3,"supplement","showDescription","currency","quantity","quoteStart","quoteEnd","selectedSupplementIds","quantityChange",4,"ngFor","ngForOf"],[3,"quantityChange","supplement","showDescription","currency","quantity","quoteStart","quoteEnd","selectedSupplementIds"]]},template:function(t,o){1&t&&(e._UZ(0,"lx-loading-spinner",0),e.YNc(1,au,2,3,"lx-section-template",1)),2&t&&(e.Q6J("loading",o.loading),e.xp6(),e.Q6J("ngIf",null==o.supplementGroups?null:o.supplementGroups.length))},dependencies:[h.mk,h.sg,h.O5,j.g,W,Ji,Kc.W],styles:['.markdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:var(--font-size-small, 13px);margin:0} .p-datepicker{border-radius:5px} .p-datepicker .calendar__header{display:grid;grid-template-columns:4fr 1fr;-moz-column-gap:.5rem;column-gap:.5rem}@media (width > 414px){ .p-datepicker .calendar__header{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){ .p-datepicker .calendar__header{grid-template-columns:3fr 1fr}} .p-datepicker .calendar__header__date-selectors{display:grid;grid-template-columns:1fr 1fr;-moz-column-gap:.25rem;column-gap:.25rem}@media (width > 414px){ .p-datepicker .calendar__header__date-selectors{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__date-selectors__month .p-dropdown, .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:100%}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__month .p-dropdown{width:8.5rem}}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:6rem}} .p-datepicker .calendar__header__date-selectors .p-dropdown{border-color:var(--color-grey-3, #dddddd);border-radius:5px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:focus, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:enabled:hover{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown:not(.p-disabled).p-focus{box-shadow:none} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel{box-shadow:0 4px 4px #00000040;border-radius:5px;border:none;margin-top:3px} .p-datepicker .calendar__header__date-selectors .p-dropdown-items-wrapper{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-dropdown-label, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{font-size:var(--font-size-normal, 14px);font-weight:var(--font-weight-semibold, 600)} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-top:3px;padding-bottom:3px;line-height:1.5em;border:2px solid transparent} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{border-radius:8px} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight{color:#fff;background-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{background-color:inherit;border-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger{color:var(--color-grey-8, #404040)} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger-icon.pi.pi-chevron-down{font-size:var(--font-size-smallxs, 12px)} .p-datepicker .calendar__header__navigation-buttons{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:.25rem;column-gap:.25rem;padding-right:.5rem}@media (width > 414px){ .p-datepicker .calendar__header__navigation-buttons{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__navigation-buttons :dir(rtl) .p-button.p-button-icon-only .pi{transform:rotate(180deg)} .p-datepicker .calendar__header__navigation-buttons .p-button:focus, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only:focus{box-shadow:0 0 0 .1rem var(--color-calendar-primary, )} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only{color:var(--color-grey-2, #eeeeee);width:var(--icon-size-s, 30px);background:transparent;border-radius:50%;padding:.429rem 0;border:1px solid var(--color-grey-3, #dddddd);
1display:inline-flex} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only .pi{color:var(--color-grey-7, #606060)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only.p-button-rounded{height:var(--icon-size-s, 30px)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:hover, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:active{background:transparent} .p-datepicker .calendar__footer{padding-top:10px;border-top:1px solid var(--color-grey-3, #dddddd);font-size:var(--font-size-small, 13px)} .p-datepicker .calendar__footer__disclaimer{padding-top:5px}@media (min-width: 768px){ .p-datepicker .calendar__footer{font-size:var(--font-size-normal, 14px)}} .p-datepicker .p-datepicker-header{display:none}@media (max-width: 320px){ .p-datepicker{padding:12px 10px}}@media (max-width: 768px){ .p-datepicker:before, .p-datepicker:after{display:none}} .p-datepicker table thead tr{border-bottom:1px solid var(--color-grey-3, #dddddd)} .p-datepicker table th>span{color:var(--color-grey-7, #606060)} .p-datepicker table th>span, .p-datepicker table td>span{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-smallxs, 12px)} .p-datepicker table td>span{width:32px;height:32px;border-radius:32px;line-height:32px;padding-top:0;padding-bottom:0;text-align:center;color:var(--color-grey-9, #202020);opacity:1}@media (width < 768px){ .p-datepicker table td>span{width:40px;height:40px;border-radius:40px;line-height:40px}} .p-datepicker table td>span.p-disabled{opacity:.3} .p-datepicker table td>span.p-highlight{color:var(--color-calendar-day-active, );background-color:var(--color-calendar-day-active-bg, )} .p-datepicker table td.p-datepicker-today>a, .p-datepicker table td.p-datepicker-today>span{opacity:1;font-weight:var(--font-weight-extrabold, 900);font-family:sans-serif;font-size:var(--font-size-small, 13px)} .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{padding-top:0;padding-bottom:0} .p-datepicker:not(.p-datepicker-multiple-month) .p-datepicker-group{padding:0} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled){background-color:#eee} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background-color:#eee;border:2px solid var(--color-calendar-primary, )} .p-datepicker td span:focus, .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{box-shadow:none} .supplements__accordion{border-bottom:1px solid var(--color-grey-3, #dddddd)} .supplements__accordion-title{box-sizing:border-box;color:var(--color-grey-9, #202020);background-color:transparent;font-weight:var(--font-weight-semibold, 600);font-size:var(--font-size-normal2xl, 16px);min-height:32px;padding:12px 20px 12px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;position:relative}@media (max-width: 768px){ .supplements__accordion-title{font-size:var(--font-size-normalxl, 15px)}} .supplements__accordion-title:after{content:"";position:absolute;top:10px;right:10px;width:16px;background-position:center;background-repeat:no-repeat;height:32px;background-color:var(--color-primary, #000000);-webkit-mask:url(/assets/images/icons/icon-arrow-bold-down.svg) no-repeat center;mask:url(/assets/images/icons/icon-arrow-bold-down.svg) no-repeat center;transform:scaleY(1);transition:transform .2s} .supplements__accordion--open .supplements__accordion-title:after{transform:scaleY(-1)} .supplements__accordion-body{display:grid;grid-template-columns:minmax(0,1fr);-moz-column-gap:15px;column-gap:15px;row-gap:15px;padding-bottom:15px}'],data:{animation:[Cc.Xi]}}),l})();const su=["tellUsAboutYouForm"];function lu(i,l){1&i&&e.GkF(0)}function _u(i,l){if(1&i&&(e.ynx(0),e.YNc(1,lu,1,0,"ng-container",4),e.BQk()),2&i){const a=e.oxw();e.xp6(),e.Q6J("ngComponentOutlet",a.experimentComponent)}}function du(i,l){1&i&&(e.ynx(0),e._UZ(1,"lx-price-request-form"),e.BQk())}function cu(i,l){if(1&i&&e.YNc(0,du,2,0,"ng-container",3),2&i){const a=e.oxw(),t=e.MAs(4);e.Q6J("ngIf",a.priceRequest)("ngIfElse",t)}}function uu(i,l){if(1&i&&(e._UZ(0,"lx-tell-us-about-you-section",11,2),e.ALo(2,"async"),e.ALo(3,"async"),e.ALo(4,"async")),2&i){const a=e.oxw(2);e.Q6J("formType",a.formType)("sectionIndex",a.tellUsAboutYouSectionIndex)("validationRequests",e.lcZ(2,4,a.validationRequests$))("withValidationErrors",!1===e.lcZ(3,6,a.stepValid$)&&e.lcZ(4,8,a.validationRequests$)>0)}}function pu(i,l){1&i&&e._UZ(0,"lx-terms-and-promotions-form-section")}function mu(i,l){if(1&i&&(e._UZ(0,"lx-destination-school-form-section",5)(1,"lx-course-dates-form-section",6)(2,"lx-accommodation-dates-form-section",7)(3,"lx-select-options-form-section",8),e.YNc(4,uu,5,10,"lx-tell-us-about-you-section",9)(5,pu,1,0,"lx-terms-and-promotions-form-section",10)),2&i){const a=e.oxw();e.Q6J("formType",a.formType),e.xp6(),e.Q6J("formType",a.formType),e.xp6(3),e.Q6J("ngIf",a.formType===a.FormType.PRICE_REQUEST||a.formType===a.FormType.FREE_QUOTE&&a.hasEnoughDataToGetSupplements),e.xp6(),e.Q6J("ngIf",a.formType===a.FormType.PRICE_REQUEST||a.formType===a.FormType.FREE_QUOTE&&a.hasEnoughDataToGetSupplements)}}let Xi,Hi,Wi,Ki,gu=(()=>{var i;class l{constructor(){this.priceRequest=!1,this.stepValid$=new X.X(!1),this.hasEnoughDataToGetSupplements=!1,this.FormType=S.d,this.studentFormInitialised=!1,this.submittableForm$=new L.x,this.destroy$=new L.x,this.destroyRef=(0,e.f3M)(e.ktI),this.cookieService=(0,e.f3M)($t.N),this.stepService=(0,e.f3M)(I.Q),this.quoteToolFormStore=(0,e.f3M)(Fe.z),this.logger=(0,e.f3M)(rt.m),this.breakpointObserverService=(0,e.f3M)(wd.n)}ngOnInit(){this.formType=this.stepService.getFormType(),this.priceRequest=this.formType===S.d.PRICE_REQUEST,this.setCountryByDomain(),this.stepService.setStepValid(this.stepValid$),this.validationRequests$=this.quoteToolFormStore.validationRequests$,(0,D.a)([this.stepService.quoteRequest$,this.stepService.studentDetails$]).pipe((0,ge.b)(160),(0,F.R)(this.destroy$)).subscribe(([t,o])=>{this.hasEnoughDataToGetSupplements=(0,N.b2)(t),this.studentFormInitialised=!(null==t||!t.accommodationType)||(0,N.b2)(t),this.tellUsAboutYouSectionIndex=Qo(this.formType,t.hasSupplementsAvailable),this.stepValid$.next(Jo(t,o))}
1),this.stepService.currentStepDefinition$.pipe((0,k.w)(t=>this.loadExperiments(t)),(0,F.R)(this.destroy$)).subscribe(t=>{t||(this.initStepFromStepDefinition(),this.prepareCalculationForStatusOfDisabledNextButton())})}ngOnDestroy(){this.destroy$.next()}initStepFromStepDefinition(){this.stepService.currentStepDefinition$.pipe((0,q.b)(({submittableForm$:t})=>{this.submittableForm$=t}),(0,k.w)(({requestValidation$:t})=>t||new L.x),(0,F.R)(this.destroy$)).subscribe(()=>this.validateStudentFormForm())}prepareCalculationForStatusOfDisabledNextButton(){(0,D.a)([this.quoteToolFormStore.validationRequests$,this.stepValid$]).pipe((0,F.R)(this.destroy$)).subscribe(([t,o])=>{this.studentFormInitialised&&this.quoteToolFormStore.updateDisabledNextButton(!o&&t>0)})}validateStudentFormForm(){var t;[null===(t=this.tellUsAboutYouForm)||void 0===t?void 0:t.formData].forEach(o=>{o&&Object.entries(o).forEach(([,n])=>{n.recalculateRequired(),n.validate()})}),this.submittableForm$.next(this.stepValid$.value),this.breakpointObserverService.isMobile$.pipe((0,U.sL)(this.destroyRef)).subscribe(o=>{o?window.scrollTo({behavior:"smooth",top:1700}):window.scrollTo({behavior:"smooth",top:1300})})}loadExperiments(t){const o=t.experiments;if(!o||0===o.length)return(0,R.of)(!1);const n=[];if(o.forEach(r=>{const{experimentId:s}=r;this.cookieService.check(s)&&"true"===this.cookieService.get(s)&&n.push(r)}),!n.length)return this.experimentComponent=void 0,(0,R.of)(!1);if(n.length>1)return this.logger.error("There are more than one active experiment in the step quote-form for form type ".concat(this.formType)),this.experimentComponent=void 0,(0,R.of)(!1);{const[{experimentComponent:r,hideCtas:s}]=n;return this.experimentComponent=r,t.hideCtas=s,(0,R.of)(s)}}setCountryByDomain(){this.stepService.setPartialStudentDetails({countryOfResidence:Ud()})}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-quote-form-step"]],viewQuery:function(t,o){if(1&t&&e.Gf(su,5),2&t){let n;e.iGM(n=e.CRH())&&(o.tellUsAboutYouForm=n.first)}},decls:5,vars:2,consts:[["priceRequestForm",""],["normalForm",""],["tellUsAboutYouForm",""],[4,"ngIf","ngIfElse"],[4,"ngComponentOutlet"],["sectionIndex","1",1,"form-field__single-border-input",3,"formType"],["sectionIndex","2",1,"form-field__single-border-input",3,"formType"],["sectionIndex","3",1,"form-field__single-border-input"],["sectionIndex","4"],["class","form-field__single-border-input",3,"formType","sectionIndex","validationRequests","withValidationErrors",4,"ngIf"],[4,"ngIf"],[1,"form-field__single-border-input",3,"formType","sectionIndex","validationRequests","withValidationErrors"]],template:function(t,o){if(1&t&&e.YNc(0,_u,2,1,"ng-container",3)(1,cu,1,2,"ng-template",null,0,e.W1O)(3,mu,6,4,"ng-template",null,1,e.W1O),2&t){const n=e.MAs(2);e.Q6J("ngIf",o.experimentComponent)("ngIfElse",n)}},dependencies:[h.$G,h.O5,Le,$o,Qd,oc,hc,cn,ru,h.Ov],styles:["[_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__validated-selector-padding[_ngcontent-%COMP%] .form-field__control--invalid:after{inset-inline-end:35px}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control{border:1px solid var(--color-grey-3, #dddddd);box-shadow:none}[_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--valid:after, [_nghost-%COMP%] .form-field__no-validation[_ngcontent-%COMP%] .form-field__control--invalid:after{display:none}[_nghost-%COMP%] .form-field__no-valid-validation[_ngcontent-%COMP%] .form-field__control--valid:after{display:none}[_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:focus, [_nghost-%COMP%] .form-field__single-border-input[_ngcontent-%COMP%] .p-inputtext:enabled:hover{border:none;box-shadow:none}[_nghost-%COMP%] .form-field__no-border-dropdown[_ngcontent-%COMP%] .form-field__control{border:none}
1[_nghost-%COMP%] .form-field__search-bar[_ngcontent-%COMP%] .p-dropdown .p-dropdown-panel .p-dropdown-filter-container{display:flex;border:1px solid #337ab7;text-align:start;font-weight:400;border-radius:8px}"]}),l})(),fu=(()=>{var i;class l{constructor(t){this.stepService=t,this.stepDefinitionHelper=(0,e.f3M)(bn),this.requestValidation$=new L.x,this.submittableForm$=new L.x,this.quoteStepDefinitions={[S.d.FREE_QUOTE]:{nextButton:$localize(Xi||(Xi=Cl||(Cl=c(["Send to my email"])))),stepId:E.l.QUOTE_FORM,displayQuote:!0,requestValidation$:this.requestValidation$,submittableForm$:this.submittableForm$,nextStep:()=>this.stepDefinitionHelper.getRouteIdToNavigateWithValidationForm({requestValidation$:this.requestValidation$,submittableForm$:this.submittableForm$},E.l.SEND_QUOTE_TO_EMAIL)},[S.d.ENROLLMENT]:{nextButton:$localize(Hi||(Hi=Sl||(Sl=c(["Next"])))),stepId:E.l.QUOTE_FORM,displayQuote:!0,nextStep:()=>E.l.BOOKING_FORM},[S.d.PRICE_REQUEST]:{nextButton:$localize(Wi||(Wi=Tl||(Tl=c(["Send enquiry"])))),stepId:E.l.QUOTE_FORM,displayQuote:!1,hideCtas:!0,nextStep:()=>E.l.SEND_QUOTE_TO_EMAIL},[S.d.QUICK_QUOTE_TOOL]:{nextButton:$localize(Ki||(Ki=El||(El=c(["Save for ARGO"])))),stepId:E.l.QUOTE_FORM,displayQuote:!0,hideCtas:!0,submitStep:!0}}}
1resolve(){return this.quoteStepDefinitions[this.stepService.getFormType()]}}return(i=l).\u0275fac=function(t){return new(t||i)(e.LFG(I.Q))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();const ji={path:E.l.QUOTE_FORM,resolve:{stepDefinition:()=>(0,e.f3M)(fu).resolve(),data:()=>(0,e.f3M)(Dd).resolve()},component:gu},Ou={...ji,path:E.l.FORM_ROOT};var ea=p(8504),hu=p(9005),Cu=p(3388),Su=p(804);let ta=(()=>{var i;class l{constructor(){this.convertToQuoteRequestProductApiDto=({code:t,startDate:o,weeks:n})=>({code:t,startDate:o,weeks:n})}mapQuoteInputFormToQuoteRequestDto(t){var o,n,r,s;const _=this.shouldValidateLevel(t),d=(0,N.OC)(t,_);return{schoolCode:t.school,schoolType:t.schoolType,country:null===(o=t.country)||void 0===o?void 0:o.name,city:null===(n=t.destinationCity)||void 0===n?void 0:n.name,courseType:(null==d?void 0:d.length)&&(null===(r=d[0])||void 0===r||null===(r=r.courseType)||void 0===r?void 0:r.name),accommodationType:t.accommodationType,tuitionWeeks:(0,N.Ew)(t,_),courseLevel:(null==d?void 0:d.length)&&d[0].level,courses:d.map(this.convertToQuoteRequestProductApiDto),startDate:(null==d?void 0:d.length)&&(null===(s=d[0])||void 0===s?void 0:s.startDate),currencyCode:t.destinationCurrency,accommodations:(0,N.Q2)(t).map(this.convertToQuoteRequestProductApiDto),supplements:t.supplements||[],bookingDate:null}}shouldValidateLevel(t){return t.formType!==S.d.PRICE_REQUEST}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();var Tu=p(648),ct=p(3528);let ia,aa,oa=(()=>{var i;class l{constructor(){this.hostDataReader=(0,e.f3M)(at.j),this.analyticsService=(0,e.f3M)(Su.y),this.quoteService=(0,e.f3M)(hu.P),this.stepService=(0,e.f3M)(I.Q),this.quoteInputFormMapper=(0,e.f3M)(ta),this.quoteToolDataLayerHashingService=(0,e.f3M)(Tu.Z),this.uuidExtraLoggingService=(0,e.f3M)(be.W)}createLead(t){return this.stepService.getActiveQuoteInput().pipe((0,V.z)(o=>(0,D.a)([(0,R.of)(o),this.stepService.getLanguageCodeAndName$(o)])),(0,V.z)(([o,n])=>(0,R.of)(this.mapQuoteInputToLeadQuoteRequest(o,n.name))),(0,k.w)(o=>{const n=(0,Cu.iJ)(this.stepService._studentDetails$.getValue(),this.stepService.getLanguage(),void 0,this.hostDataReader.getDrupalRoiData()),r=this.mapFormTypeToMapOrigin(),s=this.analyticsService.getLeadsExperimentId(),_=this.analyticsService.getDatalayerJson(),d=this.uuidExtraLoggingService.getUuid();return(0,R.of)({quoteRequest:[{...o,quoteId:t}],leadUserData:{...n,consentMarketing:!n.consentMarketing},formOrigin:r,analyticsData:{experimentId:s,datalayerJson:_,feLogUUID:d}})}),(0,q.b)(o=>{const n=this.getDataLayerEvent(o.formOrigin);this.quoteToolDataLayerHashingService.trackEvent(n,o.leadUserData)}),(0,k.w)(o=>this.quoteService.createLeadV2(o)))}mapFormTypeToMapOrigin(){return new Map([[S.d.ENROLLMENT,oe.c.ENROLMENT],[S.d.FREE_QUOTE,oe.c.QUICK_QUOTE],[S.d.PRICE_REQUEST,oe.c.PRICE_REQUEST]]).get(this.stepService.getFormType())}mapQuoteInputToLeadQuoteRequest(t,o){const n=this.quoteInputFormMapper.mapQuoteInputFormToQuoteRequestDto(t);return Object.assign(n,{courseLanguage:o,exchangeCurrencyCode:t.exchangeCurrencyCode}),n}getDataLayerEvent(t){switch(t){case oe.c.ENROLMENT:return ct.c.GENERATE_BOOK_NOW_ENROLMENT;case oe.c.QUICK_QUOTE:return ct.c.GENERATE_FREE_QUOTE_EMAIL;case oe.c.PRICE_REQUEST:return ct.c.GENERATE_PRICE_REQUEST_EMAIL;default:return}}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})(),Eu=(()=>{var i;class l{constructor(t){this.stepService=t,this.subscription=new ne.w0,this.leadsService=(0,e.f3M)(oa)}ngOnInit(){this.subscription.add((0,D.a)([this.stepService.quoteRequest$,this.stepService.studentDetails$,this.stepService.requestActiveQuote()]).pipe((0,q.b)(([t,o])=>{const n=this.stepService.getFormType();Jo(t,o)&&(n!==S.d.ENROLLMENT||Zo(t,o))||(0,ea._)(()=>$localize(ia||(ia=Ml||(Ml=c(["Please fill all required data"])))))}),(0,k.w)(([,,{quoteId:t}])=>this.leadsService.createLead(t).pipe((0,Ae.K)(o=>o instanceof ve.UA&&o.status===ve.WE.Conflict?(0,R.of)(lt.E):(0,ea._)(o)))),(0,Co.P)()).subscribe({next:t=>{var o;this.stepService.setFlywirePaymentId(null==t||null===(o=t.paymentSessionData)||void 0===o?void 0:o.id),this.stepService.navigateToNextStep()},error:t=>{this.stepService.navigateToErrorStep(t)}}
1))}ngOnDestroy(){this.subscription.unsubscribe()}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(I.Q))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-send-quote-to-email"]],decls:1,vars:1,consts:()=>{let a;return a=$localize(aa||(aa=vl||(vl=c(["Sending your request..."])))),[["message",a,"shadingColor","rgba(0,0,0,0.5)",3,"loading"]]},template:function(t,o){1&t&&e._UZ(0,"lx-loading-spinner",0),2&t&&e.Q6J("loading",!0)},dependencies:[j.g],styles:[".markdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:var(--font-size-small, 13px);margin:0} .p-datepicker{border-radius:5px} .p-datepicker .calendar__header{display:grid;grid-template-columns:4fr 1fr;-moz-column-gap:.5rem;column-gap:.5rem}@media (width > 414px){ .p-datepicker .calendar__header{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){ .p-datepicker .calendar__header{grid-template-columns:3fr 1fr}} .p-datepicker .calendar__header__date-selectors{display:grid;grid-template-columns:1fr 1fr;-moz-column-gap:.25rem;column-gap:.25rem}@media (width > 414px){ .p-datepicker .calendar__header__date-selectors{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__date-selectors__month .p-dropdown, .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:100%}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__month .p-dropdown{width:8.5rem}}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:6rem}} .p-datepicker .calendar__header__date-selectors .p-dropdown{border-color:var(--color-grey-3, #dddddd);border-radius:5px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:focus, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:enabled:hover{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown:not(.p-disabled).p-focus{box-shadow:none} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel{box-shadow:0 4px 4px #00000040;border-radius:5px;border:none;margin-top:3px} .p-datepicker .calendar__header__date-selectors .p-dropdown-items-wrapper{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-dropdown-label, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{font-size:var(--font-size-normal, 14px);font-weight:var(--font-weight-semibold, 600)} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-top:3px;padding-bottom:3px;line-height:1.5em;border:2px solid transparent} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{border-radius:8px} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight{color:#fff;background-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{background-color:inherit;border-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger{color:var(--color-grey-8, #404040)} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger-icon.pi.pi-chevron-down{font-size:var(--font-size-smallxs, 12px)} .p-datepicker .calendar__header__navigation-buttons{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:.25rem;column-gap:.25rem;padding-right:.5rem}@media (width > 414px){ .p-datepicker .calendar__header__navigation-buttons{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__navigation-buttons :dir(rtl) .p-button.p-button-icon-only .pi{transform:rotate(180deg)} .p-datepicker .calendar__header__navigation-buttons .p-button:focus, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only:focus{box-shadow:0 0 0 .1rem var(--color-calendar-primary, )} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only{color:var(--color-grey-2, #eeeeee);width:var(--icon-size-s, 30px);background:transparent;border-radius:50%;padding:.429rem 0;border:1px solid var(--color-grey-3, #dddddd);
1display:inline-flex} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only .pi{color:var(--color-grey-7, #606060)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only.p-button-rounded{height:var(--icon-size-s, 30px)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:hover, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:active{background:transparent} .p-datepicker .calendar__footer{padding-top:10px;border-top:1px solid var(--color-grey-3, #dddddd);font-size:var(--font-size-small, 13px)} .p-datepicker .calendar__footer__disclaimer{padding-top:5px}@media (min-width: 768px){ .p-datepicker .calendar__footer{font-size:var(--font-size-normal, 14px)}} .p-datepicker .p-datepicker-header{display:none}@media (max-width: 320px){ .p-datepicker{padding:12px 10px}}@media (max-width: 768px){ .p-datepicker:before, .p-datepicker:after{display:none}} .p-datepicker table thead tr{border-bottom:1px solid var(--color-grey-3, #dddddd)} .p-datepicker table th>span{color:var(--color-grey-7, #606060)} .p-datepicker table th>span, .p-datepicker table td>span{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-smallxs, 12px)} .p-datepicker table td>span{width:32px;height:32px;border-radius:32px;line-height:32px;padding-top:0;padding-bottom:0;text-align:center;color:var(--color-grey-9, #202020);opacity:1}@media (width < 768px){ .p-datepicker table td>span{width:40px;height:40px;border-radius:40px;line-height:40px}} .p-datepicker table td>span.p-disabled{opacity:.3} .p-datepicker table td>span.p-highlight{color:var(--color-calendar-day-active, );background-color:var(--color-calendar-day-active-bg, )} .p-datepicker table td.p-datepicker-today>a, .p-datepicker table td.p-datepicker-today>span{opacity:1;font-weight:var(--font-weight-extrabold, 900);font-family:sans-serif;font-size:var(--font-size-small, 13px)} .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{padding-top:0;padding-bottom:0} .p-datepicker:not(.p-datepicker-multiple-month) .p-datepicker-group{padding:0} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled){background-color:#eee} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background-color:#eee;border:2px solid var(--color-calendar-primary, )} .p-datepicker td span:focus, .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{box-shadow:none}"]}),l})();var Mu=p(9292);let Nu=(()=>{var i;class l{constructor(t,o){this.sessionStorage=t,this.stepService=o,this.stepDefinition={stepId:E.l.SEND_QUOTE_TO_EMAIL,previousStep:()=>E.l.QUOTE_FORM,errorStep:()=>E.l.QUOTE_ERROR},this.configuration=(0,Ye.P)()}resolve(){return{...this.stepDefinition,nextStep:()=>this.paymentsAreEnabled()?E.l.ENROLMENT_PAYMENT:E.l.CONFIRMATION}}paymentsAreEnabled(){const t=!!this.sessionStorage.get("QT_DEPOSITS_IS_ENABLED");return[S.d.ENROLLMENT].includes(this.stepService.getFormType())&&this.configuration.QUOTE_TOOL_ENROLMENT||t}}return(i=l).\u0275fac=function(t){return new(t||i)(e.LFG(Mu.u),e.LFG(I.Q))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();const Ru={path:E.l.SEND_QUOTE_TO_EMAIL,resolve:{stepDefinition:()=>(0,e.f3M)(Nu).resolve()},component:Eu};var ut=p(1546),ra=p(857);let sa,la,_a,da,ca,ua,pa,ma,ga,fa;const xu=["whatsAppContainer"];function yu(i,l){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&i){const a=l.$implicit;e.xp6(),e.Oqu(a)}}let Iu=(()=>{var i;class l{constructor(){this.lines=[],this.stepService=(0,e.f3M)(I.Q),this.googleAnalyticsService=(0,e.f3M)(Ge.$),this.document=(0,e.f3M)(h.K0),this.configuration=(0,Ye.P)()}ngOnInit(){switch(this.stepService.getStoredMode()){case ut.P.priceRequest:this.title=$localize(sa||(sa=Nl||(Nl=c(["You've started your ESL journey!"])))),this.lines=[$localize(la||(la=Rl||(Rl=c(["One of our advisors will respond to your enquiry as soon as possible, usually within 24 hours."]))))],this.googleAnalyticsService.trackViewEvent(H.QuoteLeadGen);break;case ut.P.form:this.title=$localize(_a||(_a=xl||(xl=c(["Your trip is becoming a reality!"])))),this.lines=[$localize(da||(da=yl||(yl=c(["We've sent a copy of your quote to your email address."])))),$localize(ca||(ca=Il||(Il=c(["Our team of advisors will be in touch soon to answer any questions you may have."]))))];break;case ut.P.enrollment:this.title=$localize(ua||(ua=Pl||(Pl=c(["Your adventure has begun!"])))),this.lines=[$localize(pa||(pa=Ll||(Ll=c(["We have received your request and one of our agents is checking the availability with the school. We will get back to you as soon as possible."])))),$localize(ma||(ma=bl||(bl=c(["If you have paid the deposit, our payment provider Flywire will send you a confirmation email."])))),$localize(ga||(ga=Fl||(Fl=c(["If you have urgent questions, you can also contact our advisors."]))))]}this.stepService.clearSessionStorage(),this.loadElfSightWhatsAppWidget()}loadElfSightWhatsAppWidget(){const t=this.configuration.ELFSIGHT_WHATSAPP_WIDGET;!this.whatsAppContainer||!ra||!t||ra.displayWidget(this.whatsAppContainer.nativeElement,t)}goToHomePage(){this.document.location.href="/"}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-confirmation-step"]],viewQuery:function(t,o){if(1&t&&e.Gf(xu,7),2&t){let n;e.iGM(n=e.CRH())&&(o.whatsAppContainer=n.first)}},decls:9,vars:5,consts:()=>{let a;return a=$localize(fa||(fa=Al||(Al=c(["Go to home page"])))),[["whatsAppContainer",""],[1,"thank-you"],[1,"thank-you__main-info-panel"],[1,"thank-you__main-info-panel__icon"],[4,"ngFor","ngForOf"],["text",a,3,"buttonClick","buttonStyle","btnRounded"],[1,"thank-you__main-info-panel__whats-app-container"]]},template:function(t,o){if(1&t){const n=e.EpF();e.TgZ(0,"div",1)(1,"div",2),e._UZ(2,"div",3),e.TgZ(3,"h2"),e._uU(4),e.qZA(),e.YNc(5,yu,2,1,"div",4),e.TgZ(6,"lx-button",5),e.NdJ("buttonClick",function(){return e.CHM(n),e.KtG(o.goToHomePage())}),e.qZA(),e._UZ(7,"div",6,0),e.qZA()()}2&t&&(e.xp6(4),e.Oqu(o.title),e.xp6(),e.Q6J("ngForOf",o.lines),e.xp6(),e.Q6J("buttonStyle","primary")("btnRounded",!0),e.uIk("data-qa","qt-thank-you-page__back-to-home-page-button"))},dependencies:[h.sg,ae.r],styles:[".thank-you[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;align-items:center}.thank-you__main-info-panel[_ngcontent-%COMP%]{max-width:80vw;text-align:center;display:flex;flex-direction:column;align-items:center;background-color:#fff;border:solid 1px var(--color-grey-3, #dddddd);border-radius:10px;padding:30px 80px}.thank-you__main-info-panel__icon[_ngcontent-%COMP%]{width:64px;
1height:64px;margin-top:20px;-webkit-mask:url(/assets/images/icons/solid-email.svg) no-repeat;mask:url(/assets/images/icons/solid-email.svg) no-repeat;-webkit-mask-size:64px 64px;mask-size:64px 64px;background-color:var(--color-primary, #000000)}.thank-you__main-info-panel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:var(--font-size-large5xl, 36px)}.thank-you__main-info-panel[_ngcontent-%COMP%] lx-button[_ngcontent-%COMP%]{margin-top:30px}.thank-you__main-info-panel__whats-app-container[_ngcontent-%COMP%]{margin-top:30px}"]}),l})();const Oa=E.l.CONFIRMATION;let Pu=(()=>{var i;class l{constructor(){this.stepDefinition={stepId:Oa,previousStep:()=>E.l.BOOKING_FORM}}resolve(){return this.stepDefinition}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();const Lu={path:Oa,resolve:{stepDefinition:()=>(0,e.f3M)(Pu).resolve()},component:Iu};let ha,Ca,Sa,bu=(()=>{var i;class l{constructor(t){this.stepService=t}goBack(){this.stepService.navigateToPreviousStep()}}return(i=l).\u0275fac=function(t){return new(t||i)(e.Y36(I.Q))},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-quote-error-step"]],decls:7,vars:1,consts:()=>{let a,t,o;return a=$localize(ha||(ha=Dl||(Dl=c(["Try again"])))),t=$localize(Ca||(Ca=ql||(ql=c(["Something went wrong"])))),o=$localize(Sa||(Sa=Ul||(Ul=c([" Sorry, something went wrong during the process to send your quote.",":LINE_BREAK:Please try to send it again or contact us if the error persists. "]))),"\ufffd#5\ufffd\ufffd/#5\ufffd"),[t,o,[1,"qt-base-selection","qt-error-section"],[1,"qt-error-section__title"],[1,"qt-error-section__text"],["buttonStyle","primary","text",a,1,"qt-error-section__button",3,"click","btnRounded"]]},template:function(t,o){1&t&&(e.TgZ(0,"div",2)(1,"h3",3),e.SDv(2,0),e.qZA(),e.TgZ(3,"p",4),e.tHW(4,1),e._UZ(5,"br"),e.N_p(),e.qZA(),e.TgZ(6,"lx-button",5),e.NdJ("click",function(){return o.goBack()}),e.qZA()()),2&t&&(e.xp6(6),e.Q6J("btnRounded",!0))},dependencies:[ae.r],styles:[".markdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:var(--font-size-small, 13px);margin:0} .p-datepicker{border-radius:5px} .p-datepicker .calendar__header{display:grid;grid-template-columns:4fr 1fr;-moz-column-gap:.5rem;column-gap:.5rem}@media (width > 414px){ .p-datepicker .calendar__header{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){ .p-datepicker .calendar__header{grid-template-columns:3fr 1fr}} .p-datepicker .calendar__header__date-selectors{display:grid;grid-template-columns:1fr 1fr;-moz-column-gap:.25rem;column-gap:.25rem}@media (width > 414px){ .p-datepicker .calendar__header__date-selectors{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__date-selectors__month .p-dropdown, .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:100%}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__month .p-dropdown{width:8.5rem}}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:6rem}} .p-datepicker .calendar__header__date-selectors .p-dropdown{border-color:var(--color-grey-3, #dddddd);border-radius:5px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:focus, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:enabled:hover{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown:not(.p-disabled).p-focus{box-shadow:none} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel{box-shadow:0 4px 4px #00000040;border-radius:5px;border:none;margin-top:3px} .p-datepicker .calendar__header__date-selectors .p-dropdown-items-wrapper{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-dropdown-label, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{font-size:var(--font-size-normal, 14px);font-weight:var(--font-weight-semibold, 600)} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-top:3px;padding-bottom:3px;line-height:1.5em;border:2px solid transparent} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{border-radius:8px} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight{color:#fff;background-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{background-color:inherit;border-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger{color:var(--color-grey-8, #404040)} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger-icon.pi.pi-chevron-down{font-size:var(--font-size-smallxs, 12px)} .p-datepicker .calendar__header__navigation-buttons{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:.25rem;column-gap:.25rem;padding-right:.5rem}@media (width > 414px){ .p-datepicker .calendar__header__navigation-buttons{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__navigation-buttons :dir(rtl) .p-button.p-button-icon-only .pi{transform:rotate(180deg)} .p-datepicker .calendar__header__navigation-buttons .p-button:focus, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only:focus{box-shadow:0 0 0 .1rem var(--color-calendar-primary, )} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only{color:var(--color-grey-2, #eeeeee);width:var(--icon-size-s, 30px);background:transparent;border-radius:50%;padding:.429rem 0;border:1px solid var(--color-grey-3, #dddddd);
1display:inline-flex} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only .pi{color:var(--color-grey-7, #606060)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only.p-button-rounded{height:var(--icon-size-s, 30px)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:hover, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:active{background:transparent} .p-datepicker .calendar__footer{padding-top:10px;border-top:1px solid var(--color-grey-3, #dddddd);font-size:var(--font-size-small, 13px)} .p-datepicker .calendar__footer__disclaimer{padding-top:5px}@media (min-width: 768px){ .p-datepicker .calendar__footer{font-size:var(--font-size-normal, 14px)}} .p-datepicker .p-datepicker-header{display:none}@media (max-width: 320px){ .p-datepicker{padding:12px 10px}}@media (max-width: 768px){ .p-datepicker:before, .p-datepicker:after{display:none}} .p-datepicker table thead tr{border-bottom:1px solid var(--color-grey-3, #dddddd)} .p-datepicker table th>span{color:var(--color-grey-7, #606060)} .p-datepicker table th>span, .p-datepicker table td>span{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-smallxs, 12px)} .p-datepicker table td>span{width:32px;height:32px;border-radius:32px;line-height:32px;padding-top:0;padding-bottom:0;text-align:center;color:var(--color-grey-9, #202020);opacity:1}@media (width < 768px){ .p-datepicker table td>span{width:40px;height:40px;border-radius:40px;line-height:40px}} .p-datepicker table td>span.p-disabled{opacity:.3} .p-datepicker table td>span.p-highlight{color:var(--color-calendar-day-active, );background-color:var(--color-calendar-day-active-bg, )} .p-datepicker table td.p-datepicker-today>a, .p-datepicker table td.p-datepicker-today>span{opacity:1;font-weight:var(--font-weight-extrabold, 900);font-family:sans-serif;font-size:var(--font-size-small, 13px)} .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{padding-top:0;padding-bottom:0} .p-datepicker:not(.p-datepicker-multiple-month) .p-datepicker-group{padding:0} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled){background-color:#eee} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background-color:#eee;border:2px solid var(--color-calendar-primary, )} .p-datepicker td span:focus, .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{box-shadow:none}[_nghost-%COMP%] .qt-error-section{display:flex;flex-direction:column;gap:10px}"]}),l})();const Ta=E.l.QUOTE_ERROR;let Fu=(()=>{var i;class l{constructor(){this.stepDefinition={stepId:Ta,previousStep:()=>E.l.QUOTE_FORM}}resolve(){return this.stepDefinition}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})();const Au={path:Ta,resolve:{stepDefinition:()=>(0,e.f3M)(Fu).resolve()},component:bu};var Ea=p(8505),Du=p(698),qu=p(4209);let Ma,va,Na,Ra,xa,ya,Ia,Pa,La,ba;function Uu(i,l){1&i&&e.GkF(0)}function wu(i,l){1&i&&e.GkF(0)}function $u(i,l){if(1&i&&e.YNc(0,wu,1,0,"ng-container",16),2&i){const a=e.oxw(),t=e.MAs(28),o=e.MAs(30);e.Q6J("ngTemplateOutlet",a.depositRequiredMessage?t:o)}}function Qu(i,l){if(1&i&&(e.TgZ(0,"div",15),e.SDv(1,9),e.ALo(2,"lxPrice"),e.qZA()),2&i){const a=e.oxw();e.xp6(2),e.pQV(e.lcZ(2,1,null==a.quote||null==a.quote.payableData||null==a.quote.payableData.payableInfo?null:a.quote.payableData.payableInfo.amount)),e.QtT(1)}}function ku(i,l){if(1&i&&(e.TgZ(0,"div",15),e.SDv(1,10),e.ALo(2,"lxPrice"),e.qZA()),2&i){const a=e.oxw();e.xp6(2),e.pQV(a.depositRequiredMessage)(e.lcZ(2,2,null==a.quote||null==a.quote.payableData||null==a.quote.payableData.payableInfo?null:a.quote.payableData.payableInfo.amount)),e.QtT(1)}}function Bu(i,l){if(1&i&&(e.TgZ(0,"div",15),e.SDv(1,11),e.ALo(2,"lxPrice"),e.qZA()),2&i){const a=e.oxw();e.xp6(2),e.pQV(e.lcZ(2,1,null==a.quote||null==a.quote.payableData||null==a.quote.payableData.payableInfo?null:a.quote.payableData.payableInfo.amount)),e.QtT(1)}}let Vu=(()=>{var i;class l{constructor(){this.payNowButtonLabel="",this.depositRequired=!1,this.isStepValid$=new X.X(!0),this.subscription=new ne.w0,this.stepService=(0,e.f3M)(I.Q),this.metaService=(0,e.f3M)(Ea.R),this.depositService=(0,e.f3M)(Du.s),this.metaService.removeMetaTagOnRouteChange("robots")}ngOnInit(){this.metaService.addMetaTag({name:"robots",content:"noindex, nofollow"}),this.stepService.setStepValid(this.isStepValid$),this.studentDetails=this.stepService.getStudentDetails(),this.getActiveQuote()}ngOnDestroy(){this.subscription.unsubscribe()}navigateToPaymentStep(){this.stepService.navigateToNextStep()}getActiveQuote(){this.subscription.add(this.stepService.requestActiveQuote().subscribe(t=>{this.quote=t;const{payableData:{requiredThreshold:o,required:n}}=this.quote;this.depositRequired=n,this.payNowButtonLabel=this.depositRequired?$localize(Ma||(Ma=wl||(wl=c(["Pay now"])))):$localize(va||(va=$l||($l=c(["I wish to pay online"])))),n&&(this.depositRequiredMessage=this.depositService.getDepositRequiredMessage(o))}
1))}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-enrolment-payment"]],decls:31,vars:10,consts:()=>{let a,t,o,n,r,s,_,d;return a=$localize(Na||(Na=Ql||(Ql=c(["Your adventure starts today!"])))),t=$localize(Ra||(Ra=kl||(kl=c(["Thank you for registering online."])))),o=$localize(xa||(xa=Bl||(Bl=c([" We have received your request. One of our agents is checking the availability with the school and will contact you soon. "])))),n=$localize(ya||(ya=Vl||(Vl=c(["Name:"])))),r=$localize(Ia||(Ia=Gl||(Gl=c(["Amount due:"])))),s=$localize(Pa||(Pa=Jl||(Jl=c([" If you want your registration to be processed faster, you can pay the deposit amount of ",":INTERPOLATION: by credit card. Please note that this payment does not guarantee the enrolment, until we\u2019ve confirmed the availability with the school and communicated it to you personally. "]))),"\ufffd0\ufffd"),_=$localize(La||(La=Zl||(Zl=c([" Since your departure is scheduled in less than ",":INTERPOLATION:, now we ask you to pay the deposit amount of ",":INTERPOLATION_1: by credit card. Please note that this payment does not guarantee the enrolment, until we\u2019ve confirmed the availability with the school and communicated it to you personally. "]))),"\ufffd0\ufffd","\ufffd1\ufffd"),d=$localize(ba||(ba=zl||(zl=c([" In order to complete this process, now we ask you to pay the deposit amount of ",":INTERPOLATION: by credit card. Please note that this payment does not guarantee the enrolment, until we\u2019ve confirmed the availability with the school and communicated it to you personally. "]))),"\ufffd0\ufffd"),[["requiredDepositIntro",""],["optionalDepositIntro",""],["withDepositRequiredMessage",""],["withoutDepositRequiredMessage",""],a,t,o,n,r,s,_,d,[1,"enrolment-payment"],[1,"enrolment-payment__title"],[1,"enrolment-payment__sub-title"],[1,"enrolment-payment__paragraph"],[4,"ngTemplateOutlet"],[1,"enrolment-payment__summary"],[1,"enrolment-payment__summary-item"],[1,"enrolment-payment__summary-item-title"],[1,"enrolment-payment__summary-item-info"],["buttonStyle","primary",1,"enrolment-payment__pay-cta",3,"buttonClick","text","btnRounded","block"],[1,"enrolment-payment__payment-card-options"]]},template:function(t,o){if(1&t){const n=e.EpF();e.TgZ(0,"div",12)(1,"div",13),e.SDv(2,4),e.qZA(),e.TgZ(3,"div",14),e.SDv(4,5),e.qZA(),e.TgZ(5,"div",15),e.SDv(6,6),e.qZA(),e.YNc(7,Uu,1,0,"ng-container",16),e.TgZ(8,"div",17)(9,"div",18)(10,"div",19),e.SDv(11,7),e.qZA(),e.TgZ(12,"div",20),e._uU(13),e.qZA()(),e.TgZ(14,"div",18)(15,"div",19),e.SDv(16,8),e.qZA(),e.TgZ(17,"div",20),e._uU(18),e.ALo(19,"lxPrice"),e.qZA()()(),e.TgZ(20,"lx-button",21),e.NdJ("buttonClick",function(){return e.CHM(n),e.KtG(o.navigateToPaymentStep())}),e.qZA(),e.TgZ(21,"div",22),e._UZ(22,"lx-payment-card-options"),e.qZA()(),e.YNc(23,$u,1,1,"ng-template",null,0,e.W1O)(25,Qu,3,3,"ng-template",null,1,e.W1O)(27,ku,3,4,"ng-template",null,2,e.W1O)(29,Bu,3,3,"ng-template",null,3,e.W1O)}if(2&t){const n=e.MAs(24),r=e.MAs(26);e.xp6(7),e.Q6J("ngTemplateOutlet",o.depositRequired?n:r),e.xp6(6),e.lnq("",o.studentDetails.firstName," ",o.studentDetails.lastName," (",o.studentDetails.email,")"),e.xp6(5),e.hij(" ",e.lcZ(19,8,null==o.quote||null==o.quote.payableData||null==o.quote.payableData.payableInfo?null:o.quote.payableData.payableInfo.amount)," "),e.xp6(2),e.Q6J("text",o.payNowButtonLabel)("btnRounded",!0)("block",!0)}},dependencies:[h.tP,qu.i,ae.r,Mi.d],styles:[".markdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:var(--font-size-small, 13px);margin:0} .p-datepicker{border-radius:5px} .p-datepicker .calendar__header{display:grid;grid-template-columns:4fr 1fr;-moz-column-gap:.5rem;column-gap:.5rem}@media (width > 414px){ .p-datepicker .calendar__header{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){ .p-datepicker .calendar__header{grid-template-columns:3fr 1fr}} .p-datepicker .calendar__header__date-selectors{display:grid;grid-template-columns:1fr 1fr;-moz-column-gap:.25rem;column-gap:.25rem}@media (width > 414px){ .p-datepicker .calendar__header__date-selectors{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__date-selectors__month .p-dropdown, .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:100%}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__month .p-dropdown{width:8.5rem}}@media (min-width: 768px){ .p-datepicker .calendar__header__date-selectors__year .p-dropdown{width:6rem}} .p-datepicker .calendar__header__date-selectors .p-dropdown{border-color:var(--color-grey-3, #dddddd);border-radius:5px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:focus, .p-datepicker .calendar__header__date-selectors .p-dropdown .p-inputtext:enabled:hover{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown:not(.p-disabled).p-focus{box-shadow:none} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel{box-shadow:0 4px 4px #00000040;border-radius:5px;border:none;margin-top:3px} .p-datepicker .calendar__header__date-selectors .p-dropdown-items-wrapper{padding:10px} .p-datepicker .calendar__header__date-selectors .p-dropdown .p-dropdown-label, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{font-size:var(--font-size-normal, 14px);font-weight:var(--font-weight-semibold, 600)} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-top:3px;padding-bottom:3px;line-height:1.5em;border:2px solid transparent} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight, .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{border-radius:8px} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight{color:#fff;background-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-panel .p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover{background-color:inherit;border-color:var(--color-calendar-primary, )} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger{color:var(--color-grey-8, #404040)} .p-datepicker .calendar__header__date-selectors .p-dropdown-trigger-icon.pi.pi-chevron-down{font-size:var(--font-size-smallxs, 12px)} .p-datepicker .calendar__header__navigation-buttons{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:.25rem;column-gap:.25rem;padding-right:.5rem}@media (width > 414px){ .p-datepicker .calendar__header__navigation-buttons{-moz-column-gap:.5rem;column-gap:.5rem}} .p-datepicker .calendar__header__navigation-buttons :dir(rtl) .p-button.p-button-icon-only .pi{transform:rotate(180deg)} .p-datepicker .calendar__header__navigation-buttons .p-button:focus, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only:focus{box-shadow:0 0 0 .1rem var(--color-calendar-primary, )} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only{color:var(--color-grey-2, #eeeeee);width:var(--icon-size-s, 30px);background:transparent;border-radius:50%;padding:.429rem 0;border:1px solid var(--color-grey-3, #dddddd);
1display:inline-flex} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only .pi{color:var(--color-grey-7, #606060)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-icon-only.p-button-rounded{height:var(--icon-size-s, 30px)} .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:hover, .p-datepicker .calendar__header__navigation-buttons .p-button.p-button-outlined:enabled:active{background:transparent} .p-datepicker .calendar__footer{padding-top:10px;border-top:1px solid var(--color-grey-3, #dddddd);font-size:var(--font-size-small, 13px)} .p-datepicker .calendar__footer__disclaimer{padding-top:5px}@media (min-width: 768px){ .p-datepicker .calendar__footer{font-size:var(--font-size-normal, 14px)}} .p-datepicker .p-datepicker-header{display:none}@media (max-width: 320px){ .p-datepicker{padding:12px 10px}}@media (max-width: 768px){ .p-datepicker:before, .p-datepicker:after{display:none}} .p-datepicker table thead tr{border-bottom:1px solid var(--color-grey-3, #dddddd)} .p-datepicker table th>span{color:var(--color-grey-7, #606060)} .p-datepicker table th>span, .p-datepicker table td>span{font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-smallxs, 12px)} .p-datepicker table td>span{width:32px;height:32px;border-radius:32px;line-height:32px;padding-top:0;padding-bottom:0;text-align:center;color:var(--color-grey-9, #202020);opacity:1}@media (width < 768px){ .p-datepicker table td>span{width:40px;height:40px;border-radius:40px;line-height:40px}} .p-datepicker table td>span.p-disabled{opacity:.3} .p-datepicker table td>span.p-highlight{color:var(--color-calendar-day-active, );background-color:var(--color-calendar-day-active-bg, )} .p-datepicker table td.p-datepicker-today>a, .p-datepicker table td.p-datepicker-today>span{opacity:1;font-weight:var(--font-weight-extrabold, 900);font-family:sans-serif;font-size:var(--font-size-small, 13px)} .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{padding-top:0;padding-bottom:0} .p-datepicker:not(.p-datepicker-multiple-month) .p-datepicker-group{padding:0} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled){background-color:#eee} .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background-color:#eee;border:2px solid var(--color-calendar-primary, )} .p-datepicker td span:focus, .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{box-shadow:none}[_nghost-%COMP%] .enrolment-payment[_ngcontent-%COMP%]{border:1px solid #dbdbdb;border-radius:15px}[_nghost-%COMP%] .enrolment-payment__title[_ngcontent-%COMP%]{color:var(--color-grey-9, #202020);font-weight:var(--font-weight-bold, 700);font-size:var(--font-size-large3xl, 28px);text-align:center;margin-top:30px}@media (min-width: 992px){[_nghost-%COMP%] .enrolment-payment__title[_ngcontent-%COMP%]{font-size:var(--font-size-large5xl, 36px);margin-top:46px}}[_nghost-%COMP%] .enrolment-payment__sub-title[_ngcontent-%COMP%]{color:var(--color-grey-8, #404040);font-weight:var(--font-weight-bold, 700);font-size:var(--font-size-large, 18px);text-align:center;margin-top:46px}@media (min-width: 992px){[_nghost-%COMP%] .enrolment-payment__sub-title[_ngcontent-%COMP%]{font-size:var(--font-size-large2xl, 24px)}}[_nghost-%COMP%] .enrolment-payment__paragraph[_ngcontent-%COMP%]{color:var(--color-grey-8, #404040);font-size:var(--font-size-normal, 14px);text-align:center;margin-top:20px;padding:0 15px}@media (min-width: 992px){[_nghost-%COMP%] .enrolment-payment__paragraph[_ngcontent-%COMP%]{font-size:var(--font-size-large, 18px);margin-top:30px;padding:0 20px}}[_nghost-%COMP%] .enrolment-payment__summary[_ngcontent-%COMP%]{border-top:2px var(--color-grey-3, #dddddd) dashed;border-bottom:2px var(--color-grey-3, #dddddd) dashed;margin:30px 0;padding:30px 15px}@media (min-width: 992px){[_nghost-%COMP%] .enrolment-payment__summary[_ngcontent-%COMP%]{padding:30px 60px}}[_nghost-%COMP%] .enrolment-payment__summary-item[_ngcontent-%COMP%]{display:grid;grid-template:auto auto/3fr 5fr;-moz-column-gap:10px;column-gap:10px;row-gap:15px;color:var(--color-grey-9, #202020);font-size:var(--font-size-normal, 14px)}[_nghost-%COMP%] .enrolment-payment__summary-item-info[_ngcontent-%COMP%]{font-weight:var(--font-weight-semibold, 600)}@media (min-width: 992px){[_nghost-%COMP%] .enrolment-payment__summary-item[_ngcontent-%COMP%]{font-size:var(--font-size-large, 18px);grid-template:auto auto/2fr 5fr}}[_nghost-%COMP%] .enrolment-payment__pay-cta[_ngcontent-%COMP%]{padding:0 20px}[_nghost-%COMP%] .enrolment-payment__payment-card-options[_ngcontent-%COMP%]{margin:46px 34px 46px auto} .qt-form__content .step-wrapper__footer{border-top:none}"]}),l})();const Ju={path:E.l.BOOKING_ENROLMENT_PAYMENT,resolve:{stepDefinition:(()=>{var i;
1class l{constructor(){this.stepDefinition={stepId:E.l.ENROLMENT_PAYMENT,displayQuote:!0,nextStep:()=>E.l.FLYWIRE_PAYMENT,previousStep:()=>E.l.BOOKING_FORM}}resolve(){return this.stepDefinition}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})()},component:Vu};var Fa=p(4192),mt=p(5861),Aa=p(5511),Zu=p(2438),zu=p(322);let Da,Yu=(()=>{var i;class l{constructor(){this.scriptV2LoadedSubject=new L.x,this.destroyRef=(0,e.f3M)(e.ktI),this.env=(0,e.f3M)(zu.G),this.flywireV2Config=this.getFlywireV2Config(this.env.environment)}bootstrapV2(){this.v2ScriptElement=(0,Aa.Wy)(this.flywireV2Config.path),(0,Zu.R)(this.v2ScriptElement,"load",{once:!0}).pipe((0,U.sL)(this.destroyRef)).subscribe(this.scriptV2LoadedSubject)}preloadPayment(t,o){var n=this;return(0,mt.Z)(function*(){return yield(yield(yield FlywireSDK(n.flywireV2Config.apiKey)).elements()).create("payment",n.getFlywireParams(t,o))})()}mount(t,o){return(0,mt.Z)(function*(){return o?t.mount(o):t.mount(),new Promise((n,r)=>{t.onEvent("success",n),t.onEvent("error",r)})})()}makePaymentV2(t){var o=this;return(0,mt.Z)(function*(){const s=yield(yield(yield FlywireSDK(o.flywireV2Config.apiKey)).elements()).create("payment",o.getFlywireParams(t));return yield o.mount(s)})()}ngOnDestroy(){this.v2ScriptElement&&(0,Aa.nW)(this.v2ScriptElement)}getFlywireParams(t,o){return o?{sessionId:t,displayMode:"container"}:{sessionId:t}}getFlywireV2Config(t){return"production"===t?{path:"https://artifacts.flywire.com/sdk/js/v0/main.js",apiKey:"fk_aWY0dVpXNExLUEUySzgzUmw2MkVUQT09"}:{path:"https://artifacts.flywire.com/sdk/js/v0/sandbox.main.js",apiKey:"fk_RXI3YVhKcmhkNStqTW02cDFFay9XUT09"}}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac}),l})();const qa="flywire-container";let Hu=(()=>{var i;class l{constructor(){this.flywireCheckoutLoaded=!1,this.validStep$=new X.X(!0),this.subscription=new ne.w0,this.paymentGatewayService=(0,e.f3M)(Fa.j),this.stepService=(0,e.f3M)(I.Q),this.metaService=(0,e.f3M)(Ea.R),this.logger=(0,e.f3M)(rt.m),this.metaService.removeMetaTagOnRouteChange("robots")}ngOnInit(){this.metaService.addMetaTag({name:"robots",content:"noindex, nofollow"}),this.stepService.setStepValid(this.validStep$),this.paymentGatewayService.bootstrapV2(),this.subscription.add(this.paymentGatewayService.scriptV2LoadedSubject.subscribe(this.payWithPreloadApproach()))}ngOnDestroy(){this.subscription.unsubscribe()}payWithPreloadApproach(){return()=>{this.paymentGatewayService.preloadPayment(this.stepService.getFlywirePaymentId(),qa).then(t=>{this.flywireCheckoutLoaded=!0,this.makePayment(t)}).catch(t=>{this.logger.error("Error during payment preloading:",t),this.stepService.navigateToPreviousStep()})}}makePayment(t){this.paymentGatewayService.mount(t,qa).then(o=>{o.success&&this.stepService.navigateToNextStep()}).catch(o=>{"cancellation"!==o.errors[0].type&&(this.logger.error("Error during payment:",o),this.stepService.navigateToPreviousStep())})}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["lx-enrolment-payment"]],features:[e._Bn([{provide:Fa.j,useClass:Yu}])],decls:2,vars:1,consts:()=>{let a;return a=$localize(Da||(Da=Yl||(Yl=c(["Preparing payment portal..."])))),[["message",a,"shadingColor","rgba(0,0,0,0.5)",3,"loading"],["id","flywire-container"]]},template:function(t,o){1&t&&e._UZ(0,"lx-loading-spinner",0)(1,"div",1),2&t&&e.Q6J("loading",!o.flywireCheckoutLoaded)},dependencies:[j.g],styles:["[_nghost-%COMP%] #flywire-container[_ngcontent-%COMP%]{height:100vh;width:100%}"]}),l})();const ju=[Ou,ji,Id,Ru,Lu,Au,Ju,{path:E.l.FLYWIRE_PAYMENT,resolve:{stepDefinition:(()=>{var i;class l{constructor(){this.stepDefinition={stepId:E.l.FLYWIRE_PAYMENT,displayQuote:!1,nextStep:()=>E.l.CONFIRMATION,previousStep:()=>E.l.BOOKING_ENROLMENT_PAYMENT}}resolve(){return this.stepDefinition}}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),l})()},component:Hu}];var Ua=p(846);const ep=[...ju],tp=[{path:"",component:Ua.U,children:[...ep]}];let op=(()=>{var i;class l{}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[Se.Bz.forChild(tp),Se.Bz]}),l})(),np=(()=>{var i;class l{}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[h.ez,Xl.I,op,Wl.E,M.u5,Kl.w,ft.B,Ot.J,Qe.x,jl.F,e_.U,Hl.c,n_.W,ae.r,Ie.A,he.nD,me.j,j.g,Re.K,ke,xe.i,Y.p,re.h,Be.$,Ft,Le,Ct,ye.K,$o,Ji]}),l})();var ip=p(4810)}}]);
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.