PageSourceSearch

https://static-js.treatme.co.nz/en-AU/3028.407c7a9d76ecb566.js

js treatme.co.nz collected 2026-10-04 20:26:42 UTC 25,261 bytes, 2 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"production-4623957"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(null!=r)for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:luxgroup-customer-portal":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d810663f-91d3-45d6-9076-1b9b39d11347",e._sentryDebugIdIdentifier="sentry-dbid-d810663f-91d3-45d6-9076-1b9b39d11347")}catch(e){}}();"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3028],{769696(e,t,r){var n=r(45667),a=r(193033),i=r(750142),s=r(970293);r.d(t,{},{A:function({canActivate:e,isFreshInsuranceDecision:t=!1}){let r=(0,i.GV)(s.cv);return(0,a.A)(n.Oe.croInsurancePriceIncreaseV2,{canActivate:e&&(t||!r)})}})},386834(e,t,r){r(218111),r(981148),r(720116);var n=r(296540),a=r(842930);function i(e,t,r){return(0,n.useMemo)(()=>{if(t&&e&&r){let n=t.purchasableExperienceOptions?Object.values(t.purchasableExperienceOptions):[],i=t.optionalExperienceBookingDaysBeforeDeparture??60,s=(0,a.ez)(new Date(e.tour.startDate)).days>=i,o=n.length>0,u=n.every(e=>(e.dayNumbers||[]).every(t=>!!r.optionalExperiences?.find(r=>r.dayNumber===t&&r.id===e.fkExperienceId)));return o&&s&&!u}return!1},[e,t,r])}r.d(t,{A:()=>i})},61741(e,t,r){var n=r(474848),a=r(843702),i=r(724633),s=r(665673),o=r(992670);r.d(t,{},{A:function({remainingTime:e}){let{hours:t,minutes:r}=e,u=(0,s.A)(),d=t>0?u.formatMessage({id:"TLlD5MTPJYKm24WEsdIS",defaultMessage:"{count, plural, one {# hour} other {# hours}}",description:"Pluralized hours for remaining time to add cancellation protection"},{count:t}):u.formatMessage({id:"2O3bpk_Y79up61BlW7a6",defaultMessage:"{count, plural, one {# minute} other {# minutes}}",description:"Pluralized minutes for remaining time to add cancellation protection"},{count:r}),l=u.formatMessage(o.A.cancellationProtection),c=u.formatMessage({id:"bXr_qNeVe2qRhVw9jXjQ",defaultMessage:"You have {remainingTime} to add cancellation protection. After that, it’s no longer available—this limit is set by our partner, XCover.",description:"Body text explaining the time remaining to add cancellation protection"},{remainingTime:d});return(0,n.jsx)(a.A,{title:l,children:(0,n.jsx)(i.A,{variant:"medium",children:c})})}})},423983(e,t,r){var n=r(206830),a=r(99028),i=r(750142),s=r(296540);let o={offerSummary:void 0,error:void 0,fetching:!1};r.d(t,{},{A:function(e,t=!0){let r=(0,i.jL)(),u=(0,s.useMemo)(()=>(0,a.am)(e),[e]),d=(0,i.GV)(e=>e.carHire.cheapestOfferLists[u])??o;return(0,s.useEffect)(()=>{let{pickUpDate:a,dropOffDate:i,dropOffTime:s,pickUpTime:o,pickUpLocationId:u}=e;t&&o&&s&&i&&a&&o&&u&&r((0,n.OE)(e))},[r,e,u,t]),d}})},315734(e,t,r){var n=r(216486),a=r(350262);r.d(t,{},{A:function(e){let{latLong:t,place:r,categoryIds:i,placeLevels:s,isMapUrl:o}=e,[u,d]=(0,n.wb)(t?.latitude,t?.longitude,s),l={destinationId:r?.id??u?.id,destinationName:r?.name??u?.name,categories:i},c=(0,a.OA)(l);return o?[`/search/experiences/map?${c}`,d]:[`/search/experiences?${c}`,d]}})},643564(e,t,r){r(218111),r(161701);var n=r(602870),a=r(750142),i=r(302885),s=r(620921),o=r(296540);r.d(t,{},{A:function(e,t={}){let r=(0,a.jL)(),u=(0,s.Hw)(e,t),d=(0,a.GV)(e=>e.insurance.productLists[u]),l=(0,a.GV)(e=>e.insurance.products),c=(0,a.GV)(e=>!!e.insurance.fetchingProductLists[u]),f=(0,a.GV)(e=>e.insurance.productListErrors[u]);return(0,o.useEffect)(()=>{t.disabled||r((0,n.xi)(e,{isCruise:t.isCruise,isDomestic:t.isDomestic,subscriptionId:t.subscriptionId}))},[u,t.disabled]),[(0,o.useMemo)(()=>{let e=d??[];return(0,i.TL)(e.map(e=>l[e]))},[l,d]),c,f,(0,o.useCallback)(()=>{r((0,n.Lc)(e,{isCruise:t.isCruise,isDomestic:t.isDomestic,subscriptionId:t.subscriptionId}))},[r,t.isCruise,t.isDomestic,t.subscriptionId,e])]}})},383062(e,t,r){var n=r(602870),a=r(750142),i=r(620921),s=r(917164),o=r(296540);r.d(t,{},{A:function(e,t,r={}){let u=(0,a.jL)(),d=t.travellers?Array.isArray(t.travellers)?(0,s.AT)(t.travellers):t.travellers:void 0,l=d?(d.adults??0)+(d.children??0)+(d.infants??0):0,c=!!(!r.disabled&&e&&t.startDate&&t.endDate&&t.coverAmount&&t.destinationCountries?.length&&t.travellers&&l>0),f=(0,i.qP)(e??"",t),p=(0,a.GV)(e=>e.insurance.quotes[f]),m=(0,a.GV)(e=>!!e.insurance.fetchingQuotes[f]),g=(0,a.GV)(e=>e.insurance.fetchQuotesErrors[f]);(0,o.useEffect)(()=>{c&&u((0,n.Hg)(e,t))},[f,r.disabled,c]);let h=(0,o.useCallback)(()=>{c&&e&&u((0,n.$V)(e,t))},[c,u,t,e]);return[p,!!c&&(m??!0),g,h]}})},4288(e,t,r){r(218111),r(13579),r(161701),r(22489);var n=r(596742),a=r(750142),i=r(319720),s=r(296540),o=r(729923);r.d(t,{},{A:function(e){let t=(0,a.jL)(),r=(0,i.A)(e);(0,s.useEffect)(()=>{t((0,n.G_)(r))},[r,t]);let u=(0,a.GV)(o.BM),d=(0,a.GV)(e=>e.offer.offersLoading),l=(0,s.useMemo)(()=>r.some(e=>d[e]),[d,r]);return[(0,s.useMemo)(()=>r.map(e=>
1u[e]).filter(Boolean),[r,u]),l]}})},166067(e,t,r){r.d(t,{A:()=>em}),r(218111),r(22489),r(161701),r(944114);var n=r(792435),a=r(175160),i=r(957997),s=r(315734),o=r(302885),u=r(296540),d=r(691692),l=r(579578);let c=["multi_city_vicinity","province_state","city"],f=[36],p=function(e){let[t,r]=(0,u.useState)(!!(0,l.Jt)((0,d.n)("transfer",e.id))),p=(0,u.useCallback)(()=>{(0,l.hZ)((0,d.n)("transfer",e.id),!0),r(!0)},[e.id]),m=(0,u.useMemo)(()=>e.transferItems.filter(e=>"completed"===e.status).length>0,[e]),{geoStateName:g}=(0,u.useContext)(a.A),h=!!e.transferItems.length&&!!(e.items.length||e.bedbankItems.length||e.flightItems.length||e.cruiseItems.length),[y,v]=(0,u.useMemo)(()=>{if(m)return[];let t=[...e.items.filter(e=>e.offer.property&&e.reservation).map(e=>({coords:{latitude:e.offer.property?.latitude??0,longitude:e.offer.property?.longitude??0},from:e.reservation?.startDate??"",to:e.reservation?.endDate??"",status:e.status,state:e.offer.property?.geoData?.administrativeAreaLevel1})),...e.bedbankItems.map(e=>({coords:{latitude:e.offer.property.latitude,longitude:e.offer.property.longitude},from:e.checkIn.format(n.Jv),to:e.checkOut.format(n.Jv),status:e.status,state:e.offer.property.address.stateProvinceName}))].filter(e=>"completed"===e.status&&(!g||g!==e.state)&&e.coords.latitude&&e.coords.longitude&&e.from&&e.to);return[(0,o.jk)(t,e=>new Date(e.from)),(0,o.T9)(t,e=>new Date(e.to))]},[g,m,e.bedbankItems,e.items]),[D,I]=(0,i.A)({categoryCodes:f,from:y?.from,to:y?.from,latitude:y?.coords.latitude,longitude:y?.coords.longitude}),[b,A]=(0,i.A)({categoryCodes:f,from:v?.to,to:v?.to,latitude:v?.coords.latitude,longitude:v?.coords.longitude}),k=(0,u.useMemo)(()=>{let e=[];return y&&I.length>0&&e.push({upsell:y,price:(0,o.jk)(I,e=>e.price).price}),v&&A.length>0&&e.push({upsell:v,price:(0,o.jk)(A,e=>e.price).price}),(0,o.jk)((0,o.TL)(e),e=>e.price)},[y,I,v,A]),[C,M]=(0,s.A)({latLong:k?.upsell.coords,placeLevels:c,categoryIds:f}),T=h&&!t&&!m&&k,L=(0,u.useMemo)(()=>({price:k?.price,experienceSearchUrl:C}),[C,k?.price]),E=!!(M||D.fetching||b.fetching);return T?{airportTransferUpsellEnabled:!0,airportTransferUpsell:L,handleAirportTransferDismiss:p,airportTransferDataLoading:E}:{airportTransferUpsellEnabled:!1,airportTransferUpsell:void 0,handleAirportTransferDismiss:void 0,airportTransferDataLoading:E}};r(720116);var m=r(795907),g=r(267662),h=r(4288),y=r(750142),v=r(576159),D=r(748577),I=r(769008),b=r(481834),A=r(423983),k=r(338608);let C=function(e){let[t,r]=(0,u.useState)(!!(0,l.Jt)((0,d.n)("car-hire",e.id))),a=(0,u.useCallback)(()=>{(0,l.hZ)((0,d.n)("car-hire",e.id),!0),r(!0)},[e.id]),i=(0,u.useMemo)(()=>[...e.items.map(e=>e.offer.id)],[e.items]),[s,c]=(0,h.A)(i),f=(0,y.GV)(e=>(0,v.D)(g.A.CARHIRE_REGIONS,e.geo.currentRegionCode)),p=(0,y.GV)(e=>(0,k.IY)(e)),C=!e.carHireItems.length&&!!(e.items.length||e.bedbankItems.length||e.flightItems.length),[M,T]=(0,u.useMemo)(()=>{let t=[...(0,o.TL)(e.items.map(e=>{let t=s.find(t=>t.id===e.offer.id);if((0,D.Yd)(t)&&e.offer.property&&e.reservation)return{startDate:e.reservation.startDate,endDate:e.reservation.endDate,latitude:t.property.latitude,longitude:t.property.longitude,validCarHireOfferCountry:!t.property.geoData?.country||I.d0.includes(t.property.geoData?.country),status:e.status}})),...(0,o.TL)(e.bedbankItems.map(e=>({startDate:e.checkIn.format(n.Jv),endDate:e.checkOut.format(n.Jv),latitude:e.offer.property.latitude,longitude:e.offer.property.longitude,validCarHireOfferCountry:I.d0.includes(e.offer.property.address.countryName),status:e.status})))].filter(e=>"completed"===e.status);return[(0,o.jk)(t,e=>new Date(e.startDate)),(0,o.T9)(t,e=>new Date(e.endDate))]},[e.items,e.bedbankItems,s]),{earliestItem:L,filters:E,searchLink:x,discountPercentage:_,benefits:V,isEligible:O}=(0,b.A)(e.id),{offerSummary:P}=(0,A.A)(E),[G,B]=(0,m.q)(L?.checkIn??M?.startDate,L?.checkOut??T?.endDate,L?.latitude??M?.latitude,L?.longitude??M?.longitude,O?e.id:void 0),w=!t&&C&&M?.validCarHireOfferCountry&&T?.validCarHireOfferCountry&&f,Y=(0,u.useMemo)(()=>{let e=p&&!!L&&!!P&&!!_&&!!V?.has("discount");return{carHireSearchLink:e?x:G,discountPercentage:e?_:void 0,hasLoyaltyBonusPoints:p&&!!L&&!!P&&!!V?.has("loyalty_bonus_points")}},[G,p,L,P,x,_,V]),U=c||B;return w?{carHireUpsellEnabled:!0,carHireUpsell:Y,handleCarHireUpsellDismiss:a,carHireDataLoading:U}:{carHireUpsellEnabled:!1,carHireUpsell:void 0,handleCarHireUpsellDismiss:void 0,carHireDataLoading:U}};var M=r(754472),T=r(646274),L=r(64464),E=r(187811),x=r(917164),_=r(169214),V=r(665673),O=r(340241),P=r(747753);let G={adults:1,children:0,infants:0},B=function(e){let[t,r]=(0,u.useState)(!!(0,l.Jt)((0,d.n)("flight",e.id))),a=(0,u.useCallback)(()=>{(0,l.hZ)((0,d.n)("flight",e.id),!0),r(!0)},[e.id]),i=(0,y.GV)(P.tV),s=(0,u.useMemo)(()=>[...e.items.map(e=>e.offer.id),...e.tourItems.map(e=>e.tourId)],[e.items,e.tourItems]),[c,f]=(0,h.A)(s),p=(0,y.GV)(e=>(0,P.$A)(e)),m=(0,y.GV)(e=>e.geo.airports),g=(0,y.GV)(P.Wx)&&!e.hasFlight,[v,I]=(0,u.useMemo)(()=>{let t=[...(0,o.TL)(e.items.map(e=>{let t=c.find(t=>
1t.id===e.offer.id);if((0,D.Yd)(t)&&e.offer.property&&e.reservation)return{offerId:e.offer.id,occupants:{adults:e.reservation.adults,children:e.reservation.children,infants:e.reservation.infants},destinationAirport:p[t.flightDestinationPort],locationHeading:e.offer.property.locationHeading,flightsMaxArrivalTime:t.flightsMaxArrivalTime,flightsMinReturningDepartureTime:t.flightsMinReturningDepartureTime,startDate:e.reservation.startDate,endDate:e.reservation.endDate,status:e.status,type:"hotel"}})),...(0,o.TL)(e.tourItems.map(e=>{let t=(0,x.qc)(e.tour.travellers);return{offerId:e.tourId,occupants:{adults:t.adults,children:t.children,infants:t.infants},locationHeading:e.tour.startLocation,startDate:e.tour.startDate,endDate:e.tour.endDate,status:e.status,type:"tour"}})),...(0,o.TL)(e.bedbankItems.map(e=>{let t=(0,L.A)(m,e.offer.property.latitude,e.offer.property.longitude),r=e.rooms.map(e=>e.occupancy),a=(0,x.AT)(r);return{offerId:e.offer.id,occupants:{adults:a.adults,children:a.children,infants:a.infants},destinationAirport:p[t?.code??""],locationHeading:e.offer.property.address.city,startDate:e.checkIn.format(n.Jv),endDate:e.checkOut.format(n.Jv),status:e.status,type:"bedbank"}}))].filter(e=>"completed"===e.status);return[(0,o.jk)(t,e=>new Date(e.startDate)),(0,o.T9)(t,e=>new Date(e.endDate))]},[e.items,e.tourItems,e.bedbankItems,c,p,m]),[b,A]=(0,T.Ay)(v?.destinationAirport?.code||"",[G],v?.startDate,I?.endDate,i?.code),k=(0,u.useMemo)(()=>v&&i?(0,M.ot)(v?.startDate,I?.endDate,v?.occupants||G,i,v?.destinationAirport,v?.flightsMaxArrivalTime,v?.flightsMinReturningDepartureTime):"/flights",[v,I,i]),C=(0,u.useMemo)(()=>i&&v?.destinationAirport?(0,E.mF)(i.latitude,i.longitude,v.destinationAirport.latitude,v.destinationAirport.longitude):0,[i,v]),B=(0,V.A)(),w=v?.destinationAirport?B.formatMessage({id:"EIejIN-_LSsG1gOqSdOz",defaultMessage:"Return flights to {destination}",description:"Upsell tile title for return flights to a specific destination airport on the order confirmation page"},{destination:v.destinationAirport.name}):B.formatMessage(O.A.addFlights),Y=!!(e.items.length||e.bedbankItems.length||e.tourItems.length),U=i?.code===v?.destinationAirport?.code||C<200,H=v?.type==="tour",j=(0,_.f6)(e),S=!t&&!j&&Y&&g&&!U&&!H,J=(0,u.useMemo)(()=>({flightPrice:b,flightLink:k,flightTitle:w}),[k,b,w]),R=f||A;return S?{flightUpsellEnabled:!0,flightUpsell:J,handleFlightUpsellDismiss:a,flightDataLoading:R}:{flightUpsellEnabled:!1,flightUpsell:void 0,handleFlightUpsellDismiss:void 0,flightDataLoading:R}};r(269479),r(18237),r(981148);var w=r(383062),Y=r(643564),U=r(189780),H=r(391609),j=r(862919),S=r(90174),J=r(482597),R=r(505618);let N=function(e){let t=(0,y.GV)(e=>e.auth.account.luxPlus.member.subscription.fetching),r=(0,y.GV)(J.Vn),n=(0,y.GV)(J.Zc),a=(0,u.useMemo)(()=>[...e.items.map(e=>e.offer.id),...e.cruiseItems.map(e=>e.cruiseOfferId)],[e.cruiseItems,e.items]),[i,s]=(0,h.A)(a),o=(0,u.useMemo)(()=>(0,j.qd)(e),[e]),d=!!o?.endDate&&!!o.startDate&&(0,H.bb)(o.startDate)&&(0,H.s9)(o.endDate),{cruiseOffers:l,allOffers:c,flightDetails:f,experienceOffers:p}=(0,y.GV)(e=>({cruiseOffers:e.cruise.cruiseOfferSnapshot,allOffers:e.offer.offers,flightDetails:e.orders.flightDetails,experienceOffers:e.experience.experiences}),y.bN),m=(0,u.useMemo)(()=>(0,U.A)(e,f),[e,f]),g=(0,u.useMemo)(()=>(0,j.rB)(e,l,c,m,p),[l,e,c,m,p]),v=(0,y.GV)(t=>(0,R.A)(t,e)),D=(0,y.GV)(e=>(0,H.ap)(e.geo.currentRegionCode));
1return{luxplus:{fetchingLuxPlusSubscription:t,ableToViewLuxPlusBenefits:r,luxPlusDiscountedInsuranceEnabled:n},offers:{offers:i,fetching:s},datesAreValid:d,flags:{isInsuranceSupported:!!(o&&g.length)&&D&&!v&&!(0,S.IQ)(e),orderHasInsurance:e.hasInsurance,isInsuranceBookingProtectionSupported:v}}};var q=r(842930),F=r(795093),K=r.n(F);let Z=function(e){return e[0]};var Q=r(944734),$=r(217769),z=r(255825),X=r(264281),W=r(769696);let ee=function({ableToViewLuxPlusBenefits:e,luxPlusDiscountedInsuranceEnabled:t,quote:r,earliestItem:n,latestItem:a}){let[i,s]=(0,u.useMemo)(()=>{let i=0,s=0;if(r&&n&&a){let n=r.policyQuotes;i=(0,o.jk)(n.map(e=>e.pricePerPerson))??0,e&&t&&(s=(0,o.jk)(n.map(e=>e.luxPlusPricePerPerson))??0)}return[i,s]},[e,n,a,t,r]);return[i,s]};var et=r(743183),er=r(32645),en=r(481128);let ea="insurance-booking-protection",ei=function(e){let t=(0,y.jL)(),[r,i]=(0,u.useState)(!!(0,l.Jt)((0,d.n)(ea,e.id))),{luxplus:{fetchingLuxPlusSubscription:s,ableToViewLuxPlusBenefits:c,luxPlusDiscountedInsuranceEnabled:f},offers:{offers:p,fetching:m},flags:{orderHasInsurance:g,isInsuranceBookingProtectionSupported:h},datesAreValid:v}=N(e);(0,u.useEffect)(()=>{let r=e.experienceItems,n=r.map(e=>e.id);r.length&&t((0,$.Zy)(n))},[t,e.experienceItems]);let I=(0,u.useCallback)(()=>{(0,l.hZ)((0,d.n)(ea,e.id),!0),i(!0)},[e.id]),b=(0,y.GV)(e=>e.orders.flightDetails),A=(0,y.GV)(e=>e.experience.experiences),k=(0,y.GV)(e=>e.experience.bookingDetails),[C,M]=(0,u.useMemo)(()=>{let t=[...(0,o.TL)(e.items.map(e=>{let t=p.find(t=>t.id===e.offer.id);if((0,D.Yd)(t)&&e.offer.property&&e.reservation)return{offerId:e.offer.id,occupants:{adults:e.reservation.adults,children:e.reservation.children,infants:e.reservation.infants},destinationCountries:(0,o.TL)([t.property.geoData.country]),destinationCountryCode:t.property.geoData.countryCode,reservationType:e.reservationType,startDate:e.reservation.startDate,endDate:e.reservation.endDate,status:e.status,type:"hotel"}})),...(0,o.TL)(e.bedbankItems.map(e=>{let t=e.rooms.map(e=>e.occupancy),r=(0,x.AT)(t);return{offerId:e.offer.id,occupants:{adults:r?.adults,children:r?.children,infants:r?.infants},destinationCountries:[e.offer.property.address.countryName],reservationType:e?.reservationId,startDate:e.checkIn.format("YYYY-MM-DD"),endDate:e.checkOut.format("YYYY-MM-DD"),status:e.status,type:"bedbank_hotel"}})),...(0,o.TL)(e.flightItems.map(t=>{let r=(0,U.A)(e,b);if(!r)return;let a=e.flightItems.map(e=>e.id),i=a.reduce((e,t)=>{let n=r[t];return[...e,...n?.travellers||[]]},[]),s=(0,x.qc)(i),o=t.departureDate,u=t.arrivalDate;if(!o||!u)return;(0,q.ro)(new Date(o),new Date(u))&&(u=K()(u).add(1,"day").format(n.Jv));let d=a.reduce((e,t)=>{let n=r[t];return[...e,...n?.bookingJourney.legs.map(e=>e.arrivalCountry)||[]]},[]).filter(Boolean);return{offerId:t.reservationId,occupants:{adults:s?.adults,children:s?.children,infants:s?.infants},destinationCountries:d,reservationType:t.reservationId,startDate:o,endDate:u,status:t.status,type:"flight"}})),...(0,o.TL)(e.experienceItems.map(t=>{let r=t.experienceId,a=Object.values(k||{}).filter(t=>t.orderId===e.id).length,i=t.date??t.bookByDate,s=K()(i).add(1,"day").format(n.Jv),u=A[r],d=u?.redemptionLocations?.map(e=>(0,Q.ST)(e.countryCode))||[];return{offerId:t.experienceId,occupants:{adults:a,children:0,infants:0},destinationCountries:(0,o.TL)(d),reservationType:t.bookingType,startDate:i,endDate:s,status:t.status,type:"experience"}}))].filter(e=>"completed"===e.status);return[(0,o.jk)(t,e=>new Date(e.startDate)),(0,o.T9)(t,e=>new Date(e.endDate))]},[e,p,b,k,A]),{currentRegionName:T}=(0,u.useContext)(a.A),L=(0,u.useMemo)(()=>!!C?.destinationCountries?.every(e=>e==T),[T,C?.destinationCountries]),[E]=(0,Y.A)("booking-protection",{isDomestic:L,disabled:!v}),_=(0,y.GV)(X.l),[V,O]=(0,w.A)(E[0]?.id,{startDate:C?.startDate,endDate:M?.endDate,destinationCountries:C?.destinationCountries,coverAmount:(0,z.A)(e),travellers:C?.occupants,type:"booking-protection",priceAdjustmentPercentage:_},{disabled:!v}),[P,G]=ee({ableToViewLuxPlusBenefits:c,luxPlusDiscountedInsuranceEnabled:f,quote:V,earliestItem:C,latestItem:M}),B=(0,u.useCallback)(()=>{let r=Z(E);if(!r)return;let n=(0,et.T)({product:r});t((0,er.IQ)([n],{regionCode:e.regionCode,currencyCode:e.currencyCode,mode:"insurance",order:e})),t((0,en.XM)())},[t,e,E]),H=!!Z(E),j=!r&&!g&&h&&H;(0,W.A)({canActivate:j&&!!V,isFreshInsuranceDecision:!0});let S=(0,u.useMemo)(()=>({checkCanViewLuxPlusBenefits:c,isEnabledLuxPlusDiscountedInsurance:f,fetchingLuxPlusSub
1scription:s,fetchingQuotes:O,cheapestQuotePrice:P,cheapestQuoteLuxPlusPrice:G,orderId:e.id}),[c,G,P,s,O,f,e.id]);return j?{insuranceBookingProtectionUpsellEnabled:!0,insuranceBookingProtectionUpsell:S,handleInsuranceBookingProtectionUpsellDismiss:I,handleInsuranceBookingProtectionSelect:B,insuranceBookingProtectionDataLoading:m}:{insuranceBookingProtectionUpsellEnabled:!1,insuranceBookingProtectionUpsell:void 0,handleInsuranceBookingProtectionUpsellDismiss:void 0,handleInsuranceBookingProtectionSelect:void 0,insuranceBookingProtectionDataLoading:m}};var es=r(485230);let eo=function(e){let[t,r]=(0,u.useState)(!!(0,l.Jt)((0,d.n)("insurance",e.id))),{luxplus:{fetchingLuxPlusSubscription:n,ableToViewLuxPlusBenefits:i,luxPlusDiscountedInsuranceEnabled:s},offers:{offers:c,fetching:f},datesAreValid:p,flags:{isInsuranceSupported:m,orderHasInsurance:g}}=N(e),h=(0,u.useCallback)(()=>{(0,l.hZ)((0,d.n)("insurance",e.id),!0),r(!0)},[e.id]),[v,I]=(0,u.useMemo)(()=>{let t=[...(0,o.TL)(e.items.map(e=>{let t=c.find(t=>t.id===e.offer.id);if((0,D.Yd)(t)&&e.offer.property&&e.reservation)return{offerId:e.offer.id,occupants:{adults:e.reservation.adults,children:e.reservation.children,infants:e.reservation.infants},destinationCountries:(0,o.TL)([t.property.geoData.country]),destinationCountryCode:t.property.geoData.countryCode,reservationType:e.reservationType,startDate:e.reservation.startDate,endDate:e.reservation.endDate,status:e.status,type:"hotel"}})),...(0,o.TL)(e.bedbankItems.map(e=>{let t=e.rooms.map(e=>e.occupancy),r=(0,x.AT)(t);return{offerId:e.offer.id,occupants:{adults:r?.adults,children:r?.children,infants:r?.infants},destinationCountries:[e.offer.property.address.countryName],reservationType:e?.reservationId,startDate:e.checkIn.format("YYYY-MM-DD"),endDate:e.checkOut.format("YYYY-MM-DD"),status:e.status,type:"bedbank_hotel"}})),...(0,o.TL)(e.tourItems.map(e=>{let t=(0,x.qc)(e.tour.travellers);return{offerId:e.tourId,occupants:{adults:t.adults,children:t.children,infants:t.infants},destinationCountries:e.tour.countriesVisited,reservationType:e.reservationId,startDate:e.tour.startDate,endDate:e.tour.endDate,status:e.status,type:"tour"}})),...(0,o.TL)(e.cruiseItems.map(e=>{let t=c.find(t=>t.id===e.cruiseOfferId),r=(0,x.qc)(e.passengers);if((0,D.MH)(t))return{offerId:e.cruiseOfferId,occupants:{adults:r.adults,children:r.children,infants:r.infants},destinationCountries:(0,o.TL)((0,es.g)(t)),reservationType:e.reservationId,startDate:e.departureDate,endDate:e.arrivalDate,status:e.status,type:"cruise"}}))].filter(e=>"completed"===e.status);return[(0,o.jk)(t,e=>new Date(e.startDate)),(0,o.T9)(t,e=>new Date(e.endDate))]},[e,c]),{currentRegionName:b}=(0,u.useContext)(a.A),A=(0,u.useMemo)(()=>!!v?.destinationCountries?.every(e=>e==b),[b,v?.destinationCountries]),k=v?.type==="cruise",[C]=(0,Y.A)("travel-insurance",{isCruise:k,isDomestic:A,disabled:!p}),M=(0,y.GV)(X.l),[T,L]=(0,w.A)(C[0]?.id,{startDate:v?.startDate,endDate:I?.endDate,destinationCountries:v?.destinationCountries,coverAmount:e?.total,travellers:v?.occupants,isCruise:k,type:"travel-insurance",priceAdjustmentPercentage:M},{disabled:!p}),[E,_]=ee({ableToViewLuxPlusBenefits:i,luxPlusDiscountedInsuranceEnabled:s,quote:T,earliestItem:v,latestItem:I}),V=!t&&m&&!g&&p;(0,W.A)({canActivate:V&&!!T,isFreshInsuranceDecision:!0});let O=(0,u.useMemo)(()=>({checkCanViewLuxPlusBenefits:i,isEnabledLuxPlusDiscountedInsurance:s,fetchingLuxPlusSub
1scription:n,fetchingQuotes:L,cheapestQuotePrice:E,cheapestQuoteLuxPlusPrice:_,orderId:e.id}),[i,_,E,n,L,s,e.id]);return V?{insuranceUpsellEnabled:!0,insuranceUpsell:O,handleInsuranceUpsellDismiss:h,insuranceDataLoading:f}:{insuranceUpsellEnabled:!1,insuranceUpsell:void 0,handleInsuranceUpsellDismiss:void 0,insuranceDataLoading:f}};var eu=r(386834),ed=r(952156),el=r(796321),ec=r(313079),ef=r(655780);let ep=function(e){let t=(0,y.jL)(),[r,n]=(0,u.useState)(!!(0,l.Jt)((0,d.n)("tour",e.id))),a=(0,u.useCallback)(()=>{(0,l.hZ)((0,d.n)("tour",e.id),!0),n(!0)},[e.id]),[i,s]=(0,el.A)(e.tourItems[0]?.tourId),o=e.tourItems[0],[c,f]=(0,ef.A)(o?.reservationId,o?.orderId),p=(0,u.useCallback)(()=>{t((0,er.IQ)([],{regionCode:e.regionCode,currencyCode:e.currencyCode,mode:"tour-optional-experiences",order:e})),t((0,ed.dp)("tours-optional-extras"))},[e,t]),m=(0,u.useMemo)(()=>{if(i?.purchasableExperienceOptions)return(0,ec.d)(Object.values(i?.purchasableExperienceOptions))},[i]),g=(0,eu.A)(o,i,c),h=r&&!!e.tourItems.length&&g,v=(0,u.useMemo)(()=>({onClick:p,price:m?.price}),[m?.price,p]),D=s||f;return h?{tourUpsellEnabled:!0,tourUpsell:v,handleTourUpsellDismiss:a,tourDataLoading:D}:{tourUpsellEnabled:!1,tourUpsell:void 0,handleTourUpsellDismiss:void 0,tourDataLoading:D}},em=function(e){let t=ep(e),r=eo(e),n=ei(e),a=B(e),i={tour:t,insurance:r,insuranceBookingProtection:n,flight:a,airportTransfer:p(e),carHire:C(e)},s=function(e){let{tour:{tourUpsellEnabled:t},insurance:{insuranceUpsellEnabled:r},insuranceBookingProtection:{insuranceBookingProtectionUpsellEnabled:n},flight:{flightUpsellEnabled:a},airportTransfer:{airportTransferUpsellEnabled:i},carHire:{carHireUpsellEnabled:s}}=e;return t||r||n||a||i||s}(i),o=function(e){let{tour:{tourDataLoading:t},insurance:{insuranceDataLoading:r},insuranceBookingProtection:{insuranceBookingProtectionDataLoading:n},flight:{flightDataLoading:a},airportTransfer:{airportTransferDataLoading:i},carHire:{carHireDataLoading:s}}=e;return t||r||n||a||i||s}(i);return{...i,anyUpsellEnabled:s,anyUpsellLoading:o}}},743183(e,t,r){var n=r(125543),a=r(381893),i=r(643063);function s(e={}){return{itemId:(0,a.Ay)(),transactionKey:(0,a.Ay)(),itemType:n.hY,productId:e.product?.id,policyIds:e.policyIds,insuranceType:e.product?.type,coverageAmount:e.customCoverage,flightJourneysKeys:e.flightJourneysKeys,hasFullBundleCoverage:e.hasFullBundleCoverage,bedbankRoomIds:e.bedbankRoomIds,isAccommodationBundle:e.isAccommodationBundle}}function o(e="insurance"){return{itemId:(0,a.Ay)(),transactionKey:(0,a.Ay)(),itemType:n.hY,productId:i.ED,insuranceType:e}}r.d(t,{D:()=>o,T:()=>s})},928445(e,t,r){r(517642),r(658004),r(733853),r(845876),r(432475),r(515024),r(731698),r(125509),r(665223),r(660321),r(241927),r(511632),r(864377),r(966771),r(712516),r(368931),r(652514),r(235694),r(652774),r(849536),r(321926),r(994483),r(916215),r(218111),r(607588),r(13579),r(430531),r(22489),r(161701);var n=r(842930);r.d(t,{},{A:function(e,t,r,a){var i;let s;return 0!==e.flatMap(a).filter(Boolean).length&&Array.from((i=e=>a(e).map(e=>({date:e})),s=new Set,e.forEach(e=>{let t=i(e);t?.forEach(e=>{e?.date&&s.add(e.date)})}),s)).some(e=>{let a=new Date(e);return(0,n.Lc)(t,r,a)})}})},691692(e,t,r){r(218111),r(22489),r(13579);var n=r(169214);let a=["hotel","bundle_and_save","rental","tactical_ao_hotel"];function i(e){return!e.locked&&([...e.items.filter(e=>{let t=a.includes(e.offer.type),r=(0,n._k)(e)&&t;return"hotel"===e.offer.type?r&&e.reservation:r}),...e.flightItems.filter(e=>"cancelled"!==e.status&&(0,n.bR)(e)),...e.experienceItems.filter(t=>(0,n.YV)(t,e))].length>0||e.bedbankItems.some(e=>(0,n.nt)(e)))}function s(e,t){return`${e}-${t}-upsell-dismissed`}r.d(t,{i:()=>i,n:()=>s})}}]);
2//# sourceMappingURL=3028.407c7a9d76ecb566.js.map

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.