PageSourceSearch

https://aprs.world/assets/StationDetailPage-BIcMd-YB.js

js aprs.world collected 2026-09-24 13:26:48 UTC 58,734 bytes, 2 lines download raw bytes

1import{r as b,j as e}from"./react-vendor-CkHENeON.js";import{u as R,a as Te}from"./query-BghhkdFh.js";import{P as lt}from"./PremiumTag-DiVE6s_9.js";import{K as rt,aE as Y,Q as pe,aF as Ae,W as ve,aG as it,aH as ot,aI as Q,aJ as ct,aK as Ie,y as E,J as fe,a4 as we,S as ce,b as dt,aL as ut,aM as xt,t as mt,aN as pt,aO as ft,u as Le,ai as gt,am as ht,C as bt,aP as _t,aQ as ae,aR as jt,aS as yt,G as Nt,aT as vt,aU as wt,g as kt,a6 as St,aV as Ft,aW as Rt,aX as Et,aY as $t,a7 as Dt,a8 as Ct,M as Tt,V as ke,a9 as At,aZ as It,U as Lt,a_ as Mt,a$ as Me,b0 as Pt,aa as qt,a1 as Ut,ax as Kt}from"./index-YE876VBp.js";import{a as Pe,c as qe}from"./callsignCountry-CaWI114u.js";import{m as de}from"./maplibre-Cv7NJiGM.js";import{i as Vt,b as ue,a as Se}from"./mapGuards-DC9Qdx3a.js";import{u as v}from"./i18n-KxSNQEJP.js";import{au as be,av as Ue,a6 as Ke,aw as Ve,ax as ee,O as ne,A as Fe,ad as He,ay as Ht,ae as Gt,az as Ge,a8 as Bt,N as zt,R as Be,aj as Wt,ak as Yt,X as Ot,j as Qt,aA as Xt,aB as Zt,aC as Jt,e as le,aD as Re,ai as es,f as Ee,n as ts,a as ss,z as as,aE as ns}from"./icons-CKY-ATtw.js";import{D as ls}from"./DeliveryBadge-BAZ4NAvn.js";import{C as $e}from"./CallsignLink-CFwNVIVU.js";import{u as rs,a as is,L as K}from"./router-DwQwzBgI.js";import"./helmet-Dv0yHH4m.js";const os="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",cs="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",ds="heard-fill",us="heard-stroke",xs="heard-link",ms="heard-igate-halo",ps="heard-igate-dot",fs="heard-igate-label",te="heard-circle",xe="heard-link",J="heard-igate",gs=500;function hs(t){return t<25?"#06b6d4":t<55?"#34d399":t<80?"#f59e0b":"#ef4444"}function ze({points:t,height:s=180,loading:l,heard:a,interactive:r=!1,fitFarthestIgate:c=!1,fallbackCenter:o=null}){const i=b.useRef(null),n=b.useRef(null),d=rt(x=>x.mode),f=Y(x=>x.units),{t:u}=v(),[h,g]=b.useState(()=>!Vt()),p=(a==null?void 0:a.farthestIgate)??null,y=p?Number.isFinite(p.distanceKm)?p.distanceKm:a!=null&&a.origin&&Number.isFinite(p.lat)&&Number.isFinite(p.lng)?pe({lat:a.origin.lat,lon:a.origin.lng},{lat:p.lat,lon:p.lng}):0:0,w=y>gs,m=w?null:a,S=c&&!w;b.useEffect(()=>{if(h||!i.current)return;n.current&&(n.current.remove(),n.current=null);let x;try{x=new de.Map({container:i.current,style:d==="light"?cs:os,interactive:r,attributionControl:!1,center:[35,39],zoom:5,maxZoom:r?17:14})}catch{g(!0);return}return r&&(x.addControl(new de.NavigationControl({showCompass:!1,visualizePitch:!1}),"top-right"),x.touchPitch.disable()),n.current=x,()=>{x.remove(),n.current=null}},[d,r,h]);const _=o==null?void 0:o.lat,$=o==null?void 0:o.lon;return b.useEffect(()=>{const x=n.current;!x||t.length>0||!Number.isFinite(_)||!Number.isFinite($)||ue(x)&&x.jumpTo({center:[$,_],zoom:8})},[t.length,_,$,d,r,h]),b.useEffect(()=>{const x=n.current;if(!x||t.length===0)return;let A=!1;const L=()=>!A&&n.current===x&&ue(x),D=()=>{if(!L())return;const M=[];for(let k=0;k<t.length-1;k++){const V=t[k],B=t[k+1],Z=V.speed_kmh??B.speed_kmh??0;M.push({type:"Feature",geometry:{type:"LineString",coordinates:[[V.lon,V.lat],[B.lon,B.lat]]},properties:{color:hs(Z),opacity:.55+k/Math.max(t.length-1,1)*.45}})}const I=t[t.length-1],j={type:"FeatureCollection",features:M},N={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[I.lon,I.lat]},properties:{}}]},P=x.getSource("trail");P?P.setData(j):(x.addSource("trail",{type:"geojson",data:j}),x.addLayer({id:"trail-halo",type:"line",source:"trail",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":d==="light"?"#0a0a0a":"#ffffff","line-width":7,"line-opacity":["*",["get","opacity"],.45]}}),x.addLayer({id:"trail-line",type:"line",source:"trail",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["get","color"],"line-width":4,"line-opacity":["get","opacity"]}}));const G=x.getSource("dot");G?G.setData(N):(x.addSource("dot",{type:"geojson",data:N}),x.addLayer({id:"dot-halo",type:"circle",source:"dot",paint:{"circle-color":"#10b981","circle-radius":12,"circle-opacity":.28}}
1),x.addLayer({id:"dot-core",type:"circle",source:"dot",paint:{"circle-color":"#10b981","circle-radius":5,"circle-stroke-color":"#ffffff","circle-stroke-width":1.5}}));const q=t.map(k=>k.lat),C=t.map(k=>k.lon),U=new de.LngLatBounds([Math.min(...C),Math.min(...q)],[Math.max(...C),Math.max(...q)]);if(m!=null&&m.origin&&m.maxDistanceKm>0){const k=pe({lat:Math.min(...q),lon:Math.min(...C)},{lat:Math.max(...q),lon:Math.max(...C)});if(m.maxDistanceKm<=Math.max(50,k*1.5)){const V=ve(m.origin.lat,m.origin.lng,m.maxDistanceKm,16).coordinates[0]??[];for(const[B,Z]of V)U.extend([B,Z])}}if(S&&(m!=null&&m.farthestIgate)){const k=m.farthestIgate;Number.isFinite(k.lat)&&Number.isFinite(k.lng)&&U.extend([k.lng,k.lat])}x.fitBounds(U,{padding:32,animate:!1,maxZoom:14})};return x.once("load",D),Se(x)&&D(),()=>{A=!0,x.off("load",D)}},[t,d,m,S]),b.useEffect(()=>{const x=n.current;if(!x)return;let A=!1;const L=()=>!A&&n.current===x&&ue(x),D=()=>{if(!L())return;const M=!!(m!=null&&m.origin)&&m.maxDistanceKm>0,I=!!(m!=null&&m.farthestIgate),j={type:"FeatureCollection",features:M?[{type:"Feature",geometry:ve(m.origin.lat,m.origin.lng,m.maxDistanceKm),properties:{}}]:[]},N=x.getSource(te);N?N.setData(j):(x.addSource(te,{type:"geojson",data:j}),x.addLayer({id:ds,type:"fill",source:te,paint:{"fill-color":"#10b981","fill-opacity":.05}}),x.addLayer({id:us,type:"line",source:te,paint:{"line-color":"#10b981","line-opacity":.3,"line-width":1.5}}));const P={type:"FeatureCollection",features:m!=null&&m.origin&&I?[{type:"Feature",geometry:{type:"LineString",coordinates:[[m.origin.lng,m.origin.lat],[m.farthestIgate.lng,m.farthestIgate.lat]]},properties:{}}]:[]},G=x.getSource(xe);G?G.setData(P):(x.addSource(xe,{type:"geojson",data:P}),x.addLayer({id:xs,type:"line",source:xe,paint:{"line-color":"#10b981","line-opacity":.45,"line-width":1,"line-dasharray":[2,2]}}));const q={type:"FeatureCollection",features:I?[{type:"Feature",geometry:{type:"Point",coordinates:[m.farthestIgate.lng,m.farthestIgate.lat]},properties:{callsign:m.farthestIgate.callsign}}]:[]},C=x.getSource(J);C?C.setData(q):(x.addSource(J,{type:"geojson",data:q}),x.addLayer({id:ms,type:"circle",source:J,paint:{"circle-color":"#10b981","circle-radius":9,"circle-opacity":.2}}),x.addLayer({id:ps,type:"circle",source:J,paint:{"circle-color":"#10b981","circle-radius":4,"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),x.addLayer({id:fs,type:"symbol",source:J,layout:{"text-field":["get","callsign"],"text-font":["Open Sans Semibold","Arial Unicode MS Bold"],"text-size":10,"text-offset":[0,1.2],"text-anchor":"top","text-allow-overlap":!0},paint:{"text-color":"#10b981","text-halo-color":d==="light"?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.85)","text-halo-width":1.2}}))};return x.once("load",D),Se(x)&&D(),()=>{A=!0,x.off("load",D)}},[m,d]),h?null:e.jsxs("div",{style:{height:s},className:"relative overflow-hidden rounded-xl border border-border bg-bg",children:[e.jsx("div",{ref:i,className:"h-full w-full"}),l&&e.jsx("div",{className:"absolute inset-0 grid place-items-center text-[12px] text-fg-3",children:u("map.minimap_loading",{defaultValue:"Loading…"})}),!l&&t.length===0&&e.jsx("div",{className:"absolute inset-0 grid place-items-center text-[12px] text-fg-3",children:u("map.minimap_no_track",{defaultValue:"No track data"})}),t.length>0&&e.jsx("div",{className:"absolute left-2.5 top-2.5 inline-flex h-6 items-center gap-1.5 rounded-full border border-border bg-surface/85 px-2 text-[11px] text-fg-2 backdrop-blur",children:u("map.minimap_points",{count:t.length,defaultValue:"{{count}} points"})}),t.length>0&&w&&p&&e.jsxs("div",{className:"absolute right-2.5 top-2.5 inline-flex max-w-[60%] items-center gap-1.5 rounded-full border border-border bg-surface/85 px-2 py-1 text-[10.5px] text-fg-3 backdrop-blur",children:[e.jsx("span",{"aria-hidden":"true",children:"📡"}),e.jsx("span",{className:"truncate",children:u("heard.farthest_igate_far",{callsign:p.callsign,km:Math.round(f==="imperial"?y*.621371:y),unit:Ae(f),defaultValue:"Farthest IGate {{callsign}} ({{km}} {{unit}} — range overlay disabled)"})})]}),t.length>0&&e.jsxs("div",{className:"absolute bottom-2.5 left-2.5 inline-flex items-center gap-1.5 rounded-full border border-border bg-surface/85 px-2 py-1 text-[10px] font-mono text-fg-3 backdrop-blur",children:[e.jsx("span",{className:"inline-block h-1 w-7 rounded-full",style:{background:"linear-gradient(90deg,#06b6d4,#34d399,#f59e0b,#ef4444)"}}),u("map.minimap_speed",{defaultValue:"speed"})]})]})}const se=100,O=2;function bs(t){if(!Number.isFinite(t))return"—";const s=Math.abs(t);return s>=100?t.toFixed(0):s>=10?t.toFixed(1).replace(/\.0$/,""):t.toFixed(2).replace(/\.?0+$/,"")}function _s(t){const s=new Date(t),l=Date.now(),a=new Date(l).toDateString()===s.toDateString(),r=String(s.getHours()).padStart(2,"0"),c=String(s.getMinutes()).padStart(2,"0");if(a)return`${r}:${c}`;const o=String(s.getDate()).padStart(2,"0"),i=String(s.getMonth()+1).padStart(2,"0");return`${o}.${i} ${r}:${c}`}function We({points:t,color:s,unit:l="",height:a=32,formatValue:r=bs,formatTime:c=_s}){const o=b.useRef(null),[i,n]=b.useState(null),{polyline:d,min:f,max:u}=b.useMemo(()=>{const p=t.map(_=>_.v),y=Math.min(...p),w=Math.max(...p),m=w-y||1;return{polyline:t.map((_,$)=>{const x=$/Math.max(t.length-1,1)*se,A=O+(1-(_.v-y)/m)*(a-O*2);return`${x},${A}`}).join(" "),min:y,max:w}},[t,a]),h=p=>{const y=o.current;if(!y||t.length<2)return;const w=y.getBoundingClientRect(),m=Math.max(0,Math.min(1,(p-w.left)/w.width)),S=Math.round(m*(t.length-1)),_=S/(t.length-1)*se;n({idx:S,x:_,pxX:m*w.width})},g=i!=null?O+(1-(t[i.idx].v-f)/(u-f||1))*(a-O*2):null;return e.jsxs("div",{ref:o,className:"relative",onMouseMove:p=>h(p.clientX),onMouseLeave:()=>n(null),onTouchStart:p=>h(p.touches[0].clientX),onTouchMove:p=>h(p.touches[0].clientX),onTouchEnd:()=>n(null),style:{height:a,touchAction:"none"},children:[e.jsxs("svg",{viewBox:`0 0 ${se} ${a}`,preserveAspectRatio:"none",className:"block h-full w-full",children:[e.jsx("line",{x1:0,y1:a-O,x2:se,y2:a-O,stroke:"rgb(var(--c-border))",strokeWidth:.4,vectorEffect:"non-scaling-stroke"}),e.jsx("polyline",{points:d,fill:"none",stroke:s,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke",strokeLinecap:"round",strokeLinejoin:"round"}),i&&g!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:i.x,y1:0,x2:i.x,y2:a,stroke:s,strokeWidth:.6,strokeDasharray:"2 2",vectorEffect:"non-scaling-stroke",opacity:.6}),e.jsx("circle",{cx:i.x,cy:g,r:2.6,fill:s,stroke:"#fff",strokeWidth:.8,vectorEffect:"non-scaling-stroke"})]})]}),i&&e.jsxs("div",{className:"pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-full rounded-md border border-border bg-surface/95 px-2 py-1 text-[11px] backdrop-blur shadow-lg whitespace-nowrap",style:{left:i.pxX,top:-6},children:[e.jsx("div",{className:"font-mono text-[10px] text-fg-3",children:c(t[i.idx].t)}),e.jsxs("div",{className:"font-mono text-[12px] font-semibold text-fg",children:[r(t[i.idx].v),l&&e.jsx("span",{className:"ml-1 text-[10px] text-fg-3",children:l})]})]})]})}function H(t,s){for(let l=t.length-1;l>=0;l--){const a=t[l][s];if(a!=null&&Number.isFinite(a))return{v:a,time:t[l].time}}return null}function js({samples:t}){const{t:s}=v(),l=Y(g=>g.units);if(t.length===0)return null;const a=H(t,"temp_c"),r=H(t,"humidity"),c=H(t,"pressure_hpa"),o=H(t,"wind_speed_ms"),i=H(t,"wind_gust_ms"),n=H(t,"wind_dir_deg"),d=H(t,"rain_1h_mm"),f=H(t,"rain_24h_mm"),u=[];
1if(a){const g=it(a.v,l);u.push({icon:be,label:s("weather.temperature",{defaultValue:"Temperature"}),value:`${g.value} ${g.unit}`,accent:"text-warn"})}if(r&&u.push({icon:Ue,label:s("weather.humidity",{defaultValue:"Humidity"}),value:`${Math.round(r.v)} %`,accent:"text-info"}),c){const g=ot(c.v,l);u.push({icon:Ke,label:s("weather.pressure",{defaultValue:"Pressure"}),value:`${g.value} ${g.unit}`,accent:"text-[#c084fc]"})}if(o){const g=Q(o.v*3.6,l),p=i&&i.v>o.v?Q(i.v*3.6,l):null,y=p?` (${s("weather.gust",{defaultValue:"gust"})} ${p.value})`:"";u.push({icon:Ve,label:s("weather.wind",{defaultValue:"Wind"}),value:`${g.value} ${ct(l)}${y}`,accent:"text-info"})}if(n&&u.push({icon:ee,label:s("weather.wind_dir",{defaultValue:"Wind direction"}),value:`${Ie(n.v)} · ${String(Math.round(n.v)).padStart(3,"0")}°`,accent:"text-fg-2"}),d&&d.v>0&&u.push({icon:ne,label:s("station_detail.weather.rain_1h",{defaultValue:"Rain (1h)"}),value:`${d.v.toFixed(1)} mm`,accent:"text-info"}),f&&f.v>0&&u.push({icon:ne,label:s("station_detail.weather.rain_24h",{defaultValue:"Rain (24h)"}),value:`${f.v.toFixed(1)} mm`,accent:"text-info"}),u.length===0)return null;const h=t[t.length-1].time;return e.jsxs("section",{"aria-label":s("weather.title",{defaultValue:"Current weather"}),className:"rounded-xl border border-border bg-surface p-4",children:[e.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[e.jsx("h3",{className:"text-[13px] font-semibold tracking-tight text-fg",children:s("weather.title",{defaultValue:"Current weather"})}),e.jsx("span",{className:"text-[11px] text-fg-3",children:s("weather.last_updated",{rel:E(h),defaultValue:`updated ${E(h)}`})})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2.5 sm:grid-cols-3 lg:grid-cols-4",children:u.map(g=>{const p=g.icon;return e.jsxs("div",{className:"flex items-center gap-2.5 rounded-[10px] border border-border bg-surface2 px-2.5 py-2",children:[e.jsx("div",{className:"grid h-[26px] w-[26px] place-items-center rounded-md bg-surface3",children:e.jsx(p,{size:13,className:g.accent})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"mb-0.5 text-[9px] font-semibold uppercase tracking-wider text-fg-3",children:g.label}),e.jsx("div",{className:"truncate font-mono text-[12px] font-semibold text-fg",children:g.value})]})]},g.label)})})]})}function ys(t){for(let s=t.length-1;s>=0;s--)if(t[s].bits!=null)return t[s];return null}function Ns(t,s){const l=s??0,a=[];for(let r=0;r<8;r++){const c=t>>7-r&1,o=l>>7-r&1;a.push((c^o)===1)}return a}function vs({samples:t,meta:s}){const{t:l}=v(),a=ys(t);if(!a||a.bits==null)return null;const r=Ns(a.bits,s==null?void 0:s.bits_sense),c=((s==null?void 0:s.bit_names)??[]).map(o=>(o??"").trim());return e.jsxs("section",{"aria-label":l("station_detail.telemetry.bits_title",{defaultValue:"Digital bits"}),children:[e.jsxs("div",{className:"mb-2.5 flex items-baseline justify-between",children:[e.jsx("h3",{className:"text-[13px] font-semibold tracking-tight text-fg",children:l("station_detail.telemetry.bits_title",{defaultValue:"Digital bits"})}),e.jsx("span",{className:"text-[11px] text-fg-3",children:l("station_detail.telemetry.bits_sub",{rel:E(a.time),defaultValue:`as of ${E(a.time)}`})})]}),e.jsx("div",{className:"grid grid-cols-4 gap-2 rounded-xl border border-border bg-surface p-4 sm:grid-cols-8",children:r.map((o,i)=>{const n=c[i]||`B${i+1}`;return e.jsxs("div",{className:"flex flex-col items-center gap-1.5",role:"status","aria-label":`${n}: ${o?l("station_detail.telemetry.bit_on",{defaultValue:"on"}):l("station_detail.telemetry.bit_off",{defaultValue:"off"})}`,children:[e.jsx("span",{"aria-hidden":"true",className:`grid h-9 w-9 place-items-center rounded-full border ${o?"border-accent bg-accent/20 shadow-[0_0_8px_rgba(16,185,129,0.45)]":"border-border bg-surface2"}`,children:e.jsx("span",{className:`h-3.5 w-3.5 rounded-full ${o?"bg-accent":"bg-fg-4/40"}`})}),e.jsx("span",{className:"max-w-full truncate text-center font-mono text-[10px] text-fg-3",children:n})]},i)})})]})}const ws={city:null,state:null,country:null,short:null};async function ks(t,s){const l=`https://nominatim.openstreetmap.org/reverse?lat=${t.toFixed(4)}&lon=${s.toFixed(4)}&format=json&zoom=10&accept-language=en&[email protected]`,a=await fetch(l);if(!a.ok)throw new Error(`nominatim ${a.status}`);const c=(await a.json()).address??{},o=c.city||c.town||c.village||c.hamlet||c.suburb||c.county||null,i=c.state||c.region||null,
1n=c.country||null;let d=null;return o&&n?d=`${o}, ${n}`:i&&n?d=`${i}, ${n}`:n&&(d=n),{city:o,state:i,country:n,short:d}}function Ss(t,s){const l=typeof t=="number"&&typeof s=="number";return R({queryKey:["geocode",l?t.toFixed(4):null,l?s.toFixed(4):null],queryFn:()=>l?ks(t,s):Promise.resolve(ws),enabled:l,staleTime:1/0,gcTime:3600*1e3,retry:1})}const Ye={weather:{slug:"aprs-weather-stations",label:"How APRS weather stations report"},digipeater:{slug:"aprs-digipeater-explained",label:"What an APRS digipeater does"},igate:{slug:"aprs-igate-setup",label:"How to set up an APRS iGate"},balloon:{slug:"aprs-balloon-tracking",label:"Tracking high-altitude balloons on APRS"},mobile:{slug:"aprs-smart-beaconing-explained",label:"SmartBeaconing for stations on the move"},boat:{slug:"aprs-smart-beaconing-explained",label:"SmartBeaconing for stations on the move"},aircraft:{slug:"aprs-balloon-tracking",label:"Tracking airborne APRS stations"},airport:{slug:"aprs-weather-stations",label:"Reading APRS weather and METAR beacons"},fixed:{slug:"aprs-software",label:"APRS software for a fixed station"}},Oe={slug:"what-is-aprs",label:"What APRS is and how it works"},Qe={US:{slug:"aprs-frequency-usa",label:"APRS frequency in the United States"},CA:{slug:"aprs-frequency-canada",label:"APRS frequency in Canada"},GB:{slug:"aprs-frequency-uk",label:"APRS frequency in the UK"}},Fs=new Set(["AD","AL","AT","BA","BE","BG","BY","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SK","SM","TR","UA","VA","XK"]),Xe={slug:"aprs-frequency-europe",label:"APRS frequency across Europe"},ge={slug:"aprs-frequencies-by-country",label:"APRS frequencies by country"},Ze={slug:"aprs-ssid-list",label:"What the SSID after a callsign means"},Je={slug:"aprs-symbols-explained",label:"APRS symbols explained"},et={slug:"lora-aprs-explained",label:"How LoRa APRS trackers work"},Rs=/\b(lora|lo-?ra[\s-]?aprs|ttgo|heltec|t-?beam)\b/i;function Es(t){if(!t||!/^[A-Za-z]{2}$/.test(t))return ge;const s=t.toUpperCase();return Qe[s]??(Fs.has(s)?Xe:ge)}function $s(t){const{typeKey:s,iso2:l,callsign:a,comment:r}=t,c=[],o=s&&Ye[s.toLowerCase()]||Oe;c.push(o),c.push(Es(l));const i=typeof a=="string"&&/-[A-Z0-9]{1,2}$/i.test(a);c.push(i?Ze:Je),r&&Rs.test(r)&&c.push(et);const n=new Set,d=[];for(const f of c)n.has(f.slug)||(n.add(f.slug),d.push(f));return d}Array.from(new Set([...Object.values(Ye).map(t=>t.slug),Oe.slug,...Object.values(Qe).map(t=>t.slug),Xe.slug,ge.slug,Ze.slug,Je.slug,et.slug]));const Ds=(t,s)=>s==="imperial"?Et(t):t,Cs=(t,s)=>s==="imperial"?$t(t):t,me=24,Ts={mobile:Yt,fixed:Wt,weather:ne,digipeater:Be,igate:zt,balloon:Bt,boat:Ge,aircraft:Gt,airport:Ht,unknown:He},As=["mobile","fixed","weather","digipeater","igate","balloon","boat","aircraft","airport","unknown"];function ga(){var Ne;const{t}=v(),l=rs()["*"]??"",a=is(),[r,c]=b.useState("overview"),[o,i]=b.useState(!1),{data:n,isLoading:d,error:f}=R({queryKey:["station",l],queryFn:()=>Tt(l),enabled:!!l,refetchInterval:3e4,retry:(F,T)=>((T==null?void 0:T.message)??"").includes("404")?!1:F<2}),u=(n==null?void 0:n.callsign)??l,{data:h=[]}=R({queryKey:["track",u,6],queryFn:()=>ke(u,6),enabled:!!l&&!!n}),{data:g=[]}=R({queryKey:["track",u,me],queryFn:()=>ke(u,me),enabled:!!l&&!!n}),{data:p=[]}=R({queryKey:["messages",u],queryFn:()=>At(u,100),enabled:!!l&&!!n,refetchInterval:3e4}),{data:y=[]}=R({queryKey:["raw",u,50],queryFn:()=>It(u,50),enabled:!!l&&!!n}),w=fe(F=>F.setHeardData),{data:m=null}=R({queryKey:["heard",u],queryFn:async()=>{const F=await Lt(u);return w(u,F),F},enabled:!!l&&!!n,staleTime:300*1e3}),{data:S=[]}=R({queryKey:["siblings",u],queryFn:()=>Mt(u),enabled:!!l&&!!n,staleTime:300*1e3}),_=n==null?void 0:n.lat,$=n==null?void 0:n.lon,{data:x}=Ss(Number.isFinite(_)?_:null,Number.isFinite($)?$:null);b.useEffect(()=>{i(!1)},[l]);const A=b.useRef(null);b.useEffect(()=>{var T;if(o||!n||((T=n.callsign)==null?void 0:T.toUpperCase())!==l.toUpperCase()||A.current===l)return;A.current=l;const F=Number.isFinite(n.lat)&&Number.isFinite(n.lon);c(F?"overview":"messages")},[n,l,o]);const L=n?we(n.station_type,n.comment):null,D=L&&As.includes(L)?t(`station_detail.type.${L}`):t("station_detail.type.station"),M=t("seo.station_title",{callsign:l,type:D}),I=t("seo.station_h1",{callsign:l,type:D}),j=f instanceof Error&&/→ 404$/.test(f.message.trim());if(d)return e.jsxs("div",{className:"grid h-full place-items-center bg-bg text-[13px] text-fg-3",children:[e.jsx(ce,{title:M,path:`/station/${encodeURIComponent(l)}`,image:`https://aprs.world/og/${encodeURIComponent(l)}.png`}),e.jsx("h1",{className:"sr-only",children:I}),t("common.loading")]});if(!n)return e.jsxs("div",{className:"grid h-full place-items-center bg-bg p-8",children:[e.jsx(ce,{title:M,description:t("seo.station_desc_no_pos",{callsign:l,when:"—"}),path:`/station/${encodeURIComponent(l)}`,image:`https://aprs.world/og/${encodeURIComponent(l)}.png`,noindex:j}),e.jsxs("div",{className:"max-w-md text-center",children:[e.jsx("h1",{className:"sr-only",children:I}),e.jsx("h2",{className:"font-mono text-2xl font-semibold text-fg",children:l}),e.jsx("p",{className:"mt-3 text-[13px] leading-relaxed text-fg-2",children:t("station_detail.missing_body")}),e.jsx("p",{className:"mt-2 text-[12px] text-fg-3",children:t("station_detail.missing_hint",{base:l.replace(/-\d+$/,"")})}),e.jsxs("button",{onClick:()=>a(-1),className:"mt-5 inline-flex items-center gap-2 rounded-lg bg-accent px-4 py-2 text-[13px] font-semibold text-[#052017] hover:bg-accent-strong transition",children:[e.jsx(Fe,{size:14})," ",t("station_detail.missing_back")]})]})]});const N=we(n.station_type,n.comment),P=Ts[N]??He,G=st(n.callsign),q=Xs(n.callsign),C=Number.isFinite(n.lat)&&Number.isFinite(n.lon),U=Pe(n.callsign),k=[{key:"overview",label:t("station_detail.tabs.overview")},{key:"history",label:t("station_detail.tabs.history"),pill:g.length||void 0},{key:"telemetry",label:t("station_detail.tabs.telemetry")},{key:"messages",label:t("station_detail.tabs.messages"),pill:p.length||void 0},{key:"raw",label:t("station_detail.tabs.raw"),pill:y.length||void 0}
1],V=D,B=C?t("seo.station_desc",{callsign:l,type:V,when:E(n.last_seen)}):t("seo.station_desc_no_pos",{callsign:l,when:E(n.last_seen)}),Z=M,at=dt([{name:"APRS World",url:"https://aprs.world/"},{name:t("nav.stations"),url:"https://aprs.world/stations"},{name:l,url:`https://aprs.world/station/${encodeURIComponent(l)}`}]),_e=C?ut(l,n.lat,n.lon,n.comment):null,je=C?xt({callsign:l,lat:n.lat,lon:n.lon,comment:n.comment,stationType:N,countryIso2:U,countryDisplayName:U?qe(U):null}):null,oe=[at];_e&&oe.push(_e),je&&oe.push(je);const ye=n.last_seen?Date.parse(n.last_seen):NaN,nt=(Number.isFinite(ye)?(Date.now()-ye)/864e5:1/0)>90&&!C&&!((Ne=n.comment)!=null&&Ne.trim());return e.jsxs("div",{className:"flex h-full flex-col bg-bg",children:[e.jsx(ce,{title:Z,description:B,path:`/station/${encodeURIComponent(l)}`,image:`https://aprs.world/og/${encodeURIComponent(l)}.png`,jsonLd:oe,noindex:nt}),e.jsx("header",{className:"border-b border-border bg-surface px-3 py-3 sm:px-7 sm:py-5",children:e.jsxs("div",{className:"mx-auto flex max-w-[1280px] items-start gap-2.5 sm:gap-4 md:pr-[clamp(0px,calc(var(--utility-cluster-w,163px)_+_762px_-_50vw),calc(var(--utility-cluster-w,163px)_-_16px))]",children:[e.jsx("button",{onClick:()=>a(-1),"aria-label":t("station_detail.aria.back"),className:"mt-1 grid h-9 w-9 place-items-center rounded-lg bg-surface3 text-fg-2 hover:text-fg transition",children:e.jsx(Fe,{size:16})}),n.symbol_table&&n.symbol_code?e.jsx("div",{className:"shrink-0",children:e.jsx(mt,{table:n.symbol_table,code:n.symbol_code,size:56,className:"rounded-xl"})}):e.jsx("div",{className:"grid h-14 w-14 shrink-0 place-items-center rounded-xl border border-emerald-500/40 bg-emerald-500/10 text-emerald-400",children:e.jsx(P,{size:26})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h1",{className:"sr-only",children:I}),e.jsxs("div",{className:"flex flex-wrap items-baseline gap-2.5",children:[e.jsx("span",{className:"font-mono text-2xl font-semibold tracking-tight text-fg",children:G}),q&&e.jsx("span",{className:"rounded bg-surface3 px-2 py-0.5 font-mono text-[13px] font-medium text-fg-2",children:q}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded bg-emerald-500/15 px-2 py-0.5 text-[11px] font-medium text-emerald-400",children:[e.jsx(P,{size:11})," ",V]}),n.ais_mmsi&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded bg-sky-500/15 px-2 py-0.5 text-[11px] font-medium text-sky-400",children:[e.jsx(Ge,{size:11})," AIS"]})]}),n.ais_mmsi&&e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-[13px]",children:[n.ais_vessel_name&&e.jsx("span",{className:"font-semibold text-fg",children:n.ais_vessel_name}),e.jsxs("span",{className:"text-fg-3",children:[t("station_detail.ais.mmsi",{defaultValue:"MMSI"})," ",n.ais_mmsi]})]}),e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-3 text-[12px] text-fg-2",children:[(()=>{const T=Date.now()-new Date(n.last_seen).getTime()<3600*1e3;return e.jsx("span",{className:"inline-flex items-center gap-1.5",children:T?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"relative inline-flex h-2 w-2",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-accent opacity-75"}),e.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-accent"})]}),e.jsx("span",{className:"font-medium text-fg",children:t("station_detail.live")}),e.jsxs("span",{children:["· ",t("station_detail.last_seen_short",{rel:E(n.last_seen)})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"inline-flex h-2 w-2 rounded-full bg-fg-4"}),e.jsx("span",{children:t("station_detail.last_seen_short",{rel:E(n.last_seen)})})]})})})(),C&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-fg-4",children:"•"}),e.jsxs("span",{className:"font-mono",children:[Math.abs(n.lat).toFixed(4),"° ",n.lat>=0?"N":"S",", ",Math.abs(n.lon).toFixed(4),"° ",n.lon>=0?"E":"W"]}),(x==null?void 0:x.short)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-fg-4",children:"•"}),e.jsx("span",{className:"text-fg-2",children:x.short})]})]}),e.jsx(Bs,{destination:n.destination??null,device:n.device}),e.jsx(Gs,{comment:n.comment??null})]})]}),e.jsx("div",{className:"hidden sm:block",children:e.jsx(Ce,{callsign:n.callsign})}),e.jsx("button",{onClick:()=>a("/"),"aria-label":t("station_detail.aria.close"),className:"grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-surface3 text-fg-2 hover:text-fg transition",children:e.jsx(Ot,{size:14})})]})}),e.jsx("h2",{className:"sr-only",children:t("station_detail.tabs.overview",{defaultValue:"Station details"})}),e.jsx("div",{className:"border-b border-border bg-surface",children:e.jsx("div",{className:"mx-auto flex max-w-[1280px] flex-nowrap gap-1 overflow-x-auto px-3 sm:px-7 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:k.map(F=>{const T=r===F.key;return e.jsxs("button",{onClick:()=>{c(F.key),i(!0)},className:`relative inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap px-3.5 py-3 text-[13px] font-medium transition ${T?"text-fg":"text-fg-3 hover:text-fg-2"}`,children:[F.label,F.pill!=null&&e.jsx("span",{className:`rounded px-1.5 py-px font-mono text-[10px] ${T?"bg-accent/15 text-accent-strong":"bg-surface3 text-fg-3"}`,children:F.pill}),T&&e.jsx("span",{className:"absolute inset-x-3 bottom-[-1px] h-[2px] rounded-t-sm bg-accent"})]},F.key)})})}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-[1280px] px-3 py-4 sm:px-7 sm:py-6",children:[r==="overview"&&e.jsxs(e.Fragment,{children:[e.jsx(Is,{station:n,track:h,heard:m}),e.jsx(zs,{siblings:S}),e.jsx(Ys,{station:n}),U&&e.jsx(Ws,{currentCallsign:n.callsign,iso2:U}),e.jsx(Qs,{callsign:n.callsign}),e.jsx(Os,{typeKey:N,iso2:U,callsign:n.callsign,comment:n.comment})]}
1),r==="history"&&e.jsx(Ls,{callsign:u,track:g,heard:m,hours:me,fallbackCenter:Number.isFinite(n.lat)&&Number.isFinite(n.lon)?{lat:n.lat,lon:n.lon}:null}),r==="telemetry"&&e.jsx(Ms,{callsign:u}),r==="messages"&&e.jsx(Ps,{callsign:u,messages:p,stationType:N}),r==="raw"&&e.jsx(qs,{packets:y})]})}),e.jsx("footer",{className:"shrink-0 border-t border-border bg-surface px-3 py-3 sm:px-7 sm:py-3.5",style:{paddingBottom:"max(0.75rem, env(safe-area-inset-bottom))"},children:e.jsxs("div",{className:"mx-auto flex max-w-[1280px] flex-wrap items-center gap-2 sm:gap-2.5",children:[e.jsxs("button",{onClick:()=>{c("messages"),i(!0)},className:"inline-flex h-[38px] flex-1 items-center justify-center gap-2 rounded-lg bg-accent px-3.5 text-[13px] font-semibold text-[#052017] hover:bg-accent-strong transition sm:flex-initial",children:[e.jsx(Qt,{size:13})," ",t("station_detail.footer.send_message")]}),e.jsx(Ce,{callsign:n.callsign,compact:!0}),e.jsxs(K,{to:"/me",className:"inline-flex h-[38px] flex-1 items-center justify-center gap-2 rounded-lg border border-border bg-surface2 px-3.5 text-[13px] font-medium text-fg-2 hover:text-fg transition sm:flex-initial",children:[e.jsx(Be,{size:13})," ",t("station_detail.footer.use_as_beacon")]})]})})]})}function Is({station:t,track:s,heard:l}){const{t:a}=v(),r=Y(u=>u.units),c=Number.isFinite(t.lat)&&Number.isFinite(t.lon),o=t.last_path?t.last_path.split(","):[],i=bt(t.comment),n=_t(i),{data:d=[]}=R({queryKey:["wx",t.callsign,24],queryFn:()=>Me(t.callsign,24),refetchInterval:6e4,staleTime:3e4}),f=d.length>0;return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3",children:[e.jsx(W,{icon:Jt,label:a("station_detail.stat.location"),value:c?`${Math.abs(t.lat).toFixed(4)}° ${t.lat>=0?"N":"S"}`:"—",sub:c?`${Math.abs(t.lon).toFixed(4)}° ${t.lon>=0?"E":"W"}`:void 0}),e.jsx(Us,{station:t}),e.jsx(W,{icon:le,label:a("station_detail.stat.speed"),value:t.speed_kmh!=null?Q(t.speed_kmh,r).value:"0",unit:Q(t.speed_kmh??0,r).unit}),e.jsx(W,{icon:Re,label:a("station_detail.stat.course"),value:t.course_deg!=null?`${String(Math.round(t.course_deg)).padStart(3,"0")}°`:"—",sub:t.course_deg!=null?Ie(t.course_deg):void 0}),e.jsx(W,{icon:Re,label:a("station_detail.stat.altitude"),value:t.altitude_m!=null?ae(t.altitude_m,r).value:"—",unit:t.altitude_m!=null?ae(t.altitude_m,r).unit:void 0}),e.jsx(W,{icon:le,label:a("station_detail.stat.last_packet"),value:E(t.last_seen),mono:!1})]}),(()=>{const u=jt(t.comment);return u?e.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-surface px-4 py-3.5",children:[e.jsx("span",{className:"w-[3px] self-stretch rounded-sm bg-accent"}),e.jsx("span",{className:"font-mono text-[12px] text-fg-3",children:"›"}),e.jsx("span",{className:"text-[13px] leading-relaxed text-fg-2",children:u})]}):null})(),n&&e.jsx(he,{title:a("station_detail.section.anlik_veri"),children:e.jsx(yt,{parsed:i})}),f&&e.jsx(js,{samples:d}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(re,{title:a("station_detail.section.history_title"),sub:a("station_detail.section.history_sub_6h")}),e.jsx(ze,{points:s??[],height:220,heard:l,fallbackCenter:Number.isFinite(t.lat)&&Number.isFinite(t.lon)?{lat:t.lat,lon:t.lon}:null}),e.jsx(tt,{heard:l})]}),e.jsxs("div",{children:[e.jsx(re,{title:a("station_detail.section.path_title"),sub:o.length>0?a("station_detail.section.path_hops",{count:o.length}):void 0}),e.jsx(Ks,{source:t.callsign,path:o})]})]})]})}function Ls({callsign:t,track:s,heard:l,hours:a,fallbackCenter:r}){const{t:c}=v(),o=Y(n=>n.units),i=c("station_detail.section.history_count_window",{count:s.length,hours:a,defaultValue:c("station_detail.section.history_count",{count:s.length})});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(re,{title:c("station_detail.section.history_full_title_window",{hours:a,defaultValue:c("station_detail.section.history_full_title")}),sub:i}),e.jsx(ze,{points:s,height:300,heard:l,interactive:!0,fallbackCenter:r}),e.jsx(tt,{heard:l}),s.length===0&&e.jsx(X,{text:c("station_detail.section.no_history_window",{hours:a,defaultValue:c("station_detail.section.no_history",{defaultValue:c("station_detail.section.no_path")})})}),s.length>0&&e.jsx("div",{className:"overflow-hidden rounded-xl border border-border",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"border-b border-border bg-surface text-[10.5px] uppercase tracking-wider text-fg-3",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2.5 text-left",children:c("station_detail.table.time")}),e.jsx("th",{className:"px-3 py-2.5 text-left",children:c("station_detail.table.location")}),e.jsx("th",{className:"px-3 py-2.5 text-right",children:c("station_detail.table.speed")}),e.jsx("th",{className:"px-3 py-2.5 text-right",children:c("station_detail.table.course")}),e.jsx("th",{className:"px-4 py-2.5 text-right",children:c("station_detail.table.altitude")})]})}),e.jsx("tbody",{children:[...s].reverse().map((n,d)=>e.jsxs("tr",{className:"border-b border-border last:border-b-0 odd:bg-surface/50",children:[e.jsx("td",{className:"px-4 py-2 text-[12px] text-fg-2",children:E(n.time)}),e.jsxs("td",{className:"px-3 py-2 font-mono text-[11.5px] text-fg-3",children:[n.lat.toFixed(4),", ",n.lon.toFixed(4)]}),e.jsx("td",{className:"px-3 py-2 text-right text-[12px] text-fg-2",children:n.speed_kmh==null?"—":`${Q(n.speed_kmh,o).value} ${Q(n.speed_kmh,o).unit}`}),e.jsx("td",{className:"px-3 py-2 text-right text-[12px] text-fg-2",children:n.course_deg==null?"—":`${String(Math.round(n.course_deg)).padStart(3,"0")}°`}),e.jsx("td",{className:"px-4 py-2 text-right text-[12px] text-fg-2",children:n.altitude_m==null?"—":`${ae(n.altitude_m,o).value} ${ae(n.altitude_m,o).unit}`})]},d))})]})})]})}function Ms({callsign:t}){const{t:s}=v(),l=Y(i=>i.units),{data:a}=R({queryKey:["tel",t,24],queryFn:()=>Pt(t,24)}),{data:r=[]}=R({queryKey:["wx",t,24],queryFn:()=>Me(t,24)}),c=r.length>0,o=b.useMemo(()=>Zs((a==null?void 0:a.samples)??[],(a==null?void 0:a.meta)??null,i=>s("station_detail.telemetry.channel_n",{n:i})),[a,s]);return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(he,{title:s("station_detail.section.telemetry_title"),sub:s("station_detail.section.telemetry_sub",{count:(a==null?void 0:a.samples.length)??0}),children:o.length===0?e.jsx(X,{text:s("station_detail.section.no_telemetry")}):e.jsx("div",{className:"flex flex-col gap-3.5 rounded-xl border border-border bg-surface p-4",children:o.map(i=>e.jsx(ea,{...i},i.label))})}),e.jsx(vs,{samples:(a==null?void 0:a.samples)??[],meta:(a==null?void 0:a.meta)??null}),c&&e.jsx(he,{title:s("station_detail.section.weather_title"),sub:s("station_detail.section.weather_sub",{count:r.length}),children:r.length<2?e.jsx(X,{text:s("station_detail.section.no_weather")}):e.jsxs("div",{className:"grid grid-cols-1 gap-5 rounded-xl border border-border bg-surface p-4 sm:grid-cols-2",children:[e.jsx(z,{icon:be,label:s("station_detail.weather.temp"),unit:vt(l),pairs:r.map(i=>({t:Date.parse(i.time),v:i.temp_c==null?null:Ds(i.temp_c,l)})),color:"#f59e0b"}),e.jsx(z,{icon:Ue,label:s("station_detail.weather.humidity"),unit:"%",pairs:r.map(i=>({t:Date.parse(i.time),v:i.humidity})),color:"#06b6d4"}),e.jsx(z,{icon:Ke,label:s("station_detail.weather.pressure"),unit:wt(l),pairs:r.map(i=>({t:Date.parse(i.time),v:i.pressure_hpa==null?null:Cs(i.pressure_hpa,l)}
1)),color:"#a855f7"}),e.jsx(z,{icon:Ve,label:s("station_detail.weather.wind"),unit:"m/s",pairs:r.map(i=>({t:Date.parse(i.time),v:i.wind_speed_ms})),color:"#10b981"}),e.jsx(z,{icon:ee,label:s("station_detail.weather.wind_direction"),unit:"°",pairs:r.map(i=>({t:Date.parse(i.time),v:i.wind_dir_deg})),color:"#0ea5e9"}),e.jsx(z,{icon:ne,label:s("station_detail.weather.rain_1h"),unit:"mm",pairs:r.map(i=>({t:Date.parse(i.time),v:i.rain_1h_mm})),color:"#38bdf8"}),e.jsx(z,{icon:es,label:s("station_detail.weather.rain_24h"),unit:"mm",pairs:r.map(i=>({t:Date.parse(i.time),v:i.rain_24h_mm})),color:"#0ea5e9"})]})})]})}function Ps({callsign:t,messages:s,stationType:l}){const{t:a}=v(),r=Le(j=>j.user),{open:c}=kt(),o=Te(),[i,n]=b.useState(""),[d,f]=b.useState(!1),[u,h]=b.useState(null),[g,p]=b.useState(!1),y=!r,w=!!r&&!r.callsign,m=!!r&&!!r.callsign&&!r.hasAprsPasscode,S=!!r&&!!r.callsign,{data:_}=R({queryKey:["quota"],queryFn:qt,enabled:S,staleTime:3e4}),$=(_==null?void 0:_.used)??0,x=(_==null?void 0:_.limit)??10,L=((_==null?void 0:_.is_premium)??!1)||x<=0,D=!L&&(g||S&&$>=x),M=async()=>{if(h(null),y){c();return}if(w){h(a("messages.callsign_required"));return}if(!i.trim())return;f(!0);const j=await Dt(t,i.trim());if(f(!1),!j.ok){if(j.error==="daily_limit"){p(!0),o.invalidateQueries({queryKey:["quota"]});return}if(j.error==="airport_target_blocked"){h(a("messages.errors.airport_blocked"));return}h(Ct(a,j.error,j.message,"station_detail.messages.send_failed"));return}n(""),o.invalidateQueries({queryKey:["messages",t]}),o.invalidateQueries({queryKey:["quota"]})},I=l==="digipeater"||l==="igate";return e.jsxs("div",{className:"flex flex-col gap-4",children:[I&&e.jsx("div",{className:"rounded-lg border border-amber-500/40 bg-amber-500/10 px-3.5 py-2.5 text-[12px] text-amber-800 dark:text-amber-200",children:a("station_detail.messages.relay_warning",{type:a(`station_detail.type.${l}`)})}),D?e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl border border-amber-500/40 bg-amber-500/5 p-3.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ee,{size:15,className:"text-amber-600 dark:text-amber-400"}),e.jsx("p",{className:"text-[13px] font-semibold text-fg",children:a("quota.exceeded_title",{limit:x})})]}),e.jsx("p",{className:"text-[12px] leading-relaxed text-fg-2",children:a("quota.exceeded_body")}),e.jsxs(K,{to:"/upgrade",className:"inline-flex w-fit items-center gap-1.5 rounded-md bg-accent px-3.5 py-1.5 text-[12.5px] font-semibold text-[#052017] hover:bg-accent-strong transition",children:[e.jsx(Ee,{size:13})," ",a("quota.cta_get_app")]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("form",{onSubmit:j=>{j.preventDefault(),d||M()},className:"flex min-w-0 items-stretch gap-2 rounded-xl border border-border bg-surface p-2.5",children:[e.jsx("input",{value:i,onChange:j=>n(St(j.target.value)),maxLength:120,placeholder:a("station_detail.messages.send_placeholder",{callsign:t}),title:a("messages.composer.char_limit_tooltip")??"",className:"min-w-0 flex-1 rounded-md bg-surface2 px-3 py-2 text-[13px] text-fg outline-none placeholder:text-fg-4",disabled:d||w}),e.jsxs("button",{type:"submit",disabled:d||w||S&&!i.trim(),className:"inline-flex shrink-0 items-center gap-1.5 rounded-md bg-accent px-3.5 text-[12.5px] font-semibold text-[#052017] hover:bg-accent-strong transition disabled:opacity-60",children:[e.jsx(ts,{size:13})," ",a("station_detail.messages.send")]})]}),S&&_&&(L?e.jsxs("p",{className:"flex items-center gap-1.5 text-[11.5px] text-fg-3",children:[a("upgrade.values.unlimited"),e.jsx(lt,{variant:"owned"})]}):e.jsx("p",{className:`text-[11.5px] ${$/x>=.8?"text-amber-600 dark:text-amber-400":"text-fg-3"}`,children:a("quota.counter",{used:$,limit:x,remaining:Math.max(0,x-$)})}))]}),y&&e.jsxs("p",{className:"rounded-xl border border-border bg-surface px-4 py-3 text-[12px] text-fg-3",children:[a("messages.login_required")," ",e.jsx("button",{type:"button",onClick:c,className:"text-accent hover:underline",children:a("auth.email_login")})]}),w&&e.jsxs("p",{className:"rounded-xl border border-border bg-surface px-4 py-3 text-[12px] text-fg-3",children:[a("messages.callsign_required")," ",e.jsx(K,{to:"/me?section=account",className:"text-accent hover:underline",children:a("station_detail.messages.no_passcode_link")})]}),m&&e.jsxs("p",{className:"rounded-xl border border-border bg-surface px-4 py-3 text-[12px] text-fg-3",children:[a("messages.no_passcode_hint")," ",e.jsx(K,{to:"/me?section=account",className:"text-accent hover:underline",children:a("station_detail.messages.no_passcode_link")})]}),u&&e.jsx("p",{className:"text-[12px] text-danger",children:u}),(()=>{const j=s.filter(N=>!N.is_ack);return j.length===0?e.jsx(X,{text:a("station_detail.messages.empty")}):e.jsx("div",{className:"flex flex-col gap-1.5",children:[...j].reverse().map(N=>{const P=N.to_call===t;return e.jsxs("div",{className:`rounded-xl border border-border p-3 ${P?"bg-surface":"bg-accent/10"}`,children:[e.jsxs("div",{className:"flex items-baseline gap-2 text-[11px] text-fg-3",children:[e.jsx($e,{callsign:N.from_call,className:"font-mono font-medium text-fg-2 hover:text-accent"}),e.jsx("span",{children:"→"}),e.jsx($e,{callsign:N.to_call,className:"font-mono font-medium text-fg-2 hover:text-accent"}),e.jsx(ls,{m:N,onAfterCancel:()=>o.invalidateQueries({queryKey:["station-messages",t]})}),e.jsx("span",{className:"ml-auto",children:E(N.time)})]}),e.jsx("p",{className:"mt-1 text-[13px] text-fg",children:N.body})]},N.id)})})})()]})}function qs({packets:t}){const{t:s}=v();return t.length===0?e.jsx(X,{text:s("station_detail.section.no_packets")}):e.jsx("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-3",children:e.jsx("pre",{className:"font-mono text-[11.5px] leading-relaxed text-fg-2",children:t.map(l=>`${E(l.time).padEnd(14)} ${l.raw}`).join(`
2`)})})}function W({icon:t,label:s,value:l,sub:a,unit:r,mono:c=!0}){return e.jsxs("div",{className:"rounded-xl border border-border bg-surface px-4 py-3.5",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-fg-3",children:[e.jsx(t,{size:11,className:"text-fg-4"}),e.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider",children:s})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:`text-[18px] font-semibold tracking-tight text-fg ${c?"font-mono":""}`,children:l}),r&&e.jsx("span",{className:"font-mono text-[11px] text-fg-3",children:r})]}),a&&e.jsx("div",{className:"mt-1 font-mono text-[11px] text-fg-3",children:a})]})}function Us({station:t}){const{t:s}=v(),l=Y(d=>d.units),a=fe(d=>d.userLocation),r=fe(d=>d.setUserLocation),[c,o]=b.useState(!1),i=Number.isFinite(t.lat)&&Number.isFinite(t.lon);b.useEffect(()=>{var f;if(a||typeof navigator>"u"||!navigator.geolocation||!((f=navigator.permissions)!=null&&f.query))return;let d=!1;return navigator.permissions.query({name:"geolocation"}).then(u=>{d||u.state==="granted"&&navigator.geolocation.getCurrentPosition(h=>{d||r({lat:h.coords.latitude,lon:h.coords.longitude})},()=>{},{enableHighAccuracy:!1,timeout:8e3,maximumAge:6e4})}).catch(()=>{}),()=>{d=!0}},[a,r]);const n=()=>{typeof navigator>"u"||!navigator.geolocation||(o(!0),navigator.geolocation.getCurrentPosition(d=>{r({lat:d.coords.latitude,lon:d.coords.longitude}),o(!1)},()=>{o(!1)},{enableHighAccuracy:!1,timeout:8e3,maximumAge:6e4}))};if(!i)return e.jsx(W,{icon:ee,label:s("station_detail.stat.distance"),value:"—"});if(a){const d=pe({lat:a.lat,lon:a.lon},{lat:t.lat,lon:t.lon}),f=Ft(d,l);return e.jsx(W,{icon:ee,label:s("station_detail.stat.distance"),value:f.value,unit:f.unit})}return e.jsxs("div",{className:"rounded-xl border border-border bg-surface px-4 py-3.5",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-fg-3",children:[e.jsx(ee,{size:11,className:"text-fg-4"}),e.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider",children:s("station_detail.stat.distance")})]}),e.jsx("div",{className:"flex items-baseline gap-1",children:e.jsx("span",{className:"font-mono text-[18px] font-semibold tracking-tight text-fg",children:"—"})}
2),e.jsx("button",{type:"button",onClick:n,disabled:c,className:"mt-1.5 inline-flex items-center gap-1 rounded-md border border-accent/40 bg-accent/10 px-2 py-0.5 text-[11px] font-medium text-accent-strong hover:bg-accent/20 transition disabled:opacity-60",children:c?"…":s("panel.distance_grant_button")}),e.jsx("div",{className:"mt-1 font-mono text-[11px] text-fg-3",children:s("panel.distance_no_permission")})]})}function he({title:t,sub:s,children:l}){return e.jsxs("div",{children:[e.jsx(re,{title:t,sub:s}),l]})}function re({title:t,sub:s}){return e.jsxs("div",{className:"mb-2.5 flex items-center justify-between",children:[e.jsx("h3",{className:"text-[13px] font-semibold tracking-tight text-fg",children:t}),s&&e.jsx("span",{className:"text-[11px] text-fg-3",children:s})]})}function X({text:t}){return e.jsx("p",{className:"rounded-xl border border-border bg-surface px-4 py-6 text-center text-[12px] text-fg-3",children:t})}function tt({heard:t}){const{t:s}=v(),l=Y(d=>d.units);if(t===null||t.maxDistanceKm===0)return e.jsx("p",{className:"mt-2 rounded-lg border border-border bg-surface px-3 py-2 text-[11.5px] text-fg-3",children:s("heard.empty")});const r=d=>Math.round(l==="imperial"?d*.621371:d),c=Ae(l),o=t.lastPacketFarthestIgate,i=t.lastPacketMaxKm??0,n=!!o&&i>0&&(Math.abs(i-t.maxDistanceKm)>1||t.farthestIgate&&o.callsign!==t.farthestIgate.callsign);return e.jsxs("ul",{className:"mt-2 flex flex-col gap-1 rounded-lg border border-border bg-surface px-3 py-2 text-[11.5px] text-fg-2",children:[e.jsx("li",{className:"flex items-baseline justify-between gap-3",children:e.jsx("span",{className:"text-fg-3",children:s("heard.max_distance",{km:r(t.maxDistanceKm),unit:c})})}),t.farthestIgate&&e.jsx("li",{className:"flex items-baseline justify-between gap-3",children:e.jsx("span",{className:"truncate",children:e.jsx(K,{to:`/station/${encodeURIComponent(t.farthestIgate.callsign)}`,className:"font-mono text-accent hover:underline",children:s("heard.farthest_igate",{callsign:t.farthestIgate.callsign,km:r(t.farthestIgate.distanceKm),unit:c})})})}),n&&o&&e.jsxs(e.Fragment,{children:[e.jsx("li",{className:"mt-1 border-t border-border pt-1.5 text-fg-3",children:s("heard.last_packet_distance",{km:r(i),unit:c})}),e.jsx("li",{className:"flex items-baseline justify-between gap-3",children:e.jsx("span",{className:"truncate",children:e.jsx(K,{to:`/station/${encodeURIComponent(o.callsign)}`,className:"font-mono text-accent hover:underline",children:s("heard.last_packet_igate",{callsign:o.callsign,km:r(o.distanceKm),unit:c})})})})]}),e.jsx("li",{className:"text-fg-3",children:s("heard.heard_by_count",{count:t.heardByCount})})]})}function Ks({source:t,path:s}){const{t:l}=v();return s.length===0?e.jsx(X,{text:l("station_detail.section.no_path")}):e.jsxs("div",{className:"rounded-xl border border-border bg-surface px-5 py-4 font-mono text-[13px]",children:[e.jsx(De,{kind:"source",label:t,role:l("station_detail.path_role.source")}),s.map((a,r)=>{const c=a.endsWith("*"),o=a.replace(/\*$/,""),i=/^q[A-Z]+$/.test(o),n=/^T\d/i.test(o)||i,d=n?Rt(o):null,f=l(i?"station_detail.path_role.qconstruct":n?"station_detail.path_role.igate":c?"station_detail.path_role.used_digi":"station_detail.path_role.digi");return e.jsxs("div",{children:[e.jsx("div",{className:"ml-[5px] h-3.5 w-[2px] bg-border"}),e.jsx(De,{kind:n?"igate":"digi",label:o,role:f,flag:d})]},r)})]})}function De({kind:t,label:s,role:l,flag:a}){const r=t==="source"?"bg-accent border-accent shadow-[0_0_0_3px_rgba(16,185,129,0.25)]":t==="igate"?"bg-info border-info":"bg-surface2 border-border";return e.jsxs("div",{className:"flex items-center gap-3 py-2 text-fg",children:[e.jsx("span",{className:`h-3 w-3 shrink-0 rounded-full border-2 ${r}`}),a&&e.jsx("span",{className:"text-[14px] leading-none","aria-hidden":!0,children:a}),e.jsx("span",{children:s}),e.jsx("span",{className:"ml-auto text-[10px] font-medium uppercase tracking-wider text-fg-4",children:l})]})}const Vs=/\b(udp|tcp):\/\/[^\s\[\]]+/i;function Hs(t){if(!t)return null;const s=Vs.exec(t);return s?s[0]:null}function Gs({comment:t}){const{t:s}=v(),l=Hs(t);return l?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-fg-4",children:"•"}),e.jsxs("span",{title:l,className:"inline-flex items-center gap-1 rounded-full border border-blue-500/40 bg-blue-500/10 px-2 py-0.5 text-[10.5px] font-medium text-blue-700 dark:text-blue-300",children:["🌐 ",s("station_detail.ip_gateway")]})]}):null}function Bs({destination:t,device:s}){const{t:l}=v(),a=pt(t);if(!a&&!s)return null;const r=(a==null?void 0:a.tier)??"unknown",c=r==="full"?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":r==="partial"?"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300":r==="tracker"?"border-fg-4/40 bg-surface3 text-fg-3":r==="bot"?"border-blue-500/40 bg-blue-500/10 text-blue-700 dark:text-blue-300":"border-border bg-surface3 text-fg-3",o=s?ft(s):a.model?`${a.brand} ${a.model}`:a.brand,i=[(s==null?void 0:s.name)??o,(s==null?void 0:s.os)||null,r==="unknown"?null:l(`station_detail.tier.${r}
2`)].filter(Boolean).join(" · ");return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-fg-4",children:"•"}),e.jsxs("span",{title:i,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10.5px] font-medium ${c}`,children:["📻 ",o]})]})}function zs({siblings:t}){const{t:s}=v();return t.length===0?null:e.jsxs("section",{className:"mt-6 rounded-xl border border-border bg-surface p-4",children:[e.jsx("h3",{className:"mb-3 text-[13px] font-semibold text-fg-2",children:s("station_detail.siblings_title")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(l=>{const r=Date.now()-new Date(l.last_seen).getTime()<3600*1e3;return e.jsxs(K,{to:`/station/${encodeURIComponent(l.callsign)}`,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-surface2 px-3 py-1.5 text-[12.5px] transition hover:border-accent/40 hover:bg-surface3",children:[e.jsx("span",{className:`inline-flex h-1.5 w-1.5 shrink-0 rounded-full ${r?"bg-accent":"bg-fg-4"}`}),e.jsx("span",{className:"font-mono font-semibold text-fg",children:l.callsign}),e.jsx("span",{className:"text-[11px] text-fg-3",children:E(l.last_seen)})]},l.callsign)})})]})}function Ws({currentCallsign:t,iso2:s}){const{t:l}=v(),{data:a}=R({queryKey:["stations-all"],queryFn:()=>Ut(86400),staleTime:300*1e3}),r=b.useMemo(()=>{if(!a||a.length===0)return[];const i=t.toUpperCase().split("-")[0],n=new Set,d=[],f=[...a].sort((u,h)=>{const g=Date.parse(u.last_seen),p=Date.parse(h.last_seen);return(Number.isFinite(p)?p:0)-(Number.isFinite(g)?g:0)});for(const u of f){if(Pe(u.callsign)!==s)continue;const h=u.callsign.toUpperCase().split("-")[0];if(h!==i&&!n.has(h)&&(n.add(h),d.push(u),d.length>=8))break}return d},[a,s,t]);if(r.length===0)return null;const c=qe(s);return e.jsxs("section",{className:"mt-6 rounded-xl border border-border bg-surface p-4",children:[e.jsx("h3",{className:"mb-3 text-[13px] font-semibold text-fg-2",children:l("station_detail.country_strip_title",{country:c,defaultValue:"Stations in {{country}}"})}),e.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(o=>{const i=Date.now()-new Date(o.last_seen).getTime(),n=Number.isFinite(i)&&i<3600*1e3;return e.jsxs(K,{to:`/station/${encodeURIComponent(o.callsign)}`,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-surface2 px-3 py-1.5 text-[12.5px] transition hover:border-accent/40 hover:bg-surface3",children:[e.jsx("span",{className:`inline-flex h-1.5 w-1.5 shrink-0 rounded-full ${n?"bg-accent":"bg-fg-4"}`}),e.jsx("span",{className:"font-mono font-semibold text-fg",children:o.callsign}),e.jsx("span",{className:"text-[11px] text-fg-3",children:E(o.last_seen)})]},o.callsign)})}),e.jsx(K,{to:`/stations/country/${encodeURIComponent(s)}`,className:"mt-3 inline-block text-[12px] text-fg-3 hover:text-fg-2 transition",children:l("station_detail.country_strip_view_all",{country:c,defaultValue:"See all stations in {{country}} →"})})]})}function Ys({station:t}){const{t:s}=v(),l=st(t.callsign);return l!==t.callsign?e.jsxs("section",{className:"mt-6 rounded-xl border border-border bg-surface p-4",children:[e.jsx("h3",{className:"mb-3 text-[13px] font-semibold text-fg-2",children:s("station_detail.operator_hub_title",{base:l,defaultValue:"More from operator {{base}}"})}),e.jsxs(K,{to:`/station/${encodeURIComponent(l)}`,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-surface2 px-3 py-2 text-[12.5px] transition hover:border-accent/40 hover:bg-surface3",children:[e.jsx("span",{className:"font-mono font-semibold text-fg",children:l}),e.jsx("span",{className:"text-[11px] text-fg-3",children:s("station_detail.operator_hub_open",{defaultValue:"Open operator profile →"})})]})]}):null}function Os({typeKey:t,iso2:s,callsign:l,comment:a}){const{t:r}=v(),c=$s({typeKey:t,iso2:s,callsign:l,comment:a});return c.length===0?null:e.jsxs("section",{className:"mt-6 rounded-xl border border-border bg-surface p-4",children:[e.jsx("h3",{className:"mb-3 text-[13px] font-semibold text-fg-2",children:r("station_detail.guides_title",{defaultValue:"Guides for this kind of station"})}),e.jsx("div",{className:"flex flex-col gap-2",children:c.map(o=>e.jsx(Nt,{slug:o.slug,className:"text-[12.5px] text-fg-2 transition hover:text-accent",children:r(`station_detail.guides.${o.slug}`,{defaultValue:o.label})},o.slug))})]})}function Qs({callsign:t}){const{t:s}=v(),[l,a]=b.useState(null),[r,c]=b.useState(!1),o=`https://aprs.world/station/${encodeURIComponent(t)}`,i=`<a href="${o}">Live APRS map for ${t} — aprs.world</a>`,n=`Live APRS map for ${t}: ${o}`,d=async(u,h)=>{try{await navigator.clipboard.writeText(h),c(!1),a(u),window.setTimeout(()=>a(null),2e3)}catch{c(!0)}},f=(u,h,g)=>e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("span",{className:"text-[11px] uppercase tracking-wide text-fg-3",children:h}),e.jsxs("div",{className:"flex items-stretch gap-2",children:[e.jsx("input",{readOnly:!0,value:g,onFocus:p=>p.currentTarget.select(),"aria-label":h,className:"min-w-0 flex-1 rounded-lg border border-border bg-surface2 px-2.5 py-2 font-mono text-[11.5px] text-fg-2 outline-none focus:border-accent/50"}),e.jsxs("button",{type:"button",onClick:()=>d(u,g),className:"inline-flex shrink-0 items-center gap-1.5 rounded-lg border border-border bg-surface2 px-3 text-[12px] font-medium text-fg-2 transition hover:border-accent/40 hover:text-fg",children:[l===u?e.jsx(ss,{size:13}):e.jsx(as,{size:13}),l===u?s("station_detail.link_card.copied",{defaultValue:"Copied"}):s("station_detail.link_card.copy",{defaultValue:"Copy"})]})]})]});return e.jsxs("section",{className:"mt-6 rounded-xl border border-border bg-surface p-4",children:[e.jsx("h3",{className:"mb-1.5 text-[13px] font-semibold text-fg-2",children:s("station_detail.link_card.title")}),e.jsx("p",{className:"mb-3 text-[12px] leading-relaxed text-fg-3",children:s("station_detail.link_card.body",{callsign:t})}),e.jsxs("div",{className:"flex flex-col gap-3",children:[f("html",s("station_detail.link_card.html_label"),i),f("text",s("station_detail.link_card.text_label"),n)]}),r&&e.jsx("p",{className:"mt-2.5 text-[12px] text-fg-3",children:s("station_detail.link_card.copy_failed")})]})}function Ce({callsign:t,compact:s=!1}){const{t:l}=v(),a=Le(d=>d.user),r=Te(),[c,o]=b.useState(!1),{data:i=[]}=R({queryKey:["friends",a==null?void 0:a.id],queryFn:Kt,enabled:!!a});if(!a)return null;const n=i.some(d=>d.callsign===t);return e.jsxs("button",{onClick:async()=>{try{n?await gt(t):await ht(t)}catch{o(!0);return}o(!1),r.invalidateQueries({queryKey:["friends"]})},title:c?l("station_detail.follow.failed"):void 0,className:`inline-flex items-center gap-1.5 rounded-lg border px-3 ${s?"h-[38px] text-[13px]":"h-9 text-[12px]"} font-medium transition ${n?"border-border bg-surface2 text-fg-2 hover:text-fg":"border-accent bg-accent/15 text-accent-strong hover:bg-accent/25"}`,children:[n?e.jsx(Xt,{size:13}):e.jsx(Zt,{size:13}),l(n?"station_detail.follow.unfollow":"station_detail.follow.follow")]})}function st(t){const s=t.indexOf("-");return s<0?t:t.slice(0,s)}function Xs(t){const s=t.indexOf("-");return s<0?"":t.slice(s)}function Zs(t,s,l){var c,o,i,n;const a=[],r=["ch1","ch2","ch3","ch4","ch5"];for(let d=0;d<r.length;d++){const f=r[d],u=[];for(const m of t){const S=m[f];S!=null&&u.push({t:Date.parse(m.time),v:S})}if(u.length<2)continue;const g=((o=(c=s==null?void 0:s.parm_names)==null?void 0:c[d])==null?void 0:o.trim())||""||l(d+1),p=((n=(i=s==null?void 0:s.unit_names)==null?void 0:i[d])==null?void 0:n.trim())||"",{icon:y,color:w}=Js(g);a.push({label:g,unit:p,points:u,last:u[u.length-1].v,color:w,icon:y})}return a}function Js(t){const s=t.toLowerCase();return/(volt|batt|pwr|powr|vin|vbat|akü|akku|bat\b)/.test(s)?{icon:ns,color:"#34d399"}:/(temp|sıcak|sicak|tmp|°c|degc)/.test(s)?{icon:be,color:"#f59e0b"}:/(rssi|signal|sinyal|snr|dbm)/.test(s)?{icon:le,color:"#38bdf8"}:{icon:le,color:"#94a3b8"}}function ea({label:t,unit:s,points:l,last:a,color:r,icon:c}){const o=l.map(i=>i.v);return e.jsxs("div",{className:"grid grid-cols-[28px_120px_1fr_100px] items-center gap-3",children:[e.jsx("div",{className:"grid h-7 w-7 place-items-center rounded-md bg-surface3 text-fg-2",style:{color:r},children:e.jsx(c,{size:14})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[13px] font-medium text-fg",children:t}),e.jsxs("div",{className:"mt-0.5 font-mono text-[10px] text-fg-3",children:[Math.min(...o).toFixed(2)," – ",Math.max(...o).toFixed(2)," ",s]})]}),e.jsx(We,{points:l,color:r,unit:s,formatValue:ie,height:32}),e.jsx("div",{className:"text-right",children:e.jsxs("div",{children:[e.jsx("span",{className:"font-mono text-[16px] font-semibold text-fg",children:ie(a)}),e.jsx("span",{className:"ml-1 font-mono text-[10px] text-fg-3",children:s})]})})]})}function z({icon:t,label:s,unit:l,pairs:a,color:r}){const c=a.filter(i=>i.v!=null);if(c.length<2)return e.jsxs("div",{className:"grid grid-cols-[28px_1fr_80px] items-center gap-3",children:[e.jsx("div",{className:"grid h-7 w-7 place-items-center rounded-md bg-surface3",style:{color:r},children:e.jsx(t,{size:14})}),e.jsx("div",{className:"text-[13px] text-fg-2",children:s}),e.jsx("div",{className:"text-right text-[12px] text-fg-3",children:"—"})]});const o=c[c.length-1].v;return e.jsxs("div",{className:"grid grid-cols-[28px_90px_1fr_70px] items-center gap-3",children:[e.jsx("div",{className:"grid h-7 w-7 place-items-center rounded-md bg-surface3",style:{color:r},children:e.jsx(t,{size:14})}),e.jsx("div",{className:"text-[12.5px] font-medium text-fg-2",children:s}),e.jsx(We,{points:c,color:r,unit:l,formatValue:ie,height:32}),e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"font-mono text-[14px] font-semibold text-fg",children:ie(o)}),e.jsx("span",{className:"ml-1 font-mono text-[10px] text-fg-3",children:l})]})]})}function ie(t){if(!Number.isFinite(t))return"—";const s=Math.abs(t);return s>=100?t.toFixed(0):s>=10?t.toFixed(1).replace(/\.0$/,""):t.toFixed(2).replace(/\.?0+$/,"")}export{ga as StationDetailPage};

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.