(globalThis.TURBOPACK_remote_chunk_loading_global_prj_Ea8QNpCs22Ye85AIRZ6hT1aa8n7z||(globalThis.TURBOPACK_remote_chunk_loading_global_prj_Ea8QNpCs22Ye85AIRZ6hT1aa8n7z=[])).push(["object"==typeof document?document.currentScript:void 0,38049,e=>{"use strict";var t=e.i(43476),a=e.i(71645),i=e.i(64053),n=e.i(65117),r=e.i(43491),s=e.i(55294),o=e.i(67461),l=e.i(35120),c=e.i(53297),d=e.i(43480),u=e.i(12901),h=e.i(96095),f=e.i(52236),p=e.i(30086),g=e.i(75335),m=e.i(82879),x=e.i(90012),b=e.i(57688),y=e.i(42674),w=e.i(55529),v=e.i(25393),N=e.i(61110),k=e.i(58785),S=e.i(26320),P=e.i(9875),_=e.i(86536),M=e.i(77705),j=e.i(70756),A=e.i(63488),C=e.i(84614),E=e.i(27833),I=e.i(11970),T=e.i(90027),O=e.i(75787);let L=(0,e.i(75254).default)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);var G=e.i(67795);let R={risk:L,weather:p.CloudRain,gate:O.DoorOpen,layover:p.Timer},F={success:{chip:"bg-success-subtle text-fg-success",icon:"text-fg-success"},neutral:{chip:"bg-surface-muted text-fg",icon:"text-fg-secondary"},interactive:{chip:"bg-interactive-subtle text-fg-interactive",icon:"text-fg-interactive"}},U=e=>({animationDelay:`${90*e}ms`});function z(){let{ghost:e,current:a,next:i}=r.SIGN_UP_FAN,n=[i.chips.slice(0,2),i.chips.slice(2)];return(0,t.jsxs)("div",{"aria-hidden":"true",className:"relative mx-auto h-66 w-87 max-w-full",children:[(0,t.jsx)("div",{className:"absolute top-39 left-6 h-37.5 w-75 animate-fan-in rounded-full bg-interactive/12 blur-3xl",style:U(2)}),(0,t.jsxs)("div",{className:"absolute top-0 left-11 flex w-67.5 rotate-6 animate-fan-in items-center gap-2.5 rounded-card border border-subtle bg-surface p-3.5 opacity-55",style:U(0),children:[(0,t.jsx)("span",{className:"flex size-7.5 items-center justify-center rounded-control bg-surface-muted text-fg-interactive",children:(0,t.jsx)(p.Plus,{className:"size-3.75"})}),(0,t.jsx)("span",{className:"text-body-strong text-fg-secondary",children:e})]}),(0,t.jsx)("div",{className:"absolute top-12 left-4.5 flex w-75 -rotate-3 animate-fan-in items-center gap-2.5 rounded-card border border-subtle bg-surface px-3.5 py-3 shadow-card-lift",style:U(1),children:(0,t.jsx)(D,{flight:a})}),(0,t.jsxs)("div",{className:"absolute top-31 left-3.5 flex w-80 animate-fan-in flex-col gap-3 rounded-card border border-interactive bg-surface p-3.5 shadow-glow-selected",style:U(2),children:[(0,t.jsxs)("span",{className:"absolute -top-3 left-3.5 flex items-center gap-1.25 rounded-full bg-interactive px-2.5 py-1 text-overline-strong text-fg-on-interactive",children:[(0,t.jsx)(p.Plus,{className:"size-2.75",strokeWidth:3}),i.tag]}),(0,t.jsx)("div",{className:"flex items-center gap-2.5 pt-1.5",children:(0,t.jsx)(D,{flight:i.flight})}),(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:n.map((e,a)=>(0,t.jsx)("div",{className:"flex gap-1.5",children:e.map(({icon:e,tone:a,label:i})=>{let n=R[e];return(0,t.jsxs)("span",{className:(0,f.cn)("flex items-center gap-1.5 rounded-full px-2.5 py-1.5 text-label font-semibold",F[a].chip),children:[(0,t.jsx)(n,{className:(0,f.cn)("size-3",F[a].icon)}),i]},i)})},a))})]})]})}function D({flight:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(G.default,{iata:e.airlineIata,size:30}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.25 text-body-strong",children:[e.from,(0,t.jsx)(p.PlaneGlyph,{size:13}),e.to]}),(0,t.jsx)("span",{className:"truncate text-caption text-fg-secondary",children:e.meta})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1.25 rounded-full bg-success-subtle px-2 py-0.75 text-caption font-semibold text-fg-success",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),e.status]})]})}function B(){return(0,t.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"size-4.5 fill-current",children:(0,t.jsx)("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})})}function Y(){return(0,t.jsxs)("svg",{viewBox:"0 0 48 48","aria-hidden":"true",className:"size-4.5",children:[(0,t.jsx)("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),(0,t.jsx)("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"})]})}var W=e.i(74271),H=e.i(94966),$=e.i(28679),K=e.i(64720),V=e.i(32193),q=e.i(6256),X=e.i(57748),Z=e.i(8116),J=e.i(8150),Q=e.i(30250),ee=e.i(98612),et=e.i(3458);let ea={paddingBottom:"var(--tour-bottom)"},ei={radar:"radar",turbulence:"turbulence",icing:"icing",wind:"wind","echo-tops":null,"aviation-alerts":null,"15-day-forecast":null,lightning:null},en=n.MAP_LAYERS.map(e=>({...e,layerIds:[]}));function er({kind:e="primary",label:a,onClick:i,href:n,testId:r}){let s=(0,f.cn)("flex w-full shrink-0 press-97 items-center justify-center rounded-button px-4 text-card-title whitespace-nowrap focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none","primary"===e?"h-12.5 bg-interactive font-bold text-fg-on-interactive hover:bg-interactive-hover":"secondary"===e?"h-12.5 border-[1.5px] border-strong bg-surface font-bold text-fg hover-ring":"h-11 font-semibold text-fg-secondary hover:text-fg");return n?(0,t.jsx)("a",{href:n,"data-testid":r,className:s,children:a}):(0,t.jsx)("button",{type:"button","data-testid":r,onClick:i,className:s,children:a})}function es({dispatch:e}){return(0,t.jsx)("button",{type:"button","data-testid":"walkthrough-skip",onClick:()=>e({type:"skip"}),"aria-label":"Skip the tour",className:"press-95 self-center rounded-tile px-3 py-1.5 text-body-sm font-semibold text-fg-secondary hover:text-fg focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none",children:n.SKIP})}function eo({title:e,sub:a}){return(0,t.jsxs)("div",{className:"mb-1 flex flex-col gap-1.5",children:[(0,t.jsx)("h2",{className:"text-tour-title text-balance whitespace-pre-line text-fg",children:e}),a&&(0,t.jsx)("p",{className:"text-tour-lead text-fg-secondary",children:a})]})}function el({children:e,footer:a,scrollRef:i,onScroll:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{ref:i,onScroll:n,className:"relative scrollbar-none min-h-0 flex-1 overflow-y-auto",children:(0,t.jsx)("div",{className:(0,f.cn)("flex flex-col gap-stack px-4 pt-4",a&&"pb-6"),style:a?void 0:ea,children:e})}),a&&(0,t.jsxs)("div",{className:"relative flex flex-col gap-1.5 bg-canvas px-4 pt-2.5",style:ea,children:[(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 -top-6 h-6 bg-linear-to-b from-transparent to-canvas"}),a]})]})}function ec({dispatch:e,signInHref:a}){return(0,t.jsxs)("div",{className:"relative flex flex-1 flex-col justify-end",children:[(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(to bottom, color-mix(in srgb, var(--color-canvas) 85%, transparent) 0%, transparent 16%, transparent 34%, var(--color-canvas) 60%)"}}),(0,t.jsxs)("div",{className:"pointer-events-auto relative px-6",style:ea,children:[(0,t.jsxs)("div",{className:"mb-3.5 flex items-center gap-2.25",children:[(0,t.jsx)(b.default,{src:(0,P.withBase)("/brand/the-weather-channel.svg"),alt:"",width:26,height:26,unoptimized:!0,loading:"eager",className:"size-6.5 shrink-0 rounded-inner"}),(0,t.jsxs)("span",{className:"text-body-sm text-fg-secondary",children:[n.WELCOME.brand," ",(0,t.jsx)("span",{className:"font-bold text-fg",children:n.WELCOME.product})]})]}),(0,t.jsx)("h2",{className:"mb-3 text-tour-hero text-balance text-fg",children:n.WELCOME.hero}),(0,t.jsx)("p",{className:"mb-4 text-tour-lead text-fg-secondary",children:n.WELCOME.lead}),(0,t.jsxs)("div",{className:"border-t border-subtle pt-3 pb-4.5",children:[(0,t.jsx)("p",{className:"text-body-strong text-fg",children:n.WELCOME.proof}),(0,t.jsx)("p",{className:"mt-0.75 text-caption text-fg-tertiary",children:n.WELCOME.proofSource})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(er,{label:n.WELCOME.start,testId:"walkthrough-start",onClick:()=>e({type:"go",to:"flight"})}),a&&(0,t.jsx)(er,{kind:"ghost",label:n.WELCOME.signIn,...I.DIRECT_SIGN_IN?{onClick:()=>e({type:"go",to:"add"})}:{href:a},testId:"walkthrough-sign-in"})]})]})]})}let ed=e=>getComputedStyle(document.documentElement).getPropertyValue(e).trim()||"ease";function eu({text:e,show:a}){return(0,t.jsxs)("span",{role:"note",className:(0,f.cn)("pointer-events-none absolute -top-4 left-4 z-10 rounded-full bg-interactive px-3 py-1.5 text-label font-semibold whitespace-nowrap text-fg-on-interactive shadow-floating transition-[opacity,translate] duration-base",a?"opacity-100 ease-arrive":"translate-y-2.5 opacity-0 ease-depart"),children:[e,(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute -bottom-1 left-5 size-2.5 rotate-45 rounded-[2px] bg-interactive"})]})}function eh({dispatch:e,now:i}){let r=(0,S.useUnits)(),s=(0,a.useMemo)(()=>{let e=(0,y.sampleFlight)(i),t=e=>{let t=(0,y.sampleFlightAt)(i,e);return{overview:(0,w.flightOverview)(t,(0,y.sampleStageNow)(i,e)),inFlight:(0,y.sampleInFlight)(i,e,r)}};return{flight:e,stages:{"pre-flight":t("pre-flight"),"en-route":t("en-route"),landing:t("landing")},risk:(0,y.sampleDelayRisk)(i),route:(0,y.sampleRouteWeather)(i),ends:(0,y.sampleEndpoints)(i),leaveBy:(0,y.sampleLeaveBy)(i,r),timetable:(0,y.sampleTimetable)(i),arrival:(0,y.sampleArrivalStrip)(i),timezone:(0,y.sampleTimezone)(i)}},[i,r]),[o,l]=(0,a.useState)(0),[c,d]=(0,a.useState)({stage:0,dir:1,switched:!1}),u=n.TRIP_STAGES[c.stage],h=(0,a.useRef)(null),g=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(o===c.stage)return;let e=o>c.stage?1:-1,t=()=>{h.current&&(h.current.scrollTop=0),d({stage:o,dir:e,switched:!0})},a=g.current;if(!a||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t();let i=a.animate([{opacity:1,transform:"none"},{opacity:0,transform:`translateX(${-24*e}px)`}],{duration:n.STAGE_MOTION.out,easing:ed("--ease-depart"),fill:"forwards"});return i.onfinish=t,()=>{i.onfinish=null}},[o,c.stage]);let[m,x]=(0,a.useState)(new Map);(0,a.useLayoutEffect)(()=>{let e=h.current,t=[...g.current?.querySelectorAll("[data-stage-card]")??[]];if(!e)return;let a=e.getBoundingClientRect(),i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,r=new Map;t.forEach((e,t)=>{let s;(i||((s=e.getBoundingClientRect()).height?Math.max(0,Math.min(s.bottom,a.bottom)-Math.max(s.top,a.top))/s.height:0)>=n.STAGE_REVEAL_AT)&&r.set(t,"in")}),x(r);let s=new IntersectionObserver(e=>{let a=e.filter(e=>e.intersectionRatio>=n.STAGE_REVEAL_AT).map(e=>t.indexOf(e.target));if(a.length){for(let e of a)s.unobserve(t[e]);x(e=>{let t=new Map(e);for(let e of a)t.has(e)||t.set(e,"rise");return t})}},{root:e,threshold:n.STAGE_REVEAL_AT});return t.forEach((e,t)=>{r.has(t)||s.observe(e)}),()=>s.disconnect()},[c.stage]);let[b,P]=(0,a.useState)(null),_=(0,a.useRef)("mouse"),M=(0,a.useRef)(null);return(0,a.useEffect)(()=>P(null),[c.stage]),(0,t.jsxs)(el,{scrollRef:h,footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(er,{label:"See it on the map",testId:"walkthrough-next",onClick:()=>e({type:"go",to:"map"})}),(0,t.jsx)(es,{dispatch:e})]}),children:[(0,t.jsx)("div",{className:"sticky top-0 z-20 -mx-4 bg-canvas px-4 py-2",children:(0,t.jsxs)("div",{role:"tablist","aria-label":"Stages of the trip",className:(0,f.cn)(W.segmentTrack,"relative"),children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute inset-y-0.75 left-0.75 rounded-full bg-surface shadow-sm transition-transform duration-deliberate ease-spring",style:{width:`calc((100% - 6px) / ${n.TRIP_STAGES.length})`,transform:`translateX(${100*o}%)`}}),n.TRIP_STAGES.map((e,a)=>{let i=a===o;return(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":i,"data-testid":`walkthrough-stage-${e.id}`,onClick:()=>l(a),className:(0,f.cn)(W.segmentItem,"relative transition-colors duration-slow",i?"text-fg":"text-fg-secondary hover:text-fg"),children:e.label},e.id)})]})}),(0,t.jsxs)("div",{ref:g,role:"tabpanel","aria-label":u.label,className:(0,f.cn)("flex flex-col gap-6",c.switched&&"animate-step-in"),style:{"--step-dir":c.dir},children:[(0,t.jsx)(eo,{title:u.title,sub:u.description}),u.cards.map(({card:e,tip:a},i)=>{let o=m.get(i);return(0,t.jsxs)("div",{"data-stage-card":i,onPointerDown:e=>_.current=e.pointerType,onPointerEnter:e=>{"touch"!==e.pointerType&&P(i)},onPointerLeave:e=>{"touch"!==e.pointerType&&P(e=>e===i?null:e)},onClick:()=>{"touch"===_.current&&P(e=>e===i?null:i)},onFocus:e=>{e.target.matches(":focus-visible")&&(M.current=i,P(i))},onBlur:()=>{M.current===i&&(M.current=null,P(e=>e===i?null:e))},className:(0,f.cn)("relative","rise"===o&&"animate-rise",!o&&"opacity-0"),children:[(0,t.jsx)(eu,{text:a,show:b===i}),((e,a)=>{let{flight:i,ends:o,leaveBy:l,arrival:c,timezone:d}=s;switch(e){case"flight":{let{overview:e,inFlight:i}=s.stages[a];return(0,t.jsx)(H.default,{overview:e,inFlight:i,distance:(0,k.formatMiles)(e.miles,r)})}case"risk":return(0,t.jsx)($.default,{...s.risk,updated:n.SAMPLE_FLIGHT_STEP.updated});case"route":return(0,t.jsx)(X.default,{result:s.route,originCode:"BOS",destinationCode:"ORD",originTz:i.origin.timezone,destinationTz:i.destination.timezone,takeoff:o.takeoff,landing:o.landing,progressPct:null,units:r});case"leaveBy":return l&&(0,t.jsx)(q.default,{...l,steps:l.steps.map(e=>({...e,icon:V.LEAVE_BY_ICON[e.icon]}))});case"winds":return(0,t.jsx)(Q.default,{summary:(0,v.windsAloftView)(y.SAMPLE_WINDS_ALOFT,r)});case"timezone":return d&&(0,t.jsx)(J.default,{lines:(0,N.timezoneLines)(d,"BOS","ORD")});case"arrival":return c&&(0,t.jsx)(K.default,{title:"Arrival weather",icon:p.PlaneLanding,place:c.place,verdict:c.verdict,category:c.category,hours:c.hours,markerIndex:c.markerIndex,markerLabel:c.markerLabel});case"timetable":return(0,t.jsx)(Z.default,{title:"Detailed Timetable",...s.timetable})}})(e,u.id)]},e)})]},c.stage)]})}function ef({state:e,dispatch:i,onPanelHeight:r}){let s=(0,S.useUnits)(),o=e.layer,l=o?(0,n.layerCopy)(o,(0,k.formatFeet)(y.SAMPLE_CRUISE_FT,s)):null,c=o?ei[o]:null,[d,u]=(0,a.useState)(()=>null===e.layer?"showcase":"done"),h=(0,a.useRef)(null),f=(0,a.useRef)(null),g=(0,a.useRef)(null),m=(0,a.useRef)([]),x=(0,a.useRef)([]),b=()=>{m.current.forEach(clearTimeout),m.current=[]};(0,a.useEffect)(()=>{"done"===d&&h.current?.querySelector('[aria-pressed="true"]')?.scrollIntoView({block:"nearest",inline:"center",behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})},[o,d]),(0,a.useLayoutEffect)(()=>{g.current&&r(Math.round(g.current.offsetHeight))},[]);let w=e=>{let t=g.current,a=t?.offsetHeight??0;u("done"),i({type:"layer",layer:e}),requestAnimationFrame(()=>{if(!t)return;let e=t.offsetHeight;r(e),window.matchMedia("(prefers-reduced-motion: reduce)").matches||2>Math.abs(e-a)||t.animate([{height:`${a}px`},{height:`${e}px`}],{duration:n.MAP_INTRO_TIMING.panel,easing:ed("--ease-sheet")})})},v=e=>{b(),x.current.forEach(e=>e.cancel()),x.current=[],w(e)},N=()=>{b();let e=n.MAP_INTRO_TIMING;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||!f.current||!h.current)return v(n.MAP_OPENS_ON);let t=[...h.current.querySelectorAll("button[aria-pressed]")],a=[...f.current.querySelectorAll("[data-showcase-chip]")],i=ed("--ease-depart"),r=ed("--ease-arrive");x.current=[...a.map((t,a)=>t.animate([{opacity:1},{opacity:0}],{duration:e.out,delay:a*e.stagger,easing:i,fill:"forwards"})),...t.map((t,a)=>t.animate([{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:e.in,delay:a*e.stagger,easing:r,fill:"backwards"}))],u("handoff"),m.current.push(window.setTimeout(()=>w(n.MAP_OPENS_ON),e.in))};(0,a.useEffect)(()=>{if("showcase"!==d)return;let e=n.MAP_INTRO_TIMING,t=window.matchMedia("(prefers-reduced-motion: reduce)").matches,a=[...f.current?.querySelectorAll("[data-showcase-chip]")??[]];t||a.forEach((t,a)=>t.animate([{opacity:0,transform:"scale(0.6)"},{opacity:1,transform:"none"}],{duration:e.pop,delay:a*e.popStagger,easing:ed("--ease-spring"),fill:"backwards"}));let i=a.length*e.popStagger+e.pop;return m.current.push(window.setTimeout(N,t?e.hold:i+e.hold)),b},[]);let P="done"!==d;return(0,t.jsxs)("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[(0,t.jsx)("div",{ref:h,className:"showcase"===d?"invisible":void 0,children:(0,t.jsx)(ee.LayersPillRow,{variant:"flint",pills:en,activePillIds:new Set(o?[o]:[]),onToggle:e=>"done"===d?i({type:"layer",layer:e}):v(e),className:"px-3 py-1"})}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)("div",{ref:g,"data-testid":"walkthrough-map-panel",className:"pointer-events-auto overflow-hidden rounded-t-sheet border-t border-subtle bg-surface-floating/90 shadow-floating backdrop-blur-xl",style:{...ea,...P?{height:"50%"}:{}},children:(0,t.jsxs)("div",{className:"flex flex-col gap-stack px-4.5 pt-4.5",children:[(0,t.jsxs)("div",{className:"flex animate-fade-in flex-col gap-1",children:[(0,t.jsx)("h2",{className:"text-sheet-title text-fg",children:l?.title??n.MAP_INTRO.title}),(0,t.jsx)("p",{className:"text-body text-fg-secondary",children:l?.body??n.MAP_INTRO.body})]},P?"intro":o??"none"),P?(0,t.jsx)("div",{ref:f,role:"group","aria-label":"Weather layers",className:"flex flex-wrap gap-2.5 pt-1",children:n.MAP_LAYERS.map(e=>(0,t.jsx)("button",{type:"button","data-showcase-chip":!0,"data-testid":`walkthrough-showcase-${e.id}`,onClick:()=>v(e.id),className:"flex h-10 items-center rounded-full border border-subtle bg-surface px-4 text-body-strong whitespace-nowrap text-fg press-95 focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none",children:e.label},e.id))}):(0,t.jsxs)("div",{className:"flex animate-fade-in flex-col gap-stack",children:[c&&(0,t.jsx)(et.default,{layer:c}),l&&(0,t.jsxs)("p",{className:"flex items-center gap-2.5 text-caption text-fg-tertiary",children:[(0,t.jsx)(p.Info,{size:14,"aria-hidden":"true",className:"shrink-0"}),l.note]}),o&&(0,t.jsx)(er,{label:n.MAP_STEP.done,testId:"walkthrough-next",onClick:()=>i({type:"go",to:"add"})})]})]})})]})}function ep({onFreeFlight:e,onScrolled:i}){let[n,s]=(0,a.useState)("signIn"),o="signUp"===n,c=(0,u.useLoginHref)(),d=(0,u.useLoginHref)(E.ACCOUNT_PAGES.signUp),h=(0,u.useLoginHref)(E.ACCOUNT_PAGES.forgotPassword),p=o?r.SIGN_UP_GATE_COPY.toSignIn:r.SIGN_UP_GATE_COPY.toSignUp,[g,m]=(0,a.useState)(""),[x,b]=(0,a.useState)(""),[y,w]=(0,a.useState)(""),[v,N]=(0,a.useState)(""),[k,S]=(0,a.useState)(!1),[P,_]=(0,a.useState)(null),[M,O]=(0,a.useState)(!1),[L,G]=(0,a.useState)(!1),[R,F]=(0,a.useState)(""),U=async(e,t,a=!1)=>{S(!0),_(null);let i=await e();i.ok&&a||S(!1),i.ok?t():_(i.message)},D=()=>window.location.reload(),W=()=>{if(!k){if(!x.trim())return _(r.SIGN_UP_GATE_COPY.needEmail);O(!1),U(()=>(0,T.sendSignInCode)(x.trim()),()=>{G(!0),F("")})}};return(0,t.jsx)(el,{onScroll:i&&(e=>i(e.currentTarget.scrollTop>0)),children:(0,t.jsxs)("div",{"data-testid":"flint-signup-gate","data-mode":n,className:"flex flex-col gap-stack",children:[(0,t.jsx)(z,{}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(eo,{title:r.SIGN_UP_GATE_COPY.title,sub:r.SIGN_UP_GATE_COPY.sub})}),(0,t.jsxs)("form",{"data-testid":"flint-signup-form",onSubmit:e=>{if(e.preventDefault(),!I.DIRECT_SIGN_IN)return void window.location.assign(o?d:c);if(k)return;let t=(0,r.signUpFormProblem)({mode:n,codeSent:L,firstName:g,email:x,password:y,confirm:v,code:R});if(t)return _(t);L&&!o?U(()=>(0,T.signInWithCode)(x.trim(),R.trim()),D,!0):o?U(()=>(0,T.registerWithPassword)(g.trim(),x.trim(),y),D,!0):U(()=>(0,T.signInWithPassword)(x.trim(),y),D,!0)},className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex animate-fade-in flex-col gap-2.5",children:[o&&(0,t.jsx)(eb,{icon:C.User,label:r.SIGN_UP_GATE_COPY.firstName,name:"given-name",autoComplete:"given-name",value:g,onChange:m}),(0,t.jsx)(eb,{icon:A.Mail,label:r.SIGN_UP_GATE_COPY.email,name:"email",type:"email",autoComplete:o?"email":"username",value:x,onChange:b}),L&&!o?(0,t.jsx)(eb,{icon:j.Lock,label:r.SIGN_UP_GATE_COPY.code,name:"code",autoComplete:"one-time-code",inputMode:"numeric",value:R,onChange:F}):(0,t.jsx)(ey,{label:r.SIGN_UP_GATE_COPY.password,name:"password",value:y,onChange:w,autoComplete:o?"new-password":"current-password"}),o&&(0,t.jsx)(ey,{label:r.SIGN_UP_GATE_COPY.confirmPassword,name:"confirm-password",value:v,onChange:N,autoComplete:"new-password"})]},n),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1",children:[(0,t.jsxs)("p",{className:"text-body-sm whitespace-nowrap text-fg-secondary",children:[p.lead," ",(0,t.jsx)("button",{type:"button","data-testid":"flint-signup-switch",onClick:()=>{s(o?"signIn":"signUp"),m(""),w(""),N(""),_(null),O(!1),G(!1),F("")},disabled:k,className:(0,f.cn)(eg,"px-0.5"),children:p.action})]}),!o&&!L&&(I.DIRECT_SIGN_IN?(0,t.jsx)("button",{type:"button",onClick:()=>{if(!k){if(!x.trim())return _(r.SIGN_UP_GATE_COPY.needEmail);U(()=>(0,T.sendPasswordReset)(x.trim()),()=>O(!0))}},disabled:k,"data-testid":"flint-signup-forgot",className:eg,children:r.SIGN_UP_GATE_COPY.forgotPassword}):(0,t.jsx)("a",{href:h,"data-testid":"flint-signup-forgot",className:eg,children:r.SIGN_UP_GATE_COPY.forgotPassword}))]}),o&&(0,t.jsxs)("p",{className:"animate-fade-in px-1 text-caption text-fg-secondary",children:[r.SIGN_UP_GATE_COPY.terms.before,(0,t.jsx)("a",{href:E.ACCOUNT_PAGES.terms,target:"_blank",rel:"noreferrer",className:"font-semibold text-fg-interactive hover:underline",children:r.SIGN_UP_GATE_COPY.terms.terms}),r.SIGN_UP_GATE_COPY.terms.and,(0,t.jsx)("a",{href:E.ACCOUNT_PAGES.privacy,target:"_blank",rel:"noreferrer",className:"font-semibold text-fg-interactive hover:underline",children:r.SIGN_UP_GATE_COPY.terms.privacy}),r.SIGN_UP_GATE_COPY.terms.after]}),P&&(0,t.jsx)("p",{role:"alert","data-testid":"flint-signup-error",className:"px-1 text-body-sm text-fg-danger",children:P}),L&&!o&&(0,t.jsx)("p",{"data-testid":"flint-signup-code-sent",className:"px-1 text-body-sm text-fg-secondary",children:r.SIGN_UP_GATE_COPY.codeSent}),M&&(0,t.jsx)("p",{"data-testid":"flint-signup-reset-sent",className:"px-1 text-body-sm text-fg-secondary",children:r.SIGN_UP_GATE_COPY.resetSent}),(0,t.jsx)("button",{type:"submit","data-testid":"flint-signup-submit",disabled:k,"aria-busy":k,className:(0,f.cn)(ew,"mt-1 bg-interactive font-bold text-fg-on-interactive hover:bg-interactive-hover disabled:opacity-60"),children:k?r.SIGN_UP_GATE_COPY.busy:o?r.SIGN_UP_GATE_COPY.signUp:r.SIGN_UP_GATE_COPY.signIn}),I.DIRECT_SIGN_IN&&!o&&(0,t.jsx)("div",{className:"flex justify-center gap-3",children:L?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>{G(!1),F(""),_(null)},disabled:k,"data-testid":"flint-signup-use-password",className:eg,children:r.SIGN_UP_GATE_COPY.usePassword}),(0,t.jsx)("button",{type:"button",onClick:W,disabled:k,"data-testid":"flint-signup-new-code",className:eg,children:r.SIGN_UP_GATE_COPY.newCode})]}):(0,t.jsx)("button",{type:"button",onClick:W,disabled:k,"data-testid":"flint-signup-email-code",className:eg,children:r.SIGN_UP_GATE_COPY.emailCode})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3","aria-hidden":"true",children:[(0,t.jsx)("span",{className:"flex-1 border-t border-subtle"}),(0,t.jsx)("span",{className:"text-label text-fg-tertiary",children:r.SIGN_UP_GATE_COPY.or}),(0,t.jsx)("span",{className:"flex-1 border-t border-subtle"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.APPLE_SIGN_IN_ENABLED&&(0,t.jsxs)("a",{href:c,"data-testid":"flint-signup-apple",className:(0,f.cn)(ew,"bg-surface-inverse text-fg-inverse"),children:[(0,t.jsx)(B,{}),r.SIGN_UP_GATE_COPY.apple]}),(0,t.jsxs)("a",{href:c,"data-testid":"flint-signup-google",className:(0,f.cn)(ew,"border-[1.5px] border-subtle bg-surface text-fg hover-ring"),children:[(0,t.jsx)(Y,{}),r.SIGN_UP_GATE_COPY.google]})]}),e&&(0,t.jsx)(er,{kind:"secondary",label:r.SIGN_UP_GATE_COPY.tryFree,testId:"walkthrough-free-flight",onClick:e})]})})}let eg="rounded-tile px-1 py-0.5 text-body-sm font-semibold text-fg-interactive hover:underline focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none",em="flex h-13 items-center gap-2.5 rounded-button border-[1.5px] border-subtle bg-surface px-3.5 focus-within:ring-2 focus-within:ring-focus",ex="min-w-0 flex-1 bg-transparent text-search text-fg placeholder:text-fg-tertiary focus-visible:outline-none";function eb({icon:e,label:a,name:i,type:n="text",autoComplete:r,inputMode:s,value:o,onChange:l}){return(0,t.jsxs)("label",{className:em,children:[(0,t.jsx)(e,{size:18,"aria-hidden":"true",className:"shrink-0 text-fg-tertiary"}),(0,t.jsx)("input",{type:n,name:i,autoComplete:r,inputMode:s,"aria-label":a,placeholder:a,value:o,onChange:e=>l(e.target.value),className:ex})]})}function ey({label:e,name:i,value:n,onChange:r,autoComplete:s}){let[o,l]=(0,a.useState)(!1);return(0,t.jsxs)("label",{className:(0,f.cn)(em,"pr-1.5"),children:[(0,t.jsx)(j.Lock,{size:18,"aria-hidden":"true",className:"shrink-0 text-fg-tertiary"}),(0,t.jsx)("input",{type:o?"text":"password",name:i,autoComplete:s,"aria-label":e,placeholder:e,value:n,onChange:e=>r(e.target.value),className:ex}),(0,t.jsx)("button",{type:"button",onClick:()=>l(e=>!e),"aria-label":o?`Hide ${e.toLowerCase()}`:`Show ${e.toLowerCase()}`,"aria-pressed":o,className:"flex size-10 shrink-0 press-95 items-center justify-center rounded-control text-fg-tertiary hover:text-fg focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none",children:o?(0,t.jsx)(M.EyeOff,{size:18,"aria-hidden":"true"}):(0,t.jsx)(_.Eye,{size:18,"aria-hidden":"true"})})]})}let ew="flex h-12.5 w-full press-97 items-center justify-center gap-2.5 rounded-button px-4 text-card-title font-semibold focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none";function ev({on:e}){return(0,t.jsx)("span",{className:(0,f.cn)("h-1.5 rounded-full transition-[width,background-color] duration-slow ease-spring",e?"w-4.5 bg-fg":"w-1.5 bg-fg/20")})}function eN({framed:e,onClose:i,onAddFlight:r,signUpOnly:o}){let[d,m]=(0,a.useReducer)(n.walkthroughReducer,o?"add":"welcome",n.initialWalkthrough),b=(0,n.currentStep)(d),y=n.MAP_STEPS.has(b),w=n.TOUR_STEPS.indexOf(b),[v]=(0,a.useState)(()=>Date.now()),N=(0,h.useSignedIn)(),k=(0,u.useLoginHref)(),S=(0,s.gatedRemainingFreeLegs)((0,c.useTrackedItineraries)(),!0===N,l.FLINT_FREEMIUM_ENABLED),P="add"===b&&!0===N&&null!==r,[_,M]=(0,a.useState)(!1),j=(0,a.useRef)(!1);(0,a.useEffect)(()=>{P&&!j.current&&(j.current=!0,r?.())},[P,r]);let A=(0,a.useRef)(null),C=(0,a.useRef)(null),[E,I]=(0,a.useState)({top:20,height:800});(0,a.useLayoutEffect)(()=>{let e=A.current;if(!e)return;let t=()=>I({top:C.current?.offsetTop??20,height:e.clientHeight});t();let a=new ResizeObserver(t);return a.observe(e),()=>a.disconnect()},[]);let[T,O]=(0,a.useState)(null),L="welcome"===b?{top:E.top+40,bottom:Math.round(.52*E.height),left:40,right:40}:{top:E.top+44+64,bottom:(T??300)+28,left:36,right:36};return(0,t.jsxs)("div",{ref:A,"data-testid":"walkthrough-root","data-step":b,className:"relative size-full overflow-hidden",style:{"--tour-top":e?"12px":"calc(max(env(safe-area-inset-top), 12px) + 8px)","--tour-bottom":e?"20px":"calc(max(env(safe-area-inset-bottom), 12px) + 4px)"},children:[!o&&(0,t.jsx)(x.default,{layer:"welcome"===b?"radar":"map"===b?d.layer:null,padding:L,fly:y,credits:"map"===b?(T??300)+6:8,still:"welcome"===b?e?"dialog":"phone":null}),(0,t.jsx)("div",{"aria-hidden":"true",className:(0,f.cn)("pointer-events-none absolute inset-0 bg-canvas transition-opacity duration-slow ease-arrive",y?"opacity-0":"opacity-100")}),"map"===b&&(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 bg-linear-to-b from-canvas/90 to-transparent",style:{height:E.top+44+96}}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 flex flex-col",style:{paddingTop:"welcome"===b?0:`calc(var(--tour-top) + ${o?16:44}px)`},children:(0,t.jsxs)("div",{className:(0,f.cn)("flex min-h-0 flex-1 animate-step-in flex-col",y?"pointer-events-none":"pointer-events-auto"),style:{"--step-dir":d.dir},children:["welcome"===b&&(0,t.jsx)(ec,{dispatch:m,signInHref:!0===N?null:k}),"flight"===b&&(0,t.jsx)(eh,{dispatch:m,now:v}),"map"===b&&(0,t.jsx)(ef,{state:d,dispatch:m,onPanelHeight:O}),"add"===b&&!P&&(0,t.jsx)(ep,{onFreeFlight:0!==S?r:null,onScrolled:o?M:void 0})]},`${d.history.length}-${b}`)}),(0,t.jsxs)("div",{ref:C,className:(0,f.cn)("absolute inset-x-0 z-10 flex items-center justify-between",e?"px-4.5":"px-3",_&&"bg-canvas"),style:{top:"var(--tour-top)",height:44},children:[_&&(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-full h-6 bg-linear-to-b from-canvas to-transparent"}),w>=0&&(0,t.jsx)("div",{"aria-hidden":"true","data-testid":"walkthrough-dots",className:"pointer-events-none absolute inset-0 flex items-center justify-center gap-1.25",children:n.TOUR_STEPS.map((e,a)=>(0,t.jsx)(ev,{on:a===w},e))}),(0,t.jsx)("div",{className:"flex flex-1 items-center",children:(0,n.canGoBack)(d)&&(0,t.jsxs)("button",{type:"button","data-testid":"walkthrough-back",onClick:()=>(0,n.canGoBack)(d)?m({type:"back"}):i(),className:"-ml-1 flex press-95 items-center gap-1 rounded-tile px-2.5 py-1.5 text-body-sm font-semibold text-fg-secondary hover:text-fg focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none",children:[(0,t.jsx)(p.ChevronLeft,{size:15,strokeWidth:2.4,"aria-hidden":"true"}),n.BACK]})}),(0,t.jsx)(g.default,{label:n.CLOSE,"data-testid":"walkthrough-close",onClick:i})]})]})}e.s(["default",0,function(e){let{open:n,onClose:s}=e,l=!0===e.signUpOnly,c=e.signUpOnly?null:e.onAddFlight,u="phone"===(0,d.useFlintBand)();return(0,a.useEffect)(()=>{n&&!l&&(0,o.markIntroSeen)()},[n,l]),(0,t.jsxs)(i.Dialog.Root,{open:n,modal:!l,onOpenChange:e=>{e||s()},children:[l&&!u&&(0,t.jsx)("div",{"data-state":n?"open":"closed",onClick:s,className:"pointer-events-auto fixed inset-0 z-[60] bg-overlay data-[state=closed]:pointer-events-none data-[state=closed]:animate-scrim-out data-[state=open]:animate-scrim-in"}),(0,t.jsxs)(i.Dialog.Portal,{children:[!u&&!l&&(0,t.jsx)(i.Dialog.Overlay,{className:"fixed inset-0 z-[60] bg-overlay data-[state=closed]:animate-scrim-out data-[state=open]:animate-scrim-in"}),(0,t.jsxs)(i.Dialog.Content,{"data-testid":"walkthrough","aria-describedby":void 0,onInteractOutside:l?e=>e.preventDefault():void 0,onOpenAutoFocus:l?e=>{e.preventDefault(),e.currentTarget.focus()}:void 0,className:(0,f.cn)("fixed z-[60] overflow-hidden bg-canvas text-fg outline-none",u?"inset-0 data-[state=closed]:animate-scrim-out data-[state=open]:animate-scrim-in":(0,f.cn)("left-1/2 w-[min(560px,calc(100vw-2rem))] -translate-x-1/2 rounded-dialog border border-subtle shadow-floating data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in",m.FLINT_SHEET_HEIGHT)),children:[(0,t.jsx)(i.Dialog.Title,{asChild:l,className:"sr-only",children:l?(0,t.jsx)("span",{children:r.SIGN_UP_GATE_COPY.title}):"Flights walkthrough"}),(0,t.jsx)(eN,{framed:!u,onClose:s,onAddFlight:c,signUpOnly:l})]})]})]})}],38049)},75787,e=>{"use strict";let t=(0,e.i(75254).default)("door-open",[["path",{d:"M11 20H2",key:"nlcfvz"}],["path",{d:"M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z",key:"au4z13"}],["path",{d:"M11 4H8a2 2 0 0 0-2 2v14",key:"74r1mk"}],["path",{d:"M14 12h.01",key:"1jfl7z"}],["path",{d:"M22 20h-3",key:"vhrsz"}]]);e.s(["DoorOpen",0,t],75787)},65117,43491,67461,42674,90012,86536,77705,70756,63488,84614,90027,e=>{"use strict";let t="flights.introSeen",a=new Set(["welcome","map"]),i=["wind"],n=e=>e.history.length>1,r=(e,t)=>({...e,history:[...e.history,t],dir:1});e.s(["BACK",0,"Back","CLOSE",0,"Close walkthrough","INTRO_SEEN_KEY",0,t,"LIVE_LAYERS",0,i,"MAP_INTRO",0,{title:"More than radar",body:"Your map has eight weather layers, from turbulence and icing to the winds at cruise. Tap one to see it on the sample flight."},"MAP_INTRO_TIMING",0,{popStagger:70,pop:450,hold:2600,stagger:40,out:120,in:500,panel:420},"MAP_LAYERS",0,[{id:"radar",label:"Radar"},{id:"turbulence",label:"Turbulence"},{id:"icing",label:"Cloud Icing"},{id:"wind",label:"Cruising Winds"},{id:"echo-tops",label:"Storm Height"},{id:"aviation-alerts",label:"Aviation Alerts"},{id:"15-day-forecast",label:"15 Day Forecast"},{id:"lightning",label:"Lightning"}],"MAP_OPENS_ON",0,"radar","MAP_STEP",0,{done:"Continue"},"MAP_STEPS",0,a,"REPLAY_DELAY_MS",0,280,"REPLAY_LABEL",0,"Replay the walkthrough","SAMPLE_FLIGHT_STEP",0,{updated:"Sample"},"SKIP",0,"Skip","STAGE_MOTION",0,{out:250,in:380,tip:200},"STAGE_REVEAL_AT",0,.2,"TOUR_STEPS",0,["flight","map"],"TRIP_STAGES",0,[{id:"pre-flight",label:"Pre-flight",title:"Before you fly",description:"When to leave for the airport, your gate and departure time, and how likely a delay is.",cards:[{card:"leaveBy",tip:"When to head to the airport"},{card:"flight",tip:"Your gate and departure time"},{card:"risk",tip:"How likely a delay is, and why"}]},{id:"en-route",label:"En route",title:"In the air",description:"How long until you land, the local time there, where it gets bumpy, and the winds at cruise.",cards:[{card:"flight",tip:"When you land, and how far along you are"},{card:"timezone",tip:"The local time where you land"},{card:"route",tip:"Where it gets bumpy, and for how long"},{card:"winds",tip:"Headwinds that add time"}]},{id:"landing",label:"Landing",title:"Getting in",description:"Your arrival gate and baggage claim, the weather when you land, and when you get to the gate.",cards:[{card:"flight",tip:"Your arrival gate and baggage claim"},{card:"arrival",tip:"The weather when you land"},{card:"timetable",tip:"When you get to the gate"}]}],"WELCOME",0,{brand:"The Weather Channel",product:"Flights",hero:"Know what airlines know.",lead:"Airline dispatchers and ground crews use our forecasts to decide when to de-ice, how to fly around turbulence and when to slow arrivals. Now you get those forecasts for every flight you track.",proof:"Weather causes about 3 in 4 air traffic delays.",proofSource:"FAA, system delays over 15 min, 2017 to 2023",start:"Show me a sample flight",signIn:"I have an account"},"canGoBack",0,n,"currentStep",0,e=>e.history[e.history.length-1]??"welcome","initialWalkthrough",0,(e="welcome")=>({history:[e],dir:1,layer:null}),"layerCopy",0,function(e,t){let a=t.replace(/ /g," ");switch(e){case"turbulence":return{title:"Bumpy over Lake Erie",body:`Moderate turbulence at ${a} for about 15 min, an hour after takeoff. Light chop coming down into Chicago.`,note:"Sample forecast for this flight."};case"radar":return{title:"Snow in Boston at takeoff",body:"Light snow at the gate means de-icing before takeoff. The showers near Chicago move off before you land.",note:"Sample forecast for this flight."};case"icing":return{title:"Icing on the climb out",body:`Ice can build in the snow clouds over Boston, low down on the climb out. There is none at ${a}, where the plane cruises.`,note:"Sample forecast for this flight."};case"wind":return{title:"Strong winds aloft",body:`The jet stream crosses your route at ${a}. Flying west into it, the trip takes a little longer.`,note:"Live winds, with the sample flight’s route."};case"echo-tops":return{title:"Tall storms over Pennsylvania",body:`The storm clouds there reach higher than ${a}, where the plane cruises. Planes fly around storms this tall, and these stay well south of the route.`,note:"Sample forecast for this flight."};case"aviation-alerts":return{title:"A storm warning for pilots",body:"A convective SIGMET, the official storm warning for pilots, covers the storms over Pennsylvania. Airlines plan routes around these, and this one is south of the route.",note:"Sample forecast for this flight."};case"15-day-forecast":return{title:"A storm next week",body:"Snow to the north of it and rain to the south, a week out. See the weather along your route up to 15 days before you fly.",note:"Sample forecast, a week out."};case"lightning":return{title:"Storms south of your route",body:"Lightning over Pennsylvania stays well clear of the route. None near Boston or Chicago, so ground crews keep working.",note:"Sample forecast for this flight."}}},"opensOnItsOwn",0,function(e){return!e.seen&&0===e.trackedLegs&&!e.deepLink},"walkthroughReducer",0,function(e,t){switch(t.type){case"go":return r(e,t.to);case"skip":return r(e,"add");case"back":return n(e)?{...e,history:e.history.slice(0,-1),dir:-1}:e;case"layer":return{...e,layer:t.layer}}}],65117);var s=e.i(69655),o=e.i(11461);let l={title:"Sign in for more flights",sub:"And access them on any device.",apple:"Continue with Apple",google:"Continue with Google",or:"or",firstName:"First name",email:"Email",password:"Password",confirmPassword:"Confirm password",forgotPassword:"Forgot password?",signIn:"Sign in",emailCode:"Email me a code",code:"Code",needCode:"Enter the code from the email.",codeSent:"If that email has an account, a code is on its way.",newCode:"Send a new code",usePassword:"Use a password instead",busy:"One moment…",signUp:"Sign up for free",toSignUp:{lead:"New here?",action:"Create an account"},toSignIn:{lead:"Have an account?",action:"Sign in"},terms:{before:"By continuing, you confirm that you have read and agree to our ",terms:"Terms of Use",and:" and ",privacy:"Privacy Policy",after:"."},needFirstName:"Enter your first name.",needEmail:"Enter your email address.",needPassword:"Enter your password.",passwordsDiffer:"The passwords do not match.",resetSent:"If that email has an account, a link to reset the password is on its way. Open it, choose a new password, then come back here and sign in.",tryFree:`Try ${s.FREE_LEG_LIMIT} flight${1===s.FREE_LEG_LIMIT?"":"s"} out as a guest`};e.s(["SIGN_UP_FAN",0,{ghost:"Your flight home",current:{airlineIata:"DL",from:"BOS",to:"LGA",meta:"DL 5716 • Arrives 8:32 PM",status:"On time"},next:{tag:"YOUR NEXT FLIGHT",flight:{airlineIata:"DL",from:"LGA",to:"ORD",meta:"DL 1186 • Departs 9:40 PM",status:"On time"},chips:[{icon:"risk",tone:"success",label:"Delay risk low"},{icon:"weather",tone:"neutral",label:"Chicago 41° rain"},{icon:"gate",tone:"neutral",label:"Gate C12"},{icon:"layover",tone:"interactive",label:"1h 08m layover"}]}},"SIGN_UP_GATE_COPY",0,l,"signUpFormProblem",0,function(e){let t="signUp"===e.mode;if(t&&!e.firstName.trim())return l.needFirstName;if(!e.email.trim())return l.needEmail;if(e.codeSent&&!t)return e.code.trim()?null:l.needCode;if(!e.password)return l.needPassword;if(t){var a;let t;if(0!==(t=[],(a=e.password).lengthNumber(a.find(t=>t.type===e)?.value??0);return Date.UTC(i("year"),i("month")-1,i("day"),i("hour")%24,i("minute"),i("second"))-1e3*Math.floor(e/1e3)}function M(e,t,a,i,n=0){let r=new Date(e+_(e,t)),s=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()+a,i,n),o=s-_(s,t);return s-_(o,t)}let j=e=>new Date(e).toISOString(),A=e=>({scheduled:j(e),estimated:null,actual:null,best:j(e),bestSource:"scheduled"});function C(e){let t=M(e,S,1,6,5),a=M(e,P,1,7,58);return{gateOut:t,takeoff:t+144e4,landing:a-66e4,gateIn:a}}function E(e){let t=C(e),a={icao:"KBOS",iata:"BOS",name:"General Edward Lawrence Logan International Airport",city:"Boston",timezone:S,position:{lat:42.3656,lon:-71.0096},gate:"B9",terminal:"B",baggageClaim:null,flightCategory:{now:"vfr",atFlightTime:"ifr"},hazards:[{kind:"snow",delayRisk:"moderate",startAt:j(M(e,S,1,5)),endAt:j(M(e,S,1,9))}]},i={icao:"KORD",iata:"ORD",name:"Chicago O’Hare International Airport",city:"Chicago",timezone:P,position:{lat:41.9786,lon:-87.9048},gate:"C18",terminal:"1",baggageClaim:null,flightCategory:{now:"vfr",atFlightTime:"vfr"},hazards:[{kind:"gusts",delayRisk:"moderate",startAt:j(M(e,P,1,7)),endAt:j(M(e,P,1,10))}]};return{id:"walkthrough-sample",asOf:j(e),unavailable:[],resolution:"live",ident:{icao:"UAL1131",iata:"UA1131",airline:{icao:"UAL",iata:"UA",name:"United Airlines"}},operating:null,origin:a,destination:i,status:"scheduled",cancelled:!1,diverted:!1,phase:"preflight",atAirportStartsAt:j(t.gateOut-108e5),times:{gateOut:A(t.gateOut),takeoff:A(t.takeoff),landing:A(t.landing),gateIn:A(t.gateIn)},delay:{level:"none",departureLevel:"none",arrivalLevel:"none",departureMinutes:0,arrivalMinutes:0,departureLate:!1,arrivalLate:!1},progressPercent:null,routeDistanceNm:753,remainingDistanceNm:null,aircraft:{type:"A320",registration:null},position:null,plan:{cruiseAltitudeFt:34e3},track:null,inbound:null,routeWeather:null,windsAloft:L,history:null,narratives:null}}function I(e,t){let a=C(e);switch(t){case"pre-flight":return a.gateOut-144e5;case"en-route":return a.takeoff+372e4;case"landing":return a.landing+18e4}}let T=e=>({scheduled:j(e),estimated:null,actual:j(e),best:j(e),bestSource:"actual"});function O(e,t){let a=E(e),i=I(e,t);if("pre-flight"===t)return{...a,asOf:j(i)};let n=C(e),r={...a,asOf:j(i),times:{...a.times,gateOut:T(n.gateOut),takeoff:T(n.takeoff)}};return"en-route"===t?{...r,status:"airborne",phase:"enroute",progressPercent:45,remainingDistanceNm:414,position:{lat:42.7,lon:-78.6,altitudeFt:34e3,groundspeedKt:L.groundspeedKt,headingDeg:268,reportedAt:j(i-6e4)}}:{...r,status:"landed",phase:"landed",times:{...r.times,landing:T(n.landing)},destination:{...a.destination,baggageClaim:"6"},progressPercent:100,remainingDistanceNm:0}}let L={effect:"headwind",cruiseAltitudeFt:34e3,windKt:-95,groundspeedKt:352,airspeedKt:447,timeSavedMinutes:-27,timeEnRouteMinutes:128};function G(e){let t=C(e),a=e=>j(t.takeoff+6e4*e);return{status:"ok",issuedAt:j(e-12e5),routeSource:"filed",cruiseAltitudeFt:34e3,cruiseSource:"filed",takeoffAt:j(t.takeoff),landingAt:j(t.landing),routeDistanceNm:753,profile:(0,y.flightProfile)(753*b.MI_PER_NM,t.takeoff,t.landing,34e3).map(e=>({distanceNm:Math.round(e.mile/b.MI_PER_NM),at:j(e.timeMs),altitudeFt:Math.round(e.altFt)})),turbulence:{maxLevel:"moderate",windows:[{level:"moderate",startAt:a(60),endAt:a(75),startNm:330,endNm:410,lightAround:!0}],timeline:[{distanceNm:0,level:"smooth"},{distanceNm:270,level:"smooth"},{distanceNm:305,level:"light"},{distanceNm:330,level:"moderate"},{distanceNm:410,level:"moderate"},{distanceNm:440,level:"light"},{distanceNm:480,level:"smooth"},{distanceNm:620,level:"smooth"},{distanceNm:645,level:"light"},{distanceNm:725,level:"light"},{distanceNm:753,level:"smooth"}]},pireps:[],advisories:{available:!0,hits:[],beyondHorizon:!1,horizonAt:null}}}function R(e){let t=(e,t)=>({validAt:j(e),condition:"cloudy",temperatureC:0,feelsLikeC:-4,windKt:10,windDirectionDeg:270,gustKt:null,visibilityM:16e3,ceilingFt:4500,humidityPercent:70,flightCategory:"vfr",precipitationChancePercent:10,precipitationMm:0,...t}),a={condition:"snow",temperatureC:-3,feelsLikeC:-9,windKt:12,windDirectionDeg:40,visibilityM:3200,ceilingFt:1100,humidityPercent:88,flightCategory:"ifr",precipitationChancePercent:80,precipitationMm:1.2},i={condition:"windy",temperatureC:2,feelsLikeC:-4,windKt:22,windDirectionDeg:250,gustKt:26,humidityPercent:60};return{origin:[5,6,7,8].map(i=>t(M(e,S,1,i),a)),destination:[...[2,3,4,5].map((a,i)=>t(M(e,P,1,a),{temperatureC:-1-(i>>1),windKt:12})),...[6,7,8,9].map(a=>t(M(e,P,1,a),i)),...[10,11,12,13,14].map((a,i)=>t(M(e,P,1,a),{condition:i>1),windKt:18-2*i,windDirectionDeg:260,gustKt:i[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)],V=e=>Math.round(e).toString(16).padStart(2,"0");function q(e,t){let[a,i,n]=function(e,t){let a=e.stops;if(tc[e]+(d[e]-c[e])*l)}}return K(a[a.length-1][1])}($[e],t);return`#${V(a)}${V(i)}${V(n)}`}e.i(56669),e.i(77620);let X=e=>e*Math.PI/180,Z=e=>180*e/Math.PI;function J(e,t,a=48){let[i,n,r,s]=[X(e[0]),X(e[1]),X(t[0]),X(t[1])],o=2*Math.asin(Math.sqrt(Math.sin((s-n)/2)**2+Math.cos(n)*Math.cos(s)*Math.sin((r-i)/2)**2))||1e-9;return Array.from({length:a+1},(e,t)=>{let l=t/a,c=Math.sin((1-l)*o)/Math.sin(o),d=Math.sin(l*o)/Math.sin(o),u=c*Math.cos(n)*Math.cos(i)+d*Math.cos(s)*Math.cos(r),h=c*Math.cos(n)*Math.sin(i)+d*Math.cos(s)*Math.sin(r),f=c*Math.sin(n)+d*Math.sin(s);return[Z(Math.atan2(h,u)),Z(Math.atan2(f,Math.hypot(u,h)))]})}new WeakMap;let Q=e=>({type:"FeatureCollection",features:e});new WeakMap,new WeakMap,Q([]),Q([]),Q([]),Q([]),Q([]),new WeakMap;var ee=e.i(36806);let et=[-71.0096,42.3656],ea=[-87.9048,41.9786],ei=[{code:"BOS",at:et,level:"moderate"},{code:"ORD",at:ea,level:"major"}];function en(e){let t=e;return()=>{let e=Math.imul((t=t+0x6d2b79f5|0)^t>>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/0x100000000}}let er=(e,t,a,i)=>({type:"Feature",properties:{kind:a,w:i},geometry:{type:"Point",coordinates:[e,t]}});function es(e,t){let a=t*(e.length-1),i=Math.min(e.length-2,Math.floor(a)),n=a-i,r=e[i],s=e[i+1];return[[r[0]+(s[0]-r[0])*n,r[1]+(s[1]-r[1])*n],r,s]}function eo(e,t,[a,i],n,r,s,o){let l=111*Math.cos(i*Math.PI/180);for(let c=0;c{let i=Math.imul(t,0x165667b1)+Math.imul(a,0x27d4eb2f)+e;return(((i=Math.imul(i^i>>>13,0x4bf19f61))^i>>>16)>>>0)/0x100000000},a=e=>e*e*(3-2*e),i=(e,i)=>{let n=Math.floor(e),r=Math.floor(i),s=a(e-n),o=a(i-r),l=t(n,r),c=t(n+1,r),d=t(n,r+1);return l+(c-l)*s+(d-l)*o+(l-c-d+t(n+1,r+1))*s*o},n=(e,t)=>.62*i(3.2*e,4.2*t)+.38*i(8.5*e,11*t);return n.smooth=i,n}function ep(e,t,a=t,i=0){let n=function(e){let t=Array.from({length:2304},()=>[]);for(let a of e){let[e,i]=a.geometry.coordinates,n=Math.floor((e- -96)/.5),r=Math.floor((i-33)/.5);n>=0&&n=0&&re.geometry.coordinates[0]),h=e.map(e=>e.geometry.coordinates[1]),f=[Math.min(...u)-c/75,Math.min(...h)-d,Math.max(...u)+c/75,Math.max(...h)+d];return(e,t)=>{if(ef[2]||tf[3])return 0;let a=111*Math.cos(t*Math.PI/180),i=c/a,u=Math.max(0,Math.floor((e-i- -96)/.5)),h=Math.min(63,Math.floor((e+i- -96)/.5)),p=Math.max(0,Math.floor((t-d-33)/.5)),g=Math.min(35,Math.floor((t+d-33)/.5)),m=0;for(let i=p;i{r&&i.push({type:"Feature",properties:{kind:e,c:r.c},geometry:{type:"Polygon",coordinates:[[[r.lon,n],[a,n],[a,n+t.dLat],[r.lon,n+t.dLat],[r.lon,n]]]}}),r=null};for(let e=t.lon0;ees(t,e)[0],i=([e,t],a,i)=>[e+a,t+i],n={rain:[],snow:[],turb:[],strike:[]};for(let[t,r]of(eo(n.snow,e,i(et,.25,.15),120,60,"snow",.55),eo(n.snow,e,i(et,.1,.05),45,24,"snow",.5),eo(n.snow,e,i(a(.12),0,-.25),90,34,"snow",.35),eo(n.snow,e,i(a(.47),.3,-.55),60,18,"snow",.3),eo(n.rain,e,i(ea,1.1,-.9),80,30,"rain",.32),eo(n.rain,e,i(ea,1.4,-1.2),35,10,"rain",.4),eo(n.turb,e,a(.56),140,46,"turb",.5),eo(n.turb,e,a(.55),70,28,"turb",.65),eo(n.turb,e,i(a(.86),0,-.2),110,26,"turb",.32),eo(n.turb,e,i(a(.3),.4,1.4),120,16,"turb",.25),[[[-78.4,40.6],9],[[-81.6,40.1],6],[[-79.9,39.8],4]]))for(let a=0;a{let a=(e+81)*111*Math.cos(t*Math.PI/180),r=(t-41.2)*111,s=.9004471023526769*a+.43496553411123023*r,o=-(.43496553411123023*a)+.9004471023526769*r,l=Math.exp(-(s*s)/162e4-o*o/460800)*(.45+.9*n.smooth(1.1*e,1.4*t)+.25*i(e,t));if(l<.42 null c="t-(42+.18*(e+80)+1.4*(n.smooth(.35*e+9,3.1)-.5)),d=l">.87;return c>.45?(d?H:W)[1]:c>-.2?D[1]:t.97?z[1]:(d?Y:B)[1]});if("icing"===e||"tops"===e){let t=ex??=function(){let e=en(0x13528f6),t={icing:[],tops:[]};for(let[a,i]of(eo(t.icing,e,[et[0]-.2,et[1]+.1],130,40,"snow",.5),eo(t.icing,e,[et[0]-1.3,et[1]+.05],90,24,"snow",.35),el))eo(t.tops,e,a,75,30,"rain",i);return t}();if("icing"===e){let e=ep(t.icing,40);return eb.icing=eg("icing",eu,(t,a)=>{let i=e(t,a)*(.7+.6*n.smooth(1.6*t,2*a));return i<.6 a="ep(t.tops,16);return" eb.tops='eg("tops",ed,(e,t)='>{let n=a(e,t)*(.75+.5*i(e,t));return n<.6 e="ep(a.rain,18),t=ep(a.snow,17);return" eb.radar='eg("radar",ed,(a,r)='>{let s=e(a,r),o=t(a,r);if(1.72*Math.max(s,o)<.19 null l="Math.max(0,1.75*i(a,r)-.38)*(.75+.5*n(1.9*a,1.9*r)),c=s*l,d=o*l;return" .19>Math.max(c,d)?null:d>=c?q("radar",300+Math.min(29,5+(d-.19)*13)):q("radar",Math.min(38,5+(c-.19)*28))})}let r=ep(a.turb,95,14,.35);return eb.turb=eg("turb",eu,(e,t)=>{let a=r(e,t);if(1.5*a<.5 null i=".9393727128473789*e+.34289780745545134*t,s=-(.34289780745545134*e)+.9393727128473789*t,o=a*(.2+1.3*n.smooth(.55*i+40,2.6*s));return" o ew='{radar:["radar"],turbulence:["turb"],icing:["icing"],wind:[],"echo-tops":["tops"],"aviation-alerts":["sigmet"],"15-day-forecast":["fifteen"],lightning:["strike"]},ev=null,eN={wx:"walkthrough-wx",route:"walkthrough-route",flown:"walkthrough-flown",airports:"walkthrough-airports",plane:"walkthrough-plane"},ek="flint-plane",eS="lightning-icon",eP=e='>["==",["get","kind"],e],e_=["Open Sans Bold","Arial Unicode MS Bold"],eM=e=>({type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:e}}]});function ej(e){let t=function(e){ev??=J(et,ea);let t=Math.max(.001,Math.min(.999,e)),[a,i,n]=es(ev,t),r=Math.floor(t*(ev.length-1));return{at:a,heading:(0,U.bearing)(i,n),flown:[...ev.slice(0,r+1),a]}}(e);return{[eN.flown]:eM(t.flown),[eN.plane]:{type:"FeatureCollection",features:[{type:"Feature",properties:{brg:t.heading},geometry:{type:"Point",coordinates:t.at}}]}}}let eA={phone:{width:393,height:1600,padTop:60,padBottom:832,padX:40},dialog:{width:558,height:878,padTop:60,padBottom:457,padX:40}};var eC=e.i(31287),eE=e.i(9875),eI=e.i(10751),eT=e.i(49911);let eO={showAdminBoundaries:!1,showPlaceLabels:!1,showRoadLabels:!1,colorMotorways:"hsla(20, 20%, 95%, 0)",colorTrunks:"hsla(20, 20%, 95%, 0)",colorRoads:"hsla(20, 20%, 95%, 0.2)"};function eL(){let e=getComputedStyle(document.documentElement),t=(t,a)=>e.getPropertyValue(t).trim()||a;return{route:t("--color-fg-info","#4589ff"),text:t("--color-fg","#f5f5f5"),halo:t("--color-map-outline","#0a0a0a")}}let eG=e=>eC.AIRPORT_LEVEL_COLOURS[e].flint;function eR(e,t,a){return new Promise(i=>{if(e.hasImage(t))return i();e.loadImage(a,(a,n)=>{a||!n||e.hasImage(t)||e.addImage(t,n),i()})})}e.s(["default",0,function({layer:t,padding:a,fly:n,credits:r,still:s}){var o;let l,f,p,g,m=(0,d.useRef)(null),x=(0,eI.useIsDark)(),[b,y]=(0,d.useState)(!1),[w,v]=(0,d.useState)(null);(0,d.useEffect)(()=>{let e=m.current;if(!e)return;let t=new ResizeObserver(()=>v({width:e.clientWidth,height:e.clientHeight}));return t.observe(e),()=>t.disconnect()},[]);let N=(0,d.useRef)({layer:t,padding:a,fly:n&&b,isDark:x});N.current={layer:t,padding:a,fly:n&&b,isDark:x};let k=(0,d.useRef)(null);(0,d.useEffect)(()=>{let t=m.current,a="pk.eyJ1Ijoid2VhdGhlciIsImEiOiJjbGx4dmhjbmoyMTFiM2VsaWVqNGltb2UyIn0.ufNCSDAIkqqfTsy5zur-Jw";if(!t||!a)return;let n=!1,r=null,s=0,o=[],l=()=>{n||y(!0)},c=null,d=e=>{e.reason?.message==="Interpolator disposed"&&e.preventDefault()};return window.addEventListener("unhandledrejection",d),(async()=>{let[{MapboxViewport:d},{MapProjection:f},{Position:p}]=await Promise.all([e.A(2432),e.A(64682),e.A(89346)]);if(n)return;u.default.accessToken=a;let g=await d.create(t,a,{basemap:{type:"MapboxBasemapStandard",options:{source:"mapbox://styles/mapbox/standard",lightPreset:N.current.isDark?"dusk":"day",theme:"monochrome",placeLabels:{show:!1},roads:{showLabels:!1},transit:{showLabels:!1},pointsOfInterest:{show:!1},adminBoundaries:{show:!1}}},geoCenter:{latitude:42,longitude:-79.5},zoomLevel:4,projection:f.MERCATOR,attribution:{position:p.BOTTOM_RIGHT}});if(await e.A(17829),r=g,o.push(window.setTimeout(l,2500)),n)return;let m=g.engine;for(let e of[m.dragPan,m.scrollZoom,m.boxZoom,m.dragRotate,m.keyboard,m.doubleClickZoom,m.touchZoomRotate])e.disable();let x=m.getContainer().querySelector(".mapboxgl-ctrl-attrib");x?.classList.add("mapboxgl-compact"),x?.classList.remove("mapboxgl-compact-show");let b=()=>{for(let[e,t]of Object.entries(eO))try{m.getConfigProperty("basemap",e)!==t&&m.setConfigProperty("basemap",e,t)}catch{}};m.on("styledata",b);let y=e=>{for(let[t,a]of Object.entries(e))m.getSource(t)?.setData(a)},w=.42,v=()=>{let t=N.current.layer;y({[eN.wx]:{type:"FeatureCollection",features:t?ew[t].flatMap(ey):[]}}),c?.layer===t||(r&&c&&((0,eT.drainPangeaViewport)(r,new Map([[c.layer,c.preset]])),c=null),t&&i.includes(t)&&(async()=>{let[{default:i},{Settings:r},{Palette:s},{WindPalettes:o}]=await Promise.all([e.A(70125),e.A(93384),e.A(59738),e.A(34389)]);if(n||c||N.current.layer!==t)return;r.mapboxAccessToken=a,r.sunApiKey="84a572b507ab4d74a572b507abed744b",r.assetPath=eE.BASE_PATH;let l=i.layers.WindComponentsFlightLevelsGrafParticlePacked({flightLevel:(0,h.flightLevelOfFt)(34e3),...o.stream?{style:{directionVariance:[0,0],speedVariance:[0,0],color:s.fromLike(o.stream),density:.77,length:.15,width:1}}:{}});c={layer:t,preset:l},g.addLayer(l.layer)})().catch(()=>{}))},S=e=>{let t,a,i,n=(a=(t=J(et,ea)).map(e=>e[0]),{sw:[Math.min(...a),Math.min(...i=t.map(e=>e[1]))],ne:[Math.max(...a),Math.max(...i)]});m.fitBounds([n.sw,n.ne],{padding:N.current.padding,duration:600*!!e})},P=()=>{cancelAnimationFrame(s);let e=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!N.current.fly||e)return e&&(w=.42),y(ej(w));let t=performance.now()-(w-.42)*16e3,a=()=>{y(ej(w=Math.min(1,(performance.now()-t+6720)%17200/16e3))),s=requestAnimationFrame(a)};s=requestAnimationFrame(a)},_=()=>{try{m.setConfigProperty("basemap","lightPreset",N.current.isDark?"dusk":"day")}catch{}let e=eL();for(let[t,a,i]of[["walkthrough-route","line-color",e.route],["walkthrough-flown","line-color",e.route],["walkthrough-airport","circle-stroke-color",e.halo],["walkthrough-airport-code","text-color",e.text],["walkthrough-airport-code","text-halo-color",e.halo]])m.getLayer(t)&&m.setPaintProperty(t,a,i)},M=async()=>{var e,t;let a;if(n||m.getSource(eN.wx)||(b(),await Promise.all([eR(m,ek,(0,eE.withBase)("/aircraft/plane.png")),eR(m,eS,(0,eE.withBase)("/images/lightning/lightning-newer.png"))]),n||m.getSource(eN.wx)))return;let i={type:"FeatureCollection",features:[]};for(let e of Object.values(eN))m.addSource(e,{type:"geojson",data:i});for(let t of(e=eL(),[(a=(e,t,a)=>({id:e,type:"fill",source:eN.wx,filter:eP(t),paint:{"fill-color":["get","c"],"fill-opacity":a,"fill-antialias":!1,"fill-emissive-strength":1}}))("walkthrough-15day","fifteen",.8),a("walkthrough-radar","radar",.85),a("walkthrough-turb","turb",.75),a("walkthrough-icing","icing",.75),a("walkthrough-tops","tops",.75),{id:"walkthrough-sigmet",type:"fill",source:eN.wx,filter:eP("sigmet"),paint:{"fill-color":["get","c"],"fill-opacity":["get","o"],"fill-emissive-strength":1}},{id:"walkthrough-sigmet-outline",type:"line",source:eN.wx,filter:eP("sigmet"),layout:{"line-join":"round"},paint:{"line-color":["get","c"],"line-width":["get","w"],"line-emissive-strength":1}},{id:"walkthrough-strike",type:"symbol",source:eN.wx,filter:eP("strike"),layout:{"icon-image":eS,"icon-size":.5,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-pitch-alignment":"viewport"},paint:{"icon-emissive-strength":1}},{id:"walkthrough-route",type:"line",source:eN.route,layout:{"line-cap":"butt","line-join":"round"},paint:{"line-color":e.route,"line-width":2.4,"line-dasharray":[2,2],"line-emissive-strength":1}},{id:"walkthrough-flown",type:"line",source:eN.flown,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":e.route,"line-width":3,"line-emissive-strength":1}},{id:"walkthrough-airport",type:"circle",source:eN.airports,paint:{"circle-radius":5,"circle-color":["get","color"],"circle-stroke-color":e.halo,"circle-stroke-width":1.5,"circle-emissive-strength":1}},{id:"walkthrough-airport-code",type:"symbol",source:eN.airports,layout:{"text-field":["get","code"],"text-font":e_,"text-size":12.5,"text-anchor":"left","text-offset":[.72,0],"text-allow-overlap":!0},paint:{"text-color":e.text,"text-halo-color":e.halo,"text-halo-width":1.75,"text-emissive-strength":1}},{id:"walkthrough-plane-shadow",type:"circle",source:eN.plane,paint:{"circle-radius":11,"circle-blur":1,"circle-color":"#000","circle-opacity":.45,"circle-translate":[0,3]}},{id:"walkthrough-plane",type:"symbol",source:eN.plane,layout:{"icon-image":ek,"icon-size":.4,"icon-rotate":["get","brg"],"icon-rotation-alignment":"map","icon-pitch-alignment":"viewport","icon-allow-overlap":!0,"icon-ignore-placement":!0},paint:{"icon-emissive-strength":1}}]))m.addLayer(t);y((t=w,{[eN.route]:eM(J(et,ea)),[eN.airports]:{type:"FeatureCollection",features:ei.map(e=>({type:"Feature",properties:{code:e.code,color:eG(e.level)},geometry:{type:"Point",coordinates:e.at}}))},...ej(t)})),k.current={showLayer:v,frame:S,setFly:P,relight:_},S(!1),v(),P(),m.once("idle",l),o.push(window.setTimeout(l,1500))},j=!1,A=()=>{j||n||(j=!0,M())};m.isStyleLoaded()&&A(),m.once("load",A),m.once("idle",A)})().catch(()=>{}),()=>{if(n=!0,cancelAnimationFrame(s),o.forEach(clearTimeout),k.current=null,window.removeEventListener("unhandledrejection",d),r){(0,eT.drainPangeaViewport)(r,new Map(c?[[c.layer,c.preset]]:[]));try{(0,eT.patchMapForSafeDispose)(r.engine),r.dispose()}catch{}}}},[]),(0,d.useEffect)(()=>{k.current?.showLayer()},[t]);let S=`${a.top},${a.bottom},${a.left},${a.right}`;return(0,d.useEffect)(()=>{k.current?.frame(!0)},[S]),(0,d.useEffect)(()=>{k.current?.setFly()},[n,b]),(0,d.useEffect)(()=>{k.current?.relight()},[x]),(0,c.jsxs)("div",{className:"flint-map walkthrough-map absolute inset-0 isolate",style:{"--walkthrough-credits":`${r}px`},children:[(0,c.jsx)("div",{ref:m,"data-testid":"walkthrough-map",className:"size-full"}),(0,c.jsx)("div",{"aria-hidden":"true",className:`pointer-events-none absolute inset-0 bg-canvas transition-opacity duration-slow ease-arrive ${b?"opacity-0":""}`}),s&&w&&(0,c.jsx)("img",{src:(0,eE.withBase)(`/walkthrough/welcome-${s}-${"phone"===s||x?"dark":"light"}.jpg`),alt:"","aria-hidden":"true",fetchPriority:"high",className:`pointer-events-none absolute max-w-none transition-opacity duration-deliberate ease-standard ${b?"opacity-0":""}`,style:(o=eA[s],l=(w.width-a.left-a.right)/(o.width-2*o.padX),f=(a.left+w.width-a.right)/2,p=(a.top+w.height-a.bottom)/2,g=(o.padTop+o.height-o.padBottom)/2,{left:f-l*o.width/2,top:p-l*g,width:l*o.width,height:l*o.height})})]})}],90012);var eF=e.i(75254);let eU=(0,eF.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,eU],86536);let ez=(0,eF.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",0,ez],77705);let eD=(0,eF.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",0,eD],70756);let eB=(0,eF.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["Mail",0,eB],63488);let eY=(0,eF.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,eY],84614);var eW=e.i(49506),eH=e.i(34123);let e$=(0,eW.createUpsxSession)({baseUrl:eH.UPSX_BASE_URL,fetch:(e,t)=>fetch(e,{...t,credentials:"include"})}),eK=e=>e.ok?{ok:!0}:{ok:!1,failure:e.failure,message:e.message},eV=async(e,t)=>eK(await e$.signInWithPassword(e,t)),eq=async e=>(0,o.readsAsSent)(await e$.sendSignInCode(e)),eX=async(e,t)=>eK(await e$.signInWithCode(e,t)),eZ=async e=>(0,o.readsAsSent)(await e$.sendPasswordReset(e)),eJ=async(e,t,a)=>eK(await e$.register({firstName:e.trim(),email:t,password:a}));e.s(["registerWithPassword",0,eJ,"sendPasswordReset",0,eZ,"sendSignInCode",0,eq,"signInWithCode",0,eX,"signInWithPassword",0,eV],90027)}]);