1import{u as N}from"./D-oNCUU9.js";import{u as b}from"./BuX78t8Q.js";import{a0 as $,g as t,o as s,d as r,W as B,a8 as L,n as v,i as V,e as p,F as _,x as m,y as a,I as S,p as A,h as y,z as i,t as k,l as P,Z as R}from"./BipNxojO.js";import{_ as z}from"./DPrTRPQX.js";const F=$({__name:"Stats",setup(h){const{instance:l,state:n}=N("stats"),d=b("Stats"),f=S(()=>{if(!n.value)return"";const{nbHits:e,nbSortedHits:o}=n.value,c=`sorted out of ${e.toLocaleString()}`;return o===0?`No relevant results ${c}`:o===1?`1 relevant result ${c}`:o&&o>1?`${(o||0).toLocaleString()} relevant results ${c}`:""}),g=S(()=>{if(!n.value)return"";const{nbHits:e}=n.value;return e===0?"No results":e===1?"1 result":e>1?`${e.toLocaleString()} results`:""});return(e,o)=>t(n)?(s(),r("div",{key:0,class:v(t(d)())},[B(e.$slots,"default",L(t(n),{results:t(l).helper?.lastResults}),()=>[p("span",{class:v(t(d)("text"))},[t(n).areHitsSorted?(s(),r(_,{key:0},[m(a(f.value),1)],64)):(s(),r(_,{key:1},[m(a(g.value),1)],64)),m(" found in "+a(t(n).processingTimeMS.toLocaleString())+"ms",1)],2)])],2)):V("",!0)}}),I={key:0,"aria-live":"polite","aria-atomic":"true"},M={key:0,"aria-live":"polite","aria-atomic":"true"},T={"aria-live":"polite"},W={"aria-live":"polite"},w={"aria-live":"polite"},Z=$({__name:"ais-stats",props:{short:{type:Boolean}},setup(h){const{t:l}=A();return(n,d)=>{const f=P("i18n-t"),g=F,e=z,o=R;return s(),y(o,null,{default:i(()=>[k(e,{class:"contents"},{default:i(({status:c})=>[k(g,null,{default:i(({hitsPerPage:x,nbHits:u,page:C})=>[c==="stalled"?(s(),r(_,{key:0},[m(a(t(l)("pagination.label_loading")),1)],64)):(s(),r(_,{key:1},[u?(s(),r(_,{key:1},[h.short?(s(),r("span",M,a(u)+" "+a(t(l)("search.label_search_result",u)),1)):(s(),y(f,{key:1,scope:"global",keypath:"pagination.label_filtered_results","aria-atomic":"true",tag:"p"},{page:i(()=>[p("span",T,a(C+1),1)]),hitsPerPage:i(()=>[p("span",W,a(Math.min(x,u)),1)]),nbHits:i(()=>[p("span",w,a(u),1)]),_:2},1024))],64)):(s(),r("span",I,a(t(l)("pagination.label_no_results")),1))],64))]),_:2},1024)]),_:1})]),_:1})}}});
1export{Z as _};
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.