PageSourceSearch

https://newcsport.com/_nuxt/CnBUZSVS.js

js newcsport.com collected 2026-10-10 02:43:09 UTC 4,722 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./LhGRKAuY.js","./r6JaN5AW.js","./entry.DEWSvoFo.css","./xvAxlpI6.js"])))=>i.map(i=>d[i]);
2import{u as B,a as P,b as D,w as k,c as E,d as n,e as t,f as s,g as p,h as H,v as N,i as R,j as w,k as q,l as A,r as C,m as S,_ as F,o,n as L,t as h,F as K,p as U,q as Z,s as $,x as I,y as O,z as Q}from"./r6JaN5AW.js";import{u as G}from"./xvAxlpI6.js";const J=I(()=>O(()=>import("./LhGRKAuY.js"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(m=>m.default||m)),W={class:"z-10 relative pb-global container mx-auto"},X={class:"col-span-12 pt-global"},Y=["innerHTML"],ee=["innerHTML"],te={class:"relative"},se={key:0,class:"col-span-12 pt-global"},ae={key:1,class:"grid grid-cols-12 gap-4 py-8"},oe={class:"col-span-12"},re={class:"col-span-12 border-b-2 border-gray-100 py-8"},ne={key:0,class:"grid grid-cols-12 gap-4 p-4 items-center"},le={class:"col-span-3"},ie={class:"col-span-9"},ce={key:1},ue=["href"],de={key:2,class:"col-span-12 pt-global"},ge={__name:"index",async setup(m){let b,v;const{cacheKey:z}=G();B();const i=P(),M=D(),T=A().public.meilisearch.enabled,c=S(!1),u=S(!!T),r=C({q:""}),a=C({q:"",hits:[],total:0,totalPages:0});r.q=i.query.q,a.q=i.query.q;const _=d=>{if(!d)return"";const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},y=/[&<>"']/gi;return d.replace(y,f=>e[f])},x=Q(()=>r.q?_(r.q):""),V=async()=>{r.q&&(a.q=r.q,await M.push({query:{q:x.value}}))},g=async()=>{u.value||(c.value=!0);const d={cmv:z.value,orderby:"relevance",keyword:x.value,acf_content:!0,acf_format:"standard",lazy:!0,page:1,per_page:10},e=await $fetch("/api/search?"+new URLSearchParams(d));a.hits=e.hits,a.total=e.total,a.totalPages=e.totalPages,c.value=!1};return k(()=>i.query.q,async()=>{r.q=i.query.q,a.q=i.query.q,await g()}),u.value&&k(()=>r.q,async()=>{await g()}),[b,v]=E(()=>g()),await b,v(),(d,e)=>{const y=J,f=$,j=F;return o(),n("main",W,[t("div",X,[e[1]||(e[1]=t("p",{class:"subtitle"},"Search result for:",-1)),s(u)?(o(),n("h2",{key:0,innerHTML:_(s(r).q)},null,8,Y)):p("",!0),s(u)?p("",!0):(o(),n("h2",{key:1,innerHTML:_(s(a).q)},null,8,ee))]),t("form",{class:"col-span-12 pt-global",onSubmit:R(V,["stop","prevent"])},[e[4]||(e[4]=t("h2",null,"Search again:",-1)),e[5]||(e[5]=t("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),t("div",te,[e[2]||(e[2]=t("div",{class:"absolute inset-y-0 start-0 flex items-center ps-4 pointer-events-none"},[t("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},[t("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})])],-1)),H(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>s(r).q=l),type:"search",id:"default-search",autocomplete:"off",class:"block w-full p-6 ps-12 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter search keywords ...",required:""},null,512),[[N,s(r).q]]),e[3]||(e[3]=t("button",{type:"submit",class:"text-white btn primary absolute end-2.5 bottom-2.5 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2"},"Search",-1))])],32),w(j,null,{default:q(()=>[s(c)?(o(),n("div",se,[...e[6]||(e[6]=[t("div",{class:"flex gap-8 items-center py-8"},[L(" Loading search results ... "),t("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-black",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4Z"})])],-1)])])):!s(c)&&s(a).hits.length>0?(o(),n("div",ae,[t("div",oe,"Hits: "+h(s(a).total),1),(o(!0),n(K,null,U(s(a).hits,l=>(o(),n("div",re,[s(u)?(o(),n("div",ne,[t("div",le,[l.featured_image_object?(o(),Z(y,{key:0,"image-object":l.featured_image_object,crops:["default:medium","md:large","lg:1536x1536"]},null,8,["image-object"])):p("",!0)]),t("div",ie,[t("h3",null,[w(f,{to:l.post_path},{default:q(()=>[L(h(l.title.rendered),1)]),_:2},1032,["to"])]),e[7]||(e[7]=t("p",null,"Lorem ipsum site amet",-1))])])):(o(),n("div",ce,[t("h3",null,[t("a",{href:l.url},h(l.title),9,ue)]),e[8]||(e[8]=t("p",null,"Lorem ipsum site amet",-1))]))]))),256))])):!s(c)&&s(a).hits.length===0?(o(),n("div",de,[...e[9]||(e[9]=[t("h2",null,"No results...",-1)])])):p("",!0)]),_:1})])}}};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.