PageSourceSearch

https://meteo-tirana.vercel.app/assets/Records-C3rA2pqP.js

js meteo-tirana.vercel.app collected 2026-10-03 07:18:45 UTC 3,089 bytes, 1 lines download raw bytes

1import{u as g,r as d,j as e,h as f}from"./index-Cf1lsXu9.js";import{c as j,a as N}from"./api-CjwH1mOi.js";function x({icon:s,label:i,value:t,unit:o,at:a}){const{lang:m}=g(),l=r=>{if(!r)return"";const n=new Date(r);return isNaN(n.getTime())?r:`${f[m][n.getMonth()]} ${n.getDate()}, ${n.getFullYear()}`};return e.jsxs("div",{className:"bg-surface rounded-xl border border-line p-5 flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl leading-none",children:s}),e.jsx("span",{className:"text-sm text-mute font-medium",children:i})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"font-display text-4xl font-light tracking-[-.04em] text-ink",children:t!=null?t.toFixed(1):"—"}),e.jsx("span",{className:"text-lg text-mute",children:o})]}),a&&e.jsxs("span",{className:"text-xs text-mute",children:[m==="sq"?"Datë:":"On"," ",l(a)]})]})}function b(){const{t:s,lang:i}=g(),[t,o]=d.useState(null),[a,m]=d.useState([]),[l,r]=d.useState(!0),[n,u]=d.useState(null);d.useEffect(()=>{Promise.all([j(),N().catch(()=>[])]).then(([c,p])=>{o(c),m(p),r(!1)}).catch(c=>{u(String(c)),r(!1)})},[]);const h=a.length>0?Math.min(...a):null;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h1",{className:"text-sm font-semibold text-mute",children:s("records_title")}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-line-2",children:"·"}),e.jsxs("span",{className:"text-xs text-mute",children:[s("records_since")," ",h]})]})]}),l&&e.jsx("div",{className:"text-mute animate-pulse",children:s("loading")}),n&&!l&&e.jsxs("div",{className:"text-warm text-sm bg-surface border border-line rounded-lg px-4 py-2",children:["⚠️ ",s("no_data")]}),!l&&!n&&t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(x,{icon:"🌡️",label:s("record_hottest"),value:t.max_temp.value,unit:"°C",at:t.max_temp.at}),e.jsx(x,{icon:"🧊",label:s("record_coldest"),value:t.min_temp.value,unit:"°C",at:t.min_temp.at}),e.jsx(x,{icon:"💨",label:s("record_gust"),value:t.max_gust_kmh.value,unit:"km/h",at:t.max_gust_kmh.at}),e.jsx(x,{icon:"🌧️",label:s("record_rain"),value:t.max_daily_rain.value,unit:"mm",at:t.max_daily_rain.at})]}),a.length>0&&e.jsxs("div",{className:"bg-surface rounded-xl border border-line p-4",children:[e.jsx("h3",{className:"text-sm font-medium text-mute mb-3",children:i==="sq"?"Mbulimi i të dhënave":"Dataset Coverage"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(c=>e.jsx("span",{className:"px-2 py-0.5 rounded-md text-xs font-medium bg-surface-2 text-ink-2",children:c},c))}),e.jsxs("p",{className:"text-xs text-mute mt-2",children:[a.length," ",i==="sq"?`${a.length===1?"vit":"vite"} të dhënash`:`year${a.length!==1?"s":""} of data`," ","· ",i==="sq"?"Stacioni IQARKUIT2":"Station IQARKUIT2"]})]})]}),!l&&!n&&!t&&e.jsx("div",{className:"text-mute text-sm",children:s("no_data")})]})}export{b 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.