1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BuB2FsoK.js","./B8RNh2Pi.js","./5X0yPxh0.js","./entry.DWmV-E_h.css","./C-zRAaX0.js","./BYu0hPKb.js","./BwhHJ5C8.js","./Jq3ER8dB.js","./CWl6PdMc.js","./BNcVx7yx.js","./BM8eADUJ.js"])))=>i.map(i=>d[i]); 2import{o as s,c as o,a,Y as v,t as p,J as n,j as u,H as h,F as V,v as z,h as k,p as T,q as x,aG as E,ae as H,aA as y,ac as O,K as P,M as F,ah as G,ad as L,ab as w}from"./5X0yPxh0.js";import{_ as I}from"./B8RNh2Pi.js";import{A as C,a as M}from"./CWl6PdMc.js";import{a as K}from"./DpBYCPcj.js";import{c as W}from"./L_lJcTtu.js";import{u as J}from"./BwhHJ5C8.js";import"./BSGqp44j.js";const Y={class:"flex flex-wrap items-center gap-4 text-base text-muted-color"},Q={key:0,class:"flex items-center gap-2"},X={key:1,class:"flex items-center gap-2"},Z={class:"text-surface-900"},ee={key:2,class:"flex items-center gap-2"},te={__name:"BlogArticleMeta",props:{date:{type:String,required:!0},author:{type:String,required:!0},readingTime:{type:Number,default:null}},setup(e){const l=e,i=h(()=>l.date?new Date(l.date).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric"}):"");return(m,t)=>(s(),o("div",Y,[e.date?(s(),o("span",Q,[t[0]||(t[0]=a("i",{class:"pi pi-calendar text-base"},null,-1)),v(" "+p(n(i)),1)])):u("",!0),e.author?(s(),o("span",X,[t[1]||(t[1]=a("i",{class:"pi pi-user text-base"},null,-1)),t[2]||(t[2]=v(" By ",-1)),a("span",Z,p(e.author),1)])):u("",!0),e.readingTime?(s(),o("span",ee,[t[3]||(t[3]=a("i",{class:"pi pi-clock text-base"},null,-1)),v(" "+p(e.readingTime)+" min read ",1)])):u("",!0)]))}},re={key:0,class:"flex flex-wrap items-center gap-2"},ae={__name:"BlogArticleTags",props:{tags:{type:Array,default:()=>[]}},setup(e){const l=t=>typeof t=="object"?t.id||t.slug:t,i=t=>typeof t=="object"?t.name:t,m=t=>typeof t=="object"?t.slug||t.name?.toLowerCase().replace(/\s+/g,"-"):t.toLowerCase().replace(/\s+/g,"-");return(t,d)=>{const _=I;return e.tags&&e.tags.length?(s(),o("div",re,[d[0]||(d[0]=a("span",{class:"text-base font-medium text-surface-900"},"Tags:",-1)),(s(!0),o(V,null,z(e.tags,c=>(s(),k(_,{key:l(c),to:`/blog/tag/${m(c)}`,class:"px-4 py-1.5 text-base bg-surface-100 text-surface-700 rounded-full hover:bg-surface-200 hover:text-surface-900 transition-all duration-200 hover:shadow-sm"},{default:T(()=>[v(p(i(c)),1)]),_:2},1032,["to"]))),128))])):u("",!0)}}},se={class:"mb-8"},oe={class:"text-3xl md:text-4xl font-bold text-surface-900 mb-4 leading-tight md:leading-snug"},le=["innerHTML"],ne={key:1,class:"mb-4"},ie={key:0,class:"mb-8 rounded-lg overflow-hidden aspect-[16/9]"},ce=["src","alt","width","height"],ue=["innerHTML"],de={class:"mt-10 pt-8 border-t border-surface-200"},me={__name:"BlogArticleContent",props:{article:{type:Object,required:!0}},setup(e){const l=e,i=E(),m=h(()=>l.article?.coverLcpUrl?l.article.coverLcpUrl:l.article?.coverImage?M(l.article.coverImage,i.public.cdnBaseUrl):""),t=C.width,d=C.height;return(_,c)=>{const b=I,$=te,r=ae;return s(),o("article",null,[a("header",se,[a("h1",oe,p(e.article.title),1),e.article.excerpt?(s(),o("div",{key:0,class:"text-lg text-muted-color mb-6 leading-relaxed",innerHTML:e.article.excerpt},null,8,le)):u("",!0),e.article.categories?.length>0?(s(),o("div",ne,[x(b,{to:`/blog/topic/${e.article.categories[0].slug}`,class:"inline-flex items-center px-4 py-1.5 text-base font-medium text-primary-600 border border-primary-600 rounded-full hover:bg-primary-50 transition-colors duration-200"},{default:T(()=>[v(p(e.article.categories[0].name),1)]),_:1},8,["to"])])):u("",!0),x($,{date:e.article.date,author:e.article.author?.name,"reading-time":e.article.readingTime},null,8,["date","author","reading-time"])]),n(m)?(s(),o("div",ie,[a("img",{src:n(m),alt:e.article.title,width:n(t),height:n(d),fetchpriority:"high",loading:"eager",decoding:"async",class:"w-full h-full object-cover"},null,8,ce)])):u("",!0),a("div",{class:"prose prose-lg max-w-none prose-surface prose-headings:text-surface-900 prose-p:text-surface-700 prose-strong:text-surface-900 prose-a:text-blue-800 prose-a:underline prose-a:underline-offset-2 hover:prose-a:text-blue-900 prose-blockquote:border-primary-600 prose-blockquote:bg-surface-50 prose-blockquote:not-italic prose-code:text-primary-600 prose-code:bg-surface-100 prose-pre:bg-surface-900 prose-ol:list-decimal prose-ul:list-disc prose-li:text-surface-700 prose-img:rounded-lg prose-iframe:w-full prose-iframe:aspect-video",innerHTML:e.article.content},null,8,ue),a("footer",de,[x(r,{tags:e.article.tags},null,8,["tags"])])])}}},ge={class:"bg-surface-50 rounded-lg p-6 border border-surface-200"},pe={class:"flex gap-6 items-start"},fe={class:"flex-shrink-0"},he=["src","alt"],_e={key:1,class:"w-24 h-24 rounded-full bg-surface-200 flex items-center justify-center"},xe={class:"flex-1"}
2,ve={class:"text-xl font-semibold text-surface-900 mb-2"},ye={key:0,class:"text-base text-muted-color leading-relaxed"},be={__name:"BlogAuthorBio",props:{author:{type:Object,required:!0,validator:e=>e.name&&typeof e.name=="string"}},setup(e){return(l,i)=>(s(),o("div",ge,[a("div",pe,[a("div",fe,[e.author.avatar?(s(),o("img",{key:0,src:e.author.avatar,alt:e.author.name,class:"w-24 h-24 rounded-full object-cover",loading:"lazy"},null,8,he)):(s(),o("div",_e,[...i[0]||(i[0]=[a("i",{class:"pi pi-user text-3xl text-surface-500"},null,-1)])]))]),a("div",xe,[a("h3",ve,p(e.author.name),1),e.author.description?(s(),o("p",ye,p(e.author.description),1)):u("",!0)])])]))}},$e=L(()=>w(()=>import("./BuB2FsoK.js"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(e=>e.default||e)),ke=L(()=>w(()=>import("./C-zRAaX0.js"),__vite__mapDeps([4,1,2,3,5,6,7,8,9]),import.meta.url).then(e=>e.default||e)),Le=L(()=>w(()=>import("./BM8eADUJ.js"),__vite__mapDeps([10,7,8,2,3,5,9]),import.meta.url).then(e=>e.default||e)),we={class:"bg-surface-50 py-12"},Ae={key:0,class:"max-w-7xl mx-auto px-4 py-20 text-center"},Be={key:1,class:"max-w-7xl mx-auto px-4"},Ce={class:"grid grid-cols-1 lg:grid-cols-3 gap-12 mb-12"},Te={class:"lg:col-span-2 space-y-12"},Ee={class:"lg:col-span-1"},Ie={class:"py-12"},Re={__name:"[slug]",async setup(e){let l,i;const m=H(),t=m.params?.slug;if(!t||typeof t!="string")throw y({statusCode:404,message:"Invalid article slug",fatal:!0});const{data:d,status:_,error:c}=([l,i]=O(()=>J("/api/blog/posts",{method:"GET",query:{slug:t},key:`blog-article-${t}`,server:!0,watch:[()=>m.params.slug]})),l=await l,i(),l),b=h(()=>_.value==="pending"),$=h(()=>_.value==="error"||c.value),r=h(()=>d.value?Array.isArray(d.value)?d.value[0]||null:d.value:null);if($.value){const g=c.value?.statusCode||c.value?.status||c.value?.data?.statusCode||500;throw g===404?y({statusCode:404,message:"Article not found",fatal:!0}):y({statusCode:g>=400?g:500,message:c.value?.statusMessage||c.value?.message||"Failed to load article",fatal:!0})}if(!r.value&&_.value==="success")throw y({statusCode:404,message:"Article not found",fatal:!0});const A=h(()=>{if(!r.value)return[];const g=[{label:"Blog",route:"/blog"}];if(r.value?.categories?.length>0){const f=r.value.categories[0];f?.name&&f?.slug&&g.push({label:f.name,route:`/blog/topic/${f.slug}`})}return r.value?.title&&g.push({label:r.value.title,route:`/blog/article/${t}`}),g});r.value?.title&&(P(K(r.value)),F([W(r.value)]));const S=E(),B=h(()=>!r.value?.coverImage&&!r.value?.coverLcpUrl?"":r.value.coverLcpUrl||M(r.value.coverImage,S.public.cdnBaseUrl));return G(()=>B.value?{link:[{rel:"preload",as:"image",href:B.value,fetchpriority:"high"}]}:{}),(g,f)=>{const U=me,j=be,q=$e,D=ke,N=Le;return s(),o("main",we,[n(b)?(s(),o("div",Ae,[...f[0]||(f[0]=[a("i",{class:"pi pi-spinner pi-spin text-4xl text-primary-600"},null,-1),a("p",{class:"mt-4 text-lg text-muted-color"},"Loading article...",-1)])])):n(r)?(s(),o("div",Be,[a("div",Ce,[a("div",Te,[x(U,{article:n(r)},null,8,["article"]),n(r)?.author?(s(),k(j,{key:0,author:n(r).author},null,8,["author"])):u("",!0),n(A)?.length?(s(),k(q,{key:1,items:n(A)},null,8,["items"])):u("",!0)]),a("div",Ee,[x(D)])]),a("div",Ie,[x(N,{"post-id":n(r)?.id,"category-ids":n(r)?.categories?.map(R=>R.id)||[]},null,8,["post-id","category-ids"])])])):u("",!0)])}}};export{Re 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.