1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1924],{35737:function(e,t,a){a.d(t,{q:function(){return x}});var n=a(31549),i=a(98342),s=a(36582),r=a(33406),o=a(44194),l=a(11983),c=a(14517),d=a(622),m=a(35490),u=a(17258),p=a(21048);function x(e){let{bookableTicker:t,bookableBundle:a,bookableStatus:x,bookableRate:y,bookableRatePrefix:h,bookableFullRate:v,bookableLoyaltyRate:f,bookableRateUnit:g,bookableLoyaltyRateDescription:b,bookableStatusText:j,loyaltyStatus:N,tier:k,bookButton:C,onPriceClick:P,onCTAClick:w,navigating:T,hideOriginalPrice:M,user:A,isBundle:E,disableCTALoading:D,showWaitingListButton:S,onWaitingListClick:I,showButtonWhenUnavailable:R=!0}=e,O=(0,i.Z)(),[L,_]=(0,o.useState)(!1),F=(0,p.kj)(e=>e.visualConfiguration),Z=N===r.wcI.ACTIVE_BY_LOGGED_USER,U=N===r.wcI.AVAILABLE_FOR_PROPERTY||N===r.wcI.AVAILABLE_AND_REJECTED||Z,G=(0,o.useCallback)(()=>{D||_(!0),w(t,a)},[D,w,t,a]),B=T&&!L,{description:V,suffix:Y,isMainRateLoyaltyStyled:X}=(0,l.S)(b,E,N,A);return x===r.Ux9.AVAILABLE?(0,n.jsxs)("div",{className:"flex flex-row justify-between items-end",children:[(0,n.jsxs)("div",{className:"flex flex-row gap-4 items-end",children:[(0,n.jsx)("div",{onClick:Z?P:void 0,children:(0,n.jsx)(l.x,{className:(0,c.Z)(Z&&"cursor-pointer hover:opacity-80 "),decimal:!F.displayAmountsWithoutDecimals,value:y,fullValue:h&&!Z?void 0:v,description:V,unit:V?void 0:g,loyalty:X,loyaltyStyle:{color:null==k?void 0:k.color},prefix:Z?void 0:h,hideFullValue:M,shortenNumber:!0,suffix:Y})}),(0,n.jsx)("div",{onClick:P,children:!Z&&U&&f&&b&&!E?(0,n.jsx)(l.x,{className:(0,c.Z)(U&&"cursor-pointer hover:opacity-80 "),decimal:!F.displayAmountsWithoutDecimals,value:f,description:b,loyalty:!0,loyaltyStyle:{color:null==k?void 0:k.color},loyaltyRegisterMessage:O.formatMessage(m.fi.register),shortenNumber:!0}):null})]}),(0,n.jsx)(d.zx,{label:null!=C?C:(0,n.jsx)(s.Z,{...m.i4.view}),className:"w-[108px]",onClick:G,isLoading:L,disabled:B})]}):(0,n.jsxs)("div",{className:"flex flex-row justify-between gap-4",children:[S?(0,n.jsx)(d.Vp,{className:"!px-5 text-gray-300 border-gray-300 text-property-button-sm sm:text-property-button-sm uppercase",label:(0,n.jsx)(s.Z,{...u.O.receiveNotice}),onClick:I,outlined:!0}):(0,n.jsx)(d.Vp,{className:"!px-5 text-gray-300 border-gray-300 text-property-button-sm sm:text-property-button-sm uppercase",label:j,outlined:!0}),R&&(0,n.jsx)(d.zx,{label:(0,n.jsx)(s.Z,{...m.i4.options}),onClick:G,isLoading:L,disabled:B})]})}},21300:function(e,t,a){var n,i;a.d(t,{O:function(){return n}}),(i=n||(n={})).DEFAULT="DEFAULT",i.DEFERRED="DEFERRED"},48909:function(e,t,a){a.d(t,{R:function(){return u}});var n=a(31549),i=a(24608),s=a(44194),r=a(36582),o=a(35490),l=a(14517);let c={xSeconds:"{{count}}s",xMinutes:"{{count}}m",xHours:"{{count}}h",xDays:"{{count}}d"},d={formatDistance:(e,t)=>c[e].replace("{{count}}",t)},m=(e,t)=>e.getTime()<t.getTime();function u(e){let{expirationDate:t,className:a}=e,[c,u]=(0,s.useState)(""),p=(0,s.useCallback)(()=>{let e=new Date,a=(0,i.y3)({start:e,end:m(t,e)?e:t});u((0,i.LU)(a,{locale:d,format:["days","hours","minutes","seconds"]}))},[t]);return(0,s.useEffect)(()=>{p();let e=setInterval(p,1e3);return()=>clearInterval(e)},[p]),(0,n.jsxs)("span",{className:(0,l.Z)("DeferredExpirationCountdown","text-red-100 block sm:inline",a),children:[(0,n.jsx)(r.Z,{...o.i4.paymentTimeLimit})," ",c]})}},1837:function(e,t,a){a.d(t,{W:function(){return s}});var n=a(31549),i=a(622);function s(e){let{className:t}=e;return(0,n.jsxs)("div",{className:t,children:[(0,n.jsx)(i.Od,{animation:"wave",height:37,width:"100%",style:{transform:"scale(1, 1)"}}),(0,n.jsx)(i.Od,{animation:"wave",height:37,width:"100%",style:{transform:"scale(1, 1)"}}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)(i.Od,{animation:"wave",height:37,width:110,style:{transform:"scale(1, 1)"}}),(0,n.jsx)(i.Od,{animation:"wave",className:"mt-[7.5px] mb-[7.5px] flex-1",height:37,style:{transform:"scale(1, 1)"}})]})]})}},60999:function(e,t,a){a.d(t,{Dh:function(){return r},If:function(){return c},MY:function(){return N},Mh:function(){return i},OR:function(){return m},PI:function(){return n},TH:function(){return u},b0:function(){return o},b6:function(){return y},cE:function(){return b},fA:function(){return l},mA:function(){return D},n7:function(){return k},oj:function(){return S},qH:function(){return P},qZ:function(){return d},uy:function(){return g},v8:function(){return x},x7:function(){return h}});let n="https://api.paylands.com/assets/checkout/paylands-checkout-sdk.js",i="https://ws-paylands.paynopain.
1com",s=" is not configured.",r="pnp-sdk-container",o="pnp-sdk-methods",l="pnp-sdk-challenge",c=e=>"pnp-sdk-method-".concat(e),d="paypal",m="google_pay",u="apple_pay",p="paypal_installments";function x(e){let t=P(e),a=t.includes(d),n=t.includes(p);return{enablePaylater:n,installmentsOnly:n&&!a}}function y(e){let t=[];for(let a of P(e)){if(function(e){let t=C(e);return t===d||t===p}(a)){t.includes(d)||t.push(d);continue}t.push(a)}return t}function h(e){try{return P(e.getConfiguredPaymentMethods()).includes(m)}catch(e){return console.error("[PNP_SDK] cannot read the configured wallets of an express method",e),!1}}let v="paypal-container",f=["es","en","fr","it","de","pt","nl","pl","ca","hr","he","jp","ru","hu","ro"];function g(){return"undefined"!=typeof PaylandsCheckout}function b(e){return"production"===e?"PRODUCTION":"SANDBOX"}let j={ja:"jp"};function N(e){var t;let a=(null!=e?e:"").trim().toLowerCase().split("-")[0],n=null!==(t=j[a])&&void 0!==t?t:a;return f.includes(n)?n:"es"}function k(e){return"object"==typeof e&&null!==e&&("string"==typeof e.redirect||"string"==typeof e.render||"string"==typeof e.error)}function C(e){return e.trim().toLowerCase()}function P(e){let t=new Set,a=[];for(let n of e){let e=C(n);!e||t.has(e)||(t.add(e),a.push(e))}return a}let w="".concat(i,"/assets/checkout/js/payment_methods/PAYPAL.js"),T={fetchJson:async e=>{let t=await fetch(e,{method:"GET"});if(!t.ok)throw Error("".concat(e," answered ").concat(t.status));return t.json()},loadScript:e=>new Promise((t,a)=>{if(document.querySelector('script[src="'.concat(e,'"]'))){t();return}let n=document.createElement("script");n.src=e,n.async=!0,n.onload=()=>t(),n.onerror=()=>a(Error("".concat(e," failed to load"))),document.head.appendChild(n)}),getLoadPayPal:()=>window.loadPayPal};async function M(e){var t;let a;let n="".concat((t=e.environment,"".concat(i,"/v1").concat("SANDBOX"===t?"/sandbox":"")),"/payment/checkout/sdk/").concat(e.token);try{a=await T.fetchJson(n)}catch(e){return console.error("[PNP_SDK] could not read the checkout configuration to mount PayPal",e),null}let s="string"==typeof(null==a?void 0:a.extra_data)?function(e){let t=e.split(".")[1];if(!t)return null;try{let e=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(4*Math.ceil(t.length/4),"=");return JSON.parse(window.atob(e))}catch(e){return null}}(a.extra_data):null;if(!s)return null;let r=s.paypal;if(!(null==r?void 0:r.merchant_id)||!r.service_uuid)return null;let o=e=>{let t=s[e];return"string"==typeof t?t:""};return{merchantId:r.merchant_id,serviceUuid:r.service_uuid,enablePaylater:!0===r.enable_paylater,orderUuid:o("order_uuid"),transactionUuid:o("transaction_uuid"),urlOk:o("url_ok"),urlKo:o("url_ko"),currency:o("currency")}}async function A(e,t,a){var n;let s=await M(t);if(!s)return!1;await T.loadScript(w);let r=T.getLoadPayPal(),o=document.getElementById(e);if(!r||!o)return!1;o.innerHTML="";let l=document.createElement("div");return l.id=v,o.appendChild(l),await r({container:v,baseURL:i,environment:t.environment,config:{merchantID:s.merchantId,orderUUID:s.orderUuid,transactionUUID:s.transactionUuid,serviceUUID:s.serviceUuid,urlOK:s.urlOk,urlKO:s.urlKo,language:t.language,currencyCode:s.currency,countryCode:"ES"},customization:{borderRadius:4,enablePaylater:s.enablePaylater&&(null===(n=null==a?void 0:a.enablePaylater)||void 0===n||n)}}),!0}async function E(e,t,a,n,i){var r,o,l,c,m;try{switch(C(t)){case"google_pay":await e.google_pay(a);break;case"apple_pay":await e.apple_pay(a);break;case d:await e.payPal({container:a,customization:{borderRadius:4,enablePaylater:null!==(o=null==i?void 0:i.enablePaylater)&&void 0!==o&&o}}),n&&null!==(m=null===(c=document.getElementById(a))||void 0===c?void 0:null===(l=c.textContent)||void 0===l?void 0:l.includes(s))&&void 0!==m&&m&&await A(a,n,i)&&console.warn("[PNP_SDK] the Paylands SDK could not read the checkout's PayPal service; mounted it directly");break;default:return console.warn("Unsupported PNP_SDK payment method: ".concat(t)),!1}}catch(e){return console.error("Paylands SDK threw while mounting ".concat(t),e),!1}let u=document.getElementById(a);return(null==u?void 0:null===(r=u.textContent)||void 0===r?void 0:r.includes(s))?(console.error("Paylands reports ".concat(t," is not configured for this account")),u.innerHTML="",!1):!u||0!==u.childElementCount||(console.warn("".concat(t," rendered no content in this browser/device")),!1)}function D(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8e3;return window.setTimeout(()=>{var a;let n=null===(a=document.getElementById(e))||void 0===a?void 0:a.querySelector("#".concat(v));n&&(n.childElementCount>0||console.error("[PNP_SDK] PayPal mounted but rendered nothing after "+"".concat(t,"ms â the Paylands account most likely lists PayPal without provisioning ")+"merchant_id / service_uuid. See US-013."))},t)}
1async function S(e,t,a){let n=x(t),i=0;for(let s of y(t))await E(e,s,c(s),a,n)&&(i+=1);return i}},55008:function(e,t,a){a.d(t,{N:function(){return r}});var n=a(31549),i=a(14517),s=a(622);function r(e){let{className:t}=e;return(0,n.jsxs)("div",{className:(0,i.Z)("PNPV3Skeleton",t),children:[(0,n.jsx)(s.Od,{animation:"wave",height:37,width:"100%",style:{transform:"scale(1, 1)"}}),(0,n.jsx)(s.Od,{animation:"wave",height:37,width:"100%",style:{transform:"scale(1, 1)"}}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)(s.Od,{animation:"wave",height:37,width:110,style:{transform:"scale(1, 1)"}}),(0,n.jsx)(s.Od,{animation:"wave",className:"mt-[7.5px] mb-[7.5px] flex-1",height:37,style:{transform:"scale(1, 1)"}})]})]})}},29180:function(e,t,a){var n,i;a.d(t,{_:function(){return n}}),(i=n||(n={})).INITIALIZING="INITIALIZING",i.READY="READY",i.IDLE="IDLE",i.PROCESSING="PROCESSING",i.SUCCESS="SUCCESS",i.FAIL="FAIL",i.INVALID="INVALID",i.TIMEOUT="TIMEOUT"},86523:function(e,t,a){a.d(t,{$:function(){return s}});var n=a(31549),i=a(622);function s(){return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsx)(i.Od,{animation:"wave",height:44,width:"100%",style:{transform:"scale(1, 1)"}}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)(i.Od,{animation:"wave",height:44,style:{flex:1,transform:"scale(1, 1)"}}),(0,n.jsx)(i.Od,{animation:"wave",height:44,style:{flex:1,transform:"scale(1, 1)"}})]}),(0,n.jsx)(i.Od,{animation:"wave",height:44,width:"100%",style:{transform:"scale(1, 1)"}})]})}},73891:function(e,t,a){a.d(t,{s:function(){return r}});var n=a(19694),i=a(35490);let s=(0,n.vU)({paymentMethods:{id:"component.paymentForm.title",description:"Payment list selection title",defaultMessage:"Payment method"},depositRequired:{id:"component.paymentForm.depositRequired",description:"Deposit required text",defaultMessage:"Your booking requires prepayment, select the most convenient payment method."},deferredPaymentDescription:{id:"component.deferredPayment.description",description:"deferredPayment description",defaultMessage:"Book now and pay online before"},bookWith:{id:"component.paymentForm.bookWith",description:"Book with title",defaultMessage:"Reserva con"},confirmYourStay:{id:"component.paymentForm.confirmYourStay",description:"Confirm Your Stay",defaultMessage:"Confirm Your Stay"},cardDetails:{id:"component.paymentForm.cardDetails",description:"Card data",defaultMessage:"Card data"},pay:{id:"component.paymentForm.pay",description:"Pay",defaultMessage:"Pay {amount}{currency}"},creditcards:{id:"component.paymentForm.paymentMethod.payment_card",description:"Credit card",defaultMessage:"Credit card"}}),r={...i.i4,...s}},70585:function(e,t,a){a.d(t,{UZ:function(){return x},bE:function(){return K},VD:function(){return z},Hi:function(){return ec},AZ:function(){return ea},c7:function(){return e$},JD:function(){return p}});var n,i,s=a(31549),r=a(44194),o=a(622),l=a(36582),c=a(35490),d=a(17259),m=a(88445),u=a(66443);(n=i||(i={})).PRIVACY_POLICY="PRIVACY_POLICY",n.CONDITIONS="CONDITIONS",n.COMMERCIAL_COMMUNICATIONS="COMMERCIAL_COMMUNICATIONS";let p={"&.Mui-expanded .MuiCollapse-root":{overflow:"visible !important"},"& .MuiAccordionSummary-root":{alignItems:"center"},"& .MuiAccordionSummary-root.Mui-focusVisible":{backgroundColor:"white"},"& .MuiAccordionSummary-root .MuiAccordionSummary-content":{margin:"20px 0"},"& .MuiAccordionDetails-root":{padding:"0 16px 16px"},"& .MuiAccordionSummary-root.Mui-expanded":{minHeight:"55px"}};function x(e){let{propertyTicker:t,propertyPrivacyPolicy:a,propertyCommunicationsPolicy:n,cart:i,openDialog:r,closeDialog:x}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.dK,{title:(0,s.jsx)(l.Z,{...c.i4.privacyPolicy}),open:"PRIVACY_POLICY"===r,onToggleDialog:x,contentClassName:"!overflow-auto",children:(0,s.jsx)(o.xv,{variant:"body2",as:"label",className:"self-center",forLabel:"privacyPolicy",children:(0,s.jsx)(d.V,{html:null!=a?a:""})})}),(0,s.jsx)(o.dK,{title:(0,s.jsx)(l.Z,{...c.i4.commercialCommunications}),open:"COMMERCIAL_COMMUNICATIONS"===r,onToggleDialog:x,contentClassName:"!overflow-auto",children:(0,s.jsx)(o.xv,{variant:"body2",as:"label",className:"self-center",forLabel:"privacyPolicy",children:(0,s.jsx)(d.V,{html:null!=n?n:""})})}),(0,s.jsx)(o.dK,{title:(0,s.jsx)(l.Z,{...c.i4.cancellationPolicies}),open:"CONDITIONS"===r,onToggleDialog:x,children:i.cartItems.map(e=>{var a,n,i,r;return(0,s.jsx)(o.UQ,{styles:p,removeBorders:!0,summary:(0,s.jsxs)(o.xv,{variant:"body1",children:[(0,s.jsx)("span",{className:"font-bold",children:e.inventory.accommodation.name})," (",(0,s.jsx)(u._h,{dateFrom:e.checkIn,dateTo:e.checkOut,dateFormat:u.kH.DATE_RANGE_FORMATTED}),")"]}),details:(0,s.jsx)(m.nD,{type:m.dY.CANCELLATION_POLICY_TARGET_INVENTORY,cancellationPolicyDesc:(null===(a=e.cancellationPolicy)||void 0===a?void 0:a.description)?null===(n=e.cancellationPolicy)||void 0===n?void 0:n.description:e.inventory.condition.cancellationPolicies[0].description,penaltyBrackets:(null===(i=e.cancellationPolicy)||void 0===i?void 0:i.penaltyBrackets)?null===(r=e.cancellationPolicy)||void 0===r?void 0:r.penaltyBrackets:e.inventory.condition.cancellationPolicies[0].penaltyBrackets,...e.inventory.condition,propertyTicker:t})},e.id)})})]})}var y=a(33406),h=a(24608),v=a(14517),f=a(77806),g=a(21048),b=a(63621);let j=e=>{let{propertyTicker:t,inventoryTicker:a,startDate:n,endDate:i,unitSelectionMapConfiguration:c,cartItemId:d,modalOpen:m,onToggleModal:u}=e,{locale:p}=(0,g.Ee)(),{getSelection:x,setSelection:y,isSelectionExpired:h,ensureIdCart:v}=(0,g.GK)(),j=x(d),N=!!j&&h(d),{data:k,isLoading:C}=(0,b.GK)({propertyTicker:t,inventoryTicker:a,startDate:n,endDate:i,enabled:m}),P=(0,r.useMemo)(()=>
1{if(!k||!m)return null;let e=v();return c.buildMapUrl({startDate:n,endDate:i,idCart:e,lang:p,callbackUrl:window.location.href,mapping:k})},[k,m,v,c,n,i,p]),w=(0,r.useCallback)(()=>{u(!0)},[u]);return(0,r.useEffect)(()=>{if(!m||!c.baseUrl)return;let e=new URL(c.baseUrl).origin,t=t=>{if(t.origin!==e)return;let a=function(e){try{return JSON.parse(e)}catch(e){return null}}(t.data);if(!a)return;let{id:n,num:i,error:s}=a;if(0===n||"0"===n||!i){u(!1);return}n&&i&&0===s&&(y(d,{id:"string"==typeof n?parseInt(n,10):n,num:i},c.selectionExpirationMinutes),u(!1))};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[d,y,c,u,m]),(0,s.jsxs)("div",{className:"flex flex-col gap-2 border-t border-solid border-gray-50 pt-4",children:[j&&!N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.xv,{variant:"body1",className:"!font-bold text-gray-500",children:(0,s.jsx)(l.Z,{...f.h.selectedTitle})}),(0,s.jsxs)("div",{className:"flex items-center justify-between sm:justify-start sm:gap-10",children:[(0,s.jsx)(o.xv,{variant:"body2",children:(0,s.jsx)(l.Z,{...f.h.selectedUnit,values:{unitNum:j.num}})}),(0,s.jsx)("button",{type:"button",onClick:w,className:"text-gray-200 underline text-sm",children:(0,s.jsx)(l.Z,{...f.h.changeSelection})})]})]}):(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row items-baseline gap-2",children:[(0,s.jsx)(o.xv,{variant:"body1",className:"!font-bold text-gray-500",children:(0,s.jsx)(l.Z,{...f.h.title})}),(0,s.jsx)(o.xv,{variant:"caption",className:"text-gray-300 !font-normal",children:(0,s.jsx)(l.Z,{...f.h.subjectToAvailability})})]}),(0,s.jsx)("button",{type:"button",onClick:w,className:"text-gray-200 underline text-sm hover:opacity-80",children:(0,s.jsx)(l.Z,{...f.h.selectUnit})})]}),(0,s.jsx)(o.dK,{open:m,onToggleDialog:u,centeredContent:!0,fullWidthContent:!0,fullHeight:!0,desktopFullscreen:!0,children:C?(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,s.jsx)(o.xv,{variant:"body1",children:(0,s.jsx)(l.Z,{...f.h.loadingMap})})}):P?(0,s.jsx)("iframe",{src:P,className:"w-full h-full border-0",title:"Unit Selection Map"}):(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,s.jsx)(o.xv,{variant:"body1",children:(0,s.jsx)(l.Z,{...f.h.errorLoadingMap})})})})]})};var N=a(94684),k=a(43578),C=a(97629),P=a(98342),w=a(37497),T=a(11983),M=a(76305),A=a(24464),E=a(39378),D=a(59914),S=a(97851),I=a(20721),R=a(76138),O=a(30525),L=a(65010),_=a(19694);let F=(0,_.vU)({required:{id:"component.checkoutPage.roomStayQuestion.required",defaultMessage:"You must answer this question to continue"},freeTextPlaceholder:{id:"component.checkoutPage.roomStayQuestion.freeTextPlaceholder",defaultMessage:"Write your answer"},selectPlaceholder:{id:"component.checkoutPage.roomStayQuestion.selectPlaceholder",defaultMessage:"Choose an answer"}}),Z=(0,r.forwardRef)((e,t)=>{let{customForm:a,roomIndex:n,onValuesChange:i,stayDates:o=[]}=e,l=(0,r.useRef)(null),c=(0,P.Z)(),d=(0,r.useMemo)(()=>a.buildValidationSchema(),[a]),{register:m,formState:{errors:u},setValue:p,control:x,trigger:y,watch:h}=(0,S.cI)({resolver:(0,I.F)(d),mode:"onBlur"});return(0,r.useImperativeHandle)(t,()=>({validate:async()=>{let e=await y();if(!e){var t;null===(t=l.current)||void 0===t||t.scrollIntoView({behavior:"smooth",block:"center"})}return e}})),(0,r.useEffect)(()=>{let e=h(e=>{i(e,n)});return()=>e.unsubscribe()},[h,i,n]),(0,s.jsx)("div",{ref:l,children:(0,s.jsx)(R.l,{fields:a.formFields,setValue:p,errors:u,register:m,control:x,stayDates:o,variant:O.MS.DENSE,hideRequiredMark:!0,labelClassName:O.qH,fieldErrorMessage:c.formatMessage(F.required),textPlaceholder:c.formatMessage(F.freeTextPlaceholder),selectPlaceholder:c.formatMessage(F.selectPlaceholder)})})});function U(e){let{inventory:t,roomStayForms:a,roomIndex:n,cartItemId:i,onValuesChange:o,stayDates:l}=e,c=(0,L.V)(a,t),d=(0,r.useRef)(null),{registerRoomStayForm:m,unregisterRoomStayForm:u}=(0,b.fA)();return((0,r.useEffect)(()=>{if(c)return m(i,d),()=>u(i)},[i,c,m,u]),c)?(0,s.jsx)(Z,{ref:d,customForm:c,roomIndex:n,onValuesChange:o,stayDates:l}):null}Z.displayName="RoomStayForm";
1var G=a(15258),B=a(76213),V=a(10154);let Y='url("data:image/svg+xml;utf8,'.concat("<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'><path stroke='%232E2F36' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/></svg>",'")');function X(e){var t;let{availabilityOptions:a,handleChangeCartItemQuantity:n,cartItem:i,formattedFreeCancellationMaxDate:d,handleOpenConditionDialog:m,handleRemoveCartItem:u,className:p,disableUnitSelection:x,hideOriginalPrice:y,extrasText:h,handleGoToExtras:f,showExtrasText:g,handleShowExtras:j,showExtras:N,showDates:k,quantityCartItems:P,areExtrasAvailable:w,disableEdit:A,insurances:S,handleChangeCartInsurance:I,locale:R,roomStayForms:O,roomIndex:L,onRoomStayValuesChange:_}=e,{registerInsuranceForm:F,unregisterInsuranceForm:Z}=(0,b.MM)(),[G,B]=(0,r.useState)(!1),V=(0,r.useRef)(null),X=i.inventory.mealPlan.hasDescription()?i.inventory.mealPlan:null,K=i.getInventoryImage(),H=(0,r.useCallback)((e,t)=>{B(e),t&&t()},[]);return(0,r.useEffect)(()=>(F(i.id,V),()=>Z(i.id)),[i.id,F,Z]),(0,s.jsxs)(s.Fragment,{children:[X?(0,s.jsx)(o.dK,{title:void 0,open:G,onToggleDialog:H,contentClassName:"!overflow-auto",children:(0,s.jsx)(M.j,{mealPlans:[X]})}):null,(0,s.jsxs)("div",{className:"flex pb-4 border-b-[1px] border-gray-50",children:[(0,s.jsx)("div",{className:"hidden sm:block",children:(0,s.jsx)(o.t3,{width:110,height:110,sizes:["110px"],src:K.url,alt:"room-picture-".concat(K.title||""),className:"hidden sm:flex min-w-[110px] min-h-[110px] max-w-[110px] max-h-[110px] object-cover rounded"})}),(0,s.jsxs)("div",{className:(0,v.Z)("gap-5 sm:gap-6 w-full sm:ml-2.5",p),children:[(0,s.jsxs)("div",{className:"flex w-full items-start",children:[!x&&(0,s.jsx)(o.Ph,{selectClassName:"!text-gray-200 !border-gray-200 !p-2 !min-w-[52px] !h-[32px] sm:block",className:"shrink-0 grow-0 border-primary-100 mr-4",options:a,onChange:n,value:i.quantity.toString(),style:{backgroundImage:Y},disabled:A,stopClickPropagation:!0}),(0,s.jsxs)("div",{className:"w-full text-property-h6 !font-bold",children:[i.inventory.parentBundle&&(0,s.jsx)("div",{className:"w-full text-property-h6 !font-bold",children:i.inventory.parentBundle.name}),(0,s.jsx)("div",{children:i.inventory.accommodation.name})]}),(0,s.jsx)(o.J2,{distance:8,placement:"bottom end",element:(0,s.jsx)("div",{className:"w-8 h-8 items-center flex justify-center align-middle border border-gray-300 border-solid p-2 rounded cursor-pointer",children:(0,s.jsx)(o.YA,{})}),children:e=>(0,s.jsxs)("div",{className:"z-50 bg-white border border-gray-100 border-solid rounded sm:text-property-body3-sm font-normal w-[224px] p-4 divide-y divide-solid divide-gray-25",children:[(0,s.jsx)("div",{className:"flex items-center gap-2 text-gray-300 cursor-pointer p-4",onClick:()=>m(e),children:(0,s.jsx)(l.Z,{...E.Z.seeConditionsAndCancellations})}),X&&(0,s.jsx)("div",{className:"flex items-center gap-2 text-gray-300 cursor-pointer p-4",onClick:()=>H(!0,e),children:(0,s.jsx)(l.Z,{...E.Z.seeMealPlanDetails})}),!A&&w&&(0,s.jsx)("div",{className:"flex items-center gap-2 text-gray-300 cursor-pointer p-4",onClick:t=>{t.stopPropagation(),t.preventDefault(),e(),f()},children:(0,s.jsx)(l.Z,{...E.Z.addExtras})}),!A&&(0,s.jsx)("div",{className:"flex items-center gap-2 text-gray-300 cursor-pointer p-4",onClick:()=>u(e),children:(0,s.jsx)(l.Z,{...E.Z.removeAccommodation})})]})})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-[10px] sm:gap-4",children:[(0,s.jsx)(C.I,{checkIn:k?i.checkIn:void 0,checkOut:k?i.checkOut:void 0,guests:i.inventory.configuration.name,className:"!text-property-body1 sm:!text-property-body1-sm",extras:w?h:void 0,mealPlan:i.inventory.mealPlan.name,condition:i.inventory.condition.name,order:["date","guests","mealPlan","condition","extras"],conditionOnClick:()=>m(void 0),mealPlanOnClick:X?()=>H(!0,void 0):void 0}),d?(0,s.jsxs)("div",{className:"flex items-center text-property-subtitle2 sm:text-property-subtitle1-sm",children:[(0,s.jsx)("span",{className:"h-4 w-4 mr-2",children:(0,s.jsx)(o.nQ,{})}),(0,s.jsx)(l.Z,{...c.i4.cancellationMessage}),": ",d]}):null]})]})]}),S&&S.length>0&&(0,s.jsx)(D.k,{ref:V,data:S,onChange:I,disabled:A,quantity:i.quantity,appliedInsuranceTicker:null===(t=i.appliedInsurance)||void 0===t?void 0:t.t
1icker},R),O&&void 0!==L&&_&&(0,s.jsx)(U,{inventory:i.inventory,roomStayForms:O,roomIndex:L,cartItemId:i.id,onValuesChange:_}),(0,s.jsxs)("div",{className:"flex flex-col-reverse items-start sm:flex-row sm:items-center gap-2",children:[(0,s.jsxs)(o.xv,{variant:"subtitle2",className:"gap-2 items-center grow flex cursor-pointer uppercase",onClick:j,children:[g," ",(0,s.jsx)("span",{className:"h-4 w-4",children:(0,s.jsx)(o.e0,{})})]}),!N&&(P>1||i.quantity>1)&&(0,s.jsx)(T.x,{value:i.totalRate.amount,alignRight:!0,inline:!0,inlineClassName:"!text-property-h3",hideFullValue:y})]})]})}function K(e){let{cartItem:t,availability:a,onCartItemQuantityChange:n,onCartItemInsuranceChange:i,onRemoveCartItem:d,className:u,propertyTicker:p,showMandatoryExtras:x,disableUnitSelection:f,hideOriginalPrice:g,taxShowConfig:C,discounts:M,showDates:S,quantityCartItems:I,showAddRoom:R,currency:O,disableEdit:L=!1,availableInsurances:_=[],roomStayForms:F,roomIndex:Z,onRoomStayValuesChange:U}=e,Y=(0,G.c)(),K=(0,w.useRouter)(),H=(0,P.Z)(),[q,W]=(0,r.useState)(!1),[Q,z]=(0,r.useState)(!1),[J,$]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(!1),{selectedExtra:ea,warningDialogOpen:en,handleToggleWarningDialog:ei,handleExtraQuantitySummary:es}=(0,b.Yf)(),er=(0,b.Sy)({startDate:t.checkIn,endDate:t.checkOut}),{isEnabled:eo,shouldDisableQuantitySelector:el,unitSelectionMapConfiguration:ec}=function(e,t,a){let{getEngineConfiguration:n}=(0,N.c)(),{getSelection:i,isSelectionExpired:s}=(0,k.G)();return(0,r.useMemo)(()=>{let r=n(e).unitSelectionMapConfiguration;if(!r)return{isEnabled:!1,hasValidSelection:!1,shouldDisableQuantitySelector:!1,unitSelectionMapConfiguration:void 0};let o=r.isEnabledForInventory(t);return o?{isEnabled:o,hasValidSelection:!!(i(a)&&!s(a)),shouldDisableQuantitySelector:o,unitSelectionMapConfiguration:r}:{isEnabled:!1,hasValidSelection:!1,shouldDisableQuantitySelector:!1,unitSelectionMapConfiguration:void 0}},[e,t,a,n,i,s])}(p,t.inventory.accommodation.ticker,t.id),ed=(0,B.F)(t.inventory.condition,t.checkIn,t.checkOut,t.cancellationPolicy),em=(0,r.useMemo)(()=>g!==y.ovN.SHOW_ALL_PRICES,[g]),eu=(0,r.useMemo)(()=>g===y.ovN.HIDE_ALL_PRICES,[g]),ep=(0,r.useCallback)(e=>{e&&e(),W(!0)},[]),ex=(0,r.useCallback)(e=>{W(e)},[]),ey=(0,r.useCallback)(()=>{z(e=>!e)},[]),eh=(0,r.useCallback)(()=>{$(e=>!e)},[]),ev=(0,r.useCallback)(()=>{K.push(K.asPath.replace("checkout",""))},[K]),ef=(0,r.useMemo)(()=>Array.from({length:a<t.quantity?t.quantity:a}).map((e,t)=>({id:"".concat(t+1),label:"".concat(t+1)})),[a,t.quantity]),eg=(0,r.useCallback)(e=>{let a=parseInt(e.target.value);n(t.id,a)},[t.id,n]),eb=(0,r.useCallback)(e=>{e(),d(t.id)},[t.id,d]),ej=(0,r.useCallback)(e=>{i(t.id,e)},[t.id,i]),[eN]=(0,r.useMemo)(()=>{let e=t.buildExtrasSummaryQuantity();return["".concat((0,h.kC)(H.formatMessage(c.i4.extras))," (").concat(e,")")]},[t,H]),ek=(0,r.useCallback)(async e=>{let a=Y.hotelExtrasPath({hotelId:p,params:{cartItemId:t.id,..."string"==typeof e&&{extra:e}}});await K.push(a)},[t.id,K,p,Y]),eC=t.areExtrasAvailable({showMandatoryExtras:x}),eP=eC&&(!L||t.appliedExtras.length>0),ew=(0,r.useMemo)(()=>Q?H.formatMessage(E.Z.seeLess):eC&&!L?H.formatMessage(E.Z.seeMoreAndManageExtras):H.formatMessage(E.Z.seeMore),[Q,eC,L,H]),eT=t.calculateAvailableInsurances(_,C);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:(0,v.Z)("CartItem border border-gray-100 rounded-card px-[10px] py-4 sm:px-4 gap-4 sm:gap-4 flex flex-col",u),children:[(0,s.jsx)(o.dK,{title:(0,s.jsx)(l.Z,{...c.i4.cancellationPolicies}),open:q,onToggleDialog:ex,children:(0,s.jsx)(m.nD,{type:m.dY.CANCELLATION_POLICY_TARGET_INVENTORY,cancellationPolicyDesc:t.cancellationPolicy?t.cancellationPolicy.description:t.inventory.condition.cancellationPolicies[0].description,penaltyBrackets:t.cancellationPolicy?t.cancellationPolicy.penaltyBrackets:t.inventory.condition.cancellationPolicies[0].penaltyBrackets,...t.inventory.condition,childrenPolicy:t.inventory.condition.children,propertyTicker:p,taxShowConfig:C,rooms:t.quantity})}),(0,s.jsx)(X,{className:"flex flex-col",availabilityOptions:ef,handleChangeCartItemQuantity:eg,cartItem:t,formattedFreeCancellationMaxDate:ed,handleOpenConditionDialog:ep,handleRemoveCartItem:eb,disableUnitSelection:f||el,hideOriginalPrice
1:em,extrasText:eN,handleGoToExtras:ek,showExtrasText:ew,handleShowExtras:ey,showExtras:Q,showDates:S,quantityCartItems:I,areExtrasAvailable:eC,disableEdit:L,insurances:eT,handleChangeCartInsurance:ej,locale:K.locale,roomStayForms:F,roomIndex:Z,onRoomStayValuesChange:U}),eo&&ec&&(0,s.jsx)(j,{propertyTicker:p,inventoryTicker:t.inventory.ticker,startDate:t.checkIn,endDate:t.checkOut,unitSelectionMapConfiguration:ec,cartItemId:t.id,modalOpen:ee,onToggleModal:et}),Q&&(0,s.jsxs)(s.Fragment,{children:[eP&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"gap-5 sm:gap-6 flex flex-col",children:(0,s.jsx)(D.E,{cartItem:t,dateRange:er,allowAddAndEdit:!L,handleGoToExtras:ek,handleExtraQuantitySummary:es})})}),t.hasInsuranceApplied()&&(0,s.jsxs)("div",{className:"group flex w-full items-start text-property-subtitle2 sm:text-property-subtitle2-sm cursor-pointer",children:[(0,s.jsx)("div",{className:"flex-1 line-clamp-2",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(l.Z,{...c.i4.insuranceTitle})})}),(0,s.jsx)("div",{className:"w-30 flex-initial",children:(0,s.jsx)(T.x,{value:t.calculateTotalInsurance().amount,alignRight:!0,inline:!0,inlineClassName:"!text-property-subtitle2 sm:!text-property-subtitle2-sm"})})]}),(0,s.jsx)("div",{className:"flex flex-col border-t border-solid border-gray-50"}),(0,s.jsxs)("div",{className:"flex w-full gap-4 items-start",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"text-property-h3 sm:text-property-h2-sm",children:(0,s.jsx)(l.Z,{...E.Z.totalRoomStay})}),(0,s.jsx)(o.xv,{variant:"subtitle3",className:"line-clamp-1 text-gray-200 mt-[10px] sm:mt-2 uppercase cursor-pointer",onClick:eh,children:(0,s.jsx)(l.Z,{...E.Z.seePricingBreakdown})})]}),(0,s.jsx)("div",{className:"w-30 flex-initial",children:(0,s.jsx)(T.x,{value:t.totalRate.amount,alignRight:!0,inline:!0,inlineClassName:"!text-property-h3",hideFullValue:em})})]})]}),ea&&(0,s.jsx)(A.E,{extra:ea,checkIn:t.checkIn,checkOut:t.checkOut,open:en,onToggleDialog:ei}),(0,s.jsx)(V.KC,{open:J,onToggleDialog:eh,cartItem:t,checkIn:t.checkIn,checkOut:t.checkOut,currency:O,discounts:M,hideOriginalPrice:g,hideAllPrices:eu,crossOutPrices:em,handleExtraQuantitySummary:es,handleGoToExtras:ek})]}),R&&(0,s.jsx)("div",{className:"flex sm:col-span-3 justify-center sm:justify-end mt-4",children:(0,s.jsxs)(o.xv,{variant:"subtitle3",className:"text-gray-200 uppercase cursor-pointer",onClick:ev,children:["+ ",(0,s.jsx)(l.Z,{...E.Z.addRoom})]})})]})}var H=a(8883),q=a(96694),W=a(5426);function Q(e){let t=new Map;return e.forEach(e=>{let a=e.isFee()?"fees":"".concat(e.name,"_").concat(e.typology),n=t.get(a);n?n.members.push(e):t.set(a,{representative:e,members:[e]})}),Array.from(t.entries()).map(e=>{let[t,a]=e;return{key:t,...a}})}function z(e){let{cart:t,currency:a,defaultCurrency:n,className:i,shareCart:d,hideOriginalPrice:m,pendingAmountTextConfiguration:p,depositCheckoutTextConfiguration:x,isDeferredMode:h,handleDiscountListDialog:f,propertyName:g,isQuotation:b,fromQuotation:j,onSendQuotation:N,onCancelQuotation:k}=e,C=(0,P.Z)(),w=(0,r.useMemo)(()=>(0,H.Cb)(C,x),[C,x]),M=(0,r.useMemo)(()=>(0,H.UL)(C,p),[p,C]),A=m===y.ovN.HIDE_ALL_PRICES?0:t.calculateTotalDiscount().round().amount,E=(0,r.useMemo)(()=>t.orderTaxations(t.getUniqueTaxations()),[t]),D=(0,r.useMemo)(()=>{if(!t||!t.buildCapacityPerDateRangeArray().length||t.buildCapacityPerDateRangeArray().length>1)return;let e=t.buildCapacityPerDateRangeArray()[0];return(0,s.jsxs)("div",{className:"flex flex-row items-center",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)(o.xv,{variant:"subtitle1",children:(0,s.jsx)(l.Z,{...c.i4.checkIn})}),(0,s.jsx)(o.xv,{variant:"body2",children:(0,u.wQ)(e.checkIn,u.kH.DAY_MONTH_LONG_YEAR_FORMATTED,C)})]}),(0,s.jsx)("span",{className:"w-2 text-gray-100 mx-6",children:(0,s.jsx)(o.XC,{})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)(o.xv,{variant:"subtitle1",children:(0,s.jsx)(l.Z,{...c.i4.checkOut})}),(0,s.jsx)(o.xv,{variant:"body2",children:(0,u.wQ)(e.checkOut,u.kH.DAY_MONTH_LONG_YEAR_FORMATTED,C)})]})]})},[t,C]),S=(0,r.useMemo)(()=>!!E.find(e=>e.isTax()&&e.isExcludedPreference()),[E]),I=(0,r.useMemo)(()=>
1h&&!!E.find(e=>e.isFee()),[E,h]),R=(0,r.useMemo)(()=>!S&&(I||t.calculateTotalCityTax().hasPositiveAmount()),[S,I,t]),O=(0,r.useMemo)(()=>t.calculateTotalAppliedInsurances(),[t]),L=(0,r.useMemo)(()=>t.calculateTaxExtrasByTicker(),[t]);return 0===t.cartItems.length?null:(0,s.jsxs)("div",{className:(0,v.Z)("CartSummary border border-gray-100 rounded-card px-[10px] py-4 sm:px-4 sm:py-6 gap-5 sm:gap-6 flex flex-col",i),children:[(0,s.jsxs)("div",{className:"flex flex-col mb-5 sm:mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between mb-2 sm:mb-[14px]",children:[(0,s.jsx)(o.xv,{variant:"h1",children:(0,s.jsx)(l.Z,{...c.i4.cart})}),b&&j?(0,s.jsx)(o.J2,{placement:"bottom start",element:(0,s.jsx)("div",{className:"w-8 h-8 cursor-pointer",children:(0,s.jsx)(o.uG,{})}),children:(0,s.jsxs)("div",{className:"w-[177px] flex flex-col gap-5 text-property-body3 sm:text-property-body3-sm text-gray-300 bg-white px-7 py-6",children:[(0,s.jsx)("div",{className:"cursor-pointer",onClick:()=>null==N?void 0:N(),children:(0,s.jsx)(l.Z,{...c.i4.sendQuotation})}),(0,s.jsx)("div",{className:"cursor-pointer",onClick:()=>null==k?void 0:k(),children:(0,s.jsx)(l.Z,{...c.i4.cancelQuotation})})]})}):d]}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:(0,s.jsx)(o.xv,{variant:"h3",children:g})})]}),D&&(0,s.jsx)("div",{className:"flex flex-col gap-5 sm:gap-6",children:D}),(0,s.jsx)("div",{className:"flex flex-col gap-5 sm:gap-4",children:(0,s.jsx)(W.of,{cart:t,intl:C})}),(0,s.jsx)("div",{className:"flex flex-col gap-5 sm:gap-4",children:(0,s.jsx)("div",{className:"flex flex-col border-t border-solid border-gray-50 mt-[10px] sm:mt-0"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-[10px] sm:gap-2",children:[!S&&(0,s.jsx)(W.c2,{cart:t,isDeferredMode:h,defaultCurrency:n}),(0,s.jsx)("div",{className:"flex flex-col w-full items-center text-property-body3 sm:text-property-body3-sm gap-[10px] sm:gap-2",children:(0,s.jsxs)("div",{className:"flex flex-row w-full",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(l.Z,{...c.i4.totalWithoutTax})," (",n,")"]}),(0,s.jsx)("div",{className:"w-20 flex-initial",children:(0,s.jsx)(T.x,{convert:!1,value:t.calculateTotalWithoutTax(h),description:"",alignRight:!0,currency:n,inline:!0,inlineClassName:"!text-property-body3 sm:!text-property-body3-sm"})})]})}),Q(E.filter(e=>e.isFee()||!e.isExcludedPreference())).map(e=>(0,s.jsx)(W.g4,{taxation:e.representative,cart:t,intl:C,defaultCurrency:n,groupedTaxations:e.members},e.key)),O.hasPositiveAmount()&&(0,s.jsxs)("div",{className:"flex flex-row w-full text-property-body3 sm:text-property-body3-sm",children:[(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsx)(l.Z,{...c.i4.insuranceTitle})}),(0,s.jsx)("div",{className:"w-20 flex-initial",children:(0,s.jsx)(T.x,{convert:!1,value:O.amount,description:"",alignRight:!0,currency:O.currency,inline:!0,inlineClassName:"!text-property-body3 sm:!text-property-body3-sm"})})]}),L.map(e=>{let{ticker:t,name:a,amount:i}=e;return(0,s.jsxs)("div",{className:"flex w-full items-center text-property-body3 sm:text-property-body3-sm",children:[(0,s.jsx)("div",{className:"flex-1",children:a}),(0,s.jsx)("div",{className:"w-20 flex-initial",children:(0,s.jsx)(T.x,{convert:!1,value:i.amount,description:"",alignRight:!0,currency:n,inline:!0,inlineClassName:"!text-property-body3 sm:!text-property-body3-sm"})})]},t)})]}),n!==a?(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("div",{className:"flex w-full items-center text-property-h3 sm:text-property-h2-sm",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(l.Z,{...q.Z.totalCart})," (",a,")"]}),(0,s.jsx)("div",{className:"w-30 flex-initial",children:(0,s.jsx)(T.x,{value:t.calculateTotalByTaxationType(h).amount,alignRight:!0,inline:!0,inlineClassName:"!text-property-h3 sm:!text-property-h2-sm"})})]}),(0,s.jsxs)("div",{className:"flex w-full items-center text-property-body3 sm:text-property-body3-sm text-gray-200",children:[(0,s.jsx)(l.Z,{...q.Z.currencyConversionInfo})," ",n]})]})}):null,S&&(0,s.jsx)("div",{className:"flex flex-col border-t border-solid border-gray-50"}),S&&(0,s.jsxs)("div",{className:"flex flex-col sm:gap-2 gap-[10px]",children:[(0,s.jsx)(W.c2,{cart:t,isDeferredMode:h,defaultCurrency:n}),(0,s.jsx)("div",{className:"flex flex-col sm:gap-2 gap-[10px]",children:Q(E.filter(e=>e.isTax()&&e.isExcludedPreference())).map(e=>(0,s.jsx)(W.g4,{taxation:e.representative,cart:t,intl:C,defaultCurrency:n,groupedTaxations:e.members},e.key))}),t.calculateTotalCityTax().hasPositiveAmount()?(0,s.jsx)("div",{className:"text-property-body3 sm:text-property-body3-sm text-gray-200",children:(0,s.jsx)(l.Z,{...q.Z.cityTaxPaidAtHotel})}):null]}),A&&A>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex flex-col border-t border-solid border-gray-50 w-full"}),(0,s.jsxs)("div",{className:"flex w-full items-center text-property-subtitle2 sm:text-property-subtitle1-sm text-gray-300",children:[(0,s.jsxs)("div",{className:"flex flex-1",children:[(0,s.jsx)("div",{children:(0,s.jsx)(l.Z,{...q.Z.savings})}),(0,s.jsx)("span",{className:"w-3.5 h-3.5 cursor-pointer ml-1.5",onClick:()=>f(!0),children:(0,s.jsx)(o.sz,{})})]}),(0,s.jsx)("div",{className:"w-20 flex-initial",children:(0,s.jsx)(T.x,{convert:!1,value:t.calculateTotalDiscount().round().amount,description:"",alignRight:!0,currency:n,inline:!0,inlineClassName:"!text-property-subtitle2 sm:!text-property-subtitle1-sm !text-gray-300"})})]})]}):null,(0,s.jsx)("div",{className:"flex flex-col border-t border-solid border-gray-50"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex w-full items-center text-property-subtitle2 sm:text-property-subtitle1-sm",children:[(0,s.jsx)("div",{className:"flex-1 capitalize",children:w}),(0,s.jsx)("div",{className:"w-20 flex-initial",children:(0,s.jsx)(T.x,{convert:!1,value:t.calculatePayNowAmount(h,b).amount,description:"",alignRight:!0,currency:n,inline:!0,inlineClassName:"!text-property-subtitle2 sm:!text-property-subtitle1-sm"})})]}),(0,s.jsxs)("div",{className:"flex w-full items-center text-property-subtitle2 sm:text-property-subtitle1-sm",children:[(0,s.jsx)("div",{className:"flex-1",children:M}),(0,s.jsx)("div",{className:"w-20 flex-initial",children:(0,s.jsx)(T.x,{convert:!1,value:t.calculatePendingAmount(h,b).amount,description:"",alignRight:!0,currency:n,inline:!0,inlineClassName:"!text-property-subtitle2 sm:!text-property-subtitle1-sm"})})]}),R?(0,s.jsx)("div",{className:"text-property-body3 sm:text-property-body3-sm text-gray-200",children:(0,s.jsx)(l.Z,{...q.Z.cityTaxPaidAtHotel})}):null]})]})}var J=a(49686),$=a(97786),ee=a(40500);let et=(0,_.vU)({freeTextPlaceholder:{id:"component.checkoutPage.roomStayQuestion.freeTextPlaceholder",defaultMessage:"Write your answer"},selectPlaceholder:{id:"component.checkoutPage.roomStayQuestion.selectPlaceholder",defaultMessage:"Choose an answer"}});
1function ea(e){let{customerFormConfiguration:t,register:a,errors:n,control:i,className:o,setValue:l,stayDates:c,filteredAllMessages:d,disabled:m,fieldPrefix:u}=e,p=(0,P.Z)();0!==Object.keys(n).length&&console.debug("errors found",n);let x=(0,r.useMemo)(()=>t.formFields.map(e=>{let t=y.DFv[e.name],a=t?"".concat(p.formatMessage(ee.O[t])):e.placeholder,n=u?"".concat(u,"_").concat(e.name):e.name;return e.copy({placeholder:a,readonly:m,name:n})}),[t.formFields,m,p,u]);return(0,s.jsxs)("div",{className:(0,v.Z)("CustomerForm",o),children:[d&&(null==d?void 0:d.length)>0&&(0,s.jsx)(J.f,{messages:d,position:y.Qyf.BELOW_PERSONAL_INFO_STEP_2,className:"sm:order-2 col-span-3 w-full",containerClassName:"!mt-0 mb-4"}),(0,s.jsx)($.lT,{fields:x,setValue:l,errors:n,register:a,control:i,stayDates:c,variant:$.MS.MATERIAL_LIKE,fieldPrefix:u,labelClassName:O.qH,textPlaceholder:p.formatMessage(et.freeTextPlaceholder),selectPlaceholder:p.formatMessage(et.selectPlaceholder)})]})}var en=a(40728),ei=a(49766),es=a(88967),er=a(87541),eo=a(40569);let el=(0,r.memo)(function(e){let{slotKey:t,slot:a,disabled:n}=e,i=(0,P.Z)(),r=(0,er.q1)(e=>{var a;return null!==(a=e.values[t])&&void 0!==a?a:er.wS}),l=(0,er.q1)(e=>e.setValue),c=(0,er.q1)(e=>e.showErrors),d=(0,er.zJ)(r);return(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("span",{className:"text-property-body2 sm:text-property-body2-sm first-letter:uppercase",children:[i.formatMessage(ei.gJ[a.ageBracket])," ",a.position]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,s.jsx)(o.II,{name:"participants.".concat(t,".firstName"),placeholder:"".concat(i.formatMessage(eo.w.firstName),"*"),value:r.firstName,hasError:c&&d.firstName,inputClassName:(0,$.mh)(c&&d.firstName),disabled:n,onChange:e=>l(t,"firstName",e.target.value)}),(0,s.jsx)(o.II,{name:"participants.".concat(t,".lastName"),placeholder:"".concat(i.formatMessage(eo.w.lastName),"*"),value:r.lastName,hasError:c&&d.lastName,inputClassName:(0,$.mh)(c&&d.lastName),disabled:n,onChange:e=>l(t,"lastName",e.target.value)}),(0,s.jsx)($.W8,{name:"participants.".concat(t,".birthDate"),placeholder:"".concat(i.formatMessage(eo.w.birthDate),"*"),value:r.birthDate,hasError:c&&d.birthDate,disabled:n,onChange:e=>l(t,"birthDate",e)})]})]})});function ec(e){let{cartItems:t,ageRangePerGuestType:a,getHolder:n,disabled:i}=e,c=(0,P.Z)(),d=(0,er.q1)(e=>e.setRooms),m=(0,er.q1)(e=>e.holderDataKey),u=(0,er.q1)(e=>e.applyHolderData),p=(0,r.useMemo)(()=>t.flatMap(e=>{var t;let n=(0,en.Jk)({guestsPerUnit:e.inventory.configuration.guestsAmount,quantity:e.quantity,guestAges:null!==(t=e.childrenAges)&&void 0!==t?t:[],ageRangePerGuestType:a});return(0,en.M1)(n,e.quantity).map((t,a)=>({cartItemId:e.id,unit:a,accommodationName:e.inventory.accommodation.name,roomDenomination:e.inventory.accommodation.roomDenomination,slots:t}))}),[t,a]);(0,r.useEffect)(()=>(d(p),()=>d([])),[p,d]);let x=(0,r.useCallback)((e,t)=>u(e,t,n()),[u,n]);return p.length?(0,s.jsx)(o.UQ,{defaultExpanded:!0,className:"rounded-card !shadow-none !bg-transparent",summaryClassName:"px-4 sm:px-6",detailClassName:"!px-4 sm:!px-6 !pt-0",summary:(0,s.jsx)(o.xv,{variant:"h3",className:"!font-bold",children:(0,s.jsx)(l.Z,{...eo.w.guestsTitle})}),details:(0,s.jsx)("div",{className:"flex flex-col gap-6",children:p.map((e,t)=>(0,s.jsxs)("div",{className:(0,v.Z)("flex flex-col gap-4",t<p.length-1&&"border-b border-gray-100 pb-6"),children:[(0,s.jsxs)("span",{className:"text-property-body1 sm:text-property-body1-sm !font-bold",children:[(0,h.kC)(c.formatMessage(es.S[e.roomDenomination]))," ",t+1,e.accommodationName?" \xb7 ".concat(e.accommodationName):""]}),0===t&&e.slots.length>0&&(0,s.jsxs)("label",{className:"flex items-start gap-2 text-property-body2 sm:text-property-body2-sm cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",className:"mt-0.5 shrink-0",checked:m===(0,er.pX)(e.cartItemId,e.unit,0),disabled:i,onChange:t=>x((0,er.pX)(e.cartItemId,e.unit,0),t.target.checked)}),(0,s.jsx)(l.Z,{...eo.w.useHolderData,values:{guestLabel:"".concat((0,h.kC)(c.formatMessage(ei.gJ[e.slots[0].ageBracket]))," ").concat(e.slots[0].position)}})]}),e.slots.map((t,a)=>{let n=(0,er.pX)(e.cartItemId,e.unit,a);return(0,s.jsx)(el,{slotKey:n,slot:t,disabled:i},n)})]},"".concat(e.cartItemId,"-").concat(e.unit)))})}):null}var ed=a(29180),em=a(73891),eu=a(60999);let ep=(0,_.vU)({acceptCommercialCommunications:{id:"component.paymentForm.acceptCommercialCommunications",description:"Accept Commercial Communications",defaultMessage:"Accept to re
1ceive {commercialCommunicationsLink}"},termsAndConditionsWarning:{id:"component.paymentForm.termsAndConditionsWarning",description:"termsAndConditionsWarning",defaultMessage:"You must accept the booking terms and conditions"},phoneLengthWarning:{id:"component.paymentForm.phoneLengthWarning",defaultMessage:"Please check the phone length"},phoneInvalidWarning:{id:"component.paymentForm.phoneInvalidWarning",defaultMessage:"Please check that it is a valid phone number."}});function ex(e){let{handleOnAcceptCommercialCommunications:t,isCommercialCommunicationsAccepted:a,errors:n,register:r,paymentStatus:d,openAdditionalDialog:m,showAcceptCommercialCommunicationsCheck:u,hasCommunicationsPolicy:p,showSelfReservationCheck:x=!1,handleFullExpressForm:h,isFullExpressForm:f,fieldPrefix:g,suppressFailMessage:b=!1}=e,j=g?"".concat(g,"_").concat(y.DFv.termsAndConditionsConsent):y.DFv.termsAndConditionsConsent,N=g?"".concat(g,"_").concat(y.DFv.phone):y.DFv.phone,k=Object.keys(n).filter(e=>e!==j&&e!==N),C=j in n?n[j]:void 0,P=n[N];return(0,s.jsxs)("div",{className:(0,v.Z)("AcceptTerms","text-primary","flex","flex-col","gap-3","mb-6"),children:[d!==ed._.FAIL||b?null:(0,s.jsxs)("div",{className:"text-red-100 p-2 border border-red-100",children:[(0,s.jsx)(o.xv,{as:"div",variant:"subtitle2",children:(0,s.jsx)(l.Z,{...c.i4.failedPaymentTransaction})}),(0,s.jsx)(o.xv,{as:"div",variant:"body2",children:(0,s.jsx)(l.Z,{...c.i4.tryAgainOrContactUs})})]}),d===ed._.INVALID?(0,s.jsx)("div",{className:"flex gap-2 items-stretch",children:(0,s.jsx)(o.xv,{variant:"body3",className:"self-center !text-red-100",children:(0,s.jsx)(l.Z,{...c.i4.formErrorsPresent})})}):null,k.length?(0,s.jsx)("div",{className:"flex gap-2 items-stretch",children:(0,s.jsx)(o.xv,{variant:"body3",className:"self-center !text-red-100 !font-bold",children:(0,s.jsx)(l.Z,{...c.i4.formErrorsPresent})})}):null,P&&(0,s.jsx)("div",{className:"flex gap-2 items-stretch",children:(0,s.jsx)(o.xv,{variant:"body3",className:"self-center !text-red-100 !font-bold",children:(0,s.jsx)(l.Z,{...P.message===y.YBW?ep.phoneInvalidWarning:ep.phoneLengthWarning})})}),x&&(0,s.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,s.jsx)("div",{className:"relative mr-4",children:(0,s.jsx)(o.XZ,{"aria-label":"Checkbox",className:(0,v.Z)("block","border rounded","!border-100","text-property-body1 sm:!text-property-body1-sm absolute top-1"),enableControlledBehaviour:!0,onChange:e=>{h(!e)},checked:!f})}),(0,s.jsx)(o.xv,{variant:"body2",as:"label",forLabel:"IAmTheOne",children:(0,s.jsx)(l.Z,{...ee.O.IAmTheOne})})]}),(0,s.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,s.jsx)("div",{className:"relative mr-4",children:(0,s.jsx)(o.XZ,{"aria-label":"Checkbox",className:(0,v.Z)("block border rounded absolute top-1",C?"!border-red-100":"!border-100","text-property-body1 sm:!text-property-body1-sm"),enableControlledBehaviour:!1,...r(j)})}),(0,s.jsx)(o.xv,{variant:"body2",as:"label",forLabel:"privacyPolicy",children:(0,s.jsx)(l.Z,{...ee.O[y.DFv.termsAndConditionsConsent],values:{conditionsLink:(0,s.jsxs)("span",{onClick:()=>m(i.CONDITIONS),className:"font-bold lowercase hover:opacity-80 cursor-pointer",children:[(0,s.jsx)(l.Z,{...c.i4.conditions}),(0,s.jsxs)("span",{children:[", ",(0,s.jsx)(l.Z,{...c.i4.cancellationPolicies})]})]}),privacyPolicyLink:(0,s.jsx)("span",{onClick:()=>m(i.PRIVACY_POLICY),className:"font-bold lowercase hover:opacity-80 cursor-pointer",children:(0,s.jsx)(l.Z,{...c.i4.privacyPolicy})})}})})]}),C?(0,s.jsx)("div",{className:"flex gap-2 items-stretch",children:(0,s.jsx)(o.xv,{variant:"body3",className:"self-center !text-red-100 !font-bold",children:(0,s.jsx)(l.Z,{...ep.termsAndConditionsWarning})})}):null,u&&(0,s.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,s.jsx)("div",{className:"relative mr-4",children:(0,s.jsx)(o.XZ,{"aria-label":"Checkbox",className:(0,v.Z)("block absolute top-1"),checked:a,onChange:t})}),(0,s.jsx)(o.xv,{variant:"body2",as:"label",forLabel:"commercialCommunications",children:(0,s.jsx)(l.Z,{...ep.acceptCommercialCommunications,values:{commercialCommunicationsLink:p?(0,s.jsx)("span",{onClick:()=>m(i.COMMERCIAL_COMMUNICATIONS),className:"font-bold lowercase hover:opacity-80 curs
1or-pointer",children:(0,s.jsx)(l.Z,{...c.i4.commercialCommunications})}):(0,s.jsx)("span",{className:"lowercase",children:(0,s.jsx)(l.Z,{...c.i4.commercialCommunications})})}})})]})]})}var ey=a(55008),eh=a(1837),ev=a(86523),ef=a(14638),eg=a.n(ef),eb=a(21300),ej=a(48909),eN=a(57960);let ek=(0,r.memo)(function(e){let{creditCardTypes:t,className:a}=e;return(null==t?void 0:t.length)?(0,s.jsx)("div",{className:(0,v.Z)("flex gap-2 flex-wrap",a),children:t.map(e=>(0,s.jsx)("div",{className:"w-12 h-8",children:function(e){switch(e){case"Visa":return(0,s.jsx)(o.QH,{});case"MasterCard":return(0,s.jsx)(o.XT,{});case"AmericanExpress":return(0,s.jsx)(o.LT,{});case"Diners":return(0,s.jsx)(o.YV,{});case"CarteBleu":return(0,s.jsx)(o.by,{});case"Jcb":return(0,s.jsx)(o.IR,{});case"UnionPay":return(0,s.jsx)(o.s1,{});default:throw new eN.Zw(e)}}(e)},e))}):(0,s.jsx)(s.Fragment,{})});var eC=a(25120),eP=a(32129);let ew=eg()(()=>Promise.all([a.e(6183),a.e(3802)]).then(a.bind(a,3802)).then(e=>({default:e.AddonPayments})),{loadableGenerated:{webpack:()=>[3802]}}),eT=eg()(()=>Promise.all([a.e(1156),a.e(1404),a.e(6183),a.e(3686)]).then(a.bind(a,23686)).then(e=>({default:e.Adyen})),{loadableGenerated:{webpack:()=>[23686]}}),eM=eg()(()=>Promise.all([a.e(6183),a.e(2943)]).then(a.bind(a,82943)).then(e=>({default:e.CheckoutPayNoPain})),{loadableGenerated:{webpack:()=>[82943]}}),eA=eg()(()=>Promise.all([a.e(6183),a.e(8162)]).then(a.bind(a,48162)).then(e=>({default:e.PaycometCheckout})),{loadableGenerated:{webpack:()=>[48162]}}),eE=eg()(()=>Promise.all([a.e(6183),a.e(4763)]).then(a.bind(a,4763)).then(e=>({default:e.PaycometIvr})),{loadableGenerated:{webpack:()=>[4763]}}),eD=eg()(()=>a.e(5974).then(a.bind(a,95974)).then(e=>({default:e.Paypal})),{loadableGenerated:{webpack:()=>[95974]}}),eS=eg()(()=>Promise.all([a.e(6183),a.e(981)]).then(a.bind(a,20981)).then(e=>({default:e.PnpV3})),{loadableGenerated:{webpack:()=>[20981]},loading:()=>(0,s.jsx)(ey.N,{})}),eI=eg()(()=>Promise.all([a.e(6183),a.e(8980)]).then(a.bind(a,38980)).then(e=>({default:e.PnpProxy})),{loadableGenerated:{webpack:()=>[38980]},loading:()=>(0,s.jsx)(eh.W,{})}),eR=eg()(()=>Promise.all([a.e(6183),a.e(8524)]).then(a.bind(a,8524)).then(e=>({default:e.PnpSdk})),{loadableGenerated:{webpack:()=>[8524]}}),eO=eg()(()=>Promise.all([a.e(6183),a.e(9357)]).then(a.bind(a,69357)).then(e=>({default:e.POS})),{loadableGenerated:{webpack:()=>[69357]}}),eL=eg()(()=>Promise.all([a.e(5062),a.e(6183),a.e(7880)]).then(a.bind(a,47880)).then(e=>({default:e.Stripe})),{loadableGenerated:{webpack:()=>[47880]},loading:()=>(0,s.jsx)(ev.$,{})}),e_=eg()(()=>Promise.all([a.e(660),a.e(6476)]).then(a.bind(a,76476)).then(e=>({default:e.FreedomPay})),{loadableGenerated:{webpack:()=>[76476]}}),eF=eg()(()=>a.e(6889).then(a.bind(a,96889)).then(e=>({default:e.Nemuru})),{loadableGenerated:{webpack:()=>[96889]}}),eZ=eg()(()=>Promise.all([a.e(3215),a.e(2955)]).then(a.bind(a,22955)).then(e=>({default:e.SepteoVault})),{loadableGenerated:{webpack:()=>[22955]}}),eU=eg()(()=>Promise.all([a.e(1156),a.e(2641),a.e(1404),a.e(6183),a.e(5628)]).then(a.bind(a,55628)).then(e=>({default:e.SepteoPayments})),{loadableGenerated:{webpack:()=>[55628]}}),eG=eg()(()=>Promise.all([a.e(6183),a.e(7238)]).then(a.bind(a,7238)).then(e=>({default:e.SiPay})),{loadableGenerated:{webpack:()=>[7238]}});function eB(e){let t=(0,P.Z)(),{onPaymentProcessing:a,submitReservation:n,onPaymentSuccess:i,onPaymentFail:c}=e,m=e.paymentMethod.ticker,p=(0,r.useMemo)(()=>(0,s.jsx)(ex,{isCommercialCommunicationsAccepted:e.isCommercialCommunicationsAccepted,handleOnAcceptCommercialCommunications:e.handleOnAcceptCommercialCommunications,register:e.register,errors:e.errors,paymentStatus:e.paymentStatus,openAdditionalDialog:e.openAdditionalDialog,showAcceptCommercialCommunicationsCheck:e.showAcceptCommercialCommunicationsCheck,hasCommunicationsPolicy:e.hasCommunicationsPolicy,showSelfReservationCheck:e.showSelfReservationCheck,handleFullExpressForm:e.handleFullExpressForm,isFullExpressForm:e.isFullExpressForm,fieldPrefix:e.fieldPrefix,suppressFailMessage:e.paymentMethod.type===y.XL7.SEPTEO_PAYMENTS}),[e.errors,e.handleOnAcceptCommercialCommunications,e.hasCommunicationsPolicy,e.isCommercialCommunicationsAccepted,e.openAdditionalDialog,e.paymentStatus,e.register,e.showAcceptCommercialCommunicationsCheck,e.showSelfReservationCheck,e.handleFullExpressForm,e.is
1FullExpressForm,e.fieldPrefix,e.paymentMethod.type]),x=(0,r.useCallback)(async()=>{for(let t of[e.validateInsurances,e.validateRoomStayForms,e.validateGuestsForm].filter(Boolean))if(!await t())return window.scrollTo({top:0,behavior:"smooth"}),!1;return!0},[e.validateInsurances,e.validateRoomStayForms,e.validateGuestsForm]),h=(0,r.useCallback)(async e=>{if(await x())try{eC.q.setFunnel(eP.o.FILLED_CHECKOUT),a();let{reservationId:t,token:s}=await n(e,m);if(!t)throw Error("Empty reservationId");i(t,s)}catch(e){console.error(e),c()}},[x,a,n,m,i,c]),f=(0,r.useCallback)((t,a)=>e.handleSubmit(async e=>{await x()&&await t(e)},a),[e,x]),g=function(e,t,a,n){let{paymentMethod:i,handleSubmit:r,onPaymentReady:c,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,onFormDisabled:p,submitReservation:x,propertyTicker:h,deposit:v,rate:f,paylandsEnvironment:g,paymentStatus:b,locationInfo:j,locale:N,trackingParams:k,property:C,theme:P,allPaymentMethods:w,roomUnitsAndDenominations:T,fullExpressFormValues:M}=e;switch(i.type){case y.XL7.PAY_NO_PAIN_V2:return(0,s.jsx)(eS,{handleSubmit:n,onPaymentReady:c,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,submitReservation:x,propertyTicker:h,deposit:v,paylandsEnvironment:g,paylandsTemplate:i.configurationParams.template,paylandsServiceId:i.configurationParams.service,paymentType:i.type,paymentTicker:i.ticker,acceptTermsRender:t,roomUnitsAndDenominations:T});case y.XL7.PAY_NO_PAIN_PROXY:return(0,s.jsx)(eI,{handleSubmit:n,onPaymentReady:c,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,submitReservation:x,propertyTicker:h,deposit:v,paylandsEnvironment:g,paylandsTemplate:i.configurationParams.template,paymentType:i.type,paymentTicker:i.ticker,acceptTermsRender:t,roomUnitsAndDenominations:T});case y.XL7.PNP_SDK:return(0,s.jsx)(eR,{paymentMethod:i,propertyTicker:h,propertyName:C.name,deposit:v,paylandsEnvironment:g,locale:N,locationInfo:j,paymentStatus:b,fullExpressFormValues:M,acceptTermsRender:t,roomUnitsAndDenominations:T,onPaymentReady:c,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,onFormDisabled:p,submitReservation:x,handleSubmit:n});case y.XL7.WITHOUT_CARD:case y.XL7.TRANSFER:case y.XL7.RESERVATION_REQUEST:case y.XL7.DEFERRED:return(0,s.jsxs)("div",{className:"mt-4",children:[t,(0,s.jsx)(o.zx,{className:"w-full",onClick:r(a),label:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Z,{...em.s.confirm})," ",T&&(0,s.jsxs)(s.Fragment,{children:["(",T,")"]})]}),isLoading:b===ed._.INITIALIZING||b===ed._.PROCESSING})]});case y.XL7.CHECKOUT_PNP:return(0,s.jsx)(eM,{propertyTicker:h,onPaymentProcessing:d,onPaymentFail:u,deposit:v,paymentMethod:i,handleSubmit:n,submitReservation:x,acceptTermsRender:t,roomUnitsAndDenominations:T});case y.XL7.PAYCOMET:return(0,s.jsx)(eA,{propertyTicker:h,onPaymentProcessing:d,onPaymentFail:u,deposit:v,paymentMethod:i,handleSubmit:n,submitReservation:x,acceptTermsRender:t,roomUnitsAndDenominations:T});case y.XL7.PAYCOMET_IVR:var A;return(0,s.jsx)(eE,{propertyTicker:h,onPaymentProcessing:d,onPaymentFail:u,onPaymentReady:c,deposit:v,paymentMethod:i,handleSubmit:n,submitReservation:x,acceptTermsRender:t,stationId:(null==k?void 0:null===(A=k.affiliateAttributes)||void 0===A?void 0:A.paycomet_ivr_station_id)||"",roomUnitsAndDenominations:T});case y.XL7.CREDIT_CARD_VAULT:case y.XL7.POS:return(0,s.jsx)(eO,{propertyTicker:h,onPaymentProcessing:d,onPaymentFail:u,deposit:v,paymentTicker:i.ticker,handleSubmit:n,submitReservation:x,acceptTermsRender:t,onPaymentReady:c,onPaymentSuccess:m,roomUnitsAndDenominations:T});case y.XL7.EXTERNAL_STORAGE:case y.XL7.SIPAY_TOKENIZED_VAULT:case y.XL7.SIPAY_TOKENIZED_POS:case y.XL7.PNP_TOKEN:case y.XL7.PPR:case y.XL7.PAYPAL_EXPRESS_CHECKOUT:return(0,s.jsx)(eD,{handleSubmit:n,onPaymentReady:c,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,submitReservation:x,propertyTicker:h,deposit:v,paypalEnvironment:"production",paymentType:i.type,paymentTicker:i.ticker,acceptTermsRender:t});case y.XL7.PAYPAL_EXPRESS_STANDARD:case y.XL7.MERCADO_PAGO:case y.XL7.CREDIT_CARD_VAULT_EMERGENT:case y.XL7.PCI_PROXY:case y.XL7.ADDON_PAYMENTS:return(0,s.jsx)(ew,{propertyTicker:h,onPaymentProcessing:d,onPaymentFail:u,deposit:v,paymentMethod:i,handleSubmit:n,submitReservation:x,acceptTermsRender:t,roomUnitsAndDenominations:T});case y.XL7.ADYEN:return(0,s.jsx)(eT,{propertyTicker:h,locationInfo:j,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,onPaymentReady:c,deposit:v,paymentMethod:i,handleSubmit:n,submitReservation:x,acceptTermsRender:t,locale:N,trackingParams:k,roomUnitsAndDenominations:T});case y.XL7.CRIPTAN:throw Error("Not Implemented");case y.XL7.STRIPE:{let e=w.filter(e=>e.type===y.XL7.STRIPE&&e.configurationParams.componentType===y.v6T.EXPRESS).length>0;return(0,s.jsx)(eL,{stripeAccountId:i.configurationParams.accountId,propertyTicker:h,paymentTicker:i.ticker,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,onPaymentReady:c,deposit:v,rate:f,handleSubmit:n,submitReservation:x,acceptTermsRender:t,componentType:i.configurationParams.componentType,hasStripeExpress:e,roomUnitsAndDenominations:T,fullExpressFormValues:M})}case y.XL7.FREEDOM_PAY:return(0,s.jsx)(e_,{paymentMethod:i,propertyTicker:h,onPaymentProcessing:d,onPaymentFail:u,onPaymentSuccess:m,onPaymentReady:c,deposit:v,handleSubmit:n,submitReservation:x,acceptTermsRender:t,roomUnitsAndDenominations:T});case y.XL7.NEMURU:return(0,s.jsx)(eF,{paymentMethod:i,propertyTicker:h,onPaymentProcessing:d,onPaymentFail:u,onPaymentSuccess:m,onPaymentReady:c,onFormDisabled:p,deposit:v,handleSubmit:n,submitReservation:x,acceptTermsRender:t,property:C,theme:P,roomUnitsAndDenominations:T});case y.XL7.SEPTEO_VAULT:return(0,s.jsx)(eZ,{handleSubmit:n,onPaymentReady:c,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,submitReservation:x,propertyTicker:h,paymentTicker:i.ticker,deposit:v,acceptTermsRender:t,roomUnitsAndDenominations:T});case y.XL7.SEPTEO_PAYMENTS:return(0,s.jsx)(eU,{propertyTicker:h,paymentTicker:i.ticker,clientKey:i.configurationParams.clientKey,acceptTermsRender:t,deposit:v,rate:f,locationInfo:j,locale:N,roomUnitsAndDenominations:T,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,onPaymentReady:c,onFormDisabled:p,handleSubmit:n,submitReservation:x});case y.XL7.SIPAY:let E=w.filter(e=>e.type===y.XL7.SIPAY&&e.configurationParams.componentType===y.v6T.EXPRESS).length>0;return(0,s.jsx)(eG,{propertyTicker:h,paymentTicker:i.ticker,deposit:v,clientKey:i.configurationParams.clientKey,googlePayMerchantId:i.configurationParams.googlePayMerchantId,propertyName:C.name,acceptTermsRender:t,locale:N,paymentStatus:b,locationInfo:j,isExpress:E,fullExpressFormValues:M,onPaymentProcessing:d,onPaymentSuccess:m,onPaymentFail:u,onPaymentReady:c,handleSubmit:n,submitReservation:x})}}(e,p,h,f);return(0,s.jsxs)("div",{className:(0,v.Z)("flex flex-col gap-6",e.className),children:[e.mode===eb.O.DEFERRED&&e.expirationDate?(0,s.jsx)(ej.R,{expirationDate:e.expirationDate,className:"sm:!block mt-4 font-bold"}):null,e.customerForm,(e.paymentMethod.type===y.XL7.PAY_NO_PAIN_V2||e.paymentMethod.type===y.XL7.PAY_NO_PAIN_PROXY)&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(o.xv,{variant:"h3",children:(0,s.jsx)(l.Z,{...em.s.cardDetail
1s})})}),e.paymentMethod.isCreditCardType()&&(0,s.jsx)(ek,{creditCardTypes:e.creditCardTypes}),e.paymentMethod.type===y.XL7.DEFERRED&&e.paymentMethod.deferredExpirationDate&&(0,s.jsxs)("div",{className:"mt-4 text-property-body1 sm:text-property-body1-sm !font-bold",children:[(0,s.jsx)(l.Z,{...em.s.deferredPaymentDescription}),":"," ",(0,u.wQ)(e.paymentMethod.deferredExpirationDate,u.kH.DATE_TIME_FORMATTED,t)]}),(0,s.jsx)(d.V,{className:(0,v.Z)("text-property-body1 sm:text-property-body1-sm"),as:"div",html:e.paymentMethod.calculateDescription(e.deposit)}),(0,s.jsx)(r.Suspense,{children:g})]})}function eV(e){let{className:t,paymentMethod:a,onPaymentMethodSelect:n,children:i}=e,o=r.Children.toArray(i),[l,c]=(0,r.useState)(),[d,m]=(0,r.useState)(!1),u=(0,r.useRef)(null),p=a||l,x=(0,r.useCallback)(e=>{(null==p?void 0:p.ticker)===e.ticker?(c(void 0),n&&n(void 0)):(c(e),m(!0),n&&n(e))},[n,null==p?void 0:p.ticker]);return(0,r.useEffect)(()=>{if(!u.current||!p||o.length<2||!d)return;let e=u.current.getBoundingClientRect(),t=window.scrollY||document.documentElement.scrollTop;window.scrollTo({top:e.top+t,behavior:"smooth"}),m(!1)},[d,p,o.length]),(0,s.jsx)("div",{className:t,children:o.map((e,t)=>(0,r.cloneElement)(e,{ref:(null==p?void 0:p.ticker)===e.props.paymentMethod.ticker?u:null,isFirst:0===t,isLast:t===o.length-1,expanded:(null==p?void 0:p.ticker)===e.props.paymentMethod.ticker,onToggle:x,noRadioCircle:1===o.length}))})}let eY=(0,r.forwardRef)((e,t)=>{let{paymentMethod:a,isLast:n,expanded:i,subtitleRender:r,onToggle:l,children:c,noRadioCircle:d=!1}=e;return(0,s.jsx)("div",{ref:t,children:(0,s.jsxs)(o.rL,{options:[{value:a.ticker,label:a.name}],value:i?a.ticker:"",onClick:()=>l&&l(a),className:(0,v.Z)(n&&"border-b border-gray-100","rounded-card border-x border-t border-gray-100 flex min-h-[56px] justify-center py-[20px] px-[10px] sm:px-6"),labelClassName:(0,v.Z)("!font-bold sm:!text-property-h2-sm text-gray-300 w-full"),noRadioCircle:d,children:[r&&r(),i&&c]})})});eY.displayName="PaymentMethod";var eX=a(94889),eK=a.n(eX);function eH(e){let{className:t}=e;return(0,s.jsx)("div",{className:t,children:(0,s.jsx)(o.Od,{animation:"wave",height:62,width:"100%",style:{transform:"scale(1, 1)"}})})}function eq(e){let{deposit:t,agentId:a}=e,[n,i]=r.useState(null==window.Nemuru),{locale:o}=(0,g.Ee)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eK(),{src:"https://cdn.nemuru.com/assets/prod/nemuru.prod.js",onLoad:()=>{var e;null===(e=window.Nemuru)||void 0===e||e.init({clientId:a,configuration:{currency:t.currency,locale:o}}),i(!1)}}),n&&(0,s.jsx)(eH,{}),(0,s.jsx)("nemuru-simulation",{"conditions-amount":100*t.amount,"conditions-product":"instalments","style-variant":"select_banner","style-branding":"default"},"".concat(t.amount,"-").concat(o))]})}let eW=(0,_.vU)({pciCertified:{id:"component.securePayment.pciCertified",description:"pci certified",defaultMessage:"PCI DSS certified"},sslCertified:{id:"component.securePayment.sslCertified",description:"ssl certified",defaultMessage:"Your data is protected with SSL encryption"}}),eQ=[y.XL7.ADDON_PAYMENTS,y.XL7.STRIPE,y.XL7.CHECKOUT_PNP,y.XL7.PAYCOMET,y.XL7.ADYEN,y.XL7.FREEDOM_PAY,y.XL7.POS,y.XL7.CREDIT_CARD_VAULT,y.XL7.PAYPAL_EXPRESS_CHECKOUT,y.XL7.PNP_TOKEN,y.XL7.PAY_NO_PAIN_V2,y.XL7.PAY_NO_PAIN_PROXY];function ez(e){let{paymentMethod:t}=e;return eQ.includes(t.type)?(0,s.jsxs)("div",{className:"w-full text-center sm:text-property-caption-sm text-property-caption !font-normal",children:[(0,s.jsx)(l.Z,{...eW.pciCertified})," | "," ",(0,s.jsx)(l.Z,{...eW.sslCertified})]}):null}let eJ="production",e$=(0,r.memo)(function(e){let{propertyTicker:t,deposit:a,rate:n,availablePaymentMethods:i,paymentMethodRegular:c,paymentMethodExpress:d,handleSubmit:m,handleSubmitExpress:u,handleSubmitExpressFull:p,handleOnAcceptCommercialCommunications:x,isCommercialCommunicationsAccepted:h,onSelectPaymentMethodRegular:f,onSelectPaymentMethodExpress:g,onPaymentReady:j,onPaymentProcessing:N,onPaymentSuccess:k,onPaymentFail:C,onFormDisabled:P,submitReservation:w,className:T,register:M,errors:A,paymentStatus:E,creditCardTypes:D,openAdditionalDialog:S,filteredAllMessages:I,mode:R,expirationDate:O,locationInfo:L,locale:_,trackingParams:F,showAcceptCommercialCommunicationsCheck:Z,collectsParticipants:U=!1,customerFormRegular:G,customerFormExpress:B,customerForm
1ComponentExpressFull:V,hasCommunicationsPolicy:Y,property:X,theme:K,fullDeposit:H,roomUnitsAndDenominations:q,handleFullExpressForm:W,isFullExpressForm:Q,registerExpress:z,registerExpressFull:$,errorsExpress:ee,errorsExpressFull:et,fullExpressFormValues:ea}=e,{validateInsurances:en}=(0,b.MM)(),{validateRoomStayForms:ei}=(0,b.fA)(),{validateGuestsForm:es}=(0,b.Tw)(),{validAvailablePaymentMethodsRegular:er,validAvailablePaymentMethodsExpress:eo}=(0,r.useMemo)(()=>{let e=i.filter(e=>{if(!(e.type===y.XL7.PAYCOMET_IVR&&!(null==F?void 0:F.hasAffiliateAttribute("paycomet_ivr_station_id"))||e.type===y.XL7.NEMURU&&!H||e.type===y.XL7.PNP_SDK&&e.isExpress()&&!(0,eu.x7)(e)))return!0});return{validAvailablePaymentMethodsRegular:e.filter(e=>!e.isExpress()),validAvailablePaymentMethodsExpress:e.filter(e=>e.isExpress())}},[i,H,F]);return(0,s.jsxs)("div",{className:(0,v.Z)("PaymentForm","mb-10",T),children:[U?(0,s.jsx)(o.xv,{variant:"body1",className:"hidden sm:block",children:!!(a.amount>0&&i.length)&&(0,s.jsx)(l.Z,{...em.s.depositRequired})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.xv,{className:"hidden sm:flex",variant:"h1",children:(0,s.jsx)(l.Z,{...em.s.confirmYourStay})}),!!(a.amount>0&&i.length)&&(0,s.jsx)(o.xv,{variant:"body1",className:"hidden sm:block",children:(0,s.jsx)(l.Z,{...em.s.depositRequired})})]}),I&&(null==I?void 0:I.length)>0&&(0,s.jsx)(J.f,{messages:I,position:y.Qyf.TOP_METHOD_PAYMENT_STEP_2,className:"sm:order-2 col-span-3 w-full",containerClassName:"!mt-0"}),(0,s.jsx)(eV,{paymentMethod:d,onPaymentMethodSelect:g,children:eo.map(e=>(0,s.jsx)(eY,{paymentMethod:e,subtitleRender:()=>{if(e.type===y.XL7.NEMURU&&E!==ed._.READY&&E!==ed._.SUCCESS)return(0,s.jsx)(eq,{deposit:a,agentId:e.configurationParams.agentId})},children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eB,{paymentMethod:e,allPaymentMethods:eo,onPaymentReady:j,onPaymentProcessing:N,onPaymentSuccess:k,onPaymentFail:C,onFormDisabled:P,submitReservation:w,handleSubmit:Q?p:u,handleOnAcceptCommercialCommunications:x,isCommercialCommunicationsAccepted:h,propertyTicker:t,deposit:a,rate:n,paylandsEnvironment:eJ,register:Q?$:z,creditCardTypes:D,errors:Q?et:ee,paymentStatus:E,openAdditionalDialog:S,locationInfo:L,locale:_,trackingParams:F,showAcceptCommercialCommunicationsCheck:Z,hasCommunicationsPolicy:Y,property:X,theme:K,mode:R,customerForm:Q?V:B,expirationDate:O,roomUnitsAndDenominations:q,showSelfReservationCheck:!0,handleFullExpressForm:W,isFullExpressForm:Q,fieldPrefix:Q?"expressFull":"express",fullExpressFormValues:ea,className:Q?"pt-6 border-t border-gray-100":"",validateInsurances:en,validateRoomStayForms:ei,validateGuestsForm:es}),(0,s.jsx)(ez,{paymentMethod:e})]})},e.ticker))}),(null==eo?void 0:eo.length)>0&&(null==er?void 0:er.length)>0&&(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"border-t border-gray-100 w-full h-[1px] "}),(0,s.jsx)("span",{className:"text-gray-100 mx-4 text-property-h3-sm uppercase",children:(0,s.jsx)(l.Z,{...em.s.or})}),(0,s.jsx)("span",{className:"border-t border-gray-100 w-full h-[1px]"})]}),(0,s.jsx)(eV,{paymentMethod:c,onPaymentMethodSelect:f,children:er.map(e=>(0,s.jsx)(eY,{paymentMethod:e,subtitleRender:()=>{if(e.type===y.XL7.NEMURU&&E!==ed._.READY&&E!==ed._.SUCCESS)return(0,s.jsx)(eq,{deposit:a,agentId:e.configurationParams.agentId})},children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eB,{paymentMethod:e,allPaymentMethods:er,onPaymentReady:j,onPaymentProcessing:N,onPaymentSuccess:k,onPaymentFail:C,onFormDisabled:P,submitReservation:w,handleSubmit:m,handleOnAcceptCommercialCommunications:x,isCommercialCommunicationsAccepted:h,propertyTicker:t,deposit:a,rate:n,paylandsEnvironment:eJ,register:M,creditCardTypes:D,errors:A,paymentStatus:E,openAdditionalDialog:S,locationInfo:L,locale:_,trackingParams:F,showAcceptCommercialCommunicationsCheck:Z,hasCommunicationsPolicy:Y,property:X,theme:K,mode:R,customerForm:G,expirationDate:O,roomUnitsAndDenominations:q,handleFullExpressForm:W,isFullExpressForm:Q,className:"pt-6 border-t border-gray-100",validateInsurances:en,validateRoomStayForms:ei,validateGuestsForm:es}),(0,s.jsx)(ez,{paymentMethod:e})]})}
1,e.ticker))})]})})},65010:function(e,t,a){a.d(t,{V:function(){return n}});function n(e,t){var a;return null!==(a=e[t.ticker])&&void 0!==a?a:e[t.baseOccupancyTicker()]}},24464:function(e,t,a){a.d(t,{E:function(){return m}});var n=a(31549),i=a(622),s=a(98342),r=a(36582),o=a(35490),l=a(44194),c=a(63621);let d=(0,l.memo)(function(e){let{extra:t,checkIn:a,checkOut:d,onButtonClick:m}=e,u=(0,s.Z)(),p=(0,c.Sy)({startDate:a,endDate:d}),x=(0,l.useCallback)(()=>"function"==typeof m&&m(!1),[m]);return(0,n.jsxs)("div",{className:"flex flex-col text-left",children:[(0,n.jsx)("div",{className:"flex flex-col mb-4",children:(0,n.jsxs)("div",{className:"flex items-center text-property-h1 sm:text-property-h1-sm",children:[(0,n.jsx)("div",{className:"w-5 h-5 mt-1 mr-2.5 text-red-100",children:(0,n.jsx)(i.go,{})}),(0,n.jsx)(r.Z,{...o.i4.availabilityWarning}),": ",t.name]})}),(0,n.jsxs)("div",{className:"flex flex-col text-property-body3 sm:text-property-body3-sm gap-2 mb-3",children:[(0,n.jsx)("div",{children:(0,n.jsx)(r.Z,{...o.i4.availabilityWarningDescription})}),(0,n.jsxs)("div",{children:[(0,n.jsx)(r.Z,{...o.i4.availabilityWarningSummary}),":"]})]}),(0,n.jsx)("div",{className:"flex flex-col gap-2 text-property-subtitle2 sm:text-property-subtitle2-sm mt-1",children:p.map(e=>{var a;return(0,n.jsx)("div",{children:"(x".concat(null!==(a=t.quantityPerDay[e])&&void 0!==a?a:0,") ").concat(e)},e)})}),"function"==typeof m&&(0,n.jsx)("div",{className:"flex justify-center mt-7",children:(0,n.jsx)(i.zx,{variant:"primary",label:u.formatMessage(o.i4.understood),onClick:x})})]})}),m=e=>{let{onToggleDialog:t,open:a,...s}=e;return(0,n.jsx)(i.dK,{open:a,onToggleDialog:t,defaultOpen:!1,onlyCloseManually:!0,contentClassName:"sm:w-auto",closeIconLite:!0,children:(0,n.jsx)(d,{onButtonClick:t,...s})})}},99597:function(e,t,a){a.d(t,{Ff:function(){return m},ng:function(){return u}});var n=a(31549),i=a(44194),s=a(33406),r=a(14517),o=a(622);function l(e){let{display:t,isActive:a,onTabChange:i}=e;return(0,n.jsx)("button",{onClick:()=>i(t.ticker),className:(0,r.Z)("whitespace-nowrap rounded text-sm outline-none","px-2 py-2 sm:px-3 sm:py-2",a?"bg-primary-100 text-primary-contrast font-bold":"bg-gray-25 text-gray-300 font-normal hover:opacity-80"),children:t.label})}let c=(0,i.memo)(function(e){let{displays:t,activeTab:a,onTabChange:s}=e,c=t.length>8,d=c?t.slice(4):[],m=Math.max(0,d.length-4),[u,p]=(0,i.useState)(0),x=(0,i.useCallback)(()=>{p(e=>Math.max(0,e-1))},[]),y=(0,i.useCallback)(()=>{p(e=>Math.min(m,e+1))},[m]),h=d.slice(u,u+4);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex flex-row flex-wrap justify-start gap-[10px] sm:hidden",children:t.map(e=>(0,n.jsx)(l,{display:e,isActive:a===e.ticker,onTabChange:s},e.ticker))}),(0,n.jsxs)("div",{className:"hidden sm:flex sm:flex-row sm:items-center sm:gap-4",children:[(c?t.slice(0,4):t).map(e=>(0,n.jsx)(l,{display:e,isActive:a===e.ticker,onTabChange:s},e.ticker)),c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{onClick:x,disabled:0===u,className:(0,r.Z)("flex shrink-0 items-center justify-center transition-opacity",0===u?"cursor-default opacity-30":"cursor-pointer"),"aria-label":"Previous tabs",children:(0,n.jsx)(o.wy,{className:"h-5 w-5 text-black"})}),h.map(e=>(0,n.jsx)(l,{display:e,isActive:a===e.ticker,onTabChange:s},e.ticker)),(0,n.jsx)("button",{onClick:y,disabled:u>=m,className:(0,r.Z)("flex shrink-0 items-center justify-center transition-opacity",u>=m?"cursor-default opacity-30":"cursor-pointer"),"aria-label":"Next tabs",children:(0,n.jsx)(o.XC,{className:"h-5 w-5 text-black"})})]})]})]})}),d=(0,i.memo)(function(e){let{filters:t,selectedFilters:a,onChangeFilters:i}=e;return t.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"hidden sm:flex flex-row items-center overflow-x-auto gap-[14px] min-w-0",children:t.flatMap((e,t)=>e.options.map(e=>{var s;let o=(null===(s=a[t])||void 0===s?void 0:s.ticker)===e.ticker;return(0,n.jsx)("button",{onClick:()=>i(t,e),className:(0,r.Z)("whitespace-nowrap rounded text-xs outline-none flex-shrink-0","px-2 py-1",o?"bg-primary-100 text-primary-contrast font-bold":"bg-gray-25 text-gray-300 font-normal hover:opacity-80"),children:e.name},e.ticker)}))}),(0,n.jsx)("div",{className:"flex sm:hidden flex-row items-center gap-[14px] min-w-0 flex-1",children:t.map((e,t)=>{var s;return(0,n.jsx)(o.Lt,{className:"h-[30px] py-0 uppercase w-full",buttonClassName:"whitespace-nowrap border-gray-100 text-property-caption sm:text-property-caption-sm text-gray-300 !gap-2 w-full",itemsClassName:"w-full text-left",itemClassName:"!justify-start",text:(null===(s=a[t])||void 0===s?void 0:s.name)||e.name,size:"md",color:"white",items:e.options.map((e,a)=>(0,n.jsx)("div",{onClick:()=>i(t,e),tabIndex:a+1,children:e.name},e.ticker))},e.ticker)})})]}):null}),m=(0,i.memo)(function(e){let{displays:t,activeTab:a,onTabChange:i,filters:r,selectedFilters:o,filtersType:l,onChangeFilters:m,filtersBlock:u,engineFilterGroupBlock:p}=e,x=t.length>0&&a===t[0].ticker,y=x&&r.length>0,h=x&&!!p;return(0,n.jsxs)("div",{className:"flex flex-col gap-[10px] sm:gap-5 w-full",children:[(0,n.jsx)(c,{displays:t,activeTab:a,onTabChange:i}),(y||h)&&(0,n.jsxs)("div",{className:"flex flex-row items-center gap-[28px] sm:gap-4",children:[y&&(l===s.vAw.DROPDOWN?u:(0,n.jsx)(d,{filters:r,selectedFilters:o,onChangeFilters:m})),h&&(0,n.jsx)("div",{className:"ml-auto shrink-0",children:p})]})]})});function u(e){return e===s.oDR.COMPACT}},78492:function(e,t,a){a.d(t,{h:function(){return p}});var n=a(31549),i=a(33406),s=a(622),r=a(17259),o=a(57960),l=a(44194),c=a(14517),d=a(25120);function m(e){let{item:t,tags:a,mediaLimit:i,className:o,carouselClassName:l}=e,d=!!(null==a?void 0:a.length),m=i?t.multimedia.slice(0,i):t.multimedia;
1return(0,n.jsxs)("div",{className:(0,c.Z)(o),children:[(0,n.jsx)(s.lr,{items:m.map(e=>(0,n.jsx)(s.t3,{sizes:["(min-width: 1200px) 1000px","(min-width: 768px) 600px","100vw"],src:e.url,alt:"hotel-picture-".concat(e.title||""),className:"w-full h-full object-cover"},e.url)),grayscale:!1,className:(0,c.Z)("h-[190px]",l),roundedClassName:"rounded-card"}),(0,n.jsx)(s.xv,{variant:"h1",bold:!0,className:"hidden sm:block mt-4",children:t.title}),d&&(0,n.jsx)("div",{className:"flex flex-wrap gap-2.5 mt-[17px] sm:mt-[11px] mb-[18px] sm:mb-0 max-h-[70px] sm:max-h-16 overflow-hidden",children:null==a?void 0:a.map(e=>(0,n.jsx)(s.I0,{label:e.label},e.ticker))}),(0,n.jsx)(s.xv,{variant:"body2",className:"hidden sm:block mt-3",children:t.description?(0,n.jsx)(r.V,{html:t.description}):""})]})}function u(e){let{item:t,tags:a,carouselItems:i}=e,[r,o]=(0,l.useState)(0),[u,p]=(0,l.useState)(!1),x=(0,l.useCallback)((e,t)=>{void 0!==t&&(o(t),d.q.clicked()),p(e)},[]);return(0,n.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,n.jsx)(m,{item:t,mediaLimit:1,tags:a,className:"col-span-2",carouselClassName:"!h-[368px]"}),(0,n.jsx)(s.dK,{open:u,onToggleDialog:x,paddingless:!0,contentClassName:"!overflow-auto !w-[900px] !h-[500px]",embeddedCloseButton:!0,fullHeight:!0,children:(0,n.jsx)(s.lr,{startIndex:r,items:i,grayscale:!1,className:(0,c.Z)("w-[900px] h-[500px]"),roundedClassName:"rounded-card"})}),(0,n.jsx)("div",{className:"col-span-2 grid grid-cols-2 gap-4",children:t.multimedia.map((e,t)=>(0,n.jsx)("div",{onClick:()=>x(!0,t),className:"h-[180px] flex hover:opacity-80",children:(0,n.jsx)("div",{className:"grow-0 shrink-0 basis-full relative cursor-pointer",children:(0,n.jsx)(s.t3,{sizes:["(min-width: 768px) 350px","100vw"],src:e.url,alt:"hotel-picture-".concat(e.title||""),className:"w-full h-full object-cover"},e.url)})},"image-".concat(e.url)))})]})}function p(e){let{item:t,map:a,availability:d,hotelVerse:p,tags:x,bookable:y,displayMode:h,onCloseModal:v,customMap:f,staticMap:g}=e,[b,j]=(0,l.useState)(!0),N=(0,l.useCallback)(e=>{j(e),v&&v()},[v]),k=t.multimedia.map(e=>(0,n.jsx)(s.t3,{sizes:["(min-width: 1200px) 1200px","(min-width: 768px) 600px","100vw"],src:e.url,alt:"hotel-picture-".concat(e.title||""),className:"w-full h-full object-cover"},e.url));switch(t.type){case i.FOL.INFO:if(h===i.ANG.EXTENDED)return(0,n.jsx)(u,{item:t,tags:x,carouselItems:k});return(0,n.jsx)(m,{item:t,tags:x});case i.FOL.AVAILABILITY:if(!d)throw Error("Empty availability slot");return d;case i.FOL.MAP:if(f)return f;if(!a)throw Error("Empty map slot");return a;case i.FOL.STATIC_MAP:if(g)return g;throw Error("Empty map slot");case i.FOL.HOTELVERSE:if(!p)throw Error("Empty hotelVerse slot");return p;case i.FOL.BOOKABLE:if(!y)throw Error("Empty bookable slot");return(0,n.jsx)(n.Fragment,{children:y});case i.FOL.CUSTOM:{var C;let e=(0,n.jsxs)("div",{className:"flex h-full w-full flex-col gap-4",children:[(null===(C=t.multimedia)||void 0===C?void 0:C.length)?(0,n.jsx)(s.lr,{items:k,grayscale:!1,className:(0,c.Z)(h===i.ANG.EXTENDED?"w-[900px] h-[500px]":"h-[190px] w-full"),roundedClassName:h===i.ANG.EXTENDED?"rounded-t-card":"rounded-card"}):null,(0,n.jsx)("div",{className:"p-4 grow",children:(0,n.jsx)(r.V,{className:"h-full",as:"div",html:t.content})})]});if(h===i.ANG.EXTENDED)return(0,n.jsx)(s.dK,{open:b,onToggleDialog:N,contentClassName:"sm:!max-w-fit !overflow-auto",paddingless:!0,embeddedCloseButton:!0,fullHeight:!0,children:(0,n.jsx)("div",{className:"w-[900px]",children:e})});return(0,n.jsx)("div",{className:"flex flex-col justify-center items-center ",children:e})}default:throw new o.Zw(t.type)}}},63162:function(e,t,a){a.d(t,{e:function(){return h}});var n=a(31549),i=a(14517),s=a(622),r=a(33406),o=a(44194),l=a(35490),c=a(98342),d=a(17259),m=a(57960);let u="gallery",p=[r.FOL.AVAILABILITY,r.FOL.MAP];function x(e){let{activeDisplays:t,availability:a,map:i,useDialog:o,selected:l,onToggleDialog:c,tags:x,renderCustomMap:y,renderStaticMap:h}=e;if(l===u)return null;let v=t.find(e=>e.ticker===l);if(!v)throw Error("Invalid display element");let f=function(e,t,a,i,o,l){let c=!!(null==i?void 0:i.length);switch(e.type){case r.FOL.INFO:return(0,n.jsxs)("div",{children:[(0,n.jsx)(s.xv,{variant:"h1",bold:!0,className:"mt-4",children:e.title}),c&&(0,n.jsx)("div",{className:"flex flex-wrap gap-2.5 mt-[17px] sm:mt-[11px] mb-[18px] sm:mb-0 sm:justify-start justify-center",children:null==i?void 0:i.map(e=>(0,n.jsx)(s.I0,{label:e.label},e.ticker))}),(0,n.jsx)(s.xv,{variant:"body2",className:"mt-3",children:e.description?(0,n.jsx)(d.V,{html:e.description}):""})]});case r.FOL.AVAILABILITY:if(!t)throw Error("Empty availability slot");return t;case r.FOL.STATIC_MAP:if(l)return l;return(0,n.jsx)(n.Fragment,{});case r.FOL.MAP:if(o)return o;if(!a)return(0,n.jsx)(n.Fragment,{});return a;case r.FOL.BOOKABLE:throw Error("Tab content does not support Bookable type. This is a mistake");case r.FOL.CUSTOM:case r.FOL.HOTELVERSE:var u;return(0,n.jsxs)("div",{className:"flex h-full flex-col gap-4",children:[(null===(u=e.multimedia)||void 0===u?void 0:u.length)?(0,n.jsx)(s.lr,{items:e.multimedia.map(e=>(0,n.jsx)(s.t3,{sizes:["(min-width: 768px) 350px","100vw"],src:e.url,alt:"hotel-picture-".concat(e.title||""),className:"w-full h-full object-cover rounded"},e.url)),grayscale:!1,className:"h-[300px]",roundedClassName:"rounded-card"}):null,(0,n.jsx)(d.V,{as:"div",html:e.content})]});default:throw new m.Zw(e.type)}}(v,a,i,x,y,h);return!p.includes(v.type)&&o?(0,n.jsx)(s.dK,{open:!0,onToggleDialog:c,children:f}):f}var y=a(25120);let h=(0,o.memo)(function(e){var t;let{className:a,activeDisplays:m,renderAvailability:p,renderMap:h,defaultTabTicker:v,useDialog:f,defaultOpenAvailability:g,tags:b,renderCustomMap:j,renderStaticMap:N,hideTabs:k}=e,C=(0,c.Z)(),P=null!=v?v:f?u:"info",[w,T]=(0,o.useState)(!1),M=(0,o.useCallback)(()=>T(!1),[]),A=(0,o.useCallback)(()=>{T(!0),y.q.clicked()},[]),[E,D]=(0,o.useState)(P),S=(0,o.useCallback)(e=>()=>{D(e),y.q.clicked()}
1,[]),I=m.find(e=>e.type===r.FOL.INFO),R=(0,o.useCallback)(e=>e?void 0:D(u),[]),O=(0,o.useMemo)(()=>[f?{ticker:u,label:C.formatMessage(l.i4.gallery)}:void 0,I?{ticker:I.ticker,label:I.label}:void 0,...m.filter(e=>e.type!==r.FOL.INFO).map(e=>({ticker:e.ticker,label:e.label}))].filter(e=>!!e),[f,C,I,m]),L=(0,o.useMemo)(()=>p?p({setDefaultTab:()=>D(P)}):void 0,[P,p]),_=(0,o.useMemo)(()=>h?h({setDefaultTab:()=>D(P)}):void 0,[P,h]),F=(0,o.useMemo)(()=>j?j({setDefaultTab:()=>D(P)}):void 0,[P,j]),Z=(0,o.useMemo)(()=>N?N({setDefaultTab:()=>D(P)}):void 0,[P,N]),U=(0,o.useMemo)(()=>I?I.multimedia.map((e,t)=>(0,n.jsx)(s.t3,{sizes:["(min-width: 768px) 384px","100vw"],src:e.url,alt:"hotel-picture-".concat(e.title||""),className:"w-full h-full object-cover",loadingStrategy:0===t?"eager":"lazy"},e.url)):[],[I]),G=(0,o.useMemo)(()=>O.map(e=>(0,n.jsx)("button",{className:(0,i.Z)("hover:underline hover:underline-offset-4 py-1 hover:text-gray-50 uppercase whitespace-nowrap outline-0 mr-4",{"text-gray-50 underline underline-offset-4":E===e.ticker,"text-gray-25":E!==e.ticker}),onClick:S(e.ticker),children:e.label},e.ticker)),[S,E,O]);return I?(0,n.jsxs)("div",{className:(0,i.Z)("border border-none sm:border-transparent rounded-card relative",a),children:[w?(0,n.jsx)(s.W2,{closeDialog:M,images:U,title:I.title,de
1scription:(0,n.jsx)(d.V,{html:null!==(t=I.description)&&void 0!==t?t:""}),messages:{close:C.formatMessage(l.i4.close)},tags:null==b?void 0:b.map(e=>e.label)}):null,(0,n.jsxs)("div",{className:"".concat(s.FP," ").concat(s.lU," relative"),children:[(0,n.jsx)(s.lr,{items:U,grayscale:!1,className:"",overlay:!k,showDots:!!k,onItemClick:A,roundedClassName:"sm:rounded-card"}),k&&(0,n.jsx)("div",{className:"absolute bottom-3 right-3 w-5 h-5 text-white pointer-events-none drop-shadow-md",children:(0,n.jsx)(s.$_,{})}),(0,n.jsx)("div",{className:"absolute bottom-0 z-10 w-full h-[50px] sm:h-[100px] flex flex-row items-end justify-center font-bold text-property-caption p-3",children:!k&&O.length>1&&(0,n.jsx)(s.pC,{showPrevButton:!1,showNextButton:!1,className:"w-full !h-auto",slides:G})})]}),(0,n.jsx)(x,{selected:E,useDialog:f,activeDisplays:m,map:_,availability:L,onToggleDialog:R,tags:b,renderCustomMap:F,renderStaticMap:Z}),E===r.FOL.MAP&&!F&&_,(E===r.FOL.AVAILABILITY||g)&&L]}):null})},21924:function(e,t,a){a.d(t,{sS:function(){return k},nJ:function(){return er},T9:function(){return es},TI:function(){return eo},Eq:function(){return el},mt:function(){return ei}});var n,i,s=a(31549),r=a(24608),o=a(622),l=a(44194),c=a(33406),d=a(14517),m=a(63162),u=a(99597);let p=(0,l.memo)(function(e){let{activeDisplays:t,renderAvailability:a,renderMap:n,className:i,defaultIndex:r,defaultOpenAvailability:o,tags:l,renderCustomMap:c,renderStaticMap:p,displayMenuType:x}=e,y=!!x&&(0,u.ng)(x);return(0,s.jsx)("div",{className:(0,d.Z)(i),children:(0,s.jsx)(m.e,{useDialog:!0,activeDisplays:t,defaultIndex:r,renderAvailability:a,renderMap:n,defaultOpenAvailability:o,tags:l,renderCustomMap:c,renderStaticMap:p,hideTabs:y})})});var x=a(78492),y=a(25120);let h={base:"flex items-center h-full hover:text-primary-100 px-2 uppercase border-r",selected:"text-primary-100",unselected:"text-gray-200"},v=(0,l.memo)(function(e){let{defaultIndex:t,className:a,activeDisplays:n,renderAvailability:i,renderMap:r,renderHotelVerse:m,tags:u,renderCustomMap:p,renderStaticMap:v}=e,[f,g]=(0,l.useState)(t),b=(0,l.useCallback)(e=>{g(e),y.q.clicked()},[]),j=(0,l.useMemo)(()=>i?i({setDefaultTab:()=>g(t)}):void 0,[i,t]),N=(0,l.useMemo)(()=>r?r({setDefaultTab:()=>g(t)}):void 0,[t,r]),k=(0,l.useMemo)(()=>p?p({setDefaultTab:()=>g(t)}):void 0,[t,p]),C=(0,l.useMemo)(()=>v?v({setDefaultTab:()=>g(t)}):void 0,[t,v]),P=(0,l.useMemo)(()=>m?m({setDefaultTab:()=>g(t)}):void 0,[t,m]);return(0,s.jsx)("div",{className:(0,d.Z)("sm:rounded-card sm:border sm:border-gray-100 relative",a),children:(0,s.jsxs)(o.OK.Group,{selectedIndex:f,onChange:b,children:[(0,s.jsx)(o.OK.List,{className:"h-full flex font-bold text-property-caption border-b border-t sm:border-t-0 border-gray-100 py-2",children:(0,s.jsx)(o.pC,{showPrevButton:!0,showNextButton:!0,className:(0,d.Z)(a,"h-[25px] w-[381px]"),dynamicArrows:!0,slides:n.map((e,t)=>(0,s.jsx)(o.OK,{as:"button",className:e=>{let{selected:a}=e;return(0,d.Z)(h.base,n.length-1===t&&"last:border-r-0",n.length-1===t&&"last:pr-0",0===t&&"first:pl-0",h[a?"selected":"unselected"],"w-max")},children:e.label},e.label))})}),(0,s.jsx)(o.OK.Panels,{className:"p-4",children:n.map(e=>(0,s.jsx)(o.OK.Panel,{className:e.type===c.FOL.MAP||e.type===c.FOL.STATIC_MAP?"h-[500px]":"",children:(0,s.jsx)(x.h,{item:e,map:N,availability:j,hotelVerse:P,tags:u,customMap:k,staticMap:C})},e.ticker))})]})})}),f=(0,l.memo)(function(e){let{activeDisplays:t,renderAvailability:a,renderMap:n,className:i,defaultIndex:r,renderHotelVerse:o,tags:p,renderCustomMap:x,renderStaticMap:y,displayMenuType:h}=e,f=(0,l.useMemo)(()=>!t.find(e=>e.type===c.FOL.CUSTOM||e.type===c.FOL.MAP&&x),[x,t]),g=!!h&&(0,u.ng)(h);return(0,s.jsx)("div",{className:(0,d.Z)(i),children:f||g?(0,s.jsx)(m.e,{useDialog:!1,activeDisplays:t,defaultIndex:r,renderAvailability:a,renderMap:n,defaultTabTicker:"info",tags:p,renderCustomMap:x,renderStaticMap:y,hideTabs:g}):(0,s.jsx)(v,{activeDisplays:t,defaultIndex:r,renderAvailability:a,renderMap:n,renderHotelVerse:o,tags:p,renderCustomMap:x,renderStaticMap:y})})});var g=a(35490),b=a(98342),j=a(57960);let N=(0,l.memo)(function(e){let{className:t,activeDisplays:a,renderAvailability:n,renderMap:i,renderHotelVerse:r,tags:m,bookable:p,renderCustomMap:h,renderStaticMap:v,displayMenuType:f}=e,[g,b]=(0,l.useState)("auto"),j=(0,l.useRef)(null),[N,k]=(0,l.useState)(0),C=a.findIndex(e=>e.type===c.FOL.MAP),P=a.findIndex(e=>e.type===c.FOL.STATIC_MAP),w=(0,l.useCallback)(()=>k(0),[]),T=(0,l.useCallback)(e=>{k(e),y.q.clicked()},[]),M=(0,l.useMemo)(()=>n?n({setDefaultTab:w}):void 0,[n,w]);(0,l.useEffect)(()=>
1{if(!j.current)return;if(N!==C&&N!==P){b("auto");return}let e=j.current.getBoundingClientRect();b(window.innerHeight-o.Tx-e.y-o.du)},[P,C,N]);let A=(0,l.useMemo)(()=>i?i({setDefaultTab:w,className:"!relative !z-0",withCloseButton:!1}):void 0,[i,w]),E=(0,l.useMemo)(()=>h?h({setDefaultTab:w}):void 0,[w,h]),D=(0,l.useMemo)(()=>v?v({setDefaultTab:w}):void 0,[w,v]),S=(0,l.useMemo)(()=>r?r({setDefaultTab:w}):void 0,[r,w]);return(0,s.jsx)("div",{className:(0,d.Z)("border border-none sm:border-transparent rounded-card relative",t),children:(0,s.jsxs)(o.OK.Group,{selectedIndex:N,onChange:T,children:[!(f&&(0,u.ng)(f))&&(0,s.jsxs)(o.OK.List,{className:"flex flex-wrap",children:[a.map((e,t)=>(0,s.jsx)(o.OK,{className:(0,d.Z)("cursor-pointer p-4 pb-5 border-gray-100 outline-none z-10",t===N&&"border-t border-l border-r rounded-t-card text-gray-300 font-bold",t!==N&&"text-gray-200 border-b"),children:(0,s.jsx)(o.xv,{variant:"h2",children:e.label})},"title-".concat(t))),(0,s.jsx)(o.OK,{className:"border-b border-gray-100 p-4 pb-5 outline-none flex-grow pointer-events-none"})]}),(0,s.jsx)(o.OK.Panels,{children:a.map(e=>(0,s.jsx)(o.OK.Panel,{className:"mt-8",children:(0,s.jsx)("div",{ref:j,style:{height:g},className:"!min-h-[600px]",children:(0,s.jsx)(x.h,{item:e,map:A,availability:M,hotelVerse:S,tags:m,bookable:p,displayMode:c.ANG.EXTENDED,onCloseModal:w,customMap:E,staticMap:D})})},e.ticker))})]})})}),k=(0,l.memo)(e=>{let{displays:t,initialActive:a,activeEntityType:n,activeEntityTicker:i,renderMap:o,renderAvailability:d,displayMode:m,displayMenuType:u,bookable:x,renderCustomMap:y,renderStaticMap:h,render3DMap:v,...k}=e,C=(0,b.Z)(),P=(0,l.useCallback)(e=>{switch(e.type){case c.FOL.INFO:return C.formatMessage(g.i4.info);case c.FOL.MAP:return C.formatMessage(g.i4.map);case c.FOL.AVAILABILITY:return C.formatMessage(g.i4.availability);case c.FOL.HOTELVERSE:case c.FOL.CUSTOM:case c.FOL.STATIC_MAP:return e.label;case c.FOL.BOOKABLE:return(0,r.kC)(C.formatMessage(g.i4.accommodation));default:throw new j.Zw(e.type)}},[C]),{activeDisplays:w,activeDisplaysMobile:T}=(0,l.useMemo)(()=>{let e=void 0!==y,a=void 0!==v,s=m===c.ANG.EXTENDED,o=c.FSJ.filterDisplays(t,n,i,e,a,s).map(e=>c.MH7.create({...e,label:P(e)})),l=c.FSJ.filterDisplays(t,n,i,e,a,!0).map(e=>c.MH7.create({...e,label:P(e)}));return m===c.ANG.EXTENDED&&(o=[c.MH7.accommodationDisplayExtended({label:(0,r.kC)(C.formatMessage(g.i4.accommodation))}),...o]),{activeDisplays:o,activeDisplaysMobile:l}},[v,y,t,n,i,m,P,C]),M=(0,l.useMemo)(()=>a?w.findIndex(e=>e.ticker===a):0,[a,w]),A=(0,l.useMemo)(()=>a?T.findIndex(e=>e.ticker===a):0,[a,T]),E="hidden sm:block";return m===c.ANG.EXTENDED?(0,s.jsx)(N,{...k,activeDisplays:w,defaultIndex:M,renderAvailability:d,renderMap:o,renderCustomMap:y,renderStaticMap:h,className:E,bookable:x,displayMenuType:u}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p,{...k,activeDisplays:T,defaultIndex:A,renderAvailability:d,renderMap:o,renderCustomMap:y,renderStaticMap:h,className:"sm:hidden",displayMode:c.ANG.SIDEBAR,displayMenuType:u}),(0,s.jsx)(f,{...k,activeDisplays:w,defaultIndex:M,renderAvailability:d,renderMap:o,renderCustomMap:y,renderStaticMap:h,className:E,displayMode:c.ANG.SIDEBAR,displayMenuType:u})]})});var C=a(18337),P=a(36582),w=a(17259),T=a(35737),M=a(63621),A=a(12603),E=a(52662),D=a(90397),S=a(37497);function I(){var e;let t=(0,S.useRouter)();return{propertyTicker:null!==(e=t.query.chainId)&&void 0!==e?e:t.query.hotelId}}var R=a(21048);let O=e=>{let{priceMessage:t,bundlingMultiplier:a,roomDenomination:n,guestsMessage:i,guestsNumber:r}=e;return(0,s.jsxs)("span",{className:"text-gray-200 text-property-body3-sm",children:["*",t," ",a," ",n," (",r," ",i,")"]})};var L=a(66443);function _(e){var t,a,n,i;let{key:r,room:l,loyaltyStatus:m,tier:u,onPriceClick:p,navigating:x,hideOriginalPrice:y,user:h,accommodationResultsFormat:v,handleLaunchSplitStayAssist:f,splitStay:g,splitStayMessage:b,discountPercentage:j,taxShowConfig:N,taxations:k,onShowDetail:C}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)(c.s9g,{start:new Date(g.start||"").getDate(),start2:new Date(g.start2||"").getDate(),end:(0,s.jsx)(L._h,{dateFrom:new Date(g.end||""),dateFormat:L.kH.DAY_MONTH_YEAR_FORMATTED}),end2:(0,s.jsx)(L._h,{dateFrom:new Date(g.end2||""),dateFormat:L.kH.DAY_MONTH_YEAR_FORMATTED}),layout:"vertical",className:"lg:hidden",accommodationName:g.accommodation.name,accommodationName2:g.accommodation2.name,image:[(0,s.jsx)(o.t3,{sizes:["(max-width: 600px) 100v
1w","(max-width: 1024px) 50vw","400px"],src:g.accommodation.media[0].url,alt:null!==(t=g.accommodation.media[0].title)&&void 0!==t?t:"room-".concat(1),className:"w-full h-full object-cover relative",loadingStrategy:"eager"},g.accommodation.media[0].url)],image2:[(0,s.jsx)(o.t3,{sizes:["(max-width: 600px) 100vw","(max-width: 1024px) 50vw","400px"],src:g.accommodation2.media[0].url,alt:null!==(a=g.accommodation2.media[0].title)&&void 0!==a?a:"room-".concat(2),className:"w-full h-full object-cover relative",loadingStrategy:"eager"},g.accommodation2.media[0].url)],splitStayMessage:b,discountPercentage:j,firstAccommodationTicker:g.accommodation.ticker,secondAccommodationTicker:g.accommodation2.ticker,onShowDetail:C,children:(0,s.jsx)(er,{room:l,loyaltyStatus:m,tier:u,onPriceClick:p,onGoToRoomPage:()=>f(g.accommodation.ticker,g.accommodation2.ticker,g.start,g.end,g.start2,g.end2),navigating:x,hideOriginalPrice:y,user:h})},l.id),(0,s.jsx)(c.s9g,{start:new Date(g.start||"").getDate(),start2:new Date(g.start2||"").getDate(),end:(0,s.jsx)(L._h,{dateFrom:new Date(g.end||""),dateFormat:L.kH.DAY_MONTH_YEAR_FORMATTED}),end2:(0,s.jsx)(L._h,{dateFrom:new Date(g.end2||""),dateFormat:L.kH.DAY_MONTH_YEAR_FORMATTED}),layout:v===E.x.GRID?"vertical":"horizontal",accommodationName:g.accommodation.name,accommodationName2:g.accommodation2.name,image:[(0,s.jsx)(o.t3,{sizes:["(max-width: 600px) 100vw","(max-width: 1024px) 50vw","400px"],src:g.accommodation.media[0].url,alt:null!==(n=g.accommodation.media[0].title)&&void 0!==n?n:"room-".concat(1),className:"w-full h-full object-cover relative",loadingStrategy:"eager"},g.accommodation.media[0].url)],image2:[(0,s.jsx)(o.t3,{sizes:["(max-width: 600px) 100vw","(max-width: 1024px) 50vw","400px"],src:g.accommodation2.media[0].url,alt:null!==(i=g.accommodation2.media[0].title)&&void 0!==i?i:"room-".concat(2),className:"w-full h-full object-cover relative",loadingStrategy:"eager"},g.accommodation2.media[0].url)],splitStayMessage:b,discountPercentage:j,className:(0,d.Z)("hidden lg:flex",v===E.x.GRID&&"sm:h-[calc(100%-48px)] sm:min-h-[470px]"),firstAccommodationTicker:g.accommodation.ticker,secondAccommodationTicker:g.accommodation2.ticker,onShowDetail:C,children:(0,s.jsx)(er,{room:l,loyaltyStatus:m,tier:u,onPriceClick:p,onGoToRoomPage:()=>f(g.accommodation.ticker,g.accommodation2.ticker,g.start,g.end,g.start2,g.end2),navigating:x,hideOriginalPrice:y,user:h})},l.id),(0,s.jsx)(A.Uu,{taxShowConfig:N,taxations:k,taxationRates:g.splitStayTaxationRates})]},"".concat(r).concat(g.accommodation.ticker))}var F=a(30840),Z=a(88445),U=a(76305);(n=i||(i={})).CANCELLATION_POLICY="cancellation_policy",n.MEAL_PLAN="meal_plan";var G=a(20521),B=a(61966),V=a(94684),Y=a(17258),X=a(70585);let K=e=>{let{type:t,options:a,selectedTicker:n,onChange:r,onInfoClick:c,className:m,stayDuration:u,showInventoryPriceDiff:p=!1,displayAmountsWithoutDecimals:x=!1,currencySymbol:y,hasMealPlanDescriptions:h=!1,isLuminanceOK:v=!0}=e,f=(0,b.Z)(),j=t===i.CANCELLATION_POLICY,N=t===i.MEAL_PLAN,k=(0,l.useMemo)(()=>a.map(e=>{let t=p&&void 0!==e.priceDifference&&0!==e.priceDifference;return{value:e.ticker,label:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex justify-between w-full items-center sm:items-start",children:[(0,s.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:(0,s.jsx)("div",{className:"flex items-center sm:items-start gap-2",children:(0,s.jsx)("span",{className:"sm:text-property-body1-sm sm:mt-[-5px] inline ui-checked:!font-bold",children:e.name})})}),t&&e.priceDifference&&(0,s.jsxs)("div",{className:(0,d.Z)("flex text-property-body2-sm text-gray-200",N?"":"ml-2"),children:[e.priceDifference>0?"+":"",(e.priceDifference/u).toFixed(x?0:2)," ",y,(0,s.jsx)("span",{children:"/"}),"\xa0",f.formatMessage(g.i4.night)]})]}),j&&e.freeCancellationDate&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-green-100 text-property-body3 sm:text-property-body3-sm mt-2",children:[(0,s.jsx)("span",{className:"h-[10px] w-[10px] mr-1",children:(0,s.jsx)(o.nQ,{})}),(0,s.jsxs)("span",{children:[f.formatMessage(g.i4.cancelForFreeUntil),":"," ",(0,s.jsx)(L._h,{dateFrom:e.freeCancellationDate,dateFormat:L.kH.DD_MM_YYYY_HH_MM_FORMATTED})]})]})]})}}),[a,u,f,p,x,y,j,N]),C=(0,l.useMemo)(()=>{var e,t,i;return j?a.find(e=>e.ticker===n)&&n?n:null!==(i=null===(t=a[0])||void 0===t?void 0:t.t
1icker)&&void 0!==i?i:"":n||(null===(e=a[0])||void 0===e?void 0:e.ticker)||""},[a,n,j]),w=j?g.i4.cancellationPolicies:g.i4.mealPlan,T=j||N&&h;return(0,s.jsxs)("div",{className:(0,d.Z)("space-y-3 pt-4",j&&"border-t border-gray-50",m),children:[(0,s.jsxs)("div",{className:(0,d.Z)("flex items-center gap-2 cursor-pointer mb-4"),onClick:c,children:[(0,s.jsx)(o.xv,{variant:"h2",className:"text-gray-300 font-medium",children:(0,s.jsx)(P.Z,{...w})}),T&&(0,s.jsx)("span",{className:(0,d.Z)("inline-flex align-middle","w-3 h-3"),children:(0,s.jsx)(o.sz,{})})]}),(0,s.jsx)(o.rL,{options:k,value:C,onChange:r,className:"mt-2",labelClassName:"w-full",isLuminanceOK:v,radioTop:!0})]})},H=e=>{let{onShowRoomDetails:t,onShowAvailability:a,selectedInventoryGroup:n,className:i}=e,r=(0,l.useCallback)(()=>{if(null==n?void 0:n.priceOptions[0]){let e=n.priceOptions[0].inventory;a({inventory:e,label:"".concat(e.mealPlan.name," - ").concat(e.getConditionName())})}},[a,n]);return(0,s.jsxs)("div",{className:(0,d.Z)("flex flex-wrap gap-2 text-property-caption-sm text-gray-100 uppercase border-b border-gray-50 pb-4",i),children:[(0,s.jsx)("span",{className:"hover:opacity-80 cursor-pointer",onClick:t,children:(0,s.jsx)(P.Z,{...g.i4.moreInfo})}),(0,s.jsx)("span",{children:"|"}),(0,s.jsx)("span",{className:"hover:opacity-80 cursor-pointer",onClick:r,children:(0,s.jsx)(P.Z,{...g.i4.viewCalendar})})]})},q=e=>{let{inventoryGroups:t,stayDuration:a,status:n,restrictionMessage:i,MessageIcon:r,className:o,isLuminanceOK:m=!0}=e,u=(0,b.Z)(),p=n===c.Ux9.AVAILABLE,x=(0,l.useMemo)(()=>{var e;if(!t.length)return"";let n=t[0];if(!(null===(e=n.priceOptions[0])||void 0===e?void 0:e.inventory))return"";let o=n.secondaryLabel||"",l="".concat(o," | ").concat(a," ").concat(a>1?u.formatMessage(g.i4.nights):u.formatMessage(g.i4.night));return p?(0,s.jsx)("div",{className:m?"text-primary-100":"text-gray-200",children:l}):(0,s.jsxs)("div",{className:(0,d.Z)("flex flex-row items-center gap-1 font-bold text-property-subtitle1-sm text-gray-300 mb-2.5 sm:mb-0"),children:[(0,s.jsx)("div",{className:"w-4 h-4",children:(0,s.jsx)(r,{})}),i]})},[t,a,u,p,r,i,m]);return(0,s.jsx)("div",{className:(0,d.Z)("min-h-[22px]",o),children:x})};var W=a(11983),Q=a(84830),z=a(67949);let J={register:{id:"shared.loyalty.register",description:"Register",defaultMessage:"Register"}},$=e=>{let{inventory:t,messages:a,loyaltyStatus:n,brand:i,tier:r,loyaltyRate:m,totalRate:u,nights:p,formattedFreeCancellationMaxDate:x,inventoryAvailabilityOptions:y,handleOnQuantityChange:h,onAddToCart:v,onPriceClick:f,navigating:g,hideOriginalPrice:N,disableUnitSelection:k,showEnginePrices:C,user:P,isBundle:w,discountPercentage:T,bundlingMultiplier:M,className:A,isDepositMessageOnTop:E,badge:D}=e,S=(0,b.Z)(),I=(0,R.kj)(e=>e.visualConfiguration),[O,L]=(0,Q.V)(u.divide(p)),[_,F]=(0,Q.V)(m?m.divide(p):j.vO.zero(u.currency)),[Z,U]=(0,l.useState)(!1),G=(0,l.useCallback)(()=>{U(!0),v()},[v]);if(!t.isAvailable())return(0,s.jsx)(s.Fragment,{});let B=n===c.wcI.ACTIVE_BY_LOGGED_USER,V=n===c.wcI.AVAILABLE_FOR_PROPERTY||n===c.wcI.AVAILABLE_AND_REJECTED||B,Y=a.cancellationMessage&&x,X=t.hasDeposit()?a.depositRequired:a.depositNotRequired,K=g&&Z,H=g&&!Z,{description:q,suffix:$,isMainRateLoyaltyStyled:ee}=(0,W.S)(null==i?void 0:i.translations.name,w,n,P);return(0,s.jsxs)("div",{className:(0,d.Z)("flex flex-col justify-between sm:items-end gap-0 h-full",A),children:[(0,s.jsxs)("div",{className:(0,d.Z)("flex flex-row justify-start gap-2 w-full mb-6"),children:[(0,s.jsxs)("div",{className:(0,d.Z)("flex flex-col gap-0 w-2/3 items-start"),children:[E&&X?(0,s.jsxs)("div",{className:(0,d.Z)("text-property-subtitle2 sm:text-property-subtitle1-sm flex items-center mb-6"),children:[(0,s.jsx)("span",{className:"h-4 w-4 mr-2",children:(0,s.jsx)(o._K,{})}),X]}):null,(0,s.jsxs)("div",{className:(0,d.Z)("flex flex-row gap-4 items-end justify-start",V&&"min-h-[94px]"),children:[(0,s.jsxs)("div",{onClick:B?f:void 0,children:[(0,s.jsx)(W.x,{className:(0,d.Z)("sm:items-end !items-start",B&&"cursor-pointer hover:opacity-80"),decimal:!I.displayAmountsWithoutDecimals,value:u.amount,fullValue:t.calculateInitialValue(u).amount,description:q,unit:B&&!w&&(null==i?void 0:i.translations.name)?void 0:a.unit,loyalty:ee,loyaltyStyle:{color:null==r?void 0:r.color},hideFullValue:N,discountPercentage:T,fullValueClassName:"text-property-body2 sm:text-property-body3 mb-[5px] sm:mb-[1px]",discountClassName:"h-5 sm:h-4 flex items-center bg-property-primary-main border-none text-property-body2 sm:text-[0.625rem] text-primary-contrast !leading-[1.8513rem] sm:leading-[0.8513rem] px-[5px] sm:px-[4px] ml-2.5 mb-1 sm:mb-0",showDiscount:I.showEngineDiscount,shortenNumber:!0,suffix:$}),C?(0,s.jsxs)("div",{className:(0,d.Z)("text-property-body3 sm:text-property-body2-sm text-gray-200 mt-3 sm:mt-1.5 text-left leading-3"),children:[(0,z.s)(O.amount)," ",L," / ",a.night]}):null]}),(null==m?void 0:m.amount)&&i&&V&&!w?(0,s.jsxs)("div",{className:"flex flex-col",onClick:V?f:void 0,children:[(0,s.jsx)(W.x,{className:(0,d.Z)("sm:items-end !items-start",V&&"cursor-pointer hover:opacity-80"),decimal
1:!I.displayAmountsWithoutDecimals,value:m.amount,description:i.translations.name,loyalty:!0,loyaltyStyle:{color:null==r?void 0:r.color},loyaltyRegisterMessage:S.formatMessage(J.register),shortenNumber:!0}),C?(0,s.jsxs)("div",{className:(0,d.Z)("text-property-body3 sm:text-property-body2-sm text-gray-200 mt-3 sm:mt-1.5 text-left leading-3"),children:[(0,z.s)(_.amount)," ",F," / ",a.night]}):null]}):null]})]}),D?(0,s.jsx)("div",{className:(0,d.Z)("text-gray-300 sm:text-property-subtitle1-sm flex items-start justify-start w-1/3"),children:D}):null]}),!E&&(Y||X)?(0,s.jsxs)("div",{className:"text-gray-300 text-property-subtitle2 sm:text-property-subtitle1-sm flex flex-col gap-2",children:[Y?(0,s.jsxs)("div",{className:"flex items-center sm:justify-end whitespace-nowrap",children:[(0,s.jsx)("span",{className:"h-4 w-4 mr-2",children:(0,s.jsx)(o.nQ,{})}),a.cancellationMessage,": ",x]}):null,X?(0,s.jsxs)("div",{className:"flex items-center sm:justify-end",children:[(0,s.jsx)("span",{className:"h-4 w-4 mr-2",children:(0,s.jsx)(o._K,{})}),X]}):null]}):null,(0,s.jsxs)("div",{className:(0,d.Z)("flex gap-4 w-full justify-between mt-auto"),children:[!k&&(0,s.jsx)(o.Ph,{className:"w-[140px] sm:h-8 grow sm:grow-0",selectClassName:"!text-property-body3 sm:!text-property-body3-sm flex items-center py-1 sm:py-2 h-full",options:y,defaultValue:String(M)||y[0].id,onChange:h}),(0,s.jsx)(o.zx,{className:"px-5 h-10 sm:h-8 grow sm:grow-0",variant:"primary",label:a.continue,onClick:G,isLoading:K,disabled:H})]})]})},ee=e=>{var t;let{id:a,images:n,title:r,description:m,tags:u,stayDuration:p,inventoryGroups:x,status:y,restriction:h,loyaltyStatus:v,tier:f,user:j,brand:N,taxations:k,taxationRates:C,taxShowConfig:w,hideOriginalPrice:T=!1,navigating:E=!1,className:S,onPriceClick:I,onBookClick:O,onShowRoomDetails:L,propertyTicker:_="",priceCalendar:W,defaultCurrency:Q,depositRequiredTextConfiguration:z,depositNotRequiredTextConfiguration:J,numberOfRoomsLeftLimit:ee,availabilityMap:et,bundlingMultiplier:ea,onTaxationContainerSizeChange:en,showInventoryPriceDiff:ei=!1,displayAmountsWithoutDecimals:es=!1,isLuminanceOK:er=!0}=e,[eo,el]=(0,l.useState)(""),[ec,ed]=(0,l.useState)(""),[em,eu]=(0,l.useState)(!1),[ep,ex]=(0,l.useState)(1),[ey,eh]=(0,l.useState)(!1),[ev,ef]=(0,l.useState)(!1),eg=(0,l.useRef)(null),eb=(0,b.Z)(),{restrictionMessage:ej,MessageIcon:eN,bookableStatusText:ek}=(0,M.XV)({bookableRestriction:h,bookableStatus:y}),{openDialog:eC,isWaitingListEnabled:eP}=(0,D.c)(),{getEngineConfiguration:ew}=(0,V.c)(),eT=(0,l.useMemo)(()=>ew(_).showCancellationRestrictions,[ew,_]),[eM]=(0,R.ux)(e=>[e.currency,e.currencyExchangeRates]),eA=(0,R.kj)(e=>e.visualConfiguration.showEngineDiscount),eE=(0,R.kj)(e=>e.visualConfiguration.disableUnitSelection);if(!eM)throw Error("Currency must be defined, either by passing the prop directly or by using the active currency");let eD=(0,l.useMemo)(()=>{var e,t;return null!==(t=null===(e=eb.formatNumberToParts(1,{style:"currency",currency:eM}).find(e=>"currency"===e.type))||void 0===e?void 0:e.value)&&void 0!==t?t:eM},[eM,eb]),eS=(0,l.useMemo)(()=>x.flatMap(e=>e.priceOptions),[x]),eI=(0,l.useMemo)(()=>{var e,t;return null!==(t=eS.find(e=>e.inventory.isAvailable()))&&void 0!==t?t:null===(e=x[0])||void 0===e?void 0:e.priceOptions[0]},[eS,x]),{selectedPriceOption:eR,selectedInventoryGroup:eO}=(0,l.useMemo)(()=>{if(!eo||!ec)return{selectedPriceOption:eI,selectedInventoryGroup:x[0]};let e=eS.find(e=>e.inventory.mealPlan.ticker===eo&&e.inventory.condition.ticker===ec&&e.inventory.isAvailable());if(e){let t=x.find(t=>t.priceOptions.some(t=>t===e));return{selectedPriceOption:e,selectedInventoryGroup:t||x[0]}}return{selectedPriceOption:eI,selectedInventoryGroup:x[0]}},[eI,eo,ec,eS,x]),eL=(0,l.useMemo)(()=>{if(!eR||!eA)return;let e=eR.inventory.calculateDiscountPercentage();return e>0?e:void 0},[eR,eA]),e_=(0,l.useMemo)(()=>eP(_)&&(null==eR?void 0:eR.inventory.accommodation.isUnavailable()),[eP,_,eR]),eF=(0,l.useMemo)(()=>{var e;let t=(null==eR?void 0:null===(e=eR.inventory)||void 0===e?void 0:e.availability)||0;if(t<=0||t>ee)return null;let a=1===t?(0,s.jsx)(P.Z,{...g.i4.lastAvailable}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(P.Z,{...g.i4.lastQuantityAvailable,values:{units:t}})," ".concat(t,"!")]});return(0,s.jsx)("div",{className:"flex items-center text-property-body3 sm:text-property-body3-sm bg-red-25 text-black rounded px-2 py-1.5 ml-auto mb-6",children:a})},[null==eR?void 0:null===(t=eR.inventory)||void 0===t?void 0:t.availability,ee]),eZ=(0,G.y)({roomDenomination:(null==eR?void 0:eR.inventory.accommodation.roomDenomination)||"ROOMS",depositRequiredTextConfiguration:z,depositNotRequiredTextConfiguration:J}),eU=(0,l.useMemo)(()=>
1{if(eR)return eR.inventory.totalRate},[eR]),eG=(0,l.useMemo)(()=>{if(null==eR?void 0:eR.loyaltyRate)return eR.loyaltyRate},[eR]),eB=(0,B.k)({selectedInventory:eR.inventory,inventoryGroup:eO,availabilityMap:et,messages:{roomDenominationTypeLabelSingular:eZ.roomDenominationTypeLabelSingular,roomDenominationTypeLabel:eZ.roomDenominationTypeLabel}}),eV=(0,l.useCallback)(()=>{eC({propertyTicker:_,accommodationTicker:eR.inventory.accommodation.ticker,bundleTicker:"",name:r,multimedia:eR.inventory.accommodation.media[0]})},[eC,_,eR.inventory.accommodation.media,eR.inventory.accommodation.ticker,r]),eY=(0,l.useCallback)(e=>{ex(parseInt(e.target.value,10))},[]),eX=(0,l.useCallback)(()=>O(eR.inventory,ep),[O,eR.inventory,ep]),eK=(0,l.useCallback)(()=>{I()},[I]);(0,l.useEffect)(()=>{eg.current&&en&&en(Math.round(eg.current.getBoundingClientRect().height))},[en,k]),(0,l.useEffect)(()=>{x.length>0&&!eo&&eI&&(el(eI.inventory.mealPlan.ticker),ed(eI.inventory.condition.ticker))},[eI,x,eo]);let eH=(0,l.useCallback)(e=>{el(e);let t=[...new Set(x.flatMap(e=>e.priceOptions).filter(t=>t.inventory.mealPlan.ticker===e&&t.inventory.status===c.Ux9.AVAILABLE).map(e=>e.inventory.condition.ticker))];!(ec&&t.includes(ec))&&t.length>0&&ed(t[0])},[x,ec]),eq=(0,l.useCallback)(e=>{ed(e)},[]),{mealPlanOptions:eW,conditionOptions:eQ}=(0,l.useMemo)(()=>{var e,t;let a=eS.filter(e=>e.inventory.isAvailable()),n=eo&&ec&&null!==(t=null===(e=a.find(e=>e.inventory.mealPlan.ticker===eo&&e.inventory.condition.ticker===ec))||void 0===e?void 0:e.inventory.totalRate.amount)&&void 0!==t?t:0,i=[],s=[];
1return eS.forEach(e=>{let t=e.inventory.mealPlan,r=e.inventory.condition,o=e.inventory.mealPlan.ticker===eo,l=a.filter(e=>e.inventory.mealPlan.ticker===t.ticker);if(l.length>0&&!i.find(e=>e.ticker===t.ticker)){let e=ec?l.find(e=>e.inventory.condition.ticker===ec):void 0,a=(null!=e?e:l.reduce((e,t)=>t.inventory.totalRate.amount<e.inventory.totalRate.amount?t:e)).inventory.totalRate.amount;i.push({ticker:t.ticker,name:t.name,priceDifference:n>0?a-n:0})}o&&!s.find(e=>e.ticker===r.ticker)&&e.inventory.status===c.Ux9.AVAILABLE&&s.push({ticker:r.ticker,name:e.inventory.getConditionName(),priceDifference:n>0?e.inventory.totalRate.amount-n:0,freeCancellationDate:eT?e.freeCancellationMaxDate:void 0})}),{mealPlanOptions:i,conditionOptions:s}},[eS,eo,ec,eT]),ez=(0,l.useCallback)(()=>{eu(!0)},[]),eJ=(0,l.useCallback)(()=>{eu(!1)},[]),e$=(0,l.useCallback)(()=>{eh(e=>!e)},[]),e0=(0,l.useCallback)(()=>{ef(e=>!e)},[]),e1=(0,l.useMemo)(()=>Object.values(x.flatMap(e=>e.priceOptions.map(e=>e.inventory.mealPlan)).filter(e=>e.hasDescription()).reduce((e,t)=>({...e,[t.ticker]:t}),{})),[x]),e4=y===c.Ux9.AVAILABLE,e2=(0,l.useCallback)(()=>{L(a)},[L,a]);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("div",{className:(0,d.Z)("h-full flex flex-col items-stretch justify-between border border-gray-100 rounded-card",S),children:[(0,s.jsx)(c.jDe,{id:a,layout:"vertical",images:n,discountPercentage:eL,title:r,textDescription:m,tags:u,onShowDetail:e2,isAvailable:e4,isUnavailable:!e4,isWaitingListEnabled:e_,textUnavailable:eb.formatMessage(g.i4.soldOut),bundlingMultiplier:ea,subtitleMessage:(0,s.jsx)("div",{className:"pb-4 border-b border-gray-50 flex-1",children:(0,s.jsx)(q,{inventoryGroups:x,stayDuration:p,status:y,restrictionMessage:ej,MessageIcon:eN,isLuminanceOK:er})}),isRoomOffer:!0,contentClassName:"!pb-0 px-4",children:(0,s.jsx)(H,{onShowRoomDetails:e2,onShowAvailability:ez,selectedInventoryGroup:eO})}),e4&&x.length>0&&(0,s.jsx)("div",{className:"px-4 pb-4",children:(0,s.jsx)(K,{type:i.MEAL_PLAN,options:eW,selectedTicker:eo,onChange:eH,onInfoClick:e0,hasMealPlanDescriptions:e1.length>0,stayDuration:p,showInventoryPriceDiff:ei,displayAmountsWithoutDecimals:es,currencySymbol:eD,isLuminanceOK:er})}),e4&&x.length>0&&(0,s.jsx)("div",{className:"px-4 pb-4",children:(0,s.jsx)(K,{type:i.CANCELLATION_POLICY,options:eQ,selectedTicker:ec,onChange:eq,onInfoClick:e$,stayDuration:p,showInventoryPriceDiff:ei,displayAmountsWithoutDecimals:es,currencySymbol:eD,isLuminanceOK:er})}),(0,s.jsx)("div",{className:"mx-4 pt-4 border-t border-gray-50",children:e4&&eU?(0,s.jsx)($,{messages:eZ,loyaltyStatus:v,brand:N,tier:f,nights:p,inventory:eR.inventory,totalRate:eU,loyaltyRate:eG,inventoryAvailabilityOptions:eB,handleOnQuantityChange:eY,onAddToCart:eX,navigating:E,onPriceClick:eK,hideOriginalPrice:T,disableUnitSelection:eE,showEnginePrices:!0,user:j,isBundle:!1,bundlingMultiplier:null==eO?void 0:eO.bundlingMultiplier,className:"!items-start pb-6",isDepositMessageOnTop:!0,badge:eF}):(0,s.jsxs)("div",{className:"flex flex-col gap4 mb-6",children:[(0,s.jsx)("div",{className:"py-6",children:(0,s.jsx)(q,{inventoryGroups:x,stayDuration:p,status:y,restrictionMessage:ej,MessageIcon:eN})}),(0,s.jsxs)("div",{className:"flex flex-row justify-between gap-4",children:[e_?(0,s.jsx)(o.Vp,{className:"!px-5 text-gray-300 border-gray-300 text-property-button-sm sm:text-property-button-sm uppercase",label:(0,s.jsx)(P.Z,{...Y.O.receiveNotice}),onClick:eV,outlined:!0}):(0,s.jsx)(o.Vp,{className:"!px-5 text-gray-300 border-gray-300 text-property-button-sm sm:text-property-button-sm uppercase",label:ek,outlined:!0}),(0,s.jsx)(o.zx,{label:(0,s.jsx)(P.Z,{...g.i4.viewCalendar}),onClick:ez,isLoading:!1,disabled:!1})]})]})}),_&&W&&Q&&em&&eR&&(0,s.jsx)(F.xP,{title:eR.inventory.accommodation.name,hotelId:_,equalFilter:[eR.inventory.ticker],mealPlanText:eR.inventory.mealPlan.name,occupancyText:eR.inventory.configuration.name,conditionText:eR.inventory.getConditionName(),priceVisibility:W,onSubmit:eJ,onToggle:eJ,defaultCurrency:Q,isWaitingListEnabled:e_,onWaitingListClick:eV}),eR&&(0,s.jsx)(o.dK,{title:eb.formatMessage(g.i4.cancellationPolicies),open:ey,onToggleDialog:e$,contentClassName:"!overflow-auto",children:x.map((e,t)=>{var a,n,i,r,l,c,d,m;return(0,s.jsx)(o.UQ,{styles:X.JD,removeBorders:!0,defaultExpanded:e===eO,summary:(0,s.jsx)(o.xv,{variant:"body1",children:(0,s.jsx)("span",{className:"font-bold",children:e.primaryLabel})}),details:(0,s.jsx)(Z.nD,{type:Z.dY.CANCELLATION_POLICY_TARGET_INVENTORY,cancellationPolicyDesc:null===(i=e.priceOptions[0])||void 0===i?void 0:null===(n=i.inventory.condition.cancellationPolicies)||void 0===n?void 0:null===(a=n[0])||void 0===a?void 0:a.description,penaltyBrackets:(null===(c=e.priceOptions[0])||void 0===c?void 0:null===(l=c.inventory.condition.cancellationPolicies)||void 0===l?void 0:null===(r=l[0])||void 0===r?void 0:r.penaltyBrackets)||[],...null===(d=e.priceOptions[0])||void 0===d?void 0:d.inventory.condition,childrenPolicy:null===(m=e.priceOptions[0])||void 0===m?void 0:m.inventory.condition.children,propertyTicker:_||"",taxShowConfig:w,rooms:ep})},t)})}),(0,s.jsx)(o.dK,{open:ev,onToggleDialog:e0,contentClassName:"!overflow-auto",children:(0,s.jsx)(U.j,{mealPlans:e1})})]}),k&&k.length>0&&(0,s.jsxs)("div",{className:"absolute",ref:eg,children:[(null==j?void 0:j.userType)===c.FWD.AGENCY&&y===c.Ux9.AVAILABLE&&(0,s.jsxs)("span",{className:"text-gray-200 text-property-body3-sm",children:["*",null==f?void 0:f.translations.highlightedNameTop," ",null==f?void 0:f.translations.highlightedNameBottom," |\xa0"]}),(0,s.jsx)(A.Uu,{taxations:k,taxShowConfig:w,taxationRates:C})]})]})};var et=a(55990),ea=a(15237),en=a(20583);function ei(e){var t,a,n;let{inventoryGroup:i,bookableEntity:l,bookButton:d,brand:m,unitMessage:u,textDescription:p,showEngineDiscount:x,inventoryTicker:y,availability:h,showDescription:v=!0,showTags:f=!0,priceDivisor:g=1}=e,b=i.status,j=null==l?void 0:l.getRestriction();if(!l)throw Error("Inventory can not be null");return{id:l.ticker,inventoryTicker:y,bookButton:d,images:l.media.map((e,t)=>{var a;return(0,s.jsx)(o.t3,{sizes:["(min-width: 768px) 1000px","500px"],src:e.url,alt:null!==(a=e.title)&&void 0!==a?a:"room-".concat(t+1),className:"w-full h-full object-cover relative",loadingStrategy:0===t?"eager":"lazy"},e.url)}),layout:"horizontal",bookableStatus:(0,r.hj)(h)&&h<1?c.Ux9.UNAVAILABLE:b,bookableRestriction:j,prices:{club:(null===(t=i.loyaltyRate)||void 0===t?void 0:t.amount)?i.loyaltyRate.amount/g:void 0,clubText:null==m?void 0:m.translations.name,unit:u,initial:C.Xr.calculateInventoryGroupAmount(i).amount/g,total:i.totalRate.amount/g},tags:f&&null!==(a=l.tags)&&void 0!==a?a:[],title:l.name,inventoryGroup:i,disabled:null!==(n=(0,r.hj)(h)&&h<1)&&void 0!==n?n:l.isUnavailable(),description:v?(0,s.jsx)(w.V,{html:l.description||""}):(0,s.jsx)(s.Fragment,{}),textDescription:p,discountPercentage:i.discountPercentage>0&&x?i.discountPercentage:void 0,isAvailable:(!(0,r.hj)(h)||!(h<1))&&l.isAvailable(),availability:h}}function es(e){var t;let a=(0,b.Z)(),{message:n,restrictionMessage:i,MessageIcon:r}=(0,M.XV)({bookableRestriction:e.bookableRestriction,bookableStatus:e.bookableStatus}),{propertyTicker:o}=I(),{isWaitingListEnabled:d}=(0,D.c)(),m=(0,l.useMemo)(()=>d(o),[d,o]),u=(0,l.useMemo)(()=>(0,s.jsx)(P.Z,{...g.i4.soldOut}),[]),p="".concat(e.inventoryGroup.bundlingMultiplier||""," ").concat(a.formatMessage(g.sK[e.inventoryGroup.accommodation.roomDenomination])," | ").concat((null===(t=e.inventoryGroup.groups[0])||void 0===t?void 0:t.secondaryLabel)||""," ");return(0,s.jsx)(c.jDe,{...e,message:n,restrictionMessage:i,MessageIcon:r,bundlingMultiplier:e.inventoryGroup.bundlingMultiplier,bundlingMessage:p,textUnavailable:u,isWaitingListEnabled:m,isUnavailable:e.inventoryGroup.accommodation.isUnavailable(),children:e.children})}function er(e){var t;let{room:a,loyaltyStatus:n,tier:i,onPriceClick:r,onGoToRoomPage:o,navigating:c,hideOriginalPrice
1:d,user:m,showButtonWhenUnavailable:u}=e,{bookableStatusText:p}=(0,M.XV)({bookableRestriction:a.bookableRestriction,bookableStatus:a.bookableStatus}),x=!!a.inventoryGroup.parentBundle,{propertyTicker:y}=I(),{openDialog:h,isWaitingListEnabled:v}=(0,D.c)(),f=(0,l.useMemo)(()=>v(y)&&a.inventoryGroup.accommodation.isUnavailable(),[v,y,a.inventoryGroup.accommodation]),g=(0,l.useCallback)(()=>{let e=a.inventoryGroup.parentBundle,t=e?void 0:a.inventoryGroup.accommodation.ticker,n=e?e.ticker:void 0,i=e?e.media[0]:a.inventoryGroup.accommodation.media[0];h({propertyTicker:y,accommodationTicker:t,bundleTicker:n,name:a.title,multimedia:i})},[h,y,a.inventoryGroup.accommodation.media,a.inventoryGroup.accommodation.ticker,a.inventoryGroup.parentBundle,a.title]);return(0,s.jsx)(T.q,{bookableTicker:a.inventoryGroup.accommodation.ticker,bookableBundle:x?null===(t=a.inventoryGroup.parentBundle)||void 0===t?void 0:t.ticker:void 0,bookableStatus:a.bookableStatus,bookableRate:a.prices.total,bookableFullRate:a.prices.initial,bookableLoyaltyRate:a.prices.club,bookableRateUnit:a.prices.unit,bookableLoyaltyRateDescription:a.prices.clubText,bookableStatusText:p,loyaltyStatus:n,tier:i,bookButton:a.bookButton,showButtonWhenUnavailable:u,onPriceClick:r,onCTAClick:o,navigating:c,hideOriginalPrice:d,user:m,isBundle:x,showWaitingListButton:f,onWaitingListClick:g})}let eo=e=>{let{inventoryGroups:t,brand:a,loading:n,loyaltyStatus:i,tier:r,loyaltyLoginLink:m,hideOriginalPrice:u,taxShowConfig:p,taxations:x,accommodationResultsFormat:h,fullWidth:v,user:f,guestQuantities:j,roomIndex:N,onRoomClick:k,propertyTicker:P,priceCalendar:T,defaultCurrency:M,depositRequiredTextConfiguration:D,depositNotRequiredTextConfiguration:S,numberOfRoomsLeftLimit:I,availabilityMap:L,availableExtras:F,availablePaymentMethods:Z,showExtrasConfiguration:U,showMandatoryExtras:G,onLoyaltyToggle:B,showSavingsAmount:V,allowMultipleMealPlans:Y,showInventoryPriceDiff:X,displayAmountsWithoutDecimals:K,isLuminanceOK:H}=e,q=(0,b.Z)(),[W,Q]=(0,l.useState)(!1),[z,J]=(0,l.useState)(void 0),$=(0,l.useCallback)(()=>J(void 0),[]),[eo,el]=(0,l.useState)(!1),[ec,ed]=(0,l.useState)(0),em=(0,R.kj)(e=>e.visualConfiguration),eu=(0,R.JD)(e=>e.setAriRequest),ep=(0,R.JD)(e=>e.ariRequest),ex=(0,R.JD)(e=>e.setSplitAssistStages),ey=(0,R.JD)(e=>e.assistedModeActive),[eh,ev]=(0,l.useState)(h),{handleAddCartItem:ef,dialogs:eg}=(0,en.S)({propertyTicker:P||"",loyaltyStatus:i,availableExtras:F||[],availablePaymentMethods:Z||[],showExtrasConfiguration:U||c.Ce4.HIDE_EXTRAS_BEFORE_CHECKOUT,showMandatoryExtras:G||!1,taxations:x,taxShowConfig:p||c.U9u.IGNORE,setNavigating:Q,brand:a,tier:r,loyaltyLoginLink:m,showSavingsAmount:V,onLoyaltyToggle:B,allowMultipleMealPlans:Y||!1}),eb=(0,l.useCallback)(async(e,t)=>{Q(!0),k&&await k(e,t),Q(!1)},[k]),ej=(0,l.useCallback)((e,t,a,n,i,s)=>{eu(ep.copy({guestQuantities:[j[0],j[0]],start:new Date(a),end:new Date(n)})),ex([{ticker:e,start:new Date(a),end:new Date(n)},{ticker:t,start:new Date(i),end:new Date(s)}])},[ep,j,eu,ex]),eN=(0,l.useCallback)(e=>{el(e)},[]),ek=i===c.wcI.ACTIVE_BY_LOGGED_USER,eC=(0,l.useCallback)(()=>{if(!ek&&m){window.location.href=m;return}(null==r?void 0:r.translations.benefitDescription)&&eN(!0)},[eN,ek,m,null==r?void 0:r.translations.benefitDescription]),eP=(0,l.useCallback)(e=>{e>ec&&ed(e)},[ec]),ew=(0,l.useMemo)(()=>t.map(e=>{let t=e.type===C.xH.BUNDLE?e.parentBundle:e.accommodation;return ei({inventoryGroup:e,bookableEntity:t,bookButton:q.formatMessage(g.i4.view),brand:a,unitMessage:q.formatMessage(g.i4.night),textDescription:(0,s.jsx)(w.V,{html:(null==t?void 0:t.shortTextDescription)||""}),showEngineDiscount:em.showEngineDiscount,showDescription:!0})}),[t,q,a,em.showEngineDiscount]);(0,l.useEffect)(()=>{h!==eh&&ev(h)},[h]),(0,l.useEffect)(()=>{h===E.x.UNIFIED&&(ey||0===ew.length||ew.some(e=>e.inventoryGroup.parentBundle||e.inventoryGroup.type===C.xH.SPLIT_STAY)?ev(E.x.GRID):ev(E.x.UNIFIED))},[ew,eh,ey,h]);let eT=(0,l.useCallback)(e=>{ew&&(y.q.clicked(),J(ew.find(t=>t.id===e)))},[ew]),eM=ew.some(e=>{var t;return(null===(t=e.tags)||void 0===t?void 0:t.length)&&e.isAvailable}),eA=(0,l.useMemo)(()=>{switch(eh){case E.x.UNIFIED:return"grid gap-x-8";case E.x.GRID:return"grid gap-5 sm:gap-8 md:gap-7 lg:gap-8";case E.x.LIST:return"flex flex-col gap-5 sm:gap-8 md:gap-7 lg:gap-8";case E.x.AUTO:return""}},[eh]);return(0,s.jsxs)("div",{className:(0,d.Z)(eA,v?"lg:grid-cols-3":"lg:grid-cols-2"),style:{rowGap:eh===E.x.UNIFIED?ec+24:void 0,marginBottom:eh===E.x.UNIFIED?ec+8:void 0},children:[z?(0,s.jsx)(o.W2,{closeDialog:$,images:z.images,title:z.title,de
1scription:z.description,messages:{close:q.formatMessage(g.i4.close)},tags:z.tags.map(e=>e.label)}):null,(0,s.jsx)(o.dK,{open:eo,onToggleDialog:eN,paddingless:!0,contentClassName:"sm:!max-w-fit !overflow-auto",embeddedCloseButton:!0,fullHeight:!0,children:(0,s.jsx)(w.V,{className:"sm:h-auto h-screen flex items-center",as:"div",html:(null==r?void 0:r.translations.benefitDescription)||""})}),n?Array.from({length:3}).map((e,t)=>(0,s.jsxs)("div",{className:"opacity-40",children:[(0,s.jsx)(c.I1M,{layout:"vertical",className:"lg:hidden"}),(0,s.jsx)(c.I1M,{layout:eh===E.x.GRID?"vertical":"horizontal",className:"hidden lg:flex"})]},t)):null,n||eh!==E.x.UNIFIED?null:ew.map(e=>{var t,n,o,l;let c=e.inventoryGroup.parentBundle?"".concat(null===(t=e.inventoryGroup.parentBundle)||void 0===t?void 0:t.ticker,"_"):"",d=null!==(l=null===(n=e.inventoryGroup.parentBundle)||void 0===n?void 0:n.taxationRates)&&void 0!==l?l:e.inventoryGroup.accommodation.taxationRates;return 0===e.inventoryGroup.groups.length?null:(0,s.jsx)(ee,{id:e.inventoryGroup.accommodation.ticker,images:e.images,title:e.title,description:e.textDescription,tags:e.tags,guestInfo:(null===(o=e.inventoryGroup.groups[0])||void 0===o?void 0:o.secondaryLabel)||"",stayDuration:ep.nights,inventoryGroups:e.inventoryGroup.groups,status:e.bookableStatus,restriction:e.bookableRestriction,loyaltyStatus:i,tier:r,user:f,taxations:x,taxationRates:d,taxShowConfig:p,hideOriginalPrice:u,showButtonWhenUnavailable:!0,navigating:W,onPriceClick:eC,onBookClick:ef,onShowRoomDetails:eT,propertyTicker:P,priceCalendar:T,defaultCurrency:M||"EUR",brand:a,depositRequiredTextConfiguration:D||et.h.NO_TEXT,depositNotRequiredTextConfiguration:S||ea.k.NO_TEXT,numberOfRoomsLeftLimit:I||0,availabilityMap:L||{},bundlingMultiplier:e.inventoryGroup.bundlingMultiplier,onTaxationContainerSizeChange:eP,showInventoryPriceDiff:X,displayAmountsWithoutDecimals:K,isLuminanceOK:H},"".concat(c).concat(e.inventoryGroup.accommodation.ticker))}),n||eh===E.x.UNIFIED?null:ew.map(e=>{var t,a,n;let o=e.inventoryGroup.parentBundle?"".concat(null===(t=e.inventoryGroup.parentBundle)||void 0===t?void 0:t.ticker,"_"):"",l=null!==(n=null===(a=e.inventoryGroup.parentBundle)||void 0===a?void 0:a.taxationRates)&&void 0!==n?n:e.inventoryGroup.accommodation.taxationRates;return e.inventoryGroup.type===C.xH.SPLIT_STAY?(0,s.jsx)(_,{splitStay:e.inventoryGroup,room:e,loyaltyStatus:i,tier:r,onPriceClick:eC,navigating:W,hideOriginalPrice:u,user:f,accommodationResultsFormat:eh,handleLaunchSplitStayAssist:ej,splitStayMessage:q.formatMessage(g.i4.availableWithRoomChange),discountPercentage:e.discountPercentage,taxShowConfig:p,taxations:x,onShowDetail:eT},o):(0,s.jsxs)("div",{children:[(0,s.jsx)(es,{...e,layout:"vertical",className:"lg:hidden",onShowDetail:eT,guestQuantities:j,roomIndex:N,children:(0,s.jsx)(er,{room:e,loyaltyStatus:i,tier:r,onPriceClick:eC,onGoToRoomPage:eb,navigating:W,hideOriginalPrice:u,user:f})}),(0,s.jsx)(es,{...e,layout:eh===E.x.GRID?"vertical":"horizontal",className:(0,d.Z)("hidden lg:flex",eh===E.x.GRID&&(eM?"sm:h-[calc(100%-48px)] sm:!m
1in-h-[482px]":"sm:h-[calc(100%-48px)] sm:!min-h-[462px]")),onShowDetail:eT,guestQuantities:j,roomIndex:N,children:(0,s.jsx)(er,{room:e,loyaltyStatus:i,tier:r,onPriceClick:eC,onGoToRoomPage:eb,navigating:W,hideOriginalPrice:u,user:f})}),(0,s.jsxs)("span",{className:"inline-block text-gray-200 mt-2",children:[(null==f?void 0:f.userType)===c.FWD.AGENCY&&e.bookableStatus===c.Ux9.AVAILABLE&&(0,s.jsxs)("span",{className:"text-property-body3-sm",children:["*",null==r?void 0:r.translations.highlightedNameTop," ",null==r?void 0:r.translations.highlightedNameBottom," |\xa0"]}),e.bookableStatus===c.Ux9.AVAILABLE&&e.inventoryGroup.bundlingMultiplier&&(0,s.jsx)(O,{priceMessage:q.formatMessage(g.i4.priceFor),bundlingMultiplier:e.inventoryGroup.bundlingMultiplier,roomDenomination:q.formatMessage(g.sK[e.inventoryGroup.accommodation.roomDenomination]),guestsMessage:q.formatMessage(g.i4.guests),guestsNumber:j[N].calculateTotalGuests()}),e.bookableStatus===c.Ux9.AVAILABLE&&e.inventoryGroup.bundlingMultiplier&&p===c.U9u.INCLUDE&&(0,s.jsx)("span",{className:"text-gray-200 text-property-body3-sm",children:" |\xa0"}),(0,s.jsx)(A.Uu,{taxShowConfig:p,taxations:x,taxationRates:l})]})]},"".concat(o).concat(e.inventoryGroup.accommodation.ticker))}),eg]})},el=e=>{let{title:t,onBackClick:a,showBackButton:n=!0,titleClassName:i,className:r,onClick:l}=e;return(0,s.jsxs)("div",{className:(0,d.Z)("flex flex-row justify-start items-center py-5 sm:p-0 relative sm:gap-9",r),onClick:l,children:[(0,s.jsx)("div",{className:(0,d.Z)("absolute sm:relative left-5 sm:left-0 w-3 text-gray-100 cursor-pointer",!n&&"hidden"),onClick:a,children:(0,s.jsx)(o.wy,{})}),(0,s.jsx)(o.xv,{variant:"pageTitle",className:(0,d.Z)("pl-10 pr-10 sm:pl-0 sm:pr-0 flex-auto text-center sm:text-left",i),bold:!0,children:t})]})}},76305:function(e,t,a){a.d(t,{j:function(){return l}});var n=a(31549),i=a(14517),s=a(622),r=a(36582),o=a(35490);function l(e){let{mealPlans:t,className:a}=e,l=t.filter(e=>e.hasDescription());return l.length?(0,n.jsxs)("div",{className:(0,i.Z)("MealPlanDescriptionList",a),children:[(0,n.jsx)(s.xv,{variant:"h1",children:(0,n.jsx)(r.Z,{...o.i4.mealPlans})}),(0,n.jsx)("div",{className:"mt-8 flex flex-col gap-8",children:l.map(e=>{var t;return(0,n.jsxs)("div",{children:[(0,n.jsx)(s.xv,{variant:"h3",children:e.name}),(0,n.jsx)(s.xv,{variant:"body2",className:"mt-1",children:(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:null!==(t=e.description)&&void 0!==t?t:""}})})]},"meal-plan-description"+e.ticker)})})]}):null}},49686:function(e,t,a){a.d(t,{f:function(){return l}});var n=a(31549),i=a(14517),s=a(33406),r=a(17259);let o=e=>{let{messages:t,className:a,position:o}=e;return null==t?void 0:t.map(e=>{var t;let l=(null===(t=e.content)||void 0===t?void 0:t.indexOf("<img"))>0,c=o===s.Qyf.TOP_INVENTORY_STEP_1||o===s.Qyf.CONFIRMATION_PAGE;return(0,n.jsx)("div",{className:(0,i.Z)("!leading-5 sm:w-full",l?"pb-5 sm:pb-0 p-0":"border border-gray-300 rounded-card py-2 px-4 sm:p-2.5",a),children:(0,n.jsx)(r.V,{className:(0,i.Z)("text-property-body1 text-gray-300",c?"sm:text-center":""),html:e.content})},e.id)})};function l(e){let{messages:t,position:a,className:r,containerClassName:l}=e;return t&&a===s.Qyf.TOP_INVENTORY_STEP_1?(0,n.jsx)("div",{className:"flex flex-col mb-5 sm:mb-0",children:o({messages:t,position:a,className:r})}):(0,n.jsx)("div",{className:(0,i.Z)(l,"flex flex-col mt-4 sm:gap-4 gap-5"),children:o({messages:t,position:a,className:r})})}},40569:function(e,t,a){a.d(t,{w:function(){return n}});let n=(0,a(19694).vU)({title:{id:"participantsForm.title",description:"title",defaultMessage:"Participants"},firstName:{id:"participantsForm.firstName",description:"firstName",defaultMessage:"First name"},lastName:{id:"shared.customerFormMessages.lastName",description:"lastName",defaultMessage:"Last name"},birthDate:{id:"participantsForm.birthDate",description:"birthDate",defaultMessage:"Date of birth"},guestsTitle:{id:"participantsForm.guestsTitle",description:"guestsTitle",defaultMessage:"Guest details"},roomLabel:{id:"participantsForm.roomLabel",description:"roomLabel",defaultMessage:"Room {number}"},useHolderData:{id:"participantsForm.useHolderData",description:"useHolderData",defaultMessage:"Use the booking holder's details for {guestLabel}"},submit:{id:"shared.common.save",description:"save",defaultMessage:"Save"}})},77806:function(e,t,a){a.d(t,{h:function(){return n}});let n=(0,a(19694).vU)({title:{id:"component.unitSelection.title",defaultMessage:"\xbfQuieres elegir tu habitaci\xf3n?"}
1,subjectToAvailability:{id:"component.unitSelection.subjectToAvailability",defaultMessage:"*sujeto a disponibilidad."},selectUnit:{id:"component.unitSelection.selectUnit",defaultMessage:"Elegir habitaci\xf3n"},selectedTitle:{id:"component.unitSelection.selectedTitle",defaultMessage:"Habitaci\xf3n seleccionada"},selectedUnit:{id:"component.unitSelection.selectedUnit",defaultMessage:"Habitaci\xf3n {unitNum}"},changeSelection:{id:"component.unitSelection.changeSelection",defaultMessage:"Cambiar habitaci\xf3n"},loadingMap:{id:"component.unitSelection.loadingMap",defaultMessage:"Cargando mapa..."},errorLoadingMap:{id:"component.unitSelection.errorLoadingMap",defaultMessage:"Error al cargar el mapa"},selectedComment:{id:"component.unitSelection.selectedComment",defaultMessage:"{denomination} selected: {unitNum}"}})},35346:function(e,t,a){a.d(t,{S:function(){return s}});var n=a(31549);a(44194);var i=a(622);function s(e){let{title:t,message:a,icon:s,color:r}=e;return(0,n.jsxs)("div",{className:"flex gap-6 px-6 pb-10",children:[(0,n.jsx)("div",{className:"".concat(r||"text-red-100"," w-6 h-6 grow-0 shrink-0 mt-1"),children:s}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.xv,{variant:"h1",children:t}),(0,n.jsx)(i.xv,{variant:"body2",className:"mt-4",children:a})]})]})}},20583:function(e,t,a){a.d(t,{S:function(){return N}});var n=a(31549),i=a(44194),s=a(37497),r=a(33406),o=a(21048),l=a(52681),c=a(73743),d=a(24608),m=a(85705),u=a(57960),p=a(15258),x=a(622),y=a(36582),h=a(35490),v=a(35346),f=a(84830);function g(e){var t;let{brand:a,tier:s,loyaltyLoginLink:r,onLoyaltyToggle:l,inventory:c,open:d,quantity:m,closePreAcceptedLoyaltyConsentDialog:p,consentToPreAcceptedMembership:v,showSavingsAmount:g}=e,[b,j]=(0,f.V)(null!==(t=null==c?void 0:c.calculateTotalLoyaltyDiscount(m))&&void 0!==t?t:u.vO.zero("EUR")),[N,k]=(0,i.useState)(!1),C=(0,i.useCallback)(e=>{k(e)},[]),P=(0,i.useCallback)(()=>{l(!1),p(),(0,o.Wj)()},[p,l]),w=(0,i.useCallback)(()=>{console.debug("accepting loyalty price"),(0,o.Wj)(),v()},[v]),T=(0,i.useMemo)(()=>{let e={loyaltyDiscount:"".concat(b.amount).concat(j),tierBenefitsLink:(0,n.jsx)(y.Z,{...h.fi.tierBenefits})};return N?g&&b.hasPositiveAmount()?(0,n.jsx)(y.Z,{...h.fi.savingAndEnjoying,values:e}):(0,n.jsx)(y.Z,{...h.fi.enjoying,values:e}):g&&b.hasPositiveAmount()?(0,n.jsx)(y.Z,{...h.fi.registerSaveAndEnjoy,values:e}):(0,n.jsx)(y.Z,{...h.fi.registerAndEnjoy,values:e})},[j,N,b,g]);return d&&a&&s&&r&&c?(0,n.jsx)(x.dK,{title:(0,n.jsx)("div",{className:"flex flex-row gap-5 items-center justify-center mt-8",children:T}),open:d,onToggleDialog:P,fullHeight:!0,contentClassName:"!w-fit",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 text-center justify-center",children:[(0,n.jsx)(x.xv,{variant:"body3",children:(0,n.jsx)(y.Z,{...h.fi.membersOnlyRate})}),(0,n.jsxs)("div",{className:"flex gap-2 items-center justify-center mt-2",children:[(0,n.jsx)(x.XZ,{id:"book-and-join-status",className:"cursor-pointer",checked:N,onChange:C}),(0,n.jsx)(x.xv,{variant:"body3",as:"label",forLabel:"book-and-join-status",className:"cursor-pointer",children:(0,n.jsx)(y.Z,{...h.fi.wantToJoin,values:{brandName:a.translations.name,privacyPolicyLink:(0,n.jsx)("a",{href:a.privacyPolicyLink,target:"_blank",className:"font-bold lowercase hover:opacity-80 cursor-pointer",rel:"noreferrer",children:(0,n.jsx)(y.Z,{...h.i4.privacyPolicy})})}})})]}),(0,n.jsx)("div",{className:"my-2",children:(0,n.jsx)(x.zx,{variant:"primary",disabled:!N,onClick:w,className:"disabled:opacity-40",label:(0,n.jsxs)("span",{children:[(0,n.jsx)(y.Z,{...h.fi.bookAndJoin}),"*"]})})}),(0,n.jsxs)(x.xv,{variant:"body3",className:"text-gray-200",children:["*",(0,n.jsx)(y.Z,{...h.fi.bookAndJoinExplanation})]}),(0,n.jsxs)("div",{className:"flex border-t border-gray-100 pt-4 h-20 text-property-caption uppercase text-center text-gray-200 divide-x",children:[(0,n.jsxs)("a",{href:r,className:"cursor-pointer hover:opacity-80 pt-2 basis-1/2 flex flex-col gap-1 ",children:[(0,n.jsx)(y.Z,{tagName:"div",...h.fi.joinedAlready}),(0,n.jsx)(y.Z,{tagName:"div",...h.fi.login})]}),(0,n.jsxs)("div",{onClick:P,className:"cursor-pointer hover:opacity-80 pt-2 basis-1/2 flex flex-col gap-1 border-gray-100 ",children:[(0,n.jsx)(y.Z,{tagName:"div",...h.fi.dontWantToJoinNow}),(0,n.jsx)(y.Z,{tagName:"div",...h.fi.continueMyBooking})]})]})]})}):null}var b=a(94684),j=a(3687);let N=e=>{let{propertyTicker:t,loyaltyStatus:a,availableExtras:f,availablePaymentMethods:N,showExtrasConfiguration:k,showMandatoryExtras:C,taxations:P,taxShowConfig:w,inventoryGroup:T,setNavigating:M,brand:A,tier:E,loyaltyLoginLink:D,showSavingsAmount:S=!1,onLoyaltyToggle:
1I,allowMultipleMealPlans:R}=e,O=(0,s.useRouter)(),L=(0,p.c)(),_=(0,o.Ee)(e=>e.locale),F=(0,o.JD)(e=>e.ariRequest),Z=(0,o.JD)(e=>e.assistedModeActive),U=(0,o.ux)(e=>e.defaultCurrency),G=(0,o.ps)(e=>e.cart),B=(0,o.ps)(e=>e.setCart),V=(0,l.h)(),Y=(0,o.kj)(e=>e.visualConfiguration),{addReservationFeatureTag:X}=(0,c.R)(),{getEngineConfiguration:K}=(0,b.c)(),[H,q]=(0,i.useState)(!1),[W,Q]=(0,i.useState)(!1),[z,J]=(0,i.useState)(!1),[$,ee]=(0,i.useState)({inventory:void 0,show:!1,quantity:0}),et=(0,i.useCallback)(()=>{ee({inventory:void 0,quantity:0,show:!1})},[]),ea=(0,i.useCallback)(async(e,n)=>{try{var i;if(Y.disableUnitSelection&&!G.isEmpty()){J(!0);return}if(a===r.wcI.AVAILABLE_AND_PRE_ACCEPTED&&!(0,o.Vu)()){ee({inventory:e,quantity:n,show:!0});return}M(!0);let s=G.isEmpty()?r.Y$_.initWithInventory({inventory:e,quantity:n,currency:U,propertyTicker:t,checkIn:F.start,checkOut:F.end,childrenAges:F.guestQuantities[F.roomIndex].childrenAges,availableExtras:f,availablePaymentMethods:N,showExtrasConfiguration:k,showMandatoryExtras:C,deviceType:V,assistedModeActive:Z,taxations:P,taxShowConfig:w,allowMultipleMealPlans:R}):G.addInventory({inventory:e,quantity:n,checkIn:F.start,checkOut:F.end,childrenAges:F.guestQuantities[F.roomIndex].childrenAges,availableExtras:f,showExtrasConfiguration:k,showMandatoryExtras:C,deviceType:V,assistedModeActive:Z,taxations:P,taxShowConfig:w,allowMultipleMealPlans:R}),l=null===(i=K(t))||void 0===i?void 0:i.unitSelectionMapConfiguration,c=(null==l?void 0:l.isEnabledForInventory(e.accommodation.ticker))&&n>1?s.splitCartItemForUnitSelection(s.getLastCartItem().id):s,p=r.Y$_.calculateActionAfterItemIsAdded({availableExtras:c.getLastCartItem().availableExtras,showExtrasConfiguration:k,showMandatoryExtras:C,deviceType:V,assistedModeActive:Z}),x=(0,m.i)(c);switch(d.Ke.saveToStorage((0,o.Ax)(t),{[t]:x}),B(c),j.gs.sendAddToCartEvent(c),(null==T?void 0:T.bundlingMultiplier)&&(null==T?void 0:T.bundlingMultiplier)>1&&X(r.mhw.BUNDLING_UNITS),T&&"parentBundle"in T&&null!=T.parentBundle&&X(r.mhw.DYNAMIC_PACKAGES),p){case r.rJE.GO_TO_ROOM_SELECTION:break;case r.rJE.GO_TO_CHECKOUT:await O.push(L.hotelCheckoutPath({locale:_,hotelId:t}));break;case r.rJE.GO_TO_EXTRAS:await O.push(L.hotelExtrasPath({locale:_,hotelId:t,params:{cartItemId:c.getLastCartItem().id}}));break;default:throw new u.Zw(p)}}catch(e){if(e instanceof r.dtA)console.debug("Incompatible payment methods error"),q(!0);else if(e instanceof r.bcZ)console.debug("Incompatible meal plan error"),Q(!0);else throw console.error("Error adding item to cart:",e),e}finally{M(!1)}},[Y.disableUnitSelection,G,a,M,U,t,F.start,F.end,F.guestQuantities,F.roomIndex,f,N,k,C,V,Z,P,w,T,X,B,O,L,_,R,K]),en=(0,i.useCallback)(()=>{$.inventory&&(ea($.inventory,$.quantity),ee({inventory:void 0,quantity:0,show:!1}))},[ea,$]);return{handleAddCartItem:ea,dialogs:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.dK,{open:H,onToggleDialog:q,contentClassName:"sm:max-w-md",paddingless:!0,children:(0,n.jsx)(v.S,{icon:(0,n.jsx)(x.sz,{}),title:(0,n.jsx)(y.Z,{...h.i4.warning}),message:(0,n.jsx)(y.Z,{id:"component.useAddCartItem.incompatiblePaymentMethodText",description:"incompatiblePaymentMethodText",defaultMessage:"This selection has payment methods that are not compatible with the items in your cart. You must choose options that have the same payment method in order to finalize your booking."})})}),(0,n.jsx)(x.dK,{open:W,onToggleDialog:Q,contentClassName:"sm:max-w-md",paddingless:!0,children:(0,n.jsx)(v.S,{icon:(0,n.jsx)(x.sz,{}),title:(0,n.jsx)(y.Z,{...h.i4.warning}),message:(0,n.jsx)(y.Z,{id:"component.useAddCartItem.incompatibleMealPlanText",description:"incompatibleMealPlanText",defaultMessage:"The selected items are not compatible with the current meal plan. Please choose different items or update your meal plan."})})}),(0,n.jsxs)(x.dK,{open:z,onToggleDialog:J,contentClassName:"sm:max-w-md",children:[(0,n.jsx)(y.Z,{...h.i4.canNotAddMoreItemsToCart}),(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(x.PZ,{className:"w-auto",label:(0,n.jsx)(y.Z,{...h.i4.close}),onClick:()=>J(!1)})})]}),A&&E&&D&&I&&(0,n.jsx)(g,{brand:A,tier:E,loyaltyLoginLink:D,inventory:$.inventory,open:$.show,quantity:$.quantity,closePreAcceptedLoyaltyConsentDialog:et,consentToPreAcceptedMembership:en,onLoyaltyToggle:
1I,showSavingsAmount:S})]})}}},52681:function(e,t,a){a.d(t,{h:function(){return s}});var n=a(44194),i=a(21048);function s(){let e=(0,i.JD)(e=>e.ariRequest);return(0,n.useMemo)(()=>{var t;return null===(t=e.deviceInfo)||void 0===t?void 0:t.deviceType},[e.deviceInfo])}},76213:function(e,t,a){a.d(t,{F:function(){return s}});var n=a(98342),i=a(66443);let s=(e,t,a,s)=>{let r=(0,n.Z)();if(!e||!t||!a)return;let o=e.calculateFreeCancellationMaxDate(t,a,s),l=o&&(0,i.wQ)(o,i.kH.DAY_MONTH_YEAR_FORMATTED,r)||"",c=(null==o?void 0:o.getHours())===23&&(null==o?void 0:o.getMinutes())===59,d=o&&!c&&(0,i.wQ)(o,i.kH.TIME_FORMATTED,r)||"";return o?"".concat(l," ").concat(d):void 0}},61966:function(e,t,a){a.d(t,{k:function(){return i}});var n=a(44194);let i=e=>{let{selectedInventory:t,inventoryGroup:a,availabilityMap:i,messages:s}=e;return(0,n.useMemo)(()=>{let e=t.calculateInventoryTicker();return a.bundlingMultiplier||i[e]?Array.from({length:a.bundlingMultiplier&&a.bundlingMultiplier>i[e]?a.bundlingMultiplier:i[e]}).map((e,t)=>({id:"".concat(t+1),value:"".concat(t+1),label:"".concat(t+1," ").concat(0===t?s.roomDenominationTypeLabelSingular:s.roomDenominationTypeLabel)})):[{id:"0",value:"0",label:"0 ".concat(s.roomDenominationTypeLabelSingular)}]},[t,a.bundlingMultiplier,i,s.roomDenominationTypeLabelSingular,s.roomDenominationTypeLabel])}},20521:function(e,t,a){a.d(t,{y:function(){return l}});var n=a(44194),i=a(98342),s=a(35490),r=a(55990),o=a(15237);function l(e){let{roomDenomination:t,depositRequiredTextConfiguration:a,depositNotRequiredTextConfiguration:l}=e,c=(0,i.Z)();return(0,n.useMemo)(()=>({availability:c.formatMessage(s.i4.availability),book:c.formatMessage(s.i4.book),continue:c.formatMessage(s.i4.continue),cancellationMessage:c.formatMessage(s.i4.cancellationMessage),conditions:c.formatMessage(s.i4.conditions),night:c.formatMessage(s.i4.night),nights:c.formatMessage(s.i4.nights),roomDenominationTypeLabel:c.formatMessage(s.sK[t]),roomDenominationTypeLabelSingular:c.formatMessage(s.Sy[t]),unit:c.formatMessage(s.i4.unit),checkAvailability:c.formatMessage(s.i4.checkAvailability),soldOut:c.formatMessage(s.i4.soldOut),depositRequired:function(e,t){switch(t){case r.h.NO_TEXT:return"";case r.h.DEPOSIT_REQUIRED:return e.formatMessage(s.i4.depositRequired);case r.h.ADVANCE_PAYMENT:return e.formatMessage(s.i4.advancePayment);default:return""}}(c,a),depositNotRequired:function(e,t){switch(t){case o.k.NO_TEXT:return"";case o.k.DEPOSIT_NOT_REQUIRED:return e.formatMessage(s.i4.noDepositRequired);case o.k.NO_ADVANCE_PAYMENT:return e.formatMessage(s.i4.noAdvancePayment);case o.k.PAYMENT_AT_ESTABLISHMENT:return e.formatMessage(s.i4.paymentAtEstablishment);default:return""}}(c,l)}),[t,l,a,c])}},90397:function(e,t,a){a.d(t,{c:function(){return h}});var n=a(44194),i=a(41259),s=a(24608),r=a(21048),o=a(94684),l=a(57960),c=a(40170);let d=c.Ry({propertyTicker:c.Z_(),accommodationTicker:c.Z_().optional(),bundleTicker:c.Z_().optional(),startDate:l.pk,endDate:l.pk,adults:c.Rx(),children:c.Rx().optional(),teenagers:c.Rx().optional(),babies:c.Rx().optional(),seniors:c.Rx().optional(),email:c.Z_(),locale:c.Z_()}),m=c.Ry({}).strict(),u=e=>{let{propertyTicker:t,...a}=d.parse(e);return{path:"waiting-list/".concat(t),options:{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}}},p=e=>
1({createWaitingListSubscription:e({makeRequestParams:u,schema:m})}),x=(e=>{let t=p((0,s.EQ)(e));return{createWaitingListSubscription:async e=>t.createWaitingListSubscription(e)}})({resolveFetch:()=>(e,t)=>fetch("".concat("https://p8w6vuwybd.execute-api.eu-west-1.amazonaws.com/prod","/").concat(e),t)});class y{static create(e){let{locale:t,propertyTicker:a,name:n,multimedia:i,startDate:s,endDate:r,adults:o,accommodationTicker:l,bundleTicker:c,children:d,teenagers:m,babies:u,seniors:p}=e;return new y(t,a,n,i,s,r,o,l,c,d,m,u,p)}calculateTotalGuests(){var e;return this.adults+(null!==(e=this.children)&&void 0!==e?e:0)}constructor(e,t,a,n,i,s,r,o,l,c,d,m,u){this.locale=e,this.propertyTicker=t,this.name=a,this.multimedia=n,this.startDate=i,this.endDate=s,this.adults=r,this.accommodationTicker=o,this.bundleTicker=l,this.children=c,this.teenagers=d,this.babies=m,this.seniors=u}}function h(){let e=(0,r.JD)(e=>e.ariRequest),{getEngineConfiguration:t}=(0,o.c)(),{showDialog:a,showSnackbar:l,snackbarType:c,data:d,openDialog:m,openSnackbar:u,setSnackbarType:p,setData:h,clearData:v}=(0,r.Rl)(e=>({showDialog:e.showDialog,showSnackbar:e.showSnackbar,snackbarType:e.snackbarType,data:e.data,openDialog:e.openDialog,openSnackbar:e.openSnackbar,setSnackbarType:e.setSnackbarType,setData:e.setData,clearData:e.clearData}),i.Z),f=(0,n.useCallback)(a=>{let n=t(a),i=(0,s.zI)((0,s.e5)(),6),r=(0,s.RR)(e.start,i);return n.waitingListEnabled&&r},[e.start,t]),g=(0,n.useCallback)(async e=>{if(null!=d)try{await x.createWaitingListSubscription({locale:d.locale,propertyTicker:d.propertyTicker,accommodationTicker:d.accommodationTicker,bundleTicker:d.bundleTicker,startDate:(0,s.UW)(d.startDate),endDate:(0,s.UW)(d.endDate),adults:d.adults,children:d.children,teenager
1s:d.teenagers,babies:d.babies,seniors:d.seniors,email:e}),m(!1),u(!0),p("success")}catch(e){u(!0),p("error")}},[d,m,u,p]);return{isWaitingListEnabled:f,showDialog:a,showSnackbar:l,openDialog:(0,n.useCallback)(t=>{var a,n;h(y.create({...t,startDate:null!==(a=t.startDate)&&void 0!==a?a:e.start,endDate:null!==(n=t.endDate)&&void 0!==n?n:e.end,locale:e.locale,adults:e.calculateTotalAdults(),children:e.calculateTotalChildren(),teenagers:e.calculateTotalTeenagers(),babies:e.calculateTotalBabies(),seniors:e.calculateTotalSeniors()})),m(!0)},[e,m,h]),closeDialog:()=>{m(!1),v()},closeSnackbar:()=>u(!1),snackbarType:c,data:d,onSubmit:g}}}}]);
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.