1import{a as Le}from"./chunk-Q2QIH2T3.js";import{AX as k,BX as be,CX as R,Cg as se,EM as de,FM as fe,IM as me,JO as Se,LZ as Ee,Ld as oe,Nc as ne,Nd as E,Of as re,PZ as we,Pf as y,QM as he,QN as Ce,RV as xe,SN as ve,VZ as ke,Vv as le,WQ as Pe,Wb as ie,X0 as Re,Xw as ue,YQ as ye,aa as J,bb as ee,c as K,ca as Y,fb as te,gG as ge,ga as Z,ja as b,jf as P,kP as w,n as X,o1 as Ae,qh as ae,tT as _e,uT as Ie,uu as ce,wM as pe}from"./chunk-THWQXKGW.js";import{Ac as W,Bc as g,Cc as p,Dc as d,Ec as S,Ia as U,Ma as v,Mb as u,Mc as z,Na as s,Qd as G,Ta as N,Ua as B,Uc as x,Wb as m,Wc as c,Za as M,ac as j,f as O,fc as V,ga as D,gb as F,hb as $,la as T,uc as _,wc as I,yd as Q,zc as q}from"./chunk-RIHCSLB5.js";var h=O(te());var A=O(te());var L=(()=>{class i{constructor(t,e,n){this.componentsConfigurationHelper=t,this.configHelper=e,this.log=n,this.pageHeaderMessageConfiguration=new k,this.backButtonText="Back",this.nextButtonText="Confirm & Continue",this.siteFooterConfiguration=new R,this.siteHeaderConfiguration=new w,this.travelInsurancePickerEnabled=!1,this.travelInsurancePickerConfigurations=[],this.reservationChargesBreakdownConfiguration=new be(this.componentsConfigurationHelper,this.configHelper),this.currencyISOCode="USD",this.currencySymbolDisplay="symbol-narrow"}loadConfigSettingsAndI18nMessages(t,e,n,a,l){let C=new E(this.log,t,"config"),o=new E(this.log,e,"i18n"),r="agent.res.addNewPassenger.extras";this.currencyISOCode=this.configHelper.getCurrencyISOCode_new(C,n.code),this.pageHeaderMessageConfiguration=new k,this.pageHeaderMessageConfiguration.loadConfigSettingsAndI18nMessages("page.newPassengers.extras",t,e,this.log),o.setProperties(this,[["string","backButtonText",`${r}.backButton.text`],["string","nextButtonText",`${r}.nextButton.text`]]),C.setProperties(this,[["boolean","travelInsurancePickerEnabled",`${r}.insurance.enabled`],["string","currencySymbolDisplay","defaultCurrency.symbolDisplay"]]),this.siteFooterConfiguration=new R,this.componentsConfigurationHelper.loadSiteFooterConfiguration(t,e,this.siteFooterConfiguration),this.siteHeaderConfiguration=new w,this.siteHeaderConfiguration.loadSiteHeaderConfiguration(t,e,n,r,this.log,a),this.travelInsurancePickerConfigurations=this.componentsConfigurationHelper.loadTravelInsurancePickerConfigurations(r,t,e,this.currencyISOCode,this.currencySymbolDisplay,this.log),(0,A.isArray)(this.travelInsurancePickerConfigurations)&&(0,A.isArray)(l)&&(this.travelInsurancePickerConfigurations=this.componentsConfigurationHelper.mapInsuranceOptionsToConfigurations(this.travelInsurancePickerConfigurations,l))}static{this.\u0275fac=function(e){return new(e||i)(v(P),v(oe),v(ee))}}static{this.\u0275prov=U({token:i,factory:i.\u0275fac})}}return i})();var Ue=(i,f)=>f.providerKey;function Ne(i,f){if(i&1){let t=z();p(0,"app-travel-insurance-picker",11),x("valueChanged",function(n){N(t);let a=c().$implicit,l=c(2);return B(l.onInsuranceChanged(a.insurancePolicyOption,n))}),d()}if(i&2){let t=c().$implicit,e=c(2);g("loading",e.insuranceLoading())("configuration",t)("formSubmitAttempt",e.formSubmitAttempt)("selectedOption",e.insuranceSelectedOptions()[t.insurancePolicyOption==null||t.insurancePolicyOption.insuranceProvider==null?null:t.insurancePolicyOption.insuranceProvider.key])("insuranceCost",e.getInsuranceCost(t.insurancePolicyOption))("hasConfirmedInsurance",e.hasConfirmedInsurance())}}function Be(i,f){if(i&1&&_(0,Ne,1,6,"app-travel-insurance-picker",10),i&2){let t=f.$implicit,e=c(2);I(e.shouldShowInsuranceProvider(e.configuration.travelInsurancePickerConfigurations,t.insurancePolicyOption)?0:-1)}}function Me(i,f){if(i&1&&(p(0,"div",8),q(1,Be,1,1,null,null,Ue),d()),i&2){let t=c();u(),W(t.configuration.travelInsurancePickerConfigurations)}}var ht=(()=>{class i extends Le{constructor(t,e,n,a){super(t,e,n,a),this.store=t,this.componentsConfigurationHelper=e,this.ancillaryHelper=n,this.reservationsHelper=a,this.configuration=s(L),this.activatedRoute=s(J),this.router=s(Y),this.location=s(K),this.urlHelper=s(ie),this.navigationUrlHelper=s(xe),this.destroyRef=s(M),this.configSettings=this.store.selectSignal(Ie),this.i18nMessages=this.store.selectSignal(_e),this.languages=this.store.selectSignal(ge),this.currency=this.store.selectSignal(de),this.insurancePolicyOptions=this.store.selectSignal(ve),this.configSettingsLoading=this.store.selectSignal(Pe),this.i18nLoading=this.store.selectSignal(ye),this.reservationLoadingByLocator=this.store.selectSignal(fe),this.initialDataLoading=G(()=>this.configSettingsLoading()||this.i18nLoading()||Object.values(this.reservationLoadingByLocator()).some(o=>o)),this.dataLoading=this.store.selectSignal(he),this.configInitialized=!1;let l=this.activatedRoute.snapshot.paramMap.get(y);this.currentQueryParams=this.urlHelper.getParamsFromRelativeUrl(this.location.path()),this.dataRoute=this.activatedRoute.snapshot.data||null;let C=this.navigationUrlHelper.getPrefixRoute();this.addNewPassengersExtrasUrl=`${C}${se}`.replace(`:${y}`,re),this.store.dispatch(new ue(this.addNewPassengersExtrasUrl)),this.nextPageUrl=`/${(this.dataRoute?.nextPage??"").replace(`:${y}`,encodeURIComponent(l))}`,this.store.select(me).pipe(T(),b(this.destroyRef)).subscribe(o=>{(0,h.isEmpty)(o?.lastName)&&this.router.navigateByUrl(`/${this.dataRoute?.fallBackUrl??""}`)}),F(()=>{let o=this.configSettings(),r=this.i18nMessages(),H=this.currency();if(o!==null&&!(0,h.isEmpty)(r)&&H!==null){let He=this.languages(),Oe=this.insurancePolicyOptions();$(()=>{this.configuration.loadConfigSettingsAndI18nMessages(o,r,H,He,Oe),this.applyDefaultInsuranceSelections(this.configuration.travelInsurancePickerEnabled,this.configuration.travelInsurancePickerConfigurations),this.configInitialized||(this.configInitialized=!0,!this.insuranceOptionsRequested()&&this.configuration.travelInsurancePickerEnabled&&(this.store.dispatch(new le),this.insuranceOptionsRequested.set(!0)))})}}),this.store.select(Ce).pipe(D(h.isEqual),b(this.destroyRef)).subscribe(()=>{this.store.dispatch(new ce)})}nextStep(){this.formSubmitAttempt.set(!0),this.hasValidInsuranceSelection(this.configuration.travelInsurancePickerEnabled,this.configuration.travelInsurancePickerConfigurations)&&this.router.navigate([this.nextPageUrl],{queryParams:this.currentQueryParams})}static{this.\u0275fac=function(e){return new(e||i)(m(ae),m(P),m(ke),m(ne))}}static{this.\u0275cmp=j({type:i,selectors:[["app-add-new-passengers-extras"]],features:[Q([L]),V],decls:10,vars:10,consts:[[3,"showSpinner"],[1,"sticky-top","z-index-fixed","bg-white"],[3,"steps","furthestStepUrl"],[3,"configuration"],[1,"page-body","container-fluid","bg-light"],[1,"container-lg"],[1,"row"],[1,"col-12"],[1,"w-100"],["backgroundClass","bg-light",3,"continueClicked","fullWidth","backLabel","continueVisible","continueLabel","continueDisabled"],[1,"col-12",3,"loading","configuration","formSubmitAttempt","selectedOption","insuranceCost","hasConfirmedInsurance"],[1,"col-12",3,"valueChanged","loading","configuration","formSubmitAttempt","selectedOption","insuranceCost","hasConfirmedInsurance"]],template:function(e,n){e&1&&(S(0,"app-loading-spinner",0),p(1,"div",1),S(2,"app-progress-bar",2),d(),S(3,"app-page-header-message",3),p(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7),_(8,Me,3,0,"div",8),d()()()(),p(9,"app-step-navigation-footer",9),x("continueClicked",function(){return n.nextStep()}),d()),e&2&&(g("showSpinner",n.initialDataLoading()),u(2),g("steps",n.availableSteps())("furthestStepUrl",n.furthestStepUrl()),u(),g("configuration",n.configuration.pageHeaderMessageConfiguration),u(5),I(n.
1configuration.travelInsurancePickerEnabled?8:-1),u(),g("fullWidth",!0)("backLabel",n.configuration.backButtonText)("continueVisible",!0)("continueLabel",n.configuration.nextButtonText)("continueDisabled",n.dataLoading()))},dependencies:[X,Z,Ae,pe,Se,we,Re,Ee],encapsulation:2})}}return i})();export{ht as AddNewPassengersExtrasComponent};
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.