1import ue from"./odLw1Jp_.js";import{_ as me,k as de,J as pe,u as _e,i as B,c as y,N as S,M as X,m as fe,O as he,b as l,w as Y,U as ge,V as Z,o,d as m,e as f,f as r,g as ve,H as ye,a as d,S as Se,n as L,F as k,r as w,h as x}from"./Do1nZpFk.js";import ke from"./D2ISrKoS.js";import{_ as we}from"./Bdcef8cb.js";import{$ as E}from"./DxvX61I1.js";import{u as xe}from"./Dfydfb_4.js";import{u as Pe}from"./CGxf4kbZ.js";import{u as be}from"./DZKjVPmg.js";import"./WBHeYkkR.js";import"./BHietjK3.js";import"./BmT7VXuR.js";import"./DJnNxUKs.js";import"./-8tBiWp6.js";import"./ao8MkUl6.js";import"./ChoZ3EV4.js";import"./B7RbCf1l.js";import"./BM5aYONo.js";import"./DvJT-m7N.js";import"./CxHZCQz4.js";import"./CTMfOtnq.js";import"./BwQdXQwL.js";import"./pVfIq6ZV.js";import"./GqpHYmVG.js";import"./IRO0kIHJ.js";import"./D1Yhr504.js";import"./CCd7CVVz.js";import"./Se49WYkS.js";import"./CyDlDtLg.js";const je={class:"page"},Be={class:"posts-container position-relative"},Ce=["href"],Ne=["href"],$e=["href"],Oe={class:"d-flex justify-content-center"},He={key:0,class:"blog-aside"},Fe={__name:"index",async setup(Je){var M,A,I,G,V,D;let i,c;const{$_:C}=de();Pe();const ee=pe(),{project:n,blogPostsStore:te}=_e(),{resolutioner:h}=be(),{isLoading:N,posts:$,loadPosts:se}=xe(),_=B(""),P=B(""),O=B(!1),H=y(()=>n.project.global_css),{data:b}=([i,c]=S(()=>ge()),i=await i,c(),i),p=y(()=>{var e;return((e=b.value)==null?void 0:e.blogLayout)||{data:null}}),j=((A=(M=b.value)==null?void 0:M.siteCss)==null?void 0:A.data)??null,t=(I=p.value)==null?void 0:I.data,s=((V=(G=b.value)==null?void 0:G.blogLayout)==null?void 0:V.error)??null;if(!t){const e=s==null?void 0:s.statusCode;if(e===404||!s)[i,c]=S(()=>Z({path:"/404",replace:!0})),await i,c();else if(e===403)[i,c]=S(()=>Z({path:"/403",replace:!0})),await i,c();else throw e&&e>=400&&e<600?X({statusCode:e,statusMessage:(s==null?void 0:s.statusMessage)||"Upstream error",message:(s==null?void 0:s.message)||"Upstream error",data:{upstream:s==null?void 0:s.data,url:s==null?void 0:s.url},fatal:!0}):X({statusCode:502,statusMessage:"Bad Gateway",message:`Empty blog layout response from ${(s==null?void 0:s.url)||"upstream API"}`,data:{upstream:s==null?void 0:s.data,url:s==null?void 0:s.url},fatal:!0})}_.value=j==null?void 0:j.css_file;const g=y(()=>{try{return JSON.parse((t==null?void 0:t.content)||'{"top":[],"content":[],"aside":[],"bottom":[]}')}catch{return{top:[],content:[],aside:[],bottom:[]}}}),ae=(()=>{try{const e=t==null?void 0:t.has_sidebar;if(typeof e=="string"){const u=e.trim();return u==="true"||u==="false"?[JSON.parse(u)]:u.startsWith("[")||u.startsWith("{")?JSON.parse(u):[u]}return Array.isArray(e)?e:[e]}catch{return[]}})(),oe=new Set(ae),ne=y(()=>oe.has(h.value)&&h.value!=="sm");P.value=n.getGlobalStyle.font.googleFonts+(t==null?void 0:t.fonts),fe(N,e=>{if(e)return O.value=e;setTimeout(()=>{O.value=e},200)}),te.setSearchQuery(ee.fullPath.split("?")[1]||""),[i,c]=S(()=>se()),await i,c(),n.setPage({code_injection:null,id:"blog",is_home:void 0,settings:null,slug:"blog"});const F=[];let v=t==null?void 0:t.featured_image;const J=C.get(n.getProject,"fb_open_graph_image",null);if(!v&&J)try{v=C.get(JSON.parse(J),"src",null)}catch{}return v&&F.push({property:"og:image",content:v}),he({link:[{rel:"canonical",href:`https://${n.getProject.domain||n.getProject.subdomain}/blog`}],script:[{type:"application/ld+json",innerHTML:JSON.stringify({"@context":"http://schema.org","@type":"Blog",name:t==null?void 0:t.name,description:t==null?void 0:t.description,url:`https://${n.getProject.domain||n.getProject.subdomain}/blog`,author:{"@type":"Person",name:($.value[0]||{}).name},blogPost:(D=$.value)==null?void 0:D.map(e=>({"@type":"BlogPosting",headline:e==null?void 0:e.title,url:`https://${n.getProject.domain||n.getProject.subdomain}/blog/${e.slug}`,datePublished:E(e==null?void 0:e.created_at).toISOString(),dateModified:E(e==null?void 0:e.post_date).toISOString(),image:e.cover,description:e==null?void 0:e.description}))})}],title:(t==null?void 0:t.title)??n.project.name+" Blog",meta:[{name:"description",content:t==null?void 0:t.description},...F]}),(e,u)=>{const re=ue,R=Se,ie=ye,le=ke,ce=we;return o(),l(ce,{name:"blog"},{default:Y(()=>{var T,U,Q,W,z,q;return[(Q=(U=(T=r(n))==null?void 0:T.getGlobalStyle)==null?void 0:U.navbar)!=null&&Q.block&&!p.value.data.hide_header?(o(),l(re,{key:0,section:(q=(z=(W=r(n))==null?void 0:W.getGlobalStyle)==null?void 0:z.navbar)==null?void 0:q.block,page:"blog"},null,8,["section"])):m("",!0),f("div",je,[f("div",Be,[ve(ie,null,{default:Y(()=>{var a,K;return[r(_)?(o(),d("link",{key:0,rel:"preload",as:"style",href:r(_),crossorigin:"anonymous"},null,8,Ce)):m("",!0),r(_)?(o(),d("link",{key:1,rel:"stylesheet",href:r(_),crossorigin:"anonymous"},null,8,Ne)):m("",!0),H.value?(o(),d("link",{key:2,rel:"stylesheet",href:H.value,crossorigin:"anonymous"},null,8,$e)):m("",!0),r(P).length?(o(),l(R,{key:3,type:"text/css",children:r(P)},null,8,["children"])):m("",!0),(K=(a=p.value)==null?void 0:a.data)!=null&&K.css?(o(),l(R,{key:4,type:"text/css",children:p.value.data.css},null,8,["children"])):m("",!0)]}),_:1}),f("div",Oe,[f("div",{class:L([["resolution-"+r(h)],"es-root web post-layout blog-home w-100 blog-home-bg post-middle-bg gap-0"])},[(o(!0),d(k,null,w(g.value.top,a=>(o(),l(x(a.component),{key:a.uid,section:a},null,8,["section"]))),128)),f("div",{class:L(["d-flex w-100 post-middle justify-center",[{"flex-row-reverse":!p.value.data.sidebar_right},{"flex-col-reverse":r(h)!=="lg"&&p.value.data.sidebar_top}]])},[(o(!0),d(k,null,w(g.value.content,a=>(o(),l(x(a.component),{key:a.uid,section:a},null,8,["section"]))),128)),ne.value&&!r(N)?(o(),d("div",He,[(o(!0),d(k,null,w(g.value.aside,a=>(o(),l(x(a.component),{key:a.uid,section:a},null,8,["section"]))),128))])):m("",!0)],2),(o(!0),d(k,null,w(g.value.bottom,a=>(o(),l(x(a.component),{key:a.uid,section:a},null,8,["section"]))),128))],2)])])]),p.value.data.hide_footer?m("",!0):(o(),l(le,{key:1}))]}),_:1})}}},ct=me(Fe,[["__scopeId","data-v-df97587e"]]);export{ct 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.