1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9910],{380:(e,t,r)=>{"use strict";e.exports={thesaurus:r(63412),MAIN_PAGE_TYPE:"flex_page",REDIRECT_TYPE:"redirect",REQUEST_HEADER_BRANCH:"CS-BRANCH-OVERRIDE",REQUEST_HEADER_ENVIRONMENT:"CS-ENVIRONMENT-OVERRIDE",REQUEST_HEADER_BRANCH_LIST:["test","qa","production"],REQUEST_HEADER_ENVIRONMENT_LIST:[],REQUEST_HEADER_BRAND:"X-AAG-Brand",SLOTTED_BOOKING_WIDGET_BLOCK_UID:"slotted_booking_widget",SLOTTED_BOOKING_WIDGET_TITLE:"Slotted Booking Widget",CS_REFERENCES:{waiver:{COMPONENT_TYPE:"waiver",API_CONTENT_TYPE:"waiver",OTHER_REFERENCES:["airports.airport_codes","sitewide_advisory"]},partial:{COMPONENT_TYPE:"data_source",API_CONTENT_TYPE:"data_source",OTHER_REFERENCES:["modular_blocks.generic_text_rendering.data_source"],fetch_all_references:!0},flex_page:{COMPONENT_TYPE:"",API_CONTENT_TYPE:"",OTHER_REFERENCES:["page_components.homepage_hero.geo_targeted_airports","page_components.dynamic.content","page_components.one_column_layout.column_items.dynamic.content","page_components.one_column_layout.column_items.json_gtr"]},universal_content_model:{COMPONENT_TYPE:"",API_CONTENT_TYPE:"",OTHER_REFERENCES:["related_campaigns.campaign","theme.campaign_theme"]},json_gtr:{COMPONENT_TYPE:"json_gtr",API_CONTENT_TYPE:"json_gtr",OTHER_REFERENCES:[]}},PAGE_VISIBILITY:{PUBLIC:"Public",ALASKA_AIR_SIGNED_IN_ONLY:"AlaskaAir SignedIn Only",EASY_BIZ_ONLY:"EasyBiz Only",TRAVEL_AGENT_ONLY:"Travel Agent Only"},STATUS_CODE:{OK:200,MOVED_PERMANENTLY:301,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,BAD_REQUEST:400,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500},MULTIPLE_UCM_REGISTRY:{CarouselOfCards:!0,JsonGtr:!0,BorealisCarouselOfCards:!0,BorealisCarouselOfCardsND:!0,BorealisJsonGtr:!0,Grid:!0,MiniBannerGrid:!0,Slideshow:!0,ProductShowcase:!0},CARD_DATA_PROP:{Card:!0,CardConcise:!0}}},4582:(e,t,r)=>{"use strict";r.d(t,{H:()=>s,V:()=>i});let a="undefined"!=typeof Element&&"undefined"!=typeof Node,n="undefined"!=typeof ShadowRoot?e=>e instanceof ShadowRoot:()=>!1,o="undefined"!=typeof HTMLSlotElement?e=>e instanceof HTMLSlotElement:()=>!1;function i(e,t){let r=[],i=new Set,s=new Set,l=e=>{if(!(!e||s.has(e))){if(s.add(e),"function"==typeof e.querySelectorAll&&e.querySelectorAll(t).forEach(e=>{i.has(e)||(i.add(e),r.push(e))}),a&&e instanceof Element&&e.shadowRoot&&l(e.shadowRoot),o(e))try{e.assignedElements?.({flatten:!0})?.forEach(l)}catch{}(a&&e instanceof Element||n(e))&&("children"in e&&e.children?Array.from(e.children):Array.from(e.childNodes||[]).filter(e=>a&&e?.nodeType===Node.ELEMENT_NODE)).forEach(l)}};return l(e),r}function s(e,t){return i(e,t)[0]||null}},11125:(e,t,r)=>{"use strict";r.d(t,{OL:()=>c,SG:()=>i,YB:()=>u,applyOptionsToFormPicker:()=>m,h4:()=>s});var a=r(21898),n=r(4582);let o=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot;function i(e,t){var r;if(!e)return null;let i=o(e)?e:e?.shadowRoot??e?.renderRoot??e;if(!(i&&("undefined"==typeof Node||i.nodeType===Node.ELEMENT_NODE)||o(i)))return null;let s=t===a._M.HOTELS,l=t===a._M.CARS,u=(0,n.H)(i,a.ZM.INPUT.BIB_WRAPPER);if(u){let e=(0,n.H)(u,a.ZM.WIDGET.LOCATION_PICKER)??(0,n.H)(i,a.ZM.WIDGET.LOCATION_PICKER);if(e)return e}return(s?(0,n.H)(i,`${a.ZM.WIDGET.LOCATION_PICKER}[name="locationCombobox"]`)??(0,n.H)(i,a.ZM.WIDGET.LOCATION_PICKER):null)??(e=>{for(let t of e){let e=(0,n.H)(i,t);if(e)return e}return null})(l?a.L$?.cars??[]:s?a.L$?.hotels??[]:[])??(()=>{let e=(0,n.H)(i,a.ZM.INPUT.FORMKIT_TRIGGER);return e?.closest?.(a.ZM.INPUT.COMBOBOX)??null})()??(()=>{let e=(0,n.H)(i,a.ZM.INPUT.FORMKIT_COMPONENT);return e?(0,n.H)(i,a.ZM.INPUT.COMBOBOX)??e:null})()??(r=(0,n.V)(i,a.ZM.INPUT.COMBOBOX),r?.length?1===r.length?r[0]:r.find(e=>e?.getAttribute?.("placeholder"))??r[0]:null)??null}function s(e){if(!e)return null;if(e.matches?.(a.ZM.INPUT.FORMKIT_TRIGGER)||e.matches?.(a.ZM.INPUT.FORMKIT_COMPONENT))return(0,n.H)(e,a.ZM.INPUT.FIELD)||e.shadowRoot&&(0,n.H)(e.shadowRoot,a.ZM.INPUT.FIELD)||null;let t=e.shadowRoot||e,r=(0,n.H)(t,a.ZM.INPUT.FORMKIT_TRIGGER)||(0,n.H)(t,a.ZM.INPUT.FORMKIT_COMPONENT);return r&&((0,n.H)(r,a.ZM.INPUT.FIELD)||r.shadowRoot&&(0,n.H)(r.shadowRoot,a.ZM.INPUT.FIELD))||null}let l=e=>e?.shadowRoot?.querySelector?.(a.ZM.RENDERER.COMBO_OR_MENU)||e?.querySelector?.(a.ZM.RENDERER.COMBO_OR_MENU)||null,u=e=>l(e),c=e=>{let t=(e=>e?.shadowRoot?.querySelector?.(a.ZM.INPUT.FIELD)||e?.querySelector?.(a.ZM.INPUT.FIELD)||null)(e);t&&(t.value="","filter"in t&&(t.filter=""),t.dispatchEvent?.(new Event("input",{bubbles:!0})));let r=l(e);r&&("value"in r&&(r.value=""),"filter"in r&&(r.filter=""),"searchTerm"in r&&(r.searchTerm=""),r.clearSelection?.(),r.setFilter?.(""),r.requestUpdate?.())},d=(e,t)=>{"options"in e?e.options=t:"items"in e?e.items=t:"data"in e&&Array.isArray(e.data)&&(e.data=t),e.requestUpdate?.(),e.open=!0,e.show?.(),e.toggle?.(!0),e.dispatchEvent?.(new Event("options-changed"))},f=async(e,t,{CHUNK_SIZE:r=200,UI_MAX_MENU_OPTIONS:n=400}={})=>{for(e.setAttribute?.("aria-busy","true");e.firstChild;)e.removeChild(e.firstChild);let o=t.slice(0,n),i=t=>{let r=e.ownerDocument?.createElement?.(a.ZM.RENDERER.MENU_OPTION_TAG)??document.createElement(a.ZM.RENDERER.MENU_OPTION_TAG);r.setAttribute("value",t.value);try{r.setAttribute("label",t.label)}catch{}return r.textContent=t.secondary?`${t.label} â ${t.secondary}`:t.label,r},s=document.createDocumentFragment(),l=0;for(let t of o)s.appendChild(i(t)),(l+=1)>=r&&(e.appendChild(s),s=document.createDocumentFragment(),l=0,await new Promise(e=>requestAnimationFrame(e)));s?.childNodes.length&&e.appendChild(s),e.removeAttribute?.("aria-busy"),e.dispatchEvent?.(new Event("options-changed"))},m=async(e,t,r,{CHUNK_SIZE:n=200,UI_MAX_MENU_OPTIONS:o=400}={})=>
1{if(!e)return!1;let i=Array.isArray(t)?t:[],s=Array.isArray(r)?r:i;((e,t)=>{e&&("items"in e?e.items=[...t]:"options"in e?e.options=[...t]:"data"in e&&Array.isArray(e.data)&&(e.data=[...t]),e.requestUpdate?.())})(e,i);let l=u(e);if(!l)return!1;let c=String(l.tagName??"").toLowerCase();return c.includes("combobox")||c===a.ZM.RENDERER.COMBOBOX_TAG?d(l,s):c.includes("menu")||c===a.ZM.RENDERER.MENU_TAG?await f(l,s,{CHUNK_SIZE:n,UI_MAX_MENU_OPTIONS:o}):d(l,s),!0}},17041:(e,t,r)=>{"use strict";r.d(t,{Dn:()=>b,Fl:()=>c,I_:()=>d,MH:()=>l,Vo:()=>f,dI:()=>h,kg:()=>s,w8:()=>p,yZ:()=>u});var a=r(21898),n=r(30853),o=r(4582),i=r(37257);function s(e){let t;if(!e)return null;let r=null;if("borealis-expanded-booking-widget"===String(e?.tagName||"").toLowerCase())r=e;else{let t=e.shadowRoot||e;r=t.querySelector?.(a.ju)??e.querySelector?.(a.ju)??null}if(!r)return null;let n=(t=r,(t?.shadowRoot??t?.renderRoot??null)||r);return{host:r,root:n}}function l(e){let t=(e.shadowRoot||e).querySelector(a.T5);if(!t)return null;let r=t.shadowRoot||t.renderRoot||null;return r?{host:t,root:r}:null}let u=e=>{let t=Number(e?.host?.getAttribute?.("selectedtab"));if(!Number.isNaN(t))return t;let r=e?.root;if(!r)return 0;let n=a.ZM?.TABS?.GROUP,o=n&&r.querySelector?.(n)||Array.from(r.children||[]).find(e=>a.ZM?.TABS?.GROUP_TAG_RE?.test?.(e.tagName)),i=Number(o?.getAttribute?.("selected"));if(!Number.isNaN(i))return i;let s=Array.from(r.querySelectorAll?.(a.ZM?.TABS?.PANEL)||[]);if(!s.length)for(let e of Array.from(r.children||[]))a.ZM?.TABS?.PANEL_TAG_RE?.test?.(e.tagName)&&s.push(e);if(s.length){let e=s.findIndex(e=>e.getAttribute?.("aria-hidden")==="false"||e.hasAttribute?.("selected")||0===e.tabIndex||!e.hasAttribute?.("hidden"));if(e>=0)return e}return 0};async function c(e,t,r,n={frames:1,quietMs:50}){let s=e?.host||e?.root;if(!s)return null;await (0,i.SG)(s,r,n);let l=e?.root;if(!l)return e?.root||null;let u=(0,o.V)(l,a.ZM?.TABS?.PANEL);u.length||(u=Array.from(l.children||[]).filter(e=>a.ZM?.TABS?.PANEL_TAG_RE?.test?.(e.tagName)));let d=u?.[t];return d||u.find(e=>e.getAttribute?.("aria-hidden")==="false"||e.hasAttribute?.("selected")||0===e.tabIndex||!e.hasAttribute?.("hidden"))||l}let d=e=>{let t=(0,n.Z)(e,a.ZM.CAR_FORM.HOST);
1if(!t)return null;let r=t;for(;r;){let e=String(r.tagName||"").toUpperCase();if(a.ZM.TABS.PANEL_TAG_RE.test(e))return r;let t=r.getRootNode?.();r=t?.host?t.host:r.parentElement}return t},f=e=>{let t=(0,n.Z)(e,a.ZM.CRUISES.TABPANEL_ID);return t?.querySelector?.(a.ZM.CRUISES.ROOT_DIV_ID)??e?.shadowRoot?.querySelector?.(a.ZM.CRUISES.ROOT_DIV_ID)??e?.querySelector?.(a.ZM.CRUISES.ROOT_DIV_ID)??t??null},m=async(e,t,{frames:r=4}={})=>{if(!e)return!1;try{e.localName&&!customElements.get(e.localName)&&customElements.whenDefined&&await customElements.whenDefined(e.localName)}catch{}for(let a=0;a<r;a++){if(t?.aborted)return!1;if(e?.isConnected)return!0;await new Promise(e=>requestAnimationFrame(e))}return!!e?.isConnected},p=async(e,t,r,o)=>{let i=e||null,s=(0,n.a)(i,a.ZM.CAR_FORM.HOST)||i,l=(e=>[a.ZM.CARS.PICKER_BY_NAME(e),a.ZM.CARS.FORMKIT_NODE_BY_NAME(e),`${a.ZM.CAR_FORM.ITEM_BY_NAME(e)} ${a.ZM.WIDGET.LOCATION_PICKER}`,`${e===a.cY.DROPOFF?a.ZM.CAR_FORM.ITEM_DROPOFF:a.ZM.CAR_FORM.ITEM_PICKUP} ${a.ZM.WIDGET.LOCATION_PICKER}`])(t);for(let e=0;e<8&&!r?.aborted;e++){let e=(0,n.a)(s,l)||(0,n.a)(i,l);if(e&&await m(e,r,{frames:4}))return e;await o(s||i,r,{frames:1,quietMs:80})}return null},h=async(e,t,r,o)=>{let i=e||null,s=(0,n.a)(i,a.ZM.CRUISES.FORM_HOST)||i,l=(e=>[a.ZM.CRUISES.SELECT_BY_NAME(e),a.ZM.CRUISES.MENU_BY_NAME(e),a.ZM.CRUISES.MENUOPTION_BY_NAME(e),`auro-select-cruises[name="${e}"]`,`auro-menu-cruises[name="${e}"]`,`auro-menuoption-cruises[name="${e}"]`,`[data-formkit-node][data-name="${e}"] auro-select-cruises`,`.cruise-${e} auro-select-cruises`,`auro-formkit-select-dropdown-3_0_0[name="${e}"]`,`auro-formkit-select-dropdown-3_0_0[data-name="${e}"]`,`[data-formkit-node][data-name="${e}"] auro-formkit-select-dropdown-3_0_0`,`.cruise-${e} auro-formkit-select-dropdown-3_0_0`])(t);for(let e=0;e<8&&!r?.aborted;e++){let e=(0,n.a)(s,l)||(0,n.a)(i,l);if(e&&await m(e,r,{frames:4}))return e;await o(s||i,r,{frames:1,quietMs:80})}return null};function b(e){let t=e?.data;return t?y(g(t.car_locations))??function(e){let t=g(e.collapsed_widget);return y(g(t[0]?.car_locations))}(t)??function(e){for(let t of g(e.expanded_widget)){let e=function(e){for(let t of e){let e=String(t?.mode??"").toLowerCase(),r=String(t?.title??"").toLowerCase(),a="cars"===e||r.startsWith("car"),n=t?.form?.data;if(a&&Array.isArray(n)&&n.length)return[...n]}return null}(g(t?.tabs));if(e)return e}return null}(t)??[]:[]}let g=e=>Array.isArray(e)?e:[],y=e=>e?.length?[...e]:null},18847:(e,t,r)=>{e.exports=r(52496)},21610:(e,t,r)=>{"use strict";r.d(t,{OK:()=>u,g0:()=>s,iU:()=>l,zL:()=>a});let a=e=>null==e||"object"!=typeof e&&"string"!=typeof e?null:"string"==typeof e?{value:e,label:e}:"value"in e&&"label"in e?{value:String(e.value??""),label:String(e.label??"")}:"recno"in e&&"name"in e?{value:String(e.recno),label:String(e.name??"")}:"recno"in e?{value:String(e.recno),label:""}:"code"in e&&"name"in e?{value:String(e.code??""),label:String(e.name??"")}:"name"in e?{value:String(e.name??""),label:String(e.name??"")}:null,n={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},o=/^(\d{4})-(\d{2})(?:-(\d{2}))?/,i=/^([A-Za-z]{3,})\.?\s+(\d{4})$/,s=e=>{if(!Array.isArray(e))return[];let t=[];if(e.forEach((e,r)=>{let a=(e=>{let t=String(e?.value??"").trim(),r=String(e?.label??"").trim();if(/^\d{6}$/.test(t))return 100*Number(t);let a=o.exec(t)||o.exec(r);if(a)return 1e4*Number(a[1])+100*Number(a[2])+Number(a[3]??0);let s=i.exec(r);if(s){let e=n[s[1].slice(0,3).toLowerCase()];if(e)return 1e4*Number(s[2])+100*e}return null})(e);null!==a&&t.push({option:e,key:a,index:r})}),t.length<2)return[...e];let r=t.map(e=>e.index);t.sort((e,t)=>e.key-t.key||e.index-t.index);let a=[...e];return r.forEach((e,r)=>{a[e]=t[r].option}),a},l=(e=[])=>e&&Array.isArray(e)?e.findIndex(e=>{let t=(e?.icon?.name||e?.icons?.default?.name||"").toLowerCase();if(t.includes("cruise")||t.includes("ship"))return!0;let r=String(e?.mode||"").toLowerCase();return"cruises"===r||"cruise"===r||String(e?.title||"").toLowerCase().includes("cruise")}):-1,u=(e,t)=>{let r=l(e.tabs);if(-1===r)return e;let n={...e},o=Array.isArray(n.tabs)?[...n.tabs]:[],i=o[r]?{...o[r]}:{form:{}},u=i.form&&"object"==typeof i.form?{...i.form}:{},c=Array.isArray(t?.destinationList)?t.destinationList:[],d=Array.isArray(t?.sailingDateList)?t.sailingDateList:[],f=Array.isArray(t?.cruiseLineList)?t.cruiseLineList:[],m=c.filter(e=>
1e&&"object"==typeof e&&!Array.isArray(e)).map(a).filter(Boolean),p=d.map(a).filter(Boolean),h=f.map(a).filter(Boolean),b=u.data&&"object"==typeof u.data?u.data:{},g=Array.isArray(b.destination)?b.destination.map(a).filter(Boolean):[],y=Array.isArray(b.sailingDate)?b.sailingDate.map(a).filter(Boolean):[],_=Array.isArray(b.cruiseLine)?b.cruiseLine.map(a).filter(Boolean):[];return u.data={destination:m.length?m:g,sailingDate:s(p.length?p:y),cruiseLine:h.length?h:_},i.form=u,o[r]=i,n.tabs=o,n}},21898:(e,t,r)=>{"use strict";r.d(t,{Ib:()=>p,L$:()=>m,T5:()=>_,ZM:()=>f,_M:()=>a,cY:()=>g,h4:()=>h,ju:()=>y,mi:()=>b});let a=Object.freeze({HOTELS:"hotels",CARS:"cars",CRUISES:"cruises",OTHER:"other"}),n=Object.freeze({COMBOBOX:"auro-combobox-5_2_2, auro-combobox, [auro-combobox]",FORMKIT_COMPONENT:"auro-formkit-combobox-input-4_2_0, auro-formkit-combobox-input, auro-formkit-select-dropdown-3_0_0",FORMKIT_TRIGGER:'auro-formkit-combobox-input-4_2_0[slot="trigger"], auro-formkit-combobox-input[slot="trigger"]',FIELD:'input[part="input"], input[role="combobox"], input[type="search"], input[type="text"], input',CARS_PANEL:'input[type="checkbox"][name="differentDropoff"], input[type="checkbox"][data-test="different-dropoff"]',BIB_WRAPPER:'auro-formkit-combobox-bibtemplate-1_0_0[isfullscreen], auro-formkit-combobox-bibtemplate[isfullscreen], [auro-bibtemplate="true"][isfullscreen]',BIB_INPUT:'#inputInBib, auro-formkit-combobox-input-4_2_0#inputInBib, auro-formkit-combobox-input#inputInBib, auro-formkit-combobox-input-4_2_0[slot="subheader"], auro-formkit-combobox-input[slot="subheader"]'}),o=Object.freeze({COLLAPSED:"borealis-collapsed-booking-widget",EXPANDED:"borealis-expanded-booking-widget",FLIGHT_SEARCH:"borealis-flight-search",LOCATION_PICKER:"borealis-location-picker"}),i=Object.freeze({GROUP:"auro-tabgroup, auro-tabgroup-1_0_0",PANEL:"auro-tabpanel, auro-tabpanel-1_0_0",GROUP_TAG_RE:/^AURO-TABGROUP(?:-\d+_\d+_\d+)?(?:-rc-\d+_\d+_\d+)?$/u,PANEL_TAG_RE:/^AURO-TABPANEL(?:-\d+_\d+_\d+)?(?:-rc-\d+_\d+_\d+)?$/u}),s=Object.freeze({HOST:"borealis-car-rental-form",ITEM:".borealis-car-booking-form-item",ITEM_BY_NAME:e=>`.borealis-car-booking-form-item[name="${e}"]`,ITEM_PICKUP:".borealis-car-booking-form-item.pickup",ITEM_DROPOFF:".borealis-car-booking-form-item.dropoff"}),l=Object.freeze({HOST:"borealis-hotel-booking-form",ITEM:".borealis-hotel-booking-form-item",ITEM_BY_NAME:e=>`.borealis-hotel-booking-form-item[name="${e}"]`}),u=Object.freeze({FIELD_NAMES:Object.freeze({PICKUP:"pickupLocation",DROPOFF:"dropoffLocation"}),PICKER_BY_NAME:e=>`borealis-location-picker[name="${e}"]`,FORMKIT_NODE_BY_NAME:e=>`[data-formkit-node][data-name="${e}"] borealis-location-picker`}),c=Object.freeze({TABPANEL_ID:"#auro-tabpanel-4",ROOT_DIV_ID:"#cruises",FORM_HOST:"borealis-cruise-booking-form",FIELD_NAMES:Object.freeze({DESTINATION:"destination",SAILING_DATE:"sailingDate",CRUISE_LINE:"cruiseLine"}),SELECT_BY_NAME:e=>`auro-select-cruises[name="${e}"]`,MENU_BY_NAME:e=>`auro-menu-cruises[name="${e}"]`,MENUOPTION_BY_NAME:e=>`auro-menuoption-cruises[name="${e}"]`,SELECT_ALL:"auro-select-cruises, auro-formkit-select-dropdown-3_0_0",MENU_ALL:"auro-menu-cruises",MENUOPTION_ALL:"auro-menuoption-cruises"}),d=Object.freeze({COMBOBOX_TAG:"auro-combobox",MENU_TAG:"auro-menu",MENU_OPTION_TAG:"auro-menuoption",COMBO_OR_MENU:"auro-combobox,auro-menu"}),f=Object.freeze({INPUT:n,WIDGET:o,EXPANDED:o.EXPANDED,COLLAPSED:o.COLLAPSED,FLIGHT_SEARCH:o.FLIGHT_SEARCH,LOCATION_PICKER:o.LOCATION_PICKER,TABS:i,TAB_PANELS:i.PANEL,TABGROUP:i.GROUP,TABGROUP_SELECTOR:i.GROUP,CAR_FORM:s,HOTEL_FORM:l,CARS:u,CRUISES:c,RENDERER:d,COMBOBOX:n.COMBOBOX,HOST:n.COMBOBOX,FORMKIT_COMPONENT:n.FORMKIT_COMPONENT,FORMKIT_TRIGGER:n.FORMKIT_TRIGGER,COMBOBOX_INPUT_FIELD:n.FIELD}),m=Object.freeze({[a.CARS]:['borealis-car-rental-form borealis-location-picker.borealis-car-booking-form-item[name="pickupLocation"]',"borealis-car-rental-form borealis-location-picker.borealis-car-booking-form-item",'borealis-location-picker.borealis-car-booking-form-item[name="pickupLocation"]',"borealis-location-picker.borealis-car-booking-form-item",'borealis-location-picker[name="pickupLocation"]','auro-combobox-5_2_2[name="car-rental-location"]','auro-combobox[name="car-rental-location"]','[auro-combobox][name="car-rental-location"]'],[a.HOTELS]:['borealis-hotel-booking-form borealis-location-picker.borealis-hotel-booking-form-item[name="locationCombobox"]',"borealis-hotel-booking-form borealis-location-picker.borealis-hotel-booking-form-item",'borealis-location-picker.borealis-hotel-booking-form-item[name="locationCombobox"]',"borealis-location-picker.borealis-hotel-booking-form-item",'borealis-location-picker[name="locationCombobox"]',"borealis-location-picker",'auro-combobox-5_2_2[name="hotel-booking-location"]','auro-combobox[name="hotel-booking-location"]','[auro-combobox][name="hotel-booking-location"]']}),p=Object.freeze({[a.HOTELS]:"hotel_locations",[a.CARS]:"car_locations",[a.CRUISES]:"cruise_options"});Object.freeze([f.WIDGET.COLLAPSED,f.WIDGET.EXPANDED,f.WIDGET.FLIGHT_SEARCH]);let h=s.HOST,b=l.HOST,g=u.FIELD_NAMES;c.FORM_HOST,c.TABPANEL_ID,c.ROOT_DIV_ID,c.FIELD_NAMES,f.COMBOBOX,f.FORMKIT_COMPONENT,f.FORMKIT_TRIGGER,f.TABGROUP;let y=o.EXPANDED,_=o.COLLAPSED},29370:e=>{"use strict";e.exports=self.fetch.bind(self),e.exports.default=e.exports},29424:e=>{e.exports={failedFormPlaceholder:"SlottedBookingWidgetRender_failedFormPlaceholder__8tIn7",failedFormText:"SlottedBookingWidgetRender_failedFormText__9_wMw",noMargin:"SlottedBookingWidgetRender_noMargin__LTNGl"}},30003:(e,t,r)=>{"use strict";r.d(t,{Jw:()=>A,PL:()=>C,hu:()=>Q,m:()=>et,W8:()=>eC,h1:()=>en,y$:()=>ed,lY:()=>u});var a=r(39324),n=r.n(a),o=r(14232),i=r(65579);function s(e,t=300){let r=(0,o.useRef)(e);(0,o.useEffect)(()=>{r.current=e},[e]);let a=(0,o.useRef)(0),n=(0,o.useCallback)((...e)=>{a.current&&clearTimeout(a.current),a.current=window.setTimeout(()=>r.current(...e),t)},[t]),i=(0,o.useCallback)(()=>{a.current&&clearTimeout(a.current),a.current=0},[]),l=(0,o.useCallback)((...e)=>{a.current&&(clearTimeout(a.current),a.current=0,r.current(...e))},[]);return(0,o.useEffect)(()=>i,[i]),{debounced:n,cancel:i,flush:l}}let{publicRuntimeConfig:l}=n()();function u({endpoint:e="",debounceMs:t=300,minChars:r=1,queryParam:a="q",transform:n=e=>Array.isArray(e)?e:[]}){let[l,u]=(0,o.useState)(""),[d,f]=(0,o.useState)([]),[m,p]=(0,o.useState)(!1),[h,b]=(0,o.useState)(null),[g,y]=(0,o.useState)(null),_=(0,o.useRef)(null),E=(0,o.useRef)(0);(0,o.useEffect)(()=>()=>_.current?.abort(),[]),(0,o.useEffect)(()=>{_.current?.abort(),f([]),b(null),p(!1)},[e]);let A=((0,i.V)()||{}).appInsights,w=(0,o.useCallback)(async(t="")=>{let r=String(t).trim();_.current?.abort();let o=new AbortController;_.current=o;let i=++E.current;b(null),p(!0);try{let t=await c({endpoint:e,term:r,queryParam:a,signal:o.signal});E.current===i&&f(n(t))}catch(e){e?.name!=="AbortError"&&(A?.trackException?.({exception:e}),E.current===i&&(b(e?.message??"Unknown error"),f([])))}finally{E.current===i&&p(!1)}},[e,a,n,A]),{debounced:C}=s(w,t),S=(0,o.useCallback)(t=>{let a=String(t??"").trim();if(u(a),!e||a.length<r){_.current?.abort(),f([]),b(null),p(!1);return}C(a)},[C,r,e]),T=(0,o.useCallback)(e=>y(e),[]);return(0,o.useMemo)(()=>({query:l,options:d,loading:m,error:h,selected:g,onSearch:S,onSelect:T,triggerFetch:w}),[l,d,m,h,g,S,T,w])}async function c({endpoint:e,term:t="",queryParam:r="q",signal:a}){let{releaseEnv:n}=l,o=l.basePath||"",i=o.endsWith("/")?o.slice(0,-1):o,s=String(e||"").trim(),u=/^https?:\/\//i.test(s);u||(s.startsWith("/")||(s="/"+s),"development"!==n&&i&&!s.startsWith(i+"/")&&(s=i+s));let c=String(t).length>0,d=s;if(c&&r)if(u){let e=new URL(s);e.searchParams.set(r,t),d=e.toString()}else{let e=s.includes("?")?"&":"?";d=`${s}${e}${encodeURIComponent(r)}=${encodeURIComponent(t)}`}let f=await fetch(d,{signal:a});if(!f.ok)throw Error(`API error ${f.status}`);try{return await f.json()}catch{throw Error("Failed to parse JSON")}}r(37876);var d=r(95062),f=r.n(d);let m="undefined"!=typeof globalThis?globalThis:window;function p(){let e=null,t=new Set,r=()=>
1t.forEach(e=>{try{e()}catch{}});return{getSnapshot:()=>Array.isArray(e)?e:[],getRaw:()=>e,set(t){e=Array.isArray(t)?[...t]:null,r()},clear(){e=null,r()},subscribe:e=>(t.add(e),()=>t.delete(e)),filter(e,t){let r=String(t||"").toLowerCase().trim();return r?(Array.isArray(e)?e:[]).filter(e=>[e?.locationName,e?.cityName,e?.stateCode,e?.countryName,e?.airportCode,e?.label,e?.name,e?.displayName].filter(Boolean).join(" ").toLowerCase().includes(r)):Array.isArray(e)?e:[]},safeFilter(e,t){if(!Array.isArray(e))return[];try{return this.filter(e,t)}catch{return[]}}}}let h=m&&(m.__carLocationStore=m.__carLocationStore||p())||p();f().node;let b=()=>h.getRaw(),g=(e,t=200)=>e?h.safeFilter(h.getSnapshot(),e).slice(0,t):[],y=()=>h.getSnapshot(),{publicRuntimeConfig:_}=n()(),E=null;function A(e){let{releaseEnv:t}=_,r=_.basePath||"",a=r.endsWith("/")?r.slice(0,-1):r,n="/api/cars",i="development"===t?`${n}`:`${a}${n}`;(0,o.useEffect)(()=>{let e=!1,t=null,r=async()=>{let e=await c({endpoint:i});return Array.isArray(e)&&h.set(e),e},a=async()=>{await new Promise(e=>{t=setTimeout(e,1e3)});try{return await r()}catch{return null}};return(async()=>{if(e)return;let n=b?.();Array.isArray(n)&&n.length||(E||(E=(async()=>{try{return await r()}catch{return E=null,await a()}finally{t&&clearTimeout(t),E=null}})()),await E)})(),()=>{e=!0}},[e,e?.current,i])}var w=r(21898);function C({elementRef:e,formMode:t,settledKey:r}){let a=(0,o.useRef)(!1);(0,o.useEffect)(()=>{a.current=!1},[r]),(0,o.useEffect)(()=>{if(t!==w._M.CARS||!r)return;let n=e.current;if(!n)return;let o=()=>{let e=n.querySelector("borealis-car-rental-form");if(!e)return!1;let t=y();return!!Array.isArray(t)&&0!==t.length&&(e.data=t,a.current=!0,!0)};if(o())return;let i=Date.now(),s=setInterval(()=>{(o()||Date.now()-i>5e3)&&clearInterval(s)},250);return()=>clearInterval(s)},[e,t,r])}var S=r(52782);let T=e=>Array.isArray(e)?e:[],O=e=>e&&"object"==typeof e?e:{},R=async(e,t,r,a,n)=>{if(!e?.isConnected)return;let o=Array.isArray(a)?a:[],i=()=>new Promise(e=>"function"==typeof requestAnimationFrame?requestAnimationFrame(()=>e()):setTimeout(e,16)),s=async()=>{await i(),await i()},l=(e,t)=>new Promise((r,a)=>{let n=setTimeout(()=>a(Error("updateComplete timeout")),t);e.then(e=>{clearTimeout(n),r(e)}).catch(e=>{clearTimeout(n),a(Error(e))})}),u=()=>e?.updateComplete?.then?e.updateComplete:Promise.resolve(),c=()=>{if("function"==typeof e?.requestUpdate)try{e.requestUpdate("data",o)}catch{e.requestUpdate()}},d=async()=>{c(),await Promise.resolve(),await s(),!n?.aborted&&e.isConnected&&await l(u(),750)},f=async e=>{if(!(((e="")=>e.includes("ChildPart has no parentNode")||e.includes("part was manipulated")||e.includes("Cannot set properties of null")||e.includes("Cannot read property"))(e?.message??String(e))&&r&&!r.current))return void t?.(e);r.current=!0;try{await s(),c(),await l(u(),750)}catch(e){t?.(e)}};try{await d()}catch(e){await f(e)}},M=(e,t)=>{let r=String(e?.mode??"").toLowerCase(),a=String(e?.title??"").toLowerCase();return r?r===t:a===t||a.startsWith(t)},k=(e,t)=>{if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},L=async({host:e,formMode:t,locations:r})=>{if(!e?.isConnected)return{changed:!1,prev:void 0,next:void 0};if("updateComplete"in e&&e.updateComplete&&"function"==typeof e.updateComplete.then)try{await e.updateComplete}catch{}if(!e.isConnected)return{changed:!1,prev:void 0,next:void 0};let a=(({host:e,formMode:t,locations:r})=>{if(!e?.isConnected)return{changed:!1,prev:void 0,next:void 0};let a=String(t||"").toLowerCase();if(a!==w._M.HOTELS&&a!==w._M.CARS)return{changed:!1,prev:e.data,next:e.data};let n=T(r).slice(),o=O(e.data),{needsChange:i,collapsed:s,expanded:l}=((e,t,r)=>{let a=w.Ib[t],n=T(O(e).collapsed_widget),o=T(O(e).expanded_widget),i=n.some(e=>!k(T(O(e)[a]),r)),s=o.some(e=>T(O(e).tabs).some(e=>{let a=O(e);return!!M(a,t)&&!k(T(O(a.form).data),r)})),l=((e,t,r)=>{let a=T(e);return 0===a.length?[{[t]:r}]:a.map(e=>({...O(e),[t]:r}))})(n,a,r),u=T(o).map(e=>{let a=O(e),n=T(a.tabs).map(e=>{let a=O(e);
1if(!M(a,t)||!a.form||"object"!=typeof a.form)return a;let n=a.form;return{...a,form:{...n,data:r}}});return{...a,tabs:n}});return{needsChange:Array.isArray(l)&&Array.isArray(u)&&(i||s),collapsed:l,expanded:u}})(o,a,n);if(!i||!Array.isArray(s)||!Array.isArray(l))return{changed:!1,prev:e.data,next:e.data};let u=e.data;e.data={...o,collapsed_widget:s.slice(),expanded_widget:l.slice()};try{e.requestUpdate?.("data",u)}catch{e.requestUpdate?.()}return{changed:!0,prev:u,next:e.data}})({host:e,formMode:t,locations:r});if(a.changed&&"updateComplete"in e&&e.updateComplete&&"function"==typeof e.updateComplete.then)try{await e.updateComplete}catch{}return a},N=e=>{if(!e)return{expanded:null,collapsed:null,expRoot:null,colRoot:null};let t=e?.shadowRoot??e??null;if(!(e=>!!e&&"function"==typeof e.querySelector)(t))return{expanded:null,collapsed:null,expRoot:null,colRoot:null};let r=t.querySelector(w.ju),a=t.querySelector(w.T5),n=r&&(r.shadowRoot||r.renderRoot||r),o=a&&(a.shadowRoot||a.renderRoot||a);return{expanded:r,collapsed:a,expRoot:n,colRoot:o}},P=new WeakMap,I=()=>new Promise(e=>requestAnimationFrame(e)),D=async()=>{await I(),await I()};async function x(e,t,r){let a;if(!e?.isConnected)return;let n=P.get(e)||Promise.resolve(),o=n.finally(()=>new Promise(e=>a=e));P.set(e,o),await n;try{if(r?.aborted||!e.isConnected)return;if(e.isUpdatePending)try{await e.updateComplete}catch{}if(await D(),r?.aborted||!e.isConnected)return;let a=await t();if(e.isUpdatePending)try{await e.updateComplete}catch{}return await D(),a}finally{a?.(),P.get(e)===o&&P.delete(e)}}let U=(e,t)=>{let r=e.data??{},a=Array.isArray(r.tabs)?r.tabs:[],n=a.findIndex(e=>"cars"===String(e?.mode||"").toLowerCase()||String(e?.title||"").toLowerCase().startsWith("cars"));if(n>=0&&a[n]?.form){let o={...r};o.tabs=[...a],o.tabs[n]={...a[n],form:{...a[n].form,data:t}},e.data=o,e.requestUpdate?.()}};async function F(e,t){if(!e?.isConnected)return;let r=Array.isArray(t)?t:null!=t?[t]:[];if(Array.isArray(e.data?.expanded_widget)||Array.isArray(e.data?.collapsed_widget))await L({host:e,formMode:w._M.HOTELS,locations:r});else if(!((e,t)=>{let r=e.data&&"object"==typeof e.data?e.data:{},a=Array.isArray(r.tabs)?r.tabs:[],n=(e=>{let t=e.findIndex(e=>String(e?.mode||"").toLowerCase()===w._M.HOTELS);if(t>=0)return t;let r=e.findIndex(e=>String(e?.title||"").toLowerCase().startsWith("hotels"));if(r>=0)return r;let a=e.findIndex(e=>/ããã«/u.test(String(e?.title||"")));if(a>=0)return a;let n=e.findIndex(e=>{let t=e?.form?.labels||{};return"checkin"in t||"checkout"in t||"rooms"in t});return n>=0?n:e[2]?.form?2:-1})(a);if(n<0||!a[n]?.form)return!1;let o=e.data,i=a.map((e,r)=>r===n?{...e,form:{...e.form,data:t}}:e);e.data={...r,tabs:i};try{e.requestUpdate?.()}catch{e.requestUpdate?.("data",o)}return!0})(e,r))return;await D?.().catch(()=>{});let a=(0,S.Zg)(e,w.mi),n=a?.shadowRoot?.querySelector?.("borealis-location-picker"),o=n?.shadowRoot?.querySelector?.("auro-combobox, auro-combobox-5_2_2");n&&("items"in n?n.items=[...r]:"options"in n?n.options=[...r]:"data"in n&&Array.isArray(n.data)&&(n.data=[...r])),o&&("options"in o?o.options=[...r]:"items"in o&&(o.items=[...r])),o?.requestUpdate?.("options"),n?.requestUpdate?.(),a?.requestUpdate?.()}function B(e,t){if(!e?.isConnected)return{changed:!1};let r=e.data??{},a=Array.isArray(t)?t.slice():[];if(k(Array.isArray(r.car_locations)?r.car_locations:[],a))return{changed:!1,prev:r,next:r};let n={...r,car_locations:a};e.data=n;try{e.requestUpdate?.("data",r)}catch{e.requestUpdate?.()}return{changed:!0,prev:r,next:n}}var q=r(37257),j=r(11125),$=r(17041),G=r(82971);let H=()=>{};async function Z(e){if(e?.updateComplete?.then)try{await e.updateComplete}catch{}}let W=["inputValue","value-changed","valueChanged","input","change","typed-value-changed","typedValueChanged","location-changed","locationChanged"];async function V(e,{onValueChange:t}){let r;await Z(e);let a=function(e){var t;let r,a,n=(t="undefined"!=typeof performance&&"function"==typeof performance.now?()=>performance.now():()=>Date.now(),a=-1/0,(e,n)=>{let o=t();o-a<20&&e===r||(a=o,r=e,n())}),{ac:o,opts:i}=function(){if("function"==typeof AbortController){let e=new AbortController;return{ac:e,opts:{signal:e.signal}}}return{ac:null,opts:void 0}}(),s={...i||{},passive:!0},l=[],u=(e=>{let t=null,r=t=>{try{t?e?.setAttribute?.("data-user-typing","1"):e?.removeAttribute?.("data-user-typing")}catch{}};return{bump:()=>{r(!0),clearTimeout(t),t=setTimeout(()=>r(!1),350)},clear:()=>{clearTimeout(t),r(!1)}}})(e),c=(0,j.h4)?.(e)??null;return{comboboxNode:e,coalesce:n,ac:o,listenerOpts:s,cleanups:l,addCleanup:e=>{"function"==typeof e&&l.push(e)},typing:u,inputEl:c}}(e);
1return function(e,t){let{comboboxNode:r,listenerOpts:a,coalesce:n,addCleanup:o,ac:i}=e,s=e=>{let r=(e=>{let t=e?.detail?.value??e?.detail?.inputValue??e?.target?.value;return"string"==typeof t?t:void 0})(e);void 0!==r&&n(r,()=>t?.(r))};W.forEach(e=>r?.addEventListener?.(e,s,a)),o(()=>{try{i?.abort()}catch{}W.forEach(e=>{try{r?.removeEventListener?.(e,s)}catch{}})})}(a,t),a.inputEl&&function(e,t){let{inputEl:r,comboboxNode:a,typing:n,listenerOpts:o,coalesce:i,addCleanup:s,ac:l}=e;s(((e,t)=>{try{let r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");if(!e||!r?.get||!r?.set)return H;let a=r.get.bind(e),n=r.set.bind(e);return Object.defineProperty(e,"value",{configurable:!0,get:a,set(e){try{let r=t?.getAttribute?.("data-user-typing")==="1",n=this===(this.getRootNode?.().activeElement??document?.activeElement);if(r&&n&&e!==a())return}catch{}n(e)}}),()=>{try{delete e.value}catch{}}}catch{return H}})(r,a));var u=n.bump;try{r?.addEventListener?.("beforeinput",u,{passive:!0}),r?.addEventListener?.("keydown",u,{passive:!0}),s(()=>{try{r?.removeEventListener?.("beforeinput",u)}catch{}try{r?.removeEventListener?.("keydown",u)}catch{}})}catch{}!function(e,{listenerOpts:t,bump:r,onValueChange:a,coalesce:n,addCleanup:o,abortCtrl:i,clearTyping:s}){let l=e=>{r();let t=e?.target?.value;"string"==typeof t&&n(t,()=>a?.(t))};e?.addEventListener?.("input",l,t),e?.addEventListener?.("change",l,t),o(()=>{try{i?.abort()}catch{}s();try{e?.removeEventListener?.("input",l)}catch{}try{e?.removeEventListener?.("change",l)}catch{}})}(r,{listenerOpts:o,bump:n.bump,onValueChange:t,coalesce:i,addCleanup:s,abortCtrl:l,clearTyping:n.clear})}(a,t),r=a.cleanups,()=>{r.splice(0).reverse().forEach(e=>e())}}let K=e=>{try{if(!e)return!1;if(e.getAttribute?.("data-user-typing")==="1")return!0;let t=e.shadowRoot?.querySelector?.('input[part="input"], input[role="combobox"]')??e.querySelector?.('input[part="input"], input[role="combobox"]'),r=t?.getRootNode?.().activeElement??document.activeElement;return!!t&&r===t}catch{return!1}},Y=w._M.CARS,z=0,X=new WeakMap,J=e=>String(e??"").normalize("NFKC").toLowerCase().trim();function Q({elementRef:e,formMode:t,carSearchTerm:r,onLitFatal:a,hasRetriedRef:n,settledKey:i,useAllCartrawlerLocations:l=!1}){let[u,c]=(0,o.useState)(!1),d=e?.current,f=t===Y,m=(0,o.useRef)(l);m.current=l;let p=(0,o.useRef)(++z),h=(0,o.useRef)(""),b=(0,o.useRef)(null),_=(0,o.useRef)(`[useCarsMenuInjection#${p.current}]`),E=(0,o.useMemo)(()=>"function"==typeof a?a:e=>{try{console.error(_.current,e)}catch{}},[a]),A=(0,o.useCallback)(()=>(0,$.I_)(d),[d]),C=(0,o.useCallback)(async(e,t)=>{var r;if(!e)return;let a=(r=Array.isArray(t)?t:[],m.current?r:r.filter(e=>e.airportCode&&!0===e.isAirport)),n=(0,G.mapLocationsToAuroOptions)(a);return(0,j.applyOptionsToFormPicker)(e,a,n,{CHUNK_SIZE:200,UI_MAX_MENU_OPTIONS:400})},[]),T=(0,o.useCallback)(async(e,{framesToWait:t=6,allowEmptyTerm:r=!1}={})=>{let a=r?y().slice(0,500):g(h.current||"",500);if(a.length)return a;let n=(0,$.Dn)(e);if(n.length)return n;for(let a=0;a<t;a++){try{await (0,q.SG)(e,void 0,{frames:1,quietMs:80})}catch{}await new Promise(e=>requestAnimationFrame(e));let t=r?y().slice(0,500):g(h.current||"",500);if(t.length)return t}return[]},[]),O=(0,o.useCallback)(async()=>{let e,t=A(),r=(u?await (0,$.w8)(t||d,w.cY.DROPOFF,void 0,q.SG):null)||await (0,S.bk)(d,w._M.CARS)||null;if(!r)return;(0,j.OL)(r);let a=await T(d,{framesToWait:24,allowEmptyTerm:!0});if(!a.length){try{await (0,q.SG)(d,void 0,{frames:1,quietMs:120})}catch{}a=await T(d,{framesToWait:8,allowEmptyTerm:!0})}let n=(0,j.YB)(r);n&&(n.open=!0,n.show?.(),n.toggle?.(!0)),await (e=a,x(d,async()=>{let{changed:t}=await L({host:d,formMode:Y,locations:e}),r=Array.isArray(e)?[...e]:[];if(U(d,r),B(d,r),t)try{await (0,q.SG)(d,void 0,{frames:1,quietMs:50})}catch{}},void 0)),await C(r,a)},[d,u,A,T,C]),M=(0,o.useCallback)(async(e,t,r)=>(await R(e,E,n,r),!t?.signal?.aborted&&(await (0,q.SG)(e,t.signal,{frames:1,quietMs:50}),!t?.signal?.aborted)),[E,n]),k=(0,o.useCallback)((e,t)=>{let r=Array.isArray(t)?[...t]:[];U(e,r);let{changed:a}=B(e,r)??{};return!!a},[]),N=(0,o.useCallback)(async(e,t,r)=>{let{changed:a,prev:n}=await L({host:e,formMode:Y,locations:r}),o=k(e,r);return!t?.signal?.aborted&&(a||o)?{changed:await M(e,t,n)}:{changed:!1}},[M,k]),{debounced:P,cancel:I,flush:D}=s(async r=>{let a=e?.current,n=J(r);if(!a||t!==Y||!n)return;try{b.current?.abort()}catch(e){console.log(e)}let o="undefined"!=typeof AbortController?new AbortController:{signal:{aborted:!1},abort(){}};if(b.current=o,await (0,q.e0)(a,o.signal),await (0,q.SG)(a,o.signal,{frames:1,quietMs:50}),o?.signal?.aborted||t!==Y)return;if("function"!=typeof a.requestUpdate)return void E(Error("Host is not a Lit element"));let i=(X.get(a)||{seq:0}).seq+1;X.set(a,{seq:i});let s=()=>(X.get(a)?.seq??0)!==i;h.current=n;let l=g(h.current,500),c=await (0,S.bk)(d,w._M.CARS);if(!c?.isConnected){let e=A(),t=u?w.cY.DROPOFF:w.cY.PICKUP;c=await (0,$.w8)(e||d,t,o.signal,q.SG)}
1if(!c?.isConnected)throw Error("Picker not connected");if(await C(c,l),u){let e=A(),t=await (0,$.w8)(e||d,w.cY.DROPOFF,o.signal,q.SG);t?.isConnected&&t!==c&&await C(t,l)}if(n.length){if(K(c))return void setTimeout(async()=>{!s()&&i===(X.get(a)?.seq??0)&&!K(c)&&!o.signal.aborted&&(await (0,q.SG)(a,o.signal,{frames:1,quietMs:150}),o?.signal?.aborted||s()||K(c)||x(a,async()=>{o?.signal?.aborted||s()||K(c)||await N(a,o,l)},o.signal))},250);await (0,q.SG)(a,o.signal,{frames:1,quietMs:150}),o?.signal?.aborted||s()||K(c)||await x(a,async()=>{if(!(o?.signal?.aborted||s()||K(c)))try{await N(a,o,l)}catch(t){let e=t?.message??"";if(!(e.includes("ChildPart")&&e.includes("parentNode")))throw t;if(await N(a,o,[]),o?.signal?.aborted||s())return;await N(a,o,l)}},o.signal)}},300);(0,o.useEffect)(()=>{if(!d||!i)return;let e=(0,S.Zg)(d,w.h4);if(!e)return;let t=()=>(0,S.aF)(e,[w.ZM.CARS.PICKER_BY_NAME(w.cY.DROPOFF),w.ZM.CARS.FORMKIT_NODE_BY_NAME(w.cY.DROPOFF),w.ZM.CAR_FORM.ITEM_DROPOFF,w.ZM.CAR_FORM.ITEM_BY_NAME(w.cY.DROPOFF)]),r=t(),a=null,n=()=>c(!!t()&&!(0,S.Dk)(t())),o=()=>{r&&(a=new MutationObserver(n)).observe(r,{attributes:!0,attributeFilter:["hidden","inert","aria-hidden","class","style"]})},s=new MutationObserver(()=>{let e=t();if(e!==r){try{a?.disconnect()}catch{}(r=e)&&o(),n()}});r&&o(),s.observe(e.shadowRoot??e,{childList:!0,subtree:!0});let l=e.shadowRoot??e;return l.addEventListener("change",n,!0),l.addEventListener("input",n,!0),n(),()=>{try{l.removeEventListener("change",n,!0),l.removeEventListener("input",n,!0),s.disconnect(),a?.disconnect()}catch{}}},[d,i]);let F=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(!d||!i)return;let e=!F.current&&u;if(F.current=u,e){try{b.current?.abort()}catch{}I(),h.current="",(async()=>{await O()})()}},[u,d,i,I,O]),(0,o.useEffect)(()=>{if(!d||!i||!u||!f)return;let e=!1,t=null;return(async()=>{let r=A(),a=await (0,$.w8)(r||d,w.cY.DROPOFF,void 0,q.SG);if(e||!a?.isConnected)return;let n=await V(a,{onValueChange:e=>{P(e)}});if(e)try{n?.()}catch{}else t=n})(),()=>{e=!0;try{t?.()}catch{}}},[d,i,u,f,A,P]),(0,o.useEffect)(()=>{if(!f||!d||!i)return;let e=J(r);if(e!==h.current||""===e)return h.current=e,e?P(e):(I(),D("")),()=>{I();try{b.current?.abort()}catch{}b.current=null}},[e,t,r,P,I,D,n,i])}window.__EBW_DEBUG__=window.__EBW_DEBUG__??!1;let ee=(...e)=>{window.__EBW_DEBUG__&&console.log("[useComboboxInputEvents]",...e)};function et({elementRef:e,formMode:t,setHotelSearchTerm:r,setCarSearchTerm:a,settledKey:n}){async function i(e,t){if(!e?.isConnected||t!==w._M.HOTELS)return;let r=e.shadowRoot,a=r?.querySelector?.("auro-tabgroup, auro-tabgroup-1_0_0");if(!a)return;let n=a.selectedIndex??a.selected??0,o=(Array.isArray(e.data?.tabs)?e.data.tabs:[]).findIndex(e=>String(e?.mode||"").toLowerCase()===w._M.HOTELS);if(!(o<0)&&n!==o)try{a.selectedIndex=o,await Promise.resolve(),requestAnimationFrame(()=>requestAnimationFrame(()=>a.selectedIndex=n))}catch(e){ee("ensurePanelStamped error",e)}}(0,o.useEffect)(()=>{ee("effect start",{formMode:t,settledKey:n,haveEl:!!e?.current}),i(e?.current,w._M.HOTELS);let o=t===w._M.CARS||t===w._M.HOTELS;if(!n||!o)return void ee("effect exit early (guards failed)",{settledKey:n,window:"object",isSupportedMode:o});let s=!1,l=null,u=[],c=null,d=null,f=null,m=0,p=!1,h=null,b=e=>"function"==typeof requestAnimationFrame?requestAnimationFrame(e):setTimeout(e,16),g=e=>b(()=>b(e)),y=t===w._M.CARS?a:r,_=()=>{let e=f?.shadowRoot?.querySelector?.('input[part="input"],input[role="combobox"]'),t=!!e&&e===e.getRootNode().activeElement,r=f?.getAttribute?.("data-user-typing")==="1";return!!(f?.isConnected&&(t||r))},E=()=>{for(let e of u)try{e?.()}catch{}u=[]},A=async e=>{if(!e?.addEventListener)return;ee("attachComboboxIfFound",e);let t=await V(e,{onValueChange:e=>{p=!0,ee("onValueChange",{value:e}),(e=>{if("string"!=typeof e)return;let t=e.trim();t!==l&&(l=t,"function"==typeof y&&Promise.resolve().then(()=>y(t)))})(e)}});u.push("function"==typeof t?t:()=>{});let r=e.shadowRoot?.querySelector?.('input,[role="combobox"]');if(r){let e=()=>p=!1;r.addEventListener("blur",e),u.push(()=>r.removeEventListener("blur",e))}},C=()=>g(O),T=(e=0)=>{clearTimeout(d),d=setTimeout(()=>{s||(()=>{if(!s){if(f&&_())return clearTimeout(h),h=setTimeout(()=>{!s&&(_()||C())},200);C()}})()},e)},O=async()=>
1{if(s)return;let r=e?.current;if(!r?.isConnected)return;let a=await (0,S.bk)(r,t);if(!a){f&&E(),f=null,ee("rewireEventListeners â not found",{notFoundRetries:m+=1}),m<60?T(Math.min(100+80*m,3e3)):T(3e3);return}if(m=0,a===f)return void ee("rewireEventListeners â same combobox, skip");ee("rewireEventListeners â new combobox detected"),E(),f=a,await A(f)};(async()=>{await i(e?.current,t),O()})(),g(O);let R=e?.current;if(!R)return()=>{s=!0,clearTimeout(d),E()};let M=e=>{if("attributes"===e.type){let t=e.attributeName;return"selectedtab"===t||"activetab"===t||"hidden"===t}return"childList"===e.type&&[...e.addedNodes,...e.removedNodes].some(e=>(e?.nodeName||"").toUpperCase().includes("AURO-COMBOBOX"))};(c=new MutationObserver(e=>{e?.length&&!p&&e.some(M)&&T(220)})).observe(R,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["selectedtab","activetab","hidden"]});let k=R.shadowRoot?.querySelector?.("auro-tabgroup, auro-tabgroup-1_0_0");if(k?.addEventListener){let e=()=>T(0);k.addEventListener("selected-index-changed",e),k.addEventListener("tab-selected",e),u.push(()=>{k.removeEventListener("selected-index-changed",e),k.removeEventListener("tab-selected",e)})}return()=>{s=!0,clearTimeout(d),clearTimeout(h),c?.disconnect(),E()}},[e,t,r,a,n])}class er{constructor(e,t){this.host=e,this.el=null,this.mode="flights",this.onModeChange=e=>{let t=e?.detail?.mode;t&&t!==this.mode&&this._setMode(t)},this.onSelectedTab=e=>{let t=e?.detail?.mode;if(t&&t!==this.mode)return void this._setMode(t);let r=Number(e?.detail?.index??e?.detail?.value??0),a=this._getModeFromTabData(r);if(a&&a!==this.mode)return void this._setMode(a);let n=this.modeFromCategory(r);n!==this.mode&&this._setMode(n)},this.host?.addController?.({hostConnected:()=>this.hostConnected(),hostDisconnected:()=>this.hostDisconnected()}),t&&this.setElement(t)}setElement(e){this.el&&this.detach(this.el),this.el=e??null,this.el&&this.attach(this.el),this.host?.requestUpdate?.()}hostConnected(){this.el&&this.attach(this.el)}hostDisconnected(){this.el&&this.detach(this.el)}attach(e){try{let t=this._resolveMode(e);t&&(this.mode=t)}catch{}e.addEventListener?.("bfs-form-mode-change",this.onModeChange),e.addEventListener?.("selected-tab-change",this.onSelectedTab);let t=e&&(1===e.nodeType||11===e.nodeType)&&"function"==typeof e.getAttribute;if("undefined"!=typeof MutationObserver&&t){this._observer=new MutationObserver(()=>{let t=e.getAttribute?.("formmode");t&&t!==this.mode&&this._setMode(t);let r=this._readNumberish(e.getAttribute?.("selectedtab"),e.getAttribute?.("selectedcategory"));if(null!=r){let e=this.modeFromCategory(r);e!==this.mode&&this._setMode(e)}});try{this._observer.observe(e,{attributes:!0,attributeFilter:["formmode","selectedtab","selectedcategory"]})}catch{this._observer=null}}this._resolveNow(e),this._abort=new AbortController,this._safeResolveAfterReady(e,this._abort.signal)}detach(e){if(e.removeEventListener?.("bfs-form-mode-change",this.onModeChange),e.removeEventListener?.("selected-tab-change",this.onSelectedTab),this._observer){try{this._observer.disconnect()}catch{}this._observer=null}this._cancelAsync()}_cancelAsync(){if(this._abort){try{this._abort.abort()}catch{}this._abort=null}this._deferTimer&&(clearTimeout(this._deferTimer),this._deferTimer=null)}async _safeResolveAfterReady(e,t){try{let r=e?.tagName?.toLowerCase?.();if(r&&window?.customElements?.whenDefined)try{await customElements.whenDefined(r)}catch{}if(e?.updateComplete instanceof Promise)try{await e.updateComplete}catch{}if(t?.aborted||(await new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(e))),t?.aborted))return;this._resolveNow(e)}catch{}}_resolveNow(e){let t=this._resolveMode(e);t&&t!==this.mode?this._setMode(t):this._deferTimer=setTimeout(()=>{let t=this._resolveMode(e);t&&t!==this.mode&&this._setMode(t)},0)}_setMode(e){this.mode=e,this.host?.requestUpdate?.()}modeFromCategory(e){let t=Number(e);return Number.isFinite(t)?1===t?"cars":2===t?"hotels":4===t?"cruises":"flights":"flights"}_getModeFromTabData(e){let t=this.el?.data?.tabs;if(!Array.isArray(t))return null;let r=t[e];return r&&"string"==typeof r.mode&&r.mode?r.mode:null}_resolveModeFromIndex(e){return this._getModeFromTabData(e)||this.modeFromCategory(e)}
1_resolveCategoryMode(e){let t=e?.getSelectedCategory;if("function"==typeof t)try{let r=t.call(e);if(null!=r)return this._resolveModeFromIndex(r)}catch{}else if("number"==typeof t)return this._resolveModeFromIndex(t);return null}_resolveMode(e){if("string"==typeof e?.formMode)return e.formMode;let t=e?.getAttribute?.("formmode");if(t)return t;let r=this._readNumberish(e?.selectedTab,e?.getAttribute?.("selectedtab"));if(null!=r)return this._resolveModeFromIndex(r);let a=this._readNumberish(e?.selectedCategory,e?.getAttribute?.("selectedcategory"));return null!=a?this._resolveModeFromIndex(a):this._resolveCategoryMode(e)}_readNumberish(...e){for(let t of e){let e=Number(t);if(Number.isFinite(e))return e}return null}}function ea(){try{let e=window.localStorage.getItem("borealisSearchData")??window.localStorage.borealisSearchData;if(!e)return"flights";let t=JSON.parse(e),r=Number(t?.__expandedTab__);if(Number.isFinite(r))return({1:"cars",2:"hotels"})[r]||"flights";if(t?.["hotel-booking-location"])return"hotels";if(t?.["car-rental-location"])return"cars"}catch{}return"flights"}function en(){let[e,t]=(0,o.useState)(ea),r=(0,o.useRef)(null),a=(0,o.useRef)(new Set),n=(0,o.useRef)(null);n.current||(n.current={requestUpdate:()=>{t(r.current?.mode??"flights")},addController:e=>{a.current.add(e),e?.hostConnected?.()},removeController:e=>{a.current.delete(e)&&e?.hostDisconnected?.()}});let i=(0,o.useCallback)(t=>{r.current?r.current.setElement(t??null):(r.current=new er(n.current,null),r.current.mode=e,t&&r.current.setElement(t))},[e]);return(0,o.useEffect)(()=>{let e=a.current;return()=>{try{e.forEach(e=>e?.hostDisconnected?.()),e.clear(),r.current?.setElement(null)}catch{}}},[]),{mode:e,ref:i}}let eo=w._M.HOTELS,ei=new WeakMap,es=(e,t,r,a)=>e.signal.aborted||t.current||r.current!==a||!a.isConnected,el=async(e,t)=>{if(!e||0===t.length)return ec("skipped dropdown population:",{hasPicker:!!e,locationsCount:t.length}),!1;let{mapLocationsToAuroOptions:a}=await Promise.resolve().then(r.bind(r,82971)),{applyOptionsToFormPicker:n}=await Promise.resolve().then(r.bind(r,11125)),o=a(t);ec("transformed options:",o.length,"items");let i=await n(e,t,o);return ec(i?">>> DROPDOWN POPULATED SUCCESSFULLY":"!!! FAILED TO POPULATE DROPDOWN"),i},eu=0,ec=(...e)=>{"undefined"!=typeof globalThis&&globalThis.__HOTELS_DEBUG__&&console.log("[useHotelMenuInjection]",...e)};function ed({elementRef:e,formMode:t,hotelLocations:r,onLitFatal:a,hasRetriedRef:n,settledKey:i}){let s=e?.current,l=t===eo,u=(0,o.useRef)(null);null==u.current&&(u.current=eu+=1);let c=`[useHotelMenuInjection#${u.current}]`,d=(0,o.useRef)(!!n?.current),f=(0,o.useRef)();f.current||(f.current={get current(){return d.current},set current(v){d.current=!!v}});let m=f.current,p=(0,o.useRef)(""),h=(0,o.useRef)(null),b=(0,o.useRef)(!1);(0,o.useEffect)(()=>()=>{b.current=!0},[]);let g=(()=>{let t=e?.current;if(!t)return"nohost";let{expanded:r,collapsed:a}=N(t);return`${r?r.id||"expanded":"none"}|${a?a.id||"collapsed":"none"}`})();(0,o.useEffect)(()=>{if(!s||!l)return void ec("early exit: host=",!!s,"isHotels=",l);if(!i)return void ec("early exit: no settledKey");let t=Array.isArray(r)?r:[];ec("effect running with",t.length,"locations");let{expanded:n,collapsed:o}=N(s),u=`${n?n.id||"expanded":"none"}|${o?o.id||"collapsed":"none"}`,d=`${(e=>{if(!Array.isArray(e)||0===e.length)return"0|empty";let t=e[0],r=e[e.length-1],a=t?.id??t?.code??t?.name??String(t),n=r?.id??r?.code??r?.name??String(r);return`${e.length}|${a}|${n}`})(t)}|${u}|${s}`;if(d===p.current&&h.current===s)return;let f="undefined"!=typeof AbortController?new AbortController:{signal:{aborted:!1},abort(){}},g=f.signal,y=a??(e=>console.error(c,e)),_=(ei.get(s)||{run:Promise.resolve(),seq:0}).seq+1,E=(async()=>{if(await (0,q.e0)(s,g),await (0,q.SG)(s,g,{frames:1,quietMs:50}),es(f,b,e,s))return;let r=ei.get(s);if(!r||r.seq!==_)return;if("function"!=typeof s.requestUpdate)return void y(Error("Host is not a Lit element"));let a=await (0,S.bk)(s,eo)||null;if(ec("picker found:",!!a,a?.tagName),await (0,q.SG)(s,g,{frames:1,quietMs:150}),g.aborted||!s.isConnected||K(a))return;let{changed:n,prev:o}=await L({host:s,formMode:eo,locations:t});if(g.aborted||!s.isConnected||(n&&!K(a)&&(await R(s,y,m,o),await (0,q.SG)(s,g,{frames:1,quietMs:150})),K(a)))return;let i=s.data;if((F(s,t),!function(e,t){if(!e?.isConnected)return;let r=e.data??{},a=Array.isArray(t)?t.slice():[];if(!k(Array.isArray(r.hotel_locations)?r.hotel_locations:[],a)){e.data={...r,hotel_locations:a};try{e.requestUpdate?.("data",r)}catch{e.requestUpdate?.()}}}(s,t),!g.aborted&&s.isConnected)&&(i!==s.data&&await (0,q.SG)(s,g,{frames:1,quietMs:50}),!es(f,b,e,s)))return ec("about to populate dropdown:",{hasPicker:!!a,locationsCount:t.length}),await el(a,t),p.current=d,h.current=s,()=>{try{f.abort()}catch{}}})().catch(y);ei.set(s,{run:E,seq:_})},[s,l,r,g,a,e,c,m,i])}let ef=w._M.CRUISES,em=async(e,t)=>{let r=(0,$.Vo)(e),a={};for(let n of["destination","sailingDate","cruiseLine"])try{let o=await (0,$.dI)(r||e,n,void 0,t);o&&(a[n]=o)}catch(e){console.warn(`Error finding cruise select for ${n}: ${e.message||e}`)}let n=[];
1for(let t of[r,e.shadowRoot,e].filter(Boolean)){if(t.querySelectorAll){let e=t.querySelectorAll(` 2 auro-select-cruises, 3 [auro-select-cruises], 4 auro-menu-cruises, 5 auro-menuoption-cruises, 6 auro-formkit-select-dropdown-3_0_0, 7 [data-name="destination"], 8 [data-name="sailingDate"], 9 [data-name="cruiseLine"], 10 [name*="cruise"], 11 [name*="destination"], 12 [name*="sailing"] 13 `);n.push(...e)}t.querySelectorAll&&t.querySelectorAll("*").forEach(e=>{if(e.shadowRoot){let t=e.shadowRoot.querySelectorAll(` 14 auro-select-cruises, 15 auro-menu-cruises, 16 auro-menuoption-cruises, 17 auro-formkit-select-dropdown-3_0_0 18 `);n.push(...t)}})}return{selects:a,allElements:n}},ep=new Set(["ArrowDown","ArrowUp","Home","End","Enter"," "]),eh=e=>{let t=e.shadowRoot;t&&t.querySelectorAll('auro-menuoption-cruises, auro-menu-cruises, auro-menuoption, auro-menu, [role="option"], [role="listbox"]').forEach(e=>{e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),e.hasAttribute("inert")&&e.removeAttribute("inert")})},eb=async(e,t)=>{e&&Array.isArray(t)&&(e===document.activeElement||e.contains?.(document.activeElement)||e.shadowRoot?.activeElement!=null||"function"!=typeof e.blur||(e.blur(),await new Promise(e=>requestAnimationFrame(e))),e.options=t,"function"==typeof e.requestUpdate&&e.requestUpdate())},eg=async(e,t,r,a)=>{try{e.value=t,"selectedOption"in e&&(e.selectedOption=a),"displayValue"in e&&(e.displayValue=r),"selectedText"in e&&(e.selectedText=r),"function"==typeof e.requestUpdate&&(e.requestUpdate(),e.requestUpdate("value"),e.requestUpdate("selectedOption"),e.requestUpdate("displayValue")),e.shadowRoot&&e.shadowRoot.querySelectorAll('.value, .displayValue, [part="displayValue"], #value, .triggerContent .mainContent .value').forEach(e=>{e&&(e.textContent=r,e.innerText=r)}),["change","input","select"].forEach(t=>{let r=new Event(t,{bubbles:!0});e.dispatchEvent(r)});let n=new CustomEvent("auro-select",{detail:{value:t,text:r},bubbles:!0,composed:!0});e.dispatchEvent(n);let o=e.querySelector("select")||e.shadowRoot?.querySelector("select");o&&(o.value=t,o.dispatchEvent(new Event("change",{bubbles:!0}))),setTimeout(()=>{"function"==typeof e.requestUpdate&&e.requestUpdate()},10),setTimeout(()=>{let e=new MouseEvent("click",{bubbles:!0,cancelable:!0,clientX:0,clientY:0});document.body.dispatchEvent(e)},0)}catch(e){console.warn(`Failed to update select component: ${e.message||e}`)}},ey=(e,t,r)=>{if(t.tagName?.includes("MENU")){let e=()=>{t.hasAttribute("aria-hidden")&&t.removeAttribute("aria-hidden"),t.hasAttribute("inert")&&t.removeAttribute("inert")};t.addEventListener("focus",e,!0),t.addEventListener("focusin",e,!0)}t.addEventListener("keydown",e=>{ep.has(e.key)&&eh(t)},!0),["input","change","cruise:field-change","select","auro-select","click","mousedown","focus","focusin"].forEach(a=>{let n=a=>{if(t.tagName?.includes("MENUOPTION")&&"click"===a.type||"change"===a.type||"select"===a.type){let t=new CustomEvent("cruise:field-change",{detail:{field:e,selected_option:a.target?.textContent?.trim()||a.target?.value||a.detail?.value,option:a.target,originalEvent:a.type},bubbles:!0,composed:!0});r.dispatchEvent(t)}};t.addEventListener(a,n,!0),t._cruiseEventListeners||(t._cruiseEventListeners=new Map),t._cruiseEventListeners.set(a,n)})},e_=(e,t,r)=>{let a=e=>{((e,t,r)=>{if(e.target?.tagName!=="AURO-MENUOPTION-CRUISES"||"click"!==e.type)return;let a=e.target.closest("auro-select-cruises")||e.target.closest("[name]"),n=((e,t)=>{if(e)return e.getAttribute("name")||"";if(t){let e=t.getAttribute("name")||"";if(e.toLowerCase().includes("destination"))return"destination";if(e.toLowerCase().includes("sailing")||e.toLowerCase().includes("date"))return"sailingDate";if(e.toLowerCase().includes("cruise")||e.toLowerCase().includes("line"))return"cruiseLine"}return"unknown"})(a,e.target.closest("auro-menu-cruises, auro-select-cruises")),o=e.target?.textContent?.trim()||e.target?.value||"",i=((e,t,r)=>{let a=e[t];return Array.isArray(a)?a.find(e=>e.label===r||e.value===r)??null:null})(r,n,o),s=new CustomEvent("cruise:field-change",{detail:{field:n,selected_option:o,option:i,originalEvent:e.type,source:"untracked-menuoption"},bubbles:!0,composed:!0});t.dispatchEvent(s),a&&eg(a,e.target?.value,o,i)})(e,t,r)};if(e.addEventListener("click",a,!0),e.addEventListener("change",a,!0),e.addEventListener("keydown",t=>{ep.has(t.key)&&eh(e)},!0),e.tagName?.includes("MENUOPTION")){let t=()=>{e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),e.hasAttribute("inert")&&e.removeAttribute("inert")};e.addEventListener("focus",t,!0),e.addEventListener("focusin",t,!0)}},eE=async e=>{e&&"undefined"!=typeof customElements&&customElements.whenDefined&&!customElements.get("borealis-cruise-form")&&await Promise.race([customElements.whenDefined("borealis-cruise-form"),new Promise(e=>setTimeout(e,8e3))]).catch(()=>{})},eA=async(e,t)=>{for(let[r,a]of Object.entries(e)){let e=t[r];e?.length>0&&await eb(a,e)}},ew=async(e,t,r)=>{await (0,q.e0)(e,void 0);let a=e.querySelector?.("borealis-cruise-form");await eE(a),await r(e,void 0,{frames:2,quietMs:100});let{selects:n,allElements:o}=await em(e,r);((e,t,r,a)=>{for(let[t,a]of Object.entries(e))ey(t,a,r);let n=Object.values(e);for(let e of t)n.includes(e)||e_(e,r,a)})(n,o,e,t);let i=a?.shadowRoot;return(e=>{if(!e||e._cruiseMenuObserverAttached)return;e._cruiseMenuObserverAttached=!0;let t=e=>{e.hasAttribute("noCheckmark")||e.setAttribute("noCheckmark","")};
18e.querySelectorAll("auro-menu-cruises").forEach(e=>{let r=Array.from(e.querySelectorAll("auro-menuoption-cruises"));r.length>0&&(e.items=r,r.forEach(t))});let r=new MutationObserver(e=>{let r=new Set;e.forEach(({type:e,addedNodes:a})=>{"childList"===e&&a.forEach(e=>{let a="string"==typeof e.tagName?e.tagName.toLowerCase():"";if("auro-menuoption-cruises"===a){t(e);let a=e.parentElement;a?.tagName?.toLowerCase()==="auro-menu-cruises"&&r.add(a)}else"auro-menu-cruises"===a&&r.add(e)})}),r.forEach(e=>{let t=Array.from(e.querySelectorAll("auro-menuoption-cruises"));t.length>0&&(e.items=t)})});try{r.observe(e,{childList:!0,subtree:!0})}catch{}})(i),(e=>{e&&e.addEventListener("keydown",e=>{if("ArrowDown"!==e.key&&"ArrowUp"!==e.key)return;let t=(e.composedPath?e.composedPath():[]).find(e=>"string"==typeof e.tagName&&"auro-select"===e.tagName.toLowerCase()),r=t?.dropdown;if(!r?.isPopoverVisible)return;let a=t?.menu;"function"==typeof a?.navigateOptions&&(e.preventDefault(),e.stopPropagation(),a.navigateOptions("ArrowDown"===e.key?"down":"up"))},!0)})(i),((e,t)=>{if(!e?.isConnected)return;let{tab:r,index:a}=(e=>{let t=e.data??{},r=Array.isArray(t.tabs)?t.tabs:[],a=r.findIndex(e=>"cruises"===String(e?.mode||"").toLowerCase()||String(e?.title||"").toLowerCase().includes("cruise"));return a>=0?{tab:r[a],index:a}:{tab:null,index:-1}})(e);if(a<0||!r?.form)return;let n=e.data??{},o=Array.isArray(n.tabs)?n.tabs:[],i=e.data,s=o.map((e,r)=>r===a?{...e,form:{...e.form,data:{destination:Array.isArray(t.destination)?[...t.destination]:[],sailingDate:Array.isArray(t.sailingDate)?[...t.sailingDate]:[],cruiseLine:Array.isArray(t.cruiseLine)?[...t.cruiseLine]:[]},selected:{destinationValue:"",sailingDateValue:"",cruiseLineValue:"",...e.form.selected}}}:e);e.data={...n,tabs:s};try{e.requestUpdate?.()}catch{e.requestUpdate?.("data",i)}})(e,t),await r(e,void 0,{frames:2,quietMs:150}),(e=>{e&&e.querySelectorAll("auro-menu-cruises").forEach(e=>{let t=Array.from(e.querySelectorAll("auro-menuoption-cruises"));t.length>0&&(e.items=t,t.forEach(e=>{e.hasAttribute("noCheckmark")||e.setAttribute("noCheckmark","")}))})})(i),await eA(n,t),n};function eC({elementRef:e,formMode:t,cruisesData:r,settledKey:a,onLitFatal:n}){let i=e?.current,s=t===ef,l=(0,o.useRef)(null),u=(0,o.useRef)(null),c=Array.isArray(r?.destinations||r?.destination)?r?.destinations||r?.destination:[],d=Array.isArray(r?.sailingDates||r?.sailingDate)?r?.sailingDates||r?.sailingDate:[],f=Array.isArray(r?.cruiseLines||r?.cruiseLine)?r?.cruiseLines||r?.cruiseLine:[];return((0,o.useEffect)(()=>{if(!i||!s||!a)return;let e={destination:c,sailingDate:d,cruiseLine:f},t=l.current;(t?.destination!==e.destination||t?.sailingDate!==e.sailingDate||t?.cruiseLine!==e.cruiseLine)&&(u.current&&clearTimeout(u.current),l.current={...e},u.current=setTimeout(async()=>{try{await ew(i,e,q.SG)}catch(e){(n??(()=>{}))(Error(`Cruise data injection failed: ${e.message||e}`))}},100))},[i,s,r,a,n]),(0,o.useEffect)(()=>()=>{u.current&&clearTimeout(u.current)},[]),s&&a)?{destinations:c,sailingDates:d,cruiseLines:f}:{destinations:[],sailingDates:[],cruiseLines:[]}}},30853:(e,t,r)=>{"use strict";function a(e,t){return e&&t?e.querySelector?.(t)??e.shadowRoot?.querySelector?.(t)??null:null}function n(e,t){if(!e)return null;let r=Array.isArray(t)?t:[t],a=[e],n=new Set,o=(e,t)=>e?.querySelector?.(t)??e?.shadowRoot?.querySelector?.(t)??null;for(;a.length;){let e=a.pop();if(!e||n.has(e))continue;n.add(e);let t=r.map(t=>o(e,t)).find(Boolean);if(t)return t;for(let t of[e.shadowRoot,...Array.from(e.children??[])].filter(Boolean))a.push(t)}return null}r.d(t,{Z:()=>a,a:()=>n})},37257:(e,t,r)=>{"use strict";async function a(e,t,r={}){let n,{timeoutMs:o=300}=r;if(!e||"undefined"==typeof customElements||t?.aborted||"function"==typeof e.requestUpdate)return;let i=e.localName?.toLowerCase?.();!i||customElements.get(i)||await Promise.race([customElements.whenDefined(i),new Promise(e=>{t&&(n=()=>e(),t.addEventListener("abort",n,{once:!0}))}),new Promise(o>0?e=>{let r=setTimeout(e,o);t?.addEventListener?.("abort",()=>clearTimeout(r),{once:!0})}:()=>{})]).finally(()=>{n&&t&&t.removeEventListener("abort",n)})}async function n(e,t,{frames:r=1,quietMs:a=50,timeoutMs:o=2e3}={}){if(!e?.isConnected)return;let i=o?Date.now():0,s=()=>!!t?.aborted,l=()=>new Promise(e=>{let t;return t=()=>e(),"function"==typeof requestAnimationFrame?requestAnimationFrame(t):setTimeout(t,16)}),u=()=>!!o&&Date.now()-i>o,c=async e=>{for(let t=0;t<e;t+=1)if(s(),await l(),u())return!0;return!1},d=async()=>{s();let t=e.renderRoot??e.shadowRoot??e;if("undefined"==typeof MutationObserver||!t){let e;return void await (e=Math.max(a,16),new Promise(t=>setTimeout(t,e)))}await new Promise(e=>{let r,n=!1,o=()=>
18{if(!n){n=!0;try{l.disconnect()}catch{}e()}},i=()=>{if(u()||s())return o();clearTimeout(r),r=setTimeout(o,a)},l=new MutationObserver(i);l.observe(t,{childList:!0,subtree:!0}),i()})};try{try{e.requestUpdate?.()}catch{}if(await (e=>{try{let t=e?.updateComplete;return t&&"function"==typeof t.then?t.catch(()=>{}):Promise.resolve()}catch{return Promise.resolve()}})(e),await c(r))return;a>0&&await d(),s()}catch(e){if(e?.name==="AbortError")return;if(console.log("[waitForSettled] non-fatal error",e),e)throw e}}r.d(t,{SG:()=>n,e0:()=>a})},47582:e=>{function t(){}e.exports=t,e.exports.HttpsAgent=t},49910:(e,t,r)=>{"use strict";r.d(t,{Mz:()=>X,Qp:()=>J,f8:()=>z,Ay:()=>et});var a=r(37876),n=r(18847),o=r.n(n),i=r(67336),s=r(14232),l=r(95062),u=r.n(l),c=r(69490);let d=({content:e=[]})=>{let t=e[0]?.xcheck_fare_html,r=e[0]?.xcheck_fare_disclaimer_html,n=t||r,o=(0,s.useRef)(!1);(0,s.useEffect)(()=>{!o.current&&n&&(o.current=!0,function(e){let t,r=new DOMParser().parseFromString(e,"text/html"),a=r.querySelector("script[src]"),n=r.querySelector("script:not([src])"),o=document.createElement("script");o.type="text/javascript",o.innerHTML=n?.innerHTML||"",document.body.appendChild(o);let i=((t=document.addEventListener).original&&(t=t.original),document.addEventListener=function(e){function t(t,r,a){if("DOMContentLoaded"===t&&"loading"!==document.readyState){let e=new Event("DOMContentLoaded");"function"==typeof r&&r.call(this,e);return}return e.call(this,t,r,a)}return t.original=e,t}(t),t),s=document.createElement("script");s.src=a?.getAttribute("src")||"",s.defer=!0,s.onload=()=>{document.addEventListener=i},document.body.appendChild(s)}(n))},[n]);let i=n?.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return(0,a.jsx)(c.A,{children:i})};d.propTypes={content:u().array};let f=({content:e=[]})=>{let t=e[0]?.form_html;return(0,a.jsx)(c.A,{children:t})};f.propTypes={content:u().array};var m=r(30003),p=r(21898),h=r(37257),b=r(52782),g=r(21610),y=r(50522);let _=e=>Array.isArray(e)?e:[],E=e=>null!=e&&"object"==typeof e,A=e=>E(e)||"string"==typeof e?"string"==typeof e?{value:e,label:e}:"value"in e&&"label"in e?{value:String(e.value??""),label:String(e.label??"")}:"recno"in e&&"name"in e?{value:String(e.recno),label:String(e.name??"")}:"code"in e&&"name"in e?{value:String(e.code??""),label:String(e.name??"")}:"name"in e?{value:String(e.name??""),label:String(e.name??"")}:null:null,w=e=>{if(!E(e))return{title:"",icon:{name:"",category:""}};let t={...e};!t.id&&t.title&&(t.id=t.title.toLowerCase());let r=(e=>{let t=String(e.icon?.name||e.icons?.default?.name||"").toLowerCase();for(let{keywords:e,mode:r}of[{keywords:["plane","flight"],mode:"flights"},{keywords:["car"],mode:"cars"},{keywords:["hotel","bed"],mode:"hotels"},{keywords:["cruise","ship"],mode:"cruises"},{keywords:["package","gift"],mode:"packages"}])if(e.some(e=>t.includes(e)))return r;return e.id||null})(t);if(r&&(t.mode=r),(e=>{E(e.icons)&&E(e.icons.default)?(e.icon={name:String(e.icons.default.name??""),category:String(e.icons.default.category??"")},delete e.icons):E(e.icon)&&(e.icon={name:String(e.icon.name??""),category:String(e.icon.category??"")})})(t),E(t.tab_links)&&(t.tab_links={links:_(t.tab_links.links)}),E(t.form)){let e={...t.form};(e=>{if(!E(e.labels))return;let t=["base_url","search_button"];if(!Object.keys(e.labels).filter(e=>!t.includes(e)).some(t=>null!=e.labels[t]&&""!==e.labels[t])){let r={};t.forEach(t=>{null!=e.labels[t]&&""!==e.labels[t]&&(r[t]=e.labels[t])}),Object.keys(r).length>0?e.labels=r:delete e.labels}})(e),Array.isArray(e.data)||delete e.data,"cars"===t.mode&&(e.useAllCartrawlerLocations=!!e.use_all_cartrawler_locations),e.show_form=!!e.show_form,t.form=e}else E(t.labels)&&(t.form={labels:{...t.labels}},delete t.labels);return t};globalThis?.window&&(globalThis.__SBWW_DEBUG__=globalThis.__SBWW_DEBUG__??!1);let C=e=>{try{return"string"==typeof e?e:JSON.stringify(e)}catch{return String(e)}},S=(...e)=>{if(globalThis?.window&&globalThis.__SBWW_DEBUG__)try{console.log("[SlottedBookingWidgetWrapper]",...e.map(C))}catch{}},T=s.memo(function({data:e,children:t,onFormModeChange:n,hideMerchandisingOne:o,hideMerchandisingTwo:i}){let l=(0,s.useRef)(null),u=(0,s.useRef)(!1),c=(0,s.useRef)(null),[d,f]=(0,s.use
18State)(null),[T,O]=(0,s.useState)(""),[R,M]=(0,s.useState)(""),[k,L]=(0,s.useState)(""),[N,P]=(0,s.useState)({destination:[],sailingDate:[],cruiseLine:[]}),[I,D]=(0,s.useState)({destinationValue:"",sailingDateValue:"",cruiseLineValue:""});(0,s.useEffect)(()=>{Promise.all([r.e(3058),r.e(7347),r.e(2095),r.e(2509),r.e(8235)]).then(r.bind(r,95266)).catch(e=>{console.error("[SlottedBookingWidgetWrapper] Failed to load widget:",e)})},[]);let{mode:x,ref:U}=(0,m.h1)(),F=(0,s.useMemo)(()=>E(e)?e:{},[e]),B=(0,s.useCallback)(e=>{S("refCb:",{node:e?e.tagName||"host":null,attached:!!e}),l.current=e,f(e??null)},[]),q=(0,s.useCallback)(e=>{e&&(F?.is_alaska_for_business===!0&&(e.isAlaskaForBusiness=!0),e.expanded=!0,e.style.setProperty("--slotted-booking-widget-background-color","var(--ds-advanced-color-expanded-widget-background, #00274a)")),U(e),B(e),S("mergedRef:",{node:e?e.tagName||"host":null})},[U,B,F]),j=(0,s.useCallback)(e=>{console.error("[SlottedBookingWidgetWrapper fatal]",e)},[]);(0,m.Jw)(l),(0,m.PL)({elementRef:l,formMode:x,settledKey:k}),(0,s.useEffect)(()=>{let e=x===p._M.CRUISES||"cruise"===x;if(!d||!e)return;let t=new Set(["destination","sailingDate","cruiseLine"]),r=e=>{let r=(e.composedPath?e.composedPath():[]).find(e=>("string"==typeof e.tagName?e.tagName.toLowerCase():"").includes("select-cruises"));if(!r)return;let a=r.getAttribute?.("name");if(!t.has(a))return;let n=e.detail?.value??r.value??"";n&&D(e=>({...e,[`${a}Value`]:n}))};return d.addEventListener("auro-select",r,!0),()=>{d.removeEventListener("auro-select",r,!0)}},[d,x]),(0,s.useEffect)(()=>{if(!d||x!==p._M.CRUISES||!k)return;let e=e=>{let{field:t,selected_option:r}=e.detail||{};t&&r?D(e=>({...e,[`${t}Value`]:r})):S("[SlottedBookingWidgetWrapper] cruise:field-change event missing field or selected_option:",{field:t,selected_option:r,eventDetail:e.detail})};return d.addEventListener("cruise:field-change",e),()=>{d.removeEventListener("cruise:field-change",e)}},[d,x,k]),(0,s.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await (0,y.Z)();if(t?.error)throw t.error;let r=(e=>{let t,r,a,n=e;Array.isArray(e)&&e.length>0&&"object"==typeof e[0]&&(n=e[0]),t=Array.isArray(n?.destination)?n.destination:Array.isArray(n?.destinationList)?n.destinationList:[],r=Array.isArray(n?.sailingDate)?n.sailingDate:Array.isArray(n?.sailingDateList)?n.sailingDateList:[],a=Array.isArray(n?.cruiseLine)?n.cruiseLine:Array.isArray(n?.cruiseLineList)?n.cruiseLineList:[];let o=t.map(g.zL).filter(Boolean),i=r.map(g.zL).filter(Boolean);return{destination:o,sailingDate:i,cruiseLine:a.map(g.zL).filter(Boolean)}})(t);e||P({destination:r.destination,sailingDate:r.sailingDate,cruiseLine:r.cruiseLine})}catch(e){S("cruises early fetch error",e?.message||e)}})(),()=>{e=!0}},[]);let $=(0,s.useMemo)(()=>{S("normalizing data",{hasData:!!F});let e=E(F)?F:{},t=_(e.tabs).map(w),r=e.verbiage,a={widget_data:{title:String(e?.widget_data?.title??""),close_button_text:String(e?.widget_data?.close_button_text??"")},quick_links:_(e.quick_links),tabs:t,link_group:{links:_(e?.link_group?.links)},merchandising_one:_(e.merchandising_one),merchandising_two:_(e.merchandising_two),brand:e.brand,car_locations:_(e.car_locations),hotel_locations:_(e.hotel_locations),cruise_options:e.cruise_options,verbiage:r};return S("normalizedData built",a),a},[F]),G=(0,s.useMemo)(()=>{let e={destination:[],sailingDate:[],cruiseLine:[]},t=F?.tabs?F:$,r=(0,g.iU)(t?.tabs),a=r>=0?t?.tabs?.[r]:null,n=a?.form?.data??a?.form;
18if(Array.isArray(n)){let t={destination:[...e.destination],sailingDate:[...e.sailingDate],cruiseLine:[...e.cruiseLine]};return n.forEach(e=>{if(!E(e))return;let r=A(e);if(!r)return;let a={...e};"destination"===a.type||"destination"in a||"dest"in a?t.destination.push(r):"sailingDate"===a.type||"sailingDate"in a||"date"in a?t.sailingDate.push(r):("cruiseLine"===a.type||"cruiseLine"in a||"line"in a)&&t.cruiseLine.push(r)}),t}if(E(n)){let t=e=>Array.isArray(e)?e.map(A).filter(Boolean):[];return{destination:t(n.destination||n.destinationList)||e.destination,sailingDate:t(n.sailingDate||n.sailingDateList)||e.sailingDate,cruiseLine:t(n.cruiseLine||n.cruiseLineList)||e.cruiseLine}}return e},[$,F]),H=(0,s.useMemo)(()=>{let e=e=>Array.isArray(e)?e.map(A).filter(Boolean):[],t=(t,r)=>{let a=e(t),n=e(r);return a.length>0?a:n};return{destinations:t(N?.destination,G.destination),sailingDates:(0,g.g0)(t(N?.sailingDate,G.sailingDate)),cruiseLines:t(N?.cruiseLine,G.cruiseLine)}},[N,G]);(0,s.useEffect)(()=>{if(d&&x===p._M.CRUISES&&k&&$)try{let e={...$},t=(0,g.iU)(e?.tabs),r=t>=0?e?.tabs?.[t]:null;r&&E(r.form)?(r.form.selected_values||(r.form.selected_values={}),r.form.selected_values={...r.form.selected_values,destination:I.destinationValue,sailingDate:I.sailingDateValue,cruiseLine:I.cruiseLineValue},d.data=e):S("[SlottedBookingWidgetWrapper] Tab or form not available for selected values update:",{tab:!!r,form:!!r?.form,formType:typeof r?.form})}catch(e){S("[SlottedBookingWidgetWrapper] Error updating cruise selected values:",e)}},[d,x,I,k,$]);let Z=(0,s.useMemo)(()=>{let e=$.tabs??[],t=e.length,r=e.map(e=>e?.id??e?.title??"").join("|"),a=$.quick_links?.length??0,n=$.link_group?.links?.length??0,o=$.merchandising_one?.length??0,i=$.merchandising_two?.length??0;return[x,`tabs:${t}:${r}`,`quickLinks:${a}`,`links:${n}`,`m1:${o}`,`m2:${i}`].join("|")},[$,x]);(0,s.useEffect)(()=>{if(!d)return;let e="undefined"==typeof AbortController?{signal:{aborted:!1},abort(){}}:new AbortController;return(async()=>{try{if(d.data!==$&&(d.data=$),!customElements.get("borealis-slotted-booking-widget")&&customElements?.whenDefined&&await customElements.whenDefined("borealis-slotted-booking-widget"),await (0,h.SG)(d,e.signal,{frames:1,quietMs:50}),e.signal.aborted)return;let t=`${Z}|host:${d.tagName||"HOST"}`;L(t)}catch(e){e?.name!=="AbortError"&&j(e)}})(),()=>{try{e?.abort()}catch{}}},[d,$,Z,j]),(0,s.useEffect)(()=>{if(!k)return},[k]),(0,s.useEffect)(()=>{x&&n&&n(x)},[x,n]),(0,s.useEffect)(()=>{if(!d){c.current=null;return}x===p._M.HOTELS?c.current=d.querySelector(p.mi)||d:x===p._M.CARS?c.current=d.querySelector(p.h4)||d:c.current=d},[d,x]),(0,m.m)({elementRef:c,formMode:x,setCarSearchTerm:O,setHotelSearchTerm:M,settledKey:k});let{options:W,onSearch:V}=(0,m.lY)({endpoint:"api/hotels",debounceMs:250,minChars:1,queryParam:"q",transform:e=>Array.isArray(e)?e:[]});(0,s.useEffect)(()=>{if(x!==p._M.HOTELS||!k)return;let e=String(R??"");""===e?V(""):V(e)},[x,R,V,k]),(0,s.useEffect)(()=>{if(!d||!k)return;let e=$.tabs?.find(e=>"cars"===e.mode);if(!e)return;let t=!!e.form?.useAllCartrawlerLocations,r=(0,b.Zg)(d,p.h4);r&&(r.useAllCartrawlerLocations=t)},[d,k,$]),(0,s.useEffect)(()=>{d&&k&&$.tabs?.forEach((e,t)=>{let r=0===t?"planbook":`tab-panel-${t}`,a=d.querySelector(`[slot="${r}"]`);a&&(a.style.display=e.form?.show_form===!1?"none":"")})},[d,k,$]);let K=(0,s.useMemo)(()=>!!$.tabs?.find(e=>"cars"===e.mode)?.form?.useAllCartrawlerLocations,[$]);return(0,m.hu)({elementRef:l,formMode:x,carSearchTerm:T,onLitFatal:j,hasRetriedRef:u,settledKey:k,useAllCartrawlerLocations:K}),(0,m.y$)({elementRef:l,formMode:x,hotelLocations:W,onLitFatal:j,hasRetriedRef:u,settledKey:k}),(0,m.W8)({elementRef:l,formMode:x,cruisesData:H,settledKey:k,onLitFatal:j}),(0,s.useEffect)(()=>{if(d)try{let e={...$},t=(0,g.iU)(e?.tabs),r=t>=0?e?.tabs?.[t]:null;if(!r||!E(r.form))return;E(r.form.data)&&(Array.isArray(r.form.data.destination)||Array.isArray(r.form.data.sailingDate)||Array.isArray(r.form.data.cruiseLine))||(r.form.data={destination:Array.isArray(H.destinations)?H.destinations:[],sailingDate:Array.isArray(H.sailingDates)?H.sailingDates:[],cruiseLine:Array.isArray(H.cruiseLines)?H.cruiseLines:[]},d.data=e)}catch(e){S("cruise injection error",e?.message||e)}},[d,$,H]),(0,s.useEffect)(()=>{S("formMode change",C(x))},[x]),(0,s.useEffect)(()=>{k&&S("settledKey effect",C(k))},[k]),(0,s.useEffect)(()=>{S("useComboboxInputEvents wired",{haveEl:!!l.current,formMode:C(x),settledKey:!!k})},[x,k]),(0,a.jsx)("div",{suppressHydrationWarning:!0,children:(0,a.jsx)("borealis-slotted-booking-widget",{hideCloseButton:!0,expanded:!0,ref:q,...o&&{hideMerchandisingOne:!0},...i&&{hideMerchandisingTwo:!0},children:t})})});T.propTypes={data:u().shape({widget_data:u().shape({title:u().string,close_button_text:u().string}),quick_links:u().arrayOf(u().object),tabs:u().arrayOf(u().object),link_group:u().shape({links:u().arrayOf(u().object)}),merchandising_one:u().arrayOf(u().object),merchandising_two:u().arrayOf(u().object),verbiage:u().object,brand:u().string,car_locations:u().arrayOf(u().object),hotel_locations:u().arrayOf(u().object),cruise_options:u().object}),hideMerchandisingOne:u().bool,hideMerchandisingTwo:u().bool,children:u().node,onFormModeChange:u().func};var O=r(69005);let R={pickup_location:"Pick-up location",dropoff_location:"Drop-off location",return_different_location:"Return to a different location",pickup_date:"Pick-up date",pickup_time:"Pick-up time",dropoff_date:"Drop-off date",dropoff_time:"Drop-off time",more_search_option:"Explore more search options",search_button:"Search"};var M=r(10487),k=r(88791);r(85128);var L=r(83780),N=r(29424),P=r.n(N);let I=o()(()=>Promise.all([r.e(2095),r.e(2509),r.e(7124),r.e(1410)]).then(r.bind(r,31410)),{loadableGenerated:{webpack:()=>[31410]},ssr:!1,loading:()=>(0,a.jsx)(i.A,{height:"400px"})}),D=(e,t)=>{let r;return customElements.get(e)?Promise.resolve():Promise.race([customElements.whenDefined(e).finally(()=>clearTimeout(r)),new Promise((a,n)=>{r=setTimeout(()=>n(Error(`${e} failed to load`)),t)})])},x="search-planbook",U=()=>D(x,3e3),F=async()=>{await r.e(9111).then(r.bind(r,30838)),await D(x,2e3)},B=async e=>{let t="npm"===e?[F]:[U,F];for(let e of t){if(customElements.get(x))return;try{if(await e(),customElements.get(x))return}catch{}}throw Error(`planbook failed to load from ${t.map(e=>e.name).join(" and ")}`)},q={flight:{tag:x},car:{import:()=>Promise.all([Promise.all([r.e(2762),r.e(2095)]).then(r.bind(r,24128)),r.e(619).then(r.bind(r,40619)).then(({AuroForm:e})=>{customElements.get("auro-form")||e.register()})]),tag:"borealis-car-rental-form"},hotel:{import:()=>Promise.all([r.e(131),r.e(2095)]).then(r.bind(r,70275)),tag:"borealis-hotel-booking-form"}
18,package:{import:()=>Promise.all([r.e(7270),r.e(2095)]).then(r.bind(r,24386)),tag:"borealis-packages-form"},cruise:{import:()=>Promise.all([r.e(7835),r.e(2095)]).then(r.bind(r,82632)),tag:"borealis-cruise-form"}},j={flights:"flight",cars:"car",hotels:"hotel",cruise:"cruise",cruises:"cruise",packages:"package"},$=e=>Array.isArray(e)&&0!==e.length?e.filter(e=>e?.render?.some(e=>e?.selector)):[],G=[],H=({slotEntry:e,slotName:t})=>(Array.isArray(e)?e:e?[e]:G).map((e,r)=>(0,a.jsx)("div",{slot:t,children:(0,a.jsx)(I,{render:e.render,content:e.merchandise??G,configuration:e.configuration??G})},`${t}-${r}`));H.propTypes={slotEntry:u().oneOfType([u().shape({render:u().array.isRequired,merchandise:u().array,configuration:u().array}),u().arrayOf(u().shape({render:u().array.isRequired,merchandise:u().array,configuration:u().array}))]).isRequired,slotName:u().string.isRequired};let Z={height:400,width:"100%",maxWidth:700,display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",columnGap:44,rowGap:24},W=({skeletonStyle:e,isMobile:t})=>(0,a.jsxs)("div",{style:Z,children:[(0,a.jsx)("planbook-skeleton",{shape:"oval",style:{...e,width:t?"calc(50% - 22px)":240}}),(0,a.jsx)("planbook-skeleton",{shape:"oval",style:{...e,width:t?"calc(50% - 22px)":240}}),(0,a.jsx)("planbook-skeleton",{shape:"oval",style:{...e,width:"100%"}}),(0,a.jsx)("planbook-skeleton",{shape:"oval",style:{...e,width:"100%"}}),(0,a.jsx)("planbook-skeleton",{shape:"oval",style:{...e,width:t?"100%":240,height:60}}),(0,a.jsx)("planbook-skeleton",{shape:"oval",style:{...e,width:t?"100%":240,height:60}})]});W.propTypes={skeletonStyle:u().object.isRequired,isMobile:u().bool.isRequired};let V=({content:e=[],merchandising:t})=>{let{planbookSource:r}=(0,s.useContext)(L.A),n=(0,s.useMemo)(()=>e[0]||{},[e]),o=n?.locale||"en-us",i=n?.is_alaska_for_business===!0,l=(()=>{let[e,t]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(void 0===globalThis.window)return;let e=globalThis.window.matchMedia(`(max-width: calc(${getComputedStyle(document.documentElement).getPropertyValue("--ds-grid-breakpoint-lg")} - 1px))`),r=()=>t(e.matches);return r(),e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[]),e})(),[u,c]=(0,s.useState)(null);(0,s.useEffect)(()=>{customElements.get("planbook-hyperlink")||M.s.register("planbook-hyperlink"),customElements.get("planbook-skeleton")||k.A.register("planbook-skeleton")},[]),(0,s.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await (0,y.Z)();if(t?.error)throw t.error;let r=Array.isArray(t)&&t.length>0&&"object"==typeof t[0]?t[0]:t;if(e)return;let a=(0,g.OK)(n,r);c(a)}catch(t){console.error("[SlottedBookingWidgetRender] Failed to fetch cruise data:",t?.message||t),e||c(n)}})(),()=>{e=!0}},[n]),(0,s.useEffect)(()=>{u!==n&&(u||c(n))},[n,u]);let d=u||n,f=(0,s.useMemo)(()=>{let e=Array.isArray(d?.verbiage)?d.verbiage[0]:d?.verbiage;if(!e||"object"!=typeof e)return null;let t=(0,O.filterUnwantedMetadata)(e);return{...(0,O.convertKeysToCamelCase)(t.fs_verbiage_upgrades?.[0]),...(0,O.convertKeysToCamelCase)(t.fs_verbiage_discount_codes?.[0]),...(0,O.convertKeysToCamelCase)(t.fs_verbiage_icons_errors_links?.[0])}},[d?.verbiage]),m=(0,s.useMemo)(()=>(d?.tabs||[]).map((e,t)=>{let r=((e,t,r)=>{if(!e)return null;let a=(e.icon?.name||e.icons?.default?.name||"").toLowerCase();return a.includes("plane")||a.includes("flight")?"flight":a.includes("car")?"car":a.includes("hotel")||a.includes("bed")?"hotel":a.includes("cruise")||a.includes("ship")?"cruise":a.includes("package")||a.includes("gift")?"package":0===t&&r?.verbiage?"flight":null})(e,t,d);return r?{type:r,slot:0===t?"planbook":`tab-panel-${t}`,index:t}:null}
18).filter(Boolean),[d]),[p,h]=(0,s.useState)(()=>new Set),[b,_]=(0,s.useState)(()=>new Set),[E,A]=(0,s.useState)(()=>new Set),[w,C]=(0,s.useState)(()=>"undefined"!=typeof customElements&&!!customElements.get("borealis-slotted-booking-widget"));(0,s.useEffect)(()=>{w||customElements.whenDefined("borealis-slotted-booking-widget").then(()=>C(!0))},[w]);let S=(0,s.useMemo)(()=>$(t?.slot_one),[t?.slot_one]),N=(0,s.useMemo)(()=>$(t?.slot_two),[t?.slot_two]);(0,s.useEffect)(()=>{0!==m.length&&h(e=>e.size>0?e:new Set([m[0].type]))},[m]);let I=(0,s.useCallback)(e=>{let t=j[e];t&&q[t]&&m.some(e=>e.type===t)&&h(e=>e.has(t)?e:new Set([...e,t]))},[m,q]),x=(0,s.useMemo)(()=>m.filter(({type:e})=>p.has(e)),[m,p]);(0,s.useEffect)(()=>{if(0===x.length)return;let e=!1;return x.forEach(t=>(({type:t})=>{let a=q[t].tag;if(customElements.get(a)){"flight"!==t&&q[t].import().catch(()=>{}),e||A(e=>e.has(t)?e:new Set([...e,t]));return}(async()=>{try{"flight"===t?await B(r):(await q[t].import(),await D(a,2e3)),e||A(e=>e.has(t)?e:new Set([...e,t]))}catch{e||_(e=>e.has(t)?e:new Set([...e,t]))}})()})(t)),()=>{e=!0}},[x,q,r]),(0,s.useEffect)(()=>{if(0===x.length)return;let e=!1,t=async({type:t,slot:r,index:a})=>{if(!E.has(t)||(await new Promise(e=>setTimeout(e,0)),e))return;let n=document.querySelector(`borealis-slotted-booking-widget [slot="${r}"]`);if(n){try{"function"==typeof n.updateComplete?.then&&await Promise.race([n.updateComplete,new Promise(e=>setTimeout(e,2e3))])}catch(e){console.error(`[SlottedBookingWidgetRender] Failed to wait for CE's updateComplete on ${t}:`,e)}if(!e)try{((e,t,r,a,n)=>{if("flight"===t)a&&(e.verbiage=a),n&&(e.isAlaskaForBusiness=!0);else if(["car","hotel","cruise"].includes(t)&&r){let a=(e=>e?e.form?.labels&&"object"==typeof e.form.labels?e.form.labels:e.labels&&"object"==typeof e.labels?e.labels:e.form?.data&&!Array.isArray(e.form.data)&&"object"==typeof e.form.data?e.form.data:null:null)(r);"car"===t?(e.labels={...R,...a??{}},Array.isArray(r.form?.data)&&(e.data=r.form.data),e.useAllCartrawlerLocations=!!r.form?.use_all_cartrawler_locations):(a&&(e.labels=a),r.form?.data&&(e.data=r.form.data))}else r?.form&&(e.data=r.form)})(n,t,d.tabs[a],f,!0===d.is_alaska_for_business)}catch(e){console.error(`[SlottedBookingWidgetRender] Failed to set data for ${t}:`,e)}}};return x.forEach(e=>t(e)),()=>{e=!0}},[E,x,q,f,d.tabs,d.is_alaska_for_business]);let U={alaska:"AS",hawaiian:"HA"}[d?.brand?.toLowerCase()]||"AS",F={"--ds-auro-skeleton-container-color":"var(--ds-basic-color-brand-primary, #01426a)","--ds-auro-skeleton-container-gradient-color-one":"var(--ds-basic-color-brand-primary-bold, #01426a)","--ds-auro-skeleton-container-gradient-color-two":"var(--ds-basic-color-brand-primary-subtle, #00274a)",height:60};return(0,a.jsxs)(T,{data:d,onFormModeChange:I,children:[x.map(({type:e,slot:t})=>{let r=q[e].tag;return b.has(e)&&"flight"===e?(0,a.jsxs)("div",{slot:t,className:P().failedFormPlaceholder,children:[(0,a.jsxs)("div",{className:P().failedFormText,children:[(0,a.jsx)("p",{className:`${l?"body-sm":"body-default"} ${P().noMargin}`,children:"We're having trouble loading the search form."}),(0,a.jsx)("p",{className:`${l?"body-sm":"body-default"} ${P().noMargin}`,children:"Use our full booking page to search and book your trip."})]}),(0,a.jsx)("planbook-hyperlink",{style:{width:l?"100%":"auto"},type:"cta",href:"/search",size:l?"sm":"md",appearance:"inverse",shape:"pill",...l&&{fluid:"true"},children:"Search flights"})]},t):E.has(e)?s.createElement(r,{key:t,slot:t,locale:o,..."flight"===e&&{brand:U,themeMode:"dark"},..."flight"===e&&i&&{isAlaskaForBusiness:!0}}):"flight"===e&&w?(0,a.jsx)("div",{slot:t,children:(0,a.jsx)(W,{skeletonStyle:F,isMobile:l})},t):null}),S&&(0,a.jsx)(H,{slotEntry:S,slotName:"merchandising-one"},"merchandising-one"),N&&(0,a.jsx)(H,{slotEntry:N,slotName:"merchandising-two"},"merchandising-two")]})};V.propTypes={content:u().array,merchandising:u().shape({slot_one:u().array,slot_two:u().array})};let K=o()(()=>Promise.all([r.e(2095),r.e(2509),r.e(7124),r.e(1410)]).then(r.bind(r,31410)),{loadableGenerated:{webpack:()=>[31410]},ssr:!1,loading:()=>(0,a.jsx)(i.A,{height:"400px"})}),Y=o()(()=>r.e(1113).then(r.bind(r,11113)),{loadableGenerated:{webpack:()=>[11113]},ssr:!1,loading:()=>(0,a.jsx)(i.A,{height:"400px"})}),z=o()(()=>Promise.all([r.e(8327),r.e(31),r.e(393)]).then(r.bind(r,60393)),{loadableGenerated:{webpack:()=>[60393]},ssr:!1,loading:()=>(0,a.jsx)(i.A,{height:"1000px",style:{gridArea:"sidenav"}})}),X=o()(()=>Promise.all([r.e(8327),r.e(6345),r.e(3148)]).then(r.bind(r,13148)),{loadableGenerated:{webpack:()=>[13148]},ssr:!1,loading:()=>(0,a.jsx)(i.A,{height:"300px",style:{gridArea:"anchornav"}})}),J=o()(()=>Promise.all([r.e(4492),r.e(6345),r.e(4836)]).then(r.bind(r,34836)),{loadableGenerated:{webpack:()=>[34836]},ssr:!1,loading:()=>(0,a.jsx)(i.A,{height:"25px",width:"90%",style:{maxWidth:"var(--ds-grid-breakpoint-xl)",margin:"var(--ds-grid-margin-md) auto"}})}),Q=o()(()=>Promise.all([r.e(5654),r.e(172),r.e(5961),r.e(4826),r.e(9729)]).then(r.bind(r,65848)),{loadableGenerated:{webpack:()=>[65848]},ssr:!1}),ee=o()(()=>r.e(4600).then(r.bind(r,34600)),{loadableGenerated:{webpack:()=>[34600]},ssr:!1}),et={Anchor:{componentClass:X,componentModelClass:null},Breadcrumb:{componentClass:J,componentModelClass:null},SideNav:{componentClass:z,componentModelClass:null},BorealisRenderer:{componentClass:K,componentModelClass:null},FlightDealsRenderer:{componentClass:Y,componentModelClass:null},HomepageHeroUCM:{componentClass:Q,componentModelClass:null},xCheckRender:{componentClass:d,componentModelClass:null},EmbeddedFormRender:{componentClass:f,componentModelClass:null},IslandGuideAddress:{componentClass:o()(()=>Promise.all([r.e(3018),r.e(2509),r.e(338),r.e(9267)]).then(r.bind(r,89267)),{loadableGenerated:{webpack:()=>[89267]},ssr:!1}),componentModelClass:null},Five9Chat:{componentClass:ee,componentModelClass:null},SlottedBookingWidgetRender:{componentClass:V,componentModelClass:null},"Slotted Booking Widget":{componentClass:V,componentModelClass:null}}},50522:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var a=r(39324);let{publicRuntimeConfig:n}=r.n(a)()(),o=async()=>fetch(`${n.basePath||"/"}api/cruises`).then(e=>{if(!e.ok)throw Error("Failed to fetch cruise data");return e.json()}).catch(e=>({error:e}))},52496:(e,t,r)=>{"use strict";
18Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return i}});let a=r(72687);r(37876),r(14232);let n=a._(r(90295));function o(e){return{default:(null==e?void 0:e.default)||e}}function i(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=n.default,a={loading:e=>{let{error:t,isLoading:r,pastDelay:a}=e;return null}};e instanceof Promise?a.loader=()=>e:"function"==typeof e?a.loader=e:"object"==typeof e&&(a={...a,...e});let s=(a={...a,...t}).loader;return(a.loadableGenerated&&(a={...a,...a.loadableGenerated},delete a.loadableGenerated),"boolean"!=typeof a.ssr||a.ssr)?r({...a,loader:()=>null!=s?s().then(o):Promise.resolve(o(()=>null))}):(delete a.webpack,delete a.modules,i(r,a))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52782:(e,t,r)=>{"use strict";r.d(t,{Dk:()=>u,Zg:()=>s.Z,aF:()=>s.a,bk:()=>l});var a=r(17041),n=r(11125),o=r(21898),i=r(4582),s=r(30853);let l=async(e,t)=>{if(!e)return null;let r=(0,a.kg)(e),s=(0,a.yZ)(r),l=await (0,a.Fl)(r,s),u=o.L$?.[t]??[],c=[l?.root??l,r?.root,(0,a.MH)(e)?.root,e?.shadowRoot,e].filter(
18Boolean),d=e=>!!e?.closest?.('[hidden],[inert],[aria-hidden="true"]');for(let e of c)if(!d(e))for(let t of u){let r=(0,i.H)?.(e,t)??e?.querySelector?.(t);if(r&&!d(r))return r}let f=l?.root??l??r?.root??e;return(0,n.SG)(l,t)||(0,n.SG)(r?.root,t)||(0,n.SG)((0,a.MH)(e)?.root,t)||((e,t)=>{if(!e)return null;let r='[hidden],[inert],[aria-hidden="true"]',a=[o.ZM.WIDGET.LOCATION_PICKER,o.ZM.INPUT.COMBOBOX].join(", "),n=[o.ZM.INPUT.FORMKIT_COMPONENT,o.ZM.INPUT.FORMKIT_TRIGGER].join(", "),i=e=>!!e?.closest?.(r)||!!e?.getRootNode?.()?.host?.closest?.(r),s=e=>!e||e.tagName?.toUpperCase?.()==="INPUT"||!!e.closest?.("auro-datepicker,[auro-datepicker],auro-datepicker_car-rental-form"),l=e=>{let r=e?.querySelector?.(a);return r&&!s(r)&&(e=>{let r=String(e?.className?.baseVal??e?.className??""),a=e?.getAttribute?.("name")??"";return t===o._M.CARS?r.includes("borealis-car-booking-form-item")||"pickupLocation"===a:t===o._M.HOTELS&&(r.includes("borealis-hotel-booking-form-item")||"locationCombobox"===a)})(r)?r:null},u=new Set,c=[e];for(;c.length;){let e=c.pop();if(!e||u.has(e)||i(e))continue;u.add(e);let t=l(e);if(t)return t;let r=e?.querySelector?.(n);if(r&&!s(r))return r;let a=e?.shadowRoot??e?.renderRoot;for(let t of(a&&c.push(a),e?.children??[]))c.push(t)}return null})(f,t)||null},u=e=>!e||!!e?.closest?.('[hidden],[inert],[aria-hidden="true"]')||!!e?.getRootNode?.()?.host?.closest?.('[hidden],[inert],[aria-hidden="true"]')},56574:(e,t,r)=>{"use strict";var a=r(88791);r(85128),a.A.register()},63412:e=>{"use strict";e.exports={BRAND_TO_TRACKING:{alaska:"AS",hawaiian:"HA",loyalty:"Atmos",atmos:"Atmos",alaskaforbusiness:"AFB",afb:"AFB",easybiz:"easybiz",travelagent:"TA","travel-agent":"TA"}}},65579:(e,t,r)=>{"use strict";r.d(t,{V:()=>o});var a=r(14232),n=(0,a.createContext)(void 0),o=function(){return(0,a.useContext)(n)}},67336:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(37876);r(56574);var n=r(95062),o=r.n(n);let i=({width:e,height:t="200px",shape:r="rectangle",style:n={},...o})=>{let i={...n};return e&&(i.width=e),t&&(i.height=t),(0,a.jsx)("auro-skeleton",{shape:r,style:i,...o})};i.propTypes={width:o().string,height:o().string,shape:o().string,style:o().object};let s=i},69005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let a=r(380),n=["_version","ACL","publish_details","created_by","updated_by","created_at","updated_at","publish_details","tags","_in_progress","_metadata","is_dir","parent_uid","file_size","filename","title","locale","uid","_content_type_uid"],o=e=>{let t=e=>Array.isArray(e)?e.map(t):(e=>"object"==typeof e&&null!==e)(e)?Object.keys(e).reduce((r,a)=>(n.includes(a)||(r[a]=t(e[a])),r),{}):e;return t(e)},i=e=>!e||"object"!=typeof e||Array.isArray(e)?e:Object.entries(e).reduce((e,[t,r])=>(e[(e=>"fs_options"===e?"options":"same_od"===e?"sameOD":"web2_campaign_api_host"===e?"web2CampaignAPIHost":"zh_cn"===e?"zh-CN":e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()))(t)]="object"!=typeof r||Array.isArray(r)?r:i(r),e),{});function s(e,t,r,a){"BorealisCarouselOfCardsND"===e&&"borealis-carousel-of-cards"===t&&(a.current.hasNextDestination=!0,a.current.carouselType="next-destination")}function l(e,t){t&&Object.entries(t).forEach(([t,r])=>{e.current[t]=r})}e.exports={filterUnwantedMetadata:o,propsWithSetValueOnly:e=>Object.fromEntries(Object.entries(e).filter(([,e])=>"string"==typeof e&&""!==e.trim()||!0===e)),convertKeysToCamelCase:i,filterSearchWidgetVerbiage:(e,t)=>{if(e&&"borealis-expanded-booking-widget"===t){let t=o(e),r=i(t.fs_verbiage_upgrades?.[0]),a=i(t.fs_verbiage_discount_codes?.[0]),n=i(t.fs_verbiage_icons_errors_links?.[0]);return{...r,...a,...n}}},setLegacyConditions:s,setRefDataMappingByTitle:function(e,t,r,n,o){l(o,n),s(e,t,r,o),o.current&&n.dataKey&&n.singularObject?o.current[n.dataKey]=r?.[0]:o.current&&n.dataKey?o.current[n.dataKey]=r:o.current&&a.MULTIPLE_UCM_REGISTRY[e]?o.current.data=r:o.current&&a.CARD_DATA_PROP[e]?o.current.cardData=r?.[0]:(o.current&&n.singularObject,o.current.data=r?.[0])},mapRenderAttributesToRef:l,normalizeConcise:(e={})=>{let t=e=>"string"==typeof e?e:"";return{headline:{small:t(e?.headline?.small)},description:{small:t(e?.description?.small)},teaser:{headline:t(e?.teaser?.headline)},media:{primary:{url:t(e?.media?.primary?.url),description:t(e?.media?.primary?.description)}},action:{link:{href:t(e?.action?.link?.href),title:t(e?.action?.link?.title)}},_content_type_uid:"string"==typeof e?._content_type_uid?e._content_type_uid:"universal_content_model",uid:"string"==typeof e?.uid?e.uid:"",_version:"number"==typeof e?._version&&Number.isFinite(e._version)?e._version:1,locale:t(e?.locale)||"en-us"}}}},69490:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(14232),n=r(95062),o=r.n(n),i=r(87333);let s=({children:e="",tag:t="div",...r})=>{(0,a.useEffect)(()=>{(0,i.Ay)(...[...((e,t)=>
18{let r,a=[];for(;r=e.exec(t);)a.push(r);return a})(/<auro-([a-z\-]+)/g,e)].map(e=>e[1]))},[e]);let n=(0,a.useMemo)(()=>"string"!=typeof e?null:e.replace(/(["'])[^"'~-]*([~-]\/media)/g,"$1/$2"),[e]);return(0,a.createElement)(t,{...r,dangerouslySetInnerHTML:{__html:n}})};s.propTypes={children:o().string,tag:o().any};let l=s},78524:(e,t,r)=>{"use strict";r.d(t,{J5:()=>o,Mp:()=>i,Si:()=>s});var a=r(39324);let{publicRuntimeConfig:n}=r.n(a)()(),o=e=>new Promise((t,r)=>{let a=document.createElement("script");a.src=e,a.type="module",a.onload=()=>{t()},a.onerror=()=>{r()},document.querySelector(`script[src="${e}"]`)||document.body.appendChild(a)}),i=e=>new Promise((t,r)=>{let a=document.createElement("script");a.src=e,a.onload=()=>{t()},a.onerror=()=>{r()},document.body.appendChild(a)}),s=async(e,t=()=>{})=>{if(!e)return;let r=document.createElement("div");r.innerHTML=e;let a=r.getElementsByTagName("script"),o=[];for(let e=a.length-1;e>=0;e--){let t=a[e],r=document.createElement("script");t.src&&(r.src=t.src.replace(/https?:\/\/(www\.)?alaskaair\.com/,n.cdnEndpoint)),t.type&&(r.type=t.type),t.innerHTML&&(r.innerHTML=t.innerHTML),o.unshift(r),t.parentNode.removeChild(t)}await t(r.innerHTML);let s=async e=>{e.src?await i(e.src):document.body.appendChild(e)};await Promise.all(o.map(s))}},79684:(e,t,r)=>{"use strict";let{HttpsAgent:a}=r(47582),n=r(29370);e.exports={fetchSafely:async(e,t={})=>{if("string"!=typeof e||""===e.trim())throw TypeError("fetchSafely: Invalid or missing URL");let r=new a({maxSockets:40,maxFreeSockets:10,timeout:6e4,freeSocketTimeout:3e4});try{return await n(e,{agent:r,...t})}catch(e){throw Error(`fetchSafely failed: ${e.message}`)}}}},82971:(e,t,r)=>{"use strict";r.d(t,{mapLocationsToAuroOptions:()=>o});let a=e=>Array.isArray(e)?e.map(a):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,t])=>[n(e),a(t)])):e,n=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),o=e=>{let t=Array.isArray(e)?e:[],r=(...e)=>e.find(e=>null!=e&&""!==e),a=new Set;return t.reduce((e,t,n)=>{let o=t?.locationName==null?void 0:String(t.locationName).replaceAll(/\b[a-z]/g,e=>e.toUpperCase()),i=String(r(t?.label,t?.displayName,t?.name,o,[t?.cityName??t?.city,t?.stateCode??t?.state??t?.region,t?.countryName??t?.country].filter(Boolean).join(", "))??"")||"",s=r(t?.locationName,t?.id,t?.code,t?.value);(null==s||""===s)&&(s=`loc:${n}:${i}`);let l=r(t?.airportCode,t?.iata,t?.airport,t?.region),u=`${i}||${l??""}`;return a.has(u)||(a.add(u),e.push(l?{label:i,value:String(s),secondary:String(l)}:{label:i,value:String(s)})),e},[])}},86581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return a}});let a=r(72687)._(r(14232)).default.createContext(null)},87333:(e,t,r)=>{"use strict";let a,n;r.d(t,{Ay:()=>A,qn:()=>E,mD:()=>y});var o=r(78524),i=r(39324),s=r.n(i),l=r(79684);let{publicRuntimeConfig:u}=s()(),c={auro:()=>u.auroEndpoint,"auro-labs":()=>u.auroLabsEndpoint},d=e=>c[e]?.()||u.auroDesignSystemEndpoint,f=(e,t,r,a,n)=>a?.isESM?"auro-formkit"===t?`${e}/${t}@${r}/${a.displayName}/+esm`:`${e}/${t}@${r}/+esm`:`${e}/${t}@${r}/dist/${n}__bundled.js`,m=(e,t,r,a,n)=>"auro-formkit"===t?`${e}/${t}@latest/${a.displayName}/+esm`:`${e}/${t}@${r}/dist/${n.trim()}`,p={},h={},b=()=>(((function(){let e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){let t=e.indexOf("rv:");return parseInt(e.substring(t+3,e.indexOf(".",t)),10)}let r=e.indexOf("Edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)})()||/^((?!chrome|android).)*safari/i.test(navigator.userAgent))&&!a&&(a=(0,o.Mp)("https://cdn.jsdelivr.net/npm/@webcomponents/[email protected]/webcomponents-bundle.js")),a),g=async()=>(0,l.fetchSafely)(`${u.basePath||"/"}api/getAuroComponentsVersion`).then(e=>{if(!e.ok)throw Error("Failed to retrieve Auro components versions");return e.json()}).catch(()=>null),y=async(...e)=>{if(!e.length)return;await b();let t=await _();for(let r of e){if(!r)continue;let e=t?t.find(e=>e.displayName===r):{},a=e&&e.endpoint&&e.endpoint.value?e.endpoint.value:"https://unpkg.com",n=e&&e.ver
18sion&&e.version.value?e.version.value:"latest",i=r.split("-",1),s=e&&e.location&&e.location.value?e.location.value:"alaskaair".concat(i);if(!h[r]){let e=[(0,o.J5)(`${a}/@${s}/${r}@${n}/dist/${r}__bundled.js`)];h[r]=Promise.all(e)}}for(let t of(await Promise.all(Object.values(h)).catch(()=>{}),e))t&&document.body.classList.add(`${t}-loaded`)},_=async()=>(0,l.fetchSafely)(`${u.BASE_PATH||"/"}api/getJaclComponentsVersion`).then(e=>{if(!e.ok)throw Error("Failed to retrieve JACL components versions");return e.json()}).catch(()=>null),E=async(...e)=>{if(e.length){for(let t of(await (()=>{if(!n){let e=document.createElement("link");e.rel="stylesheet",e.href=`${u.componentHangerCdnEndpoint}/components/shared/component-base.css`,document.body.appendChild(e),n=(0,o.Mp)(`${u.componentHangerCdnEndpoint}/components/shared/component-base.js`)}return n})(),e))t&&(p[t]||(p[t]=(0,o.Mp)(`${u.COMPONENT_HANGAR_CDN_ENDPOINT}/components/${t}/main.js`)));for(let t of(await Promise.all(Object.values(p)),e))t&&document.body.classList.add(`${t}-loaded`)}},A=async(...e)=>{let t=e.filter(Boolean);if(!t.length)return;await b();let r=await g();for(let e of t){let t=`auro-${e}`;if(p[t])continue;let a=r?r.find(e=>e.displayName===t):{},n=d(a?.location?.value),i=a?.version?.value||"latest",s=a?.group?.value||t,l=a?.files?.value?.split(",").filter(e=>e.trim())||[],u=f(n,s,i,a,t),c=[(0,o.J5)(u)];for(let e of l){let t=m(n,s,i,a,e);c.push((0,o.J5)(t))}p[t]=Promise.all(c)}for(let e of(await Promise.all(Object.values(p)).catch(()=>{}),t))document.body.classList.add(`auro-${e}-loaded`)}},88791:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(85128);class n{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,r=(t,a=t&&t.closest(e))=>t&&t!==document&&t!==window?a||r(t.getRootNode().host):null){return r(t)}handleComponentTagRename(e,t){let r=t.toLowerCase();e.tagName.toLowerCase()!==r&&e.setAttribute(r,!0)}elementMatch(e,t){let r=t.toLowerCase();return e.tagName.toLowerCase()===r||e.hasAttribute(r)}getSlotText(e,t){let r=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return(r?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}var o=(0,a.AH)`:host{background-color:var(--ds-auro-skeleton-container-color);background-image:linear-gradient(to right,var(--ds-auro-skeleton-container-gradient-color-one) 10%,var(--ds-auro-skeleton-container-gradient-color-two) 40%,var(--ds-auro-skeleton-container-gradient-color-one) 60%)} 19`,i=(0,a.AH)`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:block;animation-duration:2s;animation-fill-mode:backwards;animation-iteration-count:infinite;animation-name:place-holder-shimmer;animation-timing-function:linear;background-repeat:no-repeat;background-size:1000px 100%}:host([shape=circle]){width:auto;border-radius:50%}:host([shape=oval]){border-radius:9999px}:host([shape=rectangle]){border-radius:var(--ds-border-radius, .375rem)}@keyframes place-holder-shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}} 20`,s=(0,a.AH)`:host{--ds-auro-skeleton-container-color: var(--ds-advanced-color-skeleton-background, #f7f8fa);--ds-auro-skeleton-container-gradient-color-one: var(--ds-advanced-color-skeleton-background, #f7f8fa);--ds-auro-skeleton-container-gradient-color-two: var(--ds-advanced-color-skeleton-wave, #e4e8ec)} 21`;class l extends a.WF{constructor(){super(),this.runtimeUtils=new n}static get properties(){return{shape:{type:String}}}static get styles(){return[i,o,s]}static register(e="auro-skeleton"){n.prototype.registerComponent(e,l)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-skeleton")}render(){return(0,a.qy)`
22 <span class="util_displayHiddenVisually">Loading...</span> 23 `}}},90295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let a=r(72687)._(r(14232)),n=r(86581),o=[],i=[],s=!1;function l(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class u{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function c(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),o=null;function l(){if(!o){let t=new u(e,r);o={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return o.promise()}if(!s){let e=r.webpack&&1?r.webpack():r.modules;e&&i.push(t=>{for(let r of e)if(t.includes(r))return l()})}function c(e,t){l();let i=a.default.useContext(n.LoadableContext);i&&Array.isArray(r.modules)&&r.modules.forEach(e=>{i(e)});let s=a.default.useSyncExternalStore(o.subscribe,o.getCurrentValue,o.getCurrentValue);return a.default.useImperativeHandle(t,()=>({retry:o.retry}),[]),a.default.useMemo(()=>{var t;return s.loading||s.error?a.default.createElement(r.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:o.retry}):s.loaded?a.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null},[e,s])}return c.preload=()=>l(),c.displayName="LoadableComponent",a.default.forwardRef(c)}(l,e)}function d(e,t){let r=[];for(;e.length;){let a=e.pop();r.push(a(t))}return Promise.all(r).then(()=>{if(e.length)return d(e,t)})}c.preloadAll=()=>new Promise((e,t)=>{d(o).then(e,t)}),c.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());d(i,e).then(r,r)})),window.__NEXT_PRELOADREADY=c.preloadReady;let f=c}}]);
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.