1/*! For license information please see searchFormReviewResults.1bb74d378879fae4fd5c.chunk.js.LICENSE.txt */ 2(globalThis.webpackChunkinvia2020=globalThis.webpackChunkinvia2020||[]).push([[7115],{227(e,t,n){"use strict";n.d(t,{t:()=>r});const r=(e,t)=>{let n=0,r=0;if(Array.isArray(t))for(const e of t)2>=e?n+=1:r+=1;return{adults:e,children:r,infants:n}}},68286(e,t,n){"use strict";n.d(t,{F:()=>o});var r=n(92860),i=n(9725),s=n(38048);let a=function(e){return e[e.default=200]="default",e[e.quick=100]="quick",e}({});const o=e=>{let{clip:t=!0,speed:n=a.default,children:o,show:l}=e;const c=(0,r.useRef)(null);let u="anim-slide-toggle";u+=t?" anim-slide-toggle--clip":"",u+=n===a.default?" anim-slide-toggle--speed-default":"",u+=n===a.quick?" anim-slide-toggle--speed-quick":"";const d=u+" anim-slide-toggle-";return(0,s.jsx)(i.A,{in:l,timeout:n,classNames:d,unmountOnExit:!0,nodeRef:c,children:(0,s.jsx)("div",{className:u,ref:c,children:(0,s.jsx)("div",{className:"anim-slide-toggle__child",children:o})})})}},33671(e,t,n){"use strict";n.d(t,{Av:()=>d,YT:()=>p,qp:()=>u});var r=n(49865),i=n(17272),s=n(92860),a=n(10662),o=n(93426),l=n(34836),c=n(38048);let u=function(e){return e.Default="",e.Large="i-textbox--large",e.XLarge="i-textbox--xlarge",e.Numeric="i-textbox--numeric-spinner",e.NumericWithoutSpinner="i-textbox--numeric-without-spinner",e.NoBorder="i-textbox--no-border",e}({}),d=function(e){return e.Text="text",e.Number="number",e.Email="email",e.Tel="tel",e.Url="url",e.Search="search",e.Range="range",e.Password="password",e}({});const p=(0,s.forwardRef)(((e,t)=>{let{name:n,label:u,labelHidden:p,hasAnotherLabelOutside:h,wrapperId:f,wrapperRef:m,textboxId:g,textboxDescribedby:v,textboxTabIndex:_,textboxEllipsis:b,placeholder:y,value:x,extendedValue:w,disabled:k,readOnly:I,preventMouseFocus:C,autoFocus:A,onChange:E,onFocus:S,onBlur:T,onKeyDown:O,onClick:F,spellCheck:j,autoCorrect:N,autoComplete:D,autoCapitalize:M,required:R,hasError:P,validationMessages:L,icon:U,showDropdownArrow:H,wrapperClass:B="",inputWrapperClass:V="",inputType:z,inputPrepend:$,inputAppend:W,inputGroupPrepend:q,inputGroupAppend:Y,inputGroupAfter:G,inputSpecificProps:K}=e;const J=(0,s.useRef)(g||l.q.getNext()),X=(0,s.useRef)(l.q.getNext()),Q=w&&I,Z=z===d.Range||z===d.Number?0:"",ee=["i-textbox",B||"",H?"i-textbox--dropdown-arrow":"",Q?"i-textbox--extended":""].filter((e=>e)).join(" "),te=["i-textbox__label-text",p?"u-vhide":""].filter((e=>e)).join(" ");return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{id:f,className:ee,ref:e=>m&&m(e),children:[(0,c.jsx)("label",{className:"i-textbox__label",id:X.current,htmlFor:J.current,children:(0,c.jsxs)("span",{className:te,"aria-hidden":h,children:[u,R&&(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsxs)("span",{className:"required",children:[(0,c.jsx)("span",{className:"required__star","aria-hidden":"true",children:"*"}),(0,c.jsx)("span",{className:"u-vhide",children:(0,r.T)("required_field")})]})]})]})}),(0,c.jsx)("div",{className:"i-textbox__input-group-wrapper",children:(0,c.jsxs)("div",{className:"i-textbox__input-outer-wrapper",onClick:F,children:[U&&(0,c.jsx)(o.U,{wrapperClass:"i-textbox__icon",icon:U,width:20,height:20}),(0,c.jsxs)("div",{className:`i-textbox__input-wrapper ${V}`,children:[$,(0,c.jsx)("input",{type:z,className:"i-textbox__input"+(b?" i-textbox__input--ellipsis":""),id:Q?void 0:J.current,name:n,tabIndex:_||(Q?-1:void 0),placeholder:y,value:x,defaultValue:void 0===x?Z:void 0,disabled:k,required:R,readOnly:I,autoFocus:A,onChange:E,onFocus:S,onBlur:T,onKeyDown:O,onMouseDown:e=>{C&&e.preventDefault()},onPointerDown:e=>{C&&e.preventDefault()},spellCheck:j,autoCorrect:N?void 0:"off",autoComplete:D?void 0:"off",autoCapitalize:M?void 0:"none","aria-describedby":v,"aria-invalid":!!P||void 0,ref:t,...K}),Q&&(0,c.jsx)("div",{id:J.current,className:"i-textbox__extended-value",tabIndex:_||0,onKeyDown:O,children:w}),(0,c.jsx)("div",{className:"i-textbox__visual-input",children:H&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"i-textbox__triangle-bg"}),(0,c.jsx)("div",{className:"i-textbox__triangle"}),(0,c.jsx)("div",{className:"i-textbox__triangle-circle"})]})})]}),W&&(0,c.jsx)("div",{className:"i-textbox__input-append",children:W}),q&&(0,c.jsx)("div",{className:"i-textbox__prepend",children:q}),Y&&(0,c.jsx)("div",{className:"i-textbox__append",children:Y})]})}),G&&(0,c.jsx)("div",{className:"i-textbox__after",children:G})]}),!(0,i.Im)(L)&&(0,c.jsx)(a.Q,{message:L,type:"error",modifier:"u-mb-xs"})]})}));p.displayName="BaseTextbox"},68118(e,t,n){"use strict";n.d(t,{et:()=>g,qP:()=>y,fu:()=>w,lt:()=>k});var r=n(87387),i=n(96975),s=n(49865),a=n(94085);const o=[40,14,130,21,17,76,79,16,15,137,127,73,12,68,251,90,71],l=[36,33,22,102,113,108,6,94,85];var c,u,d,p;const h=e=>{if(u(e))return;const t=void 0;return[d.Flexible,d.Exact,d.Custom,d.CustomRange,d.ThreeSeven,d.SevenFourteen,d.FiveEight,d.NineTwelve,d.MoreThanFourteen].includes(e)?e:null};function f(e,t){return p.get(e)?.lengthFrom>t?d.Custom:e}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.SevenFourteen;return u(t)||""===t?f(n,e):t}function g(e,t){return e&&t?Math.abs(e.diff(t,"day"))+1:0}function v(e,t){return 0===e||!u(e)&&t>=e?e:t}const _=(e,t,n,r)=>{const i=g(t,e),s=r??n;switch(s){case d.ThreeSeven:case d.FiveEight:case d.SevenFourteen:case d.NineTwelve:return{lengthFrom:p.get(s)?.lengthFrom,lengthTo:p.get(s)?.lengthTo};case d.CustomRange:return{lengthFrom:p.get(n)?.lengthFrom<=i?p.get(n)?.lengthFrom:i,lengthTo:i};case d.Custom:case d.Exact:return{lengthFrom:i,lengthTo:i};case d.MoreThanFourteen:return{lengthFrom:p.get(s)?.lengthFrom,lengthTo:null};case d.Flexible:default:return{lengthFrom:null,lengthTo:null}}},b=(e,t,n,r,i,s)=>{let a=d.Flexible,o=null;return n=p.get(i)?.lengthFrom??p.get(s)?.lengthFrom??n,r=p.get(i)?.lengthTo??p.get(s)?.lengthTo??r,u(e)||(o=g(e,t),a=m(o,i,s),a===d.Exact&&(n=o,r=o),a!==d.CustomRange&&a!==d.Custom||(n=v(n,o),r=v(r,o)),a===d.MoreThanFourteen&&(r=void 0)),a===d.Flexible&&(n=void 0,r=void 0),a=h(a),{duration:a,dayCount:o,lengthFrom:n,lengthTo:r}},y=e=>{if(!e)return;switch(e){case a.Q6.Exact:case a.Q6.Flexible:case a.Q6.Custom:case a.Q6.CustomRange:return(0,s.T)(a.jt.get(e).lang);case a.Q6.MoreThanFourteen:return(0,s.T)(a.jt.get(e).lang,{days:"14"})}const t=e.substring(0,e.length-5).split("-");return(0,s.T)(a.jt.get(a.Q6.XYDays).lang,{daysFrom:t[0],daysTo:t[1]})},x=(e,t,n)=>{let r=e||c();return t&&n&&!r.isBetween(t,n,"day","[]")&&(r=t),r},w=e=>{const t=e.filter((e=>o.includes(e))).length,n=e.filter((e=>l.includes(e))).length;return t>0&&t===e.length?a.gu.get(a.v5.Exotics):n>0&&n===e.length?a.gu.get(a.v5.Nearby):a.gu.get(a.v5.Others)};function k(e){const{dayCount:t,value:{duration:n,lengthFrom:r,lengthTo:i}}=e,o={};return[a.Q6.Custom,a.Q6.CustomRange].includes(n)&&(r>i&&(o.lengthFrom=(0,s.T)("sf2_from_cant_be_bigger_than_to")),r>t&&(o.lengthFrom=(0,s.T)("sf2_from_cant_be_bigger_than_range")),i>t&&(o.lengthTo=(0,s.T)("sf2_to_cant_be_bigger_than_date_range")),0===r&&(o.lengthFrom=(0,s.T)("sf2_from_cant_be_0")),0===i&&(o.lengthTo=(0,s.T)("sf2_to_cant_be_0"))),o}}
2,37057(e,t,n){"use strict";n.d(t,{D:()=>a});var r=n(92860),i=n(93426),s=n(38048);const a=e=>{const{children:t,headingLevel:n,icon:a,...o}=e;let l;return l=a?(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(i.U,{icon:a})," ",(0,s.jsx)("span",{className:"text",children:t})]}):(0,s.jsx)("span",{className:"text",children:t}),r.createElement("h"+n,o,l)}},29222(e,t,n){"use strict";n.d(t,{D:()=>s,f:()=>a});var r=n(92860),i=n(38048);const s=e=>{let{children:t,modifier:n,notFoundTour:r}=e;const s=["b-tour-term-picker",r?"b-tour-term-picker--not-found":"",n||""].filter((e=>e)).join(" ");return(0,i.jsx)("div",{className:s,children:t})},a=()=>{const e=document.getElementById("js-tour-term-picker-container")?document.getElementById("js-tour-term-picker-container"):document.getElementById("js-tour-term-picker-container-second");e&&setTimeout((()=>{const t=document.querySelector(".m-anchor.is-opened")?document.querySelector(".m-anchor.is-opened").getBoundingClientRect().height:0,n=e.getBoundingClientRect().y+window.scrollY-t-15;window.scrollTo({top:n,behavior:"smooth"})}),10)}},20964(e,t,n){"use strict";n.d(t,{dR:()=>a,kF:()=>r});const r=(e,t)=>e.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e})),i=e=>{if(e)for(;e.length;)e.pop()},s=(e,t)=>{if(!e)return;const n=e.indexOf(t);n>-1&&e.splice(n,1)},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e;if(e<t)return[];const r=[];for(let i=t;i<=e;i++)r.push(n(i));return r}},64538(e,t,n){"use strict";n.d(t,{Wc:()=>d,Wx:()=>f,Yf:()=>u});var r=n(92860),i=n(93426),s=n(12868),a=n(77335),o=n(95853),l=n(94450),c=n(38048);let u=function(e){return e[e.mapPlaceholderDisabled=0]="mapPlaceholderDisabled",e[e.mapPlaceholderEnabled=1]="mapPlaceholderEnabled",e}({}),d=function(e){return e.mapPlaceholderSizeSmall="sm",e}({});const p=e=>{const t=["b-map-placeholder b-bg__extend",e.size?`b-map-placeholder--${e.size}`:""].filter((e=>e)).join(" ");return(0,c.jsx)("div",{className:"f-main-search__map-placeholder",children:(0,c.jsx)("div",{className:"b-bg b-bg--sm u-mb-xs f-main-search__map-placeholder-inner "+(e.status?"":"is-hidden"),children:(0,c.jsx)("div",{className:"b-bg__inner",children:(0,c.jsx)("div",{className:t,children:(0,c.jsx)("div",{className:"b-map-placeholder__inner",children:(0,c.jsxs)("a",{href:"#",onClick:e.onClick,children:[(0,c.jsx)("img",{src:"MISSING_ENV_VAR".STORYBOOK_RUNNING?"invia2020-dist/img/illust/map-placeholder-lg.svg":l.wI.domainId==l.WI.TravelplanetPl?"/assets/invia2020/img/illust/map-placeholder-tp.svg":"/assets/invia2020/img/illust/map-placeholder-lg.svg",alt:"",className:"b-map-placeholder__img"}),(0,c.jsx)("span",{className:"btn btn--minor b-map-placeholder__btn",children:(0,c.jsx)("span",{className:"btn__inner",children:(0,c.jsx)(o.s,{id:"show_map"})})})]})})})})})})},h=e=>(0,c.jsxs)("button",{className:"b-filter-search-bar__button",onClick:e.onClick,children:[(0,c.jsx)(i.U,{wrapperClass:"b-filter-search-bar__button-icon",icon:s.LZ.networkPin,width:20,height:20}),(0,c.jsx)("span",{className:"b-filter-search-bar__button-label",children:(0,c.jsx)(o.s,{id:"map"})})]}),f=e=>(0,a.Kz)()!==a.Ww.Large?(0,c.jsx)(h,{onClick:e.onClick}):(0,c.jsx)(p,{...e})},52397(e,t,n){"use strict";n.d(t,{$S:()=>o,$w:()=>c,IG:()=>u,cX:()=>l,zA:()=>a});var r=n(92860),i=n(37057),s=n(38048);let a=function(e){return e[e.Group=0]="Group",e[e.Radios=1]="Radios",e[e.Tree=2]="Tree",e[e.Textboxes=3]="Textboxes",e[e.Switches=4]="Switches",e[e.Select=5]="Select",e}({});const o=e=>{let t="group",n="b-checkbox-list";return e.controlsListType===a.Radios?t="radiogroup":e.controlsListType===a.Tree?t="list":e.controlsListType===a.Textboxes?n+=" b-checkbox-list--textboxes":e.controlsListType===a.Switches&&(n+=" b-checkbox-list--switches"),(0,s.jsx)("ul",{role:t,className:n,"aria-labelledby":e.labelledBy,children:e.children})},l=e=>{const[t,n]=r.useState(!!e.expanded),[i,o]=r.useState(!e.expanded);r.useEffect((()=>{!t&&e.expanded&&n(!0)}),[t,e.expanded]),r.useEffect((()=>{!i&&!e.expanded&&o(!0)}),[i,e.expanded]);let l="b-checkbox-list__item";l+=e.expanded?" b-checkbox-list__item--expanded":"",l+=e.expanded&&i?" b-checkbox-list__item--anim-expand":"",l+=!e.expanded&&t?" b-checkbox-list__item--collapsed":"";let c="presentation";return e.type===a.Tree&&(c="listitem"),(0,s.jsx)("li",{role:c,className:l,children:e.children})},c=e=>(0,s.jsxs)("button",{type:"button",className:"b-checkbox-list__toggle","aria-describedby":e.describedBySR,"aria-expanded":e.expanded,onClick:e.onClick,children:[(0,s.jsx)("span",{className:"u-vhide",children:e.labelSR}),(0,s.jsx)("span",{className:"b-checkbox-list__toggle-arrow"})]}),u=e=>{const{children:t,label:n,labelId:r,labelHidden:a,headingLevel:o,cssWrapper:l,...c}=e;
2let u="b-checkbox-list-group";return u+=l?" "+l:"",(0,s.jsxs)("fieldset",{className:u,"aria-labelledby":r,...c,children:[(0,s.jsx)(i.D,{id:r,headingLevel:o,icon:"earth",className:"b-checkbox-list-group__heading"+(a?" u-vhide":""),children:n}),t]})}},13256(e,t,n){"use strict";n.d(t,{a:()=>s});var r=n(92860),i=n(38048);const s=e=>{let{label:t,href:n,onClick:r,modifier:s,append:a,extra:o}=e;const l=["destination-option link-mask",s||""].filter((e=>e)).join(" "),c=n?"a":"button";return(0,i.jsxs)("div",{className:l,children:[(0,i.jsx)(c,{className:"destination-option__link link-mask__link",href:n,onClick:r,children:(0,i.jsx)("div",{className:"destination-option__label",children:t})}),a&&(0,i.jsx)("div",{className:"destination-option__append link-mask__unmask",children:a}),o&&(0,i.jsx)("div",{className:"destination-option__extra",children:o})]})}},85055(e,t,n){"use strict";n.d(t,{jq:()=>C,fU:()=>I,M8:()=>A});var r=n(87387),i=n(92860),s=n(93426),a=n(12868),o=n(34836),l=n(219),c=n(82067),u=n(33671),d=n(10918),p=n(30140),h=n(95853),f=n(49865),m=n(17272),g=n(77335),v=n(34119),_=n(38048);const b=e=>{let{isLoading:t,notFound:n,isMobile:r,isReviewsForm:i,destinationsMatchesCountSR:s,children:a}=e,o="b-destinations";return o+=n?" b-destinations--not-found":" b-destinations--picker",o+=r?" b-destinations--mobile":" b-destinations--desktop",o+=t?" b-destinations--loading":" b-destinations--loaded",o+=i?" b-destinations--reviews":"",(0,_.jsxs)("div",{className:o,"aria-busy":t,"data-testid":"sf-destination-picker-popup-content",children:[(0,_.jsx)("p",{className:"u-vhide","aria-live":"polite",children:s>0&&(0,_.jsx)("span",{children:(0,_.jsx)(h.s,{id:"matching_destinations_v2",values:{count:s}})},s)}),a]},"content-wrapper")},y=e=>{let{notFoundTextHeading:t,notFoundTextBody:n,notFoundTopCountries:r,notFoundOnClick:s}=e;const a=(0,i.useMemo)((()=>o.q.getNext()),[]);return(0,_.jsxs)(i.Fragment,{children:[(0,_.jsxs)("div",{className:"b-destinations__message",children:[(0,_.jsx)("p",{className:"b-destinations__heading",children:t}),n]},"content-not-found-message"),r?.length>0&&(0,_.jsxs)("div",{className:"b-destinations__top-countries",children:[(0,_.jsxs)("h3",{id:a,className:"b-destinations__heading",children:[(0,_.jsx)(h.s,{id:"top_countries"}),":"]}),(0,_.jsx)("ul",{className:"b-destinations__top-countries-list","aria-labelledby":a,children:r.map((e=>(0,_.jsx)("li",{className:"b-destinations__top-country-list-item",children:(0,_.jsx)("a",{href:"#",className:"b-destinations__link",onClick:t=>{t.preventDefault(),s(e)},children:e})},e)))})]},"content-not-found-destinations")]})},x=()=>(0,_.jsxs)("div",{className:"b-checkbox-list-group-placeholder",children:[(0,_.jsx)("div",{className:"b-checkbox-list-group-placeholder__heading"}),[...Array(20).keys()].map((e=>(0,_.jsx)("div",{className:"b-checkbox-list-group-placeholder__checkbox"},e)))]},"tree-placeholder"),w=e=>{let{isMobileSelectedDestinationsExpanded:t,showContent:n,destinationsTreeVirtualized:r,getSelectedDestinations:s,children:a}=e;return(0,_.jsxs)(i.Fragment,{children:[s(),!t&&(0,_.jsx)("div",{className:"b-destinations__tree"+(r&&n?" b-destinations__tree--virtualized":""),children:n?a:(0,_.jsx)(x,{})})]})};var k=n(29222);let I=function(e){return e[e.Closed=0]="Closed",e[e.Edit=1]="Edit",e[e.Delete=2]="Delete",e}({});const C=e=>{let{inputIconName:t=a.LZ.marker,...n}=e;const[r,x]=(0,i.useState)(),C=(0,i.useRef)(),E=(0,i.useRef)(o.q.getNext()),S=(0,i.useRef)(o.q.getNext()),T=(0,i.useRef)(o.q.getNext()),O=(0,i.useRef)(o.q.getNext()),F=(0,i.useRef)(o.q.getNext()),j=o.q.getNext(),N=(0,i.useRef)([]),D=(0,i.useCallback)((e=>{n.isMobile||(A(),(0,k.f)()),n.onPopupStateChange(I.Edit),e.preventDefault()}),[n]);(0,i.useEffect)((()=>(C.current.addEventListener("click",D),()=>{C.current&&C.current.removeEventListener("click",D)})),[D]);const M=(0,i.useCallback)((()=>{N.current.length>0&&N.current[N.current.length-1].focus()}),[]);(0,i.useEffect)((()=>{n.popupState===I.Delete&&M()}),[M,n.popupState]);const R=(0,i.useMemo)((()=>n.searchFormType===d.Y.Homepage&&n.viewportWidthSize!==g.Ww.Small?c.C.XLarge:c.C.Large),[n.searchFormType,n.viewportWidthSize]),P=()=>(0,_.jsx)(c.o,{type:u.Av.Text,size:R,name:j,label:(0,f.T)("sf2_search_for_destinations"),labelHidden:!0,value:n.searchValue,placeholder:n.searchBoxPlaceholder,onChange:e=>n.searchOnChange(e),onFocus:e=>{n.searchOnFocus&&n.searchOnFocus(e)},icon:t,wrapperId:T.current,textboxId:O.current,"data-testid":"sf-destination-picker-popup-search-textbox"}),L=()=>{const e=n.selectedDestinationsTags.props.tags&&n.selectedDestinationsTags.props.tags.length,t={type:p.L3.De
2stinations,labelledBy:F.current,tabIndex:-1,cssWrapper:"",tagRemoveRef:e=>N.current=e,onLastTagRemoved:()=>document.getElementById(O.current).focus()};return n.isMobile?(0,_.jsxs)(i.Fragment,{children:[e>0&&(0,_.jsx)("div",{className:"b-destinations__bar-selected",children:(0,_.jsxs)("button",{type:"button",className:"b-destinations__toggle-selected-button","aria-expanded":n.mobileSelectedDestinationsExpanded,onClick:n.mobileToggleSelectedDestinationsOnClick,"data-testid":"sf-destination-picker-popup-tags-toggle-button",children:[(0,_.jsx)(h.s,{id:"chosen_destinations_count_v2",values:{count:e}}),(0,_.jsx)(s.U,{wrapperClass:"b-destinations__toggle-selected-icon",icon:n.mobileSelectedDestinationsExpanded?a.LZ.chevronUp:a.LZ.chevronDown,width:14,height:14})]})}),n.mobileSelectedDestinationsExpanded&&e>0&&(0,_.jsx)("div",{className:"b-destinations__selected","data-testid":"sf-destination-picker-popup-tags",children:i.cloneElement(n.selectedDestinationsTags,t)})]}):(0,_.jsx)(i.Fragment,{children:e>0&&(0,_.jsxs)("div",{className:"b-destinations__selected","data-testid":"sf-destination-picker-popup-tags",children:[(0,_.jsx)("h3",{id:F.current,hidden:!0,children:(0,_.jsx)(h.s,{id:"sf2_chosen_destinations"})}),i.cloneElement(n.selectedDestinationsTags,t)]})})},U=e=>{[a.cK.backspace,a.cK.delete].includes(e.keyCode)&&(n.onPopupStateChange(I.Delete),e.preventDefault()),![...a.cK.alphanumeric,a.cK.spacebar,a.cK.enter,a.cK.arrowDown].includes(e.keyCode)||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||(n.onPopupStateChange(I.Edit),e.preventDefault())},H={size:R,labelHidden:!0,onKeyDown:e=>U(e),icon:t,wrapperRef:e=>C.current=e,textboxId:E.current,textboxDescribedby:S.current,textboxEllipsis:!0,readOnly:!0,preventMouseFocus:!0},B=n.popupState===I.Edit||n.popupState===I.Delete;return(0,_.jsxs)(i.Fragment,{children:[i.cloneElement(n.inputDestination,H),(0,_.jsx)("p",{id:S.current,hidden:!0,children:(0,_.jsx)(h.s,{id:"sf2_destination_picker_input_opener_desc"})}),(0,_.jsx)(l.s,{show:B,label:n.label,isMobile:n.isMobile||n.searchFormType===d.Y.IFrameFilter,isHomepage:n.searchFormType===d.Y.Homepage,displayAsModal:n.displayAsModal,formattedContent:!0,fixedTopContent:P(),onClickOutside:n.onClickOutside,onEscPress:n.onEscPress,onDesktopClose:n.onDesktopClose,onMobileGoBack:n.onMobileGoBack,primaryActionlabel:n.isReviewsForm?void 0:(0,f.T)("sf2_confirm"),primaryActionOnClick:n.onSubmit,primaryActionTestId:"sf-destination-picker-popup-save-button",secondaryActionComponent:n.isReviewsForm?void 0:(0,_.jsxs)("div",{className:"sf-popup__div-inline-to-left",children:[n.onSelectAll&&(0,m.Im)(n.searchValue)&&(0,_.jsx)(v.$n,{modifier:"sf-popup__button-secondary right-distance",variant:"link",onClick:n.onSelectAll,children:(0,_.jsx)(h.s,{id:"sf2_select_all_checkboxes"})}),(0,_.jsx)(v.$n,{modifier:"sf-popup__button-secondary right-distance",variant:"link",onClick:n.onReset,children:(0,_.jsx)(h.s,{id:"sf2_reset_to_defaults"})})]}),openerSelector:"#"+E.current,openerElement:C.current,matchPositionToChildSelector:"#"+T.current,matchInnerMinWidthToOpener:!0,matchHeightToViewport:!0,autofocusChildSelector:n.isMobile?"":"#"+O.current,onTransitionEntered:()=>x(!0),onTransitionExited:()=>x(!1),children:(0,_.jsx)(b,{isLoading:n.isLoading||!r,notFound:n.notFound,isMobile:n.isMobile,isReviewsForm:n.isReviewsForm,destinationsMatchesCountSR:n.destinationsMatchesCountSR,children:n.notFound?(0,_.jsx)(y,{notFoundTextHeading:n.notFoundTextHeading,notFoundTextBody:n.notFoundTextBody,notFoundTopCountries:n.notFoundTopCountries,notFoundOnClick:n.notFoundOnClick}):(0,_.jsx)(w,{isMobileSelectedDestinationsExpanded:n.isMobile&&n.mobileSelectedDestinationsExpanded,showContent:!(n.isLoading||!r),destinationsTreeVirtualized:n.destinationsTreeVirtualized,getSelectedDestinations:L,children:n.destinationsTree})})})]})},A=()=>{const e=document.getElementById("js-main-search-form-container");e&&setTimeout((()=>{const t=document.querySelector(".m-anchor.is-opened")?document.querySelector(".m-anchor.is-opened").getBoundingClientRect().height:0,n=e.getBoundingClientRect().y+window.scrollY-t-15;window.scrollTo({top:n,behavior:"smooth"})}),10)}},33538(e,t,n){"use strict";n.d(t,{E:()=>c});var r=n(92860),i=n(37057),s=n(64060),a=n(68286),o=n(5419),l=n(38048);const c=e=>{const t=()=>(0,l.jsxs)(r.Fragment,{children:[(0,l.jsxs)("span",{id:e.labelId,children:[e.label," "]}),e.tooltipText&&(0,l.jsxs)(o.m,{children:[(0,l.jsx)(o.m.Target,{}),(0,l.jsx)(o.m.Content,{children:e.tooltipText})]}),(0,l.jsx)(u,{notificationsCount:e.notificationsCount,notificationsSRLabel:e.notificationsSRLabel,notificationsId:e.notificationsId})]});return(0,l.jsxs)("div",{role:"group",className:"b-group-toggle"+(e.n
2otificationsCount>0?" b-group-toggle--highlight":""),"aria-labelledby":e.labelId,"aria-describedby":e.notificationsId,children:[(0,l.jsxs)(i.D,{headingLevel:e.headingLevel,className:"b-group-toggle__legend",children:[e.isExpandable&&(0,l.jsxs)("button",{type:"button",className:"b-group-toggle__legend-toggle",onClick:t=>e.onToggle(t),"aria-expanded":e.isExpanded,children:[t(),(0,l.jsx)("span",{className:"b-group-toggle__legend-toggle-arrow"})]}),!e.isExpandable&&(0,l.jsx)("span",{className:"b-group-toggle__legend-text",children:t()})]}),(0,l.jsx)(a.F,{show:e.isExpanded,clip:!1,children:(0,l.jsx)("div",{className:"b-group-toggle__content",children:e.children})})]})},u=e=>!e.notificationsCount||e.notificationsCount<1?null:(e.notificationsSRLabel||(0,s.OP)("A11Y: notificationsSRLabel must be also provided together with notificationsCount prop"),(0,l.jsxs)("span",{id:e.notificationsId,className:"b-group-toggle__bubble",children:[(0,l.jsxs)("span",{className:"u-vhide",children:[" (",e.notificationsSRLabel,": "]}),(0,l.jsx)("span",{children:e.notificationsCount}),(0,l.jsx)("span",{className:"u-vhide",children:")"})]}))},48153(e,t,n){"use strict";n.d(t,{x:()=>l});var r=n(92860),i=n(9725),s=n(5738),a=n(38048);const o=r.lazy((()=>Promise.all([n.e(8443),n.e(3496)]).then(n.bind(n,33496)))),l=e=>{let{show:t=!0,...n}=e;const l=(0,r.useRef)(null);return(0,a.jsx)(i.A,{in:t,timeout:200,classNames:"sf-popup-",unmountOnExit:!0,nodeRef:l,onEnter:n.onTransitionEnter,onEntering:n.onTransitionEntering,onEntered:n.onTransitionEntered,onExit:n.onTransitionExit,onExiting:n.onTransitionExiting,onExited:n.onTransitionExited,children:(0,a.jsx)("div",{ref:l,children:(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(s.a,{isBlocking:!0,isWholePage:!0}),children:(0,a.jsx)(o,{show:t,...n})})})})}},58691(e,t,n){"use strict";n.d(t,{D:()=>u,_:()=>c});var r=n(92860),i=n(93426),s=n(12868),a=n(95853),o=n(38048);const l=e=>e.href?(0,o.jsx)("a",{...e}):(0,o.jsx)("button",{type:"button",...e}),c=e=>{const t=()=>(0,o.jsxs)(l,{href:e.prevLinkHref,className:"pagination__link pagination__link--prev",onClick:t=>e.onPrevClick&&e.onPrevClick(t),disabled:!e.onPrevClick,"data-controller":"gtm","data-action":"gtm#click","data-gtm_action_params":e.gtm,"data-gtm_cee_gan_click":JSON.stringify({eventLabel:"prev"}),children:[(0,o.jsxs)("span",{className:"pagination__label",children:[(0,o.jsx)(a.s,{id:"sf2_pagination_prev"}),(0,o.jsxs)("span",{className:"u-vhide",children:[" ",(0,o.jsx)(a.s,{id:"js:page"})]})]}),(0,o.jsx)(i.U,{wrapperClass:"pagination__icon",icon:s.LZ.chevronLeft,width:20,height:20})]}),n=()=>(0,o.jsxs)(l,{href:e.nextLinkHref,className:"pagination__link pagination__link--next",onClick:t=>e.onNextClick&&e.onNextClick(t),disabled:!e.onNextClick,"data-controller":"gtm","data-action":"gtm#click","data-gtm_action_params":e.gtm,"data-gtm_cee_gan_click":JSON.stringify({eventLabel:"next"}),children:[(0,o.jsxs)("span",{className:"pagination__label",children:[(0,o.jsx)(a.s,{id:"sf2_pagination_next"}),(0,o.jsxs)("span",{className:"u-vhide",children:[" ",(0,o.jsx)(a.s,{id:"js:page"})]})]}),(0,o.jsx)(i.U,{wrapperClass:"pagination__icon",icon:s.LZ.chevronRight,width:20,height:20})]}),r="pagination u-mb-md";return(0,o.jsxs)("nav",{role:"navigation",className:r,"aria-labelledby":e.labelId,children:[(0,o.jsx)("p",{id:e.labelId,hidden:!0,children:(0,o.jsx)(a.s,{id:"sf2_pagination"})}),(0,o.jsxs)("div",{className:"pagination__wrap",children:[e.onNextClick&&n(),e.onPrevClick&&t(),(0,o.jsx)("ul",{className:"pagination__list",children:e.children})]})]})},u=e=>e.isCurrent?(0,o.jsx)("li",{className:"pagination__item","aria-current":"page",children:(0,o.jsxs)("span",{className:"pagination__current",children:[(0,o.jsxs)("span",{className:"u-vhide",children:[(0,o.jsx)(a.s,{id:"js:page"})," "]}),e.pageNumber]})}):e.isSeparator?(0,o.jsx)("li",{className:"pagination__item pagination__separator",children:"â¦"}):(0,o.jsx)("li",{className:"pagination__item",children:(0,o.jsxs)(l,{href:e.linkHref,className:"pagination__link",onClick:t=>e.onClick&&e.onClick(t),"data-controller":"gtm","data-action":"gtm#click","data-gtm_action_params":e.gtm,"data-gtm_cee_gan_click":JSON.stringify({eventLabel:e.pageNumber}),children:[(0,o.jsxs)("span",{className:"u-vhide",children:[(0,o.jsx)(a.s,{id:"js:page"})," "]}),e.pageNumber]})})},219(e,t,n){"use strict";n.d(t,{s:()=>I});var r=n(92860),i=n(9725),s=n(48153),a=n(5738),o=n(99788),l=n(51882),c=n(12868),u=n(34836),d=n(41329),p=n(93426),h=n(55008),f=n(83138),m=n(95053),g=n(87387);const v=["mousedown","touchstart"];function _(e,t,n){const i=(0,r.useRef)(null),s=t||v;return(0,r.useEffect)((()=>{const t=t=>{const{target:r}=t??{};if(Array.isArray(n)){const i=!document.body.contains(r)&&"HTML"!==r.tagName,s=void 0;n.every((e=>!!e&&!t.composedPath().includes(e)))&&!i&&e()}else i.current&&!i.current.contains(r)&&e()};
2return s.forEach((e=>document.addEventListener(e,t))),()=>{s.forEach((e=>document.removeEventListener(e,t)))}}),[i,e,n]),i}var b=n(95853),y=n(34119),x=n(38048);const w=void 0,k=e=>{let{isMobile:t,openerSelector:n,autofocusChildSelector:i,autofocusFirstFocusableElement:s,...a}=e;const g=(0,r.useRef)(),v=(0,r.useRef)(),w=(0,r.useRef)(),k=(0,r.useRef)(),I=(0,r.useRef)(),C=(0,r.useRef)(),A=u.q.getNext(),E=(0,r.useRef)(),S=10,T=(0,r.useCallback)(((e,t)=>{if(!a.matchHeightToViewport&&!a.matchMaxHeightToViewport)return;const n=document.documentElement.clientHeight,r=I.current&&e||0,i=Math.min(n-20,n-(t+r)-S),s=a.matchMaxHeightToViewport?"max-height":"height";g.current.style.setProperty(s,i+"px")}),[a.matchHeightToViewport,a.matchMaxHeightToViewport]),O=(0,r.useCallback)((e=>{a.matchInnerMinWidthToOpener&&w.current&&w.current.style.setProperty("min-width",e+"px")}),[a.matchInnerMinWidthToOpener]),F=(0,r.useCallback)(((e,t,n,r,i,s,a)=>{const o=document.documentElement.clientWidth;let l=0,c=0;I.current&&(l=e,c=t);let u=a?n+l:n+window.scrollX+l;const d=a?r+c:r+window.scrollY+c;u+s>o-S&&(u=o-s-S),n>o-n-i&&(I.current&&(l=-(I.current.offsetLeft+I.current.offsetWidth)),u=a?n+i+l:n+i+window.scrollX+l),u<S&&(u=S),g.current.style.setProperty("left",u+"px"),g.current.style.setProperty("top",d+"px"),g.current.style.removeProperty("visibility")}),[]),j=(0,r.useCallback)((()=>{if(!g.current||!v.current)return;if(I.current||(I.current=document.querySelector(a.matchPositionToChildSelector)),a.matchPositionToChildSelector&&!I.current)return;const e=a.openerElement?a.openerElement.getBoundingClientRect():v.current.getBoundingClientRect(),t=a.openerElement?a.openerElement.getBoundingClientRect().top-v.current.getBoundingClientRect().top:0,n=v.current?.closest(".modal__wrap"),r=n?a.openerElement.getBoundingClientRect().left-n.getBoundingClientRect().left:e.left,i=n?a.openerElement.getBoundingClientRect().top-n.getBoundingClientRect().top:e.top-t,s=e.width,o=g.current.getBoundingClientRect(),l=I.current.getBoundingClientRect(),c=o.left-l.left,u=o.top-l.top,d=g.current.offsetWidth;T(u,i),O(s),F(c,u,r,i,s,d,n)}),[T,O,F,a.matchPositionToChildSelector,a.openerElement]),N=(0,r.useCallback)((()=>{g.current.style.setProperty("left",""),g.current.style.setProperty("top",""),g.current.style.setProperty("height",""),g.current.style.setProperty("max-width",""),g.current.style.removeProperty("visibility"),w.current&&w.current.style.setProperty("min-width","")}),[]),D=(0,r.useCallback)((()=>{t?N():g.current&&j()}),[t,j,N]),M=(0,r.useMemo)((()=>(0,o.A)((()=>{E.current&&cancelAnimationFrame(E.current),E.current=requestAnimationFrame((()=>D()))}),20)),[D]);(0,r.useEffect)((()=>(v.current=document.querySelector(n)||document.activeElement,window.addEventListener("resize",M),window.addEventListener("orientationchange",M),window.addEventListener("scroll",M),()=>{window.removeEventListener("resize",M),window.removeEventListener("orientationchange",M),window.removeEventListener("scroll",M)})),[M,n]);const R=(0,r.useCallback)((e=>{setTimeout((()=>{D(),e.style.setProperty("max-width",`${e.offsetWidth}px`)}),0)}),[D]),P=(0,r.useCallback)((e=>{g.current=e,e&&R(e)}),[R]),L=_(a.onClickOutside),U=(0,f.r)(a.show,{initialFocus:a.focusTrapInitialFocus??!0}),H=(0,m.pc)(P,U,L);(0,h.V)(g,n,{autofocusChildSelector:i,autofocusFirstFocusableElement:s,contentRef:s?k:void 0});const B=a.labelId||A,V=(0,l.A)("sf-popup","sf-popup--popup",a.cssWrapper,{"sf-popup--hp":a.isHomepage,"sf-popup--of":a.isOrderForm,"sf-popup--tp":a.isTermPicker}),z=(0,l.A)("sf-popup__window",{"disable_max-height":!a.matchHeightToViewport&&!a.matchMaxHeightToViewport,"sf-popup__window--match-height":a.matchHeightToViewport,"sf-popup__window--match-max-height":a.matchMaxHeightToViewport}),$=(0,l.A)("sf-popup__content",{"sf-popup__content--formatted":a.formattedContent}),W=(0,r.useMemo)((()=>({className:V,"data-testid":a.testId,role:"dialog","aria-labelledby":B,"aria-modal":!0,tabIndex:-1})),[V,a.testId,B]);return(0,x.jsx)(d.F,{onEscPress:a.onEscPress,documentInert:!0,documentUnscrollable:t,openerSelector:n,containerProps:W,disableScrollBodyLock:!0,children:(0,x.jsxs)("div",{ref:H,className:z,tabIndex:-1,style:{visibility:"hidden"},children:[(0,x.jsxs)("div",{className:"sf-popup__top-bar",children:[(0,x.jsxs)("button",{type:"button",className:"sf-popup__top-bar-close",onClick:()=>t?a.onMobileGoBack():a.onDesktopClose(),children:[(0,x.jsx)(p.U,{wrapperClass:"sf-popup__top-bar-close-icon",icon:t?c.LZ.pointerLeft:c.LZ.cross,width:20,height:20}),(0,x.jsx)("span",{className:"sf-popup__top-bar-close-label",children:(0,x.jsx)(b.s,{id:"close"})})]}),(0,x.jsx)("h2",{id:B,className:"sf-popup__top-bar-heading",children:a.label})]}),a.fixedTopContent&&(0,x.jsx)("div",{className:"sf-popup__fixed-top",ref:w,children:a.fixedTopContent}),a.children&&(0,x.jsx)("div",{className:$,tabIndex:a.focusableContent?-1:null,ref:k,children:"function"==typeof a.children?a.children():a.children}),a.fixedBottomContent&&(0,x.jsx)("div",{className:"sf-popup__fixed-bottom",ref:C,children:a.fixedBottomContent}),(0,x.jsxs)("div",{className:"sf-popup__actions",children:[a.primaryActionlabel&&(0,x.jsx)(y.$n,{modifier:"sf-popup__button-primary",onClick:a.primaryActionOnClick,"data-testid":a.primaryActionTestId,disabled:a.primaryActionButtonIsDisabled,isDisabled:a.primaryActionButtonIsDisabled,children:a.primaryActionlabel}),a.secondaryActionlabel&&a.secondaryActionOnClick&&(0,x.jsx)(y.$n,{modifier:"sf-popup__button-secondary",variant:"link",onClick:a.secondaryActionOnClick,"data-testid":a.secondaryActionTestId,children:a.secondaryActionlabel}),a.secondaryActionComponent]})]})})},I=e=>{let{show:t=!0,...n}=e;const o=(0,r.useRef)(null);return!n.isMobile&&n.displayAsModal?(0,x.jsx)(s.x,{hasOverlay:!0,keepHeight:!0,show:t,...n}):(0,x.jsx)(i.A,{in:t,timeout:200,classNames:"sf-popup-",unmountOnExit:!0,nodeRef:o,onEnter:n.onTransitionEnter,onEntering:n.onTransitionEntering,onEntered:n.onTransitionEntered,onExit:n.onTransitionExit,onExiting:n.onTransitionExiting,onExited:n.onTransitionExited,children:(0,x.jsx)("div",{ref:o,children:(0,x.jsx)(r.Suspense,{fallback:(0,x.jsx)(a.a,{isBlocking:!0,isWholePage:!0}),children:(0,x.jsx)(k,{show:t,...n})})})})}},47006(e,t,n){"use strict";n.d(t,{b:()=>l});var r=n(92860),i=n(93426),s=n(26087),a=n(64060),o=n(38048);const l=e=>{const t=()=>
2!e.itemsCount&&0!==e.itemsCount||e.itemsCount<0?null:(e.itemsCountId||(0,a.OP)("A11Y: itemsCountId must be also provided together with itemsCount prop"),e.itemsSRLabel||(0,a.OP)("A11Y: itemsSRLabel must be also provided together with itemsCount prop"),(0,o.jsxs)("span",{className:"i-radio__additional",id:e.itemsCountId,children:["(",(0,o.jsxs)("span",{className:"u-vhide",children:[e.itemsSRLabel,": "]}),s.h.formatNumber(e.itemsCount),")"]})),n=t=>{e.onChange(t)},r=["i-radio",e.hasExternalLabel?"i-radio--no-label":"link-mask link-mask--radio",e.checkedEffect?"i-radio--radiate":"",e.cssWrapper?e.cssWrapper:""].filter((e=>e)).join(" ");return(0,o.jsxs)("div",{className:r,children:[(0,o.jsxs)("div",{className:"i-radio__wrap",children:[(0,o.jsxs)("span",{className:"i-radio__inner",children:[(0,o.jsx)("input",{type:"radio",name:e.name,value:e.value,id:e.radioId,className:"i-radio__input",onChange:e=>n(e),checked:e.checked,disabled:e.disabled,required:e.required,"aria-describedby":e.itemsCountId}),(0,o.jsx)("span",{className:"i-radio__visual-input","aria-hidden":"true"}),e.checkedEffect&&(0,o.jsx)("span",{className:"i-radio__radiate"}),(0,o.jsxs)("label",{className:"i-radio__label-wrapper"+(e.hasExternalLabel?"":" link-mask__link"),htmlFor:e.radioId,id:e.labelId!=e.radioId?e.labelId:"",children:[e.label&&!e.hasExternalLabel&&(0,o.jsxs)("span",{className:"i-radio__label"+(e.labelBold?" i-radio__label--bold":""),children:[(0,o.jsx)("span",{className:"i-radio__label-text",children:e.label}),e.labelInsideAppend]}),t(),e.labelInfo&&(0,o.jsx)("span",{className:"i-radio__additional",children:e.labelInfo}),e.labelAdditionals&&(0,o.jsx)("span",{className:"i-radio__additional",children:e.labelAdditionals})]}),e.icon&&(0,o.jsx)(i.U,{wrapperClass:"i-radio__icon i-radio__icon--left",icon:e.icon,width:20,height:20})]}),e.children&&(0,o.jsx)("span",{className:"i-radio__append",children:e.children})]}),e.extra&&(0,o.jsx)("div",{className:"i-radio__extra",children:e.extra})]})}},18095(e,t,n){"use strict";n.d(t,{U:()=>p});var r=n(92860),i=n(93426),s=n(26087),a=n(20964),o=n(95853),l=n(34836),c=n(38048);const u=8;var d=function(e){return e.Min="min",e.Max="max",e}(d||{});const p=e=>{let{labelledBy:t,min:n,max:u,step:p=1,valuesList:h,valueFormatter:f,minHandleValue:m,minHandleOnChange:g,minHandleOnRelease:v,minHandleIcon:_,maxHandleValue:b,maxHandleOnChange:y,maxHandleOnRelease:x,maxHandleIcon:w,disabled:k}=e;const I=(0,r.useRef)(),C=(0,r.useRef)(),A=(0,r.useRef)(),E=(0,r.useRef)(l.q.getNext()),S=(0,r.useRef)(l.q.getNext()),T=(0,r.useRef)(null),O=(0,r.useRef)(null),[F,j]=(0,r.useState)(),[N,D]=(0,r.useState)(!1),[M,R]=(0,r.useState)(),P=(0,r.useCallback)((()=>h?0:n||0),[n,h]),L=(0,r.useCallback)((()=>h?h.length-1:u||1),[u,h]),U=h?(0,a.kF)(h,b):b,H=h?(0,a.kF)(h,m):m,B=(0,r.useCallback)((()=>({min:h?h[P()]:P(),max:Math.min(U,h?h[L()]:L())})),[L,U,P,h]),V=(0,r.useCallback)((()=>({min:Math.max(h?h[P()]:P(),H),max:h?h[L()]:L()})),[L,P,H,h]),z=(0,r.useCallback)((()=>{if(!I.current||!C.current)return;const e=I.current.getBoundingClientRect();T.current={railLeft:e.left,railWidth:e.width,handleWidth:C.current.offsetWidth}}),[]),$=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n;if(!F&&!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])||k)return;const r=T.current,i=t||M;if(!r||r.railWidth<=0||!i)return;const s=i===d.Min?B():V(),a=e+r.handleWidth/2*(i===d.Min?1:-1),o=Math.max(0,Math.min(r.railWidth,a-r.railLeft))/r.railWidth;let l=L()*o;l=h?h[Math.round(l)]:p*Math.round(l/p),l=Math.max(s.min,Math.min(s.max,l)),i===d.Min?g(l):y(l)}),[M,L,V,B,F,y,g,p,h,k]),W=(0,r.useCallback)(((e,t)=>{if(k)return;let n=t===d.Min?H:U;const r=t===d.Min?B():V();let i=0;switch(e.which){case 37:case 40:i=-1,e.preventDefault();break;case 39:case 38:i=1,e.preventDefault();break;case 34:i=-10,e.preventDefault();break;case 33:i=10,e.preventDefault();break;case 36:n=r.min,e.preventDefault();break;case 35:n=r.max,e.preventDefault()}if(i)if(h){const e=h.indexOf(r.min),t=h.indexOf(r.max),s=Math.max(e,Math.min(t,h.indexOf(n)+i));n=h[s]}else n=Math.max(r.min,Math.min(r.max,n+p*i));t===d.Min?g(n):y(n)}),[H,U,B,V,h,p,g,y,k]),q=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(1!==e.buttons||k)return;const n=t||M;D(!1),z(),j(!0),R(n),n===d.Min?C.current?.focus():n===d.Max&&A.current?.focus(),$(e.clientX,n,!0),e.preventDefault()}),[z,$,M,k]),Y=(0,r.useCallback)(((e,t)=>{!k&&t&&(z(),O.current={startX:e.touches[0].clientX,startY:e.touches[0].clientY,handle:t},R(t),D(!0))}),[z,k]),G=(0,r.useCallback)((e=>{1===e.buttons&&F&&!k&&($(e.clientX),e.preventDefault())}),[$,F,k]),K=(0,r.useCallback)((e=>{if(k||!O.current)return;const t=O.current.handle,n=e.touches[0],r=n.clientX-O.current.startX,i=n.clientY-O.current.startY;if(!F){if(Math.abs(r)<8||Math.abs(r)<=Math.abs(i))return;return j(!0),R(t),t===d.Min?C.current?.focus():A.current?.focus(),$(n.clientX,t,!0),void e.preventDefault()}$(n.clientX,t),e.preventDefault()}),[$,F,k]),J=(0,r.useCallback)((e=>{if(k)return;const t=F;O.current=null,T.current=null,D(!1),t&&(M===d.Min?v&&v(m):x&&x(b),j(!1),e.preventDefault())}),[M,F,x,b,v,m,k]);(0,r.useEffect)((()=>
2{if(F&&!N)return document.addEventListener("mousemove",G),document.addEventListener("mouseup",J),()=>{document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",J)}}),[J,G,F,N]),(0,r.useEffect)((()=>{if(N)return document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",J,{passive:!1}),document.addEventListener("touchcancel",J,{passive:!1}),()=>{document.removeEventListener("touchmove",K),document.removeEventListener("touchend",J),document.removeEventListener("touchcancel",J)}}),[J,K,N]);const X=B(),Q=f?f(H,d.Min):s.h.formatNumber(H);let Z=100*(h?h.indexOf(H)/(h.length-1):H/L());Z=Math.max(0,Math.min(100,Z));const ee=V(),te=f?f(U,d.Max):s.h.formatNumber(U);let ne=100*(h?h.indexOf(U)/(h.length-1):U/L());ne=Math.max(0,Math.min(100,ne));const re=Z,ie=ne-Z;return(0,c.jsxs)("div",{className:"i-range-slider i-range-slider--range "+(k?"disabled":""),children:[(0,c.jsxs)("div",{className:"i-range-slider__rail-container",children:[(0,c.jsx)("div",{className:"i-range-slider__rail",onMouseDown:q,ref:I,children:(0,c.jsx)("div",{className:"i-range-slider__rail-range",style:{left:re+"%",width:ie+"%"}})}),(0,c.jsx)("div",{role:"slider",tabIndex:0,className:"i-range-slider__handle i-range-slider__handle--min"+(F&&M===d.Min?" i-range-slider__handle--dragged":""),"aria-valuemin":X.min,"aria-valuenow":H,"aria-valuetext":Q,"aria-valuemax":X.max,"aria-labelledby":t+" "+E.current,style:{left:Z+"%"},onKeyDown:e=>W(e,d.Min),onMouseDown:e=>q(e,d.Min),onTouchStart:e=>Y(e,d.Min),ref:C,children:_&&(0,c.jsx)(i.U,{wrapperClass:"i-range-slider__handle-icon",icon:_})}),(0,c.jsx)("div",{role:"slider",tabIndex:0,className:"i-range-slider__handle i-range-slider__handle--max"+(F&&M===d.Max?" i-range-slider__handle--dragged":""),"aria-valuemin":ee.min,"aria-valuenow":U,"aria-valuetext":te,"aria-valuemax":ee.max,"aria-labelledby":t+" "+S.current,style:{left:ne+"%"},onKeyDown:e=>W(e,d.Max),onMouseDown:e=>q(e,d.Max),onTouchStart:e=>Y(e,d.Max),ref:A,children:w&&(0,c.jsx)(i.U,{wrapperClass:"i-range-slider__handle-icon",icon:w})})]}),(0,c.jsxs)("div",{className:"i-range-slider__values",children:[(0,c.jsxs)("div",{className:"i-range-slider__value i-range-slider__value--min",children:[(0,c.jsxs)("span",{className:"u-vhide",id:E.current,children:[(0,c.jsx)(o.s,{id:"sf2_minimum_value"}),":"," "]}),Q]}),(0,c.jsxs)("div",{className:"i-range-slider__value i-range-slider__value--max",children:[(0,c.jsxs)("span",{className:"u-vhide",id:S.current,children:[(0,c.jsx)(o.s,{id:"sf2_maximum_value"}),":"," "]}),te]})]})]})}},30140(e,t,n){"use strict";n.d(t,{L3:()=>d,Tp:()=>p});var r=n(87387),i=n.n(r),s=n(92860),a=n(93426),o=n(12868),l=n(64060),c=n(95853),u=n(38048);let d=function(e){return e.Destinations="b-tags-list--destinations",e.TextboxAutocomplete="b-tags-list--textbox-autocomplete",e}({});const p=e=>{let{type:t=d.Destinations,labelledBy:n,tags:r,shortening:i,registerCloseButtonCallback:s,cssWrapper:a,displayFullLabels:o}=e;void 0===n&&(0,l.OP)("A11Y: labelledBy prop must be always specified on TagsListControl");const c=`b-tags-list ${t} ${i?"b-tags-list--shortening":""} ${a}`,p=r.filter((e=>!0===e.selected||void 0===e.selected));return(0,u.jsx)("ul",{role:"list",className:c,"aria-labelledby":n,children:p.map((e=>{let{id:t,type:n,label:r,onToggle:i}=e;return(0,u.jsx)(h,{id:t,type:n,label:r,onToggle:i,ref:e=>{s&&s(e)},displayFullLabels:o},t)}))})},h=(0,s.forwardRef)(((e,t)=>{const n=t=>{["Backspace","Delete"].includes(t.key)&&(e.onToggle(!1,e.id,e.type),t.preventDefault())};return(0,u.jsxs)("li",{role:"listitem",className:"b-tags-list__item "+(e.displayFullLabels?"":"b-tags-list__item--elipsis"),title:e.displayFullLabels?void 0:e.label,children:[(0,u.jsx)("span",{className:"b-tags-list__elipsis",children:(0,u.jsx)("span",{id:e.id+"-destination",className:"b-tags-list__label",children:e.label})}),(0,u.jsxs)("button",{type:"button",className:"b-tags-list__remove","aria-labelledby":e.id+"-destination "+e.id+"-remove",onClick:()=>e.onToggle(!1,e.id,e.type),onKeyDown:n,ref:t,children:[(0,u.jsxs)("span",{id:e.id+"-remove",className:"u-vhide",children:["(",(0,u.jsx)(c.s,{id:"remove"}),")"]}),(0,u.jsx)(a.U,{wrapperClass:"b-tags-list__remove-icon",icon:o.LZ.cross,width:11,height:11})]})]})}));p.displayName="TagsListControl",h.displayName="TagsListItem"},82067(e,t,n){"use strict";n.d(t,{C:()=>a,o:()=>l});var r=n(92860),i=n(33671),s=n(38048);let a=function(e){return e[e.Default=i.qp.Default]="Default",e[e.Large=i.qp.Large]="Large",e[e.XLarge=i.qp.XLarge]="XLarge",e}({});const o=new RegExp("^data-.+$","gi"),l=(0,r.forwardRef)(((e,t)=>{const n=(0,r.useMemo)((()=>{let t=e.size?e.size.toString():a.Default.toString();return t+=e.noBorder?" "+i.qp.NoBorder:"",t+=e.cssWrapper?" "+e.cssWrapper:"",t}),[e.cssWrapper,e.noBorder,e.size]),l=Object.fromEntries(Object.entries(e).filter((e=>{let[t]=e;return o.test(t)})));return(0,s.jsx)(i.YT,{inputType:e.type||i.Av.Text,wrapperClass:n,inputWrapperClass:e.cssInputWrapper,inputSpecificProps:l,...e,ref:t})}));l.displayName="TextboxControl"},74996(e,t,n){"use strict";n.d(t,{E:()=>l,U:()=>o});var r=n(92860),i=n(20964),s=n(95853),a=n(38048);let o=function(e){return e.Homepage="hp",e.SearchResults="search-results",e}({});class l extends r.Component{componentDidMount(){this.updateDocumentErrorDataAttr()}componentDidUpdate(e){this.updateDocumentErrorDataAttr(e)}render(){return(0,a.jsx)("div",{className:"b-error-search-form-placeholder b-error-search-form-placeholder--"+this.props.type,role:"status","aria-live":"assertive",children:this.props.show&&(0,a.jsxs)(r.Fragment,{children:[this.getPlaceholder(),this.getErrorMessage()]})})}getPlaceholder(){return(0,a.jsxs)("div",{className:"b-search-form-placeholder b-search-form-placeholder--error b-search-form-placeholder--"+this.props.type,children:[(0,a.jsxs)("div",{className:"b-search-form-placeholder__main-search-form",children:[(0,a.jsx)("div",{className:"b-search-form-placeholder__main-search-form-field"}),(0,a.jsx)("div",{className:"b-search-form-placeholder__main-search-form-field"}),(0,a.jsx)("div",{className:"b-search-form-placeholder__main-search-form-field"})]}),(0,a.jsx)("div",{className:"b-search-form-placeholder__filters",children:(0,i.dR)(11).map((e=>(0,a.jsx)("div",{className:"b-search-form-placeholder__filter-group"},e)))})]})}getErrorMessage(){return(0,a.jsx)("div",{className:"b-error-search-form-placeholder__message-container",children:(0,a.jsxs)("div",{className:"b-error-search-form-placeholder__message",children:[(0,a.jsxs)("p",{className:"b-error-search-form-placeholder__message-text",children:[(0,a.jsx)(s.s,{id:"sf2_system_has_crashed"}),(0,a.jsx)("br",{}),(0,a.jsx)(s.s,{id:"sf2_please_reload_the_page"})]}),this.props.showRefreshButton&&this.props.errorRefreshOnClick&&(0,a.jsx)("button",{type:"button",className:"b-error-search-form-placeholder__refresh","data-testid":"search-form-error-refresh-button",onClick:e=>this.props.errorRefreshOnClick(e),children:(0,a.jsx)(s.s,{id:"sf2_reload_the_page"})})]})})}updateDocumentErrorDataAttr(e){!this.props.show||e&&e.show?this.props.show||e&&!e.show||document.documentElement.removeAttribute("data-react-error"):document.documentElement.setAttribute("data-react-error","true")}}},1176(e,t,n){"use strict";n.d(t,{Xr:()=>m,iK:()=>h,Ii:()=>v});var r=n(64060),i=n(36999),s=n(87352);class a{searchUrl="/search-results/ajax-boxes";searchFilterParams=null;lastRequestStartTime=null;abortController=null;constructor(e,t){e&&this.setSearchUrl(e),this.abortController=t}async send(e){this.setSearchFilterParams(Object.assign(e.params,{getOptionsCount:e.refreshOptionsCount,base_url:window.location.href.split("?")[0]}));const t={showLoader:!1,loaderOptions:{isBlocking:!1},method:s.I.POST,abortSignal:this.abortController?this.abortController.signal:null};return this.setRequestStartTime(),new s.A(this.getSearchUrl(),t,this.get
2SearchFilterParams()).send()}setSearchUrl(e){this.searchUrl=e}getSearchUrl(){return this.searchUrl}setRequestStartTime(){this.lastRequestStartTime=performance.now()}getLastRequestStartTime(){return this.lastRequestStartTime}setSearchFilterParams(e){this.searchFilterParams=e}getSearchFilterParams(){return this.searchFilterParams}}var o=n(94450),l=n(7613),c=n(7539),u=n(89996);const d=(e,t)=>{let{count:n=15,itemHeight:r="300px",itemModifier:i="u-mb-xs"}=t;e.innerHTML="";const s=document.createElement("div");s.className="content-placeholder u-flex u-flex-column",e.appendChild(s);const a=[];for(let e=0;e<n;e++){const e=document.createElement("div");e.className=`content-placeholder__item u-mb-xs ${i}`,e.style.setProperty("--content-placeholder-height",r),a.push(e)}return a.forEach((e=>s.appendChild(e))),e};var p=n(77335);const h="searchResultsBoxesReloadStarted",f=()=>{},m=async(e,t,n)=>{window.dispatchEvent(new CustomEvent(h));const r=document.getElementById("search-form-result-boxes"),s=document.getElementById("search-results-scroll-up");if(e.scroll){const e=20;let t=null!==s?s.getBoundingClientRect().top+window.scrollY-e:window.screenTop;if((0,p.$_)("mdDown")){const n=document.getElementById("hp-header")||document.getElementById("header"),r=n?n.getBoundingClientRect().height:0;t=null!==s?s.getBoundingClientRect().top+window.scrollY-r-e:window.screenTop}requestAnimationFrame((()=>{window.scrollTo({top:t,behavior:"smooth"})}))}null!==r&&d(r,{count:15,itemModifier:"u-mb-xs",itemHeight:"300px"}),g();const o=new a(n,t),l=await o.send(e);if(null!==l)if(l.responseIsOk??1){if(null!==o.getLastRequestStartTime()){const e=Math.round(performance.now()-o.getLastRequestStartTime());(0,i.xi)("AJAX update search results",e)}_(l,e.refreshOptionsCount)}else b(l)},g=()=>{const e=document.getElementById("seo-h1"),t=document.getElementById("seo-intro-text");e?.remove(),t?.remove()},v=()=>(void 0!==o.wI.searchBoxAbortController&&o.wI.searchBoxAbortController.abort(),o.wI.searchBoxAbortController=new AbortController,o.wI.searchBoxAbortController),_=(e,t)=>{const n=e.customData;e.redirectUrl&&window.location.replace(e.redirectUrl),void 0!==n.searchElapsedTime&&(0,i.xi)("solr-proxy search",n.searchElapsedTime),x(e),y(e,t)},b=e=>{(0,r.yA)("AJAX response error",e);const t=document.createElement("div");t.innerHTML=e.html,document.body.appendChild(t);try{(0,i.ty)("Search Results","Search Error","AJAX Search")}catch(e){(0,r.Cp)(e)}},y=async(e,t)=>{const n=e.customData;t&&void 0!==n.optionsCount&&l.A.searchForm.setOptionsCount(n.optionsCount),l.A.searchForm.setIsFuzzyLogicUsed(n.isFuzzyLogicUsed),void 0!==n.searchProps&&l.A.searchForm.setPaginationParams(n.searchProps),void 0!==n.paginationLinks&&l.A.searchForm.setPaginationLinks(n.paginationLinks);const r=void 0!==n.boxesFound&&""!==n.boxesFound?parseInt(String(n.boxesFound),10):null,i=null!=n.searchProps?.boxesFound?Number(n.searchProps.boxesFound):null,s=0===r&&i>0?i:r??i??NaN;if(void 0===n.termsVariants||!Number.isNaN(s)&&0!==s)!Number.isNaN(s)&&s>0&&l.A.searchForm.setNoSearchResultsFiltersList([]);else{const e=await(0,u.D)(),t=await(0,c.q)(n.termsVariants,e);l.A.searchForm.setNoSearchResultsFiltersList(t)}Number.isNaN(s)||l.A.searchForm.setFoundBoxesCount(s)},x=e=>{const t=e.customData,n=document.getElementById("search-form-result-boxes"),r=document.getElementById("destination-entry-message-wrapper"),i=document.getElementById("search-results-dynamic-links"),s=document.getElementById("search-results-country-tabs"),a=document.getElementById("search-results-heading");void 0!==t.boxes?(null!==r&&(t.destinationEntryMessage?r.innerHTML=t.destinationEntryMessage:r.innerHTML=""),null!==i&&(t.dynamicLinks?i.innerHTML=t.dynamicLinks:i.innerHTML=""),null!==s&&(t.countryTabs?s.innerHTML=t.countryTabs:s.innerHTML=""),null!==a&&t.resultsHeading&&(a.innerHTML=t.resultsHeading),n.innerHTML=t.boxes,n.dispatchEvent(new Event("contentload"))):(n.innerHTML="",null!==r&&(r.innerHTML=""))}},78194(e,t,n){"use strict";n.d(t,{We:()=>s,pb:()=>a});var r=n(227);const i=e=>Array.isArray(e)?[...e].filter((e=>"number"==typeof e&&!Number.isNaN(e))).sort(((e,t)=>e-t)):[],s=e=>{const{adultsValue:t,agesValue:n,selectedChildrenValue:s}=e,a="number"==typeof t?t:0,o=i(n),l=(0,r.t)(a,o),c="number"==typeof s?s:0;return{adults:l.adults,children:l.children,infants:l.infants,totalChildren:Math.max(l.children+l.infants,c),ages:o}},a=(e,t)=>e.map((e=>e<2&&t?t:String(e))).join(",")},82064(e,t,n){"use strict";n.d(t,{L:()=>h,r:()=>p});var r=n(87387),i=n.n(r),s=n(1811),a=n(30394),o=n(84772),l=n(5539);const c=(e,t)=>{t&&!e.includes(t)&&e.push(t)},u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(const r of e){if(r.id===t)return{option:r,parents:n};if(!r.subOptions?.length)continue;const e=u(r.subOptions,t,[...n,r]);if(e)return e}return null},d=(e,t)=>{const n=t.get(e);if(!n)return null;for(const e of n.parents){const n=t.get(e);if(n&&n.type===a.b.Country)return e}return null},p=(e,t)=>{const n=(0,o.sc)(t.options),r={};let i=[];if(Array.isArray(e[s.I.nl_country_id]))for(const t of e[s.I.nl_country_id])i.push(`${l.hR}${t}`);if(Array.isArray(e[s.I.nl_locality_id]))for(const t of e[s.I.nl_locality_id]){const e=`${l.UK}${t}`;i.push(e);const r=d(e,n);r&&i.push(r)}i=[...new Set(i)];for(const e of i){const t=n.get(e);t&&(void 0===r[t.type]&&(r[t.type]=[]),r[t.type]?.push(t.label))}return{[a.b.Country]:r[a.b.Country]?.join(", ")??"",[a.b.Locality]:r[a.b.Locality]?.join(", ")??""}},h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=[],o=[],d=(e,t)=>{c(i,e),c(o,t??e)};if(Array.isArray(e[s.I.nl_country_id]))for(const n of e[s.I.nl_country_id]){const e=u(t.options,`${l.hR}${n}`);d(e?.option.value,e?.option.extra?.s_country??r[`${l.hR}${n}`]??e?.option.value)}if(Array.isArray(e[s.I.nl_locality_id]))for(const n of e[s.I.nl_locality_id]){const e=u(t.options,`${l.UK}${n}`),i=e?.parents.find((e=>e.type===a.b.Country));d(i?.value,e?.option.extra?.s_country??i?.extra?.s_country??(i?r[i.id]:void 0)??i?.value),d(e?.option.value,e?.option.extra?.s_locality??r[`${l.UK}${n}`]??e?.option.value)}if(Array.isArray(e[s.I.nl_city_id]))for(const t of e[s.I.nl_city_id])d(n[`${l.G4}${t}`],r[`${l.G4}${t}`]);if(Array.isArray(e[s.I.nl_hotels_id]))for(const t of e[s.I.nl_hotels_id])d(n[`${l._M}${t}`],r[`${l._M}${t}`]);return 0===i.length?null:{canonical:o,local:i}}},12823(e,t,n){"use strict";n.d(t,{Oi:()=>d,VB:()=>l,cd:()=>i,jx:()=>u,mQ:()=>c});var r=n(84772);let i=function(e){return e.Type="type",e.Group="group",e.Subgroup="subgroup",e}({});const s=e=>0===e.parents.length?i.Type:1===e.parents.length?i.Group:i.Subgroup,a=function(e){let t;const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})[e.id]??e.label;return[s(e),n]},o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.get(e);if(!r)return null;const s={[i.Type]:"",[i.Group]:"",[i.Subgroup]:""},o=a(r,n);s[o[0]]=o[1];for(const e of r.parents){const r=t.get(e);if(!r)continue;const i=a(r,n);s[i[0]]=i[1]}return s},l=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s={[i.Type]:[],[i.Group]:[],[i.Subgroup]:[]}
2,a=(0,r.DA)(t.options),l=Array.isArray(e)?e:[];for(const e of l){const t=o(e,a,n);if(t)for(const[e,n]of Object.entries(t))n&&s[e].push(n)}return{[i.Type]:[...new Set(s[i.Type])].join(", "),[i.Group]:[...new Set(s[i.Group])].join(", "),[i.Subgroup]:[...new Set(s[i.Subgroup])].join(", ")}},c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s={[i.Type]:[],[i.Group]:[],[i.Subgroup]:[]},o=(0,r.DA)(t.options),l=Array.isArray(e)?e:[];for(const e of l){const t=o.get(e);if(!t)continue;const[r,i]=a(t,n);i&&s[r].push(i)}return{[i.Type]:[...new Set(s[i.Type])].join(", "),[i.Group]:[...new Set(s[i.Group])].join(", "),[i.Subgroup]:[...new Set(s[i.Subgroup])].join(", ")}},u=(e,t,n)=>{let r=e,i=t;return void 0===e&&(r=Object.prototype.hasOwnProperty.call(n,"minValue")?n.minValue:Object.prototype.hasOwnProperty.call(n,"options")?n.options.find((e=>void 0!==e))?.value??"":Math.min(...n.values)),void 0===t&&(i=Object.prototype.hasOwnProperty.call(n,"maxValue")?n.maxValue:Object.prototype.hasOwnProperty.call(n,"options")?n.options.slice(-1).pop()?.value??"":Math.max(...n.values)),`${r} - ${i}`},d=(e,t)=>{for(const n of e){if(n.id===t)return n.value;if("subOptions"in n&&n.subOptions?.length){const e=d(n.subOptions,t);if(e)return e}}return null}},87986(e,t,n){"use strict";n.d(t,{EW:()=>o,I6:()=>c,PR:()=>l,wo:()=>d});var r=n(12868),i=n(31826);const s=e=>{if("number"==typeof e)return e;const t=e.match(/\d+/)?.[0];return t?Number.parseInt(t,10):e},a=(e,t)=>"min"===t?Object.prototype.hasOwnProperty.call(e,"minValue")?s(e.minValue):Object.prototype.hasOwnProperty.call(e,"options")?s(e.options.find((e=>void 0!==e))?.value??""):Math.min(...e.values):Object.prototype.hasOwnProperty.call(e,"maxValue")?s(e.maxValue):Object.prototype.hasOwnProperty.call(e,"options")?s(e.options.slice(-1).pop()?.value??""):Math.max(...e.values),o=(e,t,n)=>{const r=void 0,i=void 0;return`from_${null!=e&&e>0?e:a(n,"min")}_to_${null!=t&&t>0?t:a(n,"max")}`},l=(e,t)=>{const n=c(e,t);return n?`from:_${n.startDate}_to:_${n.endDate}`:""},c=(e,t)=>{const n=(0,i.LJ)(e),r=(0,i.LJ)(t);return n&&r?{startDate:n,endDate:r}:null},u=e=>{const t=void 0;switch(Number.parseInt(String(e).split("_")[0],10)){case r.LY.TRANSPORTATION_ID_AIRPLANE:return"airplane";case r.LY.TRANSPORTATION_ID_BUS:return"bus";case r.LY.TRANSPORTATION_ID_OWN:return"self_arranged";case r.LY.TRANSPORTATION_ID_TRAIN:return"train";case r.LY.TRANSPORTATION_ID_COMBINED:return"combined";default:return""}},d=e=>{const t=(Array.isArray(e)?e:[]).map((e=>u(e))).filter((e=>""!==e));return[...new Set(t)].join(",")}},17986(e,t,n){"use strict";n.d(t,{init:()=>H});var r=n(92860),i=n(91930),s=n(22643),a=n(1811),o=n(86542),l=n(34836),c=n(36993),u=n(74996),d=n(38048);let p=function(e){return e.hp="f-reviews-search--hp",e.serp="f-reviews-search--serp",e}({});const h=e=>{let{children:t,variant:n,title:r,subtitle:i,modifier:s}=e;const a=["f-reviews-search",n?p[n]:"",s||""].filter((e=>e)).join(" ");return(0,d.jsx)("div",{className:a,children:(0,d.jsxs)("div",{className:"f-reviews-search__wrapper",children:[r&&(0,d.jsx)("h1",{className:"f-reviews-search__title",children:r}),i&&(0,d.jsx)("p",{className:"f-reviews-search__subtitle",children:i}),(0,d.jsx)("div",{className:"f-reviews-search__content",children:t})]})})};var f=n(13137),m=n(95853),g=n(30011),v=n(46915),_=n(93198),b=n(31647),y=n(5920),x=n(7613);const w=(e,t)=>{const n={...x.A.searchForm.getFormValues()};1==e?delete n[a.I.page]:n[a.I.page]=e,(0,y.F)(a.I.page,t,n,!0)};var k=n(71897),I=n(15008),C=n(84524),A=n(61714),E=n(39175),S=n(13504);const T=e=>{(0,E._D)(),(0,E.$Q)(e);const{isMobile:t}=(0,E.dh)(),n=(0,S.e)((e=>e.fieldsDefResponse.fieldsDef)),i=(0,S.e)((e=>e.formValues)),p=(0,S.e)((e=>e.paginationLinks)),x=(0,S.e)((e=>e.paginationParams)),T=r.useCallback(((t,n)=>(0,k._)(t,n,e)),[e]),O=r.useCallback((t=>(0,A.f)(t,e)),[e]),F=r.useCallback((t=>w(t,e)),[e]),j=r.useMemo((()=>l.q.getNext()),[]),N=r.useMemo((()=>n.nd_review_rating_average&&{onMinChange:t=>(0,I.R)(a.I.nd_review_rating_average_from,t,parseInt(n.nd_review_rating_average.options.slice(0,1).pop().id),e),onMaxChange:t=>(0,I.R)(a.I.nd_review_rating_average_to,t,parseInt(n.nd_review_rating_average.o
2ptions.slice(-1).pop().id),e),onRelease:()=>(0,y.F)(a.I.nd_review_rating_average_from,e)}),[n.nd_review_rating_average,e]),D=i[a.I.nl_stars],M=r.useMemo((()=>Array.isArray(D)?D.map(Number):[]),[D]),R=(0,d.jsx)(h,{variant:"serp",children:(0,d.jsx)(g.A,{isHomepage:!1,searchResultsUrl:e.searchResultsUrl,destinationField:n.nl_destination_id,initialLabelsForCitiesAndHotels:e.initialLabelsForCitiesAndHotels,viewportWidthSize:e.viewportWidthSize,setSearchFormTypeAndHeight:e.setSearchFormTypeAndHeight})});return(0,d.jsxs)("form",{id:"review-main-search",role:"form",className:"no-visual-focus","aria-labelledby":"review-main-search-form-label",tabIndex:-1,children:[(0,d.jsx)("h2",{id:"review-main-search-form-label",className:"u-vhide",children:(0,d.jsx)(m.s,{id:"sf2_tour_search_heading"})}),(0,d.jsxs)(c.t,{type:u.U.SearchResults,isMobile:t,errorCallback:e.errorCallback,children:[(0,d.jsxs)(f.i,{mainSearchForm:R,filterSelectedParamsCount:(0,C.h)(),sortPopupLabelId:j,searchFormProps:e,showPaymentOptionsTooltip:!1,options:n.sort.options,filterSearchBarEnabled:!0,children:[n.nl_stars&&(0,d.jsx)(s.A,{selectedValues:M,...n.nl_stars,onChange:T}),n.nd_review_rating_average&&(0,d.jsx)(o.A,{fieldDef:n.nd_review_rating_average,minStateValue:i[a.I.nd_review_rating_average_from],maxStateValue:i[a.I.nd_review_rating_average_to],minHandleOnChange:N.onMinChange,maxHandleOnChange:N.onMaxChange,releaseHandler:N.onRelease,isOpen:n.nd_review_rating_average.isOpen}),!t&&(0,d.jsx)(v.L,{container:document.getElementById("review-search-form-sorting"),replaceContainer:!0,children:(0,d.jsx)(_.A,{value:i[a.I.sort]||e.defaultSorting,...n.sort,gtmCategory:"Reviews Page: Change",onChange:O})})]}),(0,d.jsx)(v.L,{container:document.getElementById("review-search-results-pagination"),replaceContainer:!0,children:(0,d.jsx)(b.A,{itemsPerPage:x?.itemsPerPage,boxesFound:x?.boxesFound,isMobile:t,paginationLinks:p,currentPage:i[a.I.page]??1,onChange:F})})]})]})};var O=n(5539),F=n(94450),j=n(1176),N=n(66104),D=n(84772),M=n(70061),R=n(34161),P=n(9625);const L=async()=>{const e=await fetch((0,P.Y)("/review/ajax-fields-def"),{credentials:"omit",headers:{Accept:"application/json"}});if(200!==e.status)throw new Error("bad status = "+e.status);return await e.json()},U=async(e,t)=>(0,j.Xr)({params:e,scroll:t,refreshOptionsCount:!t},(0,j.Ii)(),"/review/ajax-search"),H=async()=>{const e=document.getElementById("js-review-search-form-container"),t=await L(),n=(0,R.M)(e),{citiesAndHotels:r,defaultSorting:s,paginationLinks:a,searchResultsUrl:o,searchParams:l,searchProps:c}=n;F.wI.searchFormOnChangeCallbacks=F.wI.searchFormOnChangeCallbacks||[],F.wI.searchFormOnChangeCallbacks.push(U);const u=(e,t)=>{for(const n of F.wI.searchFormOnChangeCallbacks)n(e,t)};await(0,M.y)({fieldsDef:t},n,!1,u);const p=(0,D.sc)(t?.nl_destination_id?.options),h=void 0;(0,i.H)(e).render((0,d.jsx)(T,{searchEntity:O.G$.Review,isHomepage:!1,destinationsOptionsMap:p,setSearchFormTypeAndHeight:x.A.mainContext.setSearchFormTypeAndHeight,onChange:u,searchResultsUrl:o,initialLabelsForCitiesAndHotels:r,redirectToResults:()=>{},viewportWidthSize:x.A.mainContext.getViewportWidthSize(),searchParams:l,paginationLinks:a,initialPaginationParams:c,defaultSorting:s,filtersChangeCallback:N.YI,mainSearchCallback:N.JN}))}},34161(e,t,n){"use strict";n.d(t,{M:()=>l});var r=n(87387),i=n.n(r),s=n(17272),a=n(5539),o=n(64060);const l=e=>{const t=e.dataset.found_boxes_count,n=e.dataset.search_results_url?e.dataset.search_results_url:null,r=(0,s.Im)(e.dataset.display_type)?null:a.r[e.dataset.display_type],i=e.dataset.tabs?JSON.parse(e.dataset.tabs):[],l=e.dataset.holiday_target,c=[a.mn.TOURS,a.mn.ACCOMMODATION,a.mn.ABROAD];let u=a.mn.TOURS;l&&c.includes(l)?u=l:l&&!c.includes(l)&&(0,o.aO)(`Legacy holiday_target "${l}" mapped to TOURS. This is a temporary solution. See CIF-451 for proper backend normalization.`);const d=e.dataset.default_sorting||void 0,p="1"===e.dataset.is_fuzzy_logic_used,h=e.dataset.search_props?JSON.parse(e.dataset.search_props):null,f=e.dataset.search_params_not_found_variants?JSON.parse(e.dataset.search_params_not_found_variants):{},m=e.dataset.initial_airport_search_input_value?e.dataset.initial_airport_search_input_value:null,g=e.dataset.search_params?JSON.parse(e.dataset.search_params):{},v=e.dataset.currentActionName?e.dataset.currentActionName:"default",_=e.dataset.removed_fields?JSON.parse(e.dataset.removed_fields):[],b=e.dataset.top_country_set_id?parseInt(e.dataset.top_country_set_id):null,y=e.dataset.cities_and_hotels?JSON.parse(e.dataset.cities_and_hotels):{},x=e.dataset.ab_tests_conditions?JSON.parse(e.dataset.ab_tests_conditions):{},w=JSON.parse(e.dataset.cities_and_hotels||"[]"),k=JSON.parse(e.dataset.pagination_links||"{}"),I=e.dataset.page_heading??null,C="1"===e.dataset.init_boxes_loaded_async,A="1"===e.dataset.initial_no_results_rendered_in_twig;return{foundBoxesCount:t?parseInt(t):0,searchResultsUrl:n,displayType:r,tabs:i,holidayTarget:u,defaultSorting:d,isFuzzyLogicUsed:
2p,searchProps:h,initialTermsVariants:f,initialAirportSearchInputValue:m,searchParams:g,removedFields:_,topCountrySetId:b,labelsForCitiesAndHotels:y,abTestsConditions:x,currentActionName:v,citiesAndHotels:w,paginationLinks:k,initBoxesLoadedAsync:C,initialNoResultsRenderedInTwig:A,pageHeading:I}}},70061(e,t,n){"use strict";n.d(t,{y:()=>F});var r=n(5539),i=n(81976),s=n(26812),a=n(96975),o=n.n(a),l=n(30951),c=n(7613);const u=()=>{const e=o()().startOf("day").add(1,"day"),t=o()().startOf("day").add(2,"year").endOf("month");if(c.A.searchForm.getDisplayType()!==r.r.IFrame)return void new l.Ay(e,t);const n=e.subtract(30,"year"),i=t.add(2,"year").endOf("month");new l.Ay(n,i)};var d=n(68118),p=n(17272),h=n(1811);const f=e=>(0,d.fu)(!(0,p.Im)(e.searchParams[h.I.nl_country_id])&&Array.isArray(e.searchParams[h.I.nl_country_id])?[...e.searchParams[h.I.nl_country_id].map((e=>parseInt(e)))]:[]);var m=n(89996),g=n(7539);const v=async e=>{const t=await(0,m.D)();return(0,p.Im)(e.initialTermsVariants)?[]:await(0,g.q)(e.initialTermsVariants,t)};var _=n(27755),b=n(73306),y=n(81233),x=n(80980),w=n(71611),k=n(62601),I=n(64203);function C(e){const t=c.A.searchForm.getParsedInitialValues();return t&&"object"==typeof t&&0!==Object.keys(t).length?{...t,...e}:e}function A(e){return 0===e||"0"===e||""===e||null==e}function E(e){A(e[h.I.c_price_from])&&A(e[h.I.c_price_to])&&(delete e[h.I.c_price_from],delete e[h.I.c_price_to]),A(e[h.I.nl_occupancy_children])&&delete e[h.I.nl_occupancy_children];const t=e[h.I.nl_destination_id];Array.isArray(t)&&0===t.length&&delete e[h.I.nl_destination_id]}const S=e=>{window.onpopstate=()=>{const t=(0,b.C)(!0),n=c.A.searchForm.getFieldsDefResponse().fieldsDef;let i=(0,y.A)((0,x.A)((0,p.Im)(t)?e.searchParams:t,n,!1));const s=void 0,a=c.A.searchForm.getDatepickerHelper().getDefaultsStartEndDates();(0,p.Im)(i[h.I.d_start_from])&&(i[h.I.d_start_from]=a.calculatedStartDate.format((0,w.eW)())),c.A.searchForm.getDisplayType()!==r.r.LandingPage&&(i.s_action=c.A.searchForm.getCurrentActionName());const o=void 0;null==i.page&&(i.page=1);const l=i.page,u={1:"",...(0,I.oI)()??c.A.searchForm.getPaginationHistory()},d=u?.[l];"string"==typeof d&&d.length>0&&(i.offsets=d),i=C(i),E(i),c.A.searchForm.setPaginationHistory(u),(0,I.LH)(u),c.A.searchForm.setFormValues(i),(0,k.r)(!1,e)}};var T=n(57449),O=n(83279);const F=async(e,t,n,a)=>{const o={...t,isHomepage:n,initialLabelsForCitiesAndHotels:t.labelsForCitiesAndHotels,searchEntity:r.G$.Tour,viewportWidthSize:c.A.mainContext.getViewportWidthSize(),redirectToResults:e=>{(0,i.M)(t.searchResultsUrl,e)},setSearchFormTypeAndHeight:c.A.mainContext.setSearchFormTypeAndHeight,onChange:a};c.A.searchForm.setFieldsDefResponse(e);const l=await v(o),d=(0,_.i)(o,e),m=!n&&(0,p.Im)(d[h.I.page])?{...d,[h.I.page]:1}:d,g={isHomepage:n,displayType:t.displayType,initialSearchFormProps:o,foundBoxesCount:t.foundBoxesCount,formValues:m,parsedInitialValues:(0,O.A)(d),noSearchResultsFiltersList:l,paginationParams:t.searchProps,forcedRange:f(o),holidayTarget:t.holidayTarget,fieldsDefResponse:e};n||(g.paginationHistory={1:"",...(0,I.oI)()??{}},g.paginationLinks=o.paginationLinks),c.A.searchForm.initialize(g),(0,s.r)(),u(),n||((0,T.R7)(d),(0,I.LH)(g.paginationHistory),S(o))}},81976(e,t,n){"use strict";n.d(t,{M:()=>f});var r=n(17272),i=n(73306),s;const a="ajax-loader",o="fixed-loader",l=100,c=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);let u=null;const d=(e,t)=>{if(!u)return c&&window.addEventListener("beforeunload",(()=>{clearTimeout(u)})),void(u=setTimeout((()=>p(e,t)),l))},p=(e,t)=>{if(null!==document.getElementById(a))return;const n=document.createElement("div");n.id=a;const r=[o];"string"==typeof e&&r.push(e),(t=!(!1===t))||r.push("non-blocking"),n.className=r.join(" "),document.body.appendChild(n)},h=()=>{clearInterval(u),u=null;const e=document.getElementById(a);null!==e&&s(e)},f=(e,t)=>{if((0,r.Im)(e))throw new Error("searchResultsUrl prop is not defined");const n=(0,i.Z)(t);d("",!0),window.location.href=`${e}?${n}`}},44950(e,t,n){"use strict";n.d(t,{_4:()=>p,o5:()=>h,tX:()=>u});var r=n(94450),i=n(71611),s=n(49865),a=n(94085),o=n(68118),l=n(7613);function c(e,t){if(!e||!t)return"";const n=r.wI.domainId===r.WI.InviaHu,a=n?(0,i.eW)():(0,i.of)(),o=n?(0,i.of)():(0,i.eW)(),l=void 0,c=void 0;return`${e.format(a)} - ${t?t.format(o):(0,s.T)("sf2_unlimited")}`}function u(e){let{startDate:t,endDate:n,duration:r}=e;const i=c(t,n),s=(0,o.qP)(r);return i.length>0&&s?`${i} · ${s}`:i}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{lengthFrom:r=t,lengthTo:i=n}=a.jt.get(e);return{duration:e,lengthFrom:r,lengthTo:i}}
2function p(e){let{countryId:t,daysCount:n}=e;const r=d(t?(0,o.fu)([t]):l.A.searchForm.getForcedRange());return n>=r.lengthFrom?r:n>0&&n<=6?d(a.Q6.Custom,n,n):d(n>=7?a.Q6.SevenFourteen:a.Q6.Flexible)}function h(e){let{startDate:t,endDate:n,lengthFrom:r,lengthTo:i,daysCount:s}=e;return t&&n?15!==r||i?r>0&&i>0?r===s&&i===s?d(a.Q6.Exact,r,i):r===i?d(a.Q6.Custom,r,i):3===r&&7===i?d(a.Q6.ThreeSeven):7===r&&14===i?d(a.Q6.SevenFourteen):5===r&&8===i?d(a.Q6.FiveEight):9===r&&12===i?d(a.Q6.NineTwelve):d(a.Q6.CustomRange,r,i):d(a.Q6.Flexible):d(a.Q6.MoreThanFourteen):d(a.Q6.Flexible)}},64058(e,t,n){"use strict";n.d(t,{H:()=>qe});var r=n(87387),i=n(92860),s=n(62724),a=n(7613),o=n(17272),l=n(49865),c=n(1811),u=n(82067),d=n(30140),p=n(85055),h=n(95853),f=n(68118),m=n(5539);const g=e=>{const t=a.A.searchForm.getFieldsDefResponse().fieldsDef,n=e?.filter((e=>e.startsWith(m.hR))),r=e?.filter((e=>e.startsWith(m.UK))).map((e=>t[c.I.nl_destination_id].options?.find((t=>v(t,e))).id));return[...n,...r].map((e=>Number(e.replace(m.hR,""))))},v=(e,t)=>e?.subOptions?.some((e=>e?.id===t||(e?.subOptions?v(e,t):void 0)));var _=n(5920),b=n(63142),y=n(73306);const x=(e,t,n,r,i,s,o,l)=>{const u=l??a.A.searchForm.getInitialSearchFormProps(),d={...a.A.searchForm.getFormValues(),[e]:t},p=(0,f.fu)(g(t));if(a.A.searchForm.setForcedRange(p),(0,_.F)(e,u,d,!0,s,o),null===u&&t.length>0){const s=(0,b.R)({[e]:t});e===c.I.nl_destination_id&&"function"==typeof r&&r(s,{[c.I.nl_destination_id]:n},!1,m.G$.Review);const a=s;a.serp=1,window.location.href=i+"?"+(0,y.Z)(a)}};var w=n(50798),k=n(30394),I=n(84772);const C={OTHER_COUNTRIES:"ostatni_zeme",TOP_COUNTRIES:"top_countries",NEARBY_COUNTRIES:"nearby_countries",CHOOSE_COUNTRY_OR_LOCALITY:"sf2_choose_country_or_locality",INPUT_PLACEHOLDER:"sf2_destination_input_placeholder",DOMESTIC_NOTHING_FOUND_CLAIM:"sf2_domestic_destination_picker_nothing_found_claim",EUROPE_NOTHING_FOUND_CLAIM:"sf2_europe_destination_picker_nothing_found_claim",DESTINATION_NOTHING_FOUND_CLAIM:"sf2_destination_picker_nothing_found_claim",DOMESTIC_MODAL_INPUT_PLACEHOLDER:"sf2_domestic_destination_picker_modal_input_placeholder",EUROPE_MODAL_INPUT_PLACEHOLDER:"sf2_europe_destination_picker_modal_input_placeholder",DESTINATION_MODAL_INPUT_PLACEHOLDER:"sf2_destination_picker_modal_input_placeholder",DOMESTIC_CALL_US_FOR_HELP:"sf2_domestic_call_us_for_help",EUROPE_CALL_US_FOR_HELP:"sf2_europe_call_us_for_help",CALL_US_FOR_HELP:"sf2_call_us_for_help",PHONE_NUMBER_LINK_HREF:"sf2_phone_number_link_href",PHONE_NUMBER:"sf2_phone_number",PHONE_NUMBER_LINK_HREF_WAKACYJNI_PIRACI:"sf2_phone_number_link_href_wakacyjni_piraci",PHONE_NUMBER_WAKACYJNI_PIRACI:"sf2_phone_number_wakacyjni_piraci",SUBITEMS:"sf2_subitems",NUMBER_OF_MATCHING_TERMS:"sf2_number_of_matching_terms"},A={loading:!0,result:void 0,error:void 0},E={initialState:()=>A,executeOnMount:!0,executeOnUpdate:!0,setLoading:e=>A,setResult:(e,t)=>({loading:!1,result:e,error:void 0}),setError:(e,t)=>({loading:!1,result:void 0,error:e})},S=(e,t,n)=>{const r=(d=n,{...E,...d}),s=(e=>{const[t,n]=(0,i.useState)(e.initialState);return{value:t,set:n,setLoading:()=>n(e.setLoading(t)),setResult:r=>n(e.setResult(r,t)),setError:r=>n(e.setError(r,t))}})(r),a=(()=>{const e=(0,i.useRef)(!1);return(0,i.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),()=>e.current})(),o=(()=>{const e=(0,i.useRef)(null);return{set:t=>e.current=t,get:()=>e.current,is:t=>e.current===t}})(),l=e=>a()&&o.is(e),c=()=>{const n=e(...t);return o.set(n),s.setLoading(),n.then((e=>{l(n)&&s.setResult(e)}),(e=>{l(n)&&s.setError(e)})),n},u=!a();var d;return(0,i.useEffect)((()=>{u?r.executeOnMount&&c():r.executeOnUpdate&&c()}),t),{...s.value,set:s.set,execute:c,currentPromise:o.get()}},T=(e,t,n)=>{const r=(0,i.useRef)();return S((async function(){r.current&&r.current.abort();const t=new AbortController;r.current=t;try{for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return await e(t.signal,...i)}finally{r.current===t&&(r.current=void 0)}}),t,n)};var O=n(47192),F=n.n(O);function j(e){var t=null,n=null,r=new Promise((function(e,r){t=e,n=r}));return e&&e.then((function(e){t&&t(e)}),(function(e){n&&n(e)})),{promise:r,resolve:function(e){t&&t(e)},reject:function(e){n&&n(e)},cancel:function(){t=null,n=null}}}function N(e){var t=null,n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t&&t();var i,s=j(e.apply(void 0,n)),a=s.promise,o=s.cancel;return t=o,a};return n}var D=function(){return D=Object.assign||function e(t){for(var n,r=1,i=arguments.length;r<i;r++)for(var s in n=arguments[r])Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s]);return t},D.apply(this,arguments)},M={key:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},onlyResolvesLast:!0},R=function(){function e(e){this.config=e,this.debounceSingleton=null,this.debounceCache={}}return e.prototype._createDebouncedFunction=function(){var e=F()(this.config.func,this.config.wait,this.config.options);return this.config.options.onlyResolvesLast&&(e=N(e)),{func:e}},e.prototype.getDebouncedFunction=function(e){var t,n=(t=this.config.options).key.apply(t,e);return null==n?(this.debounceSingleton||(this.debounceSingleton=this._createDebouncedFunction()),this.debounceSingleton):(this.debounceCache[n]||(this.debounceCache[n]=this._createDebouncedFunction()),this.debounceCache[n])},e}();function P(e,t,n){var r=D({},M,n),i=new R({func:e,wait:t,options:r}),s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n;return i.getDebouncedFunction(e).func.apply(void 0,e)};return s}const L=void 0,U=P(m.e6,450),H=e=>{let{setOptionsMaps:t,searchValue:n,holidayTarget:r,ignoreExcludedAutocomplete:s=!1,children:a}=e;const l=T((async e=>n.length<3?null:U(n,r,s,e)),[n,r,s]),c=!(0,o.Im)(l.result)&&(0,o.Im)(l.result.found)||!(0,o.Im)(l.loading);return(0,i.useEffect)((()=>{(0,o.Im)(l.result)||(0,o.Im)(l.result.found)||t(l.result.rawResults.cities,l.result.rawResults.hotels)}),[l.result,t]),a(l,c)};var B=n(34836),V=n(53206),z=n(24833);function $(e,t,n){let r=n.initialDeps??[],i;function s(){var s,a,o,l;
2let c;n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(c=Date.now());const u=e(),d=void 0;if(u.length===r.length&&!u.some(((e,t)=>r[t]!==e)))return i;let p;if(r=u,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(p=Date.now()),i=t(...u),n.key&&(null==(o=n.debug)?void 0:o.call(n))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-p))/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%câ± ${i(t,5)} /${i(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}return s.updateDeps=e=>{r=e},s}function W(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}const q=(e,t)=>Math.abs(e-t)<1,Y=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,i)),n)}};var G;const K=e=>e,J=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},X=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver((t=>{const r=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(n.getBoundingClientRect())};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()}));return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},Q={passive:!0},Z=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=()=>{t({width:n.innerWidth,height:n.innerHeight})};return r(),n.addEventListener("resize",r,Q),()=>{n.removeEventListener("resize",r)}},ee="undefined"==typeof window||"onscrollend"in window,te=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const s=e.options.useScrollendEvent&&ee?()=>{}:Y(r,(()=>{t(i,!1)}),e.options.isScrollingResetDelay),a=r=>()=>{const{horizontal:a,isRtl:o}=e.options;i=a?n.scrollLeft*(o?-1:1):n.scrollTop,s(),t(i,r)},o=a(!0),l=a(!1);l(),n.addEventListener("scroll",o,Q);const c=e.options.useScrollendEvent&ⅇreturn c&&n.addEventListener("scrollend",l,Q),()=>{n.removeEventListener("scroll",o),c&&n.removeEventListener("scrollend",l)}},ne=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const s=e.options.useScrollendEvent&&ee?()=>{}:G(r,(()=>{t(i,!1)}),e.options.isScrollingResetDelay),a=r=>()=>{i=n[e.options.horizontal?"scrollX":"scrollY"],s(),t(i,r)},o=a(!0),l=a(!1);l(),n.addEventListener("scroll",o,Q);const c=e.options.useScrollendEvent&ⅇreturn c&&n.addEventListener("scrollend",l,Q),()=>{n.removeEventListener("scroll",o),c&&n.removeEventListener("scrollend",l)}},re=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){const t=void 0;return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},ie=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;const a=e+t;null==(s=null==(i=r.scrollElement)?void 0:i.scrollTo)||s.call(i,{[r.options.horizontal?"left":"top"]:a,behavior:n})},se=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;const a=e+t;null==(s=null==(i=r.scrollElement)?void 0:i.scrollTo)||s.call(i,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class ae{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{const t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()}))})):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:K,rangeExtractor:J,onChange:()=>{},measureElement:re,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=$((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>
2{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}}
2,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let i=t-1;i>=0;i--){const t=e[i];if(n.has(t.lane))continue;const s=r.get(t.lane);if(null==s||t.end>s.end?r.set(t.lane,t):t.end<s.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=$((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,n,r,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i})),{key:!1}),this.getMeasurements=$((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const o=this.measurementsCache.slice(0,a);for(let i=a;i<e;i++){const e=r(i),a=1===this.options.lanes?o[i-1]:this.getFurthestMeasurement(o,i),l=a?a.end+this.options.gap:t+n,c=s.get(e),u="number"==typeof c?c:this.options.estimateSize(i),d=l+u,p=a?a.lane:i%this.options.lanes;o[i]={index:i,start:l,size:u,end:d,key:e,lane:p}}return this.measurementsCache=o,o}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=$((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes]),((e,t,n,r)=>this.range=e.length>0&&t>0?le({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null),{key:!1,debug:()=>this.options.debug}
2),this.getVirtualIndexes=$((()=>{let e=null,t=null;const n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]}),((e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;const i=r.key,s=this.elementsCache.get(i);s!==e&&(s&&this.observer.unobserve(s),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const r=void 0,i=t-(this.itemSizeCache.get(n.key)??n.size);0!==i&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=$((()=>
2[this.getVirtualIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,i=e.length;r<i;r++){const i=void 0,s=t[e[r]];n.push(s)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return W(t[oe(0,t.length-1,(e=>W(t[e]).start),e)])},this.getOffsetForAlignment=(e,t,n=0)=>{const r=this.getSize(),i=this.getScrollOffset();"auto"===t&&(t=e>=i+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r);const s=this.options.horizontal?"scrollWidth":"scrollHeight",a=void 0,o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-r;return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const r=this.getSize(),i=this.getScrollOffset();if("auto"===t)if(n.end>=i+r-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}const s="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(e,t);if(!r)return;const[i,s]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;const t=void 0;if(this.elementsCache.has(this.options.getItemKey(e))){const[t]=W(this.getOffsetForIndex(e,s));q(t,this.getScrollOffset())||this.scrollToIndex(e,{align:s,behavior:n})}else this.scrollToIndex(e,{align:s,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adju
2stments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;if(0===t.length)n=this.options.paddingStart;else if(1===this.options.lanes)n=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let r=t.length-1;for(;r>=0&&e.some((e=>null===e));){const n=t[r];null===e[n.lane]&&(e[n.lane]=n.end),r--}n=Math.max(...e.filter((e=>null!==e)))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const oe=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else{if(!(s>r))return i;t=i-1}}return e>0?e-1:0};function le({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const i=e.length-1,s=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let a=oe(0,i,s,n),o=a;if(1===r)for(;o<i&&e[o].end<n+t;)o++;else if(r>1){const s=Array(r).fill(0);for(;o<i&&s.some((e=>e<n+t));){const t=e[o];s[t.lane]=t.end,o++}const l=Array(r).fill(n+t);for(;a>=0&&l.some((e=>e>=n));){const t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%r),o=Math.min(i,o+(r-1-o%r))}return{startIndex:a,endIndex:o}}var ce,ue,de;const pe="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function he(e){const t=i.useReducer((()=>({})),{})[1],n={...e,onChange:(n,r)=>{var i;r?(0,z.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,r)}},[r]=i.useState((()=>new ae(n)));return r.setOptions(n),pe((()=>r._didMount()),[]),pe((()=>r._willUpdate())),r}function fe(e){return he({observeElementRect:X,observeElementOffset:te,scrollToFn:se,...e})}function me(e){return he({getScrollElement:()=>"undefined"!=typeof document?window:null,observeElementRect:ce,observeElementOffset:ue,scrollToFn:de,initialOffset:()=>"undefined"!=typeof document?window.scrollY:0,...e})}var ge=n(37057),ve=n(52397),_e=n(13256),be=n(91280),ye=n(93426),xe=n(12868),we=n(38048);function ke(e){return[e.s_city,e.s_locality,e.s_country].filter(Boolean).join(", ")}function Ie(e){const{label:t,extra:n}=e;return(0,o.Im)(n)?(0,we.jsx)(we.Fragment,{children:t}):(0,we.jsxs)(we.Fragment,{children:[(0,we.jsx)("span",{className:"hotelDestinationLabel",children:t}),(0,we.jsx)(Ce,{stars:n.nl_stars}),(0,we.jsx)("span",{className:"hotelDestinationLocation",children:ke(n)})]})}function Ce(e){const{stars:t}=e;return t<1?null:(0,we.jsxs)("span",{className:"hotelDestinationStars",children:[Array.from({length:t}).map(((e,t)=>(0,we.jsx)(ye.U,{wrapperClass:"i-hotel-autocomplete__star",icon:xe.LZ.star,width:8,height:8},t))),(0,we.jsx)("span",{className:"u-vhide",children:(0,we.jsx)(h.s,{id:"star_v2",values:{count:t}})})]})}const Ae=34,Ee=3,Se=(0,i.forwardRef)(((e,t)=>{const{groupID:n,virtualIndex:r,indeterminate:i,checked:s,onCheck:a,onCollapse:o,isReviewsForm:l,optionsCount:c,style:u,node:{id:d,depth:p,separator:h,uniqueGeneratedId:f,icon:m,value:g,hasChildren:v,collapsed:_,extra:b,highlight:y,headingLevel:x}}=e,w=void 0,k={"data-index":r,className:"b-destinations__virtualized-item",style:{marginLeft:(p-1)*Ae,...u}};return h?(0,we.jsx)("div",{ref:t,...k,role:"presentation",children:(0,we.jsx)(ge.D,{id:`labelGroupSeparator-${n}-${f}`,headingLevel:x??3,icon:m??"",className:"b-checkbox-list-group__heading","aria-label":g,children:g})}):(0,we.jsx)("div",{ref:t,...k,role:v?"tree":"treeitem",...v&&{"aria-expanded":!_},"aria-label":g,children:(0,we.jsx)(Te,{isReviewsForm:l,id:f,nodeId:d,label:(0,we.jsx)(Ie,{label:g,extra:b}),hasChildren:v,checked:s,indeterminate:i,collapsed:_,onCollapse:()=>o(f||d,_),onCheck:a,optionsCount:c,highlight:y,icon:m})})}));function Te(e){let{isReviewsForm:t=!1,id:n,nodeId:r,label:s,hasChildren:a,checked:o,indeterminate:c,collapsed:u,onCollapse:d,onCheck:p,highlight:h,icon:f,optionsCount:m}=e;const g=(0,i.useId)(),v=(0,i.useId)(),_=(0,i.useId)(),b=a&&(0,we.jsx)(ve.$w,{labelSR:(0,l.T)(C.SUBITEMS),describedBySR:g,onClick:e=>{e.stopPropagation(),d()},expanded:!u});return t?(0,we.jsx)(_e.a,{label:s,append:b,onClick:e=>{e.preventDefault(),p(r,!0)}}):(0,we.jsx)(be.v,{name:`${n}[]`,value:r,label:s,labelId:g,checkboxId:v,checked:o||c,indeterminate:c,onChange:e=>{p(e.target.value,e.target.checked)},labelBold:h,itemsCount:o?null:m,itemsSRLabel:(0,l.T)(C.NUMBER_OF_MATCHING_TERMS),itemsCountId:_,disabled:!o&&0===m,icon:f,children:b})}Se.displayName="VirtualDestinationsRow";const Oe=34;function Fe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=!n.includes(t?.uniqueGeneratedId?t.uniqueGeneratedId:t.id),s=t?.subOptions?.length>0,a=(0,o.Im)(t?.id)?(0,V.nW)(t.value):t.id;if(e.push({...t,id:a,hasChildren:s,depth:r,collapsed:i}),!i&&s)for(const i of t.subOptions)Fe(e,i,n,r+1)}function je(e,t){const n=[];for(const r of e)Fe(n,r,t);return n}function Ne(e){const t=[];for(const n of e){const e=void 0;if(n?.subOptionsDropdownIsOpen&&!n?.subOptionsDropdown){t.push(n.id);const e=Ne(n.subOptions);t.push(...e)}}return[...new Set(t)]}function De(e){const{id:t,options:n,optionsMap:r,checkedOptions:s=[],onCheck:a,isReviewsForm:o}=e,[l,c]=(0,i.useState)((()=>Ne(n))),u=i.useMemo((()=>je(n,l)),[n,l]),d=e=>u[e].id||u[e].uniqueGeneratedId,p=(e,t)=>{c((n=>t?[...n,e]:n.filter((t=>t!==e))))},h=(0,i.useRef)(null),f=fe({count:u.length,getScrollElement:()=>h.current,estimateSize:()=>Oe,horizontal:!1}),m=f.getVirtualItems();return(0,we.jsx)("div",{className:"b-destinations__virtualized-list",ref:h,children:(0,we.jsx)("div",{style:{height:f.getTotalSize(),width:"100%",position:"relative"},children:(0,we.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${m[0]?.start??0}px)`},children:m.map((e=>(0,we.jsx)(Se,{ref:f.measureElement,virtualIndex:e.index,node:u[e.index],groupID:t,indeterminate:(0,I.ew)(r,d(e.index),s),checked:s.includes(d(e.index)),onCheck:a,onCollapse:p,isReviewsForm:o},e.key)))})})})}const Me=e=>e.reduce(((e,t)=>[...e,...t.options]),[]),Re=[m.G4,m._M],Pe=e=>{const t=e.substring(0,e.indexOf("_")+1);return Re.indexOf(t)>-1},Le=e=>e.reduce(((e,t)=>Pe(t)?(e.citiesAndHotels.push(t),e):(e.localities.push(t),e)),{citiesAndHotels:[],localities:[]}),Ue=(e,t,n,r,i)=>{const{citiesAndHotels:s,localities:a}=Le(r);
2if(Pe(e)){const n=i.computeQueryValueForState(a);return t?[...n,e,...s]:(s.splice(s.indexOf(e),1),[...n,...s])}const o=!(t||!(0,I.ew)(n,e,r))||t,l=void 0;return[...i.computeQueryValue(a,e,o),...s]},He=(e,t,n)=>{const{citiesAndHotels:r}=Le(t);let i=(0,o.Im)(e)?"":e;for(const e of n)r.includes(e.id.toString())&&((0,o.Im)(i)||(i+=", "),i+=e.label);return i},Be=e=>{const t={...e,uniqueGeneratedId:B.q.getNext()};return e?.subOptions&&(t.subOptions=e?.subOptions.map(Be)),t},Ve=e=>{const t=e.filter((e=>void 0!==e.order)),n=e.filter((e=>void 0===e.order)),r=(e,t)=>e.value.localeCompare(t.value);return[...t.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:r(e,t))),...n.sort(r)]},ze=(e,t,n)=>t&&t.length>0?[{value:n,separator:!0,id:(0,V.nW)(n)},...Ve(t),{value:(0,l.T)(C.OTHER_COUNTRIES),separator:!0,id:(0,V.nW)((0,l.T)(C.OTHER_COUNTRIES))},...e].map(Be):e.map(Be),$e=void 0,We=e=>{const{options:t,topDestinationsOptions:n,topDestinationsLabel:r=(0,l.T)(C.TOP_COUNTRIES),search:s,fieldName:a,id:c,values:u,onCheckboxChange:d,optionsMap:p,isReviewsForm:h}=e,f=(0,o.Im)(s.result)||(0,o.Im)(s.result.found)?null:s.result.parsedResults,m=(0,i.useMemo)((()=>ze(t,n,r)),[t,n,r]),g=(0,i.useRef)(new I.uW(p)),v=(e,t)=>
2{const n=void 0,r=Ue(e,t,p,h?[]:u,g.current);d(a,r)};return(0,we.jsx)(De,{id:c,onCheck:v,options:null!==f?f:m,optionsMap:p,checkedOptions:u,isReviewsForm:h})};class qe extends i.Component{fieldName=(()=>c.I.nl_destination_id)();static defaultProps={isReviewsForm:!1};constructor(e){super(e);const t=a.A.searchForm.getFormValues()[c.I.nl_destination_id]?a.A.searchForm.getFormValues()[c.I.nl_destination_id]:[];this.optionsMap=(0,I.sc)(this.props.destinationField?.options);const n=(0,I.u4)(t,this.optionsMap),r=this.generateDestinationsTags(t,!0),i=(0,w.r)(this.props.destinationField?.options,t);this.state={values:n,tagList:r,valuesBefore:n,tagListBefore:r,popupState:p.fU.Closed,searchValue:"",mobileSelectedDestinationsExpanded:!1,textboxValue:He(i,n,r),selectedDestinations:i,checkedOptions:t},this.checkProcessor=new I.uW(this.optionsMap),this.topDestinationsOptions=this.props.destinationField?.options.filter((e=>e.topDestination)),this.generateDestinationsTags=this.generateDestinationsTags.bind(this),this.onCheckboxChange=this.onCheckboxChange.bind(this),this.setOptionsMaps=this.setOptionsMaps.bind(this),this.getOptionFromAllMaps=this.getOptionFromAllMaps.bind(this)}componentDidUpdate(e){(0,s.A)(e.checkedOptions,this.props.checkedOptions)||this.updateDestinations(this.props.checkedOptions),(0,s.A)(this.state.checkedOptions,a.A.searchForm.getFormValues()[c.I.nl_destination_id])||this.updateDestinations(a.A.searchForm.getFormValues()[c.I.nl_destination_id]??[])}updateDestinations(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,w.r)(this.props.destinationField?.options,e),n=this.generateDestinationsTags(e,!1),r=(0,I.u4)(e,this.optionsMap);if((0,o.Im)(e))return this.setState({searchValue:"",values:[],tagList:[],textboxValue:"",checkedOptions:[]}),void a.A.searchForm.setFormValues({...a.A.searchForm.getFormValues(),[c.I.nl_destination_id]:[]});a.A.searchForm.setFormValues({...a.A.searchForm.getFormValues(),[c.I.nl_destination_id]:e}),this.setState({tagList:n,values:r,checkedOptions:e,selectedDestinations:t,textboxValue:He(t,e,n)})}setOptionsMaps(e,t){this.citiesOptionsMap=(0,I.sc)([...e.options,...e.similarOptions]),this.hotelsOptionsMap=(0,I.sc)([...t.options,...t.similarOptions])}getOptionFromAllMaps(e){const t=[this.optionsMap,this.citiesOptionsMap,this.hotelsOptionsMap];for(const n of t)if(!(0,o.Im)(n)){const t=n.get(e);if(!(0,o.Im)(t))return t}return null}onTagClick(e,t){const{values:n,tagList:r}=this.state,{citiesAndHotels:i,localities:s}=Le(n),a=Pe(t)?s:(0,I.u4)(this.checkProcessor.computeQueryValue(s,t,!1),this.optionsMap),o=Pe(t)?i.filter((e=>e!==t)):i;this.setState({values:[...a,...o],tagList:r.filter((e=>e.id!==t))})}onCheckboxChange(e,t){const n=(0,I.u4)(t,this.optionsMap);this.setState({values:n,tagList:this.generateDestinationsTags(t)}),this.props.isReviewsForm&&this.submit(n)}generateDestinationsTags(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[];if(!(0,o.Im)(e)){const t=this.state&&this.state.tagList?this.state.tagList:[],r=[];for(const i of t)e.includes(`${i.id}`)&&(n.push(i),r.push(`${i.id}`));for(const t of e)if(!r.includes(t)){const e=this.getOptionFromAllMaps(t);(0,o.Im)(e)||n.push({id:t,type:k.b[e.type],label:e.label,onToggle:this.onTagClick.bind(this)})}}if(t&&!(0,o.Im)(this.props?.searchFormProps?.initialLabelsForCitiesAndHotels))for(const e of Object.keys(this.props.searchFormProps.initialLabelsForCitiesAndHotels))n.push({id:e,label:this.props.searchFormProps.initialLabelsForCitiesAndHotels[e],onToggle:this.onTagClick.bind(this)});return n}onReset(){this.setState({searchValue:"",values:[],tagList:[]},(()=>{const e=this.checkProcessor.computeQueryValueForState([]);x(this.fieldName,e,this.props.destinationField,this.props.destinationClickCallback,this.props.searchResultsUrl,void 0,this.props.trackingOrigin,this.props.searchFormProps)})),this.setState({popupState:p.fU.Closed})}onClose(){const{valuesBefore:e,tagListBefore:t}=this.state;this.setState({searchValue:"",values:e,tagList:t}),this.setState({popupState:p.fU.Closed})}onOpen(){const{values:e,tagList:t}=this.state;this.setState({valuesBefore:e,tagListBefore:t,mobileSelectedDestinationsExpanded:!1})}submit(e){const{citiesAndHotels:t,localities:n}=Le(e),r=this.checkProcessor.computeQueryValueForState(n);x(this.fieldName,[...t,...r],this.props.destinationField,this.props.destinationClickCallback,this.props.searchResultsUrl,void 0,this.props.trackingOrigin,this.props.searchFormProps),this.setState({searchValue:"",popupState:p.fU.Closed})}onSubmit(){this.submit(this.state.values)}handlePopupStateChange(e){this.setState({popupState:e}),e===p.fU.Edit&&this.onOpen()}getSearchResultsOptionsCount(e){let t=0;if(!(0,o.Im)(e.result)&&e.result.found)for(const n of Object.keys(e.result.rawResults))t+=Array.isArray(e.result.rawResults[n].options)?e.result.rawResults[n].options.length:0;return t}getNotFoundTextBody(){const{holidayTarget:e}=this.props;let t;switch(e){case m.mn.DOMESTIC:t=C.DOMESTIC_CALL_US_FOR_HELP;break;case m.mn.EUROPE:t=C.EUROPE_CALL_US_FOR_HELP;break;default:t=C.CALL_US_FOR_HELP}let n=C.PHONE_NUMBER_LINK_HREF,r=C.PHONE_NUMBER;return window.location.hostname.includes("wakacyjnipiraci")&&(n=C.PHONE_NUMBER_LINK_HREF_WAKACYJNI_PIRACI,r=C.PHONE_NUMBER_WAKACYJNI_PIRACI),(0,we.jsx)("p",{children:(0,we.jsx)(h.s,{id:t,values:{phoneNumber:(0,we.jsx)("strong",{children:(0,we.jsx)("a",{href:(0,l.T)(n),className:"b-destinations__link",children:(0,we.jsx)(h.s,{id:r})})})}})})}render(){const{isMobile:e,destinationField:t,holidayTarget:n,inputIconName:r,inputPlaceholderText:i,modalInputPlaceholderText:s,isReviewsForm:c}=this.props,{values:h,textboxValue:f,tagList:g,popupState:v,searchValue:_,mobileSelectedDestinationsExpanded:b}=this.state,y=(0,we.jsx)(u.o,{name:"destination_picker",label:t.label,placeholder:i||(0,l.T)(C.INPUT_PLACEHOLDER),value:f,onChange:()=>{},"data-testid":"sf-destination-picker-textbox"}),x=c?[]:g,w=(0,we.jsx)(d.Tp,{displayFullLabels:!0,tags:x});return(0,we.jsx)(H,{setOptionsMaps:this.setOptionsMaps,searchValue:_,holidayTarget:n,ignoreExcludedAutocomplete:this.props.ignoreExcludedAutocomplete,children:(i,u)=>{const d=u?null:(0,we.jsx)(We,{isReviewsForm:c,label:t.label,options:t.options,fieldName:this.fieldName,id:t.
2id,values:h,search:i,onCheckboxChange:this.onCheckboxChange,topDestinationsOptions:this.topDestinationsOptions,optionsMap:this.optionsMap,topDestinationsLabel:n===m.mn.ACCOMMODATION?`${(0,l.T)(C.NEARBY_COUNTRIES)}:`:`${(0,l.T)(C.TOP_COUNTRIES)}:`});return(0,we.jsx)(p.jq,{label:(0,l.T)(C.CHOOSE_COUNTRY_OR_LOCALITY),isMobile:e,isReviewsForm:c,inputIconName:r,popupState:v,onPopupStateChange:e=>this.handlePopupStateChange(e),inputDestination:y,searchValue:_,searchOnChange:e=>{this.setState({searchValue:e.target.value})},searchOnFocus:()=>{this.setState({mobileSelectedDestinationsExpanded:!1,searchValue:""})},selectedDestinationsTags:w,destinationsTree:d,destinationsTreeVirtualized:!0,destinationsMatchesCountSR:this.getSearchResultsOptionsCount(i),isLoading:u&&!(0,o.Im)(i.loading),notFound:u&&!(0,o.Im)(i.result)&&(0,o.Im)(i.result.found),notFoundOnClick:e=>{this.setState({mobileSelectedDestinationsExpanded:!1,searchValue:e})},notFoundTextHeading:this.getNotFoundTextHeading(n),notFoundTextBody:this.getNotFoundTextBody(),mobileSelectedDestinationsExpanded:b,mobileToggleSelectedDestinationsOnClick:()=>{this.setState({mobileSelectedDestinationsExpanded:!b})},onClickOutside:()=>this.onSubmit(),onEscPress:()=>this.onSubmit(),onDesktopClose:()=>this.onSubmit(),onMobileGoBack:()=>this.onClose(),onSubmit:()=>this.onSubmit(),onReset:()=>this.onReset(),searchFormType:a.A.mainContext.getSearchFormType(),viewportWidthSize:a.A.mainContext.getViewportWidthSize(),searchBoxPlaceholder:s||this.getModalInputPlaceholder(n)})}})}getNotFoundTextHeading(e){let t;switch(e){case m.mn.DOMESTIC:t=C.DOMESTIC_NOTHING_FOUND_CLAIM;break;case m.mn.EUROPE:t=C.EUROPE_NOTHING_FOUND_CLAIM;break;default:t=C.DESTINATION_NOTHING_FOUND_CLAIM}return(0,we.jsx)(h.s,{id:t})}getModalInputPlaceholder(e){let t;switch(e){case m.mn.DOMESTIC:t=C.DOMESTIC_MODAL_INPUT_PLACEHOLDER;break;case m.mn.EUROPE:t=C.EUROPE_MODAL_INPUT_PLACEHOLDER;break;default:t=C.DESTINATION_MODAL_INPUT_PLACEHOLDER}return(0,l.T)(t)}}},4454(e,t,n){"use strict";n.d(t,{A:()=>m});var r=n(92860),i=n(35240),s=n(17272),a=n(49865),o=n(34836),l=n(18095),c=n(66424),u=n(2375),d=n(38048);const p=(e,t)=>(0,u.Fr)((0,a.T)("from_value",{value:e}),(0,a.T)("to_value",{value:t})),h=(0,i.A)(((e,t,n,r)=>{let i=0;return n!==e&&i++,r!==t&&i++,i})),f=void 0,m=e=>{let{label:t,isOpen:n,disabled:i,min:a,max:f,step:m,valuesList:g,valueFormatter:v,minHandleValue:_,minHandleOnChange:b,minHandleOnRelease:y,minHandleIcon:x,maxHandleValue:w,maxHandleOnChange:k,maxHandleOnRelease:I,maxHandleIcon:C,plpClickName:A,plpClickTextBuilder:E}=e;const S=(0,r.useMemo)((()=>o.q.getNext()),[]),T=(0,r.useMemo)((()=>g?Math.min(...g):a),[g,a]),O=(0,r.useMemo)((()=>g?Math.max(...g):f),[g,f]),F=e=>(0,s.Im)(a,!1)||(0,s.Im)(f,!1)?e:e<a?a:e>f?f:e,j=F(_),N=F(w),D=(0,r.useCallback)(((e,t)=>{void 0!==A&&(0,u.lE)({section:u.qO.Filters,clickType:u.TD.Slider,clickText:(E??p)(e,t),clickName:A,clickTextIsNormalized:!0})}),[A,E]),M=(0,r.useCallback)((e=>{D(e,N),y?.(e)}),[D,N,y]),R=(0,r.useCallback)((e=>{D(j,e),I?.(e)}),[D,j,I]);return(0,d.jsx)(c.A,{label:t,labelId:S,isOpen:!!n,notificationsCount:h(T,O,_,w),plpClickName:A,children:(0,d.jsx)(l.U,{min:a,max:f,step:m,minHandleValue:j>N?N:j,maxHandleValue:N,valuesList:g,labelledBy:S,disabled:i,valueFormatter:v,minHandleOnChange:b,minHandleOnRelease:M,minHandleIcon:x,maxHandleOnChange:e=>{(0,s.Im)(a,!1)?k(e):k(e<=a?a+1:e)},maxHandleOnRelease:R,maxHandleIcon:C})})}},86542(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(87387),i=n.n(r),s=n(92860),a=n(17272),o=n(12868),l=n(49865),c=n(64060),u=n(4454),d=n(2375),p=n(38048);const h=[1,2,3,4,5],f=[{value:1,min:1,max:1.9},{value:4,min:2,max:2.9},{value:6,min:3,max:3.9},{value:8,min:4,max:4.7},{value:10,min:4.8,max:5}],m=e=>{let{fieldDef:t,isOpen:n,minStateValue:r,maxStateValue:i,minHandleOnChange:m,maxHandleOnChange:g,releaseHandler:v}=e;const[_,b]=(0,s.useState)([]),[y,x]=(0,s.useState)({}),[w,k]=(0,s.useState)(0),[I,C]=(0,s.useState)(0),[A,E]=(0,s.useState)([]),S=e=>{const t={},n=[],r=t=>e.find((e=>e.id===t));f.forEach((e=>{n.push(e.value);const i=r(e.value.toString());if(!i)return t[e.value]={min:e.min.toString(),max:e.max.toString()},void(0,c.OP)(`SearchFormSmileySlider: Option with key ${e.value} is missing in fieldDef.options`);const s=e=>i.value.replace(/\d+/,e);t[e.value]={min:s((0,l.T)("from_value",{value:e.min})),max:s((0,l.T)("to_value",{value:e.max}))}})),x(t),b(n),E(n.map(((e,t)=>
2h[Math.floor(t/n.length*h.length)]))),k(Math.max(...n)),C(Math.min(...n))};(0,s.useEffect)((()=>{S(t.options)}),[t.options]);const T=(0,s.useMemo)((()=>!(0,a.Im)(r,!1)&&_.includes(r)?r:I),[r,_,I]),O=(0,s.useMemo)((()=>!(0,a.Im)(i,!1)&&_.includes(i)?i:w),[i,_,w]),F=(0,s.useCallback)(((e,t)=>(0,d.Fr)((0,l.T)("from_value",{value:f.find((t=>t.value===e))?.min??e}),(0,l.T)("to_value",{value:f.find((e=>e.value===t))?.max??t}))),[]);return _.length>0&&(0,p.jsx)(u.A,{label:t.label,isOpen:!!n,valuesList:_,valueFormatter:(e,t)=>y[e][t],minHandleValue:T??0,maxHandleValue:O??2,minHandleOnChange:m,maxHandleOnChange:g,minHandleOnRelease:v,maxHandleOnRelease:v,minHandleIcon:o.LZ[`emotion${A[_.indexOf(T)]}`],maxHandleIcon:o.LZ[`emotion${A[_.indexOf(O)]}`],plpClickName:"hotel_rating",plpClickTextBuilder:F})},g=s.memo(m)},66424(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(92860),i=n(33538),s=n(34836),a=n(49865),o=n(2375),l=n(38048);const c=void 0,u=e=>{let{label:t,labelId:n,isOpen:c=!1,notificationsCount:u=0,headerTooltipText:d,plpClickName:p,children:h}=e;const[f,m]=(0,r.useState)(c),g=(0,r.useMemo)((()=>s.q.getNext()),[]),v=(0,r.useCallback)((e=>{e.preventDefault(),void 0!==p&&(0,o.lE)({section:o.qO.Filters,clickType:f?o.TD.Collapse:o.TD.Expand,clickText:"",clickName:p}),m((e=>!e))}),[f,p]);return(0,l.jsx)(i.E,{label:t,labelId:n||g,headingLevel:3,isExpandable:!0,isExpanded:f,onToggle:v,notificationsCount:u,notificationsSRLabel:(0,a.T)("sf2_chosen_items_count"),tooltipText:d,children:h})}},22643(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(87387),i=n(92860),s=n(34836),a=n(95853),o=n(62724),l=n(38048);const c=e=>{const[t,n]=(0,i.useState)(e.selectedValues),r=(0,i.useRef)(e.selectedValues);(0,i.useEffect)((()=>{(0,o.A)(r.current,e.selectedValues)||(n(e.selectedValues),r.current=e.selectedValues)}),[e.selectedValues]);const s=()=>{const e=[];for(let n=1;n<=5;n++)e.push((0,l.jsx)(u,{starsCount:n,selected:t.indexOf(n)>-1,onClick:e=>a(e,n)},n));return e},a=(n,r)=>{let i;i=t.indexOf(r)>-1?t.filter((e=>e!==r)):[...t,r].sort(),e.onChange(i,r)};return(0,l.jsx)("div",{role:"group",className:"i-hotel-rating-select","aria-labelledby":e.labelledBy,children:s()})},u=e=>{const t=()=>{const t=[];for(let r=1;r<=e.starsCount;r++)t.push(n("i-hotel-rating-select__preview-svg",r));return(0,l.jsx)("span",{className:"i-hotel-rating-select__preview",children:t})},n=(e,t)=>(0,l.jsx)("svg",{width:"43",height:"43",viewBox:"0 0 43 43",className:e,focusable:"false","aria-hidden":"true",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.5 3l6.01 12.18 13.44 1.95-9.72 9.48L33.52 40 21.5 33.68 9.48 40l2.29-13.39-9.72-9.48 13.44-1.95L21.5 3z"})},t);return(0,l.jsxs)("button",{type:"button",className:"i-hotel-rating-select__button",onClick:t=>e.onClick(t),"aria-pressed":e.selected,children:[(0,l.jsx)("span",{className:"i-hotel-rating-select__count",children:e.starsCount}),(0,l.jsx)("span",{className:"u-vhide",children:(0,l.jsx)(a.s,{id:"star_wo_num_v2",values:{count:e.starsCount}})}),n("i-hotel-rating-select__svg"),t()]})};var d=n(66424),p=n(2375);const h=e=>{let{label:t,selectedValues:n,onChange:r,isOpen:a=!1}=e;const o=i.useMemo((()=>s.q.getNext()),[]),u=i.useCallback(((e,t)=>{if(void 0!==t){const n=e.includes(t);(0,p.lE)({section:p.qO.Filters,clickType:(0,p._g)(n),clickText:String(t),clickName:"hotel_standard",buttonState:(0,p.el)(n)})}r(e,t)}),[r]);return(0,l.jsx)(d.A,{label:t,labelId:o,notificationsCount:n.length,isOpen:a,plpClickName:"hotel_standard",children:(0,l.jsx)(c,{labelledBy:o,selectedValues:n,onChange:u})})},f=i.memo(h)},93198(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(87387),i=n.n(r),s=n(92860),a=n(34119),o=n(12868),l=n(39889),c=n(36999),u=n(64457),d=n(49865),p=n(46872),h=n(66104),f=n(2375),m=n(38048);const g=e=>{let{label:t,options:n,value:r,onChange:i,gtmCategory:g,gtmDimension:v}=e;const _=n.find((e=>e.id===r))||n[0],[b,y]=(0,s.useState)(!1),x=(0,s.useCallback)((()=>{y(!1)}),[y]);return(0,s.useEffect)((()=>(document.addEventListener("click",x),()=>{document.removeEventListener("click",x)})),[x]),(0,m.jsx)("div",{className:["m-sorting","u-mb-xs",b&&"is-opened"].filter((e=>e)).join(" "),children:(0,m.jsxs)("div",{className:"m-sorting__inner",children:[(0,m.jsx)("div",{className:"m-sorting__title",children:t}),(0,m.jsx)(a.$n,{modifier:"m-sorting__link",iconAfter:!0,iconName:o.LZ.chevronDown,iconSize:"sm",label:_.value,variant:"link",onClick:e=>{e.nativeEvent.stopImmediatePropagation(),(0,f.lE)({section:f.qO.Top,clickType:f.TD.OpenList,clickText:_.value,clickName:"sort"}),y(!0)}}),b&&(0,m.jsx)("div",{className:"m-sorting__wrap",children:(0,m.jsx)("ul",{className:"m-sorting__list",children:n.map((e=>(0,m.jsx)("li",{className:"m-sorting__item",children:(0,m.jsx)(a.$n,{fullWidth:!0,variant:"link",modifier:["m-sorting__link",e===_&&"is-active"].filter((e=>e)).join(" "),label:_===e?(0,m.jsx)(l.zG,{iconName:o.LZ.check1,size:"sm",title:e.value,iconAfter:!0}):e.value,onClick:()=>{(0,f.lE)({section:f.qO.Top,clickType:f.TD.ButtonLink,clickText:e.value,clickName:"sort"}),i(e.id),w(e.value)}})},e.id)))})})]})});function w(e){const t={event:"trackEvent",eventCategory:g,eventAction:(0,d.T)("sf2_sort_verb"),nonInteraction:!1,eventLabel:e,...v?JSON.parse(v):{}};(0,c.XM)(t);const n=(0,p.E)();let r="sort",i=!1;("REVIEW_HP"===n||h.UH.includes(n))&&(r="sort_reviews",i=!0);const s={event:r,event_action:(0,d.T)("sf2_sort_verb"),event_label:e,non_interaction:i,analytics:"ga4"};(0,u.B)(s)}},v=s.memo(g)},70299(e,t,n){"use strict";n.d(t,{D:()=>d});var r=n(92860),i=n(17272),s=n(49865),a=n(5419),o=n(13504),l=n(82978),c=n(38048);function u(e){let{offset:t}=e;const n=(0,o.e)((e=>!(0,i.Im)((0,l.n)(e.fieldsDefResponse.fieldsDef.payment_options.fields)))),[u,d]=(0,r.useState)(n),p=(0,r.useRef)(0);return(0,r.useEffect)((()=>(d(n),p.current=window.setTimeout((()=>{d(!1)}),8e3),()=>{window.clearTimeout(p.current)})),[n]),(0,c.jsxs)(a.m,{isOpen:u,placement:"bottom",offset:t,disableEvents:!0,children:[(0,c.jsx)(a.m.Target,{children:(0,c.jsx)("div",{})}),(0,c.jsx)(a.m.Content,{id:"ui-tooltip-online-reservation-switch",style:{zIndex:1e3},children:(0,s.T)("sf2_online_booking_tours_displayed_only_notification")})]})}const d=r.memo(u)}
2,46915(e,t,n){"use strict";n.d(t,{L:()=>s});var r=n(92860),i=n(24833);const s=e=>{const{children:t,container:n,replaceContainer:s,clickEvent:a,isVisible:o,isLoading:l}=e,[c,u]=r.useState(!s);return r.useEffect((()=>{if(!c){if(!n)return;n.innerHTML="",u(!0)}}),[c,u,n]),r.useEffect((()=>{void 0!==o&&n&&(n.style.display=o?"inherit":"none")}),[o,n?.style,n]),r.useEffect((()=>{void 0!==l&&n&&n.classList.toggle("loading",l)}),[l,n?.classList,n]),r.useEffect((()=>{if(!a||!n)return;let e=!1;const t=e=>{e.preventDefault(),a()},r=n=>{e=!0,t(n),window.setTimeout((()=>{e=!1}),500)},i=n=>{e||t(n)};return n.addEventListener("touchend",r,{passive:!1}),n.addEventListener("click",i),()=>{n.removeEventListener("touchend",r),n.removeEventListener("click",i)}}),[n,a]),c&&n?i.createPortal(t,n):null}},31647(e,t,n){"use strict";n.d(t,{A:()=>w});var r=n(92860),i=n(58691),s=n(34836),a=Math.ceil,o=Math.max;function l(e,t,n,r){for(var i=-1,s=o(a((t-e)/(n||1)),0),l=Array(s);s--;)l[r?s:++i]=e,e+=n;return l}const c=l;var u=n(15233),d=n(6008),p=1/0,h=17976931348623157e292;function f(e){return e?(e=(0,d.A)(e))===p||e===-1/0?(e<0?-1:1)*h:e==e?e:0:0===e?e:0;var t}const m=f;function g(e){return function(t,n,r){return r&&"number"!=typeof r&&(0,u.A)(t,n,r)&&(n=r=void 0),t=m(t),void 0===n?(n=t,t=0):n=m(n),r=void 0===r?t<n?1:-1:m(r),c(t,n,r,e)}}const v=void 0;var _;const b=g();var y=n(38048);const x=e=>{let{isMobile:t,maxButtonsAmount:n=3,paginationLinks:a,onChange:o,itemsPerPage:l,currentPage:c,boxesFound:u}=e;const d=(0,r.useMemo)((()=>s.q.getNext()),[]);if(c<1)return null;const p=[],h=Math.ceil(u/l),f=Math.ceil((n-1)/2),m=Math.floor((n-1)/2),g=Math.max(1,c+m>h?h-n+1:c-f),v=Math.min(c-f<1?n:c+m,h),_=b(g,v+1),x=h>n;g>1&&_.unshift(1),v<h&&_.push(h);for(const e of _)p.push((0,y.jsxs)(r.Fragment,{children:[x&&c<=h-n&&e===h&&(0,y.jsx)(i.D,{pageNumber:null,isSeparator:!0}),(0,y.jsx)(i.D,{linkHref:a[e],pageNumber:e,onClick:t=>{t.preventDefault(),o(e)},isCurrent:e===c},`page${e}`),x&&c>n&&c<=h&&1===e&&(0,y.jsx)(i.D,{pageNumber:null,isSeparator:!0})]},e));return(0,y.jsx)(i._,{labelId:d,isMobile:t,prevLinkHref:c>1?a[c-1]:void 0,nextLinkHref:c<h?a[c+1]:void 0,onPrevClick:c>1?e=>{e.preventDefault(),o(c-1)}:void 0,onNextClick:c<h?e=>{e.preventDefault(),o(c+1)}:void 0,children:p})},w=r.memo(x)},13137(e,t,n){"use strict";n.d(t,{i:()=>E});var r=n(92860),i=n(52397),s=n(47006),a=n(2375),o=n(38048);const l=e=>{const{options:t,onChange:n,value:r}=e;return(0,o.jsx)(i.$S,{labelledBy:"search-results-sort-tabs-label",controlsListType:i.zA.Radios,children:t.map((e=>(0,o.jsx)(i.cX,{type:i.zA.Radios,children:(0,o.jsx)(s.b,{name:"sort",value:e.id,label:e.value,labelId:`label-id-${e.id}`,radioId:`radio-id-${e.id}
2`,onChange:()=>{(0,a.lE)({section:a.qO.Top,clickType:a.TD.Radio,clickText:e.value,clickName:"sort"}),n(e.id)},checked:e.id==r})},e.id)))})};var c=n(1811),u=n(87387),d=n(51882),p=n(93426),h=n(12868),f=n(10918),m=n(95853),g=n(77335);const v=e=>{const{viewportWidthSize:t,searchFormType:n,hotelMapsPlaceholder:i,showMapPlaceholder:s,filterId:a,filterSelectedParamsCount:l,filterOnClick:c,filterTooltip:u,sortId:v,sortOnClick:_}=e,[b,y]=(0,r.useState)(!1),[x,w]=(0,r.useState)(0),k=r.useRef(),I=r.useRef(),C=r.useRef(),A=(0,r.useCallback)((()=>{const e=I.current.getBoundingClientRect().height;w(e)}),[]),E=(0,r.useCallback)((e=>{e&&1===e.length&&y(!e[0].isIntersecting)}),[]);(0,r.useEffect)((()=>(A(),window.addEventListener("resize",A),window.addEventListener("orientationchange",A),C.current=new IntersectionObserver(E,{rootMargin:"-60px 0px 0px 0px",threshold:0}),()=>{window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A),C.current.disconnect()})),[A,E]);const S=t===g.Ww.Medium&&[f.Y.SearchResults,f.Y.LandingPage].includes(n),T=(0,d.A)("b-filter-search-bar",{"b-filter-search-bar--fixed":b,"b-filter-search-bar--desktop-narrow":S}),O=(0,d.A)("b-filter-search-bar__bar",{"compensate-for-scrollbar":S});return(0,o.jsx)("div",{className:T,ref:k,style:{minHeight:x},children:(0,o.jsxs)("div",{className:O,ref:I,children:[(0,o.jsx)("div",{className:"b-filter-search-bar__item",children:(0,o.jsxs)("button",{type:"button",id:v,className:"b-filter-search-bar__button",onClick:_,children:[(0,o.jsx)(p.U,{wrapperClass:"b-filter-search-bar__button-icon",icon:h.LZ.listNumbers,width:20,height:20}),(0,o.jsx)("span",{className:"b-filter-search-bar__button-label",children:(0,o.jsx)(m.s,{id:"sf2_sort_verb"})})]})}),(0,o.jsxs)("div",{className:"b-filter-search-bar__item",children:[(0,o.jsxs)("button",{type:"button",id:a,className:(0,d.A)("b-filter-search-bar__button",{"b-filter-search-bar__button--hilight":l>0}),onClick:c,children:[(0,o.jsx)(p.U,{wrapperClass:"b-filter-search-bar__button-icon",icon:h.LZ.settingsSlider,width:20,height:20}),(0,o.jsx)("span",{className:"b-filter-search-bar__button-label",children:(0,o.jsx)(m.s,{id:"sf2_filter_verb"})}),l>0&&(0,o.jsxs)("span",{className:"b-filter-search-bar__button-badge",children:[(0,o.jsx)("span",{className:"u-vhide",children:"(zvoleno parametrů:"})," ",l," ",(0,o.jsx)("span",{className:"u-vhide",children:")"})]})]}),u]}),s&&(0,o.jsx)("div",{className:"b-filter-search-bar__item",children:i})]})})};var _=n(48153),b=n(34836),y=n(49865);const x=e=>{const t=(0,r.useRef)(b.q.getNext()),n=(0,r.useRef)(b.q.getNext()),i=()=>r.cloneElement(e.mainSearchForm,{type:e.searchFormType}),s=()=>e.searchFormType===f.Y.IFrameFilter?null:e.showMapPlaceholder?e.hotelMapsPlaceholder:null,a=!e.filterSearchBarEnabled||e.searchFormType===f.Y.LandingPage&&e.viewportWidthSize===g.Ww.Small,l=()=>a?null:(0,o.jsx)(v,{searchFormType:e.searchFormType,hotelMapsPlaceholder:s(),showMapPlaceholder:e.showMapPlaceholder,filterId:t.current,filterSelectedParamsCount:e.filterSelectedParamsCount,filterOnClick:e.filterOnOpen,filterTooltip:e.filterTooltip,sortId:n.current,sortOnClick:e.sortOnOpen,viewportWidthSize:e.viewportWidthSize}),c=()=>{let t="f-search-filter";return e.searchFormType===f.Y.IFrameFilter&&(t+=" f-search-filter--iframe"),(0,o.jsx)("div",{className:t,children:e.children})},u=()=>(0,o.jsxs)(r.Fragment,{children:[i(),s(),c()]}),d=()=>{const t=e.viewportWidthSize===g.Ww.Small;return(0,o.jsxs)(r.Fragment,{children:[i(),l(),!a&&(0,o.jsxs)(r.Fragment,{children:[(0,o.jsx)(_.x,{show:e.filterOpened,label:(0,y.T)("sf2_filter_verb"),labelId:e.filterPopupLabelId,isMobile:t,hasOverlay:!0,formattedContent:!0,onClickOutside:e.filterOnClickOutside,onEscPress:e.filterOnEscPress,onDesktopClose:e.filterOnDesktopClose,onMobileGoBack:e.filterOnMobileGoBack,primaryActionlabel:(0,y.T)("sf2_confirm"),primaryActionOnClick:e.filterOnSubmit,secondaryActionlabel:(0,y.T)("sf2_reset_to_defaults"),secondaryActionOnClick:e.filterOnCancel,keepHeight:!0,children:c()}),(0,o.jsx)(_.x,{show:e.sortOpened,label:(0,y.T)("sf2_sort_the_tours"),labelId:e.sortPopupLabelId,isMobile:t,hasOverlay:!0,onClickOutside:e.sortOnClickOutside,onEscPress:e.sortOnEscPress,onDesktopClose:e.sortOnDesktopClose,onMobileGoBack:e.sortOnMobileGoBack,primaryActionlabel:(0,y.T)("sf2_confirm"),primaryActionOnClick:e.sortOnSubmit,secondaryActionlabel:(0,y.T)("sf2_reset_to_defaults"),secondaryActionOnClick:e.sortOnCancel,autofocusChildSelector:'input[type="radio"][checked]',keepHeight:!0,children:e.sortRadios})]})]})};return e.viewportWidthSize===g.Ww.Large||e.searchFormType===f.Y.IFrameFilter?u():d()};var w=n(62601),k=n(13504),I=n(61714),C=n(7613),A=n(70299);const E=e=>{const{mainSearchForm:t,hotelMapsPlaceholder:n,showMapPlaceholder:i,filterSelectedParamsCount:s,sortPopupLabelId:u,children:d,showPaymentOptionsTooltip:p=!0,filterSearchBarEnabled:h,searchFormProps:f,options:m}=e,g=(0,k.e)((e=>e.formValues[c.I.sort])),[v,_]=(0,r.useState)(!1),[b,E]=(0,r.useState)(!1),S={value:g||f.defaultSorting,field:c.I.sort,onChange:e=>(0,I.f)(e,f),options:m},T=(0,o.jsx)(l,{value:S.value,onChange:S.onChange,options:S.options}),O=(e,t,n)=>{(0,a.lE)({section:e,clickType:a.TD.OpenList,clickText:(0,y.T)(n),clickName:t})},F=e=>{e.preventDefault(),e.stopPropagation(),O(a.qO.Filters,"filter_modal","sf2_filter_verb"),C.A.searchForm.setValuesBackup(),_(!0)},j=()=>{C.A.searchForm.restoreValuesBackup(),_(!1)},N=e=>{e.preventDefault(),e.stopPropagation(),_(!1),(0,w.r)(!0,f)},D=e=>{e.preventDefault(),e.stopPropagation(),C.A.searchForm.resetValues(),_(!1),(0,w.r)(!0,f)},M=e=>{e.preventDefault(),e.stopPropagation(),O(a.qO.Top,"sort_modal","sf2_sort_verb"),C.A.searchForm.setValuesBackup(),E(!0)},R=()=>{E(!1),C.A.searchForm.restoreValuesBackup(),_(!1)},P=e=>{e.preventDefault(),e.stopPropagation(),E(!1),(0,w.r)(!0)},L=e=>{e.preventDefault(),e.stopPropagation(),E(!1),C.A.searchForm.restoreValuesBackup(),E(!1),(0,w.r)(!0,f)};return(0,o.jsx)(x,{mainSearchForm:t,hotelMapsPlaceholder:n,showMapPlaceholder:i,filterSelectedParamsCount:s||0,filterOpened:v,filterOnOpen:F,filterOnClickOutside:j,filterOnEscPress:j,filterOnDesktopClose:j,filterOnMobileGoBack:j,filterOnSubmit:N,filterOnCancel:D,filterTooltip:p&&(0,o.jsx)(A.D,{}
2),sortOpened:b,sortOnOpen:M,sortOnClickOutside:R,sortOnEscPress:R,sortOnDesktopClose:R,sortOnMobileGoBack:R,sortOnSubmit:P,sortOnCancel:L,sortPopupLabelId:u,sortRadios:T,searchFormType:C.A.mainContext.getSearchFormType(),viewportWidthSize:C.A.mainContext.getViewportWidthSize(),filterSearchBarEnabled:h,children:d})}},30394(e,t,n){"use strict";n.d(t,{b:()=>r});let r=function(e){return e.Country="country",e.Locality="locality",e}({})},30011(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(92860),i=n(64058),s=n(5539),a=n(77335),o=n(10918),l=n(12868),c=n(49865),u=n(38048);const d=e=>{let{isHomepage:t,searchResultsUrl:n,destinationField:d,viewportWidthSize:p,setSearchFormTypeAndHeight:h,destinationClickCallback:f}=e;const m=(0,r.useCallback)((()=>{const e=(0,a.Kz)(),n=t?o.Y.Homepage:o.Y.SearchResults,r=window.matchMedia("(max-height: 750px)").matches;h(e,n,r)}),[t,h]);return(0,r.useEffect)((()=>(m(),window.addEventListener("resize",m),window.addEventListener("orientationchange",m),()=>{window.removeEventListener("resize",m),window.removeEventListener("orientationchange",m)})),[m]),(0,u.jsx)(i.H,{inputIconName:l.LZ.search,inputPlaceholderText:(0,c.T)("sf2_review_destination_input_placeholder"),modalInputPlaceholderText:(0,c.T)("sf2_review_destination_picker_modal_input_placeholder"),isMobile:p===a.Ww.Small,ignoreExcludedAutocomplete:!0,isReviewsForm:!0,searchResultsUrl:n,holidayTarget:s.mn.TOURS,destinationField:d,destinationClickCallback:f})},p=r.memo(d)},39175(e,t,n){"use strict";n.d(t,{dh:()=>a,fj:()=>m,$Q:()=>_,sM:()=>E,t$:()=>O,_D:()=>j,_f:()=>N,C:()=>B});var r=n(13504),i=n(77335),s=n(5539);const a=()=>{const e=(0,r.e)((e=>e.displayType)),t=(0,r.e)((e=>e.viewportWidthSize)),n=t===i.Ww.Small||e===s.r.IFrame,a=void 0;return{isMobile:n,isMobileAndTablet:n||t===i.Ww.Medium}};var o=n(92860),l=n(1811),c=n(64538),u=n(84772),d=n(33258);function p(e,t){const n=t.get(e);return n?""===n.directParent?n.id:p(n.directParent,t):null}function h(e){const t=e[l.I.nl_country_id],n=e[l.I.nl_locality_id],r=e[l.I.nl_city_id];return Array.isArray(t)&&1===t.length||Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0}function f(e,t){const n=e[l.I.nl_destination_id];if(!Array.isArray(n)||0===n.length)return h(e);if(1===n.length)return!0;const r=p(n[0],t);return!!r&&n.slice(1).every((e=>p(e,t)===r))}const m=()=>{const e=(0,r.e)((e=>e.formValues)),t=(0,r.e)((e=>e.displayType)),n=(0,r.e)((e=>e.fieldsDefResponse.fieldsDef[l.I.nl_destination_id]?.options||[])),i=(0,o.useMemo)((()=>(0,u.sc)(n)),[n]);return(0,o.useMemo)((()=>{const n=(0,d.M)(),r="destination_lp"===n||"city_lp"===n;return(t!==s.r.LandingPage||r)&&f(e,i)?c.Yf.mapPlaceholderEnabled:c.Yf.mapPlaceholderDisabled}),[i,t,e])};var g=n(64060),v=n(45527);const _=e=>{(0,o.useEffect)((()=>{(0,v.S)(e).catch((e=>(0,g.Cp)(e)))}),[])};var b=n(87387),y=n(17272);const x=()=>r.e.getState().formValues,w=(e,t)=>{let n=[];const r=Array.isArray(x()[e])?x()[e]:[];if(!(0,y.Im)(r))for(const i of t)r.includes(i.id)&&"string"==typeof i.value&&""!==i.value&&n.push(i.value),i.subOptions&&(n=n.concat(w(e,i.subOptions)));return n};var k=n(99194),I=n(5920),C=n(7613);const A=(e,t,n,r,i)=>{const s={...C.A.searchForm.getFormValues(),[t]:n};(0,y.Im)(r,!1)||(s[l.I.nl_airport_radius]=r);const a=(0,k.$)(s);(0,I.F)(t,e,a,!0,void 0,i)},E=(e,t,n)=>{const i=(0,r.e)((e=>e.formValues[l.I.nl_hotel_domestic_category_id])),a=(0,r.e)((e=>e.formValues[l.I.nl_airport_radius])),o=(0,r.e)((e=>e.holidayTarget)),c=void 0;let u=null;return[s.mn.DOMESTIC,s.mn.EUROPE].includes(o)&&(u={value:w(l.I.nl_hotel_domestic_category_id,t.options).join(", "),checkedOptions:i||[],onChange:(t,r,i)=>A(e,t,r,i,n),fieldName:l.I.nl_hotel_domestic_category_id,...t,initialAirportSearchInputValue:e.initialAirportSearchInputValue?e.initialAirportSearchInputValue:null,airportRange:a}),{hotelDomesticCategoryPickerProps:u}};var S=n(83279);const T=(e,t,n,r,i,s)=>{const a=(0,S.A)(C.A.searchForm.getFormValues());0===e?(delete a[l.I.nl_occupancy_children],delete a[l.I.nl_ages_children]):(a[l.I.nl_occupancy_children]=e,a[l.I.nl_ages_children]=[...n]),0===t?delete a[l.I.nl_occupancy_adults]:a[l.I.nl_occupancy_adults]=t,r?a[l.I.b_multiple_rooms]=1:delete a[l.I.b_multiple_rooms],(0,I.F)(l.I.nl_occupancy_adults,i,a,!0,void 0,s)},O=(e,t,n)=>{const i=(0,r.e)((e=>e.formValues[l.I.nl_occupancy_adults]??2)),s=(0,r.e)((e=>e.formValues[l.I.nl_occupancy_children]??0)),a=(0,r.e)((e=>e.formValues[l.I.nl_ages_children])),c=(0,o.useMemo)((()=>a??[]),[a]),u=(0,r.e)((e=>!!e.formValues[l.I.b_multiple_rooms])),d={label:e?.label,adultsCount:i,childrenCount:s,defaultAdultsCount:2,defaultChildrenCount:0,childrenAges:c,multipleRoomsChecked:u,update:(e,r,i,s)=>T(e,r,i,s,t,n),searchFormType:t.searchFormType};return{personPickerProps:d}};var F=n(26812);const j=()=>{(0,o.useEffect)((()=>{const e=()=>(0,F.r)();return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}}),[])},N=(e,t,n)=>{const i=(0,r.e)((e=>e.formValues[l.I.nl_transportation_id])),a=(0,r.e)((e=>e.holidayTarget)),o=(0,r.e)((e=>e.formValues[l.I.nl_airport_radius])),c=void 0;let u=null;return[s.mn.ABROAD,s.mn.TOURS].includes(a)&&(u={value:w(l.I.nl_transportation_id,t.options).join(", "),checkedOptions:i||[],onChange:(t,r,i)=>A(e,t,r,i,n),fieldName:l.I.nl_transportation_id,...t,initialAirportSearchInputValue:e.initialAirportSearchInputValue?e.initialAirportSearchInputValue:null,airportRange:o}),{transportationPickerProps:u}};var D=n(94085);const M=e=>{const{changes:t,searchFormProps:n,trackingOrigin:r,triggerSearch:i=!0}=e,s=C.A.searchForm.getFormValues(),a={...s,...t},o=Boolean(a[l.I.d_start_from])&&Boolean(a[l.I.d_end_to]);let c=null;return Object.entries(t).forEach((e=>{let[t,l]=e;
2s[t]!==l&&(c??=t,(0,I.F)(t,n,a,o&&i,l?.toString(),r))})),c};var R=n(52730),P=n(30951),L=n(44950),U=n(68118);const H=[D.VE.Date,D.VE.Duration],B=(e,t,n)=>{const i=(0,r.e)((e=>e.formValues[l.I.d_start_from])),s=(0,r.e)((e=>e.formValues[l.I.d_end_to])),a=(0,r.e)((e=>e.formValues[l.I.nl_length_from])),c=(0,r.e)((e=>e.formValues[l.I.nl_length_to])),u=(0,r.e)((e=>e.formValues[l.I.duration])),d=n?.searchOnSubmit??!1,p=(0,o.useRef)(null),h=void 0,f=void 0;return{value:(0,o.useMemo)((()=>{const e=(0,P.A2)(i),t=(0,P.A2)(s);return{startDate:e,endDate:t,lengthFrom:a,lengthTo:c,duration:u||(0,L.o5)({startDate:e,endDate:t,lengthFrom:a,lengthTo:c,daysCount:(0,U.et)(e,t)}).duration}}),[i,s,a,c,u]),onChange:(0,o.useCallback)(((n,r)=>{if(!d)return void M({changes:n,searchFormProps:e,trackingOrigin:t});if(void 0!==r&&H.includes(r)){const r=M({changes:n,searchFormProps:e,trackingOrigin:t,triggerSearch:!1});return void(null!==r&&(p.current=r))}if(r===D.VE.Cancel)return M({changes:n,searchFormProps:e,trackingOrigin:t,triggerSearch:!1}),void(p.current=null);if(r===D.VE.Reset){const r=M({changes:n,searchFormProps:e,trackingOrigin:t,triggerSearch:!1}),i=p.current;return p.current=null,void(null===r&&null===i||(0,R.d)(e,!0,r??i))}const i=M({changes:n,searchFormProps:e,trackingOrigin:t}),s=p.current;if(p.current=null,null===i&&null!==s){const t=C.A.searchForm.getFormValues(),n=void 0;Boolean(t[l.I.d_start_from])&&Boolean(t[l.I.d_end_to])&&(0,R.d)(e,!0,s)}}),[e,t,d])}}},80980(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(87387),i=n.n(r),s=n(1811),a=n(83279),o=n(17090),l=n(5539),c=n(64060),u=n(17272),d=n(84772);const p=e=>{const t={};for(const[n,r]of Object.entries(e))(0,o.A)(r)?t[n]=Object.values(r):t[n]=r;return t},h=e=>{const t=(0,a.A)(e),n={[s.I.nl_country_id]:l.hR,[s.I.nl_locality_id]:l.UK,[s.I.nl_city_id]:l.G4,[s.I.nl_hotels_id]:l._M};for(const[e,r]of Object.entries(n))if(Array.isArray(t[e])){t[s.I.nl_destination_id]=t[s.I.nl_destination_id]||[];for(const n of t[e])t[s.I.nl_destination_id].push(r+n);delete t[e]}return t[s.I.nl_destination_id]=[...new Set(t[s.I.nl_destination_id])],t},f=e=>{if(!e.nd_review_rating_average)return e;const t=(0,a.A)(e);return t[s.I.nd_review_rating_average_from]=e.nd_review_rating_average,delete t.nd_review_rating_average,t},m=e=>{if(!e.nl_length_int)return e;const t=(0,a.A)(e),n=Array.isArray(t.nl_length_int)?t.nl_length_int:Array.of(t.nl_length_int),r=[],i=[];for(const e of n){const[t,n]=e.split("|");r.push(t),i.push(n)}return r.length>0&&!r.includes("")&&(t[s.I.nl_length_from]=Math.min(...r.map((e=>parseInt(e))))),i.length>0&&!i.includes("")&&(t[s.I.nl_length_to]=Math.max(...i.map((e=>parseInt(e))))),delete t.nl_length_int,t[s.I.nl_length_from]>t[s.I.nl_length_to]&&(t[s.I.nl_length_to]=t[s.I.nl_length_from]),t},g=e=>{if(!e.c_price_int)return e;const t=(0,a.A)(e),n=Array.isArray(t.c_price_int)?t.c_price_int:Array.of(t.c_price_int),r=[],i=[];for(const e of n){const[t,n]=e.split("|");r.push(t),i.push(n)}return r.length>0&&!r.includes("")&&(t[s.I.c_price_from]=Math.min(...r.map((e=>parseInt(e))))),i.length>0&&!i.includes("")&&(t[s.I.c_price_to]=Math.max(...i.map((e=>parseInt(e))))),delete t.c_price_int,t[s.I.c_price_from]>t[s.I.c_price_to]&&(t[s.I.c_price_to]=t[s.I.c_price_from]),t},v=(e,t)=>{if(!e.nl_destination_id||0===e.nl_destination_id.length)return e;const n=(0,a.A)(e),r=(0,d.DA)(t.nl_destination_id.options);let i=[];for(const e of n.nl_destination_id){const t=r.get(e);t&&(i=i.concat(t.parents))}return n.nl_destination_id=n.nl_destination_id.filter((e=>!i.includes(e))),n},_=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[p,h,v,f,m,g];let i=(0,a.A)(e);for(const e of r)try{i=e(i,t)}catch(e){(0,c.Cp)(e,"Error while translating query string params")}return n&&!(0,u.Im)(i[s.I.page])&&delete i[s.I.page],i},b=_},81233(e,t,n){"use strict";n.d(t,{A:()=>f,f:()=>l});var r=n(87387),i=n.n(r),s=n(83279),a=n(1811),o=n(17272);const l=[a.I.b_online_sale_customer,a.I.b_online_booking_tour],c=(e,t)=>{for(const n of e)(0,o.Im)(t[n])||(Array.isArray(t[n])||(t[n]=Array.of(t[n])),t[n]=t[n].map((e=>
2parseInt(e))));return t},u=(e,t)=>{for(const n of e)"NaN"!==t[n]?(0,o.Im)(t[n])||(t[n]=parseInt(t[n])):t[n]=void 0;return t},d=(e,t)=>{for(const n of e)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=["true","1",1].includes(t[n])?1:0);return t},p=(e,t)=>{for(const n of e)(0,o.Im)(t[n])||(Array.isArray(t[n])||(t[n]=Array.of(t[n])),t[n]=t[n].map((e=>e.toString())));return t},h=void 0,f=e=>{let t=(0,s.A)(e);const n=[a.I.nl_stars,a.I.nl_ages_children];t=c(n,t);const r=[a.I.nl_occupancy_adults,a.I.nl_occupancy_children,a.I.c_price_from,a.I.c_price_to,a.I.nd_price_discount_from,a.I.nd_price_discount_to,a.I.nd_review_rating_average_from,a.I.nd_review_rating_average_to,a.I.nl_length_from,a.I.nl_length_to,a.I.page,a.I.nl_airport_radius];t=u(r,t),t=d(l,t);const i=[a.I.nl_destination_id,a.I.nl_transportation_id,a.I.nl_category_id,a.I.nl_beach_type_id,a.I.nl_ck_id,a.I.nl_not_ck_id,a.I.nl_departure_id,a.I.nl_meal_id,a.I.nl_hotel_attribute_type_id,a.I.nl_tour_action_type_id,a.I.nl_hotel_attribute_id];return t=p(i,t),t}},54077(e,t,n){"use strict";n.d(t,{Bt:()=>g,E:()=>p,Ip:()=>f,Sg:()=>m});var r=n(87387),i=n.n(r),s=n(1811),a=n(17272),o=n(5539);let l=[],c,u;const d=[],p=(e,t,n,r)=>{if(l.length>0){const t=Array.isArray(e.nl_transportation_id)?e.nl_transportation_id:[];if(t.length>0&&JSON.stringify(l.sort())!=JSON.stringify(t.sort()))return e;e[s.I.nl_transportation_id]=t.filter((e=>!l.includes(e))),0==e.nl_transportation_id.length&&delete e.nl_transportation_id}if(!(0,a.Im)(e[s.I.nl_transportation_id]))return e;let i=[];if(!(0,a.Im)(e.nl_destination_id)){const r=v(e.nl_destination_id,n);for(const e of r){if(void 0===t[e]){i=[];break}i=i.concat(t[e])}}return i.length<=0&&r&&(i=r),i.length>0&&(i=[...new Set(i)],e[s.I.nl_transportation_id]=i,l=i),e},h=e=>null==e,f=(e,t,n)=>{if(!h(c)){if(!h(e[s.I.b_online_sale_customer])&&e[s.I.b_online_sale_customer]!==c)return e;delete e[s.I.b_online_sale_customer]}if((0,a.Im)(e.nl_destination_id))return e;if(!h(e[s.I.b_online_sale_customer]))return e;const r=v(e.nl_destination_id,n);for(const n of r)if(t.includes(n)){e[s.I.b_online_sale_customer]=!0,c=!0;break}return e},m=(e,t,n)=>{if(u){if(e[s.I.c_price_from]&&u!=e[s.I.c_price_from])return e;delete e[s.I.c_price_from]}if((0,a.Im)(e.nl_destination_id))return e;if(e[s.I.c_price_from])return e;const r=v(e.nl_destination_id,n);for(const n of r)if(!(0,a.Im)(t[n])&&(void 0===e[s.I.c_price_to]||t[n]<=e[s.I.c_price_to])){e[s.I.c_price_from]=t[n],u=t[n];break}return e},g=e=>{if(d.length>0){if(e[s.I.nl_stars]&&JSON.stringify(e[s.I.nl_stars].sort())!=JSON.stringify(d.sort()))return e;delete e[s.I.nl_stars]}return e[s.I.sort]?((0,a.Im)(e[s.I.nl_stars]),e):e},v=(e,t)=>{let n=[];for(const r of e)if(r.startsWith(o.hR)&&n.push(r),r.startsWith(o.UK)&&t?.has(r)){const e=void 0,i=t.get(r).parents.filter((e=>e.startsWith(o.hR)));n=n.concat(i)}return[...new Set(n)]}},72618(e,t,n){"use strict";n.d(t,{SA:()=>f,Sr:()=>m,Xy:()=>g});var r=n(1811),i=n(64060),s=n(73306),a=n(9625),o=n(5539),l=n(63142);const c="/ajax-translate-search-started-labels",u={destination:{},transportation:{},departure:{}},d=e=>Array.isArray(e)?e.map((e=>String(e).trim())).filter((e=>""!==e)).sort():[],p=(e,t)=>e?Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;return[`${t}${n}`,r]}))):{},h=e=>e?Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[String(t).trim(),n]}))):{},f=async(e,t)=>{if("function"!=typeof fetch)return u;const n=Array.isArray(e[r.I.nl_destination_id])?(0,l.R)(e):e,f=d(n[r.I.nl_country_id]),m=d(n[r.I.nl_locality_id]),g=d(n[r.I.nl_city_id]),v=d(n[r.I.nl_hotels_id]),_=d(n[r.I.nl_transportation_id]),b=d(n[r.I.nl_departure_id]);if(0===f.length&&0===m.length&&0===g.length&&0===v.length&&0===_.length&&0===b.length)return u;const y=(0,s.Z)({countryIds:f,localityIds:m,cityIds:g,hotelIds:v,transportationIds:_,departureIds:b});try{const e=await fetch(`${(0,a.Y)(c)}?${y}`,{signal:t,credentials:"omit",headers:{Accept:"application/json"}});if(!e.ok)return u;const n=await e.json();return{destination:{...p(n.countryLabels,o.hR),...p(n.localityLabels,o.UK),...p(n.cityLabels,o.G4),...p(n.hotelLabels,o._M)},transportation:h(n.transportationLabels),departure:h(n.departureLabels)}}catch(e){return(0,i.yA)("[GA4_SEARCH_STARTED] Error fetching canonical labels:",e),u}},m=async(e,t)=>{const n=void 0;return(await f({[r.I.nl_departure_id]:[String(e)]},t)).departure[String(e)]??null},g=async(e,t)=>{const n=void 0;return(await f({[r.I.nl_locality_id]:[String(e)]},t)).destination[`${o.UK}${e}`]??null}},66104(e,t,n){"use strict";n.d(t,{ou:()=>q,Dm:()=>ne,YI:()=>de,JN:()=>X,xl:()=>pe,UH:()=>W,Y9:()=>ue,Yu:()=>K});var r=n(87387),i=n(1811),s=n(5539),a=n(64060),o=n(12846),l=n.n(o),c=n(10715),u=n(36999),d=n(64457),p=n(6891),h=n(84772),f=n(33258),m=n(17272),g=n(227),v=n(30951),_=n(46872),b=n(82064);const y=()=>{const e=document.getElementById("js-main-search-form-container")?.dataset?.holiday_target;return e?e.charAt(0).toUpperCase()+e.slice(1):null};var x=n(12823);const w=async(e,t)=>{const n=e[i.I.nl_occupancy_adults]?e[i.I.nl_occupancy_adults]:0,r=e[i.I.nl_occupancy_children]?e[i.I.nl_occupancy_children]:0;(0,d.B)({search_number_of_adults:n}),(0,d.B)({search_number_of_children:r});const s=(0,b.r)(e,t.nl_destination_id);if(s.country&&(0,d.B)({search_country:s.country}),s.locality&&(0,d.B)({search_locality:s.locality}),e[i.I.d_start_from]&&(0,d.B)({search_startdate:e[i.I.d_start_from]}),e[i.I.d_end_to]&&(0,d.B)({search_enddate:e[i.I.d_end_to]}
2),t?.nl_transportation_id){const n=(0,x.VB)(e[i.I.nl_transportation_id],t.nl_transportation_id);n.type&&(0,d.B)({search_transport_type:n.type}),n.group&&(0,d.B)({search_transport_group:n.group}),n.subgroup&&(0,d.B)({search_airport:n.subgroup})}const a=y();if(a)(0,d.B)({search_form:a});else{const e=(0,f.M)();(0,d.B)({search_form:e})}};var k=n(7613),I=n(78194),C=n(31826),A=n(87986),E=n(63142);const S=(e,t,n)=>{if(Array.isArray(e[i.I.nl_departure_id])&&t?.nl_departure_id?.options){const r=e[i.I.nl_departure_id].map((e=>n.departure[e]??(0,x.Oi)(t.nl_departure_id.options,e))).filter((e=>null!==e&&""!==e));if(r.length>0)return r}if(Array.isArray(e[i.I.nl_transportation_id])&&t?.nl_transportation_id){const r=(0,x.mQ)(e[i.I.nl_transportation_id],t.nl_transportation_id,n.transportation),s=[...(0,C.CQ)(r[x.cd.Group]),...(0,C.CQ)(r[x.cd.Subgroup])];if(s.length>0)return[...new Set(s)];if(r[x.cd.Type])return(0,C.CQ)(r[x.cd.Type])}return[]},T=(e,t,n,r,i)=>{if(!t?.nl_destination_id)return n?"current":void 0;const s=(0,b.L)(e,t.nl_destination_id,r,i);if(!s)return n?"current":void 0;const a=void 0;return(0,C.ef)(s.canonical)||(n?"current":void 0)},O=(e,t)=>{const n=void 0;return(0,A.PR)(e[i.I.d_start_from],e[i.I.d_end_to])||(t?"current":void 0)},F=e=>{const t=(0,I.We)({adultsValue:e[i.I.nl_occupancy_adults],agesValue:e[i.I.nl_ages_children],selectedChildrenValue:e[i.I.nl_occupancy_children]}),n=(0,I.pb)(t.ages),r=[`a:_${t.adults}`,`c:_${t.totalChildren}`];return n&&r.push(`age:_${n}`),r.push("r:_"+(e[i.I.b_multiple_rooms]?"yes":"no")),r.join("_")},j=(e,t,n,r)=>{const s=Array.isArray(e[i.I.nl_transportation_id])?(0,A.wo)(e[i.I.nl_transportation_id]):"",a=(0,C.ef)(S(e,t,r));return s&&a?`${s}_${a}`:s||a||(n?"current":void 0)},N=e=>e===s.mn.ACCOMMODATION?"hotel":"search",D=e=>{const{values:t,fieldsDef:n,isHomepage:r,holidayTarget:s,labelsForCitiesAndHotels:a={},translatedLabels:o={destination:{},transportation:{},departure:{}}}=e,l=Array.isArray(t[i.I.nl_destination_id])?(0,E.R)(t):t,c={event:"search",event_action:"search_started",analytics:"ga4",participants:F(l),extra_param_1:N(s),page_type:r?"homepage":"search"},u=T(l,n,r,a,o.destination);u&&(c.search_term=u);const d=O(l,r);d&&(c.trip_duration=d);const p=j(l,n,r,o);return p&&(c.departure=p),c};var M=n(72618),R,P,L,U,H;const B="searchFormSessionId",V="checked",z="unchecked";let $=function(e){return e[e.SearchOnValueChange=0]="SearchOnValueChange",e[e.SearchOnRadiusChange=1]="SearchOnRadiusChange",e[e.SearchOnPopupOpen=2]="SearchOnPopupOpen",e}({});const W=["REVIEW_SEARCH_COUNTRY","REVIEW_SEARCH_COUNTRY_PAGE","REVIEW_SEARCH_LOCALITY","REVIEW_SEARCH_LOCALITY_PAGE","REVIEW_SEARCH_CITY","REVIEW_SEARCH_CITY_PAGE","REVIEW_SEARCH_HOTEL","REVIEW_HP"],q=async e=>{(0,a.aO)(e)},Y=()=>l().get(B),G=()=>{let e=Y();if(!e){const t=void 0;e=`${(new Date).getTime()}.${Math.floor(1e12*Math.random())}`,l().set(B,e,{domain:(0,c.R)()})}return e},K=async(e,t,n,r)=>{n&&(await Q(e,t,!1,!1,"","","",0),await w(e,t),r&&(0,u.ty)("Search Form","Search","button_search_inactive"))},J=async(e,t,n)=>{const r=k.A.searchForm.getIsHomepage(),s=k.A.searchForm.consumePendingTrackingOrigin(),a=(0,g.t)(e[i.I.nl_occupancy_adults],e[i.I.nl_ages_children]),o={event:"search",event_action:"search_enter_travelers",search_child_ages:(0,m.Im)(e[i.I.nl_ages_children])?void 0:e[i.I.nl_ages_children].sort().reverse().join(),search_number_of_adults:a.adults,search_number_of_children:a.children+a.infants};if((0,d.B)(o),r&&!n)return;if(!r&&!n&&"main-search"!==s?.area)return;const l=k.A.searchForm.getInitialSearchFormProps(),c=await(0,M.SA)(e),u=D({values:e,fieldsDef:t,isHomepage:r,holidayTarget:k.A.searchForm.getHolidayTarget(),labelsForCitiesAndHotels:l?.initialLabelsForCitiesAndHotels??{},translatedLabels:c});(0,d.B)(u)},X=async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.G$.Tour,a=arguments.length>4?arguments[4]:void 0;await Q(e,t,n,!1,"","","",a),await w(e,t);const o=(0,g.t)(e[i.I.nl_occupancy_adults],e[i.I.nl_ages_children]),l={event:"trackEvent",eventCategory:"Search Form",eventAction:"Persons Modal",eventLabel:"Submit",dimension35:(0,m.Im)(e[i.I.nl_ages_children])?null:e[i.I.nl_ages_children].sort().reverse().join(),dimension24:o.adults+"-"+(o.children+o.infants)};(0,m.Im)(o.children)&&(0,m.Im)(o.infants)||(l.dimension25=o.children+"-"+o.infants),(0,u.XM)(l),(0,u.ty)("Search Form","Search","button_search_click");const c=(0,_.E)();if(W.includes(c)){const n=(0,b.r)(e,t.nl_destination_id),r={event:"search_reviews",event_action:"search_started",search_country:n.country,search_locality:n.locality,analytics:"ga4"};(0,d.B)(r)}else await J(e,t,n)},Q=async(e,t,n,r,s,a,o,l)=>{const c=n?G():Y(),d=(0,u.bh)();(0,u.iF)("dimension2",d),(0,u.iF)("dimension35",(0,p.Pf)()),(0,u.
2iF)("dimension51",c);const h=new Date;(0,u.iF)("dimension52",`${h.getTime()}.${Math.floor(1e12*Math.random())}`),(0,u.iF)("dimension55",Z(e)),void 0!==l&&(0,u.iF)("dimension56",l);const g=(e[i.I.nl_occupancy_adults]?e[i.I.nl_occupancy_adults]:0)+"-"+(e[i.I.nl_occupancy_children]?e[i.I.nl_occupancy_children]:0);(0,u.iF)("dimension61",g);const v=(0,b.r)(e,t.nl_destination_id);if(v.country&&(0,u.iF)("dimension57",v.country),v.locality&&(0,u.iF)("dimension58",v.locality),e[i.I.d_start_from]&&(0,u.iF)("dimension62",e[i.I.d_start_from]),e[i.I.d_end_to]&&(0,u.iF)("dimension63",e[i.I.d_end_to]),r)(0,m.Im)(s)||(0,u.iF)("dimension64",s),(0,m.Im)(a)||(0,u.iF)("dimension65",a),(0,m.Im)(o)||(0,u.iF)("dimension66",o);else if(t?.nl_transportation_id){const n=(0,x.VB)(e[i.I.nl_transportation_id],t.nl_transportation_id);n.type&&(0,u.iF)("dimension64",n.type),n.group&&(0,u.iF)("dimension65",n.group),n.subgroup&&(0,u.iF)("dimension66",n.subgroup)}const _=te(e[i.I.nl_hotel_domestic_category_id],t.nl_hotel_domestic_category_id);_&&(0,u.iF)("dimension67",_);const w=y();if(w)(0,u.iF)("dimension53",w);else{const e=(0,f.M)();(0,u.iF)("dimension53",e)}},Z=e=>{const t=[];return t.push(!(!e[i.I.nl_country_id]&&!e[i.I.nl_locality_id])),t.push(!!e[i.I.d_start_from]),t.push(!!e[i.I.d_end_to]),t.push(!!e[i.I.nl_transportation_id]),t.push(!!e[i.I.nl_occupancy_adults]||!!e[i.I.nl_occupancy_children]),t.map((e=>e?"1":"0")).join("")},ee=e=>{const t=[];if(Array.isArray(e[R.nl_destination_id]))for(const n of e[R.nl_destination_id])"string"==typeof n&&""!==n&&t.push(n);if(Array.isArray(e[R.nl_country_id]))for(const n of e[R.nl_country_id])t.push(`undefined${n}`);if(Array.isArray(e[R.nl_locality_id]))for(const n of e[R.nl_locality_id])t.push(`undefined${n}`);return[...new Set(t)]},te=(e,t)=>{if(e){const n=[];for(const r of e){const e=t.options.find((e=>e.id==r));n.push(e.value)}return n.join(", ")}return null},ne=async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.G$.Tour,o=arguments.length>4?arguments[4]:void 0;const l=Y();(0,u.iF)("dimension51",l);const c="Search Results: Dynamic Filters";let p,h,f="unknown";switch(e){case i.I.c_price_from:case i.I.c_price_to:p=n.c_price.label,f=(0,x.jx)(t[i.I.c_price_from],t[i.I.c_price_to],n.c_price);break;case i.I.nl_length_from:case i.I.nl_length_to:p=n.nl_length.label,f=(0,x.jx)(t[i.I.nl_length_from],t[i.I.nl_length_to],n.nl_length);break;case i.I.nd_price_discount_from:case i.I.nd_price_discount_to:p=n.nd_price_discount.label,f=(0,x.jx)(t[i.I.nd_price_discount_from],t[i.I.nd_price_discount_to],n.nd_price_discount);break;case i.I.nd_review_rating_average_from:case i.I.nd_review_rating_average_to:p=n.nd_review_rating_average.label,f=(0,x.jx)(t[i.I.nd_review_rating_average_from],t[i.I.nd_review_rating_average_to],n.nd_review_rating_average);break;case i.I.b_online_sale_customer:h=t[i.I.b_online_sale_customer]?V:z,p=n.payment_options.label,f=h;break;case i.I.b_only_domestic_tour_operator:h=t[i.I.b_only_domestic_tour_operator]?V:z,p=n.domestic_tour_operator.label,f=h;break;case i.I.b_only_with_direct_flight:h=t[i.I.b_only_with_direct_flight]?V:z,p=n.direct_flight.label,f=h;break;case i.I.nl_stars:{const r=t[e]&&Array.isArray(t[e])?t[e].map((e=>e.toString())):[];p=n.nl_stars.label,f=o;const i=o&&r.includes(o);(0,u.iF)("dimension54",i?V:z);break}case i.I.sort:return;case i.I.nl_promotion_category_id:case i.I.nl_distance_beach:case i.I.nl_distance_centre:case i.I.nl_distance_airport:case i.I.nl_distance_downhill:p=n[e].label,f=(0,x.Oi)(n[e].options,o)||"unknown";break;case i.I.nl_meal_id:case i.I.nl_category_id:case i.I.nl_hotel_attribute_type_id:case i.I.nl_tour_action_type_id:case i.I.nl_hotel_attribute_id:p=n[e].label,f=(0,x.Oi)(n[e].options,o)||"unknown",h=re(void 0!==t[e]?t[e]:[],n[e].options,o),(0,u.iF)("dimension54",h?V:z);break;case i.I.nl_ck_id:p=n[i.I.nl_ck_id].label,f=(0,x.Oi)(n[i.I.nl_ck_id].options,o)||"unknown";break;case i.I.nl_occupancy_adults:case i.I.nl_occupancy_children:p="Occupancy",f=t[i.I.nl_occupancy_adults]+"-"+(t[i.I.nl_occupancy_children]?t[i.I.nl_occupancy_children]:0),ce(t[i.I.nl_occupancy_adults],t[i.I.nl_ages_children]);break;case i.I.page:p="Pagination",f=o;break;default:(0,a.aO)(`No GA measurement implemented for field '${e.toString()}' change.`)}try{const e=(0,g.t)(t[i.I.nl_occupancy_adults],t[i.I.nl_ages_children]),n={event:"trackEvent",eventCategory:c,eventAction:p,eventLabel:f,nonInteraction:!0,dimension24:e.adults+"-"+(e.children+e.infants)};(0,m.Im)(e.children)&&(0,m.Im)(e.infants)||(n.dimension25=e.children+"-"+e.infants);const r={event:"filter",event_action:p,event_label:f,non_interaction:!1,customer_combination:e.adults+"-"+(e.children+e.infants),analytics:"ga4"};(0,u.XM)(n),(0,d.B)(r)}catch(e){(0,a.Cp)(e)}}
2,re=(e,t,n)=>{const r=(0,h.DA)(t),i=void 0;return(0,h.u4)(e,r).includes(n)},ie=(e,t,n,r)=>{switch(e){case $.SearchOnPopupOpen:break;case $.SearchOnRadiusChange:U({event:"trackEvent",eventCategory:"Search Form",eventAction:"Airport Picker",eventLabel:"Slider Changed",dimension68:n,nonInteraction:!0});break;case $.SearchOnValueChange:U({event:"trackEvent",eventCategory:"Search Form",eventAction:"Airport Picker",eventLabel:"Search Started: "+t+(r?"":" No Match"),dimension68:n,nonInteraction:!0})}},se=()=>{U({event:"trackEvent",eventCategory:"Search Form",eventAction:"Transport Type",eventLabel:"Modal Shown",nonInteraction:!0})},ae=(e,t,n)=>{if(!1===n&&e>0)return void U({event:"trackEvent",eventCategory:"Search Form",eventAction:"Airport Picker",eventLabel:"Cluster Clicked",nonInteraction:!1,dimension65:t,dimension68:e});const r={event:"trackEvent",eventCategory:"Search Form",eventAction:"Airport Picker",eventLabel:"Airport Clicked",nonInteraction:!1,dimension66:t};e>0&&(r.dimension68=e),U(r)},oe=e=>{let t=null;switch(e){case H.TRANSPORTATION_ID_AIRPLANE:t="Airplane";break;case H.TRANSPORTATION_ID_BUS:t="Bus";break;case H.TRANSPORTATION_ID_COMBINED:t="Combined";break;case H.TRANSPORTATION_ID_OWN:t="Own";break;case H.TRANSPORTATION_ID_TRAIN:t="Train"}U({event:"trackEvent",eventCategory:"Search Form",eventAction:"Transport Type",eventLabel:"Tab Clicked",nonInteraction:!0,dimension64:t})},le=e=>{U({event:"trackEvent",eventCategory:"Search Form",eventAction:"Bus Picker",eventLabel:"Button: Save",nonInteraction:!0,dimension65:e})},ce=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;const n=(0,g.t)(e,t),r={event:"trackEvent",eventCategory:"Search Form",eventAction:"Persons Modal",eventLabel:"Submit",nonInteraction:!0,dimension24:n.adults+"-"+(n.children+n.infants),dimension35:(0,m.Im)(t)?null:t.sort().reverse().join()};(0,m.Im)(n.children)&&(0,m.Im)(n.infants)||(r.dimension25=n.children+"-"+n.infants),(0,u.XM)(r);const i={event:"search",event_action:"search_enter_travelers",search_child_ages:(0,m.Im)(t)?void 0:t.sort().reverse().join(),search_number_of_adults:n.adults,search_number_of_children:n.children+n.infants};(0,d.B)(i)},ue=(e,t,n,r)=>{const i=(0,v.A2)(e),s=(0,v.A2)(t),a=s?.diff(i,"day")+1;let o;const l="days to search: "+a;o="Flexible"===n?l:"Exact dates"===n?l+", picked duration: exact "+a:"Custom"===n?l+", picked duration: custom "+r:l+", picked duration: flex "+n,(0,u.ty)("Date Picker","Submit",o)},de=async(e,t,n)=>{let r="unknown",s="unknown",a="unknown",o="unknown",l="unknown",c=1,p=10,h="1",f="5";switch(e){case i.I.nd_review_rating_average_from:case i.I.nd_review_rating_average_to:r=n.nd_review_rating_average.label,a="Reviews Result: Dynamic Filters",s=(0,x.jx)(t[i.I.nd_review_rating_average_from],t[i.I.nd_review_rating_average_to],n.nd_review_rating_average),o=n.nl_stars.label,c=t[i.I.nd_review_rating_average_from]??1,p=t[i.I.nd_review_rating_average_to]??10,h=n.nd_review_rating_average.options.find((e=>e.id===c.toString())).value,f=n.nd_review_rating_average.options.find((e=>e.id===p.toString())).value,l=h+" - "+f;break;case i.I.nl_stars:{const i=t[e]&&Array.isArray(t[e])?t[e].join(", "):t[e].toString();r=n.nl_stars.label,a="Reviews Result: Dynamic Filters",s=i,o=n.nl_stars.label,l=i;break}case i.I.sort:r=n.sort.label,a="Reviews Results: Clicks",s=t[i.I.sort];break;case i.I.page:r="Pagination",a="Reviews Results",s=t[i.I.page].toString()}const m=(0,_.E)();if(W.includes(m)&&e!==i.I.sort){const e={event:"filter_reviews",event_action:o,event_label:l,non_interaction:!0,analytics:"ga4"};(0,d.B)(e)}(0,u.XM)({event:"trackEvent",eventCategory:a,eventAction:r,eventLabel:s,nonInteraction:!1})},pe=(e,t)=>{const n=(0,b.r)(e,t.nl_destination_id),r=n.country,i=n.locality;let s=null;!(0,m.Im)(r)&&(0,m.Im)(i)?s=r:(0,m.Im)(r)||(0,m.Im)(i)||(s=i),(0,u.XM)({event:"trackEvent",eventCategory:"Reviews",eventAction:"Search Whisperer",eventLabel:s,nonInteraction:!1}),(0,d.B)({event:"search_reviews",event_action:"search_started",search_country:r,search_locality:i,analytics:"ga4"})}},36993(e,t,n){"use strict";n.d(t,{t:()=>o});var r=n(92860),i=n(64060),s=n(74996),a=n(38048);class o extends r.Component{constructor(e){super(e),this.state={hasError:!1}}componentDidCatch(e,t){this.setState({hasError:!0}),(0,i.Cp)(e,{errorInfo:t},"Search Form"),"function"==typeof this.props.errorCallback&&this.props.errorCallback(e)}render(){return(0,a.jsxs)(r.Fragment,{children:[(0,a.jsx)(s.E,{show:this.state.hasError,type:this.props.type,showRefreshButton:this.props.isMobile,errorRefreshOnClick:()=>window.location.reload()}),!this.state.hasError&&this.props.children]})}}}
2,71489(e,t,n){"use strict";n.d(t,{g:()=>o});var r=n(1811),i=n(5539),s=n(52730),a=n(7613);const o=e=>{const{field:t,internalValues:n,searchFormProps:o,changedValue:l,triggerChange:c=!0}=e;delete n[r.I.offsets],t!==r.I.page&&(n[r.I.page]=1),o?.searchEntity===i.G$.Review&&delete n[r.I.d_start_from],a.A.searchForm.setFormValues(n),a.A.searchForm.getDisplayType()!==i.r.LandingPage&&a.A.searchForm.setNoSearchResultsFiltersList([]),c&&(0,s.d)(o,!0,t,l)}},84524(e,t,n){"use strict";n.d(t,{h:()=>d});var r=n(87387),i=n.n(r),s=n(77335),a=n(1811),o=n(17272),l=n(94450),c=n(99194),u=n(7613);const d=()=>{if(u.A.mainContext.getViewportWidthSize()===s.Ww.Large)return 0;const e=[a.I.sort,a.I.page,a.I.offsets,a.I.nl_destination_id,a.I.d_start_from,a.I.d_end_to,a.I.nl_transportation_id,a.I.nl_occupancy_adults,a.I.nl_length_from,"s_holiday_target"];l.WI.TravelplanetPl===l.wI.domainId&&e.push(a.I.nl_occupancy_children,a.I.nl_ages_children);const t=(0,c.$)(u.A.searchForm.getFormValues());let n=0;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&!e.includes(r)&&(Array.isArray(t[r])?n+=t[r].length:(0,o.Im)(t[r])||(n+=1));return n}},99194(e,t,n){"use strict";n.d(t,{$:()=>s});var r=n(83279),i=n(17272);const s=e=>{const t=(0,r.A)(e);for(const e of Object.keys(t))Array.isArray(t[e])&&(0,i.Im)(t[e])&&delete t[e];return t}},48171(e,t,n){"use strict";n.d(t,{a:()=>c});var r=n(87387),i=n.n(r),s=n(1811),a=n(54077),o=n(5539),l=n(7613);const c=(e,t,n)=>{const r=![o.mn.EUROPE,o.mn.ACCOMMODATION].includes(l.A.searchForm.getHolidayTarget()),i=l.A.searchForm.getFieldsDefResponse();return r&&e==s.I.nl_destination_id&&i?.countriesForcedTransportationTypeDef&&(t=(0,a.E)(t,i?.countriesForcedTransportationTypeDef,n?.destinationsOptionsMap)),e==s.I.nl_destination_id&&n?.countriesForcedOnlineSaleCustomerDef&&(t=(0,a.Ip)(t,n?.countriesForcedOnlineSaleCustomerDef,n?.destinationsOptionsMap)),e==s.I.nl_destination_id&&i?.countriesForcedMinimalPriceDef&&(t=(0,a.Sg)(t,i?.countriesForcedMinimalPriceDef,n?.destinationsOptionsMap)),e==s.I.sort&&(t=(0,a.Bt)(t)),t}},50798(e,t,n){"use strict";n.d(t,{r:()=>i});var r=n(5539);const i=(e,t)=>{const n=new r.kl(e),i=Array.isArray(t)?t:[];return n.getDestinationsTextValues(i).join(", ")}},5920(e,t,n){"use strict";n.d(t,{F:()=>o});var r=n(62724),i=n(48171),s=n(71489),a=n(7613);const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0;if((0,r.A)(a.A.searchForm.getFormValues(),n))return;c&&a.A.searchForm.setPendingTrackingOrigin(c);const u=a.A.searchForm.getFormValues();let d=null===n?{...u}:n;d=(0,i.a)(e,d,t),(0,s.g)({field:e,internalValues:d,searchFormProps:t,triggerChange:o,changedValue:l})}},71897(e,t,n){"use strict";n.d(t,{_:()=>a});var r=n(1811),i=n(5920),s=n(7613);const a=(e,t,n)=>{const a={...s.A.searchForm.getFormValues(),[r.I.nl_stars]:e};(0,i.F)(r.I.nl_stars,n,a,!0,t.toString())}},52730(e,t,n){"use strict";n.d(t,{d:()=>p});var r=n(87387),i=n.n(r),s=n(5539),a=n(1811),o=n(45527),l=n(64060),c=n(77335),u=n(62601),d=n(7613);const p=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;d.A.searchForm.getIsHomepage()?n===a.I.nl_destination_id&&(0,o.S)(e,s.YO.HomePage).catch((e=>(0,l.Cp)(e))):((d.A.mainContext.getViewportWidthSize()===c.Ww.Large||d.A.searchForm.getUpdateOnMobileFields().includes(n)||n==a.I.page||d.A.searchForm.getDisplayType()===s.r.IFrame)&&(0,u.r)(t,e,n,r),(0,o.S)(e).catch((e=>(0,l.Cp)(e))))}},15008(e,t,n){"use strict";n.d(t,{R:()=>s});var r=n(5920),i=n(7613);const s=(e,t,n,s)=>{const a={...i.A.searchForm.getFormValues(),[e]:t};t===n&&delete a[e],(0,r.F)(e,s,a,!1)}},61714(e,t,n){"use strict";n.d(t,{f:()=>l});var r=n(5539),i=n(1811),s=n(48171),a=n(62601),o=n(7613);const l=(e,t)=>{const n=i.I.sort,l={...o.A.searchForm.getFormValues()};e==r.wN?delete l[n]:l[n]=e,delete l[i.I.page],delete l[i.I.offsets],o.A.searchForm.setPaginationHistory({});const c=(0,s.a)(i.I.sort,l,t);o.A.searchForm.setFormValues(c),(0,a.r)(!0,t,i.I.sort)}},64203(e,t,n){"use strict";n.d(t,{LH:()=>h,oI:()=>p});var r=n(1811);const i="search-form-pagination-history-v1",s=new Set([r.I.page,r.I.offsets,"gclid"]),a=e=>"object"==typeof e&&null!==e,o=()=>{try{return window.sessionStorage}catch{return null}},l=e=>a(e)?Object.entries(e).reduce(((e,t)=>
2{let[n,r]=t;return"string"==typeof r&&(e[Number(n)]=r),e}),{}):null,c=()=>{const e=o();if(!e)return{};try{const t=e.getItem(i);if(!t)return{};const n=JSON.parse(t);return a(n)?Object.entries(n).reduce(((e,t)=>{let[n,r]=t;const i=l(r);return i&&(e[n]=i),e}),{}):{}}catch{return{}}},u=e=>{const t=o();if(t)try{t.setItem(i,JSON.stringify(e))}catch{}},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.pathname,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search;const n=new URLSearchParams(t);for(const e of s)n.delete(e);const r=new URLSearchParams,i=Array.from(n.entries()).sort(((e,t)=>{let[n,r]=e,[i,s]=t;return n===i?r.localeCompare(s):n.localeCompare(i)}));for(const[e,t]of i)r.append(e,t);const a=r.toString();return a.length>0?`${e}?${a}`:e},p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.pathname,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search;const n=void 0,r=void 0,i=c()[d(e,t)];return i?{...i}:null},h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.pathname,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.search;const r=c(),i=void 0;r[d(t,n)]={...e},u(r)}},7539(e,t,n){"use strict";n.d(t,{q:()=>a});var r=n(63634),i=n.n(r),s=n(17272);const a=async(e,t)=>{const n=[];for(const[r,a]of t){const t=async(e,t)=>{try{const n=i()(e),r=await n.evaluate(t);return Array.isArray(r)&&1===r.length?r[0]:r}catch(e){return}},o=await t(a.path,e),l=Number(o);!(0,s.Im)(o)&&Number.isFinite(l)&&l>0&&n.push({id:r,filterLabel:a.label,affectedResultsCount:l})}return n}},82978(e,t,n){"use strict";n.d(t,{n:()=>o});var r=n(87387),i=n.n(r),s=n(17272),a=n(7613);const o=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!Array.isArray(e))return[];const n=t?{...a.A.searchForm.getFormValues()}:{...a.A.searchForm.getParsedInitialValues()},r=[];for(const t of e)r.push(t.id);return Object.entries(n).filter((e=>r.includes(e[0])&&!(0,s.Im)(e[1]))).reduce(((e,t)=>(e.push(t[0]),e)),[])}},27755(e,t,n){"use strict";n.d(t,{i:()=>u});var r=n(73306),i=n(81233),s=n(80980),a=n(54077),o=n(83279),l=n(1811),c=n(17272);const u=(e,t)=>{const n=(0,o.A)(e.searchParams)||(0,r.C)(!0);let u=(0,i.A)((0,s.A)(n,t.fieldsDef,!1));return t.countriesForcedTransportationTypeDef&&(u=(0,a.E)(u,t.countriesForcedTransportationTypeDef,e.destinationsOptionsMap)),(0,c.Im)(u[l.I.sort])&&!(0,c.Im)(e.defaultSorting)&&(u[l.I.sort]=e.defaultSorting),u}},45527(e,t,n){"use strict";n.d(t,{S:()=>o});var r=n(5539),i=n(24030),s=n(7613),a=n(64457);const o=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.YO.Others;if(e?.searchEntity!==r.G$.Review){s.A.searchForm.setIsBoxesCountLoading(!0);try{const n=(0,i.N)(),o=new AbortController,l=await(0,r.QY)(n,o.signal,t);s.A.searchForm.setFoundBoxesCount(l?.boxesCount),s.A.searchForm.setTotalBoxesCount(l?.boxesCount),s.A.searchForm.setBoxesCountHeader(l?.title),s.A.searchForm.setIsBoxesCountLoading(!1);const c=s.A.searchForm.getFoundBoxesCount();if(void 0!==c&&(0,a.B)({search_results:c}),0==l?.boxesCount&&"function"==typeof e.zeroResultsFoundCallback){const t=(0,i.N)();e.zeroResultsFoundCallback(t,s.A.searchForm.getFieldsDefResponse().fieldsDef,!1,s.A.searchForm.getIsHomepage())}}catch(e){if(s.A.searchForm.setIsBoxesCountLoading(!1),"AbortError"!==e.name)throw e}}}},26812(e,t,n){"use strict";n.d(t,{r:()=>l});var r=n(77335),i=n(10918),s=n(5539),a=n(7613);const o=e=>e?i.Y.Homepage:a.A.searchForm.getDisplayType()===s.r.IFrame?i.Y.IFrameFilter:a.A.searchForm.getDisplayType()===s.r.LandingPage?i.Y.LandingPage:i.Y.SearchResults,l=()=>{const e=(0,r.Kz)(),t=o(a.A.searchForm.getIsHomepage()),n=window.matchMedia("(max-height: 750px)").matches;a.A.mainContext.setSearchFormTypeAndHeight(e,t,n)}},89996(e,t,n){"use strict";n.d(t,{D:()=>l});var r=n(63634),i=n.n(r),s=n(17272),a=n(7613),o=n(5539);const l=async()=>{const e=new Map,t=a.A.searchForm.getFieldsDefResponse().fieldsDef;for(const[n,r]of o.nv){const a=async(e,t)=>{try{const n=i()(e),r=await n.evaluate(t);
2return Array.isArray(r)&&1===r.length?r[0]:r}catch(e){return}},o=await a(r.labelPath,t);(0,s.Im)(o)||e.set(n,{...r,label:o})}return e}},62601(e,t,n){"use strict";n.d(t,{r:()=>f});var r=n(5539),i=n(1811),s=n(17272),a=n(73306);const o=e=>{const t=[i.I.s_voucher_code],n=location.pathname.match(/^(\/?[a-z0-9-]+\/).*/),r=n?n[1]:location.pathname;let s=`${location.protocol}//${location.host}${r}`;return"/"!==s.slice(-1)&&(s=`${s}/`),`${s}?${(0,a.Z)(e,t)}`};var l=n(87387),c=n(17327),u=n(7613);const d=(e,t,n,r)=>{const i=u.A.searchForm.getFieldsDefResponse()?.fieldsDef,s=JSON.parse(JSON.stringify(t));e&&u.A.searchForm.getUpdateOnMobileFields().includes(e)&&"function"==typeof r?.mainSearchCallback?(0,c.d)((()=>r.mainSearchCallback(s,i,!1,r?.searchEntity))):e&&"function"==typeof r?.filtersChangeCallback&&(0,c.d)((()=>r.filtersChangeCallback(e,s,i,r?.searchEntity,n)))};var p=n(24030),h=n(57449);const f=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;const l=(0,p.N)(),c=n==i.I.page;if(u.A.searchForm.getDisplayType()===r.r.LandingPage){if(e){const e=t?.redirectToResults??u.A.searchForm.getInitialSearchFormProps()?.redirectToResults;e?.(l)}return}if(c||(0,h.R7)(l),e){const e=void 0,t=new URLSearchParams(window.location.search).get("gclid");(0,s.Im)(t)||(l.gclid=t);const n=o(l);window.history.pushState({},null,n)}d(n,l,a,t);const f=t?.onChange??u.A.searchForm.getInitialSearchFormProps()?.onChange;f&&"function"==typeof f&&f(l,c)}},47192(e){"use strict";function t(e){return"function"==typeof e?e():e}function n(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}e.exports=function e(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=void 0,o=void 0,l=void 0,c=[];return function e(){var d=t(i),p=(new Date).getTime(),h=!a||p-a>d;a=p;for(var f=arguments.length,m=Array(f),g=0;g<f;g++)m[g]=arguments[g];if(h&&s.leading)return s.accumulate?Promise.resolve(r.call(this,[m])).then((function(e){return e[0]})):Promise.resolve(r.call.apply(r,[this].concat(m)));if(o?clearTimeout(l):o=n(),c.push(m),l=setTimeout(u.bind(this),d),s.accumulate){var v=c.length-1;return o.promise.then((function(e){return e[v]}))}return o.promise};function u(){var e=o;clearTimeout(l),Promise.resolve(s.accumulate?r.call(this,c):r.apply(this,c[c.length-1])).then(e.resolve,e.reject),c=[],o=null}}},63634(e){var t,n;t=function(){var e,t,n;return function(){function e(t,n,r){function i(a,o){if(!n[a]){if(!t[a]){var l=void 0;if(s)return s(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n;return i(t[a][1][e]||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var s=void 0,a=0;a<r.length;a++)i(r[a]);return i}return e}()({1:[function(e,t,n){const r=e("./utils"),i=function(){"use strict";const e=r.stringToArray,t=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],n=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],i=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],s=["Thousand","Million","Billion","Trillion"];function a(e,r){var a=function(e,r,o){var l="";if(e<=19)l=(r?" and ":"")+(o?n[e]:t[e]);else if(e<100){const t=Math.floor(e/10),n=e%10;l=(r?" and ":"")+i[t-2],n>0?l+="-"+a(n,!1,o):o&&(l=l.substring(0,l.length-1)+"ieth")}else if(e<1e3){const n=Math.floor(e/100),i=e%100;l=(r?", ":"")+t[n]+" Hundred",i>0?l+=a(i,!0,o):o&&(l+="th")}else{var c=Math.floor(Math.log10(e)/3);c>s.length&&(c=s.length);const t=Math.pow(10,3*c),n=Math.floor(e/t),i=e-n*t;l=(r?", ":"")+a(n,!1,!1)+" "+s[c-1],i>0?l+=a(i,!0,o):o&&(l+="th")}return l},o;return a(e,!1,r)}const o={};function l(e){const t=void 0,n=e.split(/,\s|\sand\s|[\s\\-]/).map((e=>o[e]));
vendor: 5,835 bytes, line 2
2let r=[0];n.forEach((e=>{if(e<100){let t=r.pop();t>=1e3&&(r.push(t),t=0),r.push(t+e)}else r.push(r.pop()*e)}));const i=void 0;return r.reduce(((e,t)=>e+t),0)}t.forEach((function(e,t){o[e.toLowerCase()]=t})),n.forEach((function(e,t){o[e.toLowerCase()]=t})),i.forEach((function(e,t){const n=e.toLowerCase();o[n]=10*(t+2),o[n.substring(0,e.length-1)+"ieth"]=o[n]})),o.hundredth=100,s.forEach((function(e,t){const n=e.toLowerCase(),r=Math.pow(10,3*(t+1));o[n]=r,o[n+"th"]=r}));const c=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],u={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function d(e){for(var t=0;t<c.length;t++){const n=c[t];if(e>=n[0])return n[1]+d(e-n[0])}return""}function p(e){for(var t=0,n=1,r=e.length-1;r>=0;r--){const i=e[r],s=u[i];s<n?t-=s:(n=s,t+=s)}return t}function h(e,t){for(var n=[],r=t.charCodeAt(0);e>0;)n.unshift(String.fromCharCode((e-1)%26+r)),e=Math.floor((e-1)/26);return n.join("")}function f(e,t){for(var n=t.charCodeAt(0),r=0,i=0;i<e.length;i++)r+=(e.charCodeAt(e.length-i-1)-n+1)*Math.pow(26,i);return r}function m(e,t){if(void 0===e)return;const n=void 0;return _(e=Math.floor(e),y(t))}const g={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},v={UPPER:"upper",LOWER:"lower",TITLE:"title"};function _(t,n){let r;const i=t<0;switch(t=Math.abs(t),n.primary){case g.LETTERS:r=h(t,n.case===v.UPPER?"A":"a");break;case g.ROMAN:r=d(t),n.case===v.UPPER&&(r=r.toUpperCase());break;case g.WORDS:r=a(t,n.ordinal),n.case===v.UPPER?r=r.toUpperCase():n.case===v.LOWER&&(r=r.toLowerCase());break;case g.DECIMAL:r=""+t;var s=n.mandatoryDigits-r.length;if(s>0){var o=new Array(s+1).join("0");r=o+r}if(48!==n.zeroCode&&(r=e(r).map((e=>String.fromCodePoint(e.codePointAt(0)+n.zeroCode-48))).join("")),n.regular){const e=void 0;for(let e=Math.floor((r.length-1)/n.groupingSeparators.position);e>0;e--){const t=r.length-e*n.groupingSeparators.position;r=r.substr(0,t)+n.groupingSeparators.character+r.substr(t)}}else n.groupingSeparators.reverse().forEach((e=>{const t=r.length-e.position;r=r.substr(0,t)+e.character+r.substr(t)}));if(n.ordinal){var l,c,u={1:"st",2:"nd",3:"rd"}[r[r.length-1]];(!u||r.length>1&&"1"===r[r.length-2])&&(u="th"),r+=u}break;case g.SEQUENCE:throw{code:"D3130",value:n.token}}return i&&(r="-"+r),r}const b=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function y(t){const n={type:"integer",primary:g.DECIMAL,case:v.LOWER,ordinal:!1};let r,i;const s=t.lastIndexOf(";");switch(-1===s?r=t:(r=t.substring(0,s),i=t.substring(s+1),"o"===i[0]&&(n.ordinal=!0)),r){case"A":n.case=v.UPPER;case"a":n.primary=g.LETTERS;break;case"I":n.case=v.UPPER;case"i":n.primary=g.ROMAN;break;case"W":n.case=v.UPPER,n.primary=g.WORDS;break;case"Ww":n.case=v.TITLE,n.primary=g.WORDS;break;case"w":n.primary=g.WORDS;break;default:{let t=null,i=0,s=0,a=[],o=0;const l=void 0;if(e(r).map((e=>e.codePointAt(0))).reverse().forEach((e=>{let n=!1;for(let r=0;r<b.length;r++){const s=b[r];if(e>=s&&e<=s+9){if(n=!0,i++,o++,null===t)t=s;else if(s!==t)throw{code:"D3131"};break}}n||(35===e?(o++,s++):a.push({position:o,character:String.fromCodePoint(e)}))})),i>0){n.primary=g.DECIMAL,n.zeroCode=t,n.mandatoryDigits=i,n.optionalDigits=s;const e=void 0,r=function(e){if(0===e.length)return 0;const t=e[0].character;for(let n=1;n<e.length;n++)if(e[n].character!==t)return 0;const n=e.map((e=>e.position)),r=function(e,t){return 0===t?e:r(t,e%t)},i=n.reduce(r);for(let e=1;e<=n.length;e++)if(-1===n.indexOf(e*i))return 0;return i}(a);r>0?(n.regular=!0,n.groupingSeparators={position:r,character:a[0].character}):(n.regular=!1,n.groupingSeparators=a)}else n.primary=g.SEQUENCE,n.token=r}}return n}const x={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function w(e){var t=[];const n={type:"datetime",parts:t},r=function(n,r){if(r>n){let i=e.substring(n,r);i=i.split("]]").join("]"),t.push({type:"literal",value:i})}};for(var i=0,s=0;s<e.length;){if("["===e.charAt(s)){if("["===e.charAt(s+1)){r(i,s),t.push({type:"literal",value:"["}),i=s+=2;continue}if(r(i,s),i=s,-1===(s=e.indexOf("]",i)))throw{code:"D3135"};let n=e.substring(i+1,s);n=n.split(/\s+/).join("");var a={type:"marker",component:n.charAt(0)},o=n.lastIndexOf(","),l;if(-1!==o){const e=n.substring(o+1),t=e.indexOf("-");let r,i;const s=function(e){return void 0===e||"*"===e?void 0:parseInt(e)};-1===t?r=e:(r=e.substring(0,t),i=e.substring(t+1));const c={min:s(r),max:s(i)};a.width=c,l=n.substring(1,o)}else l=n.substring(1);if(1===l.length)a.presentation1=l;else if(l.length>1){var c=l.charAt(l.length-1);-1!=="atco".indexOf(c)?(a.presentation2=c,"o"===c&&(a.ordinal=!0),a.presentation1=l.substring(0,l.length-1)):a.presentation1=l}else a.presentation1=x[a.component];if(void 0===a.presentation1)throw{code:"D3132",value:a.component};if("n"===a.presentation1[0])a.names=v.LOWER;else if("N"===a.presentation1[0])"n"===a.presentation1[1]?a.names=v.TITLE:a.names=v.UPPER;else if(-1!=="YMDdFWwXxHhmsf".indexOf(a.component)){var u=a.presentation1;if(a.presentation2&&(u+=";"+a.presentation2),a.integerFormat=y(u),a.width&&void 0!==a.width.min&&a.integerFormat.mandatoryDigits<a.width.min&&(a.integerFormat.mandatoryDigits=a.width.min),"Y"===a.component)if(a.n=-1,a.width&&void 0!==a.width.max)a.n=a.width.max,a.integerFormat.mandatoryDigits=a.n;else{var d=a.integerFormat.mandatoryDigits+a.integerFormat.optionalDigits;d>=2&&(a.n=d)}const e=t[t.length-1];e&&e.integerFormat&&(e.integerFormat.parseWidth=e.integerFormat.mandatoryDigits)}"Z"!==a.component&&"z"!==a.component||(a.integerFormat=y(a.presentation1)),t.push(a),i=s+1}s++}return r(i,s),n}
2const k=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],I=["January","February","March","April","May","June","July","August","September","October","November","December"],C=864e5,A=function(e){const t=Date.UTC(e.year,e.month);var n=new Date(t).getUTCDay();return 0===n&&(n=7),n>4?t+(8-n)*C:t-(n-1)*C},E=function(e,t){return{year:e,month:t,nextMonth:function(){return 11===t?E(e+1,0):E(e,t+1)},previousMonth:function(){return 0===t?E(e-1,11):E(e,t-1)},nextYear:function(){return E(e+1,t)},previousYear:function(){return E(e-1,t)}}},S=function(e,t){return(t-e)/6048e5+1},T=(e,t)=>{let n;switch(t){case"Y":n=e.getUTCFullYear();break;case"M":n=e.getUTCMonth()+1;break;case"D":n=e.getUTCDate();break;case"d":{const t=void 0,r=void 0;n=(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0))/C+1;break}case"F":n=e.getUTCDay(),0===n&&(n=7);break;case"W":{const t=E(e.getUTCFullYear(),0),r=A(t),i=Date.UTC(t.year,e.getUTCMonth(),e.getUTCDate());let s=S(r,i);if(s>52){const e=void 0;i>=A(t.nextYear())&&(s=1)}else if(s<1){const e=A(t.previousYear());s=S(e,i)}n=Math.floor(s);break}case"w":{const t=E(e.getUTCFullYear(),e.getUTCMonth()),r=A(t),i=Date.UTC(t.year,t.month,e.getUTCDate());let s=S(r,i);if(s>4){const e=void 0;i>=A(t.nextMonth())&&(s=1)}else if(s<1){const e=A(t.previousMonth());s=S(e,i)}n=Math.floor(s);break}case"X":{const t=E(e.getUTCFullYear(),0),r=A(t),i=A(t.nextYear()),s=e.getTime();n=s<r?t.year-1:s>=i?t.year+1:t.year;break}case"x":{const t=E(e.getUTCFullYear(),e.getUTCMonth()),r=A(t),i=t.nextMonth(),s=A(i),a=e.getTime();n=a<r?t.previousMonth().month+1:a>=s?i.month+1:t.month+1;break}case"H":n=e.getUTCHours();break;case"h":n=e.getUTCHours(),n%=12,0===n&&(n=12);break;case"P":n=e.getUTCHours()>=12?"pm":"am";break;case"m":n=e.getUTCMinutes();break;case"s":n=e.getUTCSeconds();break;case"f":n=e.getUTCMilliseconds();break;case"Z":case"z":break;case"C":case"E":n="ISO"}return n};let O=null;function F(e,t,n){var r=0,i=0;if(void 0!==n){const e=parseInt(n);r=Math.floor(e/100),i=e%100}var s=function(e,t){var n=T(e,t.component);if(-1!=="YMDdFWwXxHhms".indexOf(t.component))if("Y"===t.component&&-1!==t.n&&(n%=Math.pow(10,t.n)),t.names){if("M"===t.component||"x"===t.component)n=I[n-1];else{if("F"!==t.component)throw{code:"D3133",value:t.component};n=k[n]}t.names===v.UPPER?n=n.toUpperCase():t.names===v.LOWER&&(n=n.toLowerCase()),t.width&&n.length>t.width.max&&(n=n.substring(0,t.width.max))}else n=_(n,t.integerFormat);else if("f"===t.component)n=_(n,t.integerFormat);else if("Z"===t.component||"z"===t.component){const e=100*r+i;if(t.integerFormat.regular)n=_(e,t.integerFormat);else{const s=t.integerFormat.mandatoryDigits;if(1===s||2===s)n=_(r,t.integerFormat),0!==i&&(n+=":"+m(i,"00"));else{if(3!==s&&4!==s)throw{code:"D3134",value:s};n=_(e,t.integerFormat)}}e>=0&&(n="+"+n),"z"===t.component&&(n="GMT"+n),0===e&&"t"===t.presentation2&&(n="Z")}else"P"===t.component&&t.names===v.UPPER&&(n=n.toUpperCase());return n};let a;void 0===t?(null===O&&(O=w("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),a=O):a=w(t);const o=void 0,l=new Date(e+60*(60*r+i)*1e3);let c="";return a.parts.forEach((function(e){"literal"===e.type?c+=e.value:c+=s(l,e)})),c}function j(e){var t={};if("datetime"===e.type)t.type="datetime",t.parts=e.parts.map((function(e){var t={};if("literal"===e.type)t.regex=e.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if("Z"===e.component||"z"===e.component){let n;Array.isArray(e.integerFormat.groupingSeparators)||(n=e.integerFormat.groupingSeparators),t.regex="","z"===e.component&&(t.regex="GMT"),t.regex+="[-+][0-9]+",n&&(t.regex+=n.character+"[0-9]+"),t.parse=function(t){"z"===e.component&&(t=t.substring(3));let r=0,i=0;if(n)r=Number.parseInt(t.substring(0,t.indexOf(n.character))),i=Number.parseInt(t.substring(t.indexOf(n.character)+1));else{const e=void 0;t.length-1<=2?r=Number.parseInt(t):(r=Number.parseInt(t.substring(0,3)),i=Number.parseInt(t.substring(3)))}return 60*r+i}}else if(e.integerFormat)t=j(e.integerFormat);else{t.regex="[a-zA-Z]+";var n={};
vendor: 11,513 bytes, line 2
2if("M"===e.component||"x"===e.component)I.forEach((function(t,r){e.width&&e.width.max?n[t.substring(0,e.width.max)]=r+1:n[t]=r+1}));else if("F"===e.component)k.forEach((function(t,r){r>0&&(e.width&&e.width.max?n[t.substring(0,e.width.max)]=r:n[t]=r)}));else{if("P"!==e.component)throw{code:"D3133",value:e.component};n={am:0,AM:0,pm:1,PM:1}}t.parse=function(e){return n[e]}}return t.component=e.component,t}));else{t.type="integer";const n=e.case===v.UPPER;switch(e.primary){case g.LETTERS:t.regex=n?"[A-Z]+":"[a-z]+",t.parse=function(e){return f(e,n?"A":"a")};break;case g.ROMAN:t.regex=n?"[MDCLXVI]+":"[mdclxvi]+",t.parse=function(e){return p(n?e:e.toUpperCase())};break;case g.WORDS:t.regex="(?:"+Object.keys(o).concat("and","[\\-, ]").join("|")+")+",t.parse=function(e){return l(e.toLowerCase())};break;case g.DECIMAL:t.regex="[0-9]",e.parseWidth?t.regex+=`{${e.parseWidth}}`:t.regex+="+",e.ordinal&&(t.regex+="(?:th|st|nd|rd)"),t.parse=function(t){let n=t;return e.ordinal&&(n=t.substring(0,t.length-2)),e.regular?n=n.split(",").join(""):e.groupingSeparators.forEach((e=>{n=n.split(e.character).join("")})),48!==e.zeroCode&&(n=n.split("").map((t=>String.fromCodePoint(t.codePointAt(0)-e.zeroCode+48))).join("")),parseInt(n)};break;case g.SEQUENCE:throw{code:"D3130",value:e.token}}}return t}function N(e,t){if(void 0===e)return;const n=void 0,r=void 0,i=void 0;return j(y(t)).parse(e)}function D(e,t){const n=void 0,r=j(w(t)),i="^"+r.parts.map((e=>"("+e.regex+")")).join("")+"$",s=void 0;var a=new RegExp(i,"i").exec(e);if(null!==a){const e=161,t=130,n=84,i=72,s=23,l=47,c={};for(let e=1;e<a.length;e++){const t=r.parts[e-1];t.parse&&(c[t.component]=t.parse(a[e]))}if(0===Object.getOwnPropertyNames(c).length)return;let u=0;const d=e=>{u<<=1,u+=e?1:0},p=e=>!(~e&u||!(e&u));"YXMxWwdD".split("").forEach((e=>d(c[e])));const h=void 0,f=!p(e)&&p(t),m=p(n),g=!m&&p(i);u=0,"PHhmsf".split("").forEach((e=>d(c[e])));const v=void 0,_=!p(s)&&p(l),b=void 0,y=void 0,x=(f?"YD":m?"XxwF":g?"XWF":"YMD")+(_?"Phmsf":"Hmsf"),w=this.environment.timestamp;let k=!1,I=!1;if(x.split("").forEach((e=>{if(void 0===c[e])k?(c[e]=-1!=="MDd".indexOf(e)?1:0,I=!0):c[e]=T(w,e);else if(k=!0,I)throw{code:"D3136"}})),c.M>0?c.M-=1:c.M=0,f){const e=Date.UTC(c.Y,0),t=1e3*(c.d-1)*60*60*24,n=new Date(e+t);c.M=n.getUTCMonth(),c.D=n.getUTCDate()}if(m)throw{code:"D3136"};if(g)throw{code:"D3136"};_&&(c.H=12===c.h?0:c.h,1===c.P&&(c.H+=12));var o=Date.UTC(c.Y,c.M,c.D,c.H,c.m,c.s,c.f);return(c.Z||c.z)&&(o-=60*(c.Z||c.z)*1e3),o}}var M=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function R(e,t){if(void 0!==e){if(void 0===t){if(!M.test(e))throw{stack:(new Error).stack,code:"D3110",value:e};return Date.parse(e)}return D.call(this,e,t)}}function P(e,t,n){if(void 0!==e)return F.call(this,e,t,n)}return{formatInteger:m,parseInteger:N,fromMillis:P,toMillis:R}}();t.exports=i},{"./utils":6}],2:[function(e,t,n){(function(n){(function(){var r=e("./utils");const i=(()=>{"use strict";var e=r.isNumeric,t=r.isArrayOfStrings,i=r.isArrayOfNumbers,s=r.createSequence,a=r.isSequence,o=r.isFunction,l=r.isLambda,c=r.isPromise,u=r.getFunctionArity,d=r.isDeepEqual,p=r.stringToArray;function h(e){if(void 0!==e){var t=0;return e.forEach((function(e){t+=e})),t}}function f(e){return void 0===e?0:e.length}function m(e){if(void 0!==e&&0!==e.length)return Math.max.apply(Math,e)}function g(e){if(void 0!==e&&0!==e.length)return Math.min.apply(Math,e)}function v(e){if(void 0!==e&&0!==e.length){var t=0;return e.forEach((function(e){t+=e})),t/e.length}}function _(t,n=!1){if(void 0!==t){var r;if("string"==typeof t)r=t;else if(o(t))r="";else{if("number"==typeof t&&!isFinite(t))throw{code:"D3001",value:t,stack:(new Error).stack};var i=n?2:0;Array.isArray(t)&&t.outerWrapper&&(t=t[0]),r=JSON.stringify(t,(function(t,n){return null!=n&&n.toPrecision&&e(n)?Number(n.toPrecision(15)):n&&o(n)?"":n}),i)}return r}}function b(e,t,n){if(void 0!==e){var r=p(e),i=r.length;if(i+t<0&&(t=0),void 0!==n){if(n<=0)return"";var s=t>=0?t+n:i+t+n;return r.slice(t,s).join("")}return r.slice(t).join("")}}function y(e,t){if(void 0!==e){var n=e.indexOf(t);return n>-1?e.substr(0,n):e}}function x(e,t){if(void 0!==e){var n=e.indexOf(t);return n>-1?e.substr(n+t.length):e}}function w(e){if(void 0!==e)return e.toLowerCase()}function k(e){if(void 0!==e)return e.toUpperCase()}function I(e){if(void 0!==e)return p(e).length}function C(e){if(void 0!==e){var t=e.replace(/[ \t\n\r]+/gm," ");return" "===t.charAt(0)&&(t=t.substring(1))," "===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}}function A(e,t,n){if(void 0!==e){var r;void 0!==n&&0!==n.length||(n=" "),t=Math.trunc(t);var i=Math.abs(t)-I(e);if(i>0){var s=new Array(i+1).join(n);n.length>1&&(s=b(s,0,i)),r=t>0?e+s:s+e}else r=e;return r}}async function E(e,t){var n=e.apply(this,[t]);if(c(n)&&(n=await n),n&&"number"!=typeof n.start&&"number"!==n.end&&!Array.isArray(n.groups)&&!o(n.next))throw{code:"T1010",stack:(new Error).stack};return n}async function S(e,t){var n,r;if(void 0!==e)return"string"==typeof t?-1!==e.indexOf(t):void 0!==await E(t,e)}async function T(e,t,n){if(void 0!==e){if(n<0)throw{stack:(new Error).stack,value:n,code:"D3040",index:3};var r=s();if(void 0===n||n>0){var i=0,a=await E(t,e);if(void 0!==a)for(;void 0!==a&&(void 0===n||i<n);)r.push({match:a.match,index:a.start,groups:a.groups}),a=await E(a.next),i++}return r}}async function O(e,t,n,r){if(void 0!==e){var i=this,s;if(""===t)throw{code:"D3010",stack:(new Error).stack,value:t,index:2};if(r<0)throw{code:"D3011",stack:(new Error).stack,value:r,index:4};s="string"==typeof n?function(e){for(var t="",r=0,i=n.indexOf("$",r);-1!==i&&r<n.length;){t+=n.substring(r,i),r=i+1;var s=n.charAt(r);if("$"===s)t+="$",r++;else if("0"===s)t+=e.match,r++;else{var a;if(a=0===e.groups.length?1:Math.floor(Math.log(e.groups.length)*Math.LOG10E)+1,i=parseInt(n.substring(r,r+a),10),a>1&&i>e.groups.length&&(i=parseInt(n.substring(r,r+a-1),10)),isNaN(i))t+="$";else{if(e.groups.length>0){var o=e.groups[i-1];void 0!==o&&(t+=o)}r+=i.toString().length}}i=n.indexOf("$",r)}return t+n.substring(r)}:n;var a="",o=0;if(void 0===r||r>0){var l=0;if("string"==typeof t){for(var u=e.indexOf(t,o);-1!==u&&(void 0===r||l<r);)a+=e.substring(o,u),a+=n,o=u+t.length,l++,u=e.indexOf(t,o);a+=e.substring(o)}else{var d=await E(t,e);if(void 0!==d){for(;void 0!==d&&(void 0===r||l<r);){a+=e.substring(o,d.start);var p=s.apply(i,[d]);if(c(p)&&(p=await p),"string"!=typeof p)throw{code:"D3012",stack:(new Error).stack,value:p};a+=p,o=d.start+d.match.length,l++,d=await E(d.next)}a+=e.substring(o)}else a=e}}else a=e;return a}}function F(e){if(void 0!==e){var t="undefined"!=typeof window?window.btoa:function(e){return new n.Buffer.from(e,"binary").toString("base64")};return t(e)}}function j(e){if(void 0!==e){var t="undefined"!=typeof window?window.atob:function(e){return new n.Buffer.from(e,"base64").toString("binary")};return t(e)}}function N(e){if(void 0!==e){var t;try{t=encodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrlComponent"}}return t}}function D(e){if(void 0!==e){var t;try{t=encodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrl"}}return t}}function M(e){if(void 0!==e){var t;try{t=decodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrlComponent"}}return t}}function R(e){if(void 0!==e){var t;try{t=decodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrl"}}return t}}async function P(e,t,n){if(void 0!==e){if(n<0)throw{code:"D3020",stack:(new Error).stack,value:n,index:3};var r=[];if(void 0===n||n>0)if("string"==typeof t)r=e.split(t,n);else{var i=0,s=await E(t,e);if(void 0!==s){for(var a=0;void 0!==s&&(void 0===n||i<n);)r.push(e.substring(a,s.start)),a=s.end,s=await E(s.next),i++;(void 0===n||i<n)&&r.push(e.substring(a))}else r.push(e)}return r}}function L(e,t){if(void 0!==e)return void 0===t&&(t=""),e.join(t)}function U(e,t,n){if(void 0!==e){var r,i={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"â°","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==n&&Object.keys(n).forEach((function(e){i[e]=n[e]}));for(var s=[],a=i["zero-digit"].charCodeAt(0),o=a;o<a+10;o++)s.push(String.fromCharCode(o));var l=s.concat([i["decimal-separator"],i["exponent-separator"],i["grouping-separator"],i.digit,i["pattern-separator"]]),c=t.split(i["pattern-separator"]);if(c.length>2)throw{code:"D3080",stack:(new Error).stack};var u=function(e){var t=function(){for(var t,n=0;n<e.length;n++)if(t=e.charAt(n),-1!==l.indexOf(t)&&t!==i["exponent-separator"])return e.substring(0,n)}(),n=function(){for(var t,n=e.length-1;n>=0;n--)if(t=e.charAt(n),-1!==l.indexOf(t)&&t!==i["exponent-separator"])return e.substring(n+1)}(),r=e.substring(t.length,e.length-n.length),s,a,o,c,u=e.indexOf(i["exponent-separator"],t.length);-1===u||u>e.length-n.length?(s=r,a=void 0):(s=r.substring(0,u),a=r.substring(u+1));var d=s.indexOf(i["decimal-separator"]);return-1===d?(o=s,c=n):(o=s.substring(0,d),c=s.substring(d+1)),{prefix:t,suffix:n,activePart:r,mantissaPart:s,exponentPart:a,integerPart:o,fractionalPart:c,subpicture:e}},d=function(e){var t,n,r=e.subpicture,a=r.indexOf(i["decimal-separator"]);a!==r.lastIndexOf(i["decimal-separator"])&&(t="D3081"),r.indexOf(i.percent)!==r.lastIndexOf(i.percent)&&(t="D3082"),r.indexOf(i["per-mille"])!==r.lastIndexOf(i["per-mille"])&&(t="D3083"),-1!==r.indexOf(i.percent)&&-1!==r.indexOf(i["per-mille"])&&(t="D3084");var o=!1,c;for(n=0;n<e.mantissaPart.length;n++){var u=e.mantissaPart.charAt(n);if(-1!==s.indexOf(u)||u===i.digit){o=!0;break}}o||(t="D3085"),-1!==e.activePart.split("").map((function(e){return-1===l.indexOf(e)?"p":"a"})).join("").indexOf("p")&&(t="D3086"),-1!==a?r.charAt(a-1)!==i["grouping-separator"]&&r.charAt(a+1)!==i["grouping-separator"]||(t="D3087"):e.integerPart.charAt(e.integerPart.length-1)===i["grouping-separator"]&&(t="D3088"),-1!==r.indexOf(i["grouping-separator"]+i["grouping-separator"])&&(t="D3089");var d=e.integerPart.indexOf(i.digit);-1!==d&&e.integerPart.substring(0,d).split("").filter((function(e){return s.indexOf(e)>-1})).length>0&&(t="D3090"),-1!==(d=e.fractionalPart.lastIndexOf(i.digit))&&e.fractionalPart.substring(d).split("").filter((function(e){return s.indexOf(e)>-1})).length>0&&(t="D3091");var p="string"==typeof e.exponentPart;if(p&&e.exponentPart.length>0&&(-1!==r.indexOf(i.percent)||-1!==r.indexOf(i["per-mille"]))&&(t="D3092"),p&&(0===e.exponentPart.length||e.exponentPart.split("").filter((function(e){return-1===s.indexOf(e)})).length>0)&&(t="D3093"),t)throw{code:t,stack:(new Error).stack}},p=function(e){var t=function(t,n){for(var r=[],a=t.indexOf(i["grouping-separator"]);-1!==a;){var o=(n?t.substring(0,a):t.substring(a)).split("").filter((function(e){return-1!==s.indexOf(e)||e===i.digit})).length;r.push(o),a=e.integerPart.indexOf(i["grouping-separator"],a+1)}return r},n=t(e.integerPart),r,a=function(e){if(0===e.length)return 0;for(var t=function(e,n){return 0===n?e:t(n,e%n)},n=e.reduce(t),r=1;r<=e.length;r++)if(-1===e.indexOf(r*n))return 0;return n}(n),o=t(e.fractionalPart,!0),l=e.integerPart.split("").filter((function(e){return-1!==s.indexOf(e)})).length,c=l,u=e.fractionalPart.split(""),d=u.filter((function(e){return-1!==s.indexOf(e)})).length,p=u.filter((function(e){return-1!==s.indexOf(e)||e===i.digit}
2)).length,h="string"==typeof e.exponentPart;0===l&&0===p&&(h?(d=1,p=1):l=1),h&&0===l&&-1!==e.integerPart.indexOf(i.digit)&&(l=1),0===l&&0===d&&(d=1);var f=0;return h&&(f=e.exponentPart.split("").filter((function(e){return-1!==s.indexOf(e)})).length),{integerPartGroupingPositions:n,regularGrouping:a,minimumIntegerPartSize:l,scalingFactor:c,prefix:e.prefix,fractionalPartGroupingPositions:o,minimumFactionalPartSize:d,maximumFactionalPartSize:p,minimumExponentSize:f,suffix:e.suffix,picture:e.subpicture}},h=c.map(u);h.forEach(d);var f=h.map(p),m=i["minus-sign"],g=i["zero-digit"],v=i["decimal-separator"],_=i["grouping-separator"],b,y,x,w;if(1===f.length&&(f.push(JSON.parse(JSON.stringify(f[0]))),f[1].prefix=m+f[1].prefix),y=-1!==(b=e>=0?f[0]:f[1]).picture.indexOf(i.percent)?100*e:-1!==b.picture.indexOf(i["per-mille"])?1e3*e:e,0===b.minimumExponentSize)x=y;else{var k=Math.pow(10,b.scalingFactor),I=Math.pow(10,b.scalingFactor-1);for(x=y,w=0;x<I;)x*=10,w-=1;for(;x>k;)x/=10,w+=1}var C,A=function(e,t){var n=Math.abs(e).toFixed(t);return"0"!==g&&(n=n.split("").map((function(e){return e>="0"&&e<="9"?s[e.charCodeAt(0)-48]:e})).join("")),n},E=A(W(x,b.maximumFactionalPartSize),b.maximumFactionalPartSize),S=E.indexOf(".");for(-1===S?E+=v:E=E.replace(".",v);E.charAt(0)===g;)E=E.substring(1);for(;E.charAt(E.length-1)===g;)E=E.substring(0,E.length-1);S=E.indexOf(v);var T=b.minimumIntegerPartSize-S,O=b.minimumFactionalPartSize-(E.length-S-1);if(E=(T>0?new Array(T+1).join(g):"")+E,E+=O>0?new Array(O+1).join(g):"",S=E.indexOf(v),b.regularGrouping>0)for(var F=Math.floor((S-1)/b.regularGrouping),j=1;j<=F;j++)E=[E.slice(0,S-j*b.regularGrouping),_,E.slice(S-j*b.regularGrouping)].join("");else b.integerPartGroupingPositions.forEach((function(e){E=[E.slice(0,S-e),_,E.slice(S-e)].join(""),S++}));if(S=E.indexOf(v),b.fractionalPartGroupingPositions.forEach((function(e){E=[E.slice(0,e+S+1),_,E.slice(e+S+1)].join("")})),S=E.indexOf(v),-1!==b.picture.indexOf(v)&&S!==E.length-1||(E=E.substring(0,E.length-1)),void 0!==w){var N=A(w,0);(T=b.minimumExponentSize-N.length)>0&&(N=new Array(T+1).join(g)+N),E=E+i["exponent-separator"]+(w<0?m:"")+N}return E=b.prefix+E+b.suffix}}function H(e,t){if(void 0!==e){if(e=W(e),(t=void 0===t?10:W(t))<2||t>36)throw{code:"D3100",stack:(new Error).stack,value:t};var n;return e.toString(t)}}function B(e){var t;if(void 0!==e){if("number"==typeof e)t=e;else if("string"==typeof e&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(e)&&!isNaN(parseFloat(e))&&isFinite(e))t=parseFloat(e);else if("string"==typeof e&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(e))t=Number(e);else if(!0===e)t=1;else{if(!1!==e)throw{code:"D3030",value:e,stack:(new Error).stack,index:1};t=0}return t}}function V(e){var t;if(void 0!==e)return Math.abs(e)}function z(e){var t;if(void 0!==e)return Math.floor(e)}function $(e){var t;if(void 0!==e)return Math.ceil(e)}function W(e,t){var n;if(void 0!==e){if(t){var r=e.toString().split("e");e=+(r[0]+"e"+(r[1]?+r[1]+t:t))}var i=(n=Math.round(e))-e;return.5===Math.abs(i)&&1===Math.abs(n%2)&&(n-=1),t&&(r=n.toString().split("e"),n=+(r[0]+"e"+(r[1]?+r[1]-t:-t))),Object.is(n,-0)&&(n=0),n}}function q(e){var t;if(void 0!==e){if(e<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:e};return Math.sqrt(e)}}function Y(e,t){var n;if(void 0!==e){if(n=Math.pow(e,t),!isFinite(n))throw{stack:(new Error).stack,code:"D3061",index:1,value:e,exp:t};return n}}function G(){return Math.random()}function K(t){if(void 0!==t){var n=!1;if(Array.isArray(t)){if(1===t.length)n=K(t[0]);else if(t.length>1){var r;n=t.filter((function(e){return K(e)})).length>0}}else"string"==typeof t?t.length>0&&(n=!0):e(t)?0!==t&&(n=!0):null===t||"object"!=typeof t||o(t)?"boolean"==typeof t&&!0===t&&(n=!0):Object.keys(t).length>0&&(n=!0);return n}}function J(e){if(void 0!==e)return!K(e)}function X(e,t,n,r){var i=[t],s=u(e);return s>=2&&i.push(n),s>=3&&i.push(r),i}async function Q(e,t){if(void 0!==e){for(var n=s(),r=0;r<e.length;r++){var i=X(t,e[r],r,e),a=await t.apply(this,i);void 0!==a&&n.push(a)}return n}}async function Z(e,t){if(void 0!==e){for(var n=s(),r=0;r<e.length;r++){var i=e[r],a=X(t,i,r,e),o;K(await t.apply(this,a))&&n.push(i)}return n}}async function ee(e,t){if(void 0!==e){for(var n=!1,r,i=0;i<e.length;i++){var s=e[i],a=!0;if(void 0!==t){var o=X(t,s,i,e),l;a=K(await t.apply(this,o))}if(a){if(n)throw{stack:(new Error).stack,code:"D3138",index:i};r=s,n=!0}}if(!n)throw{stack:(new Error).stack,code:"D3139"};return r}}function te(){for(var e=[],t=Array.prototype.slice.call(arguments),n=Math.min.apply(Math,t.map((function(e){return Array.isArray(e)?e.length:0}))),r=0;r<n;r++){var i=t.map((e=>e[r]));e.push(i)}return e}async function ne(e,t,n){if(void 0!==e){var r,i=u(t),s;if(i<2)throw{stack:(new Error).stack,code:"D3050",index:1};for(void 0===n&&e.length>0?(r=e[0],s=1):(r=n,s=0);s<e.length;){var a=[r,e[s]];i>=3&&a.push(s),i>=4&&a.push(e),r=await t.apply(this,a),s++}return r}}function re(e){var t=s();if(Array.isArray(e)){var n={};e.forEach((function(e){var t;re(e).forEach((function(e){n[e]=!0}))}
2)),t=re(n)}else null===e||"object"!=typeof e||o(e)||Object.keys(e).forEach((e=>t.push(e)));return t}function ie(e,t){var n;if(Array.isArray(e)){n=s();for(var r=0;r<e.length;r++){var i=ie(e[r],t);void 0!==i&&(Array.isArray(i)?i.forEach((e=>n.push(e))):n.push(i))}}else null===e||"object"!=typeof e||o(e)||(n=e[t]);return n}function se(e,t){return void 0===e?t:void 0===t?e:(Array.isArray(e)||(e=s(e)),Array.isArray(t)||(t=[t]),e.concat(t))}function ae(e){return void 0!==e}function oe(e){var t=s();if(Array.isArray(e))e.forEach((function(e){t=se(t,oe(e))}));else if(null===e||"object"!=typeof e||l(e))t=e;else for(var n in e){var r={};r[n]=e[n],t.push(r)}return t}function le(e){if(void 0!==e){var t={};return e.forEach((function(e){for(var n in e)t[n]=e[n]})),t}}function ce(e){if(void 0!==e){if(e.length<=1)return e;for(var t=e.length,n=new Array(t),r=0;r<t;r++)n[t-r-1]=e[r];return n}}async function ue(e,t){var n=s();for(var r in e){var i=X(t,e[r],r,e),a=await t.apply(this,i);void 0!==a&&n.push(a)}return n}function de(e){throw{code:"D3137",stack:(new Error).stack,message:e||"$error() function evaluated"}}function pe(e,t){if(!e)throw{code:"D3141",stack:(new Error).stack,message:t||"$assert() statement failed"}}function he(t){if(void 0!==t)return null===t?"null":e(t)?"number":"string"==typeof t?"string":"boolean"==typeof t?"boolean":Array.isArray(t)?"array":o(t)?"function":"object"}async function fe(e,n){if(void 0!==e){if(e.length<=1)return e;var r;if(void 0===n){if(!i(e)&&!t(e))throw{stack:(new Error).stack,code:"D3070",index:1};r=async function(e,t){return e>t}}else r=n;var s=async function(e,t){var n=async function(e,t,i){0===t.length?Array.prototype.push.apply(e,i):0===i.length?Array.prototype.push.apply(e,t):await r(t[0],i[0])?(e.push(i[0]),await n(e,t,i.slice(1))):(e.push(t[0]),await n(e,t.slice(1),i))},i=[];return await n(i,e,t),i},a=async function(e){if(!Array.isArray(e)||e.length<=1)return e;var t=Math.floor(e.length/2),n=e.slice(0,t),r=e.slice(t);return n=await a(n),r=await a(r),await s(n,r)},o;return await a(e)}}function me(e){if(void 0!==e){if(e.length<=1)return e;for(var t=new Array(e.length),n=0;n<e.length;n++){var r=Math.floor(Math.random()*(n+1));n!==r&&(t[n]=t[r]),t[r]=e[n]}return t}}function ge(e){if(void 0!==e){if(!Array.isArray(e)||e.length<=1)return e;for(var t=a(e)?s():[],n=0;n<e.length;n++){for(var r=e[n],i=!1,o=0;o<t.length;o++)if(d(r,t[o])){i=!0;break}i||t.push(r)}return t}}async function ve(e,t){var n={};for(var r in e){var i=e[r],s=X(t,i,r,e),a;K(await t.apply(this,s))&&(n[r]=i)}return 0===Object.keys(n).length&&(n=void 0),n}return{sum:h,count:f,max:m,min:g,average:v,string:_,substring:b,substringBefore:y,substringAfter:x,lowercase:w,uppercase:k,length:I,trim:C,pad:A,match:T,contains:S,replace:O,split:P,join:L,formatNumber:U,formatBase:H,number:B,floor:z,ceil:$,round:W,abs:V,sqrt:q,power:Y,random:G,boolean:K,not:J,map:Q,zip:te,filter:Z,single:ee,foldLeft:ne,sift:ve,keys:re,lookup:ie,append:se,exists:ae,spread:oe,merge:le,reverse:ce,each:ue,error:de,assert:pe,type:he,sort:fe,shuffle:me,distinct:ge,base64encode:F,base64decode:j,encodeUrlComponent:N,encodeUrl:D,decodeUrlComponent:M,decodeUrl:R}})();t.exports=i}).call(this)}).call(this,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils":6}],3:[function(e,t,n){var r=e("./datetime"),i=e("./functions"),s=e("./utils"),a=e("./parser"),o=e("./signature"),l=function(){"use strict";var e=s.isNumeric,t=s.isArrayOfStrings,n=s.isArrayOfNumbers,l=s.createSequence,c=s.isSequence,u=s.isFunction,d=s.isLambda,p=s.isIterable,h=s.isPromise,f=s.getFunctionArity,m=s.isDeepEqual,g=de(null);async function v(e,t,n){var r,i=n.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(i&&await i(e,t,n),e.type){case"path":r=await _(e,t,n);break;case"binary":r=await I(e,t,n);break;case"unary":r=await C(e,t,n);break;case"name":r=A(e,t,n);break;case"string":case"number":case"value":r=E(e,t,n);break;case"wildcard":r=S(e,t,n);break;case"descendant":r=O(e,t,n);break;case"parent":r=n.lookup(e.slot.label);break;case"condition":r=await z(e,t,n);break;case"block":r=await $(e,t,n);break;case"bind":r=await V(e,t,n);break;case"regex":r=W(e,t,n);break;case"function":r=await X(e,t,n);break;case"variable":r=q(e,t,n);break;case"lambda":r=ee(e,t,n);break;case"partial":r=await te(e,t,n);break;case"apply":r=await J(e,t,n);break;case"transform":r=G(e,t,n)}if(Object.prototype.hasOwnProperty.call(e,"predicate"))for(var s=0;s<e.predicate.length;s++)r=await k(e.predicate[s].expr,r,n);"path"!==e.type&&Object.prototype.hasOwnProperty.call(e,"group")&&(r=await U(e.group,r,n));var a=n.lookup(Symbol.for("jsonata.__evaluate_exit"));return a&&await a(e,t,n,r),r&&c(r)&&!r.tupleStream&&(e.keepArray&&(r.keepSingleton=!0),0===r.length?r=void 0:1===r.length&&(r=r.keepSingleton?r:r[0])),r}async function _(e,t,n){var r,i;r=Array.isArray(t)&&"variable"!==e.steps[0].type?t:l(t);for(var s=!1,a=void 0,o=0;o<e.steps.length;o++){var c=e.steps[o];if(c.tuple&&(s=!0),0===o&&c.consarray?i=await v(c,r,n):s?a=await w(c,r,a,n):i=await y(c,r,n,o===e.steps.length-1),!s&&(void 0===i||0===i.length))break;void 0===c.focus&&(r=i)}if(s)if(e.tuple)i=a;else for(i=l(),o=0;o<a.length;o++)i.push(a[o]["@"]);return e.keepSingletonArray&&(Array.isArray(i)&&i.cons&&!i.sequence&&(i=l(i)),i.keepSingleton=!0),e.hasOwnProperty("group")&&(i=await U(e.group,s?a:i,n)),i}function b(e,t){var n=de(e);for(const e in t)n.bind(e,t[e]);return n}async function y(e,t,n,r){var i;if("sort"===e.type)return i=await Y(e,t,n),e.stages&&(i=await x(e.stages,i,n)
2),i;i=l();for(var s=0;s<t.length;s++){var a=await v(e,t[s],n);if(e.stages)for(var o=0;o<e.stages.length;o++)a=await k(e.stages[o].expr,a,n);void 0!==a&&i.push(a)}var u=l();return r&&1===i.length&&Array.isArray(i[0])&&!c(i[0])?u=i[0]:i.forEach((function(e){!Array.isArray(e)||e.cons?u.push(e):e.forEach((e=>u.push(e)))})),u}async function x(e,t,n){for(var r=t,i=0;i<e.length;i++){var s=e[i];switch(s.type){case"filter":r=await k(s.expr,r,n);break;case"index":for(var a=0;a<r.length;a++){var o;r[a][s.value]=a}}}return r}async function w(e,t,n,r){var i;if("sort"===e.type){if(n)i=await Y(e,n,r);else{var s=await Y(e,t,r);(i=l()).tupleStream=!0;for(var a=0;a<s.length;a++){var o={"@":s[a]};o[e.index]=a,i.push(o)}}return e.stages&&(i=await x(e.stages,i,r)),i}(i=l()).tupleStream=!0;var c=r;void 0===n&&(n=t.map((e=>({"@":e}))));for(var u=0;u<n.length;u++){c=b(r,n[u]);var d=await v(e,n[u]["@"],c);if(void 0!==d){Array.isArray(d)||(d=[d]);for(var p=0;p<d.length;p++)o={},Object.assign(o,n[u]),d.tupleStream?Object.assign(o,d[p]):(e.focus?(o[e.focus]=d[p],o["@"]=n[u]["@"]):o["@"]=d[p],e.index&&(o[e.index]=p),e.ancestor&&(o[e.ancestor.label]=n[u]["@"])),i.push(o)}}return e.stages&&(i=await x(e.stages,i,r)),i}async function k(t,r,s){var a=l();if(r&&r.tupleStream&&(a.tupleStream=!0),Array.isArray(r)||(r=l(r)),"number"===t.type){var o=Math.floor(t.value),c;o<0&&(o=r.length+o),void 0!==(c=await r[o])&&(Array.isArray(c)?a=c:a.push(c))}else for(o=0;o<r.length;o++){var c,u=c=r[o],d=s;r.tupleStream&&(u=c["@"],d=b(s,c));var p=await v(t,u,d);e(p)&&(p=[p]),n(p)?p.forEach((function(e){var t=Math.floor(e);t<0&&(t=r.length+t),t===o&&a.push(c)})):i.boolean(p)&&a.push(c)}return a}async function I(e,t,n){var r,i=await v(e.lhs,t,n),s=e.value,a=async()=>await v(e.rhs,t,n);if("and"===s||"or"===s)try{return await R(i,a,s)}catch(t){throw t.position=e.position,t.token=s,t}var o=await a();try{switch(s){case"+":case"-":case"*":case"/":case"%":r=j(i,o,s);break;case"=":case"!=":r=N(i,o,s);break;case"<":case"<=":case">":case">=":r=D(i,o,s);break;case"&":r=L(i,o);break;case"..":r=B(i,o);break;case"in":r=M(i,o)}}catch(t){throw t.position=e.position,t.token=s,t}return r}async function C(t,n,r){var s;switch(t.value){case"-":if(void 0===(s=await v(t.expression,n,r)))s=void 0;else{if(!e(s))throw{code:"D1002",stack:(new Error).stack,position:t.position,token:t.value,value:s};s=-s}break;case"[":s=[];let l=await Promise.all(t.expressions.map((async(e,t)=>(r.isParallelCall=t>0,[e,await v(e,n,r)]))));for(let e of l){var[a,o]=e;void 0!==o&&("["===a.value?s.push(o):s=i.append(s,o))}t.consarray&&Object.defineProperty(s,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":s=await U(t,n,r)}return s}function A(e,t,n){return i.lookup(t,e.value)}function E(e){return e.value}function S(e,t){var n=l();return Array.isArray(t)&&t.outerWrapper&&t.length>0&&(t=t[0]),null!==t&&"object"==typeof t&&Object.keys(t).forEach((function(e){var r=t[e];Array.isArray(r)?(r=T(r),n=i.append(n,r)):n.push(r)})),n}function T(e,t){return void 0===t&&(t=[]),Array.isArray(e)?e.forEach((function(e){T(e,t)})):t.push(e),t}function O(e,t){var n,r=l();return void 0!==t&&(F(t,r),n=1===r.length?r[0]:r),n}function F(e,t){Array.isArray(e)||t.push(e),Array.isArray(e)?e.forEach((function(e){F(e,t)})):null!==e&&"object"==typeof e&&Object.keys(e).forEach((function(n){F(e[n],t)}))}function j(t,n,r){var i;if(void 0!==t&&!e(t))throw{code:"T2001",stack:(new Error).stack,value:t};if(void 0!==n&&!e(n))throw{code:"T2002",stack:(new Error).stack,value:n};if(void 0===t||void 0===n)return i;switch(r){case"+":i=t+n;break;case"-":i=t-n;break;case"*":i=t*n;break;case"/":i=t/n;break;case"%":i=t%n}return i}function N(e,t,n){var r,i,s;if(void 0===e||void 0===t)return!1;switch(n){case"=":r=m(e,t);break;case"!=":r=!m(e,t)}return r}function D(e,t,n){var r,i=typeof e,s=typeof t,a,o;if("undefined"!==i&&"string"!==i&&"number"!==i||"undefined"!==s&&"string"!==s&&"number"!==s)throw{code:"T2010",stack:(new Error).stack,value:"string"!==i&&"number"!==i?e:t};if("undefined"!==i&&"undefined"!==s){if(i!==s)throw{code:"T2009",stack:(new Error).stack,value:e,value2:t};
2switch(n){case"<":r=e<t;break;case"<=":r=e<=t;break;case">":r=e>t;break;case">=":r=e>=t}return r}}function M(e,t){var n=!1;if(void 0===e||void 0===t)return!1;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++)if(t[r]===e){n=!0;break}return n}async function R(e,t,n){var r,i=P(e);switch(n){case"and":r=i&&P(await t());break;case"or":r=i||P(await t())}return r}function P(e){var t=i.boolean(e);return void 0!==t&&t}function L(e,t){var n,r="",s="";return void 0!==e&&(r=i.string(e)),void 0!==t&&(s=i.string(t)),r.concat(s)}async function U(e,t,n){var r={},s={},a=!(!t||!t.tupleStream);Array.isArray(t)||(t=l(t)),0===t.length&&t.push(void 0);for(var o=0;o<t.length;o++)for(var c=t[o],u=a?b(n,c):n,d=0;d<e.lhs.length;d++){var p=e.lhs[d],h;if("string"!=typeof(h=await v(p[0],a?c["@"]:c,u))&&void 0!==h)throw{code:"T1003",stack:(new Error).stack,position:e.position,value:h};if(void 0!==h){var f={data:c,exprIndex:d};if(s.hasOwnProperty(h)){if(s[h].exprIndex!==d)throw{code:"D1009",stack:(new Error).stack,position:e.position,value:h};s[h].data=i.append(s[h].data,c)}else s[h]=f}}let m=await Promise.all(Object.keys(s).map((async(t,r)=>{let i=s[t];var o=i.data,l=n;if(a){var c=H(i.data);o=c["@"],delete c["@"],l=b(n,c)}return n.isParallelCall=r>0,[t,await v(e.lhs[i.exprIndex][1],o,l)]})));for(let e of m){var[h,g]=await e;void 0!==g&&(r[h]=g)}return r}function H(e){if(!Array.isArray(e))return e;var t={};Object.assign(t,e[0]);for(var n=1;n<e.length;n++)for(const r in e[n])t[r]=i.append(t[r],e[n][r]);return t}function B(e,t){var n;if(void 0!==e&&!Number.isInteger(e))throw{code:"T2003",stack:(new Error).stack,value:e};if(void 0!==t&&!Number.isInteger(t))throw{code:"T2004",stack:(new Error).stack,value:t};if(void 0===e||void 0===t)return n;if(e>t)return n;var r=t-e+1;if(r>1e7)throw{code:"D2014",stack:(new Error).stack,value:r};n=new Array(r);for(var i=e,s=0;i<=t;i++,s++)n[s]=i;return n.sequence=!0,n}async function V(e,t,n){var r=await v(e.rhs,t,n);return n.bind(e.lhs.value,r),r}async function z(e,t,n){var r,s=await v(e.condition,t,n);return i.boolean(s)?r=await v(e.then,t,n):void 0!==e.else&&(r=await v(e.else,t,n)),r}async function $(e,t,n){for(var r,i=de(n),s=0;s<e.expressions.length;s++)r=await v(e.expressions[s],t,i);return r}function W(e){var t=new fe.RegexEngine(e.value),n=function(r,i){var s;t.lastIndex=i||0;var a=t.exec(r);if(null!==a){if(s={match:a[0],start:a.index,end:a.index+a[0].length,groups:[]},a.length>1)for(var o=1;o<a.length;o++)s.groups.push(a[o]);s.next=function(){if(!(t.lastIndex>=r.length)){var i=n(r,t.lastIndex);if(i&&""===i.match)throw{code:"D1004",stack:(new Error).stack,position:e.position,value:e.value.source};return i}}}return s};return n}function q(e,t,n){var r;return""===e.value?t&&t.outerWrapper?t[0]:t:n.lookup(e.value)}async function Y(e,t,n){var r,s=t,a=!!t.tupleStream,o=async function(t,r){for(var i=0,s=0;0===i&&s<e.terms.length;s++){var o=e.terms[s],l=t,c=n;a&&(l=t["@"],c=b(n,t));
2var u=await v(o.expression,l,c);l=r,c=n,a&&(l=r["@"],c=b(n,r));var d=await v(o.expression,l,c),p=typeof u,h=typeof d;if("undefined"!==p)if("undefined"!==h){if("string"!==p&&"number"!==p||"string"!==h&&"number"!==h)throw{code:"T2008",stack:(new Error).stack,position:e.position,value:"string"!==p&&"number"!==p?u:d};if(p!==h)throw{code:"T2007",stack:(new Error).stack,position:e.position,value:u,value2:d};u!==d&&(i=u<d?-1:1,!0===o.descending&&(i=-i))}else i=-1;else i="undefined"===h?0:1}return 1===i},l={environment:n,input:t};return await i.sort.apply(l,[s,o])}function G(e,n,r){var i;return le((async function(n){if(void 0!==n){var i=r.lookup("clone");if(!u(i))throw{code:"T2013",stack:(new Error).stack,position:e.position};var s=await Q(i,[n],null,r),a=await v(e.pattern,s,r);if(void 0!==a){Array.isArray(a)||(a=[a]);for(var o=0;o<a.length;o++){var l=a[o];if(l&&(l.isPrototypeOf(s)||l instanceof Object.constructor))throw{code:"D1010",stack:(new Error).stack,position:e.position};var c=await v(e.update,l,r),d=typeof c;if("undefined"!==d){if("object"!==d||null===c||Array.isArray(c))throw{code:"T2011",stack:(new Error).stack,position:e.update.position,value:c};for(var p in c)l[p]=c[p]}if(void 0!==e.delete){var h=await v(e.delete,l,r);if(void 0!==h){var f=h;if(Array.isArray(h)||(h=[h]),!t(h))throw{code:"T2012",stack:(new Error).stack,position:e.delete.position,value:f};for(var m=0;m<h.length;m++)"object"==typeof l&&null!==l&&delete l[h[m]]}}}}return s}}),"<(oa):o>")}var K=a("function($f, $g) { function($x){ $g($f($x)) } }");async function J(e,t,n){var r,i=await v(e.lhs,t,n);if("function"===e.rhs.type)r=await X(e.rhs,t,n,{context:i});else{var s=await v(e.rhs,t,n);if(!u(s))throw{code:"T2006",stack:(new Error).stack,position:e.position,value:s};if(u(i)){var a=await v(K,null,n);r=await Q(a,[i,s],null,n)}else r=await Q(s,[i],null,n)}return r}async function X(e,t,n,r){var i,s=await v(e.procedure,t,n);if(void 0===s&&"path"===e.procedure.type&&n.lookup(e.procedure.steps[0].value))throw{code:"T1005",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};var a=[];void 0!==r&&a.push(r.context);for(var o=0;o<e.arguments.length;o++){const r=await v(e.arguments[o],t,n);if(u(r)){const e=async function(...e){return await Q(r,e,null,n)};e.arity=f(r),a.push(e)}else a.push(r)}var l="path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value;try{"object"==typeof s&&(s.token=l,s.position=e.position),i=await Q(s,a,t,n)}catch(t){throw t.position||(t.position=e.position),t.token||(t.token=l),t}return i}async function Q(e,t,n,r){var i;for(i=await Z(e,t,n,r);d(i)&&!0===i.thunk;){var s=await v(i.body.procedure,i.input,i.environment);"variable"===i.body.procedure.type&&(s.token=i.body.procedure.value),s.position=i.body.procedure.position;for(var a=[],o=0;o<i.body.arguments.length;o++)a.push(await v(i.body.arguments[o],i.input,i.environment));i=await Z(s,a,n,r)}return i}async function Z(e,t,n,r){var i;try{var s=t;if(e&&(s=ne(e.signature,t,n)),d(e))i=await re(e,s);else if(e&&!0===e._jsonata_function){var a={environment:r,input:n};i=e.implementation.apply(a,s),p(i)&&(i=i.next().value),h(i)&&(i=await i)}else{if("function"!=typeof e)throw{code:"T1006",stack:(new Error).stack};i=e.apply(n,s),h(i)&&(i=await i)}}catch(t){throw e&&(void 0===t.token&&void 0!==e.token&&(t.token=e.token),t.position=e.position||t.position),t}return i}function ee(e,t,n){var r={_jsonata_lambda:!0,input:t,environment:n,arguments:e.arguments,signature:e.signature,body:e.body};return!0===e.thunk&&(r.thunk=!0),r.apply=async function(e,i){return await Q(r,i,t,e?e.environment:n)},r}async function te(e,t,n){for(var r,i=[],s=0;s<e.arguments.length;s++){var a=e.arguments[s];"operator"===a.type&&"?"===a.value?i.push(a):i.push(await v(a,t,n))}var o=await v(e.procedure,t,n);if(void 0===o&&"path"===e.procedure.type&&n.lookup(e.procedure.steps[0].value))throw{code:"T1007",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};if(d(o))r=ie(o,i);else if(o&&!0===o._jsonata_function)r=se(o.implementation,i);else{if("function"!=typeof o)throw{code:"T1008",stack:(new Error).stack,position:e.position,token:"path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value};r=se(o,i)}return r}function ne(e,t,n){return void 0===e?t:e.validate(t,n);var r}async function re(e,t){var n,r=de(e.environment);
2return e.arguments.forEach((function(e,n){r.bind(e.value,t[n])})),"function"==typeof e.body?await ae(e.body,r):await v(e.body,e.input,r)}function ie(e,t){var n=de(e.environment),r=[],i;return e.arguments.forEach((function(e,i){var s=t[i];s&&"operator"===s.type&&"?"===s.value?r.push(e):n.bind(e.value,s)})),{_jsonata_lambda:!0,input:e.input,environment:n,arguments:r,body:e.body}}function se(e,t){var n=oe(e),r="function("+(n=n.map((function(e){return"$"+e.trim()}))).join(", ")+"){ _ }",i=a(r),s;return i.body=e,ie(i,t)}async function ae(e,t){var n,r=oe(e).map((function(e){return t.lookup(e.trim())})),i={environment:t},s=e.apply(i,r);return h(s)&&(s=await s),s}function oe(e){var t=e.toString(),n,r;return/\(([^)]*)\)/.exec(t)[1].split(",")}function le(e,t){var n={_jsonata_function:!0,implementation:e};return void 0!==t&&(n.signature=o(t)),n}async function ce(e,t){if(void 0!==e){var n=this.input;void 0!==t&&(n=t,Array.isArray(n)&&!c(n)&&((n=l(n)).outerWrapper=!0));try{var r=a(e,!1)}catch(e){throw he(e),{stack:(new Error).stack,code:"D3120",value:e.message,error:e}}try{var i=await v(r,n,this.environment)}catch(e){throw he(e),{stack:(new Error).stack,code:"D3121",value:e.message,error:e}}return i}}function ue(e){if(void 0!==e)return JSON.parse(i.string(e))}function de(e){var t={};const n={bind:function(e,n){t[e]=n},lookup:function(n){var r;return t.hasOwnProperty(n)?r=t[n]:e&&(r=e.lookup(n)),r},timestamp:e?e.timestamp:null,async:!!e&&e.async,isParallelCall:!!e&&e.isParallelCall,global:e?e.global:{ancestry:[null]}};if(e){var r=e.lookup(Symbol.for("jsonata.__createFrame_push"));r&&r(e,n)}return n}g.bind("sum",le(i.sum,"<a<n>:n>")),g.bind("count",le(i.count,"<a:n>")),g.bind("max",le(i.max,"<a<n>:n>")),g.bind("min",le(i.min,"<a<n>:n>")),g.bind("average",le(i.average,"<a<n>:n>")),g.bind("string",le(i.string,"<x-b?:s>")),g.bind("substring",le(i.substring,"<s-nn?:s>")),g.bind("substringBefore",le(i.substringBefore,"<s-s:s>")),g.bind("substringAfter",le(i.substringAfter,"<s-s:s>")),g.bind("lowercase",le(i.lowercase,"<s-:s>")),g.bind("uppercase",le(i.uppercase,"<s-:s>")),g.bind("length",le(i.length,"<s-:n>")),g.bind("trim",le(i.trim,"<s-:s>")),g.bind("pad",le(i.pad,"<s-ns?:s>")),g.bind("match",le(i.match,"<s-f<s:o>n?:a<o>>")),g.bind("contains",le(i.contains,"<s-(sf):b>")),g.bind("replace",le(i.replace,"<s-(sf)(sf)n?:s>")),g.bind("split",le(i.split,"<s-(sf)n?:a<s>>")),g.bind("join",le(i.join,"<a<s>s?:s>")),g.bind("formatNumber",le(i.formatNumber,"<n-so?:s>")),g.bind("formatBase",le(i.formatBase,"<n-n?:s>")),g.bind("formatInteger",le(r.formatInteger,"<n-s:s>")),g.bind("parseInteger",le(r.parseInteger,"<s-s:n>")),g.bind("number",le(i.number,"<(nsb)-:n>")),g.bind("floor",le(i.floor,"<n-:n>")),g.bind("ceil",le(i.ceil,"<n-:n>")),g.bind("round",le(i.round,"<n-n?:n>")),g.bind("abs",le(i.abs,"<n-:n>")),g.bind("sqrt",le(i.sqrt,"<n-:n>")),g.bind("power",le(i.power,"<n-n:n>")),g.bind("random",le(i.random,"<:n>")),g.bind("boolean",le(i.boolean,"<x-:b>")),g.bind("not",le(i.not,"<x-:b>")),g.bind("map",le(i.map,"<af>")),g.bind("zip",le(i.zip,"<a+>")),g.bind("filter",le(i.filter,"<af>")),g.bind("single",le(i.single,"<af?>")),g.bind("reduce",le(i.foldLeft,"<afj?:j>")),g.bind("sift",le(i.sift,"<o-f?:o>")),g.bind("keys",le(i.keys,"<x-:a<s>>")),g.bind("lookup",le(i.lookup,"<x-s:x>")),g.bind("append",le(i.append,"<xx:a>")),g.bind("exists",le(i.exists,"<x:b>")),g.bind("spread",le(i.spread,"<x-:a<o>>")),g.bind("merge",le(i.merge,"<a<o>:o>")),g.bind("reverse",le(i.reverse,"<a:a>")),g.bind("each",le(i.each,"<o-f:a>")),g.bind("error",le(i.error,"<s?:x>")),g.bind("assert",le(i.assert,"<bs?:x>")),g.bind("type",le(i.type,"<x:s>")),g.bind("sort",le(i.sort,"<af?:a>")),g.bind("shuffle",le(i.shuffle,"<a:a>")),g.bind("distinct",le(i.distinct,"<x:x>")),g.bind("base64encode",le(i.base64encode,"<s-:s>")),g.bind("base64decode",le(i.base64decode,"<s-:s>")),g.bind("encodeUrlComponent",le(i.encodeUrlComponent,"<s-:s>")),g.bind("encodeUrl",le(i.encodeUrl,"<s-:s>")),g.bind("decodeUrlComponent",le(i.decodeUrlComponent,"<s-:s>")),g.bind("decodeUrl",le(i.decodeUrl,"<s-:s>")),g.bind("eval",le(ce,"<sx?:x>")),g.bind("toMillis",le(r.toMillis,"<s-s?:n>")),g.bind("fromMillis",le(r.fromMillis,"<n-s?s?:s>")),g.bind("clone",le(ue,"<(oa)-:o>"));var pe={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",D1010:"Attempted to access the Javascript object prototype",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of str
2ings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function he(e){var t=pe[e.code];if(void 0!==t){var n=t.replace(/\{\{\{([^}]+)}}}/g,(function(){return e[arguments[1]]}));n=n.replace(/\{\{([^}]+)}}/g,(function(){return JSON.stringify(e[arguments[1]])})),e.message=n}}function fe(e,t){var n,i;try{n=a(e,t&&t.recover),i=n.errors,delete n.errors}catch(e){throw he(e),e}var s=de(g),o=new Date;return s.bind("now",le((function(e,t){return r.fromMillis(o.getTime(),e,t)}),"<s?s?:s>")),s.bind("millis",le((function(){return o.getTime()}),"<:n>")),t&&t.RegexEngine?fe.RegexEngine=t.RegexEngine:fe.RegexEngine=RegExp,{evaluate:async function(e,t,r){if(void 0!==i){var a={code:"S0500",position:0};throw he(a),a}var u,d;
2if(void 0!==t)for(var p in u=de(s),t)u.bind(p,t[p]);else u=s;u.bind("$",e),o=new Date,u.timestamp=o,Array.isArray(e)&&!c(e)&&((e=l(e)).outerWrapper=!0);try{return d=await v(n,e,u),"function"==typeof r&&r(null,d),d}catch(a){throw he(a),a}},assign:function(e,t){s.bind(e,t)},registerFunction:function(e,t,n){var r=le(t,n);s.bind(e,r)},ast:function(){return n},errors:function(){return i}}}return fe.parser=a,fe}();t.exports=l},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(e,t,n){var r=e("./signature");const i=(()=>{"use strict";var e={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},t={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},n=function(n){var r=0,i=n.length,s=function(e,t){var n;return{type:e,value:t,position:r}},a=function(){for(var e=r,t=0,s,a,o=function(e){if("/"===n.charAt(e)&&0===t){for(var r=0;"\\"===n.charAt(e-(r+1));)r++;if(r%2==0)return!0}return!1};r<i;){var l=n.charAt(r);if(o(r)){if(""===(s=n.substring(e,r)))throw{code:"S0301",stack:(new Error).stack,position:r};for(r++,l=n.charAt(r),e=r;"i"===l||"m"===l;)r++,l=n.charAt(r);return a=n.substring(e,r)+"g",new RegExp(s,a)}"("!==l&&"["!==l&&"{"!==l||"\\"===n.charAt(r-1)||t++,")"!==l&&"]"!==l&&"}"!==l||"\\"===n.charAt(r-1)||t--,r++}throw{code:"S0302",stack:(new Error).stack,position:r}},o=function(l){if(r>=i)return null;for(var c=n.charAt(r);r<i&&" \t\n\r\v".indexOf(c)>-1;)r++,c=n.charAt(r);if("/"===c&&"*"===n.charAt(r+1)){var u=r;for(r+=2,c=n.charAt(r);"*"!==c||"/"!==n.charAt(r+1);)if(c=n.charAt(++r),r>=i)throw{code:"S0106",stack:(new Error).stack,position:u};return r+=2,c=n.charAt(r),o(l)}if(!0!==l&&"/"===c)return r++,s("regex",a());if("."===c&&"."===n.charAt(r+1))return r+=2,s("operator","..");if(":"===c&&"="===n.charAt(r+1))return r+=2,s("operator",":=");if("!"===c&&"="===n.charAt(r+1))return r+=2,s("operator","!=");if(">"===c&&"="===n.charAt(r+1))return r+=2,s("operator",">=");if("<"===c&&"="===n.charAt(r+1))return r+=2,s("operator","<=");if("*"===c&&"*"===n.charAt(r+1))return r+=2,s("operator","**");if("~"===c&&">"===n.charAt(r+1))return r+=2,s("operator","~>");if("?"===c&&":"===n.charAt(r+1))return r+=2,s("operator","?:");if("?"===c&&"?"===n.charAt(r+1))return r+=2,s("operator","??");if(Object.prototype.hasOwnProperty.call(e,c))return r++,s("operator",c);
vendor: 13,308 bytes, line 2
2if('"'===c||"'"===c){var d=c;r++;for(var p="";r<i;){if("\\"===(c=n.charAt(r)))if(r++,c=n.charAt(r),Object.prototype.hasOwnProperty.call(t,c))p+=t[c];else{if("u"!==c)throw{code:"S0103",stack:(new Error).stack,position:r,token:c};var h=n.substr(r+1,4);if(!/^[0-9a-fA-F]+$/.test(h))throw{code:"S0104",stack:(new Error).stack,position:r};var f=parseInt(h,16);p+=String.fromCharCode(f),r+=4}else{if(c===d)return r++,s("string",p);p+=c}r++}throw{code:"S0101",stack:(new Error).stack,position:r}}var m,g=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(n.substring(r)),v;if(null!==g){var _=parseFloat(g[0]);if(!isNaN(_)&&isFinite(_))return r+=g[0].length,s("number",_);throw{code:"S0102",stack:(new Error).stack,position:r,token:g[0]}}if("`"===c){r++;var b=n.indexOf("`",r);if(-1!==b)return v=n.substring(r,b),r=b+1,s("name",v);throw r=i,{code:"S0105",stack:(new Error).stack,position:r}}for(var y=r,x;;)if(x=n.charAt(y),y===i||" \t\n\r\v".indexOf(x)>-1||Object.prototype.hasOwnProperty.call(e,x)){if("$"===n.charAt(r))return v=n.substring(r+1,y),r=y,s("variable",v);switch(v=n.substring(r,y),r=y,v){case"or":case"in":case"and":return s("operator",v);case"true":return s("value",!0);case"false":return s("value",!1);case"null":return s("value",null);default:return r===i&&""===v?null:s("name",v)}}else y++};return o},i;return function(t,i){var s,a,o={},l=[],c=function(){var e=[];"(end)"!==s.id&&e.push({type:s.type,value:s.value,position:s.position});for(var t=a();null!==t;)e.push(t),t=a();return e},u={nud:function(){var e={code:"S0211",token:this.value,position:this.position};if(i)return e.remaining=c(),e.type="error",l.push(e),e;throw e.stack=(new Error).stack,e}},d=function(e,t){var n=o[e];return t=t||0,n?t>=n.lbp&&(n.lbp=t):((n=Object.create(u)).id=n.value=e,n.lbp=t,o[e]=n),n},p=function(e){if(i){e.remaining=c(),l.push(e);var t=o["(error)"];return(s=Object.create(t)).error=e,s.type="(error)",s}throw e.stack=(new Error).stack,e},h=function(e,n){if(e&&s.id!==e){var r,i={code:r="(end)"===s.id?"S0203":"S0202",position:s.position,token:s.value,value:e};return p(i)}var l=a(n);if(null===l)return(s=o["(end)"]).position=t.length,s;var c=l.value,u=l.type,d;switch(u){case"name":case"variable":d=o["(name)"];break;case"operator":if(!(d=o[c]))return p({code:"S0204",stack:(new Error).stack,position:l.position,token:c});break;case"string":case"number":case"value":d=o["(literal)"];break;case"regex":u="regex",d=o["(regex)"];break;default:return p({code:"S0205",stack:(new Error).stack,position:l.position,token:c})}return(s=Object.create(d)).value=c,s.type=u,s.position=l.position,s},f=function(e){var t,n=s;for(h(null,!0),t=n.nud();e<s.lbp;)n=s,h(),t=n.led(t);return t},m=function(e){var t;d(e,0).nud=function(){return this}},g=function(t,n,r){var i=n||e[t],s=d(t,i);return s.led=r||function(e){return this.lhs=e,this.rhs=f(i),this.type="binary",this},s},v=function(e,t,n){var r=d(e,t);return r.led=n,r},_=function(e,t){var n=d(e);return n.nud=t||function(){return this.expression=f(70),this.type="unary",this},n};m("(end)"),m("(name)"),m("(literal)"),m("(regex)"),d(":"),d(";"),d(","),d(")"),d("]"),d("}"),d(".."),g("."),g("+"),g("-"),g("*"),g("/"),g("%"),g("="),g("<"),g(">"),g("!="),g("<="),g(">="),g("&"),g("and"),g("or"),g("in"),m("and"),m("or"),m("in"),_("-"),g("~>"),g("??",e["??"],(function(e){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[e]},this.then=e,this.else=f(0),this})),v("(error)",10,(function(e){return this.lhs=e,this.error=s.error,this.remaining=c(),this.type="error",this})),_("*",(function(){return this.type="wildcard",this})),_("**",(function(){return this.type="descendant",this})),_("%",(function(){return this.type="parent",this})),g("(",e["("],(function(e){if(this.procedure=e,this.type="function",this.arguments=[],")"!==s.id)for(;"operator"===s.type&&"?"===s.id?(this.type="partial",this.arguments.push(s),h("?")):this.arguments.push(f(0)),","===s.id;)h(",");if(h(")",!0),"name"===e.type&&("function"===e.value||"λ"===e.value)){if(this.arguments.forEach((function(e,t){if("variable"!==e.type)return p({code:"S0208",stack:(new Error).stack,position:e.position,token:e.value,value:t+1})})),this.type="lambda","<"===s.id){for(var t=s.position,n=1,i="<";n>0&&"{"!==s.id&&"(end)"!==s.id;){var a=h();">"===a.id?n--:"<"===a.id&&n++,i+=a.value}h(">");try{this.signature=r(i)}catch(e){return e.position=t+e.offset,p(e)}}h("{"),this.body=f(0),h("}")}return this})),_("(",(function(){for(var e=[];")"!==s.id&&(e.push(f(0)),";"===s.id);)h(";");return h(")",!0),this.type="block",this.expressions=e,this})),_("[",(function(){var e=[];if("]"!==s.id)for(;;){var t=f(0);if(".."===s.id){var n={type:"binary",value:"..",position:s.position,lhs:t};h(".."),n.rhs=f(0),t=n}if(e.push(t),","!==s.id)break;h(",")}return h("]",!0),this.expressions=e,this.type="unary",this})),g("[",e["["],(function(t){if("]"===s.id){for(var n=t;n&&"binary"===n.type&&"["===n.value;)n=n.lhs;return n.keepArray=!0,h("]"),t}return this.lhs=t,this.rhs=f(e["]"]),this.type="binary",h("]",!0),this})),g("^",e["^"],(function(e){h("(");for(var t=[];;){var n={descending:!1};if("<"===s.id?h("<"):">"===s.id&&(n.descending=!0,h(">")),n.expression=f(0),t.push(n),","!==s.id)break;h(",")}return h(")"),this.lhs=e,this.rhs=t,this.type="binary",this}));var b=function(e){var t=[];if("}"!==s.id)for(;;){var n=f(0);h(":");var r=f(0);if(t.push([n,r]),","!==s.id)break;h(",")}return h("}",!0),void 0===e?(this.lhs=t,this.type="unary"):(this.lhs=e,this.rhs=t,this.type="binary"),this};_("{",b),g("{",e["{"],b),v(":=",e[":="],(function(t){return"variable"!==t.type?p({code:"S0212",stack:(new Error).stack,position:t.position,token:t.value}):(this.lhs=t,this.rhs=f(e[":="]-1),this.type="binary",this)})),g("@",e["@"],(function(t){return this.lhs=t,this.rhs=f(e["@"]),"variable"!==this.rhs.type?p({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)})),g("#",e["#"],(function(t){return this.lhs=t,this.rhs=f(e["#"]),"variable"!==this.rhs.type?p({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)})),g("?",e["?"],(function(e){return this.type="condition",this.condition=e,this.then=f(0),":"===s.id&&(h(":"),this.else=f(0)),this})),g("?:",e["?:"],(function(e){return this.type="condition",this.condition=e,this.then=e,this.else=f(0),this})),_("|",(function(){return this.type="transform",this.pattern=f(0),h("|"),this.update=f(0),","===s.id&&(h(","),this.delete=f(0)),h("|"),this}));var y=function(e){var t;if("function"!==e.type||e.predicate)if("condition"===e.type)e.then=y(e.then),void 0!==e.else&&(e.else=y(e.else)),t=e;else if("block"===e.type){var n=e.expressions.length;n>0&&(e.expressions[n-1]=y(e.expressions[n-1])),t=e}else t=e;else{var r={type:"lambda",thunk:!0,arguments:[],position:e.position};r.body=e,t=r}return t},x=0,w=0,k=[],I=function(e,t){switch(e.type){case"name":case"wildcard":t.level--,0===t.level&&(void 0===e.ancestor||(k[t.index].slot.label=e.ancestor.label),e.ancestor=t,e.tuple=!0);break;case"parent":t.level++;break;case"block":e.expressions.length>0&&(e.tuple=!0,t=I(e.expressions[e.expressions.length-1],t));break;case"path":e.tuple=!0;var n=e.steps.length-1;for(t=I(e.steps[n--],t);t.level>0&&n>=0;)t=I(e.steps[n--],t);break;default:throw{code:"S0217",token:e.type,position:e.position}}return t},C=function(e,t){if(void 0!==t.seekingParent||"parent"===t.type){var n=void 0!==t.seekingParent?t.seekingParent:[];"parent"===t.type&&n.push(t.slot),void 0===e.seekingParent?e.seekingParent=n:Array.prototype.push.apply(e.seekingParent,n)}},A=function(e){var t=e.steps.length-1,n=e.steps[t],r=void 0!==n.seekingParent?n.seekingParent:[];"parent"===n.type&&r.push(n.slot);for(var i=0;i<r.length;i++){var s=r[i];for(t=e.steps.length-2;s.level>0;){if(t<0){void 0===e.seekingParent?e.seekingParent=[s]:e.seekingParent.push(s);break}for(var a=e.steps[t--];t>=0&&a.focus&&e.steps[t].focus;)a=e.steps[t--];s=I(a,s)}}},E=function(e){var t;switch(e.type){case"binary":switch(e.value){case".":var n=E(e.lhs);t="path"===n.type?n:{type:"path",steps:[n]},"parent"===n.type&&(t.seekingParent=[n.slot]);var r=E(e.rhs);"function"===r.type&&"path"===r.procedure.type&&1===r.procedure.steps.length&&"name"===r.procedure.steps[0].type&&"function"===t.steps[t.steps.length-1].type&&(t.steps[t.steps.length-1].nextFunction=r.procedure.steps[0].value),"path"===r.type?Array.prototype.push.apply(t.steps,r.steps):(void 0!==r.predicate&&(r.stages=r.predicate,delete r.predicate),t.steps.push(r)),t.steps.filter((function(e){if("number"===e.type||"value"===e.type)throw{code:"S0213",stack:(new Error).stack,position:e.position,value:e.value};return"string"===e.type})).forEach((function(e){e.type="name"})),t.steps.filter((function(e){return!0===e.keepArray})).length>0&&(t.keepSingletonArray=!0);var s=t.steps[0];"unary"===s.type&&"["===s.value&&(s.consarray=!0);var a=t.steps[t.steps.length-1];"unary"===a.type&&"["===a.value&&(a.consarray=!0),A(t);break;case"[":var o=t=E(e.lhs),c="predicate";if("path"===t.type&&(o=t.steps[t.steps.length-1],c="stages"),void 0!==o.group)throw{code:"S0209",stack:(new Error).stack,position:e.position};void 0===o[c]&&(o[c]=[]);var u=E(e.rhs);void 0!==u.seekingParent&&(u.seekingParent.forEach((e=>{1===e.level?I(o,e):e.level--})),C(o,u)),o[c].push({type:"filter",expr:u,position:e.position});break;case"{":if(void 0!==(t=E(e.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:e.position};t.group={lhs:e.rhs.map((function(e){return[E(e[0]),E(e[1])]})),position:e.position};break;case"^":"path"!==(t=E(e.lhs)).type&&(t={type:"path",steps:[t]});var d={type:"sort",position:e.position};d.terms=e.rhs.map((function(e){var t=E(e.expression);return C(d,t),{descending:e.descending,expression:t}})),t.steps.push(d),A(t);break;case":=":(t={type:"bind",value:e.value,position:e.position}).lhs=E(e.lhs),t.rhs=E(e.rhs),C(t,t.rhs);break;case"@":if(t=E(e.lhs),o=t,"path"===t.type&&(o=t.steps[t.steps.length-1]),void 0!==o.stages||void 0!==o.predicate)throw{code:"S0215",stack:(new Error).stack,position:e.position};if("sort"===o.type)throw{code:"S0216",stack:(new Error).stack,position:e.position};e.keepArray&&(o.keepArray=!0),o.focus=e.rhs.value,o.tuple=!0;break;case"#":t=E(e.lhs),o=t,"path"===t.type?o=t.steps[t.steps.length-1]:(t={type:"path",steps:[t]},void 0!==o.predicate&&(o.stages=o.predicate,delete o.predicate)),void 0===o.stages?o.index=e.rhs.value:o.stages.push({type:"index",value:e.rhs.value,position:e.position}),o.tuple=!0;break;case"~>":(t={type:"apply",value:e.value,position:e.position}).lhs=E(e.lhs),t.rhs=E(e.rhs),t.keepArray=t.lhs.keepArray||t.rhs.keepArray;break;default:(t={type:e.type,value:e.value,position:e.position}).lhs=E(e.lhs),t.rhs=E(e.rhs),C(t,t.lhs),C(t,t.rhs)}break;case"unary":t={type:e.type,value:e.value,position:e.position},"["===e.value?t.expressions=e.expressions.map((function(e){var n=E(e);return C(t,n),n})):"{"===e.value?t.lhs=e.lhs.map((function(e){var n=E(e[0]);C(t,n);var r=E(e[1]);return C(t,r),[n,r]})):(t.expression=E(e.expression),"-"===e.value&&"number"===t.expression.type?(t=t.expression).value=-t.value:C(t,t.expression));break;case"function":case"partial":(t={type:e.type,name:e.name,value:e.value,position:e.position}).arguments=e.arguments.map((function(e){var n=E(e);return C(t,n),n})),t.procedure=E(e.procedure);break;case"lambda":t={type:e.type,arguments:e.arguments,signature:e.signature,position:e.position};var p=E(e.body);t.body=y(p);break;case"condition":(t={type:e.type,position:e.position}).condition=E(e.condition),C(t,t.condition),t.then=E(e.then),C(t,t.then),void 0!==e.else&&(t.else=E(e.else),C(t,t.else));break;case"transform":(t={type:e.type,position:e.position}).pattern=E(e.pattern),t.update=E(e.update),void 0!==e.delete&&(t.delete=E(e.delete));break;case"block":(t={type:e.type,position:e.position}).expressions=e.expressions.map((function(e){var n=E(e);return C(t,n),(n.consarray||"path"===n.type&&n.steps[0].consarray)&&(t.consarray=!0),n}));break;case"name":t={type:"path",steps:[e]},e.keepArray&&(t.keepSingletonArray=!0);break;case"parent":t={type:"parent",slot:{label:"!"+x++,level:1,index:w++}},k.push(t);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":t=e;break;case"operator":if("and"===e.value||"or"===e.value||"in"===e.value)e.type="name",t=E(e);else{if("?"!==e.value)throw{code:"S0201",stack:(new Error).stack,position:e.position,token:e.value};t=e}break;case"error":t=e,e.lhs&&(t=E(e.lhs));break;default:var h="S0206";"(end)"===e.id&&(h="S0207");var f={code:h,position:e.position,token:e.value};if(i)return l.push(f),{type:"error",error:f};throw f.stack=(new Error).stack,f}return e.keepArray&&(t.keepArray=!0),t};a=n(t),h();var S=f(0);if("(end)"!==s.id){var T={code:"S0201",position:s.position,token:s.value};p(T)}if("parent"===(S=E(S)).type||void 0!==S.seekingParent)throw{code:"S0217",token:S.type,position:S.position};return l.length>0&&(S.errors=l),S}})();t.exports=i},{"./signature":5}],5:[function(e,t,n){var r=e("./utils");const i=(()=>{"use strict";var e={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function t(t){for(var n=1,i=[],s={},a=s;n<t.length;){var o=t.charAt(n);if(":"===o)break;var l=function(){i.push(s),a=s,s={}}
2,c=function(e,t,n,r){for(var i=1,s=t;s<e.length;)if(s++,(o=e.charAt(s))===r){if(0===--i)break}else o===n&&i++;return s};switch(o){case"s":case"n":case"b":case"l":case"o":s.regex="["+o+"m]",s.type=o,l();break;case"a":s.regex="[asnblfom]",s.type=o,s.array=!0,l();break;case"f":s.regex="f",s.type=o,l();break;case"j":s.regex="[asnblom]",s.type=o,l();break;case"x":s.regex="[asnblfom]",s.type=o,l();break;case"-":a.context=!0,a.contextRegex=new RegExp(a.regex),a.regex+="?";break;case"?":case"+":a.regex+=o;break;case"(":var u=c(t,n,"(",")"),d=t.substring(n+1,u);if(-1!==d.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:d,offset:n};s.regex="["+d+"m]",s.type="("+d+")",n=u,l();break;case"<":if("a"!==a.type&&"f"!==a.type)throw{code:"S0401",stack:(new Error).stack,value:a.type,offset:n};var p=c(t,n,"<",">");a.subtype=t.substring(n+1,p),n=p}n++}var h="^"+i.map((function(e){return"("+e.regex+")"})).join("")+"$",f=new RegExp(h),m=function(e){var t,n;if(r.isFunction(e))t="f";else switch(typeof e){case"string":t="s";break;case"number":t="n";break;case"boolean":t="b";break;case"object":t=null===e?"l":Array.isArray(e)?"a":"o";break;default:t="m"}return t},g=function(e,t){for(var n="^",r=0,s=0;s<i.length;s++){n+=i[s].regex;var a=t.match(n);if(null===a)throw{code:"T0410",stack:(new Error).stack,value:e[r],index:r+1};r=a[0].length}throw{code:"T0410",stack:(new Error).stack,value:e[r],index:r+1}};return{definition:t,validate:function(t,n){var r="";t.forEach((function(e){r+=m(e)}));var s=f.exec(r);if(s){var a=[],o=0;return i.forEach((function(r,i){var l=t[o],c=s[i+1];if(""===c)if(r.context&&r.contextRegex){var u=m(n);if(!r.contextRegex.test(u))throw{code:"T0411",stack:(new Error).stack,value:n,index:o+1};a.push(n)}else a.push(l),o++;else c.split("").forEach((function(n){if("a"===r.type){if("m"===n)l=void 0;else{l=t[o];var i=!0;if(void 0!==r.subtype)if("a"!==n&&c!==r.subtype)i=!1;else if("a"===n&&l.length>0){var s=m(l[0]),u;i=s===r.subtype.charAt(0)&&0===l.filter((function(e){return m(e)!==s})).length}if(!i)throw{code:"T0412",stack:(new Error).stack,value:l,index:o+1,type:e[r.subtype]};"a"!==n&&(l=[l])}a.push(l),o++}else a.push(l),o++}))})),a}g(t,r)}}}return t})();t.exports=i},{"./utils":6}],6:[function(e,t,n){const r=(()=>{"use strict";function e(e){var t=!1;if("number"==typeof e&&(t=!isNaN(e))&&!isFinite(e))throw{code:"D1001",value:e,stack:(new Error).stack};return t}function t(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter((function(e){return"string"!=typeof e})).length),t}function n(t){var n=!1;return Array.isArray(t)&&(n=0===t.filter((function(t){return!e(t)})).length),n}function r(){var e=[];return e.sequence=!0,1===arguments.length&&e.push(arguments[0]),e}function i(e){return!0===e.sequence&&Array.isArray(e)}function s(e){return e&&(!0===e._jsonata_function||!0===e._jsonata_lambda)||"function"==typeof e}function a(e){var t;return"number"==typeof e.arity?e.arity:"function"==typeof e.implementation?e.implementation.length:"number"==typeof e.length?e.length:e.arguments.length}function o(e){return e&&!0===e._jsonata_lambda}var l=("function"==typeof Symbol?Symbol:{}).iterator||"@@iterator";function c(e){return"object"==typeof e&&null!==e&&l in e&&"next"in e&&"function"==typeof e.next}function u(e,t){if(e===t)return!0;if("object"==typeof e&&"object"==typeof t&&null!==e&&null!==t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1;return!0}var r=Object.getOwnPropertyNames(e),i=Object.getOwnPropertyNames(t);if(r.length!==i.length)return!1;for(r=r.sort(),i=i.sort(),n=0;n<r.length;n++)if(r[n]!==i[n])return!1;for(n=0;n<r.length;n++){var s=r[n];if(!u(e[s],t[s]))return!1}return!0}return!1}function d(e){return"object"==typeof e&&null!==e&&"then"in e&&"function"==typeof e.then}function p(e){var t=[];for(let n of e)t.push(n);return t}return{isNumeric:e,isArrayOfStrings:t,isArrayOfNumbers:n,createSequence:r,isSequence:i,isFunction:s,isLambda:o,isIterable:c,getFunctionArity:a,isDeepEqual:u,stringToArray:p,isPromise:d}})();t.exports=r},{}]},{},[3])(3)},e.exports=t()},9725(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(77063),i=n(17022),s=n(69837);function a(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}function o(e,t){e.classList?e.classList.add(t):a(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}
2function l(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function c(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=l(e.className,t):e.setAttribute("class",l(e.className&&e.className.baseVal||"",t))}var u=n(92860),d=n(98058),p=n(18540),h=function e(t,n){return t&&n&&n.split(" ").forEach((function(e){return o(t,e)}))},f=function e(t,n){return t&&n&&n.split(" ").forEach((function(e){return c(t,e)}))},m=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],s=r[1];t.removeClasses(i,"exit"),t.addClass(i,s?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],s,a=r[1]?"appear":"enter";t.addClass(i,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],s,a=r[1]?"appear":"enter";t.removeClasses(i,a),t.addClass(i,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n,r=t.resolveArguments(e)[0];t.removeClasses(r,"appear"),t.removeClasses(r,"enter"),t.addClass(r,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n,r=t.resolveArguments(e)[0];t.addClass(r,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n,r=t.resolveArguments(e)[0];t.removeClasses(r,"exit"),t.addClass(r,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i,s=r?(r&&n?n+"-":"")+e:n[e],a,o;return{baseClassName:s,activeClassName:r?s+"-active":n[e+"Active"],doneClassName:r?s+"-done":n[e+"Done"]}},t}(0,s.A)(t,e);var n=t.prototype;return n.addClass=function e(t,n,r){var i=this.getClassNames(n)[r+"ClassName"],s,a=this.getClassNames("enter").doneClassName;"appear"===n&&"done"===r&&a&&(i+=" "+a),"active"===r&&t&&(0,p.F)(t),i&&(this.appliedClasses[n][r]=i,h(t,i))},n.removeClasses=function e(t,n){var r=this.appliedClasses[n],i=r.base,s=r.active,a=r.done;this.appliedClasses[n]={},i&&f(t,i),s&&f(t,s),a&&f(t,a)},n.render=function e(){var t=this.props,n=t.classNames,s=(0,i.A)(t,["classNames"]);return u.createElement(d.Ay,(0,r.A)({},s,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(u.Component);m.defaultProps={classNames:""},m.propTypes={};const g=m},77063(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})}}]); 3//# sourceMappingURL=searchFormReviewResults.1bb74d378879fae4fd5c.chunk.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.