PageSourceSearch

https://award.sh/_next/static/chunks/app/app/(chrome)/page-01edae8548e304b4.js

js award.sh collected 2026-10-02 02:08:01 UTC 67,281 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7642],{10683:(e,t,r)=>{"use strict";r.d(t,{AvailabilityAlertForm:()=>c});var s=r(48468),a=r(25415),n=r.n(a),i=r(600),l=r(58713),o=r(32543),d=r(14746);function c(e){let[t,r]=(0,i.useState)(null);return((0,i.useEffect)(()=>{let e=new AbortController;return fetch("/api/availability-alerts",{credentials:"same-origin",cache:"no-store",signal:e.signal}).then(async e=>{if(!e.ok)return null;let t=await e.json();return t?.status==="success"&&t?.eligible===!0?{email:"string"==typeof t.email?t.email:""}:null}).then(e=>{e&&r(e)}).catch(()=>{}),()=>e.abort()},[]),t)?(0,s.jsx)(u,{...e,email:t.email},"flight"===e.kind?[e.kind,e.source??"",e.origin,e.destination,e.defaultCabinClass??"",e.defaultDateFrom??"",e.defaultDateTo??"",e.defaultMinSeats??1,+!!e.defaultIncludeWaitlist,+!!e.lockCriteria].join("|"):[e.kind,e.source,e.propertyCode,e.defaultDateFrom,e.defaultDateTo].join("|")):null}function u(e){let[t,r]=(0,i.useState)("idle"),[a,c]=(0,i.useState)(null),[u,m]=(0,i.useState)("flight"===e.kind?e.defaultCabinClass??"":""),[x,f]=(0,i.useState)("flight"===e.kind?e.defaultDateFrom??"":e.defaultDateFrom),[g,p]=(0,i.useState)("flight"===e.kind?e.defaultDateTo??"":e.defaultDateTo),[h,b]=(0,i.useState)("flight"===e.kind?e.defaultMinSeats??1:1),[v,j]=(0,i.useState)("flight"===e.kind&&(e.defaultIncludeWaitlist??!1)),[N,w]=(0,i.useState)("any_points"),[y,k]=(0,i.useState)("");async function S(s){if(s.preventDefault(),"submitting"===t)return;r("submitting"),c(null);let a="flight"===e.kind?{kind:"flight",source:e.source??"",origin:e.origin,destination:e.destination,cabinClass:u,dateFrom:x,dateTo:g,minSeats:h,includeWaitlist:v}:{kind:"hotel",source:e.source,propertyCode:e.propertyCode,dateFrom:x,dateTo:g,rateScope:N,maxPoints:y};try{let e=await fetch("/api/availability-alerts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),t=await e.json().catch(()=>null);e.ok&&t?.status==="success"?r("active"):(r("error"),c((400===e.status||429===e.status)&&t?.error?t.error:"Something went wrong. Please try again."))}catch{r("error"),c("Something went wrong. Please try again.")}}if("active"===t)return(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-border bg-muted/50 px-4 py-3 text-sm text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"Your alert is active."})," ","We'll email ",e.email," when seats appear or the price drops — at most once a day — until your travel window passes."," ",(0,s.jsx)(n(),{href:"/app/settings/alerts",className:"font-medium text-brand hover:underline",children:"Manage alerts"})]});let C="flight"===e.kind&&e.lockCriteria;return(0,s.jsxs)("form",{onSubmit:S,className:"mt-4 space-y-3 rounded-lg border border-border/70 bg-muted/20 p-4 text-left",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Create an Availability Alert"}),(0,s.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"flight"===e.kind?"Watch this route and email me when matching award seats appear or the best price drops.":"Watch this property and email me when a matching one-night award rate appears or the best rate drops."})]}),"flight"===e.kind?(0,s.jsxs)(s.Fragment,{children:[!C&&(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,s.jsxs)("select",{value:u,onChange:e=>m(e.target.value),"aria-label":"Cabin class",className:"h-9 rounded-md border border-input bg-transparent px-3 text-sm shadow-xs focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",children:[(0,s.jsx)("option",{value:"",children:"Any cabin"}),d.hT.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,s.jsx)("select",{value:h,onChange:e=>b(Number(e.target.value)),"aria-label":"Minimum confirmed seats",className:"h-9 rounded-md border border-input bg-transparent px-3 text-sm shadow-xs focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",children:[1,2,3,4,5,6,7,8,9].map(e=>(0,s.jsxs)("option",{value:e,children:[e," seat",1===e?"":"s"]},e))})]}),!C&&(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,s.jsx)("input",{type:"checkbox",checked:v,onChange:e=>j(e.target.checked),className:"size-4 rounded border-input accent-brand"}),"Include waitlist sightings"]})]}):(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,s.jsxs)("select",{value:N,onChange:e=>w(e.target.value),"aria-label":"Award rate type",className:"h-9 rounded-md border border-input bg-transparent px-3 text-sm shadow-xs focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",children:[(0,s.jsx)("option",{value:"any_points",children:"Any points rate"}),(0,s.jsx)("option",{value:"pure_points",children:"Points only"}),(0,s.jsx)("option",{value:"standard_pure_points",children:"Standard, points only"})]}),(0,s.jsx)(o.p,{type:"number",min:1,step:1e3,value:y,onChange:e=>k(e.target.value),placeholder:"Max points (optional)","aria-label":"Maximum points per night"})]}),!C&&(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,s.jsxs)("label",{className:"space-y-1 text-xs text-muted-foreground",children:["From",(0,s.jsx)(o.p,{type:"date",required:"hotel"===e.kind,value:x,onChange:e=>f(e.target.value),"aria-label":"Earliest date",className:"h-9 text-xs"})]}),(0,s.jsxs)("label",{className:"space-y-1 text-xs text-muted-foreground",children:["To",(0,s.jsx)(o.p,{type:"date",required:"hotel"===e.kind,value:g,onChange:e=>p(e.target.value),"aria-label":"Latest date",className:"h-9 text-xs"})]})]}),C&&(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Watching ",u?`${u} cabin, `:"any cabin, ",h," seat",1===h?"":"s"," on ",x,v?", including waitlist":"","."]}),a&&(0,s.jsx)("p",{className:"text-xs text-danger-foreground",children:a}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Sent only to your signed-in email, ",e.email,"."]}),(0,s.jsx)(l.$,{type:"submit",disabled:"submitting"===t,className:"bg-brand text-brand-foreground hover:bg-brand/90",children:"submitting"===t?"Creating…":"Create alert"})]}),(0,s.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:"No confirmation email is sent. The alert emails at most once a day and keeps wat
1ching until its travel window passes. Hotel alerts represent one-night sightings, not a confirmed stay."})]})}},16050:(e,t,r)=>{"use strict";function s({source:e,origin:t,destination:r,cabin:a,wl:n=!1}){let i=`/app/${e.toLowerCase()}/${t.toLowerCase()}/${r.toLowerCase()}`,l=new URLSearchParams({class:a});return n&&l.set("wl","1"),`${i}?${l.toString()}`}function a(e){return"1"===e.get("wl")}r.d(t,{J:()=>s,Z:()=>a})},19587:(e,t,r)=>{"use strict";r.d(t,{$v:()=>i,Jj:()=>s,_m:()=>n,cv:()=>a,gy:()=>d,iB:()=>l,il:()=>u,o_:()=>c,uV:()=>o});let s={"app.read":"View availability data","app.export":"Export data (CSV/JSON)","app.alerts":"Create availability alerts","admin.users":"Manage users and invitations","feature.route_requests":"View empty-route demand board","feature.sq_first_saver":"SQ First Saver Finder (Labs)","feature.experimental_paid_plans":"See paid plan upgrade / Stripe billing CTAs","feature.email_alerts":"Create recurring Availability Alerts","feature.hotels":"Hotel award search — Hilton/Marriott (Labs)","feature.sq_award_watch":"SQ award price change watch — stealth devaluations (Labs)","feature.sq_seat":"SQ seat viewer — clickable cabin + reverse-engineered 3D camera framing (Labs)"};function a(e){return e?e.split(",").map(e=>e.trim()).filter(Boolean):[]}function n(e,t){return e.includes("*")||e.includes(t)}let i=Object.entries(s).filter(([e])=>e.startsWith("feature.")).map(([e,t])=>({key:e,description:t})),l={free:{name:"Free",searchesPerDay:5,maxDateDays:90},contributor:{name:"Contributor",searchesPerDay:20,maxDateDays:365},pro:{name:"Pro",searchesPerDay:1/0,maxDateDays:365},unlimited:{name:"Unlimited",searchesPerDay:1/0,maxDateDays:365}},o=["free","contributor","pro","unlimited"];function d(e,t,r){let s=a(e).filter(e=>e!==t);return r&&s.push(t),s.join(",")}function c(e){return a(e).filter(e=>!e.startsWith("plan.")).join(",")}let u=Object.keys(s).filter(e=>e.startsWith("feature."))},19640:(e,t,r)=>{"use strict";r.d(t,{OnboardingGate:()=>n});var s=r(600),a=r(45464);function n({href:e}){let t=(0,a.useRouter)();return(0,s.useEffect)(()=>{t.replace(e)},[t,e]),null}},20162:(e,t,r)=>{"use strict";r.d(t,{Carousel:()=>l});var s=r(48468),a=r(600),n=r(95671),i=r(37712);function l({children:e,label:t}){let r=(0,a.useRef)(null),[o,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!0),m=(0,a.useCallback)(()=>{let e=r.current;e&&(d(e.scrollLeft>0),u(e.scrollLeft+e.clientWidth<e.scrollWidth-1))},[]);(0,a.useEffect)(()=>{let e=r.current;if(!e)return;m(),e.addEventListener("scroll",m,{passive:!0});let t=new ResizeObserver(m);return t.observe(e),()=>{e.removeEventListener("scroll",m),t.disconnect()}},[m]);let x=e=>{r.current?.scrollBy({left:"left"===e?-340:340,behavior:"smooth"})};return(0,s.jsxs)("div",{className:"relative",children:[o&&(0,s.jsx)("button",{type:"button",onClick:()=>x("left"),"aria-label":`Scroll ${t} left`,className:"absolute -left-4 top-1/2 z-10 hidden -translate-y-1/2 rounded-full border border-border bg-background p-2 text-foreground shadow-md transition-colors hover:bg-muted dark:bg-card dark:hover:bg-muted/80 sm:block",children:(0,s.jsx)(n.A,{className:"size-4"})}),c&&(0,s.jsx)("button",{type:"button",onClick:()=>x("right"),"aria-label":`Scroll ${t} right`,className:"absolute -right-4 top-1/2 z-10 hidden -translate-y-1/2 rounded-full border border-border bg-background p-2 text-foreground shadow-md transition-colors hover:bg-muted dark:bg-card dark:hover:bg-muted/80 sm:block",children:(0,s.jsx)(i.A,{className:"size-4"})}),c&&(0,s.jsx)("div",{className:"pointer-events-none absolute -right-px -top-px 
1-bottom-px z-10 w-10 bg-gradient-to-l from-background to-transparent sm:hidden"}),(0,s.jsx)("div",{ref:r,className:"scrollbar-hide -mx-px flex gap-4 overflow-x-auto px-px py-2",children:e})]})}},20925:(e,t,r)=>{"use strict";r.d(t,{FeedClient:()=>_});var s=r(48468),a=r(600),n=r(25415),i=r.n(n),l=r(45464),o=r(55987),d=r(26390),c=r(53152);let u=(0,r(35457).A)("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]);var m=r(83075),x=r(58713),f=r(20162),g=r(69699),p=r(27237),h=r(93503),b=r(90493),v=r(93466),j=r(33970),N=r(44732),w=r(73640),y=r(44948);function k({deal:e,footer:t,onShare:r}){let a=h.d[e.fareFamily]??{bg:"var(--muted)",text:"var(--muted-foreground)",label:e.fareFamily},n=0===e.stops?"Non-stop":`${e.stops} stop${e.stops>1?"s":""}`,l=!!e.departureTime&&!!e.arrivalTime,o=(0,v.fU)(e.departureTime),d=(0,v.fU)(e.arrivalTime),c=(0,j.k6)(e.source),u=(0,N.n)(e.flightNumbers);return(0,s.jsxs)("div",{className:"group flex w-[calc(100vw-2rem)] max-w-[280px] shrink-0 flex-col overflow-hidden rounded-xl border border-border bg-card transition-all hover:-translate-y-1 hover:shadow-lg sm:w-[320px] sm:max-w-none",children:[(0,s.jsxs)("div",{className:"flex gap-3 px-4 pt-3.5 pb-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-lg font-semibold tracking-tight text-foreground",children:e.origin}),(0,s.jsx)("span",{className:"text-lg text-muted-foreground/60",children:"→"}),(0,s.jsx)("span",{className:"text-lg font-semibold tracking-tight text-foreground",children:e.destination})]}),(0,s.jsxs)("div",{className:"truncate text-xs text-muted-foreground",children:[e.originCity," to ",e.destinationCity]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[(0,s.jsx)(b.B,{cabin:e.cabinClass,children:e.cabinDescription}),r?(0,s.jsx)("button",{type:"button",onClick:()=>r(e),"aria-label":`Share ${e.origin} to ${e.destination}`,className:"inline-flex size-8 items-center justify-center rounded-md text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",title:"Share card",children:(0,s.jsx)(p.A,{className:"size-3.5"})}):(0,s.jsx)(i(),{href:(0,w.X)(e),"aria-label":`Share ${e.origin} to ${e.destination}`,className:"inline-flex size-8 items-center justify-center rounded-md text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",title:"Share card",children:(0,s.jsx)(p.A,{className:"size-3.5"})})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 border-t border-border/30 bg-muted/20 px-4 py-2.5 text-xs text-muted-foreground",children:[(0,s.jsx)(g.default,{src:(0,N.x)(u[0]||"SQ"),alt:u[0]||"",width:18,height:18,className:"shrink-0 rounded-sm",unoptimized:!0}),(0,s.jsx)("span",{className:"min-w-0 truncate font-medium text-foreground",children:e.flightNumbers}),(0,s.jsx)("span",{className:"ml-auto shrink-0",children:n})]}),(0,s.jsxs)("div",{className:"flex flex-1 items-end justify-between px-4 py-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,v.H6)(e.departureDate)}),l&&(0,s.jsxs)("div",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[o," – ",d,(0,s.jsx)(y.V,{departure:e.departureTime,arrival:e.arrivalTime,offset:e.arrivalDayOffset})]}),(0,s.jsxs)("div",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[e.seatsAvailable>=9?"9+":e.seatsAvailable," seat",1!==e.seatsAvailable?"s":""," left"]})]}),(0,s.jsxs)("div",{className:"shrink-0 text-right",children:[(0,s.jsx)("span",{className:"text-2xl font-semibold tracking-tight text-foreground",children:(0,v.Cq)(e.miles)}),(0,s.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:c}),(0,s.jsx)("div",{className:"mt-0.5",children:(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold",style:{backgroundColor:a.bg,color:a.text},children:a.label})})]})]}),t]})}var S=r(66582),C=r(14746),$=r(16050);function z(e,t){return(0,$.J)({source:e.source,origin:e.origin,destination:e.destination,cabin:e.cabinClass,wl:t})}function A({deal:e,wl:t}){return(0,s.jsx)(i(),{href:z(e,t),className:"flex items-center justify-center gap-1.5 border-t border-border/30 px-4 py-2.5 text-xs font-semibold text-brand transition-colors hover:bg-muted/40",children:"View route details →"})}function D({deal:e,wl:t,referenceTime:r}){return(0,s.jsxs)(i(),{href:z(e,t),className:"flex items-center justify-between border-t border-border/30 px-4 py-2.5 text-xs transition-colors hover:bg-muted/40",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:(0,v.fF)(e.reportedAt,r)}),(0,s.jsx)("span",{className:"font-semibold text-brand",children:"View route →"})]})}function _({homeAirportCode:e,savedRoutes:t,homeAirportDeals:r,savedRouteDeals:n,justAppeared:g,cheapestPremium:p,referenceTime:h}){let b=(0,$.Z)((0,l.useSearchParams)()),[v,j]=(0,a.useState)(null),N=(0,a.useCallback)(e=>{j(e)},[]),w=(0,a.useCallback)(()=>{j(null)},[]);return 0===t.length&&0===r.length&&0===n.length&&0===g.length&&0===p.length?(0,s.jsx)("div",{className:"mx-auto max-w-screen-2xl px-4 pb-8 sm:px-6",children:(0,s.jsx)(m.Zp,{children:(0,s.jsxs)(m.Wu,{className:"flex flex-col items-center gap-3 py-12 text-center",children:[(0,s.jsx)(o.A,{className:"size-8 text-muted-foreground
1/40"}),e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-sm font-medium text-foreground",children:["No current deals from ",e]}),(0,s.jsx)("p",{className:"max-w-md text-xs text-muted-foreground",children:"Nothing matching your feed has been reported recently. Search a route above, or save routes you're watching and they'll show up here when seats open."}),(0,s.jsx)(i(),{href:"/app/settings/preferences",className:(0,x.r)({variant:"outline",size:"sm"}),children:"Adjust preferences"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Your feed is empty"}),(0,s.jsx)("p",{className:"max-w-md text-xs text-muted-foreground",children:"Set a home airport and save routes to get a personalized feed of award deals — premium cabin openings from your airport, plus alerts when seats appear on routes you're watching."}),(0,s.jsx)(i(),{href:"/app/settings/preferences",className:(0,x.r)({variant:"brand",size:"sm"}),children:"Set home airport"})]})]})})}):(0,s.jsxs)("div",{className:"mx-auto max-w-screen-2xl px-4 sm:px-6",children:[(0,s.jsxs)("div",{className:"space-y-10 pb-8",children:[t.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[(0,s.jsx)(d.A,{className:"size-4 text-brand"}),"Saved routes"]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Fast access to routes you are watching"})]}),(0,s.jsx)(i(),{href:"/app/settings/preferences",className:"text-xs font-medium text-brand hover:underline",children:"Manage"})]}),(0,s.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1",children:t.map(e=>(0,s.jsxs)(i(),{href:function(e,t){if(e.source)return(0,$.J)({source:e.source,origin:e.origin,destination:e.destination,cabin:e.cabinClass,wl:t});let r=new URLSearchParams({from:e.origin,to:e.destination,cabin:e.cabinClass,trip:"ow"});return t&&r.set("wl","1"),`/app?${r.toString()}`}(e,b),className:"min-w-[220px] rounded-lg border border-border bg-background px-3 py-2 transition-colors hover:border-brand/40 hover:bg-muted/40",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-semibold text-foreground",children:[(0,s.jsx)("span",{children:e.origin}),(0,s.jsx)("span",{className:"text-muted-foreground/50",children:"→"}),(0,s.jsx)("span",{children:e.destination})]}),(0,s.jsxs)("div",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[C.ac[e.cabinClass]??e.cabinClass,e.source?` \xb7 ${C.rV[e.source]??e.source}`:" \xb7 all programs"]})]},`${e.source}-${e.origin}-${e.destination}-${e.cabinClass}`))})]}),r.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[(0,s.jsx)(c.A,{className:"size-4 text-brand"}),e?`From ${e}`:"From your airport"]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Premium cabin opportunities ranked for your home airport"})]}),(0,s.jsx)(f.Carousel,{label:"home-airport-deals",children:r.map((e,t)=>(0,s.jsx)(k,{deal:e,footer:(0,s.jsx)(A,{deal:e,wl:b}),onShare:N},`home-${e.source}-${e.origin}-${e.destination}-${e.cabinClass}-${t}`))})]}),n.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[(0,s.jsx)(d.A,{className:"size-4 text-brand"}),"Watching now"]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Best confirmed seats currently available on saved routes"})]}),(0,s.jsx)(f.Carousel,{label:"saved-route-deals",children:n.map((e,t)=>(0,s.jsx)(k,{deal:e,footer:(0,s.jsx)(A,{deal:e,wl:b}),onShare:N},`saved-${e.source}-${e.origin}-${e.destination}-${e.cabinClass}-${t}`))})]}),g.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[(0,s.jsx)(o.A,{className:"size-4 text-brand"}),"Just appeared"]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Premium cabin seats reported in the last 5 days"})]}),(0,s.jsx)(f.Carousel,{label:"just-appeared",children:g.map((e,t)=>(0,s.jsx)(k,{deal:e,footer:(0,s.jsx)(D,{deal:e,wl:b,referenceTime:h}),onShare:N},`appeared-${e.source}-${e.origin}-${e.destination}-${e.cabinClass}-${e.departureDate}-${e.flightNumbers}-${t}`))})]}),p.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[(0,s.jsx)(u,{className:"size-4 text-brand"}),"Cheapest premium"]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Lowest miles for confirmed Business & First availability"})]}),(0,s.jsx)(f.Carousel,{label:"cheapest-premium",children:p.map((e,t)=>(0,s.jsx)(k,{deal:e,footer:(0,s.jsx)(A,{deal:e,wl:b}),onShare:N},`cheapest-${e.source}-${e.origin}-${e.destination}-${e.cabinClass}-${t}`))})]})]}),v&&(0,s.jsx)(S.ShareClient,{deal:v,imageUrl:`https://award-sh-assets.s3.ap-southeast-1.amazonaws.com/images/cities/${v.destination}.jpg`,onClose:w})]})}},22324:(e,t,r)=>{"use strict";r.d(t,{UserTierProvider:()=>l,b:()=>o});var s=r(48468),a=r(600),n=r(19587);let i=(0,a.createContext)({tier:"free",isUnlimited:!1,...n.iB.free});function l({tier:e,children:t}){let r=(0,a.useMemo)(()=>({tier:e,isUnlimited:!Number.isFinite(n.iB[e].searchesPerDay),...n.i
1B[e]}),[e]);return(0,s.jsx)(i,{value:r,children:t})}function o(){return(0,a.useContext)(i)}},26390:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(35457).A)("bookmark",[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]])},27803:(e,t,r)=>{"use strict";r.d(t,{V:()=>m});var s=r(48468),a=r(600),n=r(5797),i=r(59908),l=r(41734),o=r(58713),d=r(95671),c=r(37712),u=r(48296);function m({className:e,classNames:t,showOutsideDays:r=!0,captionLayout:a="label",buttonVariant:f="ghost",locale:g,formatters:p,components:h,...b}){let v=(0,n.a)();return(0,s.jsx)(i.h,{showOutsideDays:r,className:(0,l.cn)("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:a,locale:g,formatters:{formatMonthDropdown:e=>e.toLocaleString(g?.code,{month:"short"}),...p},classNames:{root:(0,l.cn)("w-fit",v.root),months:(0,l.cn)("relative flex flex-col gap-4 md:flex-row",v.months),month:(0,l.cn)("flex w-full flex-col gap-4",v.month),nav:(0,l.cn)("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",v.nav),button_previous:(0,l.cn)((0,o.r)({variant:f}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",v.button_previous),button_next:(0,l.cn)((0,o.r)({variant:f}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",v.button_next),month_caption:(0,l.cn)("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",v.month_caption),dropdowns:(0,l.cn)("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",v.dropdowns),dropdown_root:(0,l.cn)("relative rounded-(--cell-radius)",v.dropdown_root),dropdown:(0,l.cn)("absolute inset-0 bg-popover opacity-0",v.dropdown),caption_label:(0,l.cn)("font-medium select-none","label"===a?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",v.caption_label),table:"w-full border-collapse",weekdays:(0,l.cn)("flex",v.weekdays),weekday:(0,l.cn)("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",v.weekday),week:(0,l.cn)("mt-2 flex w-full",v.week),week_number_header:(0,l.cn)("w-(--cell-size) select-none",v.week_number_header),week_number:(0,l.cn)("text-[0.8rem] text-muted-foreground select-none",v.week_number),day:(0,l.cn)("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",b.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",v.day),range_start:(0,l.cn)("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",v.range_start),range_middle:(0,l.cn)("rounded-none",v.range_middle),range_end:(0,l.cn)("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",v.range_end),today:(0,l.cn)("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",v.today),outside:(0,l.cn)("text-muted-foreground aria-selected:text-muted-foreground",v.outside),disabled:(0,l.cn)("text-muted-foreground opacity-50",v.disabled),hidden:(0,l.cn)("invisible",v.hidden),...t},components:{Root:({className:e,rootRef:t,...r})=>(0,s.jsx)("div",{"data-slot":"calendar",ref:t,className:(0,l.cn)(e),...r}),Chevron:({className:e,orientation:t,...r})=>"left"===t?(0,s.jsx)(d.A,{className:(0,l.cn)("size-4",e),...r}):"right"===t?(0,s.jsx)(c.A,{className:(0,l.cn)("size-4",e),...r}):(0,s.jsx)(u.A,{className:(0,l.cn)("size-4",e),...r}),DayButton:({...e})=>(0,s.jsx)(x,{locale:g,...e}),WeekNumber:({children:e,...t})=>(0,s.jsx)("td",{...t,children:(0,s.jsx)("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:e})}),...h},...b})}function x({className:e,day:t,modifiers:r,locale:i,...d}){let c=(0,n.a)(),u=a.useRef(null);return a.useEffect(()=>{r.focused&&u.current?.focus()}
1,[r.focused]),(0,s.jsx)(o.$,{variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(i?.code),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:(0,l.cn)("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) cursor-pointer flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground aria-disabled:cursor-not-allowed dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",c.day,e),...d})}},37712:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(35457).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},38510:(e,t,r)=>{"use strict";r.d(t,{Hg:()=>x,Qj:()=>a,WR:()=>o,Wr:()=>l,hr:()=>c,jA:()=>m,qv:()=>f,r0:()=>u,wS:()=>i});var s=r(14746);let a={available:"bg-success-soft text-success-foreground ring-1 ring-success-border",limited:"bg-warning-soft text-warning-foreground ring-1 ring-warning-border",waitlist:"bg-danger-soft text-danger-foreground ring-1 ring-danger-border",none:"bg-muted text-muted-foreground ring-1 ring-border",info:"bg-info-soft text-info-foreground ring-1 ring-info-border"},n={available:"text-success-foreground",limited:"text-warning-foreground",waitlist:"text-danger-foreground",none:"text-muted-foreground",info:"text-info-foreground"},i="bg-success",l="bg-success opacity-75",o={close:"bg-danger/50",minimize:"bg-warning/50",maximize:"bg-success/50",closeSolid:"bg-danger/70",minimizeSolid:"bg-warning/70",maximizeSolid:"bg-success/70"};function d({seats:e,isWaitlist:t=!1}){return t?"waitlist":null==e||0===e?"none":e>=4?"available":"limited"}function c({seats:e,isWaitlist:t=!1}){return a[d({seats:e,isWaitlist:t})]}function u(e){if("WL"===e)return a.waitlist;let t=Number.parseInt(e,10);return c({seats:Number.isFinite(t)?t:null})}function m(e,t){return n[d({seats:e,isWaitlist:t})]}function x(e){let t=(Date.now()-new Date(e).getTime())/36e5;return t<24?"bg-success":t<72?"bg-warning":t<24*s.ST?"bg-danger":"bg-muted-foreground/50"}let f={success:"rounded-full bg-success-soft px-2 py-0.5 text-[10px] font-semibold text-success-foreground ring-1 ring-success-border",warning:"rounded-full bg-warning-soft px-2 py-0.5 text-[10px] font-semibold text-warning-foreground ring-1 ring-warning-border",info:"rounded-full bg-info-soft px-2 py-0.5 text-[10px] font-semibold text-info-foreground ring-1 ring-info-border",danger:"rounded-full bg-danger-soft px-2 py-0.5 text-[10px] font-semibold text-danger-foreground ring-1 ring-danger-border",neutral:"rounded-full bg-muted px-2 py-0.5 text-[10px] font-semibold text-muted-foreground ring-1 ring-border"}},39058:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var s=r(600);let a="(min-width: 768px)";function n(e){let t=window.matchMedia(a);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function i(){return(0,s.useSyncExternalStore)(n,()=>window.matchMedia(a).matches?2:1,()=>1)}},39280:(e,t,r)=>{"use strict";r.d(t,{ExtensionNudge:()=>u});var s=r(48468),a=r(600),n=r(83075),i=r(58713),l=r(44258),o=r(46864),d=r(22324);let c="award-nudge-dismissed";function u(){let{isUnlimited:e}=(0,d.b)(),[t,r]=(0,a.useState)(!0);if((0,a.useEffect)(()=>{let e=window.requestAnimationFrame(()=>{r(function(){let e=localStorage.getItem(c);if(!e)return!1;let t=Number(e);return!Number.isNaN(t)&&Date.now()-t<6048e5}())});return()=>window.cancelAnimationFrame(e)},[]),!(!e&&!t))return null;let u="https://chromewebstore.google.com/detail/awardsh/eggmagjkhcjcpcjdhplkmckgemmgjfio";return(0,s.jsx)(n.Zp,{className:"border-brand/20 bg-brand/5",children:(0,s.jsxs)(n.Wu,{className:"flex items-start gap-3 py-4",children:[(0,s.jsx)(l.A,{className:"mt-0.5 size-5 shrink-0 text-brand"}),(0,s.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Help keep this data fresh"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Install the Award Chrome extension — your browsing contributes availability data and unlocks Contributor access."}),u&&(0,s.jsx)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block text-xs font-medium text-brand underline-offset-2 hover:underline",children:"Install extension →"})]}),(0,s.jsx)(i.$,{variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground",onClick:()=>{localStorage.setItem(c,String(Date.now())),r(!0)},"aria-label":"Dismiss",children:(0,s.jsx)(o.A,{className:"size-4"})})]})})}},44258:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(35457).A)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]])},44948:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});var s=r(48468),a=r(93466);function n({departure:e,arrival:t,offset:r,className:i}){let l=r??(0,a.Mq)(e??null,t??null);return l?(0,s.jsxs)("sup",{className:`ml-0.5 align-super text-[0.55em] font-medium text-warning-foreground ${i??""}`,title:`Arrives ${l} day${l>1?"s":""} later`,children:["+",l]}):null}},45833:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var s=r(48468),a=r(69699),n=r(44732);function i({flightNumbers:e,size:t=16}){let r=(0,n.n)(e);return(0,s.jsx)("span",{className:"inline-flex items-center gap-0.5",children:r.map(e=>(0,s.jsx)(a.default,{src:(0,n.x)(e),alt:e,width:t,height:t,style:{width:t,height:t},className:"shrink-0 rounded-full",unoptimized:!0},e))})}},50328:(e,t,r)=>{"use strict";r.d(t,{AM:()=>c,Wv:()=>u,hl:()=>m});var s=r(48468);r(600);var a=r(41703),n=r(34646),i=r(93791),l=r(17867),o=r(21154),d=r(41734);function c({...e}){return(0,s.jsx)(a.y,{"data-slot":"popover",...e})}function u({...e}){return(0,s.jsx)(n.W,{"data-slot":"popover-trigger",...e})}function m({className:e,align:t="center",alignOffset:r=0,side:a="bottom",sideOffset:n=4,...c}){return(0,s.jsx)(i.i,{children:(0,s.jsx)(l.U,{align:t,alignOffset:r,side:a,sideOffset:n,className:"isolate z-50",children:(0,s.jsx)(o.i,{"data-slot":"popover-content",className:(0,d.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground
1/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c})})})}},55987:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(35457).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},64961:(e,t,r)=>{"use strict";function s(e,t){r.e(6859).then(r.bind(r,26859)).then(({default:r})=>{r.capture(e,t)})}function a(e,t){s("feature_viewed",{feature:e,...t})}function n(e,t,r){s("feature_used",{feature:e,action:t,...r})}r.d(t,{W:()=>a,z:()=>n})},66280:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});var s=r(48468),a=r(44258),n=r(58713),i=r(41734);let l="https://chromewebstore.google.com/detail/awardsh/eggmagjkhcjcpcjdhplkmckgemmgjfio";function o({variant:e="inline",className:t}){return l?"card"===e?(0,s.jsxs)("div",{className:(0,i.cn)("mx-auto flex max-w-md flex-col items-center gap-2 rounded-xl border border-border/70 bg-muted/20 px-6 py-5 text-center",t),children:[(0,s.jsx)(a.A,{"aria-hidden":"true",className:"size-5 text-brand"}),(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Search it yourself, live"}),(0,s.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Install the award.sh Chrome extension to search live award availability yourself — every search also updates award.sh for everyone."}),(0,s.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:(0,i.cn)((0,n.r)({variant:"outline",size:"sm"}),"mt-1"),children:"Install extension"})]}):(0,s.jsxs)("p",{className:(0,i.cn)("text-xs leading-relaxed text-muted-foreground",t),children:["Don't want to wait? Search live award availability yourself with the award.sh Chrome extension — every search also updates award.sh for everyone."," ",(0,s.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-brand underline-offset-2 hover:underline",children:"Install extension"})]}):null}},74498:(e,t,r)=>{"use strict";function s(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${s}`}function a(e){return new Date(`${e}T00:00:00`)}function n(e,t){let r=t?.from?s(t.from):"",a=t?.to?s(t.to):"";return e.start&&e.end?r?{start:r!==e.start?r:a||r,end:"",complete:!1}:{start:"",end:"",complete:!1}:r?a&&a!==r?{start:r,end:a,complete:!0}:{start:r,end:"",complete:!1}:{start:"",end:"",complete:!1}}function i(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}r.d(t,{AS:()=>i,PL:()=>n,p_:()=>a})},83075:(e,t,r)=>{"use strict";r.d(t,{BT:()=>o,Wu:()=>d,ZB:()=>l,Zp:()=>n,aR:()=>i});var s=r(48468);r(600);var a=r(41734);function n({className:e,size:t="default",...r}){return(0,s.jsx)("div",{"data-slot":"card","data-size":t,className:(0,a.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...r})}function i({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...t})}function l({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...t})}function o({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...t})}function d({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-4 group-data-[size=sm]/card:px-3",e),...t})}},85200:(e,t,r)=>{Promise.resolve().then(r.bind(r,77527)),Promise.resolve().then(r.t.bind(r,25415,23)),Promise.resolve().then(r.t.bind(r,32544,23)),Promise.resolve().then(r.bind(r,39280)),Promise.resolve().then(r.bind(r,20925)),Promise.resolve().then(r.bind(r,19640)),Promise.resolve().then(r.bind(r,95502))},89932:(e,t,r)=>{"use strict";r.d(t,{IW:()=>u,Ig:()=>l,M0:()=>c,OB:()=>o,Yw:()=>m,fN:()=>f,vN:()=>d,xA:()=>x});var s=r(48468),a=r(47514),n=r(58713),i=r(41734);let l="h-12 w-full min-w-0 bg-transparent px-4 text-base font-medium text-foreground outline-none placeholder:text-muted-foreground
1/60",o="flex h-12 w-full min-w-0 cursor-pointer items-center gap-2 px-4 text-left text-base font-medium text-foreground outline-none hover:bg-muted/50 focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:ring-ring/50",d="max-h-[80vh] w-auto max-w-[calc(100vw-2rem)] overflow-auto p-0";function c({className:e,...t}){return(0,s.jsx)("div",{className:(0,i.cn)("flex flex-wrap items-center gap-2 pb-4",e),...t})}function u({className:e,children:t,...r}){return(0,s.jsx)("div",{className:(0,i.cn)("rounded-xl border border-border bg-background shadow-sm",e),...r,children:(0,s.jsx)("div",{className:"flex flex-col lg:flex-row",children:t})})}function m({label:e,children:t,grow:r=1,divider:a=!0,as:n="div",className:l}){return(0,s.jsxs)(n,{className:(0,i.cn)("min-w-0","label"===n&&"cursor-text",a&&"border-b border-border lg:border-b-0 lg:border-r",l),style:{flex:`${r} 1 0%`},children:[(0,s.jsx)("div",{className:"px-4 pb-1 pt-3",children:(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:e})}),t]})}function x({className:e,...t}){return(0,s.jsx)("div",{className:(0,i.cn)("flex flex-wrap items-center gap-3 pt-4",e),...t})}function f({children:e,className:t,...r}){return(0,s.jsxs)(n.$,{variant:"brand",size:"lg",className:(0,i.cn)("w-full gap-2 px-6 sm:w-auto",t),...r,children:[(0,s.jsx)(a.A,{className:"size-4"}),e]})}},90493:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var s=r(48468),a=r(14746),n=r(41734);function i({cabin:e,className:t,children:r}){return(0,s.jsx)("span",{className:(0,n.cn)("rounded-md px-1.5 py-0.5 text-[10px] font-semibold tracking-wide",t),style:(0,a.Cg)(e),children:r})}},91626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in s)Object.defineProperty(t,a,{enumerable:!0,get:s[a]});let n=r(1373),i=r(47605),l=r(33330)},95502:(e,t,r)=>{"use strict";r.d(t,{SearchClient:()=>X});var s=r(48468),a=r(600),n=r(45464),i=r(58713),l=r(83075),o=r(58252),d=r(10683),c=r(66280),u=r(89087),m=r(14746),x=r(93466),f=r(50676),g=r(33970),p=r(45833),h=r(44948),b=r(97841),v=r(89932),j=r(39058),N=r(74498),w=r(44732),y=r(69699),k=r(64961),S=r(91626);let C=(0,S.createServerReference)("7ece7c176ace453579d35053226fd16e9015c2b1c9",S.callServer,void 0,S.findSourceMapURL,"searchAvailability"),$=(0,S.createServerReference)("7f024ddb9d1a43c51845df1278a712f7a648a79571",S.callServer,void 0,S.findSourceMapURL,"searchRoundTripAvailability");function z(e,t){return(e??1/0)-(t??1/0)}let A={Y:0,W:1,J:2,F:3},D=(0,S.createServerReference)("7c5ab8b3ef75e670e34bb954a57ba02ff284ffc78e",S.callServer,void 0,S.findSourceMapURL,"getCalendarAvailability"),_=/^\d{4}-\d{2}-\d{2}$/;function M(e){if("string"!=typeof e||!_.test(e))return!1;let[t,r,s]=e.split("-").map(Number);return new Date(Date.UTC(t,r-1,s)).toISOString().slice(0,10)===e}let T=/^[A-Za-z]{3}$/;function F({origin:e,destination:t,departDate:r,returnDate:s,tripType:a}){return T.test(e)&&T.test(t)&&e.toUpperCase()!==t.toUpperCase()&&M(r)&&("ow"===a||M(s))}var W=r(41734),L=r(38510),P=r(35706),E=r(27803),R=r(50328),O=r(99544),I=r(86832),q=r(99610),U=r(47514),B=r(95671),H=r(37712);let V=new Set(["Y","W","J","F"]);function Y(e){if("string"!=typeof e)return null;let t=e.trim().toUpperCase();return V.has(t)?t:null}function Z({source:e,origin:t,destination:r,date:a,selectedCabin:n,fareCabin:i,className:l}){let o=function({source:e,origin:t,destination:r,date:s,selectedCabin:a,fareCabin:n}){let i=function(e,t){let r=Y(e);if(r)return r;for(let e of t?.split("/")??[]){let t=Y(e);if(t)return t}return null}(a,n);return i?(0,g.EC)(e,t,r,s,i):null}({source:e,origin:t,destination:r,date:a,selectedCabin:n,fareCabin:i});return o?(0,s.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:(0,W.cn)("text-xs font-medium text-brand underline-offset-2 hover:underline",l),children:[(0,g.PH)(e)," →"]}):null}let J="award-search-recent";function Q(){try{return JSON.parse(localStorage.getItem(J)||"[]")}catch{return[]}}function G(e,t){return t?"WL":`${e>=9?"9+":e} seat${1===e?"":"s"}`}function X({searchAction:e=C,roundTripSearchAction:t=$,calendarAction:r=D,initialToday:d=(0,x.X2)()}={}
1){let c=(0,n.useSearchParams)(),f=(0,n.useRouter)(),g=(0,n.usePathname)(),[p,h]=(0,a.useTransition)(),[w,y]=(0,a.useState)(c.get("from")||""),[S,z]=(0,a.useState)(c.get("to")||""),[A,_]=(0,a.useState)(c.get("depart")||""),[M,T]=(0,a.useState)(c.get("return")||""),[L,B]=(0,a.useState)(c.get("cabin")||"J"),[H,V]=(0,a.useState)(parseInt(c.get("pax")||"1",10)),[Y,Z]=(0,a.useState)(c.get("trip")||"ow"),[G,ee]=(0,a.useState)("1"===c.get("wl")),[et,er]=(0,a.useState)(null),[es,en]=(0,a.useState)(null),[ei,el]=(0,a.useState)(null),[eo,ed]=(0,a.useState)(!1),[ec,eu]=(0,a.useState)(null),[em,ex]=(0,a.useState)(null),[ef,eg]=(0,a.useState)(!1),[ep,eh]=(0,a.useState)(()=>(A||d).slice(0,7)),[eb,ev]=(0,a.useState)(!1),ej=(0,j.s)(),eN=(0,a.useRef)(!1),[ew,ey]=(0,a.useState)([]);(0,a.useEffect)(()=>{(0,k.W)("search");let e=window.requestAnimationFrame(()=>{ey(Q())});return()=>window.cancelAnimationFrame(e)},[]);let ek=(0,a.useCallback)(e=>{let t=new URLSearchParams(c.toString());for(let[r,s]of Object.entries(e))s?t.set(r,s):t.delete(r);f.replace(`${g}?${t.toString()}`,{scroll:!1})},[c,f,g]);function eS(){if(F({origin:w,destination:S,departDate:A,returnDate:M,tripType:Y})){var r;let s;(0,k.z)("search","search",{from:w,to:S,cabin:L,trip:Y}),r={from:w,to:S,cabin:L,trip:Y,depart:A||void 0,return:"rt"===Y&&M?M:void 0},(s=Q().filter(e=>e.from!==r.from||e.to!==r.to||e.cabin!==r.cabin||e.trip!==r.trip)).unshift(r),localStorage.setItem(J,JSON.stringify(s.slice(0,5))),ey(Q()),ek({from:w,to:S,depart:A,return:"rt"===Y?M:"",cabin:L,pax:String(H),trip:Y,wl:G?"1":""}),h(async()=>{try{if("rt"===Y&&M){let{outbound:e,returnLeg:r}=await t(w,S,A,M,L||void 0,H,G);if(e.limitExceeded||r.limitExceeded){ed(!0),eu(0);return}ed(!1);let s=e.remaining??r.remaining;null!==s&&eu(s),er(e),en(r)}else{let t=await e(w,S,A,L||void 0,H,G);if(t.limitExceeded){ed(!0),eu(0);return}ed(!1),null!==t.remaining&&eu(t.remaining),er(t),en(null)}el(null)}catch{el({message:"Search failed — check your connection and try again.",retry:"search"})}})}}function eC(){y(S),z(w)}function e$(e){let[t,s]=e.split("-").map(Number),a=`${e}-01`,n=`${t}-${String(s).padStart(2,"0")}-${new Date(t,s,0).getDate()}`;h(async()=>{try{let e=await r(w,S,a,n,L||void 0);ex(e),el(null)}catch{el({message:"Couldn't load the calendar — check your connection and try again.",retry:"calendar",month:e})}})}function ez(e,t,r){let s="return"===t?{origin:e.destination,destination:e.origin,returnDate:r,tripType:"rt"}:{origin:e.origin,destination:e.destination,departDate:r};y(s.origin),z(s.destination),s.tripType&&Z(s.tripType),s.departDate&&_(s.departDate),s.returnDate&&T(s.returnDate),eN.current=!0}(0,a.useEffect)(()=>{eN.current&&!eb&&(eN.current=!1,eS())},[eb,A,M,w,S]),(0,a.useEffect)(()=>{c.get("from")&&c.get("to")&&c.get("depart")&&eS()},[]);let eA=p||eo||!F({origin:w,destination:S,departDate:A,returnDate:M,tripType:Y}),eD=[!w&&"origin",!S&&"destination",!A&&"departure date","rt"===Y&&!M&&"return date"].filter(Boolean),e_=p||eo||!(eD.length>0)?null:`Add ${eD.join(", ")} to search.`,eM="rt"===Y?A&&M?`${(0,x.H6)(A)} - ${(0,x.H6)(M)}`:A?`${(0,x.H6)(A)} - Return`:"Pick dates":A?(0,x.H6)(A):"Pick a date",eT=!A;return(0,s.jsxs)("div",{className:"mx-auto max-w-screen-2xl px-4 py-6 sm:px-6",children:[(0,s.jsxs)("div",{className:"pb-8 pt-4 sm:pt-8",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-foreground sm:text-3xl",children:"Search award flights"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Community-sourced availability across all cabin classes."})]}),(0,s.jsxs)(v.M0,{children:[(0,s.jsxs)("select",{value:Y,onChange:e=>{let t=e.target.value;Z(t),"ow"===t&&T("")},className:b.c,"aria-label":"Trip type",children:[(0,s.jsx)("option",{value:"ow",children:"One way"}),(0,s.jsx)("option",{value:"rt",children:"Round trip"})]}),(0,s.jsx)("select",{value:H,onChange:e=>V(parseInt(e.target.value,10)),className:b.c,"aria-label":"Passengers",children:[1,2,3,4,5,6,7,8,9].map(e=>(0,s.jsxs)("option",{value:e,children:[e," Adult",e>1?"s":""]},e))}),(0,s.jsxs)("select",{value:L,onChange:e=>B(e.target.value),className:b.c,"aria-label":"Cabin class",children:[(0,s.jsx)("option",{value:"",children:"All cabins"}),m.hT.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,s.jsxs)("label",{className:"flex h-8 cursor-pointer items-center gap-1.5 rounded-full border border-border bg-background px-3 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:[(0,s.jsx)("input",{type:"checkbox",checked:G,onChange:e=>ee(e.target.checked),className:"size-3 rounded border-border accent-brand"}),"Waitlist"]})]}),(0,s.jsxs)(v.IW,{children:[(0,s.jsxs)(v.Yw,{label:"From",className:"relative",children:[(0,s.jsx)(u.C,{value:w,onChange:y,placeholder:"City or airport",label:"Origin",variant:"embedded",className:"w-full"}),(0,s.jsx)("button",{type:"button",onClick:eC,className:"absolute right-0 top-1/2 z-10 hidden -translate-y-1/2 translate-x-1/2 roun
1ded-full border border-border bg-background p-2 text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground lg:block","aria-label":"Swap origin and destination",children:(0,s.jsx)(O.A,{className:"size-4"})})]}),(0,s.jsx)("div",{className:"flex justify-center border-b border-border bg-muted/20 py-2 lg:hidden",children:(0,s.jsxs)(i.$,{type:"button",variant:"outline",size:"sm",onClick:eC,className:"gap-1.5 rounded-full text-xs text-muted-foreground",disabled:!w&&!S,children:[(0,s.jsx)(O.A,{className:"size-3.5"}),"Swap"]})}),(0,s.jsx)(v.Yw,{label:"To",children:(0,s.jsx)(u.C,{value:S,onChange:z,placeholder:"City or airport",label:"Destination",variant:"embedded",className:"w-full"})}),(0,s.jsx)(v.Yw,{label:"rt"===Y?"Dates":"Depart",divider:!1,children:(0,s.jsxs)(R.AM,{open:eb,onOpenChange:ev,children:[(0,s.jsxs)(R.Wv,{className:v.OB,children:[(0,s.jsx)(I.A,{className:"size-4 shrink-0 text-muted-foreground"}),(0,s.jsx)("span",{className:(0,W.cn)("min-w-0 truncate",eT&&"text-muted-foreground/60"),children:eM})]}),(0,s.jsx)(R.hl,{align:"start",className:v.vN,children:"rt"===Y?(0,s.jsx)(E.V,{mode:"range",selected:A?{from:(0,N.p_)(A),to:M?(0,N.p_)(M):void 0}:void 0,onSelect:e=>{let t=(0,N.PL)({start:A,end:M},e);_(t.start),T(t.end),t.complete&&(eN.current=!0,ev(!1))},disabled:{before:(0,N.p_)(d)},numberOfMonths:ej,defaultMonth:A?(0,N.p_)(A):void 0}):(0,s.jsx)(E.V,{mode:"single",selected:A?(0,N.p_)(A):void 0,onSelect:e=>{e&&(_((0,P.GP)(e,"yyyy-MM-dd")),eN.current=!0,ev(!1))},disabled:{before:(0,N.p_)(d)},defaultMonth:A?(0,N.p_)(A):void 0})})]})})]}),(0,s.jsxs)(v.xA,{children:[(0,s.jsx)(v.fN,{onClick:eS,disabled:eA,children:"Search flights"}),w&&S&&(0,s.jsxs)(i.$,{variant:"outline",size:"sm",onClick:function(){if(!w||!S)return;let e=!ef;eg(e),e&&e$(ep)},className:(0,W.cn)("gap-1.5 text-xs",ef?"border-brand/50 bg-brand/10 text-brand":"text-muted-foreground"),children:[(0,s.jsx)(I.A,{className:"size-3.5"}),"Calendar"]}),e_&&(0,s.jsx)("p",{className:"basis-full text-xs text-muted-foreground sm:basis-auto","aria-live":"polite",children:e_})]}),ew.length>0&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-3",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"Recent:"}),ew.map((e,t)=>(0,s.jsxs)(i.$,{variant:"ghost",size:"xs",onClick:()=>{y(e.from),z(e.to),B(e.cabin),e.trip&&Z(e.trip),e.depart&&_(e.depart),e.return?T(e.return):"ow"===e.trip&&T(""),e.depart&&(eN.current=!0)},className:"min-w-0 max-w-full shrink gap-1.5 rounded-full bg-muted/50 text-muted-foreground hover:bg-muted",children:[(0,s.jsx)(q.A,{className:"size-3"}),(0,s.jsxs)("span",{className:"shrink-0",children:[e.from," → ",e.to]}),e.depart&&(0,s.jsxs)("span",{className:"min-w-0 truncate text-muted-foreground/70",children:[(0,x.H6)(e.depart),"rt"===e.trip&&e.return&&` – ${(0,x.H6)(e.return)}`]})]},t)),(0,s.jsx)("button",{type:"button",onClick:()=>{localStorage.removeItem(J),ey([])},className:"text-xs text-muted-foreground/50 hover:text-muted-foreground",children:"Clear"})]}),null!=ec&&!eo&&Number.isFinite(ec)&&(0,s.jsxs)("p",{className:"pt-2 text-xs text-muted-foreground",children:[ec," search",1===ec?"":"es"," remaining today"]}),ei&&!p&&(0,s.jsx)(l.Zp,{className:"mt-4 border-danger-border bg-danger-soft",role:"alert",children:(0,s.jsxs)(l.Wu,{className:"flex flex-wrap items-center justify-between gap-3 py-4",children:[(0,s.jsx)("p",{className:"text-sm text-danger-foreground",children:ei.message}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>"calendar"===ei.retry?e$(ei.month??ep):eS(),children:"Try again"}),(0,s.jsx)(i.$,{variant:"ghost",size:"sm",onClick:()=>el(null),children:"Dismiss"})]})]})}),eo&&(0,s.jsx)(l.Zp,{className:"mt-4 border-warning-border bg-warning-soft",children:(0,s.jsxs)(l.Wu,{className:"flex flex-col items-center gap-3 py-6 text-center",children:[(0,s.jsx)(U.A,{className:"size-8 text-warning"}),(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Daily search limit reached"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Install the Chrome extension and contribute data to unlock renewable Contributor access with 20 searches per day and 365-day availability."}),(0,s.jsx)("a",{href:"https://chromewebstore.google.com/detail/awardsh/eggmagjkhcjcpcjdhplkmckgemmgjfio",target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-brand underline-offset-2 hover:underline",children:"Install extension →"})]})}),(0,s.jsx)("div",{className:"mt-6 space-y-6",children:ef?(0,s.jsx)(ea,{month:ep,data:em,loading:p,onNav:function(e){let[t,r]=ep.split("-").map(Number),s=new Date(t,r-1+e,1),a=`${s.getFullYear()}
1-${String(s.getMonth()+1).padStart(2,"0")}`;eh(a),e$(a)},onDateClick:function(e){_(e),eg(!1),eN.current=!0},today:d}):(0,s.jsxs)(s.Fragment,{children:[p&&(0,s.jsx)("div",{className:"space-y-2",children:[1,2,3].map(e=>(0,s.jsx)("div",{className:"rounded-xl border border-border/60 bg-background px-4 py-4 sm:px-6",children:(0,s.jsxs)("div",{className:"flex items-center gap-4 sm:gap-6",children:[(0,s.jsx)(o.E,{className:"hidden size-4 rounded-full sm:block"}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(o.E,{className:"h-4 w-28"}),(0,s.jsx)(o.E,{className:"h-3 w-16"})]}),(0,s.jsxs)("div",{className:"hidden space-y-2 sm:block",children:[(0,s.jsx)(o.E,{className:"h-4 w-20"}),(0,s.jsx)(o.E,{className:"h-3 w-14"})]}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsxs)("div",{className:"space-y-2 text-right",children:[(0,s.jsx)(o.E,{className:"ml-auto h-5 w-24"}),(0,s.jsx)(o.E,{className:"ml-auto h-3 w-16"})]})]})},e))}),et&&!p&&(0,s.jsx)(K,{response:et,minSeats:H,includeWaitlist:G,onDateClick:e=>ez(et,"outbound",e)}),es&&!p&&(0,s.jsx)(K,{response:es,minSeats:H,includeWaitlist:G,onDateClick:e=>ez(es,"return",e)})]})})]})}let K=(0,a.memo)(function({response:e,minSeats:t,includeWaitlist:r,onDateClick:n}){let{origin:o,destination:u,date:g,cabin:p,results:h,nearbyDates:b,routeExists:v,dateOutOfRange:j}=e,N=(0,f.To)(o).length>1||(0,f.To)(u).length>1,w=h.length>0?N?`${(0,f.Sz)(o)} to ${(0,f.Sz)(u)}`:`${h[0].originCity} to ${h[0].destinationCity}`:`${(0,f.y8)(o)} to ${(0,f.y8)(u)}`,y=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let r of e){let e=`${r.origin}:${r.destination}`,s=t.get(e);s||(s=[],t.set(e,s)),s.push(r)}return Array.from(t.values()).map(e=>({origin:e[0].origin,destination:e[0].destination,flights:function(e){let t=new Map;for(let i of e){var r,s,a,n;let e=`${i.origin}:${i.destination}:${i.flightNumbers}`,l=t.get(e);if(l){let e=l.flight;e.departureTime??=i.departureTime,e.arrivalTime??=i.arrivalTime,e.aircraftType??=i.aircraftType,r=e.reportedAt,e.reportedAt=r>=(s=i.reportedAt)?r:s}else l={flight:{origin:i.origin,destination:i.destination,flightNumbers:i.flightNumbers,departureTime:i.departureTime,arrivalTime:i.arrivalTime,aircraftType:i.aircraftType,stops:i.stops,programs:[],bestMiles:null,bestFare:null,reportedAt:i.reportedAt},programs:new Map},t.set(e,l);let o=l.programs.get(i.source);o?o.reportedAt=(a=o.reportedAt)>=(n=i.reportedAt)?a:n:(o={source:i.source,fares:[],bestMiles:null,bestFare:null,reportedAt:i.reportedAt},l.programs.set(i.source,o),l.flight.programs.push(o)),o.fares.push(i)}let i=Array.from(t.values(),e=>e.flight);for(let e of i){for(let t of e.programs){!function(e,t){let r=m.TQ[e];t.sort((e,t)=>{let s=(A[e.cabinClass]??99)-(A[t.cabinClass]??99);if(0!==s)return s;if(r){let s=r.indexOf(e.fareFamily||""),a=r.indexOf(t.fareFamily||""),n=(-1===s?999:s)-(-1===a?999:a);if(0!==n)return n}return z(e.miles,t.miles)})}(t.source,t.fares);let e=null,r=null;for(let s of t.fares)null!=s.miles&&(null==r||s.miles<r)&&(r=s.miles,e=s);t.bestMiles=r,t.bestFare=e??t.fares[0]??null}e.programs.sort((e,t)=>z(e.bestMiles,t.bestMiles));let t=null,r=null;for(let s of e.programs)for(let e of s.fares)null!=e.miles&&(null==r||e.miles<r)&&(r=e.miles,t=e);e.bestFare=t??e.programs[0]?.fares[0]??null,e.bestMiles=r}return i.sort((e,t)=>z(e.bestMiles,t.bestMiles))}(e)})).sort((e,t)=>z(e.flights[0]?.bestMiles??null,t.flights[0]?.bestMiles??null))})(h),[h]),k=(0,a.useMemo)(()=>y.reduce((e,t)=>e+t.flights.length,0),[y]);return 0===h.length?(0,s.jsx)(l.Zp,{children:(0,s.jsx)(l.Wu,{className:"py-8",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,s.jsx)(q.A,{className:"size-8 text-muted-foreground/40"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:j?`${(0,x.Yq)(g)} is beyond your plan's search window, so ${w} was not searched.`:`No availability data for ${w} on ${(0,x.Yq)(g)}.`}),!j&&b.length>0&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Data available on nearby dates:"}),(0,s.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:b.map(e=>(0,s.jsxs)(i.$,{variant:"outline",size:"xs",onClick:()=>n(e.date),className:"rounded-full",children:[(0,x.Yq)(e.date)," ",(0,s.jsxs)("span",{className:"text-muted-foreground",children:["(",e.count,")"]})]},e.date))})]}),!j&&v&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"This route exists in our database — try a different date."}),!j&&(0,f.Zk)(o)&&(0,f.Zk)(u)&&o!==u&&(0,s.jsx)("div",{className:"w-full max-w-xl",children:(0,s.jsx)(d.AvailabilityAlertForm,{kind:"flight",origin:o,destination:u,defaultCabinClass:p,defaultDateFrom:g,defaultDateTo:g,defaultMinSeats:t,defaultIncludeWaitlist:r,lockCriteria:!0})}),(0,s.jsx)(c.L,{variant:"inline",className:"max-w-xl"})]})})}):(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-baseline sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[(0,s.jsx)("h2",{className:"min-w-0 text-sm font-semibold text-foreground",children:w}),(0,s.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:(0,x.Yq)(g)})]}),(0,s.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:[k," flight",1!==k?"s":""]})]}),y.map(e=>(0,s.jsxs)("div",{className:"space-y-2",children:[y.length>1&&(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5 pt-2",children:[(0,s.jsxs)("h3",{className:"text-xs font-semibold text-foreground",children:[(0,f.y8)(e.origin)," (",e.origin,") →"," ",(0,f.y8)(e.destination)," (",e.destination,")"]}),(0,s.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:[e.flights.length," flight",1!==e.flights.length?"s":""]})]}),e.flights.map(e=>(0,s.jsx)(ee,{flight:e,date:g,cabin:p},`${e.origin}:${e.destination}:${e.flightNumbers}`))]},`${e.origin}:${e.destination}`))]})}),ee=(0,a.memo)(function({flight:e,date:t,cabin:r}){var a,n;let i=e.bestFare,l=!r,o=[e.flightNumbers,0===e.stops?"Non-stop":`${e.stops} stop${e.stops>1?"s":""}
1`].filter(Boolean).join(" \xb7 ");return(0,s.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border bg-background shadow-[0_1px_2px_rgba(0,0,0,0.04)] transition-colors hover:border-foreground/20",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 sm:gap-5 sm:px-5 sm:py-4",children:[(0,s.jsx)("div",{className:"hidden w-14 shrink-0 overflow-hidden sm:block",children:(0,s.jsx)(p.D,{flightNumbers:e.flightNumbers,size:26})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"text-[15px] font-semibold tabular-nums tracking-tight text-foreground",children:[(0,x.fU)(e.departureTime)," – ",(0,x.fU)(e.arrivalTime),(0,s.jsx)(h.V,{departure:e.departureTime,arrival:e.arrivalTime})]}),(0,s.jsx)("div",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:o})]}),i&&(0,s.jsxs)("div",{className:"shrink-0 text-right",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-end gap-1 text-[17px] font-bold tabular-nums tracking-tight text-foreground",children:[null!=i.miles?(0,x.Cq)(i.miles):"--",(0,s.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"miles"})]}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center justify-end gap-1.5 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:["cheapest \xb7 ",(0,s.jsx)("span",{className:"font-medium text-foreground/70",children:(a=i.source,m.rV[a]||a)})]}),(0,s.jsx)("span",{className:`size-1.5 rounded-full ${(n=i.reportedAt,(0,L.Hg)(n))}`,role:"img","aria-label":`Reported ${(0,x.fF)(i.reportedAt)}`,title:`Reported ${(0,x.fF)(i.reportedAt)}`})]})]})]}),(0,s.jsx)("div",{className:"divide-y divide-border/50 border-t border-border/70",children:e.programs.map(a=>(0,s.jsx)(et,{program:a,flight:e,date:t,cabin:r,showCabin:l,bestFare:i},a.source))})]})});function et({program:e,flight:t,date:r,cabin:a,showCabin:n,bestFare:i}){var l;return(0,s.jsxs)("div",{className:"group flex flex-col gap-1.5 px-4 py-3 transition-colors hover:bg-muted/40 sm:flex-row sm:items-center sm:gap-3 sm:px-5",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2 sm:w-44",children:[(0,s.jsx)(y.default,{src:(0,w.x)(e.source),alt:e.source,width:18,height:18,className:"size-[18px] shrink-0 rounded-full",unoptimized:!0}),(0,s.jsxs)("span",{className:"truncate text-[13px]",children:[(0,s.jsx)("span",{className:"font-semibold text-foreground",children:e.source})," ",(0,s.jsx)("span",{className:"text-muted-foreground",children:(l=e.source,m.rV[l]||l)})]})]}),(0,s.jsx)("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:e.fares.map((e,t)=>{var r,l;return(0,s.jsx)(es,{fare:e,highlight:e===i,showCabin:n||(r=a||void 0,l=e.cabinClass,!Y(r)||!!l?.includes("/"))},`${e.cabinClass}-${e.fareFamily}-${t}`)})}),(0,s.jsx)(Z,{source:e.source,origin:t.origin,destination:t.destination,date:r,selectedCabin:a||void 0,fareCabin:e.bestFare?.cabinClass,className:"shrink-0 self-start text-muted-foreground hover:text-brand sm:ml-auto sm:self-auto"})]})}let er={Y:"text-cabin-economy-foreground",W:"text-cabin-premium-foreground",J:"text-cabin-business-foreground",F:"text-cabin-first-foreground"};function es({fare:e,highlight:t,showCabin:r}){var a,n,i;return(0,s.jsxs)("span",{className:(0,W.cn)("inline-flex items-baseline gap-1.5 rounded-lg px-2.5 py-1",t?"bg-brand/10 ring-1 ring-brand/25":"bg-muted"),children:[r&&(0,s.jsx)("span",{className:(0,W.cn)("text-[10px] font-bold uppercase",er[e.cabinClass]||"text-muted-foreground"),title:m.ac[e.cabinClass]||e.cabinClass,children:e.cabinClass}),(0,s.jsx)("span",{className:(0,W.cn)("text-[13px] font-semibold tabular-nums",t?"text-brand":"text-foreground"),children:null!=e.miles?(0,x.Cq)(e.miles):"--"}),e.fareFamily&&(0,s.jsx)("span",{className:(0,W.cn)("inline-block max-w-24 truncate text-[11px]",t?"text-brand/80":"text-muted-foreground"),children:e.fareFamily}),(0,s.jsxs)("span",{className:(0,W.cn)("text-[11px] font-medium",(a=e.seatsAvailable,n=e.isWaitlist,(0,L.jA)(a,n))),title:G(e.seatsAvailable,e.isWaitlist),children:[(0,s.jsx)("span",{"aria-hidden":!0,
1children:(i=e.seatsAvailable,e.isWaitlist?"WL":i>=9?"9+":String(i))}),(0,s.jsx)("span",{className:"sr-only",children:G(e.seatsAvailable,e.isWaitlist)})]})]})}let ea=(0,a.memo)(function({month:e,data:t,loading:r,onNav:a,onDateClick:n,today:d}){let[c,u]=e.split("-").map(Number),m=new Date(c,u-1,1).getDay(),f=new Date(c,u,0).getDate(),g=new Date(c,u-1).toLocaleDateString("en-GB",{month:"long",year:"numeric"}),p=new Map;if(t)for(let e of t){let t=p.get(e.date);t?(t.seats+=e.totalSeats,null!=e.minMiles&&(null==t.minMiles||e.minMiles<t.minMiles)&&(t.minMiles=e.minMiles)):p.set(e.date,{minMiles:e.minMiles,seats:e.totalSeats})}let h=1/0;for(let e of p.values())null!=e.minMiles&&e.minMiles<h&&(h=e.minMiles);return(0,s.jsx)(l.Zp,{className:"border-border/60",children:(0,s.jsx)(l.Wu,{className:"pt-6",children:(0,s.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between pb-3",children:[(0,s.jsx)(i.$,{variant:"outline",size:"icon",className:"size-9",onClick:()=>a(-1),"aria-label":"Previous month",children:(0,s.jsx)(B.A,{className:"size-4"})}),(0,s.jsx)("span",{className:"text-base font-semibold text-foreground",children:g}),(0,s.jsx)(i.$,{variant:"outline",size:"icon",className:"size-9",onClick:()=>a(1),"aria-label":"Next month",children:(0,s.jsx)(H.A,{className:"size-4"})})]}
1),r?(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsx)("div",{className:"grid grid-cols-7 text-center",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map(e=>(0,s.jsx)("div",{className:"py-2 text-xs font-medium text-muted-foreground",children:e},e))}),(0,s.jsx)("div",{className:"grid grid-cols-7 gap-1",children:Array.from({length:35}).map((e,t)=>(0,s.jsx)(o.E,{className:"h-14 w-full rounded-lg sm:h-16"},t))})]}):(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsx)("div",{className:"grid grid-cols-7 text-center",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map(e=>(0,s.jsx)("div",{className:"py-2 text-xs font-medium text-muted-foreground",children:e},e))}),(0,s.jsxs)("div",{className:"grid grid-cols-7 gap-1",children:[Array.from({length:m}).map((e,t)=>(0,s.jsx)("div",{},`empty-${t}`)),Array.from({length:f}).map((t,r)=>{let a=r+1,i=`${e}-${String(a).padStart(2,"0")}`,l=p.get(i),o=i<d,c=l?.minMiles!=null&&l.minMiles<=1.05*h;return(0,s.jsxs)("button",{disabled:o||!l,onClick:()=>l&&n(i),className:(0,W.cn)("flex h-14 w-full flex-col items-center justify-center gap-1 rounded-lg transition-colors sm:h-16",o?"cursor-default text-muted-foreground/30":l?"cursor-pointer hover:bg-accent":"cursor-default text-muted-foreground/40"),children:[(0,s.jsx)("span",{className:(0,W.cn)("text-sm leading-none",l&&!o&&"font-semibold text-foreground"),children:a}),l&&(0,s.jsx)("span",{className:(0,W.cn)("text-[11px] font-semibold leading-none tabular-nums",o?"text-muted-foreground/30":c?"text-success-foreground":"text-muted-foreground"),children:null!=l.minMiles?(0,x.Cq)(l.minMiles):`${l.seats>=9?"9+":l.seats} seats`})]},a)})]})]})]})})})})},95671:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(35457).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},97841:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});let s="h-8 cursor-pointer appearance-none rounded-full border border-border bg-background bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%209%206%206%206-6%22%2F%3E%3C%2Fsvg%3E')] bg-[length:12px_12px] bg-[position:right_8px_center] bg-no-repeat pl-3 pr-7 text-xs font-medium text-foreground transition-colors hover:bg-muted focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50"},99544:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(35457).A)("arrow-left-right",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]])},99610:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(35457).A)("plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]])}},e=>{e.O(0,[4077,2698,5415,3023,2544,5831,888,9884,8919,4436,1365,7133,4051,7026,8216,9087,6582,1238,7660,7358],()=>e(e.s=85200)),_N_E=e.O()}]);

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.