PageSourceSearch

https://www.pintys.com/_nuxt/CYNVrcfX.js

js pintys.com collected 2026-10-05 06:27:03 UTC 1,467 bytes, 1 lines download raw bytes

1import{u as N}from"./OCKdcrQV.js";import{p as P,q as j,r as u,$ as I,N as M,I as y}from"./BipNxojO.js";import{u as _}from"./Lf4COwNG.js";const O=async(g,l={},q)=>{const{t:p,locale:b}=P(),k=N(),w=j(),c=u(!1),n=_(l?.search??u("")),t=u([]),a=[{components:["pnt-article","pnt-recipe"],value:p("search.groups.label_articles"),key:"articles"},{components:["pnt-product"],value:p("search.groups.label_products"),key:"products"}],h=u(a[0].key),x=y(()=>{const s=a.find(o=>o.key===h.value)?.components??[];return t.value.filter(o=>s.includes(o?.content?.component??""))}),d=y(()=>({total:t.value.length,...Object.fromEntries(a.map(e=>[e.key,t.value.filter(s=>e.components.includes(s?.content?.component??"")).length]))})),f={handle:h,items:x};async function R(){const e=n.value.trim();if(!e)return t.value=[],c.value=!1,t;const o={requests:[[g,b.value].join("-")].map(r=>({indexName:r,query:e,hitsPerPage:l?.limit??1e3}))};try{const v=(await k.search(o))?.results,A=v?.length&&e.length?v.flatMap(i=>i.hits).filter(i=>a.flatMap(m=>m.components).some(m=>m===i?.content?.component||"")):[];t.value=A,c.value=!0,q?.({search:e,results:t.value,counts:d.value,view:f})}catch(r){console.error(r),t.value=[],c.value=!0}return t}return I(n,async()=>{await R()},{debounce:400,immediate:l?.immediate??!1}),M(()=>{const e=w.query.q;return Array.isArray(e)?e[0]:e},e=>{const s=e||"";s!==n.value&&(n.value=s)}),{search:n,results:t,touched:c,groups:a,counts:d,view:f}};export{O as useSearch};

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.