1import{h as wt,aF as ri,f as W,g as Pt,F as Xe,o as $t,b as Ot,p as V,aW as wu,c as G,e as ue,q as se,n as Q,j as Ye,k as Vs,t as we,aA as Bs,s as ye,R as Pu,S as Ou,aX as ju,w as Ee,m as $u,A as Wr,u as pe,at as Lr,aY as _u,au as bi,aq as xu}from"./core-CH9m1tkb.js";import{aT as Fu}from"./components-CTdYFgqZ.js";import{u as Iu,aD as Eu,a0 as Tu}from"./misc-CSCuvjXh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"84bb9b1ef01920ad29edca6f5ccd42bb0900fd53"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="82aa34b3-d629-4be7-af2d-7a5e69ad6ca7",e._sentryDebugIdIdentifier="sentry-dbid-82aa34b3-d629-4be7-af2d-7a5e69ad6ca7")})()}catch{}const Au={INDEX_NOT_FOUND:"index_not_found"};class ze extends Error{name="MeiliSearchError"}class Si extends ze{name="MeiliSearchApiError";cause;response;constructor(t,r){super(r?.message??`${t.status}: ${t.statusText}`),this.response=t,r!==void 0&&(this.cause=r)}}class Ri extends ze{name="MeiliSearchRequestError";constructor(t,r){super(`Request to ${t} has failed`,{cause:r})}}class wi extends ze{name="MeiliSearchRequestTimeOutError";cause;constructor(t,r){super(`request timed out after ${t}ms`),this.cause={timeout:t,requestInit:r}}}class Du extends ze{name="MeiliSearchTaskTimeOutError";cause;constructor(t,r){super(`timeout of ${r}ms has exceeded on task ${t} when waiting for it to be resolved.`),this.cause={taskUid:t,timeout:r}}}const Cu="0.53.0",Hu={version:Cu};function Nu(e){return e.startsWith("https://")||e.startsWith("http://")?e:`http://${e}`}function Wu(e){return e.endsWith("/")||(e+="/"),e}function Lu(e,t){for(const[r,n]of Object.entries(t))n!=null&&e.set(r,Array.isArray(n)?n.join():n instanceof Date?n.toISOString():String(n))}function Mu(e,t){const r="X-Meilisearch-Client",n=`Meilisearch JavaScript (v${Hu.version})`,i="Content-Type",a="Authorization",s=new Headers(t);if(e.apiKey&&!s.has(a)&&s.set(a,`Bearer ${e.apiKey}`),s.has(i)||s.set(i,"application/json"),e.clientAgents!==void 0){const c=e.clientAgents.concat(n);s.set(r,c.join(" ; "))}else s.set(r,n);return s}const Er=Symbol("<timeout>");function Pi(e,t){const{signal:r}=e,n=new AbortController;if(r!=null){let i=null;if(r.aborted)n.abort(r.reason);else{const a=()=>n.abort(r.reason);r.addEventListener("abort",a,{once:!0}),i=()=>r.removeEventListener("abort",a),n.signal.addEventListener("abort",i,{once:!0})}return()=>{if(r.aborted)return;const a=setTimeout(()=>n.abort(Er),t),s=()=>{clearTimeout(a),i!==null&&n.signal.removeEventListener("abort",i)};return r.addEventListener("abort",s,{once:!0}),()=>{r.removeEventListener("abort",s),s()}}}return e.signal=n.signal,()=>{const i=setTimeout(()=>n.abort(Er),t);return()=>clearTimeout(i)}}class Dn{#e;#t;#r;#n;constructor(t){const r=Wu(Nu(t.host));try{this.#e=new URL(r)}catch(n){throw new ze("The provided host is not valid",{cause:n})}this.#t={...t.requestInit,headers:Mu(t,t.requestInit?.headers)},this.#r=t.httpClient,this.#n=t.timeout}#s(t,r){if(t===void 0&&r===void 0)return this.#t.headers;const n=new Headers(t);r!==void 0&&!n.has("Content-Type")&&n.set("Content-Type",r);for(const[i,a]of this.#t.headers)n.has(i)||n.set(i,a);return n}#a({path:t,method:r,params:n,contentType:i,body:a,extraRequestInit:s}){const c=new URL(t,this.#e);n!==void 0&&Lu(c.searchParams,n);const l={method:r,body:i===void 0||typeof a!="string"?JSON.stringify(a):a,...s,...this.#t,headers:this.#s(s?.headers,i)};return{url:c,init:l}}async#i(t){const{url:r,init:n}=this.#a(t),a=(this.#n!==void 0?Pi(n,this.#n):null)?.();let s,c;try{if(this.#r!==void 0)return await this.#r(r,n);s=await fetch(r,n),c=await s.text()}catch(d){throw new Ri(r.toString(),Object.is(d,Er)?new wi(this.#n,n):d)}finally{a?.()}const l=c===""?void 0:JSON.parse(c);if(!s.ok)throw new Si(s,l);return l}get(t){return this.#i(t)}post(t){return this.#i({...t,method:"POST"})}put(t){return this.#i({...t,method:"PUT"})}patch(t){return this.#i({...t,method:"PATCH"})}delete(t){return this.#i({...t,method:"DELETE"})}postStream(t){return this.#o({...t,method:"POST"})}async#o(t){const{url:r,init:n}=this.#a(t),a=(this.#n!==void 0?Pi(n,this.#n):null)?.();let s;try{if(this.#r!==void 0){const c=await this.#r(r,n);if(!(c instanceof ReadableStream))throw new ze("Custom HTTP client must return a ReadableStream for streaming requests");return c}s=await fetch(r,n)}catch(c){throw new Ri(r.toString(),Object.is(c,Er)?new wi(this.#n,n):c)}finally{a?.()}if(!s.ok){const c=await s.text(),l=c===""?void 0:JSON.parse(c);throw new Si(s,l)}if(!s.body)throw new ze("Response body is null - server did not return a readable stream");return s.body}}const Oi=Symbol("<task timeout>");function Ks(e){return function(t){return Object.defineProperty(t,"waitTask",{async value(r){return await e.
1waitForTask(await t,r)}})}}const qu=e=>typeof e=="number"?e:e.taskUid;class Cn{#e;#t;#r;#n;constructor(t,r){this.#e=t,this.#t=r?.timeout??5e3,this.#r=r?.interval??50,this.#n=Ks(this)}async getTask(t,r){return await this.#e.get({path:`tasks/${t}`,extraRequestInit:r})}async getTasks(t){return await this.#e.get({path:"tasks",params:t})}async waitForTask(t,r){const n=qu(t),i=r?.timeout??this.#t,a=r?.interval??this.#r,s=i>0?new AbortController:null,c=s!==null?setTimeout(()=>void s.abort(Oi),i):void 0;try{for(;;){const l=await this.getTask(n,{signal:s?.signal});if(l.status!=="enqueued"&&l.status!=="processing")return clearTimeout(c),l;a>0&&await new Promise(d=>setTimeout(d,a))}}catch(l){throw Object.is(l.cause,Oi)?new Du(n,i):l}}async*waitForTasksIter(t,r){for await(const n of t)yield await this.waitForTask(n,r)}async waitForTasks(...t){const r=[];for await(const n of this.waitForTasksIter(...t))r.push(n);return r}cancelTasks(t){return this.#n(this.#e.post({path:"tasks/cancel",params:t}))}deleteTasks(t){return this.#n(this.#e.delete({path:"tasks",params:t}))}}function Hn(e,t){const r=Ks(t);return{post:(...n)=>r(e.post(...n)),put:(...n)=>r(e.put(...n)),patch:(...n)=>r(e.patch(...n)),delete:(...n)=>r(e.delete(...n))}}class Je{uid;primaryKey;createdAt;updatedAt;httpRequest;tasks;#e;constructor(t,r,n){this.uid=r,this.primaryKey=n,this.httpRequest=new Dn(t),this.tasks=new Cn(this.httpRequest,t.defaultWaitOptions),this.#e=Hn(this.httpRequest,this.tasks)}async search(t,r,n){return await this.httpRequest.post({path:`indexes/${this.uid}/search`,body:{q:t,...r},extraRequestInit:n})}async searchGet(t,r,n){const a={q:t,...r,filter:(s=>{if(typeof s=="string")return s;if(Array.isArray(s))throw new ze("The filter query parameter should be in string format when using searchGet")})(r?.filter),sort:r?.sort?.join(","),facets:r?.facets?.join(","),attributesToRetrieve:r?.attributesToRetrieve?.join(","),attributesToCrop:r?.attributesToCrop?.join(","),attributesToHighlight:r?.attributesToHighlight?.join(","),vector:r?.vector?.join(","),attributesToSearchOn:r?.attributesToSearchOn?.join(",")};return await this.httpRequest.get({path:`indexes/${this.uid}/search`,params:a,extraRequestInit:n})}async searchForFacetValues(t,r){return await this.httpRequest.post({path:`indexes/${this.uid}/facet-search`,body:t,extraRequestInit:r})}async searchSimilarDocuments(t){return await this.httpRequest.post({path:`indexes/${this.uid}/similar`,body:t})}async getRawInfo(){const t=await this.httpRequest.get({path:`indexes/${this.uid}`});return this.primaryKey=t.primaryKey,this.updatedAt=new Date(t.updatedAt),this.createdAt=new Date(t.createdAt),t}async fetchInfo(){return await this.getRawInfo(),this}async fetchPrimaryKey(){return this.primaryKey=(await this.getRawInfo()).primaryKey,this.primaryKey}static create(t,r={},n){const i=new Dn(n);return Hn(i,new Cn(i)).post({path:"indexes",body:{...r,uid:t}})}update(t){return this.#e.patch({path:`indexes/${this.uid}`,body:t})}delete(){return this.#e.delete({path:`indexes/${this.uid}`})}async getStats(){return await this.httpRequest.get({path:`indexes/${this.uid}/stats`})}async getDocuments(t){const r=`indexes/${this.uid}/documents`;return t?.filter!==void 0?await this.httpRequest.post({path:`${r}/fetch`,body:t}):await this.httpRequest.get({path:r,params:t})}async getDocument(t,r){const n=Array.isArray(r?.fields)?r.fields.join():void 0;return await this.httpRequest.get({path:`indexes/${this.uid}/documents/${t}`,params:{...r,fields:n}})}addDocuments(t,r){return this.#e.post({path:`indexes/${this.uid}/documents`,params:r,body:t})}addDocumentsFromString(t,r,n){return this.#e.post({path:`indexes/${this.uid}/documents`,body:t,params:n,contentType:r})}addDocumentsInBatches(t,r=1e3,n){const i=[];for(let a=0;a<t.length;a+=r)i.push(this.addDocuments(t.slice(a,a+r),n));return i}updateDocuments(t,r){return this.#e.put({path:`indexes/${this.uid}/documents`,params:r,body:t})}updateDocumentsInBatches(t,r=1e3,n){const i=[];for(let a=0;a<t.length;a+=r)i.push(this.updateDocuments(t.slice(a,a+r),n));return i}updateDocumentsFromString(t,r,n){return this.#e.put({path:`indexes/${this.uid}/documents`,body:t,params:n,contentType:r})}deleteDocument(t){return this.#e.delete({path:`indexes/${this.uid}/documents/${t}`})}deleteDocuments(t){const n=!Array.isArray(t)&&typeof t=="object"?"documents/delete":"documents/delete-batch";return this.#e.post({path:`indexes/${this.uid}/${n}`,body:t})}deleteAllDocuments(){return this.#e.delete({path:`indexes/${this.uid}/documents`})}updateDocumentsByFunction(t){return this.#e.post({path:`indexes/${this.uid}/documents/edit`,body:t})}async getSettings(){return await this.httpRequest.get({path:`indexes/${this.uid}
1/settings`})}updateSettings(t){return this.#e.patch({path:`indexes/${this.uid}/settings`,body:t})}resetSettings(){return this.#e.delete({path:`indexes/${this.uid}/settings`})}async getPagination(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/pagination`})}updatePagination(t){return this.#e.patch({path:`indexes/${this.uid}/settings/pagination`,body:t})}resetPagination(){return this.#e.delete({path:`indexes/${this.uid}/settings/pagination`})}async getSynonyms(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/synonyms`})}updateSynonyms(t){return this.#e.put({path:`indexes/${this.uid}/settings/synonyms`,body:t})}resetSynonyms(){return this.#e.delete({path:`indexes/${this.uid}/settings/synonyms`})}async getStopWords(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/stop-words`})}updateStopWords(t){return this.#e.put({path:`indexes/${this.uid}/settings/stop-words`,body:t})}resetStopWords(){return this.#e.delete({path:`indexes/${this.uid}/settings/stop-words`})}async getRankingRules(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/ranking-rules`})}updateRankingRules(t){return this.#e.put({path:`indexes/${this.uid}/settings/ranking-rules`,body:t})}resetRankingRules(){return this.#e.delete({path:`indexes/${this.uid}/settings/ranking-rules`})}async getDistinctAttribute(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/distinct-attribute`})}updateDistinctAttribute(t){return this.#e.put({path:`indexes/${this.uid}/settings/distinct-attribute`,body:t})}resetDistinctAttribute(){return this.#e.delete({path:`indexes/${this.uid}/settings/distinct-attribute`})}async getFilterableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/filterable-attributes`})}updateFilterableAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/filterable-attributes`,body:t})}resetFilterableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/filterable-attributes`})}async getSortableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/sortable-attributes`})}updateSortableAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/sortable-attributes`,body:t})}resetSortableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/sortable-attributes`})}async getSearchableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/searchable-attributes`})}updateSearchableAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/searchable-attributes`,body:t})}resetSearchableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/searchable-attributes`})}async getDisplayedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/displayed-attributes`})}updateDisplayedAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/displayed-attributes`,body:t})}resetDisplayedAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/displayed-attributes`})}async getTypoTolerance(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/typo-tolerance`})}updateTypoTolerance(t){return this.#e.patch({path:`indexes/${this.uid}/settings/typo-tolerance`,body:t})}resetTypoTolerance(){return this.#e.delete({path:`indexes/${this.uid}/settings/typo-tolerance`})}async getFaceting(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/faceting`})}updateFaceting(t){return this.#e.patch({path:`indexes/${this.uid}/settings/faceting`,body:t})}resetFaceting(){return this.#e.delete({path:`indexes/${this.uid}/settings/faceting`})}async getSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/separator-tokens`})}updateSeparatorTokens(t){return this.#e.put({path:`indexes/${this.uid}/settings/separator-tokens`,body:t})}resetSeparatorTokens(){return this.#e.delete({path:`indexes/${this.uid}/settings/separator-tokens`})}async getNonSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}
1/settings/non-separator-tokens`})}updateNonSeparatorTokens(t){return this.#e.put({path:`indexes/${this.uid}/settings/non-separator-tokens`,body:t})}resetNonSeparatorTokens(){return this.#e.delete({path:`indexes/${this.uid}/settings/non-separator-tokens`})}async getDictionary(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/dictionary`})}updateDictionary(t){return this.#e.put({path:`indexes/${this.uid}/settings/dictionary`,body:t})}resetDictionary(){return this.#e.delete({path:`indexes/${this.uid}/settings/dictionary`})}async getProximityPrecision(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/proximity-precision`})}updateProximityPrecision(t){return this.#e.put({path:`indexes/${this.uid}/settings/proximity-precision`,body:t})}resetProximityPrecision(){return this.#e.delete({path:`indexes/${this.uid}/settings/proximity-precision`})}async getEmbedders(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/embedders`})}updateEmbedders(t){return this.#e.patch({path:`indexes/${this.uid}/settings/embedders`,body:t})}resetEmbedders(){return this.#e.delete({path:`indexes/${this.uid}/settings/embedders`})}async getSearchCutoffMs(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}updateSearchCutoffMs(t){return this.#e.put({path:`indexes/${this.uid}/settings/search-cutoff-ms`,body:t})}resetSearchCutoffMs(){return this.#e.delete({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}async getLocalizedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/localized-attributes`})}updateLocalizedAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/localized-attributes`,body:t})}resetLocalizedAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/localized-attributes`})}async getFacetSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/facet-search`})}updateFacetSearch(t){return this.#e.put({path:`indexes/${this.uid}/settings/facet-search`,body:t})}resetFacetSearch(){return this.#e.delete({path:`indexes/${this.uid}/settings/facet-search`})}async getPrefixSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/prefix-search`})}updatePrefixSearch(t){return this.#e.put({path:`indexes/${this.uid}/settings/prefix-search`,body:t})}resetPrefixSearch(){return this.#e.delete({path:`indexes/${this.uid}/settings/prefix-search`})}async getChat(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/chat`})}updateChat(t){return this.#e.patch({path:`indexes/${this.uid}/settings/chat`,body:t})}}class Uu{#e;constructor(t){this.#e=t}async getBatch(t){return await this.#e.get({path:`batches/${t}`})}async getBatches(t){return await this.#e.get({path:"batches",params:t})}}class ku{#e;#t;constructor(t,r){this.#e=t,this.#t=r}async get(){return await this.#e.get({path:`chats/${this.#t}/settings`})}async update(t){return await this.#e.patch({path:`chats/${this.#t}/settings`,body:t})}async reset(){await this.#e.delete({path:`chats/${this.#t}/settings`})}async streamCompletion(t){if(!t.stream)throw new Error("The SDK only supports streaming");return await this.#e.postStream({path:`chats/${this.#t}/chat/completions`,body:t})}}class Qu{config;httpRequest;#e;get tasks(){return this.#e}#t;get batches(){return this.#t}#r;constructor(t){this.config=t,this.httpRequest=new Dn(t),this.#e=new Cn(this.httpRequest,t.defaultWaitOptions),this.#t=new Uu(this.httpRequest),this.#r=Hn(this.httpRequest,this.tasks)}index(t){return new Je(this.config,t)}async getIndex(t){return new Je(this.config,t).fetchInfo()}async getRawIndex(t){return new Je(this.config,t).getRawInfo()}async getIndexes(t){const r=await this.getRawIndexes(t),n=r.results.map(i=>new Je(this.config,i.uid,i.primaryKey));return{...r,results:n}}async getRawIndexes(t){return await this.httpRequest.get({path:"indexes",params:t})}createIndex(t,r){return Je.create(t,r,this.config)}updateIndex(t,r){return new Je(this.config,t).update(r)}deleteIndex(t){return new Je(this.config,t).delete()}async deleteIndexIfExists(t){try{return await this.deleteIndex(t),!0}catch(r){if(r?.cause?.code===Au.INDEX_NOT_FOUND)return!1;throw r}}
1swapIndexes(t){return this.#r.post({path:"/swap-indexes",body:t})}async multiSearch(t,r){return await this.httpRequest.post({path:"multi-search",body:t,extraRequestInit:r})}chat(t){return new ku(this.httpRequest,t)}async getChatWorkspaces(){return await this.httpRequest.get({path:"chats"})}async getWebhooks(){return await this.httpRequest.get({path:"webhooks"})}async getWebhook(t){return await this.httpRequest.get({path:`webhooks/${t}`})}async createWebhook(t){return await this.httpRequest.post({path:"webhooks",body:t})}async updateWebhook(t,r){return await this.httpRequest.patch({path:`webhooks/${t}`,body:r})}async deleteWebhook(t){await this.httpRequest.delete({path:`webhooks/${t}`})}async getNetwork(){return await this.httpRequest.get({path:"network"})}async updateNetwork(t){return await this.httpRequest.patch({path:"network",body:t})}async getKeys(t){const r=await this.httpRequest.get({path:"keys",params:t});return r.results=r.results.map(n=>({...n,createdAt:new Date(n.createdAt),updatedAt:new Date(n.updatedAt)})),r}async getKey(t){return await this.httpRequest.get({path:`keys/${t}`})}async createKey(t){return await this.httpRequest.post({path:"keys",body:t})}async updateKey(t,r){return await this.httpRequest.patch({path:`keys/${t}`,body:r})}async deleteKey(t){await this.httpRequest.delete({path:`keys/${t}`})}async health(){return await this.httpRequest.get({path:"health"})}async isHealthy(){try{const{status:t}=await this.health();return t==="available"}catch{return!1}}async getStats(){return await this.httpRequest.get({path:"stats"})}async getVersion(){return await this.httpRequest.get({path:"version"})}createDump(){return this.#r.post({path:"dumps"})}createSnapshot(){return this.#r.post({path:"snapshots"})}async getExperimentalFeatures(){return await this.httpRequest.get({path:"experimental-features"})}async updateExperimentalFeatures(t){return await this.httpRequest.patch({path:"experimental-features",body:t})}}function zs(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Vu(e){return{...{placeholderSearch:!0,keepZeroFacets:!1,clientAgents:[],finitePagination:!1},...e}}function Bu(e){if(typeof e=="function"){const t=e();if(typeof t!="string")throw new TypeError("Provided apiKey function (2nd parameter) did not return a string, expected string");return t}return e}function Ku(e,t,r){const{requestInit:n,httpClient:i}=r;if(typeof e!="string")throw new TypeError("Provided hostUrl value (1st parameter) is not a string, expected string");if(typeof t!="string"&&typeof t!="function")throw new TypeError("Provided apiKey value (2nd parameter) is not a string or a function, expected string or function");if(n!==void 0&&!zs(n))throw new TypeError("Provided requestInit should be an object");if(i&&typeof i!="function")throw new TypeError("Provided custom httpClient should be a function")}function zu(e,t){return{multiSearch:async function(r,n){const i=t.formatKey([r]),a=t.getEntry(i);if(a)return a;const c=(await e.multiSearch({queries:r})).results.map((l,d)=>({...l,pagination:n[d]||{}}));return t.setEntry(i,c),c}}}function Ju({insideBoundingBox:e,aroundLatLng:t,aroundRadius:r,minimumAroundRadius:n}){let i,a,s;if(t){const[c,l]=t.split(",").map(d=>Number.parseFloat(d).toFixed(5));i=[c,l]}if((r!=null||n!=null)&&(r==="all"?console.warn("instant-meilisearch is not compatible with the `all` value on the aroundRadius parameter"):r!=null?a=r:a=n),e&&typeof e=="string"){const[c,l,d,v]=e.split(",").map(b=>parseFloat(b));s=`_geoBoundingBox([${c}, ${l}], [${d}, ${v}])`}else if(i!=null&&a!=null){const[c,l]=i;s=`_geoRadius(${c}, ${l}, ${a})`}return s}const Gu=/([\\"])/g;function Js(e){return e.replace(Gu,"\\$1")}function Yu(e){const t=Js(e),r=t.indexOf(":"),n=t.slice(0,r),i=t.slice(r+1);return`"${n}"="${i}"`}function Xu(e){const t=()=>{const s=e.match(/^([^<!>:=]*)([<!>:=]+)(.*)$/);if(s){const[c,l,d]=s.slice(1),v=l.match(/^([<!>]?=|<|>|:){1}(.*)/)||["",""],[b,h]=v.slice(1),f=h+d;return[c,b,f]}return[e,"",""]},[r,n,i]=t();return`"${Js(r).trim()}"${n===":"?" ":n}${i.trim()}`}function ji(e,t){return typeof t=="string"?e(t):t.map(r=>typeof r=="string"?e(r):r.map(n=>e(n)))}function $i(e){return typeof e=="string"?[e]:e}function Zu(e,t,r){const n=$i(t),i=$i(r),a=[];return e!==void 0&&a.push(e),n!==void 0&&a.push(...n),i!==void 0&&a.push(...i),a}function ec(e,t,r){const n=t!==void 0?ji(Xu,t):t,i=r!==void 0?ji(Yu,r):r;return Zu(e,n,i)}function tc(e,t,r){return!(!r&&!t&&(!e||e.length===0))}function rc(e,t){const{page:r,hitsPerPage:n}=e;return t?{limit:n+1,offset:r*n}:{limit:0,offset:0}}function nc(e,t){const{page:r,hitsPerPage:n}=e;return t?{hitsPerPage:n,page:r+1}:{hitsPerPage:0,page:r+1}}function Gs(e){const{query:t,indexUid:r,facets:n,attributesToSnippet:i,snippetEllipsisText:a,filters:s,numericFilters:c,facetFilters:l,attributesToRetrieve:d,attributesToHighlight:v,highlightPreTag:b,highlightPostTag:h,placeholderSearch:f,pagination:u,sort:p,restrictSearchableAttributes:g,meiliSearchParams:o}=e,m={indexUid:r},y=ec(s,c,l);return{getParams(){return m},addQuery(){m.q=t},addFacets(){const S=o?.indexesOverrides?.[r]?.facets??o?.facets??n;S!==void 0&&(m.facets=typeof S=="string"?[S]:S)},addAttributesToCrop(){const S=o?.indexesOverrides?.[r]?.attributesToCrop??o?.attributesToCrop??i;S!==void 0&&(m.attributesToCrop=S)},addCropLength(){const S=o?.indexesOverrides?.[r]?.cropLength??o?.cropLength;S!==void 0&&(m.cropLength=S)},addCropMarker(){const S=o?.indexesOverrides?.[r]?.cropMarker??o?.cropMarker??a;S!==void 0&&(m.cropMarker=S)},addFilters(){const S=o?.indexesOverrides?.[r]?.filter??o?.filter;S!==void 0?m.filter=S:y.length&&(m.filter=y)},addAttributesToRetrieve(){const S=o?.indexesOverrides?.[r]?.attributesToRetrieve??o?.attributesToRetrieve??d;S!==void 0&&(m.attributesToRetrieve=S)},addAttributesToHighlight(){m.attributesToHighlight=o?.indexesOverrides?.[r]?.attributesToHighlight??o?.attributesToHighlight??v??["*"]},addPreTag(){m.highlightPreTag=o?.indexesOverrides?.[r]?.highlightPreTag??o?.highlightPreTag??b??"__ais-highlight__"},addPostTag(){m.highlightPostTag=o?.indexesOverrides?.[r]?.highlightPostTag??o?.highlightPostTag??h??"__/ais-highlight__"},addPagination(){const S=tc(y,t,f);if(u.finite){const{hitsPerPage:w,page:P}=nc(u,S);m.hitsPerPage=w,m.page=P}else{const{limit:w,offset:P}=rc(u,S);m.limit=w,m.offset=P}},addSort(){const w=o?.indexesOverrides?.[r]?.sort??o?.sort??p;w&&(!Array.isArray(w)||w.length)&&(m.sort=Array.isArray(w)?w:[w])},addGeoSearchFilter(){const{insideBoundingBox:S,aroundLatLng:w,aroundRadius:P,minimumAroun
1dRadius:O}=e,R=Ju({insideBoundingBox:S,aroundLatLng:w,aroundRadius:P,minimumAroundRadius:O});R!==void 0&&(Array.isArray(m.filter)?m.filter.unshift(R):m.filter=[R])},addShowMatchesPosition(){const S=o?.indexesOverrides?.[r]?.showMatchesPosition??o?.showMatchesPosition;S!==void 0&&(m.showMatchesPosition=S)},addMatchingStrategy(){const S=o?.indexesOverrides?.[r]?.matchingStrategy??o?.matchingStrategy;S!==void 0&&(m.matchingStrategy=S)},addShowRankingScore(){const S=o?.indexesOverrides?.[r]?.showRankingScore??o?.showRankingScore;S!==void 0&&(m.showRankingScore=S)},addAttributesToSearchOn(){const S=o?.indexesOverrides?.[r]?.attributesToSearchOn??o?.attributesToSearchOn??g;S!==void 0&&(m.attributesToSearchOn=S)},addHybridSearch(){const S=o?.indexesOverrides?.[r]?.hybrid??o?.hybrid;S!==void 0&&(m.hybrid=S)},addVector(){const S=o?.indexesOverrides?.[r]?.vector??o?.vector;S!==void 0&&(m.vector=S)},addDistinct(){const S=o?.indexesOverrides?.[r]?.distinct??o?.distinct;S!==void 0&&(m.distinct=S)},addRankingScoreThreshold(){const S=o?.indexesOverrides?.[r]?.rankingScoreThreshold??o?.rankingScoreThreshold;S!==void 0&&(m.rankingScoreThreshold=S)}}}function _i(e){const t=Gs(e);return t.addQuery(),t.addFacets(),t.addAttributesToCrop(),t.addCropLength(),t.addCropMarker(),t.addFilters(),t.addAttributesToRetrieve(),t.addAttributesToHighlight(),t.addPreTag(),t.addPostTag(),t.addPagination(),t.addSort(),t.addGeoSearchFilter(),t.addShowMatchesPosition(),t.addMatchingStrategy(),t.addShowRankingScore(),t.addAttributesToSearchOn(),t.addHybridSearch(),t.addVector(),t.addDistinct(),t.addRankingScoreThreshold(),t.getParams()}function ic(e){const t=[];return r=>t.includes(r[e])?!1:(t.push(r[e]),!0)}function ac(e){return e.reduce((t,r)=>t+=JSON.stringify(r),"")}function sc(e){return typeof e=="string"?e:JSON.stringify(e===void 0?null:e)}function Nn(e){return Array.isArray(e)?e.map(t=>Nn(t)):zs(e)?Object.keys(e).reduce((t,r)=>(t[r]=Nn(e[r]),t),{}):{value:sc(e)}}function oc(e){if(!e)return{};const t=Nn(e);return{_highlightResult:t,_snippetResult:t}}function uc(e){for(let t=0;t<e.length;
1t++){const r=`${t+Math.random()*1e6}`;e[t]._geo&&(e[t]._geoloc=e[t]._geo,e[t].objectID||(e[t].objectID=r)),e[t]._formatted?._geo&&(e[t]._formatted._geoloc=e[t]._formatted._geo,e[t]._formatted.objectID||(e[t]._formatted.objectID=r))}return e}function cc(e,t){const{hits:r}=e,{hitsPerPage:n}=e.pagination,{finitePagination:i,primaryKey:a}=t;!i&&r.length>n&&r.splice(r.length-1,1);let s=r.map(c=>{if(Object.keys(c).length>0){const{_formatted:l,_matchesPosition:d,...v}=c,b=Object.assign(v,oc(l));return t?.meiliSearchParams?.showMatchesPosition&&(b._matchesPosition=d),a&&(b.objectID=c[a]),b}return c});return s=uc(s),s}function fc(e){const{hitsPerPage:t=0,totalPages:r=0,estimatedTotalHits:n,totalHits:i}=e;return n??i??t*r}function lc(e,t){if(e.totalPages!=null)return e.totalPages;if(t===0)return 0;const{limit:r=20,offset:n=0,hits:i}=e,a=i.length>=r?1:0;return n/t+1+a}function hc(e,t){const{hitsPerPage:r,page:n}=t,i=lc(e,r);return{page:n,nbPages:i,hitsPerPage:r}}function dc(e){if(e){if(typeof e=="string")return[e]}else return[];return e}function mc(e,t,r){const n=dc(e),i={};for(const a of n)for(const s in t[a])i[a]||(i[a]=r[a]||{}),i[a][s]?i[a][s]=r[a][s]:i[a][s]=0;return i}function gc(e,t,r,n){return e?(n=n||{},mc(t,r,n)):n}function pc(e){return Object.keys(e).reduce((r,n)=>(r[n]={...e[n],avg:0,sum:0},r),{})}function vc(e,t,r){return{results:e.map(i=>yc(i,t[i.indexUid],r))}}function yc(e,t,r){const{processingTimeMs:n,query:i,indexUid:a,facetDistribution:s={},facetStats:c={}}=e,l=Object.keys(s),{hitsPerPage:d,page:v,nbPages:b}=hc(e,e.pagination),h=cc(e,r),f=fc(e),u=gc(r.keepZeroFacets,l,t,s);return{index:a,hitsPerPage:d,page:v,facets:u,nbPages:b,nbHits:f,processingTimeMS:n,query:i,hits:h,params:"",exhaustiveNbHits:!1,facets_stats:pc(c)}}function Ys(e){if(!e)return[];const t=/[^:]+:(?:asc|desc)/g,r=[];let n;for(;(n=t.exec(e))!==null;)r.push(n[0]);return r.map(i=>i.replace(/^,+|,+$/,""))}function Xs(e,t,r){return{hitsPerPage:t===void 0?20:t,page:r||0,finite:!!e}}function Zs(e){const t=e.indexOf(":");return t===-1?{indexUid:e,sortBy:""}:{indexUid:e.substring(0,t),sortBy:e.substring(t+1)}}function bc(e,t){const{query:r,indexName:n,params:i}=e,{indexUid:a,sortBy:s}=Zs(n),c=Xs(t.finitePagination,i?.hitsPerPage,i?.page);return{...t,query:r,...i,sort:Ys(s),indexUid:a,pagination:c,placeholderSearch:t.placeholderSearch!==!1,keepZeroFacets:!!t.keepZeroFacets}}function Sc(e,t){const{indexUid:r,sortBy:n}=Zs(e.indexName),{params:i}=e,a=Xs(t.finitePagination,i?.hitsPerPage,i?.page);return{...t,...i,sort:Ys(n),indexUid:r,pagination:a,placeholderSearch:t.placeholderSearch!==!1,keepZeroFacets:!!t.keepZeroFacets}}function Rc(e={}){let t=e;return{getEntry:function(r){if(t[r])try{return JSON.parse(t[r])}catch{return}},formatKey:function(r){return ac(r)},setEntry:function(r,n){t[r]=JSON.stringify(n)},clearCache:function(){t={}}}}function wc(e){const t={...e,placeholderSearch:!0,query:""},r=Gs(t);return r.addFacets(),r.addPagination(),r.getParams()}async function Pc(e,t,r){const n=ic("indexUid"),i=t.filter(n).filter(({indexUid:s})=>!Object.keys(r).includes(s));if(i.length===0)return r;const a=await e.multiSearch(i,[]);for(const s of a)r[s.indexUid]=s.facetDistribution||{};return r}function Oc(e,t){for(const r of t)e[r.indexUid]={...r.facetDistribution||{},...e[r.indexUid]||{}};return e}const jc="0.28.0",$c=(e=[])=>{const t=`Meilisearch instant-meilisearch (v${jc})`;return e.concat(t)};function _c(e,t="",r={}){Ku(e,t,r),t=Bu(t);const n=$c(r.clientAgents),i={host:e,apiKey:t,clientAgents:n};r.httpClient!==void 0&&(i.httpClient=r.httpClient),r.requestInit!==void 0&&(i.requestInit=r.requestInit);const a=new Qu(i),s=Rc(),c=zu(a,s);let l={};const d=Vu(r);return{meiliSearchInstance:a,setMeiliSearchParams:v=>{const{meiliSearchParams:b}=r;r.meiliSearchParams=b===void 0?v:{...b,...v,indexesOverrides:{...b.indexesOverrides||{},...v.indexesOverrides||{}}}},searchClient:{clearCache:()=>s.clearCache(),search:async function(v){try{const b=[],h=[],f=[];for(const g of v){const o=bc(g,r),m=_i(o);b.push(m);const y=wc(o);f.push(y),h.push(o.pagination)}l=await Pc(c,f,l);const u=await c.multiSearch(b,h);return l=Oc(l,u),vc(u,l,d)}catch(b){throw console.error(b),new Error(b)}},searchForFacetValues:async function(v){const b=[];for(const h of v){const f=Sc(h,r),p={..._i(f),facetQuery:h.params.facetQuery,facetName:h.params.facetName};delete p.indexUid;const g=await a.index(f.indexUid).searchForFacetValues(p),m={facetHits:g.facetHits.map(y=>({...y,highlighted:y.value})),exhaustiveFacetsCount:!1,processingTimeMS:g.processingTimeMs};b.push(m)}return b}}}}function xc(e,t,r){if(!e)throw new Error("You need to provide `widgetName` in y
1our data");var n=["ais-"+e];return t&&n.push("-"+t),r&&n.push("--"+r),n.join("")}var Y=function(e){var t=e.name;return{props:{classNames:{type:Object,default:void 0}},methods:{suit:function(r,n){var i=xc(t,r,n),a=this.classNames&&this.classNames[i];return a?[i,a].join(" "):i}}}};function _t(e){for(var t=arguments,r=1;r<arguments.length;r++){var n=t[r]!=null?t[r]:{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),i.forEach(function(a){Fc(e,a,n[a])})}return e}function Fc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ic=!1,Ec=!0;function dr(e){function t(r,n){for(var i=[],a=arguments.length-2;a-- >0;)i[a]=arguments[a+2];var s=i.length>0?i:void 0;if(typeof n=="object"&&(n.attrs||n.props||n.scopedSlots||n.on)){var c=Object.keys(n.on||{}),l=Object.assign({},n,n.attrs,n.props,c.reduce(function(d,v){return d["on"+v[0].toUpperCase()+v.slice(1)]=n.on[v],d},{}));return delete l.attrs,delete l.props,delete l.scopedSlots,c.forEach(function(d){return delete l.on[d]}),l.on&&Object.keys(l.on).length===0&&delete l.on,wt(r,l,n.scopedSlots?Object.assign({default:function(){return s}},n.scopedSlots):s)}return wt(r,n,s)}return function(){return e.call(this,t)}}function ni(e){var t=e.$slots||e.slots;return typeof t.default=="function"?t.default():t.default}function Mr(e,t){return(e.$slots||e.slots||{})[t]}var xi=new Set;function st(e){xi.has(e)||(xi.add(e),console.warn(e))}var ee=function(e,t){var r;e===void 0&&(e={});var n=e.connector;return t===void 0&&(t={}),(r={inject:{instantSearchInstance:{from:"$_ais_instantSearchInstance",default:function(){var i=this.$options._componentTag;throw new TypeError('It looks like you forgot to wrap your Algolia search component "<'+i+'>" inside of an "<ais-instant-search>" component.')}},getParentIndex:{from:"$_ais_getParentIndex",default:function(){var i=this;return function(){return i.instantSearchInstance.mainIndex}}}},data:function(){return{state:null}},created:function(){if(typeof n=="function"){if(this.factory=n(this.updateState,function(){}),this.widget=_t(this.factory(this.widgetParams),t),this.getParentIndex().addWidgets([this.widget]),this.instantSearchInstance._initialResults&&!this.instantSearchInstance.started){if(typeof this.instantSearchInstance.__forceRender!="function")throw new Error("You are using server side rendering with <ais-instant-search> instead of <ais-instant-search-ssr>.");this.instantSearchInstance.__forceRender(this.widget,this.getParentIndex())}}else n!==!0&&st(`You are using the InstantSearch widget mixin, but didn't provide a connector. 2While this is technically possible, and will give you access to the Helper, 3it's not the recommended way of making custom components. 4 5If you want to disable this message, pass { connector: true } to the mixin. 6 7Read more on using connectors: https://alg.li/vue-custom`)}}).beforeUnmount=function(){this.widget&&this.getParentIndex().removeWidgets([this.widget])},r.watch={widgetParams:{handler:function(i){this.state=null,this.getParentIndex().removeWidgets([this.widget]),this.widget=_t(this.factory(i),t),this.getParentIndex().addWidgets([this.widget])},deep:!0}},r.methods={updateState:function(i,a){i===void 0&&(i={}),a||(this.state=i)}},r},Tc=0;function Ac(e){e.dependsOn==="recommend"&&(e.$$id=Tc++)}function K(){}var lt=function(t,r){return t};function Dc(e){return Object.prototype.toString.call(e).slice(8,-1)}function oe(e,t){if(e===void 0||typeof e!="function")throw new Error("The render function is not valid (received type ".concat(Dc(e),`). 8 9`).concat(t))}function Fi(e){var t=e.helper,r=e.attributesToClear,n=r===void 0?[]:r,i=t.state.setPage(0);return i=n.reduce(function(a,s){return i.isNumericRefined(s)?a.removeNumericRefinement(s):i.isHierarchicalFacet(s)?a.removeHierarchicalFacetRefinement(s):i.isDisjunctiveFacet(s)?a.removeDisjunctiveFacetRefinement(s):i.isConjunctiveFacet(s)?a.removeFacetRefinement(s):a},i),n.indexOf("query")!==-1&&(i=i.setQuery("")),i}var Cc={"&":"&","<":"<",">":">",'"':""","'":"'"},eo=/[&<>"']/g,Hc=RegExp(eo.source);function Nc(e){return e&&Hc.test(e)?e.replace(eo,function(t){return Cc[t]}):e}var Wc={"&":"&","<":"<",">":">",""":'"',"'":"'"},to=/&(amp|quot|lt|gt|#39);/g,Lc=RegExp(to.source);function ro(e){return e&&Lc.test(e)?e.replace(to,function(t){return Wc[t]}):e}function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}
9function Mc(e){return e===null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function qc(e){return Wn(e)==="object"&&e!==null}function no(e){if(!qc(e)||Mc(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function xt(e){"@babel/helpers - typeof";return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(e)}function Uc(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function Ln(){return Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ln.apply(this,arguments)}function Ii(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ii(Object(r),!0).forEach(function(n){io(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ii(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function io(e,t,r){return t=kc(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kc(e){var t=Qc(e,"string");return xt(t)=="symbol"?t:String(t)}function Qc(e,t){if(xt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ce={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},ge={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function ao(e){return Nc(e).replace(new RegExp(Ce.highlightPreTag,"g"),ge.highlightPreTag).replace(new RegExp(Ce.highlightPostTag,"g"),ge.highlightPostTag)}function Tr(e){return no(e)&&typeof e.value!="string"?Object.keys(e).reduce(function(t,r){return it(it({},t),{},io({},r,Tr(e[r])))},{}):Array.isArray(e)?e.map(Tr):it(it({},e),{},{value:ao(e.value)})}function ii(e){return e.__escaped===void 0&&(e=e.map(function(t){var r=Ln({},(Uc(t),t));return r._highlightResult&&(r._highlightResult=Tr(r._highlightResult)),r._snippetResult&&(r._snippetResult=Tr(r._snippetResult)),r}),e.__escaped=!0),e}function Vc(e){return e.map(function(t){return it(it({},t),{},{highlighted:ao(t.highlighted)})})}function so(e){var t=ge.highlightPreTag,r=ge.highlightPostTag;return e.map(function(n){return n.isHighlighted?t+n.value+r:n.value}).join("")}function Bc(e,t,r){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,r):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,r):e.state.isDisjunctiveFacetRefined(t,r)}function Ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ei(Object(r),!0).forEach(function(n){zc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ei(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zc(e,t,r){return t=Jc(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jc(e){var t=Gc(e,"string");return ot(t)=="symbol"?t:String(t)}function Gc(e,t){if(ot(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ot(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ot(e){"@babel/helpers - typeof";return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ot(e)}
9function Yc(e,t){return tf(e)||ef(e,t)||Zc(e,t)||Xc()}function Xc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 10In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zc(e,t){if(e){if(typeof e=="string")return Ti(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ti(e,t)}}function Ti(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ef(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function tf(e){if(Array.isArray(e))return e}function ai(e){var t=e.instantSearchInstance,r=e.helper,n=e.attribute,i=e.widgetType,a=function(){for(var c=arguments.length,l=new Array(c),d=0;d<c;d++)l[d]=arguments[d];var v=l[1],b=l[2],h=b===void 0?"Filter Applied":b,f=l[3],u=f===void 0?{}:f,p=l[0].split(":"),g=Yc(p,2),o=g[0],m=g[1],y=typeof n=="string"?n:n(v);if(l.length===1&&ot(l[0])==="object")t.sendEventToInsights(l[0]);else if(o==="click"&&l.length>=2&&l.length<=4&&!Bc(r,y,v)){var S;t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:i,eventType:o,eventModifier:m,payload:Kc({eventName:h,index:((S=r.lastResults)===null||S===void 0?void 0:S.index)||r.state.index,filters:["".concat(y,":").concat(v)]},u),attribute:y})}};return a}function oo(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function Ai(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ai(Object(r),!0).forEach(function(n){rf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ai(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rf(e,t,r){return t=nf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nf(e){var t=af(e,"string");return ut(t)=="symbol"?t:String(t)}function af(e,t){if(ut(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ut(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sf(e,t){return ff(e)||cf(e,t)||uf(e,t)||of()}function of(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uf(e,t){if(e){if(typeof e=="string")return Di(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Di(e,t)}}function Di(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function ff(e){if(Array.isArray(e))return e}function ut(e){"@babel/helpers - typeof";return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ut(e)}function lf(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<Math.ceil(e.length/t);
11n++)r.push(e.slice(n*t,(n+1)*t));return r}function uo(e){var t=e.helper,r=e.widgetType;e.methodName;var n=e.args,i=e.instantSearchInstance;if(n.length===1&&ut(n[0])==="object")return[n[0]];var a=n[0].split(":"),s=sf(a,2),c=s[0],l=s[1],d=n[1],v=n[2],b=n[3]||{};if(!d)return[];if((c==="click"||c==="conversion")&&!v)return[];var h=Array.isArray(d)?d:[d];if(h.length===0)return[];var f=h[0].__queryID,u=lf(h),p=u.map(function(o){return o.map(function(m){return m.objectID})}),g=u.map(function(o){return o.map(function(m){return m.__position})});return c==="view"?i.status!=="idle"?[]:u.map(function(o,m){var y;return{insightsMethod:"viewedObjectIDs",widgetType:r,eventType:c,payload:qr({eventName:v||"Hits Viewed",index:((y=t.lastResults)===null||y===void 0?void 0:y.index)||t.state.index,objectIDs:p[m]},b),hits:o,eventModifier:l}}):c==="click"?u.map(function(o,m){var y;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:r,eventType:c,payload:qr({eventName:v||"Hit Clicked",index:((y=t.lastResults)===null||y===void 0?void 0:y.index)||t.state.index,queryID:f,objectIDs:p[m],positions:g[m]},b),hits:o,eventModifier:l}}):c==="conversion"?u.map(function(o,m){var y;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:r,eventType:c,payload:qr({eventName:v||"Hit Converted",index:((y=t.lastResults)===null||y===void 0?void 0:y.index)||t.state.index,queryID:f,objectIDs:p[m]},b),hits:o,eventModifier:l}}):[]}function si(e){var t=e.instantSearchInstance,r=e.helper,n=e.widgetType,i={},a=void 0,s=function(){for(var l=arguments.length,d=new Array(l),v=0;v<l;v++)d[v]=arguments[v];var b=uo({widgetType:n,helper:r,methodName:"sendEvent",args:d,instantSearchInstance:t});b.forEach(function(h){h.eventType==="click"&&h.eventModifier==="internal"&&i[h.eventType]||(i[h.eventType]=!0,t.sendEventToInsights(h))}),clearTimeout(a),a=setTimeout(function(){i={}},0)};return s}function co(e){var t=e.helper,r=e.widgetType,n=e.instantSearchInstance,i=function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];var d=uo({widgetType:r,helper:t,methodName:"bindEvent",args:c,instantSearchInstance:n});return d.length?"data-insights-event=".concat(oo(d)):""};return i}function Oe(e){return e.$$type==="ais.index"}function Mn(e,t){var r=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:r})),t.getWidgets().filter(Oe).forEach(function(n){return Mn(e,n)})}var hf=Promise.resolve();function dt(e){var t=null,r=!1,n=function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];t===null&&(t=hf.then(function(){if(t=null,r){r=!1;return}e.apply(void 0,s)}))};return n.wait=function(){if(t===null)throw new Error("The deferred function should be called before calling `wait()`");return t},n.cancel=function(){t!==null&&(r=!0)},n}function df(e){var t=e.name,r=e.connector,n=r===void 0?!1:r;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",n?"#connector":""].join("")}function re(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map(function(i){return df(i)}).join(", ");return function(i){return[i,"See documentation: ".concat(n)].filter(Boolean).join(` 12 13`)}}function mf(e){return typeof e=="string"?e.replace(/^\\-/,"-"):e}function yt(e){return typeof e=="number"&&e<0||typeof e=="string"?String(e).replace(/^-/,"\\-"):e}function qe(e,t){for(var r,n=0;n<e.length;n++)if(r=e[n],t(r,n,e))return r}function gf(e,t){if(!Array.isArray(e))return-1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}function Ci(e){if(e.appId&&e.apiKey)return[e.appId,e.apiKey];if(e.transporter){var t=e.transporter,r=t.headers||t.baseHeaders,n=t.queryParameters||t.baseQueryParameters,i="x-algolia-application-id",a="x-algolia-api-key",s=r[i]||n[i],c=r[a]||n[a];return[s,c]}else return[e.applicationID,e.apiKey]}function oi(e){var t=ge.highlightPostTag,r=ge.highlightPreTag,n=e.split(r),i=n.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return n.forEach(function(s){var c=s.split(t);a.push({value:c[0],isHighlighted:!0}),c[1]!==""&&a.push({value:c[1],isHighlighted:!1})}),a}var pf=new RegExp(/\w/i);function vf(e,t){var r,n,i=e[t],a=((r=e[t+1])===null||r===void 0?void 0:r.isHighlighted)||!0,s=((n=e[t-1])===null||n===void 0?void 0:n.isHighlighted)||!0;return!pf.test(ro(i.value))&&s===a?s:i.isHighlighted}function ht(e,t){var r=Array.isArray(t)?t:t.split(".");return r.reduce(function(n,i){return n&&n[i]},e)}function Ur(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a={type:t,attribute:r,name:n,escapedValue:yt(n)},s=qe(i,function(f){return f.name===r}),c;if(t==="hierarchical"){for(var l=e.getHierarchicalFacetByName(r),d=n.split(l.separator),v=function(u){return function(p){return u[p]}},b=function(u){s=s&&s.data&&qe(Object.keys(s.data).map(v(s.data)),function(p){return p.name===d[u]})},h=0;s!==void 0&&h<d.length;++h)b(h);c=s&&s.count}else c=s&&s.data&&s.data[a.name];return c!==void 0&&(a.count=c),s&&s.exhaustive!==void 0&&(a.exhaustive=s.exhaustive),a}function ui(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=e||{},i=[],a=t.facetsRefinements,s=a===void 0?{}:a,c=t.facetsExcludes,l=c===void 0?{}:c,d=t.disjunctiveFacetsRefinements,v=d===void 0?{}:d,b=t.hierarchicalFacetsRefinements,h=b===void 0?{}:b,f=t.numericRefinements,u=f===void 0?{}:f,p=t.tagRefinements,g=p===void 0?[]:p;
13return Object.keys(s).forEach(function(o){var m=s[o];m.forEach(function(y){i.push(Ur(t,"facet",o,y,n.facets))})}),Object.keys(l).forEach(function(o){var m=l[o];m.forEach(function(y){i.push({type:"exclude",attribute:o,name:y,exclude:!0})})}),Object.keys(v).forEach(function(o){var m=v[o];m.forEach(function(y){i.push(Ur(t,"disjunctive",o,mf(y),n.disjunctiveFacets))})}),Object.keys(h).forEach(function(o){var m=h[o];m.forEach(function(y){i.push(Ur(t,"hierarchical",o,y,n.hierarchicalFacets))})}),Object.keys(u).forEach(function(o){var m=u[o];Object.keys(m).forEach(function(y){var S=y,w=m[S],P=Array.isArray(w)?w:[w];P.forEach(function(O){i.push({type:"numeric",attribute:o,name:"".concat(O),numericValue:O,operator:S})})})}),g.forEach(function(o){i.push({type:"tag",attribute:"_tags",name:o})}),r&&t.query&&t.query.trim()&&i.push({attribute:"query",type:"query",name:t.query,query:t.query}),i}function yf(e,t){var r,n=(r=e.getWidgetRenderState)===null||r===void 0?void 0:r.call(e,t),i=null;if(n&&n.widgetParams){var a=n.widgetParams;a.attribute?i=a.attribute:Array.isArray(a.attributes)&&(i=a.attributes[0])}if(typeof i!="string")throw new Error(`Could not find the attribute of the widget: 14 15`.concat(JSON.stringify(e),` 16 17Please check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly.`));return i}function Ft(e){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(e)}function Hi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ni(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hi(Object(r),!0).forEach(function(n){bf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bf(e,t,r){return t=Sf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sf(e){var t=Rf(e,"string");return Ft(t)=="symbol"?t:String(t)}function Rf(e,t){if(Ft(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fo(e,t,r){return e.map(function(n,i){return Ni(Ni({},n),{},{__position:r*t+i+1})})}function It(e){"@babel/helpers - typeof";return It=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},It(e)}function Wi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Li(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wi(Object(r),!0).forEach(function(n){wf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wf(e,t,r){return t=Pf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pf(e){var t=Of(e,"string");return It(t)=="symbol"?t:String(t)}function Of(e,t){if(It(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(It(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lo(e,t){return t?e.map(function(r){return Li(Li({},r),{},{__queryID:t})}):e}function Et(e){"@babel/helpers - typeof";return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(e)}function Mi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
17t%2?Mi(Object(r),!0).forEach(function(n){jf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jf(e,t,r){return t=$f(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $f(e){var t=_f(e,"string");return Et(t)=="symbol"?t:String(t)}function _f(e,t){if(Et(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Et(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xf(e,t){var r=Object.keys(t).reduce(function(n,i){var a=t[i];return a.recommendResults?qi(qi({},n),a.recommendResults.results):n},{});e._recommendCache=r}function Tt(e){"@babel/helpers - typeof";return Tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(e)}function Ff(e,t){return Af(e)||Tf(e,t)||Ef(e,t)||If()}function If(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 18In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ef(e,t){if(e){if(typeof e=="string")return Ui(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ui(e,t)}}function Ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Tf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function Af(e){if(Array.isArray(e))return e}function ki(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ki(Object(r),!0).forEach(function(n){ho(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ki(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ho(e,t,r){return t=Df(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Df(e){var t=Cf(e,"string");return Tt(t)=="symbol"?t:String(t)}function Cf(e,t){if(Tt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hf(e,t){if(t&&!((!("transporter"in e)||e._cacheHydrated)&&(!e._useCache||typeof e.addAlgoliaAgent!="function"))){var r=[Object.keys(t).reduce(function(s,c){var l=t[c],d=l.state,v=l.requestParams,b=l.results,h=b&&d?b.map(function(f,u){return mt({indexName:d.index||f.index},v!=null&&v[u]||f.params?{params:kr(v?.[u]||Nf(f.params))}:{})}):[];return s.concat(h)},[])],n=Object.keys(t).reduce(function(s,c){var l=t[c].results;return l?s.concat(l):s},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var i=e.search.bind(e);e.search=function(s){for(var c=arguments.length,l=new Array(c>1?c-1:0),d=1;d<c;d++)l[d-1]=arguments[d];var v=Array.isArray(s)?s.map(function(b){return mt(mt({},b),{},{params:kr(b.params)})}):kr(s.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[v].concat(l)},function(){return i.apply(void 0,[s].concat(l))})},e.transporter.responsesCache.set({method:"search",args:r},{results:n})}if(!("transporter"in e)){var a="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:r}));e.cache=mt(mt({},e.cache),{},ho({},a,JSON.stringify({results:Object.keys(t).map(function(s){return t[s].results})})))}}}function Nf(e){return e.split("&").reduce(function(t,r){var n=r.split("="),i=Ff(n,2),a=i[0],s=i[1];
18return t[a]=s?decodeURIComponent(s):"",t},{})}function kr(e){var t=function(i){return Object.prototype.toString.call(i)==="[object Object]"||Object.prototype.toString.call(i)==="[object Array]"},r=function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];var l=0;return i.replace(/%s/g,function(){return encodeURIComponent(s[l++])})};return Object.keys(e).map(function(n){return r("%s=%s",n,t(e[n])?JSON.stringify(e[n]):e[n])}).join("&")}function Qi(e){return e!==Object(e)}function mr(e,t){if(e===t)return!0;if(Qi(e)||Qi(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(!(i in t)||!mr(e[i],t[i]))return!1}return!0}function Z(e){return typeof e=="number"&&isFinite(e)}function mo(e,t){t(e),e.getWidgets().forEach(function(r){Oe(r)&&mo(r,t)})}function ci(e){return e.filter(function(t,r,n){return n.indexOf(t)===r})}function At(e){"@babel/helpers - typeof";return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(e)}var Wf=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function Vi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vi(Object(r),!0).forEach(function(n){Lf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lf(e,t,r){return t=Mf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mf(e){var t=qf(e,"string");return At(t)=="symbol"?t:String(t)}function qf(e,t){if(At(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(At(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uf(e,t){if(e==null)return{};var r=kf(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kf(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Qf=function(t,r){r.facets,r.disjunctiveFacets,r.facetsRefinements,r.facetsExcludes,r.disjunctiveFacetsRefinements,r.numericRefinements,r.tagRefinements,r.hierarchicalFacets,r.hierarchicalFacetsRefinements,r.ruleContexts;var n=Uf(r,Wf);return t.setQueryParameters(n)},Vf=function(t,r){return r.facets.reduce(function(n,i){return n.addFacet(i)},t)},Bf=function(t,r){return r.disjunctiveFacets.reduce(function(n,i){return n.addDisjunctiveFacet(i)},t)},Kf=function(t,r){return t.setQueryParameters({hierarchicalFacets:r.hierarchicalFacets.reduce(function(n,i){var a=gf(n,function(c){return c.name===i.name});if(a===-1)return n.concat(i);var s=n.slice();return s.splice(a,1,i),s},t.hierarchicalFacets)})},zf=function(t,r){return r.tagRefinements.reduce(function(n,i){return n.addTagRefinement(i)},t)},Jf=function(t,r){return t.setQueryParameters({facetsRefinements:He(He({},t.facetsRefinements),r.facetsRefinements)})},Gf=function(t,r){return t.setQueryParameters({facetsExcludes:He(He({},t.facetsExcludes),r.facetsExcludes)})},Yf=function(t,r){return t.setQueryParameters({disjunctiveFacetsRefinements:He(He({},t.disjunctiveFacetsRefinements),r.disjunctiveFacetsRefinements)})},Xf=function(t,r){return t.setQueryParameters({numericRefinements:He(He({},t.numericRefinements),r.numericRefinements)})},Zf=function(t,r){return t.setQueryParameters({hierarchicalFacetsRefinements:He(He({},t.hierarchicalFacetsRefinements),r.hierarchicalFacetsRefinements)})},el=function(t,r){var n=ci([].concat(t.ruleContexts).concat(r.ruleContexts).filter(
18Boolean));return n.length>0?t.setQueryParameters({ruleContexts:n}):t},jt=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.reduce(function(i,a){var s=Zf(i,a),c=Kf(s,a),l=zf(c,a),d=Xf(l,a),v=Yf(d,a),b=Gf(v,a),h=Jf(b,a),f=Bf(h,a),u=el(f,a),p=Vf(u,a);return Qf(p,a)})};function tl(e){return al(e)||il(e)||nl(e)||rl()}function rl(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 19In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nl(e,t){if(e){if(typeof e=="string")return qn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qn(e,t)}}function il(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function al(e){if(Array.isArray(e))return qn(e)}function qn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bi(e){var t=e.start,r=t===void 0?0:t,n=e.end,i=e.step,a=i===void 0?1:i,s=a===0?1:a,c=Math.round((n-r)/s);return tl(Array(c)).map(function(l,d){return r+d*s})}function bt(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function Ki(e,t,r){var n=t.getResultsForWidget(r),i=t.getHelper();return{helper:i,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:i.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function sl(e){for(var t=e.getParent(),r=[e.getHelper().state];t!==null;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}function Dt(e){"@babel/helpers - typeof";return Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dt(e)}function zi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zi(Object(r),!0).forEach(function(n){ol(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ol(e,t,r){return t=ul(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ul(e){var t=cl(e,"string");return Dt(t)=="symbol"?t:String(t)}function cl(e,t){if(Dt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function go(e){return e.some(function(t){return t.isHighlighted})?e.map(function(t,r){return vr(vr({},t),{},{isHighlighted:!vf(e,r)})}):e.map(function(t){return vr(vr({},t),{},{isHighlighted:!1})})}function Ae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{fallback:function(){}},r=t.fallback;return typeof window>"u"?r():e({window})}function Qr(e){return Array.isArray(e)?e:[e]}var Vr,Ji;function fi(){if(Ji)return Vr;Ji=1;function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Vr=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(a){if(!r(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},e.prototype.emit=function(a){var s,c,l,d,v,b;if(this._events||(this._events={}),a==="error"&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(s=arguments[1],s instanceof Error)throw s;var h=new Error('Uncaught, unspecified "error" event. ('+s+")");throw h.context=s,h}if(c=this._events[a],i(c))return!1;if(t(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;
19default:d=Array.prototype.slice.call(arguments,1),c.apply(this,d)}else if(n(c))for(d=Array.prototype.slice.call(arguments,1),b=c.slice(),l=b.length,v=0;v<l;v++)b[v].apply(this,d);return!0},e.prototype.addListener=function(a,s){var c;if(!t(s))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,t(s.listener)?s.listener:s),this._events[a]?n(this._events[a])?this._events[a].push(s):this._events[a]=[this._events[a],s]:this._events[a]=s,n(this._events[a])&&!this._events[a].warned&&(i(this._maxListeners)?c=e.defaultMaxListeners:c=this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),typeof console.trace=="function"&&console.trace())),this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(a,s){if(!t(s))throw TypeError("listener must be a function");var c=!1;function l(){this.removeListener(a,l),c||(c=!0,s.apply(this,arguments))}return l.listener=s,this.on(a,l),this},e.prototype.removeListener=function(a,s){var c,l,d,v;if(!t(s))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],d=c.length,l=-1,c===s||t(c.listener)&&c.listener===s)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,s);else if(n(c)){for(v=d;v-- >0;)if(c[v]===s||c[v].listener&&c[v].listener===s){l=v;break}if(l<0)return this;c.length===1?(c.length=0,delete this._events[a]):c.splice(l,1),this._events.removeListener&&this.emit("removeListener",a,s)}return this},e.prototype.removeAllListeners=function(a){var s,c;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[a]&&delete this._events[a],this;if(arguments.length===0){for(s in this._events)s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],t(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},e.prototype.listeners=function(a){var s;return!this._events||!this._events[a]?s=[]:t(this._events[a])?s=[this._events[a]]:s=this._events[a].slice(),s},e.prototype.listenerCount=function(a){if(this._events){var s=this._events[a];if(t(s))return 1;if(s)return s.length}return 0},e.listenerCount=function(a,s){return a.listenerCount(s)};function t(a){return typeof a=="function"}function r(a){return typeof a=="number"}function n(a){return typeof a=="object"&&a!==null}function i(a){return a===void 0}return Vr}var Br,Gi;function po(){if(Gi)return Br;Gi=1;function e(t,r){t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}return Br=e,Br}var Kr,Yi;
19function fl(){if(Yi)return Kr;Yi=1;var e=fi(),t=po();function r(n,i,a){this.main=n,this.fn=i,this.recommendFn=a,this.lastResults=null,this.lastRecommendResults=null}return t(r,e),r.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},r.prototype.getModifiedState=function(n){return this.fn(n)},r.prototype.getModifiedRecommendState=function(n){return this.recommendFn(n)},Kr=r,Kr}var zr,Xi;function li(){if(Xi)return zr;Xi=1;function e(r){return typeof r!="string"?r:String(r).replace(/^-/,"\\-")}function t(r){return typeof r!="string"?r:r.replace(/^\\-/,"-")}return zr={escapeFacetValue:e,unescapeFacetValue:t},zr}var Jr,Zi;function hi(){if(Zi)return Jr;Zi=1;function e(i){return typeof i=="object"&&i!==null?r(Array.isArray(i)?[]:{},i):i}function t(i){return typeof i=="function"||Array.isArray(i)||Object.prototype.toString.call(i)==="[object Object]"}function r(i,a){if(i===a)return i;for(var s in a)if(!(!Object.prototype.hasOwnProperty.call(a,s)||s==="__proto__"||s==="constructor")){var c=a[s],l=i[s];typeof l<"u"&&typeof c>"u"||(t(l)&&t(c)?i[s]=r(l,c):i[s]=e(c))}return i}function n(i){t(i)||(i={});for(var a=1,s=arguments.length;a<s;a++){var c=arguments[a];t(c)&&r(i,c)}return i}return Jr=n,Jr}var Gr,ea;function di(){if(ea)return Gr;ea=1;function e(t){return t&&Object.keys(t).length>0}return Gr=e,Gr}var Yr,ta;function mi(){if(ta)return Yr;ta=1;function e(t,r){if(t===null)return{};var n={},i=Object.keys(t),a,s;for(s=0;s<i.length;s++)a=i[s],!(r.indexOf(a)>=0)&&(n[a]=t[a]);return n}return Yr=e,Yr}var Xr,ra;function vo(){if(ra)return Xr;ra=1;function e(t){t=t||{},this.params=t.params||[]}return e.prototype={constructor:e,addParams:function(t){var r=this.params.slice();return r.push(t),new e({params:r})},removeParams:function(t){return new e({params:this.params.filter(function(r){return r.$$id!==t})})},addFrequentlyBoughtTogether:function(t){return this.addParams(Object.assign({},t,{model:"bought-together"}))},addRelatedProducts:function(t){return this.addParams(Object.assign({},t,{model:"related-products"}))},addTrendingItems:function(t){return this.addParams(Object.assign({},t,{model:"trending-items"}))},addTrendingFacets:function(t){return this.addParams(Object.assign({},t,{model:"trending-facets"}))},addLookingSimilar:function(t){return this.addParams(Object.assign({},t,{model:"looking-similar"}))},_buildQueries:function(t,r){return this.params.filter(function(n){return r[n.$$id]===void 0}).map(function(n){var i=Object.assign({},n,{indexName:t,threshold:n.threshold||0});return delete i.$$id,i})}},Xr=e,Xr}var Zr,na;function yo(){if(na)return Zr;na=1;function e(t,r){this._state=t,this._rawResults={};var n=this;t.params.forEach(function(i){var a=i.$$id;n[a]=r[a],n._rawResults[a]=r[a]})}return e.prototype={constructor:e},Zr=e,Zr}var en,ia;function ll(){if(ia)return en;ia=1;var e=hi();function t(n){return Object.keys(n).sort().reduce(function(i,a){return i[a]=n[a],i},{})}var r={_getQueries:function(i,a){var s=[];return s.push({indexName:i,params:r._getHitsSearchParams(a)}),a.getRefinedDisjunctiveFacets().forEach(function(c){s.push({indexName:i,params:r._getDisjunctiveFacetSearchParams(a,c)})}),a.getRefinedHierarchicalFacets().forEach(function(c){var l=a.getHierarchicalFacetByName(c),d=a.getHierarchicalRefinement(c),v=a._getHierarchicalFacetSeparator(l);
19if(d.length>0&&d[0].split(v).length>1){var b=d[0].split(v).slice(0,-1).reduce(function(f,u,p){return f.concat({attribute:l.attributes[p],value:p===0?u:[f[f.length-1].value,u].join(v)})},[]);b.forEach(function(h,f){var u=r._getDisjunctiveFacetSearchParams(a,h.attribute,f===0);function p(m){return l.attributes.some(function(y){return y===m.split(":")[0]})}var g=(u.facetFilters||[]).reduce(function(m,y){if(Array.isArray(y)){var S=y.filter(function(w){return!p(w)});S.length>0&&m.push(S)}return typeof y=="string"&&!p(y)&&m.push(y),m},[]),o=b[f-1];f>0?u.facetFilters=g.concat(o.attribute+":"+o.value):g.length>0?u.facetFilters=g:delete u.facetFilters,s.push({indexName:i,params:u})})}}),s},_getCompositionQueries:function(i){return[{compositionID:i.index,requestBody:{params:r._getCompositionHitsSearchParams(i)}}]},_getHitsSearchParams:function(n){var i=n.facets.concat(n.disjunctiveFacets).concat(r._getHitsHierarchicalFacetsAttributes(n)).sort(),a=r._getFacetFilters(n),s=r._getNumericFilters(n),c=r._getTagFilters(n),l={};return i.length>0&&(l.facets=i.indexOf("*")>-1?["*"]:i),c.length>0&&(l.tagFilters=c),a.length>0&&(l.facetFilters=a),s.length>0&&(l.numericFilters=s),t(e({},n.getQueryParams(),l))},_getCompositionHitsSearchParams:function(n){var i=n.facets.concat(n.disjunctiveFacets.map(function(v){return n.disjunctiveFacetsRefinements&&n.disjunctiveFacetsRefinements[v]&&n.disjunctiveFacetsRefinements[v].length>0?"disjunctive("+v+")":v})).concat(r._getHitsHierarchicalFacetsAttributes(n)).sort(),a=r._getFacetFilters(n),s=r._getNumericFilters(n),c=r._getTagFilters(n),l={};i.length>0&&(l.facets=i.indexOf("*")>-1?["*"]:i),c.length>0&&(l.tagFilters=c),a.length>0&&(l.facetFilters=a),s.length>0&&(l.numericFilters=s);var d=n.getQueryParams();return delete d.highlightPreTag,delete d.highlightPostTag,delete d.index,t(e({},d,l))},_getDisjunctiveFacetSearchParams:function(n,i,a){var s=r._getFacetFilters(n,i,a),c=r._getNumericFilters(n,i),l=r._getTagFilters(n),d={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};l.length>0&&(d.tagFilters=l);var v=n.getHierarchicalFacetByName(i);return v?d.facets=r._getDisjunctiveHierarchicalFacetAttribute(n,v,a):d.facets=i,c.length>0&&(d.numericFilters=c),s.length>0&&(d.facetFilters=s),t(e({},n.getQueryParams(),d))},_getNumericFilters:function(n,i){if(n.numericFilters)return n.numericFilters;var a=[];return Object.keys(n.numericRefinements).forEach(function(s){var c=n.numericRefinements[s]||{};Object.keys(c).forEach(function(l){var d=c[l]||[];i!==s&&d.forEach(function(v){if(Array.isArray(v)){var b=v.map(function(h){return s+l+h});a.push(b)}else a.push(s+l+v)})})}),a},_getTagFilters:function(n){return n.tagFilters?n.tagFilters:n.tagRefinements.join(",")},_getFacetFilters:function(n,i,a){var s=[],c=n.facetsRefinements||{};Object.keys(c).sort().forEach(function(b){var h=c[b]||[];h.slice().sort().forEach(function(f){s.push(b+":"+f)})});var l=n.facetsExcludes||{};Object.keys(l).sort().forEach(function(b){var h=l[b]||[];h.sort().forEach(function(f){s.push(b+":-"+f)})});var d=n.disjunctiveFacetsRefinements||{};Object.keys(d).sort().forEach(function(b){var h=d[b]||[];if(!(b===i||!h||h.length===0)){var f=[];h.slice().sort().forEach(function(u){f.push(b+":"+u)}),s.push(f)}});var v=n.hierarchicalFacetsRefinements||{};return Object.keys(v).sort().forEach(function(b){var h=v[b]||[],f=h[0];if(f!==void 0){var u=n.getHierarchicalFacetByName(b),p=n._getHierarchicalFacetSeparator(u),g=n._getHierarchicalRootPath(u),o,m;if(i===b){if(f.indexOf(p)===-1||!g&&a===!0||g&&g.split(p).length===f.split(p).length)return;g?(m=g.split(p).length-1,f=g):(m=f.split(p).length-2,f=f.slice(0,f.lastIndexOf(p))),o=u.attributes[m]}else m=f.split(p).length-1,o=u.attributes[m];o&&s.push([o+":"+f])}}),s},_getHitsHierarchicalFacetsAttributes:function(n){var i=[];return n.hierarchicalFacets.reduce(function(s,c){var l=n.getHierarchicalRefinement(c.name)[0];if(!l)return s.push(c.attributes[0]),s;var d=n._getHierarchicalFacetSeparator(c),v=l.split(d).length,b=c.attributes.slice(0,v+1);return s.concat(b)},i)},_getDisjunctiveHierarchicalFacetAttribute:function(n,i,a){var s=n._getHierarchicalFacetSeparator(i);if(a===!0){var c=n._getHierarchicalRootPath(i),l=0;return c&&(l=c.split(s).length),[i.attributes[l]]}var d=n.getHierarchicalRefinement(i.name)[0]||"",v=d.split(s).length-1;return i.attributes.slice(0,v+1)},getSearchForFacetQuery:function(n,i,a,s){var c=s.isDisjunctiveFacet(n)?s.clearRefinements(n):s,l={facetQuery:i,facetName:n};return typeof a=="number"&&(l.maxFacetHits=a),t(e({},r._getHitsSearchParams(c),l))}};return en=r,en}var tn,aa;function gi(){return aa||(aa=1,tn=function(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(r,n){return Object.keys(Object(n)).forEac
19h(function(i){n[i]!==void 0&&(r[i]!==void 0&&delete r[i],r[i]=n[i])}),r},{})}),tn}var rn,sa;function gr(){return sa||(sa=1,rn=function(t,r){if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(r(t[n]))return t[n]}}),rn}var nn,oa;function hl(){if(oa)return nn;oa=1;function e(t,r){return t.filter(function(n,i){return r.indexOf(n)>-1&&t.indexOf(n)===i})}return nn=e,nn}var an,ua;function dl(){if(ua)return an;ua=1;function e(t){if(typeof t=="number")return t;if(typeof t=="string")return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}return an=e,an}var sn,ca;function ml(){return ca||(ca=1,sn=function(t){return t===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(t)}),sn}var on,fa;function gl(){if(fa)return on;fa=1;var e=gi(),t=di(),r=mi(),n={addRefinement:function(a,s,c){if(n.isRefined(a,s,c))return a;var l=""+c,d=a[s]?a[s].concat(l):[l],v={};return v[s]=d,e(v,a)},removeRefinement:function(a,s,c){if(c===void 0)return n.clearRefinement(a,function(d,v){return s===v});var l=""+c;return n.clearRefinement(a,function(d,v){return s===v&&l===d})},toggleRefinement:function(a,s,c){if(c===void 0)throw new Error("toggleRefinement should be used with a value");return n.isRefined(a,s,c)?n.removeRefinement(a,s,c):n.addRefinement(a,s,c)},clearRefinement:function(a,s,c){if(s===void 0)return t(a)?{}:a;if(typeof s=="string")return r(a,[s]);if(typeof s=="function"){var l=!1,d=Object.keys(a).reduce(function(v,b){var h=a[b]||[],f=h.filter(function(u){return!s(u,b,c)});return f.length!==h.length&&(l=!0),v[b]=f,v},{});return l?d:a}},isRefined:function(a,s,c){var l=!!a[s]&&a[s].length>0;if(c===void 0||!l)return l;var d=""+c;return a[s].indexOf(d)!==-1}};return on=n,on}var un,la;function bo(){if(la)return un;la=1;var e=gi(),t=gr(),r=hl(),n=hi(),i=di(),a=mi(),s=dl(),c=ml(),l=gl();function d(h,f){return Array.isArray(h)&&Array.isArray(f)?h.length===f.length&&h.every(function(u,p){return d(f[p],u)}):h===f}function v(h,f){return t(h,function(u){return d(u,f)})}function b(h){var f=h?b._parseNumbers(h):{};f.userToken!==void 0&&!c(f.userToken)&&console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=f.facets||[],this.disjunctiveFacets=f.disjunctiveFacets||[],this.hierarchicalFacets=f.hierarchicalFacets||[],this.facetsRefinements=f.facetsRefinements||{},this.facetsExcludes=f.facetsExcludes||{},this.disjunctiveFacetsRefinements=f.disjunctiveFacetsRefinements||{},this.numericRefinements=f.numericRefinements||{},this.tagRefinements=f.tagRefinements||[],this.hierarchicalFacetsRefinements=f.hierarchicalFacetsRefinements||{};var u=this;Object.keys(f).forEach(function(p){var g=b.PARAMETERS.indexOf(p)!==-1,o=f[p]!==void 0;!g&&o&&(u[p]=f[p])})}return b.PARAMETERS=Object.keys(new b),b._parseNumbers=function(h){if(h instanceof b)return h;var f={},u=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(u.forEach(function(g){var o=h[g];if(typeof o=="string"){var m=parseFloat(o);f[g]=isNaN(m)?o:m}}),Array.isArray(h.insideBoundingBox)&&(f.insideBoundingBox=h.insideBoundingBox.map(function(g){return Array.isArray(g)?g.map(function(o){return parseFloat(o)}):g})),h.numericRefinements){var p={};Object.keys(h.numericRefinements).forEach(function(g){var o=h.numericRefinements[g]||{};p[g]={},Object.keys(o).forEach(function(m){var y=o[m],S=y.map(function(w){return Array.isArray(w)?w.map(function(P){return typeof P=="string"?parseFloat(P):P}):typeof w=="string"?parseFloat(w):w});p[g][m]=S})}),f.numericRefinements=p}return n(h,f)},b.make=function(f){var u=new b(f),p=f.hierarchicalFacets||[];return p.forEach(function(g){if(g.rootPath){var o=u.getHierarchicalRefinement(g.name);o.length>0&&o[0].indexOf(g.rootPath)!==0&&(u=u.clearRefinements(g.name)),o=u.getHierarchicalRefinement(g.name),o.length===0&&(u=u.toggleHierarchicalFacetRefinement(g.name,g.rootPath))}}),u},b.validate=function(h,f){var u=f||{};return h.tagFilters&&u.tagRefinements&&u.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):h.tagRefinements.length>0&&u.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):h.numericFilters&&u.numericRefinements&&i(u.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):i(h.numericRefinements)&&u.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},b.prototype={constructor:b,clearRefinements:function(f){var u={numericRefinements:this._clearNumericRefinements(f),facetsRefinements:l.clearRefinement(this.facetsRefinements,f,"conjunctiveFacet"),facetsExcludes:l.clearRefinement(this.facetsExcludes,f,"exclude"),disjunctiveFacetsRefinements:l.clearRefinement(this.disjunctiveFacetsRefinements,f,"disjunctiveFacet"),hierarchicalFacetsRefinements:l.clearRefinement(this.hierarchicalFacetsRefinements,f,"hierarchicalFacet")};return u.numericRefinements===this.numericRefinements&&u.facetsRefinements===this.facetsRefinements&&u.facetsExcludes===this.facetsExcludes&&u.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&u.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(u)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(f){return f===this.index?this:this.setQueryParameters({index:f})},setQuery:function(f){return f===this.query?this:this.setQueryParameters({query:f})},setPage:function(f){return f===this.page?this:this.setQueryParameters({page:f})},setFacets:function(f){return this.setQueryParameters({facets:f})},setDisjunctiveFacets:function(f){return this.setQueryParameters({disjunctiveFacets:f})},setHitsPerPage:function(f){return this.hitsPerPage===f?this:this.setQueryParameters({hitsPerPage:f})},setTypoTolerance:function(f){return this.typoTolerance===f?this:this.setQueryParameters({typoTolerance:f})},addNumericRefinement:function(h,f,u){var p=s(u);if(this.isNumericRefined(h,f,p))return this;var g=n({},this.numericRefinements);return g[h]=n({},g[h]),g[h][f]?(g[h][f]=g[h][f].slice(),g[h][f].push(p)):g[h][f]=[p],this.setQueryParameters({numericRefinements:g})},getConjunctiveRefinements:function(h){return this.isConjunctiveFacet(h)?this.facetsRefinements[h]||[]:[]},getDisjunctiveRefinements:function(h){return this.isDisjunctiveFacet(h)?this.disjunctiveFacetsRefinements[h]||[]:[]},getHierarchicalRefinement:function(h){return this.hierarchicalFacetsRefinements[h]||[]},getExcludeRefinements:function(h){return this.isConjunctiveFacet(h)?this.facetsExcludes[h]||[]:[]},removeNumericRefinement:function(h,f,u){var p=u;return p!==void 0?this.isNumericRefined(h,f,p)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(g,o){return o===h&&g.op===f&&d(g.val,s(p))})}):this:f!==void 0?this.isNumericRefined(h,f)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(g,o){return o===h&&g.op===f})}):this:this.isNumericRefined(h)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(g,o){return o===h})}):this},getNumericRefinements:function(h){return this.numericRefinements[h]||{}},getNumericRefinement:function(h,f){return this.numericRefinements[h]&&this.numericRefinements[h][f]},_clearNumericRefinements:function(f){if(f===void 0)return i(this.numericRefinements)?{}:this.numericRefinements;if(typeof f=="string")return a(this.numericRefinements,[f]);if(typeof f=="function"){var u=!1,p=this.numericRefinements,g=Object.keys(p).reduce(function(o,m){var y=p[m],S={};return y=y||{}
19,Object.keys(y).forEach(function(w){var P=y[w]||[],O=[];P.forEach(function(R){var j=f({val:R,op:w},m,"numeric");j||O.push(R)}),O.length!==P.length&&(u=!0),S[w]=O}),o[m]=S,o},{});return u?g:this.numericRefinements}},addFacet:function(f){return this.isConjunctiveFacet(f)?this:this.setQueryParameters({facets:this.facets.concat([f])})},addDisjunctiveFacet:function(f){return this.isDisjunctiveFacet(f)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([f])})},addHierarchicalFacet:function(f){if(this.isHierarchicalFacet(f.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+f.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([f])})},addFacetRefinement:function(f,u){if(!this.isConjunctiveFacet(f))throw new Error(f+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,f,u)?this:this.setQueryParameters({facetsRefinements:l.addRefinement(this.facetsRefinements,f,u)})},addExcludeRefinement:function(f,u){if(!this.isConjunctiveFacet(f))throw new Error(f+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,f,u)?this:this.setQueryParameters({facetsExcludes:l.addRefinement(this.facetsExcludes,f,u)})},addDisjunctiveFacetRefinement:function(f,u){if(!this.isDisjunctiveFacet(f))throw new Error(f+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,f,u)?this:this.setQueryParameters({disjunctiveFacetsRefinements:l.addRefinement(this.disjunctiveFacetsRefinements,f,u)})},addTagRefinement:function(f){if(this.isTagRefined(f))return this;var u={tagRefinements:this.tagRefinements.concat(f)};return this.setQueryParameters(u)},removeFacet:function(f){return this.isConjunctiveFacet(f)?this.clearRefinements(f).setQueryParameters({facets:this.facets.filter(function(u){return u!==f})}):this},removeDisjunctiveFacet:function(f){return this.isDisjunctiveFacet(f)?this.clearRefinements(f).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(u){return u!==f})}):this},removeHierarchicalFacet:function(f){return this.isHierarchicalFacet(f)?this.clearRefinements(f).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(u){return u.name!==f})}):this},removeFacetRefinement:function(f,u){if(!this.isConjunctiveFacet(f))throw new Error(f+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,f,u)?this.setQueryParameters({facetsRefinements:l.removeRefinement(this.facetsRefinements,f,u)}):this},removeExcludeRefinement:function(f,u){if(!this.isConjunctiveFacet(f))throw new Error(f+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,f,u)?this.setQueryParameters({facetsExcludes:l.removeRefinement(this.facetsExcludes,f,u)}):this},removeDisjunctiveFacetRefinement:function(f,u){if(!this.isDisjunctiveFacet(f))throw new Error(f+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,f,u)?this.setQueryParameters({disjunctiveFacetsRefinements:l.removeRefinement(this.disjunctiveFacetsRefinements,f,u)}):this},removeTagRefinement:function(f){if(!this.isTagRefined(f))return this;var u={tagRefinements:this.tagRefinements.filter(function(p){return p!==f})};return this.setQueryParameters(u)},toggleRefinement:function(f,u){return this.toggleFacetRefinement(f,u)},toggleFacetRefinement:function(f,u){if(this.isHierarchicalFacet(f))return this.toggleHierarchicalFacetRefinement(f,u);if(this.isConjunctiveFacet(f))return this.toggleConjunctiveFacetRefinement(f,u);if(this.isDisjunctiveFacet(f))return this.toggleDisjunctiveFacetRefinement(f,u);throw new Error("Cannot refine the undeclared facet "+f+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(f,u){if(!this.isConjunctiveFacet(f))throw new Error(f+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:l.toggleRefinement(this.facetsRefinements,f,u)})},toggleExcludeFacetRefinement:function(f,u){if(!this.isConjunctiveFacet(f))throw new Error(f+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:l.toggleRefinement(this.facetsExcludes,f,u)})},toggleDisjunctiveFacetRefinement:function(f,u){if(!this.isDisjunctiveFacet(f))throw new Error(f+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:l.toggleRefinement(this.disjunctiveFacetsRefinements,f,u)})},toggleHierarchicalFacetRefinement:function(f,u){if(!this.isHierarchicalFacet(f))throw new Error(f+" is not defined in the hierarchicalFacets attribute of the helper configuration");var p=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(f)),g={},o=this.hierarchicalFacetsRefinements[f]!==void 0&&this.hierarchicalFacetsRefinements[f].length>0&&(this.hierarchicalFacetsRefinements[f][0]===u||this.hierarchicalFacetsRefinements[f][0].indexOf(u+p)===0);return o?u.indexOf(p)===-1?g[f]=[]:g[f]=[u.slice(0,u.lastIndexOf(p))]:g[f]=[u],this.setQueryParameters({hierarchicalFacetsRefinements:e(g,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(h,f){if(this.isHierarchicalFacetRefined(h))throw new Error(h+" is already refined.");
19if(!this.isHierarchicalFacet(h))throw new Error(h+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var u={};return u[h]=[f],this.setQueryParameters({hierarchicalFacetsRefinements:e(u,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(h){if(!this.isHierarchicalFacetRefined(h))return this;var f={};return f[h]=[],this.setQueryParameters({hierarchicalFacetsRefinements:e(f,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(f){return this.isTagRefined(f)?this.removeTagRefinement(f):this.addTagRefinement(f)},isDisjunctiveFacet:function(h){return this.disjunctiveFacets.indexOf(h)>-1},isHierarchicalFacet:function(h){return this.getHierarchicalFacetByName(h)!==void 0},isConjunctiveFacet:function(h){return this.facets.indexOf(h)>-1},isFacetRefined:function(f,u){return this.isConjunctiveFacet(f)?l.isRefined(this.facetsRefinements,f,u):!1},isExcludeRefined:function(f,u){return this.isConjunctiveFacet(f)?l.isRefined(this.facetsExcludes,f,u):!1},isDisjunctiveFacetRefined:function(f,u){return this.isDisjunctiveFacet(f)?l.isRefined(this.disjunctiveFacetsRefinements,f,u):!1},isHierarchicalFacetRefined:function(f,u){if(!this.isHierarchicalFacet(f))return!1;var p=this.getHierarchicalRefinement(f);return u?p.indexOf(u)!==-1:p.length>0},isNumericRefined:function(f,u,p){if(p===void 0&&u===void 0)return!!this.numericRefinements[f];var g=this.numericRefinements[f]&&this.numericRefinements[f][u]!==void 0;if(p===void 0||!g)return g;var o=s(p),m=v(this.numericRefinements[f][u],o)!==void 0;return g&&m},isTagRefined:function(f){return this.tagRefinements.indexOf(f)!==-1},getRefinedDisjunctiveFacets:function(){var f=this,u=r(Object.keys(this.numericRefinements).filter(function(p){return Object.keys(f.numericRefinements[p]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(p){return f.disjunctiveFacetsRefinements[p].length>0}).concat(u).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var f=this;return r(this.hierarchicalFacets.map(function(u){return u.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(u){return f.hierarchicalFacetsRefinements[u].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var h=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(f){return h.indexOf(f)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var f=this.managedParameters,u={},p=this;return Object.keys(this).forEach(function(g){var o=p[g];f.indexOf(g)===-1&&o!==void 0&&(u[g]=o)}),u},setQueryParameter:function(f,u){if(this[f]===u)return this;var p={};return p[f]=u,this.setQueryParameters(p)},setQueryParameters:function(f){if(!f)return this;var u=b.validate(this,f);if(u)throw u;var p=this,g=b._parseNumbers(f),o=Object.keys(this).reduce(function(y,S){return y[S]=p[S],y},{}),m=Object.keys(g).reduce(function(y,S){var w=y[S]!==void 0,P=g[S]!==void 0;return w&&!P?a(y,[S]):(P&&(y[S]=g[S]),y)},o);return new this.constructor(m)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(h){return h.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(h){return h.separator||" > "},_getHierarchicalRootPath:function(h){return h.rootPath||null},_getHierarchicalShowParentLevel:function(h){return typeof h.showParentLevel=="boolean"?h.showParentLevel:!0},getHierarchicalFacetByName:function(h){return t(this.hierarchicalFacets,function(f){return f.name===h})},getHierarchicalFacetBreadcrumb:function(h){if(!this.isHierarchicalFacet(h))return[];var f=this.getHierarchicalRefinement(h)[0];if(!f)return[];var u=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(h)),p=f.split(u);return p.map(function(g){return g.trim()})},toString:function(){return JSON.stringify(this,null,2)}},un=b,un}var cn,ha;function pl(){return ha||(ha=1,cn=function(t){return Array.isArray(t)?t.filter(Boolean):[]}),cn}var fn,da;function vl(){return da||(da=1,fn=function(t,r){if(!Array.isArray(t))return-1;for(var n=0;n<t.length;n++)if(r(t[n]))return n;return-1}),fn}var ln,ma;
19function So(){if(ma)return ln;ma=1;var e=gr();return ln=function(r,n){var i=(n||[]).map(function(a){return a.split(":")});return r.reduce(function(s,c){var l=c.split(":"),d=e(i,function(v){return v[0]===l[0]});return l.length>1||!d?(s[0].push(l[0]),s[1].push(l[1]),s):(s[0].push(d[0]),s[1].push(d[1]),s)},[[],[]])},ln}var hn,ga;function yl(){if(ga)return hn;ga=1;function e(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(r,n){return Object.keys(Object(n)).forEach(function(i){var a=typeof r[i]=="number"?r[i]:0,s=n[i];s!==void 0&&s>=a&&(r[i]!==void 0&&delete r[i],r[i]=s)}),r},{})}return hn=e,hn}var dn,pa;function Ro(){if(pa)return dn;pa=1;function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,s=n!==void 0,c=n===null;if(!c&&r>n||a&&s||!i)return 1;if(!a&&r<n||c&&i||!s)return-1}return 0}function t(r,n,i){if(!Array.isArray(r))return[];Array.isArray(i)||(i=[]);var a=r.map(function(s,c){return{criteria:n.map(function(l){return s[l]}),index:c,value:s}});return a.sort(function(c,l){for(var d=-1;++d<c.criteria.length;){var v=e(c.criteria[d],l.criteria[d]);if(v)return d>=i.length?v:i[d]==="desc"?-v:v}return c.index-l.index}),a.map(function(s){return s.value})}return dn=t,dn}var mn,va;function bl(){if(va)return mn;va=1,mn=s;var e=li(),t=gr(),r=So(),n=Ro(),i=e.escapeFacetValue,a=e.unescapeFacetValue;function s(v){return function(h,f){var u=v.hierarchicalFacets[f],p=v.hierarchicalFacetsRefinements[u.name]&&v.hierarchicalFacetsRefinements[u.name][0]||"",g=v._getHierarchicalFacetSeparator(u),o=v._getHierarchicalRootPath(u),m=v._getHierarchicalShowParentLevel(u),y=r(v._getHierarchicalFacetSortBy(u)),S=h.every(function(O){return O.exhaustive}),w=c(y,g,o,m,p),P=h;return o&&(P=h.slice(o.split(g).length)),P.reduce(w,{name:v.hierarchicalFacets[f].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:S,data:null})}}function c(v,b,h,f,u){return function(g,o,m){var y=g;if(m>0){var S=0;for(y=g;S<m;){var w=y&&Array.isArray(y.data)?y.data:[];y=t(w,function(O){return O.isRefined}),S++}}if(y){var P=Object.keys(o.data).map(function(O){return[O,o.data[O]]}).filter(function(O){var R=O[0];return l(R,y.path||h,u,b,h,f)});y.data=n(P.map(function(O){var R=O[0],j=O[1];return d(j,R,b,a(u),o.exhaustive)}),v[0],v[1])}return g}}function l(v,b,h,f,u,p){return u&&(v.indexOf(u)!==0||u===v)?!1:!u&&v.indexOf(f)===-1||u&&v.split(f).length-u.split(f).length===1||v.indexOf(f)===-1&&h.indexOf(f)===-1||h.indexOf(v)===0||v.indexOf(b+f)===0&&(p||v.indexOf(h)===0)}function d(v,b,h,f,u){var p=b.split(h);return{name:p[p.length-1].trim(),path:b,escapedValue:i(b),count:v,isRefined:f===b||f.indexOf(b+h)===0,exhaustive:u,data:null}}return mn}var gn,ya;function wo(){if(ya)return gn;ya=1;var e=pl(),t=gi(),r=li(),n=gr(),i=vl(),a=So(),s=yl(),c=Ro(),l=r.escapeFacetValue,d=r.unescapeFacetValue,v=bl();function b(R){var j={};return R.forEach(function($,_){j[$]=_}),j}function h(R,j,$){j&&j[$]&&(R.stats=j[$])}function f(R,j){return n(R,function(_){var x=_.attributes||[];return x.indexOf(j)>-1})}function u(R,j,$){var _=j[0]||{};this._rawResults=j;var x=this;Object.keys(_).forEach(function(I){x[I]=_[I]});var E=t($,{persistHierarchicalRootCount:!1});
19Object.keys(E).forEach(function(I){x[I]=E[I]}),this.processingTimeMS=j.reduce(function(I,C){return C.processingTimeMS===void 0?I:I+C.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=R.hierarchicalFacets.map(function(){return[]}),this.facets=[];var D=R.getRefinedDisjunctiveFacets(),H=b(R.facets),A=b(R.disjunctiveFacets),F=1,T=_.facets||{};Object.keys(T).forEach(function(I){var C=T[I],N=f(R.hierarchicalFacets,I);if(N){var L=N.attributes.indexOf(I),U=i(R.hierarchicalFacets,function(B){return B.name===N.name});x.hierarchicalFacets[U][L]={attribute:I,data:C,exhaustive:_.exhaustiveFacetsCount}}else{var z=R.disjunctiveFacets.indexOf(I)!==-1,M=R.facets.indexOf(I)!==-1,q;z&&(q=A[I],x.disjunctiveFacets[q]={name:I,data:C,exhaustive:_.exhaustiveFacetsCount},h(x.disjunctiveFacets[q],_.facets_stats,I)),M&&(q=H[I],x.facets[q]={name:I,data:C,exhaustive:_.exhaustiveFacetsCount},h(x.facets[q],_.facets_stats,I))}}),this.hierarchicalFacets=e(this.hierarchicalFacets),D.forEach(function(I){var C=j[F],N=C&&C.facets?C.facets:{},L=R.getHierarchicalFacetByName(I);Object.keys(N).forEach(function(U){var z=N[U],M;if(L){M=i(R.hierarchicalFacets,function(k){return k.name===L.name});var q=i(x.hierarchicalFacets[M],function(k){return k.attribute===U});if(q===-1)return;x.hierarchicalFacets[M][q].data=x.persistHierarchicalRootCount?s(x.hierarchicalFacets[M][q].data,z):t(z,x.hierarchicalFacets[M][q].data)}else{M=A[U];var B=_.facets&&_.facets[U]||{};x.disjunctiveFacets[M]={name:U,data:s(B,z),exhaustive:C.exhaustiveFacetsCount},h(x.disjunctiveFacets[M],C.facets_stats,U),R.disjunctiveFacetsRefinements[U]&&R.disjunctiveFacetsRefinements[U].forEach(function(k){!x.disjunctiveFacets[M].data[k]&&R.disjunctiveFacetsRefinements[U].indexOf(d(k))>-1&&(x.disjunctiveFacets[M].data[k]=0)})}}),F++}),R.getRefinedHierarchicalFacets().forEach(function(I){var C=R.getHierarchicalFacetByName(I),N=R._getHierarchicalFacetSeparator(C),L=R.getHierarchicalRefinement(I);L.length===0||L[0].split(N).length<2||j.slice(F).forEach(function(U){var z=U&&U.facets?U.facets:{};Object.keys(z).forEach(function(M){var q=z[M],B=i(R.hierarchicalFacets,function(ae){return ae.name===C.name}),k=i(x.hierarchicalFacets[B],function(ae){return ae.attribute===M});if(k!==-1){var ne={};if(L.length>0&&!x.persistHierarchicalRootCount){var ie=L[0].split(N)[0];ne[ie]=x.hierarchicalFacets[B][k].data[ie]}x.hierarchicalFacets[B][k].data=t(ne,q,x.hierarchicalFacets[B][k].data)}}),F++})}),Object.keys(R.facetsExcludes).forEach(function(I){var C=R.facetsExcludes[I],N=H[I];x.facets[N]={name:I,data:T[I],exhaustive:_.exhaustiveFacetsCount},C.forEach(function(L){x.facets[N]=x.facets[N]||{name:I},x.facets[N].data=x.facets[N].data||{},x.facets[N].data[L]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(v(R)),this.facets=e(this.facets),this.disjunctiveFacets=e(this.disjunctiveFacets),this._state=R}u.prototype.getFacetByName=function(R){function j($){return $.name===R}return n(this.facets,j)||n(this.disjunctiveFacets,j)||n(this.hierarchicalFacets,j)};function p(R,j){function $(T){return T.name===j}if(R._state.isConjunctiveFacet(j)){var _=n(R.facets,$);return _?Object.keys(_.data).map(function(T){var I=l(T);return{name:T,escapedValue:I,count:_.data[T],isRefined:R._state.isFacetRefined(j,I),isExcluded:R._state.isExcludeRefined(j,T)}}):[]}else if(R._state.isDisjunctiveFacet(j)){var x=n(R.disjunctiveFacets,$);return x?Object.keys(x.data).map(function(T){var I=l(T);return{name:T,escapedValue:I,count:x.data[T],isRefined:R._state.isDisjunctiveFacetRefined(j,I)}}):[]}else if(R._state.isHierarchicalFacet(j)){var E=n(R.hierarchicalFacets,$);if(!E)return E;var D=R._state.getHierarchicalFacetByName(j),H=R._state._getHierarchicalFacetSeparator(D),A=d(R._state.getHierarchicalRefinement(j)[0]||"");A.indexOf(D.rootPath)===0&&(A=A.replace(D.rootPath+H,""));var F=A.split(H);return F.unshift(j),g(E,F,0),E}}function g(R,j,$){R.isRefined=R.name===(j[$]&&j[$].trim()),R.data&&R.data.forEach(function(_){g(_,j,$+1)})}function o(R,j,$,_){if(_=_||0,Array.isArray(j))return R(j,$[_]);if(!j.data||j.data.length===0)return j;var x=j.data.map(function(H){return o(R,H,$,_+1)}),E=R(x,$[_]),D=t({data:E},j);return D}
19u.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function m(R,j){return j.sort(R)}function y(R,j){var $=[],_=[],x=j.hide||[],E=j.order||[],D=E.reduce(function(F,T,I){return F[T]=I,F},{});R.forEach(function(F){var T=F.path||F.name,I=x.indexOf(T)>-1;!I&&D[T]!==void 0?$[D[T]]=F:I||_.push(F)}),$=$.filter(function(F){return F});var H=j.sortRemainingBy,A;return H==="hidden"?$:(H==="alpha"?A=[["path","name"],["asc","asc"]]:A=[["count"],["desc"]],$.concat(c(_,A[0],A[1])))}function S(R,j){return R.renderingContent&&R.renderingContent.facetOrdering&&R.renderingContent.facetOrdering.values&&R.renderingContent.facetOrdering.values[j]}u.prototype.getFacetValues=function(R,j){var $=p(this,R);if($){var _=t(j,{sortBy:u.DEFAULT_SORT,facetOrdering:!(j&&j.sortBy)}),x=this,E;if(Array.isArray($))E=[R];else{var D=x._state.getHierarchicalFacetByName($.name);E=D.attributes}return o(function(H,A){if(_.facetOrdering){var F=S(x,A);if(F)return y(H,F)}if(Array.isArray(_.sortBy)){var T=a(_.sortBy,u.DEFAULT_SORT);return c(H,T[0],T[1])}else if(typeof _.sortBy=="function")return m(_.sortBy,H);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},$,E)}},u.prototype.getFacetStats=function(R){if(this._state.isConjunctiveFacet(R))return w(this.facets,R);if(this._state.isDisjunctiveFacet(R))return w(this.disjunctiveFacets,R)};function w(R,j){var $=n(R,function(_){return _.name===j});return $&&$.stats}u.prototype.getRefinements=function(){var R=this._state,j=this,$=[];return Object.keys(R.facetsRefinements).forEach(function(_){R.facetsRefinements[_].forEach(function(x){$.push(P(R,"facet",_,x,j.facets))})}),Object.keys(R.facetsExcludes).forEach(function(_){R.facetsExcludes[_].forEach(function(x){$.push(P(R,"exclude",_,x,j.facets))})}),Object.keys(R.disjunctiveFacetsRefinements).forEach(function(_){R.disjunctiveFacetsRefinements[_].forEach(function(x){$.push(P(R,"disjunctive",_,x,j.disjunctiveFacets))})}),Object.keys(R.hierarchicalFacetsRefinements).forEach(function(_){R.hierarchicalFacetsRefinements[_].forEach(function(x){$.push(O(R,_,x,j.hierarchicalFacets))})}),Object.keys(R.numericRefinements).forEach(function(_){var x=R.numericRefinements[_];Object.keys(x).forEach(function(E){x[E].forEach(function(D){$.push({type:"numeric",attributeName:_,name:D,numericValue:D,operator:E})})})}),R.tagRefinements.forEach(function(_){$.push({type:"tag",attributeName:"_tags",name:_})}),$};function P(R,j,$,_,x){var E=n(x,function(A){return A.name===$}),D=E&&E.data&&E.data[_]?E.data[_]:0,H=E&&E.exhaustive||!1;return{type:j,attributeName:$,name:_,count:D,exhaustive:H}}function O(R,j,$,_){var x=R.getHierarchicalFacetByName(j),E=R._getHierarchicalFacetSeparator(x),D=$.split(E),H=n(_,function(C){return C.name===j}),A=D.reduce(function(C,N){var L=C&&n(C.data,function(U){return U.name===N});return L!==void 0?L:C},H),F=A&&A.count||0,T=A&&A.exhaustive||!1,I=A&&A.path||"";return{type:"hierarchical",attributeName:j,name:I,count:F,exhaustive:T}}return gn=u,gn}var pn,ba;function Sl(){return ba||(ba=1,pn=function(t){return t.reduce(function(r,n){return r.concat(n)},[])}),pn}var vn,Sa;function Rl(){if(Sa)return vn;Sa=1;var e=gr(),t=Sl();function r(i,a){var s=[];
19return Object.keys(i).forEach(function(c){i[c].count<2&&(i[c].indexSum+=100),s.push({objectID:c,avgOfIndices:i[c].indexSum/a})}),s.sort(function(c,l){return c.avgOfIndices>l.avgOfIndices?1:-1})}function n(i,a){var s={};a.forEach(function(d){d.forEach(function(v,b){i.includes(v.objectID)||(s[v.objectID]?s[v.objectID]={indexSum:s[v.objectID].indexSum+b,count:s[v.objectID].count+1}:s[v.objectID]={indexSum:b,count:1})})});var c=r(s,a.length),l=c.reduce(function(d,v){var b=e(t(a),function(h){return h.objectID===v.objectID});return b?d.concat(b):d},[]);return l}return vn=n,vn}var yn,Ra;function Po(){return Ra||(Ra=1,yn="3.26.0"),yn}var bn,wa;function wl(){if(wa)return bn;wa=1;var e=fi(),t=fl(),r=li().escapeFacetValue,n=po(),i=hi(),a=di(),s=mi(),c=vo(),l=yo(),d=ll(),v=bo(),b=wo(),h=Rl(),f=Po();function u(o,m,y,S){typeof o.addAlgoliaAgent=="function"&&o.addAlgoliaAgent("JS Helper ("+f+")"),this.setClient(o);var w=y||{};w.index=m,this.state=v.make(w),this.recommendState=new c({params:w.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=S,this._recommendCache={}}n(u,e),u.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},u.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},u.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this},u.prototype.recommend=function(){return this._recommend(),this},u.prototype.getQuery=function(){var o=this.state;return d._getHitsSearchParams(o)},u.prototype.searchOnce=function(o,m){var y=o?this.state.setQueryParameters(o):this.state,S=d._getQueries(y.index,y),w=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:y}),m){this.client.search(S).then(function(P){w._currentNbQueries--,w._currentNbQueries===0&&w.emit("searchQueueEmpty"),m(null,new b(y,P.results),y)}).catch(function(P){w._currentNbQueries--,w._currentNbQueries===0&&w.emit("searchQueueEmpty"),m(P,null,y)});return}return this.client.search(S).then(function(P){return w._currentNbQueries--,w._currentNbQueries===0&&w.emit("searchQueueEmpty"),{content:new b(y,P.results),state:y,_originalResponse:P}},function(P){throw w._currentNbQueries--,w._currentNbQueries===0&&w.emit("searchQueueEmpty"),P})},u.prototype.findAnswers=function(o){console.warn("[algoliasearch-helper] answers is no longer supported");var m=this.state,y=this.derivedHelpers[0];if(!y)return Promise.resolve([]);var S=y.getModifiedState(m),w=i({attributesForPrediction:o.attributesForPrediction,nbHits:o.nbHits},{params:s(d._getHitsSearchParams(S),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),P="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if(typeof this.client.initIndex!="function")throw new Error(P);var O=this.client.initIndex(S.index);if(typeof O.findAnswers!="function")throw new Error(P);return O.findAnswers(S.query,o.queryLanguages,w)},u.prototype.searchForFacetValues=function(o,m,y,S){var w=typeof this.client.searchForFacetValues=="function"&&typeof this.client.searchForFacets!="function",P=typeof this.client.initIndex=="function";if(!w&&!P&&typeof this.client.search!="function")throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var O=this.state.setQueryParameters(S||{}),R=O.isDisjunctiveFacet(o),j=d.getSearchForFacetQuery(o,m,y,O);this._currentNbQueries++;var $=this,_;w?_=this.client.searchForFacetValues([{indexName:O.index,params:j}]):P?_=this.client.initIndex(O.index).searchForFacetValues(j):(delete j.facetName,_=this.client.search([{type:"facet",facet:o,indexName:O.index,params:j}]).then(function(D){return D.results[0]})),this.emit("searchForFacetValues",{state:O,facet:o,query:m});var x=this.lastResults&&this.lastResults.index===O.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[o]&&this.lastResults.renderingContent.facetOrdering.values[o].hide||[];
19return _.then(function(D){return $._currentNbQueries--,$._currentNbQueries===0&&$.emit("searchQueueEmpty"),D=Array.isArray(D)?D[0]:D,D.facetHits.forEach(function(H,A){if(x.indexOf(H.value)>-1){D.facetHits.splice(A,1);return}H.escapedValue=r(H.value),H.isRefined=R?O.isDisjunctiveFacetRefined(o,H.escapedValue):O.isFacetRefined(o,H.escapedValue)}),D},function(E){throw $._currentNbQueries--,$._currentNbQueries===0&&$.emit("searchQueueEmpty"),E})},u.prototype.searchForCompositionFacetValues=function(o,m,y,S){if(typeof this.client.searchForFacetValues!="function")throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues");var w=this.state.setQueryParameters(S||{}),P=w.isDisjunctiveFacet(o);this._currentNbQueries++;var O=this,R;return R=this.client.searchForFacetValues({compositionID:w.index,facetName:o,searchForFacetValuesRequest:{params:{query:m,maxFacetHits:y,searchQuery:d._getCompositionHitsSearchParams(w)}}}),this.emit("searchForFacetValues",{state:w,facet:o,query:m}),R.then(function($){return O._currentNbQueries--,O._currentNbQueries===0&&O.emit("searchQueueEmpty"),$=$.results[0],$.facetHits.forEach(function(_){_.escapedValue=r(_.value),_.isRefined=P?w.isDisjunctiveFacetRefined(o,_.escapedValue):w.isFacetRefined(o,_.escapedValue)}),$},function(j){throw O._currentNbQueries--,O._currentNbQueries===0&&O.emit("searchQueueEmpty"),j})},u.prototype.setQuery=function(o){return this._change({state:this.state.resetPage().setQuery(o),isPageReset:!0}),this},u.prototype.clearRefinements=function(o){return this._change({state:this.state.resetPage().clearRefinements(o),isPageReset:!0}),this},u.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},u.prototype.addDisjunctiveFacetRefinement=function(o,m){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(o,m),isPageReset:!0}),this},u.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},u.prototype.addHierarchicalFacetRefinement=function(o,m){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(o,m),isPageReset:!0}),this},u.prototype.addNumericRefinement=function(o,m,y){return this._change({state:this.state.resetPage().addNumericRefinement(o,m,y),isPageReset:!0}),this},u.prototype.addFacetRefinement=function(o,m){return this._change({state:this.state.resetPage().addFacetRefinement(o,m),isPageReset:!0}),this},u.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},u.prototype.addFacetExclusion=function(o,m){return this._change({state:this.state.resetPage().addExcludeRefinement(o,m),isPageReset:!0}),this},u.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},u.prototype.addTag=function(o){return this._change({state:this.state.resetPage().addTagRefinement(o),isPageReset:!0}),this},u.prototype.addFrequentlyBoughtTogether=function(o){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(o)}),this},u.prototype.addRelatedProducts=function(o){return this._recommendChange({state:this.recommendState.addRelatedProducts(o)}),this},u.prototype.addTrendingItems=function(o){return this._recommendChange({state:this.recommendState.addTrendingItems(o)}),this},u.prototype.addTrendingFacets=function(o){return this._recommendChange({state:this.recommendState.addTrendingFacets(o)}),this},u.prototype.addLookingSimilar=function(o){return this._recommendChange({state:this.recommendState.addLookingSimilar(o)}),this},u.prototype.removeNumericRefinement=function(o,m,y){return this._change({state:this.state.resetPage().removeNumericRefinement(o,m,y),isPageReset:!0}),this},u.prototype.removeDisjunctiveFacetRefinement=function(o,m){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(o,m),isPageReset:!0}),this},u.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},u.prototype.removeHierarchicalFacetRefinement=function(o){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(o),isPageReset:!0}),this},u.prototype.removeFacetRefinement=function(o,m){return this._change({state:this.state.resetPage().removeFacetRefinement(o,m),isPageReset:!0}),this},u.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},u.prototype.removeFacetExclusion=function(o,m){return this._change({state:this.state.resetPage().removeExcludeRefinement(o,m),isPageReset:!0}),this},u.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},u.prototype.removeTag=function(o){return this._change({state:this.state.resetPage().removeTagRefinement(o),isPageReset:!0}),this},u.prototype.removeFrequentlyBoughtTogether=function(o){return this._recommendChange({state:this.recommendState.removeParam
19s(o)}),this},u.prototype.removeRelatedProducts=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},u.prototype.removeTrendingItems=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},u.prototype.removeTrendingFacets=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},u.prototype.removeLookingSimilar=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},u.prototype.toggleFacetExclusion=function(o,m){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(o,m),isPageReset:!0}),this},u.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},u.prototype.toggleRefinement=function(o,m){return this.toggleFacetRefinement(o,m)},u.prototype.toggleFacetRefinement=function(o,m){return this._change({state:this.state.resetPage().toggleFacetRefinement(o,m),isPageReset:!0}),this},u.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},u.prototype.toggleTag=function(o){return this._change({state:this.state.resetPage().toggleTagRefinement(o),isPageReset:!0}),this},u.prototype.nextPage=function(){var o=this.state.page||0;return this.setPage(o+1)},u.prototype.previousPage=function(){var o=this.state.page||0;return this.setPage(o-1)};function p(o){if(o<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(o),isPageReset:!1}),this}u.prototype.setCurrentPage=p,u.prototype.setPage=p,u.prototype.setIndex=function(o){return this._change({state:this.state.resetPage().setIndex(o),isPageReset:!0}),this},u.prototype.setQueryParameter=function(o,m){return this._change({state:this.state.resetPage().setQueryParameter(o,m),isPageReset:!0}),this},u.prototype.setState=function(o){return this._change({state:v.make(o),isPageReset:!1}),this},u.prototype.overrideStateWithoutTriggeringChangeEvent=function(o){return this.state=new v(o),this},u.prototype.hasRefinements=function(o){return a(this.state.getNumericRefinements(o))?!0:this.state.isConjunctiveFacet(o)?this.state.isFacetRefined(o):this.state.isDisjunctiveFacet(o)?this.state.isDisjunctiveFacetRefined(o):this.state.isHierarchicalFacet(o)?this.state.isHierarchicalFacetRefined(o):!1},u.prototype.isExcluded=function(o,m){return this.state.isExcludeRefined(o,m)},u.prototype.isDisjunctiveRefined=function(o,m){return this.state.isDisjunctiveFacetRefined(o,m)},u.prototype.hasTag=function(o){return this.state.isTagRefined(o)},u.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},u.prototype.getIndex=function(){return this.state.index};function g(){return this.state.page}return u.prototype.getCurrentPage=g,u.prototype.getPage=g,u.prototype.getTags=function(){return this.state.tagRefinements},u.prototype.getRefinements=function(o){var m=[];if(this.state.isConjunctiveFacet(o)){var y=this.state.getConjunctiveRefinements(o);y.forEach(function(O){m.push({value:O,type:"conjunctive"})});var S=this.state.getExcludeRefinements(o);S.forEach(function(O){m.push({value:O,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(o)){var w=this.state.getDisjunctiveRefinements(o);w.forEach(function(O){m.push({value:O,type:"disjunctive"})})}var P=this.state.getNumericRefinements(o);return Object.keys(P).forEach(function(O){var R=P[O];m.push({value:R,operator:O,type:"numeric"})}),m},u.prototype.getNumericRefinement=function(o,m){return this.state.getNumericRefinement(o,m)},u.prototype.getHierarchicalFacetBreadcrumb=function(o){return this.state.getHierarchicalFacetBreadcrumb(o)},u.prototype._search=function(o){var m=this.state,y=[],S=[];o.onlyWithDerivedHelpers||(S=d._getQueries(m.index,m),y.push({state:m,queriesCount:S.length,helper:this}),this.emit("search",{state:m,results:this.lastResults}));var w=this.derivedHelpers.map(function(R){var j=R.getModifiedState(m),$=j.index?d._getQueries(j.index,j):[];return y.push({state:j,queriesCount:$.length,helper:R}),R.emit("search",{state:j,results:R.lastResults}),$}),P=Array.prototype.concat.apply(S,w),O=this._queryId++;if(this._currentNbQueries++,!P.length)return Promise.resolve({results:[]}
19).then(this._dispatchAlgoliaResponse.bind(this,y,O));try{this.client.search(P).then(this._dispatchAlgoliaResponse.bind(this,y,O)).catch(this._dispatchAlgoliaError.bind(this,O))}catch(R){this.emit("error",{error:R})}},u.prototype._runComposition=function(){var o=this.state,m=[],y=[],S=this.derivedHelpers.map(function(R){var j=R.getModifiedState(o),$=d._getCompositionQueries(j);return m.push({state:j,queriesCount:$.length,helper:R}),R.emit("search",{state:j,results:R.lastResults}),$}),w=Array.prototype.concat.apply(y,S),P=this._queryId++;if(this._currentNbQueries++,!w.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,m,P));if(w.length>1)throw new Error("Only one query is allowed when using a composition.");var O=w[0];try{this.client.search(O).then(this._dispatchAlgoliaResponse.bind(this,m,P)).catch(this._dispatchAlgoliaError.bind(this,P))}catch(R){this.emit("error",{error:R})}},u.prototype._recommend=function(){var o=this.state,m=this.recommendState,y=this.getIndex(),S=[{state:m,index:y,helper:this}],w=m.params.map(function($){return $.$$id});this.emit("fetch",{recommend:{state:m,results:this.lastRecommendResults}});var P=this._recommendCache,O=this.derivedHelpers.map(function($){var _=$.getModifiedState(o).index;if(!_)return[];var x=$.getModifiedRecommendState(new c);return S.push({state:x,index:_,helper:$}),w=Array.prototype.concat.apply(w,x.params.map(function(E){return E.$$id})),$.emit("fetch",{recommend:{state:x,results:$.lastRecommendResults}}),x._buildQueries(_,P)}),R=Array.prototype.concat.apply(this.recommendState._buildQueries(y,P),O);if(R.length!==0){if(R.length>0&&typeof this.client.getRecommendations>"u"){console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");return}var j=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(R).then(this._dispatchRecommendResponse.bind(this,j,S,w)).catch(this._dispatchRecommendError.bind(this,j))}catch($){this.emit("error",{error:$})}}},u.prototype._dispatchAlgoliaResponse=function(o,m,y){var S=this;if(!(m<this._lastQueryIdReceived)){this._currentNbQueries-=m-this._lastQueryIdReceived,this._lastQueryIdReceived=m,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var w=y.results.slice(),P=Object.keys(y).reduce(function(O,R){return R!=="results"&&(O[R]=y[R]),O},{});Object.keys(P).length<=0&&(P=void 0),o.forEach(function(O){var R=O.state,j=O.queriesCount,$=O.helper,_=w.splice(0,j);if(!R.index){$.emit("result",{results:null,state:R});return}$.lastResults=new b(R,_,S._searchResultsOptions),P!==void 0&&($.lastResults._rawContent=P),$.emit("result",{results:$.lastResults,state:R})})}},u.prototype._dispatchRecommendResponse=function(o,m,y,S){if(!(o<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=o-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=o,this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty");var w=this._recommendCache,P={};y.filter(function(R){return w[R]===void 0}).forEach(function(R,j){P[R]||(P[R]=[]),P[R].push(j)}),Object.keys(P).forEach(function(R){var j=P[R],$=S.results[j[0]];if(j.length===1){w[R]=$;return}w[R]=Object.assign({},$,{hits:h(y,j.map(function(_){return S.results[_].hits}))})});var O={};y.forEach(function(R){O[R]=w[R]}),m.forEach(function(R){var j=R.state,$=R.helper;if(!R.index){$.emit("recommend:result",{results:null,state:j});return}$.lastRecommendResults=new l(j,O),$.emit("recommend:result",{recommend:{results:$.lastRecommendResults,state:j}})})}},u.prototype._dispatchAlgoliaError=function(o,m){o<this._lastQueryIdReceived||(this._currentNbQueries-=o-this._lastQueryIdReceived,this._lastQueryIdReceived=o,this.emit("error",{error:m}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))},u.prototype._dispatchRecommendError=function(o,m){o<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=o-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=o,this.emit("error",{error:m}),this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty"))},u.prototype.containsRefinement=function(o,m,y,S){return o||m.length!==0||y.length!==0||S.length!==0},u.prototype._hasDisjunctiveRefinements=function(o){return this.state.disjunctiveRefinements[o]&&this.state.disjunctiveRefinements[o].length>0},u.prototype._change=function(o){var m=o.state,y=o.isPageReset;
19m!==this.state&&(this.state=m,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:y}))},u.prototype._recommendChange=function(o){var m=o.state;m!==this.recommendState&&(this.recommendState=m,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},u.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},u.prototype.setClient=function(o){return this.client===o?this:(typeof o.addAlgoliaAgent=="function"&&o.addAlgoliaAgent("JS Helper ("+f+")"),this.client=o,this)},u.prototype.getClient=function(){return this.client},u.prototype.derive=function(o,m){var y=new t(this,o,m);return this.derivedHelpers.push(y),y},u.prototype.detachDerivedHelper=function(o){var m=this.derivedHelpers.indexOf(o);if(m===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(m,1)},u.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},bn=u,bn}var Sn,Pa;function Pl(){if(Pa)return Sn;Pa=1;var e=wl(),t=vo(),r=yo(),n=bo(),i=wo();function a(s,c,l,d){return new e(s,c,l,d)}return a.version=Po(),a.AlgoliaSearchHelper=e,a.SearchParameters=n,a.RecommendParameters=t,a.SearchResults=i,a.RecommendResults=r,Sn=a,Sn}var Ol=Pl();const le=ri(Ol);function Ct(e){"@babel/helpers - typeof";return Ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(e)}function Oa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oa(Object(r),!0).forEach(function(n){Oo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oo(e,t,r){return t=jl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jl(e){var t=$l(e,"string");return Ct(t)=="symbol"?t:String(t)}function $l(e,t){if(Ct(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _l=re({name:"configure",connector:!0});function ja(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(r,n){return fe(fe({},r),{},Oo({},n,void 0))},{}))}var jo=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return function(n){if(!n||!no(n.searchParameters))throw new Error(_l("The `searchParameters` option expects an object."));var i={};function a(s){return function(c){var l=ja(s.state,n),d=jt(l,new le.SearchParameters(c));n.searchParameters=c,s.setState(d).search()}}return{$$type:"ais.configure",init:function(c){var l=c.instantSearchInstance;t(fe(fe({},this.getWidgetRenderState(c)),{},{instantSearchInstance:l}),!0)},render:function(c){var l=c.instantSearchInstance;t(fe(fe({},this.getWidgetRenderState(c)),{},{instantSearchInstance:l}),!1)},dispose:function(c){var l=c.state;return r(),ja(l,n)},getRenderState:function(c,l){var d,v=this.getWidgetRenderState(l);return fe(fe({},c),{},{configure:fe(fe({},v),{},{widgetParams:fe(fe({},v.widgetParams),{},{searchParameters:jt(new le.SearchParameters((d=c.configure)===null||d===void 0?void 0:d.widgetParams.searchParameters),new le.SearchParameters(v.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(c){var l=c.helper;return i.refine||(i.refine=a(l)),{refine:i.refine,widgetParams:n}},getWidgetSearchParameters:function(c,l){var d=l.uiState;return jt(c,new le.SearchParameters(fe(fe({},d.configure),n.searchParameters)))},getWidgetUiState:function(c){return fe(fe({}
19,c),{},{configure:fe(fe({},c.configure),n.searchParameters)})}}}};function Ht(e){"@babel/helpers - typeof";return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(e)}function $a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$a(Object(r),!0).forEach(function(n){xl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$a(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xl(e,t,r){return t=Fl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fl(e){var t=Il(e,"string");return Ht(t)=="symbol"?t:String(t)}function Il(e,t){if(Ht(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ht(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _a(e){return Dl(e)||Al(e)||Tl(e)||El()}function El(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 20In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tl(e,t){if(e){if(typeof e=="string")return Un(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Un(e,t)}}function Al(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dl(e){if(Array.isArray(e))return Un(e)}function Un(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var xa=re({name:"configure-related-items",connector:!0});function Fa(e){var t=e.attributeName,r=e.attributeValue,n=e.attributeScore;return"".concat(t,":").concat(r,"<score=").concat(n||1,">")}var Cl=function(t,r){return function(n){var i=n||{},a=i.hit,s=i.matchingPatterns,c=i.transformSearchParameters,l=c===void 0?function(h){return h}:c;if(!a)throw new Error(xa("The `hit` option is required."));if(!s)throw new Error(xa("The `matchingPatterns` option is required."));var d=Object.keys(s).reduce(function(h,f){var u=s[f],p=ht(a,f),g=u.score;return Array.isArray(p)?[].concat(_a(h),[p.map(function(o){return Fa({attributeName:f,attributeValue:o,attributeScore:g})})]):typeof p=="string"?[].concat(_a(h),[Fa({attributeName:f,attributeValue:p,attributeScore:g})]):h},[]),v=Rn({},l(new le.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.objectID)],optionalFilters:d}))),b=jo(t,r);return Rn(Rn({},b({searchParameters:v})),{},{$$type:"ais.configureRelatedItems"})}};function Ia(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ia(Object(r),!0).forEach(function(n){Hl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ia(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hl(e,t,r){return t=Nl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nl(e){var t=Wl(e,"string");return ct(t)=="symbol"?t:String(t)}function Wl(e,t){if(ct(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ct(e){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(e)}var yr=re({name:"dynamic-widgets",connector:!0}),Ll=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,yr()),function(n){var i=n.widgets,a=n.maxValuesPerFacet,s=a===void 0?20:a,c=n.facets,l=c===void 0?["*"]:c,d=n.transformItems,v=d===void 0?function(f){return f}:d,b=n.fallbackWidget;if(!(i&&Array.isArray(i)&&i.every(function(f){return ct(f)==="object"})))throw new Error(yr("The `widgets` option expects an array of widgets."));if(!Array.isArray(l))throw new Error(yr("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(l))));var h=new Map;
20return{$$type:"ais.dynamicWidgets",init:function(u){i.forEach(function(p){var g=yf(p,u);h.set(g,{widget:p,isMounted:!1})}),t(Ze(Ze({},this.getWidgetRenderState(u)),{},{instantSearchInstance:u.instantSearchInstance}),!0)},render:function(u){var p=u.parent,g=this.getWidgetRenderState(u),o=[],m=[];b&&g.attributesToRender.forEach(function(y){if(!h.has(y)){var S=b({attribute:y});h.set(y,{widget:S,isMounted:!1})}}),h.forEach(function(y,S){var w=y.widget,P=y.isMounted,O=g.attributesToRender.indexOf(S)>-1;!P&&O?(m.push(w),h.set(S,{widget:w,isMounted:!0})):P&&!O&&(o.push(w),h.set(S,{widget:w,isMounted:!1}))}),p.addWidgets(m),setTimeout(function(){return p.removeWidgets(o)},0),t(Ze(Ze({},g),{},{instantSearchInstance:u.instantSearchInstance}),!1)},dispose:function(u){var p=u.parent,g=[];h.forEach(function(o){var m=o.widget,y=o.isMounted;y&&g.push(m)}),p.removeWidgets(g),r()},getWidgetSearchParameters:function(u){return l.reduce(function(p,g){return p.addFacet(g)},u.setQueryParameters({maxValuesPerFacet:Math.max(s||0,u.maxValuesPerFacet||0)}))},getRenderState:function(u,p){return Ze(Ze({},u),{},{dynamicWidgets:this.getWidgetRenderState(p)})},getWidgetRenderState:function(u){var p,g,o,m,y=u.results;if(u.state,!y)return{attributesToRender:[],widgetParams:n};var S=v((p=(g=y.renderingContent)===null||g===void 0||(o=g.facetOrdering)===null||o===void 0||(m=o.facets)===null||m===void 0?void 0:m.order)!==null&&p!==void 0?p:[],{results:y});if(!Array.isArray(S))throw new Error(yr("The `transformItems` option expects a function that returns an Array."));return{attributesToRender:S,widgetParams:n}}}}};function Nt(e){"@babel/helpers - typeof";return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(e)}function Ml(e){return Ql(e)||kl(e)||Ul(e)||ql()}function ql(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 21In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ul(e,t){if(e){if(typeof e=="string")return kn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kn(e,t)}}function kl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ql(e){if(Array.isArray(e))return kn(e)}function kn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ea(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ea(Object(r),!0).forEach(function(n){Vl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ea(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vl(e,t,r){return t=Bl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bl(e){var t=Kl(e,"string");return Nt(t)=="symbol"?t:String(t)}function Kl(e,t){if(Nt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ta=re({name:"clear-refinements",connector:!0}),zl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Ta()),function(n){var i=n||{},a=i.includedAttributes,s=a===void 0?[]:a,c=i.excludedAttributes,l=c===void 0?["query"]:c,d=i.transformItems,v=d===void 0?function(u){return u}:d;if(n&&n.includedAttributes&&n.excludedAttributes)throw new Error(Ta("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var b={refine:K,createURL:function(){return""},attributesToClear:[]},h=function(){return b.refine()},f=function(){return b.createURL()};return{$$type:"ais.clearRefinements",init:function(p){var g=p.instantSearchInstance;t(et(et({},this.getWidgetRenderState(p)),{},{instantSearchInstance:g}),!0)},render:function(p){var g=p.instantSearchInstance;t(et(et({},this.getWidgetRenderState(p)),{},{instantSearchInstance:g}),!1)},dispose:function(){r()},getRenderState:function(p,g){return et(et({},p),{},{clearRefinements:this.getWidgetRenderState(g)})},getWidgetRenderState:function(p){var g=p.createURL,o=p.scopedResults,m=p.results;b.attributesToClear=o.reduce(function(S,w){return S.concat(Jl({scopedResult:w,includedAttributes:s,excludedAttributes:l,transformItems:v,results:m}))},[]),b.refine=function(){b.attributesToClear.forEach(function(S){var w=S.helper,P=S.items;w.setState(Fi({helper:w,attributesToClear:P})).search()})},b.createURL=function(){return g(jt.apply(void 0,Ml(b.attributesToClear.map(function(S){var w=S.helper,P=S.items;return Fi({helper:w,attributesToClear:P})}))))};var y=b.attributesToClear.some(function(S){return S.items.length>0});return{canRefine:y,hasRefinements:y,refine:h,createURL:f,widgetParams:n}}}}};function Jl(e){var t=e.scopedResult,r=e.includedAttributes,n=e.excludedAttributes,i=e.transformItems,a=e.results,s=r.indexOf("query")!==-1||n.indexOf("query")===-1;return{helper:t.helper,items:i(ci(ui(t.results,t.helper.state,s).map(function(c){return c.attribute}).filter(function(c){return r.length===0||r.indexOf(c)!==-1}).filter(function(c){return c==="query"&&s||n.indexOf(c)===-1})),{results:a})}}function Wt(e){"@babel/helpers - typeof";return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(e)}function Gl(e){return eh(e)||Zl(e)||Xl(e)||Yl()}function Yl(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 22In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xl(e,t){if(e){if(typeof e=="string")return Qn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qn(e,t)}}function Zl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eh(e){if(Array.isArray(e))return Qn(e)}function Qn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Aa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
22t%2?Aa(Object(r),!0).forEach(function(n){th(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Aa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function th(e,t,r){return t=rh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rh(e){var t=nh(e,"string");return Wt(t)=="symbol"?t:String(t)}function nh(e,t){if(Wt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Da=re({name:"current-refinements",connector:!0}),ih=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Da()),function(n){if((n||{}).includedAttributes&&(n||{}).excludedAttributes)throw new Error(Da("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var i=n||{},a=i.includedAttributes,s=i.excludedAttributes,c=s===void 0?["query"]:s,l=i.transformItems,d=l===void 0?function(v){return v}:l;return{$$type:"ais.currentRefinements",init:function(b){var h=b.instantSearchInstance;t(tt(tt({},this.getWidgetRenderState(b)),{},{instantSearchInstance:h}),!0)},render:function(b){var h=b.instantSearchInstance;t(tt(tt({},this.getWidgetRenderState(b)),{},{instantSearchInstance:h}),!1)},dispose:function(){r()},getRenderState:function(b,h){return tt(tt({},b),{},{currentRefinements:this.getWidgetRenderState(h)})},getWidgetRenderState:function(b){var h=b.results,f=b.scopedResults,u=b.createURL,p=b.helper;function g(){return h?f.reduce(function(m,y){return m.concat(d(Ca({results:y.results,helper:y.helper,indexId:y.indexId,includedAttributes:a,excludedAttributes:c}),{results:h}))},[]):d(Ca({results:null,helper:p,indexId:p.state.index,includedAttributes:a,excludedAttributes:c}),{results:h})}var o=g();return{items:o,canRefine:o.length>0,refine:function(y){return _o(p,y)},createURL:function(y){return u($o(p.state,y))},widgetParams:n}}}}};function Ca(e){var t=e.results,r=e.helper,n=e.indexId,i=e.includedAttributes,a=e.excludedAttributes,s=(i||[]).indexOf("query")!==-1||(a||[]).indexOf("query")===-1,c=i?function(d){return i.indexOf(d.attribute)!==-1}:function(d){return a.indexOf(d.attribute)===-1},l=ui(t,r.state,s).map(sh).filter(c);return l.reduce(function(d,v){return[].concat(Gl(d.filter(function(b){return b.attribute!==v.attribute})),[{indexName:r.state.index,indexId:n,attribute:v.attribute,label:v.attribute,refinements:l.filter(function(b){return b.attribute===v.attribute}).sort(function(b,h){return b.type==="numeric"?b.value-h.value:0}),refine:function(h){return _o(r,h)}}])},[])}function $o(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function _o(e,t){e.setState($o(e.state,t)).search()}function ah(e){switch(e){case">=":return"â¥";case"<=":return"â¤";default:return e}}function sh(e){var t=oh(e),r=e.operator?"".concat(ah(e.operator)," ").concat(e.name):e.name,n={attribute:e.attribute,type:e.type,value:t,label:r};return e.operator!==void 0&&(n.operator=e.operator),e.count!==void 0&&(n.count=e.count),e.exhaustive!==void 0&&(n.exhaustive=e.exhaustive),n}function oh(e){return e.type==="numeric"?Number(e.name):"escapedValue"in e?e.escapedValue:e.name}function Lt(e){"@babel/helpers - typeof";return Lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(e)}var uh=["name","escapedValue","data","path"];function Ha(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
22t%2?Ha(Object(r),!0).forEach(function(n){jr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ha(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jr(e,t,r){return t=ch(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ch(e){var t=fh(e,"string");return Lt(t)=="symbol"?t:String(t)}function fh(e,t){if(Lt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lh(e,t){if(e==null)return{};var r=hh(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hh(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function dh(e,t){return vh(e)||ph(e,t)||gh(e,t)||mh()}function mh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 23In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gh(e,t){if(e){if(typeof e=="string")return Na(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Na(e,t)}}function Na(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ph(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function vh(e){if(Array.isArray(e))return e}var wn=re({name:"hierarchical-menu",connector:!0}),Wa=["name:asc"],yh=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,wn()),function(n){var i=n||{},a=i.attributes,s=i.separator,c=s===void 0?" > ":s,l=i.rootPath,d=l===void 0?null:l,v=i.showParentLevel,b=v===void 0?!0:v,h=i.limit,f=h===void 0?10:h,u=i.showMore,p=u===void 0?!1:u,g=i.showMoreLimit,o=g===void 0?20:g,m=i.sortBy,y=m===void 0?Wa:m,S=i.transformItems,w=S===void 0?function(A){return A}:S;if(!a||!Array.isArray(a)||a.length===0)throw new Error(wn("The `attributes` option expects an array of strings."));if(p===!0&&o<=f)throw new Error(wn("The `showMoreLimit` option must be greater than `limit`."));var P=dh(a,1),O=P[0],R,j=function(){};function $(){j()}var _,x=!1;function E(A,F){return function(){x=!x,F.render(A)}}function D(){return x?o:f}function H(A){return A.slice(0,D()).map(function(F){var T=F.name,I=F.escapedValue,C=F.data;F.path;var N=lh(F,uh),L=he(he({},N),{},{value:I,label:T,data:null});return Array.isArray(C)&&(L.data=H(C)),L})}return{$$type:"ais.hierarchicalMenu",init:function(F){var T=F.instantSearchInstance;t(he(he({},this.getWidgetRenderState(F)),{},{instantSearchInstance:T}),!0)},render:function(F){var T=F.instantSearchInstance;j=E(F,this),t(he(he({},this.getWidgetRenderState(F)),{},{instantSearchInstance:T}),!1)},dispose:function(F){var T=F.state;return r(),T.removeHierarchicalFacet(O).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(F,T){return he(he({},F),{},{hierarchicalMenu:he(he({},F.hierarchicalMenu),{},jr({},O,this.getWidgetRenderState(T)))})},getWidgetRenderState:function(F){var T=this,I=F.results,C=F.state,N=F.createURL,L=F.instantSearchInstance,U=F.helper,z=[],M=!1,q=function(ae){return N(function(Ne){return T.getWidgetUiState(Ne,{searchParameters:C.resetPage().toggleFacetRefinement(O,ae),helper:U})})};if(R||(R=ai({instantSearchInstance:L,helper:U,attribute:function(ae){var Ne=ae.split(c).length-1;return a[Ne]},widgetType:this.$$type})),_||(_=function(ae){R("click:internal",ae),U.toggleFacetRefinement(O,ae).search()}),I){var B=I.getFacetValues(O,{sortBy:y,facetOrdering:y===Wa}),k=B&&!Array.isArray(B)&&B.data?B.data:[],ne=(C.maxValuesPerFacet||0)>D()?k.length<=D():k.length<D();M=p&&(x||!ne),z=w(H(k),{results:I})}return{items:z,refine:_,canRefine:z.length>0,createURL:q,sendEvent:R,widgetParams:n,isShowingMore:x,toggleShowMore:$,canToggleShowMore:M}},getWidgetUiState:function(F,T){var I=T.searchParameters,C=I.getHierarchicalFacetBreadcrumb(O);return bh(he(he({},F),{},{hierarchicalMenu:he(he({},F.hierarchicalMenu),{},jr({},O,C))}),O)},getWidgetSearchParameters:function(F,T){var I=T.uiState,C=I.hierarchicalMenu&&I.hierarchicalMenu[O];if(F.isConjunctiveFacet(O)||F.isDisjunctiveFacet(O))return F;F.isHierarchicalFacet(O)&&F.getHierarchicalFacetByName(O);var N=F.removeHierarchicalFacet(O).addHierarchicalFacet({name:O,attributes:a,separator:c,rootPath:d,showParentLevel:b}),L=N.maxValuesPerFacet||0,U=Math.max(L,p?o:f),z=N.setQueryParameter("maxValuesPerFacet",U);return C?z.addHierarchicalFacetRefinement(O,C.join(c)):z.setQueryParameters({hierarchicalFacetsRefinements:he(he({},z.hierarchicalFacetsRefinements),{},jr({},O,[]))})}}}};function bh(e,t){return e.hierarchicalMenu&&((!e.hierarchicalMenu[t]||e.hierarchicalMenu[t].length===0)&&delete e.hierarchicalMenu[t],Object.keys(e.hierarchicalMenu).length===0&&delete e.hierarchicalMenu),e}function Mt(e){"@babel/helpers - typeof";return Mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(e)}function La(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
23t%2?La(Object(r),!0).forEach(function(n){xo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):La(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xo(e,t,r){return t=Sh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sh(e){var t=Rh(e,"string");return Mt(t)=="symbol"?t:String(t)}function Rh(e,t){if(Mt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wh=re({name:"hits",connector:!0});const Ph=(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,wh()),function(n){var i=n||{},a=i.escapeHTML,s=a===void 0?!0:a,c=i.transformItems,l=c===void 0?function(b){return b}:c,d,v;return{$$type:"ais.hits",init:function(h){t(Ue(Ue({},this.getWidgetRenderState(h)),{},{instantSearchInstance:h.instantSearchInstance}),!0)},render:function(h){var f=this.getWidgetRenderState(h);t(Ue(Ue({},f),{},{instantSearchInstance:h.instantSearchInstance}),!1),f.sendEvent("view:internal",f.items)},getRenderState:function(h,f){return Ue(Ue({},h),{},{hits:this.getWidgetRenderState(f)})},getWidgetRenderState:function(h){var f,u,p,g=h.results,o=h.helper,m=h.instantSearchInstance;if(d||(d=si({instantSearchInstance:m,helper:o,widgetType:this.$$type})),v||(v=co({helper:o,widgetType:this.$$type,instantSearchInstance:m})),!g)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:d,bindEvent:v,widgetParams:n};s&&g.hits.length>0&&(g.hits=ii(g.hits));var y=fo(g.hits,g.page,g.hitsPerPage),S=lo(y,g.queryID),w=l(S,{results:g}),P=(f=g.renderingContent)===null||f===void 0||(u=f.widgets)===null||u===void 0||(p=u.banners)===null||p===void 0?void 0:p[0];return{hits:w,items:w,results:g,banner:P,sendEvent:d,bindEvent:v,widgetParams:n}},dispose:function(h){var f=h.state;return r(),s?f.setQueryParameters(Object.keys(Ce).reduce(function(u,p){return Ue(Ue({},u),{},xo({},p,void 0))},{})):f},getWidgetSearchParameters:function(h,f){return s?h.setQueryParameters(Ce):h}}}});function qt(e){"@babel/helpers - typeof";return qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(e)}function Ma(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ma(Object(r),!0).forEach(function(n){Oh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ma(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oh(e,t,r){return t=jh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jh(e){var t=$h(e,"string");return qt(t)=="symbol"?t:String(t)}function $h(e,t){if(qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _h=function(t,r){return r.map(function(n){var i=qe(t,function(a){return a.objectID===n});if(typeof i>"u")throw new Error('Could not find objectID "'.concat(n,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return i})},xh=function(t){var r=ci(t.map(function(i){return i.__queryID}));if(r.length>1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var n=r[0];if(typeof n!="string")throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return n},Fh=function(t){return t.map(function(r){return r.__position})},Ih=function(t){var r=t.method,n=t.results,i=t.hits,a=t.objectIDs,s=n.index,c=_h(i,a),l=xh(c);switch(r){case"clickedObjectIDsAfterSearch":{var d=Fh(c);return{index:s,queryID:l,objectIDs:a,positions:d}}case"convertedObjectIDsAfterSearch":return{index:s,queryID:l,objectIDs:a};default:throw new Error('Unsupported method passed to insights: "'.concat(r,'".'))}},Eh=function(t,r,n){return function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];var l=s[0];if(!t){var d=re({name:"instantsearch"});throw new Error(d("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(l.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var v=Ih({method:i,results:r,hits:n,objectIDs:l.objectIDs});t(i,Ar(Ar({},v),l))}};function Fo(e){return function(t,r){return e(function(n,i){var a=n.results,s=n.hits,c=n.instantSearchInstance;if(a&&s&&c){var l=Eh(c.insightsClient,a,s);return t(Ar(Ar({},n),{},{insights:l}),i)}return t(n,i)},r)}}function Vn(e){"@babel/helpers - typeof";return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(e)}function Th(e){var t=e.method,r=e.payload;if(Vn(r)!=="object")throw new Error("The insights helper expects the payload to be an object.");var n;try{n=oo(r)}catch{throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(n,'"')}function Io(e,t){return Th({method:e,payload:t})}var Ah=Fo(Ph);function Ut(e){"@babel/helpers - typeof";return Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(e)}function Dh(e){return Wh(e)||Nh(e)||Hh(e)||Ch()}function Ch(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 24In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hh(e,t){if(e){if(typeof e=="string")return Bn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bn(e,t)}}function Nh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wh(e){if(Array.isArray(e))return Bn(e)}function Bn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
24t%2?qa(Object(r),!0).forEach(function(n){Lh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lh(e,t,r){return t=Mh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mh(e){var t=qh(e,"string");return Ut(t)=="symbol"?t:String(t)}function qh(e,t){if(Ut(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ut(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var br=re({name:"hits-per-page",connector:!0}),Uh=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,br()),function(n){var i=n||{},a=i.items,s=i.transformItems,c=s===void 0?function(f){return f}:s;if(!Array.isArray(a))throw new Error(br("The `items` option expects an array of objects."));var l=a,d=l.filter(function(f){return f.default===!0});if(d.length===0)throw new Error(br("A default value must be specified in `items`."));if(d.length>1)throw new Error(br("More than one default value is specified in `items`."));var v=d[0],b=function(u){var p=u.hitsPerPage;return l.map(function(g){return Fe(Fe({},g),{},{isRefined:Number(g.value)===Number(p)})})},h={getRefine:function(u){return function(p){return!p&&p!==0?u.setQueryParameter("hitsPerPage",void 0).search():u.setQueryParameter("hitsPerPage",p).search()}},createURLFactory:function(u){var p=u.state,g=u.createURL,o=u.getWidgetUiState,m=u.helper;return function(y){return g(function(S){return o(S,{searchParameters:p.resetPage().setQueryParameter("hitsPerPage",!y&&y!==0?void 0:y),helper:m})})}}};return{$$type:"ais.hitsPerPage",init:function(u){var p=u.state,g=u.instantSearchInstance,o=l.some(function(m){return Number(p.hitsPerPage)===Number(m.value)});o||(l=[{value:"",label:""}].concat(Dh(l))),t(Fe(Fe({},this.getWidgetRenderState(u)),{},{instantSearchInstance:g}),!0)},render:function(u){var p=u.instantSearchInstance;t(Fe(Fe({},this.getWidgetRenderState(u)),{},{instantSearchInstance:p}),!1)},dispose:function(u){var p=u.state;return r(),p.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(u,p){return Fe(Fe({},u),{},{hitsPerPage:this.getWidgetRenderState(p)})},getWidgetRenderState:function(u){var p=u.state,g=u.results,o=u.createURL,m=u.helper,y=g?g.nbHits>0:!1;return{items:c(b(p),{results:g}),refine:h.getRefine(m),createURL:h.createURLFactory({state:p,createURL:o,getWidgetUiState:this.getWidgetUiState,helper:m}),hasNoResults:!y,canRefine:y,widgetParams:n}},getWidgetUiState:function(u,p){var g=p.searchParameters,o=g.hitsPerPage;return o===void 0||o===v.value?u:Fe(Fe({},u),{},{hitsPerPage:o})},getWidgetSearchParameters:function(u,p){var g=p.uiState;return u.setQueryParameters({hitsPerPage:g.hitsPerPage||v.value})}}}};function kt(e){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kt(e)}var kh=["page"],Qh=["clickAnalytics","userToken"];function Ua(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ua(Object(r),!0).forEach(function(n){Eo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ua(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eo(e,t,r){return t=Vh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vh(e){var t=Bh(e,"string");return kt(t)=="symbol"?t:String(t)}function Bh(e,t){if(kt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ka(e){return Gh(e)||Jh(e)||zh(e)||Kh()}function Kh(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 25In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zh(e,t){if(e){if(typeof e=="string")return Kn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kn(e,t)}}function Jh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gh(e){if(Array.isArray(e))return Kn(e)}function Kn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function To(e,t){if(e==null)return{};var r=Yh(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Yh(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Xh=re({name:"infinite-hits",connector:!0});function Qa(e){var t=e||{};t.page;var r=To(t,kh);return r}function Va(e){var t=e||{};t.clickAnalytics,t.userToken;var r=To(t,Qh);return r}function Zh(){var e=null,t=null;return{read:function(n){var i=n.state;return mr(t,Qa(i))?e:null},write:function(n){var i=n.state,a=n.hits;t=Qa(i),e=a}}}function ed(e){return Object.keys(e).map(Number).sort(function(t,r){return t-r}).reduce(function(t,r){return t.concat(e[r])},[])}const td=(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Xh()),function(n){var i=n||{},a=i.escapeHTML,s=a===void 0?!0:a,c=i.transformItems,l=c===void 0?function(y){return y}:c,d=i.cache,v=d===void 0?Zh():d,b,h,f,u,p=function(S,w){var P=S.page,O=P===void 0?0:P,R=Object.keys(w).map(Number);return R.length===0?O:Math.min.apply(Math,[O].concat(ka(R)))},g=function(S,w){var P=S.page,O=P===void 0?0:P,R=Object.keys(w).map(Number);return R.length===0?O:Math.max.apply(Math,[O].concat(ka(R)))},o=function(S,w){return function(){var P=w();S.overrideStateWithoutTriggeringChangeEvent(je(je({},S.state),{},{page:p(S.state,P)-1})).searchWithoutTriggeringOnStateChange()}},m=function(S,w){return function(){var P=w();S.setPage(g(S.state,P)+1).search()}};return{$$type:"ais.infiniteHits",init:function(S){t(je(je({},this.getWidgetRenderState(S)),{},{instantSearchInstance:S.instantSearchInstance}),!0)},render:function(S){var w=S.instantSearchInstance,P=this.getWidgetRenderState(S);t(je(je({},P),{},{instantSearchInstance:w}),!1),f("view:internal",P.currentPageHits)},getRenderState:function(S,w){return je(je({},S),{},{infiniteHits:this.getWidgetRenderState(w)})},getWidgetRenderState:function(S){var w,P,O,R=S.results,j=S.helper,$=S.parent,_=S.state,x=S.instantSearchInstance,E=function(){var ae=$.getPreviousState()||_;return v.read({state:Va(ae)})||{}},D,H=[],A=$.getPreviousState()||_,F=E(),T=R==null||(w=R.renderingContent)===null||w===void 0||(P=w.widgets)===null||P===void 0||(O=P.banners)===null||O===void 0?void 0:O[0];if(b||(b=function(){return o(j,E)()},h=function(){return m(j,E)()}),f||(f=si({instantSearchInstance:x,helper:j,widgetType:this.$$type}),u=co({helper:j,widgetType:this.$$type,instantSearchInstance:x})),!R)D=A.page===void 0||p(A,F)===0;else{var I,C,N=A.page,L=N===void 0?0:N;s&&R.hits.length>0&&(R.hits=ii(R.hits));var U=fo(R.hits,R.page,R.hitsPerPage),z=lo(U,R.queryID),M=l(z,{results:R}),q=!1;mo(x.mainIndex,function(ie){!q&&ie.getWidgets().some(function(ae){var Ne=ae.$$type;return Ne==="ais.dynamicWidgets"})&&(q=!0)});var B=!((I=A.disjunctiveFacets)!==null&&I!==void 0&&I.length)&&!(A.facets||[]).filter(function(ie){return ie!=="*"}).length&&!((C=A.hierarchicalFacets)!==null&&C!==void 0&&C.length);F[L]===void 0&&!R.__isArtificial&&x.status==="idle"&&!(q&&B)&&(F[L]=M,v.write({state:Va(A),hits:F})),H=M,D=p(A,F)===0}var k=ed(F),ne=R?R.nbPages<=g(A,F)+1:!0;
25return{hits:k,items:k,currentPageHits:H,sendEvent:f,bindEvent:u,banner:T,results:R||void 0,showPrevious:b,showMore:h,isFirstPage:D,isLastPage:ne,widgetParams:n}},dispose:function(S){var w=S.state;r();var P=w.setQueryParameter("page",void 0);return s?P.setQueryParameters(Object.keys(Ce).reduce(function(O,R){return je(je({},O),{},Eo({},R,void 0))},{})):P},getWidgetUiState:function(S,w){var P=w.searchParameters,O=P.page||0;return O?je(je({},S),{},{page:O+1}):S},getWidgetSearchParameters:function(S,w){var P=w.uiState,O=S;s&&(O=S.setQueryParameters(Ce));var R=P.page?P.page-1:0;return O.setQueryParameter("page",R)}}}});var rd=Fo(td),nd=["name","escapedValue","path"];function Qt(e){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(e)}function id(e,t){if(e==null)return{};var r=ad(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ad(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Ba(e,t){return cd(e)||ud(e,t)||od(e,t)||sd()}function sd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 26In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function od(e,t){if(e){if(typeof e=="string")return Ka(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ka(e,t)}}function Ka(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ud(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function cd(e){if(Array.isArray(e))return e}function za(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?za(Object(r),!0).forEach(function(n){$r(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):za(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $r(e,t,r){return t=fd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fd(e){var t=ld(e,"string");return Qt(t)=="symbol"?t:String(t)}function ld(e,t){if(Qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pn=re({name:"menu",connector:!0}),Ja=["isRefined","name:asc"],Ao=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Pn()),function(n){var i=n||{},a=i.attribute,s=i.limit,c=s===void 0?10:s,l=i.showMore,d=l===void 0?!1:l,v=i.showMoreLimit,b=v===void 0?20:v,h=i.sortBy,f=h===void 0?Ja:h,u=i.transformItems,p=u===void 0?function(R){return R}:u;if(!a)throw new Error(Pn("The `attribute` option is required."));if(d===!0&&b<=c)throw new Error(Pn("The `showMoreLimit` option must be greater than `limit`."));var g,o,m,y=!1,S=function(){};function w(R,j){return function(){y=!y,j.render(R)}}function P(){S()}function O(){return y?b:c}return{$$type:"ais.menu",init:function(j){var $=j.instantSearchInstance;t(de(de({},this.getWidgetRenderState(j)),{},{instantSearchInstance:$}),!0)},render:function(j){var $=j.instantSearchInstance;t(de(de({},this.getWidgetRenderState(j)),{},{instantSearchInstance:$}),!1)},dispose:function(j){var $=j.state;return r(),$.removeHierarchicalFacet(a).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(j,$){return de(de({},j),{},{menu:de(de({},j.menu),{},$r({},a,this.getWidgetRenderState($)))})},getWidgetRenderState:function(j){var $=this,_=j.results,x=j.createURL,E=j.instantSearchInstance,D=j.helper,H=[],A=!1;if(g||(g=ai({instantSearchInstance:E,helper:D,attribute:a,widgetType:this.$$type})),o||(o=function(C){return x(function(N){return $.getWidgetUiState(N,{searchParameters:D.state.resetPage().toggleFacetRefinement(a,C),helper:D})})}),m||(m=function(C){var N=D.getHierarchicalFacetBreadcrumb(a),L=Ba(N,1),U=L[0];g("click:internal",C||U),D.toggleFacetRefinement(a,C||U).search()}),j.results&&(S=w(j,this)),_){var F=_.getFacetValues(a,{sortBy:f,facetOrdering:f===Ja}),T=F&&!Array.isArray(F)&&F.data?F.data:[];A=d&&(y||T.length>
26O()),H=p(T.slice(0,O()).map(function(I){var C=I.name,N=I.escapedValue;I.path;var L=id(I,nd);return de(de({},L),{},{label:C,value:N})}),{results:_})}return{items:H,createURL:o,refine:m,sendEvent:g,canRefine:H.length>0,widgetParams:n,isShowingMore:y,toggleShowMore:P,canToggleShowMore:A}},getWidgetUiState:function(j,$){var _=$.searchParameters,x=_.getHierarchicalFacetBreadcrumb(a),E=Ba(x,1),D=E[0];return hd(de(de({},j),{},{menu:de(de({},j.menu),{},$r({},a,D))}),a)},getWidgetSearchParameters:function(j,$){var _=$.uiState,x=_.menu&&_.menu[a];if(j.isConjunctiveFacet(a)||j.isDisjunctiveFacet(a))return j;var E=j.removeHierarchicalFacet(a).addHierarchicalFacet({name:a,attributes:[a]}),D=E.maxValuesPerFacet||0,H=Math.max(D,d?b:c),A=E.setQueryParameter("maxValuesPerFacet",H);return x?A.addHierarchicalFacetRefinement(a,x):A.setQueryParameters({hierarchicalFacetsRefinements:de(de({},A.hierarchicalFacetsRefinements),{},$r({},a,[]))})}}}};function hd(e,t){return e.menu&&(e.menu[t]===void 0&&delete e.menu[t],Object.keys(e.menu).length===0&&delete e.menu),e}function Vt(e){"@babel/helpers - typeof";return Vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(e)}function dd(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Do(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 27In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,c;return{s:function(){r=r.call(e)},n:function(){var d=r.next();return a=d.done,d},e:function(d){s=!0,c=d},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(s)throw c}}}}function md(e,t){return vd(e)||pd(e,t)||Do(e,t)||gd()}function gd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 28In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Do(e,t){if(e){if(typeof e=="string")return Ga(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ga(e,t)}}function Ga(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pd(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function vd(e){if(Array.isArray(e))return e}function Ya(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ya(Object(r),!0).forEach(function(n){St(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ya(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function St(e,t,r){return t=yd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yd(e){var t=bd(e,"string");return Vt(t)=="symbol"?t:String(t)}function bd(e,t){if(Vt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var On=re({name:"numeric-menu",connector:!0}),Sd="ais.numericMenu",Rd=function(t){var r=t.instantSearchInstance;return function(){if(arguments.length===1){r.sendEventToInsights(arguments.length<=0?void 0:arguments[0]);return}}},wd=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,On()),function(n){var i=n||{},a=i.attribute,s=a===void 0?"":a,c=i.items,l=c===void 0?[]:c,d=i.transformItems,v=d===void 0?function(f){return f}:d;if(s==="")throw new Error(On("The `attribute` option is required."));if(!l||l.length===0)throw new Error(On("The `items` option expects an array of objects."));var b=function(u){return l.map(function(p){var g=p.start,o=p.end,m=p.label;return{label:m,value:encodeURI(JSON.stringify({start:g,end:o})),isRefined:Co(u,s,{start:g,end:o})}})},h={};return{$$type:Sd,init:function(u){var p=u.instantSearchInstance;t(ce(ce({},this.getWidgetRenderState(u)),{},{instantSearchInstance:p}),!0)},render:function(u){var p=u.instantSearchInstance;t(ce(ce({},this.getWidgetRenderState(u)),{},{instantSearchInstance:p}),!1)},dispose:function(u){var p=u.state;return r(),p.removeNumericRefinement(s)},getWidgetUiState:function(u,p){var g=p.searchParameters,o=g.getNumericRefinements(s),m=o["="]&&o["="][0];if(m||m===0)return ce(ce({},u),{},{numericMenu:ce(ce({},u.numericMenu),{},St({},s,"".concat(o["="])))});var y=o[">="]&&o[">="][0]||"",S=o["<="]&&o["<="][0]||"";return Pd(ce(ce({},u),{},{numericMenu:ce(ce({},u.numericMenu),{},St({},s,"".concat(y,":").concat(S)))}),s)},getWidgetSearchParameters:function(u,p){var g=p.uiState,o=g.numericMenu&&g.numericMenu[s],m=u.setQueryParameters({numericRefinements:ce(ce({},u.numericRefinements),{},St({},s,{}))});if(!o)return m;var y=o.indexOf(":")===-1;if(y)return m.addNumericRefinement(s,"=",Number(o));var S=o.split(":").map(parseFloat),w=md(S,2),P=w[0],O=w[1],R=Z(P)?m.addNumericRefinement(s,">=",P):m,j=Z(O)?R.addNumericRefinement(s,"<=",O):R;return j},getRenderState:function(u,p){return ce(ce({},u),{},{numericMenu:ce(ce({},u.numericMenu),{},St({},s,this.getWidgetRenderState(p)))})},getWidgetRenderState:function(u){var p=this,g=u.results,o=u.state,m=u.instantSearchInstance,y=u.helper,S=u.createURL;h.refine||(h.refine=function(_){var x=Xa(y.state,s,_);h.sendEvent("click:internal",_),y.setState(x).search()}),h.createURL||(h.createURL=function(_){return function(x){return S(function(E){return p.getWidgetUiState(E,{searchParameters:Xa(_,s,x),helper:y})})}}),h.sendEvent||(h.sendEvent=Rd({instantSearchInstance:m}));var w=g?g.nbHits===0:!0,P=b(o),O=!0,R=dd(P),j;try{for(R.s();!(j=R.n()).done;){var $=j.value;if($.isRefined&&decodeURI($.value)!=="{}"){O=!1;break}}}catch(_){R.e(_)}finally{R.f()}return{createURL:h.createURL(o),items:v(P,{results:g}),hasNoResults:w,canRefine:!(w&&O),refine:h.refine,sendEvent:h.sendEvent,widgetParams:n}}}}};function Co(e,t,r){var n=e.getNumericRefinements(t);return r.start!==void 0&&r.end!==void 0?r.start===r.end?Ke(n,"=",r.start):Ke(n,">=",r.start)&&Ke(n,"<=",r.end):r.start!==void 0?Ke(n,">=",r.start):r.end!==void 0?Ke(n,"<=",r.end):r.start===void 0&&r.end===void 0?Object.keys(n).every(function(i){return(n[i]||[]).length===0}):!1}function Xa(e,t,r){var n=e,i=JSON.parse(decodeURI(r)),a=n.getNumericRefinements(t);if(i.start===void 0&&i.end===void 0)return n.removeNumericRefinement(t);if(Co(n,t,i)||(n=n.removeNumericRefinement(t)),i.start!==void 0&&i.end!==void 0){if(i.start>i.end)throw new Error("option.start should be > to option.end");if(i.start===i.end)return Ke(a,"=",i.start)?n=n.removeNumericRefinement(t,"=",i.start):n=n.addNumericRefinement(t,"=",i.start),n}return i.start!==void 0&&(Ke(a,">=",i.start)&&(n=n.removeNumericRefinement(t,">=",i.start)),n=n.addNumericRefinement(t,">=",i.start)),i.end!==void 0&&(Ke(a,"<=",i.end)&&(n=n.removeNumericRefinement(t,"<=",i.end)),n=n.addNumericRefinement(t,"<=",i.end)),typeof n.page=="number"&&(n.page=0),n}function Ke(e,t,r){return e[t]!==void 0&&e[t].includes(r)}function Pd(e,t){return e.numericMenu&&(e.numericMenu[t]===":"&&delete e.numericMenu[t],Object.keys(e.numericMenu).length===0&&delete e.numericMenu),e}function Bt(e){"@babel/helpers - typeof";return Bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(e)}function Od(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
28function jd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ho(n.key),n)}}function $d(e,t,r){return t&&jd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jn(e,t,r){return t=Ho(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ho(e){var t=_d(e,"string");return Bt(t)=="symbol"?t:String(t)}function _d(e,t){if(Bt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xd=(function(){function e(t){Od(this,e),jn(this,"currentPage",void 0),jn(this,"total",void 0),jn(this,"padding",void 0),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return $d(e,[{key:"pages",value:function(){var r=this.total,n=this.currentPage,i=this.padding;if(r===0)return[0];var a=this.nbPagesDisplayed(i,r);if(a===r)return Bi({end:r});var s=this.calculatePaddingLeft(n,i,r,a),c=a-s,l=n-s,d=n+c;return Bi({start:l,end:d})}},{key:"nbPagesDisplayed",value:function(r,n){return Math.min(2*r+1,n)}},{key:"calculatePaddingLeft",value:function(r,n,i,a){return r<=n?r:r>=i-n?a-(i-r):n}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),e})();function Kt(e){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kt(e)}function Za(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Za(Object(r),!0).forEach(function(n){Fd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Za(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fd(e,t,r){return t=Id(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e){var t=Ed(e,"string");return Kt(t)=="symbol"?t:String(t)}function Ed(e,t){if(Kt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Td=re({name:"pagination",connector:!0}),Ad=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Td()),function(n){var i=n||{},a=i.totalPages,s=i.padding,c=s===void 0?3:s,l=new xd({currentPage:0,total:0,padding:c}),d={};function v(b){var h=b.nbPages;return a!==void 0?Math.min(a,h):h}return{$$type:"ais.pagination",init:function(h){var f=h.instantSearchInstance;t(Ie(Ie({},this.getWidgetRenderState(h)),{},{instantSearchInstance:f}),!0)},render:function(h){var f=h.instantSearchInstance;t(Ie(Ie({},this.getWidgetRenderState(h)),{},{instantSearchInstance:f}),!1)},dispose:function(h){var f=h.state;return r(),f.setQueryParameter("page",void 0)},getWidgetUiState:function(h,f){var u=f.searchParameters,p=u.page||0;return p?Ie(Ie({},h),{},{page:p+1}):h},getWidgetSearchParameters:function(h,f){var u=f.uiState,p=u.page?u.page-1:0;return h.setQueryParameter("page",p)},getWidgetRenderState:function(h){var f=h.results,u=h.helper,p=h.state,g=h.createURL;d.refine||(d.refine=function(y){u.setPage(y),u.search()}),d.createURL||(d.createURL=function(y){return g(function(S){return Ie(Ie({},S),{},{page:y+1})})});var o=p.page||0,m=v(f||{nbPages:0});return l.currentPage=o,l.total=m,{createURL:d.createURL,refine:d.refine,canRefine:m>1,currentRefinement:o,nbHits:f?.nbHits||0,nbPages:m,pages:f?l.pages():[],isFirstPage:l.isFirstPage(),isLastPage:l.isLastPage(),widgetParams:n}},getRenderState:function(h,f){return Ie(Ie({},h),{},{pagination:this.getWidgetRenderState(f)})}}}};function zt(e){"@babel/helpers - typeof";return zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zt(e)}function es(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
28t%2?es(Object(r),!0).forEach(function(n){_r(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):es(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _r(e,t,r){return t=Dd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dd(e){var t=Cd(e,"string");return zt(t)=="symbol"?t:String(t)}function Cd(e,t){if(zt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rt(e,t){return Ld(e)||Wd(e,t)||Nd(e,t)||Hd()}function Hd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 29In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nd(e,t){if(e){if(typeof e=="string")return ts(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ts(e,t)}}function ts(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Wd(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function Ld(e){if(Array.isArray(e))return e}var $n=re({name:"range-input",connector:!0},{name:"range-slider",connector:!0}),Md="ais.range";function rs(e){var t=e.min,r=e.max,n=e.precision,i=Math.pow(10,n);return{min:t&&Math.floor(t*i)/i,max:r&&Math.ceil(r*i)/i}}var qd=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,$n()),function(n){var i=n||{},a=i.attribute,s=a===void 0?"":a,c=i.min,l=i.max,d=i.precision,v=d===void 0?0:d;if(!s)throw new Error($n("The `attribute` option is required."));if(Z(c)&&Z(l)&&c>l)throw new Error($n("The `max` option can't be lower than `min`."));var b=function(y){return Number(Number(y).toFixed(v))},h={from:function(y){return y.toLocaleString()},to:function(y){return b(y).toLocaleString()}},f=function(y,S,w,P){var O=y.state,R=S.min,j=S.max,$=O.getNumericRefinement(s,">=")||[],_=rt($,1),x=_[0],E=O.getNumericRefinement(s,"<=")||[],D=rt(E,1),H=D[0],A=w===void 0||w==="",F=P===void 0||P==="",T=rs({min:A?void 0:parseFloat(w),max:F?void 0:parseFloat(P),precision:v}),I=T.min,C=T.max,N;!Z(c)&&R===I?N=void 0:Z(c)&&A?N=c:N=I;var L;!Z(l)&&j===C?L=void 0:Z(l)&&F?L=l:L=C;var U=N===void 0,z=Z(R)&&R<=N,M=U||Z(N)&&(!Z(R)||z),q=L===void 0,B=Z(L)&&j>=L,k=q||Z(L)&&(!Z(j)||B),ne=x!==N,ie=H!==L;return(ne||ie)&&M&&k?(O=O.removeNumericRefinement(s),Z(N)&&(O=O.addNumericRefinement(s,">=",N)),Z(L)&&(O=O.addNumericRefinement(s,"<=",L)),O.resetPage()):null},u=function(y){return function(){if(arguments.length===1){y.sendEventToInsights(arguments.length<=0?void 0:arguments[0]);return}}};function p(m){var y;Z(c)?y=c:Z(m.min)?y=m.min:y=0;var S;return Z(l)?S=l:Z(m.max)?S=m.max:S=0,rs({min:y,max:S,precision:v})}function g(m){var y=m.getNumericRefinement(s,">=")||[],S=rt(y,1),w=S[0],P=m.getNumericRefinement(s,"<=")||[],O=rt(P,1),R=O[0],j=Z(w)?w:-1/0,$=Z(R)?R:1/0;return[j,$]}function o(m,y){return function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[void 0,void 0],w=rt(S,2),P=w[0],O=w[1],R=f(m,y,P,O);R&&m.setState(R).search()}}return{$$type:Md,init:function(y){t(me(me({},this.getWidgetRenderState(y)),{},{instantSearchInstance:y.instantSearchInstance}),!0)},render:function(y){t(me(me({},this.getWidgetRenderState(y)),{},{instantSearchInstance:y.instantSearchInstance}),!1)},getRenderState:function(y,S){return me(me({},y),{},{range:me(me({},y.range),{},_r({},s,this.getWidgetRenderState(S)))})},getWidgetRenderState:function(y){var S=y.results,w=y.helper,P=y.instantSearchInstance,O=S&&S.disjunctiveFacets||[],R=qe(O,function(E){return E.name===s}),j=R&&R.stats||{min:void 0,max:void 0},$=p(j),_=g(w),x;return S?x=o(w,$):x=o(w,{min:void 0,max:void 0}),{refine:x,canRefine:$.min!==$.max,format:h,range:$,sendEvent:u(P),widgetParams:me
29(me({},n),{},{precision:v}),start:_}},dispose:function(y){var S=y.state;return r(),S.removeDisjunctiveFacet(s).removeNumericRefinement(s)},getWidgetUiState:function(y,S){var w=S.searchParameters,P=w.getNumericRefinements(s),O=P[">="],R=O===void 0?[]:O,j=P["<="],$=j===void 0?[]:j;return R.length===0&&$.length===0?y:me(me({},y),{},{range:me(me({},y.range),{},_r({},s,"".concat(R,":").concat($)))})},getWidgetSearchParameters:function(y,S){var w=S.uiState,P=y.addDisjunctiveFacet(s).setQueryParameters({numericRefinements:me(me({},y.numericRefinements),{},_r({},s,{}))});Z(c)&&(P=P.addNumericRefinement(s,">=",c)),Z(l)&&(P=P.addNumericRefinement(s,"<=",l));var O=w.range&&w.range[s];if(!O||O.indexOf(":")===-1)return P;var R=O.split(":").map(parseFloat),j=rt(R,2),$=j[0],_=j[1];return Z($)&&(!Z(c)||c<$)&&(P=P.removeNumericRefinement(s,">="),P=P.addNumericRefinement(s,">=",$)),Z(_)&&(!Z(l)||_<l)&&(P=P.removeNumericRefinement(s,"<="),P=P.addNumericRefinement(s,"<=",_)),P}}}};function Jt(e){"@babel/helpers - typeof";return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}var Ud=["name","escapedValue"],kd=["escapedValue","value"];function ns(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ns(Object(r),!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ns(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rt(e,t,r){return t=Qd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qd(e){var t=Vd(e,"string");return Jt(t)=="symbol"?t:String(t)}function Vd(e,t){if(Jt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function is(e,t){if(e==null)return{};var r=Bd(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bd(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Sr=re({name:"refinement-list",connector:!0}),as=["isRefined","count:desc","name:asc"],Kd=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Sr()),function(n){var i=n||{},a=i.attribute,s=i.operator,c=s===void 0?"or":s,l=i.limit,d=l===void 0?10:l,v=i.showMore,b=v===void 0?!1:v,h=i.showMoreLimit,f=h===void 0?20:h,u=i.sortBy,p=u===void 0?as:u,g=i.escapeFacetValues,o=g===void 0?!0:g,m=i.transformItems,y=m===void 0?function(F){return F}:m;if(!a)throw new Error(Sr("The `attribute` option is required."));if(!/^(and|or)$/.test(c))throw new Error(Sr('The `operator` must one of: `"and"`, `"or"` (got "'.concat(c,'").')));if(b===!0&&f<=d)throw new Error(Sr("`showMoreLimit` should be greater than `limit`."));var S=function(T){var I=T.name,C=T.escapedValue,N=is(T,Ud);return te(te({},N),{},{value:C,label:I,highlighted:I})},w,P=[],O=!0,R,j,$=!1,_=function(){};function x(){_()}function E(F,T){return function(){$=!$,T.render(F)}}function D(){return $?f:d}var H=function(){return function(){}},A=function(T,I){return function(C){return function(N){var L=C.instantSearchInstance,U=C.results;if(N===""&&P)t(te(te({},I.getWidgetRenderState(te(te({},C),{},{results:w}))),{},{instantSearchInstance:L}),!1);else{var z={highlightPreTag:o?Ce.highlightPreTag:ge.highlightPreTag,highlightPostTag:o?Ce.highlightPostTag:ge.highlightPostTag};T.searchForFacetValues(a,N,Math.min(D(),100),z).then(function(M){var q=o?Vc(M.facetHits):M.facetHits,B=y(q.map(function(k){var ne=k.escapedValue,ie=k.value,ae=is(k,kd);return te(te({},ae),{},{value:ne,label:ie})}),{results:U});t(te(te({},I.getWidgetRenderState(te(te({},C),{},{results:w}))),{},{items:B,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:L}),!1)})}}}};return{$$type:"ais.refinementList",init:function(T){t(te(te({},this.getWidgetRenderState(T)),{},{instantSearchInstance:T.instantSearchInstance}),!0)},render:function(T){t(te(te({},this.getWidgetRenderState(T)),{},{instantSearchInstance:T.instantSearchInstance}),!1)},getRenderState:function(T,I){return te(te({},T),{},{refinementList:te(te({},T.refinementList),{},Rt({},a,this.getWidgetRenderState(I)))})},getWidgetRenderState:function(T){var I=this,C=T.results,N=T.state,L=T.createURL,U=T.instantSearchInstance,z=T.helper,M=[],q=[];if((!j||!R||!H)&&(j=ai({instantSearchInstance:U,helper:z,attribute:a,widgetType:this.$$type}),R=function(pr){j("click:internal",pr),z.toggleFacetRefinement(a,pr).search()},H=A(z,this)),C){var B=C.getFacetValues(a,{sortBy:p,facetOrdering:p===as});q=B&&Array.isArray(B)?B:[],M=y(q.slice(0,D()).map(S),{results:C});var k=N.maxValuesPerFacet,ne=D();O=k>ne?q.length<=ne:q.length<ne,w=C,P=M,T.results&&(_=E(T,this))}var ie=H&&H(T),ae=$&&P.length>d,Ne=b&&!O,bu=ae||Ne;return{createURL:function(pr){return L(function(Ru){return I.getWidgetUiState(Ru,{searchParameters:N.resetPage().toggleFacetRefinement(a,pr),helper:z})})},items:M,refine:R,searchForItems:ie,isFromSearch:!1,canRefine:M.length>0,widgetParams:n,isShowingMore:$,canToggleShowMore:bu,toggleShowMore:x,sendEvent:j,hasExhaustiveItems:O}},dispose:function(T){var I=T.state;r();var C=I.setQueryParameter("maxValuesPerFacet",void 0);return c==="and"?C.removeFacet(a):C.removeDisjunctiveFacet(a)},getWidgetUiState:function(T,I){var C=I.searchParameters,N=c==="or"?C.getDisjunctiveRefinements(a):C.getConjunctiveRefinements(a);return zd(te(te({},T),{},{refinementList:te(te({},T.refinementList),{},Rt({},a,N))}),a)},getWidgetSearchParameters:function(T,I){var C=I.uiState,N=c==="or";
29if(T.isHierarchicalFacet(a)||N&&T.isConjunctiveFacet(a)||!N&&T.isDisjunctiveFacet(a))return T;var L=C.refinementList&&C.refinementList[a],U=N?T.addDisjunctiveFacet(a).removeDisjunctiveFacetRefinement(a):T.addFacet(a).removeFacetRefinement(a),z=U.maxValuesPerFacet||0,M=Math.max(z,b?f:d),q=U.setQueryParameter("maxValuesPerFacet",M);if(!L){var B=N?"disjunctiveFacetsRefinements":"facetsRefinements";return q.setQueryParameters(Rt({},B,te(te({},q[B]),{},Rt({},a,[]))))}return L.reduce(function(k,ne){return N?k.addDisjunctiveFacetRefinement(a,ne):k.addFacetRefinement(a,ne)},q)}}}};function zd(e,t){return e.refinementList&&((!e.refinementList[t]||e.refinementList[t].length===0)&&delete e.refinementList[t],Object.keys(e.refinementList).length===0&&delete e.refinementList),e}function Gt(e){"@babel/helpers - typeof";return Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(e)}function ss(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ss(Object(r),!0).forEach(function(n){Jd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ss(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jd(e,t,r){return t=Gd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gd(e){var t=Yd(e,"string");return Gt(t)=="symbol"?t:String(t)}function Yd(e,t){if(Gt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xd=re({name:"search-box",connector:!0}),Zd=function(t,r){return r(t)},em=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Xd()),function(n){var i=n||{},a=i.queryHook,s=a===void 0?Zd:a,c,l;return{$$type:"ais.searchBox",init:function(v){var b=v.instantSearchInstance;t(ke(ke({},this.getWidgetRenderState(v)),{},{instantSearchInstance:b}),!0)},render:function(v){var b=v.instantSearchInstance;t(ke(ke({},this.getWidgetRenderState(v)),{},{instantSearchInstance:b}),!1)},dispose:function(v){var b=v.state;return r(),b.setQueryParameter("query",void 0)},getRenderState:function(v,b){return ke(ke({},v),{},{searchBox:this.getWidgetRenderState(b)})},getWidgetRenderState:function(v){var b=v.helper,h=v.instantSearchInstance,f=v.state;return c||(c=function(p){s(p,function(g){return b.setQuery(g).search()})},l=function(){b.setQuery("").search()}),{query:f.query||"",refine:c,clear:l,widgetParams:n,isSearchStalled:h.status==="stalled"}},getWidgetUiState:function(v,b){var h=b.searchParameters,f=h.query||"";return f===""||v&&v.query===f?v:ke(ke({},v),{},{query:f})},getWidgetSearchParameters:function(v,b){var h=b.uiState;return v.setQueryParameter("query",h.query||"")}}}};function Yt(e){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(e)}function os(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?os(Object(r),!0).forEach(function(n){tm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):os(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tm(e,t,r){return t=rm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rm(e){var t=nm(e,"string");return Yt(t)=="symbol"?t:String(t)}function nm(e,t){if(Yt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var us=re({name:"sort-by",connector:!0}),im=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;oe(t,us());var n={};return function(i){var a=i||{},s=a.items,c=a.transformItems,l=c===void 0?function(d){return d}:c;if(!Array.isArray(s))throw new Error(us("The `items` option expects an array of objects."));return{$$type:"ais.sortBy",init:function(v){var b=v.instantSearchInstance,h=this.getWidgetRenderState(v),f=h.currentRefinement;qe(s,function(u){return u.value===f}),t(Qe(Qe({},h),{},{instantSearchInstance:b}),!0)},render:function(v){var b=v.instantSearchInstance;t(Qe(Qe({},this.getWidgetRenderState(v)),{},{instantSearchInstance:b}),!1)},dispose:function(v){var b=v.state;return r(),n.initialIndex?b.setIndex(n.initialIndex):b},getRenderState:function(v,b){return Qe(Qe({},v),{},{sortBy:this.getWidgetRenderState(b)})},getWidgetRenderState:function(v){var b=v.results,h=v.helper,f=v.state,u=v.parent;!n.initialIndex&&u&&(n.initialIndex=u.getIndexName()),n.setIndex||(n.setIndex=function(g){h.setIndex(g).search()});var p=b?b.nbHits===0:!0;return{currentRefinement:f.index,options:l(s,{results:b}),refine:n.setIndex,hasNoResults:p,canRefine:!p&&s.length>0,widgetParams:i}},getWidgetUiState:function(v,b){var h=b.searchParameters,f=h.index;return Qe(Qe({},v),{},{sortBy:f!==n.initialIndex?f:void 0})},getWidgetSearchParameters:function(v,b){var h=b.uiState;return v.setQueryParameter("index",h.sortBy||n.initialIndex||v.index)}}}};function Xt(e){"@babel/helpers - typeof";return Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(e)}function am(e){return um(e)||om(e)||Wo(e)||sm()}function sm(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 30In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function om(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function um(e){if(Array.isArray(e))return zn(e)}function cs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
30t%2?cs(Object(r),!0).forEach(function(n){xr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xr(e,t,r){return t=cm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cm(e){var t=fm(e,"string");return Xt(t)=="symbol"?t:String(t)}function fm(e,t){if(Xt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function No(e,t){return dm(e)||hm(e,t)||Wo(e,t)||lm()}function lm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 31In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wo(e,t){if(e){if(typeof e=="string")return zn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zn(e,t)}}function zn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function dm(e){if(Array.isArray(e))return e}var fs=re({name:"rating-menu",connector:!0}),Lo="ais.ratingMenu",Rr=1,mm=function(t){var r=t.instantSearchInstance,n=t.helper,i=t.getRefinedStar,a=t.attribute;return function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];if(c.length===1){r.sendEventToInsights(c[0]);return}var d=c[1],v=c[2],b=v===void 0?"Filter Applied":v,h=c[0].split(":"),f=No(h,2),u=f[0],p=f[1];if(u==="click"){var g=i()===Number(d);if(!g){var o;r.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Lo,eventType:u,eventModifier:p,payload:{eventName:b,index:((o=n.lastResults)===null||o===void 0?void 0:o.index)||n.state.index,filters:["".concat(a,">=").concat(d)]},attribute:a})}}}},gm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,fs()),function(n){var i=n||{},a=i.attribute,s=i.max,c=s===void 0?5:s,l;if(!a)throw new Error(fs("The `attribute` option is required."));var d=function(p){var g,o=p.getNumericRefinements(a);if((g=o[">="])!==null&&g!==void 0&&g.length)return o[">="][0]},v=function(p){var g=0;return p.forEach(function(o){var m=o.name.split("."),y=No(m,2),S=y[1],w=S===void 0?"":S;g=Math.max(g,w.length)}),g};function b(u,p){var g=d(u)===Number(p),o=u.resetPage().removeNumericRefinement(a);return g?o:o.addNumericRefinement(a,"<=",c).addNumericRefinement(a,">=",Number(p))}var h=function(p,g){l("click:internal",g),p.setState(b(p.state,g)).search()},f={toggleRefinementFactory:function(p){return h.bind(null,p)},createURLFactory:function(p){var g=p.state,o=p.createURL,m=p.getWidgetUiState,y=p.helper;return function(S){return o(function(w){return m(w,{searchParameters:b(g,S),helper:y})})}}};return{$$type:Lo,init:function(p){var g=p.instantSearchInstance;t(be(be({},this.getWidgetRenderState(p)),{},{instantSearchInstance:g}),!0)},render:function(p){var g=p.instantSearchInstance;t(be(be({},this.getWidgetRenderState(p)),{},{instantSearchInstance:g}),!1)},getRenderState:function(p,g){return be(be({},p),{},{ratingMenu:be(be({},p.ratingMenu),{},xr({},a,this.getWidgetRenderState(g)))})},getWidgetRenderState:function(p){var g=p.helper,o=p.results,m=p.state,y=p.instantSearchInstance,S=p.createURL,w=[];l||(l=mm({instantSearchInstance:y,helper:g,getRefinedStar:function(){return d(g.state)},attribute:a}));var P=!1,O=0,R=o?.getFacetValues(a,{});if(o&&R){R.length,v(R);for(var j=d(m),$=function(H){var A=j===H;P=P||A;var F=R.filter(function(I){return Number(I.name)>=H&&Number(I.name)<=c}).map(function(I){return I.count}).reduce(function(I,C){return I+C},0);if(O+=F,j&&!A&&F===0)return"continue";var T=am(new Array(Math.floor(c/Rr))).map(function(I,C){return C*Rr<H});w.push({stars:T,name:String(H),label:String(H),value:String(H),count:F,isRefined:A})},_=Rr;_<c;_+=Rr)var x=$(_)}w=w.reverse();var E=o?o.nbHits===0:!0;return{items:w,hasNoResults:E,canRefine:(!E||P)&&O>0,refine:f.toggleRefinementFactory(g),sendEvent:l,createURL:f.createURLFactory({state:m,createURL:S,helper:g,getWidgetUiState:this.getWidgetUiState}),widgetParams:n}},dispose:function(p){var g=p.state;return r(),g.removeNumericRefinement(a)},getWidgetUiState:function(p,g){var o=g.searchParameters,m=d(o);return pm(be(be({},p),{},{ratingMenu:be(be({},p.ratingMenu),{},xr({},a,typeof m=="number"?m:void 0))}),a)},getWidgetSearchParameters:function(p,g){var o=g.uiState,m=o.ratingMenu&&o.ratingMenu[a],y=p.addDisjunctiveFacet(a).removeNumericRefinement(a).removeDisjunctiveFacetRefinement(a);return m?y.addNumericRefinement(a,"<=",c).addNumericRefinement(a,">=",m):y.setQueryParameters({numericRefinements:be(be({},y.numericRefinements),{},xr({},a,{}))})}}}};function pm(e,t){return e.ratingMenu&&(typeof e.ratingMenu[t]!="number"&&delete e.ratingMenu[t],Object.keys(e.ratingMenu).length===0&&delete e.ratingMenu),e}function Zt(e){"@babel/helpers - typeof";return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(e)}function ls(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
31t%2?ls(Object(r),!0).forEach(function(n){vm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ls(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vm(e,t,r){return t=ym(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ym(e){var t=bm(e,"string");return Zt(t)=="symbol"?t:String(t)}function bm(e,t){if(Zt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sm=re({name:"stats",connector:!0}),Rm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Sm()),function(n){return{$$type:"ais.stats",init:function(a){var s=a.instantSearchInstance;t(nt(nt({},this.getWidgetRenderState(a)),{},{instantSearchInstance:s}),!0)},render:function(a){var s=a.instantSearchInstance;t(nt(nt({},this.getWidgetRenderState(a)),{},{instantSearchInstance:s}),!1)},dispose:function(){r()},getRenderState:function(a,s){return nt(nt({},a),{},{stats:this.getWidgetRenderState(s)})},getWidgetRenderState:function(a){var s=a.results,c=a.state;return s?{hitsPerPage:s.hitsPerPage,nbHits:s.nbHits,nbSortedHits:s.nbSortedHits,areHitsSorted:typeof s.appliedRelevancyStrictness<"u"&&s.appliedRelevancyStrictness>0&&s.nbSortedHits!==s.nbHits,nbPages:s.nbPages,page:s.page,processingTimeMS:s.processingTimeMS,query:s.query,widgetParams:n}:{hitsPerPage:c.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:c.page||0,processingTimeMS:-1,query:c.query||"",widgetParams:n}}}}};function er(e){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(e)}function hs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hs(Object(r),!0).forEach(function(n){Fr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fr(e,t,r){return t=wm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wm(e){var t=Pm(e,"string");return er(t)=="symbol"?t:String(t)}function Pm(e,t){if(er(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(er(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Om(e,t){return xm(e)||_m(e,t)||$m(e,t)||jm()}function jm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 32In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $m(e,t){if(e){if(typeof e=="string")return ds(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ds(e,t)}}function ds(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _m(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function xm(e){if(Array.isArray(e))return e}var ms=re({name:"toggle-refinement",connector:!0}),Mo="ais.toggleRefinement",Fm=function(t){var r=t.instantSearchInstance,n=t.helper,i=t.attribute,a=t.on,s=function(){for(var l=arguments.length,d=new Array(l),v=0;v<l;v++)d[v]=arguments[v];if(d.length===1){r.sendEventToInsights(d[0]);return}var b=d[1],h=d[2],f=h===void 0?"Filter Applied":h,u=d[0].split(":"),p=Om(u,2),g=p[0],o=p[1];if(!(g!=="click"||a===void 0)&&!b){var m;r.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Mo,eventType:g,eventModifier:o,payload:{eventName:f,index:((m=n.lastResults)===null||m===void 0?void 0:m.index)||n.state.index,filters:a.map(function(y){return"".concat(i,":").concat(y)})},attribute:i})}};return s},Im=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,ms()),function(n){var i=n||{},a=i.attribute,s=i.on,c=s===void 0?!0:s,l=i.off;if(!a)throw new Error(ms("The `attribute` option is required."));var d=l!==void 0,v=Qr(c).map(yt),b=d?Qr(l).map(yt):void 0,h,f=function(g){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{isRefined:!1},m=o.isRefined;m?(v.forEach(function(y){return g.removeDisjunctiveFacetRefinement(a,y)}),d&&b.forEach(function(y){return g.addDisjunctiveFacetRefinement(a,y)})):(h("click:internal",m),d&&b.forEach(function(y){return g.removeDisjunctiveFacetRefinement(a,y)}),v.forEach(function(y){return g.addDisjunctiveFacetRefinement(a,y)})),g.search()}},u={createURLFactory:function(g,o){var m=o.state,y=o.createURL,S=o.getWidgetUiState,w=o.helper;return function(){m=m.resetPage();var P=g?v:b;P&&P.forEach(function(R){m=m.removeDisjunctiveFacetRefinement(a,R)});var O=g?b:v;return O&&O.forEach(function(R){m=m.addDisjunctiveFacetRefinement(a,R)}),y(function(R){return S(R,{searchParameters:m,helper:w})})}}};return{$$type:Mo,init:function(g){var o=g.instantSearchInstance;t(Se(Se({},this.getWidgetRenderState(g)),{},{instantSearchInstance:o}),!0)},render:function(g){var o=g.instantSearchInstance;t(Se(Se({},this.getWidgetRenderState(g)),{},{instantSearchInstance:o}),!1)},dispose:function(g){var o=g.state;return r(),o.removeDisjunctiveFacet(a)},getRenderState:function(g,o){return Se(Se({},g),{},{toggleRefinement:Se(Se({},g.toggleRefinement),{},Fr({},a,this.getWidgetRenderState(o)))})},getWidgetRenderState:function(g){var o=g.state,m=g.helper,y=g.results,S=g.createURL,w=g.instantSearchInstance,P=y?v.every(function(D){return o.isDisjunctiveFacetRefined(a,D)}):v.every(function(D){return o.isDisjunctiveFacetRefined(a,D)}),O={isRefined:P,count:0},R={isRefined:d&&!P,count:0};if(y){var j=Qr(b||!1),$=y.getFacetValues(a,{})||[],_=v.map(function(D){return qe($,function(H){var A=H.escapedValue;return A===yt(String(D))})}).filter(function(D){return D!==void 0}),x=d?j.map(function(D){return qe($,function(H){var A=H.escapedValue;return A===yt(String(D))})}).filter(function(D){return D!==void 0}):[];
32O={isRefined:_.length?_.every(function(D){return D.isRefined}):!1,count:_.reduce(function(D,H){return D+H.count},0)||null},R={isRefined:x.length?x.every(function(D){return D.isRefined}):!1,count:x.reduce(function(D,H){return D+H.count},0)||$.reduce(function(D,H){var A=H.count;return D+A},0)}}h||(h=Fm({instantSearchInstance:w,attribute:a,on:v,helper:m}));var E=P?R:O;return{value:{name:a,isRefined:P,count:y?E.count:null,onFacetValue:O,offFacetValue:R},createURL:u.createURLFactory(P,{state:o,createURL:S,helper:m,getWidgetUiState:this.getWidgetUiState}),sendEvent:h,canRefine:!!(y&&E.count),refine:f(m),widgetParams:n}},getWidgetUiState:function(g,o){var m=o.searchParameters,y=v&&v.every(function(w){return m.isDisjunctiveFacetRefined(a,w)});if(!y){var S;return(S=g.toggle)===null||S===void 0||delete S[a],g}return Se(Se({},g),{},{toggle:Se(Se({},g.toggle),{},Fr({},a,y))})},getWidgetSearchParameters:function(g,o){var m=o.uiState;if(g.isHierarchicalFacet(a)||g.isConjunctiveFacet(a))return g;var y=g.addDisjunctiveFacet(a).removeDisjunctiveFacetRefinement(a),S=!!(m.toggle&&m.toggle[a]);return S?(v&&v.forEach(function(w){y=y.addDisjunctiveFacetRefinement(a,w)}),y):d?(b&&b.forEach(function(w){y=y.addDisjunctiveFacetRefinement(a,w)}),y):y.setQueryParameters({disjunctiveFacetsRefinements:Se(Se({},g.disjunctiveFacetsRefinements),{},Fr({},a,[]))})}}}};function tr(e){"@babel/helpers - typeof";return tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tr(e)}function gs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gs(Object(r),!0).forEach(function(n){Ir(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ir(e,t,r){return t=Em(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Em(e){var t=Tm(e,"string");return tr(t)=="symbol"?t:String(t)}function Tm(e,t){if(tr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Am(e,t){return Nm(e)||Hm(e,t)||Cm(e,t)||Dm()}function Dm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 33In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cm(e,t){if(e){if(typeof e=="string")return ps(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ps(e,t)}}function ps(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Hm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function Nm(e){if(Array.isArray(e))return e}var vs=re({name:"breadcrumb",connector:!0}),Wm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;oe(t,vs());var n={};return function(i){var a=i||{},s=a.attributes,c=a.separator,l=c===void 0?" > ":c,d=a.rootPath,v=d===void 0?null:d,b=a.transformItems,h=b===void 0?function(g){return g}:b;if(!s||!Array.isArray(s)||s.length===0)throw new Error(vs("The `attributes` option expects an array of strings."));var f=Am(s,1),u=f[0];function p(g,o){if(!o){var m=g.getHierarchicalFacetBreadcrumb(u);return m.length===0?g:g.resetPage().toggleFacetRefinement(u,m[0])}return g.resetPage().toggleFacetRefinement(u,o)}return{$$type:"ais.breadcrumb",init:function(o){t(Re(Re({},this.getWidgetRenderState(o)),{},{instantSearchInstance:o.instantSearchInstance}),!0)},render:function(o){t(Re(Re({},this.getWidgetRenderState(o)),{},{instantSearchInstance:o.instantSearchInstance}),!1)},dispose:function(){r()},getRenderState:function(o,m){return Re(Re({},o),{},{breadcrumb:Re(Re({},o.breadcrumb),{},Ir({},u,this.getWidgetRenderState(m)))})},getWidgetRenderState:function(o){var m=this,y=o.helper,S=o.createURL,w=o.results,P=o.state;function O(){if(!w||P.hierarchicalFacets.length===0)return[];var j=w.getFacetValues(u,{}),$=j&&!Array.isArray(j)&&j.data?j.data:[],_=h(Lm(qo($)),{results:w});return _}var R=O();return n.createURL||(n.createURL=function(j){return S(function($){return m.getWidgetUiState($,{searchParameters:p(y.state,j),helper:y})})}),n.refine||(n.refine=function(j){y.setState(p(y.state,j)).search()}
33),{canRefine:R.length>0,createURL:n.createURL,items:R,refine:n.refine,widgetParams:i}},getWidgetUiState:function(o,m){var y=m.searchParameters,S=y.getHierarchicalFacetBreadcrumb(u);return Mm(Re(Re({},o),{},{hierarchicalMenu:Re(Re({},o.hierarchicalMenu),{},Ir({},u,S))}),u)},getWidgetSearchParameters:function(o,m){var y=m.uiState,S=y.hierarchicalMenu&&y.hierarchicalMenu[u];if(o.isConjunctiveFacet(u)||o.isDisjunctiveFacet(u))return o;o.isHierarchicalFacet(u)&&o.getHierarchicalFacetByName(u);var w=o.removeHierarchicalFacet(u).addHierarchicalFacet({name:u,attributes:s,separator:l,rootPath:v});return S?w.addHierarchicalFacetRefinement(u,S.join(l)):w.setQueryParameters({hierarchicalFacetsRefinements:Re(Re({},w.hierarchicalFacetsRefinements),{},Ir({},u,[]))})}}}};function qo(e){return e.reduce(function(t,r){return r.isRefined&&(t.push({label:r.name,value:r.escapedValue}),Array.isArray(r.data)&&(t=t.concat(qo(r.data)))),t},[])}function Lm(e){return e.map(function(t,r){return{label:t.label,value:r+1===e.length?null:e[r+1].value}})}function Mm(e,t){return e.hierarchicalMenu&&((!e.hierarchicalMenu[t]||!e.hierarchicalMenu[t].length)&&delete e.hierarchicalMenu[t],Object.keys(e.hierarchicalMenu).length===0&&delete e.hierarchicalMenu),e}function rr(e){"@babel/helpers - typeof";return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rr(e)}function ys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ys(Object(r),!0).forEach(function(n){Uo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ys(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uo(e,t,r){return t=qm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qm(e){var t=Um(e,"string");return rr(t)=="symbol"?t:String(t)}function Um(e,t){if(rr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var km=re({name:"autocomplete",connector:!0}),Qm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,km()),function(n){var i=n||{},a=i.escapeHTML,s=a===void 0?!0:a,c={};return{$$type:"ais.autocomplete",init:function(d){var v=d.instantSearchInstance;t($e($e({},this.getWidgetRenderState(d)),{},{instantSearchInstance:v}),!0)},render:function(d){var v=d.instantSearchInstance,b=this.getWidgetRenderState(d);b.indices.forEach(function(h){var f=h.sendEvent,u=h.hits;f("view:internal",u)}),t($e($e({},b),{},{instantSearchInstance:v}),!1)},getRenderState:function(d,v){return $e($e({},d),{},{autocomplete:this.getWidgetRenderState(v)})},getWidgetRenderState:function(d){var v=this,b=d.helper,h=d.state,f=d.scopedResults,u=d.instantSearchInstance;c.refine||(c.refine=function(g){b.setQuery(g).search()});var p=f.map(function(g){var o,m;g.results&&(g.results.hits=s?ii(g.results.hits):g.results.hits);var y=si({instantSearchInstance:u,helper:g.helper,widgetType:v.$$type});return{indexId:g.indexId,indexName:((o=g.results)===null||o===void 0?void 0:o.index)||"",hits:((m=g.results)===null||m===void 0?void 0:m.hits)||[],results:g.results||{},sendEvent:y}});return{currentRefinement:h.query||"",indices:p,refine:c.refine,widgetParams:n}},getWidgetUiState:function(d,v){var b=v.searchParameters,h=b.query||"";return h===""||d&&d.query===h?d:$e($e({},d),{},{query:h})},getWidgetSearchParameters:function(d,v){var b=v.uiState,h={query:b.query||""};return s?d.setQueryParameters($e($e({},h),Ce)):d.setQueryParameters(h)},dispose:function(d){var v=d.state;r();var b=v.setQueryParameter("query",void 0);return s?b.setQueryParameters(Object.keys(Ce).reduce(function(h,f){return $e($e({},h),{},Uo({},f,void 0))},{})):b}}}};function nr(e){"@babel/helpers - typeof";return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nr(e)}function bs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
33t%2?bs(Object(r),!0).forEach(function(n){Vm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vm(e,t,r){return t=Bm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bm(e){var t=Km(e,"string");return nr(t)=="symbol"?t:String(t)}function Km(e,t){if(nr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dr(e){return Ym(e)||Gm(e)||Jm(e)||zm()}function zm(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 34In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jm(e,t){if(e){if(typeof e=="string")return Jn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jn(e,t)}}function Gm(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ym(e){if(Array.isArray(e))return Jn(e)}function Jn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ss=re({name:"query-rules",connector:!0});function Xm(e){return[e.disjunctiveFacetsRefinements,e.facetsRefinements,e.hierarchicalFacetsRefinements,e.numericRefinements].some(function(t){return!!(t&&Object.keys(t).length>0)})}function Zm(e){return e.replace(/[^a-z0-9-_]+/gi,"_")}function eg(e){var t=e.helper,r=e.sharedHelperState,n=e.trackedFilters,i=Object.keys(n).reduce(function(a,s){var c=ui(t.lastResults||{},r,!0).filter(function(v){return v.attribute===s}).map(function(v){return v.numericValue||v.name}),l=n[s],d=l(c);return[].concat(Dr(a),Dr(c.filter(function(v){return d.includes(v)}).map(function(v){return Zm("ais-".concat(s,"-").concat(v))})))},[]);return i}function tg(e){var t=this.helper,r=this.initialRuleContexts,n=this.trackedFilters,i=this.transformRuleContexts,a=e.state,s=a.ruleContexts||[],c=eg({helper:t,sharedHelperState:a,trackedFilters:n}),l=[].concat(Dr(r),Dr(c)),d=i(l).slice(0,10);mr(s,d)||t.overrideStateWithoutTriggeringChangeEvent(Be(Be({},a),{},{ruleContexts:d}))}var ko=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,Ss()),function(n){var i=n||{},a=i.trackedFilters,s=a===void 0?{}:a,c=i.transformRuleContexts,l=c===void 0?function(u){return u}:c,d=i.transformItems,v=d===void 0?function(u){return u}:d;Object.keys(s).forEach(function(u){if(typeof s[u]!="function")throw new Error(Ss(`'The "`.concat(u,'" filter value in the `trackedFilters` option expects a function.')))});var b=Object.keys(s).length>0,h=[],f;return{$$type:"ais.queryRules",init:function(p){var g=p.helper,o=p.state,m=p.instantSearchInstance;h=o.ruleContexts||[],f=tg.bind({helper:g,initialRuleContexts:h,trackedFilters:s,transformRuleContexts:l}),b&&((Xm(o)||n.transformRuleContexts)&&f({state:o}),g.on("change",f)),t(Be(Be({},this.getWidgetRenderState(p)),{},{instantSearchInstance:m}),!0)},render:function(p){var g=p.instantSearchInstance;t(Be(Be({},this.getWidgetRenderState(p)),{},{instantSearchInstance:g}),!1)},getWidgetRenderState:function(p){var g=p.results,o=g||{},m=o.userData,y=m===void 0?[]:m,S=v(y,{results:g});return{items:S,widgetParams:n}},getRenderState:function(p,g){return Be(Be({},p),{},{queryRules:this.getWidgetRenderState(g)})},dispose:function(p){var g=p.helper,o=p.state;return r(),b?(g.removeListener("change",f),o.setQueryParameter("ruleContexts",h)):o}}}};function ir(e){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ir(e)}function Rs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ws(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
34t%2?Rs(Object(r),!0).forEach(function(n){rg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rg(e,t,r){return t=ng(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ng(e){var t=ig(e,"string");return ir(t)=="symbol"?t:String(t)}function ig(e,t){if(ir(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ir(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ag=function(t){var r=t.searchAsYouSpeak,n=t.language,i=t.onQueryChange,a=t.onStateChange,s=window.webkitSpeechRecognition||window.SpeechRecognition,c=function(O){return{status:O,transcript:"",isSpeechFinal:!1,errorCode:void 0}},l=c("initial"),d,v=function(){return!!s},b=function(){return l.status==="askingPermission"||l.status==="waiting"||l.status==="recognizing"},h=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};l=ws(ws({},l),O),a()},f=function(){return l},u=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";h(c(O))},p=function(){h({status:"waiting"})},g=function(O){h({status:"error",errorCode:O.error})},o=function(O){h({status:"recognizing",transcript:O.results[0]&&O.results[0][0]&&O.results[0][0].transcript||"",isSpeechFinal:O.results[0]&&O.results[0].isFinal}),r&&l.transcript&&i(l.transcript)},m=function(){!l.errorCode&&l.transcript&&!r&&i(l.transcript),l.status!=="error"&&h({status:"finished"})},y=function(){d=new s,d&&(u("askingPermission"),d.interimResults=!0,n&&(d.lang=n),d.addEventListener("start",p),d.addEventListener("error",g),d.addEventListener("result",o),d.addEventListener("end",m),d.start())},S=function(){d&&(d.stop(),d.removeEventListener("start",p),d.removeEventListener("error",g),d.removeEventListener("result",o),d.removeEventListener("end",m),d=void 0)},w=function(){S(),u("finished")};return{getState:f,isBrowserSupported:v,isListening:b,startListening:y,stopListening:w,dispose:S}};function ar(e){"@babel/helpers - typeof";return ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ar(e)}function Ps(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ps(Object(r),!0).forEach(function(n){sg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ps(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sg(e,t,r){return t=og(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function og(e){var t=ug(e,"string");return ar(t)=="symbol"?t:String(t)}function ug(e,t){if(ar(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ar(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cg=re({name:"voice-search",connector:!0}),fg=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return oe(t,cg()),function(n){var i=n.searchAsYouSpeak,a=i===void 0?!1:i,s=n.language,c=n.additionalQueryParameters,l=n.createVoiceSearchHelper,d=l===void 0?ag:l;return{$$type:"ais.voiceSearch",init:function(b){var h=b.instantSearchInstance;t(_e(_e({},this.getWidgetRenderState(b)),{},{instantSearchInstance:h}),!0)},render:function(b){var h=b.instantSearchInstance;t(_e(_e({},this.getWidgetRenderState(b)),{},{instantSearchInstance:h}),!1)},getRenderState:function(b,h){return _e(_e({},b),{},{voiceSearch:this.getWidgetRenderState(h)})},getWidgetRenderState:function(b){var h=this,f=b.helper,u=b.instantSearchInstance;this._refine||(this._refine=function(w){if(w!==f.state.query){var P=s?[s.split("-")[0]]:void 0;f.setQueryParameter("queryLanguages",P),typeof c=="function"&&f.setState(f.state.setQueryParameters(_e({ignorePlurals:!0,removeStopWords:!0,optionalWords:w},c({query:w})))),f.setQuery(w).search()}}),this._voiceSearchHelper||(this._voiceSearchHelper=d({searchAsYouSpeak:a,language:s,onQueryChange:function(P){return h._refine(P)},onStateChange:function(){t(_e(_e({},h.getWidgetRenderState(b)),{},{instantSearchInstance:u}),!1)}}));var p=this._voiceSearchHelper,g=p.isBrowserSupported,o=p.isListening,m=p.startListening,y=p.stopListening,S=p.getState;return{isBrowserSupported:g(),isListening:o(),toggleListening:function(){g()&&(o()?y():m())},voiceListeningState:S(),widgetParams:n}},dispose:function(b){var h=b.state;
34this._voiceSearchHelper.dispose(),r();var f=h;if(typeof c=="function"){var u=c({query:""}),p=u?Object.keys(u).reduce(function(g,o){return g[o]=void 0,g},{}):{};f=h.setQueryParameters(_e({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},p))}return f.setQueryParameter("query",void 0)},getWidgetUiState:function(b,h){var f=h.searchParameters,u=f.query||"";return u?_e(_e({},b),{},{query:u}):b},getWidgetSearchParameters:function(b,h){var f=h.uiState;return b.setQueryParameter("query",f.query||"")}}}};function sr(e){"@babel/helpers - typeof";return sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(e)}function Os(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Os(Object(r),!0).forEach(function(n){lg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Os(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lg(e,t,r){return t=hg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hg(e){var t=dg(e,"string");return sr(t)=="symbol"?t:String(t)}function dg(e,t){if(sr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mg=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K;return function(n){var i={};return{$$type:"ais.relevantSort",init:function(s){var c=s.instantSearchInstance;t(Ve(Ve({},this.getWidgetRenderState(s)),{},{instantSearchInstance:c}),!0)},render:function(s){var c=s.instantSearchInstance;t(Ve(Ve({},this.getWidgetRenderState(s)),{},{instantSearchInstance:c}),!1)},dispose:function(s){var c=s.state;return r(),c.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(s,c){return Ve(Ve({},s),{},{relevantSort:this.getWidgetRenderState(c)})},getWidgetRenderState:function(s){var c=s.results,l=s.helper;i.refine||(i.refine=function(h){l.setQueryParameter("relevancyStrictness",h).search()});var d=c||{},v=d.appliedRelevancyStrictness,b=v!==void 0;return{isRelevantSorted:typeof v<"u"&&v>0,isVirtualReplica:b,canRefine:b,refine:i.refine,widgetParams:n}},getWidgetSearchParameters:function(s,c){var l,d=c.uiState;return s.setQueryParameter("relevancyStrictness",(l=d.relevantSort)!==null&&l!==void 0?l:s.relevancyStrictness)},getWidgetUiState:function(s,c){var l=c.searchParameters;return Ve(Ve({},s),{},{relevantSort:l.relevancyStrictness||s.relevantSort})}}}},gg=lt(Cl);ee({connector:Qm},{$$widgetType:"ais.autocomplete"}),Y({name:"Autocomplete"});W("p",null," This widget doesn't render anything without a filled in default slot. ",-1);W("p",null,"query, function to refine and results are provided.",-1);W("pre",null,"refine: Function",-1);W("summary",null,[W("code",null,"indices"),Pt(":")],-1);function pg(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n&&n.push(r)||e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&n.splice(n.indexOf(r)>>>0,1)},emit:function(t,r){(e.get(t)||[]).slice().map(function(n){n(r)}),(e.get("*")||[]).slice().map(function(n){n(t,r)})}}}var vg=function(){var e;return(e={props:{emitter:{type:Object,required:!1,default:function(){return pg()}}},provide:function(){var t;return(t={}).instantSearchPanelEmitter=this.emitter,t},data:function(){return{canRefine:!0}},created:function(){var t=this;this.emitter.on("PANEL_CHANGE_EVENT",function(r){t.updateCanRefine(r)})}}).beforeUnmount=function(){this.emitter.all.clear()},e.methods={updateCanRefine:function(t){this.canRefine=t}},e},Pe=function(e){e===void 0&&(e={});
34var t=e.mapStateToCanRefine;return t===void 0&&(t=function(r){return!!r.canRefine}),{inject:{emitter:{from:"instantSearchPanelEmitter",default:function(){return{emit:function(){}}}}},data:function(){return{state:null,hasAlreadyEmitted:!1}},watch:{state:{immediate:!0,handler:function(r,n){if(r){var i=t(n||{}),a=t(r);this.hasAlreadyEmitted&&i===a||(this.emitter.emit("PANEL_CHANGE_EVENT",a),this.hasAlreadyEmitted=!0)}}}}}};ee({connector:Wm},{$$widgetType:"ais.breadcrumb"}),Pe(),Y({name:"Breadcrumb"});ee({connector:zl},{$$widgetType:"ais.clearRefinements"}),Pe(),Y({name:"ClearRefinements"});const yg={inheritAttrs:!1,name:"AisConfigure",mixins:[Y({name:"Configure"}),ee({connector:jo},{$$widgetType:"ais.configure"})],computed:{widgetParams:function(){return{searchParameters:Object.assign({},this.$attrs)}}},render:dr(function(e){var t=this.$slots.default;return this.state&&t?e("div",{class:this.suit()},[t({refine:this.state.refine,searchParameters:this.state.widgetParams.searchParameters})]):null})};ee({connector:gg},{$$widgetType:"ais.configureRelatedItems"});Y({name:"CurrentRefinements"}),ee({connector:ih},{$$widgetType:"ais.currentRefinements"}),Pe();Y({name:"HierarchicalMenu"}),ee({connector:yh},{$$widgetType:"ais.hierarchicalMenu"}),Pe();function Cr(){return Cr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cr.apply(null,arguments)}function bg(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Qo(e,t){if(e==null)return{};var r,n,i=bg(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function De(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(n,i){return Array.isArray(i)?n.concat(i):n.concat([i])},[]).filter(Boolean).join(" ")}var Sg=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];function Rg(e){var t=e.createElement;return function(n){var i=n.classNames,a=n.children,s=n.highlightedTagName,c=n.isHighlighted,l=n.nonHighlightedTagName,d=c?s:l;return t(d,{className:c?i.highlighted:i.nonHighlighted},a)}}function wg(e){var t=e.createElement,r=e.Fragment,n=Rg({createElement:t});return function(a){var s=a.parts,c=a.highlightedTagName,l=c===void 0?"mark":c,d=a.nonHighlightedTagName,v=d===void 0?"span":d,b=a.separator,h=b===void 0?", ":b,f=a.className,u=a.classNames,p=u===void 0?{}:u,g=Qo(a,Sg);return t("span",Cr({},g,{className:De(p.root,f)}),s.map(function(o,m){var y=m===s.length-1;return t(r,{key:m},o.map(function(S,w){return t(n,{key:w,classNames:p,highlightedTagName:l,nonHighlightedTagName:v,isHighlighted:S.isHighlighted},S.value)}),!y&&t("span",{className:p.separator},h))}))}}var Pg=["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"];function Og(e){var t=e.createElement;return function(n){var i=n.classNames,a=n.banner;return a.image.urls[0].url?t("aside",{className:De("ais-Hits-banner",i.bannerRoot)},a.link?t("a",{className:De("ais-Hits-banner-link",i.bannerLink),href:a.link.url,target:a.link.target},t("img",{className:De("ais-Hits-banner-image",i.bannerImage),src:a.image.urls[0].url,alt:a.image.title})):t("img",{className:De("ais-Hits-banner-image",i.bannerImage),src:a.image.urls[0].url,alt:a.image.title})):null}}function jg(e){var t=e.createElement,r=Og({createElement:t});return function(i){var a=i.classNames,s=a===void 0?{}:a,c=i.hits,l=i.itemComponent,d=i.sendEvent,v=i.emptyComponent,b=i.banner,h=i.bannerComponent,f=Qo(i,Pg);return t("div",Cr({},f,{className:De("ais-Hits",s.root,c.length===0&&De("ais-Hits--empty",s.emptyRoot),f.className)}),b&&(h?t(h,{className:De("ais-Hits-banner",s.bannerRoot),banner:b}):t(r,{classNames:s,banner:b})),c.length===0&&v?t(v,null):t("ol",{className:De("ais-Hits-list",s.list)},c.map(function(u,p){return t(l,{key:u.objectID,hit:u,index:p,className:De("ais-Hits-item",s.item),onClick:function(){d("click:internal",u,"Hit Clicked")},onAuxClick:function(){d("click:internal",u,"Hit Clicked")}})})))}}var Vo=function(e,t,r){if(!r)return wt(e,t);if(e===Xe)return wt(e,Array.isArray(r)?r:[r]);var n=typeof r=="string"?{default:function(){return r}}:r,i=typeof e=="string"?t:Object.assign(t,{children:r});return wt(e,i,n)},$g=wg({createElement:Vo,Fragment:Xe});const Bo={name:"AisHighlighter",props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"},suit:{type:Function,required:!0},highlightProperty:{type:String,required:!0},preTag:{type:String,required:!0},postTag:{type:String,required:!0}},render:function(){var e=ht(this.hit[this.highlightProperty],this.attribute)||[],t=(Array.isArray(e)?e:[e]).map(function(r){return oi(ro(r.value||"")).map(function(n){var i=n.value;return{value:i===" "?" ":i,isHighlighted:n.isHighlighted}})});return Vo($g,{classNames:{root:this.suit(),highlighted:this.suit("highlighted")},highlightedTagName:this.highlightedTagName,nonHighlightedTagName:Xe,parts:t})}}
34,pi={name:"AisHighlight",mixins:[Y({name:"Highlight"})],components:{AisHighlighter:Bo},props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"}}};function _g(e,t,r,n,i,a){var s=$t("ais-highlighter");return V(),Ot(s,{hit:r.hit,attribute:r.attribute,"highlighted-tag-name":r.highlightedTagName,suit:e.suit,"highlight-property":"_highlightResult","pre-tag":"<mark>","post-tag":"</mark>"},null,8,["hit","attribute","highlighted-tag-name","suit"])}pi.render=_g;const xg={name:"AisHits",mixins:[ee({connector:Ah},{$$widgetType:"ais.hits"}),Y({name:"Hits"})],props:{showBanner:{type:Boolean,default:!0},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{showBanner:this.showBanner,escapeHTML:this.escapeHTML,transformItems:this.transformItems}}},render:dr(function(e){var t=this;if(!this.state)return null;var r=Mr(this,"default"),n=Mr(this,"item"),i=Mr(this,"banner");return n||i||!r?e(jg({createElement:e}),{hits:this.state.items,itemComponent:function(a){var s=a.hit,c=a.index,l=a.onClick,d=a.onAuxClick,v=(a.key,(function(b,h){var f={};for(var u in b)Object.prototype.hasOwnProperty.call(b,u)&&h.indexOf(u)===-1&&(f[u]=b[u]);return f})(a,["hit","index","onClick","onAuxClick","key"]));return e("li",{key:s.objectID,attrs:v,on:{click:l,auxclick:d}},[n&&n({item:s,index:c,insights:t.state.insights,sendEvent:t.state.sendEvent})||"objectID: "+s.objectID+", index: "+c])},banner:this.showBanner?this.state.banner:void 0,bannerComponent:i,sendEvent:this.state.sendEvent,classNames:this.classNames&&{root:this.classNames["ais-Hits"],list:this.classNames["ais-Hits-list"],item:this.classNames["ais-Hits-item"],bannerRoot:this.classNames["ais-Hits-banner"],bannerImage:this.classNames["ais-Hits-banner-image"],bannerLink:this.classNames["ais-Hits-banner-link"]}}):e("div",{attrs:{class:this.suit()}},[r({banner:this.state.banner,items:this.state.items,insights:this.state.insights,sendEvent:this.state.sendEvent})])})};Y({name:"HitsPerPage"}),ee({connector:Uh},{$$widgetType:"ais.hitsPerPage"}),Pe();function or(e){"@babel/helpers - typeof";return or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(e)}var Fg=["initialSearchParameters"],Ig=["initialRecommendParameters"];function js(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?js(Object(r),!0).forEach(function(n){at(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):js(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function at(e,t,r){return t=Eg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eg(e){var t=Tg(e,"string");return or(t)=="symbol"?t:String(t)}function Tg(e,t){if(or(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(or(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ko(e){return Hg(e)||Cg(e)||Dg(e)||Ag()}function Ag(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 35In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dg(e,t){if(e){if(typeof e=="string")return Gn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gn(e,t)}}function Cg(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hg(e){if(Array.isArray(e))return Gn(e)}function Gn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zo(e,t){if(e==null)return{};var r=Ng(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ng(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var gt=re({name:"index-widget"});function Jo(e,t){var r=t.state,n=t.recommendState,i=t.isPageReset,a=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:a})),n!==e.recommendState&&(e.recommendState=n)}function pt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.reduce(function(n,i){return Oe(i)||!i.getWidgetUiState&&!i.getWidgetState?n:i.getWidgetUiState?i.getWidgetUiState(n,t):i.getWidgetState(n,t)},r)}function vt(e,t){var r=t.initialSearchParameters,n=zo(t,Fg);return e.reduce(function(i,a){return!a.getWidgetSearchParameters||Oe(a)?i:a.dependsOn==="search"&&a.getWidgetParameters?a.getWidgetParameters(i,n):a.getWidgetSearchParameters(i,n)},r)}function $s(e,t){var r=t.initialRecommendParameters,n=zo(t,Ig);return e.reduce(function(i,a){return!Oe(a)&&a.dependsOn==="recommend"&&a.getWidgetParameters?a.getWidgetParameters(i,n):i},r)}function Go(e){var t=e.filter(Oe);t.length!==0&&t.forEach(function(r){var n=r.getHelper();Jo(n,{state:n.state.resetPage(),recommendState:n.recommendState,isPageReset:!0}
35),Go(r.getWidgets())})}function Yo(e){var t=e.filter(Oe);return t.reduce(function(r,n){return r.concat.apply(r,[{indexId:n.getIndexId(),results:n.getResults(),helper:n.getHelper()}].concat(Ko(Yo(n.getWidgets()))))},[])}var Xo=function(t){if(t===void 0||t.indexName===void 0&&!t.EXPERIMENTAL_isolated)throw new Error(gt("The `indexName` option is required."));var r=t.indexName,n=r===void 0?"":r,i=t.indexId,a=i===void 0?n:i,s=t.EXPERIMENTAL_isolated,c=s===void 0?!1:s,l=[],d={},v=null,b=null,h=null,f=null,u=null,p=!1,g=!1;return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:c,getIndexName:function(){return n},getIndexId:function(){return a},getHelper:function(){return h},getResults:function(){var m;return(m=f)!==null&&m!==void 0&&m.lastResults?(f.lastResults._state=h.state,f.lastResults):null},getResultsForWidget:function(m){var y;return m.dependsOn!=="recommend"||Oe(m)||m.$$id===void 0?this.getResults():(y=h)!==null&&y!==void 0&&y.lastRecommendResults?h.lastRecommendResults[m.$$id]:null},getPreviousState:function(){return u},getScopedResults:function(){var m=this.getParent(),y;return m?y=m.getWidgets():n.length===0?y=this.getWidgets():y=[this],Yo(y)},getParent:function(){return c?null:b},createURL:function(m){return typeof m=="function"?v._createURL(at({},a,m(d))):v._createURL(at({},a,pt(l,{searchParameters:m,helper:h})))},getWidgets:function(){return l},addWidgets:function(m){var y=this;if(!Array.isArray(m))throw new Error(gt("The `addWidgets` method expects an array of widgets."));var S=m.reduce(function(P,O){return P.concat(Array.isArray(O)?O:[O])},[]);if(S.some(function(P){return typeof P.init!="function"&&typeof P.render!="function"}))throw new Error(gt("The widget definition expects a `render` and/or an `init` method."));if(S.forEach(function(P){Oe(P)||(v&&P.dependsOn==="recommend"?v._hasRecommendWidget=!0:v?v._hasSearchWidget=!0:P.dependsOn==="recommend"?p=!0:g=!0,Ac(P))}),l=l.concat(S),v&&S.length)if(Jo(h,{state:vt(l,{uiState:d,initialSearchParameters:h.state}),recommendState:$s(l,{uiState:d,initialRecommendParameters:h.recommendState}),_uiState:d}),S.forEach(function(P){if(P.getRenderState){var O=P.getRenderState(v.renderState[y.getIndexId()]||{},bt(v,y,v._initialUiState));_n({renderState:O,instantSearchInstance:v,parent:y})}}),S.forEach(function(P){P.init&&P.init(bt(v,y,v._initialUiState))}),c){var w;(w=h)===null||w===void 0||w.search()}else v.scheduleSearch();return this},removeWidgets:function(m){var y=this;if(!Array.isArray(m))throw new Error(gt("The `removeWidgets` method expects an array of widgets."));var S=m.reduce(function($,_){return $.concat(Array.isArray(_)?_:[_])},[]);if(S.some(function($){return typeof $.dispose!="function"}))throw new Error(gt("The widget definition expects a `dispose` method."));if(l=l.filter(function($){return S.indexOf($)===-1}),l.forEach(function($){Oe($)||(v&&$.dependsOn==="recommend"?v._hasRecommendWidget=!0:v?v._hasSearchWidget=!0:$.dependsOn==="recommend"?p=!0:g=!0)}),v&&S.length){var w=S.reduce(function($,_){var x=_.dispose({helper:h,state:$.cleanedSearchState,recommendState:$.cleanedRecommendState,parent:y});return x instanceof le.RecommendParameters?$.cleanedRecommendState=x:x&&($.cleanedSearchState=
35x),$},{cleanedSearchState:h.state,cleanedRecommendState:h.recommendState}),P=w.cleanedSearchState,O=w.cleanedRecommendState,R=v.future.preserveSharedStateOnUnmount?vt(l,{uiState:d,initialSearchParameters:new le.SearchParameters({index:this.getIndexName()})}):vt(l,{uiState:pt(l,{searchParameters:P,helper:h}),initialSearchParameters:P});if(d=pt(l,{searchParameters:R,helper:h}),h.setState(R),h.recommendState=O,l.length)if(c){var j;(j=h)===null||j===void 0||j.search()}else v.scheduleSearch()}return this},init:function(m){var y=this,S,w=m.instantSearchInstance,P=m.parent,O=m.uiState;if(h===null){v=w,b=P,d=O[a]||{};var R=w.mainHelper,j=vt(l,{uiState:d,initialSearchParameters:new le.SearchParameters({index:n})}),$=$s(l,{uiState:d,initialRecommendParameters:new le.RecommendParameters});h=le(R.getClient(),j.index,j),h.recommendState=$,h.search=function(){return c?(w.status="loading",y.render({instantSearchInstance:w}),w.compositionID?h.searchWithComposition():h.searchOnlyWithDerivedHelpers()):w.onStateChange?(w.onStateChange({uiState:w.mainIndex.getWidgetUiState({}),setUiState:function(F){return w.setUiState(F,!1)}}),R):R.search()},h.searchWithoutTriggeringOnStateChange=function(){return R.search()},h.searchForFacetValues=function(A,F,T,I){var C=h.state.setQueryParameters(I);return R.searchForFacetValues(A,F,T,C)};var _=n?h:le({},"__empty_index__",{}),x=c?_:Wg(P,R);f=x.derive(function(){return jt.apply(void 0,[R.state].concat(Ko(sl(y))))},function(){return y.getHelper().recommendState});var E=(S=w._initialResults)===null||S===void 0?void 0:S[this.getIndexId()];if(E!=null&&E.results){var D=new le.SearchResults(new le.SearchParameters(E.state),E.results);f.lastResults=D,h.lastResults=D}if(E!=null&&E.recommendResults){var H=new le.RecommendResults(new le.RecommendParameters({params:E.recommendResults.params}),E.recommendResults.results);f.lastRecommendResults=H,h.lastRecommendResults=H}h.on("change",function(A){var F=A.isPageReset;F&&Go(l)}),f.on("search",function(){w.scheduleStalledRender()}),f.on("result",function(A){var F=A.results;w.scheduleRender(),h.lastResults=F,u=F?._state}),f.on("recommend:result",function(A){var F=A.recommend;w.scheduleRender(),h.lastRecommendResults=F.results}),l.forEach(function(A){if(A.getRenderState){var F=A.getRenderState(w.renderState[y.getIndexId()]||{},bt(w,y,O));_n({renderState:F,instantSearchInstance:w,parent:y})}}),l.forEach(function(A){A.init&&A.init(bt(w,y,O))}),h.on("change",function(A){var F=A.state,T=A._uiState;d=pt(l,{searchParameters:F,helper:h},T||{}),w.onStateChange||w.onInternalStateChange()}),E&&w.scheduleRender(),p&&(w._hasRecommendWidget=!0),g&&(w._hasSearchWidget=!0)}},render:function(m){var y,S=this,w=m.instantSearchInstance;w.status==="error"&&!w.mainHelper.hasPendingRequests()&&u&&h.setState(u);var P=this.getResults()||(y=f)!==null&&y!==void 0&&y.lastRecommendResults||c&&!n?l:l.filter(Oe);P=P.filter(function(O){return O.shouldRender?O.shouldRender({instantSearchInstance:w}):!0}),P.forEach(function(O){if(O.getRenderState){var R=O.getRenderState(w.renderState[S.getIndexId()]||{},Ki(w,S,O));_n({renderState:R,instantSearchInstance:w,parent:S})}}),P.forEach(function(O){O.render&&O.render(Ki(w,S,O))})},dispose:function(){var m=this,y,S;l.forEach(function(w){w.dispose&&h&&w.dispose({helper:h,state:h.state,recommendState:h.recommendState,parent:m})}),v=null,b=null,(y=h)===null||y===void 0||y.removeAllListeners(),h=null,(S=f)===null||S===void 0||S.detach(),f=null},getWidgetUiState:function(m){return l.filter(Oe).filter(function(y){return!y._isolated}).reduce(function(y,S){return S.getWidgetUiState(y)},Te(Te({},m),{},at({},a,Te(Te({},m[a]),d))))},getWidgetState:function(m){return this.getWidgetUiState(m)},getWidgetSearchParameters:function(m,y){var S=y.uiState;return vt(l,{uiState:S,initialSearchParameters:m})},refreshUiState:function(){d=pt(l,{searchParameters:this.getHelper().state,helper:this.getHelper()},d)},setIndexUiState:function(m){var y=typeof m=="function"?m(d):m;v.setUiState(function(S){return Te(Te({},S),{},at({},a,y))})}}};function _n(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=Te(Te({},r.renderState),{},at({},i,Te(Te({},r.renderState[i]),t)))}function Wg(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}Y({name:"Index"}),ee({connector:function(){return Xo}},{$$widgetType:"ais.index"});var Lg="ais",Nr=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=r.descendantName,i=r.modifierName,a=n?"-".concat(n):"",s=i?"--".concat(i):"";return"".concat(Lg,"-").concat(t).concat(a).concat(s)}},Mg=Nr("Highlight");function Zo(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasse
35s,s=a===void 0?{}:a,c=ht(i._highlightResult,t),l=c||{},d=l.value,v=d===void 0?"":d,b=Mg({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return v.replace(new RegExp(ge.highlightPreTag,"g"),"<".concat(n,' class="').concat(b,'">')).replace(new RegExp(ge.highlightPostTag,"g"),"</".concat(n,">"))}var qg=Nr("ReverseHighlight");function eu(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasses,s=a===void 0?{}:a,c=ht(i._highlightResult,t),l=c||{},d=l.value,v=d===void 0?"":d,b=qg({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=so(go(oi(v)));return h.replace(new RegExp(ge.highlightPreTag,"g"),"<".concat(n,' class="').concat(b,'">')).replace(new RegExp(ge.highlightPostTag,"g"),"</".concat(n,">"))}var Ug=Nr("Snippet");function tu(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasses,s=a===void 0?{}:a,c=ht(i._snippetResult,t),l=c||{},d=l.value,v=d===void 0?"":d,b=Ug({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return v.replace(new RegExp(ge.highlightPreTag,"g"),"<".concat(n,' class="').concat(b,'">')).replace(new RegExp(ge.highlightPostTag,"g"),"</".concat(n,">"))}var kg=Nr("ReverseSnippet");function ru(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasses,s=a===void 0?{}:a,c=ht(i._snippetResult,t),l=c||{},d=l.value,v=d===void 0?"":d,b=kg({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=so(go(oi(v)));return h.replace(new RegExp(ge.highlightPreTag,"g"),"<".concat(n,' class="').concat(b,'">')).replace(new RegExp(ge.highlightPostTag,"g"),"</".concat(n,">"))}function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}var Qg="_ALGOLIA";function Vg(e){if(!((typeof document>"u"?"undefined":Yn(document))!=="object"||typeof document.cookie!="string"))for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}}function nu(){return Vg(Qg)}function Bg(){return nu()}var Kg=["page"];function zg(e,t){if(e==null)return{};var r=Jg(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jg(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function _s(e){var t=e||{};t.page;var r=zg(t,Kg);return r}function Gg(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.key,r=["ais.infiniteHits",t].filter(Boolean).join(":");return{read:function(i){var a=i.state,s=Ae(function(l){var d=l.window;return d.sessionStorage});if(!s)return null;try{var c=JSON.parse(s.getItem(r));return c&&mr(c.state,_s(a))?c.hits:null}catch(l){if(l instanceof SyntaxError)try{s.removeItem(r)}catch{}return null}},write:function(i){var a=i.state,s=i.hits,c=Ae(function(l){var d=l.window;return d.sessionStorage});if(c)try{c.setItem(r,JSON.stringify({state:_s(a),hits:s}))}catch{}}}}var Yg=fi();const Xg=ri(Yg);function Zg(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,r=e==="x"?t:t&3|8;return r.toString(16)})}function ur(e){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(e)}function xs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
35t%2?xs(Object(r),!0).forEach(function(n){ep(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ep(e,t,r){return t=tp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tp(e){var t=rp(e,"string");return ur(t)=="symbol"?t:String(t)}function rp(e,t){if(ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ur(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Me(e,t){return ap(e)||ip(e,t)||iu(e,t)||np()}function np(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 36In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ip(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,c=[],l=!0,d=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(v){d=!0,i=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function ap(e){if(Array.isArray(e))return e}function sp(e){return cp(e)||up(e)||iu(e)||op()}function op(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 37In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iu(e,t){if(e){if(typeof e=="string")return Xn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xn(e,t)}}function up(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cp(e){if(Array.isArray(e))return Xn(e)}function Xn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var au="2.17.2",fp="https://cdn.jsdelivr.net/npm/search-insights@".concat(au,"/dist/search-insights.min.js");function Fs(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,a=i===void 0?!1:i,s=e.$$automatic,c=s===void 0?!1:s,l=t;!t&&t!==null&&Ae(function(v){var b=v.window,h=b.AlgoliaAnalyticsObject||"aa";typeof h=="string"&&(l=b[h]),l||(b.AlgoliaAnalyticsObject=h,b[h]||(b[h]=function(){b[h].queue||(b[h].queue=[]);for(var f=arguments.length,u=new Array(f),p=0;p<f;p++)u[p]=arguments[p];b[h].queue.push(u)},b[h].version=au,b[h].shouldAddScript=!0),l=b[h])});var d=l||K;return function(v){var b=v.instantSearchInstance,h=b.middleware.filter(function(j){return j.instance.$$type==="ais.insights"&&j.instance.$$internal}).map(function(j){return j.creator});b.unuse.apply(b,sp(h));var f=Ci(b.client),u=Me(f,2),p=u[0],g=u[1],o=void 0,m=void 0,y=void 0,S=d.queue;if(Array.isArray(S)){var w=["setUserToken","init"].map(function(j){var $=qe(S.slice().reverse(),function(E){var D=Me(E,1),H=D[0];return H===j})||[],_=Me($,2),x=_[1];return x}),P=Me(w,2);m=P[0],o=P[1]}d("getUserToken",null,function(j,$){y=Es($)}),(r||!Is(d))&&d("init",Ge({appId:p,apiKey:g,partial:!0},r));var O,R;return{$$type:"ais.insights",$$internal:a,$$automatic:c,onStateChange:function(){},subscribe:function(){if(d.shouldAddScript){var $="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var _=document.createElement("script");_.async=!0,_.src=fp,_.onerror=function(){b.emit("error",new Error($))},document.body.appendChild(_),d.shouldAddScript=!1}catch{d.shouldAddScript=!1,b.emit("error",new Error($))}}},started:function(){d("addAlgoliaAgent","insights-middleware"),R=b.mainHelper;var $=d.queue;if(Array.isArray($)){var _=["setUserToken","init"].map(function(M){var q=qe($.slice().reverse(),function(ne){var ie=Me(ne,1),ae=ie[0];return ae===M})||[],B=Me(q,2),k=B[1];return k}),x=Me(_,2);m=x[0],o=x[1]}O=lp(b),c||R.overrideStateWithoutTriggeringChangeEvent(Ge(Ge({},R.state),{},{clickAnalytics:!0})),a||b.scheduleSearch();var E=function(q){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=Es(q);if(!k)return;var ne=R.state.userToken;function ie(){R.overrideStateWithoutTriggeringChangeEvent(Ge(Ge({},R.state),{},{userToken:k})),ne&&ne!==q&&b.scheduleSearch()}B?ie():setTimeout(ie,0)};function D(M){E(M,!0),d("setUserToken",M)}var H=void 0,A=nu();if(A)H=A;else{var F="anonymous-".concat(Zg());H=F}var T,I=O.userToken;if(r!=null&&r.userToken&&(T=r.userToken),T)D(T);else if(I)D(I);else if(y)D(y);else if(m)D(m);else if(H){var C;if(D(H),r!=null&&r.useCookie||(C=o)!==null&&C!==void 0&&C.useCookie){var N;hp(H,r?.cookieDuration||((N=o)===null||N===void 0?void 0:N.cookieDuration))}}d("onUserTokenChange",function(M){return E(M,!0)},{immediate:!0});var L=d;Is(d)&&(L=function(q,B){var k=Ci(b.client),ne=Me(k,2),ie=ne[0],ae=ne[1],Ne={headers:{"X-Algolia-Application-Id":ie,"X-Algolia-API-Key":ae}}
37;return d(q,B,Ne)});var U=new Set,z;b.mainHelper.derivedHelpers[0].on("result",function(M){var q=M.results;q&&(!q.queryID||q.queryID!==z)&&(z=q.queryID,U.clear())}),b.sendEventToInsights=function(M){if(n)n(M,L);else if(M.insightsMethod){if(M.insightsMethod==="viewedObjectIDs"){var q=M.payload,B=q.objectIDs.filter(function(k){return!U.has(k)});if(B.length===0)return;B.forEach(function(k){return U.add(k)}),q.objectIDs=B}M.payload.algoliaSource=["instantsearch"],c&&M.payload.algoliaSource.push("instantsearch-automatic"),M.eventModifier==="internal"&&M.payload.algoliaSource.push("instantsearch-internal"),L(M.insightsMethod,M.payload)}}},unsubscribe:function(){d("onUserTokenChange",void 0),b.sendEventToInsights=K,R&&O&&(R.overrideStateWithoutTriggeringChangeEvent(Ge(Ge({},R.state),O)),b.scheduleSearch())}}}}function lp(e){var t,r,n=((t=e._initialResults)===null||t===void 0||(r=t[e.indexName])===null||r===void 0?void 0:r.state)||{},i=e.mainHelper.state;return{userToken:n.userToken||i.userToken,clickAnalytics:n.clickAnalytics||i.clickAnalytics}}function hp(e,t){var r=2592e6,n=new Date;n.setTime(n.getTime()+(t||r*6));var i="expires=".concat(n.toUTCString());document.cookie="_ALGOLIA=".concat(e,";").concat(i,";path=/")}
37function Is(e){var t=(e.version||"").split(".").map(Number),r=Me(t,2),n=r[0],i=r[1],a=n>=3,s=n===2&&i>=6,c=n===1&&i>=10;return a||s||c}function Es(e){if(e)return typeof e=="number"?e.toString():e}function su(e,t,r){var n=bt(t,t.mainIndex,t._initialUiState);e.forEach(function(i){var a={};if(i.getWidgetRenderState){var s=i.getWidgetRenderState(n);s&&s.widgetParams&&(a=s.widgetParams)}var c=Object.keys(a).filter(function(l){return a[l]!==void 0});r.widgets.push({type:i.$$type,widgetType:i.$$widgetType,params:c}),i.$$type==="ais.index"&&su(i.getWidgets(),t,r)})}function dp(){return Ae(function(e){var t,r,n=e.window;return((t=n.navigator)===null||t===void 0||(r=t.userAgent)===null||r===void 0?void 0:r.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})}function mp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.$$internal,r=t===void 0?!1:t;return function(n){var i=n.instantSearchInstance,a={widgets:[]},s=document.createElement("meta"),c=document.querySelector("head");return s.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){var d=i.client;a.ua=d.transporter&&d.transporter.userAgent?d.transporter.userAgent.value:d._ua,su(i.mainIndex.getWidgets(),i,a),i.middleware.forEach(function(v){return a.widgets.push({middleware:!0,type:v.instance.$$type,internal:v.instance.$$internal})}),s.content=JSON.stringify(a),c.appendChild(s)},0)},started:function(){},unsubscribe:function(){s.remove()}}}}var xn,Ts;function vi(){if(Ts)return xn;Ts=1;var e=String.prototype.replace,t=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return xn={default:r.RFC3986,formatters:{RFC1738:function(n){return e.call(n,t,"+")},RFC3986:function(n){return String(n)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},xn}var Fn,As;function ou(){if(As)return Fn;As=1;var e=vi(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=(function(){for(var p=[],g=0;g<256;++g)p.push("%"+((g<16?"0":"")+g.toString(16)).toUpperCase());return p})(),i=function(g){for(;g.length>1;){var o=g.pop(),m=o.obj[o.prop];if(r(m)){for(var y=[],S=0;S<m.length;++S)typeof m[S]<"u"&&y.push(m[S]);o.obj[o.prop]=y}}},a=function(g,o){for(var m=o&&o.plainObjects?Object.create(null):{},y=0;y<g.length;++y)typeof g[y]<"u"&&(m[y]=g[y]);return m},s=function p(g,o,m){if(!o)return g;if(typeof o!="object"){if(r(g))g.push(o);else if(g&&typeof g=="object")(m&&(m.plainObjects||m.allowPrototypes)||!t.call(Object.prototype,o))&&(g[o]=!0);else return[g,o];return g}if(!g||typeof g!="object")return[g].concat(o);var y=g;return r(g)&&!r(o)&&(y=a(g,m)),r(g)&&r(o)?(o.forEach(function(S,w){if
37(t.call(g,w)){var P=g[w];P&&typeof P=="object"&&S&&typeof S=="object"?g[w]=p(P,S,m):g.push(S)}else g[w]=S}),g):Object.keys(o).reduce(function(S,w){var P=o[w];return t.call(S,w)?S[w]=p(S[w],P,m):S[w]=P,S},y)},c=function(g,o){return Object.keys(o).reduce(function(m,y){return m[y]=o[y],m},g)},l=function(p,g,o){var m=p.replace(/\+/g," ");if(o==="iso-8859-1")return m.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(m)}catch{return m}},d=function(g,o,m,y,S){if(g.length===0)return g;var w=g;if(typeof g=="symbol"?w=Symbol.prototype.toString.call(g):typeof g!="string"&&(w=String(g)),m==="iso-8859-1")return escape(w).replace(/%u[0-9a-f]{4}/gi,function(j){return"%26%23"+parseInt(j.slice(2),16)+"%3B"});for(var P="",O=0;O<w.length;++O){var R=w.charCodeAt(O);if(R===45||R===46||R===95||R===126||R>=48&&R<=57||R>=65&&R<=90||R>=97&&R<=122||S===e.RFC1738&&(R===40||R===41)){P+=w.charAt(O);continue}if(R<128){P=P+n[R];continue}if(R<2048){P=P+(n[192|R>>6]+n[128|R&63]);continue}if(R<55296||R>=57344){P=P+(n[224|R>>12]+n[128|R>>6&63]+n[128|R&63]);continue}O+=1,R=65536+((R&1023)<<10|w.charCodeAt(O)&1023),P+=n[240|R>>18]+n[128|R>>12&63]+n[128|R>>6&63]+n[128|R&63]}return P},v=function(g){for(var o=[{obj:{o:g},prop:"o"}],m=[],y=0;y<o.length;++y)for(var S=o[y],w=S.obj[S.prop],P=Object.keys(w),O=0;O<P.length;++O){var R=P[O],j=w[R];typeof j=="object"&&j!==null&&m.indexOf(j)===-1&&(o.push({obj:w,prop:R}),m.push(j))}return i(o),g},b=function(g){return Object.prototype.toString.call(g)==="[object RegExp]"},h=function(g){return!g||typeof g!="object"?!1:!!(g.constructor&&g.constructor.isBuffer&&g.constructor.isBuffer(g))},f=function(g,o){return[].concat(g,o)},u=function(g,o){if(r(g)){for(var m=[],y=0;y<g.length;y+=1)m.push(o(g[y]));return m}return o(g)};return Fn={arrayToObject:a,assign:c,combine:f,compact:v,decode:l,encode:d,isBuffer:h,isRegExp:b,maybeMap:u,merge:s},Fn}var In,Ds;function gp(){if(Ds)return In;Ds=1;var e=ou(),t=vi(),r=Object.prototype.hasOwnProperty,n={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,g){return p+"["+g+"]"},repeat:function(p){return p}},i=Array.isArray,a=String.prototype.split,s=Array.prototype.push,c=function(u,p){s.apply(u,i(p)?p:[p])},l=Date.prototype.toISOString,d=t.default,v={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:e.encode,encodeValuesOnly:!1,format:d,formatter:t.formatters[d],indices:!1,serializeDate:function(p){return l.call(p)},skipNulls:!1,strictNullHandling:!1},b=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},h=function u(p,g,o,m,y,S,w,P,O,R,j,$,_,x){var E=p;if(typeof w=="function"?E=w(g,E):E instanceof Date?E=R(E):o==="comma"&&i(E)&&(E=e.maybeMap(E,function(M){return M instanceof Date?R(M):M})),E===null){if(m)return S&&!_?S(g,v.encoder,x,"key",j):g;E=""}if(b(E)||e.isBuffer(E)){if(S){var D=_?g:S(g,v.encoder,x,"key",j);if(o==="comma"&&_){for(var H=a.call(String(E),","),A="",F=0;F<H.length;++F)A+=(F===0?"":",")+$(S(H[F],v.encoder,x,"value",j));return[$(D)+"="+A]}return[$(D)+"="+$(S(E,v.encoder,x,"value",j))]}return[$(g)+"="+$(String(E))]}var T=[];if(typeof E>"u")return T;var I;if(o==="comma"&&i(E))I=[{value:E.length>0?E.join(",")||null:void 0}];else if(i(w))I=w;else{var C=Object.keys(E);I=P?C.sort(P):C}for(var N=0;N<I.length;++N){var L=I[N],U=typeof L=="object"&&typeof L.value<"u"?L.value:E[L];if(!(y&&U===null)){var z=i(E)?typeof o=="function"?o(g,L):g:g+(O?"."+L:"["+L+"]");c(T,u(U,z,o,m,y,S,w,P,O,R,j,$,_,x))}}return T},f=function(p){if(!p)return v;if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var g=p.charset||v.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=t.default;if(typeof p.format<"u"){if(!r.call(t.formatters,p.format))throw new TypeError("Unknown format option provided.");o=p.format}var m=t.formatters[o],y=v.filter;return(typeof p.filter=="function"||i(p.filter))&&(y=p.filter),{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:v.addQueryPrefix,allowDots:typeof p.allowDots>"u"?v.allowDots:!!p.allowDots,charset:g,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:v.charsetSentinel,delimiter:typeof p.delimiter>"u"?v.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:v.encode,encoder:typeof p.encoder=="function"?p.encoder:v.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:v.encodeValuesOnly,filter:y,format:o,formatter:m,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:v.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:v.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:v.strictNullHandling}};return In=function(u,p){var g=u,o=f(p),m,y;typeof o.filter=="function"?(y=o.filter,g=y("",g)):i(o.filter)&&(y=o.filter,m=y);var S=[];if(typeof g!="object"||g===null)return"";var w;p&&p.arrayFormat in n?w=p.arrayFormat:p&&"indices"in p?w=p.indices?"indices":"repeat":w="indices";var P=n[w];m||(m=Object.keys(g)),o.sort&&m.sort(o.sort);for(var O=0;O<m.length;++O){var R=m[O];o.skipNulls&&g[R]===null||c(S,h(g[R],R,P,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset))}var j=S.join(o.delimiter),$=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),j.length>0?$+j:""},In}var En,Cs;function pp(){if(Cs)return En;Cs=1;var e=ou(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:e.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},i=function(h){return h.replace(/&#(\d+);/g,function(f,u){return String.fromCharCode(parseInt(u,10))})},a=function(h,f){return h&&typeof h=="string"&&f.comma&&h.indexOf(",")>-1?h.split(","):h},s="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",l=function(f,u){var p={},g=u.ignoreQueryPrefix?f.replace(/^\?/,""):f,o=u.parameterLimit===1/0?void 0:u.parameterLimit,m=g.split(u.delimiter,o),y=-1,S,w=u.charset;if(u.charsetSentinel)for(S=0;S<m.length;++S)m[S].indexOf("utf8=")===0&&(m[S]===c?w="utf-8":m[S]===s&&(w="iso-8859-1"),y=S,S=m.length);for(S=0;S<m.length;++S)if(S!==y){var P=m[S],O=P.indexOf("]="),R=O===-1?P.indexOf("="):O+1,j,$;R===-1?(j=u.decoder(P,n.decoder,w,"key"),$=u.strictNullHandling?null:""):(j=u.decoder(P.slice(0,R),n.decoder,w,"key"),$=e.maybeMap(a(P.slice(R+1),u),function(_){return u.decoder(_,n.decoder,w,"value")})),$&&u.interpretNumericEntities&&w==="iso-8859-1"&&($=i($)),P.indexOf("[]=")>
37-1&&($=r($)?[$]:$),t.call(p,j)?p[j]=e.combine(p[j],$):p[j]=$}return p},d=function(h,f,u,p){for(var g=p?f:a(f,u),o=h.length-1;o>=0;--o){var m,y=h[o];if(y==="[]"&&u.parseArrays)m=[].concat(g);else{m=u.plainObjects?Object.create(null):{};var S=y.charAt(0)==="["&&y.charAt(y.length-1)==="]"?y.slice(1,-1):y,w=parseInt(S,10);!u.parseArrays&&S===""?m={0:g}:!isNaN(w)&&y!==S&&String(w)===S&&w>=0&&u.parseArrays&&w<=u.arrayLimit?(m=[],m[w]=g):S!=="__proto__"&&(m[S]=g)}g=m}return g},v=function(f,u,p,g){if(f){var o=p.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,m=/(\[[^[\]]*])/,y=/(\[[^[\]]*])/g,S=p.depth>0&&m.exec(o),w=S?o.slice(0,S.index):o,P=[];if(w){if(!p.plainObjects&&t.call(Object.prototype,w)&&!p.allowPrototypes)return;P.push(w)}for(var O=0;p.depth>0&&(S=y.exec(o))!==null&&O<p.depth;){if(O+=1,!p.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!p.allowPrototypes)return;P.push(S[1])}return S&&P.push("["+o.slice(S.index)+"]"),d(P,u,p,g)}},b=function(f){if(!f)return n;if(f.decoder!==null&&f.decoder!==void 0&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var u=typeof f.charset>"u"?n.charset:f.charset;return{allowDots:typeof f.allowDots>"u"?n.allowDots:!!f.allowDots,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:n.allowPrototypes,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:n.arrayLimit,charset:u,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:n.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:n.comma,decoder:typeof f.decoder=="function"?f.decoder:n.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:n.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:n.depth,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:n.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:n.plainObjects,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:n.strictNullHandling}};return En=function(h,f){var u=b(f);if(h===""||h===null||typeof h>"u")return u.plainObjects?Object.create(null):{};for(var p=typeof h=="string"?l(h,u):h,g=u.plainObjects?Object.create(null):{},o=Object.keys(p),m=0;m<o.length;++m){var y=o[m],S=v(y,p[y],u,typeof h=="string");g=e.merge(g,S,u)}return e.compact(g)},En}var Tn,Hs;function vp(){if(Hs)return Tn;Hs=1;var e=gp(),t=pp(),r=vi();return Tn={formats:r,parse:t,stringify:e},Tn}var yp=vp();const Ns=ri(yp);function cr(e){"@babel/helpers - typeof";return cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cr(e)}function bp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uu(n.key),n)}}function Rp(e,t,r){return t&&Sp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ve(e,t,r){return t=uu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uu(e){var t=wp(e,"string");return cr(t)=="symbol"?t:String(t)}function wp(e,t){if(cr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ws=function(t){t&&(window.document.title=t)},Pp=(function(){function e(t){var r=this,n=t.windowTitle,i=t.writeDelay,a=i===void 0?400:i,s=t.createURL,c=t.parseURL,l=t.getLocation,d=t.start,v=t.dispose,b=t.push,h=t.cleanUrlOnDispose;bp(this,e),ve(this,"$$type","ais.browser"),ve(this,"windowTitle",void 0),ve(this,"writeDelay",void 0),ve(this,"_createURL",void 0),ve(this,"parseURL",void 0),ve(this,"getLocation",void 0),ve(this,"writeTimer",void 0),ve(this,"_onPopState",void 0),ve(this,"inPopState",!1),ve(this,"isDisposed",!1),ve(this,"latestAcknowledgedHistory",0),ve(this,"_start",void 0),ve(this,"_dispose",void 0),ve(this,"_push",void 0),ve(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=a,this._createURL=s,this.parseURL=c,this.getLocation=l,this._start=d,this._dispose=v,this._push=b,this._cleanUrlOnDispose=typeof h>"u"?!0:h,Ae(function(f){var u=f.window,p=r.windowTitle&&r.windowTitle(r.read());Ws(p),r.latestAcknowledgedHistory=u.history.length})}return Rp(e,[{key:"read",value:function(){return this.parseURL({qsModule:Ns,location:this.getLocation()})}},{key:"write",value:function(r){var n=this;Ae(function(i){var a=i.window,s=n.createURL(r),c=n.windowTitle&&n.windowTitle(r);n.writeTimer&&clearTimeout(n.writeTimer),n.writeTimer=setTimeout(function(){Ws(c),n.shouldWrite(s)&&(n._push?n._push(s):a.history.pushState(r,c||"",s),n.latestAcknowledgedHistory=a.history.length),n.inPopState=!1,n.writeTimer=void 0},n.writeDelay)})}}
37,{key:"onUpdate",value:function(r){var n=this;this._start&&this._start(function(){r(n.read())}),this._onPopState=function(){n.writeTimer&&(clearTimeout(n.writeTimer),n.writeTimer=void 0),n.inPopState=!0,r(n.read())},Ae(function(i){var a=i.window;a.addEventListener("popstate",n._onPopState)})}},{key:"createURL",value:function(r){var n=this._createURL({qsModule:Ns,routeState:r,location:this.getLocation()});return n}},{key:"dispose",value:function(){var r=this;this._dispose&&this._dispose(),this.isDisposed=!0,Ae(function(n){var i=n.window;r._onPopState&&i.removeEventListener("popstate",r._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(r){var n=this;return Ae(function(i){var a=i.window;if(n.isDisposed&&!n._cleanUrlOnDispose)return!1;var s=!(n.isDisposed&&n.latestAcknowledgedHistory!==a.history.length);return!n.inPopState&&s&&r!==a.location.href})}}]),e})();function Op(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.createURL,r=t===void 0?function(u){var p=u.qsModule,g=u.routeState,o=u.location,m=o.protocol,y=o.hostname,S=o.port,w=S===void 0?"":S,P=o.pathname,O=o.hash,R=p.stringify(g),j=w===""?"":":".concat(w);return R?"".concat(m,"//").concat(y).concat(j).concat(P,"?").concat(R).concat(O):"".concat(m,"//").concat(y).concat(j).concat(P).concat(O)}:t,n=e.parseURL,i=n===void 0?function(u){var p=u.qsModule,g=u.location;return p.parse(g.search.slice(1),{arrayLimit:99})}:n,a=e.writeDelay,s=a===void 0?400:a,c=e.windowTitle,l=e.getLocation,d=l===void 0?function(){return Ae(function(u){var p=u.window;return p.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:l,v=e.start,b=e.dispose,h=e.push,f=e.cleanUrlOnDispose;return new Pp({createURL:r,parseURL:i,writeDelay:s,windowTitle:c,getLocation:d,start:v,dispose:b,push:h,cleanUrlOnDispose:f})}function fr(e){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(e)}var jp=["configure"];function Ls(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ls(Object(r),!0).forEach(function(n){Zn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ls(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zn(e,t,r){return t=$p(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $p(e){var t=_p(e,"string");return fr(t)=="symbol"?t:String(t)}function _p(e,t){if(fr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xp(e,t){if(e==null)return{};var r=Fp(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Fp(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Ms(e){e.configure;var t=xp(e,jp);return t}function Ip(){return{$$type:"ais.simple",stateToRoute:function(t){return Object.keys(t).reduce(function(r,n){return wr(wr({},r),{},Zn({},n,Ms(t[n])))},{})},routeToState:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(r,n){return wr(wr({},r),{},Zn({},n,Ms(t[n])))},{})}}}function lr(e){"@babel/helpers - typeof";return lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lr(e)}function qs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
37t%2?qs(Object(r),!0).forEach(function(n){cu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cu(e,t,r){return t=Ep(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ep(e){var t=Tp(e,"string");return lr(t)=="symbol"?t:String(t)}function Tp(e,t){if(lr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ap=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.router,n=r===void 0?Op():r,i=t.stateMapping,a=i===void 0?Ip():i,s=t.$$internal,c=s===void 0?!1:s;return function(l){var d=l.instantSearchInstance;function v(f){var u=d.mainIndex.getWidgets().length===0?d._initialUiState:d.mainIndex.getWidgetUiState({}),p=Object.keys(f).reduce(function(o,m){return Pr(Pr({},o),{},cu({},m,f[m]))},u),g=a.stateToRoute(p);return n.createURL(g)}d._createURL=v;var b=void 0,h=d._initialUiState;return{$$type:"ais.router({router:".concat(n.$$type||"__unknown__",", stateMapping:").concat(a.$$type||"__unknown__","})"),$$internal:c,onStateChange:function(u){var p=u.uiState,g=a.stateToRoute(p);(b===void 0||!mr(b,g))&&(n.write(g),b=g)},subscribe:function(){d._initialUiState=Pr(Pr({},h),a.routeToState(n.read())),n.onUpdate(function(u){d.mainIndex.getWidgets().length>0&&d.setUiState(a.routeToState(u))})},started:function(){var u;(u=n.start)===null||u===void 0||u.call(n)},unsubscribe:function(){n.dispose()}}}};function Dp(e,t){return e.toLocaleString(t)}function hr(e){"@babel/helpers - typeof";return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hr(e)}function Us(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function We(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Us(Object(r),!0).forEach(function(n){Cp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Us(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cp(e,t,r){return t=Hp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hp(e){var t=Np(e,"string");return hr(t)=="symbol"?t:String(t)}function Np(e,t){if(hr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wp(e){var t=e.numberLocale;return{formatNumber:function(n,i){return Dp(Number(i(n)),t)},highlight:function(n,i){try{var a=JSON.parse(n);return i(Zo(We(We({},a),{},{hit:this})))}catch{throw new Error(` 38The highlight helper expects a JSON object of the format: 39{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseHighlight:function(n,i){try{var a=JSON.parse(n);return i(eu(We(We({},a),{},{hit:this})))}catch{throw new Error(` 40 The reverseHighlight helper expects a JSON object of the format: 41 { "attribute": "name", "highlightedTagName": "mark" }`)}},snippet:function(n,i){try{var a=JSON.parse(n);return i(tu(We(We({},a),{},{hit:this})))}catch{throw new Error(` 42The snippet helper expects a JSON object of the format: 43{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseSnippet:function(n,i){try{var a=JSON.parse(n);return i(ru(We(We({},a),{},{hit:this})))}catch{throw new Error(` 44 The reverseSnippet helper expects a JSON object of the format: 45 { "attribute": "name", "highlightedTagName": "mark" }`)}},insights:function(n,i){try{var a=JSON.parse(n),s=a.method,c=a.payload;return i(Io(s,We({objectIDs:[this.objectID]}
45,c)))}catch{throw new Error(` 46The insights helper expects a JSON object of the format: 47{ "method": "method-name", "payload": { "eventName": "name of the event" } }`)}}}}const fu="4.80.0";function ft(e){"@babel/helpers - typeof";return ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(e)}function ks(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function An(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ks(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ks(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lu(n.key),n)}}function qp(e,t,r){return t&&Mp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Up(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ei(e,t)}function ei(e,t){return ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ei(e,t)}function kp(e){var t=Vp();return function(){var n=Hr(e),i;if(t){var a=Hr(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Qp(this,i)}}function Qp(e,t){if(t&&(ft(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J(e)}function J(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vp(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hr(e){return Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hr(e)}function X(e,t,r){return t=lu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lu(e){var t=Bp(e,"string");return ft(t)=="symbol"?t:String(t)}function Bp(e,t){if(ft(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Le=re({name:"instantsearch"});function Kp(){return"#"}var hu={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},zp=(function(e){Up(r,e);var t=kp(r);function r(n){var i;Lp(this,r),i=t.call(this),X(J(i),"client",void 0),X(J(i),"indexName",void 0),X(J(i),"compositionID",void 0),X(J(i),"insightsClient",void 0),X(J(i),"onStateChange",null),X(J(i),"future",void 0),X(J(i),"helper",void 0),X(J(i),"mainHelper",void 0),X(J(i),"mainIndex",void 0),X(J(i),"started",void 0),X(J(i),"templatesConfig",void 0),X(J(i),"renderState",{}),X(J(i),"_stalledSearchDelay",void 0),X(J(i),"_searchStalledTimer",void 0),X(J(i),"_initialUiState",void 0),X(J(i),"_initialResults",void 0),X(J(i),"_manuallyResetScheduleSearch",!1),X(J(i),"_resetScheduleSearch",void 0),X(J(i),"_createURL",void 0),X(J(i),"_searchFunction",void 0),X(J(i),"_mainHelperSearch",void 0),X(J(i),"_hasSearchWidget",!1),X(J(i),"_hasRecommendWidget",!1),X(J(i),"_insights",void 0),X(J(i),"middleware",[]),X(J(i),"sendEventToInsights",void 0),X(J(i),"status","idle"),X(J(i),"error",void 0),X(J(i),"scheduleSearch",dt(function(){i.started&&i.mainHelper.search()})),X(J(i),"scheduleRender",dt(function(){var x,E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;(x=i.mainHelper)!==null&&x!==void 0&&x.hasPendingRequests()||(clearTimeout(i._searchStalledTimer),i._searchStalledTimer=null,E&&(i.status="idle",i.error=void 0)),i.mainIndex.render({instantSearchInstance:J(i)}),i.emit("render")})),X(J(i),"onInternalStateChange",dt(function(){var x=i.mainIndex.getWidgetUiState({});i.middleware.forEach(function(E){var D=E.instance;D.onStateChange({uiState:x})})})),i.setMaxListeners(100);var a=n.indexName,s=a===void 0?"":a,c=n.compositionID,l=n.numberLocale,d=n.initialUiState,v=d===void 0?{}:d,b=n.routing,h=b===void 0?null:b,f=n.insights,u=f===void 0?void 0:f,p=n.searchFunction,g=n.stalledSearchDelay,o=g===void 0?200:g,m=n.searchClient,y=m===void 0?null:m,S=n.insightsClient,w=S===void 0?null:S,P=n.onStateChange,O=P===void 0?null:P,R=n.future,j=R===void 0?An(An({},hu),n.future||{}):R;if(y===null)throw new Error(Le("The `searchClient` option is required."));if(typeof y.search!="function")throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if(typeof y.addAlgoliaAgent=="function"&&y.addAlgoliaAgent("instantsearch.js (".concat(fu,")")),w&&typeof w!="function")throw new Error(Le("The `insightsClient` option should be a function."));if(i.client=y,i.future=j,i.insightsClient=w,i.indexName=s,i.compositionID=c,i.helper=null,i.mainHelper=null,i.mainIndex=Xo({indexName:i.compositionID||i.indexName}),i.onStateChange=O,i.started=!1,i.templatesConfig={helpers:Wp({numberLocale:l}),compileOptions:{}},i._stalledSearchDelay=o,i._searchStalledTimer=null,i._createURL=Kp,i._initialUiState=v,i._initialResults=null,i._insights=u,p&&(i._searchFunction=p),i.sendEventToInsights=K,h){var $=typeof h=="boolean"?{}:h;$.$$internal=!0,i.use(Ap($))}if(u){var _=typeof u=="boolean"?{}:u;_.$$internal=!0,i.use(Fs(_))}return dp()&&i.use(mp({$$internal:!0})),i}return qp(r,[{key:"_isSearchStalled",get:(function(){return this.status==="stalled"})},{key:"use",value:function(){for(var i=this,a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];var l=s.map(function(d){var v=An({$$type:"__unknown__",$$internal:!1,subscribe:K,started:K,unsubscribe:K,onStateChange:K},d({instantSearchInstance:i}));return i.middleware.push({creator:d,instance:v}),v});return this.started&&l.forEach(function(d){d.subscribe(),d.started()}),this}},{key:"unuse",value:function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return this.middleware.filter(function(c){return a.includes(c.creator)}
47).forEach(function(c){return c.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(c){return!a.includes(c.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(i){return this.addWidgets([i])}},{key:"addWidgets",value:function(i){if(!Array.isArray(i))throw new Error(Le("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&i.some(function(a){return!Array.isArray(a)&&Oe(a)&&!a._isolated}))throw new Error(Le("The `index` widget cannot be used with a composition-based InstantSearch implementation."));return this.mainIndex.addWidgets(i),this}},{key:"removeWidget",value:function(i){return this.removeWidgets([i])}},{key:"removeWidgets",value:function(i){if(!Array.isArray(i))throw new Error(Le("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));return this.mainIndex.removeWidgets(i),this}},{key:"start",value:function(){var i=this;if(this.started)throw new Error(Le("The `start` method has already been called once."));var a=this.mainHelper||le(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(a.searchForFacetValues=a.searchForCompositionFacetValues.bind(a)),a.search=function(){return i.status="loading",i.scheduleRender(!1),i._hasSearchWidget&&(i.compositionID?a.searchWithComposition():a.searchOnlyWithDerivedHelpers()),i._hasRecommendWidget&&a.recommend(),a},this._searchFunction){var s={search:function(){return new Promise(K)}};this._mainHelperSearch=a.search.bind(a),a.search=function(){var l=i.mainIndex.getHelper(),d=le(s,l.state.index,l.state);return d.once("search",function(v){var b=v.state;l.overrideStateWithoutTriggeringChangeEvent(b),i._mainHelperSearch()}),d.on("change",function(v){var b=v.state;l.setState(b)}),i._searchFunction(d),a}}if(a.on("error",function(l){var d=l.error;if(!(d instanceof Error)){var v=d;d=Object.keys(v).reduce(function(b,h){return b[h]=v[h],b},new Error(v.message))}d.error=d,i.error=d,i.status="error",i.scheduleRender(!1),i.emit("error",d)}),this.mainHelper=a,this.middleware.forEach(function(l){var d=l.instance;d.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){Hf(this.client,this._initialResults),xf(this.mainHelper,this._initialResults);var c=this.scheduleSearch;this.scheduleSearch=dt(K),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){i.scheduleSearch=c}:dt(function(){i.scheduleSearch=c})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(l){var d=l.instance;d.started()}),typeof this._insights>"u"&&a.derivedHelpers[0].once("result",function(){var l=i.mainIndex.getScopedResults().some(function(d){var v=d.results;return v?._automaticInsights});l&&i.use(Fs({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var i;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),(i=this.mainHelper)===null||i===void 0||i.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(a){var s=a.instance;s.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var i=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){i.status="stalled",i.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(i){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!this.mainHelper)throw new Error(Le("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var c=typeof i=="function"?i(this.mainIndex.getWidgetUiState({})):i;this.onStateChange&&s?this.onStateChange({uiState:c,setUiState:function(d){Mn(typeof d=="function"?d(c):d,a.mainIndex),a.scheduleSearch(),a.onInternalStateChange()}}):(Mn(c,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.started)throw new Error(Le("The `start` method needs to be called before `createURL`."));return this._createURL(i)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Le("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),r})(Xg),xe=function(t){return new zp(t)};xe.version=fu;xe.createInfiniteHitsSessionStorageCache=lt(Gg);xe.highlight=lt(Zo);xe.reverseHighlight=lt(eu);xe.snippet=lt(tu);xe.reverseSnippet=lt(ru);xe.insights=Io;xe.getInsightsAnonymousUserToken=Bg;
47Object.defineProperty(xe,"widgets",{get:function(){throw new ReferenceError(`"instantsearch.widgets" are not available from the ES build. 48 49To import the widgets: 50 51import { searchBox } from 'instantsearch.js/es/widgets'`)}});Object.defineProperty(xe,"connectors",{get:function(){throw new ReferenceError(`"instantsearch.connectors" are not available from the ES build. 52 53To import the connectors: 54 55import { connectSearchBox } from 'instantsearch.js/es/connectors'`)}});Object.defineProperty(xe,"templates",{get:function(){throw new ReferenceError(`"instantsearch.templates" are not available from the ES build. 56 57To import the templates: 58 59import { carousel } from 'instantsearch.js/es/templates'`)}});var Jp="4.21.3",du=function(e){var t;return _t(((t={mixins:[Y({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(r){st(!1),this.instantSearchInstance.helper.setClient(r).search()},indexName:function(r){this.instantSearchInstance.helper.setIndex(r||"").search()},compositionID:function(r){this.instantSearchInstance.helper.setIndex(r||"").search()},stalledSearchDelay:function(r){this.instantSearchInstance._stalledSearchDelay=r},routing:function(){throw new Error(`routing configuration can not be changed dynamically at this point. 60 61Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props`)},onStateChange:function(){throw new Error(`onStateChange configuration can not be changed dynamically at this point. 62 63Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props`)},searchFunction:function(r){this.instantSearchInstance._searchFunction=r},middlewares:{immediate:!0,handler:function(r,n){var i=this;(n||[]).filter(function(a){return(r||[]).indexOf(a)===-1}).forEach(function(a){i.instantSearchInstance.unuse(a)}),(r||[]).filter(function(a){return(n||[]).indexOf(a)===-1}).forEach(function(a){i.instantSearchInstance.use(a)})}},future:function(r){this.instantSearchInstance.future=Object.assign(hu,r)}},created:function(){var r=this.instantSearchInstance.client;typeof r.addAlgoliaAgent=="function"&&(r.addAlgoliaAgent("Vue ("+wu+")"),r.addAlgoliaAgent("Vue InstantSearch ("+Jp+")"))},mounted:function(){var r=this;this.$nextTick(function(){r.instantSearchInstance.started||r.instantSearchInstance.start()})}}).beforeUnmount=function(){this.instantSearchInstance.started&&this.instantSearchInstance.dispose(),this.instantSearchInstance.__initialSearchResults=void 0},t),e)},Qs=`Vue InstantSearch: You used the prop api-key or app-id. 64These have been replaced by search-client. 65 66See more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client`;const Gp=du({name:"AisInstantSearch",props:{searchClient:{type:Object,required:!0},insightsClient:{type:Function,default:void 0},indexName:{type:String,required:!1},compositionID:{type:String,required:!1},routing:{default:void 0,validator:function(e){return!(typeof e=="boolean"||!e.router&&!e.stateMapping)||(st("The `routing` option expects an object with `router` and/or `stateMapping`.\n\nSee https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-routing"),!1)}},insights:{default:void 0,validator:function(e){return e===void 0||typeof e=="boolean"||typeof e=="object"}},stalledSearchDelay:{type:Number,default:void 0},searchFunction:{type:Function,default:void 0},onStateChange:{type:Function,default:void 0},initialUiState:{type:Object,default:void 0},apiKey:{type:String,default:void 0,validator:function(e){return e&&st(Qs),!1}},appId:{type:String,default:void 0,validator:function(e){return e&&st(Qs),!1}},middlewares:{type:Array,default:null},future:{type:Object,default:void 0}},data:function(){return{instantSearchInstance:xe({searchClient:this.searchClient,insightsClient:this.insightsClient,insights:this.insights,indexName:this.indexName,compositionID:this.compositionID,routing:this.routing,
66stalledSearchDelay:this.stalledSearchDelay,searchFunction:this.searchFunction,onStateChange:this.onStateChange,initialUiState:this.initialUiState,future:this.future})}},render:dr(function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!1,t)},ni(this))})});du({name:"AisInstantSearchSsr",inject:{$_ais_ssrInstantSearchInstance:{default:function(){throw new Error("`createServerRootMixin` is required when using SSR.")}}},data:function(){return{instantSearchInstance:this.$_ais_ssrInstantSearchInstance}},render:dr(function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!0,t)},ni(this))})});ee({connector:rd},{$$widgetType:"ais.infiniteHits"}),Y({name:"InfiniteHits"});Y({name:"Menu"}),ee({connector:Ao},{$$widgetType:"ais.menu"}),Pe();Y({name:"MenuSelect"}),ee({connector:Ao},{$$widgetType:"ais.menuSelect"}),Pe();ee({connector:wd},{$$widgetType:"ais.numericMenu"}),Y({name:"NumericMenu"}),Pe();const mu={name:"AisPagination",mixins:[Y({name:"Pagination"}),ee({connector:Ad},{$$widgetType:"ais.pagination"}),Pe()],props:{padding:{type:Number,default:void 0,validator:function(e){return e>0}},totalPages:{type:Number,default:void 0,validator:function(e){return e>0}},showFirst:{type:Boolean,default:!0},showLast:{type:Boolean,default:!0},showNext:{type:Boolean,default:!0},showPrevious:{type:Boolean,default:!0}},computed:{widgetParams:function(){return{padding:this.padding,totalPages:this.totalPages}}},emits:["page-change"],methods:{refine:function(e){var t=Math.min(Math.max(e,0),this.state.nbPages-1);this.state.refine(t),this.$emit("page-change",t)}}};var Yp=["href"],Xp=["href"],Zp=["href","aria-label","onClick"],ev=["href"],tv=["aria-label","href"],rv=["aria-label"];function nv(e,t,r,n,i,a){var s;return e.state?(V(),G("div",{key:0,class:Q((s={},s[e.suit()]=!0,s[e.suit("","noRefinement")]=e.state.nbPages<=1,s))},[se(e.$slots,"default",{refine:a.refine,createURL:e.state.createURL,currentRefinement:e.state.currentRefinement,nbHits:e.state.nbHits,nbPages:e.state.nbPages,pages:e.state.pages,isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage},function(){var c,l,d,v;return[W("ul",{class:Q(e.suit("list"))},[r.showFirst?(V(),G("li",{key:0,class:Q((c={},c[e.suit("item")]=!0,c[e.suit("item","disabled")]=e.state.isFirstPage,c[e.suit("item","firstPage")]=!0,c))},[se(e.$slots,"first",{createURL:function(){return e.state.createURL(0)},isFirstPage:e.state.isFirstPage,refine:function(){return a.refine(0)}},function(){return[e.state.isFirstPage?(V(),G("span",{key:1,class:Q(e.suit("link")),"aria-label":"First Page"},"â¹â¹",2)):(V(),G("a",{key:0,class:Q(e.suit("link")),"aria-label":"First Page",href:e.state.createURL(0),onClick:t[0]||(t[0]=Ye(function(b){return a.refine(0)},["exact","left","prevent"]))},"â¹â¹",10,Yp))]})],2)):ue("",!0),r.showPrevious?(V(),G("li",{key:1,class:Q((l={},l[e.suit("item")]=!0,l[e.suit("item","disabled")]=e.state.isFirstPage,l[e.suit("item","previousPage")]=!0,l))},[se(e.$slots,"previous",{createURL:function(){return e.state.createURL(e.state.currentRefinement-1)},isFirstPage:e.state.isFirstPage,refine:function(){return a.refine(e.state.currentRefinement-1)}},function(){return[e.state.isFirstPage?(V(),G("span",{key:1,class:Q(e.suit("link")),"aria-label":"Previous Page"},"â¹",2)):(V(),G("a",{key:0,class:Q(e.suit("link")),"aria-label":"Previous Page",href:e.state.createURL(e.state.currentRefinement-1),onClick:t[1]||(t[1]=Ye(function(b){return a.refine(e.state.currentRefinement-1)},["exact","left","prevent"]))},"â¹",10,Xp))]})],2)):ue("",!0),(V(!0),G(Xe,null,Vs(e.state.pages,function(b){var h;return V(),G("li",{class:Q((h={},h[e.suit("item")]=!0,h[e.suit("item","page")]=!0,h[e.suit("item","selected")]=e.state.currentRefinement===b,h)),key:b},[se(e.$slots,"item",{page:b,createURL:function(){return e.state.createURL(b)},isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage,refine:function(){return a.refine(b)}},function(){return[W("a",{class:Q(e.suit("link")),href:e.state.createURL(b),"aria-label":"Page "+(b+1),onClick:Ye(function(f){return a.refine(b)},["exact","left","prevent"])},we(b+1),11,Zp)]})],2)}),128)),r.showNext?(V(),G("li",{key:2,class:Q((d={},d[e.suit("item")]=!0,d[e.suit("item","disabled")]=e.state.isLastPage,d[e.suit("item","nextPage")]=!0,d))},[se(e.$slots,"next",{createURL:function(){return e.state.createURL(e.state.currentRefinement+1)},isLastPage:e.state.isLastPage,refine:function(){return a.refine(e.state.currentRefinement+1)}},function(){return[e.state.isLastPage?(V(),G("span",{key:1,class:Q(e.suit("link")),"aria-label":"Next Page"},"âº",2)):(V(),G("a",{key:0,class:Q(e.suit("link")),"aria-label":"Next Page",href:e.state.createURL(e.state.currentRefinement+1),onClick:t[2]||(t[2]=Ye(function(b){return a.refine(e.state.currentRefinement+1)},["exact","left","prevent"]))},"âº",10,ev))]}
66)],2)):ue("",!0),r.showLast?(V(),G("li",{key:3,class:Q((v={},v[e.suit("item")]=!0,v[e.suit("item","disabled")]=e.state.isLastPage,v[e.suit("item","lastPage")]=!0,v))},[se(e.$slots,"last",{createURL:function(){return e.state.createURL(e.state.nbPages-1)},isLastPage:e.state.isLastPage,refine:function(){return a.refine(e.state.nbPages-1)}},function(){return[e.state.isLastPage?(V(),G("span",{key:1,class:Q(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages}," âºâº ",10,rv)):(V(),G("a",{key:0,class:Q(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages,href:e.state.createURL(e.state.nbPages-1),onClick:t[3]||(t[3]=Ye(function(b){return a.refine(e.state.nbPages-1)},["exact","left","prevent"]))},"âºâº",10,tv))]})],2)):ue("",!0)],2)]})],2)):ue("",!0)}mu.render=nv;Y({name:"Panel"}),vg();Y({name:"PoweredBy"});Y({name:"QueryRuleContext"}),ee({connector:ko},{$$widgetType:"ais.queryRuleContext"});Y({name:"QueryRuleCustomData"}),ee({connector:ko},{$$widgetType:"ais.queryRuleCustomData"});Y({name:"RangeInput"}),ee({connector:qd},{$$widgetType:"ais.rangeInput"}),Pe();Y({name:"RatingMenu"}),ee({connector:gm},{$$widgetType:"ais.ratingMenu"}),Pe();W("symbol",{id:"ais-RatingMenu-starSymbol",viewBox:"0 0 24 24"},[W("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"})],-1),W("symbol",{id:"ais-RatingMenu-starEmptySymbol",viewBox:"0 0 24 24"},[W("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"})],-1);W("use",{"xlink:href":"#ais-RatingMenu-starSymbol"},null,-1);W("use",{"xlink:href":"#ais-RatingMenu-starEmptySymbol"},null,-1);const yi={name:"SearchInput",mixins:[Y({name:"SearchBox"})],props:{placeholder:{type:String,default:"Search hereâ¦"},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!1},shouldShowLoadingIndicator:{type:Boolean,default:!1},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Search"},resetTitle:{type:String,default:"Clear"},value:{type:String,required:!1,default:void 0},modelValue:{type:String,required:!1,default:void 0}},emits:["input","update:modelValue","blur","focus","reset"],data:function(){return{query:""}},methods:{isFocused:function(){return document.activeElement===this.$refs.input},onInput:function(e){this.ignoreCompositionEvents&&e.isComposing||(this.$emit("input",e.target.value),this.$emit("update:modelValue",e.target.value))},onFormSubmit:function(){this.$refs.input.blur()},onFormReset:function(){this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("reset")}}};var iv=["placeholder","autofocus","value"],av=["title","hidden"],sv=[W("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"},null,-1)],ov=["title","hidden"],uv=[W("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"},null,-1)],cv=["hidden"],fv=["aria-hidden"],lv=[Bs('<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"></circle><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"></animateTransform></path></g></g>',1)];function hv(e,t,r,n,i,a){return V(),G("form",{action:"",role:"search",novalidate:"",class:Q(e.suit("form")),onSubmit:t[4]||(t[4]=Ye(function(){for(var s=[],c=arguments.length;c--;)s[c]=arguments[c];return a.onFormSubmit&&a.onFormSubmit.apply(a,s)},["prevent"])),onReset:t[5]||(t[5]=Ye(function(){for(var s=[],c=arguments.length;c--;)s[c]=arguments[c];return a.onFormReset&&a.onFormReset.apply(a,s)},["prevent"]))},[W("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:r.placeholder,autofocus:r.autofocus,class:Q(e.suit("input")),value:r.value||r.modelValue,onFocus:t[0]||(t[0]=function(s){return e.$emit("focus",s)}),onBlur:t[1]||(t[1]=function(s){return e.$emit("blur",s)}),onInput:t[2]||(t[2]=function(s){return a.onInput(s)}),onCompositionend:t[3]||(t[3]=function(s){return a.onInput(s)}),ref:"input"},null,42,iv),W("button",{type:"submit",title:r.submitTitle,class:Q(e.suit("submit")),hidden:r.showLoadingIndicator&&r.shouldShowLoadingIndicator},[se(e.$slots,"submit-icon",{},function(){return[(V(),G("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:Q(e.suit("submitIcon"))},sv,2))]})],10,av),W("button",{type:"reset",title:r.resetTitle,class:Q(e.suit("reset")),hidden:!r.value&&!r.modelValue||r.showLoadingIndicator&&r.shouldShowLoadingIndicator},[se(e.$slots,"reset-icon",{},function(){return[(V(),G("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:Q(e.suit("resetIcon")),width:"10"},uv,2))]})],10,ov),r.showLoadingIndicator?(V(),G("span",{key:0,hidden:!r.shouldShowLoadingIndicator,class:Q(e.suit("loadingIndicator"))},[se(e.$slots,"loading-indicator",{},function(){return[(V(),G("svg",{"aria-hidden":!r.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:Q(e.suit("loadingIcon"))},lv,10,fv))]}
66)],10,cv)):ue("",!0)],34)}yi.render=hv;var dv=function(){};const gu={name:"AisRefinementList",components:{SearchInput:yi,AisHighlight:pi},mixins:[Y({name:"RefinementList"}),ee({connector:Kd},{$$widgetType:"ais.refinementList"}),Pe()],props:{attribute:{type:String,required:!0},searchable:{type:Boolean,default:void 0},searchablePlaceholder:{type:String,required:!1,default:"Search hereâ¦"},operator:{default:"or",validator:function(e){return e==="and"||e==="or"},required:!1},limit:{type:Number,required:!1,default:void 0},showMoreLimit:{type:Number,required:!1,default:void 0},showMore:{type:Boolean,required:!1,default:!1},sortBy:{type:[Array,Function],required:!1,default:void 0},transformItems:{type:Function,required:!1,default:void 0}},data:function(){return{searchForFacetValuesQuery:""}},computed:{searchForFacetValues:{get:function(){return this.searchForFacetValuesQuery},set:function(e){this.state.searchForItems(e),this.searchForFacetValuesQuery=e}},toggleShowMore:function(){return this.state.toggleShowMore||dv},items:function(){return this.state.items.map(function(e){return Object.assign({},e,{_highlightResult:{item:{value:e.highlighted}}})})},widgetParams:function(){return{attribute:this.attribute,operator:this.operator,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,escapeFacetValues:!0,transformItems:this.transformItems}}},methods:{refine:function(e){this.state.refine(e),this.searchForFacetValuesQuery=""}}};var mv=["value","checked","onChange"],gv=["disabled"];function pv(e,t,r,n,i,a){var s=$t("search-input"),c=$t("ais-highlight");return e.state?(V(),G("div",{key:0,class:Q([e.suit(),a.items.length===0&&e.suit("","noRefinement")])},[se(e.$slots,"default",{items:a.items,refine:a.refine,searchForItems:e.state.searchForItems,searchForItemsQuery:i.searchForFacetValuesQuery,toggleShowMore:a.toggleShowMore,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,createURL:e.state.createURL,isFromSearch:e.state.isFromSearch,canRefine:e.state.canRefine,sendEvent:e.state.sendEvent},function(){var l;return[r.searchable?(V(),G("div",{key:0,class:Q(e.suit("searchBox"))},[ye(s,{modelValue:a.searchForFacetValues,"onUpdate:modelValue":t[0]||(t[0]=function(d){return a.searchForFacetValues=d}),"show-loading-indicator":!0,placeholder:r.searchablePlaceholder,"class-names":e.classNames},null,8,["modelValue","placeholder","class-names"])],2)):ue("",!0),e.state.isFromSearch&&a.items.length===0?se(e.$slots,"noResults",{key:1,query:a.searchForFacetValues},function(){return[W("div",{class:Q(e.suit("noResults"))},"No results.",2)]}):ue("",!0),a.items.length>0?(V(),G("ul",{key:2,class:Q(e.suit("list"))},[(V(!0),G(Xe,null,Vs(a.items,function(d){return V(),G("li",{class:Q([e.suit("item"),d.isRefined&&e.suit("item","selected")]),key:d.value},[se(e.$slots,"item",{item:d,refine:a.refine,createURL:e.state.createURL},function(){return[W("label",{class:Q(e.suit("label"))},[W("input",{class:Q(e.suit("checkbox")),type:"checkbox",value:d.value,checked:d.isRefined,onChange:function(v){return a.refine(d.value)}},null,42,mv),r.searchable?(V(),G("span",{key:0,class:Q(e.suit("labelText"))},[ye(c,{attribute:"item",hit:d},null,8,["hit"])],2)):(V(),G("span",{key:1,class:Q(e.suit("labelText"))},we(d.label),3)),W("span",{class:Q(e.suit("count"))},we(d.count),3)],2)]})],2)}),128))],2)):ue("",!0),r.showMore?(V(),G("button",{key:3,class:Q([e.suit("showMore"),(l={},l[e.suit("showMore","disabled")]=!e.state.canToggleShowMore,l)]),onClick:t[1]||(t[1]=function(){for(var d=[],v=arguments.length;v--;)d[v]=arguments[v];return a.toggleShowMore&&a.toggleShowMore.apply(a,d)}),disabled:!e.state.canToggleShowMore},[se(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},function(){return[Pt(" Show "+we(e.state.isShowingMore?"less":"more"),1)]})],10,gv)):ue("",!0)]})],2)):ue("",!0)}gu.render=pv;var Or;const pu=((Or={name:"AisStateResults",mixins:[ee({connector:!0}),Y({name:"StateResults"})],props:{catchError:{type:Boolean,default:!1}},data:function(){var e=this;return{renderFn:function(){var t=e.instantSearchInstance,r=t.status,n=t.error,i=e.getParentIndex().getResults(),a=e.getParentIndex().getHelper(),s=a?a.state:null;e.state={results:i,state:s,status:r,error:n}}}},created:function(){this.instantSearchInstance.addListener("render",this.renderFn),this.renderFn()}}).beforeUnmount=function(){this.widget&&(this.instantSearchInstance.removeListener("render",this.renderFn),this.errorFn&&this.instantSearchInstance.removeListener("error",this.errorFn))},Or.watch={catchError:{immediate:!0,handler:function(e){e?(this.errorFn=function(){},this.instantSearchInstance.addListener("error",this.errorFn)):this.errorFn&&(this.instantSearchInstance.removeListener("error",this.errorFn),this.errorFn=void 0)}}},Or.computed={stateResults:function(){var e=this.state,t=e.results,r=e.state,n=e.status,i=e.error;return _t({},t,{results:t,state:r,status:n,error:i})}},Or);var vv=W("p",null," Use this component to have a different layout based on a certain state. ",-1),yv=W("p",null,"Fill in the slot, and get access to the following things:",-1);function bv(e,t,r,n,i,a){return e.state&&e.state.state&&e.state.results?(V(),G("div",{key:0,class:Q(e.suit())},[se(e.$slots,"default",Pu(Ou(a.stateResults)),function(){return[vv,yv,W("pre",null,"results: "+we(Object.keys(e.state.results)),1),W("pre",null,"state: "+we(Object.keys(e.state.state)),1
66),W("pre",null,"status: "+we(e.state.status),1),W("pre",null,"error: "+we(e.state.error),1)]})],2)):ue("",!0)}pu.render=bv;const vu={name:"AisSearchBox",mixins:[ee({connector:em},{$$widgetType:"ais.searchBox"}),Y({name:"SearchBox"})],components:{SearchInput:yi},props:{placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!0},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Submit the search query"},resetTitle:{type:String,default:"Clear the search query"},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},queryHook:{type:Function,default:void 0}},data:function(){return{localValue:"",isVue2:Ic,isVue3:Ec}},computed:{widgetParams:function(){return{queryHook:this.queryHook}},isControlled:function(){return this.value!==void 0||this.modelValue!==void 0},model:function(){return this.value||this.modelValue},currentRefinement:{get:function(){this.isControlled&&this.model!==this.localValue&&(this.localValue=this.model,this.$emit("input",this.model),this.$emit("update:modelValue",this.model),this.state.refine(this.model));var e=this.$refs.searchInput;return e&&e.isFocused()?this.localValue:this.model||this.state.query||""},set:function(e){this.localValue=e,this.state.refine(e),this.isControlled&&(this.$emit("input",e),this.$emit("update:modelValue",e))}}}};function Sv(e,t,r,n,i,a){var s=$t("search-input");return e.state?(V(),G("div",{key:0,class:Q(e.suit())},[se(e.$slots,"default",{currentRefinement:a.currentRefinement,isSearchStalled:e.state.isSearchStalled,refine:e.state.refine},function(){return[ye(s,{onFocus:t[0]||(t[0]=function(c){return e.$emit("focus",c)}),onBlur:t[1]||(t[1]=function(c){return e.$emit("blur",c)}),onReset:t[2]||(t[2]=function(c){return e.$emit("reset")}),placeholder:r.placeholder,autofocus:r.autofocus,"show-loading-indicator":r.showLoadingIndicator,"should-show-loading-indicator":e.state.isSearchStalled,"ignore-composition-events":r.ignoreCompositionEvents,"submit-title":r.submitTitle,"reset-title":r.resetTitle,"class-names":e.classNames,modelValue:a.currentRefinement,"onUpdate:modelValue":t[3]||(t[3]=function(c){return a.currentRefinement=c}),ref:"searchInput"},ju({default:Ee(function(){return[i.isVue2?se(e.$slots,"loading-indicator",{key:0,slot:"loading-indicator"}):ue("",!0),i.isVue2?se(e.$slots,"submit-icon",{key:1,slot:"submit-icon"}):ue("",!0),i.isVue2?se(e.$slots,"reset-icon",{key:2,slot:"reset-icon"}):ue("",!0)]}),_:2},[i.isVue3?{name:"loading-indicator",fn:Ee(function(){return[se(e.$slots,"loading-indicator")]}),key:"0"}:void 0,i.isVue3?{name:"submit-icon",fn:Ee(function(){return[se(e.$slots,"submit-icon")]}),key:"1"}:void 0,i.isVue3?{name:"reset-icon",fn:Ee(function(){return[se(e.$slots,"reset-icon")]}),key:"2"}:void 0]),1032,["placeholder","autofocus","show-loading-indicator","should-show-loading-indicator","ignore-composition-events","submit-title","reset-title","class-names","modelValue"])]})],2)):ue("",!0)}vu.render=Sv;const ti={name:"AisSnippet",mixins:[Y({name:"Snippet"})],components:{AisHighlighter:Bo},props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"}}};function Rv(e,t,r,n,i,a){var s=$t("ais-highlighter");return V(),Ot(s,{hit:r.hit,attribute:r.attribute,"highlighted-tag-name":r.highlightedTagName,suit:e.suit,"highlight-property":"_snippetResult","pre-tag":"<mark>","post-tag":"</mark>"},null,8,["hit","attribute","highlighted-tag-name","suit"])}ti.render=Rv;Y({name:"SortBy"}),ee({connector:im},{$$widgetType:"ais.sortBy"}),Pe();const yu={name:"AisStats",mixins:[ee({connector:Rm},{$$widgetType:"ais.stats"}),Y({name:"Stats"})],computed:{sortedResultsSentence:function(){var e=this.state,t=e.nbHits,r=e.nbSortedHits,n="sorted out of "+t.toLocaleString();return r===0?"No relevant results "+n:r===1?"1 relevant result "+n:r>1?(r||0).toLocaleString()+" relevant results "+n:""},resultsSentence:function(){var e=this.state.nbHits;return e===0?"No results":e===1?"1 result":e>1?e.toLocaleString()+" results":""},widgetParams:function(){return{}}}};function wv(e,t,r,n,i,a){return e.state?(V(),G("div",{key:0,class:Q(e.suit())},[se(e.$slots,"default",$u(e.state,{results:e.state.instantSearchInstance.helper.lastResults}),function(){return[W("span",{class:Q(e.suit("text"))},[e.state.areHitsSorted?(V(),G(Xe,{key:0},[Pt(we(a.sortedResultsSentence),1)],64)):(V(),G(Xe,{key:1},[Pt(we(a.resultsSentence),1)],64)),Pt(" found in "+we(e.state.processingTimeMS.toLocaleStr
66ing())+"ms",1)],2)]})],2)):ue("",!0)}yu.render=wv;Y({name:"ToggleRefinement"}),ee({connector:Im},{$$widgetType:"ais.toggleRefinement"}),Pe();ee({connector:fg},{$$widgetType:"ais.voiceSearch"}),Y({name:"VoiceSearch"});Bs('<line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',5);W("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1);W("line",{x1:"12",y1:"19",x2:"12",y2:"23"},null,-1);W("line",{x1:"8",y1:"23",x2:"16",y2:"23"},null,-1);Y({name:"RelevantSort"}),ee({connector:mg},{$$widgetType:"ais.relevantSort"});const Pv={name:"AisDynamicWidgets",mixins:[ee({connector:Ll},{$$widgetType:"ais.dynamicWidgets"}),Y({name:"DynamicWidgets"})],props:{transformItems:{type:Function,default:void 0},facets:{type:Array,default:void 0},maxValuesPerFacet:{type:Number,default:void 0}},render:dr(function(e){var t=this,r=new Map;if((ni(this)||[]).forEach(function(i){var a=(function s(c){var l,d=c.props;if(d){if(d.attribute)return d.attribute;if(Array.isArray(d.attributes))return d.attributes[0]}if(l=c.children&&c.children.default&&c.children.default(),Array.isArray(l))return l.reduce(function(v,b){return v||s(b)},void 0)})(i);a&&r.set(a,e("div",{key:a,class:[t.suit("widget")]},[i]))}),!this.state){var n=[];return r.forEach(function(i){return n.push(i)}),e("div",_t({class:[this.suit()]},{attrs:{hidden:!0}}),n)}return e("div",{class:[this.suit()]},this.state.attributesToRender.map(function(i){return r.get(i)}))}),computed:{widgetParams:function(){return{transformItems:this.transformItems,facets:this.facets,maxValuesPerFacet:this.maxValuesPerFacet,widgets:[]}}}};Object.assign({},Pv,{name:"AisExperimentalDynamicWidgets",mounted:function(){st("Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.")}});const Ov={class:"relative bg-midnight"},jv={class:"py-4 px-4 bg-white"},$v={class:"text-gray-400"},_v={class:"mr-2 text-sm text-gray-400"},xv={class:"text-lg font-semibold"},Tv={__name:"SearchModal",props:{searchHost:{type:String,required:!0},searchKey:{type:String,required:!0}},emits:["searchReset"],setup(e,{emit:t}){const r=e,n=t,{searchClient:i}=_c(r.searchHost,r.searchKey,{placeholderSearch:!1,attributesToSnippet:["body:32","content:32"],finitePagination:!0}),a=Wr(!1),s=Iu(),c=p=>{a.value=!0,s.error(`Ett fel uppstod under sökningen. 67Var vänlig försök igen lite senare.`)},l=({instantSearchInstance:p})=>({subscribe(){p.addListener("error",c)},unsubscribe(){p.removeListener("error",c)}}),d=Wr(""),v=()=>{d.value="",n("searchReset")},b=()=>{const p=document.querySelector(".ais-Hits-item a");p&&p.click()},h=Wr(["count:desc","name:asc"]),f=p=>p.map(g=>({...g,label:u[g.label]})),u={arenas:"arena",arsenal_managers:"tränare",arsenal_players:"spelare",articles:"artikel",honours:"titel",matches:"match",opponent_managers:"motståndartränare",opponent_players:"motståndarspelare",pages:"sida",clubs:"klubb",countries:"land",meetup_locations:"plats",referees:"domare",seasons:"säsong",tags:"tagg",tournaments:"turnering"};return(p,g)=>(V(),Ot(Fu,{show:!0,onClose:v,size:"wide",position:"top",transparent:""},{default:Ee(()=>[ye(pe(Gp),{"index-name":"arsenal_main","search-client":pe(i),middlewares:[l],future:{preserveSharedStateOnUnmount:!0}},{default:Ee(()=>[ye(pe(yg),{hitsPerPage:10}),W("div",Ov,[ye(pe(Eu),{"stroke-width":"2",class:"absolute top-4 left-4 size-8 text-gold pointer-events-none"}),Lr(W("input",{type:"text",class:"block w-full pl-16 text-2xl py-4 px-6 border-0 text-gold bg-transparent placeholder:text-white/50 focus:outline-hidden focus:ring-0",placeholder:"Sök efter artiklar, spelare, matcher, m.m...","onUpdate:modelValue":g[0]||(g[0]=o=>d.value=o),onKeydown:g[1]||(g[1]=o=>o.key==="Enter"?b():null)},null,544),[[_u,d.value]]),W("button",{type:"button",class:"absolute top-5 right-5 text-white hover:text-gold focus-visible:text-gold focus-visible:outline-hidden focus-visible:ring-3 focus-visible:ring-gold transition ease-in-out duration-150",onClick:v},[ye(pe(Tu),{class:"size-6"})])]),Lr(ye(pe(vu),{modelValue:d.value,"onUpdate:modelValue":g[2]||(g[2]=o=>d.value=o)},null,8,["modelValue"]),[[bi,!1]]),ye(pe(pu),null,{default:Ee(({state:{query:o}})=>[Lr(W("div",jv,[ye(pe(yu),null,{default:Ee(({hitsPerPage:m,nbPages:y,nbHits:S,page:w,processingTimeMS:P,query:O})=>
67[W("span",null,we(S===0?"Inga":S.toLocaleString()),1),g[3]||(g[3]=W("span",null," träffar hittades ",-1)),W("span",$v,"pÃ¥ "+we(P.toLocaleString())+" ms",1)]),_:2},1024),ye(pe(gu),{attribute:"type","sort-by":h.value,"transform-items":f,class:"mt-4"},null,8,["sort-by"]),ye(pe(xg),null,{item:Ee(({item:m})=>[ye(pe(xu),{href:m.url,class:"block mt-4 py-3 px-4 bg-gray-100 hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-midnight",onClick:v},{default:Ee(()=>[W("h2",null,[W("span",_v,we(u[m.type]),1),W("span",xv,[ye(pe(pi),{hit:m,attribute:"title"},null,8,["hit"])])]),m.content!==null?(V(),Ot(pe(ti),{key:0,hit:m,attribute:"content"},null,8,["hit"])):ue("",!0),m.body!==null?(V(),Ot(pe(ti),{key:1,hit:m,attribute:"body"},null,8,["hit"])):ue("",!0)]),_:2},1032,["href"])]),_:1}),ye(pe(mu),{class:"mt-4"})],512),[[bi,o.length>0]])]),_:1})]),_:1},8,["search-client","middlewares"]),g[4]||(g[4]=W("div",{class:"hidden sm:block py-4 px-4 bg-white border-t-2 border-midnight"},[W("ul",{class:"flex items-center flex-wrap gap-y-4 gap-x-6"},[W("li",{class:"flex items-center gap-1"},[W("kbd",{class:"keyboard-shortcut"},[W("span",null,"Ctrl"),W("span",null,"K")]),W("span",{class:"text-sm text-gray-500"},"eller"),W("kbd",{class:"keyboard-shortcut"},[W("span",null,"â"),W("span",null,"K")]),W("span",{class:"text-sm text-gray-500"},"för att öppna sökrutan")]),W("li",{class:"flex items-center gap-1"},[W("kbd",{class:"keyboard-shortcut"},[W("span",null,"Enter")]),W("span",{class:"text-sm text-gray-500"},"för att öppna första träffen")]),W("li",{class:"flex items-center gap-1"},[W("kbd",{class:"keyboard-shortcut"},[W("span",null,"Esc")]),W("span",{class:"text-sm text-gray-500"},"för att stänga sökrutan")])])],-1))]),_:1}))}};export{Tv 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.