1import{r as a,o as f,j as e,b as h,m as b,l as w}from"./index-XjcTDRdy.js";import{C as N}from"./circle-check-big-D8qaYZxt.js";import{S as j}from"./share-2-BMdwP-86.js";function _({slug:r,onBack:n}){const[t,d]=a.useState(null),[u,o]=a.useState(!0),[m,i]=a.useState(!1),[x,c]=a.useState(!1);a.useEffect(()=>{let s=!1;return o(!0),i(!1),f(r).then(l=>{s||d(l)}).catch(()=>{s||i(!0)}).finally(()=>{s||o(!1)}),()=>{s=!0}},[r]);const p=async()=>{try{await navigator.clipboard.writeText(window.location.href),c(!0),setTimeout(()=>c(!1),2e3)}catch{}};return u?e.jsxs("div",{className:"mx-auto w-full max-w-3xl px-4 sm:px-6 py-16 animate-pulse space-y-5","aria-busy":"true",children:[e.jsx("div",{className:"h-3 w-24 rounded bg-neutral-100"}),e.jsx("div",{className:"h-10 w-3/4 rounded-lg bg-neutral-100"}),e.jsx("div",{className:"h-4 w-1/3 rounded bg-neutral-100"}),e.jsx("div",{className:"space-y-3 pt-6",children:[...Array(8)].map((s,l)=>e.jsx("div",{className:`h-4 rounded bg-neutral-100 ${l%3===2?"w-2/3":"w-full"}`},l))})]}):m||!t?e.jsxs("div",{className:"mx-auto w-full max-w-3xl px-4 sm:px-6 py-24 text-center space-y-4",children:[e.jsx("h1",{className:"text-2xl font-bold text-neutral-900",children:"News not found"}),e.jsx("p",{className:"text-sm text-neutral-500",children:"It may have been unpublished or moved."}),e.jsx("button",{onClick:n,className:"inline-flex h-11 items-center justify-center rounded-xl bg-[#0C25A3] px-6 text-xs font-bold text-white cursor-pointer",children:"Back to News"})]}):e.jsxs("article",{className:"mx-auto w-full max-w-3xl px-4 sm:px-6 py-10 sm:py-14",children:[e.jsxs("button",{onClick:n,className:"group mb-8 inline-flex items-center gap-2 text-xs font-semibold text-neutral-500 hover:text-neutral-900 transition-colors cursor-pointer",children:[e.jsx(h,{className:"h-4 w-4 transition-transform group-hover:-translate-x-0.5"}),e.jsx("span",{children:"All News"})]}),e.jsxs(b.header,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider px-2.5 py-1 rounded-full bg-neutral-100 text-neutral-500",children:t.topic}),t.date&&e.jsx("span",{className:"inline-flex items-center gap-1 text-[11px] font-medium text-neutral-400",children:w(t.date)})]}),e.jsx("h1",{className:"text-3xl sm:text-4xl md:text-[42px] font-bold tracking-tight leading-[1.15] text-neutral-900",children:t.title}),t.thumb&&e.jsx("div",{className:"mt-6 aspect-video w-full rounded-xl overflow-hidden bg-neutral-100 border border-neutral-200/60",children:e.jsx("img",{src:t.thumb,alt:t.title,className:"h-full w-full object-cover",referrerPolicy:"no-referrer"})})]}),e.jsx("div",{className:`mt-10 text-[15px] sm:text-base leading-[1.85] text-neutral-700 2 [&>p]:mb-6 3 [&>h2]:text-xl [&>h2]:font-bold [&>h2]:text-neutral-900 [&>h2]:mt-10 [&>h2]:mb-3 4 [&>ul]:list-disc [&>ul]:pl-6 [&>ul]:mb-6 [&>ol]:list-decimal [&>ol]:pl-6 [&>ol]:mb-6 5 [&_li]:mb-2 6 [&_a]:text-[#0C25A3] [&_a]:underline [&_a]:underline-offset-2 7 [&_img]:rounded-xl [&_img]:my-8 [&_img]:w-full 8 [&_strong]:text-neutral-900`,dangerouslySetInnerHTML:{__html:t.body??""}}),e.jsx("footer",{className:"mt-12 pt-8 border-t border-neutral-150 flex flex-wrap items-center gap-3",children:e.jsxs("button",{onClick:p,className:"inline-flex h-10 items-center gap-2 rounded-xl border border-neutral-200 px-4 text-xs font-bold text-neutral-700 hover:border-neutral-300 transition-colors cursor-pointer",children:[x?e.jsx(N,{className:"h-4 w-4 text-emerald-600"}):e.jsx(j,{className:"h-4 w-4"}),x?"Link copied":"Share"]})})]})}export{_ 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.