PageSourceSearch

https://roystools.com/_next/static/chunks/2889.3b18266fc15f25d1.js

js roystools.com collected 2026-10-10 02:44:40 UTC 13,264 bytes, 3 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2889],{2766:(e,t,r)=>{"use strict";r.d(t,{D:()=>n});let n="https://tiles.openfreemap.org/styles/dark"},2889:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FlightStatusMapView:()=>v});var n=r(5155),a=r(2115),l=r(6379),i=r.n(l);r(3879);var o=r(9096),s=r(4613),u=r(9713),c=r(9936),d=r(2766);let p="flight-status-planned",m="flight-status-progress",f="flight-status-airports",g="flight-status-line-planned",h="flight-status-line-progress",b="flight-status-airport-circle";function y(e){return(e.iata??e.icao??"???").toUpperCase()}function x(e,t,r,n){let a=(0,c.VX)(e,t,r,n,56);return{type:"FeatureCollection",features:(0,c.uv)(a).map((e,t)=>({type:"Feature",id:t,properties:{},geometry:{type:"LineString",coordinates:e}}))}}function w(){return{type:"FeatureCollection",features:[]}}function S(e){return{hex:e.hex??"",flight:e.callsign,reg:e.registration,type:e.aircraftType,desc:e.aircraftDesc,ownOp:null,category:e.category,flagInteresting:!1,flagPia:!1,flagLadd:!1,lat:e.lat??0,lon:e.lon??0,altFt:e.onGround?null:e.altitudeFt,altGeomFt:null,gsKt:e.groundSpeedKt,trackDeg:e.trackDeg,seenPosSec:e.lastSeenSec,seenSec:e.lastSeenSec,positionApprox:!1,sourceType:"adsb_icao",positionKind:"live",baroRateFpm:null,geomRateFpm:null,iasKt:null,tasKt:null,mach:null,trackRateDegPerSec:null,rollDeg:null,magHeadingDeg:null,trueHeadingDeg:null,navQnhHpa:null,navAltMcpFt:null,navAltFmsFt:null,navHeadingDeg:null,navModes:null,squawk:e.squawk,emergency:e.emergency,alert:!1,spi:!1,windDirDeg:null,windSpeedKt:null,oatC:null,tatC:null,nic:null,rcMeters:null,nicBaro:null,nacP:null,nacV:null,sil:null,silType:null,gva:null,sda:null,adsbVersion:null,messages:null,rssiDbfs:null,gpsOkBeforeMs:null,mlatDataPresent:!1,tisbDataPresent:!1}}function v({className:e,flightLabel:t,live:r,route:l}){let c=(0,a.useRef)(null),F=(0,a.useRef)(null),C=(0,a.useRef)(null),k=(0,a.useRef)(null),N=(0,a.useRef)(null),A=(0,a.useRef)(null),[M,D]=(0,a.useState)(!1),[L,H]=(0,a.useState)(null);if((0,a.useEffect)(()=>{let e=F.current;if(!e)return;let t=null;try{(t=new(i()).Map({container:e,style:d.D,center:[-98,39],zoom:3,minZoom:1.5,maxZoom:12,scrollZoom:!0,dragRotate:!1,pitchWithRotate:!1})).addControl(new(i()).NavigationControl({showCompass:!0,showZoom:!0}),"top-right")}catch(e){if(t)try{t.remove()}catch{}C.current=null,H(e);return}let r=t;C.current=r;let n=new ResizeObserver(()=>{r.resize()});n.observe(e);let a=c.current;a&&n.observe(a);let l=()=>{r.addSource(p,{type:"geojson",data:w()}),r.addSource(m,{type:"geojson",data:w()}),r.addSource(f,{type:"geojson",data:w()}),r.addLayer({id:g,type:"line",source:p,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#ffcc00","line-width":2,"line-opacity":.72,"line-dasharray":[2,2]}}),r.addLayer({id:h,type:"line",source:m,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#66ff99","line-width":3,"line-opacity":.9}}),r.addLayer({id:b,type:"circle",source:f,paint:{"circle-radius":5,"circle-color":"#ffcc00","circle-stroke-width":1.5,"circle-stroke-color":"rgba(0,0,0,0.45)"}}),r.resize(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{r.resize()})}),D(!0)};return r.on("load",l),()=>{r.off("load",l),n.disconnect(),N.current?.remove(),N.current=null,A.current=null;try{if(r.getStyle()){for(let e of[b,h,g])r.getLayer(e)&&r.removeLayer(e);for(let e of[f,m,p])r.getSource(e)&&r.removeSource(e)}}catch{}r.remove(),C.current=null,D(!1)}},[]),(0,a.useEffect)(()=>{let e=C.current;if(!M||!e)return;let n=e.getSource(p),a=e.getSource(m),s=e.getSource(f);if(!n||!a||!s)return;e.resize();let c=l?.origin,d=l?.destination,g=c&&d&&Number.isFinite(c.lat)&&Number.isFinite(c.lon)&&Number.isFinite(d.lat)&&Number.isFinite(d.lon),h=r?.lat,b=r?.lon,v=null!=r&&null!=h&&null!=b&&Number.isFinite(h)&&Number.isFinite(b)&&90>=Math.abs(h)&&180>=Math.abs(b)?{lat:h,lon:b}:null;if(g)n.setData(x(c.lon,c.lat,d.lon,d.lat)),s.setData({type:"FeatureCollection",features:[{type:"Feature",properties:{code:y(c),role:"origin"},geometry:{type:"Point",coordinates:[c.lon,c.lat]}},{type:"Feature",properties:{code:y(d),role:"dest"},geometry:{type:"Point",coordinates:[d.lon,d.lat]}}]});else n.setData(w()),s.setData(w());
1g&&v&&r&&!r.onGround?a.setData(x(c.lon,c.lat,v.lon,v.lat)):a.setData(w());let F=g&&(r?.positionSource==="estimated"||r?.positionSource==="airlabs"||!v),D=v&&!F?{lat:v.lat,lon:v.lon,zoom:7}:g?{lat:(c.lat+d.lat)/2,lon:(c.lon+d.lon)/2,zoom:3}:d&&Number.isFinite(d.lat)&&Number.isFinite(d.lon)?{lat:d.lat,lon:d.lon,zoom:6}:null,L=null!=D&&k.current!==t,H=()=>{if(L&&D){e.resize();try{if(F&&g&&c&&d){let t=new(i()).LngLatBounds;t.extend([c.lon,c.lat]),t.extend([d.lon,d.lat]),v&&t.extend([v.lon,v.lat]),e.fitBounds(t,{padding:56,duration:0,maxZoom:5})}else e.easeTo({center:[D.lon,D.lat],zoom:D.zoom,duration:0});k.current=t}catch{}}};H();let R=!1,j=()=>{!R&&(e.resize(),L&&k.current!==t&&H())};requestAnimationFrame(()=>{requestAnimationFrame(j)});let K=()=>{j()};if(e.once("idle",K),v&&r){let n=(0,u.DX)(S(r)),a=S(r);if(!N.current||!A.current){let{root:t,rotate:r,ticker:a}=(0,o.hI)(n);t.style.pointerEvents="none",t.tabIndex=-1,a.classList.add("flight-radar-ac-marker__ticker--visible"),N.current=new(i()).Marker({element:t,anchor:"center"}).setLngLat([v.lon,v.lat]).addTo(e),A.current={root:t,rotate:r,ticker:a}}let{root:l,rotate:s,ticker:p}=A.current;(0,o.rN)(s,n),N.current.setLngLat([v.lon,v.lat]);let m=r.trackDeg;s.style.transform=`rotate(${null!=m&&Number.isFinite(m)?m:0}deg)`;let f=r.emergency?.toLowerCase().trim();l.dataset.accent=f&&"none"!==f?"emergency":(0,u.oc)(a),r.onGround?l.dataset.ground="true":delete l.dataset.ground,l.dataset.state=r.onGround?"default":"selected",l.dataset.motion="off";let h=g?y(c):"—",b=g?y(d):"—",x=r.onGround?"GND":null!=r.altitudeFt?`${Math.round(r.altitudeFt/1e3)}k ft`:"estimated"===r.positionSource?"est.":"—",w=null!=r.groundSpeedKt&&Number.isFinite(r.groundSpeedKt)?`${Math.round(r.groundSpeedKt)} kt`:"—",F=(r.aircraftType??"").trim()||"—";p.style.maxWidth="none",p.style.whiteSpace="pre-line",p.style.textAlign="center",p.textContent=`${t} ${F}
2${x} \xb7 ${w}
3${h} → ${b}`,l.setAttribute("aria-label",`${t} at ${x}, ${w}, route ${h} to ${b}`)}else N.current?.remove(),N.current=null,A.current=null;return()=>{R=!0,e.off("idle",K)}},[M,t,r,l]),null!=L)return(0,n.jsx)(s.n,{className:e,helpToolPath:"/tools/flight-status",error:L});let R=l?y(l.origin):"—",j=l?y(l.destination):"—";return(0,n.jsxs)("div",{ref:c,className:"flight-status-map-stack flex min-h-0 w-full flex-1 flex-col gap-1.5",children:[(0,n.jsx)("div",{ref:F,className:`flight-radar-maplibre-canvas flight-status-map-canvas min-h-0 w-full flex-1 rounded border border-[var(--border-dim)] ${e??""}`,role:"application","aria-label":`Flight track map for ${t}`}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-0.5 border border-[var(--border-dim)] bg-[rgba(0,8,4,0.35)] px-2 py-1 font-mono text-[0.58rem] uppercase tracking-[0.08em] text-[var(--phosphor-dim)] sm:text-[0.6rem]",children:[(0,n.jsx)("span",{className:"text-[var(--amber)]",children:R}),(0,n.jsx)("span",{className:"text-[var(--phosphor)]",children:function(e){if(!e)return"no position";if("estimated"===e.positionSource)return"estimated";if("airlabs"===e.positionSource){let t=e.lastSeenSec;return null!=t&&Number.isFinite(t)?t<90?"AirLabs live":`AirLabs ${Math.round(t)}s ago`:"AirLabs"}let t=e.lastSeenSec;return null!=t&&Number.isFinite(t)?t<2?"ADS-B live":`ADS-B ${Math.round(t)}s ago`:"ADS-B —"}(r)}),(0,n.jsx)("span",{className:"text-[var(--amber)]",children:j})]})]})}},3879:()=>{},4613:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});var n=r(5155);function a({className:e,helpToolPath:t,error:r}){let l,i=(l=r instanceof Error?r.message:"string"==typeof r?r:"",/webgl|WebGL|GL_RENDERER|contextcreation|BindToCurrentSequence/i.test(l));return(0,n.jsxs)("div",{className:`${e??""} flex min-h-[12rem] flex-col justify-center gap-2 border border-[var(--border-dim)] bg-[rgba(0,12,6,0.45)] p-3 text-[0.65rem] leading-relaxed sm:text-[0.7rem]`,role:"alert","aria-live":"polite",children:[(0,n.jsx)("p",{className:"font-semibold uppercase tracking-[0.08em] text-[var(--amber)]",children:i?"WebGL unavailable":"Map failed to start"}),i?(0,n.jsxs)("p",{className:"text-[var(--text-muted)]",children:["This map is drawn with MapLibre GL and needs"," ",(0,n.jsx)("strong",{className:"text-[var(--phosphor-dim)]",children:"WebGL"})," (GPU graphics). Your environment disabled it or could not create a context (common in embedded preview tabs, sandboxed webviews, some remote desktops, or when hardware acceleration is off in the browser)."]}):(0,n.jsx)("p",{className:"text-[var(--text-muted)]",children:"The map engine reported an error while starting. Try a full browser window or reload the page."}),(0,n.jsxs)("p",{className:"text-[var(--phosphor-dim)]",children:["Try opening"," ",(0,n.jsx)("strong",{className:"text-[var(--phosphor)]",children:t})," in Chrome, Firefox, or Safari with hardware acceleration enabled, or use an ordinary browser tab instead of an in-app or IDE-embedded browser."]}
3),(0,n.jsxs)("details",{className:"text-[var(--text-muted)]",children:[(0,n.jsx)("summary",{className:"cursor-pointer select-none text-[var(--phosphor-dim)]",children:"Technical details"}),(0,n.jsx)("pre",{className:"mt-1 max-h-32 overflow-auto whitespace-pre-wrap break-all font-mono text-[0.58rem] text-[var(--phosphor-dim)]",children:function(e){if(e instanceof Error)return e.message;if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return"Unknown error"}}(r)})]})]})}},9713:(e,t,r)=>{"use strict";r.d(t,{DX:()=>c,Eh:()=>g,Gn:()=>f,MM:()=>m,Mh:()=>o,oc:()=>p,tW:()=>s,x9:()=>d});let n=new Set(["A109","A139","A169","AH1","AH64","AS50","AS55","AW139","AW149","AW169","AW189","B105","B212","B214","B222","B230","B234","B407","B429","B505","BK117","CH47","CH53","EC35","EC45","EC55","EC75","EH60","EN48","H500","H60","HH60","KA32","MH53","MH60","MH65","MI8","MI17","MI24","MI26","MI28","NH90","OH58","R22","R44","R66","S61","S70","S76","S92","SH60","TH1","UH1","UH60","UH72","VH60","WH60"].map(e=>e.toUpperCase())),a=new Set(["KC135","K35R","K35E","KC46","KC30","KC10","KDC10","KE3","IL78"].map(e=>e.toUpperCase())),l=new Set(["F15","F16","F18","FA18","F22","F35","F4","F5","F14","F8","EF20","EUFI","TYPH","RDR","RFAL","M346","M339","GR4","TOR","M200","MIR2","J10","J11","J15","J20","SU27","SU30","SU34","SU35","SU57","MG29","MG31","MG21","L159","HAWK"].map(e=>e.toUpperCase())),i=new Set(["C130","AN26","C295","IL76","CN35","C17","A400","C27J","C390","Y20"].map(e=>e.toUpperCase()));function o(e){let t=e.type?.toUpperCase().trim();if(t&&i.has(t))return!0;let r=`${e.desc??""} ${e.type??""}`.toLowerCase();return!!(/\bc-?130\b|hercules\b/i.test(r)||/\ban-?26\b/i.test(r)||/\bc-?295\b|c295\b|casa\s*295\b/i.test(r)||/\bil-?76\b/i.test(r)||/\bcn-?235\b|cn35\b/i.test(r)||/\bc-?17\b|globemaster\b/i.test(r)||/\ba-?400m?\b|\ba400\b/i.test(r)||/\bc-?27j\b|spartan\b/i.test(r)||/\bc-?390\b|kc-?390\b|millennium\b/i.test(r)||/\by-?20\b/i.test(r))}function s(e){return null==e.altFt}function u(e){if(e.category?.toUpperCase().trim()==="B7")return!0;let t=e.desc??"";if(/\b(helicopter|helo|rotorcraft|rotary[-\s]?wing|chopper|black hawk|apache|chinook|seahawk)\b/i.test(t))return!0;let r=e.type?.toUpperCase().trim();return!!(r&&n.has(r))}function c(e){return u(e)?"helicopter":!function(e){if(u(e))return!1;let t=e.type?.toUpperCase().trim();if(t&&(a.has(t)||/^KC\d/.test(t)))return!0;let r=`${e.desc??""} ${e.type??""}`.toLowerCase();return!!(/\b(stratotanker|pegasus|kc-46|kc-135|kc-10|kc-30|kdc-10|mrtt|voyager\s*tank|a330\s*mrtt|il-?78)\b/i.test(r)||/\bkc[- ]?\d{2,3}\b/i.test(r)&&!/\bc-?390\b|millennium/i.test(r))}(e)?o(e)?"fixed-wing-airlift":!function(e){if(u(e))return!1;let t=e.type?.toUpperCase().trim();if(t&&(l.has(t)||/^F\d[A-Z0-9]?$/i.test(t)&&t.length<=5))return!0;let r=e.desc??"";return!!/\b(fighter|f-16|f-35|f-22|f-15|eurofighter|typhoon|raptor|hornet|super\s*hornet|viper|falcon)\b/i.test(r)}(e)?"fixed-wing-narrow":"fixed-wing-fighter":"fixed-wing-tanker"}function d(e){let t=e.flight?.trim();if(t&&t.length>0)return t.slice(0,3).toUpperCase();let r=e.hex.replace(/^0x/i,"").replace(/[^0-9a-f]/gi,"").slice(-3).toUpperCase();return r.length?r:"—"}function p(e){let t=e.emergency?.toLowerCase().trim();if(t&&"none"!==t)return"emergency";let r=e.squawk?.trim();return"7500"===r||"7600"===r||"7700"===r||!0===e.alert||!0===e.spi?"emergency":"last_known"===e.positionKind||"receiver_estimate"===e.positionKind?"approx":null!=e.seenPosSec&&e.seenPosSec>30||null!=e.seenSec&&e.seenSec>60?"stale":"normal"}function m(e){if("receiver_estimate"===e.positionKind||"last_known"===e.positionKind)return"low";let t=e.seenPosSec;if(null!=t&&t>45)return"low";if(null!=t&&t>12)return"medium";let r=e.nic;return null!=r&&r<=5||null!=e.rcMeters&&e.rcMeters>750?"medium":"high"}function f(e){switch(e){case"live":return"Live position";case"last_known":return"Last known position";case"receiver_estimate":return"Receiver estimate"}}function g(e){return"adsb_icao"===e?"ADS-B ICAO":"mlat"===e?"MLAT":"mode_s"===e?"Mode S":"adsb_icao_nt"===e?"ADS-B (non-xpdr)":"tisb_icao"===e||"tisb_other"===e||"tisb_trackfile"===e?"TIS-B":e}}}]);

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.