PageSourceSearch

https://www.culturepulse.ai/assets/search-CgIGmsGV.js

js culturepulse.ai collected 2026-10-03 21:02:16 UTC 2,304 bytes, 1 lines download raw bytes

1import{w as f,b as y,r as l,j as t}from"./chunk-4WY6JWTD-DoFnijRJ.js";import{P as b}from"./PostThumbnail-DRnTYCjn.js";import{B as j}from"./Button-YErYcH1Q.js";import{I as w}from"./Input-DWsPyFT8.js";import{T as i}from"./Typography-CTmNgK65.js";import{A as v}from"./arrow-right-tEiTFG_I.js";function I({}){return[{title:"Insights | CulturePulse"},{name:"description",content:"Welcome to CulturePulse website!"}]}const V=f(function(){const[x,u]=y(),c=x.get("q"),[r,g]=l.useState(c??""),[a,n]=l.useState(),m=async()=>{try{n(void 0);const o=await(await fetch("/content/searches/insights.json")).json(),h=[],p=r.trim().toLocaleLowerCase();if(p.length===0){n(o);return}o.forEach(s=>{p.split(" ").some(d=>{if(s.title.toLocaleLowerCase().includes(d)||s.subtitle&&s.subtitle.toLocaleLowerCase().includes(d)||s.description&&s.description.toLocaleLowerCase().includes(d))return h.push(s),!0})}),n(h)}catch(e){console.log(e),n([])}};return l.useEffect(()=>{m()},[]),t.jsx(t.Fragment,{children:t.jsxs("div",{className:"flex flex-col gap-y-8 md:gap-y-16 mt-[104px] md:mt-[185px] mb-8",children:[t.jsxs("div",{className:"flex flex-col gap-y-2 md:gap-y-4",children:[t.jsxs(i,{variant:"heading",mobileVariant:"smallHeading",children:["Search results for “",c,"”"]}),a?t.jsxs(i,{variant:"bodyBase",mobileVariant:"bodySmall",children:[a?.length," items with terms “",c,"”"]}):null]}),t.jsxs("div",{className:"flex flex-wrap gap-4",children:[t.jsx("div",{className:"w-full md:w-[283px]",children:t.jsx(w,{value:r,onChange:e=>g(e.target.value),onKeyDown:e=>{(e.key==="Enter"||e.code==="Enter")&&(u({q:r}),m())}})}),t.jsx(j,{suffixIcon:t.jsx(v,{}),onClick:()=>{u({q:r}),m()},children:"Search"})]}),t.jsx("div",{children:a?a.length>0?t.jsx("div",{className:"flex flex-wrap md:gap-x-10 gap-y-10",children:a.map((e,o)=>t.jsx(l.Fragment,{children:t.jsx(b,{post:{imgSrc:e.titleImage,heading:e.title,subtitle:e.description??e.subtitle,link:e.type==="blog"?`/insights/${e.slug}`:e.type==="news"?e.url??"":e.pdf??"",isExternal:e.type!=="blog"}})},o))}):t.jsx(i,{variant:"bodyBase",mobileVariant:"bodySmall",className:"text-gray-300 text-center",children:"No results"}):t.jsx(i,{variant:"bodyBase",mobileVariant:"bodySmall",className:"text-gray-300 text-center",children:"Loading..."})})]})})});export{V as default,I as meta};

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.