1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[512],{15852:function(e,t,n){n.r(t);var s=n(85893),a=n(67294),o=n(44495),i=n(11163),l=n(98435),r=n(89056),c=n(96462),d=n(29142),m=n(43884),u=n(2699),h=n(98635),g=n(553),p=n(59739),f=n(57708),C=n(37598),x=n.n(C),j=n(9848),y=n(61730),v=n(8526),M=n(86896),N=n(37873),b=n(16124),w=n(80845),A=n(57011),k=n(86619);t.default=e=>{var t,n,C;let{data:_,isForMobileFromOutSide:Z,slotProps:D,isLoading:Y}=e,R=(0,M.Z)(),S=(0,b.p)(),T=(0,o.T)(),L=(0,y.Z)("(max-width:991.98px)");(0,i.useRouter)();let O=(0,w.C)(e=>e.calendarFirstEndDate.dates),[F,I]=(0,a.useState)(!1),[P,q]=(0,a.useState)(!1),[B,H]=(0,a.useState)(!1),[V,E]=(0,a.useState)(!1),{rooms:Q,setRooms:z,totalPassengersCount:U,passengersValue:J}=(0,l.V)({queryParamName:"Rooms",localStorageKey:"passengerCountHotel"}),{citiesData:W,selectedCity:K,isFetching:X,setSelectedCity:G,setSearchQuery:$,searchInputValue:ee,setRequestControl:et}=(0,r.K)({defaultDestinationCity:function(){{let e=v.A.hotelCities().get("hotelCities");if(e)return{id:e.destinationValue,name:e.destinationName,description:e.destinationTitle,value:e.destinationValue,englishCityName:e.englishCityName}}}(),reactQueryProps:{queryKey:["main-searching-hotel"],onSuccessDataHandler:e=>e.map(e=>({id:e.id,name:e.name,value:e.id,description:e.description,type:e.type,hotelCount:e.hotelCount,englishCityName:e.englishCityName})),select:e=>{let t=JSON.parse(JSON.stringify(e));return t.result=t.result.map(e=>({...e,englishCityName:e.englishCityName?e.englishCityName.toLowerCase().replace(/\s+/g,"-"):null})),t},queryFn:e=>()=>(0,c.h)().post("hotels/destination",{name:e})},isDesktopOrMobileModalOpen:F||B});(0,a.useEffect)(()=>{T((0,d.Cg)({tripType:"RoundTrip_x",tripTypeForLabelControl:"RoundTrip_x"}))},[T]);let en={searchInputValue:ee,citiesData:W,selectedCity:K,isFetching:X,setSelectedCity:G,setSearchQuery:$};(0,a.useEffect)(()=>{_&&G({id:_.id,name:_.name,value:_.value,description:_.description,englishCityName:_.englishCityName})},[_]);let es=e=>{let t={destinationName:(null==e?void 0:e.name)||"",destinationValue:(null==e?void 0:e.id)||"",destinationTitle:"",englishCityName:(null==e?void 0:e.englishCityName)||"",countryCode:null};v.A.hotelCities().saveData("hotelCities",t)};return Z||L?(0,s.jsx)("div",{className:"container d-lg-none",children:(0,s.jsxs)("div",{className:"card border-0 px-2 shadow mb-4",children:[(0,s.jsx)(m.Z,{setOpenCitiesInputBox:I,setRequestControl:et,isLoading:Y,placeholder:R.formatMessage({id:"hotels.NameOfCityHotelOrAddress"}),renderListIcon:e=>1===e.type?(0,s.jsx)("i",{className:"icon-location"}):(0,s.jsx)("i",{className:"icon-double-bed icon-city"}),inputIcon:(0,s.jsx)("i",{className:"icon-double-bed"}),searchingHookReturnsModel:en,calendar:(0,s.jsx)(u.ZP,{type:"hotels"}),handleCityChange:es,openMobileDestinationCities:B,setOpenMobileDestinationCities:H,mobileHandleSearching:e=>{var t,n;if(!e||!e.id||!e.englishCityName){H(!0),et(!0),I(!0);return}if((null===(t=O[0])||void 0===t?void 0:t.firstDate)===(null===(n=O[0])||void 0===n?void 0:n.endDate)){S.warning(R.formatMessage({id:"common.TheDepartureDateMustBeAtLeastOneDayAfterTheArrivalDate"}));return}T((0,j.q)({isLoading:!0})),setTimeout(()=>{var t,n;(0,k.Y)("/hotels/".concat(e.englishCityName,"/?Destination=").concat(e.id,"&CheckIn=").concat((null===(t=O[0])||void 0===t?void 0:t.firstDate)||"","&CheckOut=").concat((null===(n=O[0])||void 0===n?void 0:n.endDate)||"","&Rooms=").concat(Q.map(e=>"".concat(e.adultCount,",").concat(e.childAges.sort(function(e,t){return t-e}).join(","))).join("|")))},0)},passengersValue:(0,s.jsxs)("span",{children:[U||"__"," ",U>1?R.formatMessage({id:"common.Passengers"}):R.formatMessage({id:"common.Passenger"}),","," ",Q.length?Q.length:"__"," ",Q.length>1?R.formatMessage({id:"hotels.Rooms"}):R.formatMessage({id:"hotels.Room"})]}),handleOpenMobilePassengers:()=>{E(!0)}}),(0,s.jsx)(A.Z,{header:(0,s.jsx)("span",{className:"fw-semibold",children:R.formatMessage({id:"common.SelectPassengers"})}),isOpen:V,handelClose:()=>{E(!1)},isShadowHeader:!0,maxHeight:"75vh",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"px-2 py-3",children:(0,s.jsx)(h.default,{withoutConfirmation:!0,setOpen:E,children:(0,s.jsx)(g.Z,{maxChildAges:12,maxRoomCapacity:4,maxRoomsLength:4,rooms:Q,setRooms:z})})}),V?(0,s.jsx)("div",{style:{padding:"12px 25px",position:"sticky",bottom:0,right:0,left:0,background:"white"},className:"shadow-lg w-100",children:(0,s.jsx)(N.Z,{style:{minHeight:42},textButtonReserve:R.formatMessage({id:"common.Confirm"}),onClick:()=>E(!1)})}):(0,s.jsx)(s.Fragment,{})]})})]})}):(0,s.jsx)("div",{className:"d-none d-lg-block container mt-lg-3 mb-lg-5 px-lg-0 ".concat((null==D?void 0:null===(t=D.desktop)||void 0===t?void 0:t.className)||""),children:(0,s.jsx)(p.Z,{handleSearching:e=>{var t,n,s,a;
1if(!e||!e.id||!e.englishCityName){et(!0),I(!0);return}if((null===(t=O[0])||void 0===t?void 0:t.firstDate)===(null===(n=O[0])||void 0===n?void 0:n.endDate)){S.warning(R.formatMessage({id:"common.TheDepartureDateMustBeAtLeastOneDayAfterTheArrivalDate"}));return}T((0,j.q)({isLoading:!0})),(0,k.Y)("/hotels/".concat(e.englishCityName,"/?Destination=").concat(e.id,"&CheckIn=").concat((null===(s=O[0])||void 0===s?void 0:s.firstDate)||"","&CheckOut=").concat((null===(a=O[0])||void 0===a?void 0:a.endDate)||"","&Rooms=").concat(Q.map(e=>"".concat(e.adultCount,",").concat(e.childAges.sort(function(e,t){return t-e}).join(","))).join("|")))},setRequestControl:et,isLoading:Y,slotsProps:{pickerWidth:null==D?void 0:null===(n=D.desktop)||void 0===n?void 0:n.pickerWidth,searchBarWidth:null==D?void 0:null===(C=D.desktop)||void 0===C?void 0:C.searchBarWidth},renderItemIcon:e=>1===e.type?(0,s.jsx)("i",{className:"icon-location"}):(0,s.jsx)("i",{className:"icon-double-bed icon-city"}),placeholder:R.formatMessage({id:"hotels.EnterTheNameOfTheCityHotelOrAddress"}),calendar:(0,s.jsx)(u.ZP,{type:"hotels"}),searchingHookReturnsModel:en,setOpenCitiesInputBox:I,openCitiesInputBox:F,renderToolsBar:()=>(0,s.jsx)("div",{className:"d-flex",children:(0,s.jsx)(f.Z,{setOpen:q,className:x().desktop_dropdown_wide,open:P,value:J,children:(0,s.jsx)(h.default,{setOpen:q,children:(0,s.jsx)(g.Z,{rooms:Q,maxChildAges:12,maxRoomCapacity:4,maxRoomsLength:4,setRooms:z})})})}),handleCityChange:es})})}},553:function(e,t,n){var s=n(85893),a=n(98635);n(67294);var o=n(33515),i=n.n(o),l=n(47238),r=n(51050),c=n(3067),d=n.n(c),m=n(86896),u=n(94180),h=n(93967),g=n.n(h);let p=e=>{let{age:t,increase:n,decrease:a,ageIndex:o}=e,l=(0,m.Z)();return(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsxs)("small",{children:[l.formatMessage({id:"common.ChildAge"})," ",l.formatMessage({id:"common.".concat(u.Q[o])})," ","child"]}),(0,s.jsxs)("div",{className:"border rounded primary-border d-flex align-items-center justify-content-between overflow-hidden ".concat("flex-row-reverse"),children:[(0,s.jsx)(r.Z,{classes:{tooltip:""},title:" ".concat(l.formatMessage({id:"common.From"})," ").concat(d()().subtract(t,"years").format("MMMM YYYY")," ").concat(l.formatMessage({id:"common.Until"})," ").concat(d()().subtract(t-1,"years").format("MMMM YYYY")),placement:"top",children:(0,s.jsx)("span",{className:"cursor-pointer fw-medium ".concat(i().passengers_action_child_button),style:{fontSize:20},onClick:n,children:" + "})}),(0,s.jsxs)("span",{children:[t-1," ",l.formatMessage({id:"common.Until"})," ",t," ",l.formatMessage({id:"common.Year"})]}),(0,s.jsx)(r.Z,{classes:{tooltip:""},title:" ".concat(l.formatMessage({id:"common.From"})," ").concat(d()().subtract(t,"years").format("MMMM YYYY")," ").concat(l.formatMessage({id:"common.Until"})," ").concat(d()().subtract(t-1,"years").format("MMMM YYYY")),placement:"top",children:(0,s.jsx)("span",{className:"cursor-pointer fw-medium ".concat(i().passengers_action_child_button),style:{fontSize:20},onClick:a,children:" - "})})]}),(0,s.jsxs)("span",{className:"fw-semibold d-lg-none",style:{fontSize:14},children:[" ",l.formatMessage({id:"common.From"})," ",d()().subtract(t,"years").format("MMMM YYYY")," ",l.formatMessage({id:"common.Until"})," ",d()().subtract(t-1,"years").format("MMMM YYYY")]})]})};t.Z=e=>{let{flexDirectionClass:t="flex-column",rooms:n,setRooms:o,maxRoomCapacity:r,maxChildAges:c,maxRoomsLength:d}=e,h=(0,m.Z)(),f=()=>{let e=[...n];e.length>5||(e.push({adultCount:1,childCount:0,childAges:[0,0,0,0,0]}),o(e))},C=()=>{let e=[...n];e.length<2||(e.pop(),o(e))},x=(e,t)=>{let s=[...n];s[e].childAges[t]>11||(s[e].childAges[t]=s[e].childAges[t]+1,o(s))},j=(e,t)=>{let s=[...n];s[e].childAges[t]<2||(s[e].childAges[t]=s[e].childAges[t]-1,o(s))},y=(e,t)=>{let s=[...n];if(!(s[e].adultCount+s[e].childCount>5)){if("adultCount"===t)s[e].adultCount=s[e].adultCount+1,o(s);else{s[e].childCount=s[e].childCount+1;let t=s[e].childAges.findIndex(e=>0===e);s[e].childAges[t]=1,o(s)}}},v=(e,t)=>{let s=[...n];if("adultCount"===t){if(s[e].adultCount<2)return;s[e].adultCount=s[e].adultCount-1,o(s)}else{if(s[e].childCount<1)return;s[e].childCount=s[e].childCount-1;let t=s[e].childAges.findLastIndex(e=>0!==e);
1s[e].childAges[t]=0,o(s)}};return n.map((e,o)=>(0,s.jsxs)("div",{className:g()(i().passengers_item,t,n.length-1!==o?"border-bottom":""),children:[o+1===n.length&&0!==o?(0,s.jsxs)("div",{className:g()("d-flex justify-content-between align-items-center",0!==o?"pt-2":""),children:[(0,s.jsxs)("span",{className:"fw-semibold",children:[h.formatMessage({id:"hotels.Room"})," ",h.formatMessage({id:"common.".concat(u.Q[o])})]}),(0,s.jsx)("div",{className:"text-black-50 cursor-pointer",style:{fontSize:22},onClick:C,children:"x"})]}):(0,s.jsxs)("span",{className:g()("fw-semibold",0!==o?"pt-2":""),children:[h.formatMessage({id:"hotels.Room"})," ",h.formatMessage({id:"common.".concat(u.Q[o])})]}),(0,s.jsx)(a.CounterComponent,{count:e.adultCount,title:h.formatMessage({id:"common.Adult"}),decrease:()=>v(o,"adultCount"),increase:()=>y(o,"adultCount")}),(0,s.jsx)(a.CounterComponent,{count:e.childCount,title:h.formatMessage({id:"common.Child"}),decrease:()=>v(o,"childCount"),increase:()=>y(o,"childCount")}),(0,s.jsx)("div",{className:i().passengers_childAges_wrapper,children:e.childAges.filter(e=>e>0).map((e,t)=>(0,s.jsx)(p,{increase:()=>x(o,t),decrease:()=>j(o,t),age:e,ageIndex:t},t))}),n.length<4&&o+1===n.length?(0,s.jsx)("div",{children:(0,s.jsxs)("span",{className:"cursor-pointer text-primary fw-medium",onClick:f,children:[(0,s.jsx)(l.Z,{})," ",h.formatMessage({id:"hotels.AddRoom"})]})}):null]},o))}},94180:function(e,t,n){var s,a;n.d(t,{Q:function(){return s}}),(a=s||(s={}))[a.First=0]="First",a[a.Second=1]="Second",a[a.Third=2]="Third",a[a.Fourth=3]="Fourth",a[a.Fifth=4]="Fifth"},98435:function(e,t,n){n.d(t,{V:function(){return d}});var s=n(67294),a=n(96865),o=n(82751),i=n(99480),l=n(44495),r=n(8526),c=n(86896);let d=e=>{let{localStorageKey:t,queryParamName:n}=e,d=(0,c.Z)(),m=(0,l.T)(),[u,h]=(0,s.useState)([]),g=(0,s.useMemo)(()=>u.reduce((e,t)=>e+t.adultCount+t.childCount,0),[u]),[p,f]=(0,s.useState)(""),[C,x]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=(0,a.UI)(n);if(e)h((0,o.parseQueryString)(e)),x(!0);else{let e=r.A.hotelPassengers().get(t);e?h(e.data):h([{adultCount:2,childCount:0,childAges:[0,0,0,0,0]}]),x(!0)}},[n,t]);let j=(0,s.useCallback)(e=>{let n=e.map(e=>"".concat(e.adultCount,",").concat(e.childAges[0],",").concat(e.childAges[1],",").concat(e.childAges[2],",").concat(e.childAges[3],",").concat(e.childAges[4])).join("|");m((0,i.Nk)({roomdate:n})),C&&r.A.hotelPassengers().saveData(t,{data:e})},[t,m,C]);return(0,s.useEffect)(()=>{j(u),f("".concat(g," ").concat(g>1?d.formatMessage({id:"common.Passengers"}):d.formatMessage({id:"common.Passenger"})).concat(","," ").concat(u.length," ").concat(u.length>1?d.formatMessage({id:"hotels.Rooms"}):d.formatMessage({id:"hotels.Room"})))},[u,g,j]),{passengersValue:p,setRooms:h,totalPassengersCount:g,rooms:u}}},82751:function(e,t,n){n.r(t),n.d(t,{parseQueryString:function(){return o}});var s=n(85893);n(67294);var a=n(9502);function o(e){return e.split("|").map(e=>{let t=e.split(",").map(Number),n=t.slice(1),s=[n[0],n[1],n[2],n[3],n[4]];return{adultCount:t[0],childCount:[...s].filter(e=>e>0).length,childAges:[...s]}})}t.default=e=>{let{landing:t,banners:n,contents:o,additionalLinks:i,questions:l,schemaFaq:r,schemaBreadcrumbList:c,isMobile:d}=e;return(0,s.jsx)(a.Z,{landing:t,banners:n,contents:o,additionalLinks:i,questions:l,schemaFaq:r,isMobile:d,schemaBreadcrumbList:c})}},9502:function(e,t,n){var s=n(85893);n(67294);var a=n(27884),o=n(55008),i=n(70007),l=n(56678),r=n(87707),c=n.n(r),d=n(75013),m=n(57110),u=n(15852),h=n(37598),g=n.n(h),p=n(51082),f=n(4298),C=n.n(f),x=n(93967),j=n.n(x),y=n(75864);t.Z=e=>{var t;let{landing:n,banners:r,isMobile:h,contents:f,additionalLinks:x,questions:v,schemaFaq:M,schemaBreadcrumbList:N}=e,{isMobileApp:b}=(0,y.hg)(),w=b||h,A=(0,a.X)(e=>e.loadingButton.isLoading);return(0,o.V)(),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Z,{children:[n?(0,s.jsx)(l.Z,{headInfo:{title:n.title,description:n.description,canonical:n.canonical}}):null,(null==n?void 0:n.seoTitle)?(0,s.jsx)("h1",{className:j()(c().landing_seo_title,"seo-title"),children:n.seoTitle}):""]}),(0,s.jsx)(d.Z,{isMobile:w,title:null!==(t=null==n?void 0:n.name)&&void 0!==t?t:""}),w?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)(m.Z,{}),(0,s.jsx)("div",{className:"px-lg-4",children:(0,s.jsx)(u.default,{isForMobileFromOutSide:w,isLoading:A,slotProps:{desktop:{className:"".concat(g().desktop_container," internal-desktop-search-main-container")}}})}),(0,s.jsx)(p.Z,{isMobileAgent:w,landing:n,banners:r,questions:v,contents:f,additionalLinks:x}),(0,s.jsx)(i.Z,{children:v?(0,s.jsx)(C(),{id:"faq-schema",strategy:"beforeInteractive",type:"application/ld+json",children:M}):null}),(0,s.jsx)(i.Z,{children:N?(0,s.jsx)(C(),{id:"breadcrumbList-schema",strategy:"beforeInteractive",type:"application/ld+json",children:N}):null}),(0,s.jsx)(C(),{strategy:"worker",src:"https://www.googletagmanager.com/gtag/js?i
1d=".concat("G-R40CX8VZTJ")}),(0,s.jsx)("script",{type:"text/partytown",id:"googletagmanager",defer:!0,dangerouslySetInnerHTML:{__html:"\n window.dataLayer = window.dataLayer || [];\n window.gtag = function gtag(){window.dataLayer.push(arguments);}\n \n gtag('consent', 'update', {\n 'ad_user_data': 'granted',\n 'ad_personalization': 'granted',\n 'ad_storage': 'granted',\n 'analytics_storage': 'granted'\n });\n \n gtag('js', new Date());\n gtag('config', '".concat("G-R40CX8VZTJ","', { 'transport_type': 'beacon', page_path: window.location.pathname});\n ")}})]})}}}]);
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.