PageSourceSearch

https://www.abercrombiekent.com/_next/static/chunks/2021-48c3f13b857433f5.js

js abercrombiekent.com collected 2026-10-02 11:41:02 UTC 26,559 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2021],{27493:function(e,t,i){i.d(t,{Z:function(){return k}});var o=i(85893),l=i(34736),n=i(67294),a=i(38090),s=i(49737),r=i(80061),d=i(65110),u=i(34065),c=i(98903),g=i(37294),m=i(40121),v=i(9473),p=i(33299),f=i(71419),x=i(67878),y=i(2058),b=i(3085),h=e=>{let{modalOpen:t,closeModal:i,setModalOpen:n,setFilterLoading:h,state:k,setState:_}=e,S=(0,u.a)("(max-width: 960px)"),{update:w}=(0,p.useSession)(),N=(0,v.v9)(b.S8),j=(0,c.c)({validateInputOnChange:!0,initialValues:{firstName:"",lastName:"",bkgid:""},validate:{firstName:e=>null,lastName:e=>e.length<2?"Last Name is too short":/^[a-zA-Z\s-']+$/.test(e)?null:"Please enter a valid last name",bkgid:e=>e.length>=2?null:"Booking ID is too short"}}),I=(0,v.I0)(),{textInputStyles:C}=(0,m.Z)(),{logEventPrivateArea:L}=(0,f.o)(),B=async e=>{_({...k,loading:!0}),h&&h(!0);let t=await (0,g.zC)({firstName:e.firstName,lastName:e.lastName,bkgId:e.bkgid});_({...k,bookingFound:t}),n(!0),j.reset(),t&&(L("form_submit",{event_category:"find-a-booking"}),w({ub:!0}).then(async()=>{await w()}).finally(()=>{I((0,y.bG)({email:N.email})),I((0,x.EO)(!0)),h&&h(!1)})),_({...k,loading:!1,bookingFound:t,showSuccessMessage:!0}),h&&h(!1)};return(0,o.jsxs)(a.u,{opened:t,onClose:i,radius:0,centered:!0,overlayColor:"#000000",padding:"lg",overlayBlur:3,overflow:"outside",zIndex:1400,withCloseButton:!1,closeOnEscape:!1,fullScreen:S,withinPortal:!0,className:"mx-auto h-full w-[100%] max-w-[800px]  sm:w-[calc(100%-40px)]",classNames:{modal:"h-full sm:max-h-[520px] rounded-[0]",body:"h-full",inner:"overflow-hidden [@media_(max-height:768px)]:items-start transition-all"},children:[(0,o.jsx)(d.u5Z,{size:"24",onClick:i,className:"z-[400] ml-auto mr-6 mt-6  cursor-pointer"}),(0,o.jsx)(s.f,{visible:k.loading,className:"mantine-loading-with-lower-z-index"}),k.showSuccessMessage&&(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center px-[84px] pb-[42px] text-center",children:[(0,o.jsx)("h2",{className:"mb-3 text-[54px] font-[100] leading-[60px]",children:k.bookingFound?"Booking Found":"Booking Not Found"}),k.bookingFound?(0,o.jsx)("p",{className:"text-[18px] font-[300] leading-[24px]",children:"We found the information linked to your name and it should appear on your dashboard shortly."}):(0,o.jsx)("p",{className:"text-[18px] font-[300] leading-[24px]",children:"We could not find your booking, please double check your information."}),(0,o.jsx)(l.k,{onClick:i,className:"cta-black cta-hover-warm-sand button&subheader mt-[64px] flex cursor-pointer items-center",children:"Close"})]}),!k.showSuccessMessage&&(0,o.jsxs)("form",{onSubmit:j.onSubmit(B),className:"flex flex-col gap-[24px] px-[32px] pb-[42px] sm:gap-[32px] sm:px-[84px]",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-[16px] text-center",children:[(0,o.jsx)("h2",{className:"text-[36px] font-[100] leading-[42px] sm:text-[54px] sm:leading-[60px]",children:"Find Your Booking"}),(0,o.jsx)("p",{className:"text-left text-[18px] font-[300] leading-[24px] sm:text-center",children:"Access a booking by completing the form below. All fields are required."})]}),(0,o.jsxs)("div",{className:"flex w-full max-w-[606px] flex-col justify-between gap-[12px] sm:gap-[16px]",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,o.jsxs)("div",{className:"w-full",children:[(0,o.jsx)(r.o,{type:"text",label:"First Name*",placeholder:"First Name*",classNames:C,...j.getInputProps("firstName"),styles:{input:{width:"100%",height:"42px",lineHeight:"42px",borderRadius:"5px"}}}),!j.errors.firstName&&(0,o.jsx)("div",{className:"h-[18px]"})]}),(0,o.jsxs)("div",{className:"w-full",children:[(0,o.jsx)(r.o,{label:"Last Name*",type:"text",classNames:C,placeholder:"Last Name*",...j.getInputProps("lastName"),styles:{input:{width:"100%",height:"42px",lineHeight:"42px",borderRadius:"5px"}}}),!j.errors.lastName&&(0,o.jsx)("div",{className:"h-[18px]"})]})]}),(0,o.jsxs)("div",{className:"w-full",children:[(0,o.jsx)(r.o,{label:"Booking ID*",placeholder:"Booking ID*",classNames:C,...j.getInputProps("bkgid"),styles:{input:{width:"100%",height:"42px",lineHeight:"42px",borderRadius:"5px"}}}),!j.errors.bkgid&&(0,o.jsx)("div",{className:"h-[18px]"})]}),(0,o.jsx)(l.k,{disabled:k.loading,type:"submit",className:"cta-black cta-hover-warm-sand flex w-full cursor-pointer items-center self-center sm:w-[max-content]",children:(0,o.jsx)("p",{className:"button&subheader",children:"Add my booking"})})]})]})]})},k=e=>{let{setFilterLoading:t}
1=e,[i,a]=n.useState(!1),[s,r]=(0,n.useState)({loading:!1,bookingFound:!1,showSuccessMessage:!1}),d=(0,u.a)("(max-width: 960px)");return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"flex w-full flex-col justify-between gap-6 border border-[var(--color-warm-sand)] bg-white p-6 sm:flex-row",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,o.jsx)("p",{className:"text-[18px] font-[700] leading-[24px] ".concat(d?"text-center":"text-start"),children:"Can't find your reservation?"}),(0,o.jsx)("p",{className:"text-[14px] font-[300] leading-[18px] ".concat(d?"text-center":"text-start"),children:"If a booking you made isn't showing here, use the button to search for a booking and add it to your profile"})]}),(0,o.jsx)("div",{className:"flex w-full items-center justify-center sm:w-fit sm:justify-start",children:(0,o.jsx)(l.k,{className:"cta-black cta-hover-warm-sand flex w-full items-center sm:w-fit",onClick:()=>a(!0),children:(0,o.jsx)("p",{className:"button&subheader",children:"find your booking"})})})]}),(0,o.jsx)(h,{modalOpen:i,closeModal:()=>{a(!1),r({...s,showSuccessMessage:!1})},state:s,setState:r,setModalOpen:a,setFilterLoading:t})]})}},1374:function(e,t,i){i.d(t,{T:function(){return v}});var o=i(85893),l=i(19108),n=i(34736),a=i(27203),s=i(25675),r=i.n(s),d=i(67294),u=i(34065),c=i(21842);let g=(e,t)=>{var i,o,l,n;if(!(null==e?void 0:e.dayByDay)||!Array.isArray(e.dayByDay))return"";let a=t.toLowerCase().trim().startsWith("pre tour"),s=t.toLowerCase().trim().startsWith("post tour");if(a){let t=e.dayByDay[e.dayByDay.length-1];if((null==t?void 0:t.cities)&&Array.isArray(t.cities))return null!==(i=t.cities.map(e=>e.city).filter(e=>e&&""!==e.trim())[0])&&void 0!==i?i:"";if(!t.cities&&Array.isArray(t.mapInfo)){let e=null===(o=t.mapInfo[0])||void 0===o?void 0:o.cityNameFrom;return null!=e?e:""}}else if(s){let t=e.dayByDay[0];if((null==t?void 0:t.cities)&&Array.isArray(t.cities))return null!==(l=t.cities.map(e=>e.city).filter(e=>e&&""!==e.trim())[0])&&void 0!==l?l:"";if(!t.cities&&Array.isArray(t.mapInfo)){let e=null===(n=t.mapInfo[0])||void 0===n?void 0:n.cityNameFrom;return null!=e?e:""}}return""},m=e=>{let{extension:t,isPretourExtension:i,isPosttourExtension:a,openModalWithExtension:s,openEnquireForm:d,image:u,isLessThan960:g,city:m}=e;return(0,o.jsxs)("div",{onClick:()=>{d||s(t)},className:"flex w-full ".concat(d?"":"cursor-pointer"," gap-3 p-4 ").concat(i?"bg-[var(--color-canvas)]":"bg-[var(--color-linen)]"),children:[(0,o.jsx)("div",{className:"relative aspect-[1] min-w-[130px]",children:u?(0,o.jsx)(r(),{src:u,alt:"",layout:"fill",objectFit:"cover"}):(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"animation--trade-fade-in relative flex h-full w-full flex-col items-center justify-end bg-canvas text-center",children:[(0,o.jsx)(r(),{width:g?70:140,height:g?70:140,className:"absolute left-1/2 top-[15%] -translate-x-1/2 transition-all",src:(0,l.uH)(c.gT.AK_LOGO_ICON).auto("format").url(),alt:"Abercrombie & Kent global logo"}),(0,o.jsx)("h4",{className:"pb-[10%]",children:"Photos coming soon"})]})})}),(0,o.jsxs)("div",{className:"flex w-[100%] flex-col justify-between",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,o.jsx)("p",{className:"button&subheader w-fit rounded-[5px] bg-burntSienna px-[6px] py-[3px] !leading-[18px] text-[white]",children:null==t?void 0:t.type}),(0,o.jsx)("h5",{children:null==t?void 0:t.title})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,o.jsx)("p",{className:"text-[14px] font-[300] uppercase !leading-[18px]",children:m}),(0,o.jsxs)("div",{className:"flex justify-between",children:[(0,o.jsx)(n.k,{onClick:e=>{e.stopPropagation(),s(t)},className:"Button&Subheader navigate-cta-btn cursor-pointer",children:(0,o.jsx)("p",{className:"button&subheader decoration-primaryDark mt-auto underline decoration-1 underline-offset-2 transition-all duration-300 hover:decoration-transparent",children:"View Details"})}),d&&(0,o.jsx)(n.k,{onClick:e=>{e.stopPropagation(),d({title:(null==t?void 0:t.title)||"",image:u||"",city:m||"",type:(null==t?void 0:t.type)||""})},className:"Button&Subheader z-[1] h-[37px] w-fit cursor-pointer self-center rounded-[5px] bg-black px-4 py-[6px] text-white ",children:(0,o.jsx)("p",{className:"button&subheader mt-auto",children:"Enquire"})})]})]})]})]},t.id)},v=e=>{var t,i;return(null==e?void 0:null===(i=e.journeyInformation)||void 0===i?void 0:null===(t=i.dates)||void 0===t?void 0:t.flatMap(e=>null==e?void 0:e.extensions).filter(t=>
1{var i,o,l,n;return(null==t?void 0:null===(i=t.type)||void 0===i?void 0:i.toLowerCase())==="pre tour extension"?null==t?void 0:null===(l=t.dates)||void 0===l?void 0:l.some(t=>(null==t?void 0:t.travelEndDate)===(null==e?void 0:e.startDate)):(null==t?void 0:null===(o=t.type)||void 0===o?void 0:o.toLowerCase())==="post tour extension"&&(null==t?void 0:null===(n=t.dates)||void 0===n?void 0:n.some(t=>(null==t?void 0:t.travelStartDate)===(null==e?void 0:e.endDate)))}))||[]};t.Z=e=>{let{extensions:t,openModalWithExtension:i,openEnquireForm:n}=e,s=(0,u.a)("(max-width: 960px)"),r=Array.isArray(t)&&t.length>0?t.map(e=>{var t;let a=null!==(t=g(e,e.type))&&void 0!==t?t:"",r=Array.isArray(e.heroImages)&&e.heroImages.length>0&&e.heroImages[0].image?(0,l.uH)(e.heroImages[0].image).url():void 0,d=e.type.toLowerCase().trim().startsWith("pre tour"),u=e.type.toLowerCase().trim().startsWith("post tour");return{key:e._id,element:(0,o.jsx)(m,{extension:e,isPretourExtension:d,isPosttourExtension:u,openModalWithExtension:i,openEnquireForm:n,image:r,isLessThan960:s,city:a},e._id)}}):[];return(0,o.jsxs)("div",{className:"animation--trade-fade-in-slide-up",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-2 pb-3",children:[(0,o.jsx)("p",{className:"button&subheader",children:"Elevate Your Journey:"}),(0,o.jsx)("div",{className:"h-[1px] w-full bg-[var(--color-warm-sand)]"})]}),s?(0,o.jsx)(a.l,{withIndicators:(null==r?void 0:r.length)>1,withControls:!1,loop:!0,className:"mb-6 w-full",styles:{control:{backgroundColor:"white",border:"1px solid var(--color-warm-sand)",color:"black","&[data-inactive]":{o
1pacity:0,cursor:"default"}},indicators:{bottom:"-24px",gap:"8px"},indicator:{width:8,height:8,backgroundColor:"#e8e8e8 !important",transition:"background-color 0.2s ease","&[data-active]":{backgroundColor:"#AA5432 !important"}}},children:r.map(e=>{let{key:t,element:i}=e;return(0,o.jsx)(a.l.Slide,{children:i},t)})}):(0,o.jsx)("div",{className:"grid w-full grid-cols-1 items-center justify-between gap-5 ".concat(r.length>1?"lg:grid-cols-2":""),children:r.map(e=>{let{key:t,element:i}=e;return(0,o.jsx)(d.Fragment,{children:i},t)})})]})}},74655:function(e,t,i){i.d(t,{s:function(){return n}});var o=i(67294);let l=["CSE","CSY","CSG"],n=e=>{let{currentBooking:t}=e;return(0,o.useMemo)(()=>{var e;return(null!==(e=null==t?void 0:t.voyages)&&void 0!==e?e:[]).some(e=>l.some(t=>{var i;return null===(i=e.voyageNumber)||void 0===i?void 0:i.startsWith(t)}))},[null==t?void 0:t.voyages])}},32424:function(e,t,i){i.d(t,{As:function(){return g},FS:function(){return v},Kc:function(){return m},aJ:function(){return c},gA:function(){return u}});var o=i(27484),l=i.n(o);let n=["Crystal Serenity","Crystal Symphony","Crystal Grace"],a=["FRSHNOTPART","FRSHNOTPARTAM","FRSHNOTPARTPM"],s=e=>"string"==typeof e&&e.includes(":")?e:"09:00:00",r=e=>{let t=Math.floor(e);return 60*t+Math.round((e-t)*100)},d=e=>{let t,{itineraryDate:i,duration:o,startTime:n,isDurationByMinutes:a=!1}=e,[d,u,c]=s(n).split(":").map(Number),g=l()(i).hour(d).minute(u).second(c),m=Number(o)||0;if(a){let e=r(m);t=g.add(e,"minute")}else t=g.add(m,"hour");return{startDate:g.format("YYYY-MM-DDTHH:mm:ss"),endDate:t.format("YYYY-MM-DDTHH:mm:ss")}},u=e=>!!e&&n.some(t=>e.includes(t)),c=e=>{let{endDate:t,startDate:i}=d({itineraryDate:e.itineraryDate,duration:e.duration,startTime:e.startTime});return{shorexId:e.optionID,title:e.serviceLongName,serviceShortName:e.serviceShortName,duration:String(e.duration),startDateTime:i,endDateTime:t,guests:[{guestID:e.guestID,guestCod:e.guestCod}]}},g=e=>{let{startDate:t,endDate:i}=d({itineraryDate:e.itineraryDate,duration:e.duration,startTime:e.startTime,isDurationByMinutes:!0});return{shorexId:Number(e.optionID),title:e.serviceLongName,duration:String(e.duration),startDateTime:t,endDateTime:i}},m=e=>!e.serviceShortName||!a.includes(e.serviceShortName),v=["booked","client confirmed","finalised"]},34035:function(e,t,i){var o=i(67294);t.Z=()=>{let[e,t]=(0,o.useState)(!1),[i,l]=(0,o.useState)(null),n=()=>{t(!e)};
1return{extensionOpened:e,extension:i,toggleExtension:n,openModalWithExtension:e=>{("pre tour extension"===e.type.toLowerCase()||"post tour extension"===e.type.toLowerCase()||"tailormade extension"===e.type.toLowerCase())&&(l(e),n())}}}},35763:function(e,t,i){var o=i(67294),l=i(9473),n=i(66510),a=i(67878),s=i(82107),r=i(3085);t.Z=()=>{var e,t;let i=(0,l.I0)(),{selectedBookingId:d}=(0,l.v9)(a.l0),[u]=(0,s._)(d),c=(0,l.v9)(a.l0),g=(0,l.v9)(a.O5),m=(0,l.v9)(r.S8),v=(0,o.useMemo)(()=>{var e,t;return -1!==c.selectedBookingId||(null===(e=m.dl)||void 0===e?void 0:e.enable)&&(null===(t=m.dl)||void 0===t?void 0:t.bkgId)},[c,null===(e=m.dl)||void 0===e?void 0:e.bkgId,null===(t=m.dl)||void 0===t?void 0:t.enable]),p=(0,o.useRef)(new Set),f=(null==u?void 0:u.itineraryStatus)||"empty",x=null==u?void 0:u.itineraryData,y="pending"===f,b=(0,l.v9)(a.O5),h=(0,l.v9)(a.bL),k=(0,o.useMemo)(()=>"fulfilled"===h&&b.bookings.length>0||"fulfilled"===g.myBookingsStatus&&b.bookings.length>0,[h,b.bookings,g.myBookingsStatus]);return(0,o.useEffect)(()=>{v||p.current.clear()},[v]),(0,o.useEffect)(()=>{let e=async e=>{await i((0,n.n3)({bookingId:String(e)}))};!p.current.has(null==u?void 0:u.bkgid)&&"empty"===f&&v&&(null==u?void 0:u.bkgid)&&(null==u?void 0:u.type)!=="TS"&&(e(null==u?void 0:u.bkgid),p.current.add(null==u?void 0:u.bkgid)),!k||v||(null==u?void 0:u.bkgid)||b.bookings.forEach(async t=>{var i;let o=(null==t?void 0:null===(i=t.subSegment)||void 0===i?void 0:i.toLocaleLowerCase())==="luxury expedition cruises";(null==t?void 0:t.type)!=="TS"&&o&&(null==t?void 0:t.itineraryStatus)==="empty"&&!p.current.has(null==t?void 0:t.bkgid)&&(e(null==t?void 0:t.bkgid),p.current.add(null==t?void 0:t.bkgid))})},[f,null==u?void 0:u.bkgid,i,v,k,null==b?void 0:b.bookings,p,null==u?void 0:u.type]),{itineraryData:x,itineraryStatus:f,isLoading:y}}},38462:function(e,t,i){var o=i(67294),l=i(9473),n=i(3085),a=i(67878),s=i(66510),r=i(82107),d=i(40226),u=i(45578),c=i.n(u);t.Z=()=>{let e=(0,l.I0)(),t=(0,l.v9)(n.S8),i=(0,l.v9)(a.g$),u=(0,l.v9)(a.xN),g=t.agent.isAgent,m=t.dl.enable&&!!t.dl.bkgId,v=(0,l.v9)(a.l0),p=(0,o.useMemo)(()=>-1!==v.selectedBookingId,[v]),[f]=(0,r._)(v.selectedBookingId,v.selectedVoyageNumber),x=(0,o.useRef)(new Set),y=(0,o.useRef)(!1);(0,o.useEffect)(()=>{!g&&"fulfilled"===i&&u.length>0&&c()(u,"bkgid").forEach(t=>{if("empty"===t.journeyInfoStatus&&!x.current.has(t.bkgid)){x.current.add(t.bkgid);let i=(0,d.LZ)(t);i&&e((0,s.Op)({id:i,bookingId:t.bkgid}))}})},[i,u,g]),(0,o.useEffect)(()=>{if(m&&p&&!y.current&&(null==f?void 0:f.bkgid)){let t=(0,d.LZ)(f);t&&(y.current=!0,e((0,s.Op)({id:t,bookingId:f.bkgid})))}},[m,p,f])}},45780:function(e,t,i){var o=i(67294),l=i(9473),n=i(3085),a=i(67878),s=i(66510),r=i(82107);t.Z=()=>{let e=(0,l.I0)(),t=(0,o.useRef)(new Set),i=(0,o.useRef)(new Set),d=(0,o.useRef)(new Set),u=(0,l.v9)(n.S8),c=(0,l.v9)(a.O5),g=(0,l.v9)(a.O5),m=(0,l.v9)(a.O5),v=(0,l.v9)(a.bL),p=g.shorexAllStatus,f=(0,o.useMemo)(()=>"fulfilled"===v&&m.bookings.length>0||"fulfilled"===c.myBookingsStatus&&m.bookings.length>0,[v,m.bookings,c.myBookingsStatus]),x=u.agent.isAgent,y=(0,l.v9)(a.l0),b=(0,o.useMemo)(()=>-1!==y.selectedBookingId||u.dl.enable&&u.dl.bkgId,[y,u.dl.bkgId,u.dl.enable]),[h]=(0,r._)(y.selectedBookingId,y.selectedVoyageNumber);(0,o.useEffect)(()=>{b||(t.current.clear(),i.current.clear())},[b]),(0,o.useEffect)(()=>{var t,i,o;let l=async()=>{await e((0,s.Fc)())};f&&(null==m?void 0:null===(t=m.bookings)||void 0===t?void 0:t.some(e=>{var t,i;return(null===(t=e.subSegment)||void 0===t?void 0:t.toLocaleLowerCase())==="luxury expedition cruises"||(null===(i=e.product)||void 0===i?void 0:i.toLocaleLowerCase())==="luxury expedition cruises"}))&&"empty"===p&&l(),b&&h&&"empty"===p&&((null==h?void 0:null===(i=h.subSegment)||void 0===i?void 0:i.toLocaleLowerCase())==="luxury expedition cruises"||(null==h?void 0:null===(o=h.product)||void 0===o?void 0:o.toLocaleLowerCase())==="luxury expedition cruises")&&l()},[e,p,m,f,b,h]),(0,o.useEffect)(()=>{let i=async t=>{await e((0,s.NU)({bkgId:t}))};if(b&&h){var o,l;let e=(null==h?void 0:null===(o=h.subSegment)||void 0===o?void 0:o.toLocaleLowerCase())==="luxury expedition cruises"||(null==h?void 0:null===(l=h.product)||void 0===l?void 0:l.toLocaleLowerCase())==="luxury expedition cruises";(null==h?void 0:h.shorexBookingStatus)==="empty"&&e&&!t.current.has(null==h?void 0:h.bkgid)&&"fulfilled"===p&&(null==h?void 0:h.singleBookingStatus)==="fulfilled"&&(t.current.add(null==h?void 0:h.bkgid),i(null==h?void 0:h.bkgid))}
1b||h||!f||m.bookings.forEach(async e=>{var o,l;let n=(null===(o=e.subSegment)||void 0===o?void 0:o.toLocaleLowerCase())==="luxury expedition cruises"||(null===(l=e.product)||void 0===l?void 0:l.toLocaleLowerCase())==="luxury expedition cruises";"fulfilled"===e.singleBookingStatus&&n&&!t.current.has(null==e?void 0:e.bkgid)&&"empty"===e.shorexBookingStatus&&"fulfilled"===p&&(t.current.add(null==e?void 0:e.bkgid),i(null==e?void 0:e.bkgid))})},[x,e,b,h,null==h?void 0:h.singleBookingStatus,m,f,null==h?void 0:h.shorexBookingStatus,t,p]),(0,o.useEffect)(()=>{let t=async t=>{await e((0,s.K2)({bkgId:t}))};if(b&&h){var o,l;let e=(null==h?void 0:null===(o=h.subSegment)||void 0===o?void 0:o.toLocaleLowerCase())==="luxury expedition cruises"||(null==h?void 0:null===(l=h.product)||void 0===l?void 0:l.toLocaleLowerCase())==="luxury expedition cruises";(null==h?void 0:h.availableShorexExcursionsStatus)==="empty"&&(null==h?void 0:h.shorexBookingStatus)==="empty"&&e&&!i.current.has(null==h?void 0:h.bkgid)&&"fulfilled"===p&&(null==h?void 0:h.singleBookingStatus)==="fulfilled"&&(null==h?void 0:h.itineraryStatus)==="fulfilled"&&(i.current.add(null==h?void 0:h.bkgid),t(null==h?void 0:h.bkgid))}b||h||!f||m.bookings.forEach(async e=>{var o,l;let n=(null===(o=e.subSegment)||void 0===o?void 0:o.toLocaleLowerCase())==="luxury expedition cruises"||(null===(l=e.product)||void 0===l?void 0:l.toLocaleLowerCase())==="luxury expedition cruises";"fulfilled"===e.singleBookingStatus&&"empty"===e.shorexBookingStatus&&"empty"===e.availableShorexExcursionsStatus&&n&&!i.current.has(null==e?void 0:e.bkgid)&&"fulfilled"===p&&(i.current.add(null==e?void 0:e.bkgid),t(null==e?void 0:e.bkgid))})},[e,x,b,h,null==h?void 0:h.singleBookingStatus,null==h?void 0:h.itineraryStatus,null==h?void 0:h.shorexBookingStatus,p,m,f,d,i,t])}},19006:function(e,t,i){var o=i(67294),l=i(9473),n=i(67878),a=i(66510),s=i(3085),r=i(45578),d=i.n(r);t.Z=e=>{let{fetchedRef:t}=e,i=(0,l.I0)(),r=(0,l.v9)(n.O5),u=(0,l.v9)(s.S8),c=r.bookings,g=(0,l.v9)(n.aj),m=(0,l.v9)(n.bL);(0,o.useEffect)(()=>{u.dl.enable||"fulfilled"!==m&&"fulfilled"!==r.myBookingsStatus||!(c.length>0)||t.current||(t.current=!0,d()(c,"bkgid").forEach(async e=>{if((null==e?void 0:e.singleBookingStatus)==="empty"&&"TS"!==e.type){var t;let o=await i((0,a.AX)({bookingId:String(e.bkgid)}));(null==o?void 0:null===(t=o.meta)||void 0===t?void 0:t.requestStatus)==="fulfilled"&&i((0,a.JX)({dismisStatus:!1,id:e.bkgid,siteid:e.siteId,type:e.type}))}(null==e?void 0:e.GIFStatus)==="empty"&&"TS"===e.type&&i((0,a.JX)({dismisStatus:!1,id:e.bkgid,siteid:e.siteId,type:e.type}))}))},[m,c,r.agencyInformation.currentAgencyCode]),(0,o.useEffect)(()=>{u.dl.enable&&u.dl.bkgId&&("fulfilled"===r.myBookingsStatus||"fulfilled"===r.bookingsStatus)&&c.length>0&&!t.current&&(t.current=!0,d()(c,"bkgid").filter(e=>String(e.bkgid)===String(u.dl.bkgId)).forEach(e=>{e&&"empty"===e.singleBookingStatus&&"TS"!==e.type&&i((0,a.AX)({bookingId:String(e.bkgid)})).then(t=>{var o;(null==t?void 0:null===(o=t.meta)||void 0===o?void 0:o.requestStatus)==="fulfilled"&&i((0,a.JX)({dismisStatus:!1,id:e.bkgid,siteid:e.siteId,type:e.type}))}),e&&"TS"===e.type&&i((0,a.JX)({dismisStatus:!1,id:e.bkgid,siteid:e.siteId,type:e.type}))}))},[u.dl.enable,u.dl.bkgId,r.myBookingsStatus,c,g,r.agencyInformation.currentAgencyCode]),(0,o.useEffect)(()=>{u.dl.enable&&!u.dl.bkgId&&u.dl.agentEmail&&("fulfilled"===r.myBookingsStatus||"fulfilled"===r.bookingsStatus&&"fulfilled"===r.allBookingsStatus)&&c.length>0&&(!t.current||g)&&(t.current=!0,d()(c,"bkgid").forEach(e=>{e&&"empty"===e.singleBookingStatus&&"TS"!==e.type&&i((0,a.AX)({bookingId:String(e.bkgid)})).then(t=>{var o;(null==t?void 0:null===(o=t.meta)||void 0===o?void 0:o.requestStatus)==="fulfilled"&&i((0,a.JX)({dismisStatus:!1,id:e.bkgid,siteid:e.siteId,type:e.type}))}),e&&"TS"===e.type&&i((0,a.JX)({dismisStatus:!1,id:e.bkgid,siteid:e.siteId,type:e.type}))}))},[u.dl.enable,u.dl.bkgId,r.myBookingsStatus,c,g,r.bookingsStatus,r.allBookingsStatus,r.agencyInformation.currentAgencyCode])}},87660:function(e,t,i){i.d(t,{L:function(){return c}});var o=i(67878),l=i(7247),n=i(67294),a=i(9473),s=i(33299),r=i(21842),d=i(3085);let u="trade_portal",c=e=>{var t,i;let c=(0,a.v9)(d.S8),g=(0,a.v9)(o._Q),m=(0,a.v9)(o.LC),{selectedBookingId:v}=(0,a.v9)(o.l0),{currentAgencyCode:p}=(0,a.v9)(o.dB),f=Number(c.akId),x=g.data.individual_id,{menu:y}
1=(0,a.v9)(o.l0),b=(0,n.useRef)(y),h=(0,s.useSession)(),k=(0,n.useMemo)(()=>{var e,t;return(0,r.rD)((null===(t=h.data)||void 0===t?void 0:null===(e=t.user)||void 0===e?void 0:e.email)||c.email)},[null===(i=h.data)||void 0===i?void 0:null===(t=i.user)||void 0===t?void 0:t.email,c.email]),_=(0,n.useMemo)(()=>({user_id:f,agency_code:p,agent_id:x,is_deep_link:c.dl.enable}),[x,p,f,c.dl.enable]),S=(0,n.useMemo)(()=>{var e;let t={};return t.user_type=(null==c?void 0:null===(e=c.agent)||void 0===e?void 0:e.isAgent)?"agent":"guest",f&&(t.user_id=f,x&&(t.agent_id=x,p&&(t.agency_code=p))),t},[f,x,p,null==c?void 0:c.agent.isAgent]);(0,n.useEffect)(()=>{if((null==e?void 0:e.trackMenu)&&b.current!==y){b.current=y;let e=m.menus.find(e=>e.id===y);e&&(0,l.Qx)(u,{event_category:"menu_selection_".concat(String(e.name).toLocaleLowerCase().trim().replace(/\s+/g,"_")),..._})}},[y]);let w=()=>{(0,l.Qx)(u,{event_category:"pdf_generate",..._,voyages:""})};return{logDownload:(e,t)=>{(0,l.Qx)(u,{event_category:"file_manager_download_".concat(e.toLocaleLowerCase()),asset_ids:t,..._})},logCommission:()=>{(0,l.Qx)(u,{event_category:"booking_open_commission",booking_id:-1!==v?v:void 0,..._})},logPayment:()=>{(0,l.Qx)(u,{event_category:"booking_open_payment",booking_id:-1!==v?v:void 0,..._})},logGIF:()=>{(0,l.Qx)(u,{event_category:"booking_open_guest_information",booking_id:-1!==v?v:void 0,..._})},logExcursionsUpdate:e=>{let{eventCategory:t,bookingId:i,passengerId:o}=e,n=c.agent.isAgent?"agent":"guest";(0,l.Qx)("trade_free_shorex",{event_category:t,booking_id:i,individual_id:c.individualId,user_type:n,email_hash:k,...o&&{passenger_id:o}})},logReservation:()=>{(0,l.Qx)(u,{event_category:"booking_open_guest_reservation",booking_id:-1!==v?v:void 0,..._})},logDocuments:()=>{(0,l.Qx)(u,{event_category:"booking_open_guest_documents",booking_id:-1!==v?v:void 0,..._})},logSingleBookingOpen:()=>{(0,l.Qx)(u,{event_category:"booking_open",booking_id:-1!==v?v:void 0,..._})},logOffer:(e,t,i,o,n)=>{(0,l.Qx)(u,{event_category:"trade_offer_".concat(e).concat(i?"_public":""),user_email:i?n:c.email,offer_id:t,..._,user_id:i?o:_.user_id})},logAgentUpdate:()=>{(0,l.Qx)(u,{event_category:"agent_update",..._})},logAgentLogoUpdate:(e,t)=>{(0,l.Qx)(u,{event_category:"agent_logo_update",logo_blob_id:e,logo_type:t,..._})},logAgencyUpdate:()=>{(0,l.Qx)(u,{event_category:"agency_update",..._})},logAgencyLogoUpdate:e=>{(0,l.Qx)(u,{event_category:"agency_logo_update",logo_blob_id:e,..._})},logDMCPayment:()=>{(0,l.Qx)(u,{event_category:"booking_open_dmc_payment",booking_id:-1!==v?v:void 0,...S})},logDMCPaymentFormSubmission:e=>{(0,l.Qx)(u,{event_category:"dmc_payment_form_submission",...S,...e})},logDMCPaymentProcessed:e=>{(0,l.Qx)(u,{event_category:"dmc_payment_processed",...S,...e})},logDMCPaymentConfirmationViewed:e=>{(0,l.Qx)(u,{event_category:"dmc_payment_confirmation_viewed",...S,...e})},logDMCPaymentInitiated:e=>{(0,l.Qx)(u,{event_category:"dmc_payment_initiated",...S,...e})},logPDFDownload:()=>{(0,l.Qx)(u,{event_category:"pdf_download_click",..._}),w()},logPDFCustomStart:()=>{(0,l.Qx)(u,{event_category:"custom_pdf_start",..._})},logGIFUpdate:e=>{let{eventCategory:t,bookingId:i,passengerId:o}=e,n=c.agent.isAgent?"agent":"guest";(0,l.Qx)("gif_update",{event_category:t,booking_id:i,individual_id:c.individualId,user_type:n,email_hash:k,...o&&{passenger_id:o}})},logTradePaymentButton:e=>{(0,l.Qx)(u,{event_category:"payment_button_".concat(e),booking_id:-1!==v?v:void 0,..._})}}}},18437:function(e,t,i){var o=i(9473),l=i(82245),n=i(67878);t.Z=()=>{let e=(0,o.I0)();return{selectedBookingPromotionsData:(0,o.v9)(n.zK),openEnquireForm:t=>{let{data:i,formType:o,title:a}=t;e((0,l.Y_)(!0)),e((0,n.IT)({data:i,formType:o,title:a}))}}}},42029:function(e,t,i){i.d(t,{S:function(){return d}});var o=i(11163),l=i(67294),n=i(33299),a=i(48128),s=i(59417),r=i(66166);let d=()=>{let e=(0,n.useSession)(),t=(0,o.useRouter)(),[i,d]=(0,l.useState)(!1),u=(0,a.c)(1e4),[c,g]=(0,s.G)(!1,1e4),m=(0,r.u)();return(0,l.useEffect)(()=>{(0,n.getSession)().then(i=>{if(i){let o=new Date,l=i.now>0?new Date(i.now):new Date;if(Math.abs(o.getTime()-l.getTime())/864e5>3){try{m.trackEvent({name:"SessionDateMismatch"},{session:e,serverTimestamp:l,clientDate:o,url:t.asPath})}catch(e){console.warn("Unable to register log");return}d(!1),(0,n.signOut)({callbackUrl:"/"})}}else d(!1),(0,n.signOut)({callbackUrl:"/"})})},[c]),(0,l.useEffect)(()=>{u||g(!c)},[u,c,e]),(0,l.useEffect)(()=>{"authenticated"===e.status&&d(!0),"unauthenticated"===e.status&&(d(!1),(0,n.signOut)({callbackUrl:"/"}))},[e,t]),i}}}]);

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.