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 a in r)r.hasOwnProperty(a)&&(e[a]=r[a])}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]="42004dd7-783e-49fb-9ebf-8adb426cd698",e._sentryDebugIdIdentifier="sentry-dbid-42004dd7-783e-49fb-9ebf-8adb426cd698")}catch(e){}}();"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8518],{96897(e,t,r){r(218111),r(607588),r(720116),r(78898);var a=r(296540),i=r(795093),l=r.n(i),o=r(106427),n=r(610377),s=r(532957),f=r(791914),c=r(292630),u=r(751421);function d(e){let{rooms:t,dateRangesByMonth:r,fareClass:i,charterBundleRoute:d,disabled:g=!1,seatEligiblePassengers:h,feederOriginAirportCode:m}=e,p=(0,n.ND)(i),P=(0,o.A)({charterBundleRoute:d,fareClass:p,occupancies:t,disabled:g||!d,feederOriginAirportCode:m}),v=P?.error,y=P?.timestamp,b=(0,a.useMemo)(()=>Object.values(r).flat(),[r]);return{flightDataByDate:(0,a.useMemo)(()=>{let e={};if(!P?.fares)return b.forEach(({checkIn:t})=>{e[t]={fetching:!0}}),e;let t=P.fares[0]??[],r=P.fares[1]??[];return b.forEach(({checkIn:a,checkOut:i})=>{let o=a?t.find(e=>{let t=e.flightGroup.flights.at(-1)?.arrivalDate;return t&&l()(t).format("YYYY-MM-DD")===a}):void 0,n=i?r.find(e=>{let t=e.flightGroup.flights.at(0)?.departingDate;return t&&l()(t).format("YYYY-MM-DD")===i}):void 0;if(o||n){let t=(0,c.SN)(o),r=(0,c.SN)(n),i=void 0!==t&&void 0!==r?Math.min(t,r):t??r,l=Math.max((0,u.hG)(o)??0,(0,u.hG)(n)??0),d=(0,u.aB)(o),g=(0,u.aB)(n),m=void 0!==d&&void 0!==g?Math.min(d,g):d??g,P=(0,u.i_)(o,n,h),v=!P&&!!(o?.promotionPrice||n?.promotionPrice),y=P||o?.promotionPrice?.adult.totalFare?(0,f.HM)(o,h).all.totalFare??0:(0,u.T9)({journey:o,fareClass:p})??0,b=P||n?.promotionPrice?.adult.totalFare?(0,f.HM)(n,h).all.totalFare??0:(0,u.T9)({journey:n,fareClass:p})??0,D=(0,u.gk)({journey:o,fareClass:p})??0,M=(0,u.gk)({journey:n,fareClass:p})??0,A=o&&n?(o.feederEstimatedPrice??0)+(n.feederEstimatedPrice??0):0;e[a]={fetching:!1,totalPrice:y+b+A,originalTotalPrice:D+M+A,journey:o??n,departingJourney:o,returningJourney:n,seatsLeft:i,promotionSeatsLeft:l,isPromotionPriceApplied:v,fnfSeatsLeft:m,isFnfPriceApplied:P,hasReturnFareFree:(0,s.vE)(n)}}else{let t=!!y||!!v;e[a]={fetching:!t}}}),e},[b,p,P,y,v,h])}}r.d(t,{y:()=>d})},667158(e,t,r){r.d(t,{y:()=>D}),r(218111),r(161701);var a=r(296540),i=r(731755),l=r(908360),o=r(4288),n=r(488562);r(13579),r(971517),r(11379),r(693777),r(614190),r(512359),r(886097),r(627254),r(707036),r(17273),r(227415),r(819929),r(837583),r(455122),r(720230),r(357268),r(679733),r(607588),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(22489);var s=r(751421),f=r(750142),c=r(120844),u=r(564715),d=r(917164),g=r(428357),h=r(236567),m=r(96897),p=r(529052),P=r(175160),v=r(964050),y=r(496036),b=r(503542);function D(e){let{rooms:t,fareClass:r,selectedFareClass:D,nights:M,charterBundleRoute:A,dateRangesByMonth:C,disabled:E=!1,limit:w=20,feederOriginAirportCode:_}=e,{offerList:F,offers:O,offersFetching:L}=function(e){let{rooms:t,fareClass:r,disabled:s=!1,limit:f=20}=e,c=(0,a.useMemo)(()=>{if(!s&&0!==t.length)return{...(0,n.ke)({destinationId:i.Ay.Maldives.id,checkIn:"",checkOut:"",rooms:t,fareClass:r,limit:f}),isStream:!1,limit:f}},[s,t,r,f]),u=(0,l.A)(c,{minRequiredOffers:f,disabled:!c}),[d,g]=(0,o.A)(u.offerIds);return{offerList:u,offers:d,offersFetching:g}}({rooms:t,disabled:E,limit:w}),{calendarPricingByDate:T,hotelPriceByCabinAndDate:j,isLoading:S}=function(e){let{offers:t,rooms:r,dateRangesByMonth:i,selectedFareClass:l,searchFareClass:o,charterBundleRoute:n,nights:D,feederOriginAirportCode:M}=e,A=(0,f.jL)(),C=(0,a.useContext)(p.A),{currentRegionCode:E}=(0,a.useContext)(P.A),w=(0,a.useMemo)(()=>(0,d.yR)(r),[r]),_=(0,s.pg)(r),F=(0,y.A)(b.S.luxRow),O=(0,a.useMemo)(()=>(0,h.hX)(F),[F]),L=(0,a.useMemo)(()=>{let e=new Map;return t.forEach(t=>
1{e.set(t.id,(0,v.cj)({campaignTags:t.campaignTags,occupancies:r}))}),e},[t,r]),T=(0,a.useMemo)(()=>{let e=new Set;return l||t.forEach(t=>{let a=L.get(t.id);if(!a||0===a.taggedFareClasses.length)return;let i=(0,v.H)({selectedFareClass:l,campaignTags:t.campaignTags,occupancies:r});i&&e.add(i)}),e},[L,t,r,l]),j=(0,a.useMemo)(()=>(0,s.Pw)(i,D),[i,D]),S=(0,a.useMemo)(()=>{let e={};for(let r of t)e[r.id]=r.packages.filter(e=>e.duration===D);return e},[t,D]);(0,a.useEffect)(()=>{if(0!==r.length&&0!==t.length)for(let e of t){let t=S[e.id];0!==t.length&&A((0,c.Yj)(e.id,{occupants:r,packages:t}))}},[A,t,r,S]);let B=(0,f.GV)(e=>{let a={};for(let i of t){let t=S[i.id];if(0!==t.length)for(let l of(a[i.id]={},r)){let r=(0,u.A)(l),o=e.calendar.calendarsByOccupancy[r];if(o)for(let e of(a[i.id][r]={},t))o[e.uniqueKey]&&(a[i.id][r][e.uniqueKey]=o[e.uniqueKey])}}return a},f.bN),I=(0,f.GV)(e=>0!==r.length&&0!==t.length&&t.some(t=>r.some(r=>{let a=(0,u.A)(r);return S[t.id].some(t=>{let r=e.calendar.calendarsByOccupancyLoading[a]?.[t.uniqueKey],i=!!e.calendar.calendarsByOccupancy[a]?.[t.uniqueKey];return r||!i&&void 0===r})}))),{flightDataByFareClass:R,isFlightLoading:k}=function(e){let{rooms:t,dateRangesByMonth:r,searchFareClass:i,currency:l,charterBundleRoute:o,restrictedFareClassesNeeded:n,seatEligiblePassengers:s,feederOriginAirportCode:f}=e,{flightDataByDate:c}=(0,m.y)({rooms:t,dateRangesByMonth:r,fareClass:i,currency:l,charterBundleRoute:o,seatEligiblePassengers:s,feederOriginAirportCode:f}),u=n.has("premium"),d=n.has("business"),g=n.has("lux_row"),{flightDataByDate:h}=(0,m.y)({rooms:t,dateRangesByMonth:r,fareClass:"premium",currency:l,charterBundleRoute:o,disabled:!u,seatEligiblePassengers:s,feederOriginAirportCode:f}),{flightDataByDate:p}=(0,m.y)({rooms:t,dateRangesByMonth:r,fareClass:"business",currency:l,charterBundleRoute:o,disabled:!d,seatEligiblePassengers:s,feederOriginAirportCode:f}),{flightDataByDate:P}=(0,m.y)({rooms:t,dateRangesByMonth:r,fareClass:"lux_row",currency:l,charterBundleRoute:o,disabled:!g,seatEligiblePassengers:s,feederOriginAirportCode:f}),v=Object.values(c).some(e=>e.fetching)||u&&Object.values(h).some(e=>e.fetching)||d&&Object.values(p).some(e=>e.fetching)||g&&Object.values(P).some(e=>e.fetching);return{flightDataByFareClass:(0,a.useMemo)(()=>({[i]:c,...u&&"premium"!==i?{premium:h}:{},...d&&"business"!==i?{business:p}:{},...g&&"lux_row"!==i?{lux_row:P}:{}}),[i,c,h,p,P,u,d,g]),isFlightLoading:v}}({rooms:r,dateRangesByMonth:j,searchFareClass:o,currency:C||"AUD",charterBundleRoute:n,restrictedFareClassesNeeded:T,seatEligiblePassengers:_,feederOriginAirportCode:M}),G=(0,a.useMemo)(()=>{let e=Object.values(j).flat(),a={};for(let t of e)a[t.checkIn]={fetching:I||k,available:!1,totalPrice:0,pricePerPerson:0,offerCount:0};for(let i of t){let t=S[i.id],n=B[i.id],f=L.get(i.id)??(0,v.cj)({campaignTags:i.campaignTags,occupancies:r});if(l&&f.allowedFareClasses.length>0&&!f.allowedFareClasses.includes(l))continue;let c=l??(0,v.H)({selectedFareClass:l,campaignTags:i.campaignTags,occupancies:r})??o;if(0===t.length||!n)continue;let u=R[c]??R[o]??g.zf,d={};for(let{checkIn:t}of e){let e=u[t];d[t]={price:(0,s.Dw)(e,c,_),originalPrice:(0,s.E2)(e,c),fetching:e?.fetching??!1,seatsLeft:e?.seatsLeft,promotionSeatsLeft:e?.promotionSeatsLeft,isPromotionPriceApplied:e?.isPromotionPriceApplied,fnfSeatsLeft:e?.fnfSeatsLeft,isFnfPriceApplied:e?.isFnfPriceApplied,hasReturnFareFree:e?.hasReturnFareFree}}for(let[l,o]of Object.entries((0,s.Zy)({dateRanges:e,offer:i,rooms:r,durationPackages:t,calendarDataByOccupancy:n,resolvedFlightByDate:d,totalPassengers:w,seatEligiblePassengers:_,isCalendarLoading:I,currentRegionCode:E}))){let e=o.bundleData;if(e.available&&e.totalPrice>0){let t=a[l];t&&(t.offerCount+=1,t.available=!0,(!t.totalPrice||e.totalPrice<t.totalPrice)&&(t.totalPrice=e.totalPrice,t.pricePerPerson=e.pricePerPerson,t.memberTotalPrice=e.memberTotalPrice,t.memberPricePerPerson=e.memberPricePerPerson,t.originalTotalPrice=e.originalTotalPrice,t.originalPricePerPerson=e.originalPricePerPerson,t.originalMemberTotalPrice=e.originalMemberTotalPrice,t.originalMemberPricePerPerson=e.originalMemberPricePerPerson,t.hotelPrice=e.hotelPrice,t.hotelMemberPrice=e.hotelMemberPrice,t.hotelValue=e.hotelValue,t.flightPrice=e.flightPrice,t.roomsLeft=e.roomsLeft,t.seatsLeft=e.seatsLeft,t.promotionSeatsLeft=e.promotionSeatsLeft,t.isPromotionPriceApplied=e.isPromotionPriceApplied,t.fnfSeatsLeft=e.fnfSeatsLeft,t.isFnfPriceApplied=e.isFnfPriceApplied,t.hasReturnFareFree=e.hasReturnFareFree,t.hotelLoyaltyCalculationRequest=e.hotelLoyaltyCalculationRequest))}}}let i=I||k;for(let e of Object.keys(a))a[e].fetching=i;return a},[t,S,B,j,R,L,r,w,_,I,k,l,o,E]);return{calendarPricingByDate:G,hotelPriceByCabinAndDate:(0,a.useMemo)(()=>{let e=Object.values(j).flat(),a={};for(let e of O)a[e]={};for(let i of t){let t=S[i.id],l=B[i.id];if(0===t.length||!l)continue;
1let o=L.get(i.id)??(0,v.cj)({campaignTags:i.campaignTags,occupancies:r}),n=0===o.allowedFareClasses.length?O:O.filter(e=>o.allowedFareClasses.includes(e));if(0!==n.length)for(let{checkIn:o}of e){let e=(0,s.Wf)({offer:i,rooms:r,durationPackages:t,calendarDataByOccupancy:l,checkIn:o});if(e.isValid&&!(e.totalHotelPrice<=0))for(let t of n){let r=a[t],i=r[o];(!i||(i.hotelPrice??1/0)>e.totalHotelPrice)&&(r[o]={hotelPrice:e.totalHotelPrice,hotelMemberPrice:e.totalHotelMemberPrice,hotelValue:e.totalHotelValue})}}}return a},[t,S,B,j,L,r,O]),isLoading:I||k}}({offers:O,rooms:t,dateRangesByMonth:C,selectedFareClass:D,searchFareClass:r,charterBundleRoute:A,nights:M,feederOriginAirportCode:_}),B=(0,a.useMemo)(()=>F.fetching||L||S,[F.fetching,L,S]);return{calendarPricingByDate:(0,a.useMemo)(()=>{let e=Object.values(C).flat().map(e=>e.checkIn);if(!E&&0===e.length)return T;let t=E?{}:{...T},r=E||B;for(let a of e){let e=t[a];if(!e){t[a]={fetching:r,available:!1,totalPrice:0,pricePerPerson:0,offerCount:0};continue}r&&!e.available&&0===e.offerCount&&(t[a]={...e,fetching:!0})}return t},[E,C,T,B]),hotelPriceByCabinAndDate:j,isLoading:B}}},109313(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(22489),r(18237);var a=r(610377),i=r(917164),l=r(449915);function o(e){return(0,i.yR)(e,new Set(["adults","children","teenagers"]),{maxInfantAge:1,maxChildAge:11})||(0,i.wK)(e).adults||1}function n(e,{useMemberPrice:t,priceMode:r}){let a="perPerson"===r?e.pricePerPerson:e.totalPrice,i="perPerson"===r?e.memberPricePerPerson:e.memberTotalPrice;return t?i??a:a}function s(e,{useMemberPrice:t,priceMode:r}){let a="perPerson"===r?e.originalPricePerPerson:e.originalTotalPrice,i="perPerson"===r?e.originalMemberPricePerPerson:e.originalMemberTotalPrice;return t?i??a:a}function f(e,t){var r,a;return r=e?.hotelPrice,a=e?.hotelMemberPrice,t?a??r:r}function c({fallbackPricing:e,fallbackMemberPricing:t,useMemberPrice:r}){var a,i;return a=e?.price,i=t?.price,r?i??a:a}function u({rewardHotelPricing:e,useMemberPrice:t}){var r,a;return r=e?.price,a=e?.memberPrice,t?a??r:r}function d(e,{useMemberPrice:t,priceMode:r}){return Object.values(e).filter(e=>e.available&&e.totalPrice>0).reduce((e,a)=>{let i=n(a,{useMemberPrice:t,priceMode:r});if(!i||i<=0)return e;let l=e?n(e,{useMemberPrice:t,priceMode:r}):0;return e&&l&&!(i<l)?e:a},void 0)}function g({fareClass:e,rewardPreviewOnly:t,rewardAvailable:r,rewardSeatPointsPerPerson:i,rewardSeatCashCoPayPerPerson:o,rewardHotelPrice:n,passengerCount:s}){let f=l.Iq[(0,a.ND)(e)],c=t||!r||void 0===i,u=c?f?.pointsPerPerson:i,d=c?f?.cashPerPerson:o,h=void 0!==n?n/s:void 0;return{points:u,cash:void 0!==d&&void 0!==h?h+d:void 0}}r.d(t,{H$:()=>u,QR:()=>d,QU:()=>n,Yc:()=>c,a4:()=>o,vw:()=>s,y9:()=>f,zk:()=>g})},360128(e,t,r){r(971517),r(11379),r(693777),r(614190),r(512359),r(886097),r(627254),r(707036),r(17273),r(227415),r(819929),r(837583),r(455122),r(720230),r(357268),r(679733),r(218111),r(607588),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(78898),r(944114),r(161701);var a=r(496036),i=r(503542),l=r(795093),o=r.n(l),n=r(792435),s=r(610377),f=r(302885),c=r(296540),u=r(106427),d=r(285438);function g({charterBundleRoute:e,occupancies:t=f.N9,fareClass:r,disabled:l,feederOriginAirportCode:h}){let m=(0,a.A)(i.S.flightsIncompleteCharterBundles),p=(0,s.ND)(r),P=(0,u.A)({charterBundleRoute:e,fareClass:p,occupancies:t,disabled:l,feederOriginAirportCode:h});return{dateRangesByMonth:(0,c.useMemo)(()=>{if(!P?.fares?.[0]||!Array.isArray(P.fares[0]))return{};let e=P.fares[0],t=P.fares[1]||[],r=new Map;t.forEach(e=>{r.set(e.id,e)});let a=new Map,i=new Set;e.forEach(e=>{let t=e.flightGroup?.flights;if(!t||0===t.length)return;let l=t[0],s=t[t.length-1];if(!l?.departingDate||!s?.arrivalDate)return;let f=o()(l.departingDate).format(n.Jv),c=o()(s.arrivalDate).format(n.Jv);e.pairedFareId&&e.pairedFareId.length>
10&&e.pairedFareId.forEach(e=>{let t=r.get(e);if(!t)return;let l=t.flightGroup?.flights;if(!l||0===l.length)return;let s=l[0],u=l[l.length-1],d=u?.arrivalDate?o()(u.arrivalDate).format(n.Jv):void 0,g=s?.departingDate?o()(s.departingDate).format(n.Jv):void 0;if(f&&c&&d&&g){let e=o()(d).diff(o()(f),"days"),t=o()(g).diff(o()(c),"days"),r=`${f}-${d}`;a.has(r)||(i.add(`${c}-${g}`),a.set(r,{departureDate:f,returnDate:d,checkIn:c,checkOut:g,durationDays:e,nights:t}))}})});let l=(e,t,r,l=t,n="return")=>{if(!m)return;let s=`${e}-${t}`;if(i.has(s))return;i.add(s);let f=o()(t).diff(o()(e),"days");a.set(`${e}-${t}`,{checkIn:e,checkOut:t,departureDate:r,returnDate:l,durationDays:o()(l).diff(o()(r),"days"),nights:f,oneWayBundle:!0,missingFlightLeg:n})};e.forEach(e=>{let t=e.flightGroup.flights;if(!t[0]?.departingDate||!t.at(-1)?.arrivalDate)return;let r=o()(t.at(-1)?.arrivalDate).format(n.Jv),a=o()(t[0]?.departingDate).format(n.Jv);d.TQ.forEach(({value:e})=>{l(r,o()(r).add(e,"days").format(n.Jv),a)})}),t.forEach(e=>{if(!e.flightGroup.flights[0]?.departingDate||!e.flightGroup.flights.at(-1)?.arrivalDate)return;let t=o()(e.flightGroup.flights.at(-1)?.arrivalDate).format(n.Jv),r=o()(e.flightGroup.flights[0]?.departingDate).format(n.Jv);d.TQ.forEach(({value:e})=>{let a=o()(r).subtract(e,"days").format(n.Jv);l(a,r,a,t,"depart")})});let s={},f=new Map;a.forEach(e=>{let t=o()(e.departureDate),r=t.format(n.eM);s[r]||(s[r]=[]),s[r].push(e);let a=t.startOf("month").valueOf(),i=f.get(r);(void 0===i||a<i)&&f.set(r,a)}),Object.keys(s).forEach(e=>{s[e].sort((e,t)=>{let r=o()(e.departureDate).valueOf()-o()(t.departureDate).valueOf();return 0!==r?r:o()(e.returnDate).valueOf()-o()(t.returnDate).valueOf()})});let c=Array.from(f.entries()).sort(([,e],[,t])=>e-t).map(([e])=>e),u={};return c.forEach(e=>{u[e]=s[e]}),u},[m,P?.fares])}}r.d(t,{A:()=>g})},236567(e,t,r){r(218111),r(22489),r(430531),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);var a=r(610377),i=r(964050);let l=["economy","premium","business"],o=["economy","lux_row","premium","business"];function n(e){return e?o:l}function s(e){return o.filter(t=>e.includes(t)).flatMap(e=>{let t=a._m[e];return t?[e,t]:[e]})}function f(e){let t=new Set(e);return s([...i.U2]).filter(e=>t.has(e))}r.d(t,{IE:()=>f,Vp:()=>s,hX:()=>n},{lg:l,uc:o})}}]); 2//# sourceMappingURL=8518.b0ac0fac3e3479a0.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.