"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6864],{46864:(a,e,r)=>{r.d(e,{fetchDocs:()=>s}),r(65156);var t=new Map;async function s(a,{api:e="/api/search",locale:r,tag:s}){let c=new URL(e,window.location.origin);c.searchParams.set("query",a),r&&c.searchParams.set("locale",r),s&&c.searchParams.set("tag",Array.isArray(s)?s.join(","):s);let n=`${c.pathname}?${c.searchParams}`,i=t.get(n);if(i)return i;let h=await fetch(n);if(!h.ok)throw Error(await h.text());let o=await h.json();return t.set(n,o),o}}}]);