1import{a as Yt}from"./chunk-TN3QWZ55.js";import{a as at}from"./chunk-S7JQAHUX.js";import{h as on,i as rn}from"./chunk-AQFQ7RVM.js";import{b as Qi,c as Zi}from"./chunk-ACNBMMZJ.js";import"./chunk-GXBLVHHU.js";import"./chunk-SYL67YTI.js";import{a as en,b as nn}from"./chunk-C4CTAG6P.js";import{a as Xt}from"./chunk-PICUJXNH.js";import"./chunk-7NH43F5D.js";import{a as Ki}from"./chunk-KETNMA4H.js";import{b as tn}from"./chunk-PGRYMKNC.js";import"./chunk-BLSEBECU.js";import"./chunk-W3OI2UL4.js";import{a as Ji}from"./chunk-O6KOCQH7.js";import"./chunk-LGWQSPAF.js";import{a as Wt}from"./chunk-GMU55COR.js";import{a as Oi}from"./chunk-KTSBKNUZ.js";import{a as Ti}from"./chunk-S2SYGZNG.js";import"./chunk-SP4SSG3M.js";import"./chunk-SGXPCYAS.js";import{a as Bi,b as Rt}from"./chunk-E3IWIF2X.js";import{a as Ni,b as ji,c as qi,d as Bt,e as Nt,f as Gi}from"./chunk-YAOV572X.js";import"./chunk-ZNYRSDRL.js";import"./chunk-ZGP63JVZ.js";import"./chunk-XSXJP5LE.js";import{e as Gt}from"./chunk-KVJUCGQB.js";import{a as Ui,b as zi}from"./chunk-WLAAISZ7.js";import{a as Wi,b as Yi,c as $i,d as Ot}from"./chunk-VVQPZGUE.js";import{a as ve}from"./chunk-RTV47EJY.js";import"./chunk-DEX4F5JC.js";import"./chunk-WB7ILXGQ.js";import{a as Ue,b as rt}from"./chunk-2PKFQWEV.js";import"./chunk-6TQAWY7W.js";import{a as qt}from"./chunk-H3NVCHAS.js";import{c as Mi,d as Hi,g as Ri}from"./chunk-ZI5AKCCD.js";import{a as ae}from"./chunk-XKDWBZ6J.js";import"./chunk-JOF2N2A4.js";import"./chunk-QOXXZPPV.js";import"./chunk-Z7J3BBJK.js";import"./chunk-7FCQ6KL4.js";import"./chunk-JULDF3H5.js";import"./chunk-CJPLD6EO.js";import"./chunk-W4BO5QHV.js";import"./chunk-4NY3NJZN.js";import{e as Xi}from"./chunk-EO5PKPEG.js";import{a as Z}from"./chunk-TYDU3B23.js";import"./chunk-VJ7F3RSO.js";import"./chunk-STFTWUCP.js";import{a as _e}from"./chunk-XTG2QKW3.js";import{a as N}from"./chunk-HSN5Q4ND.js";import{a as Ai}from"./chunk-CGOCOQTB.js";import{c as Ve,d as M}from"./chunk-7ZMFCFLH.js";import"./chunk-WBRFQJD2.js";import{g as Vt,i as Ci,j as fi}from"./chunk-7ISET2QT.js";import{a as ut}from"./chunk-GMMDR6XD.js";import{a as Mt}from"./chunk-K3WWVAYD.js";import{A as $e,B as je,C as Fi,D as Vi,J as Li,K as ue,L as Ht,b as Ne,c as We,g as me,h as Ii,m as wi,n as fe,o as Ei,p as bi,w as ki,x as Pi,y as Di,z as Ye}from"./chunk-3W45KOAP.js";import{b as vi}from"./chunk-ZSK53TFP.js";import"./chunk-WEE3FGJI.js";import{f as j}from"./chunk-33CXZHQA.js";import{c as Ce,d as Si,e as A}from"./chunk-2FIBZ2VI.js";import{a as B,b as xi,d as yi,e as Lt,j as At}from"./chunk-LPGEMBOY.js";import{$ as ri,$b as a,$c as F,Aa as xt,Ac as ie,Bb as P,Bc as Be,Ca as L,Cb as it,Cc as q,Db as li,Dc as c,Ec as S,Fc as y,Gc as Q,Ha as He,Hb as ci,Hc as pt,Ia as pe,Ic as ui,Id as Pt,La as yt,Lc as G,Ld as Fe,Mc as z,Nc as X,Oc as It,P as te,Pc as wt,Q as oi,Qa as ai,Qc as Et,Rc as mt,Sb as Pe,Sc as bt,Sd as Dt,Tb as p,Vb as m,Vc as kt,Wc as Se,Xb as k,Xc as ne,Yb as w,Yd as Ft,Zb as E,Zd as _i,_b as f,ac as r,ad as ot,bc as u,bd as V,cc as Ke,dc as Qe,eb as R,ec as di,f as ii,fb as ke,fe as gi,ha as ft,ia as tt,ic as x,jc as pi,kb as o,lc as C,ld as De,ma as T,md as $,oc as s,p as ni,pc as nt,qc as Ze,sb as si,sc as mi,tb as Ie,tc as St,ua as _,uc as vt,ud as hi,va as g,zc as Tt}from"./chunk-4NCSCGCQ.js";import{a as Ae,b as Me,g as ge}from"./chunk-QBUHZOWM.js";var Wn=t=>({fromDate:t});function Yn(t,l){if(t&1){let e=x();a(0,"div",1)(1,"div",2)(2,"div",3),u(3,"app-package-widget",4),r(),a(4,"div",5)(5,"button",6),C("click",function(){_(e);let n=s();return g(n.showWidget=!1)}),c(6,"Close"),r()()()()}if(t&2){let e=s();o(3),f("addToExistingItinerary",!0)("initialItineraryItemData",ne(2,Wn,e.initialFromDate))}}function $n(t,l){if(t&1){let e=x();a(0,"div",2)(1,"div",7)(2,"button",8),C("click",function(){_(e);let n=s();return g(n.showWidget=!0)}),c(3,"Add Another Package"),r()()()}}var an=(()=>{class t{constructor(){this.initialFromDate="",this.showWidget=!1}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-add-another-package-widget"]],inputs:{initialFromDate:"initialFromDate"},decls:3,vars:1,consts:[[1,"my-2"],[1,"widget","search"],[1,"row"],[1,"col"],[3,"addToExistingItinerary","initialItineraryItemData"],[1,"col-1"],["type","button",1,"btn","btn-secondary",3,"click"],[1,"col","text-right"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,n){i&1&&(a(0,"section",0),p(1,Yn,7,4,"div",1)(2,$n,4,0,"div",2),r()),i&2&&(o(),m(n.showWidget?1:2))},dependencies:[ji],encapsulation:2})}}return t})();var jn=(t,l)=>l.announcementId;
1function Un(t,l){if(t&1&&(Ke(0,"p",1),c(1),Qe()),t&2){let e=l.$implicit;o(),S(e.message)}}function zn(t,l){if(t&1&&(Ke(0,"div"),w(1,Un,2,1,"p",1,jn),Qe()),t&2){let e=s();q(bt("announcements ",e.containerClass())),o(),E(e.announcements())}}var ze=(()=>{class t{constructor(){this.announcements=$([]),this.containerClass=$("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-product-announcements"]],inputs:{announcements:[1,"announcements"],containerClass:[1,"containerClass"]},decls:1,vars:1,consts:[[3,"class"],[1,"product-announcement"]],template:function(i,n){i&1&&p(0,zn,3,3,"div",0),i&2&&m(n.announcements().length?0:-1)},encapsulation:2,changeDetection:0})}}return t})();function qn(t,l){if(t&1&&(a(0,"h6",5),c(1),r()),t&2){let e=s();o(),y("Provided by ",e.getOwner())}}function Gn(t,l){if(t&1&&u(0,"div",6),t&2){let e=s();f("innerHtml",e.car.description,R)}}function Xn(t,l){if(t&1&&(a(0,"div",9)(1,"p",14),u(2,"fa-icon",15),c(3),r()()),t&2){let e=l.$implicit;o(3),y(" ",e.productTypeSubCategory.name," ")}}function Kn(t,l){if(t&1&&(a(0,"p",14),c(1,"Total Price"),r(),a(2,"h4"),c(3),F(4,"convertCurrency"),r(),u(5,"hr")),t&2){let e=s();o(3),S(V(4,1,e.car.price,e.currency))}}function Qn(t,l){if(t&1){let e=x();a(0,"button",16),C("click",function(){_(e);let n=s();return g(n.selectCar())}),c(1,"Select"),r()}}function Zn(t,l){t&1&&(a(0,"h5",12),c(1,"No Availability"),r())}function Jn(t,l){t&1&&(a(0,"div",13),u(1,"fa-icon",17),c(2," SELECTED"),r())}var sn=(()=>{class t{constructor(){this.carSelected=new L,this.carEdited=new L,this.dateChange=new L,this.announcements=[],this.supplierService=T(A),this.itineraryService=T(M)}get currency(){return this.supplierService.getSelectedCurrency()}selectCar(){this.carSelected.emit(this.car)}pricePerDay(){return this.car.price/this.days()}days(){return this.car.items.length}showPricing(){return this.itineraryService.showPricing()}bookable(){return this.itineraryService.bookable()}getOwner(){return this.car.items[0].owner.name}getSupplier(){return this.supplierService.currentSupplier.name}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-car"]],inputs:{car:"car",announcements:"announcements"},outputs:{carSelected:"carSelected",carEdited:"carEdited",dateChange:"dateChange"},decls:19,vars:13,consts:[[1,"row","product"],[1,"col-md-4","col-lg-3"],[3,"photos","galleryId","usePreview"],[1,"col-md-5","col-lg-6","my-auto"],[1,"mt-3","mt-md-0","text-center"],[1,"text-center"],[3,"innerHtml"],[3,"announcements"],[1,"row"],[1,"col-md-6","mt-1"],[1,"col-md","my-auto","text-center"],[1,"btn","btn-primary","mb-2","w-100"],[1,"alert","alert-warning"],[1,"h5","nowrap"],[1,"title"],["icon","chevron-right"],[1,"btn","btn-primary","mb-2","w-100",3,"click"],["icon","check-circle"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1),u(2,"app-photo-gallery",2),r(),a(3,"div",3)(4,"h2",4),c(5),r(),a(6,"h6",5),c(7),r(),p(8,qn,2,1,"h6",5),p(9,Gn,1,1,"div",6),u(10,"app-product-announcements",7),a(11,"div",8),w(12,Xn,4,1,"div",9,k),r()(),a(14,"div",10),p(15,Kn,6,4),p(16,Qn,2,0,"button",11),p(17,Zn,2,0,"h5",12),p(18,Jn,3,0,"div",13),r()()),i&2&&(o(2),f("photos",n.car.photos)("galleryId",n.car.id)("usePreview",!0),o(3),S(n.car.name),o(2),Q("",n.days()," days @ ",n.pricePerDay()," per day"),o(),m(n.getOwner()!=n.getSupplier()?8:-1),o(),m(n.car.description?9:-1),o(),f("announcements",n.announcements),o(2),E(n.car.categories),o(3),m(n.showPricing()?15:-1),o(),m(!n.car.selected&&n.bookable()&&n.car.available?16:-1),o(),m(n.car.available?-1:17),o(),m(n.car.selected?18:-1))},dependencies:[ae,j,ze,Z],encapsulation:2})}}return t})();function eo(t,l){t&1&&(a(0,"h3",0),u(1,"app-spinner"),c(2," Loading Cars"),r())}function to(t,l){if(t&1&&(a(0,"div",1)(1,"div",3),u(2,"app-carhire-widget",4),r(),u(3,"hr"),r()),t&2){let e=s();o(2),f("suggestionItineraryItem",e.itineraryItem)("suggestion",!0)}}function io(t,l){if(t&1){let e=x();a(0,"app-car",5),C("carSelected",function(n){_(e);let d=s();return g(d.processCarHireSelection(n))})("dateChange",function(n){_(e);let d=s();return g(d.processDateChange(n))}),r()}if(t&2){let e=l.$implicit,i=s();f("car",e)("announcements",i.getProductAnnouncements(e.id))}}var $t=(()=>{class t{constructor(){this.suggestion=!1,this.productAnnouncements=[],this.loading=!0,this.itineraryService=T(M),this.supplierService=T(A)}ngOnInit(){this.getCarHire(),this.subscription=this.itineraryService.itineraryChanged.subscribe(e=>{this.loading=!0,this.itineraryItem=e.items.filter(i=>i.id===this.itineraryItem.id)[0],this.itineraryItem.products=[],this.getCarHire()})}getCarHire(){!this.itineraryItem.products||this.itineraryItem.products.length<1?this.supplierService.getCarHire(this.itineraryItem.id).subscribe(e=>{this.itineraryItem.products=e.filter(i=>i.items.length>
10),this.itineraryItem.products.forEach(i=>{let n=i;this.itineraryItem.selectedItems?.some(d=>d.supplierProductItemPrice.supplierProductItem.supplierProduct.id===n.id)&&this.markSelected(n)}),this.sortBy(["price"]),this.loading=!1}):this.loading=!1}processCarHireSelection(e){let i=[];e.items.forEach(n=>{i.push(...n.prices.map(d=>d.id))}),this.itineraryService.addToCartMultiDay(this.itineraryItem.id,i).subscribe(n=>{this.itineraryService.productSelected(n,this.itineraryItem,e)})}processDateChange(e){this.itineraryItem.fromDate=e,this.itineraryItem.products=null,this.itineraryService.saveItineraryItem(this.itineraryItem).subscribe(i=>{this.itineraryService.productSelected(i,this.itineraryItem,null)})}markSelected(e){for(let i of this.itineraryItem.products)i.selected=!1;this.itineraryItem.allSelected=e.selected=!0}sortBy(e){_e(this.itineraryItem.products,e)}getProductAnnouncements(e){return this.productAnnouncements.filter(i=>i.productId===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-cars"]],inputs:{itinerary:"itinerary",itineraryItem:"itineraryItem",suggestion:"suggestion",productAnnouncements:"productAnnouncements"},decls:4,vars:2,consts:[[1,"text-center","p-4"],[1,"sticky-top"],[3,"car","announcements"],[1,"widget","search"],[3,"suggestionItineraryItem","suggestion"],[3,"carSelected","dateChange","car","announcements"]],template:function(i,n){i&1&&(p(0,eo,3,0,"h3",0),p(1,to,4,2,"div",1),w(2,io,1,2,"app-car",2,k)),i&2&&(m(n.loading?0:-1),o(),m(n.suggestion?1:-1),o(),E(n.itineraryItem.products))},dependencies:[sn,N,qi],encapsulation:2})}}return t})();var cn=ge(Ce(),1);function no(t,l){if(t&1&&(a(0,"div",11)(1,"p",12),u(2,"fa-icon",13),c(3),r()()),t&2){let e=l.$implicit;o(3),y(" ",e.productTypeSubCategory.name," ")}}function oo(t,l){if(t&1&&(a(0,"div",4),w(1,no,4,1,"div",11,k),r()),t&2){let e=s();o(),E(e.experience.categories)}}function ro(t,l){t&1&&(a(0,"h3"),c(1,"Reservation Options"),r())}function ao(t,l){if(t&1){let e=x();a(0,"div",8)(1,"button",14),C("click",function(){_(e);let n=s();return g(n.showWidget=!1)}),c(2,"Cancel Changes"),r()()}}function so(t,l){if(t&1&&u(0,"app-experience-widget",10),t&2){let e=s();f("suggestionItineraryItem",e.itineraryItem)("selectedItem",e.itineraryItemSelected)("supplierProduct",e.experience)("showDate",!1)("showLocation",!1)("suggestion",!0)}}
1function lo(t,l){if(t&1&&(a(0,"option",21),c(1),r()),t&2){let e=l.$implicit,i=s(3);f("value",e.id),o(),y(" ",i.getTime(e.departureTime)+" - Check In: "+i.getTime(e.checkInTime)," ")}}function co(t,l){if(t&1){let e=x();a(0,"label"),c(1,"Choose an Option"),r(),u(2,"fa-icon",19),a(3,"select",20),X("ngModelChange",function(n){_(e);let d=s(2);return z(d.selectedItem,n)||(d.selectedItem=n),g(n)}),w(4,lo,2,2,"option",21,k),r()}if(t&2){let e=s(2);o(3),G("ngModel",e.selectedItem),o(),E(e.experience.items)}}function po(t,l){if(t&1&&(a(0,"h5",16),c(1),r()),t&2){let e=s(2);o(),ui(" ",e.experience.startTime," ",e.experience.endTime?" - "+e.experience.endTime:""," ",e.experience.startTime||e.experience.endTime?" - ":""," ",e.experience.noHours!="0"?e.experience.noHours+" Hours":""," ")}}function mo(t,l){t&1&&(a(0,"h5"),c(1,"Free to Reserve"),r())}function uo(t,l){if(t&1&&(a(0,"h5"),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(3);o(),S(V(2,1,e.experience.price,e.currency))}}function ho(t,l){if(t&1&&(a(0,"div",17)(1,"p",22),c(2,"Total"),r(),p(3,mo,2,0,"h5")(4,uo,3,4,"h5"),r()),t&2){let e=s(2);o(3),m(e.experience.price===0?3:4)}}function _o(t,l){if(t&1){let e=x();a(0,"div",17)(1,"p",22),c(2,"Travellers:"),r(),a(3,"h5"),c(4),a(5,"fa-icon",23),C("click",function(){_(e);let n=s(2);return g(n.showWidget=!0)}),r()()()}if(t&2){let e=s(2);o(4),y("",e.travellers," ")}}function go(t,l){if(t&1){let e=x();a(0,"button",29),C("click",function(){_(e);let n=s(3);return g(n.selectExperience())}),c(1),r()}if(t&2){let e=s(3);f("tooltip",e.experience.available?"Select this Experience"+(e.hasSelectedItem()?" Instead":""):"We will contact you as soon as possible with confirmation"),o(),y(" ",e.experience.available?"SELECT"+(e.hasSelectedItem()?" INSTEAD":""):"JOIN WAITLIST"," ")}}function Co(t,l){if(t&1){let e=x();a(0,"button",30),C("click",function(){_(e);let n=s(3);return g(n.bookThisAsWell())}),c(1),r()}if(t&2){let e=s(3);f("tooltip",e.experience.available?"Add another experience to my itinerary":"We will contact you as soon as possible with confirmation"),o(),y(" ",e.experience.available?"BOOK AS WELL":"INTERESTED IN THIS TOO - JOIN WAITLIST"," ")}}function fo(t,l){if(t&1){let e=x();a(0,"button",30),C("click",function(){_(e);let n=s(3);return g(n.selectExperience())}),c(1),r()}if(t&2){let e=s(3);f("tooltip",e.experience.available?"Change to this time":"We will contact you as soon as possible with confirmation"),o(),y(" ",e.experience.available?"CHANGE TO THIS TIME":"JOIN WAITLIST"," ")}}function xo(t,l){t&1&&(a(0,"div",27),c(1,"WAITLISTED"),r())}function yo(t,l){t&1&&(a(0,"div",28),u(1,"fa-icon",31),c(2," SELECTED"),r())}function So(t,l){if(t&1&&(a(0,"div",18)(1,"div",24),p(2,go,2,2,"button",25),p(3,Co,2,2,"button",26),p(4,fo,2,2,"button",26),r(),p(5,xo,2,0,"div",27),p(6,yo,3,0,"div",28),r()),t&2){let e=s(2);o(2),m(!e.isSelectedItem()&&!e.experience.selected&&(e.experience.available||e.usesWaitlisting())?2:-1),o(),m(!e.isSelectedItem()&&e.hasSelectedItem()&&e.multiAddition()&&(e.experience.available||e.usesWaitlisting())?3:-1),o(),m(!e.isSelectedItem()&&e.experience.selected&&(e.experience.available||e.usesWaitlisting())?4:-1),o(),m(e.isSelectedItem()&&!e.experience.available?5:-1),o(),m(e.isSelectedItem()&&e.experience.available?6:-1)}}function vo(t,l){if(t&1&&(a(0,"div",1)(1,"div",15),p(2,co,6,1),p(3,po,2,4,"h5",16),r(),p(4,ho,5,1,"div",17),p(5,_o,6,1,"div",17),p(6,So,7,5,"div",18),r()),t&2){let e=s();o(2),m((e.experience.items==null?null:e.experience.items.length)>1?2:-1),o(),m((e.experience.items==null?null:e.experience.items.length)==1?3:-1),o(),m(e.showPricing()?4:-1),o(),m(e.multiAddition()&&!e.itineraryItem.suggestion&&(e.isSelectedItem()||!e.hasSelectedItem())?5:-1),o(),m(e.bookable()?6:-1)}}function To(t,l){if(t&1){let e=x();a(0,"div",34)(1,"button",35),C("click",function(){_(e);let n=s(2);return g(n.addAnother())}),c(2," ADD ANOTHER EXPERIENCE "),r()()}}function Io(t,l){if(t&1&&(u(0,"hr"),a(1,"div",1)(2,"div",32)(3,"h5",33),c(4,"You may add multiple items to your itinerary."),r()(),p(5,To,3,0,"div",34),r()),t&2){let e=s();o(5),m(e.isSelectedItem()&&e.multiAddition()?5:-1)}}function wo(t,l){t&1&&u(0,"hr")}function Eo(t,l){t&1&&u(0,"hr")}function bo(t,l){if(t&1&&(a(0,"div",36)(1,"h3"),c(2,"What's Included"),r(),u(3,"div",5)(4,"hr",37),r()),t&2){let e=s(2);o(3),f("innerHtml",e.experience.whatsIncluded,R)}}function ko(t,l){if(t&1&&(a(0,"div",36)(1,"h3"),c(2,"What To Bring"),r(),u(3,"div",5)(4,"hr",37),r()),t&2){let e=s(2);o(3),f("innerHtml",e.experience.whatToBring,R)}}function Po(t,l){if(t&1&&(a(0,"div",2)(1,"h3"),c(2,"Who Should Come"),r(),u(3,"div",5),r()),t&2){let e=s(2);o(3),f("innerHtml",e.experience.whoShouldCome,R)}}function Do(t,l){if(t&1&&(a(0,"div",1),p(1,bo,5,1,"div",36),p(2,ko,5,1,"div",36),p(3,Po,4,1,"div",2),r()),t&2){let e=s();o(),m(e.experience.whatsIncluded?1:-1),o(),m(e.experience.whatToBring?2:-1),o(),m(e.experience.whoShouldCome?3:-1)}}var dn=(()=>{class t{constructor(){this.experienceItemSelected=new L,this.bookAsWellSelected=new L,this.addAnotherSelected=new L,this.dateChange=new L,this.showWidget=!1,this.itineraryService=T(M),this.supplierService=T(A)}ngOnChanges(){_e(this.experience.items,["departureTime"]),this.selectedItem=this.experience.items?this.experience.items[0].id:"",this.travellers=this.itineraryService.getTravellersString(this.itineraryItem,this.itinerary),this.itineraryItem.selectedItems&&this.itineraryItem.selectedItems[0]?(this.itineraryItem.selectedItems[0]?.supplierProductItemPrice.supplierProductItem.supplierProduct.id===this.experience.id?this.itineraryItemSelected=this.itineraryItem.selectedItems[0]?.supplierProductItemPrice.supplierProductItem:this.itineraryItemSelected=this.experience.items[0],this.selectedItem=this.itineraryItemSelected.id):this.itineraryItemSelected=this.experience.items[0]}get currency(){return this.supplierService.getSelectedCurrency()}getTimingAndOwner(){let e=this.experience.owner;if(this.experience.startTime&&(e+=(e!=""?" - ":"")+this.experience.startTime),this.experience.endTime&&(e+=(e!=""?" - ":"")+this.experience.endTime),this.experience.noHours!="0"){let i=+this.experience.noHours,n=Math.floor(i),d=Math.round(i%1*60);e+=(e!=""?" - ":"")+((n>0?n+" Hour"+(n>1?"s ":" "):"")+(d>0?d+" Minute"+(d>1?"s":""):""))}return e}showPricing(){return this.itineraryService.showPricing()}bookable(){return this.itineraryService.bookable()}multiAddition(){return this.supplierService.currentSupplier.settings.obeAddItems}selectExperience(){let e=this.experience.items.filter(i=>i.id===this.selectedItem)[0];this.experienceItemSelected.emit(e)}bookThisAsWell(){let e=this.experience.items.filter(i=>i.id===this.selectedItem)[0];this.bookAsWellSelected.emit(e)}addAnother(){let e=this.experience.items.filter(i=>i.id===this.selectedItem)[0];this.addAnotherSelected.emit(e)}isSelectedItem(){return this.experience.selected&&this.itineraryItemSelected.id==this.selectedItem}hasSelectedItem(){return this.itineraryItem.selectedItems&&this.itineraryItem.selectedItems.length>0}getTime(e){return(0,cn.default)(e).format("HH:mm")}usesWaitlisting(){return this.supplierService.currentSupplier.settings.useWaitlisting}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-experience-detail"]],inputs:{itinerary:"itinerary",itineraryItem:"itineraryItem",experience:"experience"},outputs:{experienceItemSelected:"experienceItemSelected",bookAsWellSelected:"bookAsWellSelected",addAnotherSelected:"addAnotherSelected",dateChange:"dateChange"},features:[pe],decls:25,vars:16,consts:[[1,"container","p-3"],[1,"row"],[1,"col-md"],[1,"opacity-4"],[1,"row","mb-3"],[3,"innerHtml"],[3,"photos","galleryId","usePreview"],[1,"row","mb-1"],[1,"col-md-4","text-right"],[1,"widget","search"],[3,"suggestionItineraryItem","selectedItem","supplierProduct","showDate","showLocation","suggestion"],[1,"col-4"],[1,"title","fw-600"],["icon","chevron-right"],[1,"btn","btn-primary",3,"click"],[1,"col-lg","my-auto","form-group"],[1,"fw-600"],[1,"col-6","col-lg-2","my-auto","fw-600","text-center","py-3","py-lg-0"],[1,"col","col-lg","my-auto","text-right","pt-3","pt-md-0"],["icon","clock"],[1,"form-control","custom-select",3,"ngModelChange","ngModel"],[3,"value"],[1,"title"],["icon","edit",3,"click"],["role","group",1,"btn-group"],[1,"btn","btn-primary","nowrap",3,"tooltip"],[1,"btn","btn-icon",3,"tooltip"],[1,"alert","alert-warning","text-center"],[1,"text-center","h5"],[1,"btn","btn-primary","nowrap",3,"click","tooltip"],[1,"btn","btn-icon",3,"click","tooltip"],["icon","check-circle"],[1,"col-lg"],[1,"alert","alert-success","text-center"],[1,"col-lg-4","text-center"],["tooltip","Add another experience to my itinerary",1,"btn","btn-primary",3,"click"],[1,"col-md","br"],[1,"d-md-none"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),c(4),r(),a(5,"p",3),c(6),r(),p(7,oo,3,0,"div",4),u(8,"div",5),r(),a(9,"div",2),u(10,"app-photo-gallery",6),r()(),u(11,"hr"),a(12,"div",7)(13,"div",2),p(14,ro,2,0,"h3"),r(),p(15,ao,3,0,"div",8),r(),a(16,"div",9),p(17,so,1,6,"app-experience-widget",10),p(18,vo,7,5,"div",1),r(),p(19,Io,6,1),p(20,wo,1,0,"hr"),u(2
11,"div",5),p(22,Eo,1,0,"hr"),p(23,Do,4,3,"div",1),u(24,"hr"),r()),i&2&&(o(4),S(n.experience.name),o(2),S(n.getTimingAndOwner()),o(),m(n.experience.categories?7:-1),o(),f("innerHtml",n.experience.description,R),o(2),f("photos",n.experience.photos)("galleryId",n.experience.id)("usePreview",!0),o(4),m((n.experience.items==null?null:n.experience.items.length)>1?14:-1),o(),m(n.showWidget?15:-1),o(2),m(n.showWidget?17:-1),o(),m(n.showWidget?-1:18),o(),m(n.experience.selected&&n.multiAddition()?19:-1),o(),m(n.experience.highlights?20:-1),o(),f("innerHtml",n.experience.highlights,R),o(),m(n.experience.whatsIncluded||n.experience.whatToBring||n.experience.whoShouldCome?22:-1),o(),m(n.experience.whatsIncluded||n.experience.whatToBring||n.experience.whoShouldCome?23:-1))},dependencies:[ue,$e,je,Ye,me,fe,ae,j,rt,Ue,Nt,Z],encapsulation:2})}}return t})();var Kt=ge(Ce(),1);var Fo=t=>({selected:t});function Vo(t,l){if(t&1&&(a(0,"div",12)(1,"p",13),u(2,"fa-icon",14),c(3),r()()),t&2){let e=l.$implicit;o(3),y(" ",e.productTypeSubCategory.name," ")}}function Lo(t,l){if(t&1&&(a(0,"div",6),w(1,Vo,4,1,"div",12,k),r()),t&2){let e=s();o(),E(e.experience.categories)}}function Ao(t,l){t&1&&u(0,"hr")}function Mo(t,l){t&1&&(a(0,"h5"),c(1,"Sorry, We don't have availability on this date"),r())}function Ho(t,l){if(t&1&&(a(0,"h5"),c(1),r()),t&2){let e=s(2);o(),y(" Sorry, We don't accept bookings over a maximum of ",e.experience.maxPaxPerBooking," people. Please contact us to arrange a larger group. ")}}function Ro(t,l){t&1&&(a(0,"p"),c(1," You can join our 'waitlist', where we will try and find space, and get back to you within 48 hours with confirmation. Alternatively, please choose from the closest available dates. "),r())}function Oo(t,l){if(t&1&&(a(0,"div",9),p(1,Mo,2,0,"h5"),p(2,Ho,2,1,"h5"),p(3,Ro,2,0,"p"),r()),t&2){let e=s();o(),m(e.experience.maxPaxPerBookingExceeded?-1:1),o(),m(e.experience.maxPaxPerBookingExceeded?2:-1),o(),m(e.usesWaitlisting()?3:-1)}}function Bo(t,l){if(t&1){let e=x();a(0,"button",16),C("click",function(){_(e);let n=s(2);return g(n.changeDate(n.experience.previousAvailableDate))}),c(1),r()}if(t&2){let e=s(2);o(),y(" ",e.getDate(e.experience.previousAvailableDate)," ")}}function No(t,l){if(t&1){let e=x();a(0,"button",16),C("click",function(){_(e);let n=s(2);return g(n.changeDate(n.experience.nextAvailableDate))}),c(1),r()}if(t&2){let e=s(2);o(),y(" ",e.getDate(e.experience.nextAvailableDate)," ")}}function Wo(t,l){if(t&1&&(a(0,"div",10)(1,"h5"),c(2,"Closest Available Dates"),r(),p(3,Bo,2,1,"button",15),p(4,No,2,1,"button",15),r()),t&2){let e=s();o(3),m(e.isDate(e.experience.previousAvailableDate)?3:-1),o(),m(e.isDate(e.experience.nextAvailableDate)?4:-1)}}function Yo(t,l){t&1&&(a(0,"p",5),c(1,"Discount"),r())}function $o(t,l){if(t&1&&(a(0,"h6",19),c(1),r()),t&2){let e=s(3);o(),S(e.experience.appliedDiscountName)}}function jo(t,l){t&1&&(a(0,"h3",21),c(1,"Free to Reserve"),r())}function Uo(t,l){if(t&1&&(a(0,"h3",21),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(4);o(),S(V(2,1,e.experience.price,e.currency))}}function zo(t,l){if(t&1&&(a(0,"div",20),p(1,jo,2,0,"h3",21)(2,Uo,3,4,"h3",21),r()),t&2){let e=s(3);o(),m(e.experience.price===0?1:2)}}function qo(t,l){if(t&1){let e=x();a(0,"button",24),C("click",function(){_(e);let n=s(4);return g(n.selectExperience())}),c(1),r()}if(t&2){let e=s(4);q(e.allSelected?"btn-icon":"btn-primary"),f("tooltip",e.experience.available?"Select this Experience":"We will contact you as soon as possible with confirmation"),o(),y(" ",e.experience.available?"SELECT":"JOIN WAITLIST"," ")}}function Go(t,l){t&1&&(a(0,"div",9),c(1,"WAITLISTED"),r())}function Xo(t,l){t&1&&(a(0,"div",23),u(1,"fa-icon",25),c(2," SELECTED"),r())}function Ko(t,l){if(t&1&&(a(0,"div",17),p(1,qo,2,4,"button",22),p(2,Go,2,0,"div",9),p(3,Xo,3,0,"div",23),r()),t&2){let e=s(3);o(),m(e.experience.selected?-1:1),o(),m(e.experience.selected&&!e.experience.available?2:-1),o(),m(e.experience.selected&&e.experience.available?3:-1)}}function Qo(t,l){if(t&1&&(a(0,"div",18)(1,"p",5),c(2,"Details"),r(),a(3,"h6",19),c(4,"Price includes all travellers"),r(),p(5,Yo,2,0,"p",5),p(6,$o,2,1,"h6",19),r(),p(7,zo,3,1,"div",20),p(8,Ko,4,3,"div",17)),t&2){let e=s(2);o(5),m(e.experience.appliedDiscountName?5:-1),o(),m(e.experience.appliedDiscountName?6:-1),o(),m(e.showPricing()?7:-1),o(),m(e.experience.items&&e.experience.items.length===1&&!e.experience.viewDetails&&e.bookable()?8:-1)}}function Zo(t,l){if(t&1){let e=x();a(0,"div",17)(1,"button",26),C("click",function(){_(e);let n=s(2);return g(n.viewExperience())}),c(2),r()()}if(t&2){let e=s(2);o(),q(e.allSelected?"btn-icon":"btn-primary"),o(),y(" ",e.experience.selected?"CHANGE TIME":e.experience.available||e.usesWaitlisting()?"VIEW / BOOK":"VIEW DETAILS"," ")}}function Jo(t,l){if(t&1&&(a(0,"div",11),p(1,Qo,9,4),p(2,Zo,3,3,"div",17),r()),t&2){let e=s();o(),m(e.experience.available||e.usesWaitlisting()?1:-1),o(),m(e.experience.items&&(e.experience.items.length>1||e.experience.viewDetails)?2:-1)}}var pn=(()=>{class t{constructor(){this.announcements=[],this.experienceSelected=new L,this.viewSelected=new L,this.dateChange=new L,this.itineraryService=T(M),this.supplierService=T(A)}get currency(){return this.supplierService.getSelectedCurrency()}getTimingAndOwner(){let e=this.experience.owner;if(this.experience.startTime&&(e+=(e!=""?" - ":"")+this.experience.startTime),this.experience.endTime&&(e+=(e!=""?" - ":"")+this.experience.endTime),this.experience.noHours!="0"){let i=+this.experience.noHours,n=Math.floor(i),d=Math.round(i%1*60);e+=(e!=""?" - ":"")+((n>0?n+" Hour"+(n>1?"s ":" "):"")+(d>0?d+" Minute"+(d>1?"s":""):""))}return e}showPricing(){return this.itineraryService.showPricing()}bookable(){return this.itineraryService.bookable()}selectExperience(){this.experienceSelected.emit(this.experience)}viewExperience(){this.viewSelected.emit(this.experience)}isDate(e){return(0,Kt.default)(e).isValid()}getDate(e){return(0,Kt.default)(e).format("DD MMM YYYY")}changeDate(e){this.dateChange.emit(e)}usesWaitlisting(){return this.supplierService.currentSupplier.settings.useWaitlisting}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-experience"]],inputs:{experience:"experience",allSelected:"allSelected",announcements:"announcements"},outputs:{experienceSelected:"experienceSelected",viewSelected:"viewSelected",dateChange:"dateChange"},decls:16,vars:15,consts:[[1,"row","product",3,"ngClass"],[1,"col-lg-5"],[3,"photos","galleryId","usePreview"],[1,"col-lg-7"],[1,"mt-3","mt-lg-0"],[1,"title"],[1,"row","mb-3"],[3,"innerHTML"],[3,"announcements"],[1,"alert","alert-warning","text-center"],[1,"text-center","mt-3"],[1,"row"],[1,"col-4"],[1,"title","fw-600"],["icon","chevron-right"],[1,"btn","btn-icon"],[1,"btn","btn-icon",3,"click"],[1,"col","text-right","my-auto"],[1,"col-4","d-none","d-md-block","my-auto"],[1,"data"],[1,"col","my-auto","text-right"],[1,"fw-600","mb-0"],[1,"btn",3,"class","tooltip"],[1,"text-right","h5"],[1,"btn",3,"click","tooltip"],["icon","check-circle"],[1,"btn",3,"click"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1),u(2,"app-photo-gallery",2),r(),a(3,"div",3)(4,"h4",4),c(5),r(),a(6,"p",5),c(7),r(),p(8,Lo,3,0,"div",6),u(9,"span",7)(10,"app-product-announcements",8),p(11,Ao,1,0,"hr"),p(12,Oo,4,3,"div",9),p(13,Wo,5,2,"div",10),u(14,"hr"),p(15,Jo,3,2,"div",11),r()()),i&2&&(f("ngClass",ne(13,Fo,n.experience.selected)),o(2),f("photos",n.experience.photos)("galleryId",n.experience.id)("usePreview",!0),o(3),S(n.experience.name),o(2),S(n.getTimingAndOwner()),o(),m(n.experience.categories?8:-1),o(),f("innerHTML",n.experience.description,R),o(),f("announcements",n.announcements),o(),m(n.experience.available?-1:11),o(),m(n.experience.available?-1:12),o(),m(!n.experience.available&&(n.isDate(n.experience.nextAvailableDate)||n.isDate(n.experience.previousAvailableDate))?13:-1),o(2),m(n.experience.available||n.usesWaitlisting()||n.experience.viewDetails?15:-1))},dependencies:[Fe,j,ae,rt,Ue,ze,Z],encapsulation:2})}}return t})();function er(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading Experiences"),r())}function tr(t,l){if(t&1){let e=x();a(0,"div",3)(1,"h6",8),C("click",function(){_(e);let n=s(3);return g(n.closeDetail())}),u(2,"fa-icon",9),c(3," Back to the other Experiences "),r()()}}function ir(t,l){if(t&1){let e=x();a(0,"div",10),C("click",function(){_(e);let n=s(3);return g(n.change())}),c(1,"Change"),r()}}function nr(t,l){if(t&1){let e=x();a(0,"div",10),C("click",function(){_(e);let n=s(3);return g(n.cancelChanges())}),c(1,"Cancel Changes"),r()}}function or(t,l){if(t&1&&(a(0,"div",7),u(1,"app-experience-widget",11),r()),t&2){let e=s(3);o(),f("suggestionItineraryItem",e.itineraryItem)("suggestion",!0)}}function rr(t,l){if(t&1&&(a(0,"div",1)(1,"div",2),p(2,tr,4,0,"div",3),a(3,"div",4)(4,"h6",5),c(5),p(6,ir,2,0,"div",6),p(7,nr,2,0,"div",6),r()()(),p(8,or,2,2,"div",7),r()
1),t&2){let e=s(2);o(2),m(e.viewExperience&&e.itineraryItem.products.length>1&&!e.showWidget?2:-1),o(3),y(" Search: ",e.getFakeWidgetText()," \xA0 \xA0 "),o(),m(e.showWidget?-1:6),o(),m(e.showWidget?7:-1),o(),m(e.showWidget?8:-1)}}function ar(t,l){if(t&1){let e=x();a(0,"div",2)(1,"div",14)(2,"h5",15),C("click",function(){_(e);let n=s(3);return g(n.closeDetail())}),u(3,"fa-icon",9),c(4),r()()()}if(t&2){let e=s(3);o(4),y(" ",e.multiAddition()?"Change / Select More":"Back to the Other"," Experiences ")}}function sr(t,l){t&1&&u(0,"hr")}function lr(t,l){if(t&1){let e=x();a(0,"app-experience-detail",16),C("experienceItemSelected",function(n){_(e);let d=s(3);return g(d.processExperienceItemSelection(n))})("bookAsWellSelected",function(n){_(e);let d=s(3);return g(d.processBookAsWellSelection(n))})("addAnotherSelected",function(){_(e);let n=s(3);return g(n.processAddAnotherSelection())}),r()}if(t&2){let e=s(3);f("experience",e.viewExperience)("itineraryItem",e.itineraryItem)("itinerary",e.itinerary)}}function cr(t,l){if(t&1){let e=x();a(0,"button",17),C("click",function(){_(e);let n=s(3);return g(n.closeDetail())}),c(1,"View all experiences"),r()}}function dr(t,l){t&1&&u(0,"fa-icon",26)}function pr(t,l){t&1&&u(0,"fa-icon",27)}function mr(t,l){if(t&1){let e=x();a(0,"a",22),C("click",function(){_(e);let n=s(5);return g(n.showFilter=!0)}),u(1,"fa-icon",25),c(2),p(3,dr,1,0,"fa-icon",26),p(4,pr,1,0,"fa-icon",27),r(),a(5,"span",23),c(6,"\xA0 "),r(),c(7,"\xA0 | "),a(8,"span",23),c(9,"\xA0 "),r(),c(10,"\xA0 ")}if(t&2){let e=s(5);o(2),y(" Filter ",(e.selectedProductTypeSubCategoryIds==null?null:e.selectedProductTypeSubCategoryIds.length)>0?" ("+e.selectedProductTypeSubCategoryIds.length+")":""," "),o(),m(e.showFilter?3:-1),o(),m(e.showFilter?-1:4)}}function ur(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(5);return g(n.sortByTime(!1))}),u(1,"fa-icon",26),r()}}function hr(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(5);return g(n.sortByTime(!0))}),u(1,"fa-icon",27),r()}}function _r(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(5);return g(n.sortByDuration(!1))}),u(1,"fa-icon",26),r()}}function gr(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(5);return g(n.sortByDuration(!0))}),u(1,"fa-icon",27),r()}}function Cr(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(5);return g(n.sortByPrice(!1))}),u(1,"fa-icon",26),r()}}function fr(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(5);return g(n.sortByPrice(!0))}),u(1,"fa-icon",27),r()}}function xr(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(6);return g(n.sortByCategory(!1))}),u(1,"fa-icon",26),r()}}function yr(t,l){if(t&1){let e=x();a(0,"a",28),C("click",function(){_(e);let n=s(6);return g(n.sortByCategory(!0))}),u(1,"fa-icon",27),r()}}function Sr(t,l){if(t&1){let e=x();c(0," \xA0 \xA0 "),a(1,"a",22),C("click",function(){_(e);let n=s(5);return g(n.sortCategory?n.sortByCategory(!0):n.sortByCategory(!1))}),c(2,"Category"),r(),p(3,xr,2,0,"a"),p(4,yr,2,0,"a")}if(t&2){let e=s(5);o(3),m(e.sortCategoryDesc?3:-1),o(),m(e.sortCategory?4:-1)}}function vr(t,l){if(t&1){let e=x();a(0,"mat-paginator",29),C("page",function(n){_(e);let d=s(5);return g(d.setPage(n))}),r()}if(t&2){let e=s(5);f("length",e.filteredItems.length)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("hidePageSize",!0)}}function Tr(t,l){if(t&1){let e=x();a(0,"div",18)(1,"div"),p(2,mr,11,3),a(3,"a",22),C("click",function(){_(e);let n=s(4);return g(n.sortDepartureTime?n.sortByTime(!0):n.sortByTime(!1))}),a(4,"span",23),c(5,"Departure"),r(),c(6," Time"),r(),p(7,ur,2,0,"a"),p(8,hr,2,0,"a"),a(9,"a",22),C("click",function(){_(e);let n=s(4);return g(n.sortDuration?n.sortByDuration(!0):n.sortByDuration(!1))}),c(10,"Duration"),r(),p(11,_r,2,0,"a"),p(12,gr,2,0,"a"),a(13,"a",22),C("click",function(){_(e);let n=s(4);return g(n.sortPrice?n.sortByPrice(!0):n.sortByPrice(!1))}),c(14,"Price"),r(),p(15,Cr,2,0,"a"),p(16,fr,2,0,"a"),p(17,Sr,5,2),r(),a(18,"div"),p(19,vr,1,4,"mat-paginator",24),r()()}if(t&2){let e=s(4);o(2),m(e.allCategories&&e.allCategories.length>0?2:-1),o(5),m(e.sortDepartureTimeDesc?7:-1),o(),m(e.sortDepartureTime?8:-1),o(3),m(e.sortDurationDesc?11:-1),o(),m(e.sortDuration?12:-1),o(3),m(e.sortPriceDesc?15:-1),o(),m(e.sortPrice?16:-1),o(),m((e.selectedProductTypeSubCategoryIds==null?null:e.selectedProductTypeSubCategoryIds.length)>0?17:-1),o(2),m((e.itineraryItem==null||e.itineraryItem.products==null?null:e.itineraryItem.products.length)>e.pageSize?19:-1)}}function Ir(t,l){if(t&1){let e=x();a(0,"div",31)(1,"label",35)(2,"input",36),C("change",function(n){_(e);let d=s(5);return g(d.updateSelectedProductTypeSubCategories(n))}),r(),c(3),r(),c(4," \xA0 "),r()}if(t&2){let e=l.$implicit,i=s(5);o(),f("for",mt(e.productTypeSubCategory.id)),o(),f("value",mt(e.productTypeSubCategory.id))("name",mt(e.productTypeSubCategory.id))("id",mt(e.productTypeSubCategory.id))("checked",i.selectedProductTypeSubCategoryIds&&i.selectedProductTypeSubCategoryIds.indexOf(e.productTypeSubCategory.id)!==-1?"checked":""),o(),y(" ",e.productTypeSubCategory.name," ")}}function wr(t,l){if(t&1){let e=x();a(0,"div",19)(1,"div",30),w(2,Ir,5,10,"div",31,k),r(),u(4,"hr"),a(5,"div",32)(6,"button",33),C("click",function(){_(e);let n=s(4);return g(n.saveFilter())}),c(7,"Save Filter"),r(),a(8,"button",34),C("click",function(){_(e);let n=s(4);return g(n.cancelFilter())}),c(9,"Cancel"),r()()()}if(t&2){let e=s(4);o(2),E(e.allCategories)}}function Er(t,l){if(t&1){let e=x();a(0,"app-experience",37),C("experienceSelected",function(n){_(e);let d=s(4);return g(d.processExperienceSelection(n))})("viewSelected",function(n){_(e);let d=s(4);return g(d.viewExperienceDetails(n))})("dateChange",function(n){_(e);let d=s(4);return g(d.processDateChange(n))}),r()}if(t&2){let e=l.$implicit,i=s(4);f("experience",e)("allSelected",i.itineraryItem.allSelected)("announcements",i.getProductAnnouncements(e.id))}}function br(t,l){if(t&1){let e=x();a(0,"div",21)(1,"mat-paginator",29),C("page",function(n){_(e);let d=s(4);return g(d.setPage(n))}),r()()}if(t&2){let e=s(4);o(),f("length",e.filteredItems.length)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("hidePageSize",!0)}}function kr(t,l){if(t&1&&(p(0,Tr,20,9,"div",18),p(1,wr,10,0,"div",19),w(2,Er,1,3,"app-experience",20,k),p(4,br,2,4,"div",21)),t&2){let e=s(3);m((e.itineraryItem==null||e.itineraryItem.products==null?null:e.itineraryItem.products.length)>5&&!e.showFilter?0:-1),o(),m(e.showFilter?1:-1),o(),E(e.paginatedItems),o(2),m((e.itineraryItem==null||e.itineraryItem.products==null?null:e.itineraryItem.products.length)>5&&(e.itineraryItem==null||e.itineraryItem.products==null?null:e.itineraryItem.products.length)>e.pageSize?4:-1)}}function Pr(t,l){if(t&1&&(p(0,ar,5,1,"div",2),p(1,sr,1,0,"hr"),p(2,lr,1,3,"app-experience-detail",12),p(3,cr,2,0,"button",13),p(4,kr,5,3)),t&2){let e=s(2);m(e.viewExperience&&e.itineraryItem.products.length>1&&!e.suggestion?0:-1),o(),m(e.viewExperience&&e.itineraryItem.products.length>1&&!e.suggestion?1:-1),o(),m(e.viewExperience?2:-1),o(),m(e.viewExperience&&e.itineraryItem.products.length>1?3:-1),o(),m(e.viewExperience?-1:4)}}function Dr(t,l){if(t&1&&(p(0,rr,9,5,"div",1),p(1,Pr,5,5)),t&2){let e=s();m(e.suggestion?0:-1),o(),m(e.showWidget?-1:1)}}var ht=(()=>
1{class t{constructor(){this.viewExperience=null,this.suggestion=!1,this.startWithAllExperiences=!1,this.productAnnouncements=[],this.closeModal=new L,this.itinerariesApi=T(Ve),this.itineraryService=T(M),this.supplierService=T(A),this.loading=!0,this.showFilter=!1,this.showWidget=!1,this.sortPrice=!0,this.sortCategory=!1,this.sortPriceDesc=!1,this.sortCategoryDesc=!1,this.sortDepartureTime=!1,this.sortDuration=!1,this.sortDepartureTimeDesc=!1,this.sortDurationDesc=!1,this.selectedProductTypeSubCategoryIds=[],this.pageSize=25,this.pageIndex=0}ngOnInit(){this.getProductCategories(),this.getExperiences(!0),this.subscription=this.itineraryService.itineraryChanged.subscribe(e=>{this.showWidget=!1,this.loading=!0,this.itineraryItem=e.items.filter(i=>i.id===this.itineraryItem.id)[0],this.suggestion&&(this.itineraryItem.products=[]),this.getExperiences(!0)})}getProductCategories(){this.supplierService.getSupplierProducts(B.Experience,!0).subscribe(e=>{this.allCategories=[],e.forEach(i=>{i.categories.forEach(n=>{this.allCategories.filter(d=>d.productTypeSubCategory.name==n.productTypeSubCategory.name).length==0&&this.allCategories.push(n)})}),this.allCategories.sort((i,n)=>n.productTypeSubCategory.name>i.productTypeSubCategory.name?-1:1)})}viewExperienceDetails(e){this.viewExperience=e}getFakeWidgetText(){return this.itineraryService.getFakeWidgetText(this.itineraryItem)}change(){this.cloneItineraryItem=Object.assign({},this.itineraryItem),this.showWidget=!0}cancelChanges(){this.itineraryItem=Object.assign({},this.cloneItineraryItem),this.showWidget=!1}sortBy(e){_e(this.filteredItems,e)}resetAllSort(){this.sortDuration=this.sortDurationDesc=this.sortDepartureTime=this.sortDepartureTimeDesc=this.sortPrice=this.sortPriceDesc=this.sortCategory=this.sortCategoryDesc=!1}sortByDuration(e){this.sortBy([e?"-noHours":"noHours","price"]),this.resetAllSort(),e?this.sortDurationDesc=!0:this.sortDuration=!0,this.paginateItems()}sortByTime(e){this.sortBy([e?"-startTime":"startTime","price"]),this.resetAllSort(),e?this.sortDepartureTimeDesc=!0:this.sortDepartureTime=!0,this.paginateItems()}sortByPrice(e){this.sortBy([e?"-price":"price","-startTime"]),this.resetAllSort(),e?this.sortPriceDesc=!0:this.sortPrice=!0,this.paginateItems()}sortByCategory(e){this.sortBy([e?"-category":"category","price"]),this.resetAllSort(),e?this.sortCategoryDesc=!0:this.sortCategory=!0,this.paginateItems()}getExperiences(e){!this.itineraryItem.products||this.itineraryItem.products.length<1?(this.loading=!0,this.supplierService.getExperiences(this.itineraryItem.id).subscribe(i=>{this.itineraryItem.products=i,this.processExperiences(e),this.itineraryItem.productTypeSubCategoryIds?.split(",").some(n=>n!=""&&n!=null)&&this.sortByCategory(!1),this.loading=!1})):(this.processExperiences(e),this.loading=!1)}processExperiences(e){this.itineraryItem.originSupplierLocation&&this.supplierService.currentSupplier.settings.showDestinationActivities&&(this.itineraryItem.products=this.itineraryItem.products.filter(n=>n.productLocations.some(d=>d.supplierLocation.id===this.itineraryItem.originSupplierLocation.id)));let i=null;if(this.itineraryItem.products.forEach(n=>{let d=n;this.itineraryItem.selectedItems&&this.itineraryItem.selectedItems.some(h=>h.supplierProductItemPrice.supplierProductItem.supplierProduct.id===d.id)&&(this.markSelected(d),i=d)}),this.itineraryItem.productTypeSubCategoryIds||(this.itineraryItem.productTypeSubCategoryIds=""),this.selectedProductTypeSubCategoryIds=this.itineraryItem.productTypeSubCategoryIds?.split(",").filter(n=>n!=""&&n!=null),this.getFilteredItems(),e&&(this.viewExperience||i)){let n=this.itineraryItem.products.filter(d=>d.id==(this.viewExperience?this.viewExperience.id:i.id))[0];n&&!this.startWithAllExperiences?(this.viewExperience=n,this.startWithAllExperiences=!1):this.closeDetail()}}getFilteredItems(){this.selectedProductTypeSubCategoryIds&&this.selectedProductTypeSubCategoryIds.length>0?(this.filteredItems=this.itineraryItem.products.filter(e=>e.selected||e.categories.some(i=>this.selectedProductTypeSubCategoryIds.includes(i.productTypeSubCategory.id))),this.filteredItems.forEac
1h(e=>{let i=e;i.category="",i.categories&&(i.category=i.categories.filter(n=>this.selectedProductTypeSubCategoryIds.includes(n.productTypeSubCategory.id))[0]?.productTypeSubCategory.name)})):this.filteredItems=this.itineraryItem.products,this.paginateItems()}setPage(e){this.paginateItems(e.pageIndex)}paginateItems(e=0){this.pageIndex=e,this.paginatedItems=this.filteredItems.slice(e*this.pageSize,(e+1)*this.pageSize)}updateSelectedProductTypeSubCategories(e){e.target.checked?this.selectedProductTypeSubCategoryIds.indexOf(e.target.name)<0&&this.selectedProductTypeSubCategoryIds.push(e.target.name):this.selectedProductTypeSubCategoryIds.indexOf(e.target.name)>-1&&this.selectedProductTypeSubCategoryIds.splice(this.selectedProductTypeSubCategoryIds.indexOf(e.target.name),1),this.getFilteredItems(),this.selectedProductTypeSubCategoryIds.some(i=>i!=""&&i!=null)?this.sortByCategory(!1):this.sortByPrice(!1)}cancelFilter(){this.selectedProductTypeSubCategoryIds=this.itineraryItem.productTypeSubCategoryIds?.split(",").filter(e=>e!=""&&e!=null),this.showFilter=!1}saveFilter(){this.loading=!0;var e="";this.selectedProductTypeSubCategoryIds&&this.selectedProductTypeSubCategoryIds.forEach(i=>{e+=i+","}),this.itineraryItem.productTypeSubCategoryIds=e,this.itineraryService.saveItineraryItem(this.itineraryItem).subscribe(i=>{this.loading=!1,this.showFilter=!1})}processExperienceSelection(e){this.loading=!0,this.itinerariesApi.addToCart({itineraryItemId:this.itineraryItem.id,supplierProductItemId:e.items[0].id}).pipe(te(1)).subscribe(i=>{this.loading=!1,this.itineraryService.productSelected(i,this.itineraryItem,e,e.items[0])})}processExperienceItemSelection(e){this.loading=!0,this.itineraryItem.suggestion&&(this.itinerary.items.filter(i=>i.id==this.itineraryItem.id)[0].products=[]),this.itinerariesApi.addToCart({itineraryItemId:this.itineraryItem.id,supplierProductItemId:e.id}).subscribe(i=>{this.loading=!1,this.itineraryService.productSelected(i,this.itineraryItem,e.supplierProduct,e)})}processBookAsWellSelection(e){this.loading=!0;var i=this.itineraryService.duplicateItineraryItem(this.itinerary,this.itineraryItem);this.itineraryService.addToCartItinerary(this.itinerary.id,i,e.id).subscribe(n=>{this.loading=!1,i.id=n.items.filter(d=>!this.itinerary.items.map(h=>h.id).includes(d.id))[0].id,this.itineraryService.productSelected(n,i,e.supplierProduct,e)})}processAddAnotherSelection(){this.loading=!0;var e=this.itineraryService.duplicateItineraryItem(this.itinerary,this.itineraryItem);this.itineraryService.addItineraryItemToItinerary(this.itinerary.id,e).subscribe(i=>{this.loading=!1,e.id=i.items.filter(n=>!this.itinerary.items.map(d=>d.id).includes(n.id))[0].id,this.itineraryService.productSelected(i,e,null,null)})}processDateChange(e){this.itineraryItem.fromDate=e,this.itineraryItem.products=null,this.itineraryService.saveItineraryItem(this.itineraryItem).subscribe(i=>{this.itineraryService.productSelected(i,this.itineraryItem,null,null)})}markSelected(e){for(let i of this.itineraryItem.products)i.selected=!1;this.itineraryItem.allSelected=e.selected=!0,this.itineraryItem.products.sort((i,n)=>+n.selected-+i.selected)}closeDetail(){this.viewExperience=null}multiAddition(){return this.supplierService.currentSupplier.settings.obeAddItems}getProductAnnouncements(e){return this.productAnnouncements.filter(i=>i.productId===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-experiences"]],inputs:{itinerary:"itinerary",itineraryItem:"itineraryItem",viewExperience:"viewExperience",suggestion:"suggestion",startWithAllExperiences:"startWithAllExperiences",productAnnouncements:"productAnnouncements"},outputs:{closeModal:"closeModal"},decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[1,"sticky-top","white-back","border","p-3","mb-2"],[1,"row"],[1,"col-sm","my-auto"],[1,"col-sm","text-right"],[1,"mb-0"],[1,"btn","btn-primary","btn-sm"],[1,"widget","search","mt-2"],[1,"pointer","mb-0",3,"click"],["icon","arrow-circle-left"],[1,"btn","btn-primary","btn-sm",3,"click"],[3,"suggestionItineraryItem","suggestion"],[3,"experience","itineraryItem","itinerary"],[1,"ml-3","mb-4","btn","btn-icon"],[1,"col-sm","offset-1"],[1,"otherHotels",3,"click"],[3,"experienceItemSelected","bookAsWellSelected","addAnotherSelected","experience","itineraryItem","itinerary"],[1,"ml-3","mb-4","btn","btn-icon",3,"click"],[1,"filter","d-flex","align-items-center","justify-content-between","nowrap"],[1,"filter"],[3,"experience","allSelected","announcements"],[1,"filter","d-flex","justify-content-end"],[1,"pointer",3,"click"],[1,"d-none","d-sm-inline-block"],[3,"length","pageSize","pageIndex","hidePageSize"],["icon","filter",1,"d-none","d-sm-inline-block"],["icon","caret-up"],["icon","caret-down"],[3,"click"],[3,"page","length","pageSize","pageIndex","hidePageSize"],[1,"row","mt-3"],[1,"col-sm-6","col-md-4","text-left","nowrap"],[1,"mb-2"],[1,"btn","btn-primary",3,"click"],[1,"btn","btn-icon",3,"click"],[1,"form-check","position-relative","d-inline-block",3,"for"],["type","checkbox",1,"form-check-input","pointer",3,"change","value","name","id","checked"],[3,"experienceSelected","viewSelected","dateChange","experience","allSelected","announcements"]],template:function(i,n){i&1&&(p(0,er,3,0,"h2",0),p(1,Dr,2,2)),i&2&&(m(n.loading?0:-1),o(),m(n.loading?-1:1))},dependencies:[ue,Zi,Qi,dn,pn,N,j,Nt],styles:[".otherHotels[_ngcontent-%COMP%]{cursor:pointer;text-align:center;padding-top:15px;
1margin-bottom:-5px}"]})}}return t})();function Fr(t,l){if(t&1){let e=x();a(0,"div",6)(1,"div",9)(2,"label",16),c(3),r(),a(4,"input",17),X("ngModelChange",function(n){_(e);let d=s();return z(d.extra.customMessage,n)||(d.extra.customMessage=n),g(n)}),r()()()}if(t&2){let e=s();o(3),S(e.extra.customTextBox),o(),G("ngModel",e.extra.customMessage)}}function Vr(t,l){if(t&1&&(a(0,"option",11),c(1),r()),t&2){let e=l.$implicit;f("value",e),o(),S(e)}}function Lr(t,l){if(t&1&&(u(0,"hr"),a(1,"h4",8),c(2),F(3,"convertCurrency"),r()),t&2){let e=s();o(2),y(" ",V(3,1,e.extra.selected===0?e.extra.price:e.extra.price*e.extra.selected,e.currency)," ")}}function Ar(t,l){if(t&1&&(a(0,"option",11),c(1),r()),t&2){let e=l.$implicit;f("value",e),o(),S(e)}}function Mr(t,l){if(t&1&&(a(0,"div",15)(1,"p",8),c(2,"Price"),r(),a(3,"h3",8),c(4),F(5,"convertCurrency"),r()()),t&2){let e=s();o(4),y(" ",V(5,1,e.extra.selected===0?e.extra.price:e.extra.price*e.extra.selected,e.currency)," ")}}var mn=(()=>{class t{constructor(){this.noItems=[],this.itineraryService=T(M),this.supplierService=T(A)}ngOnInit(){let e=this.extra.minimumItems,i=this.extra.multipleAddition?100:1;e||(e=this.extra.autoAdd||this.extra.compulsory?1:0),e>0&&!this.extra.compulsory&&this.noItems.push(0),e>i&&(e=i);for(let d=e;d<=i;d++)this.noItems.push(d);this.extra.selected=this.noItems[0];let n=this.getConnectedExtraItineraryItem();n&&(this.extra.selected=n.quantity,this.extra.customMessage=n.notes)}get currency(){return this.supplierService.getSelectedCurrency()}showPricing(){return this.itineraryService.showPricing()}getConnectedExtraItineraryItem(){return this.itinerary.items.filter(e=>e.productType.id===B.Extra&&e.selectedItems&&e.selectedItems[0].supplierProductItemPrice.supplierProductItem.supplierProduct.id===this.extra.id)[0]}onChange(e){this.extra.selected=e,this.itineraryService.recalculatePrices()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-extra"]],inputs:{extra:"extra",itinerary:"itinerary"},decls:28,vars:12,consts:[[1,"row","extra"],[1,"col-lg-3","col-4"],[3,"photos","galleryId","usePreview"],[1,"col-lg-6","col-8"],[1,"mt-3","mt-md-0"],[3,"innerHTML"],[1,"widget","search","no-icons"],[1,"col-lg-3","d-none","d-lg-block"],[1,"fw-600"],[1,"form-group"],[1,"form-control","noLabel","custom-select",3,"ngModelChange","ngModel"],[3,"value"],[1,"col-lg-3","d-lg-none"],[1,"row"],[1,"col"],[1,"col","my-auto","text-center"],["for","customTextBox"],["type","text",1,"form-control",3,"ngModelChange","ngModel"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1),u(2,"app-photo-gallery",2),r(),a(3,"div",3)(4,"h6",4),c(5),r(),u(6,"div",5),p(7,Fr,5,2,"div",6),r(),a(8,"div",7)(9,"p",8),c(10),r(),a(11,"div",6)(12,"div",9)(13,"select",10),X("ngModelChange",function(h){return z(n.extra.selected,h)||(n.extra.selected=h),h}),C("ngModelChange",function(h){return n.onChange(h)}),w(14,Vr,2,2,"option",11,k),r()()(),p(16,Lr,4,4),r(),a(17,"div",12)(18,"div",13)(19,"div",14)(20,"p",8),c(21),r(),a(22,"div",6)(23,"div",9)(24,"select",10),X("ngModelChange",function(h){return z(n.extra.selected,h)||(n.extra.selected=h),h}),C("ngModelChange",function(h){return n.onChange(h)}),w(25,Ar,2,2,"option",11,k),r()()()(),p(27,Mr,6,4,"div",15),r()()()),i&2&&(o(2),f("photos",n.extra.photos)("galleryId",n.extra.id)("usePreview",!0),o(3),S(n.extra.name),o(),f("innerHTML",n.extra.description,R),o(),m(n.extra.customTextBox?7:-1),o(3),S(n.extra.customLabel?n.extra.customLabel:"How Many?"),o(3),G("ngModel",n.extra.selected),o(),E(n.noItems),o(2),m(n.showPricing()?16:-1),o(5),S(n.extra.customLabel?n.extra.customLabel:"How Many?"),o(3),G("ngModel",n.extra.selected),o(),E(n.noItems),o(2),m(n.showPricing()?27:-1))},dependencies:[ue,$e,je,We,Ye,me,fe,ae,Z],styles:[".extra[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:20px;border-bottom:1px solid #f4f4f4;margin-bottom:10px}"]})}}return t})();function Hr(t,l){if(t&1&&u(0,"app-extra",7),t&2){let e=l.$implicit,i=s();f("extra",e)("itinerary",i.itinerary)}}var un=(()=>{class t{constructor(){this.noThanksSelected=new L,this.itineraryService=T(M)}ngOnInit(){}save(){let e=[];this.itineraryItem.extras.filter(i=>i.selected>
10).forEach(i=>{e.push({selected:i.selected,supplierProductItemId:i.items[0].id,customMessage:i.customMessage})}),this.itineraryService.addExtras(this.itineraryItem.itineraryId,this.itineraryItem.id,e).subscribe(i=>{this.itineraryService.productSelected(i,null,null,null)})}noThanks(){this.noThanksSelected.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-extras"]],inputs:{itineraryItem:"itineraryItem",itinerary:"itinerary",showNoThanks:"showNoThanks"},outputs:{noThanksSelected:"noThanksSelected"},decls:13,vars:1,consts:[[1,"sticky-top","white-back","p-2","mt-0"],[1,"row"],[1,"col","my-auto"],[1,"m-0"],[1,"col","text-right"],[1,"btn","btn-primary",3,"click"],[1,"btn","btn-icon",3,"click"],[3,"extra","itinerary"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h4",3),c(4,"Add Extras"),r()(),a(5,"div",4)(6,"div",5),C("click",function(){return n.save()}),c(7,"Save Extras"),r(),a(8,"div",6),C("click",function(){return n.noThanks()}),c(9),r()()(),u(10,"hr"),r(),w(11,Hr,1,2,"app-extra",7,k)),i&2&&(o(9),S(n.showNoThanks?"No Thanks":"Close"),o(2),E(n.itineraryItem.extras))},dependencies:[mn],encapsulation:2})}}return t})();var hn=ge(Ce(),1);function Rr(t,l){if(t&1&&(a(0,"div",9)(1,"p",10),c(2),F(3,"date"),r(),a(4,"div",11),u(5,"input",12),c(6,"\xA0 "),r()()),t&2){let e=l.$index,i=s(2);o(2),S(V(3,2,i.fee.items[e].theDate,i.DateFormatEnum.AbbreviatedMonthDateForPipe)),o(3),f("formControlName",e)}}function Or(t,l){if(t&1&&(a(0,"div",5)(1,"div",7)(2,"div",8),w(3,Rr,7,5,"div",9,k),r()()()),t&2){let e=s();o(3),E(e.supplierProductItemCheckboxes.controls)}}function Br(t,l){if(t&1&&(a(0,"div",5)(1,"div",7)(2,"div",5)(3,"div",13)(4,"div",14)(5,"label"),c(6,"Adults"),r(),u(7,"input",15),a(8,"h5",16),c(9),a(10,"span",17),c(11),r()()()(),a(12,"div",13)(13,"div",14)(14,"label"),c(15,"Children"),r(),u(16,"input",18),a(17,"h5",16),c(18),a(19,"span",17),c(20),r()()()(),a(21,"div",13)(22,"div",14)(23,"label"),c(24,"Residents"),r(),u(25,"input",19),a(26,"h5",16),c(27),a(28,"span",17),c(29),r()()()(),a(30,"div",13)(31,"div",14)(32,"label"),c(33,"Child Residents"),r(),u(34,"input",20),a(35,"h5",16),c(36),a(37,"span",17),c(38),r()()()(),a(39,"div",13)(40,"div",14)(41,"label"),c(42,"Infants"),r(),u(43,"input",21),a(44,"h5",16),c(45),a(46,"span",17),c(47),r()()()()(),a(48,"div",13)(49,"div",14)(50,"label"),c(51,"Teens"),r(),u(52,"input",22),a(53,"h5",16),c(54),a(55,"span",17),c(56),r()()()(),a(57,"div",13)(58,"div",14)(59,"label"),c(60,"Teen Residents"),r(),u(61,"input",23),a(62,"h5",16),c(63),a(64,"span",17),c(65),r()()()()(),a(66,"div",24)(67,"h2",25),c(68),a(69,"span",26),c(70),r()()()()),t&2){let e=s();o(9),y(" ",e.totalFeeForAdults," "),o(2),S(e.currencyName),o(7),y(" ",e.totalFeeForChildren," "),o(2),S(e.currencyName),o(7),y(" ",e.totalFeeForAdultsRes," "),o(2),S(e.currencyName),o(7),y(" ",e.totalFeeForChildrenRes," "),o(2),S(e.currencyName),o(7),y(" ",e.totalFeeForInfants," "),o(2),S(e.currencyName),o(7),y(" ",e.totalFeeForTeens," "),o(2),S(e.currencyName),o(7),y(" ",e.totalFeeForTeensRes," "),o(2),S(e.currencyName),o(3),y(" ",e.total," "),o(2),S(e.currencyName)}}var _n=(()=>{class t{constructor(){this.totalChanged=new L,this.totalFeeForAdults=0,this.totalFeeForChildren=0,this.totalFeeForAdultsRes=0,this.totalFeeForChildrenRes=0,this.totalFeeForInfants=0,this.totalFeeForTeens=0,this.totalFeeForTeensRes=0,this.total=0,this.loading=!0,this.DateFormatEnum=At,this.supplierService=T(A),this.fb=T(Li)}ngOnInit(){this.initForm()}initForm(){let e=this.itineraryItems.find(i=>i.productType.id===B.Fee&&i.linkedFee.id===this.fee.parkFee.id);console.log(this.fee),this.theForm=this.fb.group({adults:[e.adults],adultsRes:[e.adultsRes],children:[e.children],childrenRes:[e.childrenRes],infants:[e.infants],teens:[0],teensRes:[0],supplierProductItemCheckboxes:this.fb.array(this.fee.items.sort((i,n)=>i.theDate.toString().localeCompare(n.theDate.toString())).map(({id:i})=>new wi(e.selectedItems.map(n=>n.supplierProductItemPrice.supplierProductItem.id).includes(i))))}),this.fee.adults=e.adults,this.fee.adultsRes=e.adultsRes,this.fee.children=e.children,this.fee.childrenRes=e.childrenRes,this.fee.infants=e.infants,this.fee.teens=0,this.fee.teensRes=0,this.fee.supplierProductItemIds=e.selectedItems.map(i=>i.supplierProductItemPrice.supplierProductItem.id),this.calculateTotals(),this.loading=!1,this.theForm.valueChanges.subscribe(i=>{this.updateFee(i),this.calculateTotals()})}get currencyName(){return this.supplierService.getSelectedCurrency().name}get supplierProductItemCheckboxes(){return this.theForm.get("supplierProductItemCheckboxes")}updateFee(e){this.fee.adults=e.adults,this.fee.adultsRes=e.adultsRes,this.fee.children=e.children,this.fee.childrenRes=e.childrenRes,this.fee.infants=e.infants,this.fee.teens=e.teens,this.fee.teensRes=e.teensRes,this.fee.supplierProductItemIds=this.fee.items.filter((i,n)=>this.supplierProductItemCheckboxes.value[n]).map(({id:i})=>i)}convertCurrency(e){return this.supplierService.convertSelectedCurrency(e)}calculateTotals(){this.totalFeeForAdults=0,this.totalFeeForChildren=0,this.totalFeeForAdultsRes=0,this.totalFeeForChildrenRes=0,this.totalFeeForInfants=0,this.totalFeeForTeens=0,this.totalFeeForTeensRes=0,this.total=0;let e=this.supplierProductItemCheckboxes.value,{adults:i,children:n,adultsRes:d,childrenRes:h,infants:I,teens:D,teensRes:U}=this.theForm.value;
1this.fee.items.forEach((H,Ee)=>{if(!e[Ee])return;let Ge=this.fee.parkFee.parkFeeGenerators.filter(oe=>(0,hn.default)(H.theDate).isBetween(oe.validFrom,oe.validTo,"day","[]")),{adultsSum:Y,childrenSum:ee,adultsResSum:J,childrenResSum:re,infantsSum:Oe,teensSum:O,teensResSum:Xe}=Ge.reduce((oe,K)=>({adultsSum:oe.adultsSum+K.adult,childrenSum:oe.childrenSum+K.child,adultsResSum:oe.adultsResSum+K.adultRes,childrenResSum:oe.childrenResSum+K.childRes,infantsSum:oe.infantsSum+K.infant,teensSum:oe.teensSum+K.teen,teensResSum:oe.teensResSum+K.teenRes}),{adultsSum:0,childrenSum:0,adultsResSum:0,childrenResSum:0,infantsSum:0,teensSum:0,teensResSum:0});this.totalFeeForAdults+=parseFloat(this.convertCurrency(i*Y)),this.totalFeeForChildren+=parseFloat(this.convertCurrency(n*ee)),this.totalFeeForAdultsRes+=parseFloat(this.convertCurrency(d*J)),this.totalFeeForChildrenRes+=parseFloat(this.convertCurrency(h*re)),this.totalFeeForInfants+=parseFloat(this.convertCurrency(I*Oe)),this.totalFeeForTeens+=parseFloat(this.convertCurrency(D*O)),this.totalFeeForTeensRes+=parseFloat(this.convertCurrency(U*Xe))});let b=this.totalFeeForAdults+this.totalFeeForChildren+this.totalFeeForAdultsRes+this.totalFeeForChildrenRes+this.totalFeeForInfants+this.totalFeeForTeens+this.totalFeeForTeensRes;this.total=parseFloat(this.convertCurrency(b)),this.totalChanged.emit(this.total)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-fee"]],inputs:{fee:"fee",itineraryItems:"itineraryItems"},outputs:{totalChanged:"totalChanged"},decls:11,vars:5,consts:[[1,"row","extra"],[1,"col-12"],[1,"mt-2"],[3,"formGroup"],[1,"widget","search","no-icons"],[1,"row"],[1,"mt-1"],[1,"col-lg-9"],["formArrayName","supplierProductItemCheckboxes",1,"row"],[1,"col","booking","mt-0","p-1","pl-3"],[1,"title"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"formControlName"],[1,"col-lg"],[1,"form-group"],["type","number","min","0","max","100","formControlName","adults",1,"form-control"],[1,"text-center","mt-2"],[1,"v-sm"],["type","number","min","0","max","100","formControlName","children",1,"form-control"],["type","number","min","0","max","100","formControlName","adultsRes",1,"form-control"],["type","number","min","0","max","100","formControlName","childrenRes",1,"form-control"],["type","number","min","0","max","100","formControlName","infants",1,"form-control"],["type","number","min","0","max","100","formControlName","teens",1,"form-control"],["type","number","min","0","max","100","formControlName","teensRes",1,"form-control"],[1,"col-lg-3"],[1,"text-center","mt-3"],[1,"sm"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"h4",2),c(3),r(),a(4,"p"),c(5),r(),a(6,"form",3)(7,"div",4),p(8,Or,5,0,"div",5),p(9,Br,71,16,"div",5),r()()()(),u(10,"hr",6)),i&2&&(o(3),S(n.fee.name),o(2),S(n.fee.description),o(),f("formGroup",n.theForm),o(2),m(n.supplierProductItemCheckboxes.controls.length?8:-1),o(),m(n.loading?-1:9))},dependencies:[Ht,Ei,We,bi,Ne,me,Ii,Vi,Fi,Di,Pi,ki,Ft],encapsulation:2})}}return t})();var Nr=(t,l)=>l.id;function Wr(t,l){if(t&1){let e=x();a(0,"app-fee",8),C("totalChanged",function(n){let d=_(e).$implicit,h=s();return g(h.onFeeTotalChanged(d,n))}),r()}if(t&2){let e=l.$implicit,i=s();f("fee",e)("itineraryItems",i.itinerary.items)}}function Yr(t,l){if(t&1&&(a(0,"div",1)(1,"div",9)(2,"h2",10),c(3,"Fee Total :"),r()(),a(4,"div",11)(5,"h2",12),c(6),a(7,"span",13),c(8),r()()()()),t&2){let e=s();o(6),y("",e.total," "),o(2),S(e.currency)}}var gn=(()=>{class t{constructor(){this.noThanksSelected=new L,this.totalsByFeeId=new Map,this.itineraryService=T(M),this.supplierService=T(A)}get currency(){return this.supplierService.getSelectedCurrency().name}get loading(){return this.itineraryItem.fees.some(e=>e.loading)}onSave(){let e=this.itineraryItem.fees.map(i=>({adults:i.adults,children:i.children,infants:i.infants,adultsRes:i.adultsRes,childrenRes:i.childrenRes,infantsRes:i.infantsRes,teens:i.teens,teensRes:i.teensRes,supplierProductItemIds:i.supplierProductItemIds||[],parkFeeId:i.parkFee.id}));this.itineraryService.addFees(this.itineraryItem.itineraryId,this.itineraryItem.id,e).subscribe(i=>{this.itineraryService.productSelected(i,null,null,null)})}onNoThanks(){this.noThanksSelected.emit()}convertCurrency(e){return this.supplierService.convertSelectedCurrency(e)}onFeeTotalChanged(e,i){this.totalsByFeeId.set(e.id,i),this.updateTotal()}updateTotal(){let e=Array.from(this.totalsByFeeId.values()).reduce((i,n)=>i+n,0);this.total=parseFloat(this.convertCurrency(e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-fees"]],inputs:{itineraryItem:"itineraryItem",itinerary:"itinerary",showNoThanks:"showNoThanks"},outputs:{noThanksSelected:"noThanksSelected"},decls:15,vars:2,consts:[[1,"sticky-top","white-back","p-2","mt-0"],[1,"row"],[1,"col","my-auto"],[1,"m-0"],[1,"col","text-right"],[1,"btn","btn-primary",3,"click"],[1,"btn","btn-icon",3,"click"],[3,"fee","itineraryItems"],[3,"totalChanged","fee","itineraryItems"],[1,"col-lg-9"],[1,"text-lg-right","text-center","mt-3"],[1,"col-lg","nowrap"],[1,"text-center","mt-3"],[1,"sm"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h4",3),c(4,"Manage Fees"),r()(),a(5,"div",4)(6,"div",5),C("click",function(){return n.onSave()}),c(7,"Save Fees"),r(),a(8,"div",6),C("click",function(){return n.onNoThanks()}),c(9),r()()(),u(10,"hr"),r(),w(11,Wr,1,2,"app-fee",7,Nr),p(13,Yr,9,2,"div",1),u(14,"hr")),i&2&&(o(9),S(n.showNoThanks?"No Thanks":"Close"),o(2),E(n.itineraryItem.fees),o(2),m(n.loading?-1:13))},dependencies:[_n],encapsulation:2})}}return t})();var $r=t=>({selected:t});function jr(t,l){if(t&1&&(a(0,"div",13)(1,"h4",14),c(2),a(3,"small"),c(4),r()(),a(5,"p",6),c(6,"per adult"),r()()),t&2){let e=s();o(2),y(" ",e.getInteger(e.convertCurrency(e.flight.price))),o(2),Q("",e.getDecimal(e.convertCurrency(e.flight.price))," ",e.getCurrency())}}function Ur(t,l){if(t&1&&(a(0,"div",13)(1,"h4",14),c(2),a(3,"small"),c(4),r()(),a(5,"p",6),c(6,"Total Price"),r()()),t&2){let e=s();o(2),y(" ",e.getInteger(e.convertCurrency(e.flight.priceTotal))),o(2),Q("",e.getDecimal(e.convertCurrency(e.flight.priceTotal))," ",e.getCurrency())}}function zr(t,l){if(t&1&&(a(0,"div",13)(1,"h4",14)(2,"del"),c(3),r(),a(4,"small"),c(5),r()(),a(6,"p",6),c(7,"One Way"),r()()),t&2){let e=s();o(3),S(e.getInteger(e.convertCurrency(e.flight.priceTotal))),o(2),Q("",e.getDecimal(e.convertCurrency(e.flight.priceTotal))," ",e.getCurrency())}}function qr(t,l){if(t&1&&(a(0,"div",13)(1,"h4",14),c(2),a(3,"small"),c(4),r()(),a(5,"p",6),c(6,"Return"),r()()),t&2){let e=s();o(2),y(" ",e.getInteger(e.convertCurrency(e.flight.priceDiscountedReturn))),o(2),Q("",e.getDecimal(e.convertCurrency(e.flight.priceDiscountedReturn))," ",e.getCurrency())}}function Gr(t,l){t&1&&u(0,"app-spinner")}function Xr(t,l){if(t&1){let e=x();a(0,"button",17),C("click",function(){_(e);let n=s(2);return n.flightSelecting=!0,g(n.selectFlight())}),p(1,Gr,1,0,"app-spinner"),c(2),r()}if(t&2){let e=s(2);q(e.flightSelecting?"btn-primary-outline":"btn-primary"),f("disabled",e.flightSelecting),o(),m(e.flightSelecting?1:-1),o(),y(" ",e.flightSelecting?"Selecting":"Select"," ")}}function Kr(t,l){t&1&&(a(0,"div",16)(1,"h5"),u(2,"fa-icon",18),r(),a(3,"h5"),c(4,"SELECTED"),r()())}function Qr(t,l){if(t&1&&(a(0,"div",3),p(1,Xr,3,5,"button",15),p(2,Kr,5,0,"div",16),r()),t&2){let e=s();o(),m(e.flight.selected?-1:1),o(),m(e.flight.selected?2:-1)}}var Cn=(()=>{class t{constructor(){this.flightSelected=new L,this.announcements=[],this.flightSelecting=!1,this.itineraryService=T(M),this.supplierService=T(A)}ngOnInit(){}selectFlight(){this.flightSelected.emit(this.flight)}getDuration(){return this.itineraryService.getDuration(this.flight.departureTime,this.flight.arrivalTime)}getImageUrl(e){return this.supplierService.getImageUrl(e,!0,!0)}getInteger(e){return Math.trunc(e)}getDecimal(e){let i=e%1;return i>0?i.toFixed(2).substring(1):""}convertCurrency(e){return this.supplierService.convertSelectedCurrency(e)}getCurrency(){return this.supplierService.getSelectedCurrency().name}showPricing(){return this.itineraryService.showPricing()}bookable(){return this.itineraryService.bookable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-flight"]],inputs:{flight:"flight",announcements:"announcements"},outputs:{flightSelected:"flightSelected"},decls:30,vars:14,consts:[[1,"row","product","selectable",3,"ngClass"],[1,"col-lg"],[1,"row","nowrap"],[1,"col","my-auto","text-center"],[1,"w-100",3,"src"],[1,"col","my-auto"],[1,"mb-0","title"],["icon","plane-departure"],[1,"col","my-auto","d-lg-inline-block","d-none"],["icon","stopwatch"],["icon","plane-arrival"],[1,"col-lg-6"],[1,"row"],[1,"col","nowrap","my-auto","text-center"],[1,"mt-2","mb-0"],[1,"btn",3,"class","disabled"],[1,"text-center","nowrap"],[1,"btn",3,"click","disabled"],["icon","check-circle"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),u(4,"img",4)(5,"BR"),c(6),r(),a(7,"div",5)(8,"p",6),c(9,"Check In"),r(),c(10),r(),a(11,"div",5),u(12,"fa-icon",7)(13,"BR"),c(14),r(),a(15,"div",8),u(16,"fa-icon",9)(17,"BR"),c(18),r(),a(19,"div",5),u(20,"fa-icon",10)(21,"BR"),c(22),r()()(),a(23,"div",11)(24,"div",12),p(25,jr,7,3,"div",13),p(26,Ur,7,3,"div",13),p(27,zr,8,3,"div",13),p(28,qr,7,3,"div",13),p(29,Qr,3,2,"div",3),r()()()),i&2&&(f("ngClass",ne(12,$r,n.flight.selected)),o(4),f("src",n.getImageUrl(n.flight.owner.logo),ke),o(2),y("",n.flight.name," "),o(4),y(" ",n.flight.checkInTime," "),o(4),S(n.flight.departureTime),o(4),y("",n.getDuration()," "),o(4),S(n.flight.arrivalTime),o(3),m(n.showPricing()?25:-1),o(),m(!(n.flight.returnPrice&&n.flight.priceDiscountedReturn<n.flight.priceTotal)&&n.showPricing()?26:-1),o(),m(n.flight.returnPrice&&n.flight.priceDiscountedReturn<n.flight.priceTotal&&n.showPricing()?27:-1),o(),m(n.flight.returnPrice&&n.flight.priceDiscountedReturn<n.flight.priceTotal&&n.showPricing()?28:-1),o(),m(n.bookable()?29:-1))},dependencies:[Fe,j,N],styles:[".ng-fa-icon[_ngcontent-%COMP%]{padding-right:8px}.row[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px}"]})}}return t})();var qe=ge(Ce(),1);function Zr(t,l){t&1&&(a(0,"h3",0),u(1,"app-spinner"),c(2," Loading Flights"),r())}function Jr(t,l){if(t&1&&(u(0,"br",13),c(1," from "),u(2,"br",13),a(3,"span",10),c(4),F(5,"convertCurrency"),r()),t&2){let e=s(4);o(4),S(V(5,1,e.flightSuggestion1.flightFromPrice,e.currency))}}function ea(t,l){if(t&1&&(a(0,"p",9)(1,"span",10),c(2),r(),c(3),p(4,Jr,6,4),r()),t&2){let e=s(3);o(2),S(e.flightSuggestion1.flightCount),o(),y(" flight",e.flightSuggestion1.flightCount>1?"s":e.flightSuggestion1.flightCount>0?"":"s Available"," "),o(),m(e.flightSuggestion1.flightCount>0&&e.showPricing()?4:-1)}}function ta(t,l){t&1&&u(0,"app-spinner")}function ia(t,l){if(t&1){let e=x();a(0,"div",11),C("click",function(){_(e);let n=s(2);return g(n.changeDate(-2))}),a(1,"h6",8),c(2),r(),p(3,ea,5,3,"p",9)(4,ta,1,0,"app-spinner"),r()}if(t&2){let e=s(2);o(2),S(e.getDatePos(-2)),o(),m(e.flightSuggestion1?3:4)}}function na(t,l){if(t&1&&(u(0,"br",13),c(1," from "),u(2,"br",13),a(3,"span",10),c(4),F(5,"convertCurrency"),r()),t&2){let e=s(4);o(4),S(V(5,1,e.flightSuggestion2.flightFromPrice,e.currency))}}function oa(t,l){if(t&1&&(a(0,"p",9)(1,"span",10),c(2),r(),c(3),p(4,na,6,4),r()),t&2){let e=s(3);o(2),S(e.flightSuggestion2.flightCount),o(),y(" flight",e.flightSuggestion2.flightCount>1?"s":e.flightSuggestion2.flightCount>0?"":"s Available"," "),o(),m(e.flightSuggestion2.flightCount>0&&e.showPricing()?4:-1)}}function ra(t,l){t&1&&u(0,"app-spinner")}function aa(t,l){if(t&1){let e=x();a(0,"div",11),C("click",function(){_(e);let n=s(2);return g(n.changeDate(-1))}),a(1,"h6",8),c(2),r(),p(3,oa,5,3,"p",9)(4,ra,1,0,"app-spinner"),r()}if(t&2){let e=s(2);o(2),S(e.getDatePos(-1)),o(),m(e.flightSuggestion2?3:4)}}function sa(t,l){if(t&1&&(u(0,"br",13),c(1," from "),u(2,"br",13),a(3,"span",10),c(4),F(5,"convertCurrency"),r()),t&2){let e=s(3);o(4),S(V(5,1,e.flightSuggestion3.flightFromPrice,e.currency))}}function la(t,l){if(t&1&&(a(0,"p",9)(1,"span",10),c(2),r(),c(3),p(4,sa,6,4),r()),t&2){let e=s(2);o(2),S(e.flightSuggestion3.flightCount),o(),y(" flight",e.flightSuggestion3.flightCount>1?"s":e.flightSuggestion3.flightCount>0?"":"s Available"," "),o(),m(e.flightSuggestion3.flightCount>0&&e.showPricing()?4:-1)}}function ca(t,l){t&1&&u(0,"app-spinner")}function da(t,l){if(t&1&&(u(0,"br",13),c(1," from "),u(2,"br",13),a(3,"span",10),c(4),F(5,"convertCurrency"),r()),t&2){let e=s(3);o(4),S(V(5,1,e.flightSuggestion4.flightFromPrice,e.currency))}}function pa(t,l){if(t&1&&(a(0,"p",9)(1,"span",10),c(2),r(),c(3),p(4,da,6,4),r()),t&2){let e=s(2);o(2),S(e.flightSuggestion4.flightCount),o(),y(" flight",e.flightSuggestion4.flightCount>1?"s":e.flightSuggestion4.flightCount>0?"":"s Available"," "),o(),m(e.flightSuggestion4.flightCount>0&&e.showPricing()?4:-1)}}function ma(t,l){t&1&&u(0,"app-spinner")}function ua(t,l){if(t&1){let e=x();a(0,"div",1),p(1,ia,5,2,"div",6),p(2,aa,5,2,"div",6),a(3,"div",7)(4,"h6",8),c(5),r(),a(6,"p",9)(7,"span",10),c(8),r(),c(9),r()(),a(10,"div",11),C("click",function(){_(e);let n=s();return g(n.changeDate(1))}),a(11,"h6",8),c(12),r(),p(13,la,5,3,"p",9)(14,ca,1,0,"app-spinner"),r(),a(15,"div",12),C("click",function(){_(e);let n=s();return g(n.changeDate(2))}),a(16,"h6",8),c(17),r(),p(18,pa,5,3,"p",9)(19,ma,1,0,"app-spinner"),r()()}if(t&2){let e=s();o(),m(e.dateNotInPast(-2)?1:-1),o(),m(e.dateNotInPast(-1)?2:-1),o(3),S(e.getDate(e.itineraryItem.fromDate)),o(3),S(e.itineraryItem.products.length),o(),y(" flight",e.itineraryItem.products.length>
11?"s":e.itineraryItem.products.length>0?"":"s"," Available "),o(3),S(e.getDatePos(1)),o(),m(e.flightSuggestion3?13:14),o(4),S(e.getDatePos(2)),o(),m(e.flightSuggestion4?18:19)}}function ha(t,l){if(t&1){let e=x();a(0,"div",2)(1,"a",14),C("click",function(){_(e);let n=s();return g(n.sortBy(["departureTime","price"]))}),u(2,"fa-icon",15),r(),c(3," Departure "),a(4,"span",16),c(5,"Time"),r(),a(6,"a",14),C("click",function(){_(e);let n=s();return g(n.sortBy(["-departureTime","price"]))}),u(7,"fa-icon",17),r(),c(8," \xA0 "),a(9,"a",14),C("click",function(){_(e);let n=s();return g(n.sortBy(["arrivalTime","price"]))}),u(10,"fa-icon",15),r(),c(11," Arrival "),a(12,"span",16),c(13,"Time"),r(),a(14,"a",14),C("click",function(){_(e);let n=s();return g(n.sortBy(["-arrivalTime","price"]))}),u(15,"fa-icon",17),r(),a(16,"a",14),C("click",function(){_(e);let n=s();return g(n.sortBy(["price","-arrivalTime"]))}),u(17,"fa-icon",15),r(),c(18," Price "),a(19,"a",14),C("click",function(){_(e);let n=s();return g(n.sortBy(["-price","-arrivalTime"]))}),u(20,"fa-icon",17),r()()}}function _a(t,l){t&1&&u(0,"div",3)}function ga(t,l){if(t&1){let e=x();a(0,"app-flight",18),C("flightSelected",function(n){_(e);let d=s();return g(d.processFlightSelection(n))}),r()}if(t&2){let e=l.$implicit,i=s();f("flight",e)("announcements",i.getProductAnnouncements(e.id))}}function Ca(t,l){t&1&&(a(0,"div",5)(1,"h5"),c(2,"There were no flights found. Please click on another date above."),r()())}var fn=(()=>{class t{constructor(){this.productAnnouncements=[],this.itinerariesApi=T(Ve),this.itineraryService=T(M),this.supplierService=T(A),this.flightService=T(at),this.isLoading=!0,this.isLoadingSuggestions=[!0,!0,!0,!0],this.lastRequestKey=null}ngOnChanges(){let e=`${this.itineraryItem?.id}|${(0,qe.default)(this.itineraryItem?.fromDate).format("YYYY-MM-DD")}`,i=this.itineraryItem?.products&&this.itineraryItem.products.length>0;e===this.lastRequestKey&&i||(this.lastRequestKey=e,this.getFlights())}getFlights(){!this.itineraryItem.products||this.itineraryItem.products.length<1?this.supplierService.getFlights(this.itineraryItem.id).subscribe(e=>{this.itineraryItem.products=e,this.calculatePrices(),this.sortBy(["price","arrivalTime"]),this.isLoading=!1,this.getAdjacentDateSuggestions()}):(this.calculatePrices(),this.sortBy(["price","arrivalTime"]),this.isLoading=!1,this.getAdjacentDateSuggestions())}calculatePrices(){this.itineraryItem.products.forEach(e=>{let i=e;i.price=this.flightService.getPrice(i,!1),i.returnPrice=this.returnPriceValid(i.owner?.id),i.priceTotal=this.flightService.getPriceTotal(i,!1);let n=this.itinerary.items.find(h=>h.id!==this.itineraryItem.id&&h.productType.id===B.Flight&&h.allSelected);if(i.priceDiscountedReturn=i.priceTotal,i.returnPrice&&n){let h=n.products?.find(D=>D.selected),I=h.prices.filter(D=>D.return);if(I.length){let D=this.flightService.getPriceTotalNonRes(i,!1),U=this.flightService.getPriceTotalNonRes(h,!1),b=this.flightService.getPriceTotalRes(i,!1),H=this.flightService.getPriceTotalRes(h,!1),Ee=0,Ge=0;i.prices.filter(Y=>Y.return&&!Y.resident).forEach(Y=>{if(I.filter(ee=>ee.flightClass===Y.flightClass).length){let ee=this.flightService.getPriceTotalNonRes(h,!0,Y.flightClass),J=this.flightService.getPriceTotalNonRes(i,!0,Y.flightClass),re=D+U-ee-J;re>Ee&&(Ee=re)}}),i.prices.filter(Y=>Y.return&&Y.resident).forEach(Y=>{if(I.filter(ee=>ee.flightClass===Y.flightClass).length){let ee=this.flightService.getPriceTotalRes(h,!0,Y.flightClass),J=this.flightService.getPriceTotalRes(i,!0,Y.flightClass),re=b+H-ee-J;re>Ge&&(Ge=re)}}),i.priceDiscountedReturn=i.priceTotal-(Ee+Ge)}}this.itineraryItem.selectedItems.filter(h=>h.supplierProductItemPrice!=null&&h.supplierProductItemPrice.supplierProductItem!=null).some(h=>h.supplierProductItemPrice.supplierProductItem!=null&&h.supplierProductItemPrice.supplierProductItem.id===i.id)&&this.markSelected(i)})}get currency(){return this.supplierService.getSelectedCurrency()}getDatePos(e){return this.getDate((0,qe.default)(this.itineraryItem.fromDate).add(e,"days"))}dateNotInPast(e){return(0,qe.default)().isBefore((0,qe.default)(this.itineraryItem.fromDate).add(e,"days"),"day")}getAdjacentDateSuggestions(){for(let e of[-2,-1,1,2])this.dateNotInPast(e)&&this.getFlightSuggestion(e)}getFlightSuggestion(e){var i=(0,qe.default)(this.itineraryItem.fromDate).add(e,"days").format("YYYY-MM-DD");this.supplierService.getFlightApiSuggestions(this.itineraryItem.id,i).subscribe(n=>{e==-2&&(this.flightSuggestion1=n),e==-1&&(this.flightSuggestion2=n),e==1&&(this.flightSuggestion3=n),e==2&&(this.flightSuggestion4=n)})}getDate(e){return this.itineraryService.getDate(e)}changeDate(e){this.isLoading=!0,this.itinerariesApi.removeFromCart({itineraryItemId:this.itineraryItem.id}).pipe(te(1)).subscribe(i=>{this.itineraryItem.price=this.itineraryItem.originalPrice=0,this.itineraryItem.selectedText="",this.itineraryItem.fromDate=this.itineraryService.convertStringToUtcDate(this.getDatePos(e)),this.itineraryItem.toDate=null,this.itineraryItem.products=null,this.itineraryService.saveItineraryItem(this.itineraryItem).subscribe(n=>{this.itineraryService.productSelected(n,this.itineraryItem,null)})})}ownedReturnLegs(e){return e?this.itinerary.items.filter(i=>i.productType.id==B.Flight&&!i.suggestion&&i.origin.id==this.itineraryItem.destination.id&&i.destination.id==this.itineraryItem.origin.id&&(0,qe.default)(i.fromDate).isBefore((0,qe.default)(this.itineraryItem.fromDate))&&i.selectedItems&&i.selectedItems.some(n=>n.supplierProductItemPrice.supplierProductItem.owner.id==e)):[]}returnPriceValid(e){return this.ownedReturnLegs(e).length>0}markSelected(e){for(let i of this.itineraryItem.products)i.selected=!1;this.itineraryItem.allSelected=e.selected=!0}processFlightSelection(e){this.itinerariesApi.addToCart({itineraryItemId:this.itineraryItem.id,supplierProductItemId:e.id}).pipe(te(1)).subscribe(i=>{this.itineraryService.productSelected(i,this.itineraryItem,e)})}sortBy(e){_e(this.itineraryItem.products,e)}showPricing(){return this.itineraryService.showPricing()}getProductAnnouncements(e){return this.productAnnouncements.filter(i=>i.productId===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-flights"]],inputs:{itineraryItem:"itineraryItem",itinerary:"itinerary",productAnnouncements:"productAnnouncements"}
1,features:[kt([at]),pe],decls:7,vars:5,consts:[[1,"text-center","p-4"],[1,"row","text-center","m-0"],[1,"filter","bt"],[1,"bt"],[3,"flight","announcements"],[1,"booking","text-center","mt-0","p-4"],[1,"col","p-2","br","sug-back"],[1,"col","p-2","br"],[1,"mb-1"],[1,"mb-0","title"],[1,"larger"],[1,"col","p-2","br","sug-back",3,"click"],[1,"col","p-2","sug-back",3,"click"],[1,"d-sm-none"],[3,"click"],["icon","caret-up"],[1,"d-lg-inline-block","d-none"],["icon","caret-down"],[3,"flightSelected","flight","announcements"]],template:function(i,n){i&1&&(p(0,Zr,3,0,"h3",0),p(1,ua,20,9,"div",1),p(2,ha,21,0,"div",2),p(3,_a,1,0,"div",3),w(4,ga,1,2,"app-flight",4,k),p(6,Ca,3,0,"div",5)),i&2&&(m(n.isLoading?0:-1),o(),m(n.isLoading?-1:1),o(),m(!n.isLoading&&n.itineraryItem.products.length>2?2:-1),o(),m(!n.isLoading&&n.itineraryItem.products.length<3?3:-1),o(),E(n.itineraryItem.products),o(2),m(!n.isLoading&&n.itineraryItem.products.length==0?6:-1))},dependencies:[j,N,Cn,Z],encapsulation:2})}}return t})();var fa=(t,l)=>l.announcementId;function xa(t,l){if(t&1&&(di(0,"p",1),F(1,"safeHtml")),t&2){let e=l.$implicit;pi("innerHTML",ot(1,1,e.message),R)}}function ya(t,l){if(t&1&&(Ke(0,"div"),w(1,xa,2,3,"p",1,fa),Qe()),t&2){let e=s();q(bt("announcements ",e.containerClass())),o(),E(e.announcements())}}var st=(()=>{class t{constructor(){this.announcements=$([]),this.containerClass=$("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-hotel-announcements"]],inputs:{announcements:[1,"announcements"],containerClass:[1,"containerClass"]},decls:1,vars:1,consts:[[3,"class"],[1,"product-announcement",3,"innerHTML"]],template:function(i,n){i&1&&p(0,ya,3,3,"div",0),i&2&&m(n.announcements().length?0:-1)},dependencies:[Wt],encapsulation:2,changeDetection:0})}}return t})();function Sa(t,l){t&1&&u(0,"fa-icon",7)}function va(t,l){if(t&1&&(a(0,"p",8),c(1),r()),t&2){let e=s();o(),y("by ",e.getSupplierName())}}function Ta(t,l){if(t&1){let e=x();a(0,"button",15),C("click",function(){_(e);let n=s();return g(n.onReadMore())}),c(1),r()}if(t&2){let e=s();o(),y("Read ",e.readMore?"less":"more")}}function Ia(t,l){if(t&1&&(a(0,"p"),c(1),r()),t&2){let e=s(3);o(),Q("for ",e.nights," Night",e.nights>1?"s":"")}}function wa(t,l){t&1&&(a(0,"p"),c(1,"per night"),r())}function Ea(t,l){if(t&1&&(a(0,"p"),c(1,"Rooms From"),r(),a(2,"h3"),c(3),F(4,"convertCurrency"),r(),p(5,Ia,2,2,"p"),p(6,wa,2,0,"p")),t&2){let e=s(2);o(3),S(V(4,3,e.hotel.priceFrom,e.currency)),o(2),m(e.loading?-1:5),o(),m(e.loading?6:-1)}}function ba(t,l){if(t&1){let e=x();a(0,"button",18),C("click",function(){_(e);let n=s(2);return g(n.viewDetail())}),c(1),r()}if(t&2){let e=s(2);o(),y(" ","View"+(e.anyRoomsAvailable()?" / Select":" Availability")," ")}}function ka(t,l){t&1&&(a(0,"div",17),c(1,"No Rooms Left"),r())}function Pa(t,l){if(t&1&&(p(0,Ea,7,6),p(1,ba,2,1,"button",16),p(2,ka,2,0,"div",17)),t&2){let e=s();m(e.showPricing()&&e.hotel.priceFrom>0?0:-1),o(),m(e.loading?-1:1),o(),m(!e.loading&&!e.anyRoomsAvailable()?2:-1)}}function Da(t,l){t&1&&(a(0,"div",13),c(1," Rates Unavailable "),r())}function Fa(t,l){t&1&&u(0,"hr")}function Va(t,l){t&1&&(a(0,"div",14)(1,"div",19),u(2,"app-spinner"),r(),a(3,"div",20)(4,"h6"),c(5,"Checking"),r(),a(6,"h6",21),c(7,"Availability"),r()()())}var xn=(()=>{class t{constructor(){this.showHotel=new L,this.announcements=[],this.stars=[],this.nights=1,this.descriptionLength=350,this.readMore=!1,this.itineraryService=T(M),this.supplierService=T(A)}ngOnInit(){this.nights=this.itineraryService.nights(this.itineraryItem);for(let e=0;e<this.hotel.starRating;e++)this.stars.push(e);this.updateDescription()}anyRoomsAvailable(){return this.hotel.roomTypes.some(e=>e.available&&e.prices.length)}getSupplierName(){return this.hotel.supplierName!=this.supplierService.currentSupplier.name?this.hotel.supplierName:""}showPricing(){return this.itineraryService.showPricing()}viewDetail(){window.scroll({top:0,left:0,behavior:"smooth"}),this.showHotel.emit(this.hotel)}get currency(){return this.supplierService.getSelectedCurrency()}onReadMore(){this.readMore=!this.readMore,this.updateDescription()}updateDescription(){this.descriptionToShow=this.hotel.description.length>this.descriptionLength&&!this.readMore?this.hotel.description.slice(0,this.descriptionLength).concat("..."):this.hotel.description}get hotelAnnouncements(){return this.announcements.filter(e=>!e.roomTypeId)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-hotel"]],inputs:{hotel:"hotel",itineraryItem:"itineraryItem",loading:"loading",announcements:"announcements"},outputs:{showHotel:"showHotel"},decls:21,vars:13,consts:[[1,"row","product"],[1,"col-lg-3"],[3,"photos","galleryId","usePreview"],[1,"col-8","col-lg-6","col-xl-7"],[1,"clearfix","mt-3","mt-lg-0"],[1,"float-left","pr-2"],[1,"text-muted"],["icon","star"],[1,"title"],[1,"description",3,"innerHTML"],["type","button",1,"read-more"],[3,"announcements"],[1,"col-4","col-lg-3","col-xl-2","text-right","pt-4","pt-lg-0","nowrap"],["tooltip","This can occur if rates have not been setup for this year / season",1,"alert","alert-danger","mt-2","text-center"],[1,"row"],["type","button",1,"read-more",3,"click"],[1,"btn","btn-primary","btn-sm"],[1,"alert","alert-warning","mt-2","text-center"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"col-3","h5","my-auto"],[1,"col-9"],[1,"m-0"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1),u(2,"app-photo-gallery",2),r(),a(3,"div",3)(4,"div",4)(5,"h2",5),c(6),r(),a(7,"small",6),w(8,Sa,1,0,"fa-icon",7,k),r()(),p(10,va,2,1,"p",8),a(11,"p"),c(12),r(),u(13,"div",9),p(14,Ta,2,1,"button",10),u(15,"app-hotel-announcements",11),r(),a(16,"div",12),p(17,Pa,3,3),p(18,Da,2,0,"div",13),p(19,Fa,1,0,"hr"),p(20,Va,8,0,"div",14),r()()),i&2&&(o(2),f("photos",n.hotel.photos)("galleryId",n.hotel.id)("usePreview",!0),o(4),S(n.hotel.name),o(2),E(n.stars),o(2),m(n.getSupplierName()?10:-1),o(2),S(n.hotel.locations?n.hotel.locations[0].location.name:""),o(),f("innerHTML",n.descriptionToShow,R),o(),m(n.hotel.description.length>n.descriptionLength?14:-1),o(),f("announcements",n.hotelAnnouncements),o(2),m(n.hotel.ratesAvailable||n.loading?17:-1),o(),m(!n.hotel.ratesAvailable&&!n.loading?18:-1),o(),m(n.loading?19:-1),o(),m(n.loading?20:-1))},dependencies:[j,ae,N,st,Z],styles:[".hotel[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:20px;border-bottom:1px solid #f4f4f4;margin-bottom:10px}@media(min-width:768px){.btn-sm[_ngcontent-%COMP%]{font-size:1.2em!important}}.description[_ngcontent-%COMP%]{margin-bottom:1rem}.read-more[_ngcontent-%COMP%]{padding:0;margin:0;border:none;background:none;text-decoration:underline}"]})}}return t})();var xe=ge(Ce(),1);var La=()=>["name"],Aa=(t,l)=>l.id;function Ma(t,l){if(t&1&&(a(0,"div",7)(1,"p",13),u(2,"fa-icon",14),c(3),r()()),t&2){let e=l.$implicit;o(3),S(e)}}function Ha(t,l){t&1&&(a(0,"div",10)(1,"h6",15),u(2,"app-spinner"),c(3," Checking Availability"),r()())}function Ra(t,l){if(t&1&&(c(0),u(1,"br")),t&2){let e=l.$implicit;y(" ",e)}}function Oa(t,l){if(t&1&&(a(0,"p",16),w(1,Ra,2,1,null,null,k),r()),t&2){let e=s(2);o(),E(e.warningMessages)}}function Ba(t,l){if(t&1){let e=x();a(0,"li")(1,"a",27),C("keyup.enter",function(){let n=_(e).$implicit,d=s(6);return g(d.changeRoomConfiguration(n))})("click",function(){let n=_(e).$implicit,d=s(6);return g(d.changeRoomConfiguration(n))}),c(2),r()()}if(t&2){let e=l.$implicit;o(2),y(" ",e.name," ")}}function Na(t,l){if(t&1&&(a(0,"ul",26),w(1,Ba,3,1,"li",null,Aa),r()),t&2){let e=s(5);o(),E(e.availableRoomConfigurations)}}function Wa(t,l){if(t&1&&(a(0,"div",20)(1,"div",22)(2,"button",23),c(3),u(4,"span",24),r(),ci(5,Na,3,0,"ul",25),r()()),t&2){let e=s(4);o(),f("insideClick",!0),o(2),y(" ",e.selectedRoomConfiguration==null?null:e.selectedRoomConfiguration.name," ")}}function Ya(t,l){t&1&&(a(0,"div",16),c(1,"You booked the last room!"),r())}function $a(t,l){if(t&1&&(a(0,"p",13),c(1),r(),a(2,"h5",31),c(3),F(4,"convertCurrency"),r()),t&2){let e=s(2).$implicit,i=s(4);o(),S(e.name),o(2),S(V(4,2,i.getPrice(e.id),i.currency))}}
1function ja(t,l){if(t&1&&(a(0,"h5",29),c(1),r()),t&2){let e=s(2).$implicit;o(),S(e.name)}}function Ua(t,l){if(t&1){let e=x();a(0,"div",30)(1,"button",32),C("click",function(){_(e);let n=s(2).$implicit,d=s(4);return g(d.selectRoom(n.id))}),c(2,"Select"),r()()}}function za(t,l){if(t&1&&(a(0,"div",19)(1,"div",28),p(2,$a,5,5)(3,ja,2,1,"h5",29),r(),p(4,Ua,3,0,"div",30),r()),t&2){let e=s(5);o(),q(e.allTravellersInRoom||!e.bookable()||!e.roomAvailableAfterSelection()?"col":"col-7"),o(),m(e.showPricing()?2:3),o(2),m(!e.allTravellersInRoom&&e.bookable()&&e.roomAvailableAfterSelection()?4:-1)}}function qa(t,l){if(t&1&&p(0,za,5,4,"div",19),t&2){let e=l.$implicit,i=s(4);m(i.getPrice(e.id)>0||i.currentItinerary.package?0:-1)}}function Ga(t,l){if(t&1&&(a(0,"p",33)(1,"strong"),c(2),r()(),u(3,"hr")),t&2){let e=s(4);o(2),Q("Total for ",e.nights," Night",e.nights>1?"s":"")}}function Xa(t,l){if(t&1&&(a(0,"p",21),c(1),r()),t&2){let e=s(4);o(),Q(" ",e.roomsLeftAfterSelection()," Room",e.roomsLeftAfterSelection()>1?"s":""," Left! ")}}function Ka(t,l){if(t&1&&(u(0,"hr",18),a(1,"div",19),p(2,Wa,6,2,"div",20)(3,Ya,2,0,"div",16),r(),w(4,qa,1,1,null,null,k),F(6,"orderBy"),p(7,Ga,4,2),p(8,Xa,2,2,"p",21)),t&2){let e=s(3);o(2),m(e.roomAvailableAfterSelection()?2:3),o(2),E(V(6,3,e.room.mealPlans,Se(6,La))),o(3),m(e.showPricing()?7:-1),o(),m(e.bookable()&&e.roomAvailableAfterSelection()&&e.roomsLeftAfterSelection()<=3?8:-1)}}function Qa(t,l){if(t&1&&(a(0,"h5",16),c(1),F(2,"date"),F(3,"date"),r()),t&2){let e=s(4);o(),Q(" This Property is closed between ",V(2,2,e.closedSeasonDateFrom,e.dateFormat)," and ",V(3,5,e.closedSeasonDateTo,e.dateFormat)," ")}}function Za(t,l){t&1&&(u(0,"br"),c(1,"Please see availability below."),u(2,"br"),c(3," Click to change dates. "))}function Ja(t,l){if(t&1&&(a(0,"h5",16),c(1," Sorry, No More Rooms Available. "),p(2,Za,4,0),r()),t&2){let e=s(4);o(2),m(!e.loading&&e.bookable()&&(e.room.availability!=null&&e.room.availability.length)?2:-1)}}function es(t,l){if(t&1){let e=x();a(0,"div",19)(1,"div",34)(2,"p",13),c(3,"Available"),r(),a(4,"h5",31),c(5),r()(),a(6,"div",35)(7,"button",36),C("click",function(){_(e);let n=s(4);return g(n.changeDate(n.room.closestDateBefore))}),c(8,"Change"),r()()()}if(t&2){let e=s(4);o(5),S(e.getClosestDate(e.room.closestDateBefore))}}function ts(t,l){if(t&1){let e=x();a(0,"div",19)(1,"div",34)(2,"p",13),c(3,"Available"),r(),a(4,"h5",31),c(5),r()(),a(6,"div",35)(7,"button",36),C("click",function(){_(e);let n=s(4);return g(n.changeDate(n.room.closestDateAfter))}),c(8,"Change"),r()()()}if(t&2){let e=s(4);o(5),S(e.getClosestDate(e.room.closestDateAfter))}}function is(t,l){if(t&1&&(a(0,"div",19),p(1,Qa,4,8,"h5",16)(2,Ja,3,1,"h5",16),r(),p(3,es,9,1,"div",19),p(4,ts,9,1,"div",19)),t&2){let e=s(3);o(),m(e.isClosedSeason?1:2),o(2),m(e.room.closestDateBefore?3:-1),o(),m(e.room.closestDateAfter?4:-1)}}function ns(t,l){if(t&1&&p(0,Ka,9,7)(1,is,5,3),t&2){let e=s(2);m(e.roomAvailable()?0:1)}}function os(t,l){t&1&&(a(0,"div",17),c(1," Rates Unavailable "),r())}function rs(t,l){if(t&1&&(a(0,"div",10),p(1,Oa,3,0,"p",16),p(2,ns,2,1)(3,os,2,0,"div",17),r()),t&2){let e=s();o(),m(e.warningMessages.length?1:-1),o(),m(e.ratesAvailable?2:3)}}function as(t,l){if(t&1){let e=x();a(0,"div",40),c(1),a(2,"app-loading-button",47),C("clicked",function(){_(e);let n=s(2);return g(n.onSyncHotelInformation())}),r()()}if(t&2){let e=s(2);o(),y(" ",e.hotelLastUpdated," "),o(),f("buttonClass","btn btn-icon btn-sm px-0")("buttonIcon","sync")("spinnerIcon","sync")("loading",e.syncingHotelInformation)("buttonTooltip","Sync Hotel Information")}}function ss(t,l){if(t&1&&(a(0,"td",48),c(1),r()),t&2){let e=l.$implicit;q(e.class),o(),S(e.theDate)}}function ls(t,l){if(t&1){let e=x();a(0,"td",49),C("click",function(){let n=_(e).$implicit,d=s(2);return g(n.goToDate?d.changeDate(n.goToDate):!1)}),c(1),r()}if(t&2){let e=l.$implicit,i=s(2);q((i.isDayInClosedSeason(e)?"closed-season ":e.quantity?"alert-success ":"alert-danger ")+e.class+(e.goToDate?" pointer":"")),Tt("border-right","1px solid white"),f("tooltip",e.goToDate?"Search "+i.getClosestDate(e.goToDate):""),o(),y(" ",i.isDayInClosedSeason(e)?"C":e.quantity<0?"?":e.quantity," ")}}function cs(t,l){if(t&1&&(a(0,"div",2)(1,"div",37)(2,"p",38),c(3,"Number of rooms available by date"),r()(),a(4,"div",39),p(5,as,3,6,"div",40),r()(),u(6,"hr",41),a(7,"div",42)(8,"div",43)(9,"table",44)(10,"thead")(11,"tr"),w(12,ss,2,3,"td",45,k),r()(),a(14,"tbody")(15,"tr"),w(16,ls,2,6,"td",46,k),r()()()()()),t&2){let e=s();o(5),m(e.internalBookingEngine?-1:5),o(7),E(e.room.availability),o(4),E(e.room.availability)}}function ds(t,l){t&1&&(a(0,"h6",12)(1,"strong"),u(2,"fa-icon",50),c(3," All Travellers have a room"),r(),c(4," - to change this click "),a(5,"strong"),c(6,"remove"),r(),c(7," above. Click "),a(8,"strong"),c(9,"Next Step"),r(),c(10," to continue "),r())}var yn=(()=>
1{class t{constructor(){this.warningMessages=[],this.isViewOnly=!1,this.syncingHotelInformation=!1,this.announcements=[],this._hotelLastUpdated="",this.roomPriceSelected=new L,this.dateChange=new L,this.syncHotelInformation=new L,this.allTravellersInRoom=!1,this.isClosedSeason=!1,this.dateFormat=At.AbbreviatedMonthDateForPipe,this.itineraryService=T(M),this.supplierService=T(A)}get hotelLastUpdated(){return this._hotelLastUpdated}set hotelLastUpdated(e){let i=xe.default.utc().subtract(1,"hour"),n=xe.default.utc(e);this._hotelLastUpdated=n.isAfter(i)?"over an hour":n.fromNow()}ngOnChanges(){this.loading||(this.getAvailability(),this.recalculateConfigurations())}get currency(){return this.supplierService.getSelectedCurrency()}getAvailability(){if(this.room.availability=[],this.isClosedSeason=this.room.duringStay?.length>0&&this.room.duringStay.every(e=>e===-2),this.isClosedSeason&&this.room.closedSeasonDateFrom&&this.room.closedSeasonDateTo&&(this.closedSeasonDateFrom=new Date(this.room.closedSeasonDateFrom),this.closedSeasonDateTo=new Date(this.room.closedSeasonDateTo)),this.room.duringStay){let e=Math.floor(this.room.duringStay.length/2);for(let i=-14+Math.floor(this.room.duringStay.length/2);i<0;i++)this.room.availability.push({theDate:(0,xe.default)(this.itineraryItem.fromDate).add(i,"days").format("DD/MM"),goToDate:this.room.beforeFromDate[e]>0?(0,xe.default)(this.itineraryItem.fromDate).add(i,"days").toDate():null,quantity:this.room.beforeFromDate[e++],class:i<=-10||i<=-8?"d-none d-lg-table-cell":i<=-6?"d-none d-md-table-cell":i<=-4?"d-none d-sm-table-cell":""});for(let i=0;i<this.room.duringStay.length;i++){let n=this.room.duringStay[i]-(this.room.available-this.roomsLeftAfterSelection());this.room.availability.push({theDate:(0,xe.default)(this.itineraryItem.fromDate).add(i,"days").format("DD/MM"),goToDate:i!=0&&n>0?(0,xe.default)(this.itineraryItem.fromDate).add(i,"days").toDate():null,quantity:n,class:"fw-700"})}for(let i=0;i<14-Math.ceil(this.room.duringStay.length/2);i++)this.room.availability.push({theDate:(0,xe.default)(this.itineraryItem.toDate).add(i,"days").format("DD/MM"),goToDate:this.room.afterToDate[i]>0?(0,xe.default)(this.itineraryItem.toDate).add(i,"days").toDate():null,quantity:this.room.afterToDate[i],class:i>=9?"d-none d-xl-table-cell":i>=8?"d-none d-lg-table-cell":i>=5?"d-none d-md-table-cell":i>=3?"d-none d-sm-table-cell":""})}}roomAvailable(){return this.room.mealPlans?.length>0&&this.availableRoomConfigurations?.length>0&&this.room.prices?.length>0&&this.room.available>0}roomAvailableAfterSelection(){return this.roomsLeftAfterSelection()>0}roomsLeftAfterSelection(){return this.itineraryItem.selectedItems?this.room.available-this.itineraryItem.selectedItems.filter(e=>xe.default.utc(e.supplierProductItemPrice.supplierProductItem.theDate).isSame(xe.default.utc(this.itineraryItem.fromDate),"day")&&e.supplierProductItemPrice.supplierProductItem.supplierProduct.roomType.id==this.room.id).length:this.room.available}showPricing(){return this.itineraryService.showPricing()}bookable(){return!this.isViewOnly&&this.itineraryService.bookable()}recalculateConfigurations(){this.allTravellersInRoom=this.adultsLeft+this.childrenLeft+this.infantsLeft<=0,this.room.configurations&&(this.allTravellersInRoom?(this.availableRoomConfigurations=this.room.configurations.filter(e=>e.noAdults<=this.passengers.adults+this.passengers.adultsRes&&e.noTeens<=this.passengers.teen+this.passengers.teenRes&&e.noChildren<=this.passengers.children+this.passengers.childrenRes&&e.noInfants<=this.passengers.infants),this.selectedRoomConfiguration=this.room.configurations.find(e=>e.noAdults===this.passengers.adults+this.passengers.adultsRes&&e.noTeens<=this.passengers.teen+this.passengers.teenRes&&e.noChildren===this.passengers.children+this.passengers.childrenRes&&e.noInfants===this.passengers.infants)):(this.availableRoomConfigurations=this.room.configurations.filter(e=>e.noAdults<=this.adultsLeft&&e.noTeens<=this.teensLeft&&e.noChildren<=this.childrenLeft&&e.noInfants<=this.infantsLeft),this.selectedRoomConfiguration=this.room.configurations.filter(e=>e.noAdults===this.adultsLeft&&e.noTeens===this.teensLeft&&e.noChildren===this.childrenLeft&&e.noInfants===this.infantsLeft)[0]),!this.selectedRoomConfiguration&&this.availableRoomConfigurations.length>0&&(this.selectedRoomConfiguration=this.availableRoomConfigurations[0]))}isDayInClosedSeason(e){return e.quantity===-2}getClosestDate(e){if((0,xe.default)(e).isValid())return(0,xe.default)(e).format("DD MMM")+" to "+(0,xe.default)(e).add(this.nights,"days").format("DD MMM")}changeDate(e){confirm("Are you sure you want to change your date range to: "+this.getClosestDate(e))&&this.dateChange.emit(e)}changeRoomConfiguration(e){this.selectedRoomConfiguration=e}getPrice(e){let i=this.room.prices.filter(n=>n.configurationId===this.selectedRoomConfiguration.name&&n.mealPlanId===e)[0];return i?i.price:0}selectRoom(e){let i=this.room.prices.filter(n=>n.configurationId===this.selectedRoomConfiguration.name&&n.mealPlanId===e)[0];this.roomPriceSelected.emit({room:this.room,roomPrice:i})}get currentItinerary(){return this.itineraryService.getCurrentItinerary()}onSyncHotelInformation(){this.syncHotelInformation.emit()}get roomTypeAnnouncements(){return this.announcements.filter(e=>e.roomTypeId===this.room.id)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-room"]],inputs:{room:"room",passengers:"passengers",itineraryItem:"itineraryItem",ratesAvailable:"ratesAvailable",nights:"nights",adultsLeft:"adultsLeft",teensLeft:"teensLeft",childrenLeft:"childrenLeft",infantsLeft:"infantsLeft",warningMessages:"warningMessages",loading:"loading",isViewOnl
1y:"isViewOnly",syncingHotelInformation:"syncingHotelInformation",internalBookingEngine:"internalBookingEngine",announcements:"announcements",hotelLastUpdated:"hotelLastUpdated"},outputs:{roomPriceSelected:"roomPriceSelected",dateChange:"dateChange",syncHotelInformation:"syncHotelInformation"},features:[pe],decls:18,vars:9,consts:[[1,"row","px-4","pt-3"],[1,"col-lg-8","col-xl-9","my-auto"],[1,"row"],[1,"col-md-5"],[3,"photos","galleryId","usePreview"],[1,"col-md-7"],[1,"mt-3","mt-md-0"],[1,"col-6","mt-1"],["containerClass","mt-3",3,"announcements"],[1,"mt-3",3,"innerHTML"],[1,"col-lg-4","col-xl-3","text-right"],[1,"mt-2","mb-0","pb-0"],[1,"alert","alert-success","text-center"],[1,"title"],["icon","chevron-right"],[1,"text-center"],[1,"alert","alert-warning","w-100","text-center"],["tooltip","This can occur if rates have not been setup for this year / season",1,"alert","alert-danger","mt-2","text-center"],[1,"d-md-none"],[1,"row","mealPlan"],[1,"col","text-right"],[1,"alert","alert-warning","text-center"],["dropdown","",1,"btn-group",3,"insideClick"],["dropdownToggle","","type","button",1,"btn","btn-primary-outline","dropdown-toggle"],[1,"caret"],["class","dropdown-menu dropdown-menu-right","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right"],["tabindex","0",1,"dropdown-item",3,"keyup.enter","click"],[1,"my-auto","nowrap"],[1,"m-0"],[1,"col-5","my-auto"],[1,"data"],["type","button",1,"btn","btn-primary",3,"click"],[1,"mt-3"],[1,"col-sm-7","my-auto","nowrap"],[1,"col-sm-5","my-auto"],["type","button",1,"btn","btn-icon",3,"click"],[1,"col-9"],[1,"title","my-0","px-4"],[1,"col-3"],[1,"text-right","px-4"],[1,"mt-1","mb-1","pb-0"],[1,"row","px-4"],[1,"col-12"],[1,"table","table-borderless","text-center","mb-1"],[1,"m-sm","p-1","title",3,"class"],[1,"p-1","alert",3,"border-right","tooltip","class"],[3,"clicked","buttonClass","buttonIcon","spinnerIcon","loading","buttonTooltip"],[1,"m-sm","p-1","title"],[1,"p-1","alert",3,"click","tooltip"],["icon","check-circle"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),u(4,"app-photo-gallery",4),r(),a(5,"div",5)(6,"h3",6),c(7),r(),a(8,"div",2),w(9,Ma,4,1,"div",7,k),r(),u(11,"app-hotel-announcements",8),r()(),u(12,"div",9),r(),p(13,Ha,4,0,"div",10)(14,rs,4,2,"div",10),r(),p(15,cs,18,1),u(16,"hr",11),p(17,ds,11,0,"h6",12)),i&2&&(o(4),f("photos",n.room.photos)("galleryId",n.room.id)("usePreview",!0),o(3),S(n.room.name),o(2),E(n.room.amenities),o(2),f("announcements",n.roomTypeAnnouncements),o(),f("innerHTML",n.room.description,R),o(),m(n.loading?13:14),o(2),m(!n.loading&&n.bookable()&&(n.room.availability!=null&&n.room.availability.length)?15:-1),o(2),m(n.allTravellersInRoom?17:-1))},dependencies:[j,Ot,Yi,$i,Wi,rt,Ue,ae,N,Ni,st,Z,ve,Ft],styles:[".mealPlan[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #e1e1e3}.closed-season[_ngcontent-%COMP%]{background-color:var(--accent-lightest);color:var(--accent-base)}"]})}}return t})();var jt=ge(Ce(),1);var Sn=400,ps=`${Sn}ms cubic-bezier(0.4,0.0,0.2,1)`,lt=(()=>{class t{constructor(e,i){this._el=e,this._renderer=i,this.collapsed=De(),this.collapses=De(),this.expanded=De(),this.expands=De(),this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.display=$("block"),this.isAnimated=$(!1),this.collapse=$(!1),this._display="block",this._stylesLoaded=!1,this._isTransitionRunning=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",He(()=>{let n=this.display();if(this._display=n,n==="none"){this.hide();return}this.isAnimated()?this.toggle():this.show()}),He(()=>{let n=this.collapse();this.collapseNewValue=n,(!this._isTransitionRunning||this._isAnimationDone)&&(this.isExpanded=n,this.toggle())})}ngAfterViewChecked(){this._stylesLoaded=!0}toggle(){this.isExpanded?this.hide():this.show()}hide(){this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated(),this._COLLAPSE_ACTION_NAME)(()=>
1{if(this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated()){this.show();return}this.collapsed.emit(this),this._renderer.setStyle(this._el.nativeElement,"display","none")})}show(){this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated(),this._EXPAND_ACTION_NAME)(()=>{if(this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated()){this.hide();return}this.expanded.emit(this)})}animationRun(e,i){if(!e||!this._stylesLoaded)return I=>I();let n=this._el.nativeElement,d=i===this._EXPAND_ACTION_NAME,h=!!this._pendingFinish;return this._cancelPending(),this._renderer.setStyle(n,"display",this._display),this._renderer.setStyle(n,"overflow","hidden"),this._renderer.setStyle(n,"transition",`height ${ps}`),this._isTransitionRunning=!0,I=>{let D=()=>{this._cancelPending(),this._isTransitionRunning=!1,d?this._renderer.removeStyle(n,"display"):this._renderer.setStyle(n,"display","none"),this._renderer.removeStyle(n,"height"),this._renderer.removeStyle(n,"transition"),this._renderer.removeStyle(n,"overflow"),I()};if(this._pendingFinish=Ri(n,"height",Sn,D),h){let U=n.getBoundingClientRect().height;this._renderer.setStyle(n,"height",`${U}px`),n.offsetHeight,this._renderer.setStyle(n,"height",d?`${n.scrollHeight}px`:"0")}else d?(this._renderer.setStyle(n,"height","0"),n.offsetHeight,this._rafId=requestAnimationFrame(()=>{this._rafId=void 0,this._renderer.setStyle(n,"height",`${n.scrollHeight}px`)})):this._rafId=requestAnimationFrame(()=>{this._renderer.setStyle(n,"height",`${n.scrollHeight}px`),this._rafId=requestAnimationFrame(()=>{this._rafId=void 0,this._renderer.setStyle(n,"height","0")})})}}ngOnDestroy(){this._cancelPending()}_cancelPending(){this._pendingFinish?.cancel(),this._pendingFinish=void 0,this._rafId!==void 0&&(cancelAnimationFrame(this._rafId),this._rafId=void 0)}static{this.\u0275fac=function(i){return new(i||t)(Ie(yt),Ie(si))}}static{this.\u0275dir=li({type:t,selectors:[["","collapse",""]],hostVars:9,hostBindings:function(i,n){i&2&&(Pe("aria-hidden",n.isCollapsed),ie("collapse",n.isCollapse)("in",n.isExpanded)("show",n.isExpanded)("collapsing",n.isCollapsing))},inputs:{display:[1,"display"],isAnimated:[1,"isAnimated"],collapse:[1,"collapse"]},outputs:{collapsed:"collapsed",collapses:"collapses",expanded:"expanded",expands:"expands"},exportAs:["bs-collapse"]})}}return t})(),ct=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=it({type:t})}static{this.\u0275inj=tt({})}}return t})();var ms=()=>[],us=t=>({show:t}),hs=(t,l)=>l.id;function _s(t,l){t&1&&u(0,"fa-icon",5)}function gs(t,l){t&1&&u(0,"fa-icon",7)}function Cs(t,l){t&1&&u(0,"fa-icon",8)}function fs(t,l){if(t&1&&(a(0,"p",9)(1,"strong"),c(2),r()()),t&2){let e=s();o(2),S(e.minLosWarningMessage)}}function xs(t,l){if(t&1&&(a(0,"p",11),c(1),r()),t&2){let e=s();o(),y("by ",e.getSupplierName())}}function ys(t,l){if(t&1&&(a(0,"div",30)(1,"p"),c(2,"Total"),r(),a(3,"h5"),c(4),F(5,"convertCurrency"),r()()),t&2){let e=s().$implicit,i=s(2);o(4),S(V(5,1,e.roomPrice.price,i.currency))}}function Ss(t,l){if(t&1){let e=x();a(0,"div",31)(1,"button",32),C("click",function(){_(e);let n=s().$index,d=s(2);return g(d.removeSelectedRoom(n))}),c(2,"Remove"),r()()}}function vs(t,l){if(t&1&&(a(0,"div",0)(1,"div",29)(2,"p"),c(3,"Selected Rooms"),r(),a(4,"h5"),c(5),r()(),p(6,ys,6,4,"div",30),p(7,Ss,3,0,"div",31),r()),t&2){let e=l.$implicit,i=s(2);o(5),pt(" ",e.room.name," - ",e.roomPrice.configurationId," - ",i.getMealPlan(e.room,e.roomPrice.mealPlanId).name," "),o(),m(i.showPricing()?6:-1),o(),m(i.loading?-1:7)}}function Ts(t,l){if(t&1&&(a(0,"div"),w(1,vs,8,5,"div",0,k),r()),t&2){let e=s();o(),E(e.hotel.selected)}}function Is(t,l){t&1&&u(0,"fa-icon",33)}function ws(t,l){if(t&1&&(a(0,"strong"),p(1,Is,1,0,"fa-icon",33),c(2),r()),t&2){let e=s();o(),m(e.allTravellersInRoom()?1:-1),o(),y(" ",e.getNumberToRoomText()," ")}}function Es(t,l){t&1&&(a(0,"strong"),c(1," This hotel is View Only - we are not authorised to book this property "),r())}function bs(t,l){if(t&1){let e=x();a(0,"app-room",34),C("roomPriceSelected",function(n){_(e);let d=s();return g(d.roomPriceSelected(n))})("dateChange",function(n){_(e);let d=s();return g(d.processDateChange(n))})("syncHotelInformation",function(){_(e);let n=s();return g(n.onSyncHotelInformation())}),r()}if(t&2){let e=l.$implicit,i=s();f("room",e)("passengers",i.getCurrentPassengers(i.hotel))("itineraryItem",i.itineraryItem)("nights",i.nights)("adultsLeft",i.getAdultsLeft())("teensLeft",i.getTeensLeft())("childrenLeft",i.getChildrenLeft())("infantsLeft",i.getInfantsLeft())("warningMessages",i.hotel.warningMessages||Se(16,ms))("syncingHotelInformation",i.syncingHotelInformation)("hotelLastUpdated",i.hotel.lastUpdated)("loading",i.loading)("isViewOnl
1y",i.hotel.isViewOnly)("internalBookingEngine",i.hotel.internalBookingEngine)("ratesAvailable",i.hotel.ratesAvailable)("announcements",i.roomTypeAnnouncements)}}function ks(t,l){t&1&&u(0,"fa-icon",7)}function Ps(t,l){t&1&&u(0,"fa-icon",8)}function Ds(t,l){if(t&1&&(a(0,"div",26),u(1,"fa-icon",35),c(2),r()),t&2){let e=l.$implicit;o(2),y(" ",e)}}function Fs(t,l){if(t&1&&(a(0,"div",26),u(1,"fa-icon",35),c(2),r()),t&2){let e=l.$implicit;o(2),y(" ",e)}}function Vs(t,l){if(t&1&&(a(0,"div",26),u(1,"fa-icon",35),c(2),r()),t&2){let e=l.$implicit;o(2),y(" ",e)}}function Ls(t,l){if(t&1&&(a(0,"div",28)(1,"div",36)(2,"div",37)(3,"div",38)(4,"h3"),u(5,"app-spinner"),c(6),r()()()()()),t&2){let e=s();f("ngClass",ne(2,us,e.adding||e.deleting)),o(6),y(" ",e.adding?"Saving your Selected Room":"Removing Room")}}var vn=(()=>{class t{constructor(){this.allRoomsSelected=new L,this.announcements=[],this.stars=[],this.nights=1,this.roomsCollapsed=!1,this.heroCollapsed=!1,this.moreCollapsed=!0,this.adding=!1,this.deleting=!1,this.syncingHotelInformation=!1,this.hotelsApi=T(Yt),this.itinerariesApi=T(Ve),this.itineraryService=T(M),this.supplierService=T(A)}get minLosWarningMessage(){return this.hotel?.warningMessages?.find(e=>e.includes("minimum length of stay"))||""}ngOnChanges(){this.nights=this.itineraryService.nights(this.itineraryItem),this.stars=[];for(let e=0;e<this.hotel.starRating;e++)this.stars.push(e)}getSupplierName(){return this.hotel.supplierName!=this.supplierService.currentSupplier.name?this.hotel.supplierName:""}showPricing(){return this.itineraryService.showPricing()}processDateChange(e){this.itineraryItem.fromDate=this.itineraryService.convertStringToUtcDate(e),this.itineraryItem.toDate=this.itineraryService.convertStringToUtcDate((0,jt.default)(e).add(this.nights,"days")),this.itineraryItem.products=null,this.itineraryService.saveItineraryItem(this.itineraryItem).subscribe(i=>{this.itineraryService.productSelected(i,this.itineraryItem,null)})}roomPriceSelected(e){this.adding=!0,this.itineraryService.addToCartMultiDay(this.itineraryItem.id,e.roomPrice.priceIds).subscribe(i=>{this.hotel.selected.push(e),this.itineraryService.roomSelected(i,this.itineraryItem,this.allTravellersInRoom()),this.allRoomsSelected.emit(this.allTravellersInRoom()),this.adding=!1})}removeSelectedRoom(e){this.deleting=!0,this.itinerariesApi.removeFromCartMultiDay({itineraryItemId:this.itineraryItem.id,supplierProductItemPriceIds:this.hotel.selected[e].roomPrice.priceIds}).subscribe(i=>{this.hotel.selected.splice(e,1),this.roomsCollapsed=!1,this.itineraryService.roomSelected(i,this.itineraryItem,!1),this.allRoomsSelected.emit(!1),this.deleting=!1})}getHotelRoomTypes(){var e=Math.max(...this.hotel.roomTypes.filter(d=>d.prices).map(d=>Math.max(...d.prices.map(h=>h.price))));this.hotel.roomTypes.filter(d=>d.prices).forEach(d=>{d.prices.length>0?d.priceFrom=Math.min(...d.prices.map(h=>h.price)):d.priceFrom=e});let i=this.hotel.roomTypes.filter(d=>d.available>0);i.some(d=>d.priceFrom>0)&&_e(i,["priceFrom"]);let n=this.hotel.roomTypes.filter(d=>d.available<1);return n.some(d=>d.priceFrom>0)&&_e(n,["priceFrom"]),i.concat(n)}getRoomConfiguration(e,i){return this.itineraryService.getRoomConfiguration(e,i)}getMealPlan(e,i){return this.itineraryService.getMealPlan(e,i)}allTravellersInRoom(){return this.getAdultsLeft()+this.getTeensLeft()+this.getChildrenLeft()+this.getInfantsLeft()<=0}getNumberToRoomText(){if(this.allTravellersInRoom())return"All travellers have a room";let e=this.getAdultsLeft(),i=this.getTeensLeft(),n=this.getChildrenLeft(),d=this.getInfantsLeft(),h="";return e&&(h=e+" Adult"+(e>1?"s":"")),i>0&&(h.length>0&&(h+=e&&n+d?", ":" and "),h+=i+" Teen"+(i>1?"s":"")),n>0&&(h.length>0&&(h+=d?", ":" and "),h+=n+" Child"+(n>1?"ren":"")),d&&(h.length>0&&(h+=" and "),h+=d+" Infant"+(d>1?"s":"")),h+=" to room",h}getAdultsLeft(){let e=0;if(!this.loading&&this.hotel.selected)for(let n of this.hotel.selected)e+=this.getRoomConfiguration(n.room,n.roomPrice.configurationId).noAdults;let i=this.getCurrentPassengers(this.hotel);return i.adults+i.adultsRes-e}getTeensLeft(){let e=0;if(!this.loading&&this.hotel.selected)for(let n of this.hotel.selected)e+=this.getRoomConfiguration(n.room,n.roomPrice.configurationId).noTeens;let i=this.getCurrentPassengers(this.hotel);return i.teen+i.teenRes-e}getChildrenLeft(){let e=0;if(!this.loading&&this.hotel.selected)for(let n of this.hotel.selected)e+=this.getRoomConfiguration(n.room,n.roomPrice.configurationId).noChildren;let i=this.getCurrentPassengers(this.hotel);return i.children+i.childrenRes-e}getInfantsLeft(){let e=0;if(!this.loading&&this.hotel.selected)for(let n of this.hotel.selected)e+=this.getRoomConfiguration(n.room,n.roomPrice.configurationId).noInfants;return this.getCurrentPassengers(this.hotel).infants-e}getCurrentPassengers(e){return e&&"pax"in e?e.pax:this.itineraryService.getTravellersFromItinerary(this.itineraryService.getCurrentItinerary())}get currency(){return this.supplierService.getSelectedCurrency()}onSyncHotelInformation(){this.syncingHotelInformation=!0;let e=(0,jt.default)(this.itineraryItem.fromDate).format("YYYY-MM-DD"),i=(0,jt.default)(this.itineraryItem.toDate).format("YYYY-MM-DD");this.hotelsApi.syncAvailability(this.hotel.id,this.itineraryItem.id,e,i).pipe(te(1)).subscribe(n=>{this.hotel.roomTypes=this.hotel.roomTypes.map(d=>{let h=n.roomTypes.find(({id:I})=>I===d.id);return Me(Ae({},d),{afterToDate:h.afterToDate,beforeFromDate:h.beforeFromDate,duringStay:h.duringStay})}),this.hotel.lastUpdated=n.lastUpdated,this.syncingHotelInformation=!1})}get hotelAnnouncements(){return this.announcements.filter(e=>!e.roomTypeId)}get roomTypeAnnouncements(){return this.announcements.filter(e=>!!e.roomTypeId)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-hotel-detail"]],inputs:{hotel:"hotel",itineraryItem:"itineraryItem",loading:"loading",announcements:"announcements"},outputs:{allRoomsSelected:"allRoomsSelected"},features:[pe],decls:91,vars:34,consts:[[1,"row","product"],[1,"col-12"],[1,"clearfix",3,"click"],[1,"float-left","pr-2"],[1,"text-muted"],["icon","star"],[1,"float-right"],["icon","plus-circle",1,"float-right"],["icon","minus-circle",1,"float-right"],[1,"alert","alert-warning","mt-2","mb-0"],[3,"collapse","isAnimated"],[1,"title"],[1,"row"],[1,"col-md-6"],[3,"photos","galleryId","usePreview"],[1,"col-md-6","mt-3","mt-md-0"],[3,"innerHTML"],[3,"announcements"],[1,"col-md-7","my-auto"],[1,"mt-2",3,"click"],[1,"col-sm-5","my-auto","d-none","d-md-block"],[1,"alert","text-center","m-0"],[3,"room","passengers","itineraryItem","nights","adultsLeft","teensLeft","childrenLeft","infantsLeft","warningMessages","syncingHotelInformation","hotelLastUpdated","loading","isViewOnl
1y","internalBookingEngine","ratesAvailable","announcements"],[3,"click"],[1,"col-sm-4","h6"],[1,"col-sm-8"],[1,"col-md-6","col-lg-4","mt-1","mb-1"],[1,"col-sm-4"],[1,"modal","fade",2,"display","block",3,"ngClass"],[1,"col-sm-7","my-auto"],[1,"col"],[1,"col","text-right","my-auto"],[1,"btn","btn-primary",3,"click"],["icon","check-circle"],[3,"roomPriceSelected","dateChange","syncHotelInformation","room","passengers","itineraryItem","nights","adultsLeft","teensLeft","childrenLeft","infantsLeft","warningMessages","syncingHotelInformation","hotelLastUpdated","loading","isViewOnly","internalBookingEngine","ratesAvailable","announcements"],["icon","chevron-right"],["role","document",1,"modal-dialog","modal-dialog-centered"],[1,"modal-content"],[1,"modal-body","text-center"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),C("click",function(){return n.heroCollapsed=!n.heroCollapsed}),a(3,"h2",3),c(4),r(),a(5,"small",4),w(6,_s,1,0,"fa-icon",5,k),r(),a(8,"h3",6),p(9,gs,1,0,"fa-icon",7),p(10,Cs,1,0,"fa-icon",8),r()(),p(11,fs,3,1,"p",9),a(12,"div",10),p(13,xs,2,1,"p",11),a(14,"p"),c(15),r(),a(16,"div",12)(17,"div",13),u(18,"app-photo-gallery",14),r(),a(19,"div",15),u(20,"span",16)(21,"app-hotel-announcements",17),r()()()()(),p(22,Ts,3,0,"div"),a(23,"div",0)(24,"div",18)(25,"h4",19),C("click",function(){return n.roomsCollapsed=!n.roomsCollapsed}),c(26),r()(),a(27,"div",20)(28,"h6",21),p(29,ws,3,2,"strong"),p(30,Es,2,0,"strong"),r()()(),a(31,"div",10),w(32,bs,1,17,"app-room",22,hs),r(),a(34,"div",0)(35,"div",1)(36,"h4",23),C("click",function(){return n.moreCollapsed=!n.moreCollapsed}),c(37),p(38,ks,1,0,"fa-icon",7),p(39,Ps,1,0,"fa-icon",8),r()()(),a(40,"div",10)(41,"div",0)(42,"div",24),c(43,"Check In"),r(),a(44,"div",25),c(45),r()(),a(46,"div",0)(47,"div",24),c(48,"Check Out"),r(),a(49,"div",25),c(50),r()(),a(51,"div",0)(52,"div",24),c(53,"Location"),r(),a(54,"div",25),c(55),r()(),a(56,"div",0)(57,"div",24),c(58,"Meals Available"),r(),a(59,"div",25)(60,"div",12),w(61,Ds,3,1,"div",26,k),r()()(),a(63,"div",0)(64,"div",24),c(65,"Facilities and Services"),r(),a(66,"div",25)(67,"div",12),w(68,Fs,3,1,"div",26,k),r()()(),a(70,"div",0)(71,"div",24),c(72,"Activities"),r(),a(73,"div",25)(74,"div",12),w(75,Vs,3,1,"div",26,k),r()()(),a(77,"div",0)(78,"div",27)(79,"h6"),c(80,"Reservation Policy"),r(),u(81,"div",16),r(),a(82,"div",27)(83,"h6"),c(84,"Cancellation Policy"),r(),u(85,"div",16),r(),a(86,"div",27)(87,"h6"),c(88,"Child Policy"),r(),u(89,"div",16),r()()(),p(90,Ls,7,4,"div",28)),i&2&&(o(4),S(n.hotel.name),o(2),E(n.stars),o(3),m(n.heroCollapsed?9:-1),o(),m(n.heroCollapsed?-1:10),o(),m(n.minLosWarningMessage?11:-1),o(),f("collapse",n.heroCollapsed)("isAnimated",!0),o(),m(n.getSupplierName()?13:-1),o(2),S(n.hotel.locations?n.hotel.locations[0].location.name:""),o(3),f("photos",n.hotel.photos)("galleryId",n.hotel.id)("usePreview",!0),o(2),f("innerHTML",n.hotel.description,R),o(),f("announcements",n.hotelAnnouncements),o(),m(n.hotel.selected&&n.hotel.selected.length>0?22:-1),o(4),y("",n.hotel.name," Rooms"),o(2),q(n.hotel.isViewOnly?"alert-warning":n.allTravellersInRoom()?"alert-success":"alert-info"),o(),m(n.hotel.isViewOnly?-1:29),o(),m(n.hotel.isViewOnly?30:-1),o(),f("collapse",n.roomsCollapsed)("isAnimated",!0),o(),E(n.getHotelRoomTypes()),o(5),y(" More about ",n.hotel.name," "),o(),m(n.moreCollapsed?38:-1),o(),m(n.moreCollapsed?-1:39),o(),f("collapse",n.moreCollapsed)("isAnimated",!0),o(5),Q("",n.hotel.checkInFrom," - ",n.hotel.checkInTo),o(5),S(n.hotel.checkOut),o(5),S(n.hotel.locations?n.hotel.locations[0].location.name+" ":""),o(6),E(n.hotel.mealPlans),o(7),E(n.hotel.facilities),o(7),E(n.hotel.activities),o(6),f("innerHTML",n.hotel.reservationPolicy,R),o(4),f("innerHTML",n.hotel.cancellationPolicy,R),o(4),f("innerHTML",n.hotel.childPolicy,R),o(),m(n.adding||n.deleting?90:-1))},dependencies:[Fe,j,ct,lt,ae,N,yn,st,Z],styles:[".more[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;border-top:1px solid #f4f4f4}"]})}}return t})();var Zt=ge(Ce(),1);var As=t=>[t];function Ms(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Checking Availability"),r())}function Hs(t,l){if(t&1){let e=x();a(0,"h6",9),C("click",function(){_(e);let n=s(3);return g(n.closeDetail())}),u(1,"fa-icon",10),c(2," Back to the other Hotels "),r()}}function Rs(t,l){if(t&1){let e=x();a(0,"div",11),C("click",function(){_(e);let n=s(3);return g(n.change())}),c(1,"Change"),r()}}function Os(t,l){if(t&1){let e=x();a(0,"div",11),C("click",function(){_(e);let n=s(3);return g(n.cancelChanges())}),c(1,"Cancel Changes"),r()}}function Bs(t,l){if(t&1&&(a(0,"div",8),u(1,"app-hotel-widget",12),r()),t&2){let e=s(3);o(),f("suggestionItineraryItem",e.itineraryItem)("suggestion",!0)}}function Ns(t,l){if(t&1&&(a(0,"div",1)(1,"div",2)(2,"div",3),p(3,Hs,3,0,"h6",4),r(),a(4,"div",5)(5,"h6",6),c(6),p(7,Rs,2,0,"div",7),p(8,Os,2,0,"div",7),r()()(),p(9,Bs,2,2,"div",8),r()),t&2){let e=s(2);o(3),m(e.viewHotel&&(e.itineraryItem.products==null?null:e.itineraryItem.products.length)>1&&!e.showWidget?3:-1),o(3),y(" Search: ",e.getFakeWidgetText()," \xA0 \xA0 "),o(),m(e.showWidget?-1:7),o(),m(e.showWidget?8:-1),o(),m(e.showWidget?9:-1)}}function Ws(t,l){if(t&1){let e=x();a(0,"div",17)(1,"div",20)(2,"label",21),c(3,"Search for a Hotel"),r(),u(4,"fa-icon",22),a(5,"input",23),X("ngModelChange",function(n){_(e);let d=s(4);return z(d.keywords,n)||(d.keywords=n),g(n)}),C("ngModelChange",function(n){_(e);let d=s(4);return g(d.keywordsChanged(n))}),r()()()}if(t&2){let e=s(4);o(5),G("ngModel",e.keywords)}}function Ys(t,l){if(t&1){let e=x();a(0,"a",26),C("keyup.enter",function(){_(e);let n=s(5);return g(n.sortByPrice(!1))})("click",function(){_(e);let n=s(5);return g(n.sortByPrice(!1))}),u(1,"fa-icon",27),r()}}function $s(t,l){if(t&1){let e=x();a(0,"a",26),C("keyup.enter",function(){_(e);let n=s(5);return g(n.sortByPrice(!0))})("click",function(){_(e);let n=s(5);return g(n.sortByPrice(!0))}),u(1,"fa-icon",28),r()}}function js(t,l){if(t&1){let e=x();a(0,"a",26),C("keyup.enter",function(){_(e);let n=s(5);return g(n.sortByName(!1))})("click",function(){_(e);let n=s(5);return g(n.sortByName(!1))}),u(1,"fa-icon",27),r()}}function Us(t,l){if(t&1){let e=x();a(0,"a",26),C("keyup.enter",function(){_(e);let n=s(5);return g(n.sortByName(!0))})("click",function(){_(e);let n=s(5);return g(n.sortByName(!0))}),u(1,"fa-icon",28),r()}}function zs(t,l){if(t&1){let e=x();a(0,"a",24),C("keyup.enter",function(){_(e);let n=s(4);return g(n.sortPrice?n.sortByPrice(!0):n.sortByPrice(!1))})("click",function(){_(e);let n=s(4);return g(n.sortPrice?n.sortByPrice(!0):n.sortByPrice(!1))}),c(1," Price "),r(),p(2,Ys,2,0,"a",25),p(3,$s,2,0,"a",25),a(4,"a",24),C("keyup.enter",function(){_(e);let n=s(4);return g(n.sortName?n.sortByName(!0):n.sortByName(!1))})("click",function(){_(e);let n=s(4);return g(n.sortName?n.sortByName(!0):n.sortByName(!1))}),c(5," Name "),r(),p(6,js,2,0,"a",25),p(7,Us,2,0,"a",25)}if(t&2){let e=s(4);o(2),m(e.sortPriceDesc?2:-1),o(),m(e.sortPrice?3:-1),o(3),m(e.sortNameDesc?6:-1),o(),m(e.sortName?7:-1)}}function qs(t,l){if(t&1){let e=x();a(0,"app-hotel",29),C("showHotel",function(n){_(e);let d=s(4);return g(d.showDetail(n))}),r()}if(t&2){let e=l.$implicit,i=s(4);f("loading",i.cached)("itineraryItem",i.itineraryItem)("hotel",e)("announcements",i.getHotelAnnouncements(e.id))}}function Gs(t,l){if(t&1){let e=x();a(0,"app-hotel",29),C("showHotel",function(n){_(e);let d=s(4);return g(d.showDetail(n))}),r()}if(t&2){let e=l.$implicit,i=s(4);f("loading",i.cached)("itineraryItem",i.itineraryItem)("hotel",e)("announcements",i.getHotelAnnouncements(e.id))}}function Xs(t,l){if(t&1&&(a(0,"div")(1,"div",15)(2,"div",2)(3,"div",16),p(4,Ws,6,1,"div",17),r(),a(5,"div",18),p(6,zs,8,4),r()()(),w(7,qs,1,4,"app-hotel",19,k),F(9,"orderBy"),w(10,Gs,1,4,"app-hotel",19,k),r()),t&2){let e=s(3);o(4),m((e.itineraryItem==null||e.itineraryItem.products==null?null:e.itineraryItem.products.length)>2?4:-1),o(2),m((e.itineraryItem==null||e.itineraryItem.products==null?null:e.itineraryItem.products.length)>2?6:-1),o(),E(V(9,2,e.getHotelProducts(!0),ne(5,As,e.sort()))),o(3),E(e.getHotelProducts(!1))}}function Ks(t,l){if(t&1){let e=x();a(0,"p",30),C("click",function(){_(e);let n=s(3);return g(n.closeDetail())}),u(1,"fa-icon",10),c(2," Back to the other hotels "),r()}}function Qs(t,l){if(t&1){let e=x();a(0,"app-hotel-detail",31),C("allRoomsSelected",function(n){_(e);let d=s(3);return g(d.setAllSelected(n))}),r()}if(t&2){let e=s(3);f("hotel",e.viewHotel)("loading",e.cached)("itineraryItem",e.itineraryItem)("announcements",e.getHotelAnnouncements(e.viewHotel.id))}}function Zs(t,l){if(t&1&&(p(0,Xs,12,7,"div"),p(1,Ks,3,0,"p",13),p(2,Qs,1,4,"app-hotel-detail",14)),t&2){let e=s(2);m(e.viewHotel?-1:0),o(),m(e.viewHotel&&(e.itineraryItem.products==null?null:e.itineraryItem.products.length)>1&&!e.suggestion?1:-1),o(),m(e.viewHotel?2:-1)}}function Js(t,l){if(t&1&&(p(0,Ns,10,5,"div",1),p(1,Zs,3,3)),t&2){let e=s();m(e.suggestion?0:-1),o(),m(e.showWidget?-1:1)}}var Ut=(()=>{class t{constructor(){this.viewHotel=null,this.suggestion=!1,this.hotelAnnouncements=[],this.loading=!0,this.cached=!0,this.showWidget=!1,this.loadingHotels=!0,this.keywords="",this.sortPrice=!0,this.sortName=!1,this.sortPriceDesc=!1,this.sortNameDesc=!1,this.itineraryService=T(M),this.supplierService=T(A),this.hotelsApi=T(Yt),this.route=T(Vt),this.location=T(Pt)}ngOnInit(){this.itineraryItem.keywords&&(this.keywords=this.itineraryItem.keywords),this.getHotels(this.suggestion),this.getHotelsCached(),this.subscription=this.itineraryService.itineraryChanged.subscribe(e=>{this.suggestion&&(this.showWidget=!1,this.cached=!0,this.itineraryItem=e.items.filter(i=>i.id===this.itineraryItem.id)[0],this.itineraryItem.products=[],this.getHotels(!0))})}ngOnDestroy(){this.subscription.unsubscribe()}getFakeWidgetText(){return this.itineraryService.getFakeWidgetText(this.itineraryItem)}change(){this.cloneItineraryItem=Object.assign({},this.itineraryItem),this.showWidget=!0}cancelChanges(){this.itineraryItem=Object.assign({},this.cloneItineraryItem),this.showWidget=!1}sort(){return this.sortPrice?"priceFrom":this.sortPriceDesc?"-priceFrom":this.sortName?"name":"-name"}sortBy(e){_e(this.filteredItems,e)}resetAllSort(){this.sortPrice=this.sortPriceDesc=this.sortName=this.sortNameDesc=!1}sortByPrice(e){this.sortBy([e?"-priceFrom":"priceFrom"]),this.resetAllSort(),e?this.sortPriceDesc=!0:this.sortPrice=!0}sortByName(e){this.sortBy([e?"-name":"name"]),this.resetAllSort(),e?this.sortNameDesc=!0:this.sortName=!0}getHotelsCached(){this.cached&&!this.suggestion?this.supplierService.getHotelSuggestions(this.itinerary?this.itinerary.id:this.itineraryItem.itineraryId,this.itineraryItem.searchLocation.id,(0,Zt.default)(this.itineraryItem.fromDate).format("YYYY-MM-DD"),(0,Zt.default)(this.itineraryItem.toDate).format("YYYY-MM-DD")).subscribe(e=>{this.cached&&(this.itineraryItem.products=e.hotels,this.itineraryItem.products&&this.itineraryItem.products.length===1?this.viewHotel=this.itineraryItem.products[0]:this.getFilteredItems()),this.loading=!1}):this.loading=!1}keywordsChanged(e){this.keywords=e,this.getFilteredItems()}getHotels(e){!this.itineraryItem.products||this.itineraryItem.products.length<1?(this.loadingHotels=!0,e&&this.viewHotel?this.getHotelsDetail(this.viewHotel.id):this.hotelsApi.getHotelsList(this.itineraryItem.id).pipe(te(1)).subscribe(i=>{this.itineraryItem.products=i,this.processHotelProducts(!0),this.viewHotel||(this.cached=!1),this.loadingHotels=!1})):(this.processHotelProducts(!1),this.cached=!1,this.loadingHotels=!1)}getHotelsDetail(e){this.loadingHotels=!0;let i=this.itineraryItem.products.filter(n=>n.id==e)[0];i&&(this.viewHotel=i),this.cached=!0,this.hotelsApi.getHotelsDetails(this.itineraryItem.id,e).pipe(te(1)).subscribe(n=>{if(this.itineraryItem.products==null||!this.itineraryItem.products.length)this.viewHotel=this.itineraryItem.products[0]=n.filter(d=>d.id==e)[0];else{let d=this.itineraryItem.products.findIndex(h=>h.id==e);this.viewHotel=this.itineraryItem.products[d]=n.filter(h=>h.id==e)[0]}this.cached=!1,this.viewHotel?(this.processHotelProducts(!1),sessionStorage.setItem(this.itineraryItem.id+"viewingHotelId",this.viewHotel.id)):this.closeDetail(),this.loadingHotels=!1})}processHotelProducts(e){this.itineraryItem.keywords&&(this.keywords=this.itineraryItem.keywords),this.getFilteredItems(),this.itineraryService.populateSelectedRooms(this.itineraryItem),e&&this.redirectToViewHotel()}getFilteredItems(){this.keywords?this.filteredItems=this.itineraryItem.products.filter(e=>e.selected&&e.selected.length>0||e.name.toLowerCase().includes(this.keywords.toLowerCase())):this.filteredItems=this.itineraryItem.products}redirectToViewHotel(){if(this.itineraryItem.products&&this.itineraryItem.products.length===1)this.getHotelsDetail(this.itineraryItem.products[0].id);else if(this.itineraryItem.products)if(this.itineraryItem.products.some(e=>e.selected&&e.selected.length>0))this.getHotelsDetail(this.itineraryItem.products.filter(e=>e.selected&&e.selected.length>0)[0].id),sessionStorage.setItem(this.itineraryItem.id+"viewingHotelId",this.viewHotel.id);else{let e=sessionStorage.getItem(this.itineraryItem.id+"viewingHotelId");this.itineraryItem.products.some(i=>i.id==e)?this.getHotelsDetail(e):sessionStorage.removeItem(this.itineraryItem.id+"viewingHotelId")}}
1showDetail(e){this.getHotelsDetail(e.id),setTimeout(()=>{this.location.replaceState(`/search/${this.route.snapshot.paramMap.get("id")}/0/${e.id}`)},0)}closeDetail(){this.viewHotel=null,sessionStorage.removeItem(this.itineraryItem.id+"viewingHotelId"),this.location.replaceState(`/search/${this.route.snapshot.paramMap.get("id")}/0`)}setAllSelected(e){this.itineraryItem.allSelected=e}getHotelProducts(e){return this.filteredItems.filter(i=>e?i.priceFrom>0:!i.priceFrom)}getHotelAnnouncements(e){return this.hotelAnnouncements.filter(i=>i.hotelId===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-hotels"]],inputs:{itinerary:"itinerary",itineraryItem:"itineraryItem",viewHotel:"viewHotel",suggestion:"suggestion",hotelAnnouncements:"hotelAnnouncements"},decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[1,"sticky-top","white-back","border","p-3","mb-2"],[1,"row"],[1,"col-sm-4","my-auto"],[1,"pointer","mb-0"],[1,"col-sm","text-right"],[1,"mb-0"],[1,"btn","btn-primary","btn-sm"],[1,"widget","search","mt-2"],[1,"pointer","mb-0",3,"click"],["icon","arrow-circle-left"],[1,"btn","btn-primary","btn-sm",3,"click"],[3,"suggestionItineraryItem","suggestion"],[1,"otherHotels"],[3,"hotel","loading","itineraryItem","announcements"],[1,"filter","nowrap",2,"padding","0"],[1,"col-md","text-md-left"],[1,"widget","search"],[1,"col-md-3","text-center","my-auto"],[3,"loading","itineraryItem","hotel","announcements"],[1,"form-group"],["for","keywords"],["icon","search"],["type","text","placeholder","A hotel name",1,"form-control","border-top-0","border-bottom-0",2,"border-color","rgba(19, 23, 65, 0.2)",3,"ngModelChange","ngModel"],["tabindex","0",1,"pointer",3,"keyup.enter","click"],["tabindex","0"],["tabindex","0",3,"keyup.enter","click"],["icon","caret-up"],["icon","caret-down"],[3,"showHotel","loading","itineraryItem","hotel","announcements"],[1,"otherHotels",3,"click"],[3,"allRoomsSelected","hotel","loading","itineraryItem","announcements"]],template:function(i,n){i&1&&(p(0,Ms,3,0,"h2",0),p(1,Js,2,2)),i&2&&(m(n.loading||n.loadingHotels?0:-1),o(),m(!n.loading&&!n.loadingHotels?1:-1))},dependencies:[ue,We,me,fe,j,N,xn,vn,Gi,ve],styles:[".otherHotels[_ngcontent-%COMP%]{cursor:pointer;text-align:center;padding-top:10px;margin-bottom:-10px}.ng-fa-icon[_ngcontent-%COMP%]{padding-right:4px}"]})}}return t})();function el(t,l){if(t&1&&(a(0,"tr")(1,"td"),c(2),r(),a(3,"td"),c(4),r(),a(5,"td",7),c(6),r()()),t&2){let e=l.$implicit;o(2),S(e.productType.productName),o(2),S(e.searchLocation==null?null:e.searchLocation.name),o(2),S(e.noDays)}}function tl(t,l){if(t&1&&(a(0,"div",5)(1,"table",6)(2,"thead")(3,"tr"),u(4,"th"),a(5,"th"),c(6,"Location"),r(),a(7,"th"),c(8,"Days"),r()()(),a(9,"tbody"),w(10,el,7,3,"tr",null,k),r()()()),t&2){let e=s();o(10),E(e.package.items)}}var Tn=(()=>{class t{constructor(){}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-package-details"]],inputs:{package:"package"},decls:11,vars:6,consts:[[1,"container","p-3"],[1,"row"],[1,"col-md"],[3,"innerHtml"],[3,"noEntityPhotos","galleryId","usePreview"],[1,"col","my-auto"],[1,"table","table-hover","booking"],[1,"text-center"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),c(4),r(),u(5,"div",3),r(),a(6,"div",2),u(7,"app-photo-gallery",4),r()(),u(8,"hr"),a(9,"div",1),p(10,tl,12,0,"div",5),r()()),i&2&&(o(4),S(n.package.name),o(),f("innerHtml",n.package.description,R),o(2),f("noEntityPhotos",n.package.photos)("galleryId",n.package.id)("usePreview",!0),o(3),m(n.package.items?10:-1))},dependencies:[ae],encapsulation:2})}}return t})();function il(t,l){if(t&1){let e=x();a(0,"li",4)(1,"label",5)(2,"input",6),X("ngModelChange",function(n){let d=_(e).$implicit,h=s();return z(h.filters.comfortLevels[d.key],n)||(h.filters.comfortLevels[d.key]=n),g(n)}),C("ngModelChange",function(){_(e);let n=s();return g(n.onFilter())}),r(),a(3,"span"),c(4),r()()()}if(t&2){let e=l.$implicit,i=s();o(2),G("ngModel",i.filters.comfortLevels[e.key]),o(2),Q("",e.value," (",i.comfortLevelsCounts[e.key],")")}}function nl(t,l){if(t&1){let e=x();a(0,"li",4)(1,"label",5)(2,"input",6),X("ngModelChange",function(n){let d=_(e).$implicit,h=s();return z(h.filters.packageTypes[d.id],n)||(h.filters.packageTypes[d.id]=n),g(n)}),C("ngModelChange",function(){_(e);let n=s();return g(n.onFilter())}),r(),a(3,"span"),c(4),r()()()}if(t&2){let e=l.$implicit,i=s();o(2),G("ngModel",i.filters.packageTypes[e.id]),o(2),Q("",e.name," (",i.packageTypesCounts[e.id],")")}}var In=(()=>{class t{constructor(){this.packages=[],this.filter=new L,this.filters={tourLengthFrom:0,tourLengthTo:0,ratesFrom:0,ratesTo:0,comfortLevels:{},packageTypes:{}},this.tourLengthOptions={floor:0,ceil:0},this.ratesOptions={floor:0,ceil:0,step:50},this.comfortLevelsEnum=qt,this.comfortLevelsCounts={},this.packageTypes=[],this.packageTypesCounts={}}ngOnInit(){this.initTourLengthFilter(),this.initRateFilter(),this.initComfortLevelFilters(),this.initPackageTypesFilters()}initTourLengthFilter(){let[e,i]=this.packages.reduce((n,d)=>{let h=d.items.reduce((I,D)=>I+D.noDays,0);return[n[0]&&n[0]<h?n[0]:h,n[1]&&n[1]>h?n[1]:h]},[0,0]);this.tourLengthOptions.floor=e,this.tourLengthOptions.ceil=i,this.filters.tourLengthFrom=e,this.filters.tourLengthTo=i}initRateFilter(){let[e,i]=this.packages.reduce((n,d)=>
1[n[0]&&n[0]<d.price?n[0]:d.price,n[1]&&n[1]>d.price?n[1]:d.price],[0,0]);this.ratesOptions.floor=e,this.ratesOptions.ceil=i,this.filters.ratesFrom=e,this.filters.ratesTo=i}initComfortLevelFilters(){let e=Object.keys(qt);this.filters.comfortLevels=e.reduce((i,n)=>Me(Ae({},i),{[n]:!1}),{}),this.comfortLevelsCounts=e.reduce((i,n)=>Me(Ae({},i),{[n]:this.packages.filter(d=>n===d.comfortLevel).length}),{})}initPackageTypesFilters(){let e=this.packages.reduce((i,n)=>[...i,...n.packageTypes],[]);this.packageTypes=Xi(e,"id"),this.filters.packageTypes=this.packageTypes.reduce((i,n)=>Me(Ae({},i),{[n.id]:!1}),{}),this.packageTypesCounts=e.reduce((i,n)=>Me(Ae({},i),{[n.id]:i[n.id]?i[n.id]+1:1}),{})}onFilter(){this.filter.emit(this.filters)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-package-aside-filters"]],inputs:{packages:"packages",currency:"currency"},outputs:{filter:"filter"},decls:31,vars:12,consts:[[1,"aside-filter"],[1,"filter-slider",3,"valueChange","highValueChange","value","highValue","options"],[1,"d-flex","justify-content-between"],[1,"mb-3"],[1,"list-group"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"h4"),c(2,"Tour Length"),r(),a(3,"ngx-slider",1),X("valueChange",function(h){return z(n.filters.tourLengthFrom,h)||(n.filters.tourLengthFrom=h),h})("highValueChange",function(h){return z(n.filters.tourLengthTo,h)||(n.filters.tourLengthTo=h),h}),C("valueChange",function(){return n.onFilter()})("highValueChange",function(){return n.onFilter()}),r(),a(4,"div",2)(5,"span"),c(6),r(),a(7,"span"),c(8),r()()(),a(9,"div",0)(10,"h4"),c(11,"Rates"),r(),a(12,"ngx-slider",1),X("valueChange",function(h){return z(n.filters.ratesFrom,h)||(n.filters.ratesFrom=h),h})("highValueChange",function(h){return z(n.filters.ratesTo,h)||(n.filters.ratesTo=h),h}),C("valueChange",function(){return n.onFilter()})("highValueChange",function(){return n.onFilter()}),r(),a(13,"div",2)(14,"span"),c(15),r(),a(16,"span"),c(17),r()()(),a(18,"div",0)(19,"h4",3),c(20,"Comfort Level"),r(),a(21,"ul",4),w(22,il,5,3,"li",4,k),F(24,"keyvalue"),r()(),a(25,"div",0)(26,"h4",3),c(27,"Package Types"),r(),a(28,"ul",4),w(29,nl,5,3,"li",4,k),r()()),i&2&&(o(3),G("value",n.filters.tourLengthFrom)("highValue",n.filters.tourLengthTo),f("options",n.tourLengthOptions),o(3),S(n.filters.tourLengthFrom+" "+(n.filters.tourLengthFrom===1?"day":"days")),o(2),y("",n.filters.tourLengthTo," days"),o(4),G("value",n.filters.ratesFrom)("highValue",n.filters.ratesTo),f("options",n.ratesOptions),o(3),S(n.filters.ratesFrom+" "+n.currency.name),o(2),S(n.filters.ratesTo+" "+n.currency.name),o(5),E(ot(24,10,n.comfortLevelsEnum)),o(7),E(n.packageTypes))},dependencies:[ue,Ne,me,fe,Rt,Bi,_i],styles:["[_nghost-%COMP%]{flex:0 1 30%;padding:10px 20px;border-right:1px solid rgba(19,23,65,.2)}[_nghost-%COMP%] .aside-filter[_ngcontent-%COMP%]{margin:15px 0 25px;padding-bottom:25px;border-bottom:1px solid rgba(19,23,65,.2)}"]})}}return t})();var wn=ge(Ce(),1);function ol(t,l){if(t&1&&(a(0,"tr")(1,"td"),c(2),r(),a(3,"td"),c(4),r(),a(5,"td",12),c(6),r()()),t&2){let e=l.$implicit;o(2),S(e.productType.productName),o(2),S(e.searchLocation==null?null:e.searchLocation.name),o(2),S(e.noDays)}}function rl(t,l){if(t&1&&(a(0,"div",9)(1,"table",11)(2,"thead")(3,"tr"),u(4,"th"),a(5,"th"),c(6,"Location"),r(),a(7,"th"),c(8,"Days"),r()()(),a(9,"tbody"),w(10,ol,7,3,"tr",null,k),r()()()),t&2){let e=s();o(10),E(e.package.items)}}function al(t,l){t&1&&(a(0,"h3",13),c(1,"Free to Reserve"),r())}function sl(t,l){if(t&1&&(a(0,"h3",13),c(1),a(2,"span",15),c(3),r()()),t&2){let e=s(2);o(),y(" ",e.convertedCurrency," "),o(2),S(e.selectedCurrency.name)}}function ll(t,l){if(t&1){let e=x();a(0,"div",10),p(1,al,2,0,"h3",13),p(2,sl,4,2,"h3",13),a(3,"button",14),C("click",function(){_(e);let n=s();return g(n.viewPackage())}),c(4,"VIEW"),r()()}if(t&2){let e=s();o(),m(e.package.price==0?1:-1),o(),m(e.package.price!=0?2:-1)}}var En=(()=>{class t{constructor(){this.announcements=[],this.viewSelected=new L,this.itineraryService=T(M),this.supplierService=T(A)}ngOnInit(){this.setPackageDates(),this.showPricing=this.itineraryService.showPricing(),this.selectedCurrency=this.supplierService.getSelectedCurrency(),this.convertedCurrency=this.supplierService.convertSelectedCurrency(this.package.price)}viewPackage(){this.viewSelected.emit(this.package)}getDate(e){return(0,wn.default)(e).format("DD MMM YYYY")}setPackageDates(){let e=this.getDate(this.package.validFrom),i=this.getDate(this.package.validTo);this.packageDates=`Valid from ${e} to ${i}`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-package"]],inputs:{package:"package",announcements:"announcements"},outputs:{viewSelected:"viewSelected"},decls:13,vars:9,consts:[[1,"row","product"],[1,"col-lg-5"],[3,"noEntityPhotos","galleryId","usePreview"],[1,"col-lg-7"],[1,"mt-3","mt-lg-0"],[1,"opacity-4"],[3,"innerHTML"],[3,"announcements"],[1,"row"],[1,"col","my-auto"],[1,"col","col-sm-3","my-auto","text-right"],[1,"table","table-hover","booking"],[1,"text-center"],[1,"fw-600","mb-0"],[1,"btn","btn-primary","mt-3",3,"click"],[1,"m-sm"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"div",1),u(2,"app-photo-gallery",2),r(),a(3,"div",3)(4,"h4",4),c(5),r(),a(6,"p",5),c(7),r(),u(8,"span",6)(9,"app-product-announcements",7),a(10,"div",8),p(11,rl,12,0,"div",9),p(12,ll,5,2,"div",10),r()()()),i&2&&(o(2),f("noEntityPhotos",n.package.photos)("galleryId",n.package.id)("usePreview",!0),o(3),S(n.package.name),o(2),S(n.packageDates),o(),f("innerHTML",n.package.description,R),o(),f("announcements",n.announcements),o(2),m(n.package.items?11:-1),o(),m(n.showPricing?12:-1))},dependencies:[ae,ze],encapsulation:2})}}return t})();function cl(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading Packages"),r())}function dl(t,l){if(t&1){let e=x();a(0,"h5",2),C("click",function(){_(e);let n=s(2);return g(n.closeDetail())}),u(1,"fa-icon",3),c(2),r(),u(3,"hr")(4,"app-package-details",4),a(5,"button",5),C("click",function(){_(e);let n=s(2);return g(n.closeDetail())}),c(6,"View all packages"),r()}if(t&2){let e=s(2);o(2),y(" ",e.multiAddition()?"Change / Select More":"Back to the Other"," Experiences "),o(2),f("package",e.viewPackage)}}function pl(t,l){if(t&1){let e=x();a(0,"app-package-aside-filters",10),C("filter",function(n){_(e);let d=s(3);return g(d.onFilter(n))}),r()}if(t&2){let e=s(3);f("currency",e.currency)("packages",e.packages)}}function ml(t,l){if(t&1){let e=x();a(0,"a",12),C("click",function(){_(e);let n=s(2).$implicit,d=s(3);return g(d.sortBy(n.name,!1))}),u(1,"fa-icon",13),r()}}function ul(t,l){if(t&1){let e=x();a(0,"a",12),C("click",function(){_(e);let n=s(2).$implicit,d=s(3);return g(d.sortBy(n.name,!0))}),u(1,"fa-icon",14),r()}}function hl(t,l){if(t&1&&(p(0,ml,2,0,"a"),p(1,ul,2,0,"a")),t&2){let e=s(4);m(e.sortedField.desc?0:-1),o(),m(e.sortedField.desc?-1:1)}}function _l(t,l){if(t&1){let e=x();a(0,"a",11),C("click",function(){let n=_(e).$implicit,d=s(3);return g(d.sortBy(n.name,!d.sortedField.desc))}),c(1),r(),p(2,hl,2,2)}if(t&2){let e=l.$implicit,i=s(3);o(),S(e.title),o(),m(e.name===i.sortedField.name?2:-1)}}function gl(t,l){if(t&1){let e=x();a(0,"app-package",15),C("viewSelected",function(n){_(e);let d=s(3);return g(d.viewPackageDetails(n))}),r()}if(t&2){let e=l.$implicit,i=s(3);f("package",e)("announcements",i.getProductAnnouncements(e.id))}}function Cl(t,l){if(t&1&&(a(0,"div",1),p(1,pl,1,2,"app-package-aside-filters",6),a(2,"div",7)(3,"div",8),w(4,_l,3,2,null,null,k),r(),w(6,gl,1,2,"app-package",9,k),r()()),t&2){let e=s(2);o(),m(e.packages.length?1:-1),o(3),E(e.sortFields),o(2),E(e.filteredPackages)}}function fl(t,l){if(t&1&&(p(0,dl,7,2),p(1,Cl,8,1,"div",1)),t&2){let e=s();m(e.viewPackage?0:-1),o(),m(e.viewPackage?-1:1)}}var bn=(()=>{class t{constructor(){this.productAnnouncements=[],this.sortedField={name:"name",desc:!1},this.sortFields=[{title:"Name",name:"name"},{title:"Price",name:"price"},{title:"Valid from",name:"validFrom"},{title:"Valid to",name:"validTo"}],this.filters={},this.loading=!0,this.supplierService=T(A),this.packagesApi=T(Ai)}ngOnInit(){this.getPackages()}getPackages(){this.packagesApi.getPackagesTiny(this.supplierService.currentSupplier.id,!0).pipe(te(1)).subscribe(e=>{this.packages=e,this.filter(),this.loading=!1})}get currency(){return this.supplierService.currentSupplier.currencies.filter(e=>e.isBase)[0].currency}viewPackageDetails(e){this.viewPackage=e}closeDetail(){this.viewPackage=null}multiAddition(){return this.supplierService.currentSupplier.settings.obeAddItems}sortBy(e,i){let n=this.getSortStringFroOrderByPipe(e,i);_e(this.packages,n),this.filter(),this.sortedField={name:e,desc:i}}filter(){this.filteredPackages=this.packages.filter(e=>{let i=!1;
1for(let[n,d]of Object.entries(this.filters)){switch(n){case"tourLengthFrom":i=d&&this.getPackageTotalDays(e)>=d;break;case"tourLengthTo":i=d&&this.getPackageTotalDays(e)<=d;break;case"ratesFrom":i=d&&e.price>=d;break;case"ratesTo":i=d&&e.price<=d;break;case"comfortLevels":i=this.isAnyCheckboxChecked(d)?d[e.comfortLevel]:!0;break;case"packageTypes":i=this.isAnyCheckboxChecked(d)?e.packageTypes.some(({id:h})=>d[h]):!0;break;default:i=!0}if(!i)return!1}return!0})}isAnyCheckboxChecked(e){return Object.values(e).some(Boolean)}getPackageTotalDays(e){return e.items.reduce((i,n)=>i+n.noDays,0)}getSortStringFroOrderByPipe(e,i){switch(e){case"price":return[i?"-price":"price","-validFrom"];case"validFrom":return[i?"-validFrom":"validFrom","price"];case"validTo":return[i?"-validTo":"validTo","price"];default:return[i?"-name":"name","-validFrom"]}}onFilter(e){this.filters=e,this.filter()}getProductAnnouncements(e){return this.productAnnouncements.filter(i=>i.productId===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-packages"]],inputs:{itinerary:"itinerary",itineraryItem:"itineraryItem",productAnnouncements:"productAnnouncements"},decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[1,"d-flex"],[1,"otherHotels",3,"click"],["icon","arrow-circle-left"],[3,"package"],[1,"ml-3","mb-4","btn","btn-icon",3,"click"],[3,"currency","packages"],[1,"w-100"],[1,"filter","nowrap"],[3,"package","announcements"],[3,"filter","currency","packages"],[1,"pointer",3,"click"],[3,"click"],["icon","caret-up"],["icon","caret-down"],[3,"viewSelected","package","announcements"]],template:function(i,n){i&1&&(p(0,cl,3,0,"h2",0),p(1,fl,2,2)),i&2&&(m(n.loading?0:-1),o(),m(n.loading?-1:1))},dependencies:[Tn,In,En,N,j],styles:[".otherHotels[_ngcontent-%COMP%]{cursor:pointer;text-align:center;padding-top:15px;margin-bottom:-5px}"]})}}return t})();var v=ge(Ce(),1);var et=ge(Ce(),1);var Pn=["*"],xl=t=>({display:t});function yl(t,l){if(t&1){let e=x();a(0,"li",6),C("click",function(){let n=_(e).$index,d=s(2);return g(d.selectSlide(n))}),r()}if(t&2){let e=l.$implicit;ie("active",e.active===!0)}}function Sl(t,l){if(t&1&&(a(0,"ol",1),w(1,yl,1,2,"li",5,k),r()),t&2){let e=s();o(),E(e.indicatorsSlides())}}function vl(t,l){if(t&1){let e=x();a(0,"button",8),C("click",function(){let n=_(e).$index,d=s(2);return g(d.selectSlide(n))}),r()}if(t&2){let e=l.$implicit,i=l.$index,n=s(2);ie("active",e.active===!0),Pe("data-bs-target","#carousel"+n.currentId)("data-bs-slide-to",i)}}function Tl(t,l){if(t&1&&(a(0,"div",1),w(1,vl,1,4,"button",7,k),r()),t&2){let e=s();o(),E(e.indicatorsSlides())}}function Il(t,l){if(t&1){let e=x();a(0,"a",9),C("click",function(){_(e);let n=s();return g(n.previousSlide())}),u(1,"span",10),a(2,"span",11),c(3,"Previous"),r()()}if(t&2){let e=s();ie("disabled",e.checkDisabledClass("prev")),Pe("data-bs-target","#carousel"+e.currentId)}}function wl(t,l){if(t&1){let e=x();a(0,"a",12),C("click",function(){_(e);let n=s();return g(n.nextSlide())}),u(1,"span",13),a(2,"span",11),c(3,"Next"),r()()}if(t&2){let e=s();ie("disabled",e.checkDisabledClass("next")),Pe("data-bs-target","#carousel"+e.currentId)}}var El=(()=>{class t{constructor(){this.interval=5e3,this.noPause=!1,this.noWrap=!1,this.showIndicators=!0,this.pauseOnFocus=!1,this.indicatorsByChunk=!1,this.itemsPerSlide=1,this.singleSlideOffset=!1}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ft({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function bl(t,l){let e=t.length;for(;e--;)if(l(t[e],e,t))return e;return-1}function kl(t,l){let e=[],i=Math.ceil(t.length/l),n=0;for(;n<i;){let d=t.splice(0,n===i-1&&l<t.length?t.length:l);e.push(d),n++}return e}function kn(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}var ye=(function(t){return t[t.UNKNOWN=0]="UNKNOWN",t[t.NEXT=1]="NEXT",t[t.PREV=2]="PREV",t})(ye||{}),Pl=1,we=(()=>{class t{get slides(){return this._slides.toArray()}get isFirstSlideVisible(){let e=this.getVisibleIndexes();return!e||e instanceof Array&&!e.length?!1:e.includes(0)}get isLastSlideVisible(){let e=this.getVisibleIndexes();return!e||e instanceof Array&&!e.length?!1:e.includes(this._slides.length-1)}get activeSlide(){return this._currentActiveSlide||0}set activeSlide(e){this.multilist||(kn(e)&&(this.customActiveSlide=e),this._slides.length&&e!==this._currentActiveSlide&&this._select(e))}get _bsVer(){return Mi()}constructor(e,i,n){this._config=e,this.cdr=i,this.platformId=n,this.noWrap=$(this._config.noWrap),this.noPause=$(this._config.noPause),this.showIndicators=$(this._config.showIndicators),this.pauseOnFocus=$(this._config.pauseOnFocus),this.indicatorsByChunk=$(this._config.indicatorsByChunk),this.itemsPerSlide=$(this._config.itemsPerSlide),this.singleSlideOffset=$(this._config.singleSlideOffset),this.isAnimated=$(!1),this.activeSlideChange=De(),this.slideRangeChange=De(),this.activeSlideInput=$(0,{alias:"activeSlide"}),this.startFromIndex=$(0),this.interval=$(this._config.interval),this._slides=new Hi,this._currentVisibleSlidesIndex=0,this.isPlaying=!1,this.destroyed=!1,this._indicatorsByChunk=!1,this.currentId=0,this.getActive=d=>d.active,this.makeSlidesConsistent=d=>{d.forEach((h,I)=>h.item.order=I)},this.currentId=Pl++,He(()=>{let d=this.activeSlideInput();this.multilist||(kn(d)&&(this.customActiveSlide=d),this._slides.length&&d!==this._currentActiveSlide&&this._select(d))}),He(()=>{let d=this.interval();this.restartTimer()})}ngAfterViewInit(){setTimeout(()=>{this.singleSlideOffset()?this._indicatorsByChunk=!1:this._indicatorsByChunk=this.indicatorsByChunk(),this.multilist&&(this._chunkedSlides=kl(this.mapSlidesAndIndexes(),this.itemsPerSlide()),this.selectInitialSlides()),this.customActiveSlide&&!this.multilist&&this._select(this.customActiveSlide)},0)}ngOnDestroy(){this.destroyed=!0,this.resetTimer()}
1addSlide(e){this._slides.add(e),this.multilist&&this._slides.length<=this.itemsPerSlide()&&(e.active=!0),!this.multilist&&this.isAnimated()&&(e.isAnimated=!0),!this.multilist&&this._slides.length===1&&(this._currentActiveSlide=void 0,this.customActiveSlide||(this.activeSlide=0),this.play()),this.multilist&&this._slides.length>this.itemsPerSlide()&&this.play()}removeSlide(e){let i=this._slides.indexOf(e);if(this._currentActiveSlide===i){let n;this._slides.length>1&&(n=this.isLast(i)?this.noWrap()?i-1:0:i),this._slides.remove(i),setTimeout(()=>{this._select(n)},0)}else{this._slides.remove(i);let n=this.getCurrentSlideIndex();setTimeout(()=>{this._currentActiveSlide=n,this.activeSlideChange.emit(this._currentActiveSlide)},0)}}nextSlideFromInterval(e=!1){this.move(ye.NEXT,e)}nextSlide(e=!1){this.isPlaying&&this.restartTimer(),this.move(ye.NEXT,e)}previousSlide(e=!1){this.isPlaying&&this.restartTimer(),this.move(ye.PREV,e)}getFirstVisibleIndex(){return this.slides.findIndex(this.getActive)}getLastVisibleIndex(){return bl(this.slides,this.getActive)}move(e,i=!1){let n=this.getFirstVisibleIndex(),d=this.getLastVisibleIndex();this.noWrap()&&(e===ye.NEXT&&this.isLast(d)||e===ye.PREV&&n===0)||(this.multilist?this.moveMultilist(e):this.activeSlide=this.findNextSlideIndex(e,i)||0)}keydownPress(e){if(e.keyCode===13||e.key==="Enter"||e.keyCode===32||e.key==="Space"){this.nextSlide(),e.preventDefault();return}if(e.keyCode===37||e.key==="LeftArrow"){this.previousSlide();return}if(e.keyCode===39||e.key==="RightArrow"){this.nextSlide();return}}onMouseLeave(){this.pauseOnFocus()||this.play()}onMouseUp(){this.pauseOnFocus()||this.play()}pauseFocusIn(){this.pauseOnFocus()&&(this.isPlaying=!1,this.resetTimer())}pauseFocusOut(){this.play()}selectSlide(e){this.isPlaying&&this.restartTimer(),this.multilist?this.selectSlideRange(this._indicatorsByChunk?e*this.itemsPerSlide():e):this.activeSlide=this._indicatorsByChunk?e*this.itemsPerSlide():e}play(){this.isPlaying||(this.isPlaying=!0,this.restartTimer())}pause(){this.noPause()||(this.isPlaying=!1,this.resetTimer())}getCurrentSlideIndex(){return this._slides.findIndex(this.getActive)}isLast(e){return e+1>=this._slides.length}isFirst(e){return e===0}indicatorsSlides(){return this.slides.filter((e,i)=>!this._indicatorsByChunk||i%this.itemsPerSlide()===0)}selectInitialSlides(){let e=this.startFromIndex()<=this._slides.length?this.startFromIndex():0;if(this.hideSlides(),this.singleSlideOffset()){if(this._slidesWithIndexes=this.mapSlidesAndIndexes(),this._slides.length-e<this.itemsPerSlide()){let i=this._slidesWithIndexes.slice(0,e);this._slidesWithIndexes=[...this._slidesWithIndexes,...i].slice(i.length).slice(0,this.itemsPerSlide())}else this._slidesWithIndexes=this._slidesWithIndexes.slice(e,e+this.itemsPerSlide());this._slidesWithIndexes.forEach(i=>i.item.active=!0),this.makeSlidesConsistent(this._slidesWithIndexes)}else this.selectRangeByNestedIndex(e);this.slideRangeChange.emit(this.getVisibleIndexes())}findNextSlideIndex(e,i){let n=0;if(!(!i&&this.isLast(this.activeSlide)&&e!==ye.PREV&&this.noWrap())){switch(e){case ye.NEXT:if(typeof this._currentActiveSlide>"u"){n=0;break}if(!this.isLast(this._currentActiveSlide)){n=this._currentActiveSlide+1;break}n=!i&&this.noWrap()?this._currentActiveSlide:0;break;case ye.PREV:if(typeof this._currentActiveSlide>"u"){n=0;break}if(this._currentActiveSlide>0){n=this._currentActiveSlide-1;break}if(!i&&this.noWrap()){n=this._currentActiveSlide;break}n=this._slides.length-1;break;default:throw new Error("Unknown direction")}return n}}mapSlidesAndIndexes(){return this.slides.slice().map((e,i)=>({index:i,item:e}))}selectSlideRange(e){if(!this.isIndexInRange(e)){if(this.hideSlides(),!this.singleSlideOffset())this.selectRangeByNestedIndex(e);else{let i=this.isIndexOnTheEdges(e)?e:e-this.itemsPerSlide()+1,n=this.isIndexOnTheEdges(e)?e+this.itemsPerSlide():e+1;this._slidesWithIndexes=this.mapSlidesAndIndexes().slice(i,n),this.makeSlidesConsistent(this._slidesWithIndexes),this._slidesWithIndexes.forEach(d=>d.item.active=!0)}this.slideRangeChange.emit(this.getVisibleIndexes())}}selectRangeByNestedIndex(e){if(!this._chunkedSlides)return;let i=this._chunkedSlides.map((n,d)=>({index:d,list:n})).find(n=>n.list.find(d=>d.index===e)!==void 0);i&&(this._currentVisibleSlidesIndex=i.index,this._chunkedSlides[i.index].forEac
1h(n=>{n.item.active=!0}))}isIndexOnTheEdges(e){return e+1-this.itemsPerSlide()<=0||e+this.itemsPerSlide()<=this._slides.length}isIndexInRange(e){return this.singleSlideOffset()&&this._slidesWithIndexes?this._slidesWithIndexes.map(n=>n.index).indexOf(e)>=0:e<=this.getLastVisibleIndex()&&e>=this.getFirstVisibleIndex()}hideSlides(){this.slides.forEach(e=>e.active=!1)}isVisibleSlideListLast(){return this._chunkedSlides?this._currentVisibleSlidesIndex===this._chunkedSlides.length-1:!1}isVisibleSlideListFirst(){return this._currentVisibleSlidesIndex===0}moveSliderByOneItem(e){let i,n,d,h;if(this.noWrap()){i=this.getFirstVisibleIndex(),n=this.getLastVisibleIndex(),d=e===ye.NEXT?i:n,h=e!==ye.NEXT?i-1:this.isLast(n)?0:n+1;let D=this._slides.get(d);D&&(D.active=!1);let U=this._slides.get(h);U&&(U.active=!0);let b=this.mapSlidesAndIndexes().filter(H=>H.item.active);this.makeSlidesConsistent(b),this.singleSlideOffset()&&(this._slidesWithIndexes=b),this.slideRangeChange.emit(this.getVisibleIndexes());return}if(!this._slidesWithIndexes||!this._slidesWithIndexes[0])return;let I;if(i=this._slidesWithIndexes[0].index,n=this._slidesWithIndexes[this._slidesWithIndexes.length-1].index,e===ye.NEXT){this._slidesWithIndexes.shift(),I=this.isLast(n)?0:n+1;let D=this._slides.get(I);D&&this._slidesWithIndexes.push({index:I,item:D})}else{this._slidesWithIndexes.pop(),I=this.isFirst(i)?this._slides.length-1:i-1;let D=this._slides.get(I);D&&(this._slidesWithIndexes=[{index:I,item:D},...this._slidesWithIndexes])}this.hideSlides(),this._slidesWithIndexes.forEach(D=>D.item.active=!0),this.makeSlidesConsistent(this._slidesWithIndexes),this.slideRangeChange.emit(this._slidesWithIndexes.map(D=>D.index))}moveMultilist(e){this.singleSlideOffset()?this.moveSliderByOneItem(e):(this.hideSlides(),this.noWrap()?this._currentVisibleSlidesIndex=e===ye.NEXT?this._currentVisibleSlidesIndex+1:this._currentVisibleSlidesIndex-1:e===ye.NEXT?this._currentVisibleSlidesIndex=this.isVisibleSlideListLast()?0:this._currentVisibleSlidesIndex+1:this.isVisibleSlideListFirst()?this._currentVisibleSlidesIndex=this._chunkedSlides?this._chunkedSlides.length-1:0:this._currentVisibleSlidesIndex=this._currentVisibleSlidesIndex-1,this._chunkedSlides&&this._chunkedSlides[this._currentVisibleSlidesIndex].forEach(i=>i.item.active=!0),this.slideRangeChange.emit(this.getVisibleIndexes()))}getVisibleIndexes(){if(!this.singleSlideOffset()&&this._chunkedSlides)return this._chunkedSlides[this._currentVisibleSlidesIndex].map(e=>e.index);if(this._slidesWithIndexes)return this._slidesWithIndexes.map(e=>e.index)}_select(e){if(isNaN(e)){this.pause();return}if(!this.multilist&&typeof this._currentActiveSlide<"u"){let n=this._slides.get(this._currentActiveSlide);typeof n<"u"&&(n.active=!1)}let i=this._slides.get(e);typeof i<"u"&&(this._currentActiveSlide=e,i.active=!0,this.activeSlideChange.emit(e),this.cdr.markForCheck())}restartTimer(){this.resetTimer();let e=+this.interval();!isNaN(e)&&e>0&&gi(this.platformId)&&(this.currentInterval=window.setInterval(()=>{let i=+this.interval();this.isPlaying&&!isNaN(i)&&i>0&&this.slides.length?(this.nextSlideFromInterval(),this.cdr.markForCheck()):this.pause()},e))}get multilist(){return this.itemsPerSlide()>1}resetTimer(){this.currentInterval&&(clearInterval(this.currentInterval),this.currentInterval=void 0)}checkDisabledClass(e){return e==="prev"?this.activeSlide===0&&this.noWrap()&&!this.multilist||this.isFirstSlideVisible&&this.noWrap()&&this.multilist:this.isLast(this.activeSlide)&&this.noWrap()&&!this.multilist||this.isLastSlideVisible&&this.noWrap()&&this.multilist}static{this.\u0275fac=function(i){return new(i||t)(Ie(El),Ie(hi),Ie(ai))}}static{this.\u0275cmp=P({type:t,selectors:[["carousel"]],inputs:{noWrap:[1,"noWrap"],noPause:[1,"noPause"],showIndicators:[1,"showIndicators"],pauseOnFocus:[1,"pauseOnFocus"],indicatorsByChunk:[1,"indicatorsByChunk"],itemsPerSlide:[1,"itemsPerSlide"],singleSlideOffset:[1,"singleSlideOffset"],isAnimated:[1,"isAnimated"],activeSlideInput:[1,"activeSlide","activeSlideInput"],startFromIndex:[1,"startFromIndex"],interval:[1,"interval"]},outputs:{activeSlideChange:"activeSlideChange",slideRangeChange:"slideRangeChange"},ngContentSelectors:Pn,decls:7,vars:8,consts:[["tabindex","0",1,"carousel","slide",3,"mouseenter","mouseleave","mouseup","keydown","focusin","focusout","id"],[1,"carousel-indicators"],[1,"carousel-inner",3,"ngStyle"],["href","javascript:void(0);","tabindex","0","role","button",1,"left","carousel-control","carousel-control-prev",3,"disabled"],["href","javascript:void(0);","tabindex","0","role","button",1,"right","carousel-control","carousel-control-next",3,"disabled"],[3,"active"],[3,"click"],["type","button","aria-current","true",3,"active"],["type","button","aria-current","true",3,"click"],["href","javascript:void(0);","tabindex","0","role","button",1,"left","carousel-control","carousel-control-prev",3,"click"],["aria-hidden","true",1,"icon-prev","carousel-control-prev-icon"],[1,"sr-only","visually-hidden"],["href","javascript:void(0);","tabindex","0","role","button",1,"right","carousel-control","carousel-control-next",3,"click"],["aria-hidden","true",1,"icon-next","carousel-control-next-icon"]],template:function(i,n){i&1&&(nt(),a(0,"div",0),C("mouseenter",function(){return n.pause()})("mouseleave",function(){return n.onMouseLeave()})("mouseup",function(){return n.onMouseUp()})("keydown",function(h){return n.keydownPress(h)})("focusin",function(){return n.pauseFocusIn()})("focusout",function(){return n.pauseFocusOut()}),p(1,Sl,3,0,"ol",1),p(2,Tl,3,0,"div",1),a(3,"div",2),Ze(4),r(),p(5,Il,4,3,"a",3),p(6,wl,4,3,"a",4),r()),i&2&&(f("id","carousel"+n.currentId),o(),m(!n._bsVer.isBs5&&n.showIndicators()&&n.slides.length>1?1:-1),o(),m(n._bsVer.isBs5&&n.showIndicators()&&n.slides.length>1?2:-1),o(),f("ngStyle",ne(6,xl,n.multilist?"flex":"block")),o(2),m(n.slides.length>1?5:-1),o(),m(n.slides.length>1?6:-1))},dependencies:[Dt],encapsulation:2})}}return t})(),Le=(()=>{class t{constructor(e){this.active=!1,this.activeInput=$(void 0,{alias:"active"}),this.itemWidth="100%",this.order=0,this.isAnimated=!1,this.addClass=!0,this.multilist=!1,this.carousel=e,He(()=>{let i=this.activeInput();i!==void 0&&(this.active=i)})}ngOnInit(){this.carousel.addSlide(this),this.itemWidth=`${100/this.carousel.itemsPerSlide()}%`,this.multilist=this.carousel?.itemsPerSlide()>1}ngOnDestroy(){this.carousel.removeSlide(this)}static{this.\u0275fac=function(i){return new(i||t)(Ie(we))}}static{this.\u0275cmp=P({type:t,selectors:[["slide"]],hostVars:15,hostBindings:function(i,n){i&2&&(Pe("aria-hidden",!n.active),Tt("width",n.itemWidth)("order",n.order),ie("multilist-margin",n.multilist)("active",n.active)("carousel-animation",n.isAnimated)("item",n.addClass)("carousel-item",n.addClass))},inputs:{activeInput:[1,"active","activeInput"]},ngContentSelectors:Pn,decls:2,vars:2,consts:[[1,"item"]],template:function(i,n){i&1&&(nt(),Ke(0,"div",0),Ze(1),Qe()),i&2&&ie("active",n.active)},styles:[".carousel-animation[_nghost-%COMP%]{transition:opacity .6s ease,visibility .6s ease;float:left}.carousel-animation.active[_nghost-%COMP%]{opacity:1;visibility:visible}.carousel-animation[_nghost-%COMP%]:not(.active){display:block;position:absolute;opacity:0;visibility:hidden}.multilist-margin[_nghost-%COMP%]{margin-right:auto}.carousel-item[_nghost-%COMP%]{perspective:1000px}"]})}}return t})(),Te=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=it({type:t})}static{this.\u0275inj=tt({})}}return t})();var Dl=()=>["price"];function Fl(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading Experiences"),r())}
1function Vl(t,l){if(t&1&&(a(0,"h5",7),c(1),r()),t&2){let e=s().$implicit,i=s(2);o(),S(i.getOwner(e))}}function Ll(t,l){if(t&1&&(a(0,"h5",8)(1,"span",9),c(2,"from "),r(),c(3),a(4,"span",9),c(5),u(6,"br"),c(7," per adult"),r()()),t&2){let e=s().$implicit,i=s(2);o(3),y("",i.getPriceAdult(e)," "),o(2),S(i.getCurrency())}}function Al(t,l){if(t&1){let e=x();a(0,"slide")(1,"div",2)(2,"div",3),C("click",function(){let n=_(e).$implicit,d=s(2);return g(d.selectExperience(n))}),a(3,"div",4)(4,"div",5)(5,"h5",6),c(6),r(),p(7,Vl,2,1,"h5",7),p(8,Ll,8,2,"h5",8),r()()()()()}if(t&2){let e=l.$implicit,i=s(2);o(2),Be(i.getPhoto(e)),o(4),S(i.getName(e)),o(),m(i.getOwner(e)?7:-1),o(),m(i.showPricing()&&e.price>0?8:-1)}}function Ml(t,l){if(t&1&&(a(0,"carousel",1),w(1,Al,9,5,"slide",null,k),F(3,"orderBy"),r()),t&2){let e=s();f("itemsPerSlide",e.itemsPerSlide)("singleSlideOffset",e.singleSlideOffset)("noWrap",!e.noWrap),o(),E(V(3,3,e.currentItemSuggestion.products,Se(6,Dl)))}}var Dn=(()=>{class t{constructor(){this.experienceSelected=new L,this.itineraryItemChanged=new L,this.itemsPerSlide=4,this.singleSlideOffset=!0,this.noWrap=!0,this.tabletBreakpoint=768,this.mobileBreakpoint=480,this.loading=!0,this.started=!1,this.itineraryService=T(M),this.supplierService=T(A)}ngOnChanges(){this.started||(this.getExperiences(),this.adjustsItemsPerSlide())}adjustsItemsPerSlide(){this.innerWidth=window.innerWidth,this.innerWidth<this.mobileBreakpoint?this.itemsPerSlide=1:this.innerWidth<this.tabletBreakpoint?this.itemsPerSlide=2:this.itemsPerSlide=4}showPricing(){return this.itineraryService.showPricing()}getExperiences(){this.started=!0;var e=(0,et.default)(this.currentItemSuggestion.fromDate).isValid()?(0,et.default)(this.currentItemSuggestion.fromDate).format("YYYY-MM-DD"):(0,et.default)(this.currentItemSuggestion.toDate).format("YYYY-MM-DD"),i=(0,et.default)(this.currentItemSuggestion.toDate).isValid()?(0,et.default)(this.currentItemSuggestion.toDate).format("YYYY-MM-DD"):(0,et.default)(this.currentItemSuggestion.fromDate).format("YYYY-MM-DD");this.supplierService.getExperienceSuggestions(this.itinerary.id,this.currentItemSuggestion.searchLocation.id,e,i).subscribe(n=>{this.itinerary.items.some(d=>d.id==n.id)||(this.itinerary.items.push(n),this.itineraryService.itineraryChanged.next(this.itinerary)),this.currentItemSuggestion.id=n.id,this.currentItemSuggestion.adults=n.adults?n.adults:this.itinerary.adults,this.currentItemSuggestion.adultsRes=n.adultsRes?n.adultsRes:this.itinerary.adultsRes,this.currentItemSuggestion.children=n.children?n.children:this.itinerary.children,this.currentItemSuggestion.childrenRes=n.childrenRes?n.childrenRes:this.itinerary.childrenRes,this.currentItemSuggestion.infants=n.infants?n.infants:this.itinerary.infants,this.currentItemSuggestion.products=n.products,this.started=this.loading=!1})}getPhoto(e){return'background-image: url("'+this.supplierService.getImageUrl(e.photos[0]?.photo?.url,!0)+'");'}getName(e){let i=e.name;return i.length>36?i.substring(0,36)+"...":i}getOwner(e){return e.owner?"By "+e.owner:""}getPriceAdult(e){return this.supplierService.convertSelectedCurrency(e.price/(this.currentItemSuggestion.adults+this.currentItemSuggestion.adultsRes+this.currentItemSuggestion.children+this.currentItemSuggestion.childrenRes))}getCurrency(){return this.supplierService.getSelectedCurrency().name}selectExperience(e){this.experienceSelected.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-experience-suggestion"]],inputs:{currentItemSuggestion:"currentItemSuggestion",itinerary:"itinerary"},outputs:{experienceSelected:"experienceSelected",itineraryItemChanged:"itineraryItemChanged"},features:[pe],decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[3,"itemsPerSlide","singleSlideOffset","noWrap"],[1,"slide-container","slide"],[1,"hero","pointer",3,"click"],[1,"hero-blur"],[1,"carousel-caption"],[1,"fw-600"],[1,"fw-600","sm"],[1,"fw-600","nowrap"],[1,"m-sm"]],template:function(i,n){i&1&&(p(0,Fl,3,0,"h2",0),p(1,Ml,4,7,"carousel",1)),i&2&&(m(n.loading?0:-1),o(),m(n.loading?-1:1))},dependencies:[Te,Le,we,N,ve],encapsulation:2})}}return t})();var Hl=()=>["price"];function Rl(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading Car Hire"),r())}
1function Ol(t,l){if(t&1&&(a(0,"h5",7),c(1),r()),t&2){let e=s().$implicit,i=s(2);o(),S(i.getOwner(e))}}function Bl(t,l){if(t&1&&(a(0,"h5",8)(1,"span",9),c(2,"from "),r(),c(3),a(4,"span",9),c(5),r()()),t&2){let e=s().$implicit,i=s(2);o(3),y("",i.getPrice(e)," "),o(2),S(i.getCurrency())}}function Nl(t,l){if(t&1){let e=x();a(0,"slide")(1,"div",2)(2,"div",3),C("click",function(){let n=_(e).$implicit,d=s(2);return g(d.selectCarHire(n))}),a(3,"div",4)(4,"div",5)(5,"h5",6),c(6),r(),p(7,Ol,2,1,"h5",7),p(8,Bl,6,2,"h5",8),r()()()()()}if(t&2){let e=l.$implicit,i=s(2);o(2),Be(i.getPhoto(e)),o(4),S(i.getName(e)),o(),m(i.getOwner(e)?7:-1),o(),m(i.showPricing()&&e.price>0?8:-1)}}function Wl(t,l){if(t&1&&(a(0,"carousel",1),w(1,Nl,9,5,"slide",null,k),F(3,"orderBy"),r()),t&2){let e=s();f("itemsPerSlide",e.itemsPerSlide)("singleSlideOffset",e.singleSlideOffset)("noWrap",!e.noWrap),o(),E(V(3,3,e.currentItemSuggestion.products,Se(6,Hl)))}}var Fn=(()=>{class t{constructor(){this.carHireSelected=new L,this.itineraryItemChanged=new L,this.itemsPerSlide=4,this.singleSlideOffset=!0,this.noWrap=!0,this.tabletBreakpoint=768,this.mobileBreakpoint=480,this.loading=!0,this.itineraryService=T(M),this.supplierService=T(A)}ngOnChanges(){this.loading=!0,this.getCarHire(),this.adjustsItemsPerSlide()}adjustsItemsPerSlide(){this.innerWidth=window.innerWidth,this.innerWidth<this.mobileBreakpoint?this.itemsPerSlide=1:this.innerWidth<this.tabletBreakpoint?this.itemsPerSlide=2:this.itemsPerSlide=4}showPricing(){return this.itineraryService.showPricing()}getCarHire(){this.supplierService.getCarHireSuggestions(this.itinerary.id,this.currentItemSuggestion.searchLocation.id,this.currentItemSuggestion.fromDate.format("YYYY-MM-DD"),this.currentItemSuggestion.toDate.format("YYYY-MM-DD")).subscribe(e=>{this.itinerary.items.some(i=>i.id==e.id)||(this.itinerary.items.push(e),this.itineraryService.itineraryChanged.next(this.itinerary)),this.currentItemSuggestion.id=e.id,this.currentItemSuggestion.adults=e.adults?e.adults:this.itinerary.adults,this.currentItemSuggestion.adultsRes=e.adultsRes?e.adultsRes:this.itinerary.adultsRes,this.currentItemSuggestion.children=e.children?e.children:this.itinerary.children,this.currentItemSuggestion.childrenRes=e.childrenRes?e.childrenRes:this.itinerary.childrenRes,this.currentItemSuggestion.infants=e.infants?e.infants:this.itinerary.infants,this.currentItemSuggestion.products=e.products,this.loading=!1})}getPhoto(e){return'background-image: url("'+this.supplierService.getImageUrl(e.photos[0]?.photo?.url,!0)+'");'}getName(e){let i=e.shortName?e.shortName:e.name;return i.length>30?i.substring(0,30)+"...":i}getOwner(e){return e.owner?"By "+e.owner:""}getPrice(e){return this.supplierService.convertSelectedCurrency(e.price)}getCurrency(){return this.supplierService.getSelectedCurrency().name}selectCarHire(e){this.carHireSelected.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-car-hire-suggestion"]],inputs:{currentItemSuggestion:"currentItemSuggestion",itinerary:"itinerary"},outputs:{carHireSelected:"carHireSelected",itineraryItemChanged:"itineraryItemChanged"},features:[pe],decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[3,"itemsPerSlide","singleSlideOffset","noWrap"],[1,"slide-container","slide"],[1,"hero","pointer",3,"click"],[1,"hero-blur"],[1,"carousel-caption"],[1,"fw-600"],[1,"fw-600","m-sm"],[1,"fw-600","nowrap"],[1,"m-sm"]],template:function(i,n){i&1&&(p(0,Rl,3,0,"h2",0),p(1,Wl,4,7,"carousel",1)),i&2&&(m(n.loading?0:-1),o(),m(n.loading?-1:1))},dependencies:[Te,Le,we,N,ve],encapsulation:2})}}return t})();var Yl=()=>["price"];function $l(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading Hotels"),r())}function jl(t,l){if(t&1&&(a(0,"h5",7)(1,"span",8),c(2,"from "),r(),c(3),a(4,"span",8),c(5),r(),u(6,"br"),c(7," per night "),r()),t&2){let e=s().$implicit,i=s(2);o(3),y("",i.getPriceNight(e)," "),o(2),S(i.getCurrency())}}function Ul(t,l){if(t&1){let e=x();a(0,"slide")(1,"div",2)(2,"div",3),C("click",function(){let n=_(e).$implicit,d=s(2);return g(d.selectHotel(n))}),a(3,"div",4)(4,"div",5)(5,"h5",6),c(6),r(),p(7,jl,8,2,"h5",7),r()()()()()}if(t&2){let e=l.$implicit,i=s(2);o(2),Be(i.getPhoto(e)),o(4),S(i.getName(e)),o(),m(i.showPricing()&&e.priceFrom>0?7:-1)}}function zl(t,l){if(t&1&&(a(0,"carousel",1),w(1,Ul,8,4,"slide",null,k),F(3,"orderBy"),r()),t&2){let e=s();f("itemsPerSlide",e.itemsPerSlide)("singleSlideOffset",e.singleSlideOffset)("noWrap",!e.noWrap),o(),E(V(3,3,e.currentItemSuggestion.products,Se(6,Yl)))}}var Vn=(()=>{class t{constructor(){this.hotelSelected=new L,this.itineraryItemChanged=new L,this.itemsPerSlide=4,this.singleSlideOffset=!0,this.noWrap=!0,this.tabletBreakp
1oint=768,this.mobileBreakpoint=480,this.loading=!0,this.itineraryService=T(M),this.supplierService=T(A)}ngOnChanges(){this.loading=!0,this.getHotels(),this.adjustsItemsPerSlide()}adjustsItemsPerSlide(){this.innerWidth=window.innerWidth,this.innerWidth<this.mobileBreakpoint?this.itemsPerSlide=1:this.innerWidth<this.tabletBreakpoint?this.itemsPerSlide=2:this.itemsPerSlide=4}showPricing(){return this.itineraryService.showPricing()}getHotels(){this.supplierService.getHotelSuggestions(this.itinerary.id,this.currentItemSuggestion.searchLocation.id,this.currentItemSuggestion.fromDate.format("YYYY-MM-DD"),this.currentItemSuggestion.toDate.format("YYYY-MM-DD")).subscribe(e=>{this.itinerary.items.some(i=>i.id==e.id)||(this.itinerary.items.push(e),this.itineraryService.itineraryChanged.next(this.itinerary)),this.currentItemSuggestion.id=e.id,this.currentItemSuggestion.adults=e.adults?e.adults:this.itinerary.adults,this.currentItemSuggestion.adultsRes=e.adultsRes?e.adultsRes:this.itinerary.adultsRes,this.currentItemSuggestion.children=e.children?e.children:this.itinerary.children,this.currentItemSuggestion.childrenRes=e.childrenRes?e.childrenRes:this.itinerary.childrenRes,this.currentItemSuggestion.infants=e.infants?e.infants:this.itinerary.infants,this.currentItemSuggestion.products=e.hotels,this.loading=!1})}getPhoto(e){return'background-image: url("'+this.supplierService.getImageUrl(e.photos[0]?.photo?.url,!0)+'");'}getName(e){let i=e.name;return i.length>30?i.substring(0,30)+"...":i}getPriceNight(e){return this.supplierService.convertSelectedCurrency(e.priceFrom)}getCurrency(){return this.supplierService.getSelectedCurrency().name}selectHotel(e){this.currentItemSuggestion.products=[],this.hotelSelected.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-hotel-suggestion"]],inputs:{currentItemSuggestion:"currentItemSuggestion",itinerary:"itinerary"},outputs:{hotelSelected:"hotelSelected",itineraryItemChanged:"itineraryItemChanged"},features:[pe],decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[3,"itemsPerSlide","singleSlideOffset","noWrap"],[1,"slide-container","slide"],[1,"hero","pointer",3,"click"],[1,"hero-blur"],[1,"carousel-caption"],[1,"fw-600"],[1,"fw-600","nowrap"],[1,"m-sm"]],template:function(i,n){i&1&&(p(0,$l,3,0,"h2",0),p(1,zl,4,7,"carousel",1)),i&2&&(m(n.loading?0:-1),o(),m(n.loading?-1:1))},dependencies:[Te,Le,we,N,ve],encapsulation:2})}}return t})();var Re=ge(Ce(),1);var ql=()=>["price"];function Gl(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading Flights"),r())}function Xl(t,l){if(t&1&&(a(0,"h6",7)(1,"span",8),c(2,"from "),r(),c(3),a(4,"span",8),c(5),r()()),t&2){let e=s().$implicit,i=s(2);o(3),y("",i.getPriceAdult(e)," "),o(2),y("",i.getCurrency()," per adult")}}function Kl(t,l){if(t&1){let e=x();a(0,"slide")(1,"div",2)(2,"div",3),C("click",function(){let n=_(e).$implicit,d=s(2);return g(d.selectFlight(n))}),a(3,"div",4),u(4,"img",5),a(5,"h6",6),c(6),r(),p(7,Xl,6,2,"h6",7),r()()()()}if(t&2){let e=l.$implicit,i=s(2);o(4),f("src",i.getPhoto(e),ke),o(2),S(i.getName(e)),o(),m(i.showPricing()&&e.price>0?7:-1)}}function Ql(t,l){if(t&1&&(a(0,"carousel",1),w(1,Kl,8,3,"slide",null,k),F(3,"orderBy"),r()),t&2){let e=s();f("itemsPerSlide",e.itemsPerSlide)("singleSlideOffset",e.singleSlideOffset)("noWrap",!e.noWrap),o(),E(V(3,3,e.currentItemSuggestion.products,Se(6,ql)))}}var Ln=(()=>{class t{constructor(){this.flightSelected=new L,this.itineraryItemChanged=new L,this.flightService=T(at),this.itineraryService=T(M),this.supplierService=T(A),this.itemsPerSlide=4,this.singleSlideOffset=!0,this.noWrap=!0,this.tabletBreakpoint=768,this.mobileBreakpoint=480,this.loading=!0,this.destroyRef=T(xt),this.fetch$=new ii,this.lastRequestKey=null,this.fetch$.pipe(ri(e=>this.supplierService.getFlightSuggestions(e.itineraryId,e.originId,e.fromDate)),ut(this.destroyRef)).subscribe(e=>this.applyFlights(e))}ngOnChanges(){this.adjustsItemsPerSlide(),this.getFlights()}adjustsItemsPerSlide(){this.innerWidth=window.innerWidth,this.innerWidth<this.mobileBreakpoint?this.itemsPerSlide=1:this.innerWidth<this.tabletBreakp
1oint?this.itemsPerSlide=2:this.itemsPerSlide=4}showPricing(){return this.itineraryService.showPricing()}getFlights(){let e=(0,Re.default)(this.currentItemSuggestion.fromDate),i=(0,Re.default)(this.currentItemSuggestion.toDate);if(!(0,Re.default)(i).isValid()&&(0,Re.default)(e).isValid()&&(i=(0,Re.default)(e).add(1,"days")),!(0,Re.default)(e).isValid()&&(0,Re.default)(i).isValid()&&(e=(0,Re.default)(i).add(-1,"days")),!this.currentItemSuggestion.origin){this.loading=!1;return}let n={itineraryId:this.itinerary.id,originId:this.currentItemSuggestion.origin.id,fromDate:e.format("YYYY-MM-DD")},d=`${n.itineraryId}|${n.originId}|${n.fromDate}`;d!==this.lastRequestKey&&(this.lastRequestKey=d,this.loading=!0,this.fetch$.next(n))}applyFlights(e){this.itinerary.items.some(i=>i.id==e.id)||(this.itinerary.items.push(e),this.itineraryService.itineraryChanged.next(this.itinerary)),this.currentItemSuggestion.id=e.id,this.currentItemSuggestion.adults=e.adults?e.adults:this.itinerary.adults,this.currentItemSuggestion.adultsRes=e.adultsRes?e.adultsRes:this.itinerary.adultsRes,this.currentItemSuggestion.children=e.children?e.children:this.itinerary.children,this.currentItemSuggestion.childrenRes=e.childrenRes?e.childrenRes:this.itinerary.childrenRes,this.currentItemSuggestion.infants=e.infants?e.infants:this.itinerary.infants,this.currentItemSuggestion.products=e.flights,this.loading=!1}getPhoto(e){return this.supplierService.getImageUrl(e.owner.logo,!0,!0)}getName(e){return e.supplierProduct.name}getPriceAdult(e,i=!1){return this.flightService.getPrice(e,i)}getCurrency(){return this.supplierService.getSelectedCurrency().name}selectFlight(e){this.flightSelected.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-flight-suggestion"]],inputs:{currentItemSuggestion:"currentItemSuggestion",itinerary:"itinerary"},outputs:{flightSelected:"flightSelected",itineraryItemChanged:"itineraryItemChanged"},features:[kt([at]),pe],decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[3,"itemsPerSlide","singleSlideOffset","noWrap"],[1,"slide-container","slide"],[1,"pointer",3,"click"],[1,"carousel-caption"],["height","25",3,"src"],[1,"mt-3","fw-600"],[1,"fw-600","nowrap"],[1,"m-sm"]],template:function(i,n){i&1&&(p(0,Gl,3,0,"h2",0),p(1,Ql,4,7,"carousel",1)),i&2&&(m(n.loading?0:-1),o(),m(n.loading?-1:1))},dependencies:[Te,Le,we,N,ve],encapsulation:2})}}return t})();function Zl(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading Transfers"),r())}function Jl(t,l){if(t&1&&(a(0,"h6",7)(1,"span",8),c(2,"from "),r(),c(3),a(4,"span",8),c(5),r()()),t&2){let e=s().$implicit,i=s(2);o(3),y("",i.getPriceAdult(e)," "),o(2),S(i.getCurrency())}}function ec(t,l){if(t&1){let e=x();a(0,"slide")(1,"div",2)(2,"div",3),C("click",function(){let n=_(e).$implicit,d=s(2);return g(d.selectTransfer(n))}),a(3,"div",4),u(4,"img",5)(5,"div",6),p(6,Jl,6,2,"h6",7),r()()()()}if(t&2){let e=l.$implicit,i=s(2);o(4),f("src",i.getPhoto(e.products[0]),ke),o(),f("innerHtml",i.getTransferSuggestionString(e),R),o(),m(i.showPricing()&&e.price>0?6:-1)}}function tc(t,l){if(t&1&&(a(0,"carousel",1),w(1,ec,7,3,"slide",null,k),r()),t&2){let e=s();f("itemsPerSlide",e.itemsPerSlide)("singleSlideOffset",e.singleSlideOffset)("noWrap",!e.noWrap)("interval",!1),o(),E(e.filteredTransferSuggestions)}}var An=(()=>{class t{constructor(){this.transferSelected=new L,this.itineraryItemChanged=new L,this.itemsPerSlide=4,this.singleSlideOffset=!0,this.noWrap=!0,this.tabletBreakpoint=768,this.mobileBreakpoint=480,this.loaded=0,this.itineraryService=T(M),this.supplierService=T(A),this.filteredTransferSuggestions=[]}ngOnInit(){this.getTransfers(),this.adjustsItemsPerSlide()}adjustsItemsPerSlide(){this.innerWidth=window.innerWidth,this.innerWidth<this.mobileBreakpoint?this.itemsPerSlide=1:this.innerWidth<this.tabletBreakpoint?this.itemsPerSlide=2:this.itemsPerSlide=4}getTransfers(){this.transferSuggestions.forEach(e=>{this.filteredTransferSuggestions.push(e),e.isPickup=this.itineraryService.isPickup(e),e.products=[],this.getCheapestTransfer(e)})}showPricing(){return this.itineraryService.showPricing()}getPhoto(e){return this.supplierService.getImageUrl(e?.photos[0]?.photo?.url,!0)}getName(e){let i=e.name;return i.length>36?i.substring(0,36)+"...":i}getTransferSuggestionString(e){let i="",n=this.supplierService.currentSupplier.tabs.filter(I=>I.productType.id===B.Transfer)[0],d=!this.supplierService.currentSupplier.settings.transferPointToPoint&&e.originSupplierLocation,h="";return n&&(h=d?n.suggestionDescription2:n.suggestionDescription),h&&h.length>0?i='<h5 class="fw-600">'+h+"</h5>":(i='<h5 class="fw-600">Need a ',e.isPickup?i+="pickup from "+e.originSupplierLocation?.name:i+="drop off to "+e.destinationSupplierLocation?.name,i+=" on "+this.itineraryService.getDate(e.fromDate?e.fromDate:e.toDate,"DD MMM")+"?</h5>"),i}getCheapestTransfer(e){let i=null,n=null,d=null,h=null;e.originSupplierLocation?(d=e.originSupplierLocation.id,i=this.itineraryService.convertStringToTime(e.toDate)):(h=e.destinationSupplierLocation.id,n=this.itineraryService.convertStringToTime(e.fromDate)),this.supplierService.getCheapestTransfer(this.itinerary.id,d,h,i,n).subscribe(I=>{I?e.products.push(I):(e.suggestionDismissed=!0,this.filteredTransferSuggestions.splice(this.filteredTransferSuggestions.indexOf(e),1)),this.loaded++})}getPriceAdult(e){return this.supplierService.convertSelectedCurrency(e.price)}getCurrency(){return this.supplierService.getSelectedCurrency().name}selectTransfer(e){this.transferSelected.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-point-to-point-transfer-suggestions"]],inputs:{transferSuggestions:"transferSuggestions",itinerary:"itinerary"},outputs:{transferSelected:"transferSelected",itineraryItemChanged:"itineraryItemChanged"},decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[3,"itemsPerSlide","singleSlideOffset","noWrap","interval"],[1,"slide-container","slide"],[1,"pointer",3,"click"],[1,"carousel-caption"],["width","80",1,"mb-2",3,"src"],[3,"innerHtml"],[1,"nowrap","fw-600"],[1,"m-sm"]],template:function(i,n){i&1&&(p(0,Zl,3,0,"h2",0),p(1,tc,3,4,"carousel",1)),i&2&&(m(n.loaded<n.filteredTransferSuggestions.length?0:-1),o(),m(n.loaded>=n.filteredTransferSuggestions.length?1:-1))},dependencies:[Te,Le,we,N],encapsulation:2})}}return t})();var se=ge(Ce(),1);function ic(t,l){t&1&&(a(0,"h2",0),u(1,"app-spinner"),c(2," Loading"),r())}function nc(t,l){if(t&1&&(a(0,"div",11),u(1,"img",14),r()),t&2){let e=s(3);
1o(),f("src",e.getImageUrl(e.cheapestVehiclePic),ke)}}function oc(t,l){if(t&1&&u(0,"div",12),t&2){let e=s(3);f("innerHTML",e.getTransferSuggestionString(),R)}}function rc(t,l){t&1&&(a(0,"h3",13),u(1,"app-spinner"),c(2," Adding Transfers"),r())}function ac(t,l){if(t&1&&(a(0,"div",1)(1,"div",3),p(2,nc,2,1,"div",11),a(3,"div",4),p(4,oc,1,1,"div",12),p(5,rc,3,0,"h3",13),r()()()),t&2){let e=s(2);o(2),m(e.cheapestVehiclePic?2:-1),o(2),m(e.loading?-1:4),o(),m(e.loading?5:-1)}}function sc(t,l){t&1&&(a(0,"span",6),c(1," - No Results Found!"),r())}function lc(t,l){if(t&1){let e=x();a(0,"div",8)(1,"p",15),c(2,"Pickup Time"),r(),a(3,"div",16)(4,"input",17),X("ngModelChange",function(n){_(e);let d=s(2);return z(d.specifyPickupTime,n)||(d.specifyPickupTime=n),g(n)}),C("change",function(){_(e);let n=s(2);return g(n.timingChanged())}),r()(),c(5," \xA0 "),r()}if(t&2){let e=s(2);o(4),G("ngModel",e.specifyPickupTime)}}function cc(t,l){if(t&1&&(a(0,"option",20),c(1),r()),t&2){let e=l.$implicit;f("value",e),o(),y(" ",e," ")}}function dc(t,l){if(t&1){let e=x();a(0,"div",9)(1,"label",18),c(2,"Pickup Time"),r(),a(3,"select",19),X("ngModelChange",function(n){_(e);let d=s(2);return z(d.pickupTime,n)||(d.pickupTime=n),g(n)}),C("ngModelChange",function(){_(e);let n=s(2);return g(n.timingChanged())}),w(4,cc,2,2,"option",20,k),r()()}if(t&2){let e=s(2);o(3),G("ngModel",e.pickupTime),o(),E(e.timeList)}}function pc(t,l){if(t&1&&(a(0,"div",10)(1,"p",15),c(2,"Pickup"),r(),u(3,"h5",21),r()),t&2){let e=s(2);o(3),f("innerHTML",e.getTiming(!0),R)}}
1function mc(t,l){if(t&1&&(a(0,"option",20),c(1),r()),t&2){let e=l.$implicit;f("value",e),o(),y(" ",e," ")}}function uc(t,l){if(t&1){let e=x();a(0,"div",9)(1,"label",22),c(2,"Drop Off Time"),r(),a(3,"select",19),X("ngModelChange",function(n){_(e);let d=s(2);return z(d.dropOffTime,n)||(d.dropOffTime=n),g(n)}),C("ngModelChange",function(){_(e);let n=s(2);return g(n.timingChanged())}),w(4,mc,2,2,"option",20,k),r()()}if(t&2){let e=s(2);o(3),G("ngModel",e.dropOffTime),o(),E(e.timeList)}}function hc(t,l){if(t&1&&(a(0,"div",10)(1,"p",15),c(2,"Dropoff"),r(),u(3,"h5",21),r()),t&2){let e=s(2);o(3),f("innerHTML",e.getTiming(!1),R)}}function _c(t,l){if(t&1&&(a(0,"h5",23),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(3);o(),S(V(2,1,e.cheapestPrice,e.currency))}}function gc(t,l){t&1&&(a(0,"h5",23),c(1,"Free to Reserve"),r())}function Cc(t,l){if(t&1&&(a(0,"div",10)(1,"p",15),c(2),r(),p(3,_c,3,4,"h5",23)(4,gc,2,0,"h5",23),r()),t&2){let e=s(2);o(2),S(e.needMoreInfo()?"From":"Price"),o(),m(e.cheapestPrice>0?3:4)}}function fc(t,l){if(t&1){let e=x();a(0,"div",3)(1,"div",24)(2,"button",25),C("click",function(){_(e);let n=s(2);return g(n.addToItinerary())}),c(3,"Add"),r()()()}}function xc(t,l){if(t&1){let e=x();p(0,ac,6,3,"div",1),a(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"label"),c(6),p(7,sc,2,0,"span",6),r(),a(8,"input",7),X("ngModelChange",function(n){_(e);let d=s();
1return z(d.location,n)||(d.location=n),g(n)}),C("typeaheadOnSelect",function(n){_(e);let d=s();return g(d.checkPrice(n))})("typeaheadNoResults",function(n){_(e);let d=s();return g(d.typeaheadNoResultsPrice(n))}),r()()()(),a(9,"div",3),p(10,lc,6,1,"div",8),p(11,dc,6,1,"div",9),p(12,pc,4,1,"div",10),p(13,uc,6,1,"div",9),p(14,hc,4,1,"div",10),p(15,Cc,5,2,"div",10),r(),p(16,fc,4,0,"div",3),r()}if(t&2){let e=s();m(e.pointToPoint||!e.returnTransferOnly||e.itineraryItem.destinationSupplierLocation?0:-1),o(6),y(" ",e.getDirection()," Location "),o(),m(e.noResultsPrice?7:-1),o(),f("typeahead",e.locations),G("ngModel",e.location),f("typeaheadHideResultsOnBlur",!1),o(2),m(e.itineraryItem.editableTime?10:-1),o(),m(e.itineraryItem.editableTime&&e.specifyPickupTime?11:-1),o(),m(!e.itineraryItem.editableTime||!e.specifyPickupTime?12:-1),o(),m(e.itineraryItem.editableTime&&!e.specifyPickupTime?13:-1),o(),m(!e.itineraryItem.editableTime||e.specifyPickupTime?14:-1),o(),m(e.showPricing()?15:-1),o(),m(!e.returnTransferOnly&&!e.needMoreInfo()?16:-1)}}var Mn=(()=>{class t{constructor(){this.locationSelected=new L,this.pointToPoint=!0,this.returnTransferOnly=!0,this.loading=!0,this.isPickup=!0,this.specifyPickupTime=!0,this.pickupTime="",this.dropOffTime="",this.timeList=new Mt().timeList(),this.itineraryService=T(M),this.supplierService=T(A)}ngOnInit(){if(this.pointToPoint=this.supplierService.currentSupplier.settings.transferPointToPoint,this.returnTransferOnly=this.supplierService.currentSupplier.settings.returnTransferOnly,this.dates=this.itineraryService.initialiseFromToDate(),this.isPickup=this.itineraryService.isPickup(this.itineraryItem),this.itineraryItem.editableTime&&(this.itineraryItem.originSupplierLocation&&this.itineraryItem.destinationSupplierLocation||(this.specifyPickupTime=this.itineraryItem.originSupplierLocation==null)),this.itineraryItem.editableTime){this.dates.currentFromDate=(0,se.default)(this.itineraryItem.fromDate),this.dates.currentToDate=(0,se.default)(this.itineraryItem.toDate);let e=this.dates.currentFromDate?Gt(this.dates.currentFromDate):"09:00",i=this.dates.currentToDate?Gt(this.dates.currentToDate):"09:00";this.pickupTime=e+" hrs",this.dropOffTime=i+" hrs"}(!this.itineraryItem.products||this.itineraryItem.products.length<1||this.itineraryItem.suggestion)&&(this.itineraryItem.originSupplierLocation||this.itineraryItem.destinationSupplierLocation)&&this.getTransfers()}showPricing(){return this.itineraryService.showPricing()}needMoreInfo(){return(this.itineraryItem.originSupplierLocation||this.itineraryItem.destinationSupplierLocation)&&this.itineraryItem.needMoreInfo}getCurrentSupplierLocationId(){return this.itineraryItem.originSupplierLocation||this.itineraryItem.destinationSupplierLocation?this.itineraryItem.originSupplierLocation?this.itineraryItem.originSupplierLocation.id:this.itineraryItem.destinationSupplierLocation.id:""}populateSupplierLocationsOptions(){this.supplierService.getSupplierLocationsFrom(!1,this.getCurrentSupplierLocationId()).subscribe(e=>{this.locations=e,this.loading=!1}),this.isPickup?this.getCheapestTransfer(null,this.selectedSupplierLocation?.id):this.getCheapestTransfer(this.selectedSupplierLocation?.id)}getTransfers(){this.needMoreInfo()?this.populateSupplierLocationsOptions():(this.loading=!1,this.isPickup?(this.location=this.itineraryItem.destinationSupplierLocation?.name,this.selectedSupplierLocation=this.itineraryItem.destinationSupplierLocation):(this.location=this.itineraryItem.originSupplierLocation?.name,this.selectedSupplierLocation=this.itineraryItem.originSupplierLocation),this.isPickup?this.getCheapestTransfer(null,this.selectedSupplierLocation.id):this.getCheapestTransfer(this.selectedSupplierLocation.id))}getTransferSuggestionString(){let e="",i=this.supplierService.currentSupplier.tabs.filter(h=>h.productType.id===B.Transfer)[0],n=!this.supplierService.currentSupplier.settings.transferPointToPoint&&this.itineraryItem.originSupplierLocation,d="";return i&&(d=n?i.suggestionDescription2:i.suggestionDescription),d&&d.length>0?e=d:(e="<h5>Need a transfer",this.itineraryItem.originSupplierLocation&&(e+=" from "+this.itineraryItem.originSupplierLocation.name),this.itineraryItem.destinationSupplierLocation&&(e+=" to "+this.itineraryItem.destinationSupplierLocation.name),e+=" on "+this.itineraryService.getDate(this.itineraryItem.fromDate?this.itineraryItem.fromDate:this.itineraryItem.toDate,"DD MMM")+"?</h5><p>
1Please tell us your location and the exact price and journey time will appear.</p>"),e}getTiming(e){let i="-";return((this.itineraryItem.originSupplierLocation||this.selectedSupplierLocation)&&!this.itineraryItem.editableTime||this.selectedSupplierLocation&&this.itineraryItem.editableTime)&&e&&(i=(0,se.default)(this.itineraryItem.fromDate).format("HH:mm")),((this.itineraryItem.destinationSupplierLocation||this.selectedSupplierLocation)&&!this.itineraryItem.editableTime||this.selectedSupplierLocation&&this.itineraryItem.editableTime)&&!e&&(i=(0,se.default)(this.itineraryItem.toDate).format("HH:mm")),i}getCheapestTransfer(e=null,i=null){console.log(e),console.log(i),console.log(this.itineraryItem.editableTime);let n=null,d=null;this.itineraryItem.editableTime?(this.specifyPickupTime?n=this.itineraryService.convertStringToTime(se.default.utc(se.default.utc(this.itineraryItem.fromDate).format("YYYY-MM-DD")+" "+this.pickupTime.replace(" hrs",""))):d=this.itineraryService.convertStringToTime(se.default.utc(se.default.utc(this.itineraryItem.fromDate).format("YYYY-MM-DD")+" "+this.dropOffTime.replace(" hrs",""))),this.isPickup?e=this.itineraryItem.originSupplierLocation.id:i=this.itineraryItem.destinationSupplierLocation.id):this.isPickup?(e=this.itineraryItem.originSupplierLocation?.id,n=this.itineraryService.convertStringToTime(this.itineraryItem.fromDate)):(d=this.itineraryService.convertStringToTime(this.itineraryItem.toDate),i=this.itineraryItem.destinationSupplierLocation.id),this.supplierService.getCheapestTransfer(this.itinerary.id,e,i,n,d).subscribe(h=>{console.log(h),this.cheapestPrice=h.price,this.cheapestVehiclePic=h.photos&&h.photos.length>0?h.photos[0].photo.url:"",(0,se.default)(h.startTime).isValid()&&(this.itineraryItem.fromDate=se.default.utc(se.default.utc(this.itineraryItem.fromDate).format("YYYY-MM-DD")+" "+se.default.utc(h.startTime).format("HH:mm"))),(0,se.default)(h.endTime).isValid()&&(this.itineraryItem.toDate=se.default.utc(se.default.utc(this.itineraryItem.fromDate).format("YYYY-MM-DD")+" "+se.default.utc(h.endTime).format("HH:mm")))})}checkPrice(e){this.selectedSupplierLocation=e.item,this.itineraryItem.needMoreInfo=!1,this.isPickup?this.getCheapestTransfer(null,this.selectedSupplierLocation.id):this.getCheapestTransfer(this.selectedSupplierLocation.id),this.locationSelected.emit(this.selectedSupplierLocation)}typeaheadNoResultsPrice(e){this.noResultsPrice=e}timingChanged(){this.selectedSupplierLocation&&(this.isPickup?this.getCheapestTransfer(null,this.selectedSupplierLocation.id):this.getCheapestTransfer(this.selectedSupplierLocation.id))}addToItinerary(){this.loading=!0,this.itineraryItem.itineraryId=this.itinerary.id,this.itineraryItem.suggestion=!1,this.isPickup?(this.itineraryItem.destinationSupplierLocation=this.selectedSupplierLocation,this.itineraryItem.destination=this.selectedSupplierLocation.location):(this.itineraryItem.originSupplierLocation=this.selectedSupplierLocation,this.itineraryItem.origin=this.selectedSupplierLocation.location),this.itineraryService.addItineraryItem(this.itineraryItem).subscribe(()=>{window.location.href="/search/"+this.itinerary.id})}getDirection(){return this.loading?"":this.isPickup?"Drop off":"Pick up"}get currency(){return this.supplierService.getSelectedCurrency()}getImageUrl(e){return this.supplierService.getImageUrl(e,!0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-transfer-suggestion"]],inputs:{itineraryItem:"itineraryItem",itinerary:"itinerary"},outputs:{locationSelected:"locationSelected"},decls:2,vars:2,consts:[[1,"pt-5","pb-5","text-center"],[1,"booking","mt-0"],[1,"widget","search","no-icons","mb-0"],[1,"row"],[1,"col","my-auto"],[1,"form-group"],[2,"color","red"],["type","text","typeaheadOptionField","name","placeholder","Please enter your location here...",1,"form-control",3,"ngModelChange","typeaheadOnSelect","typeaheadNoResults","typeahead","ngModel","typeaheadHideResultsOnBlur"],[1,"col-sm-3","booking","mt-0","p-1","pl-3"],[1,"col","form-group"],[1,"col","bookingBack","pt-1","text-center"],[1,"col-sm-3","my-auto"],[3,"innerHTML"],[1,"mt-5","mb-5","text-center"],[1,"w-100",3,"src"],[1,"title"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModelChange","change","ngModel"],["for","fromTime"],[1,"form-control","custom-select",3,"ngModelChange","ngModel"],[3,"value"],[1,"data",3,"innerHTML"],["for","toTime"],[1,"data"],[1,"col-md","my-auto"],[1,"btn","btn-sm","btn-primary",3,"click"]],template:function(i,n){i&1&&(p(0,ic,3,0,"h2",0),p(1,xc,17,13)),i&2&&(m(n.loading?0:-1),o(),m(n.loading?-1:1))},dependencies:[ue,$e,je,We,Ne,Ye,me,fe,zi,Ui,N,Z],encapsulation:2})}}return t})();var yc=t=>({show:t});
1function Sc(t,l){if(t&1&&(a(0,"option",18),c(1),r()),t&2){let e=l.$implicit;f("ngValue",e),o(),y(" ",e.searchLocation.name," ")}}function vc(t,l){if(t&1){let e=x();a(0,"div",11)(1,"div",13)(2,"div",14)(3,"label",15),c(4,"Filter Location : "),r(),u(5,"fa-icon",16),a(6,"select",17),X("ngModelChange",function(n){_(e);let d=s(4);return z(d.currentExperienceSuggestion,n)||(d.currentExperienceSuggestion=n),g(n)}),C("ngModelChange",function(){_(e);let n=s(4);return g(n.searchExperienceTab=!0)}),w(7,Sc,2,2,"option",18,k),r()()()()}if(t&2){let e=s(4);o(6),G("ngModel",e.currentExperienceSuggestion),f("compareWith",e.compareItineraryItemForOtherSuggestions),o(),E(e.otherExperienceSuggestion)}}function Tc(t,l){if(t&1){let e=x();a(0,"app-experience-suggestion",19),C("experienceSelected",function(n){_(e);let d=s(4);return g(d.processExperienceSelection(n))}),r()}if(t&2){let e=s(4);f("currentItemSuggestion",e.currentExperienceSuggestion)("itinerary",e.itinerary)}}function Ic(t,l){if(t&1){let e=x();a(0,"div",3),u(1,"hr"),a(2,"div",4)(3,"div",5)(4,"h4",6),u(5,"fa-icon",7),c(6," ADD EXPERIENCES - "),a(7,"u",8),C("click",function(){_(e);let n=s(3);return g(n.showAllExperiences())}),c(8,"Show All"),r()()(),a(9,"div",9)(10,"fa-icon",10),C("click",function(){_(e);let n=s(3);return n.showExperienceTab=!n.showExperienceTab,g(n.dismissedSuggestions=n.dismissedSuggestions+1)}),r()(),p(11,vc,9,2,"div",11),r(),p(12,Tc,1,2,"app-experience-suggestion",12),r()}if(t&2){let e=s(3);o(10),f("icon",e.showExperienceTab?"minus-circle":"plus-circle"),o(),m(e.showExperienceTab?11:-1),o(),m(e.showExperienceTab?12:-1)}}function wc(t,l){if(t&1&&(a(0,"option",18),c(1),r()),t&2){let e=l.$implicit;f("ngValue",e),o(),y(" ",e.searchLocation.name," ")}}function Ec(t,l){if(t&1){let e=x();a(0,"div",11)(1,"div",13)(2,"div",14)(3,"label",20),c(4,"Filter Location : "),r(),u(5,"fa-icon",16),a(6,"select",21),X("ngModelChange",function(n){_(e);let d=s(4);
1return z(d.currentCarHireSuggestion,n)||(d.currentCarHireSuggestion=n),g(n)}),C("ngModelChange",function(){_(e);let n=s(4);return g(n.searchCarHireTab=!0)}),w(7,wc,2,2,"option",18,k),r()()()()}if(t&2){let e=s(4);o(6),G("ngModel",e.currentCarHireSuggestion),f("compareWith",e.compareItineraryItemForOtherSuggestions),o(),E(e.otherCarHireSuggestion)}}function bc(t,l){if(t&1){let e=x();a(0,"app-car-hire-suggestion",22),C("carHireSelected",function(n){_(e);let d=s(4);return g(d.processCarHireSelection(n))}),r()}if(t&2){let e=s(4);f("currentItemSuggestion",e.currentCarHireSuggestion)("itinerary",e.itinerary)}}function kc(t,l){if(t&1){let e=x();a(0,"div",3),u(1,"hr"),a(2,"div",4)(3,"div",5)(4,"h4",6),u(5,"fa-icon",7),c(6," ADD CAR HIRE - "),a(7,"u",8),C("click",function(){_(e);let n=s(3);return g(n.showAllCarHire())}),c(8,"Show All"),r()()(),a(9,"div",9)(10,"fa-icon",10),C("click",function(){_(e);let n=s(3);return n.showCarHireTab=!n.showCarHireTab,g(n.dismissedSuggestions=n.dismissedSuggestions+1)}),r()(),p(11,Ec,9,2,"div",11),r(),p(12,bc,1,2,"app-car-hire-suggestion",12),r()}if(t&2){let e=s(3);o(10),f("icon",e.showCarHireTab?"minus-circle":"plus-circle"),o(),m(e.showCarHireTab?11:-1),o(),m(e.showCarHireTab?12:-1)}}function Pc(t,l){if(t&1&&(a(0,"option",18),c(1),r()),t&2){let e=l.$implicit;f("ngValue",e),o(),y(" ",e.searchLocation.name," ")}}function Dc(t,l){if(t&1){let e=x();a(0,"div",11)(1,"div",13)(2,"div",14)(3,"label",24),c(4,"Filter Location : "),r(),u(5,"fa-icon",16),a(6,"select",25),X("ngModelChange",function(n){_(e);let d=s(4);
1return z(d.currentHotelSuggestion,n)||(d.currentHotelSuggestion=n),g(n)}),C("ngModelChange",function(){_(e);let n=s(4);return g(n.searchHotelsTab=!0)}),w(7,Pc,2,2,"option",18,k),r()()()()}if(t&2){let e=s(4);o(6),G("ngModel",e.currentHotelSuggestion),f("compareWith",e.compareItineraryItemForOtherSuggestions),o(),E(e.otherHotelSuggestion)}}function Fc(t,l){if(t&1){let e=x();a(0,"app-hotel-suggestion",26),C("hotelSelected",function(n){_(e);let d=s(4);return g(d.processHotelSelection(n))}),r()}if(t&2){let e=s(4);f("currentItemSuggestion",e.currentHotelSuggestion)("itinerary",e.itinerary)}}function Vc(t,l){if(t&1){let e=x();a(0,"div",3),u(1,"hr"),a(2,"div",4)(3,"div",5)(4,"h4",6),u(5,"fa-icon",23),c(6," ADD HOTELS"),r()(),a(7,"div",9)(8,"fa-icon",10),C("click",function(){_(e);let n=s(3);return n.showHotelsTab=!n.showHotelsTab,g(n.dismissedSuggestions=n.dismissedSuggestions+1)}),r()(),p(9,Dc,9,2,"div",11),r(),p(10,Fc,1,2,"app-hotel-suggestion",12),r()}if(t&2){let e=s(3);o(8),f("icon",e.showHotelsTab?"minus-circle":"plus-circle"),o(),m(e.showHotelsTab?9:-1),o(),m(e.showHotelsTab?10:-1)}}function Lc(t,l){if(t&1){let e=x();a(0,"div",29)(1,"button",31),C("click",function(){_(e);let n=s(4);return n.allSearchTabsFalse(),n.searchFlightsTab=!0,n.changeShowModal(!0),g(n.currentItemSuggestion=n.getProductTypeOtherSuggestions(n.productTypeEnum.Flight)[0])}),c(2," Search all "),r()()}}function Ac(t,l){if(t&1){let e=x();a(0,"app-flight-suggestion",32),C("flightSelected",function(n){_(e);let d=s(4);return g(d.processFlightSelection(n))}),r()}if(t&2){let e=s(4);f("currentItemSuggestion",e.currentFlightSuggestion)("itinerary",e.itinerary)}}function Mc(t,l){if(t&1){let e=x();a(0,"div",3),u(1,"hr"),a(2,"div",4)(3,"div",27)(4,"h4",6),u(5,"fa-icon",28),c(6," ADD FLIGHTS"),r()(),p(7,Lc,3,0,"div",29),a(8,"div",30)(9,"fa-icon",10),C("click",function(){_(e);let n=s(3);return n.showFlightsTab=!n.showFlightsTab,g(n.dismissedSuggestions=n.dismissedSuggestions+1)}),r()()(),p(10,Ac,1,2,"app-flight-suggestion",12),r()}if(t&2){let e=s(3);o(3),q(e.showFlightsTab?"col-6":"col"),o(4),m(e.showFlightsTab?7:-1),o(2),f("icon",e.showFlightsTab?"minus-circle":"plus-circle"),o(),m(e.showFlightsTab?10:-1)}}function Hc(t,l){if(t&1&&u(0,"app-transfer-suggestion",36),t&2){let e=l.$implicit,i=s(5);f("itineraryItem",e)("itinerary",i.itinerary)}}function Rc(t,l){if(t&1&&(a(0,"div",34)(1,"div",35),w(2,Hc,1,2,"app-transfer-suggestion",36,k),r()()),t&2){let e=s(4);o(2),E(e.getTransferSuggestions())}}function Oc(t,l){if(t&1){let e=x();a(0,"div",3),u(1,"hr"),a(2,"div",4)(3,"div",5)(4,"h4",6),u(5,"fa-icon",33),c(6," ADD TRANSFERS"),r()(),a(7,"div",30)(8,"fa-icon",10),C("click",function(){_(e);let n=s(3);return n.showTransfersTab=!n.showTransfersTab,g(n.dismissedSuggestions=n.dismissedSuggestions+1)}),r()()(),p(9,Rc,4,0,"div",34),r()}if(t&2){let e=s(3);o(8),f("icon",e.showTransfersTab?"minus-circle":"plus-circle"),o(),m(e.showTransfersTab?9:-1)}}function Bc(t,l){t&1&&(a(0,"h3",37),u(1,"app-spinner"),c(2," Adding Transfers"),r())}function Nc(t,l){if(t&1){let e=x();a(0,"app-transfer-suggestion",41),C("locationSelected",function(n){let d=_(e).$implicit,h=s(6);return g(h.processTransferLocationSelected(d,n))}),r()}if(t&2){let e=l.$implicit,i=s(6);f("itineraryItem",e)("itinerary",i.itinerary)}}function Wc(t,l){if(t&1&&(a(0,"div",38)(1,"h5"),c(2),r()()),t&2){let e=s(6);o(2),S(e.getReturnTransferText())}}function Yc(t,l){t&1&&(a(0,"div",39)(1,"h5"),c(2,"All Selected!"),r()())}function $c(t,l){if(t&1){let e=x();a(0,"div",40)(1,"button",42),C("click",function(){_(e);let n=s(6);return g(n.addTransfersToItinerary())}),c(2,"Add"),r()()}}function jc(t,l){if(t&1&&(a(0,"div",34)(1,"div",35),w(2,Nc,1,2,"app-transfer-suggestion",36,k),a(4,"div",13)(5,"div",2),p(6,Wc,3,1,"div",38),p(7,Yc,3,0,"div",39),p(8,$c,3,0,"div",40),r()()()()),t&2){let e=s(5);o(2),E(e.getTransferSuggestions()),o(4),m(e.showAddReturnTransfer()?-1:6),o(),m(e.showAddReturnTransfer()?7:-1),o(),m(e.showAddReturnTransfer()?8:-1)}}function Uc(t,l){if(t&1){let e=x();a(0,"div",3),u(1,"hr"),a(2,"div",4)(3,"div",5)(4,"h4",6),u(5,"fa-icon",33),c(6," ADD TRANSFERS"),r()(),a(7,"div",30)(8,"fa-icon",10),C("click",function(){_(e);let n=s(4);return n.showTransfersTab=!n.showTransfersTab,g(n.dismissedSuggestions=n.dismissedSuggestions+1)}),r()()(),p(9,jc,9,3,"div",34),r()}if(t&2){let e=s(4);o(8),f("icon",e.showTransfersTab?"minus-circle":"plus-circle"),o(),m(e.showTransfersTab?9:-1)}}function zc(t,l){if(t&1&&(p(0,Bc,3,0,"h3",37),p(1,Uc,10,2,"div",3)),t&2){let e=s(3);m(e.addingTransfers?0:-1),o(),m(e.addingTransfers?-1:1)}}function qc(t,l){if(t&1){let e=x();a(0,"div",29)(1,"button",31),C("click",function(){_(e);let n=s(4);return n.allSearchTabsFalse(),n.searchTransfersTab=!0,n.changeShowModal(!0),g(n.currentItemSuggestion=n.getProductTypeOtherSuggestions(n.productTypeEnum.Transfer)[0])}),c(2," Search all "),r()()}}function Gc(t,l){if(t&1){let e=x();a(0,"app-point-to-point-transfer-suggestions",44),C("transferSelected",function(n){_(e);let d=s(4);return g(d.processTransferSelection(n))}),r()}if(t&2){let e=s(4);f("transferSuggestions",e.getTransferSuggestions())("itinerary",e.itinerary)}}function Xc(t,l){if(t&1){let e=x();a(0,"div",3),u(1,"hr"),a(2,"div",4)(3,"div",27)(4,"h4",6),u(5,"fa-icon",33),c(6," ADD TRANSFERS"),r()(),p(7,qc,3,0,"div",29),a(8,"div",30)(9,"fa-icon",10),C("click",function(){_(e);let n=s(3);return n.showTransfersTab=!n.showTransfersTab,g(n.dismissedSuggestions=n.dismissedSuggestions+1)}),r()()(),p(10,Gc,1,2,"app-point-to-point-transfer-suggestions",43),r()}if(t&2){let e=s(3);o(3),q(e.showTransfersTab?"col-6":"col"),o(4),m(e.showTransfersTab?7:-1),o(2),f("icon",e.showTransfersTab?"minus-circle":"plus-circle"),o(),m(e.showTransfersTab?10:-1)}}function Kc(t,l){if(t&1&&(a(0,"div",2),p(1,Ic,13,3,"div",3),p(2,kc,13,3,"div",3),p(3,Vc,11,3,"div",3),p(4,Mc,11,5,"div",3),p(5,Oc,10,2,"div",3),p(6,zc,2,2),p(7,Xc,11,5,"div",3),r()),t&2){let e=s(2);q(!e.isPointToPoint&&e.showTransfersTab?"justify-content-center":""),o(),m(e.getProductTypeSuggestions(e.productTypeEnum.Experience).length>0?1:-1),o(),m(e.getProductTypeSuggestions(e.productTypeEnum.CarHire).length>0?2:-1),o(),m(e.getProductTypeSuggestions(e.productTypeEnum.Hotel).length>0?3:-1),o(),m(e.getProductTypeSuggestions(e.productTypeEnum.Flight).length>0?4:-1),o(),m(!e.isReturnTransferOnly&&!e.isPointToPoint&&e.getTransferSuggestions().length>0?5:-1),o(),m(e.isReturnTransferOnly&&e.getTransferSuggestions().length>0?6:-1),o(),m(e.isPointToPoint&&e.getProductTypeSuggestions(e.productTypeEnum.Transfer).length>0?7:-1)}}function Qc(t,l){if(t&1&&p(0,Kc,8,9,"div",1),t&2){let e=s();m(e.showModal?-1:0)}}function Zc(t,l){t&1&&(a(0,"h5",48),u(1,"fa-icon",28),c(2," Add Regional Flights"),r())}
1function Jc(t,l){t&1&&(a(0,"h5",48),u(1,"fa-icon",57),c(2," Add Car Hire"),r())}function ed(t,l){t&1&&(a(0,"h5",48),u(1,"fa-icon",7),c(2," Add Experiences"),r())}function td(t,l){t&1&&(a(0,"h5",48),u(1,"fa-icon",33),c(2," Add Transfers"),r())}function id(t,l){t&1&&(a(0,"h5",48),u(1,"fa-icon",23),c(2," Add Hotels"),r())}function nd(t,l){if(t&1&&u(0,"app-itinerary-items-edit",53),t&2){let e=s(2);f("itinerary",e.itinerary)("suggestion",!0)("suggestionItineraryItems",e.flightSuggestions)}}function od(t,l){if(t&1&&u(0,"app-itinerary-items-edit",53),t&2){let e=s(2);f("itinerary",e.itinerary)("suggestion",!0)("suggestionItineraryItems",e.transferSuggestions)}}function rd(t,l){if(t&1){let e=x();a(0,"app-transfer-suggestion",41),C("locationSelected",function(n){_(e);let d=s(2);return g(d.processTransferLocationSelected(d.currentItemSuggestion,n))}),r()}if(t&2){let e=s(2);f("itineraryItem",e.currentItemSuggestion)("itinerary",e.itinerary)}}function ad(t,l){if(t&1&&u(0,"app-hotels",54),t&2){let e=s(2);f("itineraryItem",e.currentHotelSuggestion)("itinerary",e.itinerary)("viewHotel",e.viewHotel)("suggestion",!0)}}function sd(t,l){if(t&1&&u(0,"app-experiences",55),t&2){let e=s(2);f("itineraryItem",e.currentExperienceSuggestion)("itinerary",e.itinerary)("viewExperience",e.viewExperience)("suggestion",!0)}}function ld(t,l){if(t&1&&u(0,"app-cars",56),t&2){let e=s(2);f("itineraryItem",e.currentCarHireSuggestion)("itinerary",e.itinerary)("suggestion",!0)}}function cd(t,l){if(t&1){let e=x();a(0,"div",0)(1,"div",45)(2,"div",46)(3,"div",47),p(4,Zc,3,0,"h5",48),p(5,Jc,3,0,"h5",48),p(6,ed,3,0,"h5",48),p(7,td,3,0,"h5",48),p(8,id,3,0,"h5",48),a(9,"button",49),C("click",function(){_(e);let n=s();return n.changeShowModal(!1),g(n.allSearchTabsFalse())}),a(10,"span",50),c(11,"\xD7"),r()()(),a(12,"div",51)(13,"div",52)(14,"div",13),p(15,nd,1,3,"app-itinerary-items-edit",53),p(16,od,1,3,"app-itinerary-items-edit",53),r()(),p(17,rd,1,2,"app-transfer-suggestion",36),p(18,ad,1,4,"app-hotels",54),p(19,sd,1,4,"app-experiences",55),p(20,ld,1,3,"app-cars",56),r()()()()}if(t&2){let e=s();f("ngClass",ne(16,yc,e.showModal)),o(),q(e.searchTransfersSuggestion?"":"modal-xl scrollable"),o(3),m(e.searchFlightsTab?4:-1),o(),m(e.searchCarHireTab?5:-1),o(),m(e.searchExperienceTab?6:-1),o(),m(e.searchTransfersTab||e.searchTransfersSuggestion?7:-1),o(),m(e.searchHotelsTab?8:-1),o(4),q(e.searchTransfersSuggestion?"":"scrollable"),o(3),m(e.searchFlightsTab?15:-1),o(),m(e.searchTransfersTab?16:-1),o(),m(e.searchTransfersSuggestion?17:-1),o(),m(e.searchHotelsTab?18:-1),o(),m(e.searchExperienceTab?19:-1),o(),m(e.searchCarHireTab?20:-1)}}var Hn=(()=>{class t{constructor(){this.modalOpen=new L,this.loading=!0,this.itinerarySearchLocations=[],this.itineraryItemSuggestions=[],this.totalSuggestions=0,this.dismissedSuggestions=0,this.productTypeEnum=B,this.addingTransfers=!1,this.isReturnTransferOnly=!1,this.isPointToPoint=!1,this.searchCarHireTab=!1,this.searchFlightsTab=!1,this.searchExperienceTab=!1,this.searchTransfersTab=!1,this.searchTransfersSuggestion=!1,this.searchHotelsTab=!1,this.showCarHireTab=!0,this.showFlightsTab=!0,this.showExperienceTab=!0,this.showTransfersTab=!0,this.showHotelsTab=!0,this.showModal=!1,this.suggestionCollapsed=!1,this.itineraryService=T(M),this.supplierService=T(A)}ngOnInit(){this.supplier=this.supplierService.currentSupplier,this.isReturnTransferOnly=this.supplier.settings.returnTransferOnly,this.isPointToPoint=this.supplier.settings.transferPointToPoint,this.initialise()}initialise(){this.itineraryItemSuggestions=[],this.itinerarySearchLocations=[],this.getSearchLocations(),this.makeSuggestions(),this.makeTimedSuggestions(),this.makeOtherSuggestions(),this.calculateTotalSuggestions(),this.calculatePrices(),this.flightSuggestions=this.getProductTypeSuggestions(this.productTypeEnum.Flight),this.transferSuggestions=this.getProductTypeSuggestions(this.productTypeEnum.Transfer),this.otherExperienceSuggestion=this.getProductTypeOtherSuggestions(this.productTypeEnum.Experience),this.otherCarHireSuggestion=this.getProductTypeOtherSuggestions(this.productTypeEnum.CarHire),this.otherHotelSuggestion=this.getProductTypeOtherSuggestions(this.productTypeEnum.Hotel),this.currentExperienceSuggestion=this.getCurrentItemSuggestion(B.Experience),this.currentCarHireSuggestion=this.getCurrentItemSuggestion(B.CarHire),this.currentHotelSuggestion=this.getCurrentItemSuggestion(B.Hotel),this.currentFlightSuggestion=this.getCurrentItemSuggestion(B.Flight);let e=this.itineraryItemSuggestions.filter(i=>!i.searchLocation&&i.productType?.id!==this.productTypeEnum.Flight||i.productType?.id===this.productTypeEnum.Flight&&(i.origin&&!i.searchLocation||i.destination&&!i.searchLocationDestination));e.length>0&&(console.log("Itinerary Suggestions with search location missing"),console.log(e)),this.loading=!1}showProductTypeSuggestion(e){return this.supplier.tabs.filter(i=>i.productType.id===e)[0]?.showSuggestion}getProductType(e){return this.supplier.tabs.filter(i=>i.productType.id===e&&i.showSuggestion)[0]?.productType}getSearchLocations(){this.itinerary.items.filter(e=>e.productType.id!=this.productTypeEnum.Extra&&!e.suggestion).forEac
1h(e=>{this.pushItemToItinerarySearchLocation(e)})}makeOtherSuggestions(){let e=this.itinerary.items.filter(I=>!I.suggestion)[this.itinerary.items.filter(I=>!I.suggestion).length-1],i=(0,v.default)((0,v.default)(e.fromDate).format("YYYY-MM-DD")),n=e.toDate?(0,v.default)((0,v.default)(e.toDate).format("YYYY-MM-DD")):(0,v.default)(i.clone().add(1,"days")),d=null,h=e.searchLocation;if(h&&h.generic){let I=this.itinerarySearchLocations.filter(D=>D.searchLocation&&D.searchLocation.id===h.generic.id)[0];I&&(i=I.fromDate,n=I.toDate,d=I.closestAirport)}this.supplier.productTypes.forEach(I=>{I.searchLocations.forEach(D=>{if(I.id===this.productTypeEnum.Hotel&&this.getProductType(this.productTypeEnum.Hotel)&&D&&D.searchLocation&&D.searchLocation.generic&&D.countPublic>0){let U=i.clone(),b=n.clone();h&&h.generic&&this.itinerary.items.some(H=>H.productType.id===this.productTypeEnum.Hotel&&H.searchLocation.generic.id===h.generic.id&&!H.suggestion)&&(U=b,b=b.add(1)),this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.Hotel),searchLocation:D.searchLocation,fromDate:U,toDate:b,allSelected:!0,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants})}I.id===this.productTypeEnum.Experience&&this.getProductType(this.productTypeEnum.Experience)&&D&&D.searchLocation&&D.searchLocation.generic&&this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.Experience),searchLocation:D.searchLocation,fromDate:i,toDate:n,allSelected:!0,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants}),I.id===this.productTypeEnum.CarHire&&this.getProductType(this.productTypeEnum.CarHire)&&D&&D.searchLocation&&D.searchLocation.generic&&this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.CarHire),searchLocation:D.searchLocation,fromDate:i,toDate:n,allSelected:!0,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants})}),I.id===this.productTypeEnum.Flight&&!this.flightSuggestionExists(null,d,i)&&this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.Flight),destination:d,fromDate:i,allSelected:!0,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants}),I.id===this.productTypeEnum.Flight&&!this.flightSuggestionExists(d,null,n)&&this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.Flight),origin:d,fromDate:n,allSelected:!0,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants})})}makeSuggestions(){let e=0;this.itinerarySearchLocations.forEach(i=>{if(i.searchLocation){if(this.getProductType(this.productTypeEnum.Hotel)){let U=this.getSearchLocation(this.productTypeEnum.Hotel,i.searchLocation.id);U&&!this.suggestionExists(this.productTypeEnum.Hotel,i.searchLocation.id)&&this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.Hotel),searchLocation:U,fromDate:i.fromDate?i.fromDate:i.toDate.add(-1,"days"),toDate:i.toDate?i.toDate:i.fromDate.add(1,"days"),adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0})}if(this.getProductType(this.productTypeEnum.Experience)){let U=this.getSearchLocation(this.productTypeEnum.Experience,i.searchLocation.id);var n=i.fromDate,d=i.toDate;i.fromDate?i.fromDate&&i.toDate&&i.toDate>=i.fromDate.clone().add(1,"days")&&(n=i.fromDate.clone().add(1,"days")):n=i.toDate.clone().add(-1,"days"),i.toDate||(d=i.toDate),U&&this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.Experience),searchLocation:U,fromDate:n,toDate:d,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0}
1)}}if(this.getProductType(this.productTypeEnum.Flight)&&i.closestAirport){let I=null,D=null;if(e==0){let H=this.itinerarySearchLocations[0].closestAirport,Ee=this.getSearchLocation(this.productTypeEnum.Flight,this.itinerarySearchLocations[0].searchLocation?.id);H&&(this.flightSuggestionExists(i.closestAirport,H,i.toDate)||this.itineraryItemSuggestions.push({searchLocationDestination:Ee,productType:this.getProductType(this.productTypeEnum.Flight),destination:H,fromDate:i.fromDate,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0}))}if(e>0&&(I=this.itinerarySearchLocations[e-1].closestAirport,D=this.getSearchLocation(this.productTypeEnum.Flight,this.itinerarySearchLocations[e-1].searchLocation?.id)),I&&I!=i.closestAirport&&!this.flightSuggestionExists(I,i.closestAirport,i.fromDate)){let H=this.getSearchLocation(this.productTypeEnum.Flight,i.searchLocation?.id);this.itineraryItemSuggestions.push({searchLocation:D,searchLocationDestination:H,productType:this.getProductType(this.productTypeEnum.Flight),origin:I,destination:i.closestAirport,fromDate:i.fromDate,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0})}let U=null,b=null;if(e+1<this.itinerarySearchLocations.length&&(U=this.itinerarySearchLocations[e+1].closestAirport,b=this.getSearchLocation(this.productTypeEnum.Flight,this.itinerarySearchLocations[e+1].searchLocation?.id)),U&&U!=i.closestAirport&&!this.flightSuggestionExists(i.closestAirport,U,i.toDate)){let H=this.getSearchLocation(this.productTypeEnum.Flight,i.searchLocation?.id);this.itineraryItemSuggestions.push({searchLocation:H,searchLocationDestination:b,productType:this.getProductType(this.productTypeEnum.Flight),origin:i.closestAirport,destination:U,fromDate:i.toDate,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0})}if(e+1==this.itinerarySearchLocations.length&&(I=this.itinerarySearchLocations[e].closestAirport,D=this.getSearchLocation(this.productTypeEnum.Flight,this.itinerarySearchLocations[e].searchLocation?.id),I&&!this.flightSuggestionExists(I,null,i.toDate))){let H=this.getSearchLocation(this.productTypeEnum.Flight,i.searchLocation?.id);this.itineraryItemSuggestions.push({searchLocation:D,productType:this.getProductType(this.productTypeEnum.Flight),origin:I,fromDate:i.toDate,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0})}}e++})}makeTimedSuggestions(){let e=this.getProductType(this.productTypeEnum.CarHire),i=this.getProductType(this.productTypeEnum.Transfer);if(i||e){let n=null,d=null;this.itinerarySearchLocations.forEach(b=>{if(b.searchLocation){let H=(0,v.default)(b.fromDate).isValid()?(0,v.default)(b.fromDate).format("YYYY-MM-DD"):(0,v.default)(b.toDate).format("YYYY-MM-DD"),Ee=(0,v.default)(b.toDate).isValid()?(0,v.default)(b.toDate).format("YYYY-MM-DD"):(0,v.default)(b.fromDate).format("YYYY-MM-DD"),Ge=this.itinerary.items.filter(O=>!O.suggestion&&O.selectedItems&&O.productType.id!=this.productTypeEnum.Extra&&O.searchLocation?.generic.id===b.searchLocation.id&&(0,v.default)(O.fromDate).isSameOrAfter((0,v.default)(H),"day")&&((0,v.default)(O.toDate).isValid()?(0,v.default)(O.toDate).isSameOrBefore((0,v.default)(Ee),"day"):(0,v.default)(O.fromDate).isSameOrBefore((0,v.default)(Ee),"day"))).sort((O,Xe)=>O.fromDate.toString().localeCompare(Xe.fromDate.toString())),Y=null,ee=(0,v.default)().add(50,"years"),J=null,re=(0,v.default)().add(-50,"years"),Oe=0;Ge.forEach(O=>{let Xe=!1,oe=O.selectedItems[0].supplierProductItemPrice.supplierProductItem,K=null,le=null,ce=v.default.utc((0,v.default)(O.fromDate).format("YYYY-MM-DD")+" "+(0,v.default)(oe.arrivalTime).format("HH:mm")),he=v.default.utc((0,v.default)(O.fromDate).format("YYYY-MM-DD")+" "+(0,v.default)(oe.checkInTime).format("HH:mm"));if(O.productType.id===this.productTypeEnum.Experience&&(K=oe.supplierProduct.productLocations.filter(de=>de.pickup)[0]?.supplierLocation,le=oe.supplierProduct.productLocations.filter(de=>de.dropoff)[0]?.supplierLocation,(!K||!le)&&(K=le=oe.supplierProduct.productLocations[0]?.supplierLocation),K&&he.isValid()&&ee>he&&(ee=he,Y=K),le&&ce.isValid()&&re<ce&&(re=ce,J=le)),O.productType.id===this.productTypeEnum.Flight&&b.closestAirport&&b.closestAirport.supplierLocations&&(K=O.origin.supplierLocations.filter(de=>de.name.toLowerCase().includes(O.origin.airportName.toLowerCase()+" airport"))[0],le=O.destination.supplierLocations.filter(de=>de.name.toLowerCase().includes(O.destination.airportName.toLowerCase()+" airport"))[0],O.origin==b.closestAirport&&K&&he.isValid()&&re<he&&(n=ce,re=he,d=J=le),O.destination==b.closestAirport&&(ce=b.fromDate,he=null,le&&ce.isValid()&&ee>ce&&(ee=ce,Y=K))),O.productType.id===this.productTypeEnum.Hotel&&(K=le=O.originSupplierLocation,Xe=!0,he=v.default.utc((0,v.default)(O.fromDate).format("YYYY-MM-DD")+" 23:30:00"),ce=v.default.utc((0,v.default)(O.toDate).format("YYYY-MM-DD")+" 00:00:00"),K&&he.isValid()&&ee>he&&Y==null&&(ee=he,Y=K),le&&ce.isValid()&&re<ce&&J==null&&(re=ce,J=le)),O.productType.id!==this.productTypeEnum.Transfer&&O.productType.id!==this.productTypeEnum.CarHire){if(i){let de=this.getSearchLocation(this.productTypeEnum.Transfer,b.searchLocation?.id);if(de&&K&&!this.supplier.settings.transferDropoffOnlyDefault&&!this.transferBeforeSuggestionExists(K,he,O.productType.id===this.productTypeEnum.Hotel)&&!this.carHireExistsOnDate(b.searchLocation.id,he)){let be=Oe==0&&d?d:Y&&Y!=K?Y:null,Ct=O.productType.id===this.productTypeEnum.Hotel&&Oe==0&&n?n:he,Nn=O.productType.id===this.productTypeEnum.Hotel&&Oe==0&&n?n:he;this.itineraryItemSuggestions.push({productType:i,searchLocation:de,origin:be?.location,originSupplierLocation:be,destinationSupplierLocation:K,destination:K.location,fromDate:Ct,toDate:Nn,linkedProduct:oe.supplierProduct,needMoreInfo:be===null,editableTime:O.productType.id===this.productTypeEnum.Hotel&&Oe==0&&n?!1:Xe,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0}
1),Oe==0&&d&&(n=d=null)}if(O.productType.id===this.productTypeEnum.Flight&&O.searchLocationDestination&&(de=this.getSearchLocation(this.productTypeEnum.Transfer,O.searchLocationDestination.generic.id)),de&&le&&!this.supplier.settings.transferPickupOnlyDefault&&!this.transferAfterSuggestionExists(le,ce,O.productType.id===this.productTypeEnum.Hotel)&&!this.carHireExistsOnDate(b.searchLocation.id,ce)){let be=J&&J!=le&&(O.origin==b.closestAirport||O.productType.id!==this.productTypeEnum.Flight);this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.Transfer),searchLocation:de,originSupplierLocation:le,origin:le.location,destinationSupplierLocation:be?J:null,destination:be?J.location:null,fromDate:ce,toDate:ce,linkedProduct:oe.supplierProduct,needMoreInfo:!be,editableTime:Xe,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0})}}if(e&&!this.suggestionExists(this.productTypeEnum.CarHire,b.searchLocation.id)){let de=this.getSearchLocation(this.productTypeEnum.CarHire,b.searchLocation.id);if(de){Y===null&&J!=null&&(Y=J),J===null&&Y!=null&&(J=Y);let be=re>=(0,v.default)().add(-5,"years"),Ct=ee<=(0,v.default)().add(5,"years");!Ct&&be&&(ee=(0,v.default)(re)),!be&&Ct&&(re=(0,v.default)(ee)),Y&&J&&this.itineraryItemSuggestions.push({productType:this.getProductType(this.productTypeEnum.CarHire),searchLocation:de,originSupplierLocation:Y,origin:Y.location,destinationSupplierLocation:J,destination:J.location,fromDate:ee,toDate:re,linkedProduct:oe.supplierProduct,needMoreInfo:!0,editableTime:!0,adults:this.itinerary.adults,children:this.itinerary.children,adultsRes:this.itinerary.adultsRes,childrenRes:this.itinerary.childrenRes,infants:this.itinerary.infants,suggestion:!0})}}}Oe++})}});let h=[],I=[],D=this.itineraryItemSuggestions.filter(b=>b.productType.id===this.productTypeEnum.Transfer&&(!b.originSupplierLocation||!b.destinationSupplierLocation));D.forEach(b=>{this.itineraryItemSuggestions.some(H=>b!=H&&(H.originSupplierLocation==b.originSupplierLocation&&!H.destinationSupplierLocation||H.destinationSupplierLocation==b.destinationSupplierLocation&&!H.originSupplierLocation)&&((0,v.default)(H.fromDate).isSame(b.fromDate,"days")||(0,v.default)(H.toDate).isSame(b.toDate,"days")||(0,v.default)(H.toDate).isSame(b.fromDate,"days")||(0,v.default)(H.fromDate).isSame(b.toDate,"days")))&&I.push(b)});let U=D.filter(b=>!b.originSupplierLocation&&b.destinationSupplierLocation);I.forEach(b=>{U.forEach(H=>{((0,v.default)(H.fromDate).isSame(b.fromDate,"days")||(0,v.default)(H.toDate).isSame(b.toDate,"days")||(0,v.default)(H.toDate).isSame(b.fromDate,"days")||(0,v.default)(H.fromDate).isSame(b.toDate,"days"))&&H.searchLocation==b.searchLocation&&!b.destinationSupplierLocation&&H.destinationSupplierLocation.id!=b.originSupplierLocation.id&&(b.destinationSupplierLocation=H.destinationSupplierLocation,b.destination=H.destination)})}),D=this.itineraryItemSuggestions.filter(b=>b.productType.id===this.productTypeEnum.Transfer&&(!b.originSupplierLocation||!b.destinationSupplierLocation)),D.forEach(b=>{this.itineraryItemSuggestions.some(H=>H.originSupplierLocation&&H.destinationSupplierLocation&&(H.originSupplierLocation==b.originSupplierLocation||H.destinationSupplierLocation==b.destinationSupplierLocation)&&((0,v.default)(H.fromDate).isSame(b.fromDate,"days")||(0,v.default)(H.toDate).isSame(b.toDate,"days")||(0,v.default)(H.toDate).isSame(b.fromDate,"days")||(0,v.default)(H.fromDate).isSame(b.toDate,"days")))&&h.push(b)}),h.forEach(b=>{this.itineraryItemSuggestions.splice(this.itineraryItemSuggestions.indexOf(b),1)})}}carHireExistsOnDate(e,i){return this.itinerary.items.some(n=>n.productType.id===this.productTypeEnum.CarHire&&n.searchLocation?.generic.id===e&&(0,v.default)(n.fromDate).isSameOrBefore((0,v.default)(i))&&(0,v.default)(n.toDate).isSameOrAfter((0,v.default)(i)))}transferBeforeSuggestionExists(e,i,n){let d=this.itinerary.items.some(I=>I.productType.id===this.productTypeEnum.Transfer&&I.destinationSupplierLocation?.id===e.id&&(n?v.default.utc(I.toDate).isSame((0,v.default)(i),"day")||v.default.utc(I.fromDate).isSame((0,v.default)(i),"day"):v.default.utc(I.toDate).isSame((0,v.default)(i))||v.default.utc(I.fromDate).isSame((0,v.default)(i)))),h=this.itineraryItemSuggestions.some(I=>I.productType?.id===this.productTypeEnum.Transfer&&I.destinationSupplierLocation?.id===e.id&&(n?v.default.utc(I.toDate).isSame((0,v.default)(i),"day")||v.default.utc(I.fromDate).isSame((0,v.default)(i),"day"):v.default.utc(I.toDate).isSame((0,v.default)(i))||v.default.utc(I.fromDate).isSame((0,v.default)(i))));return d||h}transferAfterSuggestionExists(e,i,n){let d=this.itinerary.items.some(I=>I.productType.id===this.productTypeEnum.Transfer&&I.originSupplierLocation?.id===e.id&&(n?v.default.utc(I.fromDate).isSame((0,v.default)(i),"day"):v.default.utc(I.fromDate).isSame((0,v.default)(i)))),h=this.itineraryItemSuggestions.some(I=>I.productType?.id===this.productTypeEnum.Transfer&&I.originSupplierLocation?.id===e.id&&(n?v.default.utc(I.fromDate).isSame((0,v.default)(i),"day"):v.default.utc(I.fromDate).isSame((0,v.default)(i))));return d||h}getSearchLocation(e,i){return this.supplier.productTypes.filter(n=>n.id===e)[0]?.searchLocations.filter(n=>n.searchLocation?.generic?.id===i)[0]?.searchLocation}getSupplierProductType(e){return this.supplier.productTypes.filter(i=>i.id===e)[0]}
1countOptions(e){return this.getSupplierProductType(e).searchLocations.length}suggestionExists(e,i){return this.itinerary.items.some(n=>n.productType.id===e&&n.searchLocation.generic.id===i)||this.itineraryItemSuggestions.some(n=>n.productType.id===e&&n.searchLocation.generic.id===i)}flightSuggestionExists(e,i,n){return this.itinerary.items.some(d=>d.productType.id===this.productTypeEnum.Flight&&!d.suggestion&&(d.origin==null&&e==null||d.origin!=null&&e===null||d.origin!=null&&e!=null&&d.origin.id===e.id)&&(d.destination===null&&i===null||d.destination!=null&&i===null||d.destination!=null&&i!=null&&d.destination.id===i?.id)&&(0,v.default)(d.fromDate).isSame((0,v.default)(n),"day"))||this.itineraryItemSuggestions.some(d=>d.productType?.id===this.productTypeEnum.Flight&&(d.origin==null&&e==null||d.origin!=null&&e===null||d.origin!=null&&e!=null&&d.origin.id===e.id)&&(d.destination==null&&i==null||d.destination!=null&&i===null||d.destination!=null&&i!=null&&d.destination.id===i.id)&&(0,v.default)(d.fromDate).isSame((0,v.default)(n),"day"))}pushItemToItinerarySearchLocation(e){this.itinerarySearchLocations.length===0?(this.createItinerarySearchLocation(e.searchLocation?.generic,e.origin&&e.origin.closestAirport?e.origin.closestAirport:e.origin,(e.productType.id===this.productTypeEnum.Flight,e.fromDate),e.productType.id===this.productTypeEnum.Flight?e.fromDate:e.toDate),e.searchLocationDestination&&this.createSearchLocation(e.searchLocationDestination.generic,e.destination,e.toDate,e.toDate)):(this.createSearchLocation(e.searchLocation?.generic,e.origin&&e.origin.closestAirport?e.origin.closestAirport:e.origin,(e.productType.id===this.productTypeEnum.Flight,e.fromDate),e.productType.id===this.productTypeEnum.Flight?e.fromDate:e.toDate),e.searchLocationDestination&&e.searchLocationDestination.generic&&this.createSearchLocation(e.searchLocationDestination.generic,e.destination,e.toDate,e.toDate))}createSearchLocation(e,i,n,d){let h=this.currentItinerarySearchLocation.searchLocation?.id===e?.id?this.currentItinerarySearchLocation:null;h?((0,v.default)(n).isValid()&&((0,v.default)(h.fromDate).isValid()?(0,v.default)(n).isBefore((0,v.default)(h.fromDate))&&(h.fromDate=(0,v.default)(n)):h.fromDate=(0,v.default)(n)),(0,v.default)(d).isValid()&&((0,v.default)(h.toDate).isValid()?(0,v.default)(d).isAfter((0,v.default)(h.toDate))&&(h.toDate=(0,v.default)(d)):h.toDate=(0,v.default)(d))):this.createItinerarySearchLocation(e,i,n,d)}createItinerarySearchLocation(e,i,n,d){this.currentItinerarySearchLocation={searchLocation:e,fromDate:(0,v.default)((0,v.default)(n).format("YYYY-MM-DD")),toDate:(0,v.default)((0,v.default)(d).format("YYYY-MM-DD")),closestAirport:i,itineraryItems:[]},this.itinerarySearchLocations.push(this.currentItinerarySearchLocation)}getCurrentItemSuggestion(e){let i=this.itineraryItemSuggestions.filter(h=>h.productType?.id===e&&(0,v.default)(h.fromDate).isValid()&&(e==B.Flight?h.origin:h.searchLocation&&!h.allSelected)),n=i[i.length-1];if(n)return n;var d=this.getProductTypeOtherSuggestions(e)[0];return d||this.itineraryItemSuggestions.filter(h=>h.productType?.id===e)[0]}getDate(e){return this.itineraryService.getDate(e,"DD MMM YY")}getDateTime(e,i){return i?this.itineraryService.getDate(e,"DD MMM"):this.itineraryService.getDate(e,"DD MMM HH:mm")}moreThanOneProductTypeSuggestion(){return new Set(this.itineraryItemSuggestions.filter(e=>!e.suggestionDismissed&&!e.allSelected).map(e=>e.productType)).size>1}oddNumberSuggestions(){let e=new Set(this.itineraryItemSuggestions.filter(i=>!i.suggestionDismissed&&!i.allSelected).map(i=>i.productType)).size;return e===1||e===3}getFlightSuggestions(){let e=new Set(this.itineraryItemSuggestions.filter(n=>n.productType?.id===this.productTypeEnum.Flight&&n.origin).map(n=>n.origin.airportName)),i=[];return e.forEach(n=>{let d=this.itineraryItemSuggestions.filter(h=>h.productType?.id===this.productTypeEnum.Flight&&h.origin&&h.origin.airportName===n)[0];d&&i.push(d)}),i}getTransferSuggestions(){return this.itineraryItemSuggestions.filter(e=>e.productType?.id===this.productTypeEnum.Transfer&&!e.suggestionDismissed&&!e.allSelected)}getProductTypeSuggestions(e){return this.itineraryItemSuggestions.filter(i=>i.productType?.id===e&&(i.fromDate==null||(0,v.default)(i.fromDate).isValid())&&(i.toDate==null||(0,v.default)(i.toDate).isValid()))}getProductTypeOtherSuggestions(e){return this.itineraryItemSuggestions.filter(i=>i.productType?.id===e&&!i.suggestionDismissed&&i.allSelected)}calculateTotalSuggestions(){this.totalSuggestions=this.itineraryItemSuggestions.length,this.isReturnTransferOnly&&this.getProductTypeSuggestions(this.productTypeEnum.Transfer).length>1&&this.totalSuggestions--}calculatePrices(){this.getProductTypeSuggestions(this.productTypeEnum.Transfer).forEach(e
1=>{let i=null,n=null,d=null,h=null;e.originSupplierLocation&&(d=e.originSupplierLocation.id,i=this.itineraryService.convertStringToTime(e.toDate)),e.destinationSupplierLocation&&(h=e.destinationSupplierLocation.id,n=this.itineraryService.convertStringToTime(e.fromDate)),(d||h)&&this.supplierService.getCheapestTransfer(this.itinerary.id,d,h,i,n).subscribe(I=>{e.price=I?I.price:0})}),this.getProductTypeSuggestions(this.productTypeEnum.Flight).forEach(e=>{let i=null,n=null,d=(0,v.default)(e.fromDate).isValid()?(0,v.default)(e.fromDate).format("YYYY-MM-DD"):(0,v.default)(e.toDate).format("YYYY-MM-DD");e.origin&&(i=e.origin.id),e.destination&&(n=e.destination.id),(i||n)&&this.supplierService.getCheapestFlight(this.itinerary.id,i,n,d).subscribe(h=>{e.price=h.amount})}),this.getProductTypeSuggestions(this.productTypeEnum.CarHire).forEach(e=>{this.supplierService.getCheapestCarHire(this.itinerary.supplier.id,(0,v.default)(e.fromDate).format("YYYY-MM-DD"),(0,v.default)(e.toDate).format("YYYY-MM-DD")).subscribe(i=>{e.price=i.amount})}),this.getProductTypeSuggestions(this.productTypeEnum.Experience).forEach(e=>{let i=(0,v.default)(e.fromDate).isValid()?(0,v.default)(e.fromDate).format("YYYY-MM-DD"):(0,v.default)(e.toDate).format("YYYY-MM-DD");(0,v.default)(i).isValid()&&this.supplierService.getCheapestExperience(this.itinerary.id,i).subscribe(n=>{e.price=n.amount})})}getReturnTransferText(){return!this.selectedDropOffSupplierLocation&&!this.selectedPickupSupplierLocation?"Please enter pickup and drop off locations to continue":this.selectedDropOffSupplierLocation?"Please enter your pick up location to continue":"Please enter your drop off location to continue"}getFlightsSuggestionString(e){let i="";return e.origin&&e.destination?i="From "+e.origin.airportName+" to "+e.destination.airportName:(e.destination&&(i="To "+e.destination.airportName),e.origin&&(i="From "+e.origin.airportName)),i}getTransfersSuggestionString(e){let i="";return e.originSupplierLocation&&e.destinationSupplierLocation?i="From "+e.originSupplierLocation.name+" to "+e.destinationSupplierLocation.name:(e.destinationSupplierLocation&&(i="To "+e.destinationSupplierLocation.name),e.originSupplierLocation&&(i="From "+e.originSupplierLocation.name)),i}getSuggestionCloseText(e){return this.itineraryService.getSuggestionCloseText(e)}showDismissedSuggestions(){this.showCarHireTab=!0,this.showFlightsTab=!0,this.showExperienceTab=!0,this.showTransfersTab=!0,this.showHotelsTab=!0,this.dismissedSuggestions=0}processTransferLocationSelected(e,i){e.originSupplierLocation?this.selectedDropOffSupplierLocation=i:this.selectedPickupSupplierLocation=i}showAddReturnTransfer(){return this.selectedPickupSupplierLocation&&this.selectedDropOffSupplierLocation}addTransfersToItinerary(){this.addingTransfers=!0;let e=this.getProductTypeSuggestions(this.productTypeEnum.Transfer).filter(n=>n.destinationSupplierLocation)[0],i=this.getProductTypeSuggestions(this.productTypeEnum.Transfer).filter(n=>n.originSupplierLocation)[0];e.itineraryId=this.itinerary.id,e.originSupplierLocation=this.selectedPickupSupplierLocation,e.origin=this.selectedPickupSupplierLocation.location,i.itineraryId=this.itinerary.id,i.destinationSupplierLocation=this.selectedDropOffSupplierLocation,i.destination=this.selectedDropOffSupplierLocation.location,this.itineraryService.addReturnTransfers(e,i).subscribe(()=>{window.location.href="/search/"+this.itinerary.id})}allSearchTabsFalse(){this.searchCarHireTab=this.searchHotelsTab=this.searchFlightsTab=this.searchTransfersTab=this.searchTransfersSuggestion=this.searchExperienceTab=!1}showAllExperiences(){this.changeShowModal(!0),this.allSearchTabsFalse(),this.currentExperienceSuggestion.products=[],this.searchExperienceTab=!0}processExperienceSelection(e){this.changeShowModal(!0),this.allSearchTabsFalse(),this.currentExperienceSuggestion.products=[],this.searchExperienceTab=!0,this.viewExperience=e}showAllCarHire(){this.changeShowModal(!0),this.allSearchTabsFalse(),this.currentCarHireSuggestion.products=[],this.searchCarHireTab=!0}processCarHireSelection(e){this.changeShowModal(!0),this.allSearchTabsFalse(),this.currentCarHireSuggestion.products=[],this.searchCarHireTab=!0,this.viewCarHire=e}processHotelSelection(e){this.changeShowModal(!0),this.allSearchTabsFalse(),this.searchHotelsTab=!0,this.viewHotel=e}processFlightSelection(e){this.changeShowModal(!0),this.allSearchTabsFalse(),this.searchFlightsTab=!0,this.viewFlight=e,console.log("this.flightSuggestions",this.flightSuggestions),console.log("this.viewFlight",this.viewFlight),console.log("currentFlightSuggestion",this.currentFlightSuggestion),this.flightSuggestions=[this.currentFlightSuggestion]}processTransferSelection(e){this.changeShowModal(!0),this.allSearchTabsFalse(),this.searchTransfersSuggestion=!0,this.currentItemSuggestion=e}changeShowModal(e){this.showModal=e,e||this.initialise(),this.modalOpen.emit(!e)}compareItineraryItemForOtherSuggestions(e,i){return e?.searchLocation?.id===i?.searchLocation?.id}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-suggestions"]],inputs:{itinerary:"itinerary"},outputs:{modalOpen:"modalOpen"},decls:2,vars:2,consts:[[1,"modal","fade",2,"display","block",3,"ngClass"],[1,"row",3,"class"],[1,"row"],[1,"col-12"],[1,"row","mb-2"],[1,"my-auto","col"],[1,"fw-600"],["icon","clipboard-check"],[1,"pointer","sm",3,"click"],[1,"col-2","col-md-1","order-md-3","text-right","h5","my-auto"],[3,"click","icon"],[1,"col-md-4","my-auto","text-right"],[3,"currentItemSuggestion","itinerary"],[1,"widget","search"],[1,"form-group","mb-md-0"],["for","add-experience-location"],["icon","map-marker-alt"],["id","add-experience-location",1,"form-control","custom-select",3,"ngModelChange","ngModel","compareWith"],[3,"ngValue"],[3,"experienceSelected","currentItemSuggestion","itinerary"],["for","add-carhire-location"],["id","add-carhire-location",1,"form-control","custom-select",3,"ngModelChange","ngModel","compareWith"],[3,"carHireSelected","currentItemSuggestion","itinerary"],["icon","bed"],["for","add-hotels-location"],["id","add-hotels-location",1,"form-control","custom-select",3,"ngModelChange","ngModel","compareWith"],[3,"hotelSelected","currentItemSuggestion","itinerary"],[1,"my-auto"],["
1icon","plane"],[1,"col","my-auto","text-right"],[1,"col-2","col-md-1","text-right","h5","my-auto"],[1,"btn","btn-icon",3,"click"],[3,"flightSelected","currentItemSuggestion","itinerary"],["icon","shuttle-van"],[1,"row","justify-content-center"],[1,"col-8"],[3,"itineraryItem","itinerary"],[1,"mt-5","mb-5","text-center"],[1,"col","text-center","alert","alert-warning","pt-2"],[1,"col","text-center","bookingBack","pt-2"],[1,"col-4","text-right"],[3,"locationSelected","itineraryItem","itinerary"],[1,"btn","btn-primary",3,"click"],[3,"transferSuggestions","itinerary"],[3,"transferSelected","transferSuggestions","itinerary"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"sticky-top"],[3,"itinerary","suggestion","suggestionItineraryItems"],[3,"itineraryItem","itinerary","viewHotel","suggestion"],[3,"itineraryItem","itinerary","viewExperience","suggestion"],[3,"itineraryItem","itinerary","suggestion"],["icon","car"]],template:function(i,n){i&1&&(p(0,Qc,1,1),p(1,cd,21,18,"div",0)),i&2&&(m(n.totalSuggestions>0&&!n.loading?0:-1),o(),m(n.showModal?1:-1))},dependencies:[Fe,ue,$e,je,Ye,me,fe,j,N,Dn,Fn,Vn,Ln,An,Mn,Bt,Ut,ht,$t],encapsulation:2})}}return t})();function dd(t,l){if(t&1&&(a(0,"div",1),u(1,"img",10),r()),t&2){let e=s();o(),f("src",e.getImageUrl(e.transfer.photos[0].photo.url),ke)}}function pd(t,l){t&1&&(a(0,"div",5)(1,"p",11),c(2,"Pickup Time"),r(),a(3,"h5",12),c(4,"We shall be in touch regarding your exact pickup time"),r()())}function md(t,l){if(t&1&&(a(0,"div",6)(1,"p",11),c(2,"Pickup"),r(),a(3,"h5",12),c(4),r()(),a(5,"div",6)(6,"p",11),c(7,"Duration"),r(),a(8,"h5",12),u(9,"fa-icon",13),c(10),r()(),a(11,"div",6)(12,"p",11),c(13,"Dropoff"),r(),a(14,"h5",12),c(15),r()()),t&2){let e=s();o(4),S(e.transfer.startTime),o(6),y(" ",e.getDuration()),o(5),S(e.transfer.endTime)}}function ud(t,l){if(t&1&&(a(0,"h5",12),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(2);o(),S(V(2,1,e.transfer.price,e.currency))}}function hd(t,l){t&1&&(a(0,"h5",12),c(1,"Free of charge"),r())}function _d(t,l){if(t&1&&(a(0,"div",6)(1,"p",11),c(2,"Price Per Vehicle"),r(),p(3,ud,3,4,"h5",12)(4,hd,2,0,"h5",12),r()),t&2){let e=s();o(3),m(e.transfer.price>0?3:4)}}function gd(t,l){if(t&1){let e=x();a(0,"button",14),C("click",function(){_(e);let n=s();return g(n.selectTransfer())}),c(1,"Select"),r()}}function Cd(t,l){t&1&&(a(0,"div",9),u(1,"fa-icon",15),c(2," SELECTED"),r())}function fd(t,l){if(t&1&&(a(0,"div",4),u(1,"app-product-announcements",16),r()),t&2){let e=s();o(),f("announcements",e.announcements)}}var Rn=(()=>{class t{constructor(){this.transferSelected=new L,this.announcements=[],this.itineraryService=T(M),this.supplierService=T(A)}showPricing(){return this.itineraryService.showPricing()}bookable(){return this.itineraryService.bookable()}selectTransfer(){this.transferSelected.emit(this.transfer)}getDuration(){return this.itineraryService.getDuration(this.transfer.startTime,this.transfer.endTime)}timeUnknown(){return this.transfer.startTime===this.transfer.endTime}get currency(){return this.supplierService.getSelectedCurrency()}getImageUrl(e){return this.supplierService.getImageUrl(e,!0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-transfer"]],inputs:{transfer:"transfer",announcements:"announcements"},outputs:{transferSelected:"transferSelected"},decls:12,vars:7,consts:[[1,"row","product"],[1,"col-md-2"],[1,"col-md","my-auto"],[1,"d-md-none"],[1,"row"],[1,"col-sm","my-auto"],[1,"col","my-auto"],[1,"col-md","text-right","my-auto"],[1,"btn","btn-primary","mb-2","w-100","mt-3","mt-sm-0"],[1,"text-right","h5"],[1,"w-100",3,"src"],[1,"title"],[1,"data"],["icon","stopwatch"],[1,"btn","btn-primary","mb-2","w-100","mt-3","mt-sm-0",3,"click"],["icon","check-circle"],["containerClass","col",3,"announcements"]],template:function(i,n){i&1&&(a(0,"div",0),p(1,dd,2,1,"div",1),a(2,"div",2),u(3,"hr",3),a(4,"div",4),p(5,pd,5,0,"div",5),p(6,md,16,3),p(7,_d,5,1,"div",6),a(8,"div",7),p(9,gd,2,0,"button",8),p(10,Cd,3,0,"div",9),r()(),p(11,fd,2,1,"div",4),r()()),i&2&&(o(),m(n.transfer.ph
1otos.length>0?1:-1),o(4),m(n.timeUnknown()?5:-1),o(),m(n.timeUnknown()?-1:6),o(),m(n.showPricing()?7:-1),o(2),m(!n.transfer.selected&&n.bookable()?9:-1),o(),m(n.transfer.selected?10:-1),o(),m(n.announcements.length?11:-1))},dependencies:[j,ze,Z],styles:[".transfer[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:20px;border-bottom:1px solid #f4f4f4;margin-bottom:10px}.ng-fa-icon[_ngcontent-%COMP%]{padding-right:8px}"]})}}return t})();var Jt=ge(Ce(),1);function xd(t,l){t&1&&(a(0,"h3",0),u(1,"app-spinner"),c(2," Loading Transfers"),r())}function yd(t,l){if(t&1){let e=x();a(0,"app-transfer",3),C("transferSelected",function(n){_(e);let d=s();return g(d.processTransferSelection(n))}),r()}if(t&2){let e=l.$implicit,i=s();f("transfer",e)("announcements",i.getProductAnnouncements(e.id))}}function Sd(t,l){t&1&&(a(0,"h3",2),c(1,"Sorry, No Transfers Were Found"),r())}var On=(()=>{class t{constructor(){this.productAnnouncements=[],this.itinerariesApi=T(Ve),this.itineraryService=T(M),this.supplierService=T(A),this.loading=!0}ngOnInit(){(!this.itineraryItem.products||this.itineraryItem.products.length<1)&&(this.itineraryItem.originSupplierLocation||this.itineraryItem.destinationSupplierLocation)?this.getTransfers():this.loading=!1}getTransfers(){this.itineraryItem.originSupplierLocation&&this.itineraryItem.destinationSupplierLocation&&(!this.itineraryItem.products||this.itineraryItem.products.length<1?this.supplierService.getTransfers(this.itineraryItem.id).subscribe(e=>{this.itineraryItem.products=e,this.itineraryItem.products.forEach(i=>{let n=i;this.itineraryItem.selectedItems&&this.itineraryItem.selectedItems.some(d=>d.supplierProductItemPrice.supplierProductItem.supplierProduct.id===n.id)&&this.markSelected(n)}),this.itineraryItem.products.length===1&&!this.itineraryItem.allSelected?this.processTransferSelection(this.itineraryItem.products[0]):this.loading=!1}):this.loading=!1)}processTransferSelection(e){this.itinerariesApi.addToCart({itineraryItemId:this.itineraryItem.id,supplierProductItemId:e.items[0].id}).pipe(te(1)).subscribe(i=>{this.itineraryService.productSelected(i,this.itineraryItem,e),this.loading=!1})}markSelected(e){for(let i of this.itineraryItem.products)i.selected=!1;e.selected=!0,this.itineraryItem.allSelected=!0,this.itineraryItem.fromDate=Jt.default.utc(Jt.default.utc(this.itineraryItem.fromDate).format("YYYY-MM-DD")+" "+e.startTime)}getProductAnnouncements(e){return this.productAnnouncements.filter(i=>i.productId===e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-transfers"]],inputs:{itineraryItem:"itineraryItem",productAnnouncements:"productAnnouncements"},decls:4,vars:2,consts:[[1,"text-center","p-4"],[3,"transfer","announcements"],[1,"p-5","text-center"],[3,"transferSelected","transfer","announcements"]],template:function(i,n){i&1&&(p(0,xd,3,0,"h3",0),w(1,yd,1,2,"app-transfer",1,k),p(3,Sd,2,0,"h3",2)),i&2&&(m(n.loading?0:-1),o(),E(n.itineraryItem.products),o(2),m(!n.loading&&(!n.itineraryItem.products||n.itineraryItem.products.length<1)?3:-1))},dependencies:[N,Rn],encapsulation:2})}}return t})();var dt=ge(Ce(),1);var vd=["*"],Td=[[["","accordion-heading",""]],"*"],Id=["[accordion-heading]","*"],wd=t=>({"text-muted":t});function Ed(t,l){if(t&1&&(a(0,"button",4),c(1),r()),t&2){let e=s();f("ngClass",ne(2,wd,e.isDisabled())),o(),y(" ",e.heading()," ")}}var bd=(()=>{class t{constructor(){this.closeOthers=!1,this.isAnimated=!1}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ft({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ei=(()=>{class t{constructor(e){this._config=e,this.isAnimated=$(this._config.isAnimated),this.closeOthers=$(this._config.closeOthers),this.groups=[]}closeOtherPanels(e){this.closeOthers()&&this.groups.forEach(i=>{i!==e&&(i.isOpen=!1)})}addGroup(e){e.isAnimated=this.isAnimated(),this.groups.push(e)}removeGroup(e){let i=this.groups.indexOf(e);i!==-1&&this.groups.splice(i,1)}static{this.\u0275fac=function(i){return new(i||t)(Ie(bd))}}static{this.\u0275cmp=P({type:t,selectors:[["accordion"]],hostAttrs:["role","tablist",1,"panel-group",2,"display","block"],hostVars:1,hostBindings:function(i,n){i&2&&Pe("aria-multiselectable",n.closeOthers())},inputs:{isAnimated:[1,"isAnimated"],closeOthers:[1,"closeOthers"]},ngContentSelectors:vd,decls:1,vars:0,template:function(i,n){i&1&&(nt(),Ze(0))},encapsulation:2})}}return t})(),gt=(()=>{class t{get isOpen(){return this._isOpen}set isOpen(e){e!==this._isOpen&&(e&&this.accordion.closeOtherPanels(this),this._isOpen=e,Promise.resolve(null).then(()=>{this.isOpenChange.emit(e)}))}constructor(e){this.isAnimated=!1,this.heading=$(""),this.panelClass=$("panel-default"),this.isDisabled=$(!1),this.isOpenInput
1=$(!1,{alias:"isOpen"}),this.isOpenChange=De(),this._isOpen=!1,this.accordion=e,He(()=>{let i=this.isOpenInput();i!==this._isOpen&&(this.isOpen=i)})}ngOnInit(){this.accordion.addGroup(this)}ngOnDestroy(){this.accordion.removeGroup(this)}toggleOpen(){this.isDisabled()||(this.isOpen=!this.isOpen)}static{this.\u0275fac=function(i){return new(i||t)(Ie(ei))}}static{this.\u0275cmp=P({type:t,selectors:[["accordion-group"],["accordion-panel"]],hostAttrs:[1,"panel",2,"display","block"],hostVars:2,hostBindings:function(i,n){i&2&&ie("panel-open",n.isOpen)},inputs:{heading:[1,"heading"],panelClass:[1,"panelClass"],isDisabled:[1,"isDisabled"],isOpenInput:[1,"isOpen","isOpenInput"]},outputs:{isOpenChange:"isOpenChange"},ngContentSelectors:Id,decls:9,vars:6,consts:[[1,"panel","card",3,"ngClass"],["role","tab",1,"panel-heading","card-header",3,"click","ngClass"],[1,"panel-title"],["role","button",1,"accordion-toggle"],["type","button",1,"btn","btn-link",3,"ngClass"],["role","tabpanel",1,"panel-collapse","collapse",3,"collapse","isAnimated"],[1,"panel-body","card-block","card-body"]],template:function(i,n){i&1&&(nt(Td),a(0,"div",0)(1,"div",1),C("click",function(){return n.toggleOpen()}),a(2,"div",2)(3,"div",3),p(4,Ed,2,4,"button",4),Ze(5),r()()(),a(6,"div",5)(7,"div",6),Ze(8,1),r()()()),i&2&&(f("ngClass",n.panelClass()),o(),f("ngClass",n.isDisabled()?"panel-disabled":"panel-enabled"),o(2),Pe("aria-expanded",n.isOpen),o(),m(n.heading()?4:-1),o(2),f("collapse",!n.isOpen)("isAnimated",n.isAnimated))},dependencies:[Fe,ct,lt],styles:["[_nghost-%COMP%] .card-header.panel-enabled[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .card-header.panel-disabled[_ngcontent-%COMP%] .btn.btn-link[_ngcontent-%COMP%]{cursor:default;text-decoration:none}"]})}}return t})(),Bn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=it({type:t})}static{this.\u0275inj=tt({imports:[gt]})}}return t})();var Pd=t=>["/brochure",t],Dd=t=>["/","supplier","bookings","edit-quote",t],Fd=t=>({"border-color":t}),ti=(t,l)=>l.id;function Vd(t,l){if(t&1){let e=x();a(0,"fa-icon",15),C("click",function(){_(e);let n=s();return n.showEverything=!1,g(n.editItinerary=!0)}),r()}}function Ld(t,l){t&1&&(a(0,"div",9),u(1,"app-spinner"),r())}function Ad(t,l){if(t&1&&(a(0,"a",29),u(1,"fa-icon",31),r()),t&2){let e,i=s(3);f("routerLink",ne(1,Dd,(e=i.itinerary.supplierQuoteItineraries.at(0))==null?null:e.supplierQuoteId))}}function Md(t,l){if(t&1&&(a(0,"div",30)(1,"h3"),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),y(" Base Price: ",V(3,1,e.itinerary.basePrice-e.itinerary.singleSupplementCost,e.currency)," ")}}function Hd(t,l){if(t&1){let e=x();a(0,"div",16)(1,"div",25)(2,"h3"),c(3),a(4,"fa-icon",26),C("click",function(){_(e);let n=s(2);return g(n.editPackage())}),r(),a(5,"a",27),u(6,"fa-icon",28),r(),p(7,Ad,2,3,"a",29),r()(),p(8,Md,4,4,"div",30),r()}if(t&2){let e=s(2);o(3),y(" ",e.itinerary.package.name," "),o(),f("tooltip","Edit this package"),o(),f("routerLink",ne(5,Pd,e.itinerary.id)),o(2),m(e.hasQuote?7:-1),o(),m(e.itinerary.basePrice>0&&e.showPricing()?8:-1)}}function Rd(t,l){if(t&1&&(a(0,"div",25)(1,"h6",34),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),Q(" Single Supplement (",e.itinerary.singleSupplement,"): ",V(3,2,e.itinerary.singleSupplementCost,e.currency)," ")}}function Od(t,l){if(t&1&&(a(0,"div",25)(1,"h6",34),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),y(" Accommodation: ",V(3,1,e.itinerary.basePriceAccommodationTotal,e.currency)," ")}}function Bd(t,l){if(t&1&&(a(0,"div",25)(1,"h6",34),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),y("Experiences: ",V(3,1,e.itinerary.basePriceExperiencesTotal,e.currency))}}function Nd(t,l){if(t&1&&(a(0,"div",25)(1,"h6",34),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),y("Flights: ",V(3,1,e.itinerary.basePriceFlightsTotal,e.currency))}}function Wd(t,l){if(t&1&&(a(0,"div",25)(1,"h6",34),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),y("Transport: ",V(3,1,e.itinerary.basePriceTransportationTotal,e.currency))}}function Yd(t,l){if(t&1&&(a(0,"div",25)(1,"h6",34),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),y("Park Fees: ",V(3,1,e.itinerary.basePriceParkFeesTotal,e.currency))}}function $d(t,l){if(t&1&&(a(0,"div",25)(1,"h6",34),c(2),F(3,"convertCurrency"),r()()),t&2){let e=s(3);o(2),y("Extras: ",V(3,1,e.itinerary.basePriceExtrasTotal,e.currency))}}
1function jd(t,l){if(t&1&&(u(0,"hr"),a(1,"div",32)(2,"div",33)(3,"h6",34),c(4,"Breakdown:"),r()(),p(5,Rd,4,5,"div",25),p(6,Od,4,4,"div",25),p(7,Bd,4,4,"div",25),p(8,Nd,4,4,"div",25),p(9,Wd,4,4,"div",25),p(10,Yd,4,4,"div",25),p(11,$d,4,4,"div",25),r()),t&2){let e=s(2);o(5),m(e.itinerary.singleSupplement>0?5:-1),o(),m(e.itinerary.basePriceAccommodationTotal>0?6:-1),o(),m(e.itinerary.basePriceExperiencesTotal>0?7:-1),o(),m(e.itinerary.basePriceFlightsTotal>0?8:-1),o(),m(e.itinerary.basePriceTransportationTotal>0?9:-1),o(),m(e.itinerary.basePriceParkFeesTotal>0?10:-1),o(),m(e.itinerary.basePriceExtrasTotal>0?11:-1)}}function Ud(t,l){t&1&&u(0,"hr",17)}function zd(t,l){if(t&1&&(a(0,"div")(1,"p",45),c(2),r()()),t&2){let e,i=s().$index,n=s(3);Be("position: absolute; top: "+(i===0?"-21":"-19")+"px;"),o(2),y(" ",(e=n.items()[i])==null||e.searchLocation==null||e.searchLocation.generic==null?null:e.searchLocation.generic.name.toUpperCase()," ")}}function qd(t,l){t&1&&u(0,"fa-icon",53)}function Gd(t,l){t&1&&u(0,"fa-icon",54)}function Xd(t,l){t&1&&u(0,"fa-icon",55)}function Kd(t,l){t&1&&u(0,"fa-icon",56)}function Qd(t,l){t&1&&u(0,"fa-icon",57)}function Zd(t,l){t&1&&u(0,"fa-icon",58)}function Jd(t,l){t&1&&u(0,"fa-icon",59)}function ep(t,l){if(t&1&&(a(0,"div",46),p(1,qd,1,0,"fa-icon",53),p(2,Gd,1,0,"fa-icon",54),p(3,Xd,1,0,"fa-icon",55),p(4,Kd,1,0,"fa-icon",56),p(5,Qd,1,0,"fa-icon",57),p(6,Zd,1,0,"fa-icon",58),p(7,Jd,1,0,"fa-icon",59),r()),t&2){let e=s(2).$implicit,i=s(3);o(),m(e.productType.id===i.productType.Flight?1:-1),o(),m(e.productType.id===i.productType.Transfer?2:-1),o(),m(e.productType.id===i.productType.Extra?3:-1),o(),m(e.productType.id===i.productType.Experience?4:-1),o(),m(e.productType.id===i.productType.Hotel?5:-1),o(),m(e.productType.id===i.productType.CarHire?6:-1),o(),m(e.productType.id===i.productType.Fee?7:-1)}}function tp(t,l){if(t&1&&(a(0,"div",50)(1,"p",45),c(2,"Location"),r(),a(3,"p",21),c(4),r()()),t&2){let e=s(2).$implicit;o(4),S(e.searchLocation==null?null:e.searchLocation.name)}}function ip(t,l){if(t&1&&(a(0,"div",60)(1,"p",45),c(2,"From "),a(3,"span",61),c(4," / To"),r()(),a(5,"p",21),c(6),u(7,"br",62),c(8),r(),a(9,"p",63),c(10),u(11,"br",62),c(12),r()(),a(13,"div",64),u(14,"img",4),r(),a(15,"div",65)(16,"p",45),c(17,"To"),r(),a(18,"p",21),c(19),u(20,"br"),c(21),r()()),t&2){let e=s(2).$implicit;o(6),y(" ",e.origin==null?null:e.origin.airportName," "),o(2),y("(",e.origin==null?null:e.origin.airportCode,") "),o(2),y(" ",e.destination==null?null:e.destination.airportName," "),o(2),y("(",e.destination==null?null:e.destination.airportCode,") "),o(7),y(" ",e.destination==null?null:e.destination.airportName),o(2),y("(",e.destination==null?null:e.destination.airportCode,") ")}}function np(t,l){if(t&1&&u(0,"span",66),t&2){let e=s(3).$implicit,i=s(3);f("innerHTML","<br/>"+i.getDate(e.fromDate,"LT"),R)}}function op(t,l){if(t&1&&u(0,"p",49),t&2){let e=s(3).$implicit,i=s(3);f("innerHTML",i.getDate(e.toDate,"LT"),R)}}function rp(t,l){if(t&1&&(a(0,"div",25)(1,"p",45),c(2),r(),a(3,"p",21),c(4),p(5,np,1,1,"span",66),r()(),a(6,"div",67),u(7,"img",4),r(),a(8,"div",25)(9,"p",45),c(10),r(),a(11,"p",21),c(12),r(),p(13,op,1,1,"p",49),r()),t&2){let e=s(2).$implicit,i=s(3);o(2),y(" ",e.productType.id===i.productType.Transfer?"Leaving":"Pick Up"," From "),o(2),y(" ",e.originSupplierLocation?e.originSupplierLocation.name:"Please Choose"," "),o(),m(e.productType.id===i.productType.CarHire?5:-1),o(5),y(" ",e.productType.id===i.productType.Transfer?"Going":"Drop Off"," To "),o(2),y(" ",e.destinationSupplierLocation?e.destinationSupplierLocation.name:"Please Choose"," "),o(),m(e.productType.id===i.productType.CarHire?13:-1)}}function ap(t,l){if(t&1){let e=x();a(0,"fa-icon",72),C("click",function(n){_(e);let d=s(3).$index,h=s(3);return g(h.onViewAllExperiences(n,d))}),r()}}function sp(t,l){if(t&1&&(a(0,"div")(1,"p",73),c(2),r()()),t&2){let e=s(3).$implicit;o(2),y("(",e.paxWarningMessage,")")}}function lp(t,l){if(t&1&&(a(0,"div")(1,"div",68)(2,"div",25)(3,"p",69),c(4),r(),a(5,"div",70),u(6,"p",49),F(7,"safeHtml"),p(8,ap,1,0,"fa-icon",71),r(),p(9,sp,3,1,"div"),r()()()),t&2){let e=s(2).$implicit,i=s(3);q(e.productType.id===i.productType.Hotel||e.productType.id===i.productType.Experience||i.itinerary.package?"col-lg-7":e.productType.id===i.productType.CarHire?"col-lg-2":e.productType.id===i.productType.Flight?"col-lg":"col-lg-4"),o(4),y(" ",e.productType.id!==i.productType.Transfer?"Details":"Timing"," "),o(2),f("innerHTML",ot(7,6,i.getSelectedText(e)),R),o(2),m(e.productType.id===i.productType.Experience?8:-1),o(),m(e.paxWarningMessage?9:-1)}}function cp(t,l){if(t&1&&(a(0,"p",75),c(1),F(2,"convertCurrency"),u(3,"br"),c(4),r()),t&2){let e=s(3).$implicit,i=s(3);o(),y(" Incl. ",V(2,2,e.discount,i.currency)),o(3),y("",e.discountDetail," ")}}function dp(t,l){t&1&&(a(0,"h4",76),c(1,"Free of charge"),r())}function pp(t,l){if(t&1&&(a(0,"p",77),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(3).$implicit,i=s(3);o(),pt(" ( ",V(2,3,i.getPrice(e),i.currency)," ",i.getConnectedProductTypes(e,i.productType.Extra).length>0?"Incl. Extras":""," ",i.getConnectedProductTypes(e,i.productType.Fee).length>0?(i.getConnectedProductTypes(e,i.productType.Extra).length>0?" +":" Incl.")+" Fees":""," ) ")}}function mp(t,l){if(t&1&&(a(0,"p",78)(1,"span",79),c(2),r()()),t&2){let e=s(3).$implicit,i=s(3);o(2),y(" ",i.getPercentage(i.getPrice(e),i.getPayNow(e)),"% Deposit Required ")}}function up(t,l){if(t&1&&(a(0,"div",52)(1,"h4",74),c(2),F(3,"convertCurrency"),r(),p(4,cp,5,5,"p",75),p(5,dp,2,0,"h4",76),p(6,pp,3,6,"p",77),p(7,mp,3,1,"p",78),r()),t&2){let e=s(2).$implicit,i=s(3);o(2),S(V(3,5,e.price,i.currency)),o(2),m((!i.itinerary.package||i.itinerary.package.basePriceAutoGenerated)&&e.discountDetail?4:-1),o(),m((i.getPrice(e)<=0,-1)),o(),m(e.allSelected&&i.showPricing()&&i.getConnectedProductTypesTotal(e,!1)>0?6:-1),o(),m(i.getPercentage(i.getPrice(e),i.getPayNow(e))<100||i.getDepositPercentage()<100?7:-1)}}function hp(t,l){if(t&1&&(a(0,"div"),p(1,ep,8,7,"div",46),a(2,"div",47)(3,"div",25)(4,"div",16)(5,"div")(6,"p",48),c(7),r(),u(8,"p",49),r(),p(9,tp,5,1,"div",50),p(10,ip,22,6),p(11,rp,14,6),p(12,lp,10,8,"div",51),r()(),p(13,up,8,8,"div",52),r()()),t&2){let e=s().$implicit,i=s(3);o(),m(i.showProductTypeIcons?1:-1),o(4),q(e.productType.id===i.productType.Hotel||e.productType.id===i.productType.Fee||e.productType.id===i.productType.CarHire||e.productType.id===i.productType.Experience||e.productType.id===i.productType.Extra?"col col-lg-3":"col
1col-lg-2"),o(2),y("",e.productType.productName," Date"),o(),f("innerHTML",i.getDates(e.fromDate,i.isZeroDayExtra(e)?null:e.toDate,"ddd, DD MMM",!1),R),o(),m(e.productType.id===i.productType.Hotel||e.productType.id===i.productType.Experience||e.productType.id===i.productType.Extra?9:-1),o(),m(e.productType.id===i.productType.Flight?10:-1),o(),m((e.productType.id===i.productType.Transfer||e.productType.id===i.productType.CarHire)&&i.itinerary.package==null?11:-1),o(),m(e.productType.id!==i.productType.Transfer||e.allSelected?12:-1),o(),m(i.showPricing()?13:-1)}}function _p(t,l){t&1&&u(0,"hr")}function gp(t,l){if(t&1&&(a(0,"p",21),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(2).$implicit,i=s(4);o(),S(V(2,1,e.price,i.currency))}}function Cp(t,l){t&1&&(a(0,"p",21),c(1,"Free of charge"),r())}function fp(t,l){if(t&1&&(a(0,"div",82),p(1,gp,3,4,"p",21),p(2,Cp,2,0,"p",21),r()),t&2){let e=s().$implicit;o(),m(e.price>0?1:-1),o(),m((e.price<=0,-1))}}function xp(t,l){if(t&1&&(a(0,"div",16)(1,"div",80),u(2,"p",81),r(),p(3,fp,3,2,"div",82),r()),t&2){let e=l.$implicit,i=s(4);o(2),f("innerHTML",i.getSelectedText(e),R),o(),m(i.showPricing()?3:-1)}}function yp(t,l){if(t&1){let e=x();a(0,"button",83),C("click",function(n){_(e);let d=s().$implicit,h=s(3);return n.stopPropagation(),d.showExtras=!0,g(h.extraItineraryItem=d)}),c(1),r()}if(t&2){let e=s().$implicit,i=s(3);o(),y(" ",i.getConnectedProductTypes(e,i.productType.Extra)&&i.getConnectedProductTypes(e,i.productType.Extra).length>0?"Edit":"Add"," Extras ")}}function Sp(t,l){t&1&&u(0,"hr")}function vp(t,l){if(t&1&&(a(0,"p",21),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(2).$implicit,i=s(4);o(),S(V(2,1,e.price,i.currency))}}function Tp(t,l){t&1&&(a(0,"p",21),c(1,"Free of charge"),r())}function Ip(t,l){if(t&1&&(a(0,"div",82),p(1,vp,3,4,"p",21),p(2,Tp,2,0,"p",21),r()),t&2){let e=s().$implicit;o(),m(e.price>0?1:-1),o(),m((e.price<=0,-1))}}function wp(t,l){if(t&1&&(a(0,"div",16)(1,"div",80),u(2,"p",81),r(),p(3,Ip,3,2,"div",82),r()),t&2){let e=l.$implicit,i=s(4);o(2),f("innerHTML",i.getSelectedText(e),R),o(),m(i.showPricing()?3:-1)}}function Ep(t,l){if(t&1){let e=x();a(0,"button",83),C("click",function(n){_(e);let d=s().$implicit,h=s(3);return n.stopPropagation(),d.showFees=!0,g(h.feeItineraryItem=d)}),c(1),r()}if(t&2){let e=s().$implicit,i=s(3);o(),y(" ",i.getConnectedProductTypes(e,i.productType.Fee)&&i.getConnectedProductTypes(e,i.productType.Fee).length>0?"Edit":"Include Park"," Fees ")}}function bp(t,l){t&1&&(a(0,"div",42),u(1,"fa-icon",84),r())}function kp(t,l){if(t&1){let e=x();a(0,"fa-icon",26),C("click",function(n){_(e);let d=s(4);return n.stopPropagation(),d.showEverything=!1,g(d.editItinerary=!0)}),r()}if(t&2){let e=s().$implicit;f("tooltip","Change "+e.productType.productName+" Details")}}function Pp(t,l){if(t&1&&u(0,"app-packages",85),t&2){let e=s(2).$implicit,i=s(3);f("itineraryItem",e)("productAnnouncements",i.productAnnouncements)}}function Dp(t,l){if(t&1&&u(0,"app-flights",86),t&2){let e=s(2).$implicit,i=s(3);f("itineraryItem",e)("itinerary",i.itinerary)("productAnnouncements",i.productAnnouncements)}}function Fp(t,l){if(t&1&&u(0,"app-hotels",87),t&2){let e=s(2).$implicit,i=s(3);f("itineraryItem",e)("viewHotel",i.getCurrentHotelBaseOnUrl(e))("hotelAnnouncements",i.hotelAnnouncements)}}function Vp(t,l){if(t&1&&u(0,"app-transfers",85),t&2){let e=s(2).$implicit,i=s(3);f("itineraryItem",e)("productAnnouncements",i.productAnnouncements)}}function Lp(t,l){if(t&1&&u(0,"app-experiences",88),t&2){let e=s(2).$implicit,i=s(3);f("itineraryItem",e)("itinerary",i.itinerary)("startWithAllExperiences",i.startExperiencesWithAllExperiences)("productAnnouncements",i.productAnnouncements)}}function Ap(t,l){if(t&1&&u(0,"app-cars",85),t&2){let e=s(2).$implicit,i=s(3);f("itineraryItem",e)("productAnnouncements",i.productAnnouncements)}}function Mp(t,l){t&1&&(a(0,"div",89)(1,"h5"),c(2,"Please Make a Selection and click Next Step."),r()())}function Hp(t,l){if(t&1&&(a(0,"div"),p(1,Pp,1,2,"app-packages",85),p(2,Dp,1,3,"app-flights",86),p(3,Fp,1,3,"app-hotels",87),p(4,Vp,1,2,"app-transfers",85),p(5,Lp,1,4,"app-experiences",88),p(6,Ap,1,2,"app-cars",85),p(7,Mp,3,0,"div",89),r()),t&2){let e=s().$implicit,i=s(3);o(),m(e.productType.id===i.productType.Package?1:-1),o(),m(!i.itinerary.package&&e.productType.id===i.productType.Flight?2:-1),o(),m(e.productType.id===i.productType.Hotel?3:-1),o(),m(e.productType.id===i.productType.Transfer?4:-1),o(),m(e.productType.id===i.productType.Experience?5:-1),o(),m(e.productType.id===i.productType.CarHire?6:-1),o(),m((!e.allSelected&&!e.needMoreInfo&&i.loading,-1))}}function Rp(t,l){if(t&1){let e=x();a(0,"accordion-group",36),C("click",function(){let n=_(e).$index,d=s(3);return g(d.clickAccordion(n))}),a(1,"div",37),p(2,zd,3,3,"div",38),p(3,hp,14,10,"div"),p(4,_p,1,0,"hr"),a(5,"div",16)(6,"div",39),w(7,xp,4,2,"div",16,ti),r(),a(9,"div",40),p(10,yp,2,1,"button",41),r()(),p(11,Sp,1,0,"hr"),a(12,"div",16)(13,"div",39),w(14,wp,4,2,"div",16,ti),r(),a(16,"div",40),p(17,Ep,2,1,"button",41),r()(),p(18,bp,2,0,"div",42),a(19,"div",43),p(20,kp,1,1,"fa-icon",44),r()(),p(21,Hp,8,7,"div"),r()}if(t&2){let e,i,n=l.$implicit,d=l.$index,h=s(3);f("isOpen",d===h.openIndex)("panelClass","itineraryItemAccordion "+(n.allSelected?"allSelected":n.suggestion?"suggestion":"")+(d===h.openIndex?" open":"")+(n.productType?"":" accordionWidget")+(d>0&&((e=h.items()[d])==null||e.searchLocation==null||e.searchLocation.generic==null?null:e.searchLocation.generic.name)!==((e=h.items()[d-1]
1)==null||e.searchLocation==null||e.searchLocation.generic==null?null:e.searchLocation.generic.name)?" location":"")),o(2),m(d===0||((i=h.items()[d])==null||i.searchLocation==null||i.searchLocation.generic==null?null:i.searchLocation.generic.name)!==((i=h.items()[d-1])==null||i.searchLocation==null||i.searchLocation.generic==null?null:i.searchLocation.generic.name)?2:-1),o(),m(n.productType?3:-1),o(),m(n.allSelected&&h.getConnectedProductTypes(n,h.productType.Extra).length>0?4:-1),o(3),E(h.getConnectedProductTypes(n,h.productType.Extra)),o(3),m(!h.isDayRoom(n)&&n.extras&&n.extras.length>0?10:-1),o(),m(n.allSelected&&h.getConnectedProductTypes(n,h.productType.Fee).length>0?11:-1),o(3),E(h.getConnectedProductTypes(n,h.productType.Fee)),o(3),m(!h.isDayRoom(n)&&n.fees&&n.fees.length>0?17:-1),o(),m(!n.allSelected&&n.suggestion?18:-1),o(2),m(!n.needMoreInfo&&!h.itinerary.package?20:-1),o(),m(n.productType&&!h.isDayRoom(n)&&!h.isZeroDayExtra(n)&&(d===h.openIndex||n.productType.id===h.productType.Flight)?21:-1)}}function Op(t,l){if(t&1&&(a(0,"accordion",19),w(1,Rp,22,11,"accordion-group",35,ti),r()),t&2){let e=s(2);f("isAnimated",!0)("closeOthers",!0),o(),E(e.items())}}
1function Bp(t,l){if(t&1&&(a(0,"h5",21),c(1),r()),t&2){let e=s(2);o(),y("",e.getDepositPercentage(),"% Deposit required to make a reservation")}}function Np(t,l){if(t&1){let e=x();a(0,"div",90),C("click",function(){_(e);let n=s(2);return n.showEverything=!1,g(n.editItinerary=!0)}),c(1,"Edit"),r()}}function Wp(t,l){if(t&1&&(a(0,"h4",91),c(1),F(2,"convertCurrency"),r()),t&2){s();let e=Et(1),i=s(2);o(),y(" ADDITIONS : ",V(2,1,e,i.currency)," ")}}function Yp(t,l){if(t&1&&(a(0,"h4",91),c(1),F(2,"convertCurrency"),r()),t&2){s();let e=Et(6),i=s(2);o(),y(" DISCOUNTS : ",V(2,1,e,i.currency)," ")}}function $p(t,l){if(t&1&&(a(0,"h4",91),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(3);o(),y("PAID : ",V(2,1,e.getPaid(),e.currency))}}function jp(t,l){if(t&1&&(a(0,"h4",91),c(1),F(2,"convertCurrency"),r()),t&2){let e=s(3);o(),y(" BALANCE : ",V(2,1,e.getOutstanding(),e.currency)," ")}}function Up(t,l){if(t&1&&(a(0,"div",24),It(1),p(2,Wp,3,4,"h4",91),a(3,"h4",91),c(4),F(5,"convertCurrency"),r(),It(6),p(7,Yp,3,4,"h4",91),p(8,$p,3,4,"h4",91),p(9,jp,3,4,"h4",91),r()),t&2){let e=s(2);o();let i=wt(e.getAdditionsTotal());o(),m(i>0?2:-1),o(2),y("TOTAL : ",V(5,6,e.getSubTotal(),e.currency)),o(2);let n=wt(e.getDiscountsTotal());o(),m(n>0?7:-1);let d=e.getPaid();o(),m(d>0?8:-1),o(),m(d>0||n>0?9:-1)}}function zp(t,l){if(t&1){let e=x();a(0,"div",10),p(1,Hd,9,7,"div",16),p(2,jd,12,7),p(3,Ud,1,0,"hr",17),a(4,"div",18),C("collapses",function(){_(e);let n=s();return g(n.itineraryCollapses())})("expanded",function(){_(e);let n=s();return g(n.itineraryExpanded())}),p(5,Op,3,2,"accordion",19),a(6,"div",16)(7,"div",20),p(8,Bp,2,1,"h5",21),r(),a(9,"div",22),p(10,Np,2,0,"div",23),r(),p(11,Up,10,10,"div",24),r()()()}if(t&2){let e=s();o(),m(e.itinerary.package?1:-1),o(),m(e.itinerary.package&&(e.itinerary.singleSupplement>0||e.itinerary.basePriceAccommodationTotal>0||e.itinerary.basePriceExperiencesTotal>0||e.itinerary.basePriceFlightsTotal>0||e.itinerary.basePriceTransportationTotal>0||e.itinerary.basePriceParkFeesTotal>0||e.itinerary.basePriceExtrasTotal>0)?2:-1),o(),m(e.itinerary.package?3:-1),o(),f("collapse",e.itineraryCollapsed)("isAnimated",!0),o(),m(e.loading?-1:5),o(3),m(e.showPricing()&&e.getDepositPercentage()<100?8:-1),o(2),m(e.itinerary.package?-1:10),o(),m(e.showPricing()?11:-1)}}function qp(t,l){if(t&1&&(a(0,"div",1),u(1,"hr")(2,"div",92),r()),t&2){let e=s();o(2),f("ngStyle",ne(2,Fd,e.supplier.cosmetics.widgetHeaderColour))("innerHtml",e.supplier.settings.bookNowPayLaterSearchText,R)}}function Gp(t,l){if(t&1){let e=x();a(0,"div"),u(1,"hr"),a(2,"div",93)(3,"div",25)(4,"h4"),c(5),r(),a(6,"p"),c(7," There are offers available for your dates. Based on your selections, the most favourable discount(s) will automatically be applied to your itinerary. "),r()(),a(8,"div",94)(9,"div",95),C("click",function(){_(e);let n=s();return g(n.showAvailableDiscounts=!0)}),c(10,"View Offers"),r()()()()}if(t&2){let e=s();o(5),Q("",e.discounts.length," Available Offers - up to ",e.getMaxDiscount(),"% Off")}}function Xp(t,l){if(t&1&&u(0,"app-add-another-package-widget",11),t&2){let e=s();f("initialFromDate",e.lastToDate)}}function Kp(t,l){t&1&&(a(0,"h2"),c(1,"Contact Details"),r(),a(2,"p"),c(3," These are the details of the person responsible for the booking, and where your tickets will be sent. Please enter an email and telephone number that you will have access to during your trip. Fields marked with a * are compulsory. "),r())}function Qp(t,l){t&1&&u(0,"hr")}function Zp(t,l){t&1&&(a(0,"div",99)(1,"h4"),u(2,"fa-icon",101),c(3," Waitlist - Next Steps"),r(),a(4,"p",102),c(5," Please fill in your contact details above and click 'Submit Booking'. You will then be on our waitlist, and we will try to find space for you. We will endevour to get back to you within 48 hours. "),r()())}function Jp(t,l){t&1&&u(0,"hr")}function e0(t,l){t&1&&(a(0,"p"),c(1," These are the details of the person(s) travelling. All fields are mandatory, and must match the details shown in the traveller's passport / identification. "),r())}function t0(t,l){if(t&1){let e=x();a(0,"div",103)(1,"button",104),C("click",function(){_(e);let n=s(3);return g(n.travellersClosed=!n.travellersClosed)}),c(2),r()()}if(t&2){let e=s(3);o(),f("tooltip","We need traveller details before your departure on "+e.getEarliestDepartureDate()+". You can provide these after you have booked too."),o(),y(" ",e.travellersClosed?"Provide now":"I will provide traveller details after making my booking"," ")}}function i0(t,l){if(t&1&&(a(0,"div",97),u(1,"app-passenger-edit",105),r(),u(2,"hr")),t&2){let e=s(3);o(),f("itinerary",e.itinerary)("passengerList",e.passengerList)}}function n0(t,l){if(t&1&&(u(0,"hr"),a(1,"div",16)(2,"div",80)(3,"h2"),c(4,"Traveller Details"),r(),p(5,e0,2,0,"p"),r(),p(6,t0,3,2,"div",103),r(),u(7,"hr"),p(8,i0,3,2)),t&2){let e=s(2);o(5),m(e.travellersClosed?-1:5),o(),m(e.canSkipTravellers?6:-1),o(2),m(e.travellersClosed?-1:8)}}function o0(t,l){if(t&1){let e=x();a(0,"div",17)(1,"div",106)(2,"input",107),X("ngModelChange",function(n){_(e);let d=s(2);return z(d.acceptTermsAndConditions,n)||(d.acceptTermsAndConditions=n),g(n)}),r(),a(3,"label",108),c(4," \xA0 Please tick to acknowledge you agree to our "),a(5,"strong")(6,"a",109),C("click",function(){_(e);let n=s(2);return g(n.showTerms=!0)}),c(7,"Terms and Conditions"),r()()()()()}if(t&2){let e=s(2);q(!e.acceptTermsAndConditions&&e.attemptedToProceed?"alert alert-danger":""),o(2),G("ngModel",e.acceptTermsAndConditions)}}function r0(t,l){t&1&&(a(0,"div",17)(1,"p",110),c(2,"\xA0"),r(),a(3,"div",16)(4,"div",111),u(5,"fa-icon",101),r(),a(6,"div",25)(7,"h3"),c(8,"Please Note: Your Payment goes via Tripindigo.com"),r(),a(9,"h5"),c(10," When you click Pay N
1ow, you will be taken to our secure payment provider and make payment via our sister site Tripindigo.com. "),r(),a(11,"p"),c(12," Rest assured, we share the same excellent customer care team with direct contact to our airline partners to continue the excellent service you have come to expect from Safarisoko.com and all of our partners. "),r()(),a(13,"div",112),u(14,"img",113),r()()())}function a0(t,l){if(t&1){let e=x();a(0,"div")(1,"app-suggestions",96),C("modalOpen",function(n){_(e);let d=s();return g(d.showEverything=n)}),r(),u(2,"hr"),p(3,Kp,4,0),a(4,"div",97)(5,"app-customer-form",98),C("change",function(){_(e);let n=s();return g(n.setFirstPassengerLeadContact())}),r()(),p(6,Qp,1,0,"hr"),p(7,Zp,6,0,"div",99),p(8,Jp,1,0,"hr"),p(9,n0,9,3),p(10,o0,8,3,"div",100),p(11,r0,15,0,"div",17),r()}if(t&2){let e=s();o(),f("itinerary",e.itinerary),o(2),m(e.itinerary.agent?-1:3),o(2),f("customerForm",e.customerForm)("agent",e.itinerary.agent),o(),m(e.itinerary.dateWaitlisted?6:-1),o(),m(e.itinerary.dateWaitlisted?7:-1),o(),m(!e.showTravellers&&e.itinerary.supplier.settings.termsAndConditions?8:-1),o(),m(e.showTravellers?9:-1),o(),m(e.itinerary.supplier.settings.termsAndConditions?10:-1),o(),m(e.showTripindigoDpoMessage()?11:-1)}}function s0(t,l){if(t&1){let e=x();a(0,"div",114)(1,"app-package-price-breakdown-table",125),C("closeModal",function(){_(e);let n=s(2);return g(n.onToggleTable())}),r()()}if(t&2){let e=s(2);o(),f("itineraryId",e.itinerary.id)("currency",e.currency)}}function l0(t,l){if(t&1&&(a(0,"h6",77),c(1," PAY LATER : "),u(2,"br",130),c(3),F(4,"convertCurrency"),r()),t&2){s();let e=Et(1),i=s(2);o(3),y("",V(4,1,i.getOutstanding()-e,i.currency)," ")}}function c0(t,l){if(t&1){let e=x();a(0,"button",131),C("click",function(){_(e);let n=s(3);return g(n.onToggleTable())}),u(1,"fa-icon",132),r()}}function d0(t,l){if(t&1&&(a(0,"div",115),It(1),a(2,"div",126)(3,"h2",127)(4,"span",128),c(5,"PAY NOW : "),r(),c(6),F(7,"convertCurrency"),r(),p(8,l0,5,4,"h6",77),r(),p(9,c0,2,0,"button",129),r()),t&2){let e=s(2);o();let i=wt(e.getTotalPayNow());o(5),y(" ",V(7,4,i>0?i:0,e.currency)," "),o(2),m(e.getDepositPercentage()<100?8:-1),o(),m(e.isFITAdmin&&(!(e.itinerary==null||e.itinerary.package==null)&&e.itinerary.package.basePriceAutoGenerated)?9:-1)}}function p0(t,l){t&1&&(a(0,"span",117),c(1," WAITLISTED "),r())}function m0(t,l){if(t&1){let e=x();a(0,"button",133),C("click",function(){_(e);let n=s(2);return g(n.cancel())}),c(1,"Cancel"),r()}}function u0(t,l){if(t&1){let e=x();a(0,"button",134),C("click",function(){_(e);let n=s(2);return g(n.close())}),c(1,"Close"),r()}}function h0(t,l){if(t&1){let e=x();a(0,"button",135),C("click",function(){_(e);let n=s(2);return g(n.nextStep())}),c(1),r()}if(t&2){let e=s(2);q(e.nextStepLoading?"btn-primary-outline":"btn-primary"),f("disabled",e.nextStepLoading),o(),y(" ",e.getNextStepButtonText()," ")}}function _0(t,l){if(t&1){let e=x();a(0,"button",136),C("click",function(){_(e);let n=s(2);return g(n.onSave())}),c(1," Save "),r()}}function g0(t,l){if(t&1){let e=x();a(0,"button",137),C("click",function(){_(e);let n=s(2);return g(n.pay(!0))}),c(1),F(2,"convertCurrency"),r()}if(t&2){let e=s(2);o(),y(" Pay ",e.getDepositPercentage()<100?"Total - "+V(2,1,e.getOutstanding(),e.currency):"Now"," ")}}function C0(t,l){if(t&1){let e=x();a(0,"button",137),C("click",function(){_(e);let n=s(2);return g(n.pay(!1))}),c(1),F(2,"convertCurrency"),r()}if(t&2){let e=s(2);o(),y(" Pay Deposit - ",V(2,1,e.getTotalPayNow(),e.currency)," ")}}function f0(t,l){if(t&1){let e=x();a(0,"button",137),C("click",function(){_(e);let n=s(2);return g(n.bookNowPayLater())}),c(1,"Book Now Pay Later"),r()}}function x0(t,l){if(t&1){let e=x();u(0,"br"),a(1,"button",138),C("click",function(){_(e);let n=s(2);return g(n.onSaveProvisional())}),c(2),r()}if(t&2){let e=s(2);o(2),y(" ",e.itinerary.dateWaitlisted?"SUBMIT":"SAVE"," as Provisional ")}}function y0(t,l){if(t&1){let e=x();a(0,"button",138),C("click",function(){_(e);let n=s(2);return g(n.onConfirm())}),c(1),r()}if(t&2){let e=s(2);o(),y(" ",e.itinerary.dateWaitlisted?"SUBMIT":"CONFIRM"," BOOKING ")}}function S0(t,l){if(t&1){let e=x();a(0,"h6",124)(1,"label",139)(2,"input",140),X("ngModelChange",function(n){_(e);let d=s(2);return z(d.sendEmail,n)||(d.sendEmail=n),g(n)}),r(),c(3," Send Email To Customer "),r()()}if(t&2){let e=s(2);o(2),G("ngModel",e.sendEmail)}}function v0(t,l){if(t&1&&(a(0,"footer",13),p(1,s0,2,2,"div",114),a(2,"div",1)(3,"div",16),p(4,d0,10,7,"div",115),a(5,"div",116),p(6,p0,2,0,"span",117),p(7,m0,2,0,"button",118),p(8,u0,2,0,"button",119),p(9,h0,2,4,"button",120),p(10,_0,2,0,"button",121),p(11,g0,3,4,"button",122),p(12,C0,3,4,"button",122),p(13,f0,2,0,"button",122),p(14,x0,3,1),p(15,y0,2,1,"button",123),p(16,S0,4,1,"h6",124),r()()()()),t&2){let e=s();o(),m(e.showBreakdownTable?1:-1),o(3),m(e.showPricing()?4:-1),o(2),m(e.itinerary.dateWaitlisted?6:-1),o(),m(e.cancelVisible()?7:-1),o(),m(e.saveVisible()&&e.cancelVisible()?8:-1),o(),m(e.nextStepVisible()?9:-1),o(),m(e.saveVisible()?10:-1),o(),m(e.payVisible()&&e.showPricing()&&e.hasPaymentProvider()?11:-1),o(),m(e.payVisible()&&e.getDepositPercentage()<100&&e.showPricing()&&e.hasPaymentProvider()?12:-1),o(),m(e.bookNowPayLaterVisible()?13:-1),o(),m(e.provisionalVisible()?14:-1),o(),m(e.confirmVisible()?15:-1),o(),m(e.showSendEmailToCustomers()?16:-1)}}function T0(t,l){if(t&1){let e=x();a(0,"div",141)(1,"div",142)(2,"div",143)(3,"div",144)(4,"h5",145),c(5,"Edit Itinerary"),r(),a(6,"button",146),C("click",function(){_(e);let n=s();return g(n.reloadItinerary())}),c(7,"Cancel Changes"),r()(),a(8,"div",147)(9,"div",148)(10,"app-itinerary-items-edit",149),C("editExperience",function(n){_(e);let d=s();return g(d.reloadItinerary(n))}),r()()()()()()}if(t&2){let e=s();ie("show",e.editItinerary),o(10),f("isEditMode",!0)("itinerary",e.itinerary)}}function I0(t,l){if(t&1){let e=x();a(0,"div",141)(1,"div",142)(2,"div",143)(3,"div",147)(4,"app-extras",150),C("noThanksSelected",function(){_(e);let n=s();return g(n.closeExtras())}),r()()()()()}if(t&2){let e=s();ie("show",e.extraItineraryItem),o(4),f("itineraryItem",e.extraItineraryItem)("itinerary",e.itinerary)("showNoThanks",e.showExtraNoThanks)}}function w0(t,l){if(t&1){let e=x();a(0,"div",141)(1,"div",142)(2,"div",143)(3,"div",147)(4,"app-fees",150),C("noThanksSelected",function(){_(e);let n=s();return g(n.closeFees())}),r()()()()()}if(t&2){let e=s();ie("show",e.feeItineraryItem),o(4),f("itineraryItem",e.feeItineraryItem)("itinerary",e.itinerary)("showNoThanks",e.showFeeNoThanks)}}function E0(t,l){t&1&&u(0,"hr")}function b0(t,l){if(t&1&&(p(0,E0,1,0,"hr"),a(1,"div",16)(2,"div",154)(3,"h4"),c(4),r()(),a(5,"div",155)(6,"h5"),c(7),r()()(),a(8,"div",16)(9,"div",25),u(10,"p",156),r()()),t&2){let e=l.$implicit,i=l.$index,n=s(2);m(i>0?0:-1),o(4),pt("",e.supplier.name," - ",e.code," - ",e.percent,"% Off"),o(3),Q(" Valid: ",n.getDate(e.validFrom,"DD MMM YY")," to ",n.getDate(e.validTo,"DD MMM YY")," "),o(3),f("innerHtml",e.de
1scription,R)}}function k0(t,l){if(t&1){let e=x();a(0,"div",141)(1,"div",142)(2,"div",143)(3,"div",144)(4,"h5",145),c(5),r(),a(6,"button",151),C("click",function(){_(e);let n=s();return g(n.showAvailableDiscounts=!1)}),a(7,"span",152),c(8,"\xD7"),r()()(),a(9,"div",147)(10,"p"),c(11," Below are the offers available from us. Based on your selections, the most favourable discount(s) will automatically be applied to your itinerary. "),r(),a(12,"div",153),w(13,b0,11,7,null,null,k),r()()()()()}if(t&2){let e=s();ie("show",e.showAvailableDiscounts),o(5),y("",e.discounts.length," Available Offers"),o(8),E(e.discounts)}}function P0(t,l){if(t&1){let e=x();a(0,"div",141)(1,"div",142)(2,"div",143)(3,"div",144)(4,"h5",145),c(5),r(),a(6,"button",151),C("click",function(){_(e);let n=s();return g(n.showTerms=!1)}),a(7,"span",152),c(8,"\xD7"),r()()(),u(9,"div",157),r()()()}if(t&2){let e=s();ie("show",e.showTerms),o(5),y("",e.itinerary.supplier.name," Terms and Conditions"),o(4),f("innerHTML",e.itinerary.supplier.settings.termsAndConditions,R)}}function D0(t,l){t&1&&u(0,"app-spinner")}function F0(t,l){t&1&&u(0,"fa-icon",160)}function V0(t,l){t&1&&u(0,"app-spinner")}function L0(t,l){t&1&&u(0,"fa-icon",160)}function A0(t,l){t&1&&u(0,"app-spinner")}function M0(t,l){if(t&1&&(u(0,"hr"),a(1,"h3"),p(2,A0,1,0,"app-spinner"),c(3," Going to Payment "),r()),t&2){let e=s(2);o(2),m(e.goToPaymentLoading?2:-1)}}function H0(t,l){t&1&&u(0,"app-spinner")}function R0(t,l){if(t&1&&(u(0,"hr"),a(1,"h3"),p(2,H0,1,0,"app-spinner"),c(3," Redirecting "),r()),t&2){let e=s(2);o(2),m(e.redirectingLoading?2:-1)}}function O0(t,l){if(t&1&&(a(0,"div",141)(1,"div",158)(2,"div",143)(3,"div",159)(4,"h3"),p(5,D0,1,0,"app-spinner"),p(6,F0,1,0,"fa-icon",160),c(7," Saving your details "),r(),u(8,"hr"),a(9,"h3"),p(10,V0,1,0,"app-spinner"),p(11,L0,1,0,"fa-icon",160),c(12," Making Reservations "),r(),p(13,M0,4,1),p(14,R0,4,1),r()()()()),t&2){let e=s();ie("show",e.paymentLoading||e.redirectLoading),o(5),m(e.saveLoading?5:-1),o(),m(e.saveComplete?6:-1),o(4),m(e.reserveLoading?10:-1),o(),m(e.reserveComplete?11:-1),o(2),m(e.paymentLoading?13:-1),o(),m(e.redirectLoading?14:-1)}}var zt=(()=>{class t{constructor(){this.route=T(Vt),this.router=T(Ci),this.redirectService=T(nn),this.location=T(Pt),this.authService=T(vi),this.supplierService=T(A),this.itineraryService=T(M),this.itinerariesApi=T(Ve),this.emailService=T(Ki),this.alertify=T(Si),this.geoData=T(Mt),this.gtmService=T(Ti),this.el=T(yt),this.openIndex=-1,this.onOpenPage=!0,this.productOrHotelIdFromRouteParam="",this.itineraryItemIdFromRouteParam="",this.startExperiencesWithAllExperiences=!1,this.itineraryCollapsed=!1,this.showTerms=!1,this.showAvailableDiscounts=!1,this.showProductTypeIcons=!0,this.loading=!0,this.nextStepLoading=!1,this.paymentLoading=!1,this.saveLoading=!1,this.saveComplete=!1,this.reserveLoading=!1,this.reserveComplete=!1,this.goToPaymentLoading=!1,this.redirectLoading=!1,this.redirectingLoading=!1,this.checkedSuggestions=!1,this.showTravellers=!1,this.canSkipTravellers=!1,this.travellersClosed=!1,this.editItinerary=!1,this.showEverything=!0,this.acceptTermsAndConditions=!1,this.attemptedToProceed=!1,this.productAnnouncements=[],this.hotelAnnouncements=[],this.showExtraNoThanks=!1,this.showFeeNoThanks=!1,this.sendEmail=!0,this.productType=B,this.isInitLoading=!0,this.destroyRef=T(xt),this.showBreakdownTable=!1}ngOnInit(){this.route.data.subscribe(e=>{this.supplier=this.supplierService.currentSupplier,this.itinerary=this.itineraryService.setItinerary(e.itinerary),this.supplierService.setCurrencyById(e.itinerary.currencyPreference.id),this.getVisibleDiscounts(),this.loadItineraryAnnouncements(),this.productOrHotelIdFromRouteParam=this.route.snapshot.paramMap.get("productOrHotelId")||"",this.itineraryItemIdFromRouteParam=this.route.snapshot.paramMap.get("itineraryItemId")||"",this.openAccordionTabBasedOnUrl(),this.updateShowTravellers(),this.itineraryService.calculatePrices(this.itinerary,this.itinerary.items),this.loading=!1,this.nextStep(),this.getForms(),this.route.snapshot.queryParams.error&&this.isInitLoading&&ni([0]).pipe(oi(1e3),ut(this.destroyRef)).subscribe(()=>
1this.alertify.error(this.route.snapshot.queryParams.error)),this.isInitLoading=!1,this.getIVeryLiteSupplierReservationSystems()}),this.subscription=this.itineraryService.itineraryChanged.subscribe(e=>{this.itinerary=e,this.extraItineraryItem=this.itinerary.items.filter(i=>i.showExtras)[0],this.showExtraNoThanks=!1,this.feeItineraryItem=this.itinerary.items.filter(i=>i.showFees)[0],this.showFeeNoThanks=!1,this.showEverything=!0,this.updateShowTravellers(),this.getForms(),this.itinerary.currentItineraryItem&&this.items().some(i=>i.id===this.itinerary.currentItineraryItem.id)&&(this.openIndex=this.items().findIndex(i=>i.id===this.itinerary.currentItineraryItem.id),this.itinerary.currentItineraryItem.productType.id==B.Hotel&&(this.productOrHotelIdFromRouteParam=sessionStorage.getItem(this.itinerary.currentItineraryItem.id+"viewingHotelId")))}),this.itineraryService.productSelectionCompleted.pipe(ut(this.destroyRef)).subscribe(e=>{let i=e.productType?.id===B.Experience,n=this.items()[this.openIndex]?.id===e.id;i&&n&&!this.extraItineraryItem&&!this.feeItineraryItem&&this.nextStep()}),this.gtmService.addGtmToDom()}getIVeryLiteSupplierReservationSystems(){this.supplierService.getSupplierReservationSystems().pipe(te(1)).subscribe(e=>{e&&(this.iVeryLite=e.find(i=>i.reservationSystem?.id===xi.IVeriLite))})}get hasQuote(){return!!this.itinerary.supplierQuoteItineraries.at(0)}hasPaymentProvider(){return this.supplierService.hasPaymentProvider()}getMaxDiscount(){return Math.max(...this.discounts.map(e=>e.percent))}reloadItinerary(e=""){window.location.href=this.supplierService.getFullUrl("/search/"+this.itinerary.id+"/"+e)}updateShowTravellers(){this.showTravellers=this.supplier.settings.travellerDetailsRequired||this.items().some(e=>e.productType.id===B.Flight)||!this.itinerary.dateWaitlisted&&this.itinerary.items.filter(e=>e.selectedItems).some(e=>e.selectedItems.some(i=>i.supplierProductItemPrice.supplierProductItem.supplierProduct.requiresPassengers)),this.canSkipTravellers=!this.items().some(e=>e.productType.id===B.Flight),this.travellersClosed=this.canSkipTravellers}getForms(){this.itinerary=this.itineraryService.populateItineraryDates(this.itinerary),this.customerForm=this.itineraryService.createCustomerForm(this.itinerary,!0),this.itinerary.customer&&(this.customerForm.patchValue(this.itinerary.customer),this.customerForm.patchValue({telCode:this.geoData.getNameFromTelCodeList(this.itinerary.customer.telCode)})),this.customerForm.patchValue({notes:this.itinerary.notes}),this.showTravellers&&(this.passengerList=this.itineraryService.createPassengerFormArray(this.itinerary,!1),this.setFirstPassengerLeadContact())}setFirstPassengerLeadContact(){this.showTravellers&&(this.customerForm.controls.fname.value&&!this.passengerList.at(0).get("fname").value&&this.passengerList.at(0).get("fname").setValue(this.customerForm.controls.fname.value),this.customerForm.controls.sname.value&&!this.passengerList.at(0).get("sname").value&&this.passengerList.at(0).get("sname").setValue(this.customerForm.controls.sname.value))}showPricing(){return this.itineraryService.showPricing()}cancelVisible(){return this.authService.loggedIn()}allStepsCompleted(){return this.allItemsSelected()&&this.itinerary.showSuggestions&&!this.extraItineraryItem&&!this.feeItineraryItem}saveVisible(){return this.allStepsCompleted()&&!this.nextStepLoading&&this.openIndex===this.items().length}payVisible(){return this.saveVisible()&&this.getTotalPayNow()>0&&!this.itinerary.dateWaitlisted}isAgent(){return this.authService.isAgent()}isAdmin(){return this.authService.isAdmin()}isFITAdmin(){return this.authService.canAccessRole(yi.FIT)}provisionalVisible(){return this.saveVisible()&&(this.isAgent()||this.isAdmin())}confirmVisible(){return this.saveVisible()&&(this.getTotalPayNow()<=0||this.itinerary.dateWaitlisted||this.isAdmin())}bookNowPayLaterVisible(){return this.saveVisible()&&this.getTotalPayNow()>0&&!this.itinerary.dateWaitlisted&&this.isBookNowPayLater()}isBookNowPayLater(){return this.supplierService.currentSupplier.settings.flightResidentBookNowPayLater&&(0,dt.default)().isBefore((0,dt.default)(this.itinerary.items.filter(e=>!e.suggestion)[0].fromDate).subtract(48,"hours"))}acceptedTermsAndConditions(){return!this.itinerary.supplier.settings.termsAndConditions||this.acceptTermsAndConditions}enforceNotesFilled(){return!this.itinerary.supplier.settings.enforceNotes||this.customerForm.controls.notes.value}noMoreDetailsRequired(){if(this.itinerary.agent){this.customerForm.controls.telCode.patchValue(this.geoData.getNameFromTelCodeList(this.itinerary.agent.telCode)),this.customerForm.controls.tel.patchValue(this.itinerary.agent.tel),this.customerForm.controls.email.patchValue(this.itinerary.agent.email);var e="";this.customerForm.controls.telCode.valid||(e+="Tel Code: "+this.customerForm.controls.telCode.value+" "+this.customerForm.controls.telCode.errors),this.customerForm.controls.tel.valid||(e!=""&&(e+=", "),e+="Telephone number: "+this.customerForm.controls.tel.value+" "+this.customerForm.controls.tel.errors),(this.customerForm.controls.email.hasError("required")||this.customerForm.controls.email.hasError("email"))&&(e!=""&&(e+=", "),e+="Email: "+this.customerForm.controls.email.value+" "+this.customerForm.controls.email.errors),e!=""&&alert("Please set your "+e+" in My Details in order to continue with this booking")}return this.saveVisible()&&this.customerForm.valid&&this.validateCustomerDialCode()&&(!this.showTravellers||this.travellersClosed||this.passengerList.valid&&this.validatePassengerNationalities())}
1onSave(e=!1){if(!this.validateForms()){this.focusOnInvalidAndScrollIntoView();return}this.saveData(),this.itineraryService.saveItinerary(Me(Ae({},this.itinerary),{providePassengerDetailLater:this.travellersClosed})).pipe(te(1)).subscribe(i=>{this.itineraryService.saveAndRepopulateItinerary(i,""),this.alertify.success("Itinerary Saved Successfully"),this.saveLoading=!1,this.saveComplete=!0,this.reserveLoading=e,e||this.nextStep()})}saveData(){if(this.itinerary=this.itineraryService.saveCustomerForm(this.itinerary,this.customerForm),this.itinerary.currencyPreference=this.supplierService.getSelectedCurrency(),this.showTravellers){let i=[];for(let n=0;n<this.passengerList.length;n++)i.push(this.passengerList.at(n).value);this.itinerary.passengers=[...i];var e=0;this.itinerary.passengers.forEach(n=>{this.geoData.countryList.some(d=>d.name===this.passengerList.controls[e].get("nationality").value)&&(n.nationality=this.geoData.countryList.filter(d=>d.name===this.passengerList.controls[e].get("nationality").value)[0].id),e++})}}validateForms(){return this.customerForm.markAllAsTouched(),this.passengerList?.markAllAsTouched(),this.noMoreDetailsRequired()&&!this.acceptedTermsAndConditions()&&(this.attemptedToProceed=!0,alert("Please accept our terms and conditions at the bottom of this page to continue")),this.noMoreDetailsRequired()&&this.acceptedTermsAndConditions()&&!this.enforceNotesFilled()&&alert("The Notes Field is Mandatory. "+this.supplierService.currentSupplier.settings.bookPageCustomNotesText),this.noMoreDetailsRequired()&&this.acceptedTermsAndConditions()&&this.enforceNotesFilled()}validateCustomerDialCode(){return this.geoData.getIdFromTelCodeList(this.customerForm.value.telCode)!=""}validatePassengerNationalities(){var e=!0,i=0;return this.itinerary.passengers.forEach(n=>{this.passengerList.controls[i].get("nationality").value&&!this.geoData.countryList.some(d=>d.name===this.passengerList.controls[i].get("nationality").value)&&(e=!1),i++}),e}onSaveProvisional(){if(!this.validateForms()){this.focusOnInvalidAndScrollIntoView();return}this.saveProvisional()}showSendEmailToCustomers(){return this.provisionalVisible()&&this.isAdmin()&&this.supplierService.currentSupplier.settings.adminSendCustomerEmails}saveProvisional(){this.validateForms()?(this.saveLoading=this.reserveLoading=this.redirectLoading=!0,this.saveData(),this.itinerariesApi.confirmAsProvisional(this.itineraryService.itineraryToUpdateItinerary(this.itinerary)).pipe(te(1)).subscribe(e=>{this.reserveLoading=!1,this.reserveComplete=!0,this.redirectingLoading=!0,!this.isAdmin()||this.sendEmail?this.emailService.sendEmailItinerary({emailTypeId:Lt.MakeProvisional,itineraryId:e.id}).subscribe(()=>{this.router.navigateByUrl("confirmation/"+this.itinerary.id)}):this.router.navigateByUrl("confirmation/"+this.itinerary.id)})):this.focusOnInvalidAndScrollIntoView()}bookNowPayLater(){this.validateForms()?confirm("You must come to our offices within 48 hours to make payment for your flight. Otherwise it will automatically be cancelled. Are you sure you want to Book Now and Pay Later?")&&this.onConfirm():this.focusOnInvalidAndScrollIntoView()}focusOnInvalidAndScrollIntoView(){for(let e of Object.keys(this.customerForm.controls))if(this.customerForm.controls[e].invalid){let n=this.el.nativeElement.querySelector('[formcontrolname="'+e+'"]');if(!n)continue;n.focus(),n.scrollIntoView({behavior:"smooth",block:"center"});return}if(this.passengerList&&this.showTravellers){let e=this.el.nativeElement.querySelector("app-passenger-edit");for(let i=0;i<this.passengerList.controls.length;i++){let n=this.passengerList.controls[i];if(n.invalid){this.passengerEditComponent?.onOpenPassengersTab(),setTimeout(()=>{for(let d of Object.keys(n.controls))if(n.controls[d].invalid){let I=(e??this.el.nativeElement).querySelectorAll('[formcontrolname="'+d+'"]'),D=I[i]??I[0];D&&(D.focus(),D.scrollIntoView({behavior:"smooth",block:"center"}));break}},0);break}}}}onConfirm(){if(!this.validateForms()){this.focusOnInvalidAndScrollIntoView();return}this.confirm()}confirm(){this.validateForms()?(this.saveLoading=this.redirectLoading=!0,this.saveData(),this.itineraryService.reserve(this.itinerary).subscribe(e=>{e.length>0?(this.alertify.error("Reservations FAILED..."),e.forEach(i=>
1{this.alertify.error(i)}),this.goToPaymentLoading=this.reserveLoading=this.saveLoading=this.paymentLoading=!1):(this.saveLoading=!1,this.saveComplete=!0,this.reserveLoading=!0,this.itinerariesApi.confirm(this.itineraryService.itineraryToUpdateItinerary(this.itinerary)).pipe(te(1)).subscribe(i=>{this.reserveLoading=!1,this.reserveComplete=!0,this.redirectingLoading=!0,!this.isAdmin()||this.sendEmail?this.emailService.sendEmailItinerary({emailTypeId:this.itinerary.dateWaitlisted?Lt.MakeWaitlist:Lt.MakeConfirmed,itineraryId:i.id}).subscribe(()=>{this.router.navigateByUrl("confirmation/"+this.itinerary.id)}):this.router.navigateByUrl("confirmation/"+this.itinerary.id)}))})):this.focusOnInvalidAndScrollIntoView()}cancel(){confirm("Are you sure you want to delete this Itinerary?")&&this.itineraryService.deleteItinerary(this.itinerary.id).subscribe(()=>{this.itineraryService.clearItinerary(),this.router.navigateByUrl("account")})}close(){let e=this.authService.loggedIn()?this.authService.isAdmin()?"supplier/bookings":"account":"";this.router.navigateByUrl(e)}pay(e){this.validateForms()?(this.saveLoading=this.paymentLoading=!0,this.saveData(),this.itineraryService.reserve(this.itinerary).subscribe(i=>{if(this.reserveLoading=!1,this.goToPaymentLoading=!0,this.saveLoading=!1,this.saveComplete=!0,i.length>0)this.alertify.error("Reservations FAILED..."),i.forEach(d=>{this.alertify.error(d)}),this.goToPaymentLoading=this.reserveLoading=this.saveLoading=this.paymentLoading=!1;else{this.alertify.success("Reservations Successful..."),this.reserveComplete=!0;var n="";let d="";this.itineraryService.pay(this.itinerary.id,e).subscribe(h=>{n=h.transactionId,d=h.iVeryRequest},h=>{this.alertify.error(h.error),this.saveLoading=this.paymentLoading=!1},()=>{if(this.alertify.success("Redirecting to Payment..."),this.saveLoading=this.paymentLoading=!1,d){let h=this.iVeryLite?.externalId2;if(!h)return;let I=h.slice(-1)==="/"?`${h}Lite/Authorise.aspx`:`${h}/Lite/Authorise.aspx`,D=JSON.parse(d);this.redirectService.postRedirect(I,D)}else window.location.href="https://secure.3gdirectpay.com/pay.asp?ID="+n})}})):this.focusOnInvalidAndScrollIntoView()}clickAccordion(e){this.itinerary.package||(this.openIndex=e,this.setCurrentItineraryItem()),!this.saveVisible()&&this.router.url.includes("checkout")&&this.location.replaceState(this.router.url.replace("checkout","search"))}itineraryCollapses(){this.showProductTypeIcons=!1}itineraryExpanded(){this.showProductTypeIcons=!0}items(){return this.itinerary.package?this.itinerary.items.filter(e=>!this.isItemSuggestional(e,this.itinerary.package)&&(e.productType?.id!==B.Extra||this.isZeroDayExtra(e))&&(this.itinerary.packageShowParkFeesBreakdown||e.productType?.id!==B.Fee)&&(this.itinerary.packageShowTransportationBreakdown||e.productType?.id!==B.CarHire)&&(!this.isItineraryItemZeroDaysItem(e,this.itinerary.package)||this.isDayRoom(e)||this.isZeroDayExtra(e)||this.isFlight(e))):this.itinerary.items.filter(e=>!e.suggestion&&e.productType?.id!==B.Extra&&e.productType?.id!==B.Fee)}isDayRoom(e){return e.productType?.id===B.Hotel&&!!e.linkedItineraryItem}isZeroDayExtra(e){return e.productType?.id===B.Extra&&!!this.itinerary.package&&this.isItineraryItemZeroDaysItem(e,this.itinerary.package)}isFlight(e){return e.productType?.id===B.Flight&&!!this.itinerary.package}isItineraryItemZeroDaysItem(e,i){if(!e.packageItemId)return!1;let n=i.items.find(d=>d.id===e.packageItemId);return n?n.noDays===0:!1}allItemsSelected(){return!this.itinerary.items.filter(e=>e.id&&!this.isItemSuggestional(e,this.itinerary.package)&&e.productType?.id!==B.Fee&&!this.isItineraryItemZeroDaysItem(e,this.itinerary.package)).some(e=>!e.allSelected)}isItemSuggestional(e,i){return i&&this.isPackageItemOptional(e,i)?!e.selectedItems?.length:e.suggestion}isPackageItemOptional(e,i){return!!i.items.find(n=>n.id===e.packageItemId)?.optional}getSubTotal(){return this.supplierService.round(this.itineraryService.getNet(this.itinerary)+this.itineraryService.getAdditionsTotal(this.itinerary))}getAdditionsTotal(){return this.supplierService.round(this.itineraryService.getAdditionsTotal(this.itinerary))}getDiscountsTotal(){return this.supplierService.round(this.itineraryService.getDiscountsTotal(this.itinerary))}getPaid(){return this.supplierService.round(this.itineraryService.getPaymentsTotal(this.itinerary))}getOutstanding(){return this.supplierService.round(this.itineraryService.getOutstanding(this.itinerary))}getTotalPayNow(){return this.itinerary.payNow-this.getPaid()}getNextStepButtonText(){return this.nextStepLoading?"Please Wait...":"Next Step"}nextStepVisible(){let e=this.items()[this.openIndex],i=this.openIndex<this.items().length?e?.allSelected:!1;if(e&&e.productType&&e.productType.id===B.Hotel&&e.products){let d=e.products.map(h=>this.itineraryService.isAllTravellersInTheRoom(h)).some(Boolean);i=this.openIndex<this.items().length?d:!1}return i&&!this.payVisible()&&!this.saveVisible()}getCurrentHotelBaseOnUrl(e){return e.products&&e.products.find(n=>n.id===this.productOrHotelIdFromRouteParam)||null}nextStep(){this.nextStepLoading=!0;let e=this.itinerary.showSuggestions,i=0,n=!1;for(;i<this.items().length&&!n;)!this.items()[i].allSelected&&!this.items()[i].suggestionDismissed?n=!0:!e&&i+1>=this.items().length?e=!0:i+=1;e!==this.itinerary.showSuggestions?this.checkedSuggestions||(this.checkedSuggestions=!0,this.itineraryService.getSuggestions().subscribe(d=>{this.itineraryService.saveAndRepopulateItinerary(d,""),this.nextStep()})):(this.onOpenPage?(this.updateDataFromUrl(i),this.onOpenPage=!1):this.openIndex=i,this.setCurrentItineraryItem(),this.nextStepLoading=!1),this.updateUrlAccordingToStep()}updateUrlAccordingToStep(){this.saveVisible()?this.router.navigate(["checkout",...this.getRouteParam
1sArray()],{queryParamsHandling:"preserve"}):this.router.url.includes("checkout")&&this.router.navigate(["search",...this.getRouteParamsArray()],{queryParamsHandling:"preserve"})}getRouteParamsArray(){return[this.route.snapshot.paramMap.get("id"),this.route.snapshot.paramMap.get("itineraryItemId"),this.route.snapshot.paramMap.get("productOrHotelId")].filter(Boolean)}setCurrentItineraryItem(){this.openIndex>=0&&this.openIndex<this.items().length?this.itinerary.currentItineraryItem=this.items()[this.openIndex]:this.itinerary.currentItineraryItem=null}getDate(e,i){return(0,dt.default)(e).format(i)}getDates(e,i,n,d=!0){let h=this.getDate(e,n),I=i?this.getDate(i,n):"";return h===I||!I||I.length<1?h:h+" -"+(d?"<BR>":" ")+I}getEarliestDepartureDate(){return(0,dt.default)(this.itinerary.items.filter(e=>e.fromDate)[0].fromDate).format("DD MMM YYYY")}getSelectedText(e){return e.selectedText?e.selectedText:(e.suggestion?"There "+(e.products&&e.products.length===1?"is":"are"):"Please Choose")+(e.products&&e.products.length>0?" - "+e.products.length+" "+e.productType.productName+(e.products.length===1?"":"s")+" Available":(e.needMoreInfo?" ":" - Loading ")+e.productType.productName+"s")}get currency(){return this.supplierService.getSelectedCurrency()}closeExtras(){this.itinerary.items.forEach(e=>{e.showExtras=!1}),this.extraItineraryItem=null,this.showExtraNoThanks=!1,this.nextStep()}closeFees(){this.itinerary.items.forEach(e=>{e.showFees=!1}),this.feeItineraryItem=null,this.showFeeNoThanks=!1}getConnectedProductTypes(e,i){if(e.selectedItems){let n=e.selectedItems[0];if(n){let d=n.supplierProductItemPrice.supplierProductItem.supplierProduct.id;return this.itinerary.items.filter(h=>h.productType.id===i&&h.linkedProduct?.id===d&&h.linkedItineraryItem?.id===e.id&&!this.isZeroDayExtra(h)&&(i==B.Fee?h.selectedItems&&h.selectedItems.length&&h.selectedText:!0))}}}getConnectedProductTypesTotal(e,i){let n=0;if(e.selectedItems){let d=e.selectedItems[0];if(d){let h=d.supplierProductItemPrice.supplierProductItem.supplierProduct.id,I=this.itinerary.items.filter(D=>(D.productType.id===B.Extra||D.productType.id===B.Fee)&&D.linkedProduct?.id===h&&D.linkedItineraryItem?.id===e.id&&!this.isZeroDayExtra(D));I&&I.length>0&&(n=I.map(D=>i?D.payNow:D.price).reduce(function(D,U){return D+U}))}}return n}getPrice(e){return e.price+this.getConnectedProductTypesTotal(e,!1)}getPayNow(e){return e.payNow+this.getConnectedProductTypesTotal(e,!0)}getPercentage(e,i){return!e||e<=i?100:Number(this.supplierService.round(i/e*100))}getDepositPercentage(){return this.getOutstanding()>0?this.supplierService.round(this.getTotalPayNow()/this.getOutstanding()*100):100}updateDataFromUrl(e=0){let i=this.route.snapshot.paramMap.get("itineraryItemId");if(i!==null&&!isNaN(+i)){this.openIndex=+i<this.items().length?+i:e;return}this.openIndex=i==="checkout"&&this.allStepsCompleted()?this.items().length:e}showTripindigoDpoMessage(){return!1}hasVisibleDiscounts(){return this.discounts&&this.discounts.length}getVisibleDiscounts(){this.supplierService.getSupplierDiscountCodesBySupplier(this.itinerary.supplier.id).subscribe(e=>{this.discounts=e})}loadItineraryAnnouncements(){this.itinerariesApi.getItineraryAnnouncements(this.itinerary.id).pipe(te(1)).subscribe(e=>{this.productAnnouncements=e.productAnnouncements,this.hotelAnnouncements=e.hotelAnnouncements})}editPackage(){this.router.navigateByUrl(`search/packages/${this.itinerary.id}`)}get lastToDate(){return(0,dt.default)(this.itinerary.items[this.itinerary.items.length-1].toDate).toDate()}openAccordionTabBasedOnUrl(){this.itineraryItemIdFromRouteParam&&setTimeout(()=>{let e=this.items().findIndex(i=>i.id===this.itineraryItemIdFromRouteParam);this.startExperiencesWithAllExperiences=!0,this.clickAccordion(e)},0)}onViewAllExperiences(e,i){e.preventDefault(),e.stopPropagation(),this.viewAllExperiences(i)}viewAllExperiences(e){let i=this.accordionPanelComponent.toArray()[e];i.isOpen||(i.toggleOpen(),this.clickAccordion(e),this.startExperiencesWithAllExperiences=!0),this.experiencesComponent&&(this.experiencesComponent.viewExperience=null)}onToggleTable(){this.showBreakdownTable=!this.showBreakdownTable}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-search"]],viewQuery:function(i,n){if(i&1&&mi(ht,5)(Xt,5)(gt,5),i&2){let d;St(d=vt())&&(n.experiencesComponent=d.first),St(d=vt())&&(n.passengerEditComponent=d.first),St(d=vt())&&(n.accordionPanelComponent=d)}},decls:37,vars:19,consts:[[1,"breadcrumbs"],[1,"container"],[1,"row","mx-auto"],[1,"col","my-auto","d-none","d-md-block"],["src","../../../assets/icons/r-arrow.png","alt","right arrow"],[1,"col","my-auto","d-none","d-md-block","o-3"],[1,"col","my-auto","nowrap"],["icon","edit","tooltip","Edit This Itinerary",1,"h6"],[1,"container","mb-10"],[1,"text-center","mb-5","mt-5","h2"],[1,"everything","pt-4"],[3,"initialFromDate"],[1,"mb-5","mt-5"],[1,"sticky-bottom"],[1,"modal","fade","d-block",3,"show"],["icon","edit","tooltip","Edit This Itinerary",1,"h6",3,"click"],[1,"row"],[1,"mb-5"],[1,"itinerary",3,"collapses","expanded","collapse","isAnimated"],[1,"itineraryAccordion","mb-2",3,"isAnimated","closeOthers"],[1,"col-md","my-auto"],[1,"fw-600"],[1,"col-md","text-center"],[1,"btn","btn-sm","btn-primary"],[1,"col-md","mt-md-0","mt-3","my-auto"],[1,"col"],["icon","edit",3,"click","tooltip"],["target","_blank","rel","noopener noreferrer",1,"package-button-reset-style",3,"routerLink"],["icon","link","tooltip","View Online Brochure"],["tooltip","Back To Quote",1,"package-button-reset-style",3,"routerLink"],[1,"col","text-right"],["icon","list-check"],[1,"row","text-right"],[1,"col-1","text-left"],[1,"mb-0"],[3,"isOpen","panelClass"],[3,"click","isOpen","panelClass"],["accordion-heading",""],[3,"style"],[1,"col-9","col-lg-10"],[1,"col-3","col-lg-2","text-right"],["type","button",1,"btn","btn-icon","btn-sm",2,"z-index","1000"],[1,"suggestionIcon","my-auto"],[1,"editIcons","my-auto","d-none","d-lg-block"],["icon","edit",3,"tooltip"],[1,"title"],[1,"productTypeIcon"],[1,"row","itineraryItems"],[1,"title","nowrap"],[1,"fw-600",3,"innerHTML"],[1,"col","col-lg-2"],[3,"class"],[1,"col-3","my-auto-lg","text-right"],["icon","plane"],["icon","shuttle-van"],["
1icon","plus-circle"],["icon","clipboard-check"],["icon","bed"],["icon","car"],["icon","ticket-alt"],[1,"col","col-lg-2","nowrap"],[1,"d-lg-none","d-inline-block"],[1,"d-none","d-lg-block"],[1,"fw-600","d-lg-none","d-block"],[1,"col-lg-1","d-none","d-lg-block"],[1,"col-lg-2","nowrap","d-none","d-lg-block"],[3,"innerHTML"],[1,"col-lg-1","text-center","d-none","d-lg-block"],[1,"row","mt-2","mt-md-0"],[1,"title","d-none","d-lg-block"],[1,"d-flex","justify-content-start"],["icon","bars","tooltip","Back to the Other Experiences",1,"pt-0"],["icon","bars","tooltip","Back to the Other Experiences",1,"pt-0",3,"click"],[1,"fw-600","color-red"],[1,"fw-600","m-0","mr-1","nowrap"],[1,"fw-200","mt-1"],[1,"fw-600","m-0","mr-1"],[1,"fw-600","mt-2"],[1,"fw-600","mt-1"],[1,"sm"],[1,"col-lg"],[1,"title",3,"innerHTML"],[1,"col-lg-2","text-right"],["type","button",1,"btn","btn-icon","btn-sm",2,"z-index","1000",3,"click"],["icon","question"],[3,"itineraryItem","productAnnouncements"],[3,"itineraryItem","itinerary","productAnnouncements"],[3,"itineraryItem","viewHotel","hotelAnnouncements"],[3,"itineraryItem","itinerary","startWithAllExperiences","productAnnouncements"],[1,"itineraryItemMessage"],[1,"btn","btn-sm","btn-primary",3,"click"],[1,"fw-600","text-right","total","mr-4"],[1,"brand-announcement",3,"ngStyle","innerHtml"],[1,"row","discount-announcement"],[1,"col-3","text-right"],[1,"btn","btn-primary",3,"click"],[3,"modalOpen","itinerary"],[1,"widget","search","no-icons"],[3,"change","customerForm","agent"],[1,"alert","alert-warning","mt-3"],[1,"mb-5",3,"class"],["
1icon","info-circle"],[2,"margin-left","40px"],[1,"col-lg-3","text-right","my-auto"],[1,"btn","btn-icon",3,"click","tooltip"],[3,"itinerary","passengerList"],[1,"form-check","text-center"],["type","checkbox",1,"form-check-input","big-checkbox",3,"ngModelChange","ngModel"],["for","flexCheckDefault",1,"form-check-label","h6"],[1,"pointer",3,"click"],[1,"mt-5"],[1,"col-1","h2"],[1,"col-sm-3"],["src","https://res.cloudinary.com/dbujizbmp/image/upload/c_scale,w_300/c_scale,w_300/v1690617565/rhe1s5zddgbwkcxbr84n.png",1,"w-100","p-3",2,"background-color","rgb(19,23,65)"],[1,"p-3"],[1,"col-3","col-lg-4","my-auto","d-flex","align-items-center"],[1,"col","text-center","text-lg-right","my-auto"],["tooltip","Some of your selected items are awaiting confirmation",1,"alert","alert-warning","text-center","m-2"],["type","button",1,"btn","btn-danger","mr-2"],["type","button",1,"btn","btn-icon","mr-2"],["type","button",1,"btn","mr-2",3,"class","disabled"],["type","button","tooltip","Save your Contact Information. Tip: Simply copy the link of this page to come back to it later or send to someone else.",1,"btn","btn-icon","mr-2"],["type","button",1,"btn","btn-primary","mr-2"],["type","button",1,"btn","btn-primary","mr-2","mt-2","mb-2"],[1,"form-check","mr-2","mt-1"],[1,"w-100","mb-3",3,"closeModal","itineraryId","currency"],[1,"d-flex","flex-column"],[1,"fw-600","nowrap","mb-0"],[1,"d-none","d-lg-inline-block"],["type","button",1,"btn-circle","ml-2"],[1,"d-md-none"],["type","button",1,"btn-circle","ml-2",3,"click"],["icon","dollar-sign"],["type","button",1,"btn","btn-danger","mr-2",3,"click"],["type","button",1,"btn","btn-icon","mr-2",3,"click"],["type","button",1,"btn","mr-2",3,"click","disabled"],["type","button","tooltip","Save your Contact Information. Tip: Simply copy the link of this page to come back to it later or send to someone else.",1,"btn","btn-icon","mr-2",3,"click"],["type","button",1,"btn","btn-primary","mr-2",3,"click"],["type","button",1,"btn","btn-primary","mr-2","mt-2","mb-2",3,"click"],["for","send-email-to-customer"],["id","send-email-to-customer","type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],[1,"modal","fade","d-block"],["role","document",1,"modal-dialog","modal
1-xl","scrollable"],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button",1,"btn","btn-icon","btn-sm",3,"click"],[1,"modal-body","scrollable"],[1,"widget","w-100"],[3,"editExperience","isEditMode","itinerary"],[3,"noThanksSelected","itineraryItem","itinerary","showNoThanks"],["type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"discount-announcement"],[1,"col-md"],[1,"col-md-3","text-right"],[3,"innerHtml"],[1,"modal-body","scrollable",3,"innerHTML"],["role","document",1,"modal-dialog","modal-dialog-centered"],[1,"modal-body"],["icon","check"]],template:function(i,n){i&1&&(u(0,"app-nav"),a(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3),c(5,"Select"),r(),a(6,"div",3),u(7,"img",4),r(),a(8,"div",3),c(9,"Details"),r(),a(10,"div",3),u(11,"img",4),r(),a(12,"div",5),c(13,"Payment"),r(),a(14,"div",5),c(15,"|"),r(),a(16,"div",6),c(17),p(18,Vd,1,0,"fa-icon",7),r()()()(),a(19,"div",8),p(20,Ld,2,0,"div",9),p(21,zp,12,9,"div",10),p(22,qp,3,4,"div",1),p(23,Gp,11,2,"div"),p(24,Xp,1,1,"app-add-another-package-widget",11),p(25,a0,12,10,"div"),r(),a(26,"p",12),c(27,"\xA0"),r(),a(28,"p",12),c(29,"\xA0"),r(),p(30,v0,17,13,"footer",13),p(31,T0,11,4,"div",14),p(32,I0,5,5,"div",14),p(33,w0,5,5,"div",14),p(34,k0,15,3,"div",14),p(35,P0,10,4,"div",14),p(36,O0,15,8,"div",14)),i&2&&(o(4),ie("o-3",n.allItemsSelected()),o(4),ie("o-3",!n.allItemsSelected()),o(9),y(" ",n.itinerary.travellers," "),o(),m(n.itinerary.package?-1:18),o(2),m(n.showEverything?-1:20),o(),m(n.showEverything&&!n.extraItineraryItem&&!n.feeItineraryItem?21:-1),o(),m(n.isBookNowPayLater()&&!n.loading&&!n.extraItineraryItem&&!n.feeItineraryItem&&!n.editItinerary&&!n.showTerms&&!n.showAvailableDiscounts?22:-1),o(),m((n.hasVisibleDiscounts()&&!n.loading&&!n.extraItineraryItem&&!n.feeItineraryItem&&!n.editItinerary&&!n.showTerms&&n.showAvailableDiscounts,-1)),o(),m((n.itinerary.package,-1)),o(),m(n.saveVisible()?25:-1),o(5),m(!n.loading&&!n.extraItineraryItem&&!n.feeItineraryItem&&!n.editItinerary&&!n.showTerms&&!n.showAvailableDiscounts&&n.showEverything?30:-1),o(),m(n.editItinerary?31:-1),o(),m(n.extraItineraryItem?32:-1),o(),m(n.feeItineraryItem?33:-1),o(),m(n.showAvailableDiscounts?34:-1),o(),m(n.showTerms?35:-1),o(),m(n.paymentLoading||n.redirectLoading?36:-1))},dependencies:[Dt,fi,ue,Ne,me,fe,Ht,Bn,ei,gt,Te,ct,lt,Ot,Ue,Rt,j,Ji,N,Bt,tn,Xt,en,fn,Ut,un,gn,On,ht,$t,Hn,bn,an,Z,Wt],encapsulation:2})}}return t})();var Ff=[{path:"packages",providers:[rn,on],loadChildren:()=>import("./chunk-SSOALXZ7.js").then(t=>t.routes)},{path:":id",resolve:{itinerary:Oi},children:[{path:":itineraryItemId/:productOrHotelId",component:zt},{path:":itineraryItemId",component:zt},{path:"",component:zt}]}];export{Ff as routes};
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.