1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./C3umHFe4.js","./BJOLSwt6.js","./E10W6L7Z.js","./entry.DLH8S2id.css","./ArticleCard.D7StgeiC.css","./Results.BGxlHvAY.css","./D4I5vA0V.js","./FullScreenOverlay.D6jHTKu3.css"])))=>i.map(i=>d[i]); 2import{b as $,H as q,a as E,U,p as G,h as M,s as c,x as j,K,G as k,o as y,k as I,i as r,e as d,C as A,f as s,y as F,d as H,j as L,W,V as X,ar as J,X as Q,T as Y,g as R,_ as w}from"./E10W6L7Z.js";import{_ as Z}from"./BSRCcSaI.js";const ee=()=>$().$algolia;function ae(a){const n=ee();return n==null?void 0:n.initIndex(a)}function te(a){const n=q(),i=a||n.public.algolia.globalIndex;if(!i)throw new Error("`[@nuxtjs/algolia]` Cannot search in Algolia without `globalIndex` or `indexName` passed as a parameter");const h=ae(i),m=E(`${i}-search-result`,()=>null),e=async({query:u,requestOptions:_})=>{const o=await h.search(u,_);return m.value=o,o};return U(()=>{m.value=null}),{result:G(()=>m.value),search:e}}const se=R(()=>w(()=>import("./C3umHFe4.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(a=>a.default||a)),ne=R(()=>w(()=>import("./D4I5vA0V.js"),__vite__mapDeps([6,2,3,7]),import.meta.url).then(a=>a.default||a)),oe={class:"inner"},le={class:"main-search__form"},re={class:"main-search__input-wrapper"},ce={__name:"Search",props:["visible"],emits:["onCloseSearch"],setup(a,{emit:n}){const i=n,h=E("gazConfigData"),m=a,e=c(""),u=c(!1),_=c([]),o=c(!1),v=c(0),p=c(!1),C=c(null),{result:S,search:z}=te(h.value.searchIndex);j(()=>{document.removeEventListener("click",f)}),K(()=>m.visible,t=>{o.value=t,document.documentElement.style.overflow=t?"hidden":"hidden auto",t?document.addEventListener("click",f):document.removeEventListener("click",f)});const P=t=>{t.stopPropagation(),e.value="",u.value=!1},f=t=>{!C.value.contains(t.target)&&!t.target.closest(".search-btn")&&b()},g=async t=>{p.value||e.value.length===0||(p.value=!0,v.value=t,await z({query:e.value,requestOptions:{hitsPerPage:20,page:v.value}}),_.value=t===0?S.value.hits:[..._.value,...S.value.hits],u.value=!0,p.value=!1)},T=()=>{g(v.value+1)},b=()=>{u.value=!1,e.value="",_.value=[],o.value=!1,i("onCloseSearch")};return(t,l)=>{const B=J,N=Q,O=se,V=ne,D=Z;return y(),k(D,null,{default:I(()=>[r("div",{ref_key:"mainSearch",ref:C,class:A(["main-search",{visible:s(o)}])},[r("div",oe,[r("div",le,[r("div",re,[F(r("input",{id:"mainSearchInput","onUpdate:modelValue":l[0]||(l[0]=x=>W(e)?e.value=x:null),class:"main-search__input",type:"text",placeholder:"Introduce tu búsqueda",onKeyup:l[1]||(l[1]=x=>g(0))},null,544),[[X,s(e)]]),s(e).length>0?(y(),H("button",{key:0,class:"main-search__clear-form-btn",onClick:P},"borrar")):L("",!0)]),r("button",{class:A(`main-search__submit-btn ${s(e).length===0?"main-search__submit-btn--disabled":""}`),type:"button",onClick:l[2]||(l[2]=x=>g(0)),"aria-label":"Buscar",role:"button"},[d(B,{class:"main-search__icon"})],2)]),r("button",{class:"main-search__close-btn",onClick:b,"aria-label":"Cerrar búsqueda"},[d(N,{class:"search-btn__icon"})])]),l[3]||(l[3]=r("div",{class:"main-search__separator"},null,-1)),d(Y,null,{default:I(()=>[s(o)&&s(u)&&s(e).length>0?(y(),k(O,{key:0,searchTerm:s(e),results:s(_),onLoadMore:T,onCloseSearch:b},null,8,["searchTerm","results"])):L("",!0)]),_:1})],2),d(V,{visible:s(o),class:"main-search__overlay"},null,8,["visible"])]),_:1})}}},_e=M(ce,[["__scopeId","data-v-0ad9f7f9"]]);export{_e 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.