1import{j as e,e as d,g as h,h as u,p,L as c,f as o}from"./index-5G3pB8eC.js";import{H as f,F as g}from"./Footer-CaE5O6uP.js";import{A as j}from"./arrow-left-CAaz_y4P.js";import{C as b}from"./calendar-CygTFcjv.js";import{C as w}from"./clock-BrSHZJot.js";import{A as N}from"./arrow-right-BGQ7NdLe.js";function v(l){if(!l?.startsWith("image-"))return null;const r=l.slice(6),s=r.lastIndexOf("-");if(s<0)return null;const t=r.slice(s+1);return`https://cdn.sanity.io/images/8yrt5g68/production/${r.slice(0,s)}.${t}`}function y(l,r,s){let t=l.text;for(const i of l.marks||[])if(i==="strong")t=e.jsx("strong",{children:t},`s-${s}`);else if(i==="em")t=e.jsx("em",{children:t},`e-${s}`);else if(i==="underline")t=e.jsx("u",{children:t},`u-${s}`);else if(i==="code")t=e.jsx("code",{className:"rounded bg-white/10 px-1.5 py-0.5 text-xs",children:t},`c-${s}`);else{const n=r.find(a=>a._key===i);if(n?._type==="link"&&n.href){const a=/^https?:\/\//.test(n.href)&&!n.href.includes("operativeiq.com");t=e.jsx("a",{href:n.href,target:a?"_blank":void 0,rel:a?"noopener noreferrer":void 0,className:"text-[color:var(--brand-cyan)] underline underline-offset-2 hover:text-white",children:t},`l-${s}`)}}return e.jsx(d.Fragment,{children:t},s)}function m(l){return(l.children||[]).map((r,s)=>y(r,l.markDefs||[],`${l._key}-${s}`))}function k(l,r){const s=l.style==="alignCenter"?"text-center":"",t=m(l);switch(l.style){case"h1":return e.jsx("h2",{className:`mt-10 mb-4 text-3xl font-bold text-white ${s}`,children:t},r);case"h2":return e.jsx("h2",{className:`mt-10 mb-4 text-2xl font-bold text-white ${s}`,children:t},r);case"h3":return e.jsx("h3",{className:`mt-8 mb-3 text-xl font-semibold text-white ${s}`,children:t},r);case"h4":return e.jsx("h4",{className:`mt-6 mb-2 text-lg font-semibold text-white ${s}`,children:t},r);default:return(l.children||[]).every(n=>!n.text||n.text.trim()==="")?null:e.jsx("p",{className:`my-4 leading-relaxed text-white/80 ${s}`,children:t},r)}}function $(l){const r=[];for(const s of l)if(s._type==="block"){const t=s;if(t.listItem==="bullet"||t.listItem==="number"){const i=r[r.length-1];i&&i.kind==="list"&&i.listType===t.listItem?i.items.push(t):r.push({kind:"list",listType:t.listItem,items:[t]})}else{const i=r[r.length-1];i&&i.kind==="blocks"?i.items.push(t):r.push({kind:"blocks",items:[t]})}}else s._type==="splitPost"?r.push({kind:"split",block:s}):r.push({kind:"other",block:s});return r}function _({group:l}){const r=l.listType==="bullet"?"ul":"ol",s=l.listType==="bullet"?"list-disc":"list-decimal";return e.jsx(r,{className:`my-4 ${s} space-y-2 pl-6 text-white/80`,children:l.items.map(t=>e.jsx("li",{className:"leading-relaxed",children:m(t)},t._key))})}function A({block:l}){const r=l.photo?.asset?._ref?v(l.photo.asset._ref):null,s=l.ordering==="reverse";return e.jsxs("div",{className:`my-10 grid gap-8 md:grid-cols-2 md:items-center ${s?"md:[direction:rtl]":""}`,children:[r&&e.jsx("div",{className:"md:[direction:ltr]",children:e.jsx("img",{src:r,alt:"",className:"w-full rounded-2xl border border-white/10",loading:"lazy"})}),e.jsx("div",{className:"md:[direction:ltr]",children:e.jsx(x,{blocks:l.text||[]})})]})}function x({blocks:l}){const r=$(l);return e.jsx(e.Fragment,{children:r.map((s,t)=>s.kind==="blocks"?e.jsx(d.Fragment,{children:s.items.map(i=>k(i,i._key))},t):s.kind==="list"?e.jsx(_,{group:s},t):s.kind==="split"?e.jsx(A,{block:s.block},t):null)})}function L(){const{post:l}=h.useLoaderData(),r=u(l),s=p.filter(t=>t.slug!==l.slug&&t.tags.some(i=>l.tags.includes(i))).slice(0,3);return e.jsxs("div",{className:"min-h-screen bg-[color:var(--brand-navy-deep)] text-white",children:[e.jsx(f,{}),e.jsxs("article",{children:[e.jsx("div",{className:"border-b border-white/10 bg-[color:var(--brand-navy)]",children:e.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-12 md:py-16",children:[e.jsxs(c,{to:"/blog",className:"inline-flex items-center gap-1.5 text-sm text-white/60 hover:text-[color:var(--brand-cyan)]",children:[e.jsx(j,{className:"h-4 w-4"})," All articles"]}),e.jsx("div",{className:"mt-6 flex flex-wrap gap-2",children:l.tags.map(t=>e.jsx("span",{className:"rounded-full bg-white/5 px-3 py-1 text-xs uppercase tracking-wide text-white/70",children:t},t))}),e.jsx("h1",{className:"mt-6 text-3xl font-bold leading-tight md:text-5xl",children:l.title}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-white/60",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(b,{className:"h-4 w-4"})," ",o(l.date)]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(w,{className:"h-4 w-4"})," ",r," min read"]})]})]})}),e.jsx("div",{className:"mx-auto max-w-5xl px-6 pt-10",children:e.jsx("img",{src:`${l.image}?auto=format&fit=crop&q=85&w=1600`,alt:l.title,className:"w-full rounded-2xl border border-white/10 object-cover"})}),e.jsx("div",{className:"mx-auto max-w-3xl px-6 py-12 md:py-16",children:e.jsx("div",{className:"text-base md:text-lg",children:e.jsx(x,{blocks:l.content})})})]}),s.length>0&&e.jsx("section",{className:"border-t border-white/10 bg-[color:var(--brand-navy)]",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-16",children:[e.jsxs("div",{className:"flex items-end justify-between",children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Related articles"}),e.jsxs(c,{to:"/blog",className:"inline-flex items-center gap-1 text-sm font-semibold text-[color:var(--brand-cyan)]",children:["View all ",e.jsx(N,{className:"h-4 w-4"})]})]}),e.jsx("div",{className:"mt-8 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:s.map(t=>e.jsxs(c,{to:"/blog/$slug",params:{slug:t.slug},className:"group overflow-hidden rounded-2xl border border-white/10 bg-[color:var(--brand-navy-deep)]",children:[e.jsx("div",{className:"aspect-[16/10] overflow-hidden",children:e.jsx("img",{src:`${t.image}?auto=format&fit=crop&q=75&w=600`,alt:t.title,loading:"lazy",className:"h-full w-full object-cover transition-transform duration-700 group-hover:scale-[1.05]"})}),e.jsxs("div",{className:"p-5",children:[e.jsx("h3",{className:"text-base font-semibold leading-snug text-white group-hover:text-[color:var(--brand-cyan)]",children:t.title}),e.jsx("p",{className:"mt-2 text-xs text-white/55",children:o(t.date)})]})]},t.id))})]})}),e.jsx(g,{})]})}
1export{L 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.