PageSourceSearch

https://stackoverflow.blog/_nuxt/CFy8Uxe62.js

js stackoverflow.blog collected 2026-09-24 06:56:06 UTC 4,474 bytes, 33 lines download raw bytes

1import{$ as e,$n as t,Bn as n,On as r,St as i,cn as a,cr as o,dr as s,gt as c,jn as l,ln as u,lr as d,nn as f,pn as p,sn as m,un as h}from"./DjS0xbvg.js";import{c as g,s as _,u as v}from"./DUTxQXBQ.js";import{t as y}from"./CRfAUoyq.js";import{t as b}from"./DJrHMbtv.js";import{r as x,t as S}from"./DjQPAAOC2.js";import{a as C,i as w,n as T,t as E}from"./BTfY3gI02.js";import{t as D}from"./CmKG3k452.js";var O={class:`mt32 mb32 p-wrapper mx-auto`},k={class:`d-flex md:fd-column`},A={class:`flex--item2 ps-relative mb32 mr48 sm:mr0`},j={class:`flex--item10 pt2`},M={class:`d-flex gs32 gsx lg:fd-column mb24`},N={class:`flex--item fl1`},P={class:`ff-stack-sans-headline fs-headline2 mb12`},F={key:0,class:`wmx5 fs-body3 mb32`},I={key:1,class:`bt bc-black-200 py16 mb16`},L={class:`flex--item`},R={key:1,class:`d-flex md:fd-column gs24 mb12`},z={class:`flex--item6`},B={class:`flex--item6`},V={__name:`[category]`,async setup(V){let H,U,W=C(),{params:G}=i(),K=t([]),q=t(``),J=t(``),Y=t(!1),{data:X}=([H,U]=n(()=>_(`
2  {
3    "info": *[
4      _type == "blogTag" &&
5      slug.current == $category
6    ] {
7      ...,
8      "descriptionText": pt::text(description)
9    }[0],
10    "pinned": *[
11      _type == "blogPost" &&
12      $category in tags[]->slug.current &&
13      featureTag == true &&
14      visible == true
15    ] {
16      ${D}
17    } | order(publishedAt desc),
18    "latest": *[
19      _type == "blogPost" &&
20      $category in tags[]->slug.current &&
21      featureTag != true &&
22      visible == true
23    ] {
24      ${D}
25    } | order(publishedAt desc)[0...24]
26  }
27`,{category:G.category})),H=await H,U(),H);if(!X.value?.info)throw c({statusCode:404,statusMessage:`Category not found`,fatal:!0});let Z=X.value?.latest??[];K.value=[...X.value?.pinned??[],...Z],q.value=Z[Z.length-1]?.publishedAt??``,J.value=Z[Z.length-1]?._id??``;let Q=Object.values(K.value.flatMap(e=>e?.tags??[]).filter(e=>e?.slug?.current&&![`podcast`,G.category].includes(e.slug.current)).reduce((e,t)=>(e[t.slug.current]=e[t.slug.current]||{...t,count:0},e[t.slug.current].count++,e),{})).filter(e=>e.count>=3).slice(0,8),$=async()=>{Y.value=!0;let{data:e}=await _(`
28    *[_type == "blogPost" && $category in tags[]->slug.current && featureTag != true && (
29      publishedAt < $lastPublishedAt
30      || (publishedAt == $lastPublishedAt && _id < $lastId)
31    )] | order(publishedAt desc) [0...24] {
32      ${D}
33    }`,{category:G.category,lastPublishedAt:q.value,lastId:J.value});e.value.length>0?(q.value=e.value[e.value.length-1].publishedAt,J.value=e.value[e.value.length-1]._id):J.value=null,e.value.forEach(e=>K.value.push(e)),Y.value=!1};return e({title:()=>X.value?.info?.title,description:()=>X.value?.info?.descriptionText}),(e,t)=>{let n=v,i=g,c=b,_=x,C=w,D=T,V=E,H=S,U=y;return r(),h(f,null,[p(n),m(`div`,O,[m(`div`,k,[m(`div`,A,[p(i,{section:o(G).category,class:`ps-sticky t32 l0`},null,8,[`section`])]),m(`div`,j,[m(`div`,M,[m(`div`,N,[m(`h1`,P,s(o(X)?.info?.title||o(X)?.slug.current),1),o(X)?.info?.description?(r(),h(`div`,F,[p(c,{blocks:o(X)?.info?.description},null,8,[`blocks`])])):u(``,!0),o(Q)?.length>3?(r(),h(`div`,I,[t[2]||=m(`h2`,{class:`fc-black-400 tt-uppercase fw-bold fs-body2 mb16`},` Related Tags `,-1),p(_,{tags:o(Q)},null,8,[`tags`])])):u(``,!0)]),m(`div`,L,[[`contributed`,`cc-by-sa`].includes(o(G).category)?(r(),a(C,{key:0,orientation:`landscape`})):o(G).category===`business`?(r(),h(`div`,R,[m(`div`,z,[p(D)]),m(`div`,B,[p(V)])])):(r(),a(V,{key:2}))])]),(r(!0),h(f,null,l(o(K),e=>(r(),a(H,{key:e._id,class:d([`p24 bg-white bar-md bc-black-250 ba mb24`,e.featureTag?`bg-black-100`:``]),title:e.title,authors:e.author,excerpt:e.excerpt,timestamp:e.publishedAt,slug:e.slug?.current,tags:e.tags,image:e.image,comments:e.comments,"comment-count":e.commentCount,sponsored:e.sponsored,featured:e.featureTag},null,8,[`class`,`title`,`authors`,`excerpt`,`timestamp`,`slug`,`tags`,`image`,`comments`,`comment-count`,`sponsored`,`featured`]))),128)),o(J)?(r(),h(`button`,{key:0,class:d([o(Y)&&`is-loading`,`d-block s-btn s-btn__tonal w100 p12 bar-md fw-bold fs-body2`]),onClick:t[0]||=e=>$()},` Show more `,2)):u(``,!0)])])]),[`contributed`,`cc-by-sa`].includes(o(G).category)?(r(),a(U,{key:0,"form-name":`blog-contribution`,open:o(W),"form-cta":`Submit idea`,"form-title":`Interested in contributing?`,"form-description":`Submit an idea for an article and we may reach out to you in the future.`,onClose:t[1]||=e=>W.value=!1},null,8,[`open`])):u(``,!0)],64)}}};export{V 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.