1import{o as b,j as e,L as r}from"./index-CTUjR3e6.js";import{u as d}from"./useQuery-Bd4_ZH-L.js";import{S as o,C as j,M as y,A as N}from"./SiteLayout-CLVlnOVR.js";import{b as w,a as F,f as m}from"./news-B3LfDDIS.js";import{A as x}from"./arrow-left-RI5LiFKZ.js";import{C as v}from"./calendar-CAyx3-1X.js";import{S as A,P as B}from"./share-2-DXNZ5ocX.js";import"./chevron-down-DR6AhkVW.js";import"./createLucideIcon-lMPH1i54.js";import"./external-link-B2iuVp7d.js";import"./x-Dl7SArvK.js";const n="#DB2217",t="#023BBE",i="#FFFFFF",a={fontFamily:"Quicksand, system-ui, sans-serif",fontWeight:700},p={fontFamily:"Quicksand, system-ui, sans-serif"};function P(){const{slug:h}=b.useParams(),{data:s,isLoading:f}=d(w(h)),{data:g=[]}=d(F);if(f)return e.jsx(o,{children:e.jsx("div",{className:"container-page py-24 text-center text-muted-foreground",children:"Loadingâ¦"})});if(!s)return e.jsx(o,{children:e.jsx("div",{style:{background:i,...p},children:e.jsxs("div",{className:"container-page py-24 max-w-2xl text-center",children:[e.jsx("h1",{className:"text-5xl uppercase",style:{...a,color:t},children:"Article not found"}),e.jsx("p",{className:"mt-4",style:{color:`${t}b3`},children:"We couldn't find that story. It may have been moved or renamed."}),e.jsxs(r,{to:"/news",className:"mt-8 inline-flex items-center gap-2 rounded-full px-6 py-3 text-sm font-bold",style:{background:n,color:i},children:[e.jsx(x,{className:"h-4 w-4"})," Back to all news"]})]})})});const c=g.filter(l=>l.slug!==s.slug).slice(0,3),u=s.readMinutes??Math.max(1,Math.round(s.contentHtml.replace(/<[^>]*>/g," ").split(/\s+/).filter(Boolean).length/180));return e.jsx(o,{children:e.jsxs("div",{style:{background:i,...p},children:[e.jsx("section",{className:"px-4 sm:px-6 lg:px-8 pt-4 pb-8 lg:pt-6 lg:pb-12",children:e.jsxs("div",{className:"relative rounded-[2rem] lg:rounded-[2.5rem] overflow-hidden px-6 sm:px-10 lg:px-16 pt-10 lg:pt-14 pb-16 lg:pb-20",style:{background:t},children:[e.jsxs("div",{className:`grid ${s.featuredImage?"lg:grid-cols-[1fr_1.3fr]":"lg:grid-cols-1"} gap-10 lg:gap-14 items-center`,children:[e.jsxs("div",{children:[e.jsxs(r,{to:"/news",className:"inline-flex items-center gap-1.5 text-sm font-bold hover:gap-2.5 transition-all",style:{color:"#FBB814"},children:[e.jsx(x,{className:"h-4 w-4"})," All news"]}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[e.jsx("span",{className:"inline-flex items-center rounded-full px-3 py-1.5 text-xs font-bold uppercase tracking-wider",style:{background:"#FBB814",color:t},children:s.category?.name??"News"}),s.publishedAt&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",style:{color:"#FFFFFF99"},children:[e.jsx(v,{className:"h-3.5 w-3.5"})," ",m(s.publishedAt)]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",style:{color:"#FFFFFF99"},children:[e.jsx(j,{className:"h-3.5 w-3.5"})," ",u," min read"]})]}),e.jsx("h1",{className:"mt-5 text-3xl sm:text-4xl lg:text-5xl leading-[1.05] tracking-tight text-white",style:a,children:s.title}),s.excerpt.trim()&&e.jsx("p",{className:"mt-5 text-lg leading-relaxed max-w-2xl",style:{color:"#FFFFFFcc"},children:s.excerpt}),s.author&&e.jsxs("p",{className:"mt-5 text-sm font-bold",style:{color:"#FFFFFF99"},children:["By ",s.author.name]})]}),s.featuredImage&&e.jsx("div",{className:"relative",children:e.jsx("div",{className:"relative w-full aspect-[16/9] overflow-hidden",style:{borderRadius:"2rem",boxShadow:"0 30px 60px -20px rgba(0,0,0,0.45)"},children:e.jsx("img",{src:s.featuredImage,alt:s.title,className:"w-full h-full object-cover",style:{objectPosition:"center"}})})})]}),e.jsxs("svg",{className:"absolute bottom-0 left-0 w-full h-7 lg:h-9",viewBox:"0 0 100 14",preserveAspectRatio:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M0,8 Q25,3 50,8 T100,8 L100,14 L0,14 Z",fill:"#FBB814"}),e.jsx("path",{d:"M0,10 Q25,6 50,10 T100,10 L100,14 L0,14 Z",fill:"#27803F",opacity:"0.9"}),e.jsx("path",{d:"M0,12 Q25,9 50,12 T100,12 L100,14 L0,14 Z",fill:"#DB2217",opacity:"0.9"})]})]})}),e.jsxs("section",{className:"container-page pb-16 max-w-3xl",children:[e.jsx("article",{className:"article-body prose prose-lg max-w-none prose-headings:font-bold prose-img:rounded-2xl prose-a:text-[#023BBE]",style:{color:"#1A1A1A"},dangerouslySetInnerHTML:{__html:s.contentHtml}}),s.author?.bio&&e.jsxs("div",{className:"mt-10 rounded-3xl border-2 p-6",style:{borderColor:`${t}14`},children:[e.jsx("div",{className:"text-xs font-bold uppercase tracking-widest",style:{color:n},children:"About the author"}),e.jsx("div",{className:"mt-2 text-xl",style:{...a,color:t},children:s.author.name}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed",style:{color:`${t}b3`},children:s.author.bio})]}),e.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold",style:{color:`${t}99`},children:"Share:"}),e.jsxs("button",{onClick:()=>{typeof navigator<"u"&&navigator.share?navigator.share({title:s.title,url:window.location.href}).catch(()=>{}):typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(window.location.href)},className:"inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-bold border-2",style:{borderColor:`${t}1f`,color:t},children:[e.jsx(A,{className:"h-4 w-4"})," Share"]}),e.jsxs("button",{onClick:()=>typeof window<"u"&&window.print(),className:"inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-bold border-2",style:{borderColor:`${t}1f`,color:t},children:[e.jsx(B,{className:"h-4 w-4"})," Print"]}),e.jsxs("a",{href:`mailto:?subject=${encodeURIComponent(s.title)}`,className:"inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-bold border-2",style:{borderColor:`${t}1f`,color:t},children:[e.jsx(y,{className:"h-4 w-4"})," Email"]})]})]}),c.length>0&&e.jsxs("section",{className:"container-page pb-20",children:[e.jsx("h2",{className:"text-2xl mb-6",style:{...a,color:t},children:"More news"}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:c.map(l=>e.jsxs(r,{to:"/news/$slug",params:{slug:l.slug},className:"group rounded-3xl border-2 bg-white p-6 transition-all hover:-translate-y-1 hover:shadow-xl",style:{borderColor:`${t}14`},children:[e.jsx("h3",{className:"text-lg leading-snug",style:{...a,color:t},children:l.title}),l.publishedAt&&e.jsx("p",{className:"mt-2 text-xs",style:{color:`${t}80`},children:m(l.publishedAt)}),e.jsxs("span",{className:"mt-3 inline-flex items-center gap-1.5 text-sm font-bold",style:{color:n},children:["Read ",e.jsx(N,{className:"h-4 w-4"})]})]},l.slug))})]})]})})}export{P as component};
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.