PageSourceSearch

https://static-js.treatme.co.nz/en-AU/4997.50976802285c25c1.js

js treatme.co.nz collected 2026-10-04 20:26:59 UTC 12,022 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 a=arguments[t];if(null!=a)for(var i in a)a.hasOwnProperty(i)&&(e[i]=a[i])}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]="cf68698c-036e-4eeb-8858-bbbb75597992",e._sentryDebugIdIdentifier="sentry-dbid-cf68698c-036e-4eeb-8858-bbbb75597992")}catch(e){}}();"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4997],{498232(e,t,a){a(218111),a(720116),a(13579),a(971517),a(11379),a(693777),a(614190),a(512359),a(886097),a(627254),a(707036),a(17273),a(227415),a(819929),a(837583),a(455122),a(720230),a(357268),a(679733),a(607588),a(161701),a(22489);var i=a(474848),n=a(296540),r=a(665673),s=a(423946),l=a(596261),o=a(671468),d=a(393291),c=a(309695),u=a(750142),p=a(623991),m=a(677529),f=a(98019);let h=[];function g({option:e,pills:t,selected:a,onSelect:r}){return t?(0,i.jsx)(c.A,{size:"small",startIcon:(0,n.isValidElement)(e.icon)?e.icon:void 0,selected:a,"data-selectionid":e.text,onClick:r,children:e.text}):(0,i.jsx)(d.A,{kind:"primary",orientation:"vertical",startIcon:e.icon,title:e.text,isSelected:a,"data-selectionid":e.text,onClick:r})}let b=(0,o.Ng)((e,t)=>{let a=(0,f.A)(t.filters);return{availableFilters:e.offer.offerListFilterOptions[a]}})(function(e){let t=(0,r.A)(),a=(0,n.useMemo)(()=>({[t.formatMessage({id:"8hLfe9wCAvTCXmRh1ADt",defaultMessage:"Best Value",description:"Filter tab label for sorting by best value in the filters panel"})]:{sortParam:"value",iconSlug:"best_value"}}),[t]),o=(0,n.useMemo)(()=>({[t.formatMessage({id:"InjFy_ekR3r6QMbHDI-5",defaultMessage:"Private Pool",description:"Filter tab label for private pool amenity in the filters panel"})]:"private_pool",[t.formatMessage({id:"7Q4FswWNFJlJdsp9m11X",defaultMessage:"Ocean Views",description:"Filter tab label for ocean views amenity in the filters panel"})]:"ocean_views"}),[t]),d=t.formatMessage({id:"XO57KZ6rtUkIFUyme0qQ",defaultMessage:"All",description:"Filter tab label for showing all results in the filters panel"}),{filters:c,availableFilters:f,search:b,excludedOptions:y=h,pills:w=!1}=e,[v,x]=(0,n.useState)(()=>{if(c.holidayTypes?.[0]){let e=c.holidayTypes[0],t=f?.filters?.holidayTypes?.find(t=>t.slug===e);return t?.label??e}return c.amenities?.[0]&&Object.values(o).includes(c.amenities[0])?Object.keys(o).find(e=>o[e]===c.amenities[0])??d:c.sortBy&&Object.values(a).some(e=>e.sortParam===c.sortBy)?Object.keys(a).find(e=>a[e].sortParam===c.sortBy)??d:d}),[A,k]=(0,n.useState)(null),S=(0,n.useRef)(null),E=(0,n.useMemo)(()=>{let e=new Map;return A?.filters?.holidayTypes?.forEach(t=>{e.set(t.label,t.slug)}),e},[A?.filters?.holidayTypes]);(0,n.useEffect)(()=>{void 0!==f&&k(f)},[f]);let j=(0,u.jL)(),D=(0,n.useCallback)(e=>{let t=String(e.currentTarget.dataset.selectionid);if(v===t||t===d)x(d),j((0,p.HC)({search:(0,m._6)(b,"holidayTypes","amenities","sortBy","limit")}));else if(Object.keys(a).includes(t))x(t),j((0,p.HC)({search:(0,m.hT)(b,[{paramName:"holidayTypes",paramValue:void 0},{paramName:"amenities",paramValue:void 0},{paramName:"sortBy",paramValue:a[t].sortParam},{paramName:"limit",paramValue:void 0}])}));else if(Object.keys(o).includes(t))x(t),j((0,p.HC)({search:(0,m.hT)(b,[{paramName:"holidayTypes",paramValue:void 0},{paramName:"amenities",paramValue:o[t]},{paramName:"sortBy",paramValue:void 0},{paramName:"limit",paramValue:void 0}])}));else{x(t);let e=E.get(t)??t;j((0,p.HC)({search:(0,m.hT)(b,[{paramName:"holidayTypes",paramValue:e},{paramName:"amenities",paramValue:void 0},{paramName:"sortBy",paramValue:void 0},{paramName:"limit",paramValue:void 0}])}))}},[v,j,b,d,a,o,E]),C=A?.filters?.holidayTypes,M=(0,l.g5)(C,A?.filterOrder?.holidayTypes,30);if(!M)return null;let _=[...Object.entries(o).map(([e,t])=>[t,100,10,e]),...Object.entries(a).map(([e,{iconSlug:t}])=>[t,100,10,e])],L=[...M.slice(0,6),..._,...M.slice(6)].map(([e,,,t])=>({icon:(0,l.a)(e),text:t,id:`${e}-theme`})),O=[{icon:l.jS.all,text:d,id:"All-theme"}].concat(L).filter(e=>!y.includes(e.text));S.current||(S.current=O.map(e=>e.text));let T=(e,t)=>
1{let a=S.current?.indexOf(e.text)??-1;return -1===a?O.length+t:a},N=[...O].sort((e,t)=>T(e,O.indexOf(e))-T(t,O.indexOf(t)));return(0,i.jsx)(s.A,{gap:8*!!w,children:N.map(e=>(0,i.jsx)(g,{option:e,pills:w,selected:v===e.text,onSelect:D},e.id))})});a.d(t,{},{A:b})},226132(e,t,a){var i=a(474848),n=a(296540),r=a(38267),s=a(731357),l=a(634164),o=a(640455),d=a(145943),c=a(983741),u=a(160251),p=a(651115),m=a(185692),f=a(194617),h=a(771097),g=a(829403),b=a(163995),y=a(276036),w=a(453069),v=a(814888),x=a(134754),A=a(671468),k=a(498232),S=a(677529),E=a(812935),j=a(108902),D=a(314953),C=a(957372),M=a(750142),_=a(850954),L=a(691944);let O=(0,r.Ay)(d.A).withConfig({componentId:"sc-650474f8-0"})(["padding:",";display:none;background-color:",";","{display:block;}&.map-view{","{display:none;}}","{padding:"," ",";}&&.map-redesign{max-width:none;position:relative;padding-inline:"," ",";}&.edit-mode{display:block;}&.nav-redesign:not(.edit-mode){","{display:none;}}"],(0,s.D0)(8),e=>e.theme.palette.neutral.surface.normalBackground,f.em.tablet,f.Hq.tablet,f.em.desktop,(0,s.D0)(16),(0,s.D0)(32),(0,s.D0)(144),(0,s.D0)(12),f.em.tablet),T=(0,r.Ay)(D.A).withConfig({componentId:"sc-650474f8-1"})(["position:absolute;inset-block-start:50%;inset-inline-start:",";transform:translateY(-50%);"],(0,s.D0)(12)),N=r.Ay.div.withConfig({componentId:"sc-650474f8-2"})(["border-top:1px solid ",";margin-top:",";"],e=>e.theme.palette.neutral.surface.lightForeground,(0,s.D0)(8)),F=(0,r.Ay)(d.A).withConfig({componentId:"sc-650474f8-3"})(["padding-block:",";padding-inline:"," 0;border-top:1px solid ",";","{border:none;padding-top:",";padding-bottom:",";}&.no-divider{border-top:none;padding-block:0 ",";","{max-width:none;margin-inline:0;padding-inline-start:",";}","{padding-inline-start:",";}}"],(0,s.D0)(8),(0,s.D0)(16),e=>e.theme.palette.neutral.surface.lightForeground,f.em.tablet,(0,s.D0)(16),(0,s.D0)(16),(0,s.D0)(12),f.em.tablet,(0,s.D0)(20),f.em.desktop,(0,s.D0)(32)),I=(0,r.Ay)(c.A).withConfig({componentId:"sc-650474f8-4"})(["position:sticky;transition:top 1s ease-in-out;z-index:",";&.disableSticky{position:relative;top:auto;transition:none;box-shadow:none;}&.alwaysSticky{top:0;z-index:",";transition:none;}&.offScreen:not(.alwaysSticky):not(.disableSticky){width:100%;top:-50%;&:not(.mapPage){box-shadow:",";}transition:top 1s ease-in-out;}&.lifted:not(.alwaysSticky):not(.disableSticky){top:0;transition:top 0.5s ease-out;z-index:",";&:not(.mapPage){box-shadow:",";}}"],g.A.searchMenu,g.A.stickySubHeader,e=>e.theme.shadow.bottom.small,g.A.stickySubHeader,e=>e.theme.shadow.bottom.small),V=r.Ay.div.withConfig({componentId:"sc-650474f8-5"})(["padding:"," ",";border-top:1px solid ",";border-bottom:1px solid ",";"],(0,s.D0)(8),(0,s.D0)(16),e=>e.theme.palette.neutral.surface.lightForeground,e=>e.theme.palette.neutral.surface.lightForeground),B={display:"none"},P=(0,A.Ng)(e=>({windowSearch:e.router.location.search,pathname:e.router.location.pathname}))(function(e){let t=(0,M.jL)(),a=(0,_.x)(),r=(0,y.A)(),{formRef:s,mapRedesign:d=!1,filters:c,offerListFiltersProps:{searchType:f,switchView:g,sortOptions:A,listFilters:D},windowSearch:P,searchVertical:R,baseSearchPath:H,baseSearchMapPath:z,disableAnywhereFilterTabs:U,showFilters:K=!0,locationSearchPlaceholder:q,typeaheadTypes:J=b.ou,pathname:Q,onFilterChange:W,onSortChange:X,useMapLayout:Y=!1,mapLayoutFilterRow:Z,alwaysSticky:$=!1,disableSticky:G=!1,flat:ee=!1,compactSearchField:et,onPaneHeightChange:ea}=e,{isEditMode:ei,activeMenu:en}=(0,n.useContext)(u.I),er=(0,n.useContext)(u.J),{toggleSearchVertical:es}=(0,w.h)(),el=(0,n.useCallback)(()=>{es(R)},[es,R]),eo=(0,n.useCallback)(()=>{g.goBack?a.goBack():t((0,L.lW)(g.URL))},[t,a,g]),ed=(0,p.A)({tolerance:20}),[ec,eu]=(0,m.Wx)(),ep=(0,n.useMemo)(()=>(0,S.T9)(P),[P]).destinationId===b.e8;(0,n.useEffect)(()=>{ei&&window.scrollTo(0,0)},[ei]),(0,n.useEffect)(()=>{!eu&&ei&&"down"===ed&&er({type:"SET_EDIT_MODE",isEditMode:!1})},[eu,ei,ed,er]);let em=(0,n.useCallback)(()=>{er({type:"SET_EDIT_MODE",isEditMode:!1})},[er]),ef=(0,n.useRef)(null),eh=(0,n.useCallback)(e=>{ef.current=e?.parentElement??null},[]);(0,n.useEffect)(()=>
1{if(!ea)return;let e=ef.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0];t&&ea(t.borderBoxSize?.[0]?.blockSize??t.target.getBoundingClientRect().height)});return t.observe(e),()=>t.disconnect()},[ea]);let eg=!eu&&"up"===ed,eb=!eu&&"up"!==ed,ey=(0,v.xF)("mobile"),ew=(0,v.xF)("tablet"),ev=(0,x.t)(),ex="hotels"===R&&!Q.includes("metasearch")&&ev,eA=!G&&($||ex),ek=!G&&!eA,eS=Q.includes("map"),eE=eS||Y,ej=!!et||ex||ey||eS&&ew,eD="hotels"===R,eC=q??(eD?r.placeholderLabelNaturalLanguage:void 0),eM=eD?r.titleLabelNaturalLanguage:r.titleLabel,e_=(0,i.jsx)(o.A,{submitOnApply:!0,filters:c,ref:s,onSubmit:em,typeaheadTypes:J,switchView:d?void 0:g,baseSearchPath:H,baseSearchMapPath:z,locationSearchPlaceholder:eC,label:eM,showNaturalLanguageSearchSuggestions:eD,useMapLayout:Y}),eL=(0,n.useMemo)(()=>Z?(0,i.jsx)(V,{children:Z}):K?(0,i.jsx)(V,{children:(0,i.jsx)(E.A,{filters:D,onFilterChange:W,onSortChange:X})}):null,[D,Z,W,X,K]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(I,{className:(0,l.A)({disableSticky:G,alwaysSticky:eA,lifted:ek&&(eg||"CLOSED"!==en),offScreen:ek&&eb&&"CLOSED"===en,mapPage:eS}),shadow:ee||eE||ex?void 0:"bottom-small",children:[ea&&(0,i.jsx)("div",{ref:eh,style:B}),ej&&(et?et(el):(0,i.jsx)(j.A,{onEdit:el,filters:D,sortOptions:A,onFilterChange:W,onSortChange:X,showFilters:!eE&&K,isMapView:eS,navRedesign:ex,showBrandAndAccount:ex&&!eS,switchView:g})),eE&&(0,i.jsxs)(i.Fragment,{children:[!ex&&(0,i.jsxs)(O,{as:"div",className:(0,l.A)("map-view",{"map-redesign":d}),children:[d&&"list"===g.view&&(0,i.jsx)(T,{kind:"tertiary",size:"large",onClick:eo,"data-testid":"list-view",startIcon:(0,i.jsx)(C.A,{}),children:g.label}),e_]}),!ex&&!d&&eL]}),!eE&&(0,i.jsx)(O,{className:(0,l.A)({"edit-mode":ei&&eu,"nav-redesign":ex}),children:e_}),!ex&&!ey&&ep&&!eE&&!U&&(0,i.jsx)(N,{children:(0,i.jsx)(F,{children:(0,i.jsx)(k.A,{filters:D,search:P})})}),(d||"property"!==f)&&eS&&(0,i.jsx)(h.A,{filters:D,sortOptions:A,switchView:ey?void 0:g,onFilterChange:W,onSortChange:X}),(ex||ey)&&ep&&!eS&&!U&&(0,i.jsx)(F,{className:"no-divider",children:(0,i.jsx)(k.A,{filters:D,search:P,pills:!0})})]}),(0,i.jsx)("div",{ref:ec})]})});a.d(t,{},{A:P})},651115(e,t,a){var i=a(145120),n=a(296540);a.d(t,{},{A:function(e={}){let{disabled:t,tolerance:a=0}=e,r=(0,n.useRef)(a);(0,n.useEffect)(()=>{r.current=a},[a]);
1let[s,l]=(0,n.useState)("down"),o=(0,n.useRef)("down"),d=(0,n.useRef)(0);return(0,n.useEffect)(()=>{if(!t){let e=()=>{window.requestAnimationFrame(()=>{let e=r.current,t=d.current+e,a=Math.max(0,window.scrollY);a>t?(d.current=a-e,"up"===o.current&&(o.current="down",l("down"))):a<d.current&&(d.current=a,"down"===o.current&&(o.current="up",l("up")))})},t=(0,i.A)(e,300,{leading:!0});return window.addEventListener("scroll",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("scrollend",e,{passive:!0}),()=>{window.removeEventListener("scroll",t),window.removeEventListener("touchmove",t),window.removeEventListener("scrollend",e)}}},[t]),s}})},145120(e,t,a){a.d(t,{},{A:function(e,t,a={}){let i,n,r,s=null,l=0,o=function(){l=a.leading?Date.now():0,s=null,r=e.apply(i,n),s||(i=n=null)};return function(){let d=Date.now();l||a.leading||(l=d);let c=t-(d-l);return i=this,n=arguments,c<=0||c>t?(s&&(window.clearTimeout(s),s=null),l=d,r=e.apply(i,n),s||(i=n=null)):!s&&a.trailing&&(s=window.setTimeout(o,c)),r}}})}}]);
2//# sourceMappingURL=4997.50976802285c25c1.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.