1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AisVesselMap-CAEscVK4.js","assets/vendor-react-EtBdcxzB.js","assets/vendor-maps-P0mk2Y29.js","assets/vendor-maps-Dgihpmma.css","assets/mapUtils-B35lV-A6.js","assets/maps-KIksgkz-.js","assets/geoData-BiFbAUJs.js","assets/main-nkazyCpV.js","assets/index-BvXTQ84m.css","assets/theme-CdTknw6K.js","assets/mapAttribution-BTr99jt9.js","assets/themeStore-C4WRP9Mt.js","assets/fullscreenControl-DdPzWXQs.js","assets/PortAvilesCard-DiRTLJEJ.js","assets/CollapsibleCard-BlPI6jw9.js","assets/minimize-2-BXJshPtz.js","assets/DataErrorState-D9g-1Bbk.js","assets/DataTable-ytqiePj4.js","assets/useDragScroll-SKGGiVKM.js","assets/TransportesPresentation-DmE6nSef.js","assets/AnimatedCounter-BmWf1sGb.js","assets/StaleIndicator-DT8Duqdl.js","assets/badge-BR504Tq6.js","assets/transportPresentation-Dx_kl3pf.js","assets/formatters-DEeARjJC.js","assets/ship-CkBwoG_Q.js","assets/mapPopup-B5rk8gES.js"])))=>i.map(i=>d[i]); 2import{r as n,j as e}from"./vendor-react-EtBdcxzB.js";import{$ as h,aG as f,a1 as g}from"./main-nkazyCpV.js";import{C as j}from"./CollapsibleCard-BlPI6jw9.js";import{D as N}from"./DataTable-ytqiePj4.js";import{D as b}from"./DataErrorState-D9g-1Bbk.js";import{C as S}from"./TransportesPresentation-DmE6nSef.js";import{A as d,a as w,P as y}from"./PortAvilesCard-DiRTLJEJ.js";import{b as c}from"./formatters-DEeARjJC.js";import"./minimize-2-BXJshPtz.js";import"./useDragScroll-SKGGiVKM.js";import"./AnimatedCounter-BmWf1sGb.js";import"./StaleIndicator-DT8Duqdl.js";import"./badge-BR504Tq6.js";import"./transportPresentation-Dx_kl3pf.js";import"./ship-CkBwoG_Q.js";const P=n.lazy(()=>g(()=>import("./AisVesselMap-CAEscVK4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]))),A=()=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex gap-2",children:[0,1].map(a=>e.jsx("div",{className:"h-6 w-24 rounded-full bg-muted-foreground/10 animate-pulse"},a))}),e.jsx("div",{className:"rounded-xl border border-border bg-card/50 p-4 animate-pulse space-y-2",children:[0,1,2].map(a=>e.jsx("div",{className:"h-3.5 rounded bg-muted-foreground/8",style:{width:`${85-a*12}%`}},a))})]});function E(){const{data:a,error:l,mutate:p}=h("ais-stream"),i=n.useRef(null);if(!a)return l?e.jsx(b,{onRetry:p}):e.jsx(A,{});const{vessels:r=[],count:o=0,inPort:x=0,atSea:u=0,fetchedAt:m}=a;return e.jsxs(j,{cardId:"transportes-ais-radar",className:"glass",title:e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"h-4 w-4 text-primary"})," Radar AIS â Costa de Asturias"]}),description:e.jsxs(e.Fragment,{children:["Señal AIS en tiempo real · ",o," embarcaciones",m&&e.jsxs(e.Fragment,{children:[" · ",new Date(m).toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit"})]})]}),children:[e.jsx(S,{error:l}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-emerald-500/15 text-emerald-400",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500"}),"En puerto: ",x]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-sky-500/15 text-sky-400",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-sky-500"}),"En mar: ",u]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-zinc-500/15 text-zinc-400",children:["Total: ",o]})]}),r.length>0&&e.jsx(n.Suspense,{fallback:e.jsx("div",{className:"-mx-5 w-auto bg-muted/30 flex items-center justify-center",style:{height:"clamp(350px, 50vh, 550px)"},children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Cargando mapaâ¦"})}),children:e.jsx(P,{ref:i,vessels:r})}),r.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No se detectaron embarcaciones en la última captura"}):e.jsx(N,{data:r,keyField:"mmsi",scrollable:{minW:"740px"},onClickRow:s=>{var t;return(t=i.current)==null?void 0:t.focusVessel(s.mmsi)},columns:[{header:"Buque",align:"left",className:"whitespace-nowrap",render:s=>{const t=d[s.shipType]??d.Otro;return e.jsxs(e.Fragment,{children:[e.jsxs("span",{title:s.shipType||"Desconocido",children:[t.emoji," "]}),e.jsx("span",{className:"font-semibold text-foreground",children:s.name||s.mmsi}),s.callSign&&e.jsxs("span",{className:"text-muted-foreground ml-1",children:[" (",s.callSign,")"]})]})}},{header:"Eslora",align:"right",className:"tabular-nums text-muted-foreground whitespace-nowrap",render:s=>s.length?e.jsxs(e.Fragment,{children:[s.length," m"]}):"â"},{header:"Velocidad",align:"left",className:"tabular-nums whitespace-nowrap",render:s=>s.speed!=null?e.jsxs(e.Fragment,{children:[c(s.speed,1)," kn"]}):"â"},{header:"Estado",align:"left",className:"text-muted-foreground whitespace-nowrap",render:s=>s.navStatusText||"â"},{header:"Destino",align:"left",className:"text-muted-foreground max-w-[150px] truncate",render:s=>s.destination||"â"},{header:"Puerto cercano",align:"left",className:"whitespace-nowrap",render:s=>{const t=s.inPort?"text-emerald-400 font-medium":"text-muted-foreground";return e.jsxs("span",{className:t,children:[w(s.nearestPort),s.distanceToPort!=null&&e.jsxs(e.Fragment,{children:[" (",c(s.distanceToPort,1)," km)"]})]})}}]}),e.jsx("p",{className:"text-[11px] text-muted-foreground text-center mt-3",children:"Fuente: AISStream.io"})]})}function q(){return e.jsxs(e.Fragment,{children:[e.jsx(y,{}),e.jsx(E,{})]})}
2export{q as default};
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.