1import{av as j,j as e,aw as y,ax as v,f as A,ay as k,az as z}from"./index-0qbe4j-K.js";import{h as P,b as m,N as w,L as a}from"./react-vendor-CuqwDvgQ.js";import{A as f}from"./index-BEMDl0KX.js";import{A as R}from"./index-Co7NhG2t.js";import{T,L as C}from"./table-of-contents-j3aU5HCc.js";import{R as L}from"./index-bTBIJBxF.js";import{P as S}from"./public-layout-bkiBGzYg.js";import{P as $}from"./page-hero-B3IlbYIZ.js";import{P as B,R as x}from"./page-shell-Dusr2SKx.js";import"./page-transition-DPFLNUVD.js";import"./separator-y_AUlMtH.js";import"./index-l9j0_l5U.js";import"./index-fQbr3YLv.js";import"./index-D9-iGJLB.js";import"./sheet-C6SrAI_i.js";import"./form-mhD-F1Ca.js";import"./use-reduced-motion-CqF7cx4E.js";function g(i){return new Date(`${i}T00:00:00Z`).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"})}function p(i){if(i.kind==="challenge"){const n=z(i.slug);return n&&{href:`/learn/challenges/${i.slug}`,title:n.title}}const s=j(i.slug);return s&&{href:`/learn/${i.slug}`,title:s.title}}function Y(){const{slug:i}=P(),s=i?j(i):void 0,n=m.useRef(null);if(m.useEffect(()=>{if(!s)return;const t=document.createElement("script");return t.type="application/ld+json",t.textContent=JSON.stringify({"@context":"https://schema.org","@type":"TechArticle",headline:s.title,description:s.description,datePublished:s.publishedAt,dateModified:s.updatedAt??s.publishedAt,keywords:s.keywords.join(", "),publisher:{"@type":"Organization",name:"Securoxen"}}),document.head.appendChild(t),()=>{t.remove()}},[s]),!s)return e.jsx(w,{to:"/errors/not-found",replace:!0});const u=s.relatedTools.map(t=>y(t)).filter(t=>t!==void 0),r=v("article",s.slug),o=r?.previous?p(r.previous):void 0,l=r?.next?p(r.next):void 0,b=s.Component,N=s.icon;return e.jsxs(S,{children:[e.jsx($,{size:"sm",align:"left",eyebrow:e.jsxs(a,{to:"/learn/articles",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-2 text-sm transition-colors",children:[e.jsx(f,{className:"size-4"}),"All articles"]}),title:e.jsxs("span",{className:"flex items-start gap-3",children:[e.jsx(N,{className:"text-primary mt-1.5 size-7 shrink-0"}),e.jsx("span",{children:s.title})]}),children:e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-3 text-sm",children:[e.jsx("span",{children:g(s.publishedAt)}),s.updatedAt&&s.updatedAt!==s.publishedAt&&e.jsxs("span",{className:"border-border rounded-full border px-2.5 py-0.5 text-xs",children:["Updated ",g(s.updatedAt)]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(A,{className:"size-3.5"}),s.readingMinutes," min read"]}),r&&e.jsxs("span",{className:"border-border rounded-full border px-2.5 py-0.5 text-xs",children:[r.path.title," · step ",r.index+1," of"," ",r.path.steps.length]})]})}),e.jsxs(B,{aside:e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"On this page",icon:e.jsx(C,{className:"size-3.5"}),children:e.jsx(T,{contentRef:n})}),u.length>0&&e.jsx(x,{title:"Tools from this article",icon:e.jsx(k,{className:"size-3.5"}),children:e.jsx("ul",{className:"space-y-1",children:u.map(t=>{const c=t.icon;return e.jsx("li",{children:e.jsxs(a,{to:`/tools/${t.slug}`,className:"hover:bg-muted/60 -mx-2 flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm transition-colors",children:[e.jsx(c,{className:"text-primary size-4 shrink-0"}),e.jsx("span",{className:"truncate",children:t.name})]})},t.slug)})})}),r&&e.jsx(x,{title:r.path.title,icon:e.jsx(L,{className:"size-3.5"}),children:e.jsx("ol",{className:"space-y-1 text-sm",children:r.path.steps.map((t,c)=>{const d=p(t);if(!d)return null;const h=c===r.index;return e.jsx("li",{children:e.jsxs(a,{to:d.href,className:h?"text-foreground -mx-2 block rounded-lg px-2 py-1 font-medium":"text-muted-foreground hover:text-foreground hover:bg-muted/60 -mx-2 block rounded-lg px-2 py-1 transition-colors","aria-current":h?"step":void 0,children:[e.jsxs("span",{className:"text-muted-foreground/60 mr-1.5 tabular-nums",children:[c+1,"."]}),d.title]})},`${t.kind}:${t.slug}`)})})})]}),children:[e.jsx("div",{ref:n,className:"max-w-[68ch]",children:e.jsx(m.Suspense,{fallback:null,children:e.jsx(b,{})})}),(o||l)&&e.jsxs("nav",{className:"border-border mt-14 grid gap-3 border-t pt-8 sm:grid-cols-2",children:[o?e.jsxs(a,{to:o.href,className:"border-border hover:border-primary/50 hover:bg-muted/40 rounded-xl border p-4 transition-colors",children:[e.jsxs("span",{className:"text-muted-foreground mb-1 flex items-center gap-1.5 text-xs",children:[e.jsx(f,{className:"size-3"}),"Previous"]}),e.jsx("span",{className:"text-sm font-medium",children:o.title})]}):e.jsx("span",{}),l&&e.jsxs(a,{to:l.href,className:"border-border hover:border-primary/50 hover:bg-muted/40 rounded-xl border p-4 text-right transition-colors",children:[e.jsxs("span",{className:"text-muted-foreground mb-1 flex items-center justify-end gap-1.5 text-xs",children:["Next",e.jsx(R,{className:"size-3"})]}),e.jsx("span",{className:"text-sm font-medium",children:l.title})]})]})]})]})}export{Y 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.