1import{d as H,P as R,H as V,c as g,e as o,u as n,i as a,w as c,g as _,F as I,y as C,m as E,U,V as W,z as r,o as u,h as d,j as G,f as P,W as v,I as Q,X}from"./yAOBIpJB.js";import{_ as J}from"./DUoDoCgP.js";import{_ as K,f as O}from"./D4tMJhJ-.js";import{u as Y}from"./CWW2d2dt.js";const Z={class:"max-w-qm container mx-auto py-20"},tt={key:0},et={class:"flex gap-2 pb-6"},st={class:"text-xs font-bold uppercase text-black-50"},ot={class:"flex flex-col gap-6 lg:flex-row lg:justify-between lg:gap-28"},at={class:"max-w-[666px] lg:w-3/4"},lt={class:"mb-4"},nt={class:"mb-3 flex gap-3"},it={class:"mb-6 w-full"},rt={class:"mb-6 flex gap-3 text-sm text-black-50"},ct=["src"],ut=["innerHTML"],gt={class:"lg:w-1/4"},mt={class:"lg:sticky lg:top-32"},dt={class:"space-x-4"},pt={class:"flex flex-col gap-y-6 *:text-black-400"},xt={key:1,class:"flex flex-col items-center justify-center gap-4 py-20 text-center"},bt={key:2,class:"flex justify-center py-20"},ft={key:3,class:"flex flex-col items-center justify-center gap-4 py-20 text-center"},_t={class:"mt-20"},vt={class:"mb-6"},ht={key:0,class:"grid grid-cols-1 gap-6 md:grid-cols-3"},yt={key:1},zt=H({__name:"[slug]",async setup(kt){let p,h;const y=R().params.slug,M=e=>e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim(),{data:k,status:x,refresh:A}=([p,h]=V(async()=>W(`blog-post-${y}`,async()=>{try{const[e,t]=await Promise.all([$fetch(`/api/blogs/${y}`),$fetch("/api/blogs")]);return e.status===200&&t.status===200?{post:e.post,blogData:t.posts.nodes}:null}catch(e){return console.error(e),null}})),p=await p,h(),p),s=r(()=>{var e;return(e=k.value)==null?void 0:e.post}),b=r(()=>{var e;return((e=k.value)==null?void 0:e.blogData)??[]}),w=r(()=>x.value==="pending"),N=r(()=>x.value==="error"||x.value==="success"&&!s.value),j=r(()=>s.value?O(new Date(s.value.date),"MMMM do, yyyy"):""),q=r(()=>{var e;return((e=s.value)==null?void 0:e.readingTime)??0}),L=r(()=>{var e;return((e=s.value)==null?void 0:e.categories.nodes.filter(t=>t.name!=="Featured"))??[]}),T=r(()=>{var t;if(!s.value||!b.value.length)return[];const e=(t=L.value[0])==null?void 0:t.name;return b.value.filter(l=>{var i;return l.slug!==((i=s.value)==null?void 0:i.slug)}).filter(l=>l.categories.nodes.some(i=>i.name===e))}),f=r(()=>{var l;if(!((l=s.value)!=null&&l.content))return"";const t=M(s.value.content).substring(0,160).trim();return t?`${t}...`:""});return Y({title:r(()=>s.value?`${s.value.title} | QuoteMedia Blog`:""),description:f,ogTitle:r(()=>{var e;return((e=s.value)==null?void 0:e.title)??""}),ogDescription:f,ogImage:r(()=>{var e,t,l;return v((l=(t=(e=s.value)==null?void 0:e.featuredImage)==null?void 0:t.node)==null?void 0:l.link)}),ogUrl:r(()=>s.value?`https://quotemedia.com${X(s.value.slug)}`:""),twitterCard:"summary_large_image",twitterTitle:r(()=>{var e;return((e=s.value)==null?void 0:e.title)??""}),twitterDescription:f,twitterImage:r(()=>{var e,t,l;return v((l=(t=(e=s.value)==null?void 0:e.featuredImage)==null?void 0:t.node)==null?void 0:l.link)})}),(e,t)=>{var z,D;const l=E,i=G,B=J,$=Q,S=U,F=K;return u(),g("div",Z,[o("section",null,[n(b).length>0&&n(s)?(u(),g("div",tt,[o("nav",et,[a(l,{to:"/company/blog",class:"text-xs uppercase text-white-700 transition-all hover:text-blue-400"},{default:c(()=>[...t[0]||(t[0]=[d(" Blog ",-1)])]),_:1}),a(i,{name:"material-symbols-light:chevron-right-rounded",class:"size-4 text-white-700"}),o("p",st,_(n(s).title),1)]),o("div",ot,[o("div",at,[o("div",lt,[a(B,{title:n(s).title,titleClasses:"lg:text-[32px]/[44px] text-pretty mb-0"},null,8,["title"])]),o("div",nt,[(u(!0),g(I,null,C(n(s).categories.nodes,m=>(u(),P($,{text:m.name,size:"xs",gradient:!1},null,8,["text"]))),256))]),o("figure",it,[o("figcaption",rt,[o("span",null,_(n(j)),1),t[1]||(t[1]=o("span",{class:"text-white-300"},"|",-1)),o("span",null,_(n(q))+" minute read",1)]),o("img",{src:n(v)((D=(z=n(s).featuredImage)==null?void 0:z.node)==null?void 0:D.link),class:"w-full rounded border border-white-300",alt:"Featued Image"},null,8,ct)]),o("div",{innerHTML:n(s).content,class:"article-content"},null,8,ut)]),o("div",gt,[o("div",mt,[t[6]||(t[6]=o("hr",{class:"my-4"}
1,null,-1)),t[7]||(t[7]=o("h5",{class:"mb-1 text-sm font-bold uppercase text-black-50"}," Share ",-1)),o("div",dt,[a(l,{to:`https://www.linkedin.com/shareArticle?mini=true&url=https://quotemedia.com/blog/${n(s).slug}`,class:"group transition-all",target:"_blank"},{default:c(()=>[a(i,{name:"ri:linkedin-fill",class:"size-5 text-black-50 transition-all group-hover:text-blue-400"})]),_:1},8,["to"]),a(l,{to:`http://twitter.com/share?&url=https://quotemedia.com/blog/${n(s).slug}`,class:"group transition-all",target:"_blank"},{default:c(()=>[a(i,{name:"hugeicons:new-twitter",class:"size-5 text-black-50 transition-all group-hover:text-blue-400"})]),_:1},8,["to"]),a(l,{to:`https://www.facebook.com/sharer/sharer.php?u=https://quotemedia.com/blog/${n(s).slug}`,class:"group transition-all",target:"_blank"},{default:c(()=>[a(i,{name:"ri:facebook-fill",class:"size-5 text-black-50 transition-all group-hover:text-blue-400"})]),_:1},8,["to"]),a(l,{to:`mailto:? 2 &subject=Discover an Exciting New Blog Post Inside!&body=If you like blogs, you definitely won't want to miss this. Check out this latest blog post now: https://quotemedia.com/blog/${n(s).slug}`,class:"group transition-all",target:"_blank"},{default:c(()=>[a(i,{name:"material-symbols:stacked-email",class:"size-5 text-black-50 transition-all group-hover:text-blue-400"})]),_:1},8,["to"])]),t[8]||(t[8]=o("hr",{class:"my-4"},null,-1)),t[9]||(t[9]=o("h5",{class:"mb-6 text-sm font-bold uppercase text-black-50"}," categories ",-1)),o("div",pt,[a(l,{to:"/company/blog?activetab=3",class:"flex gap-2 transition-all hover:opacity-80"},{default:c(()=>[a(i,{name:"icon-park-outline:setting-computer",class:"size-5"}),t[2]||(t[2]=d(" Guides ",-1))]),_:1}),a(l,{to:"/company/blog?activetab=2",class:"flex gap-2 transition-all hover:opacity-80"},{default:c(()=>[a(i,{name:"streamline:annoncement-megaphone",class:"size-5"}),t[3]||(t[3]=d(" Announcements ",-1))]),_:1}),a(l,{to:"/company/blog?activetab=4",class:"flex gap-2 transition-all hover:opacity-80"},{default:c(()=>[a(i,{name:"material-symbols:checklist-rtl-rounded",class:"size-5"}),t[4]||(t[4]=d(" Product Descriptions ",-1))]),_:1}),a(l,{to:"/company/blog?activetab=5",class:"flex gap-2 transition-all hover:opacity-80"},{default:c(()=>[a(i,{name:"material-symbols:menu-book-outline",class:"size-5"}),t[5]||(t[5]=d(" Case Studies ",-1))]),_:1})])])])])])):n(N)?(u(),g("div",xt,[a(i,{name:"material-symbols-light:cloud-off-outline",class:"text-5xl text-white-500"}),t[10]||(t[10]=o("p",{class:"text-lg text-black-50"}," This blog post is temporarily unavailable. ",-1)),t[11]||(t[11]=o("p",{class:"text-sm text-white-700"}," We're having trouble connecting to our blog service. Please try again in a moment. ",-1)),a(S,{text:"Try Again",size:"sm",loading:n(w),loadingText:"Loading...",onClicked:n(A)},null,8,["loading","onClicked"])])):n(w)?(u(),g("div",bt,[a(i,{name:"svg-spinners:ring-resize",class:"text-3xl text-blue-500"})])):(u(),g("div",ft,[t[13]||(t[13]=o("p",{class:"text-lg text-black-50"},"Blog post not found.",-1)),a(l,{to:"/company/blog",class:"text-white mt-2 rounded-lg bg-blue-500 px-6 py-2 text-sm font-medium transition-all hover:bg-blue-600"},{default:c(()=>[...t[12]||(t[12]=[d(" Back to Blog ",-1)])]),_:1})]))]),o("section",_t,[o("div",vt,[a(B,{as:"h2",title:"Related Articles"},{chip:c(()=>[a($,{text:"Discover More",gradient:!1})]),_:1})]),n(T).length>0?(u(),g("div",ht,[(u(!0),g(I,null,C(n(T),m=>(u(),P(F,{title:m.title,readingTime:m.readingTime??0,imgPath:m.featuredImage.node.link,href:m.slug,date:m.date,categories:m.categories.nodes},null,8,["title","readingTime","imgPath","href","date","categories"]))),256))])):(u(),g("p",yt,"No related articles available."))])])}}});export{zt 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.