1import{_ as z}from"./BzrexRdO.js";import{k as u,m as $,u as E,a as G,g as n,o as s,n as y,h as L,l as t,i as V,G as I,d as o,H as U,t as r,q as g,b as a,F as C,p as N,c as F,j as R}from"./kOJhXJBS.js";import{u as Y}from"./CMQcBJWo.js";import{G as Z,Y as q}from"./CK2d95fa.js";import"./CoLJtVSc.js";const A={class:"absolute top-full left-0 right-0 bg-slate-100 p-10"},O={class:"fixed inset-0 flex w-screen h-screen overflow-y-auto items-center justify-center p-4 z-50 bg-white"},P={key:0,class:"sw-container"},X={role:"list",class:"divide-y divide-zinc-300"},J={key:0,class:"text-center text-gray-500 py-10 md:col-span-2 lg:col-span-3"},K={class:"grid grid-cols-5 lg:grid-cols-12 gap-x-4 md:gap-x-8 gap-y-4 md:gap-y-0 items-center"},Q={class:"col-span-5 lg:col-span-2 pt-1"},W={key:0,class:"aspect-3/2 rounded-lg overflow-clip"},ee=["src","alt"],te={class:"col-span-5 lg:col-span-9"},se={class:"text-xl md:text-2xl font-semibold text-balance"},ne=["innerHTML"],oe=["innerHTML"],ae={key:2,class:"text-[var(--sw-color-main)] flex justify-start gap-3"},le={key:3,class:"text-[var(--sw-color-main)] flex justify-start gap-3"},ge={__name:"Search",setup(ie){const B=u(Y),H=$(),M=E().public.NUXT_PUBLIC_NODE_ENV==="production"?"published":"draft",{locale:S}=G(),i=u(""),d=u([]),p=u(!1);async function T(){console.log("do search for",i.value);const l=await H.get("cdn/stories",{version:M,language:S.value,is_startpage:!1,search_term:i.value,per_page:25,excluding_slugs:"config/*,404,locations/*"});l&&l.data&&(p.value=!0,d.value=l.data.stories),console.log(d.value)}return(l,c)=>{const D=z,j=R("seitwerk-scroll");return s(),n("div",A,[c[2]||(c[2]=y(" Suche ")),L(t("input",{type:"text",class:"border-b border-b-black w-40 p-3","onUpdate:modelValue":c[0]||(c[0]=e=>U(i)?i.value=e:null)},null,512),[[I,o(i)]]),t("button",{type:"button",class:"btn",onClick:T},"suchen"),y(" "+r(o(i))+" ",1),V(o(q),{open:o(p),class:"bg-white"},{default:g(()=>[t("div",O,[V(o(Z),null,{default:g(()=>[o(p)?(s(),n("div",P,[t("ul",X,[o(d).length===0?(s(),n("div",J,r(l.$t("no_articles_found")),1)):a("",!0),(s(!0),n(C,null,N(o(d),e=>L((s(),F(D,{class:"relative block text-gray-900 hover:text-[var(--sw-color-main)] transition ease-out sw-fade-in py-10 md:p-5 gap-4",key:e.uuid,to:`/${e.full_slug}`},{default:g(()=>{var m,_,v,h,f,w,x,k;return[t("div",K,[t("div",Q,[(m=e.content.image)!=null&&m.filename?(s(),n("div",W,[(_=e.content.image)!=null&&_.filename?(s(),n("img",{key:0,loading:"lazy",src:o(B)(e.content.image,400,0),alt:e.content.image.alt,class:"w-full h-full object-cover"},null,8,ee)):a("",!0)])):a("",!0)]),t("div",te,[t("div",se,r(((v=e.content)==null?void 0:v.title)??e.name),1),((h=e.content)==null?void 0:h.component)==="article"?(s(),n("div",{key:0,innerHTML:new Date(e.content.date).toLocaleDateString(l.$i18n.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),class:"text-zinc-500 mt-2"},null,8,ne)):a("",!0),((f=e.content)==null?void 0:f.component)==="page"?(s(),n("div",{key:1,innerHTML:((w=e.content)==null?void 0:w.seo_meta)??"",class:"text-zinc-500 mt-2"},null,8,oe)):a("",!0),(x=e.content)!=null&&x.categories?(s(),n("div",ae,[(s(!0),n(C,null,N(e.content.categories,b=>(s(),n("span",{key:b._uid},r(b),1))),128))])):a("",!0),((k=e.content)==null?void 0:k.component)==="page"?(s(),n("div",le,r(l.$t("page")),1)):a("",!0)]),c[1]||(c[1]=t("div",{class:"col-span-1 text-right self-center hidden"},[t("div",{class:"btn__icon",style:{"--width":"2.5em","--height":"2.2em"}},[t("div",{class:"top-right"},[t("div",{class:"top-right"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 319 319"},[t("path",{d:"M302.6,0h16v256h-32V54.6L33.9,307.3l-11.3,11.3L0,296l11.3-11.3L264,32H62.6V0h240Z",fill:"currentColor"})]),t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 319 319"},[t("path",{d:"M302.6,0h16v256h-32V54.6L33.9,307.3l-11.3,11.3L0,296l11.3-11.3L264,32H62.6V0h240Z",fill:"currentColor"})])])])])],-1))])]}),_:2},1032,["to"])),[[j]])),128))])])):a("",!0)]),_:1})])]),_:1},8,["open"])])}}};export{ge 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.