1(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="710d8cb6-6384-45de-9fbf-42b73d286089",r._sentryDebugIdIdentifier="sentry-dbid-710d8cb6-6384-45de-9fbf-42b73d286089")}catch{}})();function X(r){let e;const s=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function a(){return JSON.parse(t().getItem(s)||"{}")}function c(n){t().setItem(s,JSON.stringify(n))}function i(){const n=r.timeToLive?r.timeToLive*1e3:null,o=a(),h=Object.fromEntries(Object.entries(o).filter(([,g])=>g.timestamp!==void 0));if(c(h),!n)return;const d=Object.fromEntries(Object.entries(h).filter(([,g])=>{const v=new Date().getTime();return!(g.timestamp+n<v)}));c(d)}return{get(n,o,h={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(i(),a()[JSON.stringify(n)])).then(d=>Promise.all([d?d.value:o(),d!==void 0])).then(([d,g])=>Promise.all([d,g||h.miss(d)])).then(([d])=>d)},set(n,o){return Promise.resolve().then(()=>{const h=a();return h[JSON.stringify(n)]={timestamp:new Date().getTime(),value:o},t().setItem(s,JSON.stringify(h)),o})},delete(n){return Promise.resolve().then(()=>{const o=a();delete o[JSON.stringify(n)],t().setItem(s,JSON.stringify(o))})},clear(){return Promise.resolve().then(()=>{t().removeItem(s)})}}}function K(){return{get(r,e,s={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,s.miss(a)])).then(([a])=>a)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(r){const e=[...r.caches],s=e.shift();return s===void 0?K():{get(t,a,c={miss:()=>Promise.resolve()}){return s.get(t,a,c).catch(()=>O({caches:e}).get(t,a,c))},set(t,a){return s.set(t,a).catch(()=>O({caches:e}).set(t,a))},delete(t){return s.delete(t).catch(()=>O({caches:e}).delete(t))},clear(){return s.clear().catch(()=>O({caches:e}).clear())}}}function D(r={serializable:!0}){let e={};return{get(s,t,a={miss:()=>Promise.resolve()}){const c=JSON.stringify(s);if(c in e)return Promise.resolve(r.serializable?JSON.parse(e[c]):e[c]);const i=t();return i.then(n=>a.miss(n)).then(()=>i)},set(s,t){return e[JSON.stringify(s)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}function M(r){const e={value:`Algolia for JavaScript (${r})`,add(s){const t=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function Y(r,e,s="WithinHeaders"){const t={"x-algolia-api-key":e,"x-algolia-application-id":r};return{headers(){return s==="WithinHeaders"?t:{}},queryParameters(){return s==="WithinQueryParameters"?t:{}}}}function V({algoliaAgents:r,client:e,version:s}){const t=M(s).add({segment:e,version:s});return r.forEach(a=>t.add(a)),t}function Z(){return{debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var ee=750,W=120*1e3;function I(r,e="up"){const s=Date.now();function t(){return e==="up"||Date.now()-s>W}function a(){return e==="timed out"&&Date.now()-s<=W}return{...r,status:e,lastUpdate:s,isUp:t,isTimedOut:a}}var L=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e)}},U=class extends L{stackTrace;constructor(r,e,s){super(r,s),this.stackTrace=e}},re=class extends U{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",r,"RetryError")}},R=class extends U{status;constructor(r,e,s,t="ApiError"){super(r,s,t),this.status=e}},te=class extends L{response;constructor(r,e){super(r,"DeserializationError"),this.response=e}},se=class extends R{error;constructor(r,e,s,t){super(r,e,t,"DetailedApiError"),this.error=s}};function ne(r){const e=r;for(let s=r.length-1;s>0;s--){const t=Math.floor(Math.random()*(s+1)),a=r[s];e[s]=r[t],e[t]=a}return e}function ae(r,e,s){const t=oe(s);let a=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(a+=`?${t}`),a}function oe(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replace(/\+/g,"%20")}`).join("&")}function ie(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;const s=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(s)}function ce(r,e,s){const t={Accept:"application/json",...r,...e,...s},a={};return Object.keys(t).forEach(c=>{const i=t[c];a[c.toLowerCase()]=i}),a}function le(r){try{return JSON.parse(r.content)}catch(e){throw new te(e.message,r)}}function ue({content:r,status:e},s){try{const t=JSON.parse(r);return"error"in t?new se(t.message,e,t.error,s):new R(t.message,e,s)}catch{}return new R(r,e,s)}function de({isTimedOut:r,status:e}){return!r&&~~e===0}function me({isTimedOut:r,status:e}){return r||de({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function he({status:r}){return~~(r/100)===2}function fe(r){return r.map(e=>Q(e))}function Q(r){const e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function ge({hosts:r,hostsCache:e,baseHeaders:s,logger:t,baseQueryParameters:a,algoliaAgent:c,timeouts:i,requester:n,requestsCache:o,responsesCache:h,compress:d,compression:g}){async function v(l){const m=await Promise.all(l.map(u=>e.get(u,()=>Promise.resolve(I(u))))),b=m.filter(u=>u.isUp()),y=m.filter(u=>u.isTimedOut()),P=[...b,...y];return{hosts:P.length>0?P:l,getTimeout(u,S){return(y.length===0&&u===0?1:y.length+3+u)*S}}}async function A(l,m,b){const y=[],P=ie(l,m),p=ce(s,l.headers,m.headers),u=g==="gzip"&&P!==void 0&&P.length>ee&&(l.method==="POST"||l.method==="PUT");u&&d===void 0&&t.info("Compression is disabled because no compress method is available.");const S=u&&d!==void 0,j=S?await d(P):P;S&&(p["content-encoding"]="gzip");const G=l.method==="GET"?{...l.data,...m.data}:{},N={...a,...l.queryParameters,...G};if(c.value&&(N["x-algolia-agent"]=c.value),m&&m.queryParameters)for(const f of Object.keys(m.queryParameters))!m.queryParameters[f]||Object.prototype.toString.call(m.queryParameters[f])==="[object Object]"?N[f]=m.queryParameters[f]:N[f]=m.queryParameters[f].toString();let q=0;const _=async(f,x)=>{const E=f.pop();if(E===void 0)throw new re(fe(y));const $={...i,...m.timeouts}
1,z={data:j,headers:p,method:l.method,url:ae(E,l.path,N),connectTimeout:x(q,$.connect),responseTimeout:x(q,b?$.read:$.write)},J=k=>{const H={request:z,response:k,host:E,triesLeft:f.length};return y.push(H),H},w=await n.send(z);if(me(w)){const k=J(w);return w.isTimedOut&&q++,t.info("Retryable failure",Q(k)),await e.set(E,I(E,w.isTimedOut?"timed out":"down")),_(f,x)}if(he(w))return le(w);throw J(w),ue(w,y)},B=r.filter(f=>f.accept==="readWrite"||(b?f.accept==="read":f.accept==="write")),C=await v(B);return _([...C.hosts].reverse(),C.getTimeout)}function T(l,m={}){const b=()=>A(l,m,y),y=l.useReadTransporter||l.method==="GET";if((m.cacheable||l.cacheable)!==!0)return b();const p={request:l,requestOptions:m,transporter:{queryParameters:a,headers:s}};return h.get(p,()=>o.get(p,()=>o.set(p,b()).then(u=>Promise.all([o.delete(p),u]),u=>Promise.all([o.delete(p),Promise.reject(u)])).then(([u,S])=>S)),{miss:u=>h.set(p,u)})}return{hostsCache:e,requester:n,timeouts:i,logger:t,algoliaAgent:c,baseHeaders:s,baseQueryParameters:a,hosts:r,request:T,requestsCache:o,responsesCache:h}}function pe(){function r(e){return new Promise(s=>{let t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(n=>t.setRequestHeader(n,e.headers[n]));let a=(n,o)=>setTimeout(()=>{t.abort(),s({status:0,content:o,isTimedOut:!0})},n),c=a(e.connectTimeout,"Connection timeout"),i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&i===void 0&&(clearTimeout(c),i=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(c),clearTimeout(i),s({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(c),clearTimeout(i),s({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)})}return{send:r}}var F="5.52.1";function ye(r){return[{url:`${r}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${r}.algolia.net`,accept:"write",protocol:"https"}].concat(ne([{url:`${r}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function ve({appId:r,apiKey:e,authMode:s,algoliaAgents:t,...a}){const c=Y(r,e,s),i=ge({hosts:ye(r),...a,algoliaAgent:V({algoliaAgents:t,client:"Lite",version:F}),baseHeaders:{"content-type":"text/plain",...c.headers(),...a.baseHeaders},baseQueryParameters:{...c.queryParameters(),...a.baseQueryParameters}});return{transporter:i,appId:r,apiKey:e,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(n,o){i.algoliaAgent.add({segment:n,version:o})},setClientApiKey({apiKey:n}){!s||s==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=n:i.baseQueryParameters["x-algolia-api-key"]=n},searchForHits(n,o){return this.search(n,o)},searchForFacets(n,o){return this.search(n,o)},customPost({path:n,parameters:o,body:h},d){if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");const T={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:o||{},headers:{},data:h||{}};return i.request(T,d)},getRecommendations(n,o){if(n&&Array.isArray(n)&&(n={requests:n}),!n)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!n.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const v={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:n,useReadTransporter:!0,cacheable:!0};return i.request(v,o)},search(n,o){if(n&&Array.isArray(n)&&(n={requests:n.map(({params:T,...l})=>l.type==="facet"?{...l,...T,type:"facet"}:{...l,...T,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!n)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!n.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const v={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:n,useReadTransporter:!0,cacheable:!0};return i.request(v,o)}}}function Pe(r,e,s){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");const{compression:t,...a}={};return ve({appId:r,apiKey:e,timeouts:{connect:1e3,read:2e3,write:3e4},logger:Z(),requester:pe(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:D(),requestsCache:D({serializable:!1}),hostsCache:O({caches:[X({key:`${F}-${r}`}),D()]}),...a}
1)}export{Pe as l};
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.