1import{j as x,M as P,S as _,g as b,R as k,H as o,f as m,b as n,i as d,T as w,h as f,E as C,F as $,C as T,e as B,_ as q,z as l,d as R,c as S,t as V}from"./C_FivoO9.js";import{a as A}from"./BEBqG7-r.js";import{_ as E}from"./DrSf6FIP.js";import{g as F}from"./CoDvMPn8.js";import{u as M}from"./CL3RfoYP.js";const H={key:0,class:"stack-md"},L={class:"section-head"},O={class:"breadcrumb"},j={class:"grid cards-grid"},Q=x({__name:"[slug]",async setup(z){let s,r;const i=P(),u=i.params.slug,c=S(()=>{const t=Array.isArray(i.query.page)?i.query.page[0]:i.query.page,a=Number(t||1);return Number.isFinite(a)&&a>0?Math.floor(a):1}),{data:e}=([s,r]=_(()=>F(u,c,10)),s=await s,r(),s);function v(t){return t>1?{path:`/tags/${u}`,query:{page:String(t)}}:`/tags/${u}`}async function p(){const t=e.value?.pagination.totalPages;t&&c.value>t&&await V(v(t),{replace:!0})}if(!e.value?.tag)throw b({statusCode:404,statusMessage:"Tag not found"});return[s,r]=_(()=>p()),await s,r(),k(()=>e.value?.pagination.totalPages,()=>{p()}),M({title:()=>{const t=e.value?.tag.displayName||"",a=t?`#${t}`:"";return c.value>1?`${a} (page ${c.value})`:a},description:()=>e.value?.tag.description}),(t,a)=>{const y=q,h=A,N=E;return o(e)?(l(),m("section",H,[n("div",L,[n("div",null,[n("div",O,[d(y,{to:"/"},{default:w(()=>[...a[0]||(a[0]=[f("Home",-1)])]),_:1}),a[1]||(a[1]=f(" / Tag",-1))]),n("h1",null,"# "+C(o(e).tag.displayName),1)])]),n("div",j,[(l(!0),m($,null,T(o(e).items,g=>(l(),R(h,{key:g.id,post:g},null,8,["post"]))),128))]),d(N,{page:o(e).pagination.page,"total-pages":o(e).pagination.totalPages,"to-path":`/tags/${o(u)}`},null,8,["page","total-pages","to-path"])])):B("",!0)}}});export{Q 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.