1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0c393-defd-70f2-b585-f50c64a71ef8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4736],{4736:(e,t,n)=>{n.r(t),n.d(t,{BookingCardV2:()=>eq});var i=n(59557),a=n(97969),r=n(40115),l=n(89493),o=n(26389),s=n(13074),c=n(71389),d=n(34402),u=n(14304),p=n(99012),m=n(30995),g=n(25008),h=n(69026),f=n(86877),v=n(99714),b=n(40216),y=n(55749),x=n(87528),A=n(79454),C=n(43624),_=n(34023),N=n(20301);let w=(0,A.PA)(e=>{let{visibleTypes:t}=e,{t:n}=(0,c.c3)(),a=(0,_.useMemo)(()=>({SMALL:{title:n("BOOKING_CARD_BAG_SMALL_TITLE")||"Cabin bag",description:n("BOOKING_CARD_BAG_SMALL_DESCRIPTION")||"Backpack or small suitcase"},LARGE:{title:n("BOOKING_CARD_BAG_LARGE_TITLE")||"Hold bag",description:n("BOOKING_CARD_BAG_LARGE_DESCRIPTION")||"Large suitcase"},OOF:{title:n("BOOKING_CARD_BAG_OOF_TITLE")||"Oversized item",description:n("BOOKING_CARD_BAG_OOF_DESCRIPTION")||"Bicycle, golf bag or similar"}}),[n]);return(0,i.Y)(N.DL,{customLabels:a,visibleTypes:t})});var Y=n(97075),O=n(57304);let T=e=>(0,i.Y)(O.I4.svg,{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",children:(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.3999 1.02087C6.71334 1.02087 6.05907 1.28035 5.58001 1.73575C5.10171 2.19044 4.8374 2.80225 4.8374 3.43523V5.84958H9.9624V3.43523C9.9624 2.80225 9.6981 2.19044 9.21979 1.73575C8.74073 1.28035 8.08647 1.02087 7.3999 1.02087ZM10.8374 5.84958V3.43523C10.8374 2.55548 10.4696 1.71654 9.82265 1.10157C9.17649 0.487322 8.30464 0.145874 7.3999 0.145874C6.49517 0.145874 5.62331 0.487322 4.97715 1.10157C4.33024 1.71654 3.9624 2.55548 3.9624 3.43523V5.84958H3.6499C3.14299 5.84958 2.65267 6.0408 2.28781 6.38763C1.9222 6.73519 1.7124 7.21144 1.7124 7.713V11.9908C1.7124 12.4923 1.9222 12.9686 2.28781 13.3162C2.65267 13.663 3.14299 13.8542 3.6499 13.8542H11.1499C11.6568 13.8542 12.1471 13.663 12.512 13.3162C12.8776 12.9686 13.0874 12.4923 13.0874 11.9908V7.713C13.0874 7.21144 12.8776 6.73519 12.512 6.38763C12.1471 6.0408 11.6568 5.84958 11.1499 5.84958H10.8374ZM3.6499 6.72458C3.36116 6.72458 3.08843 6.83382 2.89067 7.02181C2.69367 7.20909 2.5874 7.45821 2.5874 7.713V11.9908C2.5874 12.2456 2.69367 12.4947 2.89067 12.682C3.08843 12.87 3.36116 12.9792 3.6499 12.9792H11.1499C11.4386 12.9792 11.7114 12.87 11.9091 12.682C12.1061 12.4947 12.2124 12.2456 12.2124 11.9908V7.713C12.2124 7.45821 12.1061 7.20909 11.9091 7.02181C11.7114 6.83382 11.4386 6.72458 11.1499 6.72458H3.6499ZM6.56814 9.03066C6.79234 8.81753 7.09191 8.70143 7.3999 8.70143C7.7079 8.70143 8.00746 8.81753 8.23166 9.03066C8.45662 9.24451 8.5874 9.53942 8.5874 9.85189C8.5874 10.1644 8.45662 10.4593 8.23166 10.6731C8.00746 10.8863 7.7079 11.0024 7.3999 11.
10024C7.09191 11.0024 6.79234 10.8863 6.56814 10.6731C6.34319 10.4593 6.2124 10.1644 6.2124 9.85189C6.2124 9.53942 6.34319 9.24451 6.56814 9.03066ZM7.3999 9.57643C7.31007 9.57643 7.22811 9.61056 7.171 9.66484C7.11465 9.71841 7.0874 9.78619 7.0874 9.85189C7.0874 9.9176 7.11465 9.98538 7.171 10.0389C7.2281 10.0932 7.31007 10.1274 7.3999 10.1274C7.48973 10.1274 7.5717 10.0932 7.6288 10.0389C7.68515 9.98538 7.7124 9.9176 7.7124 9.85189C7.7124 9.78619 7.68515 9.71841 7.6288 9.66484C7.5717 9.61056 7.48973 9.57643 7.3999 9.57643Z",fill:"black"})});var D=n(83883),S=n(52125),H=n(92881),I=n(26676),k=n(51049),E=n(36705),R=n(81283),P=n(60732),F=n(5608),M=n(95699),L=n(27356),U=n(340),B=n(29809),z=n(95545),K=n(69542),G=n(81919),W=n(78367),j=n(67938),Z=n(11115),V=n(68898);function q(e){let{value:t,minDate:n,maxDate:a,locale:r="en",timeZone:l,numOfMonths:o=1,selectionMode:s="range",onChange:c}=e,d="single"===s,u=(0,_.useMemo)(()=>{var e;let n=e=>{if(e&&/^\d{4}-\d{2}-\d{2}$/.test(e))try{return(0,I.qg)(e)}catch(e){return}},i=(d?[n(null!=(e=null==t?void 0:t.end)?e:null==t?void 0:t.start)]:[n(null==t?void 0:t.start),n(null==t?void 0:t.end)]).filter(e=>!!e);return i.length?i:void 0},[d,null==t?void 0:t.start,null==t?void 0:t.end]);return(0,i.Y)(k.d,{inline:!0,selectionMode:s,numOfMonths:o,locale:r,timeZone:l,min:(0,I.qg)(n),max:(0,I.qg)(a),value:u,onValueChange:e=>{var t,n,i,a;return c(d?{start:null==(t=e.value[0])?void 0:t.toString(),end:null==(n=e.value[0])?void 0:n.toString()}:{start:null==(i=e.value[0])?void 0:i.toString(),end:null==(a=e.value[1])?void 0:a.toString()})},className:(0,y.AH)({w:"full"}),children:(0,i.Y)(E.c,{view:"day",children:(0,i.Y)(R.Y,{children:e=>(0,i.FD)("div",{className:(0,x.Uu)({direction:"column",gap:"spacing-12",w:"full"}),children:[(0,i.FD)("div",{className:(0,x.Uu)({align:"center",justify:"space-between"}),children:[(0,i.Y)(P.U,{className:$,children:(0,i.Y)(Z.Y,{size:"sm"})}),(0,i.Y)(F.U,{className:(0,y.AH)({textStyle:"text-semibold-md",textTransform:"capitalize",bg:"transparent",border:"none",cursor:"pointer",px:"spacing-8",py:"spacing-4",borderRadius:"sm",_hover:{bg:"background-secondary"}}),children:(0,i.Y)(M.Z,{})}),(0,i.Y)(L.o,{className:$,children:(0,i.Y)(V.v,{size:"sm"})})]}),(0,i.FD)(U.$,{className:(0,y.AH)({w:"full",borderCollapse:"collapse"}),children:[(0,i.Y)(B.p,{children:(0,i.Y)(z.n,{children:e.weekDays.map((e,t)=>(0,i.Y)(K.w,{className:(0,y.AH)({textStyle:"text-xs",color:"foreground-secondary",fontWeight:"medium",textTransform:"capitalize",py:"spacing-6"}),children:e.narrow},t))})}),(0,i.Y)(G.j,{children:e.weeks.map((e,t)=>(0,i.Y)(z.n,{children:e.map((e,t)=>(0,i.Y)(W.n,{value:e,className:(0,y.AH)({p:0}),children:(0,i.Y)(j.l,{className:J,children:e.day})},t))},t))})]})]})})})})}let $=(0,x.Uu)({align:"center",justify:"center",w:"32px",h:"32px",borderRadius:"full",bg:"transparent",border:"none",cursor:"pointer",color:"foreground-primary",_hover:{bg:"background-secondary"},_disabled:{opacity:.35,cursor:"not-allowed"}}),J=(0,y.AH)({display:"flex",alignItems:"center",justifyContent:"center",w:"full",h:"38px",textStyle:"text-sm",color:"foreground-primary",cursor:"pointer",userSelect:"none",border:"none",bg:"transparent",borderRadius:"sm",transition:"background 0.12s ease, color 0.12s ease","&:hover:not([data-selected]):not([data-range-start]):not([data-range-end]):not([data-disabled]):not([data-unavailable]):not([data-in-hover-range]):not([data-hover-range-start]):not([data-hover-range-end])":{bg:"background-secondary"},"&[data-in-range]:not([data-selected]):not([data-range-start]):not([data-range-end]), &[data-in-hover-range]:not([data-selected]):not([data-range-start]):not([data-range-end])":{bg:"background-accent-secondary",borderRadius:0},"&[data-hover-range-start]:not([data-selected]):not([data-range-start]):not([data-range-end]), &[data-hover-range-end]:not([data-selected]):not([data-range-start]):not([data-range-end])":{bg:"background-accent-secondary"},"&[data-selected], &[data-range-start], &[data-range-end]":{bg:"foreground-accent-primary",color:"white",fontWeight:"semibold"},"&[data-range-start]":{borderTopLeftRadius:"sm",borderBottomLeftRadius:"sm"},"&[data-range-end]":{borderTopRightRadius:"sm",borderBottomRightRadius:"sm"},"&[data-today]:not([data-selected]):not([data-range-start]):not([data-range-end])":{color:"foreground-accent-primary",fontWeight:"bold"},"&[data-disabled], &[data-unavailable], &[data-outside-range]":{color:"shades-black.300",cursor:"not-allowed",_hover:{bg:"transparent"}}});var X=n(2310),Q=n(35342),ee=n(68786),et=n(2591),en=n(56742),ei=n(67896),ea=n(52346),er=n(54030),el=n(34272),eo=n(74926);let es=(0,_.createContext)(null);function ec(e){let{stepId:t,icon:n,title:a,openTitle:r,summary:l,isOpen:o,isComplete:s,disabled:c,onOpenChange:d,children:u,doneLabel:p="Done",contentWidth:m="360px",desktopModal:g,isLast:h,modalTall:f,keepPopoverBelow:v,inlineDesktop:A,hideMobileDoneButton:C}=e,N=(0,ei.Ub)("(max-width: 768px)"),[w,Y]=(0,_.useState)(null),O=(0,i.FD)("button",{type:"button",disabled:c,"aria-expanded":o,onClick:()=>!c&&d(!o),"data-open":o||void 0,"data-complete":s||void 0,className:eu,children:[(0,i.Y)("span",{className:ep,"data-complete":s||void 0,children:n}),(0,i.FD)("span",{className:(0,x.Uu)({direction:"column",flex:1,minW:0,textAlign:"left",gap:"2px"}),children:[(0,i.Y)("span",{className:em,children:o&&null!=r?r:a}),(0,i.Y)("span",{className:eg,"data-filled":!!l||void 0,children:l||" "})]}),(0,i.Y)(el.D,{size:"sm",className:(0,y.cx)(eh,o&&(0,y.AH)({transform:"rotate(180deg)"}))})]});return N?(0,i.FD)(i.FK,{children:[(0,i.Y)("div",{className:ed,"data-last":h||void 0,children:O}),(0,i.Y)(Q._.Root,{id:"booking-card-".concat(t,"-drawer"),open:o,onOpenChange:e=>{let{open:t}=e;return!c&&d(t)},position:"bottom",lazyMount:!0,unmountOnExit:!0,children:(0,i.FD)(b.Z,{children:[(0,i.Y)(Q._.Backdrop,{}),(0,i.Y)(Q._.Positioner,{children:(0,i.FD)(Q._.Content,{className:ef,children:[(0,i.FD)("div",{className:ey,children:[(0,i.FD)("span",{className:(0,x.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)("span",{className:(0,y.AH)({color:"foreground-accent-primary",display:"flex"}),children:n}),(0,i.Y)("span",{className:(0,y.AH)({textStyle:"heading-semibold-md"}),children:null!=r?r:a})]}),(0,i.Y)("button",{type:"button",onClick:()=>d(!1),className:(0,y.AH)({bg:"transparent",border:"none",cursor:"pointer",color:"foreground-secondary"}),children:(0,i.Y)(X.U,{size:"md"})})]}),(0,i.Y)("div",{className:ex,children:(0,i.Y)(es.Provider,{value:C?null:w,children:(0,i.Y)("div",{className:(0,y.AH)({display:"contents"}),children:u})})}),!C&&(0,i.FD)("div",{className:eA,children:[(0,i.Y)("div",{ref:Y,className:(0,y.AH)({w:"full",_empty:{display:"none"}})}),(0,i.Y)(D.$,{variant:"primary",onClick:()=>d(!1),className:(0,x.Uu)({w:"full",justify:"center",align:"center"}),children:p})]})]})})]})})]}):A?(0,i.FD)("div",{className:(0,y.cx)(ed,(0,y.AH)({flex:1,minW:0})),"data-open":o||void 0,"data-last":h||void 0,children:[O,o&&(0,i.Y)("div",{className:ev,children:u})]}):g?(0,i.FD)(i.FK,{children:[(0,i.Y)("div",{className:(0,y.cx)(ed,(0,y.AH)({flex:1,minW:0})),"data-open":o||void 0,"data-last":h||void 0,children:O}),(0,i.Y)(Q._.Root,{id:"booking-card-".concat(t,"-modal"),open:o,onOpenChange:e=>{let{open:t}=e;return!c&&d(t)},position:"center",lazyMount:!0,unmountOnExit:!0,children:(0,i.FD)(b.Z,{children:[(0,i.Y)(Q._.Backdrop,{
1className:(0,y.AH)({backdropFilter:"blur(2px)"})}),(0,i.Y)(Q._.Positioner,{children:(0,i.FD)(Q._.Content,{className:(0,y.cx)(eb,f&&(0,y.AH)({md:{h:"80vh"}})),children:[(0,i.FD)("div",{className:ey,children:[(0,i.FD)("span",{className:(0,x.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)("span",{className:(0,y.AH)({color:"foreground-accent-primary",display:"flex"}),children:n}),(0,i.Y)("span",{className:(0,y.AH)({textStyle:"heading-semibold-md"}),children:null!=r?r:a})]}),(0,i.Y)("button",{type:"button",onClick:()=>d(!1),className:(0,y.AH)({bg:"transparent",border:"none",cursor:"pointer",color:"foreground-secondary"}),children:(0,i.Y)(X.U,{size:"md"})})]}),(0,i.Y)("div",{className:ex,children:(0,i.Y)(es.Provider,{value:w,children:(0,i.Y)("div",{className:(0,y.AH)({display:"contents"}),children:u})})}),(0,i.FD)("div",{className:eA,children:[(0,i.Y)("div",{ref:Y,className:(0,y.AH)({w:"full",_empty:{display:"none"}})}),(0,i.Y)(D.$,{variant:"primary",onClick:()=>d(!1),className:(0,x.Uu)({w:"full",justify:"center",align:"center"}),children:p})]})]})})]})})]}):(0,i.FD)(eo.A.Root,{id:"booking-card-".concat(t,"-popover"),open:o,onOpenChange:e=>{let{open:t}=e;return!c&&d(t)},positioning:{placement:"bottom-start",gutter:8,flip:!v,fitViewport:!!v},lazyMount:!0,unmountOnExit:!0,children:[(0,i.Y)(eo.A.Trigger,{asChild:!0,children:(0,i.Y)("div",{className:(0,y.cx)(ed,(0,y.AH)({flex:1,minW:0})),"data-open":o||void 0,"data-last":h||void 0,children:O})}),(0,i.Y)(b.Z,{children:(0,i.Y)(eo.A.Positioner,{children:(0,i.Y)(eo.A.Content,{style:{width:m,maxWidth:"92vw"},className:(0,y.AH)({p:"spacing-16",zIndex:"modal",maxH:v?"var(--available-height)":void 0,overflowY:v?"auto":void 0}),children:(0,i.Y)("div",{className:(0,y.AH)({display:"contents"}),children:u})})})})]})}let ed=(0,y.AH)({borderBottomWidth:{base:"1px",md:"1px"},borderColor:"border-primary",borderRadius:{md:"default"},borderWidth:{md:"1px"},bg:"white",_last:{base:{borderBottomWidth:0},md:{borderBottomWidth:"1px"}},"&[data-last]":{borderBottomWidth:{base:0,md:"1px"}},transition:"border-color 0.15s ease","&[data-open]":{md:{borderColor:"border-secondary"}}}),eu=(0,y.cx)((0,x.Uu)({align:"center",gap:"spacing-12",w:"full"}),(0,y.AH)({px:{base:"spacing-12",md:"spacing-16"},py:{base:"spacing-12",md:"spacing-12"},bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",_disabled:{cursor:"not-allowed",opacity:.5}})),ep=(0,y.cx)((0,x.Uu)({align:"center",justify:"center",shrink:0}),(0,y.AH)({w:"40px",h:"40px",borderRadius:"full",bg:"background-accent-secondary",color:"foreground-accent-primary","&[data-complete]":{bg:"foreground-accent-primary",color:"white"}})),em=(0,y.AH)({textStyle:"text-xs",fontWeight:"bold",letterSpacing:"0.04em",textTransform:"uppercase",color:"foreground-secondary"}),eg=(0,y.AH)({textStyle:"text-sm",color:"shades-black.300",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&[data-filled]":{color:"foreground-primary",fontWeight:"medium"}}),eh=(0,y.AH)({flexShrink:0,color:"foreground-secondary",transition:"transform 0.2s ease"}),ef=(0,y.cx)((0,x.Uu)({direction:"column"}),(0,y.AH)({p:0,gap:0,maxH:"88svh",borderTopRadius:"lg",overflow:"hidden"})),ev=(0,y.AH)({px:"spacing-16",pt:"spacing-16",pb:"spacing-20",borderTopWidth:1,borderColor:"border-primary",animation:"fadeIn 0.18s ease-out"}),eb=(0,y.cx)((0,x.Uu)({direction:"column"}),(0,y.AH)({position:"relative",p:0,gap:0,w:"640px",maxW:"92vw",maxH:"82vh",borderRadius:"lg",overflow:"hidden"})),ey=(0,y.cx)((0,x.Uu)({align:"center",justify:"space-between",shrink:0}),(0,y.AH)({px:"spacing-16",py:"spacing-12",borderBottomWidth:"1px",borderColor:"border-primary"})),ex=(0,y.AH)({flex:1,minH:0,overflowY:"auto",px:"spacing-16",pt:"spacing-16",pb:"spacing-24"}),eA=(0,y.cx)((0,x.Uu)({direction:"column",gap:"spacing-8"}),(0,y.AH)({flexShrink:0,px:"spacing-16",py:"spacing-12",borderTopWidth:"1px",borderColor:"border-primary"})),eC=(0,A.PA)(e=>{let{selector:t,day:n,gridHeight:a="clamp(240px, 50svh, 520px)",ignorePickupConstraint:r,onSelectTime:l}=e,s=(0,o.m2)(),{t:d}=(0,c.c3)(),u=(0,_.useContext)(es),p=(0,ei.Ub)("(max-width: 768px)"),[m,g]=(0,_.useState)({isOpen:!1,otherTimeSlots:[]}),[h,f]=(0,_.useState)(!1),v=s._currentTimezone,A=s.operationArea,C=n.format("YYYY-MM-DD"),N="DROP"===t&&s.pickupTime&&!r?s.pickupTime.clone().utc().toISOString():void 0,w=!!A&&("PICKUP"===t||r||!!s.pickupTime),{data:O,isPlaceholderData:T}=(0,et.I)({queryKey:["booking-card-day-slots",t,C,A,N],enabled:w,placeholderData:Array(12).fill({period:"morning"}),staleTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,queryFn:async e=>{let{signal:t}=e,n={operationArea:null!=A?A:"",tz:v,...N?{startHours:N}:{}};return(await Y.Ay.fetchDayAvailabillity(C,n,t)).map(e=>{let t=S.Y.utc(e.timeStamp).tz(v).hour();return{...e,period:t<=13?"morning":t<=19?"afternoon":"night"}})}}),H="PICKUP"===t?s.pickupTime:s.deliveryTime,I=e=>{let n=S.Y.utc(e.timeStamp);if(l)return void l(n);"PICKUP"===t?s.onSetPickupTime(n,!0):s.onSetDeliveryTime(n,!0)},k=()=>{s.resetUnavailableSlotsState(),g({isOpen:!1,otherTimeSlots:[]})};return(0,i.FD)(i.FK,{children:[(0,i.Y)(er.Hj,{isVisible:!0,timezone:v,operationArea:null!=A?A:void 0,timeSlots:null!=O?O:[],isPlaceholderData:T,gridHeight:a,hideLegend:!!u,nativeScrollMobile:!0,showDisabledSlots:h,selectedTimeSlot:H,onSelectTimeSlot:e=>{if(e.availability)return void I(e);let t=null!=O?O:[],n=[...t].filter(t=>t.timeStamp<e.timeStamp&&t.availability).at(-1),i=t.find(t=>t.timeStamp>e.timeStamp&&t.availability);s.trackUnavailableSlotSelection(S.Y.utc(e.timeStamp),n,i),f(!0),g({isOpen:!0,otherTimeSlots:[n,i].filter(
1Boolean)})}}),u&&(0,en.createPortal)((0,i.Y)(ea.de,{timeSlots:null!=O?O:[]}),u),(0,i.Y)(Q._.Root,{open:m.isOpen,onOpenChange:e=>{let{open:t}=e;return!t&&k()},position:p?"bottom":"center",lazyMount:!0,unmountOnExit:!0,children:(0,i.FD)(b.Z,{children:[(0,i.Y)(Q._.Backdrop,{className:(0,y.AH)({backdropFilter:"blur(4px)"})}),(0,i.Y)(Q._.Positioner,{children:(0,i.FD)(Q._.Content,{className:(0,x.Uu)({direction:"column",gap:"spacing-16",p:"spacing-24",textAlign:"center",position:"relative",md:{maxW:"md"}}),children:[(0,i.Y)(ee.K,{"aria-label":d("BOOKING_DATETIMEPICKER_UNAVAILABLE_SELECTOR_ON_SKIP_TEXT"),icon:(0,i.Y)(X.U,{size:"sm"}),size:"sm",onClick:k,className:(0,y.AH)({position:"absolute",top:"spacing-12",right:"spacing-12"})}),(0,i.Y)("h2",{className:(0,y.AH)({textStyle:"heading-bold-lg"}),children:d("BOOKING_DATETIMEPICKER_UNAVAILABLE_SELECTOR_TITLE")||"Select another time"}),(0,i.Y)("p",{className:(0,y.AH)({textStyle:"text-md",color:"foreground-secondary"}),children:d("BOOKING_DATETIMEPICKER_UNAVAILABLE_SELECTOR_DESCRIPTION")||"The selected hour is unavailable. Please choose an alternative option."}),m.otherTimeSlots.length>0&&(0,i.Y)("div",{className:(0,x.Uu)({gap:"spacing-12",justify:"center",flexWrap:"wrap"}),children:m.otherTimeSlots.map(e=>(0,i.Y)(D.$,{variant:"secondary",onClick:()=>{I(e),k()},children:S.Y.utc(e.timeStamp).tz(v).format("LT")},e.timeStamp))})]})})]})})]})});async function e_(e,t){let{operationArea:n,timezone:i}=t;try{let t=(await Y.Ay.fetchDayAvailabillity(e.tz(i).format("YYYY-MM-DD"),{operationArea:n,tz:i})).filter(t=>t.availability&&S.Y.utc(t.timeStamp).valueOf()<=e.valueOf()).at(-1);return t?S.Y.utc(t.timeStamp):null}catch(e){return null}}let eN=(0,A.PA)(function(e){let{onStageChange:t,autoPickupTime:n}=e,a=(0,o.m2)(),{currentLanguage:r}=(0,c.CU)(),{t:l}=(0,c.c3)(),d=a._currentTimezone,m=(0,s.vI)(r),g=!a.operationArea||a._locationError,[h,f]=(0,_.useState)(()=>({start:a.pickupTime?a.pickupTime.tz(d).format("YYYY-MM-DD"):void 0,end:a.deliveryTime?a.deliveryTime.tz(d).format("YYYY-MM-DD"):void 0})),v=!!h.start&&!!h.end,[b,A]=(0,_.useState)(v?"times":"days");(0,_.useEffect)(()=>{null==t||t(b)},[t,b]);let[C,N]=(0,_.useState)(!1),w=!!n&&!C,[Y,O]=(0,_.useState)(a.pickupTime&&!a.deliveryTime?"delivery":"pickup"),I=(0,_.useRef)(!!a.pickupTime);(0,_.useEffect)(()=>{let e=!!a.pickupTime;!e||I.current||a.deliveryTime||O("delivery"),e||O("pickup"),I.current=e},[a.pickupTime,a.deliveryTime]);let k=(0,_.useMemo)(()=>S.Y.utc().tz(d).format("YYYY-MM-DD"),[d]),E=(0,_.useMemo)(()=>S.Y.utc().tz(d).add(1,"year").endOf("year").format("YYYY-MM-DD"),[d]),R=e=>{w?e.end!==h.end&&(a.pickupTime=null,a.deliveryTime=null):e.start!==h.start?(a.pickupTime=null,a.deliveryTime=null):e.end!==h.end&&(a.deliveryTime=null),f(e)},P=e=>e?S.Y.tz(e,d).locale(m).format("ddd D MMM"):void 0,F=async e=>{var t;let n=await e_(function(e,t){let n=e.clone().subtract(2,"hour").tz(t);return 8>n.hour()?n.subtract(1,"day").hour(19).minute(30).second(0).millisecond(0):n}(e,d),{operationArea:null!=(t=a.operationArea)?t:"",timezone:d});if(!n)return void N(!0);a.deliveryTime&&e.valueOf()>a.deliveryTime.valueOf()?(await a.onSetDeliveryTime(e,!0),await a.onSetPickupTime(n,!0)):(await a.onSetPickupTime(n,!0),await a.onSetDeliveryTime(e,!0)),a.pickupTime&&a.deliveryTime||N(!0)};if(g)return(0,i.Y)("div",{className:(0,y.AH)({textStyle:"text-sm",color:"shades-black.400",py:"spacing-16",textAlign:"center"}),children:l("BOOKING_CARD_SELECT_LOCATION_FIRST")||"Select a location first."});if("days"===b){var M,L,U,B,z,K;return(0,i.FD)("div",{className:(0,x.Uu)({direction:"column",gap:"spacing-12"}),children:[(0,i.Y)("span",{className:eS,children:w?l("BOOKING_CARD_SELECT_DELIVERY_DATE_ONLY")||"Select the luggage delivery date and time":l("BOOKING_CARD_SELECT_DATES")||"Select the pick-up and delivery dates and times"}),(0,i.FD)("div",{className:ek,"aria-live":"polite",children:[!w&&(0,i.FD)("div",{className:eE,"data-active":!h.start||void 0,children:[(0,i.Y)("span",{className:eR,children:l("BOOKING_CARD_PICKUP_DATE")||"Pick-up"}),(0,i.Y)("span",{className:eP,"data-placeholder":!h.start||void 0,children:null!=(M=P(h.start))?M:l("BOOKING_CARD_SELECT_PICKUP_DATE")||"Date"})]}),(0,i.FD)("div",{className:eE,"data-active":w?!h.end||void 0:!!h.start&&!h.end||void 0,children:[(0,i.Y)("span",{className:eR,children:l("BOOKING_CARD_DELIVERY_DATE")||"Delivery"}),(0,i.Y)("span",{className:eP,"data-placeholder":!h.end||void 0,children:null!=(L=P(h.end))?L:h.start&&!w?l("BOOKING_CARD_SELECT_ANOTHER_DATE")||"Date":l("BOOKING_CARD_SELECT_DELIVERY_DATE")||"Date"})]})]}),(0,i.Y)(q,{value:h,minDate:k,maxDate:E,locale:m,timeZone:d,selectionMode:w?"single":"range",onCh
1ange:R}),(0,i.Y)("span",{className:eF,children:w?l("BOOKING_CARD_AUTO_PICKUP_HINT")||"We collect your bags before the delivery time, so you only pick when you want them back":l("BOOKING_CARD_DATE_RANGE_HINT")||"The pick-up and delivery can be on the same day or on different dates"}),(0,i.Y)(D.$,{variant:"primary",disabled:w?!h.end:!h.start,onClick:()=>{(w?h.end:h.start)&&(h.end||R({start:h.start,end:h.start}),A("times"))},className:(0,x.Uu)({w:"full",justify:"center",align:"center"}),children:w?h.end?l("BOOKING_CARD_CONTINUE_DELIVERY_DATE",{deliveryDate:null!=(U=P(h.end))?U:""})||"(".concat(P(h.end),") delivery"):l("BOOKING_CARD_SELECT_DELIVERY_DATE")||"Date":h.start?h.end?l("BOOKING_CARD_CONTINUE_DATE_RANGE",{pickupDate:null!=(z=P(h.start))?z:"",deliveryDate:null!=(K=P(h.end))?K:""})||"(".concat(P(h.start),") pick-up - (").concat(P(h.end),") delivery"):l("BOOKING_CARD_CONTINUE_SAME_DAY",{date:null!=(B=P(h.start))?B:""})||"(".concat(P(h.start),") pick-up and delivery same day"):l("BOOKING_CARD_SELECT_PICKUP_DATE")||"Date"})]})}return(0,i.FD)("div",{className:(0,x.Uu)({direction:"column",gap:"spacing-16"}),children:[a.alert&&(0,i.Y)(u.F.yB,{type:a.alert.status,children:a.alert.message()}),(0,i.FD)("div",{className:(0,x.Uu)({align:"stretch",gap:"spacing-8"}),children:[w?(0,i.Y)("div",{className:(0,y.cx)(ew,(0,y.AH)({justifyContent:"center"})),children:(0,i.FD)("span",{className:(0,y.cx)(eY,(0,y.AH)({cursor:"default"})),"data-active":!0,children:[(0,i.Y)("span",{className:eO,children:l("BOOKING_CARD_TAB_DELIVERY")||"Delivery at"}),(0,i.FD)("span",{className:eT,children:[S.Y.tz(h.end,d).locale(m).format("ddd D MMM"),a.deliveryTime&&" - ".concat(a.deliveryTime.tz(d).locale(m).format("h:mm A"))]})]})}):(0,i.FD)("div",{className:ew,role:"tablist",children:[(0,i.FD)("button",{type:"button",role:"tab","aria-selected":"pickup"===Y,"data-active":"pickup"===Y||void 0,onClick:()=>O("pickup"),className:eY,children:[(0,i.Y)("span",{className:eO,children:l("BOOKING_CARD_TAB_PICKUP")||"Pick-up at"}),(0,i.FD)("span",{className:eT,children:[S.Y.tz(h.start,d).locale(m).format("ddd D MMM"),a.pickupTime&&" - ".concat(a.pickupTime.tz(d).locale(m).format("h:mm A"))]})]}),(0,i.FD)("button",{type:"button",role:"tab","aria-selected":"delivery"===Y,"data-active":"delivery"===Y||void 0,disabled:!a.pickupTime,onClick:()=>a.pickupTime&&O("delivery"),className:eY,children:[(0,i.FD)("span",{className:eO,children:[!a.pickupTime&&(0,i.Y)(T,{className:(0,y.AH)({w:"12px",h:"12px",opacity:.5})}),l("BOOKING_CARD_TAB_DELIVERY")||"Delivery at"]}),(0,i.FD)("span",{className:eT,children:[S.Y.tz(h.end,d).locale(m).format("ddd D MMM"),a.deliveryTime&&" - ".concat(a.deliveryTime.tz(d).locale(m).format("h:mm A"))]})]})]}),(0,i.Y)("button",{type:"button",onClick:()=>A("days"),"aria-label":l("BOOKING_CARD_CHANGE_DATES")||"Change dates",className:eD,children:(0,i.Y)(p.C,{size:"sm"})})]}),(0,i.FD)("div",{className:eH,children:[(0,i.Y)("span",{className:(0,y.cx)(eS,(0,y.AH)({minW:0})),children:"pickup"!==Y||w?l("BOOKING_CARD_DELIVERY_TIME_PROMPT")||"Select the luggage delivery time":l("BOOKING_CARD_PICKUP_TIME_PROMPT")||"Select the luggage pick-up time"}),a.operationArea&&(0,i.Y)(H.z,{timezone:d,cityName:a.operationArea,className:eI})]}),w?(0,i.Y)(eC,{selector:"DROP",day:S.Y.tz(h.end,d),ignorePickupConstraint:!0,onSelectTime:F}):"pickup"===Y?(0,i.Y)(eC,{selector:"PICKUP",day:S.Y.tz(h.start,d)}):(0,i.Y)(eC,{selector:"DROP",day:S.Y.tz(h.end,d)})]})}),ew=(0,y.cx)((0,x.Uu)({gap:"spacing-4"}),(0,y.AH)({p:"spacing-4",bg:"background-secondary",borderRadius:"default",w:"full"})),eY=(0,y.cx)((0,x.Uu)({direction:"column",align:"center",justify:"center",gap:"1px",flex:1}),(0,y.AH)({py:"spacing-6",borderRadius:"sm",border:"none",cursor:"pointer",bg:"transparent",color:"foreground-secondary",transition:"all 0.15s ease","&[data-active]":{bg:"foreground-accent-primary",color:"white",shadow:"sm"},_disabled:{cursor:"not-allowed",opacity:.55,_hover:{bg:"transparent"}}})),eO=(0,y.cx)((0,x.Uu)({align:"center",gap:"4px"}),(0,y.AH)({textStyle:"text-sm",fontWeight:"semibold"})),eT=(0,y.AH)({textStyle:"text-xs",fontWeight:"medium",color:"shades-black.400",textTransform:"capitalize","[data-active] &":{color:"white"}}),eD=(0,y.cx)((0,x.Uu)({align:"center",justify:"center",shrink:0}),(0,y.AH)({w:"46px",borderRadius:"default",borderWidth:1,borderColor:"border-primary",bg:"white",cursor:"pointer",color:"foreground-secondary",transition:"all 0.15s ease",_hover:{borderColor:"border-secondary",color:"foreground-accent-primary"}})),eS=(0,y.AH)({textStyle:"text-sm",fontWeight:"semibold",color:"foreground-primary"}),eH=(0,x.Uu)({align:"center",justify:"space-between",gap:"spacing-8"}),eI=(0,y.AH)({flexShrink:0,textAlign:"right"}),ek=(0,x.Uu)({gap:"spacing-8",w:"full"}),eE=(0,y.cx)((0,x.Uu)({direction:"column",gap:"2px",flex:1,minW:0}),(0,y.AH)({p:"spacing-10",borderRadius:"default",bg:"white",transition:"background 0.15s ease","&[data-active]":{bg:"background-accent-secondary"}})),eR=(0,y.AH)({textStyle:"text-xs",fontWeight:"semibold",color:"foreground-secondary"}),eP=(0,y.AH)({textStyle:"text-sm",fontWeight:"semibold",color:"foreground-primary",textTransform:"capitalize",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&[data-placeholder]":{color:"shades-black.400",fontWeight:"medium"}}),eF=(0,y.AH)({textStyle:"text-xs",color:"foreground-secondary"});var eM=n(24709),eL=n(52372),eU=n(89312),eB=n(13427);let ez=(0,A.PA)(e=>{let{className:t}=e,n=(0,o.m2)(),{currentLanguage:a}=(0,c.CU)(),r=(0,ei.Ub)("(max-width: 768px)"),l=n._isMeetingPointSelectorOpened||n._isTerminalSelectorOpened;if((0,_.useEffect)(()=>
1{if(l)return document.body.setAttribute("data-booking-map-open","true"),()=>document.body.removeAttribute("data-booking-map-open")},[l]),!l)return null;let s=n._isMeetingPointSelectorOpened?n._selectingMeetingPoint:n._selectingTerminal;return(0,i.Y)("div",{className:(0,y.cx)((0,y.AH)({pos:"fixed",inset:0,w:"full",h:"full",overflow:"hidden",borderRadius:0,pointerEvents:"auto",zIndex:"calc({zIndex.overlay} + 1)"}),t),children:(0,i.Y)(eB.KU,{children:(0,i.Y)(eM.rT.Provider,{value:r?{top:120,bottom:320,left:40,right:40}:{top:80,bottom:480,left:120,right:120},children:(0,i.Y)(eM.T5,{className:(0,y.AH)({w:"full",h:"full"}),locale:a,children:"PICKUP"===s?(0,i.Y)(eU.c,{}):(0,i.Y)(eL.w,{})})})})})});var eK=n(9215);let eG=(0,A.PA)(e=>{let{defaultSuggestions:t,wideSuggestions:n,lockPickup:a,lockCity:r}=e,l=(0,o.m2)(),{t:s}=(0,c.c3)();return(0,i.FD)("div",{className:(0,x.Uu)({direction:"column",gap:"spacing-8"}),children:[(0,i.Y)("span",{className:(0,y.AH)({textStyle:"text-sm",fontWeight:"semibold",color:"foreground-primary"}),children:s("BOOKING_CARD_LOCATIONS_INSTRUCTION")||"Select the pick-up and delivery locations"}),(0,i.Y)(eK.A,{showPickup:!0,showDelivery:!0,currentPickup:l.pickupLocation,currentDelivery:l.deliveryLocation,onPickupSelect:e=>l.onSetPickupLocation(e),onDeliverySelect:e=>l.onSetDeliveryLocation(e),onClearPickup:()=>l.onClearLocation("pickup"),onClearDelivery:()=>l.onClearLocation("drop"),pickupPlaceholder:s("BOOKING_CARD_PICKUP_LOCATION")||"Pick-up the luggage from",deliveryPlaceholder:s("BOOKING_CARD_DELIVERY_LOCATION")||"Deliver it back to",pickupSearchPlaceholder:s("BOOKING_CARD_LOCATION_SEARCH_PLACEHOLDER")||"Hotel, airport, station or address",deliverySearchPlaceholder:s("BOOKING_CARD_LOCATION_SEARCH_PLACEHOLDER")||"Hotel, airport, station or address",pickupOptions:l.pickupOptions,showCitySelector:!r&&!l.pickupLocation&&!l.deliveryLocation,lockPickup:a,wideSuggestions:n,defaultSuggestions:t}),l._locationError&&(0,i.Y)("span",{className:(0,y.AH)({textStyle:"text-sm",color:"foreground-system-error",px:"spacing-4"}),children:s("BOOKING_CARD_LOCATION_ERROR")||"Pick-up and delivery must be in the same city."})]})});var eW=n(31632),ej=n(6644);let eZ=(0,A.PA)(e=>{let{className:t}=e,n=(0,o.m2)(),{t:a}=(0,c.c3)(),{currentLanguage:r}=(0,c.CU)(),l=(0,C.useRouter)(),s=(0,C.usePathname)(),d=(0,C.useSearchParams)(),[u,p]=(0,_.useState)(!1),m=!n.useInputValid||n._actionLoading||u,g=async()=>{if(!m){p(!0);try{var e;if((0,eW.u4)("web_homepage_v2_check_price",{draftId:n.draftId}),n._hasLuggageBeenSet||await n.onSetLuggage(),!n.draftId)return void p(!1);let t=new URLSearchParams(Array.from(d.entries()));t.set("id",null!=(e=n.draftId)?e:""),t.set("locale",r),"/book"===s?t.delete("bf"):t.set("bf","1"),t.delete("promo"),n.appliedCouponCode&&t.set("promo",n.appliedCouponCode),l.push("/book/checkout?".concat(t.toString()))}catch(e){p(!1)}}};return(0,i.Y)(D.$,{variant:"primary",disabled:m,onClick:g,className:(0,y.cx)((0,y.AH)({w:"full"}),t),children:(0,i.FD)("span",{className:(0,x.Uu)({w:"full",h:"full",align:"center",justify:"center",gap:"spacing-8",whiteSpace:"nowrap"}),children:[(0,i.Y)("span",{children:u?a("BOOKING_CARD_CHECKING_PRICE")||"Getting your priceâ¦":a("BOOKING_CARD_CHECK_PRICE")||"Check price"}),!u&&(0,i.Y)(ej.f,{size:"sm"})]})})});var eV=n(38977);let eq=(0,A.PA)(e=>{var t,n;let{selectedCity:A,preAppliedCoupon:N,defaultSuggestions:Y,partnerId:O,partnerThumbnail:T,options:D,layout:S="horizontal",manageSession:H=!0,inlineSteps:I=!1,extraSuggestions:k,visibleTypes:E,defaultPickupPlaceId:R,lockPickup:P,lockCity:F,autoPickupTime:M}=e,L=(0,o.m2)(),{t:U}=(0,c.c3)(),{currentLanguage:B,cities:z}=(0,c.CU)(),K=(0,C.useSearchParams)(),[G,W]=(0,_.useState)(null),[j,Z]=(0,_.useState)("days"),V=(0,_.useMemo)(()=>K.get("promo")||N||"",[K,N]),q=(0,_.useMemo)(()=>K.get("cid")||"",[K]),$=(0,_.useMemo)(()=>O||(0,eV.g)(new URLSearchParams(K.toString()))||void 0,[O,K]),J=(0,eV.i)(null!=k?k:null==D?void 0:D.extraSuggestions),X=(0,_.useMemo)(()=>{if(null==D?void 0:D.suggestions)try{return JSON.parse(D.suggestions)}catch(e){}return Y},[null==D?void 0:D.suggestions,Y]);(0,c.h4)((0,_.useCallback)(()=>
1{if(H&&!L.isInitialized){if(L._reset(),$&&(L.refPartner=$,L.variant=o.KT.PARTNER),T&&(L.partnerThumbnail=T),q&&(L.cid=q),V&&(L.appliedCouponCode=V),null==D?void 0:D.suggestions)try{L.suggestions=JSON.parse(D.suggestions)}catch(e){}L.startSession().then(()=>{if(A){let e=z.find(e=>e.slug===A);e&&L.onChangeSelectedCity(e)}})}},[H,L,V,$,T,q,D,A,z])),(0,_.useEffect)(()=>{if(!L.isInitialized||!A)return;let e=z.find(e=>e.slug===A);e&&L.onChangeSelectedCity(e)},[L,z,A]),(0,_.useEffect)(()=>{V&&(K.get("promo")||!L.appliedCouponCode)&&(L.appliedCouponCode=V)},[L,V,K]);let Q=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(!R||!L.isInitialized||Q.current===R||L.pickupLocation)return;let e=new URLSearchParams(K.toString());if(["ppid","spid","pickup","padd"].some(t=>e.get(t)))return;let t=!1;return Q.current=R,(async()=>{try{let e=await L.getLocationDetailsRaw(R);!e||t||L.pickupLocation||await L.onSetPickupLocation(e)}catch(e){}})(),()=>{t=!0}},[L,L.isInitialized,R,K]);let ee=L._currentTimezone,et=(0,s.vI)(B),en=L._isTerminalSelectorOpened||L._isMeetingPointSelectorOpened,ei=!!L.pickupLocation&&!!L.deliveryLocation&&!L._locationError&&!en,ea=!!L.pickupTime&&!!L.deliveryTime,er=L.totalBags>0,el=ei&&!L._actionLoading,eo=(0,_.useRef)(!1);(0,_.useEffect)(()=>{en?(W(null),eo.current=!0):eo.current&&(ei||W("locations"),eo.current=!1)},[ei,en]);let es=(0,_.useRef)(!1);(0,_.useEffect)(()=>{J.done&&!es.current&&(es.current=!0,!J.pickup||L.deliveryLocation||en||W("locations"))},[J,L.deliveryLocation,en]);let ed=(0,_.useRef)(el);(0,_.useEffect)(()=>{!ed.current&&el&&("locations"===G||null===G)&&W("datetime"),ed.current=el},[el,G]);let eu=(0,_.useRef)(ea);(0,_.useEffect)(()=>{!eu.current&&ea&&"datetime"===G&&W("bags"),eu.current=ea},[ea,G]);let ep=(0,_.useRef)(G);(0,_.useEffect)(()=>{"bags"===ep.current&&"bags"!==G&&L.luggage.OOF>0&&!L.oofDescription&&(L.showOOFDescription=!0),ep.current=G},[G,L]);let em=(0,_.useMemo)(()=>{var e,t;let n=null==(e=L.pickupLocation)?void 0:e.name,i=null==(t=L.deliveryLocation)?void 0:t.name;return n||i?[n,i].filter(Boolean).join(" â "):null},[null==(t=L.pickupLocation)?void 0:t.name,null==(n=L.deliveryLocation)?void 0:n.name]),eg=(0,_.useMemo)(()=>{if(!L.pickupTime||!L.deliveryTime)return null;let e=L.deliveryTime.tz(ee).locale(et).format("D MMM, HH:mm");if(M)return e;let t=L.pickupTime.tz(ee).locale(et).format("D MMM, HH:mm");return"".concat(t," â ").concat(e)},[L.pickupTime,L.deliveryTime,ee,et,M]),eh=er?L.bagsDescription:null,ef=(0,_.useCallback)(e=>t=>{!t&&"locations"===e&&(L._isTerminalSelectorOpened||L._isMeetingPointSelectorOpened||L._actionLoading)||W(t?e:null)},[L]);return(0,i.FD)("div",{id:d.n,"data-layout":S,"data-inline":I||void 0,className:(0,y.cx)(e$,I&&eJ),children:[L.alert&&(0,i.Y)(u.F.yB,{type:L.alert.status,children:L.alert.message()}),(0,i.Y)("p",{className:(0,y.cx)(eQ,"vertical"===S&&e0),children:U("BOOKING_CARD_SERVICE_DESCRIPTION")||"We collect your bags, store them securely and deliver them wherever and whenever you choose."}),(0,i.FD)("div",{className:eX,"data-layout":S,children:[(0,i.Y)(ec,{stepId:"locations",icon:(0,i.Y)(g.v,{size:"sm"}),title:U("BOOKING_CARD_LOCATIONS_TITLE")||"LOCATION",summary:null!=em?em:U("BOOKING_CARD_LOCATIONS_HINT")||"Pick-up and delivery",isOpen:"locations"===G,isComplete:ei,disabled:en||L._actionLoading,onOpenChange:ef("locations"),inlineDesktop:I,desktopModal:!I,children:(0,i.Y)(eG,{defaultSuggestions:X,wideSuggestions:I,lockPickup:P,lockCity:F})}),(0,i.Y)(ec,{stepId:"datetime",icon:(0,i.Y)(p.C,{size:"sm"}),title:U("BOOKING_CARD_DATETIME_TITLE")||"DATE & TIME",openTitle:"times"===j?U("BOOKING_CARD_TIME_OPEN_TITLE")||"TIME":U("BOOKING_CARD_DATETIME_OPEN_TITLE")||"DATE",summary:null!=eg?eg:U("BOOKING_CARD_DATETIME_HINT")||"Dates and times",isOpen:"datetime"===G,isComplete:ea,disabled:!el,onOpenChange:ef("datetime"),contentWidth:"460px",desktopModal:"vertical"===S&&!I,hideMobileDoneButton:!0,keepPopoverBelow:"horizontal"===S||I,children:(0,i.Y)(eN,{onStageChange:Z,autoPickupTime:M})}),(0,i.Y)(ec,{stepId:"bags",icon:(0,i.Y)(h.i,{size:"sm"}),title:U("BOOKING_CARD_BAGS_TITLE")||"LUGGAGE",summary:null!=eh?eh:U("BOOKING_CARD_BAGS_HINT")||"Bags and sizes",isOpen:"bags"===G,isComplete:er,disabled:en||L._actionLoading,onOpenChange:ef("bags"),contentWidth:"440px",desktopModal:"vertical"===S&&!I,keepPopoverBelow:I,isLast:!0,children:(0,i.Y)(w,{visibleTypes:E})}),(0,i.Y)(eZ,{className:"vertical"===S?(0,y.AH)({w:"full"}):(0,y.AH)({md:{w:"auto",alignSelf:"stretch"}})})]}),(0,i.FD)("div",{className:e1,"data-layout":S,"data-inline":I||void 0,children:[(0,i.FD)("span",{className:(0,x.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)(f.l,{size:"sm",className:(0,y.AH)({color:"foreground-accent-primary",flexShrink:0})}),U("BOOKING_CARD_TRUST_INSURANCE")||"Protected up to â¬1,200 per bag"]}),(0,i.FD)("span",{className:(0,x.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)(v.G,{size:"sm",className:(0,y.AH)({color:"foreground-accent-primary",flexShrink:0})}),U("BOOKING_CARD_TRUST_RATING")||"4.9/5 from 5,000+ reviews"]}),(0,i.FD)("span",{className:(0,x.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)(m.C,{size:"sm",className:(0,y.AH)({color:"foreground-accent-primary",flexShrink:0})}),U("BOOKING_CARD_TRUST_CUSTOMERS")||"Trusted by 20,000+ travellers"]})]}),(0,i.FD)(b.Z,{children:[!I&&(0,i.Y)(ez,{}),(0,i.Y)(l.l,{isOpen:L._isTerminalSelectorOpened,position:{base:"bottom",md:I?"bottom":"center"},modal:!0,onClose:()=>L.onCloseTerminalSelector(),onConfirm:()=>L.trackTerminalSelection(L._selectingTerminal)}),(0,i.Y)(a.iA,{isOpen:L._isMeetingPointSelectorOpened,position:{base:"bottom",md:I?"bottom":"center"},modal:!0,onClose:()=>L.onCloseMeetingPointSelector()})]}),(0,i.Y)(r.k,{isOpen:L.showOOFDescription,shouldCheckout:!1})]})}),e$=(0,y.cx)((0,x.Uu)({direction:"column",gap:"spacing-12"}
1),(0,y.AH)({w:"full",maxW:{base:"full",md:"7xl"},bg:"white",borderRadius:"default",shadow:"0 0 0 1px rgba(0,0,0,0.08), 0 4px 24px rgba(0,0,0,0.04)",p:{base:"spacing-12",md:"spacing-16"},transition:"box-shadow 0.25s ease, transform 0.25s ease","&[data-highlighted]":{shadow:"0 0 0 4px rgba(255, 78, 0, 0.28), 0 12px 36px rgba(0, 0, 0, 0.12)",transform:{md:"translateY(-2px)"}},'&[data-layout="vertical"]':{maxW:{base:"full",md:"420px"},gap:"spacing-16",p:{base:0,md:"spacing-16"},shadow:{base:"none",md:"0 0 0 1px rgba(0,0,0,0.08), 0 4px 24px rgba(0,0,0,0.04)"}},'&[data-layout="vertical"][data-inline]':{shadow:"none"}})),eJ=(0,y.AH)({p:0,maxW:"full",borderRadius:0,shadow:"none"}),eX=(0,y.cx)((0,x.Uu)({direction:{base:"column",md:"row"},align:{md:"stretch"},gap:{base:"spacing-0",md:"spacing-8"},w:"full"}),(0,y.AH)({'&[data-layout="vertical"]':{flexDirection:"column",gap:"spacing-8"}})),eQ=(0,y.AH)({textStyle:"text-sm",color:"foreground-secondary",textAlign:{base:"left",md:"center"}}),e0=(0,y.AH)({textAlign:"left"}),e1=(0,y.cx)((0,x.Uu)({gap:{base:"spacing-12",lg:"spacing-24"},justify:"center",flexWrap:"wrap",direction:{base:"column",lg:"row"}}),(0,y.AH)({color:"foreground-primary",textStyle:"text-sm",fontWeight:"medium",pt:"spacing-16",borderTopWidth:1,borderColor:"border-primary","&[data-inline]":{display:{base:"none",md:"flex"}},'&[data-layout="vertical"]':{flexDirection:"column",alignItems:"flex-start",gap:"spacing-12"}}))},24709:(e,t,n)=>{n.d(t,{K4:()=>D,T5:()=>T,rT:()=>Y,lX:()=>w,vU:()=>O,T$:()=>N});var i=n(59557);n(94633),n(71389);var a=n(34098),r=n(30403),l=n(88075),o=n(15503),s=n(18938),c=n(36933),d=n(29510),u=n(85894),p=n(55749),m=n(38468);let g=(0,p.JB)({className:"tooltip",slots:r.MI.keys(),base:{arrow:{"--arrow-size":"{spacing.spacing-16}"},arrowTip:{"--arrow-background":"{colors.background-primary}",borderColor:"border-primary!important",borderLeftWidth:1,borderTopWidth:1},content:{backgroundColor:"background-primary",boxShadow:"md",p:"spacing-8",borderRadius:"default",borderWidth:1,borderColor:"border-primary!important"}}}),{withRootProvider:h,withContext:f}=(0,m.l)(g),v=h(l.s),b=f(o.k,"trigger"),y=f(s.Z,"content"),x=f(c.o,"positioner"),A={Root:v,Trigger:b,Content:y,Positioner:x,Arrow:f(d.P,"arrow"),ArrowTip:f(u.M,"arrowTip")};n(87528);var C=n(34023),_=n(13427);let N=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],[n,i]=(0,C.useState)([]),[a,r]=(0,C.useState)(),l=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(!e||!t){var n;return void(i([]),r(void 0),null==(n=l.current)||n.close(),l.current=null)}let a=new EventSource("/api/nearby-vehicles?longitude=".concat(e.longitude,"&latitude=").concat(e.latitude));return l.current=a,a.onmessage=e=>{let t=JSON.parse(e.data);if("vehicle"===t.event){let e=t.data;i(t=>t.find(t=>t.id===e.id)?t.map(t=>t.id===e.id?e:t):[...t,e])}else"route"===t.event&&r(t.data)},a.onerror=e=>{},()=>{var e;null==(e=l.current)||e.close(),l.current=null}},[e,t]),{vehicles:n,route:a}};function w(e){let{pickupLocation:t,deliveryLocation:n,pickupTime:a,deliveryTime:r}=e,l=[[t.longitude,t.latitude],[n.longitude,n.latitude]];return(0,i.Y)(i.FK,{children:(0,i.FD)(_.kL,{id:"pickup-delivery-connection",type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:l}},children:[(0,i.Y)(_.Wd,{id:"pickup-delivery-glow",type:"line",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#FF4E00","line-width":6,"line-opacity":.2,"line-blur":3}}),(0,i.Y)(_.Wd,{id:"pickup-delivery-line",type:"line",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#FF4E00","line-width":3,"line-opacity":.8}})]})})}let Y=(0,C.createContext)(void 0);function O(){let[e]=(0,a.U)("(max-width: 768px)"),t=(0,C.useContext)(Y);return(0,C.useMemo)(()=>t||(e?{bottom:80,left:40,right:40,top:200}:{bottom:200,left:700,right:200,top:300}),[e,t])}let T=(0,C.memo)(e=>{let{className:t,children:n,onLoad:a,locale:r="en",...l}=e,o=O(),{default:s}=(0,_.ko)(),[c,d]=(0,C.useState)(!1),u=(0,C.useMemo)(()=>"https://maps.luggit.app/styles/current/light/".concat(r),[r]);return(0,i.Y)("div",{className:(0,p.cx)(t,(0,p.AH)({bg:"#90dffe"})),children:(0,i.FD)(_.Ay,{id:"default",mapStyle:u,logoPosition:"bottom-left",attributionControl:!1,maplibreLogo:!1,locale:r,reuseMaps:!0,projection:"mercator",onLoad:e=>{d(!0),null==a||a(e)},pitchWithRotate:!1,dragRotate:!1,padding:o,initialViewState:{zoom:4,latitude:44.2984798,longitude:-2.8978435},...l,children:[(0,i.FD)("span",{className:(0,p.cx)((0,p.AH)({textStyle:"text-xs",color:"foreground-secondary",opacity:.4}),(0,p.AH)({pos:"absolute",bottom:"spacing-12",left:"spacing-12",zIndex:"docked"})),children:["\xa9 ",(0,i.Y)("a",{href:"https://osm.org/copyright",target:"_blank",rel:"noopener noreferrer",children:"OpenStreetMap"})]}),c&&n]})})});function D(e){let{tooltipContent:t,type:n,active:a=!0,showTooltip:r=!0,...l}=e,[o,s]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{r&&s(!0)},[r]),(0,i.Y)(_.pH,{...l,anchor:"bottom",className:(0,p.AH)({zIndex:20}),children:(0,i.FD)(A.Root,{open:o,closeOnClick:!1,openDelay:0,closeOnPointerDown:!1,closeOnScroll:!1,closeOnEscape:!1,interactive:!0,positioning:{placement:"top",strategy:"fixed",listeners:{animationFrame:!0},arrowPadding:16,flip:!1},children:[(0,i.Y)(A.Trigger,{asChild:!0,children:(0,i.FD)("svg",{className:(0,p.AH)({height:{base:"52px",md:"52px"}}),viewBox:"0 0 31 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.9932 37.9618C15.7767 37.9618 29.7764 23.1327 29.7764 15.0386C29.7764 6.94442 23.1576 0.382812 14.9932 0.382812C6.82862 0.382812 0.209961 6.94442 0.209961 15.0386C0.209961 23.1327 14.2097 37.9618 14.9932 37.9618Z",fill:a?"#FF4E00":"#461004"}),(0,i.Y)("path",{d:"M5 14.5C5 8.97715 9.47715 4.5 15 4.5C20.5228 4.5 25 8.97715 25 14.5C25 20.0228 20.5228 24.5 15 24.5C9.47715 24.5 5 20.0228 5 14.5Z",fill:"white"}),"pickup"===n&&(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.196 9.444a4.8 4.8 0 0 0-2.267.16 4.54 4.54 0 0 0-1.893 1.179A4.2 4.2 0 0 0 9.99 12.67a4 4 0 0 0 .056 2.125 4.2 4.2 0 0 0 1.143 1.838l2.593 2.457a.87.87 0 0 0 .443.221.9.9 0 0 0 .504-.05.375.375 0 1 1 .282.694 1.66 1.66 0 0 1-.92.094 1.6 1.6 0 0 1-.824-.415l-2.594-2.456a4.96 4.96 0 0 1-1.345-2.166 4.77 4.77 0 0 1-.066-2.52 4.93 4.93 0 0 1 1.23-2.229 5.3 5.3 0 0 1 2.205-1.374 5.5 5.5 0 0 1 2.624-.186c.877.15 1.7.51 2.393 1.047a5.03 5.
103 0 0 1 1.564 2.027c.332.793.446 1.654.33 2.501a.375.375 0 0 1-.744-.101 4.03 4.03 0 0 0-.278-2.11 4.3 4.3 0 0 0-1.331-1.724 4.64 4.64 0 0 0-2.06-.9m-2.361 2.687a2.26 2.26 0 0 1 1.554-.611c.58 0 1.139.218 1.554.611.416.394.654.934.654 1.5 0 .567-.238 1.107-.654 1.5a2.26 2.26 0 0 1-1.554.612c-.58 0-1.139-.217-1.554-.611a2.07 2.07 0 0 1-.654-1.5c0-.567.238-1.107.654-1.5m1.554.139a1.5 1.5 0 0 0-1.038.406c-.272.257-.42.601-.42.956 0 .354.148.698.42.956.272.257.645.405 1.038.405s.766-.148 1.038-.405c.272-.258.42-.602.42-.956 0-.355-.148-.7-.42-.956a1.5 1.5 0 0 0-1.038-.406m4.02 3.984a.375.375 0 0 1 .516 0l1.833 1.737a.375.375 0 1 1-.516.544l-1.2-1.137V20a.375.375 0 0 1-.75 0v-2.602l-1.2 1.137a.375.375 0 0 1-.516-.544z",fill:a?"#FF4E00":"#461004"}),"delivery"===n&&(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1964 9.44368C14.4383 9.31367 13.6578 9.36889 12.9291 9.60378C12.2005 9.83865 11.5493 10.2449 11.0358 10.7821C10.5225 11.3193 10.1638 11.9696 9.99149 12.671C9.81917 13.3722 9.83828 14.1033 10.0472 14.7959C10.2561 15.4886 10.6486 16.1216 11.1897 16.6344M11.1898 16.6344L13.7832 19.0908C13.7832 19.0908 13.7833 19.0909 13.7833 19.0909C13.899 19.2003 14.0482 19.2774 14.2136 19.3099C14.3791 19.3423 14.5509 19.3281 14.7071 19.2696C14.9011 19.197 15.1172 19.2953 15.1899 19.4892C15.2625 19.6832 15.1642 19.8993 14.9702 19.972C14.6833 20.0795 14.3704 20.1049 14.0692 20.0458C13.768 19.9868 13.4891 19.8451 13.2676 19.6355L13.2675 19.6354L10.674 17.1789L10.674 17.1789C10.0403 16.5785 9.57669 15.8333 9.32912 15.0125C9.08151 14.1915 9.05875 13.3238 9.26316 12.492C9.46754 11.6603 9.89177 10.8937 10.4936 10.264C11.0953 9.63432 11.8547 9.16212 12.699 8.88995C13.5433 8.61779 14.4463 8.55409 15.3231 8.70448C16.2 8.85487 17.0238 9.21474 17.7161 9.75188C18.4086 10.2891 18.9473 10.9864 19.2792 11.7792C19.6112 12.5722 19.7248 13.4333 19.6083 14.2806C19.5801 14.4858 19.391 14.6293 19.1858 14.6011C18.9806 14.5729 18.8371 14.3837 18.8653 14.1785C18.9634 13.4649 18.868 12.739 18.5874 12.0688C18.3068 11.3985 17.8494 10.8045 17.2564 10.3445C16.6633 9.88431 15.9544 9.57369 15.1964 9.44368M12.8346 12.1311C13.2501 11.7375 13.8096 11.5196 14.3889 11.5196C14.9683 11.5196 15.5277 11.7375 15.9432 12.1311C16.3594 12.5254 16.5972 13.0647 16.5972 13.6315C16.5972 14.1983 16.3594 14.7376 15.9432 15.1319C15.5277 15.5255 14.9683 15.7434 14.3889 15.7434C13.8096 15.7434 13.2501 15.5255 12.8346 15.1319C12.4185 14.7376 12.1806 14.1983 12.1806 13.6315C12.1806 13.0647 12.4185 12.5254 12.8346 12.1311ZM14.3889 12.2696C13.9958 12.2696 13.6226 12.4178 13.3505 12.6756C13.079 12.9327 12.9306 13.2771 12.9306 13.6315C12.9306 13.9859 13.079 14.3303 13.3505 14.5874C13.6226 14.8452 13.9958 14.9934 14.3889 14.9934C14.782 14.9934 15.1552 14.8452 15.4274 14.5874C15.6988 14.3303 15.8472 13.9859 15.8472 13.6315C15.8472 13.2771 15.6988 12.9327 15.4274 12.6756C15.1552 12.4178 14.782 12.2696 14.3889 12.2696ZM18.6667 16.1513C18.8738 16.1513 19.0417 16.3192 19.0417 16.5263V19.1282L20.2421 17.9909C20.3924 17.8485 20.6298 17.8549 20.7722 18.0052C20.9147 18.1556 20.9083 18.3929 20.7579 18.5354L18.9246 20.2722C18.7799 20.4093 18.5534 20.4093 18.4088 20.2722L16.5754 18.5354C16.4251 18.3929 16.4187 18.1556 16.5611 18.0052C16.7036 17.8549 16.9409 17.8485 17.0913 17.9909L18.2917 19.1282V16.5263C18.2917 16.3192 18.4596 16.1513 18.6667 16.1513Z",fill:a?"#FF4E00":"#461004"})]})}),(0,i.Y)(A.Positioner,{children:(0,i.FD)(A.Content,{className:(0,p.AH)({pointerEvents:"initial",w:"250px"}),children:[(0,i.Y)(A.Arrow,{children:(0,i.Y)(A.ArrowTip,{})}),t]})})]})})}},38977:(e,t,n)=>{n.d(t,{g:()=>u,i:()=>d});var i=n(26389),a=n(92525),r=n.n(a),l=n(43624),o=n(34023);let s={pickup:!1,delivery:!1,done:!1},c={pickup:{placeId:"ppid",shortcode:"spid",query:["pickup","padd"]},delivery:{placeId:"dpid",shortcode:"sdid",query:["delivery","dadd"]}};function d(e){let t=(0,i.m2)(),n=(0,l.useSearchParams)().toString(),a=(0,o.useRef)(null),[d,u]=(0,o.useState)(s);return(0,o.useEffect)(()=>{if(!t.isInitialized||a.current===n)return;let i=new URLSearchParams(n),l=function(e){if(!e)return null;if(Array.isArray(e))return e;try{let t=JSON.parse(e);return Array.isArray(t)?t:null}catch(e){return null}}(e),o=["pickup","delivery"].map(e=>({side:e,placeId:i.get(c[e].placeId),shortcode:i.get(c[e].shortcode),query:(e=>{for(let t of e){let e=i.get(t);if(e)return e}return null})(c[e].query)})).filter(e=>{let{placeId:t,shortcode:n,query:i}=e;return t||n||i});if(!o.length||o.some(e=>e.shortcode&&!e.placeId&&!l))return;let s=new AbortController,d=!1,p=async e=>
1{if(e.placeId)return t.getLocationDetailsRaw(e.placeId);if(e.shortcode){let n=null==l?void 0:l.find(t=>t.shortcode===e.shortcode);if(!(null==n?void 0:n.placesId))return null;let i=await t.getLocationDetailsRaw(n.placesId),a=n.display_name||n.listing_name;return i&&a?{...i,name:a}:i}let{data:n}=await r().post("".concat("https://api.luggit.app/v1","/routing/geocoding"),{query:e.query},{signal:s.signal}),i=null==n?void 0:n[0];return i?{...i,name:i.name,address:i.name}:null},m={pickup:!1,delivery:!1};return(async()=>{for(let e of o)try{let n="pickup"===e.side;if(n?t.pickupLocation:t.deliveryLocation)continue;let i=await p(e);if(!i||d)continue;n?await t.onSetPickupLocation(i):await t.onSetDeliveryLocation(i),m[e.side]=!0}catch(e){if(d||(null==e?void 0:e.name)==="CanceledError")return}d||(a.current=n,u({...m,done:!0}))})(),()=>{d=!0,s.abort()}},[t,t.isInitialized,n,e]),d}function u(e){return e.get("ref")||e.get("partner")}},52372:(e,t,n)=>{n.d(t,{w:()=>C});var i=n(59557),a=n(24709),r=n(26389),l=n(71389),o=n(92512),s=n(2310),c=n(86839),d=n(65893),u=n(87756),p=n(55749),m=n(57304),g=n(87528),h=n(52125),f=n(79454),v=n(34023),b=n(56742),y=n(13427),x=n(67896),A=n(62794);let C=(0,f.PA)(e=>{var t,n,f;let{onClickTooltipEdit:C}=e,_=(0,a.vU)(),N=(0,v.useMemo)(()=>({top:_.top,right:_.right,bottom:_.bottom,left:_.left}),[_.top,_.right,_.bottom,_.left]),w=(0,r.m2)(),{pickupTime:Y,deliveryTime:O,_currentTimezone:T,pickupLocation:D,deliveryLocation:S,onSetDeliveryLocation:H,selectedCity:I,onClearLocation:k,_suggestions:E,_suggestionsLoading:R,_selectedTerminal:P,_isTerminalSelectorOpened:F,_terminals:M,_selectingTerminal:L,_isMeetingPointSelectorOpened:U,_hotspotMeetingPoints:B,_selectedMeetingPoint:z,_selectingMeetingPoint:K,onSetHotspotMeetingPoint:G,_hotspotData:W}=w,j=(0,x.Ub)("(max-width: 768px)"),[Z,V]=(0,v.useState)(null),{t:q}=(0,l.c3)(),{current:$}=(0,y.ko)(),{currentLanguage:J,cities:X}=(0,l.CU)(),Q=null==z?void 0:z.PICKUP,ee=(0,v.useMemo)(()=>{var e,t,n,i;if(!Q)return null;let a=null!=J?J:"en";return null!=(i=null!=(n=null==(t=Q.translations)||null==(e=t[a])?void 0:e.meeting_point_directions)?n:Q.meeting_point_directions)?i:null},[Q,J]),et=(0,v.useCallback)(async e=>{await H(e)},[H]),en=(0,v.useMemo)(()=>{if(S)return{latitude:S.point.lat,longitude:S.point.lon};if(I&&E&&E.length>0&&!R){let e=E.map(e=>({latitude:e.point.lat,longitude:e.point.lon})),t=e.reduce((e,t)=>(e.lat+=t.latitude,e.lon+=t.longitude,e),{lat:0,lon:0});return{latitude:t.lat/e.length,longitude:t.lon/e.length,isSuggestion:!0}}return null},[S,I,E,R]),ei=(0,v.useCallback)(()=>{if(!S&&E&&E.length>0&&$){let e=E.reduce((e,t)=>(t.point&&e.push([Number(t.point.lon),Number(t.point.lat)]),e),[]),t=(0,A.A)(e);t&&$.fitBounds(t,{maxZoom:12,duration:600,animate:!0,essential:!0})}},[E,S,$]);(0,v.useEffect)(()=>{ei()},[ei]);let ea=null==z?void 0:z.DROP,er=(0,v.useMemo)(()=>{var e,t,n,i;if(!ea)return null;let a=null!=J?J:"en";return null!=(i=null!=(n=null==(t=ea.translations)||null==(e=t[a])?void 0:e.meeting_point_directions)?n:ea.meeting_point_directions)?i:null},[ea,J]),el=(0,v.useMemo)(()=>{var e,t,n,i;let a=null==P?void 0:P.DROP;if(!a)return null;let r=null!=J?J:"en";return null!=(i=null!=(n=null==(t=a.translations)||null==(e=t[r])?void 0:e.meeting_point_directions)?n:a.meeting_point_directions)?i:null},[P,J]),eo=(0,v.useMemo)(()=>{if(S){var e,t,n,i,a,r;if(P.DROP){let i=null!=J?J:"en",a=null!=(n=null==(t=P.DROP.translations)||null==(e=t[i])?void 0:e.name)?n:P.DROP.name;return"".concat(S.name," | ").concat(a)}if(ea){let e=null!=J?J:"en";return null!=(r=null==(a=ea.translations)||null==(i=a[e])?void 0:i.name)?r:ea.name}return S.name}return q("BOOKING_STEP_2_LOCATION_MAP_DELIVERY_LOCATION")},[S,q,P,ea,J]),es=(0,v.useMemo)(()=>{var e;return(0,i.FD)("div",{className:(0,p.cx)((0,g.Uu)({direction:"column",gap:"spacing-8"}),(0,p.AH)({position:"relative",p:"spacing-2"})),children:[(0,i.FD)("div",{className:(0,g.Uu)({justify:"space-between",align:"flex-start"}),children:[(0,i.FD)("div",{className:(0,g.Uu)({direction:"column",flex:1}),children:[(0,i.Y)("span",{className:(0,p.AH)({textStyle:"heading-bold-sm",mb:"spacing-2"}),children:q("BOOKING_STEP_2_LOCATION_MAP_TITLE")}),!(er||el)&&(0,i.Y)("span",{className:(0,p.AH)({color:"foreground-secondary",textStyle:"text-xs"}),children:q("BOOKING_STEP_2_LOCATION_MAP_DESCRIPTION")})]}),(0,i.Y)(c.k,{size:"sm",onClick:()=>k("drop"),className:(0,p.AH)({cursor:"pointer",flexShrink:0})})]}),(null==ea||null==(e=ea.images)?void 0:e[0])&&(0,i.FD)("div",{className:(0,p.AH)({pos:"relative",curs
1or:"pointer",mx:"-spacing-2",borderRadius:"default",overflow:"hidden"}),onClick:()=>V({src:ea.images[0],directions:er||el}),children:[(0,i.Y)("img",{src:ea.images[0],alt:"",className:(0,p.AH)({h:{base:"60px",md:"80px"},objectFit:"cover",w:"full"})}),(0,i.Y)("div",{className:(0,p.cx)((0,g.Uu)({align:"center",justify:"center"}),(0,p.AH)({pos:"absolute",bottom:"spacing-4",right:"spacing-4",color:"white",filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))"})),children:(0,i.Y)(d.b,{size:"40"})})]}),(0,i.Y)(m.cG,{className:(0,p.AH)({w:"full"})}),(0,i.FD)("button",{className:(0,g.Uu)({direction:"column",gap:"spacing-4",cursor:"pointer"}),onClick:C,children:[(0,i.FD)("div",{className:(0,g.Uu)({gap:"spacing-8",align:"center"}),children:[(0,i.Y)(u.P,{size:"xs",variant:"primary"}),(0,i.Y)("span",{className:(0,p.AH)({textStyle:"text-xs",color:"foreground-primary",textAlign:"left",textWrap:"balance"}),children:eo})]}),(0,i.FD)("div",{className:(0,g.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)(o.d,{size:"xs",variant:"primary"}),(0,i.FD)("span",{className:(0,p.AH)({textStyle:"text-xs",color:"foreground-primary"}),children:[O&&h.Y.utc(O).tz(T).calendar(),!O&&q("BOOKING_STEP_2_LOCATION_MAP_DELIVERY_TIME")]})]})]})]})},[O,T,q,eo,C,k,er,el,ea]);(0,v.useEffect)(()=>{j&&D&&S||!$||!en||en.isSuggestion||U||F||$.flyTo({essential:!0,duration:600,zoom:14,center:[null==en?void 0:en.longitude,null==en?void 0:en.latitude]})},[en,$,j,D,S,U,F]),(0,v.useEffect)(()=>{if(!j||!$||!D||!S||U||F)return;let e=D.point,t=S.point,n=[[Number(null==e?void 0:e.lon),Number(null==e?void 0:e.lat)],[Number(null==t?void 0:t.lon),Number(null==t?void 0:t.lat)]];if(n.some(e=>{let[t,n]=e;return!Number.isFinite(t)||!Number.isFinite(n)}))return;let i=(0,A.A)(n);if(!i)return;let a=setTimeout(()=>{$.resize(),$.stop(),$.fitBounds(i,{padding:N,maxZoom:12,duration:600,animate:!0,essential:!0})},300);return()=>clearTimeout(a)},[j,$,D,S,U,F,N]);let ec=(0,v.useMemo)(()=>{if(!U||!(null==W?void 0:W.area))return null;try{let e=JSON.parse(W.area);return{type:"FeatureCollection",features:[{type:"Feature",properties:{hotspotId:W.id},geometry:e}]}}catch(e){return null}},[U,W]);(0,v.useEffect)(()=>{var e;if(!$||!U||!(null==B?void 0:B.length)||(null==z||null==(e=z[K])?void 0:e.location))return;let t=w._selectorDrawerHeight;if(j&&0===t)return;let n=setTimeout(()=>{var e;$.stop();let n=B.filter(e=>e.location).map(e=>[e.location.lon,e.location.lat]);if(0===n.length)return;let i={top:40,left:40,right:40,bottom:40};if(!j){if(1===n.length)$.flyTo({center:n[0],zoom:15,duration:600,essential:!0,padding:i});else{let e=(0,A.A)(n);e&&$.fitBounds(e,{duration:600,animate:!0,essential:!0,padding:i})}return}let a=$.getContainer().getBoundingClientRect(),r=window.innerHeight-t-148-a.top,l=n.map(e=>e[1]),o=n.map(e=>e[0]),s=(Math.min(...o)+Math.max(...o))/2,c=(Math.min(...l)+Math.max(...l))/2,d=(0,A.A)(n),u=d?$.cameraForBounds(d,{padding:{top:60,left:60,right:60,bottom:40}}):null,p=Math.min(null!=(e=null==u?void 0:u.zoom)?e:15,17);$.flyTo({center:[s,c],zoom:p,duration:600,essential:!0,padding:{top:0,left:0,right:0,bottom:Math.round(a.height-r)}})},100);return()=>clearTimeout(n)},[U,B,$,j,w._selectorDrawerHeight]),(0,v.useEffect)(()=>{var e;if(!$||!F||!(null==M?void 0:M.length)||(null==P||null==(e=P[L])?void 0:e.location))return;let t=w._selectorDrawerHeight;if(j&&0===t)return;let n=setTimeout(()=>{var e;$.stop();let n=M.filter(e=>e.location).map(e=>[e.location.lon,e.location.lat]);if(0===n.length)return;if(!j){if(1===n.length)$.flyTo({center:n[0],zoom:17,duration:600,essential:!0,padding:{top:40,left:40,right:40,bottom:40}});else{let e=(0,A.A)(n);e&&$.fitBounds(e,{maxZoom:17,duration:600,animate:!0,essential:!0,padding:{top:40,left:40,right:40,bottom:40}})}return}let i=$.getContainer().getBoundingClientRect(),a=window.innerHeight-t-148-i.top,r=n.map(e=>e[1]),l=n.map(e=>e[0]),o=(Math.min(...l)+Math.max(...l))/2,s=(Math.min(...r)+Math.max(...r))/2,c=(0,A.A)(n),d=c?$.cameraForBounds(c,{padding:{top:60,left:60,right:60,bottom:40}}):null,u=Math.min(null!=(e=null==d?void 0:d.zoom)?e:15,17);$.flyTo({center:[o,s],zoom:u,duration:600,essential:!0,padding:{top:0,left:0,right:0,bottom:Math.round(i.height-a)}})},100);return()=>clearTimeout(n)},[F,M,P,$,j,w._selectorDrawerHeight]);let ed=U?null==z||null==(t=z[K])?void 0:t.location:F?null==P||null==(n=P[L])?void 0:n.location:null;(0,v.useEffect)(()=>
1{if(!$||!ed)return;let e=w._selectorDrawerHeight;j&&0===e||$.flyTo({center:[ed.lon,ed.lat],zoom:F?17:16,duration:600,essential:!0,padding:{top:40,left:40,right:40,bottom:e+40}})},[null==ed?void 0:ed.lat,null==ed?void 0:ed.lon,$,F,j,w._selectorDrawerHeight]);let eu=(0,v.useMemo)(()=>{let e=new Map,t=new Map;return M&&(M.filter(e=>e.location).forEach(t=>{let n="".concat(t.location.lat,",").concat(t.location.lon);e.has(n)||e.set(n,[]),e.get(n).push(t)}),e.forEach(e=>{e.forEach((e,n)=>{t.set(e.id,-(34*n+30))})})),{groups:e,labelYOffset:t}},[M]),ep=(0,v.useMemo)(()=>{if(!E||S)return[];let e=E.filter(e=>{var t,n;return(null==e?void 0:e.point)&&"number"==typeof(null==(t=e.point)?void 0:t.lon)&&"number"==typeof(null==(n=e.point)?void 0:n.lat)}),t=e.map((e,t)=>({type:"suggestion",id:e.id||"suggestion-".concat(t),longitude:Number(e.point.lon),latitude:Number(e.point.lat),suggestion:e})),n=new Set;return e.forEach(e=>{e.operationArea&&n.add(e.operationArea)}),[...t,...Array.from(n).map(e=>{let t=null==X?void 0:X.find(t=>t.slug===e);return(null==t?void 0:t.center)?{type:"other",id:"other-location-".concat(e),longitude:t.center.lon,latitude:t.center.lat,operationArea:e}:null}).filter(e=>null!==e)]},[E,S,X]);return(0,i.FD)(i.FK,{children:[!!S&&!!D&&!U&&!F&&(0,i.Y)(a.K4,{type:"pickup",active:!1,longitude:Number(D.point.lon),latitude:Number(D.point.lat),tooltipContent:(0,i.FD)("div",{className:(0,p.cx)((0,g.Uu)({direction:"column",gap:"spacing-8"}),(0,p.AH)({position:"relative",p:"spacing-2"})),children:[(0,i.Y)("div",{className:(0,g.Uu)({direction:"column"}),children:(0,i.Y)("span",{className:(0,p.AH)({textStyle:"heading-bold-xs"}),children:q("BOOKING_STEP_1_LOCATION_MAP_TITLE")})}),(null==Q||null==(f=Q.images)?void 0:f[0])&&(0,i.FD)("div",{className:(0,p.AH)({pos:"relative",cursor:"pointer",mx:"-spacing-2",borderRadius:"default",overflow:"hidden"}),onClick:()=>V({src:Q.images[0],directions:ee}),children:[(0,i.Y)("img",{src:Q.images[0],alt:"",className:(0,p.AH)({h:{base:"60px",md:"80px"},objectFit:"cover",w:"full"})}),(0,i.Y)("div",{className:(0,p.cx)((0,g.Uu)({align:"center",justify:"center"}),(0,p.AH)({pos:"absolute",bottom:"spacing-4",right:"spacing-4",color:"white",filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))"})),children:(0,i.Y)(d.b,{size:"md"})})]}),(0,i.Y)(m.cG,{className:(0,p.AH)({w:"full"})}),(0,i.FD)("div",{className:(0,g.Uu)({direction:"column",gap:"spacing-4"}),children:[(0,i.FD)("div",{className:(0,g.Uu)({gap:"spacing-8",align:"center"}),children:[(0,i.Y)(u.P,{size:"xs",variant:"primary"}),(0,i.Y)("span",{className:(0,p.AH)({textStyle:"text-xs",color:"foreground-primary"}),children:(null==D?void 0:D.name)||q("BOOKING_STEP_1_LOCATION_MAP_DELIVERY_LOCATION")})]}),(0,i.FD)("div",{className:(0,g.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)(o.d,{size:"xs",variant:"primary"}),(0,i.FD)("span",{className:(0,p.AH)({textStyle:"text-xs",color:"foreground-primary"}),children:[Y&&h.Y.utc(Y).tz(T).calendar(),!Y&&q("BOOKING_STEP_1_LOCATION_MAP_DELIVERY_TIME")]})]})]})]}),anchor:"bottom"},"pickup-location"),ec&&ec.features.length>0&&(0,i.FD)(y.kL,{id:"hotspot-area-delivery",type:"geojson",data:ec,children:[(0,i.Y)(y.Wd,{id:"hotspot-area-delivery-fill",type:"fill",paint:{"fill-color":"#2866AB","fill-opacity":.1}}),(0,i.Y)(y.Wd,{id:"hotspot-area-delivery-outline",type:"line",paint:{"line-color":"#2866AB","line-width":2,"line-opacity":.6,"line-dasharray":[2,2]}})]}),en&&!en.isSuggestion&&!U&&!F&&(0,i.Y)(a.K4,{type:"delivery",tooltipContent:es,longitude:en.longitude,latitude:en.latitude}),U&&B&&B.length>0&&B.filter(e=>e.location).map(e=>{var t,n,a,r;let l=(null==(t=z[K])?void 0:t.name)===e.name,o=null!=J?J:"en",s=null!=(r=null==(a=e.translations)||null==(n=a[o])?void 0:n.name)?r:e.name;return(0,i.Y)(y.pH,{longitude:e.location.lon,latitude:e.location.lat,style:{zIndex:+!!l},anchor:"center",children:(0,i.FD)("button",{type:"button",className:(0,p.cx)((0,p.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0,pos:"relative"}),(0,g.Uu)({direction:"column",align:"center"}),(0,p.AH)({transition:"all 0.15s ease-in-out"}),(0,p.AH)({_hover:{scale:1.05}})),onClick:()=>{w._selectedMeetingPoint={...w._selectedMeetingPoint,[K]:e}},tabIndex:0,"aria-label":"Select meeting point ".concat(s),children:[(()=>{var t,n,a,r,c;let u=l&&!j,m=u?null==(t=e.images)?void 0:t[0]:null,h=u&&null!=(c=null!=(r=null==(a=e.translations)||null==(n=a[o])?void 0:n.meeting_point_directions)?r:e.meeting_point_directions)?c:null;return(0,i.FD)("div",{onClick:u?e=>e.stopPropagation():void 0,className:(0,p.cx)((0,g.Uu)({direction:"column"}),(0,p.AH)({pos:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",mb:"spacing-8",bg:"white",shadow:u?"lg":"sm",borderWidth:1,borderColor:l?"border-primary":"border-tertiary",overflow:"hidden",borderRadius:u?"default":"full",w:u?"280px":"auto",whiteSpace:u?"normal":"nowrap",cursor:u?"default":"pointer"})),children:[m&&(0,i.FD)("div",{className:(0,p.AH)({pos:"relative",curs
1or:"pointer"}),onClick:()=>V({src:m,directions:h}),children:[(0,i.Y)("img",{src:m,alt:"",loading:"eager",className:(0,p.AH)({w:"full",h:"140px",objectFit:"cover"})}),(0,i.Y)("div",{className:(0,p.cx)((0,g.Uu)({align:"center",justify:"center"}),(0,p.AH)({pos:"absolute",bottom:"spacing-4",right:"spacing-4",color:"white",filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))"})),children:(0,i.Y)(d.b,{size:"40"})})]}),(0,i.Y)("span",{className:(0,p.cx)((0,p.AH)({px:"spacing-8",py:"spacing-4",textStyle:"text-xs",fontWeight:l?"semibold":"regular",color:l?"foreground-accent-primary":"foreground-primary"}),!u&&(0,g.Uu)({align:"center",gap:"spacing-4"})),children:s}),h&&(0,i.Y)("span",{className:(0,p.AH)({textStyle:"text-xs",color:"foreground-secondary",px:"spacing-8",pb:"spacing-8",lineHeight:"relaxed"}),children:h})]})})(),(0,i.Y)("div",{className:(0,p.AH)({w:l?"20px":"14px",h:l?"20px":"14px",borderRadius:"full",bg:l?"background-accent-primary":"white",borderWidth:l?3:2,borderColor:l?"white":"border-primary",shadow:"md",transition:"all 0.15s ease-in-out"})})]})},"mp-".concat(e.name))}),F&&M&&M.length>0&&Array.from(eu.groups.entries()).map(e=>{let[t,n]=e,a=n.some(e=>{var t;return(null==(t=P[L])?void 0:t.id)===e.id}),r=n[0].location;return(0,i.Y)(y.pH,{longitude:r.lon,latitude:r.lat,anchor:"center",children:(0,i.Y)("button",{type:"button",className:(0,p.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),onClick:()=>{var e;let t=null==(e=P[L])?void 0:e.id,i=n.findIndex(e=>e.id===t),a=i>=0?n[(i+1)%n.length]:n[0];w._selectedTerminal={...w._selectedTerminal,[L]:a}},tabIndex:0,"aria-label":"Select terminal at this location",children:(0,i.Y)("div",{className:(0,p.AH)({w:a?"20px":"14px",h:a?"20px":"14px",borderRadius:"full",bg:a?"background-accent-primary":"white",borderWidth:a?3:2,borderColor:a?"white":"border-primary",shadow:"md",transition:"all 0.15s ease-in-out"})})})},"terminal-dot-".concat(t))}),F&&M&&M.length>0&&M.filter(e=>e.location).map(e=>{var t,n,a,r,l;let o=(null==(t=P[L])?void 0:t.id)===e.id,s=null!=J?J:"en",c=null!=(r=null==(a=e.translations)||null==(n=a[s])?void 0:n.name)?r:e.name,u=null!=(l=eu.labelYOffset.get(e.id))?l:-20;return(0,i.Y)(y.pH,{longitude:e.location.lon,latitude:e.location.lat,offset:[0,u],style:{zIndex:2},anchor:"center",children:(0,i.Y)("button",{type:"button",className:(0,p.cx)((0,p.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),(0,p.AH)({whiteSpace:"nowrap"}),(0,p.AH)({_hover:{scale:1.05}}),(0,p.AH)({transition:"all 0.15s ease-in-out"})),onClick:()=>{w._selectedTerminal={...w._selectedTerminal,[L]:e}},tabIndex:0,"aria-label":"Select terminal ".concat(e.name),children:(()=>{var t,n,a,r,l;let u=o&&!j,m=u?null==(t=e.images)?void 0:t[0]:null,h=u&&null!=(l=null!=(r=null==(a=e.translations)||null==(n=a[s])?void 0:n.meeting_point_directions)?r:e.meeting_point_directions)?l:null;return(0,i.FD)("div",{onClick:u?e=>e.stopPropagation():void 0,className:(0,p.cx)((0,g.Uu)({direction:"column"}),(0,p.AH)({bg:"white",shadow:u?"lg":"sm",borderWidth:1,borderColor:o?"border-accent-primary":"border-tertiary",overflow:"hidden",borderRadius:u?"default":"full",w:u?"280px":"auto",whiteSpace:u?"normal":"nowrap",cursor:u?"default":"pointer"})),children:[m&&(0,i.FD)("div",{className:(0,p.AH)({pos:"relative",cursor:"pointer"}),onClick:()=>V({src:m,directions:h}),children:[(0,i.Y)("img",{src:m,alt:"",loading:"eager",className:(0,p.AH)({w:"full",h:"140px",objectFit:"cover"})}),(0,i.Y)("div",{className:(0,p.cx)((0,g.Uu)({align:"center",justify:"center"}),(0,p.AH)({pos:"absolute",bottom:"spacing-4",right:"spacing-4",color:"white",filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))"})),children:(0,i.Y)(d.b,{size:"40"})})]}),(0,i.Y)("span",{className:(0,p.cx)((0,p.AH)({px:"spacing-8",py:"spacing-4",textStyle:"text-xs",fontWeight:o?"semibold":"regular",color:o?"foreground-accent-primary":"foreground-primary"}),!u&&(0,g.Uu)({align:"center",gap:"spacing-4"})),children:c}),h&&(0,i.Y)("span",{className:(0,p.AH)({textStyle:"text-xs",color:"foreground-secondary",px:"spacing-8",pb:"spacing-8",lineHeight:"relaxed"}),children:h})]})})()})},"terminal-label-".concat(e.id))}),D&&S&&!U&&!F&&(0,i.Y)(a.lX,{pickupLocation:{longitude:Number(D.point.lon),latitude:Number(D.point.lat)},deliveryLocation:{longitude:Number(S.point.lon),latitude:Number(S.point.lat)},pickupTime:Y,deliveryTime:O}),!S&&E&&Array.isArray(E)?ep.filter(e=>"suggestion"===e.type).map(e=>{var t;return(0,i.Y)(y.pH,{longitude:e.longitude,latitude:e.latitude,anchor:"bottom",children:(0,i.FD)("button",{type:"button",className:(0,p.cx)((0,p.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),(0,g.Uu)({direction:"column",align:"center"}),(0,p.AH)({transform:"auto",transition:"transform",transitionTimingFunction:"emphasized-in"}),(0,p.AH)({_hover:{scale:1.1}})),onClick:()=>et(e.suggestion),tabIndex:0,"aria-label":"Select location ".concat((null==(t=e.suggestion)?void 0:t.name)||""),children:[(0,i.FD)("svg",{width:30,height:40,viewBox:"0 0 24 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{filter:"drop-shadow(0px 2px 2px rgba(0,0,0,0.2))"},children:[(0,i.Y)("path",{d:"M12 0C5.373 0 0 5.373 0 12C0 21 12 34 12 34C12 34 24 21 24 12C24 5.373 18.627 0 12 0Z",fill:"#FF4E00"}),(0,i.Y)("circle",{cx:12,cy:12,r:4.5,fill:"white"})]}),(0,i.Y)("div",{className:(0,p.cx)((0,g.Uu)({direction:"column",align:"center"}),(0,p.AH)({bg:"white",px:"spacing-8",py:"spacing-4",mt:"-spacing-8"}),(0,p.AH)({textStyle:"text-xs",borderRadius:"default",shadow:"md"}),(0,p.AH)({borderWidth:1,borderColor:"border-primary!"}),(0,p.AH)({pos:"relative",zIndex:1})),children:(0,i.Y)("span",{children:((e,t)=>{var n,i,a;return null!=(a=null!=(i=(null==e?void 0:e.translations)&&(null==(n=e.translations[null!=J?J:"en"])?void 0:n[t]))?i:null==e?void 0:e[t])?a:""})(e.suggestion,"name")})})]})},e.id)}):null,!S&&ep.filter(e=>"other"===e.type).map(e=>(0,i.Y)(y.pH,{longitude:e.longitude,latitude:e.latitude,anchor:"bottom",children:(0,i.FD)("button",{type:"button",className:(0,p.cx)((0,p.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),(0,g.Uu)({direction:"column",align:"center"}),(0,p.AH)({transform:"auto",transition:"transform",transitionTimingFunction:"emphasized-in"}),(0,p.AH)({_hover:{scale:1.1}})),onClick:C,tabIndex:0,"aria-label":"Select other location in ".concat(e.operationArea),children:[(0,i.FD)("svg",{width:30,height:40,viewBox:"0 0 24 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{filter:"drop-shadow(0px 2px 2px rgba(0,0,0,0.2))"},children:[(0,i.Y)("path",{d:"M12 0C5.373 0 0 5.373 0 12C0 21 12 34 12 34C12 34 24 21 24 12C24 5.373 18.627 0 12 0Z",fill:"#2866AB"}),(0,i.Y)("circle",{cx:12,cy:12,r:4.5,fill:"white"}),(0,i.Y)("circle",{cx:12,cy:12,r:2,fill:"#2866AB"})]}),(0,i.Y)("div",{className:(0,p.cx)((0,g.Uu)({direction:"column",align:"center"}),(0,p.AH)({bg:"white",px:"spacing-8",py:"spacing-4",mt:"-spacing-8"}),(0,p.AH)({textStyle:"text-xs",borderRadius:"default",shadow:"md"}),(0,p.AH)({borderWidth:1,borderColor:"border-primary!"}),(0,p.AH)({pos:"relative",zIndex:1})),children:(0,i.Y)("span",{className:(0,p.AH)({fontWeight:"medium",color:"foreground-system-informative"}),children:q("BOOKING_STEP_1_OTHER_LOCATION")})})]})},e.id)),Z&&(0,b.createPortal)((0,i.FD)("div",{className:(0,p.AH)({pos:"fixed",inset:0,zIndex:"calc({zIndex.modal} + 100)",bg:"rgba(0, 0, 0, 0.9)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"spacing-16",cursor:"pointer",p:"spacing-16"}),onClick:()=>V(null),children:[(0,i.Y)("button",{type:"button",onClick:e=>{e.stopPropagation(),V(null)},className:(0,p.AH)({pos:"absolute",top:"spacing-16",right:"spacing-16",bg:"transparent",border:"none",cursor:"pointer",color:"white"}),children:(0,i.Y)(s.U,{size:"lg"})}),(0,i.Y)("img",{src:Z.src,alt:"",onClick:e=>e.stopPropagation(),className:(0,p.AH)({maxW:"100vw",maxH:Z.directions?"60vh":"100vh",objectFit:"contain",cursor:"default",touchAction:"pinch-zoom"})}),Z.directions&&(0,i.Y)("div",{onClick:e=>e.stopPropagation(),className:(0,p.AH)({color:"white",textStyle:"text-sm",textAlign:"center",maxW:"500px",lineHeight:"relaxed",cursor:"default"}),children:Z.directions})]}),document.body)]})})},58565:(e,t,n)=>{n.d(t,{R:()=>i});let i=(0,n(46261).w)({path:"M15.54 1.659a4.81 4.81 0 0 1 6.8 6.801l-1.434 1.434v.002h-.002L7.271 23.53a.75.75 0 0 1-.53.22H1A.7
15.75 0 0 1 .25 23v-5.741a.75.75 0 0 1 .22-.53zm-.905 3.026L1.75 17.57v4.68h4.68L19.315 9.365zm5.74 3.62-4.68-4.68.905-.906a3.31 3.31 0 1 1 4.68 4.68z",viewBox:"0 0 24 24"})},89312:(e,t,n)=>{n.d(t,{c:()=>T});var i=n(59557),a=n(24709),r=n(25859),l=n(26389),o=n(3007),s=n(13074),c=n(71389),d=n(92512),u=n(2310),p=n(86839),m=n(65893),g=n(25008),h=n(58565),f=n(55749),v=n(57304),b=n(87528),y=n(52125),x=n(79454),A=n(34023),C=n(56742),_=n(13427),N=n(11148),w=n(67896),Y=n(62794);function O(e){let{slug:t}=e;return(0,i.Y)("img",{src:(0,r.q)(t),alt:t,className:(0,f.AH)({width:"32px",height:"32px",borderRadius:"default",objectFit:"cover"})})}let T=(0,x.PA)(e=>{var t,n;let{onClickTooltipEdit:r,isLuggageStep:x}=e,T=(0,a.vU)(),D=(0,l.m2)(),{pickupTime:S,_currentTimezone:H,pickupLocation:I,onSetPickupLocation:k,onClearLocation:E,onChangeSelectedCity:R,selectedCity:P,_suggestions:F,_suggestionsLoading:M,_selectedTerminal:L,_isTerminalSelectorOpened:U,_isFlightNumberSelectorOpened:B,_terminals:z,_selectingTerminal:K,_isMeetingPointSelectorOpened:G,_isShipNameSelectorOpened:W,_hotspotMeetingPoints:j,_selectedMeetingPoint:Z,_selectingMeetingPoint:V,onSetHotspotMeetingPoint:q,_hotspotData:$}=D,{currentLanguage:J,cities:X}=(0,c.CU)(),{t:Q}=(0,c.c3)(),{current:ee}=(0,_.ko)(),et=(0,w.Ub)("(max-width: 768px)"),[en,ei]=(0,A.useState)(null),[ea,er]=(0,A.useState)(10),[el,eo]=(0,A.useState)(null),es=(0,A.useMemo)(()=>{if(I)return{latitude:I.point.lat,longitude:I.point.lon};if(P&&F&&F.length>0&&!M){let e=F.filter(e=>{var t,n;return(null==e?void 0:e.point)&&"number"==typeof(null==(t=e.point)?void 0:t.lat)&&"number"==typeof(null==(n=e.point)?void 0:n.lon)}).map(e=>({latitude:e.point.lat,longitude:e.point.lon}));if(0===e.length)return null;let t=e.reduce((e,t)=>(e.lat+=t.latitude,e.lon+=t.longitude,e),{lat:0,lon:0});return{latitude:t.lat/e.length,longitude:t.lon/e.length,isSuggestion:!0}}return null},[I,P,F,M]),{vehicles:ec,route:ed}=(0,a.T$)(es&&!es.isSuggestion?es:void 0,!1),eu=(0,A.useMemo)(()=>{let e=new N.A({radius:120,maxZoom:8,minZoom:8});if(!F||!Array.isArray(F))return e.load([]),e;let t=new Map;F.filter(e=>{var t,n;return(null==e?void 0:e.point)&&"number"==typeof(null==(t=e.point)?void 0:t.lon)&&"number"==typeof(null==(n=e.point)?void 0:n.lat)&&e.operationArea}).forEach(e=>{t.has(e.operationArea)||t.set(e.operationArea,[]),t.get(e.operationArea).push([Number(e.point.lon),Number(e.point.lat)])});let n=new Map;t.forEach((e,t)=>{let i=null==X?void 0:X.find(e=>e.slug===t);if(null==i?void 0:i.center)n.set(t,[i.center.lon,i.center.lat]);else{let i=e.reduce((e,t)=>e+t[0],0)/e.length,a=e.reduce((e,t)=>e+t[1],0)/e.length;n.set(t,[i,a])}});let i=F.filter(e=>{var t,n;return(null==e?void 0:e.point)&&"number"==typeof(null==(t=e.point)?void 0:t.lon)&&"number"==typeof(null==(n=e.point)?void 0:n.lat)}).map((e,t)=>{var i;return{type:"Feature",properties:{cluster:!1,suggestionIndex:t,suggestion:e,isOtherLocation:!1},geometry:{type:"Point",coordinates:null!=(i=n.get(e.operationArea))?i:[Number(e.point.lon),Number(e.point.lat)]}}}),a=Array.from(n.entries()).map((e,t)=>{let[n,i]=e;return{type:"Feature",properties:{cluster:!1,otherLocationIndex:t,operationArea:n,isOtherLocation:!0},geometry:{type:"Point",coordinates:i}}});return e.load([...i,...a]),e},[F,X]),ep=(0,A.useMemo)(()=>{if(!F||!X)return null;let e=new Set;return F.filter(e=>{var t,n;return(null==e?void 0:e.point)&&"number"==typeof(null==(t=e.point)?void 0:t.lon)&&"number"==typeof(null==(n=e.point)?void 0:n.lat)}).forEach(t=>{t.operationArea&&e.add(t.operationArea)}),{type:"FeatureCollection",features:Array.from(e).flatMap(e=>{let t=X.find(t=>t.slug===e);if(!(null==t?void 0:t.area))return[];try{let n=JSON.parse(t.area);if("FeatureCollection"===n.type&&Array.isArray(n.features))return n.features.filter(e=>null==e?void 0:e.geometry).map(t=>({type:"Feature",properties:{operationArea:e,...t.properties},geometry:t.geometry}));if("Feature"===n.type&&n.geometry)return[{type:"Feature",properties:{operationArea:e,...n.properties},geometry:n.geometry}];return[{type:"Feature",properties:{operationArea:e},geometry:n}]}catch(e){return o.I.notify(e),[]}})}},[F,X]),em=(0,A.useMemo)(()=>
1{if(!G||!(null==$?void 0:$.area))return null;try{let e=JSON.parse($.area);return{type:"FeatureCollection",features:[{type:"Feature",properties:{hotspotId:$.id},geometry:e}]}}catch(e){return null}},[G,$]),eg=(0,A.useMemo)(()=>{if(!el||!eu)return[];try{return eu.getClusters(el,Math.floor(ea))}catch(e){return[]}},[el,ea,eu]),eh=(0,A.useCallback)(async e=>{await k(e)},[k]),ef=(0,A.useCallback)((e,t)=>{if(!ee)return;let n=null==F?void 0:F.filter(e=>e.operationArea===t),i=null==n?void 0:n.reduce((e,t)=>(t.point&&e.push([Number(t.point.lon),Number(t.point.lat)]),e),[]);if(!i)return;let a=(0,Y.A)(i);a&&ee.fitBounds&&ee.fitBounds(a,{maxZoom:12,duration:600,animate:!0,essential:!0,...et?{padding:T}:{}})},[F,ee,et,T]),ev=(0,A.useCallback)(()=>{if(ee){let e=ee.getBounds(),t=ee.getZoom();if(e){let n=e.getWest(),i=e.getSouth(),a=e.getEast(),r=e.getNorth(),l=(r-i)*.3,o=(a-n)*.5;eo([n-o,i-l,a+o,r+l]),er(t)}}},[ee]),eb=(0,A.useCallback)(()=>{if(!I&&!x&&F&&F.length>0&&ee){let e=F.reduce((e,t)=>(t.point&&e.push([Number(t.point.lon),Number(t.point.lat)]),e),[]),t=(0,Y.A)(e);t&&ee.fitBounds(t,{maxZoom:12,duration:600,animate:!0,essential:!0,...et?{padding:T}:{}})}},[F,I,ee,T,et]);(0,A.useEffect)(()=>{if(ee)return ee.on("move",ev),()=>{ee.off("move",ev)}},[ee,ev]),(0,A.useEffect)(()=>{if(ee)return ee.loaded()?void ev():(ee.once("load",ev),()=>{ee.off("load",ev)})},[ee,ev]),(0,A.useEffect)(()=>{ee&&ee.loaded()&&ev()},[F,I,ee,ev]),(0,A.useEffect)(()=>{eb()},[eb]);let ey=null==Z?void 0:Z.PICKUP,ex=(0,A.useMemo)(()=>{var e,t,n,i;if(!ey)return null;let a=null!=J?J:"en";return null!=(i=null!=(n=null==(t=ey.translations)||null==(e=t[a])?void 0:e.meeting_point_directions)?n:ey.meeting_point_directions)?i:null},[ey,J]),eA=(0,A.useMemo)(()=>{var e,t,n,i;let a=null==L?void 0:L.PICKUP;if(!a)return null;let r=null!=J?J:"en";return null!=(i=null!=(n=null==(t=a.translations)||null==(e=t[r])?void 0:e.meeting_point_directions)?n:a.meeting_point_directions)?i:null},[L,J]),eC=(0,A.useMemo)(()=>{if(I){var e,t,n,i,a,r;if(L.PICKUP){let i=null!=J?J:"en",a=null!=(n=null==(t=L.PICKUP.translations)||null==(e=t[i])?void 0:e.name)?n:L.PICKUP.name;return"".concat(I.name," | ").concat(a)}if(ey){let e=null!=J?J:"en";return null!=(r=null==(a=ey.translations)||null==(i=a[e])?void 0:i.name)?r:ey.name}return I.name}return Q("BOOKING_STEP_1_LOCATION_MAP_PICKUP_LOCATION")},[I,Q,L,ey,J]),e_=(0,A.useMemo)(()=>{var e;return(0,i.FD)("div",{className:(0,f.cx)((0,b.Uu)({direction:"column",gap:"spacing-8"}),(0,f.AH)({position:"relative",p:"spacing-2"})),children:[(!!I||!!S)&&(0,i.FD)(i.FK,{children:[(0,i.FD)("div",{className:(0,b.Uu)({justify:"space-between",align:"flex-start"}),children:[(0,i.FD)("div",{className:(0,b.Uu)({direction:"column",flex:1}),children:[(0,i.Y)("span",{className:(0,f.AH)({textStyle:"heading-bold-sm",mb:"spacing-2"}),children:Q("BOOKING_STEP_1_LOCATION_MAP_TITLE")}),!(ex||eA)&&(0,i.Y)("span",{className:(0,f.AH)({color:"foreground-secondary",textStyle:"text-xs"}),children:Q("BOOKING_STEP_1_LOCATION_MAP_DESCRIPTION")})]}),(0,i.Y)(p.k,{size:"sm",onClick:()=>E("pickup"),className:(0,f.AH)({cursor:"pointer",flexShrink:0})})]}),(null==ey||null==(e=ey.images)?void 0:e[0])&&(0,i.FD)("div",{className:(0,f.AH)({pos:"relative",cursor:"pointer",mx:"-spacing-2",borderRadius:"default",overflow:"hidden"}),onClick:()=>ei({src:ey.images[0],directions:ex||eA}),children:[(0,i.Y)("img",{src:ey.images[0],alt:"",className:(0,f.AH)({h:{base:"60px",md:"80px"},objectFit:"cover",w:"full"})}),(0,i.Y)("div",{className:(0,f.cx)((0,b.Uu)({align:"center",justify:"center"}),(0,f.AH)({pos:"absolute",bottom:"spacing-4",right:"spacing-4",color:"white",filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))"})),children:(0,i.Y)(m.b,{size:"40"})})]}),(0,i.Y)(v.cG,{className:(0,f.AH)({w:"full"})})]}),(0,i.Y)("button",{className:(0,b.Uu)({direction:"column",gap:"spacing-4",cursor:"pointer"}),onClick:r,children:(0,i.FD)("div",{className:(0,b.Uu)({justify:"space-between",align:"center",gap:"spacing-8"}),children:[(0,i.FD)("div",{children:[(0,i.FD)("div",{className:(0,b.Uu)({gap:"spacing-8",align:"center"}),children:[(0,i.Y)(g.v,{size:"xs",variant:"primary"}),(0,i.Y)("span",{className:(0,f.AH)({textStyle:"text-xs",color:"foreground-primary",textAlign:"left",textWrap:"balance"}),children:eC})]}),(0,i.FD)("div",{className:(0,b.Uu)({align:"center",gap:"spacing-8"}),children:[(0,i.Y)(d.d,{size:"xs",variant:"primary"}),(0,i.FD)("span",{className:(0,f.AH)({textStyle:"text-xs",color:"foreground-primary"}
1),children:[S&&y.Y.utc(S).tz(H).locale((0,s.vI)(J)).calendar(),!S&&Q("BOOKING_STEP_1_LOCATION_MAP_PICKUP_TIME")]})]})]}),(0,i.Y)(h.R,{size:"xs"})]})})]})},[I,S,Q,r,eC,H,J,E,ex,eA]);(0,A.useEffect)(()=>{if(ee&&es&&ed&&!es.isSuggestion&&!G&&!U){try{let e=[...ed.coordinates,[es.longitude,es.latitude]],t=(0,Y.A)(e);t&&ee.fitBounds(t,{duration:2e3,animate:!0,essential:!0,...et?{padding:T}:{}})}catch(e){}return}!ee||!es||es.isSuggestion||G||U||ee.flyTo({essential:!0,duration:600,...et?{padding:T}:{},zoom:14,center:[null==es?void 0:es.longitude,null==es?void 0:es.latitude]})},[es,ed,ee,T,et,G,U]),(0,A.useEffect)(()=>{var e;if(!ee||!G||!(null==j?void 0:j.length)||(null==Z||null==(e=Z[V])?void 0:e.location))return;let t=D._selectorDrawerHeight;if(et&&0===t)return;let n=setTimeout(()=>{var e;ee.stop();let n=j.filter(e=>e.location).map(e=>[e.location.lon,e.location.lat]);if(0===n.length)return;let i={top:40,left:40,right:40,bottom:40};if(!et){if(1===n.length)ee.flyTo({center:n[0],zoom:15,duration:600,essential:!0,padding:i});else{let e=(0,Y.A)(n);e&&ee.fitBounds(e,{duration:600,animate:!0,essential:!0,padding:i})}return}let a=ee.getContainer().getBoundingClientRect(),r=window.innerHeight-t-148-a.top;ee.unproject([a.width/2,r/2]);let l=n.map(e=>e[1]),o=n.map(e=>e[0]),s=(Math.min(...o)+Math.max(...o))/2,c=(Math.min(...l)+Math.max(...l))/2,d=(0,Y.A)(n),u=d?ee.cameraForBounds(d,{padding:{top:60,left:60,right:60,bottom:40}}):null,p=Math.min(null!=(e=null==u?void 0:u.zoom)?e:15,17);ee.flyTo({center:[s,c],zoom:p,duration:600,essential:!0,padding:{top:0,left:0,right:0,bottom:Math.round(a.height-r)}})},100);return()=>clearTimeout(n)},[G,j,ee,et,D._selectorDrawerHeight]),(0,A.useEffect)(()=>{var e;if(!ee||!U||!(null==z?void 0:z.length)||(null==L||null==(e=L[K])?void 0:e.location))return;let t=D._selectorDrawerHeight;if(et&&0===t)return;let n=setTimeout(()=>{var e;ee.stop();let n=z.filter(e=>e.location).map(e=>[e.location.lon,e.location.lat]);if(0===n.length)return;if(!et){if(1===n.length)ee.flyTo({center:n[0],zoom:17,duration:600,essential:!0,padding:{top:40,left:40,right:40,bottom:40}});else{let e=(0,Y.A)(n);e&&ee.fitBounds(e,{maxZoom:17,duration:600,animate:!0,essential:!0,padding:{top:40,left:40,right:40,bottom:40}})}return}let i=ee.getContainer().getBoundingClientRect(),a=window.innerHeight-t-148-i.top,r=n.map(e=>e[1]),l=n.map(e=>e[0]),o=(Math.min(...l)+Math.max(...l))/2,s=(Math.min(...r)+Math.max(...r))/2,c=(0,Y.A)(n),d=c?ee.cameraForBounds(c,{padding:{top:60,left:60,right:60,bottom:40}}):null,u=Math.min(null!=(e=null==d?void 0:d.zoom)?e:15,17);ee.flyTo({center:[o,s],zoom:u,duration:600,essential:!0,padding:{top:0,left:0,right:0,bottom:Math.round(i.height-a)}})},100);return()=>clearTimeout(n)},[U,z,L,ee,et,D._selectorDrawerHeight]);let eN=G?null==Z||null==(t=Z[V])?void 0:t.location:U?null==L||null==(n=L[K])?void 0:n.location:null;(0,A.useEffect)(()=>{if(!ee||!eN)return;let e=D._selectorDrawerHeight;et&&0===e||ee.flyTo({center:[eN.lon,eN.lat],zoom:U?17:16,duration:600,essential:!0,padding:{top:40,left:40,right:40,bottom:e+40}})},[null==eN?void 0:eN.lat,null==eN?void 0:eN.lon,ee,U,et,D._selectorDrawerHeight]);let ew=(0,A.useMemo)(()=>{let e=new Map,t=new Map;return z&&(z.filter(e=>e.location).forEach(t=>{let n="".concat(t.location.lat,",").concat(t.location.lon);e.has(n)||e.set(n,[]),e.get(n).push(t)}),e.forEach(e=>{e.forEach((e,n)=>{t.set(e.id,-(34*n+30))})})),{groups:e,labelYOffset:t}},[z]);return(0,i.FD)(i.FK,{children:[ep&&ep.features.length>0&&(0,i.FD)(_.kL,{id:"operation-area-polygons",type:"geojson",data:ep,children:[(0,i.Y)(_.Wd,{id:"operation-area-outline",type:"line",paint:{"line-color":"#FF4E00","line-width":2,"line-opacity":.8}}),(0,i.Y)(_.Wd,{id:"operation-area-fill",type:"fill",paint:{"fill-color":"#FF4E00","fill-opacity":0}})]}),em&&em.features.length>0&&(0,i.FD)(_.kL,{id:"hotspot-area",type:"geojson",data:em,children:[(0,i.Y)(_.Wd,{id:"hotspot-area-fill",type:"fill",paint:{"fill-color":"#2866AB","fill-opacity":.1}}),(0,i.Y)(_.Wd,{id:"hotspot-area-outline",type:"line",paint:{"line-color":"#2866AB","line-width":2,"line-opacity":.6,"line-dasharray":[2,2]}})]}),es&&!es.isSuggestion&&(!G||W)&&(!U||B)&&(0,i.Y)(a.K4,{type:"pickup",tooltipContent:e_,longitude:es.longitude,latitude:es.latitude}),G&&!W&&j&&j.length>0&&j.filter(e=>e.location).map(e=>{var t,n,a,r;let l=(null==(t=Z[V])?void 0:t.name)===e.name,o=null!=J?J:"en",s=null!=(r=null==(a=e.translations)||null==(n=a[o])?void 0:n.name)?r:e.name;return(0,i.Y)(_.pH,{longitude:e.location.lon,latitude:e.location.lat,style:{zIndex:+!!l},anchor:"center",children:(0,i.FD)("button",{type:"button",className:(0,f.cx)((0,f.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0,pos:"relative"}),(0,b.Uu)({direction:"column",align:"center"}),(0,f.AH)({transition:"all 0.15s ease-in-out"}),(0,f.AH)({_hover:{scale:1.05}})),onClick:()=>{D._selectedMeetingPoint={...D._selectedMeetingPoint,[V]:e}},tabIndex:0,"aria-label":"Select meeting point ".concat(s),children:[(()=>{var t,n,a,r,c;let d=l&&!et,u=d?null==(t=e.images)?void 0:t[0]:null,p=d&&null!=(c=null!=(r=null==(a=e.translations)||null==(n=a[o])?void 0:n.meeting_point_directions)?r:e.meeting_point_directions)?c:null;return(0,i.FD)("div",{onClick:d?e=>e.stopPropagation():void 0,className:(0,f.cx)((0,b.Uu)({direction:"column"}),(0,f.AH)({pos:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",mb:"spacing-8",bg:"white",shadow:d?"lg":"sm",borderWidth:1,borderColor:l?"border-primary":"border-tertiary",overflow:"hidden",borderRadius:d?"default":"full",w:d?"280px":"auto",whiteSpace:d?"normal":"nowrap",cursor:d?"default":"pointer"})),children:[u&&(0,i.FD)("div",{className:(0,f.AH)({pos:"relative",curs
1or:"pointer"}),onClick:()=>ei({src:u,directions:p}),children:[(0,i.Y)("img",{src:u,alt:"",loading:"eager",className:(0,f.AH)({w:"full",h:"140px",objectFit:"cover"})}),(0,i.Y)("div",{className:(0,f.cx)((0,b.Uu)({align:"center",justify:"center"}),(0,f.AH)({pos:"absolute",bottom:"spacing-4",right:"spacing-4",color:"white",filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))"})),children:(0,i.Y)(m.b,{size:"40"})})]}),(0,i.Y)("span",{className:(0,f.cx)((0,f.AH)({px:"spacing-8",py:"spacing-4",textStyle:"text-xs",fontWeight:l?"semibold":"regular",color:l?"foreground-accent-primary":"foreground-primary"}),!d&&(0,b.Uu)({align:"center",gap:"spacing-4"})),children:s}),p&&(0,i.Y)("span",{className:(0,f.AH)({textStyle:"text-xs",color:"foreground-secondary",px:"spacing-8",pb:"spacing-8",lineHeight:"relaxed"}),children:p})]})})(),(0,i.Y)("div",{className:(0,f.AH)({w:l?"20px":"14px",h:l?"20px":"14px",borderRadius:"full",bg:l?"background-accent-primary":"white",borderWidth:l?3:2,borderColor:l?"white":"border-primary",shadow:"md",transition:"all 0.15s ease-in-out"})})]})},"mp-".concat(e.name))}),U&&!B&&z&&z.length>0&&Array.from(ew.groups.entries()).map(e=>{let[t,n]=e,a=n.some(e=>{var t;return(null==(t=L[K])?void 0:t.id)===e.id}),r=n[0].location;return(0,i.Y)(_.pH,{longitude:r.lon,latitude:r.lat,anchor:"center",children:(0,i.Y)("button",{type:"button",className:(0,f.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),onClick:()=>{var e;let t=null==(e=L[K])?void 0:e.id,i=n.findIndex(e=>e.id===t),a=i>=0?n[(i+1)%n.length]:n[0];D._selectedTerminal={...D._selectedTerminal,[K]:a}},tabIndex:0,"aria-label":"Select terminal at this location",children:(0,i.Y)("div",{className:(0,f.AH)({w:a?"20px":"14px",h:a?"20px":"14px",borderRadius:"full",bg:a?"background-accent-primary":"white",borderWidth:a?3:2,borderColor:a?"white":"border-primary",shadow:"md",transition:"all 0.15s ease-in-out"})})})},"terminal-dot-".concat(t))}),U&&!B&&z&&z.length>0&&z.filter(e=>e.location).map(e=>{var t,n,a,r,l;let o=(null==(t=L[K])?void 0:t.id)===e.id,s=null!=J?J:"en",c=null!=(r=null==(a=e.translations)||null==(n=a[s])?void 0:n.name)?r:e.name,d=null!=(l=ew.labelYOffset.get(e.id))?l:-20;return(0,i.Y)(_.pH,{longitude:e.location.lon,latitude:e.location.lat,offset:[0,d],style:{zIndex:2},anchor:"center",children:(0,i.Y)("button",{type:"button",className:(0,f.cx)((0,f.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),(0,f.AH)({whiteSpace:"nowrap"}),(0,f.AH)({_hover:{scale:1.05}}),(0,f.AH)({transition:"all 0.15s ease-in-out"})),onClick:()=>{D._selectedTerminal={...D._selectedTerminal,[K]:e}},tabIndex:0,"aria-label":"Select terminal ".concat(e.name),children:(()=>{var t,n,a,r,l;let d=o&&!et,u=d?null==(t=e.images)?void 0:t[0]:null,p=d&&null!=(l=null!=(r=null==(a=e.translations)||null==(n=a[s])?void 0:n.meeting_point_directions)?r:e.meeting_point_directions)?l:null;return(0,i.FD)("div",{onClick:d?e=>e.stopPropagation():void 0,className:(0,f.cx)((0,b.Uu)({direction:"column"}),(0,f.AH)({bg:"white",shadow:d?"lg":"sm",borderWidth:1,borderColor:o?"border-accent-primary":"border-tertiary",overflow:"hidden",borderRadius:d?"default":"full",w:d?"280px":"auto",whiteSpace:d?"normal":"nowrap",cursor:d?"default":"pointer"})),children:[u&&(0,i.FD)("div",{className:(0,f.AH)({pos:"relative",cursor:"pointer"}),onClick:()=>ei({src:u,directions:p}),children:[(0,i.Y)("img",{src:u,alt:"",loading:"eager",className:(0,f.AH)({w:"full",h:"140px",objectFit:"cover"})}),(0,i.Y)("div",{className:(0,f.cx)((0,b.Uu)({align:"center",justify:"center"}),(0,f.AH)({pos:"absolute",bottom:"spacing-4",right:"spacing-4",color:"white",filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))"})),children:(0,i.Y)(m.b,{size:"40"})})]}),(0,i.Y)("span",{className:(0,f.cx)((0,f.AH)({px:"spacing-8",py:"spacing-4",textStyle:"text-xs",fontWeight:o?"semibold":"regular",color:o?"foreground-accent-primary":"foreground-primary"}),!d&&(0,b.Uu)({align:"center",gap:"spacing-4"})),children:c}),p&&(0,i.Y)("span",{className:(0,f.AH)({textStyle:"text-xs",color:"foreground-secondary",px:"spacing-8",pb:"spacing-8",lineHeight:"relaxed"}),children:p})]})})()})},"terminal-label-".concat(e.id))}),!I&&eg&&eg.length>0?eg.map(e=>{var t,n,a,l,o;let[s,c]=e.geometry.coordinates,{cluster:d,point_count:u}=e.properties;if(d){let t=null==(a=eu.getLeaves(e.id,1/0)[0])?void 0:a.properties,n=null!=(o=null==t?void 0:t.operationArea)?o:null==t||null==(l=t.suggestion)?void 0:l.operationArea;
1return(0,i.Y)(_.pH,{longitude:s,latitude:c,anchor:"center",children:(0,i.Y)("button",{type:"button",className:(0,f.cx)((0,f.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0,_hover:{scale:1.05},transform:"translateZ(0)",transition:"transform 200ms ease"}),(0,b.Uu)({direction:"column",align:"center"})),onClick:()=>ef(e,n),tabIndex:0,"aria-label":"".concat(u," locations available in this area"),children:(0,i.FD)("div",{className:(0,f.cx)((0,f.AH)({bg:"white",px:"spacing-12",py:"spacing-6",mt:"-spacing-12",borderRadius:"default",borderWidth:1,borderColor:"border-primary"}),(0,b.Uu)({direction:{base:"column",md:"row"},align:"center",gap:"spacing-8"})),children:[(0,i.Y)(O,{slug:n}),(0,i.FD)("div",{className:(0,b.Uu)({direction:"column",align:"flex-start"}),children:[(0,i.Y)("span",{className:(0,f.AH)({textStyle:{base:"text-xs",md:"text-sm"},fontWeight:"semibold",color:"foreground-primary",textTransform:"capitalize",lineHeight:"initial"}),children:n}),(0,i.Y)("span",{className:(0,f.AH)({textStyle:"text-xs",hideBelow:"md",color:"foreground-secondary"}),children:Q("BOOKING_LOCATION_MAP_CLICK_TO_EXPLORE")})]})]})})},"cluster-".concat(e.id))}if(e.properties.isOtherLocation){let t=e.properties.operationArea;return(0,i.Y)(_.pH,{longitude:s,latitude:c,anchor:"bottom",children:(0,i.FD)("button",{type:"button",className:(0,f.cx)((0,f.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),(0,b.Uu)({direction:"column",align:"center"}),(0,f.AH)({transform:"translateZ(0)",transition:"transform",transitionTimingFunction:"ease-in-out"}),(0,f.AH)({_hover:{scale:1.1}})),onClick:r,tabIndex:0,"aria-label":"Select other location in ".concat(t),children:[(0,i.FD)("svg",{width:30,height:40,viewBox:"0 0 24 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{filter:"drop-shadow(0px 2px 2px rgba(0,0,0,0.2))"},children:[(0,i.Y)("path",{d:"M12 0C5.373 0 0 5.373 0 12C0 21 12 34 12 34C12 34 24 21 24 12C24 5.373 18.627 0 12 0Z",fill:"#2866AB"}),(0,i.Y)("circle",{cx:12,cy:12,r:4.5,fill:"white"}),(0,i.Y)("circle",{cx:12,cy:12,r:2,fill:"#2866AB"})]}),(0,i.Y)("div",{className:(0,f.cx)((0,f.AH)({bg:"white",px:"spacing-8",py:"spacing-4",mt:"-spacing-8"}),(0,f.AH)({textStyle:"text-xs",borderRadius:"default",shadow:"md"}),(0,f.AH)({borderWidth:1,borderColor:"border-primary!"}),(0,f.AH)({pos:"relative",zIndex:1}),(0,b.Uu)({direction:"column",align:"center"})),children:(0,i.Y)("span",{className:(0,f.AH)({fontWeight:"medium",color:"foreground-system-informative"}),children:Q("BOOKING_STEP_1_OTHER_LOCATION")})})]})},"other-location-".concat(e.properties.otherLocationIndex))}let p=e.properties.suggestion,m=Number(null==(t=p.point)?void 0:t.lon)||s,g=Number(null==(n=p.point)?void 0:n.lat)||c;return(0,i.Y)(_.pH,{longitude:m,latitude:g,anchor:"bottom",children:(0,i.FD)("button",{type:"button",className:(0,f.cx)((0,f.AH)({bg:"transparent",border:"none",cursor:"pointer",padding:0}),(0,b.Uu)({direction:"column",align:"center"}),(0,f.AH)({transform:"translateZ(0)",transition:"transform",transitionTimingFunction:"ease-in-out"}),(0,f.AH)({_hover:{scale:1.1}})),onClick:()=>eh(p),tabIndex:0,"aria-label":"Select location ".concat(p.name||""),children:[(0,i.FD)("svg",{width:30,height:40,viewBox:"0 0 24 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{filter:"drop-shadow(0px 2px 2px rgba(0,0,0,0.2))"},children:[(0,i.Y)("path",{d:"M12 0C5.373 0 0 5.373 0 12C0 21 12 34 12 34C12 34 24 21 24 12C24 5.373 18.627 0 12 0Z",fill:"#FF4E00"}),(0,i.Y)("circle",{cx:12,cy:12,r:4.5,fill:"white"})]}),(0,i.Y)("div",{className:(0,f.cx)((0,f.AH)({bg:"white",px:"spacing-8",py:"spacing-4",mt:"-spacing-8"}),(0,f.AH)({textStyle:"text-xs",borderRadius:"default",shadow:"md"}),(0,f.AH)({borderWidth:1,borderColor:"border-primary!"}),(0,f.AH)({pos:"relative",zIndex:1}),(0,b.Uu)({direction:"column",align:"center"})),children:(0,i.Y)("span",{children:((e,t)=>{var n,i,a;return null!=(a=null!=(i=(null==e?void 0:e.translations)&&(null==(n=e.translations[null!=J?J:"en"])?void 0:n[t]))?i:null==e?void 0:e[t])?a:""})(p,"name")})})]})},"marker-".concat(e.properties.suggestionIndex))}):null,en&&(0,C.createPortal)((0,i.FD)("div",{className:(0,f.AH)({pos:"fixed",inset:0,zIndex:"calc({zIndex.modal} + 100)",bg:"rgba(0, 0, 0, 0.9)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"spacing-16",cursor:"pointer",p:"spacing-16"}),onClick:()=>ei(null),children:[(0,i.Y)("button",{type:"button",onClick:e=>{e.stopPropagation(),ei(null)},className:(0,f.AH)({pos:"absolute",top:"spacing-16",right:"spacing-16",bg:"transparent",border:"none",cursor:"pointer",color:"white"}),children:(0,i.Y)(u.U,{size:"lg"})}),(0,i.Y)("img",{src:en.src,alt:"",onClick:e=>e.stopPropagation(),className:(0,f.AH)({maxW:"100vw",maxH:en.directions?"60vh":"100vh",objectFit:"contain",cursor:"default",touchAction:"pinch-zoom"})}),en.directions&&(0,i.Y)("div",{onClick:e=>e.stopPropagation(),className:(0,f.AH)({color:"white",textStyle:"text-sm",textAlign:"center",maxW:"500px",lineHeight:"relaxed",cursor:"default"}),children:en.directions})]}),document.body)]})})}}]); 2//# sourceMappingURL=4736-3b79e12ec97508e2.js.map 3//# chunkId=01a0c393-defd-70f2-b585-f50c64a71ef8
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.