@algolia/client-search 5.54.1 → 5.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,5 +2,5 @@ function Y(n){let i,d=`algolia-client-js-${n.key}`;function p(){return i===void
2
2
  `&&(r=1));r<t.length;){let a=t.indexOf("\r",r),o=t.indexOf(`
3
3
  `,r);if(a===-1&&o===-1){let f=t.slice(r);if(d.push(f),p+=f.length,p>de)throw new Error("SSE line buffer exceeded 10MB");break}let s,c;a!==-1&&(o===-1||a<o)?(s=a,a+1<t.length?c=t[a+1]===`
4
4
  `?2:1:(l=!0,c=1)):(s=o,c=1);let h=t.slice(r,s);d.push(h);let y=d.length===1?d[0]:d.join("");d.length=0,p=0,q&&(y.startsWith("\uFEFF")&&(y=y.slice(1)),q=!1),yield y,r=s+c}}let m=i.decode();if(m&&d.push(m),d.length>0){let e=d.join("");q&&e.startsWith("\uFEFF")&&(e=e.slice(1)),yield e}}var Pe=class{data=[];eventType="";lastEventId=null;retry=null;decode(n){if(n==="")return this.dispatch();if(n[0]===":")return null;let i=n.indexOf(":"),d,p;switch(i===-1?(d=n,p=""):(d=n.slice(0,i),p=n.slice(i+1),p[0]===" "&&(p=p.slice(1))),d){case"data":this.data.push(p);break;case"event":this.eventType=p;break;case"id":p.includes("\0")||(this.lastEventId=p);break;case"retry":/^[0-9]+$/.test(p)&&(this.retry=parseInt(p,10));break}return null}dispatch(){let n=this.eventType;if(this.eventType="",this.data.length===0)return null;let i={data:this.data.join(`
5
- `),event:n,id:this.lastEventId,retry:this.retry};return this.data=[],i}};async function*ye(n){let i=new Pe;for await(let d of le(n)){let p=i.decode(d);p!==null&&(yield p)}}var fe=750,$=120*1e3;function W(n,i="up"){let d=Date.now();function p(){return i==="up"||Date.now()-d>$}function l(){return i==="timed out"&&Date.now()-d<=$}return{...n,status:i,lastUpdate:d,isUp:p,isTimedOut:l}}var re=class extends Error{name="AlgoliaError";constructor(n,i){super(n),i&&(this.name=i)}};var se=class extends re{stackTrace;constructor(n,i,d){super(n,d),this.stackTrace=i}},z=class extends se{constructor(n){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",n,"RetryError")}},j=class extends se{status;constructor(n,i,d,p="ApiError"){super(n,d,p),this.status=i}},qe=class extends re{response;constructor(n,i){super(n,"DeserializationError"),this.response=i}},Re=class extends j{error;constructor(n,i,d,p){super(n,i,p,"DetailedApiError"),this.error=d}};function oe(n){let i=n;for(let d=n.length-1;d>0;d--){let p=Math.floor(Math.random()*(d+1)),l=n[d];i[d]=n[p],i[p]=l}return i}function J(n,i,d){let p=xe(d),l=`${n.protocol}://${n.url}${n.port?`:${n.port}`:""}/${i.charAt(0)==="/"?i.substring(1):i}`;return p.length&&(l+=`?${p}`),l}function xe(n){return Object.keys(n).filter(i=>n[i]!==void 0).sort().map(i=>`${i}=${encodeURIComponent(Object.prototype.toString.call(n[i])==="[object Array]"?n[i].join(","):n[i]).replace(/\+/g,"%20")}`).join("&")}function V(n,i){if(n.method==="GET"||n.data===void 0&&i.data===void 0)return;let d=Array.isArray(n.data)?n.data:{...n.data,...i.data};return JSON.stringify(d)}function X(n,i,d){let p={Accept:"application/json",...n,...i,...d},l={};return Object.keys(p).forEach(q=>{let m=p[q];l[q.toLowerCase()]=m}),l}function ge(n){if(!(n.status===204||n.content.length===0))try{return JSON.parse(n.content)}catch(i){throw new qe(i.message,n)}}function Se({content:n,status:i},d){try{let p=JSON.parse(n);return"error"in p?new Re(p.message,i,p.error,d):new j(p.message,i,d)}catch{}return new j(n,i,d)}function Oe({isTimedOut:n,status:i}){return!n&&~~i===0}function be({isTimedOut:n,status:i}){return n||Oe({isTimedOut:n,status:i})||~~(i/100)!==2&&~~(i/100)!==4}function Ie({status:n}){return~~(n/100)===2}function Te(n){return n.map(i=>ae(i))}function ae(n){let i=n.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...n,request:{...n.request,headers:{...n.request.headers,...i}}}}function ne({hosts:n,hostsCache:i,baseHeaders:d,logger:p,baseQueryParameters:l,algoliaAgent:q,timeouts:m,requester:e,requestsCache:t,responsesCache:r,compress:a,compression:o}){async function s(f){let P=await Promise.all(f.map(R=>i.get(R,()=>Promise.resolve(W(R))))),x=P.filter(R=>R.isUp()),S=P.filter(R=>R.isTimedOut()),b=[...x,...S];return{hosts:b.length>0?b:f,getTimeout(R,T){return(S.length===0&&R===0?1:S.length+3+R)*T}}}async function c(f,P,x){let S=[],b=V(f,P),g=X(d,f.headers,P.headers),R=o==="gzip"&&b!==void 0&&b.length>fe&&(f.method==="POST"||f.method==="PUT");R&&a===void 0&&p.info("Compression is disabled because no compress method is available.");let T=R&&a!==void 0,Q=T?await a(b):b;T&&(g["content-encoding"]="gzip");let C=f.method==="GET"?{...f.data,...P.data}:{},A={...l,...f.queryParameters,...C};if(q.value&&(A["x-algolia-agent"]=q.value),P&&P.queryParameters)for(let O of Object.keys(P.queryParameters))!P.queryParameters[O]||Object.prototype.toString.call(P.queryParameters[O])==="[object Object]"?A[O]=P.queryParameters[O]:A[O]=P.queryParameters[O].toString();let w=0,k=async(O,G)=>{let D=O.pop();if(D===void 0)throw new z(Te(S));let L={...m,...P.timeouts},K={data:Q,headers:g,method:f.method,url:J(D,f.path,A),connectTimeout:G(w,L.connect),responseTimeout:G(w,x?L.read:L.write)},_=B=>{let M={request:K,response:B,host:D,triesLeft:O.length};return S.push(M),M},U=await e.send(K);if(be(U)){let B=_(U);return U.isTimedOut&&w++,p.info("Retryable failure",ae(B)),await i.set(D,W(D,U.isTimedOut?"timed out":"down")),k(O,G)}if(Ie(U))return ge(U);throw _(U),Se(U,S)},I=n.filter(O=>O.accept==="readWrite"||(x?O.accept==="read":O.accept==="write")),F=await s(I);return k([...F.hosts].reverse(),F.getTimeout)}function h(f,P={}){let x=()=>c(f,P,S),S=f.useReadTransporter||f.method==="GET";if((P.cacheable||f.cacheable)!==!0)return x();let g={request:f,requestOptions:P,transporter:{queryParameters:l,headers:d}};return r.get(g,()=>t.get(g,()=>t.set(g,x()).then(R=>Promise.all([t.delete(g),R]),R=>Promise.all([t.delete(g),Promise.reject(R)])).then(([R,T])=>T)),{miss:R=>r.set(g,R)})}async function*y(f,P={}){if(!e.sendStream)throw new Error("This requester does not support streaming");let x=V(f,P),S=X(d,f.headers,P.headers);S.accept="text/event-stream";let b=f.method==="GET"?{...f.data,...P.data}:{},g={...l,...f.queryParameters,...b};if(q.value&&(g["x-algolia-agent"]=q.value),P&&P.queryParameters)for(let I of Object.keys(P.queryParameters))!P.queryParameters[I]||Object.prototype.toString.call(P.queryParameters[I])==="[object Object]"?g[I]=P.queryParameters[I]:g[I]=P.queryParameters[I].toString();let R=f.useReadTransporter||f.method==="GET",T=n.filter(I=>I.accept==="readWrite"||(R?I.accept==="read":I.accept==="write")),C=(await s(T)).hosts[0];if(!C)throw new z([]);let A={...m,...P.timeouts},w={data:x,headers:S,method:f.method,url:J(C,f.path,g),connectTimeout:A.connect,responseTimeout:R?A.read:A.write},k=await e.sendStream(w);yield*ye(k)}return{hostsCache:i,requester:e,timeouts:m,logger:p,algoliaAgent:q,baseHeaders:d,baseQueryParameters:l,hosts:n,request:h,requestStream:y,requestsCache:t,responsesCache:r}}function u(n,i,d){if(d==null||typeof d=="string"&&d.length===0)throw new Error(`Parameter \`${n}\` is required when calling \`${i}\`.`)}function ie(){function n(i){return new Promise(d=>{let p=new XMLHttpRequest;p.open(i.method,i.url,!0),Object.keys(i.headers).forEach(e=>p.setRequestHeader(e,i.headers[e]));let l=(e,t)=>setTimeout(()=>{p.abort(),d({status:0,content:t,isTimedOut:!0})},e),q=l(i.connectTimeout,"Connection timeout"),m;p.onreadystatechange=()=>{p.readyState>p.OPENED&&m===void 0&&(clearTimeout(q),m=l(i.responseTimeout,"Socket timeout"))},p.onerror=()=>{p.status===0&&(clearTimeout(q),clearTimeout(m),d({content:p.responseText||"Network request failed",status:p.status,isTimedOut:!1}))},p.onload=()=>{clearTimeout(q),clearTimeout(m),d({content:p.responseText,status:p.status,isTimedOut:!1})},p.send(i.data)})}return{send:n}}var H="5.54.1";function Ae(n){return[{url:`${n}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${n}.algolia.net`,accept:"write",protocol:"https"}].concat(oe([{url:`${n}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${n}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${n}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function ce({appId:n,apiKey:i,authMode:d,algoliaAgents:p,...l}){let q=Z(n,i,d),m=ne({hosts:Ae(n),...l,algoliaAgent:ee({algoliaAgents:p,client:"Search",version:H}),baseHeaders:{"content-type":"text/plain",...q.headers(),...l.baseHeaders},baseQueryParameters:{...q.queryParameters(),...l.baseQueryParameters}});return{transporter:m,appId:n,apiKey:i,clearCache(){return Promise.all([m.requestsCache.clear(),m.responsesCache.clear()]).then(()=>{})},get _ua(){return m.algoliaAgent.value},addAlgoliaAgent(e,t){m.algoliaAgent.add({segment:e,version:t})},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?m.baseHeaders["x-algolia-api-key"]=e:m.baseQueryParameters["x-algolia-api-key"]=e},waitForTask({indexName:e,taskID:t,maxRetries:r=100,timeout:a=s=>Math.min(s*200,5e3)},o){let s=0;return v({func:()=>this.getTask({indexName:e,taskID:t},o),validate:c=>c.status==="published",aggregator:()=>s+=1,error:{validate:()=>s>=r,message:()=>`Stopped waiting for the task after ${r} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`},timeout:()=>a(s)})},waitForAppTask({taskID:e,maxRetries:t=100,timeout:r=o=>Math.min(o*200,5e3)},a){let o=0;return v({func:()=>this.getAppTask({taskID:e},a),validate:s=>s.status==="published",aggregator:()=>o+=1,error:{validate:()=>o>=t,message:()=>`Stopped waiting for the task after ${t} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`},timeout:()=>r(o)})},waitForApiKey({operation:e,key:t,apiKey:r,maxRetries:a=100,timeout:o=c=>Math.min(c*200,5e3)},s){let c=0,h={aggregator:()=>c+=1,error:{validate:()=>c>=a,message:()=>`Stopped waiting for the API key operation after ${a} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`},timeout:()=>o(c)};if(e==="update"){if(!r)throw new Error("`apiKey` is required when waiting for an `update` operation.");return v({...h,func:()=>this.getApiKey({key:t},s),validate:y=>{for(let f of Object.keys(r)){let P=r[f],x=y[f];if(Array.isArray(P)&&Array.isArray(x)){if(P.length!==x.length||P.some((S,b)=>S!==x[b]))return!1}else if(P!==x)return!1}return!0}})}return v({...h,func:()=>this.getApiKey({key:t},s).catch(y=>{if(y.status!==404)throw y}),validate:y=>e==="add"?y!==void 0:y===void 0})},browseObjects({indexName:e,browseParams:t,...r},a){return v({func:o=>this.browse({indexName:e,browseParams:{cursor:o?o.cursor:void 0,hitsPerPage:1e3,...t}},a),validate:o=>o.cursor===void 0,...r})},browseRules({indexName:e,searchRulesParams:t,...r},a){let o={...t,hitsPerPage:t?.hitsPerPage||1e3};return v({func:s=>this.searchRules({indexName:e,searchRulesParams:{...o,page:s?s.page+1:o.page||0}},a),validate:s=>s.hits.length<o.hitsPerPage,...r})},browseSynonyms({indexName:e,searchSynonymsParams:t,...r},a){let o={...t,page:t?.page||0,hitsPerPage:1e3};return v({func:s=>{let c=this.searchSynonyms({indexName:e,searchSynonymsParams:{...o,page:o.page}},a);return o.page+=1,c},validate:s=>s.hits.length<o.hitsPerPage,...r})},async chunkedBatch({indexName:e,objects:t,action:r="addObject",waitForTasks:a,batchSize:o=1e3,maxRetries:s=100},c){let h=[],y=[],f=t.entries();for(let[P,x]of f)h.push({action:r,body:x}),(h.length===o||P===t.length-1)&&(y.push(await this.batch({indexName:e,batchWriteParams:{requests:h}},c)),h=[]);if(a)for(let P of y)await this.waitForTask({indexName:e,taskID:P.taskID,maxRetries:s});return y},async saveObjects({indexName:e,objects:t,waitForTasks:r,batchSize:a,maxRetries:o},s){return await this.chunkedBatch({indexName:e,objects:t,action:"addObject",waitForTasks:r,batchSize:a,maxRetries:o},s)},async deleteObjects({indexName:e,objectIDs:t,waitForTasks:r,batchSize:a,maxRetries:o},s){return await this.chunkedBatch({indexName:e,objects:t.map(c=>({objectID:c})),action:"deleteObject",waitForTasks:r,batchSize:a,maxRetries:o},s)},async partialUpdateObjects({indexName:e,objects:t,createIfNotExists:r,waitForTasks:a,batchSize:o,maxRetries:s},c){return await this.chunkedBatch({indexName:e,objects:t,action:r?"partialUpdateObject":"partialUpdateObjectNoCreate",batchSize:o,waitForTasks:a,maxRetries:s},c)},async replaceAllObjects({indexName:e,objects:t,batchSize:r,scopes:a,maxRetries:o=100},s){let c=Math.floor(Math.random()*1e6)+1e5,h=`${e}_tmp_${c}`;a===void 0&&(a=["settings","rules","synonyms"]);try{let y=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:h,scope:a}},s),f=await this.chunkedBatch({indexName:h,objects:t,waitForTasks:!0,batchSize:r,maxRetries:o},s);await this.waitForTask({indexName:h,taskID:y.taskID,maxRetries:o}),y=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:h,scope:a}},s),await this.waitForTask({indexName:h,taskID:y.taskID,maxRetries:o});let P=await this.operationIndex({indexName:h,operationIndexParams:{operation:"move",destination:e}},s);return await this.waitForTask({indexName:h,taskID:P.taskID,maxRetries:o}),{copyOperationResponse:y,batchResponses:f,moveOperationResponse:P}}catch(y){throw await this.deleteIndex({indexName:h}),y}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e})}catch(t){if(t instanceof j&&t.status===404)return!1;throw t}return!0},searchForHits(e,t){return this.search(e,t)},searchForFacets(e,t){return this.search(e,t)},addApiKey(e,t){u("apiKey","addApiKey",e),u("apiKey.acl","addApiKey",e.acl);let s={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return m.request(s,t)},addOrUpdateObject({indexName:e,objectID:t,body:r},a){u("indexName","addOrUpdateObject",e),u("objectID","addOrUpdateObject",t),u("body","addOrUpdateObject",r);let h={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r};return m.request(h,a)},appendSource(e,t){u("source","appendSource",e),u("source.source","appendSource",e.source);let s={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return m.request(s,t)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:t},r){u("xAlgoliaUserID","assignUserId",e),u("assignUserIdParams","assignUserId",t),u("assignUserIdParams.cluster","assignUserId",t.cluster);let a="/1/clusters/mapping",o={},s={};e!==void 0&&(o["X-Algolia-User-ID"]=e.toString());let c={method:"POST",path:a,queryParameters:s,headers:o,data:t};return m.request(c,r)},batch({indexName:e,batchWriteParams:t},r){u("indexName","batch",e),u("batchWriteParams","batch",t),u("batchWriteParams.requests","batch",t.requests);let c={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:t},r){u("xAlgoliaUserID","batchAssignUserIds",e),u("batchAssignUserIdsParams","batchAssignUserIds",t),u("batchAssignUserIdsParams.cluster","batchAssignUserIds",t.cluster),u("batchAssignUserIdsParams.users","batchAssignUserIds",t.users);let a="/1/clusters/mapping/batch",o={},s={};e!==void 0&&(o["X-Algolia-User-ID"]=e.toString());let c={method:"POST",path:a,queryParameters:s,headers:o,data:t};return m.request(c,r)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:t},r){u("dictionaryName","batchDictionaryEntries",e),u("batchDictionaryEntriesParams","batchDictionaryEntries",t),u("batchDictionaryEntriesParams.requests","batchDictionaryEntries",t.requests);let c={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},browse({indexName:e,browseParams:t},r){u("indexName","browse",e);let c={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0};return m.request(c,r)},clearObjects({indexName:e},t){u("indexName","clearObjects",e);let s={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},clearRules({indexName:e,forwardToReplicas:t},r){u("indexName","clearRules",e);let a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),o={},s={};t!==void 0&&(s.forwardToReplicas=t.toString());let c={method:"POST",path:a,queryParameters:s,headers:o};return m.request(c,r)},clearSynonyms({indexName:e,forwardToReplicas:t},r){u("indexName","clearSynonyms",e);let a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),o={},s={};t!==void 0&&(s.forwardToReplicas=t.toString());let c={method:"POST",path:a,queryParameters:s,headers:o};return m.request(c,r)},customDelete({path:e,parameters:t},r){u("path","customDelete",e);let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return m.request(c,r)},customGet({path:e,parameters:t},r){u("path","customGet",e);let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return m.request(c,r)},customPost({path:e,parameters:t,body:r},a){u("path","customPost",e);let h={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return m.request(h,a)},customPut({path:e,parameters:t,body:r},a){u("path","customPut",e);let h={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return m.request(h,a)},deleteApiKey({key:e},t){u("key","deleteApiKey",e);let s={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},deleteBy({indexName:e,deleteByParams:t},r){u("indexName","deleteBy",e),u("deleteByParams","deleteBy",t);let c={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},deleteIndex({indexName:e},t){u("indexName","deleteIndex",e);let s={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},deleteObject({indexName:e,objectID:t},r){u("indexName","deleteObject",e),u("objectID","deleteObject",t);let c={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},deleteRule({indexName:e,objectID:t,forwardToReplicas:r},a){u("indexName","deleteRule",e),u("objectID","deleteRule",t);let o="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),s={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());let h={method:"DELETE",path:o,queryParameters:c,headers:s};return m.request(h,a)},deleteSource({source:e},t){u("source","deleteSource",e);let s={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},deleteSynonym({indexName:e,objectID:t,forwardToReplicas:r},a){u("indexName","deleteSynonym",e),u("objectID","deleteSynonym",t);let o="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),s={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());let h={method:"DELETE",path:o,queryParameters:c,headers:s};return m.request(h,a)},getApiKey({key:e},t){u("key","getApiKey",e);let s={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},getAppTask({taskID:e},t){u("taskID","getAppTask",e);let s={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},getDictionaryLanguages(e){let o={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return m.request(o,e)},getDictionarySettings(e){let o={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return m.request(o,e)},getLogs({offset:e,length:t,indexName:r,type:a}={},o=void 0){let s="/1/logs",c={},h={};e!==void 0&&(h.offset=e.toString()),t!==void 0&&(h.length=t.toString()),r!==void 0&&(h.indexName=r.toString()),a!==void 0&&(h.type=a.toString());let y={method:"GET",path:s,queryParameters:h,headers:c};return m.request(y,o)},getObject({indexName:e,objectID:t,attributesToRetrieve:r},a){u("indexName","getObject",e),u("objectID","getObject",t);let o="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),s={},c={};r!==void 0&&(c.attributesToRetrieve=r.toString());let h={method:"GET",path:o,queryParameters:c,headers:s};return m.request(h,a)},getObjects(e,t){u("getObjectsParams","getObjects",e),u("getObjectsParams.requests","getObjects",e.requests);let s={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return m.request(s,t)},getRule({indexName:e,objectID:t},r){u("indexName","getRule",e),u("objectID","getRule",t);let c={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},getSettings({indexName:e,getVersion:t},r){u("indexName","getSettings",e);let a="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),o={},s={};t!==void 0&&(s.getVersion=t.toString());let c={method:"GET",path:a,queryParameters:s,headers:o};return m.request(c,r)},getSources(e){let o={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return m.request(o,e)},getSynonym({indexName:e,objectID:t},r){u("indexName","getSynonym",e),u("objectID","getSynonym",t);let c={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},getTask({indexName:e,taskID:t},r){u("indexName","getTask",e),u("taskID","getTask",t);let c={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},getTopUserIds(e){let o={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return m.request(o,e)},getUserId({userID:e},t){u("userID","getUserId",e);let s={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},hasPendingMappings({getClusters:e}={},t=void 0){let r="/1/clusters/mapping/pending",a={},o={};e!==void 0&&(o.getClusters=e.toString());let s={method:"GET",path:r,queryParameters:o,headers:a};return m.request(s,t)},listApiKeys(e){let o={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return m.request(o,e)},listClusters(e){let o={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return m.request(o,e)},listIndices({page:e,hitsPerPage:t}={},r=void 0){let a="/1/indexes",o={},s={};e!==void 0&&(s.page=e.toString()),t!==void 0&&(s.hitsPerPage=t.toString());let c={method:"GET",path:a,queryParameters:s,headers:o};return m.request(c,r)},listUserIds({page:e,hitsPerPage:t}={},r=void 0){let a="/1/clusters/mapping",o={},s={};e!==void 0&&(s.page=e.toString()),t!==void 0&&(s.hitsPerPage=t.toString());let c={method:"GET",path:a,queryParameters:s,headers:o};return m.request(c,r)},multipleBatch(e,t){u("batchParams","multipleBatch",e),u("batchParams.requests","multipleBatch",e.requests);let s={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return m.request(s,t)},operationIndex({indexName:e,operationIndexParams:t},r){u("indexName","operationIndex",e),u("operationIndexParams","operationIndex",t),u("operationIndexParams.operation","operationIndex",t.operation),u("operationIndexParams.destination","operationIndex",t.destination);let c={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},partialUpdateObject({indexName:e,objectID:t,attributesToUpdate:r,createIfNotExists:a},o){u("indexName","partialUpdateObject",e),u("objectID","partialUpdateObject",t),u("attributesToUpdate","partialUpdateObject",r);let s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),c={},h={};a!==void 0&&(h.createIfNotExists=a.toString());let y={method:"POST",path:s,queryParameters:h,headers:c,data:r};return m.request(y,o)},removeUserId({userID:e},t){u("userID","removeUserId",e);let s={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},replaceSources({source:e},t){u("source","replaceSources",e);let s={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return m.request(s,t)},restoreApiKey({key:e},t){u("key","restoreApiKey",e);let s={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},saveObject({indexName:e,body:t},r){u("indexName","saveObject",e),u("body","saveObject",t);let c={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},saveRule({indexName:e,objectID:t,rule:r,forwardToReplicas:a},o){u("indexName","saveRule",e),u("objectID","saveRule",t),u("rule","saveRule",r),u("rule.objectID","saveRule",r.objectID),u("rule.consequence","saveRule",r.consequence);let s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),c={},h={};a!==void 0&&(h.forwardToReplicas=a.toString());let y={method:"PUT",path:s,queryParameters:h,headers:c,data:r};return m.request(y,o)},saveRules({indexName:e,rules:t,forwardToReplicas:r,clearExistingRules:a},o){u("indexName","saveRules",e),u("rules","saveRules",t);let s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),c={},h={};r!==void 0&&(h.forwardToReplicas=r.toString()),a!==void 0&&(h.clearExistingRules=a.toString());let y={method:"POST",path:s,queryParameters:h,headers:c,data:t};return m.request(y,o)},saveSynonym({indexName:e,objectID:t,synonymHit:r,forwardToReplicas:a},o){u("indexName","saveSynonym",e),u("objectID","saveSynonym",t),u("synonymHit","saveSynonym",r),u("synonymHit.objectID","saveSynonym",r.objectID),u("synonymHit.type","saveSynonym",r.type);let s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),c={},h={};a!==void 0&&(h.forwardToReplicas=a.toString());let y={method:"PUT",path:s,queryParameters:h,headers:c,data:r};return m.request(y,o)},saveSynonyms({indexName:e,synonymHit:t,forwardToReplicas:r,replaceExistingSynonyms:a},o){u("indexName","saveSynonyms",e),u("synonymHit","saveSynonyms",t);let s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),c={},h={};r!==void 0&&(h.forwardToReplicas=r.toString()),a!==void 0&&(h.replaceExistingSynonyms=a.toString());let y={method:"POST",path:s,queryParameters:h,headers:c,data:t};return m.request(y,o)},search(e,t){e&&Array.isArray(e)&&(e={requests:e.map(({params:h,...y})=>y.type==="facet"?{...y,...h,type:"facet"}:{...y,...h,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),u("searchMethodParams","search",e),u("searchMethodParams.requests","search",e.requests);let s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return m.request(s,t)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:t},r){u("dictionaryName","searchDictionaryEntries",e),u("searchDictionaryEntriesParams","searchDictionaryEntries",t),u("searchDictionaryEntriesParams.query","searchDictionaryEntries",t.query);let c={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t,useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchForFacetValues({indexName:e,facetName:t,searchForFacetValuesRequest:r},a){u("indexName","searchForFacetValues",e),u("facetName","searchForFacetValues",t);let h={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return m.request(h,a)},searchRules({indexName:e,searchRulesParams:t},r){u("indexName","searchRules",e);let c={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchSingleIndex({indexName:e,searchParams:t},r){u("indexName","searchSingleIndex",e);let c={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchSynonyms({indexName:e,searchSynonymsParams:t},r){u("indexName","searchSynonyms",e);let c={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchUserIds(e,t){u("searchUserIdsParams","searchUserIds",e),u("searchUserIdsParams.query","searchUserIds",e.query);let s={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return m.request(s,t)},setDictionarySettings(e,t){u("dictionarySettingsParams","setDictionarySettings",e),u("dictionarySettingsParams.disableStandardEntries","setDictionarySettings",e.disableStandardEntries);let s={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return m.request(s,t)},setSettings({indexName:e,indexSettings:t,forwardToReplicas:r},a){u("indexName","setSettings",e),u("indexSettings","setSettings",t);let o="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());let h={method:"PUT",path:o,queryParameters:c,headers:s,data:t};return m.request(h,a)},updateApiKey({key:e,apiKey:t},r){u("key","updateApiKey",e),u("apiKey","updateApiKey",t),u("apiKey.acl","updateApiKey",t.acl);let c={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)}}}function Uo(n,i,d){if(!n||typeof n!="string")throw new Error("`appId` is missing.");if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");let{compression:p,...l}=d||{};return ce({appId:n,apiKey:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:te(),requester:ie(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:N(),requestsCache:N({serializable:!1}),hostsCache:E({caches:[Y({key:`${H}-${n}`}),N()]}),...l})}export{H as apiClientVersion,Uo as searchClient};
5
+ `),event:n,id:this.lastEventId,retry:this.retry};return this.data=[],i}};async function*ye(n){let i=new Pe;for await(let d of le(n)){let p=i.decode(d);p!==null&&(yield p)}}var fe=750,$=120*1e3;function W(n,i="up"){let d=Date.now();function p(){return i==="up"||Date.now()-d>$}function l(){return i==="timed out"&&Date.now()-d<=$}return{...n,status:i,lastUpdate:d,isUp:p,isTimedOut:l}}var re=class extends Error{name="AlgoliaError";constructor(n,i){super(n),i&&(this.name=i)}};var se=class extends re{stackTrace;constructor(n,i,d){super(n,d),this.stackTrace=i}},z=class extends se{constructor(n){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",n,"RetryError")}},j=class extends se{status;constructor(n,i,d,p="ApiError"){super(n,d,p),this.status=i}},qe=class extends re{response;constructor(n,i){super(n,"DeserializationError"),this.response=i}},Re=class extends j{error;constructor(n,i,d,p){super(n,i,p,"DetailedApiError"),this.error=d}};function oe(n){let i=n;for(let d=n.length-1;d>0;d--){let p=Math.floor(Math.random()*(d+1)),l=n[d];i[d]=n[p],i[p]=l}return i}function J(n,i,d){let p=xe(d),l=`${n.protocol}://${n.url}${n.port?`:${n.port}`:""}/${i.charAt(0)==="/"?i.substring(1):i}`;return p.length&&(l+=`?${p}`),l}function xe(n){return Object.keys(n).filter(i=>n[i]!==void 0).sort().map(i=>`${i}=${encodeURIComponent(Object.prototype.toString.call(n[i])==="[object Array]"?n[i].join(","):n[i]).replace(/\+/g,"%20")}`).join("&")}function V(n,i){if(n.method==="GET"||n.data===void 0&&i.data===void 0)return;let d=Array.isArray(n.data)?n.data:{...n.data,...i.data};return JSON.stringify(d)}function X(n,i,d){let p={Accept:"application/json",...n,...i,...d},l={};return Object.keys(p).forEach(q=>{let m=p[q];l[q.toLowerCase()]=m}),l}function ge(n){if(!(n.status===204||n.content.length===0))try{return JSON.parse(n.content)}catch(i){throw new qe(i.message,n)}}function Se({content:n,status:i},d){try{let p=JSON.parse(n);return"error"in p?new Re(p.message,i,p.error,d):new j(p.message,i,d)}catch{}return new j(n,i,d)}function Oe({isTimedOut:n,status:i}){return!n&&~~i===0}function be({isTimedOut:n,status:i}){return n||Oe({isTimedOut:n,status:i})||~~(i/100)!==2&&~~(i/100)!==4}function Ie({status:n}){return~~(n/100)===2}function Te(n){return n.map(i=>ae(i))}function ae(n){let i=n.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...n,request:{...n.request,headers:{...n.request.headers,...i}}}}function ne({hosts:n,hostsCache:i,baseHeaders:d,logger:p,baseQueryParameters:l,algoliaAgent:q,timeouts:m,requester:e,requestsCache:t,responsesCache:r,compress:a,compression:o}){async function s(f){let P=await Promise.all(f.map(R=>i.get(R,()=>Promise.resolve(W(R))))),x=P.filter(R=>R.isUp()),S=P.filter(R=>R.isTimedOut()),b=[...x,...S];return{hosts:b.length>0?b:f,getTimeout(R,T){return(S.length===0&&R===0?1:S.length+3+R)*T}}}async function c(f,P,x){let S=[],b=V(f,P),g=X(d,f.headers,P.headers),R=o==="gzip"&&b!==void 0&&b.length>fe&&(f.method==="POST"||f.method==="PUT");R&&a===void 0&&p.info("Compression is disabled because no compress method is available.");let T=R&&a!==void 0,Q=T?await a(b):b;T&&(g["content-encoding"]="gzip");let C=f.method==="GET"?{...f.data,...P.data}:{},A={...l,...f.queryParameters,...C};if(q.value&&(A["x-algolia-agent"]=q.value),P&&P.queryParameters)for(let O of Object.keys(P.queryParameters))!P.queryParameters[O]||Object.prototype.toString.call(P.queryParameters[O])==="[object Object]"?A[O]=P.queryParameters[O]:A[O]=P.queryParameters[O].toString();let w=0,k=async(O,G)=>{let D=O.pop();if(D===void 0)throw new z(Te(S));let L={...m,...P.timeouts},K={data:Q,headers:g,method:f.method,url:J(D,f.path,A),connectTimeout:G(w,L.connect),responseTimeout:G(w,x?L.read:L.write)},_=B=>{let M={request:K,response:B,host:D,triesLeft:O.length};return S.push(M),M},U=await e.send(K);if(be(U)){let B=_(U);return U.isTimedOut&&w++,p.info("Retryable failure",ae(B)),await i.set(D,W(D,U.isTimedOut?"timed out":"down")),k(O,G)}if(Ie(U))return ge(U);throw _(U),Se(U,S)},I=n.filter(O=>O.accept==="readWrite"||(x?O.accept==="read":O.accept==="write")),F=await s(I);return k([...F.hosts].reverse(),F.getTimeout)}function h(f,P={}){let x=()=>c(f,P,S),S=f.useReadTransporter||f.method==="GET";if((P.cacheable||f.cacheable)!==!0)return x();let g={request:f,requestOptions:P,transporter:{queryParameters:l,headers:d}};return r.get(g,()=>t.get(g,()=>t.set(g,x()).then(R=>Promise.all([t.delete(g),R]),R=>Promise.all([t.delete(g),Promise.reject(R)])).then(([R,T])=>T)),{miss:R=>r.set(g,R)})}async function*y(f,P={}){if(!e.sendStream)throw new Error("This requester does not support streaming");let x=V(f,P),S=X(d,f.headers,P.headers);S.accept="text/event-stream";let b=f.method==="GET"?{...f.data,...P.data}:{},g={...l,...f.queryParameters,...b};if(q.value&&(g["x-algolia-agent"]=q.value),P&&P.queryParameters)for(let I of Object.keys(P.queryParameters))!P.queryParameters[I]||Object.prototype.toString.call(P.queryParameters[I])==="[object Object]"?g[I]=P.queryParameters[I]:g[I]=P.queryParameters[I].toString();let R=f.useReadTransporter||f.method==="GET",T=n.filter(I=>I.accept==="readWrite"||(R?I.accept==="read":I.accept==="write")),C=(await s(T)).hosts[0];if(!C)throw new z([]);let A={...m,...P.timeouts},w={data:x,headers:S,method:f.method,url:J(C,f.path,g),connectTimeout:A.connect,responseTimeout:R?A.read:A.write},k=await e.sendStream(w);yield*ye(k)}return{hostsCache:i,requester:e,timeouts:m,logger:p,algoliaAgent:q,baseHeaders:d,baseQueryParameters:l,hosts:n,request:h,requestStream:y,requestsCache:t,responsesCache:r}}function u(n,i,d){if(d==null||typeof d=="string"&&d.length===0)throw new Error(`Parameter \`${n}\` is required when calling \`${i}\`.`)}function ie(){function n(i){return new Promise(d=>{let p=new XMLHttpRequest;p.open(i.method,i.url,!0),Object.keys(i.headers).forEach(e=>p.setRequestHeader(e,i.headers[e]));let l=(e,t)=>setTimeout(()=>{p.abort(),d({status:0,content:t,isTimedOut:!0})},e),q=l(i.connectTimeout,"Connection timeout"),m;p.onreadystatechange=()=>{p.readyState>p.OPENED&&m===void 0&&(clearTimeout(q),m=l(i.responseTimeout,"Socket timeout"))},p.onerror=()=>{p.status===0&&(clearTimeout(q),clearTimeout(m),d({content:p.responseText||"Network request failed",status:p.status,isTimedOut:!1}))},p.onload=()=>{clearTimeout(q),clearTimeout(m),d({content:p.responseText,status:p.status,isTimedOut:!1})},p.send(i.data)})}return{send:n}}var H="5.55.0";function Ae(n){return[{url:`${n}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${n}.algolia.net`,accept:"write",protocol:"https"}].concat(oe([{url:`${n}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${n}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${n}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function ce({appId:n,apiKey:i,authMode:d,algoliaAgents:p,...l}){let q=Z(n,i,d),m=ne({hosts:Ae(n),...l,algoliaAgent:ee({algoliaAgents:p,client:"Search",version:H}),baseHeaders:{"content-type":"text/plain",...q.headers(),...l.baseHeaders},baseQueryParameters:{...q.queryParameters(),...l.baseQueryParameters}});return{transporter:m,appId:n,apiKey:i,clearCache(){return Promise.all([m.requestsCache.clear(),m.responsesCache.clear()]).then(()=>{})},get _ua(){return m.algoliaAgent.value},addAlgoliaAgent(e,t){m.algoliaAgent.add({segment:e,version:t})},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?m.baseHeaders["x-algolia-api-key"]=e:m.baseQueryParameters["x-algolia-api-key"]=e},waitForTask({indexName:e,taskID:t,maxRetries:r=100,timeout:a=s=>Math.min(s*200,5e3)},o){let s=0;return v({func:()=>this.getTask({indexName:e,taskID:t},o),validate:c=>c.status==="published",aggregator:()=>s+=1,error:{validate:()=>s>=r,message:()=>`Stopped waiting for the task after ${r} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`},timeout:()=>a(s)})},waitForAppTask({taskID:e,maxRetries:t=100,timeout:r=o=>Math.min(o*200,5e3)},a){let o=0;return v({func:()=>this.getAppTask({taskID:e},a),validate:s=>s.status==="published",aggregator:()=>o+=1,error:{validate:()=>o>=t,message:()=>`Stopped waiting for the task after ${t} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`},timeout:()=>r(o)})},waitForApiKey({operation:e,key:t,apiKey:r,maxRetries:a=100,timeout:o=c=>Math.min(c*200,5e3)},s){let c=0,h={aggregator:()=>c+=1,error:{validate:()=>c>=a,message:()=>`Stopped waiting for the API key operation after ${a} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`},timeout:()=>o(c)};if(e==="update"){if(!r)throw new Error("`apiKey` is required when waiting for an `update` operation.");return v({...h,func:()=>this.getApiKey({key:t},s),validate:y=>{for(let f of Object.keys(r)){let P=r[f],x=y[f];if(Array.isArray(P)&&Array.isArray(x)){if(P.length!==x.length||P.some((S,b)=>S!==x[b]))return!1}else if(P!==x)return!1}return!0}})}return v({...h,func:()=>this.getApiKey({key:t},s).catch(y=>{if(y.status!==404)throw y}),validate:y=>e==="add"?y!==void 0:y===void 0})},browseObjects({indexName:e,browseParams:t,...r},a){return v({func:o=>this.browse({indexName:e,browseParams:{cursor:o?o.cursor:void 0,hitsPerPage:1e3,...t}},a),validate:o=>o.cursor===void 0,...r})},browseRules({indexName:e,searchRulesParams:t,...r},a){let o={...t,hitsPerPage:t?.hitsPerPage||1e3};return v({func:s=>this.searchRules({indexName:e,searchRulesParams:{...o,page:s?s.page+1:o.page||0}},a),validate:s=>s.hits.length<o.hitsPerPage,...r})},browseSynonyms({indexName:e,searchSynonymsParams:t,...r},a){let o={...t,page:t?.page||0,hitsPerPage:1e3};return v({func:s=>{let c=this.searchSynonyms({indexName:e,searchSynonymsParams:{...o,page:o.page}},a);return o.page+=1,c},validate:s=>s.hits.length<o.hitsPerPage,...r})},async chunkedBatch({indexName:e,objects:t,action:r="addObject",waitForTasks:a,batchSize:o=1e3,maxRetries:s=100},c){let h=[],y=[],f=t.entries();for(let[P,x]of f)h.push({action:r,body:x}),(h.length===o||P===t.length-1)&&(y.push(await this.batch({indexName:e,batchWriteParams:{requests:h}},c)),h=[]);if(a)for(let P of y)await this.waitForTask({indexName:e,taskID:P.taskID,maxRetries:s});return y},async saveObjects({indexName:e,objects:t,waitForTasks:r,batchSize:a,maxRetries:o},s){return await this.chunkedBatch({indexName:e,objects:t,action:"addObject",waitForTasks:r,batchSize:a,maxRetries:o},s)},async deleteObjects({indexName:e,objectIDs:t,waitForTasks:r,batchSize:a,maxRetries:o},s){return await this.chunkedBatch({indexName:e,objects:t.map(c=>({objectID:c})),action:"deleteObject",waitForTasks:r,batchSize:a,maxRetries:o},s)},async partialUpdateObjects({indexName:e,objects:t,createIfNotExists:r,waitForTasks:a,batchSize:o,maxRetries:s},c){return await this.chunkedBatch({indexName:e,objects:t,action:r?"partialUpdateObject":"partialUpdateObjectNoCreate",batchSize:o,waitForTasks:a,maxRetries:s},c)},async replaceAllObjects({indexName:e,objects:t,batchSize:r,scopes:a,maxRetries:o=100},s){let c=Math.floor(Math.random()*1e6)+1e5,h=`${e}_tmp_${c}`;a===void 0&&(a=["settings","rules","synonyms"]);try{let y=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:h,scope:a}},s),f=await this.chunkedBatch({indexName:h,objects:t,waitForTasks:!0,batchSize:r,maxRetries:o},s);await this.waitForTask({indexName:h,taskID:y.taskID,maxRetries:o}),y=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:h,scope:a}},s),await this.waitForTask({indexName:h,taskID:y.taskID,maxRetries:o});let P=await this.operationIndex({indexName:h,operationIndexParams:{operation:"move",destination:e}},s);return await this.waitForTask({indexName:h,taskID:P.taskID,maxRetries:o}),{copyOperationResponse:y,batchResponses:f,moveOperationResponse:P}}catch(y){throw await this.deleteIndex({indexName:h}),y}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e})}catch(t){if(t instanceof j&&t.status===404)return!1;throw t}return!0},searchForHits(e,t){return this.search(e,t)},searchForFacets(e,t){return this.search(e,t)},addApiKey(e,t){u("apiKey","addApiKey",e),u("apiKey.acl","addApiKey",e.acl);let s={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return m.request(s,t)},addOrUpdateObject({indexName:e,objectID:t,body:r},a){u("indexName","addOrUpdateObject",e),u("objectID","addOrUpdateObject",t),u("body","addOrUpdateObject",r);let h={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r};return m.request(h,a)},appendSource(e,t){u("source","appendSource",e),u("source.source","appendSource",e.source);let s={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return m.request(s,t)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:t},r){u("xAlgoliaUserID","assignUserId",e),u("assignUserIdParams","assignUserId",t),u("assignUserIdParams.cluster","assignUserId",t.cluster);let a="/1/clusters/mapping",o={},s={};e!==void 0&&(o["X-Algolia-User-ID"]=e.toString());let c={method:"POST",path:a,queryParameters:s,headers:o,data:t};return m.request(c,r)},batch({indexName:e,batchWriteParams:t},r){u("indexName","batch",e),u("batchWriteParams","batch",t),u("batchWriteParams.requests","batch",t.requests);let c={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:t},r){u("xAlgoliaUserID","batchAssignUserIds",e),u("batchAssignUserIdsParams","batchAssignUserIds",t),u("batchAssignUserIdsParams.cluster","batchAssignUserIds",t.cluster),u("batchAssignUserIdsParams.users","batchAssignUserIds",t.users);let a="/1/clusters/mapping/batch",o={},s={};e!==void 0&&(o["X-Algolia-User-ID"]=e.toString());let c={method:"POST",path:a,queryParameters:s,headers:o,data:t};return m.request(c,r)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:t},r){u("dictionaryName","batchDictionaryEntries",e),u("batchDictionaryEntriesParams","batchDictionaryEntries",t),u("batchDictionaryEntriesParams.requests","batchDictionaryEntries",t.requests);let c={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},browse({indexName:e,browseParams:t},r){u("indexName","browse",e);let c={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0};return m.request(c,r)},clearObjects({indexName:e},t){u("indexName","clearObjects",e);let s={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},clearRules({indexName:e,forwardToReplicas:t},r){u("indexName","clearRules",e);let a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),o={},s={};t!==void 0&&(s.forwardToReplicas=t.toString());let c={method:"POST",path:a,queryParameters:s,headers:o};return m.request(c,r)},clearSynonyms({indexName:e,forwardToReplicas:t},r){u("indexName","clearSynonyms",e);let a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),o={},s={};t!==void 0&&(s.forwardToReplicas=t.toString());let c={method:"POST",path:a,queryParameters:s,headers:o};return m.request(c,r)},customDelete({path:e,parameters:t},r){u("path","customDelete",e);let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return m.request(c,r)},customGet({path:e,parameters:t},r){u("path","customGet",e);let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return m.request(c,r)},customPost({path:e,parameters:t,body:r},a){u("path","customPost",e);let h={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return m.request(h,a)},customPut({path:e,parameters:t,body:r},a){u("path","customPut",e);let h={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return m.request(h,a)},deleteApiKey({key:e},t){u("key","deleteApiKey",e);let s={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},deleteBy({indexName:e,deleteByParams:t},r){u("indexName","deleteBy",e),u("deleteByParams","deleteBy",t);let c={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},deleteIndex({indexName:e},t){u("indexName","deleteIndex",e);let s={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},deleteObject({indexName:e,objectID:t},r){u("indexName","deleteObject",e),u("objectID","deleteObject",t);let c={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},deleteRule({indexName:e,objectID:t,forwardToReplicas:r},a){u("indexName","deleteRule",e),u("objectID","deleteRule",t);let o="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),s={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());let h={method:"DELETE",path:o,queryParameters:c,headers:s};return m.request(h,a)},deleteSource({source:e},t){u("source","deleteSource",e);let s={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},deleteSynonym({indexName:e,objectID:t,forwardToReplicas:r},a){u("indexName","deleteSynonym",e),u("objectID","deleteSynonym",t);let o="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),s={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());let h={method:"DELETE",path:o,queryParameters:c,headers:s};return m.request(h,a)},getApiKey({key:e},t){u("key","getApiKey",e);let s={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},getAppTask({taskID:e},t){u("taskID","getAppTask",e);let s={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},getDictionaryLanguages(e){let o={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return m.request(o,e)},getDictionarySettings(e){let o={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return m.request(o,e)},getLogs({offset:e,length:t,indexName:r,type:a}={},o=void 0){let s="/1/logs",c={},h={};e!==void 0&&(h.offset=e.toString()),t!==void 0&&(h.length=t.toString()),r!==void 0&&(h.indexName=r.toString()),a!==void 0&&(h.type=a.toString());let y={method:"GET",path:s,queryParameters:h,headers:c};return m.request(y,o)},getObject({indexName:e,objectID:t,attributesToRetrieve:r},a){u("indexName","getObject",e),u("objectID","getObject",t);let o="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),s={},c={};r!==void 0&&(c.attributesToRetrieve=r.toString());let h={method:"GET",path:o,queryParameters:c,headers:s};return m.request(h,a)},getObjects(e,t){u("getObjectsParams","getObjects",e),u("getObjectsParams.requests","getObjects",e.requests);let s={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return m.request(s,t)},getRule({indexName:e,objectID:t},r){u("indexName","getRule",e),u("objectID","getRule",t);let c={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},getSettings({indexName:e,getVersion:t},r){u("indexName","getSettings",e);let a="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),o={},s={};t!==void 0&&(s.getVersion=t.toString());let c={method:"GET",path:a,queryParameters:s,headers:o};return m.request(c,r)},getSources(e){let o={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return m.request(o,e)},getSynonym({indexName:e,objectID:t},r){u("indexName","getSynonym",e),u("objectID","getSynonym",t);let c={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},getTask({indexName:e,taskID:t},r){u("indexName","getTask",e),u("taskID","getTask",t);let c={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return m.request(c,r)},getTopUserIds(e){let o={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return m.request(o,e)},getUserId({userID:e},t){u("userID","getUserId",e);let s={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},hasPendingMappings({getClusters:e}={},t=void 0){let r="/1/clusters/mapping/pending",a={},o={};e!==void 0&&(o.getClusters=e.toString());let s={method:"GET",path:r,queryParameters:o,headers:a};return m.request(s,t)},listApiKeys(e){let o={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return m.request(o,e)},listClusters(e){let o={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return m.request(o,e)},listIndices({page:e,hitsPerPage:t}={},r=void 0){let a="/1/indexes",o={},s={};e!==void 0&&(s.page=e.toString()),t!==void 0&&(s.hitsPerPage=t.toString());let c={method:"GET",path:a,queryParameters:s,headers:o};return m.request(c,r)},listUserIds({page:e,hitsPerPage:t}={},r=void 0){let a="/1/clusters/mapping",o={},s={};e!==void 0&&(s.page=e.toString()),t!==void 0&&(s.hitsPerPage=t.toString());let c={method:"GET",path:a,queryParameters:s,headers:o};return m.request(c,r)},multipleBatch(e,t){u("batchParams","multipleBatch",e),u("batchParams.requests","multipleBatch",e.requests);let s={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return m.request(s,t)},operationIndex({indexName:e,operationIndexParams:t},r){u("indexName","operationIndex",e),u("operationIndexParams","operationIndex",t),u("operationIndexParams.operation","operationIndex",t.operation),u("operationIndexParams.destination","operationIndex",t.destination);let c={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},partialUpdateObject({indexName:e,objectID:t,attributesToUpdate:r,createIfNotExists:a},o){u("indexName","partialUpdateObject",e),u("objectID","partialUpdateObject",t),u("attributesToUpdate","partialUpdateObject",r);let s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),c={},h={};a!==void 0&&(h.createIfNotExists=a.toString());let y={method:"POST",path:s,queryParameters:h,headers:c,data:r};return m.request(y,o)},removeUserId({userID:e},t){u("userID","removeUserId",e);let s={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},replaceSources({source:e},t){u("source","replaceSources",e);let s={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return m.request(s,t)},restoreApiKey({key:e},t){u("key","restoreApiKey",e);let s={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return m.request(s,t)},saveObject({indexName:e,body:t},r){u("indexName","saveObject",e),u("body","saveObject",t);let c={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)},saveRule({indexName:e,objectID:t,rule:r,forwardToReplicas:a},o){u("indexName","saveRule",e),u("objectID","saveRule",t),u("rule","saveRule",r),u("rule.objectID","saveRule",r.objectID),u("rule.consequence","saveRule",r.consequence);let s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),c={},h={};a!==void 0&&(h.forwardToReplicas=a.toString());let y={method:"PUT",path:s,queryParameters:h,headers:c,data:r};return m.request(y,o)},saveRules({indexName:e,rules:t,forwardToReplicas:r,clearExistingRules:a},o){u("indexName","saveRules",e),u("rules","saveRules",t);let s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),c={},h={};r!==void 0&&(h.forwardToReplicas=r.toString()),a!==void 0&&(h.clearExistingRules=a.toString());let y={method:"POST",path:s,queryParameters:h,headers:c,data:t};return m.request(y,o)},saveSynonym({indexName:e,objectID:t,synonymHit:r,forwardToReplicas:a},o){u("indexName","saveSynonym",e),u("objectID","saveSynonym",t),u("synonymHit","saveSynonym",r),u("synonymHit.objectID","saveSynonym",r.objectID),u("synonymHit.type","saveSynonym",r.type);let s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(t)),c={},h={};a!==void 0&&(h.forwardToReplicas=a.toString());let y={method:"PUT",path:s,queryParameters:h,headers:c,data:r};return m.request(y,o)},saveSynonyms({indexName:e,synonymHit:t,forwardToReplicas:r,replaceExistingSynonyms:a},o){u("indexName","saveSynonyms",e),u("synonymHit","saveSynonyms",t);let s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),c={},h={};r!==void 0&&(h.forwardToReplicas=r.toString()),a!==void 0&&(h.replaceExistingSynonyms=a.toString());let y={method:"POST",path:s,queryParameters:h,headers:c,data:t};return m.request(y,o)},search(e,t){e&&Array.isArray(e)&&(e={requests:e.map(({params:h,...y})=>y.type==="facet"?{...y,...h,type:"facet"}:{...y,...h,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),u("searchMethodParams","search",e),u("searchMethodParams.requests","search",e.requests);let s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return m.request(s,t)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:t},r){u("dictionaryName","searchDictionaryEntries",e),u("searchDictionaryEntriesParams","searchDictionaryEntries",t),u("searchDictionaryEntriesParams.query","searchDictionaryEntries",t.query);let c={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t,useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchForFacetValues({indexName:e,facetName:t,searchForFacetValuesRequest:r},a){u("indexName","searchForFacetValues",e),u("facetName","searchForFacetValues",t);let h={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return m.request(h,a)},searchRules({indexName:e,searchRulesParams:t},r){u("indexName","searchRules",e);let c={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchSingleIndex({indexName:e,searchParams:t},r){u("indexName","searchSingleIndex",e);let c={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchSynonyms({indexName:e,searchSynonymsParams:t},r){u("indexName","searchSynonyms",e);let c={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return m.request(c,r)},searchUserIds(e,t){u("searchUserIdsParams","searchUserIds",e),u("searchUserIdsParams.query","searchUserIds",e.query);let s={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return m.request(s,t)},setDictionarySettings(e,t){u("dictionarySettingsParams","setDictionarySettings",e),u("dictionarySettingsParams.disableStandardEntries","setDictionarySettings",e.disableStandardEntries);let s={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return m.request(s,t)},setSettings({indexName:e,indexSettings:t,forwardToReplicas:r},a){u("indexName","setSettings",e),u("indexSettings","setSettings",t);let o="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());let h={method:"PUT",path:o,queryParameters:c,headers:s,data:t};return m.request(h,a)},updateApiKey({key:e,apiKey:t},r){u("key","updateApiKey",e),u("apiKey","updateApiKey",t),u("apiKey.acl","updateApiKey",t.acl);let c={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return m.request(c,r)}}}function Uo(n,i,d){if(!n||typeof n!="string")throw new Error("`appId` is missing.");if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");let{compression:p,...l}=d||{};return ce({appId:n,apiKey:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:te(),requester:ie(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:N(),requestsCache:N({serializable:!1}),hostsCache:E({caches:[Y({key:`${H}-${n}`}),N()]}),...l})}export{H as apiClientVersion,Uo as searchClient};
6
6
  //# sourceMappingURL=browser.min.js.map