1import{a as _t}from"./chunk-GNIKMWMH.js";import{a as Mt}from"./chunk-3TKYJLOX.js";import{a as Ct}from"./chunk-65L6JAFI.js";import{b as bt,c as Pt}from"./chunk-XYWPOMHB.js";import{a as yt,e as vt,f as xt,g as Ot,h as St}from"./chunk-NWK3IXKQ.js";import"./chunk-WSTYZZMC.js";import"./chunk-7UMT2QHC.js";import{a as ct}from"./chunk-2L2DJQHH.js";import"./chunk-7O6DHUVS.js";import"./chunk-O43R55GY.js";import{a as mt}from"./chunk-AR435P2D.js";import"./chunk-LGWKQQEJ.js";import"./chunk-NK3DP7HZ.js";import"./chunk-OUAS6S2N.js";import"./chunk-7OP3P37Q.js";import{a as ft}from"./chunk-GWOC4NEV.js";import{f as ut}from"./chunk-ZC647SJH.js";import"./chunk-KCRDAGWT.js";import"./chunk-LCQSWELG.js";import{a as $}from"./chunk-U2QFC7F4.js";import{a as st}from"./chunk-3LAPVCAL.js";import{c as pt,d as ht}from"./chunk-VOPEB7NL.js";import"./chunk-NNC5ZE6T.js";import"./chunk-F2GCAH7D.js";import"./chunk-VGDEYIBD.js";import{a as gt}from"./chunk-6TRCY3ZA.js";import{a as tt}from"./chunk-6653FR2C.js";import{a as dt}from"./chunk-GKS3GB56.js";import{a as rt}from"./chunk-XTG3KVWW.js";import"./chunk-ISJRIR3M.js";import"./chunk-YRFRU6ZE.js";import"./chunk-6DT5KFUP.js";import"./chunk-7NLAGHPY.js";import"./chunk-6PA4EPXL.js";import"./chunk-Y6AXKLS3.js";import"./chunk-GUKCMBJ4.js";import"./chunk-EOQAIYR4.js";import"./chunk-FIRS3P2E.js";import"./chunk-WUKI7HUJ.js";import"./chunk-5JEN6757.js";import"./chunk-ARMSOCIZ.js";import"./chunk-7UZYWCAJ.js";import"./chunk-4KXK4HPM.js";import"./chunk-HFZLJHYR.js";import{a as A,b as W}from"./chunk-GUBCWVU7.js";import{a as et,b as it}from"./chunk-EC6WBUJO.js";import{a as lt}from"./chunk-JFFWFSAZ.js";import{d as F,n as ot}from"./chunk-JE76JNP2.js";import"./chunk-MWSRTWKF.js";import"./chunk-XK4FT4MO.js";import"./chunk-BBNSFRDY.js";import{a as nt}from"./chunk-XGOGDN3M.js";import{c as at}from"./chunk-E52G7IUM.js";import"./chunk-7RPRKYSB.js";import{r as Y,s as w,t as Z}from"./chunk-OOFCWTMH.js";import"./chunk-EKUYW7ZL.js";import{K as Q,v as K,wa as X}from"./chunk-YT5HM723.js";import{$b as l,Aa as V,Fb as k,Fc as C,Gc as N,Hc as x,Jb as T,U as J,Vb as s,Wb as d,Yc as P,Zb as H,_b as U,ac as p,bc as h,cc as m,cd as f,dc as u,dd as v,ec as _,ed as L,jc as B,mb as n,oc as j,qc as g,wa as R,xa as z,yb as y}from"./chunk-C4YA3FN6.js";import{a as M,b as G,i as D}from"./chunk-RKLIRILV.js";function It(t,r){t&1&&(u(0,"span",9),C(1,"arrow_right_alt"),_())}function Et(t,r){if(t&1&&(u(0,"div",5),C(1),f(2,"translate"),_(),u(3,"div",6)(4,"div",7)(5,"div"),C(6),f(7,"translate"),u(8,"span",8),C(9),f(10,"currencyFormat"),_()(),s(11,It,2,0,"span",9),u(12,"div"),C(13),f(14,"translate"),u(15,"span",10),C(16),f(17,"currencyFormat"),_()()(),u(18,"div"),C(19),f(20,"translate"),_()()),t&2){let i=g();n(),x(" ",v(2,7,"flight-was-changed.deduction.title")," "),n(5),x(" ",v(7,9,"flight-was-changed.deduction.total-value")," "),n(3),N(L(10,11,i.flight==null||i.flight.price==null?null:i.flight.price.oldTotalPrice,i.currencie.country)),n(2),d(i.mobileDevice?-1:11),n(2),x(" ",v(14,14,"flight-was-changed.deduction.new-value")," "),n(3),N(L(17,16,i.flight.price.totalPrice,i.currencie.country)),n(3),x(" ",v(20,19,"flight-was-changed.deduction.info")," ")}}function Dt(t,r){t&1&&(u(0,"div",5),C(1),f(2,"translate"),_(),u(3,"div",11)(4,"div"),C(5),f(6,"translate"),_(),u(7,"div"),C(8),f(9,"translate"),_()()),t&2&&(n(),x(" ",v(2,3,"flight-was-changed.increase.title")," "),n(4),x(" ",v(6,5,"flight-was-changed.increase.text")," "),n(3),x(" ",v(9,7,"flight-was-changed.increase.info")," "))}function Rt(t,r){t&1&&(u(0,"div",4),C(1),f(2,"translate"),_()),t&2&&(n(),x(" ",v(2,1,"flight-was-changed.equal.text")," "))}var O=(function(t){return t.Equal="equal",t.Increase="increase",t.Deduction="deduction",t})(O||{}),kt=(()=>{let r=class r extends at{constructor(e,o){super(e),this.breakpointObserver=o,this.mobileDevice=!1,this.changeType=O.Equal,this.PriceChangeType=O,this.breakpointObserver.observe(["(max-width: 768px)"]).subscribe(a=>{this.mobileDevice=a.matches})}ngOnInit(){let e=this.flight?.price?.totalPrice??0,o=this.flight?.price?.oldTotalPrice;this.changeType=this.determineChangeType(o,e)}determineChangeType(e,o){return e==null?O.Equal:o<e?O.Deduction:o>e?O.Increase:O.Equal}};r.\u0275fac=function(o){return new(o||r)(y(V),y(Q))},r.\u0275cmp=k({type:r,selectors:[["app-cart-was-change-information"]],inputs:{flight:"flight"},features:[T],decls:8,vars:1,consts:[[1,"information"],[1,"icon"],[1,"material-symbols-outlined"],[1,"content"],[1,"description","equal"],[1,"title"],[1,"description","reduction"],[1,"prices"],[1,"price"],[1,"material-symbols-outlined","arrow"],[1,"price","primary"],[1,"description","increase"]],template:function(o,a){if(o&1&&(u(0,"div",0)(1,"div",1)(2,"span",2),C(3,"feedback"),_()(),u(4,"div",3),s(5,Et,21,21)(6,Dt,10,9)(7,Rt,3,3,"div",4),_()()),o&2){let c;n(5),d((c=a.changeType)===a.PriceChangeType.Deduction?5:c===a.PriceChangeType.Increase?6:c===a.PriceChangeType.Equal?7:-1)}},dependencies:[K,Z,w,tt],styles:['@charset "UTF-8";.information[_ngcontent-%COMP%]{display:flex;border:1px solid var(--mat-sys-tertiary);border-radius:12px;margin-bottom:16px}.information[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:10px;background:var(--mat-sys-tertiary);border-top-left-radius:10px;border-bottom-left-radius:10px}.information[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{color:#fff}@media screen and (max-width:768px){.information[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{padding:6px}.information[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:8px 12px}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#222;font-weight:600;margin-bottom:4px;font-size:var(--type-body-large-size);line-height:var(--type-body-large-line-height);letter-spacing:var(--type-body-large-tracking)}@media(max-width:63.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}}@media(max-width:39.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%]{font-weight:400;display:flex;flex-direction:column;gap:4px;font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}@media(max-width:63.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%]{font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}}@media(max-width:39.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%]{font-size:var(--type-body-small-size);line-height:var(--type-body-small-line-height);letter-spacing:var(--type-body-small-tracking)}}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] .prices[_ngcontent-%COMP%]{display:flex;align-items:center}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] span.price[_ngcontent-%COMP%]{font-weight:600;font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}@media(max-width:63.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] span.price[_ngcontent-%COMP%]{font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}}@media(max-width:39.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] span.price[_ngcontent-%COMP%]{font-size:var(--type-body-small-size);line-height:var(--type-body-small-line-height);letter-spacing:var(--type-body-small-tracking)}}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] span.price.primary[_ngcontent-%COMP%]{font-weight:700;color:var(--mat-sys-primary);font-size:var(--type-body-large-size);line-height:var(--type-body-large-line-height);letter-spacing:var(--type-body-large-tracking)}@media(max-width:63.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] span.price.primary[_ngcontent-%COMP%]{font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}}@media(max-width:39.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] span.price.primary[_ngcontent-%COMP%]{font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] .material-symbols-outlined.arrow[_ngcontent-%COMP%]{color:var(--mat-sys-tertiary);margin:0 10px}@media screen and (max-width:768px){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.reduction[_ngcontent-%COMP%] .prices[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.increase[_ngcontent-%COMP%]{font-weight:400;display:flex;flex-direction:column;gap:4px;font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}@media(max-width:63.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.increase[_ngcontent-%COMP%]{font-size:var(--type-body-medium-size);line-height:var(--type-body-medium-line-height);letter-spacing:var(--type-body-medium-tracking)}}@media(max-width:39.9375em){.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.increase[_ngcontent-%COMP%]{font-size:var(--type-body-small-size);line-height:var(--type-body-small-line-height);letter-spacing:var(--type-body-small-tracking)}}.information[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description.equal[_ngcontent-%COMP%]{font-weight:400;font-size:var(--type-body-small-size);line-height:var(--type-body-small-line-height);letter-spacing:var(--type-body-small-tracking)}']});let t=r;return t})();var zt=()=>({height:"20px",width:"100px"}),Bt=()=>({height:"20px",width:"160px"}),jt=()=>({height:"20px",width:"200px"}),Tt=()=>({height:"30px",width:"30px"}),Nt=()=>({height:"15px",width:"120px","margin-bottom":"6px"}),Lt=()=>({height:"15px",width:"180px"}),$t=(t,r)=>(r==null?null:r.key)||t;function At(t,r){t&1&&(p(0,"div",10)(1,"div",11),m(2,"ngx-skeleton-loader",12)(3,"mat-divider",13)(4,"ngx-skeleton-loader",12)(5,"mat-divider",13)(6,"ngx-skeleton-loader",12),h(),p(7,"div"),m(8,"ngx-skeleton-loader",12),h()()),t&2&&(n(2),l("theme",P(6,zt)),n(),l("vertical",!0),n(),l("theme",P(7,Bt)),n(),l("vertical",!0),n(),l("theme",P(8,jt)),n(2),l("theme",P(9,Tt)))}function Wt(t,r){t&1&&(p(0,"div",10)(1,"div",14),m(2,"ngx-skeleton-loader",12)(3,"ngx-skeleton-loader",12),h(),p(4,"div"),m(5,"ngx-skeleton-loader",12),h()()),t&2&&(n(2),l("theme",P(3,Nt)),n(),l("theme",P(4,Lt)),n(2),l("theme",P(5,Tt)))}function qt(t,r){if(t&1&&(p(0,"mat-card",2),s(1,At,9,10,"div",10)(2,Wt,6,6,"div",10),h()),t&2){let i=g();n(),d(i.mobileDevice?i.mobileDevice?2:-1:1)}}function Gt(t,r){t&1&&m(0,"mat-progress-bar",3)}function Jt(t,r){t&1&&m(0,"mat-divider",19)(1,"app-flight-card-skeleton",17),t&2&&(n(),l("mode","cart"))}function Vt(t,r){t&1&&(p(0,"section",18),m(1,"app-skeleton-summary-price"),h())}function Ht(t,r){if(t&1&&(p(0,"div",4)(1,"section",15)(2,"mat-card",16),m(3,"app-flight-card-skeleton",17),s(4,Jt,2,1),h()(),s(5,Vt,2,0,"section",18),h()),t&2){let i=g();n(3),l("mode","cart"),n(),d(i.isRoundTrip?4:-1),n(),d(i.mobileDevice?-1:5)}}function Ut(t,r){t&1&&(p(0,"mat-card",2),m(1,"app-search-flight",20),h()),t&2&&(n(),l("openedCollapse",!1)("openSearchNewWindow",!1)("loadFlightSearchFlag",!1)("buttonType","outlined"))}function Kt(t,r){if(t&1&&m(0,"app-cart-was-change-information",21),t&2){let i=g(2);l("flight",i.cart.flight)}}function Qt(t,r){t&1&&m(0,"mat-divider",19)}function Xt(t,r){if(t&1&&(m(0,"app-flight-card",27),s(1,Qt,1,0,"mat-divider",19)),t&2){let i=r.$implicit,e=r.$index,o=r.$count,a=g(3);l("journey",i)("flight",a.flight)("flightSearch",a.flightSearch)("index",e)("flightOutbound",(a.cart==null||a.cart.flight==null||a.cart.flight.journeys==null?null:a.cart.flight.journeys.length)===2&&e===1?a.outboundJourney:null)("mode","cart"),n(),d(e!==o-1?1:-1)}}function Yt(t,r){if(t&1){let i=B();p(0,"app-booking-rules",28),f(1,"translate"),f(2,"translate"),j("actionClick",function(){R(i);let o=g(3);return z(o.openFareRule(o.flightRules))}),h()}t&2&&l("message",v(1,3,"checkout-cart.to-see-rules-flight"))("actionLabel",v(2,5,"checkout-cart.click-here"))("useTopBorder",!0)}
1function Zt(t,r){if(t&1&&(p(0,"mat-card",23),H(1,Xt,2,7,null,null,$t),s(3,Yt,3,7,"app-booking-rules",26),h()),t&2){let i=g(2);n(),U(i.cart==null||i.cart.flight==null?null:i.cart.flight.journeys),n(2),d(i.flightRules.length>0?3:-1)}}function te(t,r){t&1&&m(0,"app-skeleton-summary-price")}function ee(t,r){if(t&1&&m(0,"app-summary-price",24),t&2){let i=g(2);l("cart",i.cart)("isPackage",!1)("fromCart",!0)("fromRegister",!1)}}function ie(t,r){if(t&1&&m(0,"app-info-agent-comission",29)(1,"app-infos-oner",29),t&2){let i=g(2);l("cartId",i.cart==null?null:i.cart.cartId),n(),l("cartId",i.cart==null?null:i.cart.cartId)}}function ne(t,r){if(t&1){let i=B();p(0,"div",4)(1,"div",15),s(2,Kt,1,1,"app-cart-was-change-information",21),p(3,"div",22),s(4,Zt,4,1,"mat-card",23),h()(),p(5,"div",18),s(6,te,1,0,"app-skeleton-summary-price"),s(7,ee,1,4,"app-summary-price",24),s(8,ie,2,2),p(9,"app-generate-template",25),j("refreshCart",function(o){R(i);let a=g();return z(a.refreshCart(o))}),h()()()}if(t&2){let i=g();n(2),d(i.wasChangedFlight&&!i.refreshSummaryPrice?2:-1),n(2),d(i.cart!=null&&i.cart.flight?4:-1),n(2),d((!i.cart||i.refreshSummaryPrice)&&!i.mobileDevice?6:-1),n(),d(i.cart&&!i.mobileDevice&&!i.refreshSummaryPrice?7:-1),n(),d(i.cart!=null&&i.cart.cartId&&!i.refreshSummaryPrice?8:-1),n(),l("cart",i.cart)("refreshSummaryPrice",i.refreshSummaryPrice)}}function ae(t,r){t&1&&m(0,"app-skeleton-summary-price",7),t&2&&l("mobileDevice",!0)}function oe(t,r){if(t&1&&m(0,"app-summary-price",8),t&2){let i=g();l("cart",i.cart)("isPackage",!1)("fromCart",!0)("fromRegister",!1)("mobileDevice",!0)}}function re(t,r){t&1&&m(0,"app-skeleton-summary-price")}function ce(t,r){if(t&1&&m(0,"app-summary-price",8),t&2){let i=g();l("cart",i.cart)("isPackage",!1)("fromCart",!0)("fromRegister",!1)("mobileDevice",!1)}}var Ve=(()=>{let r=class r extends _t{get cartTypeEnum(){return A.FLIGHT}get outboundJourney(){return this.cart?.flight?.journeys?.[0]??null}filterRule(e){return!!(e&&e.htmlText)}onUserChange(){this.isOwner=!1,this.userJwt=this._authService.decodePayloadJWT(),this.userJwt?.IsAgencyOwner==="True"&&(this.isOwner=!0)}onAfterConfigureView(){this.institution=JSON.parse(sessionStorage.getItem("institution")),this.configs=ct(this.institution.agent.configurations),this.comboTypesOfPayment=this.configs.PaymentMethods.split("|"),this.userJwt=this._authService.decodePayloadJWT(),this.userJwt?.IsAgencyOwner==="True"&&(this.isOwner=!0),this.cart.flight&&(this.loadFlightSummary(this.cart),this.backButtonWhereTo=F.FLIGHT_LIST),this.isShared=this.cart.isShared,this.canChangeCartCommission=this.cart.canChangeCartCommission,this.wasChangedFlight=this.cart.wasChanged&&this.cart.cartType===A.FLIGHT,this.cart.cartExpired||this.setOrderSummary()}constructor(e,o,a,c,b,S,I,E){super(),this.navigationService=e,this.bookingService=o,this.translateService=a,this.orderSummaryService=c,this.checkoutBookingService=b,this.flightStateService=E,this.isLoggedIn=!1,this.wasChangedFlight=!1,this.isOwner=!1,this.canChangeCartCommission=!1,this.comboTypesOfPayment=[],this.informationPayment=[],this.isRoundTrip=!1,this.loadSkeleton=!0,this.flightRules=[],this.showBookingRules=!1,this.bookingRules=[],this.observeMobileBreakpoint(),S.addSvgIcon("cartExpiredSvg",I.bypassSecurityTrustResourceUrl("assets/img/new/cart-expired.svg"))}ngOnInit(){this.flightSearch=JSON.parse(sessionStorage.getItem("flightSearch")),this.cardIdParams=this.route.snapshot.params.cartid??null,this.cardIdParams?this.route.queryParams.subscribe(e=>D(this,null,function*(){e=$.parser(M({},e)),this.sourceType=e.source,this.sourceType===W.FLIGHT&&(this.backButtonWhereTo=F.FLIGHT_LIST),e.isRoundTrip&&(this.isRoundTrip=e.isRoundTrip),yield this.bookingService.getCart(this.cardIdParams).toPromise().then(o=>{this.cart=o.data,this.cartId=o?.data?.cartId,o&&(this.configureViewAfterGetCart(),this.setSearchToComponent(this.cart),this.loadSkeleton=!1,this.buildFlightRules()),this.cart||(this.isExpiredCart=!0,this.openDialogCartNotFound())}).catch(()=>{this.cart=null,this.isExpiredCart=!0,this.loadSkeleton=!1,this.openDialogCartNotFound()})})):this.route.queryParams.subscribe(e=>D(this,null,function*(){e.rooms&&(e=G(M({},e),{rooms:JSON.parse(e.rooms)})),e=$.parser(M({},e)),this.sourceType=e.source,this.sourceType===W.FLIGHT&&(this.backButtonWhereTo=F.FLIGHT_LIST),e.isRoundTrip&&(this.isRoundTrip=e.isRoundTrip),yield this.bookingService.getCart(e.newCartId).toPromise().then(o=>{this.cart=o.data,this.cartId=o?.data?.cartId,o&&(this.configureViewAfterGetCart(),this.setSearchToComponent(this.cart),this.loadSkeleton=!1,this.buildFlightRules()),this.cart||(this.isExpiredCart=!0,this.openDialogCartNotFound())}).catch(()=>{this.cart=null,this.isExpiredCart=!0,this.loadSkeleton=!1,this.openDialogCartNotFound()})}))}setSearchToComponent(e){if(e.cartType==="Flight"){let o=e.cartId;this.checkoutBookingService.searchBookingFlight(o).subscribe({next:a=>{let c=a.data;if(!c)return;let b=Number(c.adultsCount||0),S=Number(c.teenagerCount||0);S>0&&(b=b-S);let I=c.arrival.isIataCity?`${c.arrival.city} - ${this.translateService.instant("search-flight.all")}`:`${c.arrival.city} - (${c.arrival.iata}${c.arrival.name?" - "+c.arrival.name:""})`,E=c.departure.isIataCity?`${c.departure.city} - ${this.translateService.instant("search-flight.all")}`:`${c.departure.city} - (${c.departure.iata}${c.departure.name?" - "+c.departure.name:""})`,q={cartId:o,adultsCount:b,teenagerCount:S,childCount:Number(c.childCount||0),infantCount:Number(c.infantCount||0),arrivalCity:c.arrival.city,arrivalIata:c.arrival.iata,arrivalName:I,isArrivalIataCity:c.arrival.isIataCity,departureCity:c.departure.city,departureIata:c.departure.iata,departureName:E,isDepartureIataCity:c.departure.isIataCity,departureDate:c.departureDate?new Date(c.departureDate):null,returnDate:c.isRoundTrip&&c.returnDate?new Date(c.returnDate):null,isRoundTrip:!!c.isRoundTrip,source:"f"};this.flightSearch=q,this.flightStateService.updateFlightSearchState(q),this.flightStateService.commitFlightSearch()}})}}loadFlightSummary(e){let o=e.flight.journeys.find(c=>c.journeyNumber===1),a=e.flight.journeys.find(c=>c.journeyNumber===2);this.flightSummary={cartType:e.cartType,paymentInfo:e.orderSummary,inbound:a,outbound:o,price:e.flight.price}}onAddDiscount(){this.urlRestrictArea=`${this.institution.backOfficeDns}/login/authenticated/${this._authService.getToken()}/${this.cart.id}`,window.open(this.urlRestrictArea,"_self")}setOrderSummary(){this.orderSummary=this.orderSummaryService.setFlightOrderSummary(this.cart)}onNavigate(){this.navigationService.navigation(["/home"])}numberArray(e){return new Array(e)}redirectPayment(){this.navigationService.navigation([`/checkout/register-flight/${this.cart.cartId}`])}purchase(){alert("purchase")}refreshCart(e){this.refreshSummaryPrice=!0,this.bookingService.getCart(e).pipe(J(()=>this.refreshSummaryPrice=!1)).subscribe({next:o=>{this.cart=o.data,this.cartId=o?.data?.cartId,this.cart.flight=o?.data?.flight?M({},o?.data?.flight):null,o&&(this.configureViewAfterGetCart(),this.setSearchToComponent(this.cart),this.loadSkeleton=!1),this.cart||(this.isExpiredCart=!0,this.openDialogCartNotFound())},error:()=>{this.cart=null,this.isExpiredCart=!0,this.loadSkeleton=!1,this.openDialogCartNotFound()}})}buildFlightRules(){this.flightRules=[],(this.cart?.rules??[]).forEac
1h(e=>{e.linkToAirlineFareRules&&this.flightRules.push(e)})}openFareRule(e){let[{type:o}]=e,a={width:"500px",height:"100%",maxWidth:"100vw",maxHeight:"100vh",disableClose:!1,autoFocus:!1,panelClass:"full-screen-dialog-mobile"},c={informations:o==="Flight"?this.flightRules:null},b=this._dialogService.open(Ct,c,a);b.afterClosed().subscribe(S=>{b.close()})}};r.\u0275fac=function(o){return new(o||r)(y(ot),y(st),y(Y),y(Ot),y(yt),y(nt),y(X),y(pt))},r.\u0275cmp=k({type:r,selectors:[["app-flight-cart"]],features:[T],decls:14,vars:13,consts:[[1,"container","container-content"],["app-back-button","",3,"text","whereTo"],["appearance","outlined",1,"search"],["mode","indeterminate",1,"progress"],[1,"content"],[3,"cart","isExpiredCart"],["collapsed-content",""],[3,"mobileDevice"],[3,"cart","isPackage","fromCart","fromRegister","mobileDevice"],["expanded-content",""],[1,"flex","flex-jc-sb","flex-ai-c"],[1,"flex","flex-gap"],[1,"flex",3,"theme"],[3,"vertical"],[1,"flex","flex-column"],[1,"cart-section"],["appearance","outlined"],[3,"mode"],[1,"summary-section"],[1,"divider"],[3,"openedCollapse","openSearchNewWindow","loadFlightSearchFlag","buttonType"],[3,"flight"],[1,"product-card"],["appearance","outlined",1,"cart-card"],[3,"cart","isPackage","fromCart","fromRegister"],[3,"refreshCart","cart","refreshSummaryPrice"],["icon","rule",3,"message","actionLabel","useTopBorder"],[3,"journey","flight","flightSearch","index","flightOutbound","mode"],["icon","rule",3,"actionClick","message","actionLabel","useTopBorder"],[3,"cartId"]],template:function(o,a){o&1&&(p(0,"div",0),m(1,"div",1),s(2,qt,3,1,"mat-card",2),s(3,Gt,1,0,"mat-progress-bar",3),s(4,Ht,6,3,"div",4),s(5,Ut,2,4,"mat-card",2),s(6,ne,10,7,"div",4),h(),p(7,"app-float-payment-details",5)(8,"div",6),s(9,ae,1,1,"app-skeleton-summary-price",7),s(10,oe,1,5,"app-summary-price",8),h(),p(11,"div",9),s(12,re,1,0,"app-skeleton-summary-price"),s(13,ce,1,5,"app-summary-price",8),h()()),o&2&&(n(),l("text","back-buttons.results")("whereTo",a.backButtonWhereTo),n(),d(a.cart!=null&&a.cart.flight?-1:2),n(),d(a.cart!=null&&a.cart.flight?-1:3),n(),d(a.cart!=null&&a.cart.flight?-1:4),n(),d(a.cart!=null&&a.cart.flight?5:-1),n(),d(a.cart!=null&&a.cart.flight?6:-1),n(),l("cart",a.cart)("isExpiredCart",a.isExpiredCart),n(2),d(!a.cart&&a.mobileDevice||a.refreshSummaryPrice?9:-1),n(),d(a.cart&&!a.refreshSummaryPrice?10:-1),n(2),d(!a.cart&&a.mobileDevice||a.refreshSummaryPrice?12:-1),n(),d(a.cart&&a.mobileDevice&&!a.refreshSummaryPrice?13:-1))},dependencies:[gt,it,et,mt,ht,kt,St,bt,Pt,xt,vt,lt,dt,rt,ut,ft,Mt,w],styles:['@media(max-width:1200px){.container-content[_ngcontent-%COMP%]{margin-bottom:140px}}.search[_ngcontent-%COMP%]{margin-top:1rem}div[app-back-button][_ngcontent-%COMP%]:not([style*="display: none"]) + .search[_ngcontent-%COMP%]{margin-top:.2rem}.content-cards[_ngcontent-%COMP%]{padding:0 16px 0 0}@media(max-width:1200px){.content-cards[_ngcontent-%COMP%]{padding:0}}.content[_ngcontent-%COMP%]{margin-top:16px;display:flex;gap:16px}.content[_ngcontent-%COMP%] .cart-section[_ngcontent-%COMP%]{width:70%;margin-bottom:1rem}.content[_ngcontent-%COMP%] .summary-section[_ngcontent-%COMP%]{width:30%}@media(max-width:1200px){.content[_ngcontent-%COMP%]{flex-direction:column}.content[_ngcontent-%COMP%] .cart-section[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .summary-section[_ngcontent-%COMP%]{width:100%}}.progress[_ngcontent-%COMP%]{margin:1rem 0}.skeleton[_ngcontent-%COMP%]{width:100%}.container-grid-ske[_ngcontent-%COMP%]{display:grid;grid-template-columns:.3fr 1fr;grid-auto-rows:1fr .1fr .1fr;gap:16px 16px;grid-template-areas:"skl-image ." "skl-checkout skl-checkout" "skl-details skl-details"}.skl-hotel[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;grid-template-rows:.1fr .1fr .1fr;gap:0px 0px;grid-auto-flow:row;grid-template-areas:"skl-title" "skl-address" "skl-rooms"}.skl-title[_ngcontent-%COMP%]{grid-area:skl-title}.skl-address[_ngcontent-%COMP%]{grid-area:skl-address}.skl-rooms[_ngcontent-%COMP%]{grid-area:skl-rooms;margin-top:16px}.skl-image[_ngcontent-%COMP%]{grid-area:1/1/2/2}.skl-checkout[_ngcontent-%COMP%]{grid-area:skl-checkout}.skl-details[_ngcontent-%COMP%]{grid-area:skl-details;padding-top:8px;border-top:solid 1px #ccc}.cards-search[_ngcontent-%COMP%]{height:auto;border:1px solid #e0e0e0;padding:16px 16px 0;border-radius:4px}.cards-search[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{justify-content:center}.cart-card[_ngcontent-%COMP%]{border:1px solid var(--mat-sys-primary)}.divider[_ngcontent-%COMP%]{margin:1rem 0}']});let t=r;return t})();
1export{Ve as FlightCartComponent};
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.