1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.client-B2WahaPH.js","assets/index-BYMDmAht.js","assets/vendor-react-DA8Lujin.js"])))=>i.map(i=>d[i]); 2import{_ as Ai}from"./preload-helper-SfjbEoU-.js";import{r as x,d as Qr,R as ss,b as ge,j as l}from"./vendor-react-DA8Lujin.js";import{h as kt,f as Ii,L as Q,g as pr,N as Kt,b as os,F as cs,a as Di,O as us,M as ls,o as fs,S as ds,p as hs,u as ms,i as ps}from"./vendor-remix-aZLWQpZ4.js";import{g as gs}from"./getSiteStructuredData-BNk572Gw.js";import{l as vs,j as Ve,A as ys,m as Ue,v as Hi,n as ae,g as bs}from"./fields-As-7qh33.js";import{M as xs}from"./Marquee-A4CmS-4X.js";import{a as js,b as Ss,c as ws,C as Rs,d as Ps}from"./CartTaxes-BsxXctGP.js";import{s as Os,a as Jt}from"./index-AOU6fkN6.js";import{i as Li,_ as Ui,F as Fe,A as Wi}from"./popover-DPtMcrlG.js";import{F as Ye}from"./dialog-C9mSU00Q.js";import{d as _s,a as Fs,W as U,w as sn}from"./index-C5vb0Ly3.js";import{c as W}from"./cn-DyVGX7hK.js";import{z as ki}from"./transition-BTUssWGo.js";import{L as Es}from"./index-DHIEoCPC.js";import{F as Tt,a as on}from"./ChevronUpIcon-DZjgR0yv.js";import{u as Qi,a as Cs}from"./useIsMobile-86l7qGL2.js";import{F as $s}from"./facebook-D0v3RGQI.js";import{F as gr}from"./ArrowRightIcon-BL5v0YA4.js";import{F as Mi}from"./ArrowLeftIcon-BPYvkq08.js";import{F as Ns}from"./ChevronRightIcon-CfIvJP_A.js";import{O as cn}from"./AnchorButton-pstYFzvW.js";import{S as Ze,P as Ts}from"./PromoImageContainer-ovK4B8HE.js";import{O as As,B as Ce,T as Is,f as Ds}from"./Button-CqnV55z2.js";import{I as Hs}from"./ImageContainer-LCFgQfh8.js";import{I as un}from"./image-C_B3Axqr.js";import{R as It}from"./RichText-DEyd07no.js";import{A as ln}from"./Accordion-CljY9njA.js";import{P as Bi,T as vr,O as fn}from"./LinkButton-BORquIvy.js";import{F as Ls}
2from"./TrashIcon-Bv69rkMb.js";import{C as et}from"./Container-BuPHfGGw.js";import{C as dn}from"./index-BHQFP89U.js";import{p as Us,c as ye,n as Zt,e as hn,s as Ws}from"./index-Bfhli2vg.js";import{F as ks}from"./ArrowUpRightIcon-Di9VyTRp.js";import{P as Qs}from"./ProductTile-BpVVuT2A.js";import{s as Ms}from"./index-DZWhRiKo.js";import{B as yr}from"./index-CcIvAvV7.js";import{a as Bs}from"./index-BRUnnzky.js";import{b as qs}from"./GAUtils-BjcvVRmX.js";import{A as Vs}from"./ActionToast-CDMkBXoM.js";try{let 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]="5bf916e9-e70a-4b22-89c4-94228217f9e0",e._sentryDebugIdIdentifier="sentry-dbid-5bf916e9-e70a-4b22-89c4-94228217f9e0")}catch{}function zs({title:e,titleId:t,...r},n){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const Ks=x.forwardRef(zs),Js=[{rel:"preconnect",href:"https://use.typekit.net",crossOrigin:"anonymous"},{rel:"preconnect",href:"https://p.typekit.net",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://use.typekit.net/yfh6vvz.css"}];function qi(e,t){x.useEffect(()=>{function r(n){const i=e.current;i&&(i.contains(n.target)||t())}return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}function Zs({title:e,titleId:t,...r},n){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const mn=x.forwardRef(Zs),br="7.16.2";function Z(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var Mr=Z;Z.prototype._events=void 0;Z.prototype._maxListeners=void 0;Z.defaultMaxListeners=10;Z.prototype.setMaxListeners=function(e){if(!Gs(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this};Z.prototype.emit=function(e){var t,r,n,i,a,s;if(this._events||(this._events={}),e==="error"&&(!this._events.error||tt(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var o=new Error('Uncaught, unspecified "error" event. ('+t+")");throw o.context=t,o}if(r=this._events[e],Vi(r))return!1;if(ve(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(tt(r))for(i=Array.prototype.slice.call(arguments,1),s=r.slice(),n=s.length,a=0;a<n;a++)s[a].apply(this,i);return!0};Z.prototype.addListener=function(e,t){var r;if(!ve(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,ve(t.listener)?t.listener:t),this._events[e]?tt(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,tt(this._events[e])&&!this._events[e].warned&&(Vi(this._maxListeners)?r=Z.defaultMaxListeners:r=this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace())),this};Z.prototype.on=Z.prototype.addListener;Z.prototype.once=function(e,t){if(!ve(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this};Z.prototype.removeListener=function(e,t){var r,n,i,a;if(!ve(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],i=r.length,n=-1,r===t||ve(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit
2("removeListener",e,t);else if(tt(r)){for(a=i;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;r.length===1?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this};Z.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events)t!=="removeListener"&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],ve(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this};Z.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:ve(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t};Z.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(ve(t))return 1;if(t)return t.length}return 0};Z.listenerCount=function(e,t){return e.listenerCount(t)};function ve(e){return typeof e=="function"}function Gs(e){return typeof e=="number"}function tt(e){return typeof e=="object"&&e!==null}function Vi(e){return e===void 0}const Xs=Qr(Mr);function Ys(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}var zi=Ys,eo=Mr,to=zi;function St(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}to(St,eo);St.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)};St.prototype.getModifiedState=function(e){return this.fn(e)};St.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)};var ro=St;function no(e){return typeof e!="string"?e:String(e).replace(/^-/,"\\-")}function io(e){return typeof e!="string"?e:e.replace(/^\\-/,"-")}var Br={escapeFacetValue:no,unescapeFacetValue:io};function ao(e){return typeof e=="object"&&e!==null?qr(Array.isArray(e)?[]:{},e):e}function Dt(e){return typeof e=="function"||Array.isArray(e)||Object.prototype.toString.call(e)==="[object Object]"}function qr(e,t){if(e===t)return e;for(var r in t)if(!(!Object.prototype.hasOwnProperty.call(t,r)||r==="__proto__"||r==="constructor")){var n=t[r],i=e[r];typeof i<"u"&&typeof n>"u"||(Dt(i)&&Dt(n)?e[r]=qr(i,n):e[r]=ao(n))}return e}function so(e){Dt(e)||(e={});for(var t=1,r=arguments.length;t<r;t++){var n=arguments[t];Dt(n)&&qr(e,n)}return e}var Vr=so;function oo(e){return e&&Object.keys(e).length>0}var zr=oo;function co(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 Kr=co;function ze(e){e=e||{},this.params=e.params||[]}ze.prototype={constructor:ze,addParams:function(e){var t=this.params.slice();return t.push(e),new ze({params:t})},removeParams:function(e){return new ze({params:this.params.filter(function(t){return t.$$id!==e})})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter(function(r){return t[r.$$id]===void 0}).map(function(r){var n=Object.assign({},r,{indexName:e,threshold:r.threshold||0});return delete n.$$id,n})}};var Ki=ze;function xr(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach(function(n){var i=n.$$id;r[i]=t[i],r._rawResults[i]=t[i]})}xr.prototype={constructor:xr};var Ji=xr,_t=Vr;function Ft(e){return Object.keys(e).sort().reduce(function(t,r){return t[r]=e[r],t},{})}var B={_getQueries:function(t,r){var n=[];return n.push({indexName:t,params:B._getHitsSearchParams(r)}
2),r.getRefinedDisjunctiveFacets().forEach(function(i){n.push({indexName:t,params:B._getDisjunctiveFacetSearchParams(r,i)})}),r.getRefinedHierarchicalFacets().forEach(function(i){var a=r.getHierarchicalFacetByName(i),s=r.getHierarchicalRefinement(i),o=r._getHierarchicalFacetSeparator(a);if(s.length>0&&s[0].split(o).length>1){var c=s[0].split(o).slice(0,-1).reduce(function(f,h,d){return f.concat({attribute:a.attributes[d],value:d===0?h:[f[f.length-1].value,h].join(o)})},[]);c.forEach(function(u,f){var h=B._getDisjunctiveFacetSearchParams(r,u.attribute,f===0);function d(m){return a.attributes.some(function(v){return v===m.split(":")[0]})}var p=(h.facetFilters||[]).reduce(function(m,v){if(Array.isArray(v)){var y=v.filter(function(b){return!d(b)});y.length>0&&m.push(y)}return typeof v=="string"&&!d(v)&&m.push(v),m},[]),g=c[f-1];f>0?h.facetFilters=p.concat(g.attribute+":"+g.value):p.length>0?h.facetFilters=p:delete h.facetFilters,n.push({indexName:t,params:h})})}}),n},_getCompositionQueries:function(t){return[{compositionID:t.index,requestBody:{params:B._getCompositionHitsSearchParams(t)}}]},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(B._getHitsHierarchicalFacetsAttributes(e)).sort(),r=B._getFacetFilters(e),n=B._getNumericFilters(e),i=B._getTagFilters(e),a={};return t.length>0&&(a.facets=t.indexOf("*")>-1?["*"]:t),i.length>0&&(a.tagFilters=i),r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n),Ft(_t({},e.getQueryParams(),a))},_getCompositionHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets.map(function(o){return e.disjunctiveFacetsRefinements&&e.disjunctiveFacetsRefinements[o]&&e.disjunctiveFacetsRefinements[o].length>0?"disjunctive("+o+")":o})).concat(B._getHitsHierarchicalFacetsAttributes(e)).sort(),r=B._getFacetFilters(e),n=B._getNumericFilters(e),i=B._getTagFilters(e),a={};t.length>0&&(a.facets=t.indexOf("*")>-1?["*"]:t),i.length>0&&(a.tagFilters=i),r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n);var s=e.getQueryParams();return delete s.highlightPreTag,delete s.highlightPostTag,delete s.index,Ft(_t({},s,a))},_getDisjunctiveFacetSearchParams:function(e,t,r){var n=B._getFacetFilters(e,t,r),i=B._getNumericFilters(e,t),a=B._getTagFilters(e),s={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};a.length>0&&(s.tagFilters=a);var o=e.getHierarchicalFacetByName(t);return o?s.facets=B._getDisjunctiveHierarchicalFacetAttribute(e,o,r):s.facets=t,i.length>0&&(s.numericFilters=i),n.length>0&&(s.facetFilters=n),Ft(_t({},e.getQueryParams(),s))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach(function(n){var i=e.numericRefinements[n]||{};
2Object.keys(i).forEach(function(a){var s=i[a]||[];t!==n&&s.forEach(function(o){if(Array.isArray(o)){var c=o.map(function(u){return n+a+u});r.push(c)}else r.push(n+a+o)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach(function(c){var u=i[c]||[];u.slice().sort().forEach(function(f){n.push(c+":"+f)})});var a=e.facetsExcludes||{};Object.keys(a).sort().forEach(function(c){var u=a[c]||[];u.sort().forEach(function(f){n.push(c+":-"+f)})});var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach(function(c){var u=s[c]||[];if(!(c===t||!u||u.length===0)){var f=[];u.slice().sort().forEach(function(h){f.push(c+":"+h)}),n.push(f)}});var o=e.hierarchicalFacetsRefinements||{};return Object.keys(o).sort().forEach(function(c){var u=o[c]||[],f=u[0];if(f!==void 0){var h=e.getHierarchicalFacetByName(c),d=e._getHierarchicalFacetSeparator(h),p=e._getHierarchicalRootPath(h),g,m;if(t===c){if(f.indexOf(d)===-1||!p&&r===!0||p&&p.split(d).length===f.split(d).length)return;p?(m=p.split(d).length-1,f=p):(m=f.split(d).length-2,f=f.slice(0,f.lastIndexOf(d))),g=h.attributes[m]}else m=f.split(d).length-1,g=h.attributes[m];g&&n.push([g+":"+f])}}),n},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return e.hierarchicalFacets.reduce(function(n,i){var a=e.getHierarchicalRefinement(i.name)[0];if(!a)return n.push(i.attributes[0]),n;var s=e._getHierarchicalFacetSeparator(i),o=a.split(s).length,c=i.attributes.slice(0,o+1);return n.concat(c)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(r===!0){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=e.getHierarchicalRefinement(t.name)[0]||"",o=s.split(n).length-1;return t.attributes.slice(0,o+1)},getSearchForFacetQuery:function(e,t,r,n){var i=n.isDisjunctiveFacet(e)?n.clearRefinements(e):n,a={facetQuery:t,facetName:e};return typeof r=="number"&&(a.maxFacetHits=r),Ft(_t({},B._getHitsSearchParams(i),a))}},uo=B,Jr=function(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(r,n){return Object.keys(Object(n)).forEach(function(i){n[i]!==void 0&&(r[i]!==void 0&&delete r[i],r[i]=n[i])}),r},{})},wt=function(t,r){if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(r(t[n]))return t[n]}};function lo(e,t){return e.filter(function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n})}var fo=lo;function Zi(e){if(typeof e=="number")return e;if(typeof e=="string")return parseFloat(e);if(Array.isArray(e))return e.map(Zi);throw new Error("The value should be a number, a parsable string or an array of those.")}var ho=Zi,mo=function(t){return t===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(t)},po=Jr,go=zr,vo=Kr,Oe={addRefinement:function(t,r,n){if(Oe.isRefined(t,r,n))return t;var i=""+n,a=t[r]?t[r].concat(i):[i],s={};return s[r]=a,po(s,t)},removeRefinement:function(t,r,n){if(n===void 0)return Oe.clearRefinement(t,function(a,s){return r===s});var i=""+n;return Oe.clearRefinement(t,function(a,s){return r===s&&i===a})},toggleRefinement:function(t,r,n){if(n===void 0)throw new Error("toggleRefinement should be used with a value");return Oe.isRefined(t,r,n)?Oe.removeRefinement(t,r,n):Oe.addRefinement(t,r,n)},clearRefinement:function(t,r,n){if(r===void 0)return go(t)?{}:t;if(typeof r=="string")return vo(t,[r]);if(typeof r=="function"){var i=!1,a=Object.keys(t).reduce(function(s,o){var c=t[o]||[],u=c.filter(function(f){return!r(f,o,n)});return u.length!==c.length&&(i=!0),s[o]=u,s},{});return i?a:t}},isRefined:function(t,r,n){var i=!!t[r]&&t[r].length>0;if(n===void 0||!i)return i;var a=""+n;return t[r].indexOf(a)!==-1}},yo=Oe,Gt=Jr,Gi=wt,pn=fo,jr=Vr,Sr=zr,gn=Kr,Xt=ho,bo=mo,k=yo;function Zr(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(r,n){return Zr(t[n],r)}):e===t}function xo(e,t){return Gi(e,function(r){return Zr(r,t)})}function ee(e){var t=e?ee._parseNumbers(e):{};t.userToken!==void 0&&!bo(t.userToken)&&console.warn("[algoliasearch-helper] The `userToken` parameter is invali
2d. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach(function(n){var i=ee.PARAMETERS.indexOf(n)!==-1,a=t[n]!==void 0;!i&&a&&(r[n]=t[n])})}ee.PARAMETERS=Object.keys(new ee);ee._parseNumbers=function(e){if(e instanceof ee)return e;var t={},r=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(r.forEach(function(i){var a=e[i];if(typeof a=="string"){var s=parseFloat(a);t[i]=isNaN(s)?a:s}}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(i){return Array.isArray(i)?i.map(function(a){return parseFloat(a)}):i})),e.numericRefinements){var n={};Object.keys(e.numericRefinements).forEach(function(i){var a=e.numericRefinements[i]||{};n[i]={},Object.keys(a).forEach(function(s){var o=a[s],c=o.map(function(u){return Array.isArray(u)?u.map(function(f){return typeof f=="string"?parseFloat(f):f}):typeof u=="string"?parseFloat(u):u});n[i][s]=c})}),t.numericRefinements=n}return jr(e,t)};ee.make=function(t){var r=new ee(t),n=t.hierarchicalFacets||[];return n.forEach(function(i){if(i.rootPath){var a=r.getHierarchicalRefinement(i.name);a.length>0&&a[0].indexOf(i.rootPath)!==0&&(r=r.clearRefinements(i.name)),a=r.getHierarchicalRefinement(i.name),a.length===0&&(r=r.toggleHierarchicalFacetRefinement(i.name,i.rootPath))}}),r};ee.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.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."):e.tagRefinements.length>0&&r.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."):e.numericFilters&&r.numericRefinements&&Sr(r.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."):Sr(e.numericRefinements)&&r.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};ee.prototype={constructor:ee,clearRefinements:function(t){var r={numericRefinements:this._clearNumericRefinements(t),facetsRefinements:k.clearRefinement(this.facetsRefinements,t,"conjunctiveFacet"),facetsExcludes:k.clearRefinement(this.facetsExcludes,t,"exclude"),disjunctiveFacetsRefinements:k.clearRefinement(this.disjunctiveFacetsRefinements,t,"disjunctiveFacet"),hierarchicalFacetsRefinements:k.clearRefinement(this.hierarchicalFacetsRefinements,t,"hierarchicalFacet")};return r.numericRefinements===this.numericRefinements&&r.facetsRefinements===this.facetsRefinements&&r.facetsExcludes===this.facetsExcludes&&r.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&r.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(r)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(t){return t===this.index?this:this.setQueryParameters({index:t})},setQuery:function(t){return t===this.query?this:this.setQueryParameters({query:t})},setPage:function(t){return t===this.page?this:this.setQueryParameters({page:t})},setFacets:function(t){return this.setQueryParameters({facets:t})},setDisjunctiveFacets:function(t){return this.setQueryParameters({disjunctiveFacets:t})},setHitsPerPage:function(t){return this.hitsPerPage===t?this:this.setQueryParameters({hitsPerPage:t})},setTypoTolerance:function(t){return this.typoTolerance===t?this:this.setQueryParameters({typoTolerance:t})},addNumericRefinement:function(e,t,r){var n=Xt(r);if(this.isNumericRefined(e,t,n))return this;var i=jr({},this.numericRefinements);return i[e]=jr({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)?this.facetsRefinements[e]||[]:[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)?this.disjunctiveFacetsRefinements[e]||[]:[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)?this.facetsExcludes[e]||[]:[]},removeNumericRefinement:function(e,t,r){var n=r;return n!==void 0?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===e&&i.op===t&&Zr(i.val,Xt(n))})}):this:t!==void 0?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===e&&i.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(t){if(t===void 0)return Sr(this.numericRefinements)?{}:this.numericRefinements;if(typeof t=="string")return gn(this.numericRefinements,[t]);if(typeof t=="function"){var r=!1,n=this.numericRefinements,i=Object.keys(n).reduce(function(a,s){var o=n[s],c={};return o=o||{}
2,Object.keys(o).forEach(function(u){var f=o[u]||[],h=[];f.forEach(function(d){var p=t({val:d,op:u},s,"numeric");p||h.push(d)}),h.length!==f.length&&(r=!0),c[u]=h}),a[s]=c,a},{});return r?i:this.numericRefinements}},addFacet:function(t){return this.isConjunctiveFacet(t)?this:this.setQueryParameters({facets:this.facets.concat([t])})},addDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([t])})},addHierarchicalFacet:function(t){if(this.isHierarchicalFacet(t.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+t.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([t])})},addFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return k.isRefined(this.facetsRefinements,t,r)?this:this.setQueryParameters({facetsRefinements:k.addRefinement(this.facetsRefinements,t,r)})},addExcludeRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return k.isRefined(this.facetsExcludes,t,r)?this:this.setQueryParameters({facetsExcludes:k.addRefinement(this.facetsExcludes,t,r)})},addDisjunctiveFacetRefinement:function(t,r){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return k.isRefined(this.disjunctiveFacetsRefinements,t,r)?this:this.setQueryParameters({disjunctiveFacetsRefinements:k.addRefinement(this.disjunctiveFacetsRefinements,t,r)})},addTagRefinement:function(t){if(this.isTagRefined(t))return this;var r={tagRefinements:this.tagRefinements.concat(t)};return this.setQueryParameters(r)},removeFacet:function(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(r){return r!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(r){return r!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(r){return r.name!==t})}):this},removeFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return k.isRefined(this.facetsRefinements,t,r)?this.setQueryParameters({facetsRefinements:k.removeRefinement(this.facetsRefinements,t,r)}):this},removeExcludeRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return k.isRefined(this.facetsExcludes,t,r)?this.setQueryParameters({facetsExcludes:k.removeRefinement(this.facetsExcludes,t,r)}):this},removeDisjunctiveFacetRefinement:function(t,r){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return k.isRefined(this.disjunctiveFacetsRefinements,t,r)?this.setQueryParameters({disjunctiveFacetsRefinements:k.removeRefinement(this.disjunctiveFacetsRefinements,t,r)}):this},removeTagRefinement:function(t){if(!this.isTagRefined(t))return this;var r={tagRefinements:this.tagRefinements.filter(function(n){return n!==t})};return this.setQueryParameters(r)},toggleRefinement:function(t,r){return this.toggleFacetRefinement(t,r)},toggleFacetRefinement:function(t,r){if(this.isHierarchicalFacet(t))return this.toggleHierarchicalFacetRefinement(t,r);if(this.isConjunctiveFacet(t))return this.toggleConjunctiveFacetRefinement(t,r);if(this.isDisjunctiveFacet(t))return this.toggleDisjunctiveFacetRefinement(t,r);throw new Error("Cannot refine the undeclared facet "+t+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:k.toggleRefinement(this.facetsRefinements,t,r)})},toggleExcludeFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:k.toggleRefinement(this.facetsExcludes,t,r)})},toggleDisjunctiveFacetRefinement:function(t,r){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:k.toggleRefinement(this.disjunctiveFacetsRefinements,t,r)})},toggleHierarchicalFacetRefinement:function(t,r){if(!this.isHierarchicalFacet(t))throw new Error(t+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(t)),i={},a=this.hierarchicalFacetsRefinements[t]!==void 0&&this.hierarchicalFacetsRefinements[t].length>0&&(this.hierarchicalFacetsRefinements[t][0]===r||this.hierarchicalFacetsRefinements[t][0].indexOf(r+n)===0);return a?r.indexOf(n)===-1?i[t]=[]:i[t]=[r.slice(0,r.lastIndexOf(n))]:i[t]=[r],this.setQueryParameters({hierarchicalFacetsRefinements:Gt(i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Gt(r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:Gt(t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(t){return this.isTagRefined(t)?this.removeTagRefinement(t):this.addTagRefinement(t)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return this.getHierarchicalFacetByName(e)!==void 0},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(t,r){return this.isConjunctiveFacet(t)?k.isRefined(this.facetsRefinements,t,r):!1},isExcludeRefined:function(t,r){return this.isConjunctiveFacet(t)?k.isRefined(this.facetsExcludes,t,r):!1},isDisjunctiveFacetRefined:function(t,r){return this.isDisjunctiveFacet(t)?k.isRefined(this.disjunctiveFacetsRefinements,t,r):!1},isHierarchicalFacetRefined:function(t,r){if(!this.isHierarchicalFacet(t))return!1;var n=this.getHierarchicalRefinement(t);return r?n.indexOf(r)!==-1:n.length>0},isNumericRefined:function(t,r,n){if(n===void 0&&r===void 0)return!!this.numericRefinements[t];var i=this.numericRefinements[t]&&this.numericRefinements[t][r]!==void 0;if(n===void 0||!i)return i;var a=Xt(n),s=xo(this.numericRefinements[t][r],a)!==void 0;return i&&s},isTagRefined:function(t){return this.tagRefinements.indexOf(t)!==-1},getRefinedDisjunctiveFacets:function(){var t=this,r=pn(Object.keys(this.numericRefinements).filter(function(n){return Object.keys(t.numericRefinements[n]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(n){return t.disjunctiveFacetsRefinements[n].length>0}).concat(r).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var t=this;return pn(this.hierarchicalFacets.map(function(r){return r.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(r){return t.hierarchicalFacetsRefinements[r].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return e.indexOf(t)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var t=this.managedParameters,r={},n=this;
2return Object.keys(this).forEach(function(i){var a=n[i];t.indexOf(i)===-1&&a!==void 0&&(r[i]=a)}),r},setQueryParameter:function(t,r){if(this[t]===r)return this;var n={};return n[t]=r,this.setQueryParameters(n)},setQueryParameters:function(t){if(!t)return this;var r=ee.validate(this,t);if(r)throw r;var n=this,i=ee._parseNumbers(t),a=Object.keys(this).reduce(function(o,c){return o[c]=n[c],o},{}),s=Object.keys(i).reduce(function(o,c){var u=o[c]!==void 0,f=i[c]!==void 0;return u&&!f?gn(o,[c]):(f&&(o[c]=i[c]),o)},a);return new this.constructor(s)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return typeof e.showParentLevel=="boolean"?e.showParentLevel:!0},getHierarchicalFacetByName:function(e){return Gi(this.hierarchicalFacets,function(t){return t.name===e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n=t.split(r);return n.map(function(i){return i.trim()})},toString:function(){return JSON.stringify(this,null,2)}};var Xi=ee,jo=function(t){return Array.isArray(t)?t.filter(Boolean):[]},So=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},wo=wt,Yi=function(t,r){var n=(r||[]).map(function(i){return i.split(":")});return t.reduce(function(a,s){var o=s.split(":"),c=wo(n,function(u){return u[0]===o[0]});return o.length>1||!c?(a[0].push(o[0]),a[1].push(o[1]),a):(a[0].push(c[0]),a[1].push(c[1]),a)},[[],[]])};function Ro(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(t,r){return Object.keys(Object(r)).forEach(function(n){var i=typeof t[n]=="number"?t[n]:0,a=r[n];a!==void 0&&a>=i&&(t[n]!==void 0&&delete t[n],t[n]=a)}),t},{})}var Po=Ro;function Oo(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=t!==void 0,a=t===null;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e<t||a&&r||!i)return-1}return 0}function _o(e,t,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var n=e.map(function(i,a){return{criteria:t.map(function(s){return i[s]}),index:a,value:i}});return n.sort(function(a,s){for(var o=-1;++o<a.criteria.length;){var c=Oo(a.criteria[o],s.criteria[o]);if(c)return o>=r.length?c:r[o]==="desc"?-c:c}return a.index-s.index}),n.map(function(i){return i.value})}var ea=_o,Fo=Ao,ta=Br,Eo=wt,Co=Yi,$o=ea,No=ta.escapeFacetValue,To=ta.unescapeFacetValue;function Ao(e){return function(r,n){var i=e.hierarchicalFacets[n],a=e.hierarchicalFacetsRefinements[i.name]&&e.hierarchicalFacetsRefinements[i.name][0]||"",s=e._getHierarchicalFacetSeparator(i),o=e._getHierarchicalRootPath(i),c=e._getHierarchicalShowParentLevel(i),u=Co(e._getHierarchicalFacetSortBy(i)),f=r.every(function(p){return p.exhaustive}),h=Io(u,s,o,c,a),d=r;return o&&(d=r.slice(o.split(s).length)),d.reduce(h,{name:e.hierarchicalFacets[n].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:f,data:null})}}function Io(e,t,r,n,i){return function(s,o,c){var u=s;if(c>0){var f=0;for(u=s;f<c;){var h=u&&Array.isArray(u.data)?u.data:[];u=Eo(h,function(p){return p.isRefined}),f++}}if(u){var d=Object.keys(o.data).map(function(p){return[p,o.data[p]]}).filter(function(p){var g=p[0];return Do(g,u.path||r,i,t,r,n)});u.data=$o(d.map(function(p){var g=p[0],m=p[1];return Ho(m,g,t,To(i),o.exhaustive)}),e[0],e[1])}return s}}function Do(e,t,r,n,i,a){return i&&(e.indexOf(i)!==0||i===e)?!1:!i&&e.indexOf(n)===-1||i&&e.split(n).length-i.split(n).length===1||e.indexOf(n)===-1&&r.indexOf(n)===-1||r.indexOf(e)===0||e.indexOf(t+n)===0&&(a||e.indexOf(r)===0)}function Ho(e,t,r,n,i){var a=t.split(r);return{name:a[a.length-1].trim(),path:t,escapedValue:No(t),count:e,isRefined:n===t||n.indexOf(t+r)===0,exhaustive:i,data:null}}var Yt=jo,Ge=Jr,ra=Br,oe=wt,We=So,Lo=Yi,vn=Po,na=ea,yn=ra.escapeFacetValue,ia=ra.unescapeFacetValue,Uo=Fo;function bn(e){var t={};return e.forEach(function(r,n){t[r]=n}),t}function er(e,t,r){t&&t[r]&&(e.stats=t[r])}function Wo(e,t){return oe(e,function(n){var i=n.attributes||[];return i.indexOf(t)>-1})}function Se(e,t,r){var n=t[0]||{};this._rawResults=t;var i=this;
2Object.keys(n).forEach(function(h){i[h]=n[h]});var a=Ge(r,{persistHierarchicalRootCount:!1});Object.keys(a).forEach(function(h){i[h]=a[h]}),this.processingTimeMS=t.reduce(function(h,d){return d.processingTimeMS===void 0?h:h+d.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map(function(){return[]}),this.facets=[];var s=e.getRefinedDisjunctiveFacets(),o=bn(e.facets),c=bn(e.disjunctiveFacets),u=1,f=n.facets||{};Object.keys(f).forEach(function(h){var d=f[h],p=Wo(e.hierarchicalFacets,h);if(p){var g=p.attributes.indexOf(h),m=We(e.hierarchicalFacets,function(S){return S.name===p.name});i.hierarchicalFacets[m][g]={attribute:h,data:d,exhaustive:n.exhaustiveFacetsCount}}else{var v=e.disjunctiveFacets.indexOf(h)!==-1,y=e.facets.indexOf(h)!==-1,b;v&&(b=c[h],i.disjunctiveFacets[b]={name:h,data:d,exhaustive:n.exhaustiveFacetsCount},er(i.disjunctiveFacets[b],n.facets_stats,h)),y&&(b=o[h],i.facets[b]={name:h,data:d,exhaustive:n.exhaustiveFacetsCount},er(i.facets[b],n.facets_stats,h))}}),this.hierarchicalFacets=Yt(this.hierarchicalFacets),s.forEach(function(h){var d=t[u],p=d&&d.facets?d.facets:{},g=e.getHierarchicalFacetByName(h);Object.keys(p).forEach(function(m){var v=p[m],y;if(g){y=We(e.hierarchicalFacets,function(R){return R.name===g.name});var b=We(i.hierarchicalFacets[y],function(R){return R.attribute===m});if(b===-1)return;i.hierarchicalFacets[y][b].data=i.persistHierarchicalRootCount?vn(i.hierarchicalFacets[y][b].data,v):Ge(v,i.hierarchicalFacets[y][b].data)}else{y=c[m];var S=n.facets&&n.facets[m]||{};i.disjunctiveFacets[y]={name:m,data:vn(S,v),exhaustive:d.exhaustiveFacetsCount},er(i.disjunctiveFacets[y],d.facets_stats,m),e.disjunctiveFacetsRefinements[m]&&e.disjunctiveFacetsRefinements[m].forEach(function(R){!i.disjunctiveFacets[y].data[R]&&e.disjunctiveFacetsRefinements[m].indexOf(ia(R))>-1&&(i.disjunctiveFacets[y].data[R]=0)})}}),u++}),e.getRefinedHierarchicalFacets().forEach(function(h){var d=e.getHierarchicalFacetByName(h),p=e._getHierarchicalFacetSeparator(d),g=e.getHierarchicalRefinement(h);g.length===0||g[0].split(p).length<2||t.slice(u).forEach(function(m){var v=m&&m.facets?m.facets:{};Object.keys(v).forEach(function(y){var b=v[y],S=We(e.hierarchicalFacets,function($){return $.name===d.name}),R=We(i.hierarchicalFacets[S],function($){return $.attribute===y});if(R!==-1){var P={};if(g.length>0&&!i.persistHierarchicalRootCount){var C=g[0].split(p)[0];P[C]=i.hierarchicalFacets[S][R].data[C]}i.hierarchicalFacets[S][R].data=Ge(P,b,i.hierarchicalFacets[S][R].data)}}),u++})}),Object.keys(e.facetsExcludes).forEach(function(h){var d=e.facetsExcludes[h],p=o[h];i.facets[p]={name:h,data:f[h],exhaustive:n.exhaustiveFacetsCount},d.forEach(function(g){i.facets[p]=i.facets[p]||{name:h},i.facets[p].data=i.facets[p].data||{},i.facets[p].data[g]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(Uo(e)),this.facets=Yt(this.facets),this.disjunctiveFacets=Yt(this.disjunctiveFacets),this._state=e}Se.prototype.getFacetByName=function(e){function t(r){return r.name===e}return oe(this.facets,t)||oe(this.disjunctiveFacets,t)||oe(this.hierarchicalFacets,t)};function ko(e,t){function r(f){return f.name===t}if(e._state.isConjunctiveFacet(t)){var n=oe(e.facets,r);return n?Object.keys(n.data).map(function(f){var h=yn(f);return{name:f,escapedValue:h,count:n.data[f],isRefined:e._state.isFacetRefined(t,h),isExcluded:e._state.isExcludeRefined(t,f)}}):[]}else if(e._state.isDisjunctiveFacet(t)){var i=oe(e.disjunctiveFacets,r);return i?Object.keys(i.data).map(function(f){var h=yn(f);return{name:f,escapedValue:h,count:i.data[f],isRefined:e._state.isDisjunctiveFacetRefined(t,h)}}):[]}else if(e._state.isHierarchicalFacet(t)){var a=oe(e.hierarchicalFacets,r);if(!a)return a;var s=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(s),c=ia(e._state.getHierarchicalRefinement(t)[0]||"");c.indexOf(s.rootPath)===0&&(c=c.replace(s.rootPath+o,""));var u=c.split(o);return u.unshift(t),aa(a,u,0),a}}function aa(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach(function(n){aa(n,t,r+1)})}function sa(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||t.data.length===0)return t;var i=t.data.map(function(o){return sa(e,o,r,n+1)}),a=e(i,r[n]),s=Ge({data:a},t);return s}
2Se.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function Qo(e,t){return t.sort(e)}function Mo(e,t){var r=[],n=[],i=t.hide||[],a=t.order||[],s=a.reduce(function(u,f,h){return u[f]=h,u},{});e.forEach(function(u){var f=u.path||u.name,h=i.indexOf(f)>-1;!h&&s[f]!==void 0?r[s[f]]=u:h||n.push(u)}),r=r.filter(function(u){return u});var o=t.sortRemainingBy,c;return o==="hidden"?r:(o==="alpha"?c=[["path","name"],["asc","asc"]]:c=[["count"],["desc"]],r.concat(na(n,c[0],c[1])))}function Bo(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}Se.prototype.getFacetValues=function(e,t){var r=ko(this,e);if(r){var n=Ge(t,{sortBy:Se.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),i=this,a;if(Array.isArray(r))a=[e];else{var s=i._state.getHierarchicalFacetByName(r.name);a=s.attributes}return sa(function(o,c){if(n.facetOrdering){var u=Bo(i,c);if(u)return Mo(o,u)}if(Array.isArray(n.sortBy)){var f=Lo(n.sortBy,Se.DEFAULT_SORT);return na(o,f[0],f[1])}else if(typeof n.sortBy=="function")return Qo(n.sortBy,o);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},r,a)}};Se.prototype.getFacetStats=function(e){if(this._state.isConjunctiveFacet(e))return xn(this.facets,e);if(this._state.isDisjunctiveFacet(e))return xn(this.disjunctiveFacets,e)};function xn(e,t){var r=oe(e,function(n){return n.name===t});return r&&r.stats}Se.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach(function(n){e.facetsRefinements[n].forEac
2h(function(i){r.push(tr(e,"facet",n,i,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(n){e.facetsExcludes[n].forEach(function(i){r.push(tr(e,"exclude",n,i,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(n){e.disjunctiveFacetsRefinements[n].forEach(function(i){r.push(tr(e,"disjunctive",n,i,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(n){e.hierarchicalFacetsRefinements[n].forEach(function(i){r.push(qo(e,n,i,t.hierarchicalFacets))})}),Object.keys(e.numericRefinements).forEach(function(n){var i=e.numericRefinements[n];Object.keys(i).forEach(function(a){i[a].forEach(function(s){r.push({type:"numeric",attributeName:n,name:s,numericValue:s,operator:a})})})}),e.tagRefinements.forEach(function(n){r.push({type:"tag",attributeName:"_tags",name:n})}),r};function tr(e,t,r,n,i){var a=oe(i,function(c){return c.name===r}),s=a&&a.data&&a.data[n]?a.data[n]:0,o=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:o}}function qo(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),o=oe(n,function(d){return d.name===t}),c=s.reduce(function(d,p){var g=d&&oe(d.data,function(m){return m.name===p});return g!==void 0?g:d},o),u=c&&c.count||0,f=c&&c.exhaustive||!1,h=c&&c.path||"";return{type:"hierarchical",attributeName:t,name:h,count:u,exhaustive:f}}var oa=Se,Vo=function(t){return t.reduce(function(r,n){return r.concat(n)},[])},zo=wt,Ko=Vo;function Jo(e,t){var r=[];return Object.keys(e).forEach(function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})}),r.sort(function(n,i){return n.avgOfIndices>i.avgOfIndices?1:-1})}function Zo(e,t){var r={};t.forEach(function(a){a.forEach(function(s,o){e.includes(s.objectID)||(r[s.objectID]?r[s.objectID]={indexSum:r[s.objectID].indexSum+o,count:r[s.objectID].count+1}:r[s.objectID]={indexSum:o,count:1})})});var n=Jo(r,t.length),i=n.reduce(function(a,s){var o=zo(Ko(t),function(c){return c.objectID===s.objectID});return o?a.concat(o):a},[]);return i}var Go=Zo,ca="3.26.0",Xo=Mr,Yo=ro,ua=Br.escapeFacetValue,ec=zi,tc=Vr,rc=zr,nc=Kr,la=Ki,ic=Ji,we=uo,Gr=Xi,wr=oa,ac=Go,fa=ca;function w(e,t,r,n){typeof e.addAlgoliaAgent=="function"&&e.addAlgoliaAgent("JS Helper ("+fa+")"),this.setClient(e);var i=r||{};i.index=t,this.state=Gr.make(i),this.recommendState=new la({params:i.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=n,this._recommendCache={}}ec(w,Xo);w.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this};w.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this};w.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this};w.prototype.recommend=function(){return this._recommend(),this};w.prototype.getQuery=function(){var e=this.state;return we._getHitsSearchParams(e)};w.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=we._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),t){this.client.search(n).then(function(a){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),t(null,new wr(r,a.results),r)}).catch(function(a){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),t(a,null,r)});return}return this.client.search(n).then(function(a){return i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),{content:new wr(r,a.results),state:r,_originalResponse:a}},function(a){throw i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),a})};w.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=tc({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:nc(we._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="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(a);var s=this.client.initIndex(n.index);if(typeof s.findAnswers!="function")throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)};w.prototype.searchForFacetValues=function(e,t,r,n){var i=typeof this.client.searchForFacetValues=="function"&&typeof this.client.searchForFacets!="function",a=typeof this.client.initIndex=="function";if(!i&&!a&&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 s=this.state.setQueryParameters(n||{}),o=s.isDisjunctiveFacet(e),c=we.getSearchForFacetQuery(e,t,r,s);this._currentNbQueries++;var u=this,f;i?f=this.client.searchForFacetValues([{indexName:s.index,params:c}]):a?f=this.client.initIndex(s.index).searchForFacetValues(c):(delete c.facetName,f=this.client.search([{type:"facet",facet:e,indexName:s.index,params:c}]).then(function(p){return p.results[0]}
2)),this.emit("searchForFacetValues",{state:s,facet:e,query:t});var h=this.lastResults&&this.lastResults.index===s.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[e]&&this.lastResults.renderingContent.facetOrdering.values[e].hide||[];return f.then(function(p){return u._currentNbQueries--,u._currentNbQueries===0&&u.emit("searchQueueEmpty"),p=Array.isArray(p)?p[0]:p,p.facetHits.forEach(function(g,m){if(h.indexOf(g.value)>-1){p.facetHits.splice(m,1);return}g.escapedValue=ua(g.value),g.isRefined=o?s.isDisjunctiveFacetRefined(e,g.escapedValue):s.isFacetRefined(e,g.escapedValue)}),p},function(d){throw u._currentNbQueries--,u._currentNbQueries===0&&u.emit("searchQueueEmpty"),d})};w.prototype.searchForCompositionFacetValues=function(e,t,r,n){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 i=this.state.setQueryParameters(n||{}),a=i.isDisjunctiveFacet(e);this._currentNbQueries++;var s=this,o;return o=this.client.searchForFacetValues({compositionID:i.index,facetName:e,searchForFacetValuesRequest:{params:{query:t,maxFacetHits:r,searchQuery:we._getCompositionHitsSearchParams(i)}}}),this.emit("searchForFacetValues",{state:i,facet:e,query:t}),o.then(function(u){return s._currentNbQueries--,s._currentNbQueries===0&&s.emit("searchQueueEmpty"),u=u.results[0],u.facetHits.forEach(function(f){f.escapedValue=ua(f.value),f.isRefined=a?i.isDisjunctiveFacetRefined(e,f.escapedValue):i.isFacetRefined(e,f.escapedValue)}),u},function(c){throw s._currentNbQueries--,s._currentNbQueries===0&&s.emit("searchQueueEmpty"),c})};w.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this};w.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this};w.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this};w.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this};w.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)};w.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this};w.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this};w.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this};w.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)};w.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this};w.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)};w.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this};w.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this};w.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this};w.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this};w.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this};w.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this};w.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this};w.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this};w.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)};w.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this};w.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this};w.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)};w.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this};w.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)};w.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this};w.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParam
2s(e)}),this};w.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};w.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};w.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};w.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};w.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this};w.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)};w.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)};w.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this};w.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)};w.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this};w.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)};w.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)};function da(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}w.prototype.setCurrentPage=da;w.prototype.setPage=da;w.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this};w.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this};w.prototype.setState=function(e){return this._change({state:Gr.make(e),isPageReset:!1}),this};w.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new Gr(e),this};w.prototype.hasRefinements=function(e){return rc(this.state.getNumericRefinements(e))?!0:this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):this.state.isHierarchicalFacet(e)?this.state.isHierarchicalFacetRefined(e):!1}
2;w.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)};w.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)};w.prototype.hasTag=function(e){return this.state.isTagRefined(e)};w.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)};w.prototype.getIndex=function(){return this.state.index};function ha(){return this.state.page}w.prototype.getCurrentPage=ha;w.prototype.getPage=ha;w.prototype.getTags=function(){return this.state.tagRefinements};w.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e)){var r=this.state.getConjunctiveRefinements(e);r.forEach(function(s){t.push({value:s,type:"conjunctive"})});var n=this.state.getExcludeRefinements(e);n.forEach(function(s){t.push({value:s,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(e)){var i=this.state.getDisjunctiveRefinements(e);i.forEach(function(s){t.push({value:s,type:"disjunctive"})})}var a=this.state.getNumericRefinements(e);return Object.keys(a).forEach(function(s){var o=a[s];t.push({value:o,operator:s,type:"numeric"})}),t};w.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)};w.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)};w.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=we._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map(function(o){var c=o.getModifiedState(t),u=c.index?we._getQueries(c.index,c):[];return r.push({state:c,queriesCount:u.length,helper:o}),o.emit("search",{state:c,results:o.lastResults}),u}),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(o){this.emit("error",{error:o})}};w.prototype._runComposition=function(){var e=this.state,t=[],r=[],n=this.derivedHelpers.map(function(o){var c=o.getModifiedState(e),u=we._getCompositionQueries(c);return t.push({state:c,queriesCount:u.length,helper:o}),o.emit("search",{state:c,results:o.lastResults}),u}),i=Array.prototype.concat.apply(r,n),a=this._queryId++;if(this._currentNbQueries++,!i.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,t,a));if(i.length>1)throw new Error("Only one query is allowed when using a composition.");var s=i[0];try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,t,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(o){this.emit("error",{error:o})}};w.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map(function(u){return u.$$id});this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var a=this._recommendCache,s=this.derivedHelpers.map(function(u){var f=u.getModifiedState(e).index;if(!f)return[];var h=u.getModifiedRecommendState(new la);return n.push({state:h,index:f,helper:u}),i=Array.prototype.concat.apply(i,h.params.map(function(d){return d.$$id})),u.emit("fetch",{recommend:{state:h,results:u.lastRecommendResults}}),h._buildQueries(f,a)}),o=Array.prototype.concat.apply(this.recommendState._buildQueries(r,a),s);if(o.length!==0){if(o.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 c=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(o).then(this._dispatchRecommendResponse.bind(this,c,n,i)).catch(this._dispatchRecommendError.bind(this,c))}catch(u){this.emit("error",{error:u})}}};w.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,this._currentNbQueries===0&&this.emit
2("searchQueueEmpty");var i=r.results.slice(),a=Object.keys(r).reduce(function(s,o){return o!=="results"&&(s[o]=r[o]),s},{});Object.keys(a).length<=0&&(a=void 0),e.forEach(function(s){var o=s.state,c=s.queriesCount,u=s.helper,f=i.splice(0,c);if(!o.index){u.emit("result",{results:null,state:o});return}u.lastResults=new wr(o,f,n._searchResultsOptions),a!==void 0&&(u.lastResults._rawContent=a),u.emit("result",{results:u.lastResults,state:o})})}};w.prototype._dispatchRecommendResponse=function(e,t,r,n){if(!(e<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty");var i=this._recommendCache,a={};r.filter(function(o){return i[o]===void 0}).forEach(function(o,c){a[o]||(a[o]=[]),a[o].push(c)}),Object.keys(a).forEach(function(o){var c=a[o],u=n.results[c[0]];if(c.length===1){i[o]=u;return}i[o]=Object.assign({},u,{hits:ac(r,c.map(function(f){return n.results[f].hits}))})});var s={};r.forEach(function(o){s[o]=i[o]}),t.forEach(function(o){var c=o.state,u=o.helper;if(!o.index){u.emit("recommend:result",{results:null,state:c});return}u.lastRecommendResults=new ic(c,s),u.emit("recommend:result",{recommend:{results:u.lastRecommendResults,state:c}})})}};w.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))};w.prototype._dispatchRecommendError=function(e,t){e<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,this.emit("error",{error:t}),this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty"))};w.prototype.containsRefinement=function(e,t,r,n){return e||t.length!==0||r.length!==0||n.length!==0};w.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0};w.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))};w.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))};w.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this};w.prototype.setClient=function(e){return this.client===e?this:(typeof e.addAlgoliaAgent=="function"&&e.addAlgoliaAgent("JS Helper ("+fa+")"),this.client=e,this)};w.prototype.getClient=function(){return this.client};w.prototype.derive=function(e,t){var r=new Yo(this,e,t);return this.derivedHelpers.push(r),r};w.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(t===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)};w.prototype.hasPendingRequests=function(){return this._currentNbQueries>0};var sc=w,ma=sc,oc=Ki,cc=Ji,uc=Xi,lc=oa;function $e(e,t,r,n){return new ma(e,t,r,n)}$e.version=ca;$e.AlgoliaSearchHelper=ma;$e.SearchParameters=uc;$e.RecommendParameters=oc;$e.SearchResults=lc;$e.RecommendResults=cc;var fc=$e;const J=Qr(fc);var dc=0;function hc(e){e.dependsOn==="recommend"&&(e.$$id=dc++)}function re(){}function mc(e){return Object.prototype.toString.call(e).slice(8,-1)}function pa(e,t){if(e===void 0||typeof e!="function")throw new Error("The render function is not valid (received type ".concat(mc(e),`). 3 4`).concat(t))}var pc={"&":"&","<":"<",">":">",'"':""","'":"'"},ga=/[&<>"']/g,gc=RegExp(ga.source);function vc(e){return e&&gc.test(e)?e.replace(ga,function(t){return pc[t]}):e}var yc={"&":"&","<":"<",">":">",""":'"',"'":"'"},va=/&(amp|quot|lt|gt|#39);/g,bc=RegExp(va.source);function xc(e){return e&&bc.test(e)?e.replace(va,function(t){return yc[t]}):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)}
4function jc(e){return e===null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Sc(e){return Rr(e)==="object"&&e!==null}function ya(e){if(!Sc(e)||jc(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 rt(e){"@babel/helpers - typeof";return rt=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},rt(e)}function wc(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function Pr(){return Pr=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},Pr.apply(this,arguments)}function jn(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?jn(Object(r),!0).forEach(function(n){ba(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ba(e,t,r){return t=Rc(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rc(e){var t=Pc(e,"string");return rt(t)=="symbol"?t:String(t)}function Pc(e,t){if(rt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ht={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},te={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function Oc(e){return vc(e).replace(new RegExp(Ht.highlightPreTag,"g"),te.highlightPreTag).replace(new RegExp(Ht.highlightPostTag,"g"),te.highlightPostTag)}function Lt(e){return ya(e)&&typeof e.value!="string"?Object.keys(e).reduce(function(t,r){return Et(Et({},t),{},ba({},r,Lt(e[r])))},{}):Array.isArray(e)?e.map(Lt):Et(Et({},e),{},{value:Oc(e.value)})}function _c(e){return e.__escaped===void 0&&(e=e.map(function(t){var r=Pr({},(wc(t),t));return r._highlightResult&&(r._highlightResult=Lt(r._highlightResult)),r._snippetResult&&(r._snippetResult=Lt(r._snippetResult)),r}),e.__escaped=!0),e}function xa(e){var t=te.highlightPreTag,r=te.highlightPostTag;return e.map(function(n){return n.isHighlighted?t+n.value+r:n.value}).join("")}function ja(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function Sn(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 rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sn(Object(r),!0).forEach(function(n){Fc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fc(e,t,r){return t=Ec(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ec(e){var t=Cc(e,"string");return Ie(t)=="symbol"?t:String(t)}function Cc(e,t){if(Ie(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ie(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $c(e,t){return Ic(e)||Ac(e,t)||Tc(e,t)||Nc()}function Nc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tc(e,t){if(e){if(typeof e=="string")return wn(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 wn(e,t)}}function wn(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 Ac(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}
5finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Ic(e){if(Array.isArray(e))return e}function Ie(e){"@babel/helpers - typeof";return Ie=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},Ie(e)}function Dc(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<Math.ceil(e.length/t);n++)r.push(e.slice(n*t,(n+1)*t));return r}function Sa(e){var t=e.helper,r=e.widgetType;e.methodName;var n=e.args,i=e.instantSearchInstance;if(n.length===1&&Ie(n[0])==="object")return[n[0]];var a=n[0].split(":"),s=$c(a,2),o=s[0],c=s[1],u=n[1],f=n[2],h=n[3]||{};if(!u)return[];if((o==="click"||o==="conversion")&&!f)return[];var d=Array.isArray(u)?u:[u];if(d.length===0)return[];var p=d[0].__queryID,g=Dc(d),m=g.map(function(y){return y.map(function(b){return b.objectID})}),v=g.map(function(y){return y.map(function(b){return b.__position})});return o==="view"?i.status!=="idle"?[]:g.map(function(y,b){var S;return{insightsMethod:"viewedObjectIDs",widgetType:r,eventType:o,payload:rr({eventName:f||"Hits Viewed",index:((S=t.lastResults)===null||S===void 0?void 0:S.index)||t.state.index,objectIDs:m[b]},h),hits:y,eventModifier:c}}):o==="click"?g.map(function(y,b){var S;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:r,eventType:o,payload:rr({eventName:f||"Hit Clicked",index:((S=t.lastResults)===null||S===void 0?void 0:S.index)||t.state.index,queryID:p,objectIDs:m[b],positions:v[b]},h),hits:y,eventModifier:c}}):o==="conversion"?g.map(function(y,b){var S;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:r,eventType:o,payload:rr({eventName:f||"Hit Converted",index:((S=t.lastResults)===null||S===void 0?void 0:S.index)||t.state.index,queryID:p,objectIDs:m[b]},h),hits:y,eventModifier:c}}):[]}function Hc(e){var t=e.instantSearchInstance,r=e.helper,n=e.widgetType,i={},a=void 0,s=function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];var h=Sa({widgetType:n,helper:r,methodName:"sendEvent",args:u,instantSearchInstance:t});h.forEach(function(d){d.eventType==="click"&&d.eventModifier==="internal"&&i[d.eventType]||(i[d.eventType]=!0,t.sendEventToInsights(d))}),clearTimeout(a),a=setTimeout(function(){i={}},0)};return s}function Lc(e){var t=e.helper,r=e.widgetType,n=e.instantSearchInstance,i=function(){for(var s=arguments.length,o=new Array(s),c=0;c<s;c++)o[c]=arguments[c];var u=Sa({widgetType:r,helper:t,methodName:"bindEvent",args:o,instantSearchInstance:n});return u.length?"data-insights-event=".concat(ja(u)):""};return i}function ne(e){return e.$$type==="ais.index"}function Or(e,t){var r=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:r})),t.getWidgets().filter(ne).forEach(function(n){return Or(e,n)})}var Uc=Promise.resolve();function ke(e){var t=null,r=!1,n=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];t===null&&(t=Uc.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 Wc(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 Rt(){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 Wc(i)}).join(", ");return function(i){return[i,"See documentation: ".concat(n)].filter(Boolean).join(` 6 7`)}}function Rn(e,t){for(var r,n=0;n<e.length;n++)if(r=e[n],t(r,n,e))return r}function kc(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 Pn(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],o=r[a]||n[a];return[s,o]}else return[e.applicationID,e.apiKey]}function wa(e){var t=te.highlightPostTag,r=te.highlightPreTag,n=e.split(r),i=n.shift(),a=i?[{value:i,isHighlighted:!1}]:[];
7return n.forEach(function(s){var o=s.split(t);a.push({value:o[0],isHighlighted:!0}),o[1]!==""&&a.push({value:o[1],isHighlighted:!1})}),a}var Qc=new RegExp(/\w/i);function Mc(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!Qc.test(xc(i.value))&&s===a?s:i.isHighlighted}function Qt(e,t){var r=Array.isArray(t)?t:t.split(".");return r.reduce(function(n,i){return n&&n[i]},e)}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 On(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 _n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?On(Object(r),!0).forEach(function(n){Bc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):On(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bc(e,t,r){return t=qc(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qc(e){var t=Vc(e,"string");return nt(t)=="symbol"?t:String(t)}function Vc(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)}function zc(e,t,r){return e.map(function(n,i){return _n(_n({},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 Fn(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 En(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fn(Object(r),!0).forEach(function(n){Kc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kc(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=Zc(e,"string");return it(t)=="symbol"?t:String(t)}function Zc(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 Gc(e,t){return t?e.map(function(r){return En(En({},r),{},{__queryID:t})}):e}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)}function Cn(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 $n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cn(Object(r),!0).forEach(function(n){Xc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xc(e,t,r){return t=Yc(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yc(e){var t=eu(e,"string");return at(t)=="symbol"?t:String(t)}function eu(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 tu(e,t){var r=Object.keys(t).reduce(function(n,i){var a=t[i];return a.recommendResults?$n($n({},n),a.recommendResults.results):n},{});e._recommendCache=r}function st(e){"@babel/helpers - typeof";return st=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},st(e)}function ru(e,t){return su(e)||au(e,t)||iu(e,t)||nu()}
7function nu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iu(e,t){if(e){if(typeof e=="string")return Nn(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 Nn(e,t)}}function Nn(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 au(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function su(e){if(Array.isArray(e))return e}function Tn(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?Tn(Object(r),!0).forEach(function(n){Ra(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ra(e,t,r){return t=ou(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ou(e){var t=cu(e,"string");return st(t)=="symbol"?t:String(t)}function cu(e,t){if(st(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(st(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uu(e,t){if(t&&!((!("transporter"in e)||e._cacheHydrated)&&(!e._useCache||typeof e.addAlgoliaAgent!="function"))){var r=[Object.keys(t).reduce(function(s,o){var c=t[o],u=c.state,f=c.requestParams,h=c.results,d=h&&u?h.map(function(p,g){return Qe({indexName:u.index||p.index},f!=null&&f[g]||p.params?{params:nr((f==null?void 0:f[g])||lu(p.params))}:{})}):[];return s.concat(d)},[])],n=Object.keys(t).reduce(function(s,o){var c=t[o].results;return c?s.concat(c):s},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var i=e.search.bind(e);e.search=function(s){for(var o=arguments.length,c=new Array(o>1?o-1:0),u=1;u<o;u++)c[u-1]=arguments[u];var f=Array.isArray(s)?s.map(function(h){return Qe(Qe({},h),{},{params:nr(h.params)})}):nr(s.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[f].concat(c)},function(){return i.apply(void 0,[s].concat(c))})},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=Qe(Qe({},e.cache),{},Ra({},a,JSON.stringify({results:Object.keys(t).map(function(s){return t[s].results})})))}}}function lu(e){return e.split("&").reduce(function(t,r){var n=r.split("="),i=ru(n,2),a=i[0],s=i[1];return t[a]=s?decodeURIComponent(s):"",t},{})}function nr(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),o=1;o<a;o++)s[o-1]=arguments[o];var c=0;return i.replace(/%s/g,function(){return encodeURIComponent(s[c++])})};return Object.keys(e).map(function(n){return r("%s=%s",n,t(e[n])?JSON.stringify(e[n]):e[n])}).join("&")}function An(e){return e!==Object(e)}function Pa(e,t){if(e===t)return!0;if(An(e)||An(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)||!Pa(e[i],t[i]))return!1}return!0}function fu(e){return e.filter(function(t,r,n){return n.indexOf(t)===r})}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)}var du=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function In(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]:{};
8t%2?In(Object(r),!0).forEach(function(n){hu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):In(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hu(e,t,r){return t=mu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mu(e){var t=pu(e,"string");return ot(t)=="symbol"?t:String(t)}function pu(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 gu(e,t){if(e==null)return{};var r=vu(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 vu(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 yu=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=gu(r,du);return t.setQueryParameters(n)},bu=function(t,r){return r.facets.reduce(function(n,i){return n.addFacet(i)},t)},xu=function(t,r){return r.disjunctiveFacets.reduce(function(n,i){return n.addDisjunctiveFacet(i)},t)},ju=function(t,r){return t.setQueryParameters({hierarchicalFacets:r.hierarchicalFacets.reduce(function(n,i){var a=kc(n,function(o){return o.name===i.name});if(a===-1)return n.concat(i);var s=n.slice();return s.splice(a,1,i),s},t.hierarchicalFacets)})},Su=function(t,r){return r.tagRefinements.reduce(function(n,i){return n.addTagRefinement(i)},t)},wu=function(t,r){return t.setQueryParameters({facetsRefinements:fe(fe({},t.facetsRefinements),r.facetsRefinements)})},Ru=function(t,r){return t.setQueryParameters({facetsExcludes:fe(fe({},t.facetsExcludes),r.facetsExcludes)})},Pu=function(t,r){return t.setQueryParameters({disjunctiveFacetsRefinements:fe(fe({},t.disjunctiveFacetsRefinements),r.disjunctiveFacetsRefinements)})},Ou=function(t,r){return t.setQueryParameters({numericRefinements:fe(fe({},t.numericRefinements),r.numericRefinements)})},_u=function(t,r){return t.setQueryParameters({hierarchicalFacetsRefinements:fe(fe({},t.hierarchicalFacetsRefinements),r.hierarchicalFacetsRefinements)})},Fu=function(t,r){var n=fu([].concat(t.ruleContexts).concat(r.ruleContexts).filter(Boolean));return n.length>0?t.setQueryParameters({ruleContexts:n}):t},At=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=_u(i,a),o=ju(s,a),c=Su(o,a),u=Ou(c,a),f=Pu(u,a),h=Ru(f,a),d=wu(h,a),p=xu(d,a),g=Fu(p,a),m=bu(g,a);return yu(m,a)})};function Ke(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 Dn(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 Eu(e){for(var t=e.getParent(),r=[e.getHelper().state];t!==null;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}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 Hn(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 Ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
8t%2?Hn(Object(r),!0).forEach(function(n){Cu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cu(e,t,r){return t=$u(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $u(e){var t=Nu(e,"string");return ct(t)=="symbol"?t:String(t)}function Nu(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 Oa(e){return e.some(function(t){return t.isHighlighted})?e.map(function(t,r){return Ct(Ct({},t),{},{isHighlighted:!Mc(e,r)})}):e.map(function(t){return Ct(Ct({},t),{},{isHighlighted:!1})})}function je(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 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 Ln(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 q(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ln(Object(r),!0).forEach(function(n){_a(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ln(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _a(e,t,r){return t=Tu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tu(e){var t=Au(e,"string");return ut(t)=="symbol"?t:String(t)}function Au(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 Iu=Rt({name:"configure",connector:!0});function Un(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(r,n){return q(q({},r),{},_a({},n,void 0))},{}))}var Du=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:re,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re;return function(n){if(!n||!ya(n.searchParameters))throw new Error(Iu("The `searchParameters` option expects an object."));var i={};function a(s){return function(o){var c=Un(s.state,n),u=At(c,new J.SearchParameters(o));n.searchParameters=o,s.setState(u).search()}}return{$$type:"ais.configure",init:function(o){var c=o.instantSearchInstance;t(q(q({},this.getWidgetRenderState(o)),{},{instantSearchInstance:c}),!0)},render:function(o){var c=o.instantSearchInstance;t(q(q({},this.getWidgetRenderState(o)),{},{instantSearchInstance:c}),!1)},dispose:function(o){var c=o.state;return r(),Un(c,n)},getRenderState:function(o,c){var u,f=this.getWidgetRenderState(c);return q(q({},o),{},{configure:q(q({},f),{},{widgetParams:q(q({},f.widgetParams),{},{searchParameters:At(new J.SearchParameters((u=o.configure)===null||u===void 0?void 0:u.widgetParams.searchParameters),new J.SearchParameters(f.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(o){var c=o.helper;return i.refine||(i.refine=a(c)),{refine:i.refine,widgetParams:n}},getWidgetSearchParameters:function(o,c){var u=c.uiState;return At(o,new J.SearchParameters(q(q({},u.configure),n.searchParameters)))},getWidgetUiState:function(o){return q(q({},o),{},{configure:q(q({},o.configure),n.searchParameters)})}}}};function _r(e){"@babel/helpers - typeof";return _r=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},_r(e)}var Wn=Object.prototype.hasOwnProperty;function De(e,t,r){if(r!=null&&r(e,t))return!0;var n,i;if(e===t)return!0;
8if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&De(e[i],t[i],r););return i===-1}if(!n||_r(e)==="object"){i=0;for(n in e)if(Wn.call(e,n)&&++i&&!Wn.call(t,n)||!(n in t)||!De(e[n],t[n],r))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}function kn(e){var t,r,n;return new J.SearchResults(e,[{query:(t=e.query)!==null&&t!==void 0?t:"",page:(r=e.page)!==null&&r!==void 0?r:0,hitsPerPage:(n=e.hitsPerPage)!==null&&n!==void 0?n:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}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)}function Qn(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 Mn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qn(Object(r),!0).forEach(function(n){Hu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hu(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=Uu(e,"string");return lt(t)=="symbol"?t:String(t)}function Uu(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 Fr(e){var t=e.getHelper(),r=e.getResults()||kn(t.state),n=e.getScopedResults().map(function(i){var a=i.indexId===e.getIndexId()?r:kn(i.helper.state);return Mn(Mn({},i),{},{results:i.results||a})});return{results:r,scopedResults:n,recommendResults:t.lastRecommendResults}}var Xr=x.createContext(null);function Fa(e,t){if(!e)throw new Error("Invariant failed")}function Mt(){var e=x.useContext(Xr);return Fa(e!==null),e}var Ea=x.createContext(null);function Pt(){var e=x.useContext(Ea);return Fa(e!==null),e}var Wu=x.createContext(null);function Yr(){return x.useContext(Wu)}var ku=x.createContext(null);function en(){return x.useContext(ku)}function Qu(e,t){return Vu(e)||qu(e,t)||Bu(e,t)||Mu()}function Mu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 9In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bu(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 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 qu(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Vu(e){if(Array.isArray(e))return e}function Er(e){var t=x.useState(function(){return e}),r=Qu(t,2),n=r[0],i=r[1];return De(n,e)||i(e),n}var zu="use",qn=ss[zu],tn=typeof window<"u"?x.useLayoutEffect:x.useEffect,Ku=x.createContext({countRef:{current:0},waitForResultsRef:null,ignoreMultipleHooksWarning:!1});function Ca(){return x.useContext(Ku)}function $a(e){var t,r,n=e.widget,i=e.parentIndex,a=e.props,s=e.shouldSsr,o=e.skipSuspense,c=Ca(),u=c.waitForResultsRef,f=c.countRef;c.ignoreMultipleHooksWarning;var h=x.useRef(a);x.useEffect(function(){h.current=a},[a]);var d=x.useRef(n);x.useEffect(function(){d.current=n},[n]);var p=x.useRef(null),g=s&&!i.getWidgets().includes(n),m=Pt();if(tn(function(){var y=d.current;
9if(!p.current)s||i.addWidgets([n]);else{clearTimeout(p.current);var b=De(a,h.current);b||(i.removeWidgets([y]),i.addWidgets([n]))}return function(){p.current=setTimeout(function(){m._schedule(function(){m._preventWidgetCleanup||i.removeWidgets([y])})})}},[i,n,s,m,a]),(g||(u==null||(t=u.current)===null||t===void 0?void 0:t.status)==="pending")&&i.addWidgets([n]),u!=null&&u.current&&!o){var v;qn(u.current),n.$$type!=="ais.dynamicWidgets"&&(v=m.helper)!==null&&v!==void 0&&v.lastResults&&qn(u.current)}(u==null||(r=u.current)===null||r===void 0?void 0:r.status)==="fulfilled"&&(f.current+=1)}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)}var Ju=["skipSuspense"],Zu=["instantSearchInstance","widgetParams"],Gu=["widgetParams"];function Xu(e,t){return rl(e)||tl(e,t)||el(e,t)||Yu()}function Yu(){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 el(e,t){if(e){if(typeof e=="string")return Vn(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 Vn(e,t)}}function Vn(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 tl(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function rl(e){if(Array.isArray(e))return e}function zn(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 Kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zn(Object(r),!0).forEach(function(n){nl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nl(e,t,r){return t=il(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function il(e){var t=al(e,"string");return ft(t)=="symbol"?t:String(t)}function al(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 ir(e,t){if(e==null)return{};var r=sl(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 sl(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 rn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.skipSuspense,i=n===void 0?!1:n,a=ir(r,Ju),s=Yr(),o=en(),c=Pt(),u=Mt(),f=Er(t),h=Er(a),d=x.useRef(!0),p=x.useRef(null),g=x.useRef(c.status),m=x.useMemo(function(){var R=e(function(P,C){if(C){d.current=!0;return}if(d.current){var $=P.instantSearchInstance;P.widgetParams;var _=ir(P,Zu);(!De(_,p.current,function(N,T){return(N==null?void 0:N.constructor)===Function&&(T==null?void 0:T.constructor)===Function})||$.status!==g.current)&&(S(_),p.current=_,g.current=$.status)}},function(){d.current=!1});return Kn(Kn({},R(f)),h)},[e,f,h]),v=x.useState(function(){if(m.getWidgetRenderState){var R,P=u.getHelper(),C=u.getWidgetUiState({})[u.getIndexId()];P.state=((R=m.getWidgetSearchParameters)===null||R===void 0?void 0:R.call(m,P.state,{uiState:C}))||P.state;var $=Fr(u),_=$.results,N=$.scopedResults,T=$.recommendResults,F=m.getWidgetRenderState({helper:P,parent:u,instantSearchInstance:c,results:m.dependsOn==="recommend"&&T&&o?T[o.recommendIdx.current++]:_,scopedResults:N,state:P.state,render
10State:c.renderState,templatesConfig:c.templatesConfig,createURL:u.createURL,searchMetadata:{isSearchStalled:c.status==="stalled"},status:c.status,error:c.error});F.widgetParams;var O=ir(F,Gu);return O}return{}}),y=Xu(v,2),b=y[0],S=y[1];return $a({widget:m,parentIndex:u,props:f,shouldSsr:!!s,skipSuspense:i}),b}function ol(e,t){return rn(Du,{searchParameters:e},t)}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 Jn(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 cl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jn(Object(r),!0).forEach(function(n){ul(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ul(e,t,r){return t=ll(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ll(e){var t=fl(e,"string");return dt(t)=="symbol"?t:String(t)}function fl(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 ar(e){return ol(cl({},e),{$$widgetType:"ais.configure"}),null}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)}var dl=["initialSearchParameters"],hl=["initialRecommendParameters"];function Zn(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 le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zn(Object(r),!0).forEach(function(n){Ae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ae(e,t,r){return t=ml(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ml(e){var t=pl(e,"string");return ht(t)=="symbol"?t:String(t)}function pl(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 Na(e){return bl(e)||yl(e)||vl(e)||gl()}function gl(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vl(e,t){if(e){if(typeof e=="string")return Cr(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 Cr(e,t)}}function yl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bl(e){if(Array.isArray(e))return Cr(e)}function Cr(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 Ta(e,t){if(e==null)return{};var r=xl(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 xl(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 Me=Rt({name:"index-widget"});function Aa(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 Be(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.reduce(function(n,i){return ne(i)||!i.getWidgetUiState&&!i.getWidgetState?n:i.getWidgetUiState?i.getWidgetUiState(n,t):i.getWidgetState(n,t)},r)}function qe(e,t){var r=t.initialSearchParameters,n=Ta(t,dl);return e.reduce(function(i,a){return!a.getWidgetSearchParameters||ne(a)?i:a.dependsOn==="search"&&a.getWidgetParameters?a.getWidgetParameters(i,n):a.getWidgetSearchParameters(i,n)},r)}function Gn(e,t){var r=t.initialRecommendParameters,n=Ta(t,hl);return e.reduce(function(i,a){return!ne(a)&&a.dependsOn==="recommend"&&a.getWidgetParameters?a.getWidgetParameters(i,n):i},r)}function Ia(e){var t=e.filter(ne);t.length!==0&&t.forEach(function(r){var n=r.getHelper();Aa(n,{state:n.state.resetPage(),recommendState:n.recommendState,isPageReset:!0}),Ia(r.getWidgets())})}function Da(e){var t=e.filter(ne);return t.reduce(function(r,n){return r.concat.apply(r,[{indexId:n.getIndexId(),results:n.getResults(),helper:n.getHelper()}].concat(Na(Da(n.getWidgets()))))},[])}var Ha=function(t){if(t===void 0||t.indexName===void 0)throw new Error(Me("The `indexName` option is required."));var r=t.indexName,n=t.indexId,i=n===void 0?r:n,a=[],s={},o=null,c=null,u=null,f=null,h=null,d=!1,p=!1;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return r},getIndexId:function(){return i},getHelper:function(){return u},getResults:function(){var m;return(m=f)!==null&&m!==void 0&&m.lastResults?(f.lastResults._state=u.state,f.lastResults):null},getResultsForWidget:function(m){var v;return m.dependsOn!=="recommend"||ne(m)||m.$$id===void 0?this.getResults():(v=u)!==null&&v!==void 0&&v.lastRecommendResults?u.lastRecommendResults[m.$$id]:null},getPreviousState:function(){return h},getScopedResults:function(){var m=this.getParent(),v;return m?v=m.getWidgets():r.length===0?v=this.getWidgets():v=[this],Da(v)},getParent:function(){return c},createURL:function(m){return typeof m=="function"?o._createURL(Ae({},i,m(s))):o._createURL(Ae({},i,Be(a,{searchParameters:m,helper:u})))},getWidgets:function(){return a},addWidgets:function(m){var v=this;if(!Array.isArray(m))throw new Error(Me("The `addWidgets` method expects an array of widgets."));if(m.some(function(y){return typeof y.init!="function"&&typeof y.render!="function"}))throw new Error(Me("The widget definition expects a `render` and/or an `init` method."));return m.forEach(function(y){ne(y)||(o&&y.dependsOn==="recommend"?o._hasRecommendWidget=!0:o?o._hasSearchWidget=!0:y.dependsOn==="recommend"?d=!0:p=!0,hc(y))}),a=a.concat(m),o&&m.length&&(Aa(u,{state:qe(a,{uiState:s,initialSearchParameters:u.state}),recommendState:Gn(a,{uiState:s,initialRecommendParameters:u.recommendState}),_uiState:s}),m.forEach(function(y){if(y.getRenderState){var b=y.getRenderState(o.renderState[v.getIndexId()]||{},Ke(o,v,o._initialUiState));
11sr({renderState:b,instantSearchInstance:o,parent:v})}}),m.forEach(function(y){y.init&&y.init(Ke(o,v,o._initialUiState))}),o.scheduleSearch()),this},removeWidgets:function(m){var v=this;if(!Array.isArray(m))throw new Error(Me("The `removeWidgets` method expects an array of widgets."));if(m.some(function(P){return typeof P.dispose!="function"}))throw new Error(Me("The widget definition expects a `dispose` method."));if(a=a.filter(function(P){return m.indexOf(P)===-1}),a.forEach(function(P){ne(P)||(o&&P.dependsOn==="recommend"?o._hasRecommendWidget=!0:o?o._hasSearchWidget=!0:P.dependsOn==="recommend"?d=!0:p=!0)}),o&&m.length){var y=m.reduce(function(P,C){var $=C.dispose({helper:u,state:P.cleanedSearchState,recommendState:P.cleanedRecommendState,parent:v});return $ instanceof J.RecommendParameters?P.cleanedRecommendState=$:$&&(P.cleanedSearchState=$),P},{cleanedSearchState:u.state,cleanedRecommendState:u.recommendState}),b=y.cleanedSearchState,S=y.cleanedRecommendState,R=o.future.preserveSharedStateOnUnmount?qe(a,{uiState:s,initialSearchParameters:new J.SearchParameters({index:this.getIndexName()})}):qe(a,{uiState:Be(a,{searchParameters:b,helper:u}),initialSearchParameters:b});s=Be(a,{searchParameters:R,helper:u}),u.setState(R),u.recommendState=S,a.length&&o.scheduleSearch()}return this},init:function(m){var v=this,y,b=m.instantSearchInstance,S=m.parent,R=m.uiState;if(u===null){o=b,c=S,s=R[i]||{};var P=b.mainHelper,C=qe(a,{uiState:s,initialSearchParameters:new J.SearchParameters({index:r})}),$=Gn(a,{uiState:s,initialRecommendParameters:new J.RecommendParameters});u=J({},C.index,C),u.recommendState=$,u.search=function(){return b.onStateChange?(b.onStateChange({uiState:b.mainIndex.getWidgetUiState({}),setUiState:function(O){return b.setUiState(O,!1)}}),P):P.search()},u.searchWithoutTriggeringOnStateChange=function(){return P.search()},u.searchForFacetValues=function(F,O,H,j){var E=u.state.setQueryParameters(j);return P.searchForFacetValues(F,O,H,E)},f=P.derive(function(){return At.apply(void 0,[P.state].concat(Na(Eu(v))))},function(){return v.getHelper().recommendState});var _=(y=b._initialResults)===null||y===void 0?void 0:y[this.getIndexId()];if(_!=null&&_.results){var N=new J.SearchResults(new J.SearchParameters(_.state),_.results);f.lastResults=N,u.lastResults=N}if(_!=null&&_.recommendResults){var T=new J.RecommendResults(new J.RecommendParameters({params:_.recommendResults.params}),_.recommendResults.results);f.lastRecommendResults=T,u.lastRecommendResults=T}u.on("change",function(F){var O=F.isPageReset;O&&Ia(a)}),f.on("search",function(){b.scheduleStalledRender()}),f.on("result",function(F){var O=F.results;b.scheduleRender(),u.lastResults=O,h=O==null?void 0:O._state}),f.on("recommend:result",function(F){var O=F.recommend;b.scheduleRender(),u.lastRecommendResults=O.results}),a.forEach(function(F){if(F.getRenderState){var O=F.getRenderState(b.renderState[v.getIndexId()]||{},Ke(b,v,R));sr({renderState:O,instantSearchInstance:b,parent:v})}}),a.forEach(function(F){F.init&&F.init(Ke(b,v,R))}),u.on("change",function(F){var O=F.state,H=F._uiState;s=Be(a,{searchParameters:O,helper:u},H||{}),b.onStateChange||b.onInternalStateChange()}),_&&b.scheduleRender(),d&&(b._hasRecommendWidget=!0),p&&(b._hasSearchWidget=!0)}},render:function(m){var v,y=this,b=m.instantSearchInstance;b.status==="error"&&!b.mainHelper.hasPendingRequests()&&h&&u.setState(h);var S=this.getResults()||(v=f)!==null&&v!==void 0&&v.lastRecommendResults?a:a.filter(ne);S=S.filter(function(R){return R.shouldRender?R.shouldRender({instantSearchInstance:b}):!0}),S.forEach(function(R){if(R.getRenderState){var P=R.getRenderState(b.renderState[y.getIndexId()]||{},Dn(b,y,R));sr({renderState:P,instantSearchInstance:b,parent:y})}}),S.forEach(function(R){R.render&&R.render(Dn(b,y,R))})},dispose:function(){var m=this,v,y;a.forEach(function(b){b.dispose&&u&&b.dispose({helper:u,state:u.state,recommendState:u.recommendState,parent:m})}),o=null,c=null,(v=u)===null||v===void 0||v.removeAllListeners(),u=null,(y=f)===null||y===void 0||y.detach(),f=null},getWidgetUiState:function(m){return a.filter(ne).reduce(function(v,y){return y.getWidgetUiState(v)},le(le({},m),{},Ae({},i,le(le({},m[i]),s))))},getWidgetState:function(m){return this.getWidgetUiState(m)},getWidgetSearchParameters:function(m,v){var y=v.uiState;return qe(a,{uiState:y,initialSearchParameters:m})},refreshUiState:function(){s=Be(a,{searchParameters:this.getHelper().state,helper:this.getHelper()},s)},setIndexUiState:function(m){var v=typeof m=="function"?m(s):m;o.setUiState(function(y){return le(le({},y),{},Ae({},i,v))})}}};function sr(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=le(le({},r.renderState),{},Ae({},i,le(le({},r.renderState[i]),t)))}function jl(e,t){return Pl(e)||Rl(e,t)||wl(e,t)||Sl()}
11function Sl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 12In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wl(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 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}function Rl(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Pl(e){if(Array.isArray(e))return e}function La(){var e=x.useReducer(function(n){return n+1},0),t=jl(e,2),r=t[1];return r}function Ol(e){var t=Yr(),r=en(),n=r==null?void 0:r.initialResults,i=Mt(),a=Er(e),s=x.useMemo(function(){return Ha(a)},[a]),o=s.getHelper(),c=La();return tn(function(){c()},[o,c]),$a({widget:s,parentIndex:i,props:a,shouldSsr:!!(t||n),skipSuspense:!0}),s}var _l=["children"];function Fl(e,t){if(e==null)return{};var r=El(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 El(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 or(e){var t=e.children,r=Fl(e,_l),n=Ol(r);return n.getHelper()===null?null:ge.createElement(Xr.Provider,{value:n},t)}var Cl="ais",Bt=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(Cl,"-").concat(t).concat(a).concat(s)}},$l=Bt("Highlight");function Nl(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,o=Qt(i._highlightResult,t),c=o||{},u=c.value,f=u===void 0?"":u,h=$l({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return f.replace(new RegExp(te.highlightPreTag,"g"),"<".concat(n,' class="').concat(h,'">')).replace(new RegExp(te.highlightPostTag,"g"),"</".concat(n,">"))}var Tl=Bt("ReverseHighlight");function Al(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,o=Qt(i._highlightResult,t),c=o||{},u=c.value,f=u===void 0?"":u,h=Tl({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),d=xa(Oa(wa(f)));return d.replace(new RegExp(te.highlightPreTag,"g"),"<".concat(n,' class="').concat(h,'">')).replace(new RegExp(te.highlightPostTag,"g"),"</".concat(n,">"))}var Il=Bt("Snippet");function Dl(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,o=Qt(i._snippetResult,t),c=o||{},u=c.value,f=u===void 0?"":u,h=Il({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return f.replace(new RegExp(te.highlightPreTag,"g"),"<".concat(n,' class="').concat(h,'">')).replace(new RegExp(te.highlightPostTag,"g"),"</".concat(n,">"))}var Hl=Bt("ReverseSnippet");function Ll(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,o=Qt(i._snippetResult,t),c=o||{},u=c.value,f=u===void 0?"":u,h=Hl({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),d=xa(Oa(wa(f)));return d.replace(new RegExp(te.highlightPreTag,"g"),"<".concat(n,' class="').concat(h,'">')).replace(new RegExp(te.highlightPostTag,"g"),"</".concat(n,">"))}function $r(e){"@babel/helpers - typeof";return $r=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},$r(e)}function Ul(e){var t=e.method,r=e.payload;if($r(r)!=="object")throw new Error("The insights helper expects the payload to be an object.");var n;try{n=ja(r)}catch{throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(n,'"')}function Wl(e,t){return Ul({method:e,payload:t})}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)}var kl="_ALGOLIA";function Ql(e){if(!((typeof document>"u"?"undefined":Nr(document))!=="object"||typeof document.cookie!="string"))for(var t="".concat(e,"="),r=
12document.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 Ml(){return Ql(kl)}function Bl(){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 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 Yn(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 Pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yn(Object(r),!0).forEach(function(n){ql(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ql(e,t,r){return t=Vl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vl(e){var t=zl(e,"string");return mt(t)=="symbol"?t:String(t)}function zl(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)}function me(e,t){return Zl(e)||Jl(e,t)||Ua(e,t)||Kl()}function Kl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 13In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jl(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Zl(e){if(Array.isArray(e))return e}function Gl(e){return ef(e)||Yl(e)||Ua(e)||Xl()}function Xl(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ua(e,t){if(e){if(typeof e=="string")return Tr(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 Tr(e,t)}}function Yl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ef(e){if(Array.isArray(e))return Tr(e)}function Tr(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 Wa="2.17.2",tf="https://cdn.jsdelivr.net/npm/search-insights@".concat(Wa,"/dist/search-insights.min.js");function ei(){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,o=s===void 0?!1:s,c=t;!t&&t!==null&&je(function(f){var h=f.window,d=h.AlgoliaAnalyticsObject||"aa";
14typeof d=="string"&&(c=h[d]),c||(h.AlgoliaAnalyticsObject=d,h[d]||(h[d]=function(){h[d].queue||(h[d].queue=[]);for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];h[d].queue.push(g)},h[d].version=Wa,h[d].shouldAddScript=!0),c=h[d])});var u=c||re;return function(f){var h=f.instantSearchInstance,d=h.middleware.filter(function(N){return N.instance.$$type==="ais.insights"&&N.instance.$$internal}).map(function(N){return N.creator});h.unuse.apply(h,Gl(d));var p=Pn(h.client),g=me(p,2),m=g[0],v=g[1],y=void 0,b=void 0,S=void 0,R=u.queue;if(Array.isArray(R)){var P=["setUserToken","init"].map(function(N){var T=Rn(R.slice().reverse(),function(H){var j=me(H,1),E=j[0];return E===N})||[],F=me(T,2),O=F[1];return O}),C=me(P,2);b=C[0],y=C[1]}u("getUserToken",null,function(N,T){S=ri(T)}),(r||!ti(u))&&u("init",Pe({appId:m,apiKey:v,partial:!0},r));var $,_;return{$$type:"ais.insights",$$internal:a,$$automatic:o,onStateChange:function(){},subscribe:function(){if(u.shouldAddScript){var T="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var F=document.createElement("script");F.async=!0,F.src=tf,F.onerror=function(){h.emit("error",new Error(T))},document.body.appendChild(F),u.shouldAddScript=!1}catch{u.shouldAddScript=!1,h.emit("error",new Error(T))}}},started:function(){u("addAlgoliaAgent","insights-middleware"),_=h.mainHelper;var T=u.queue;if(Array.isArray(T)){var F=["setUserToken","init"].map(function(M){var Y=Rn(T.slice().reverse(),function(Re){var Te=me(Re,1),zt=Te[0];return zt===M})||[],de=me(Y,2),ce=de[1];return ce}),O=me(F,2);b=O[0],y=O[1]}$=rf(h),o||_.overrideStateWithoutTriggeringChangeEvent(Pe(Pe({},_.state),{},{clickAnalytics:!0})),a||h.scheduleSearch();var H=function(Y){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ce=ri(Y);if(!ce)return;var Re=_.state.userToken;function Te(){_.overrideStateWithoutTriggeringChangeEvent(Pe(Pe({},_.state),{},{userToken:ce})),Re&&Re!==Y&&h.scheduleSearch()}de?Te():setTimeout(Te,0)};function j(M){H(M,!0),u("setUserToken",M)}var E=void 0,D=Ml();if(D)E=D;else{var L="anonymous-".concat(Bl());E=L}var K,ie=$.userToken;if(r!=null&&r.userToken&&(K=r.userToken),K)j(K);else if(ie)j(ie);else if(S)j(S);else if(b)j(b);else if(E){var X;if(j(E),r!=null&&r.useCookie||(X=y)!==null&&X!==void 0&&X.useCookie){var Ne;nf(E,(r==null?void 0:r.cookieDuration)||((Ne=y)===null||Ne===void 0?void 0:Ne.cookieDuration))}}u("onUserTokenChange",function(M){return H(M,!0)},{immediate:!0});var qt=u;ti(u)&&(qt=function(Y,de){var ce=Pn(h.client),Re=me(ce,2),Te=Re[0],zt=Re[1],as={headers:{"X-Algolia-Application-Id":Te,"X-Algolia-API-Key":zt}};return u(Y,de,as)});var Vt=new Set,an;h.mainHelper.derivedHelpers[0].on("result",function(M){var Y=M.results;Y&&(!Y.queryID||Y.queryID!==an)&&(an=Y.queryID,Vt.clear())}),h.sendEventToInsights=function(M){if(n)n(M,qt);else if(M.insightsMethod){if(M.insightsMethod==="viewedObjectIDs"){var Y=M.payload,de=Y.objectIDs.filter(function(ce){return!Vt.has(ce)});if(de.length===0)return;de.forEach(function(ce){return Vt.add(ce)}),Y.objectIDs=de}M.payload.algoliaSource=["instantsearch"],o&&M.payload.algoliaSource.push("instantsearch-automatic"),M.eventModifier==="internal"&&M.payload.algoliaSource.push("instantsearch-internal"),qt(M.insightsMethod,M.payload)}}},unsubscribe:function(){u("onUserTokenChange",void 0),h.sendEventToInsights=re,_&&$&&(_.overrideStateWithoutTriggeringChangeEvent(Pe(Pe({},_.state),$)),h.scheduleSearch())}}}}function rf(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 nf(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=/")}
14function ti(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,o=n===1&&i>=10;return a||s||o}function ri(e){if(e)return typeof e=="number"?e.toString():e}function ka(e,t,r){var n=Ke(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 o=Object.keys(a).filter(function(c){return a[c]!==void 0});r.widgets.push({type:i.$$type,widgetType:i.$$widgetType,params:o}),i.$$type==="ais.index"&&ka(i.getWidgets(),t,r)})}function af(){return je(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 sf(){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"),o=document.querySelector("head");return s.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){var u=i.client;a.ua=u.transporter&&u.transporter.userAgent?u.transporter.userAgent.value:u._ua,ka(i.mainIndex.getWidgets(),i,a),i.middleware.forEach(function(f){return a.widgets.push({middleware:!0,type:f.instance.$$type,internal:f.instance.$$internal})}),s.content=JSON.stringify(a),o.appendChild(s)},0)},started:function(){},unsubscribe:function(){s.remove()}}}}var of=String.prototype.replace,cf=/%20/g,cr={RFC1738:"RFC1738",RFC3986:"RFC3986"},nn={default:cr.RFC3986,formatters:{RFC1738:function(e){return of.call(e,cf,"+")},RFC3986:function(e){return String(e)}},RFC1738:cr.RFC1738,RFC3986:cr.RFC3986},uf=nn,ur=Object.prototype.hasOwnProperty,_e=Array.isArray,ue=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),lf=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(_e(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},Qa=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},ff=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(_e(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!ur.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return _e(t)&&!_e(r)&&(i=Qa(t,n)),_e(t)&&_e(r)?(r.forEach(function(a,s){if(ur.call(t,s)){var o=t[s];o&&typeof o=="object"&&a&&typeof a=="object"?t[s]=e(o,a,n):t.push(a)}else t[s]=a}),t):Object.keys(r).reduce(function(a,s){var o=r[s];return ur.call(a,s)?a[s]=e(a[s],o,n):a[s]=o,a},i)},df=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},hf=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},mf=function(t,r,n,i,a){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var o="",c=0;c<s.length;++c){var u=s.charCodeAt(c);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===uf.RFC1738&&(u===40||u===41)){o+=s.charAt(c);continue}if(u<128){o=o+ue[u];continue}if(u<2048){o=o+(ue[192|u>>6]+ue[128|u&63]);continue}if(u<55296||u>=57344){o=o+(ue[224|u>>12]+ue[128|u>>6&63]+ue[128|u&63]);continue}c+=1,u=65536+((u&1023)<<10|s.charCodeAt(c)&1023),o+=ue[240|u>>18]+ue[128|u>>12&63]+ue[128|u>>6&63]+ue[128|u&63]}return o},pf=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],s=a.obj[a.prop],o=Object.keys(s),c=0;c<o.length;++c){var u=o[c],f=s[u];typeof f=="object"&&f!==null&&n.indexOf(f)===-1&&(r.push({obj:s,prop:u}),n.push(f))}return lf(r),t},gf=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},vf=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},yf=function(t,r){return[].concat(t,r)},bf=function(t,r){if(_e(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Ma={arrayToObject:Qa,assign:df,combine:yf,compact:pf,decode:hf,encode:mf,isBuffer:vf,isRegExp:gf,maybeMap:bf,merge:ff},Ar=Ma,Xe=nn,xf=Object.prototype.hasOwnProperty,ni={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Ee=Array.isArray,jf=String.prototype.split,Sf=Array.prototype.push,Ba=function(e,t){Sf.apply(e,Ee(t)?t:[t])},wf=Date.prototype.toISOString,ii=Xe.default,z={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ar.encode,encodeValuesOnly:!1,format:ii,formatter:Xe.formatters[ii],indices:!1,serializeDate:function(t){return wf.call(t)},skipNulls:!1,strictNullHandling:!1},Rf=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Pf=function e(t,r,n,i,a,s,o,c,u,f,h,d,p,g){var m=t;if(typeof o=="function"?m=o(r,m):m instanceof Date?m=f(m):n==="comma"&&Ee(m)&&(m=Ar.maybeMap(m,function(F){return F instanceof Date?f(F):F})),m===null){if(i)return s&&!p?s(r,z.encoder,g,"key",h):r;m=""}if(Rf(m)||Ar.isBuffer(m)){if(s){var v=p?r:s(r,z.encoder,g,"key",h);if(n==="comma"&&p){for(var y=jf.call(String(m),","),b="",S=0;S<y.length;++S)b+=(S===0?"":",")+d(s(y[S],z.encoder,g,"value",h));return[d(v)+"="+b]}return[d(v)+"="+d(s(m,z.encoder,g,"value",h))]}return[d(r)+"="+d(String(m))]}var R=[];if(typeof m>"u")return R;var P;if(n==="comma"&&Ee(m))P=[{value:m.length>0?m.join(",")||null:void 0}];else if(Ee(o))P=o;else{var C=Object.keys(m);P=c?C.sort(c):C}for(var $=0;$<P.length;++$){var _=P[$],N=typeof _=="object"&&typeof _.value<"u"?_.value:m[_];if(!(a&&N===null)){var T=Ee(m)?typeof n=="function"?n(r,_):r:r+(u?"."+_:"["+_+"]");Ba(R,e(N,T,n,i,a,s,o,c,u,f,h,d,p,g))}}return R},Of=function(t){if(!t)return z;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||z.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Xe.default;if(typeof t.format<"u"){if(!xf.call(Xe.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=Xe.formatters[n],a=z.filter;return(typeof t.filter=="function"||Ee(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:z.addQueryPrefix,allowDots:typeof t.allowDots>"u"?z.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:z.charsetSentinel,delimiter:typeof t.delimiter>"u"?z.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:z.encode,encoder:typeof t.encoder=="function"?t.encoder:z.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:z.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:z.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:z.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:z.strictNullHandling}},_f=function(e,t){var r=e,n=Of(t),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Ee(n.filter)&&(a=n.filter,i=a);var s=[];if(typeof r!="object"||r===null)return"";var o;t&&t.arrayFormat in ni?o=t.arrayFormat:t&&"indices"in t?o=t.indices?"indices":"repeat":o="indices";var c=ni[o];i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var u=0;u<i.length;++u){var f=i[u];n.skipNulls&&r[f]===null||Ba(s,Pf(r[f],f,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset))}var h=s.join(n.delimiter),d=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),h.length>0?d+h:""},He=Ma,Ir=Object.prototype.hasOwnProperty,Ff=Array.isArray,V={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:He.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Ef=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},qa=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Cf="utf8=%26%2310003%3B",$f="utf8=%E2%9C%93",Nf=function(t,r){var n={},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,s=i.split(r.delimiter,a),o=-1,c,u=r.charset;if(r.charsetSentinel)for(c=0;c<s.length;++c)s[c].indexOf("utf8=")===0&&(s[c]===$f?u="utf-8":s[c]===Cf&&(u="iso-8859-1"),o=c,c=s.length);for(c=0;c<s.length;++c)if(c!==o){var f=s[c],h=f.indexOf("]="),d=h===-1?f.indexOf("="):h+1,p,g;d===-1?(p=r.decoder(f,V.decoder,u,"key"),g=r.strictNullHandling?null:""):(p=r.decoder(f.slice(0,d),V.decoder,u,"key"),g=He.maybeMap(qa(f.slice(d+1),r),function(m){return r.decoder(m,V.decoder,u,"value")})),g&&r.interpretNumericEntities&&u==="iso-8859-1"&&(g=Ef(g)),f.indexOf("[]=")>-1&&(g=Ff(g)?[g]:g),Ir.call(n,p)?n[p]=He.combine(n[p],g):n[p]=g}return n},Tf=function(e,t,r,n){for(var i=n?t:qa(t,r),a=e.length-1;a>=0;--a){var s,o=e[a];if(o==="[]"&&r.parseArrays)s=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var c=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,u=parseInt(c,10);!r.parseArrays&&c===""?s={0:i}:!isNaN(u)&&o!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(s=[],s[u]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},Af=function(t,r,n,i){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,c=n.depth>0&&s.exec(a),u=c?a.slice(0,c.index):a,f=[];if(u){if(!n.plainObjects&&Ir.call(Object.prototype,u)&&!n.allowPrototypes)return;f.push(u)}for(var h=0;n.depth>0&&(c=o.exec(a))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&Ir.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;f.push(c[1])}return c&&f.push("["+a.slice(c.index)+"]"),Tf(f,r,n,i)}},If=function(t){if(!t)return V;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");
14if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?V.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?V.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:V.allowPrototypes,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:V.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:V.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:V.comma,decoder:typeof t.decoder=="function"?t.decoder:V.decoder,delimiter:typeof t.delimiter=="string"||He.isRegExp(t.delimiter)?t.delimiter:V.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:V.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:V.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:V.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:V.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:V.strictNullHandling}},Df=function(e,t){var r=If(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?Nf(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),s=0;s<a.length;++s){var o=a[s],c=Af(o,n[o],r,typeof e=="string");i=He.merge(i,c,r)}return He.compact(i)},Hf=_f,Lf=Df,Uf=nn,Wf={formats:Uf,parse:Lf,stringify:Hf};const ai=Qr(Wf);function pt(e){"@babel/helpers - typeof";return pt=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},pt(e)}function kf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qf(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,Va(n.key),n)}}function Mf(e,t,r){return t&&Qf(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function G(e,t,r){return t=Va(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Va(e){var t=Bf(e,"string");return pt(t)=="symbol"?t:String(t)}function Bf(e,t){if(pt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var si=function(t){t&&(window.document.title=t)},qf=function(){function e(t){var r=this,n=t.windowTitle,i=t.writeDelay,a=i===void 0?400:i,s=t.createURL,o=t.parseURL,c=t.getLocation,u=t.start,f=t.dispose,h=t.push,d=t.cleanUrlOnDispose;kf(this,e),G(this,"$$type","ais.browser"),G(this,"windowTitle",void 0),G(this,"writeDelay",void 0),G(this,"_createURL",void 0),G(this,"parseURL",void 0),G(this,"getLocation",void 0),G(this,"writeTimer",void 0),G(this,"_onPopState",void 0),G(this,"inPopState",!1),G(this,"isDisposed",!1),G(this,"latestAcknowledgedHistory",0),G(this,"_start",void 0),G(this,"_dispose",void 0),G(this,"_push",void 0),G(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=a,this._createURL=s,this.parseURL=o,this.getLocation=c,this._start=u,this._dispose=f,this._push=h,this._cleanUrlOnDispose=typeof d>"u"?!0:d,je(function(p){var g=p.window,m=r.windowTitle&&r.windowTitle(r.read());si(m),r.latestAcknowledgedHistory=g.history.length})}return Mf(e,[{key:"read",value:function(){return this.parseURL({qsModule:ai,location:this.getLocation()})}},{key:"write",value:function(r){var n=this;je(function(i){var a=i.window,s=n.createURL(r),o=n.windowTitle&&n.windowTitle(r);n.writeTimer&&clearTimeout(n.writeTimer),n.writeTimer=setTimeout(function(){si(o),n.shouldWrite(s)&&(n._push?n._push(s):a.history.pushState(r,o||"",s),n.latestAcknowledgedHistory=a.history.length),n.inPopState=!1,n.writeTimer=void 0},n.writeDelay)})}}
14,{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())},je(function(i){var a=i.window;a.addEventListener("popstate",n._onPopState)})}},{key:"createURL",value:function(r){var n=this._createURL({qsModule:ai,routeState:r,location:this.getLocation()});return n}},{key:"dispose",value:function(){var r=this;this._dispose&&this._dispose(),this.isDisposed=!0,je(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 je(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 Vf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.createURL,r=t===void 0?function(g){var m=g.qsModule,v=g.routeState,y=g.location,b=y.protocol,S=y.hostname,R=y.port,P=R===void 0?"":R,C=y.pathname,$=y.hash,_=m.stringify(v),N=P===""?"":":".concat(P);return _?"".concat(b,"//").concat(S).concat(N).concat(C,"?").concat(_).concat($):"".concat(b,"//").concat(S).concat(N).concat(C).concat($)}:t,n=e.parseURL,i=n===void 0?function(g){var m=g.qsModule,v=g.location;return m.parse(v.search.slice(1),{arrayLimit:99})}:n,a=e.writeDelay,s=a===void 0?400:a,o=e.windowTitle,c=e.getLocation,u=c===void 0?function(){return je(function(g){var m=g.window;return m.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:c,f=e.start,h=e.dispose,d=e.push,p=e.cleanUrlOnDispose;return new qf({createURL:r,parseURL:i,writeDelay:s,windowTitle:o,getLocation:u,start:f,dispose:h,push:d,cleanUrlOnDispose:p})}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)}var zf=["configure"];function oi(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 $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oi(Object(r),!0).forEach(function(n){Dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dr(e,t,r){return t=Kf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kf(e){var t=Jf(e,"string");return gt(t)=="symbol"?t:String(t)}function Jf(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)}function Zf(e,t){if(e==null)return{};var r=Gf(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 Gf(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 ci(e){e.configure;var t=Zf(e,zf);return t}function Xf(){return{$$type:"ais.simple",stateToRoute:function(t){return Object.keys(t).reduce(function(r,n){return $t($t({},r),{},Dr({},n,ci(t[n])))},{})},routeToState:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(r,n){return $t($t({},r),{},Dr({},n,ci(t[n])))},{})}}}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 ui(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]:{};
14t%2?ui(Object(r),!0).forEach(function(n){za(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ui(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function za(e,t,r){return t=Yf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yf(e){var t=ed(e,"string");return vt(t)=="symbol"?t:String(t)}function ed(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 td=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.router,n=r===void 0?Vf():r,i=t.stateMapping,a=i===void 0?Xf():i,s=t.$$internal,o=s===void 0?!1:s;return function(c){var u=c.instantSearchInstance;function f(p){var g=u.mainIndex.getWidgets().length===0?u._initialUiState:u.mainIndex.getWidgetUiState({}),m=Object.keys(p).reduce(function(y,b){return Nt(Nt({},y),{},za({},b,p[b]))},g),v=a.stateToRoute(m);return n.createURL(v)}u._createURL=f;var h=void 0,d=u._initialUiState;return{$$type:"ais.router({router:".concat(n.$$type||"__unknown__",", stateMapping:").concat(a.$$type||"__unknown__","})"),$$internal:o,onStateChange:function(g){var m=g.uiState,v=a.stateToRoute(m);(h===void 0||!Pa(h,v))&&(n.write(v),h=v)},subscribe:function(){u._initialUiState=Nt(Nt({},d),a.routeToState(n.read())),n.onUpdate(function(g){u.mainIndex.getWidgets().length>0&&u.setUiState(a.routeToState(g))})},started:function(){var g;(g=n.start)===null||g===void 0||g.call(n)},unsubscribe:function(){n.dispose()}}}};function rd(e,t){return e.toLocaleString(t)}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 li(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?li(Object(r),!0).forEach(function(n){nd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):li(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nd(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=ad(e,"string");return yt(t)=="symbol"?t:String(t)}function ad(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)}function sd(e){var t=e.numberLocale;return{formatNumber:function(n,i){return rd(Number(i(n)),t)},highlight:function(n,i){try{var a=JSON.parse(n);return i(Nl(he(he({},a),{},{hit:this})))}catch{throw new Error(` 15The highlight helper expects a JSON object of the format: 16{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseHighlight:function(n,i){try{var a=JSON.parse(n);return i(Al(he(he({},a),{},{hit:this})))}catch{throw new Error(` 17 The reverseHighlight helper expects a JSON object of the format: 18 { "attribute": "name", "highlightedTagName": "mark" }`)}},snippet:function(n,i){try{var a=JSON.parse(n);return i(Dl(he(he({},a),{},{hit:this})))}catch{throw new Error(` 19The snippet helper expects a JSON object of the format: 20{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseSnippet:function(n,i){try{var a=JSON.parse(n);return i(Ll(he(he({},a),{},{hit:this})))}catch{throw new Error(` 21 The reverseSnippet helper expects a JSON object of the format: 22 { "attribute": "name", "highlightedTagName": "mark" }`)}},insights:function(n,i){try{var a=JSON.parse(n),s=a.method,o=a.payload;return i(Wl(s,he({objectIDs:[this.objectID]},o)))}catch{throw new Error(` 23The insights helper expects a JSON object of the format: 24{ "method": "method-name", "payload": { "eventName": "name of the event" } }`)}}}}const od="4.79.2";function Le(e){"@babel/helpers - typeof";return Le=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},Le(e)}function fi(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 lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
24t%2?fi(Object(r),!0).forEach(function(n){I(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ud(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,Ka(n.key),n)}}function ld(e,t,r){return t&&ud(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fd(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&&Hr(e,t)}function Hr(e,t){return Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hr(e,t)}function dd(e){var t=md();return function(){var n=Ut(e),i;if(t){var a=Ut(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return hd(this,i)}}function hd(e,t){if(t&&(Le(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function md(){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 Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ut(e)}function I(e,t,r){return t=Ka(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ka(e){var t=pd(e,"string");return Le(t)=="symbol"?t:String(t)}function pd(e,t){if(Le(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Le(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var se=Rt({name:"instantsearch"});function gd(){return"#"}var Ja={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},vd=function(e){fd(r,e);var t=dd(r);function r(n){var i;cd(this,r),i=t.call(this),I(A(i),"client",void 0),I(A(i),"indexName",void 0),I(A(i),"compositionID",void 0),I(A(i),"insightsClient",void 0),I(A(i),"onStateChange",null),I(A(i),"future",void 0),I(A(i),"helper",void 0),I(A(i),"mainHelper",void 0),I(A(i),"mainIndex",void 0),I(A(i),"started",void 0),I(A(i),"templatesConfig",void 0),I(A(i),"renderState",{}),I(A(i),"_stalledSearchDelay",void 0),I(A(i),"_searchStalledTimer",void 0),I(A(i),"_initialUiState",void 0),I(A(i),"_initialResults",void 0),I(A(i),"_manuallyResetScheduleSearch",!1),I(A(i),"_resetScheduleSearch",void 0),I(A(i),"_createURL",void 0),I(A(i),"_searchFunction",void 0),I(A(i),"_mainHelperSearch",void 0),I(A(i),"_hasSearchWidget",!1),I(A(i),"_hasRecommendWidget",!1),I(A(i),"_insights",void 0),I(A(i),"middleware",[]),I(A(i),"sendEventToInsights",void 0),I(A(i),"status","idle"),I(A(i),"error",void 0),I(A(i),"scheduleSearch",ke(function(){i.started&&i.mainHelper.search()})),I(A(i),"scheduleRender",ke(function(){var O,H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;(O=i.mainHelper)!==null&&O!==void 0&&O.hasPendingRequests()||(clearTimeout(i._searchStalledTimer),i._searchStalledTimer=null,H&&(i.status="idle",i.error=void 0)),i.mainIndex.render({instantSearchInstance:A(i)}),i.emit("render")})),I(A(i),"onInternalStateChange",ke(function(){var O=i.mainIndex.getWidgetUiState({});i.middleware.forEach(function(H){var j=H.instance;j.onStateChange({uiState:O})})})),i.setMaxListeners(100);var a=n.indexName,s=a===void 0?"":a,o=n.compositionID,c=n.numberLocale,u=n.initialUiState,f=u===void 0?{}:u,h=n.routing,d=h===void 0?null:h,p=n.insights,g=p===void 0?void 0:p,m=n.searchFunction,v=n.stalledSearchDelay,y=v===void 0?200:v,b=n.searchClient,S=b===void 0?null:b,R=n.insightsClient,P=R===void 0?null:R,C=n.onStateChange,$=C===void 0?null:C,_=n.future,N=_===void 0?lr(lr({},Ja),n.future||{}):_;if(S===null)throw new Error(se("The `searchClient` option is required."));if(typeof S.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 S.addAlgoliaAgent=="function"&&S.addAlgoliaAgent("instantsearch.js (".concat(od,")")),P&&typeof P!="function")throw new Error(se("The `insightsClient` option should be a function."));if(i.client=S,i.future=N,i.insightsClient=P,i.indexName=s,i.compositionID=o,i.helper=null,i.mainHelper=null,i.mainIndex=Ha({indexName:i.compositionID||i.indexName}),i.onStateChange=$,i.started=!1,i.templatesConfig={helpers:sd({numberLocale:c}
24),compileOptions:{}},i._stalledSearchDelay=y,i._searchStalledTimer=null,i._createURL=gd,i._initialUiState=f,i._initialResults=null,i._insights=g,m&&(i._searchFunction=m),i.sendEventToInsights=re,d){var T=typeof d=="boolean"?{}:d;T.$$internal=!0,i.use(td(T))}if(g){var F=typeof g=="boolean"?{}:g;F.$$internal=!0,i.use(ei(F))}return af()&&i.use(sf({$$internal:!0})),i}return ld(r,[{key:"_isSearchStalled",get:function(){return this.status==="stalled"}},{key:"use",value:function(){for(var i=this,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var c=s.map(function(u){var f=lr({$$type:"__unknown__",$$internal:!1,subscribe:re,started:re,unsubscribe:re,onStateChange:re},u({instantSearchInstance:i}));return i.middleware.push({creator:u,instance:f}),f});return this.started&&c.forEach(function(u){u.subscribe(),u.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(o){return a.includes(o.creator)}).forEach(function(o){return o.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(o){return!a.includes(o.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(se("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(i.some(function(a){return typeof a.init!="function"&&typeof a.render!="function"}))throw new Error(se("The widget definition expects a `render` and/or an `init` method."));if(this.compositionID&&i.some(ne))throw new Error(se("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(se("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(i.some(function(a){return typeof a.dispose!="function"}))throw new Error(se("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(i),this}},{key:"start",value:function(){var i=this;if(this.started)throw new Error(se("The `start` method has already been called once."));var a=this.mainHelper||J(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(re)}};this._mainHelperSearch=a.search.bind(a),a.search=function(){var c=i.mainIndex.getHelper(),u=J(s,c.state.index,c.state);return u.once("search",function(f){var h=f.state;c.overrideStateWithoutTriggeringChangeEvent(h),i._mainHelperSearch()}),u.on("change",function(f){var h=f.state;c.setState(h)}),i._searchFunction(u),a}}if(a.on("error",function(c){var u=c.error;if(!(u instanceof Error)){var f=u;u=Object.keys(f).reduce(function(h,d){return h[d]=f[d],h},new Error(f.message))}u.error=u,i.error=u,i.status="error",i.scheduleRender(!1),i.emit("error",u)}),this.mainHelper=a,this.middleware.forEach(function(c){var u=c.instance;u.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){uu(this.client,this._initialResults),tu(this.mainHelper,this._initialResults);var o=this.scheduleSearch;this.scheduleSearch=ke(re),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){i.scheduleSearch=o}:ke(function(){i.scheduleSearch=o})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(c){var u=c.instance;u.started()}),typeof this._insights>"u"&&a.derivedHelpers[0].once("result",function(){var c=i.mainIndex.getScopedResults().some(function(u){var f=u.results;return f==null?void 0:f._automaticInsights});c&&i.use(ei({$$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(se("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var o=typeof i=="function"?i(this.mainIndex.getWidgetUiState({})):i;this.onStateChange&&s?this.onStateChange({uiState:o,setUiState:function(u){Or(typeof u=="function"?u(o):u,a.mainIndex),a.scheduleSearch(),a.onInternalStateChange()}}):(Or(o,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(se("The `start` method needs to be called before `createURL`."));return this._createURL(i)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(se("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),r}(Xs),yd={};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 di(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 hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
24t%2?di(Object(r),!0).forEach(function(n){bd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):di(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bd(e,t,r){return t=xd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xd(e){var t=jd(e,"string");return bt(t)=="symbol"?t:String(t)}function jd(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 mi=["react (".concat(x.version,")"),"react-instantsearch (".concat(br,")"),"react-instantsearch-core (".concat(br,")")],pi="react-instantsearch-server (".concat(br,")"),Sd=function(t){return t?"next.js (".concat(t,")"):null};function wd(e){var t=La(),r=Yr(),n=en(),i=Ca(),a=i.waitForResultsRef,s=n==null?void 0:n.initialResults,o=x.useRef(e),c=r||s||a,u=x.useRef(null);if(n!=null&&n.ssrSearchRef&&(u=n.ssrSearchRef),u.current===null){var f=new vd(e);f._schedule=function(y){f._schedule.queue.push(y),clearTimeout(f._schedule.timer),f._schedule.timer=setTimeout(function(){f._schedule.queue.forEach(function(b){b()}),f._schedule.queue=[]},0)},f._schedule.queue=[],c&&(f._initialResults=s||{},f._manuallyResetScheduleSearch=!0),gi(e.searchClient,[].concat(mi,[r&&pi,Sd(Rd())])),c&&f.start(),r&&r.notifyServer({search:f}),e.routing,u.current=f}{var h=u.current,d=o.current;if(d.indexName!==e.indexName&&(h.helper.setIndex(e.indexName||"").search(),o.current=e),d.searchClient!==e.searchClient&&(gi(e.searchClient,[].concat(mi,[r&&pi])),h.mainHelper.setClient(e.searchClient).search(),o.current=e),d.onStateChange!==e.onStateChange&&(h.onStateChange=e.onStateChange,o.current=e),d.searchFunction!==e.searchFunction&&(h._searchFunction=e.searchFunction,o.current=e),d.stalledSearchDelay!==e.stalledSearchDelay){var p;h._stalledSearchDelay=(p=e.stalledSearchDelay)!==null&&p!==void 0?p:200,o.current=e}De(d.future,e.future)||(h.future=hi(hi({},Ja),e.future),o.current=e)}var g=x.useRef(null),m=Ms.useSyncExternalStore(x.useCallback(function(){var v=u.current;return g.current===null?v.started||(v.start(),t()):(clearTimeout(g.current),v._preventWidgetCleanup=!1),function(){if(n!=null&&n.ssrSearchRef)return;function y(){v.dispose()}clearTimeout(v._schedule.timer),g.current=setTimeout(y),v._preventWidgetCleanup=!0}},[t,n]),function(){return u.current},function(){return u.current});return m}function gi(e,t){typeof e.addAlgoliaAgent=="function"&&t.filter(Boolean).forEach(function(r){e.addAlgoliaAgent(r)})}function Rd(){var e,t;return typeof window<"u"&&((e=window.next)===null||e===void 0?void 0:e.version)||(typeof process<"u"?(t=yd)===null||t===void 0?void 0:t.NEXT_RUNTIME:void 0)}var Pd=["children"];function Od(e,t){if(e==null)return{};var r=_d(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 _d(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 Fd(e){var t=e.children,r=Od(e,Pd),n=wd(r);return n.started?ge.createElement(Ea.Provider,{value:n},ge.createElement(Xr.Provider,{value:n.mainIndex},t,ge.createElement(Ed,{search:n}))):null}function Ed(e){var t=e.search;return x.useEffect(function(){t._resetScheduleSearch&&t._resetScheduleSearch()},[t]),null}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 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 be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
24t%2?vi(Object(r),!0).forEach(function(n){Za(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 Za(e,t,r){return t=Cd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cd(e){var t=$d(e,"string");return xt(t)=="symbol"?t:String(t)}function $d(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 Nd=Rt({name:"hits",connector:!0});const Td=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re;return pa(t,Nd()),function(n){var i=n||{},a=i.escapeHTML,s=a===void 0?!0:a,o=i.transformItems,c=o===void 0?function(h){return h}:o,u,f;return{$$type:"ais.hits",init:function(d){t(be(be({},this.getWidgetRenderState(d)),{},{instantSearchInstance:d.instantSearchInstance}),!0)},render:function(d){var p=this.getWidgetRenderState(d);t(be(be({},p),{},{instantSearchInstance:d.instantSearchInstance}),!1),p.sendEvent("view:internal",p.items)},getRenderState:function(d,p){return be(be({},d),{},{hits:this.getWidgetRenderState(p)})},getWidgetRenderState:function(d){var p,g,m,v=d.results,y=d.helper,b=d.instantSearchInstance;if(u||(u=Hc({instantSearchInstance:b,helper:y,widgetType:this.$$type})),f||(f=Lc({helper:y,widgetType:this.$$type,instantSearchInstance:b})),!v)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:u,bindEvent:f,widgetParams:n};s&&v.hits.length>0&&(v.hits=_c(v.hits));var S=zc(v.hits,v.page,v.hitsPerPage),R=Gc(S,v.queryID),P=c(R,{results:v}),C=(p=v.renderingContent)===null||p===void 0||(g=p.widgets)===null||g===void 0||(m=g.banners)===null||m===void 0?void 0:m[0];return{hits:P,items:P,results:v,banner:C,sendEvent:u,bindEvent:f,widgetParams:n}},dispose:function(d){var p=d.state;return r(),s?p.setQueryParameters(Object.keys(Ht).reduce(function(g,m){return be(be({},g),{},Za({},m,void 0))},{})):p},getWidgetSearchParameters:function(d,p){return s?d.setQueryParameters(Ht):d}}}};function Ad(e,t){return rn(Td,e,t)}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)}function yi(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 xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yi(Object(r),!0).forEach(function(n){Id(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Id(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=Hd(e,"string");return jt(t)=="symbol"?t:String(t)}function Hd(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)}var Ld=Rt({name:"search-box",connector:!0}),Ud=function(t,r){return r(t)},Wd=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re;return pa(t,Ld()),function(n){var i=n||{},a=i.queryHook,s=a===void 0?Ud:a,o,c;return{$$type:"ais.searchBox",init:function(f){var h=f.instantSearchInstance;t(xe(xe({},this.getWidgetRenderState(f)),{},{instantSearchInstance:h}),!0)},render:function(f){var h=f.instantSearchInstance;t(xe(xe({},this.getWidgetRenderState(f)),{},{instantSearchInstance:h}),!1)},dispose:function(f){var h=f.state;return r(),h.setQueryParameter("query",void 0)},getRenderState:function(f,h){return xe(xe({},f),{},{searchBox:this.getWidgetRenderState(h)})},getWidgetRenderState:function(f){var h=f.helper,d=f.instantSearchInstance,p=f.state;return o||(o=function(m){s(m,function(v){return h.setQuery(v).search()})},c=function(){h.setQuery("").search()}),{query:p.query||"",refine:o,clear:c,widgetParams:n,isSearchStalled:d.status==="stalled"}},getWidgetUiState:function(f,h){var d=h.searchParameters,p=d.query||"";return p===""||f&&f.query===p?f:xe(xe({},f),{},{query:p})},getWidgetSearchParameters:function(f,h){var d=h.uiState;return f.setQueryParameter("query",d.query||"")}}}};function kd(e,t){return rn(Wd,e,t)}function Qd(e,t){return Vd(e)||qd(e,t)||Bd(e,t)||Md()}
24function Md(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 25In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bd(e,t){if(e){if(typeof e=="string")return bi(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 bi(e,t)}}function bi(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 qd(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Vd(e){if(Array.isArray(e))return e}function zd(){var e=Pt(),t=Mt(),r=x.useState(function(){var s=Fr(t);return{results:s.results,scopedResults:s.scopedResults}}),n=Qd(r,2),i=n[0],a=n[1];return x.useEffect(function(){function s(){var o=t.getResults();if(o!==null)a({results:o,scopedResults:t.getScopedResults()});else if(e.mainIndex.getIndexName().length===0){var c=e.mainIndex.getWidgets().find(ne);c&&a({results:Fr(t).results,scopedResults:c.getScopedResults()})}}return e.addListener("render",s),s(),function(){e.removeListener("render",s)}},[e,t]),i}function xi(e,t){return Gd(e)||Zd(e,t)||Jd(e,t)||Kd()}function Kd(){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 Jd(e,t){if(e){if(typeof e=="string")return ji(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 ji(e,t)}}function ji(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 Zd(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Gd(e){if(Array.isArray(e))return e}function Xd(){var e=Pt(),t=Mt(),r=t.getIndexId(),n=x.useState(function(){return e.getUiState()}),i=xi(n,2),a=i[0],s=i[1],o=a[r],c=x.useState(function(){return e.renderState}),u=xi(c,2),f=u[0],h=u[1],d=f[r]||{},p=x.useCallback(function(m){e.setUiState(m)},[e]),g=x.useCallback(function(m){t.setIndexUiState(m)},[t]);return x.useEffect(function(){function m(){s(e.getUiState()),h(e.renderState)}return e.addListener("render",m),m(),function(){e.removeListener("render",m)}},[e]),{uiState:a,setUiState:p,indexUiState:o,setIndexUiState:g,renderState:f,indexRenderState:d}}function Ga(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.catchError,r=Pt(),n=Xd(),i=n.uiState,a=n.setUiState,s=n.indexUiState,o=n.setIndexUiState,c=n.renderState,u=n.indexRenderState,f=zd(),h=f.results,d=f.scopedResults,p=x.useCallback(function(){for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];return r.use.apply(r,v),function(){r.unuse.apply(r,v)}},[r]),g=x.useCallback(function(){r.refresh()},[r]);return tn(function(){if(t){var m=function(){};return r.addListener("error",m),function(){return r.removeListener("error",m)}}return function(){}},[r,t]),{results:h,scopedResults:d,uiState:i,setUiState:a,indexUiState:s,setIndexUiState:o,renderState:c,indexRenderState:u,addMiddlewares:p,refresh:g,status:r.status,error:r.error}}function Lr(){return Lr=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},Lr.apply(null,arguments)}function Yd(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 eh(e,t){if(e==null)return{};var r,n,i=Yd(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 pe(){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])}
26,[]).filter(Boolean).join(" ")}var th=["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"];function rh(e){var t=e.createElement;return function(n){var i=n.classNames,a=n.banner;return a.image.urls[0].url?t("aside",{className:pe("ais-Hits-banner",i.bannerRoot)},a.link?t("a",{className:pe("ais-Hits-banner-link",i.bannerLink),href:a.link.url,target:a.link.target},t("img",{className:pe("ais-Hits-banner-image",i.bannerImage),src:a.image.urls[0].url,alt:a.image.title})):t("img",{className:pe("ais-Hits-banner-image",i.bannerImage),src:a.image.urls[0].url,alt:a.image.title})):null}}function nh(e){var t=e.createElement,r=rh({createElement:t});return function(i){var a=i.classNames,s=a===void 0?{}:a,o=i.hits,c=i.itemComponent,u=i.sendEvent,f=i.emptyComponent,h=i.banner,d=i.bannerComponent,p=eh(i,th);return t("div",Lr({},p,{className:pe("ais-Hits",s.root,o.length===0&&pe("ais-Hits--empty",s.emptyRoot),p.className)}),h&&(d?t(d,{className:pe("ais-Hits-banner",s.bannerRoot),banner:h}):t(r,{classNames:s,banner:h})),o.length===0&&f?t(f,null):t("ol",{className:pe("ais-Hits-list",s.list)},o.map(function(g,m){return t(c,{key:g.objectID,hit:g,index:m,className:pe("ais-Hits-item",s.item),onClick:function(){u("click:internal",g,"Hit Clicked")},onAuxClick:function(){u("click:internal",g,"Hit Clicked")}})})))}}var ih=["escapeHTML","transformItems","hitComponent","bannerComponent"],ah=["hit","index"];function Wt(){return Wt=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},Wt.apply(this,arguments)}function Si(e,t){if(e==null)return{};var r=sh(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 sh(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 oh(e){var t=e.hit;return ge.createElement("div",{style:{wordBreak:"break-all"}},JSON.stringify(t).slice(0,100),"â¦")}var ch=nh({createElement:x.createElement});function fr(e){var t=e.escapeHTML,r=e.transformItems,n=e.hitComponent,i=n===void 0?oh:n,a=e.bannerComponent,s=Si(e,ih),o=Ad({escapeHTML:t,transformItems:r},{$$widgetType:"ais.hits"}),c=o.hits,u=o.banner,f=o.sendEvent,h=x.useMemo(function(){return function(g){var m=g.hit;g.index;var v=Si(g,ah);return ge.createElement("li",Wt({key:m.objectID},v),ge.createElement(i,{hit:m,sendEvent:f}))}},[i,f]),d=a===!1?function(){return null}:a,p={hits:c,sendEvent:f,itemComponent:h,banner:u,bannerComponent:d};return ge.createElement(ch,Wt({},s,p))}function uh(e,t,r="WithinHeaders"){const n={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers(){return r==="WithinHeaders"?n:{}},queryParameters(){return r==="WithinQueryParameters"?n:{}}}}function lh(e){let t;const r=`algolia-client-js-${e.key}`;function n(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function i(){return JSON.parse(n().getItem(r)||"{}")}return{get(a,s,o={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>{const c=JSON.stringify(a),u=i()[c];return Promise.all([u||s(),u!==void 0])}).then(([c,u])=>Promise.all([c,u||o.miss(c)])).then(([c])=>c)},set(a,s){return Promise.resolve().then(()=>{const o=i();return o[JSON.stringify(a)]=s,n().setItem(r,JSON.stringify(o)),s})},delete(a){return Promise.resolve().then(()=>{const s=i();delete s[JSON.stringify(a)],n().setItem(r,JSON.stringify(s))})},clear(){return Promise.resolve().then(()=>{n().removeItem(r)})}}}function fh(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(i=>Promise.all([i,r.miss(i)])).then(([i])=>i)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function Je(e){const t=[...e.caches],r=t.shift();return r===void 0?fh():{get(n,i,a={miss:()=>Promise.resolve()}){return r.get(n,i,a).catch(()=>Je({caches:t}).get(n,i,a))},set(n,i){return r.set(n,i).catch(()=>Je({caches:t}).set(n,i))},delete(n){return r.delete(n).catch(()=>Je({caches:t}).delete(n))}
26,clear(){return r.clear().catch(()=>Je({caches:t}).clear())}}}function dr(e={serializable:!0}){let t={};return{get(r,n,i={miss:()=>Promise.resolve()}){const a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);const s=n();return s.then(o=>i.miss(o)).then(()=>s)},set(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}const wi=2*60*1e3;function Ri(e,t="up"){const r=Date.now();function n(){return t==="up"||Date.now()-r>wi}function i(){return t==="timed out"&&Date.now()-r<=wi}return{...e,status:t,lastUpdate:r,isUp:n,isTimedOut:i}}function Ot(e,t,r){return t=hh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dh(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hh(e){var t=dh(e,"string");return typeof t=="symbol"?t:String(t)}class Xa extends Error{constructor(t,r){super(t),Ot(this,"name","AlgoliaError"),r&&(this.name=r)}}class Ya extends Xa{constructor(t,r,n){super(t,n),Ot(this,"stackTrace",void 0),this.stackTrace=r}}class mh extends Ya{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact [email protected].",t,"RetryError")}}class Ur extends Ya{constructor(t,r,n,i="ApiError"){super(t,n,i),Ot(this,"status",void 0),this.status=r}}class ph extends Xa{constructor(t,r){super(t,"DeserializationError"),Ot(this,"response",void 0),this.response=r}}class gh extends Ur{constructor(t,r,n,i){super(t,r,i,"DetailedApiError"),Ot(this,"error",void 0),this.error=n}}function vh(e){const t=e;for(let r=e.length-1;r>0;r--){const n=Math.floor(Math.random()*(r+1)),i=e[r];t[r]=e[n],t[n]=i}return t}function yh(e,t,r){const n=bh(r);let i=`${e.protocol}://${e.url}/${t.charAt(0)==="/"?t.substr(1):t}`;return n.length&&(i+=`?${n}`),i}function bh(e){const t=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(e).map(r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`).join("&")}function xh(e,t){if(e.method==="GET"||e.data===void 0&&t.data===void 0)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}function jh(e,t,r){const n={Accept:"application/json",...e,...t,...r},i={};return Object.keys(n).forEach(a=>{const s=n[a];i[a.toLowerCase()]=s}),i}function Sh(e){try{return JSON.parse(e.content)}catch(t){throw new ph(t.message,e)}}function wh({content:e,status:t},r){try{const n=JSON.parse(e);return"error"in n?new gh(n.message,t,n.error,r):new Ur(n.message,t,r)}catch{}return new Ur(e,t,r)}function Rh({isTimedOut:e,status:t}){return!e&&~~t===0}function Ph({isTimedOut:e,status:t}){return e||Rh({isTimedOut:e,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function Oh({status:e}){return~~(e/100)===2}function _h(e){return e.map(t=>es(t))}function es(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function Fh({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:n,algoliaAgent:i,timeouts:a,requester:s,requestsCache:o,responsesCache:c}){async function u(d){const p=await Promise.all(d.map(b=>t.get(b,()=>Promise.resolve(Ri(b))))),g=p.filter(b=>b.isUp()),m=p.filter(b=>b.isTimedOut()),v=[...g,...m];return{hosts:v.length>0?v:d,getTimeout(b,S){return(m.length===0&&b===0?1:m.length+3+b)*S}}}async function f(d,p,g=!0){const m=[],v=xh(d,p),y=jh(r,d.headers,p.headers),b=d.method==="GET"?{...d.data,...p.data}:{},S={...n,...d.queryParameters,...b};if(i.value&&(S["x-algolia-agent"]=i.value),p&&p.queryParameters)for(const _ of Object.keys(p.queryParameters))!p.queryParameters[_]||Object.prototype.toString.call(p.queryParameters[_])==="[object Object]"?S[_]=p.queryParameters[_]:S[_]=p.queryParameters[_].toString();let R=0;const P=async(_,N)=>{const T=_.pop();if(T===void 0)throw new mh(_h(m));let F=p.timeout;F===void 0&&(F=g?a.read:a.write);const O={data:v,headers:y,method:d.method,url:yh(T,d.path,S),connectTimeout:N(R,a.connect),responseTimeout:N(R,F)},H=E=>{const D={request:O,response:E,host:T,triesLeft:_.length};return m.push(D),D},j=await s.send(O);if(Ph(j)){const E=H(j);return j.isTimedOut&&R++,console.log("Retryable failure",es(E)),await t.set(T,Ri(T,j.isTimedOut?"timed out":"down")),P(_,N)}if(Oh(j))return Sh(j);throw H(j),wh(j,m)}
26,C=e.filter(_=>_.accept==="readWrite"||(g?_.accept==="read":_.accept==="write")),$=await u(C);return P([...$.hosts].reverse(),$.getTimeout)}function h(d,p={}){const g=d.useReadTransporter||d.method==="GET";if(!g)return f(d,p,g);const m=()=>f(d,p);if((p.cacheable||d.cacheable)!==!0)return m();const y={request:d,requestOptions:p,transporter:{queryParameters:n,headers:r}};return c.get(y,()=>o.get(y,()=>o.set(y,m()).then(b=>Promise.all([o.delete(y),b]),b=>Promise.all([o.delete(y),Promise.reject(b)])).then(([b,S])=>S)),{miss:b=>c.set(y,b)})}return{hostsCache:t,requester:s,timeouts:a,algoliaAgent:i,baseHeaders:r,baseQueryParameters:n,hosts:e,request:h,requestsCache:o,responsesCache:c}}function Eh(e){const t={value:`Algolia for JavaScript (${e})`,add(r){const n=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function Ch({algoliaAgents:e,client:t,version:r}){const n=Eh(r).add({segment:t,version:r});return e.forEach(i=>n.add(i)),n}const $h=1e3,Nh=2e3,Th=3e4;function Ah(){function e(t){return new Promise(r=>{const n=new XMLHttpRequest;n.open(t.method,t.url,!0),Object.keys(t.headers).forEach(o=>n.setRequestHeader(o,t.headers[o]));const i=(o,c)=>setTimeout(()=>{n.abort(),r({status:0,content:c,isTimedOut:!0})},o),a=i(t.connectTimeout,"Connection timeout");let s;n.onreadystatechange=()=>{n.readyState>n.OPENED&&s===void 0&&(clearTimeout(a),s=i(t.responseTimeout,"Socket timeout"))},n.onerror=()=>{n.status===0&&(clearTimeout(a),clearTimeout(s),r({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=()=>{clearTimeout(a),clearTimeout(s),r({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(t.data)})}return{send:e}}const ts="5.0.0-alpha.88";function Ih(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(vh([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Dh({appId:e,apiKey:t,authMode:r,algoliaAgents:n,...i}){const a=uh(e,t,r),s=Fh({hosts:Ih(e),...i,algoliaAgent:Ch({algoliaAgents:n,client:"Lite",version:ts}),baseHeaders:{"content-type":"text/plain",...a.headers(),...i.baseHeaders},baseQueryParameters:{...a.queryParameters(),...i.baseQueryParameters}});return{transporter:s,appId:e,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(o,c){s.algoliaAgent.add({segment:o,version:c})},post({path:o,parameters:c,body:u},f){if(!o)throw new Error("Parameter `path` is required when calling `post`.");const g={method:"POST",path:"/1{path}".replace("{path}",o),queryParameters:c||{},headers:{},data:u||{}};return s.request(g,f)},search(o,c){if(o&&Array.isArray(o)&&(o={requests:o.map(({params:g,...m})=>m.type==="facet"?{...m,...g,type:"facet"}:{...m,...g,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!o)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!o.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const d={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:o,useReadTransporter:!0,cacheable:!0};return s.request(d,c)}}}function Hh(e,t,r){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");return Dh({appId:e,apiKey:t,timeouts:{connect:$h,read:Nh,write:Th},requester:Ah(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:dr(),requestsCache:dr({serializable:!1}),hostsCache:Je({caches:[lh({key:`${ts}-${e}`}),dr()]}),...r})}const Pi="gtag-loader";function Lh({gaTrackingId:e}){const t=!!(e!=null&&e.length),r=kt();return x.useEffect(()=>{if(!t||document.getElementById(Pi))return;const n=document.createElement("script");n.id=Pi,n.async=!0,n.src=`https://www.googletagmanager.com/gtag/js?i
26d=${e}`,document.head.appendChild(n)},[t,e]),x.useEffect(()=>{t&&qs(r.pathname,e)},[r,e,t]),t?l.jsx("script",{id:"gtag-init",dangerouslySetInnerHTML:{__html:` 27 window.dataLayer = window.dataLayer || []; 28 function gtag(){dataLayer.push(arguments);} 29 window.gtag = gtag; 30 gtag('js', new Date()); 31 gtag('config', '${e}', { 32 page_path: window.location.pathname, 33 }); 34 `}}):null}function Uh({className:e,...t}){return l.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[l.jsx("circle",{cx:"15",cy:"15",r:"14.5",stroke:"currentColor"}),l.jsx("path",{d:"M7 11.2864C7.14012 10.5479 7.27266 9.80948 7.67408 9.15054C8.59053 7.65469 10.0258 7.07907 11.6807 7.0412C13.934 6.98439 16.191 6.98818 18.4481 7.0412C19.978 7.07907 21.3413 7.58273 22.2729 8.90818C22.8713 9.76404 23.0947 10.7411 23.1098 11.7522C23.1439 13.9184 23.1591 16.0883 23.1098 18.2545C23.0682 20.0002 22.4623 21.4885 20.8301 22.3747C20.0765 22.7837 19.2471 22.9617 18.4026 22.973C16.1759 22.9995 13.9491 23.0223 11.7224 22.973C10.0523 22.9352 8.60189 22.3709 7.67408 20.8599C7.27266 20.2047 7.14012 19.4625 7 18.724V11.2864H7ZM15.0776 8.56735C13.9718 8.56735 12.866 8.54463 11.7602 8.57114C10.0334 8.61279 8.97302 9.41942 8.6587 10.9077C8.59053 11.222 8.5413 11.5477 8.5413 11.8696C8.52994 13.9638 8.50343 16.058 8.54509 18.1522C8.58675 20.235 9.63953 21.3484 11.6504 21.4242C13.9188 21.5075 16.191 21.4999 18.4594 21.4242C20.1333 21.3674 21.1292 20.5645 21.4473 19.1179C21.5041 18.8604 21.5572 18.5953 21.561 18.3302C21.5723 15.9444 21.7049 13.5548 21.489 11.1728C21.3602 9.76025 20.4173 8.84001 19.0085 8.64688C17.702 8.46889 16.3879 8.59386 15.0776 8.56735Z",fill:"currentColor"}),l.jsx("path",{d:"M19.2358 15.0274C19.2283 17.2769 17.3613 19.125 15.0701 19.1515C12.7714 19.178 10.8628 17.2807 10.8704 14.9744C10.878 12.706 12.8131 10.805 15.0777 10.8504C17.4029 10.8959 19.2396 12.7439 19.232 15.0274H19.2358ZM17.687 15.0085C17.687 13.577 16.5092 12.4031 15.0626 12.3955C13.6235 12.3879 12.4268 13.5657 12.423 14.9934C12.423 16.4248 13.6008 17.5988 15.0474 17.6064C16.4865 17.614 17.6832 16.4362 17.687 15.0085Z",fill:"currentColor"}),l.jsx("path",{d:"M19.3493 9.75986C19.9022 9.75228 20.3718 10.2105 20.3718 10.7596C20.3718 11.2822 19.9174 11.7329 19.3834 11.748C18.8305 11.7632 18.3496 11.3125 18.342 10.7672C18.3306 10.2181 18.7851 9.76743 19.3531 9.75986H19.3493Z",fill:"currentColor"})]})}function Wh({className:e,...t}){return l.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[l.jsx("circle",{cx:"15",cy:"15",r:"14.5",stroke:"currentColor"}),l.jsx("path",{d:"M12.1107 8.55739C12.1107 9.41395 11.5656 10.1148 10.5533 10.1148C9.62295 10.1107 9 9.40985 9 8.63526C9 7.77869 9.62295 7 10.5574 7C11.4918 7 12.1148 7.70082 12.1148 8.55739H12.1107Z",fill:"currentColor"}),l.jsx("path",{d:"M12.1107 10.8896H9V21.0004H12.1107V10.8896Z",fill:"currentColor"}),l.jsx("path",{d:"M19.578 11.0451C17.9427 11.0451 17.0124 11.9795 16.623 12.6025H16.5451L16.3894 11.2787H13.5902C13.5902 12.1353 13.6681 13.1435 13.6681 14.3115V21.0001H16.7788V15.4796C16.7788 15.1681 16.7788 14.9345 16.8566 14.7009C17.0902 14.1558 17.4796 13.455 18.3361 13.455C19.4263 13.455 19.8935 14.3894 19.8935 15.6312V20.996H23.0042V15.2419C23.0042 12.3648 21.5247 11.041 19.5821 11.041L19.578 11.0451Z",fill:"currentColor"})]})}function kh({className:e,...t}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",className:e,...t,children:l.jsx("path",{d:"M6.74319 6.30435C5.81855 6.30435 5.06203 6.01015 4.47363 5.42174C3.88522 4.83333 3.59102 4.07681 3.59102 3.15217C3.59102 2.22754 3.88522 1.47101 4.47363 0.882609C5.06203 0.294203 5.81855 0 6.74319 0C7.66783 0 8.42435 0.294203 9.01276 0.882609C9.60116 1.47101 9.89537 2.22754 9.89537 3.15217C9.89537 4.07681 9.60116 4.83333 9.01276 5.42174C8.42435 6.01015 7.66783 6.30435 6.74319 6.30435ZM0.0185547 13.05V11.0746C0.0185547 10.5423 0.151646 10.087 0.41783 9.7087C0.684014 9.33043 1.02725 9.04324 1.44754 8.8471C2.38619 8.42681 3.28631 8.11159 4.1479 7.90145C5.0095 7.6913 5.87459 7.58623 6.74319 7.58623C7.61179 7.58623 8.47339 7.69481 9.32798 7.91196C10.1826 8.12911 11.0786 8.44218 12.0162 8.85118C12.4547 9.04908 12.8063 9.33604 13.0709 9.71206C13.3355 10.0881 13.4678 10.5423 13.4678 11.0746V13.05H0.0185547ZM1.27942 11.7891H12.207V11.0746C12.207 10.8505 12.1404 10.6368 12.0073 10.4337C11.8742 10.2306 11.7096 10.08 11.5135 9.98188C10.6169 9.54758 9.7973 9.24988 9.05479 9.08877C8.31227 8.92766 7.54174 8.8471 6.74319 8.8471C5.94464 8.8471 5.16711 8.92766 4.41058 9.08877C3.65406 9.24988 2.8345 9.54758 1.95189 9.98188C1.75575 10.08 1.59464 10.2306 1.46855 10.4337C1.34247 10.6368 1.27942 10.8505 1.27942 11.0746V11.7891ZM6.74319 5.04348C7.28957 5.04348 7.74138 4.86486 8.09863 4.50761C8.45587 4.15036 8.6345 3.69855 8.6345 3.15217C8.6345 2.6058 8.45587 2.15399 8.09863 1.79674C7.74138 1.43949 7.28957 1.26087 6.74319 1.26087C6.19682 1.26087 5.745 1.43949 5.38776 1.79674C5.03051 2.15399 4.85189 2.6058 4.85189 3.15217C4.85189 3.69855 5.03051 4.15036 5.38776 4.50761C5.745 4.86486 6.19682 5.04348 6.74319 5.04348Z",fill:"currentColor"})})}function rs(e){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",...e,children:l.jsx("path",{d:"M12.0255 12.8345L7.59406 8.40311C7.22631 8.72183 6.79726 8.97006 6.30693 9.14781C5.8166 9.32555 5.29561 9.41443 4.74399 9.41443C3.42008 9.41443 2.29844 8.95474 1.37907 8.03536C0.459689 7.11598 0 6.0066 0 4.70721C0 3.40783 0.459689 2.29844 1.37907 1.37907C2.29844 0.459689 3.41396 0 4.7256 0C6.02499 0 7.1313 0.459689 8.04455 1.37907C8.9578 2.29844 9.41443 3.40783 9.41443 4.70721C9.41443 5.23432 9.32862 5.74305 9.157 6.23338C8.98538 6.72372 8.72796 7.1834 8.38472 7.61245L12.8529 12.0438C12.9632 12.1419 13.0184 12.2676 13.0184 12.4208C13.0184 12.574 12.9571 12.7119 12.8345 12.8345C12.7242 12.9448 12.5893 13 12.43 13C12.2706 13 12.1358 12.9448 12.0255 12.8345ZM4.7256 8.31117C5.71853 8.31117 6.56436 7.95875 7.26308 7.25389C7.9
346181 6.54903 8.31117 5.70014 8.31117 4.70721C8.31117 3.71429 7.96181 2.86539 7.26308 2.16054C6.56436 1.45568 5.71853 1.10325 4.7256 1.10325C3.72041 1.10325 2.86539 1.45568 2.16054 2.16054C1.45568 2.86539 1.10325 3.71429 1.10325 4.70721C1.10325 5.70014 1.45568 6.54903 2.16054 7.25389C2.86539 7.95875 3.72041 8.31117 4.7256 8.31117Z",fill:"currentColor"})})}function Qh({className:e="",...t}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"15",viewBox:"0 0 12 15",className:e,...t,children:l.jsx("path",{d:"M1.125 15C0.825 15 0.5625 14.8875 0.3375 14.6625C0.1125 14.4375 0 14.175 0 13.875V4.125C0 3.825 0.1125 3.5625 0.3375 3.3375C0.5625 3.1125 0.825 3 1.125 3H3.1875V2.8125C3.1875 2.025 3.45937 1.35938 4.00312 0.815625C4.54687 0.271875 5.2125 0 6 0C6.7875 0 7.45313 0.271875 7.99688 0.815625C8.54063 1.35938 8.8125 2.025 8.8125 2.8125V3H10.875C11.175 3 11.4375 3.1125 11.6625 3.3375C11.8875 3.5625 12 3.825 12 4.125V13.875C12 14.175 11.8875 14.4375 11.6625 14.6625C11.4375 14.8875 11.175 15 10.875 15H1.125ZM1.125 13.875H10.875V4.125H8.8125V5.8125C8.8125 5.975 8.75938 6.10938 8.65313 6.21563C8.54688 6.32188 8.4125 6.375 8.25 6.375C8.0875 6.375 7.95312 6.32188 7.84687 6.21563C7.74062 6.10938 7.6875 5.975 7.6875 5.8125V4.125H4.3125V5.8125C4.3125 5.975 4.25938 6.10938 4.15313 6.21563C4.04688 6.32188 3.9125 6.375 3.75 6.375C3.5875 6.375 3.45312 6.32188 3.34687 6.21563C3.24062 6.10938 3.1875 5.975 3.1875 5.8125V4.125H1.125V13.875ZM4.3125 3H7.6875V2.8125C7.6875 2.3375 7.525 1.9375 7.2 1.6125C6.875 1.2875 6.475 1.125 6 1.125C5.525 1.125 5.125 1.2875 4.8 1.6125C4.475 1.9375 4.3125 2.3375 4.3125 2.8125V3ZM1.125 13.875V4.125V13.875Z"})})}function Mh({className:e,...t}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",className:e,...t,children:l.jsx("path",{d:"M5.02564 8.27682C4.28623 8.23657 3.66235 7.93877 3.15401 7.3834C2.64566 6.82804 2.39149 6.15999 2.39149 5.37926C2.39149 4.57438 2.66107 3.89023 3.20022 3.32682C3.73938 2.7634 4.39406 2.4817 5.16428 2.4817C5.91139 2.4817 6.55067 2.7473 7.08212 3.27852C7.61357 3.80974 7.89855 4.46572 7.93707 5.24645L7.20921 5.00499C7.12449 4.48987 6.89342 4.06127 6.51601 3.7192C6.13861 3.37712 5.68803 3.20609 5.16428 3.20609C4.58662 3.20609 4.0956 3.41737 3.69124 3.83993C3.28687 4.26249 3.08469 4.7756 3.08469 5.37926C3.08469 5.91852 3.24836 6.38737 3.5757 6.78578C3.90305 7.1842 4.31319 7.42767 4.80613 7.51621L5.02564 8.27682ZM5.5802 10.1844C5.51088 10.1924 5.44156 10.1985 5.37224 10.2025C5.30292 10.2065 5.2336 10.2085 5.16428 10.2085C4.525 10.2085 3.92423 10.0818 3.36197 9.82822C2.79971 9.57468 2.31062 9.2306 1.8947 8.79596C1.47878 8.36133 1.14952 7.85023 0.906897 7.26267C0.664278 6.67511 0.542969 6.0473 0.542969 5.37926C0.542969 4.71121 0.664278 4.0834 0.906897 3.49584C1.14952 2.90828 1.47878 2.39718 1.8947 1.96255C2.31062 1.52791 2.79971 1.18383 3.36197 0.930293C3.92423 0.676756 4.525 0.549988 5.16428 0.549988C5.80356 0.549988 6.40433 0.676756 6.96659 0.930293C7.52885 1.18383 8.01794 1.52791 8.43386 1.96255C8.84977 2.39718 9.17904 2.90828 9.42166 3.49584C9.66428 4.0834 9.78559 4.71121 9.78559 5.37926C9.78559 5.45169 9.78366 5.52413 9.77981 5.59657C9.77596 5.66901 9.77019 5.74145 9.76248 5.81389L9.09239 5.59657V5.37926C9.09239 4.23633 8.71113 3.26645 7.94862 2.46962C7.1861 1.67279 6.25799 1.27438 5.16428 1.27438C4.07057 1.27438 3.14246 1.67279 2.37994 2.46962C1.61742 3.26645 1.23617 4.23633 1.23617 5.37926C1.23617 6.52218 1.61742 7.49206 2.37994 8.28889C3.14246 9.08572 4.07057 9.48413 5.16428 9.48413H5.37224L5.5802 10.1844ZM9.10395 10.45L7.12834 8.38548L6.55067 10.2085L5.16428 5.37926L9.78559 6.82804L8.04105 7.43169L10.0167 9.49621L9.10395 10.45Z",fill:"#2B42FA"})})}function Wr({className:e="fill-blue",...t}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 747.6 822.54",className:e,...t,children:l.jsx("path",{d:"M0 46.37C0 25.08 17.27 7.81 38.56 7.81s38.56 17.27 38.56 38.56-17.26 38.56-38.56 38.56S0 67.67 0 46.37Zm544.27 67.24 32.7 4.48c27.32 3.74 48.8 25.22 52.54 52.54l4.48 32.71c1.32 9.67 15.31 9.67 16.63 0l4.48-32.7c3.74-27.32 25.22-48.8 52.54-52.54l32.7-4.48c9.67-1.32 9.67-15.31 0-16.63l-32.71-4.48c-27.32-3.74-48.8-25.22-52.54-52.54l-4.48-32.7c-1.32-9.67-15.31-9.67-16.63 0l-4.48 32.7c-3.74 27.32-25.22 48.8-52.54 52.54l-32.7 4.48c-9.67 1.32-9.67 15.31 0 16.63ZM203.32 708.93l-32.71-4.48c-27.32-3.74-48.8-25.22-52.54-52.54l-4.48-32.7c-1.32-9.67-15.31-9.67-16.63 0l-4.48 32.7c-3.74 27.32-25.22 48.8-52.54 52.54l-32.7 4.48c-9.67 1.32-9.67 15.31 0 16.63l32.7 4.48c27.32 3.74 48.8 25.22 52.54 52.54l4.48 32.71c1.32 9.67 15.31 9.67 16.63 0l4.48-32.7c3.74-27.32 25.22-48.8 52.54-52.54l32.7-4.48c9.67-1.32 9.67-15.31 0-16.63Zm254.95-259.1c0-21.35 17.32-38.66 38.68
34-38.66h34.81V249.26c0-21.36-17.32-38.68-38.68-38.68H315.92V38.68c0-21.35-17.31-38.67-38.66-38.68-44.41-.02-100.01.06-113.79.06-24.7 0-61.59 10.17-61.59 46.31s36.89 45.89 61.59 45.89h3.02c24.37 0 54.65 3.43 54.65 33.61s-29.99 33.61-54.65 33.61H64.86C33.07 159.48 0 172.27 0 205.82s32.84 45.92 64.86 45.92h51.24c28.81 0 57.51 4.05 57.51 33.61s-28.69 33.61-57.51 33.61h-15.14c-27.7 0-74.92 3.39-74.92 46.13s47.05 46.13 74.92 46.13h141.46V249.26c0-21.36 17.32-38.68 38.68-38.68h34.82v1.55c0 18.66.02 117.41 0 160.44 0 21.35-17.32 38.66-38.68 38.66h-34.81v161.85c0 21.36 17.32 38.68 38.68 38.68h177.16V449.83Zm0 161.93v172.1c0 21.36 17.32 38.68 38.68 38.68h46.71c30.01 0 79.87-5.01 122.77-32.15l41.84 16.68c33.07 9.83 49.2-10.11 32.7-40.4l-17.59-37.89c14.89-28.2 24.22-64.71 24.22-111.94 0-185.02-142.96-205.65-203.94-205.65h-11.89v161.97c0 21.36-17.32 38.68-38.68 38.68l-34.82-.06Z"})})}function Oi({...e}){return l.jsx(As,{...e,className:W("group w-fit flex justify-between h-fit",e.className),onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),size:Ce.M,icon:()=>l.jsx(Ze,{className:"-rotate-45 w-2 h-2 ml-2"}),children:l.jsx("h5",{className:"uppercase text-xs",children:e.children})})}const _i="fbq-loader";function Bh({metaPixelId:e}){const t=!!(e!=null&&e.length);return x.useEffect(()=>{if(!t||document.getElementById(_i))return;const r=document.createElement("script");r.id=_i,r.async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",document.head.appendChild(r)},[t]),t?l.jsx("script",{id:"fbq-init",dangerouslySetInnerHTML:{__html:` 35 !function(f,b,e,v,n,t,s){ 36 if(f.fbq)return; 37 n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 38 if(!f._fbq)f._fbq=n; 39 n.push=n;n.loaded=!0;n.version='2.0';n.queue=[]; 40 }(window,document,'script'); 41 fbq('init', '${e}'); 42 fbq('track', 'PageView'); 43 `}}):null}const Fi="gtm-loader";function qh({GTMId:e}){const t=!!(e!=null&&e.length);return x.useEffect(()=>{if(!t||document.getElementById(Fi))return;const r=document.createElement("script");r.id=Fi,r.async=!0,r.src=`https://www.googletagmanager.com/gtm.js?id=${e}`,document.head.appendChild(r)},[t,e]),t?l.jsx("script",{id:"gtm-init",dangerouslySetInnerHTML:{__html:` 44 window.dataLayer = window.dataLayer || []; 45 window.dataLayer.push({'gtm.start': new Date().getTime(), event: 'gtm.js'}); 46 `}}):null}const Ei="ua-loader";function Vh({universalAnalyticsId:e}){const t=!!(e!=null&&e.length);return x.useEffect(()=>{if(!t||document.getElementById(Ei))return;const r=document.createElement("script");r.id=Ei,r.async=!0,r.src="//www.google-analytics.com/analytics.js",document.head.appendChild(r)},[t]),t?l.jsx("script",{id:"ua-init",dangerouslySetInnerHTML:{__html:` 47 (function(i,r){ 48 i['GoogleAnalyticsObject']=r; 49 i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)}; 50 i[r].l=1*new Date(); 51 })(window,'ga'); 52 ga('create', '${e}', 'auto', {'allowLinker': true}); 53 ga('require', 'displayfeatures'); 54 ga('send', 'pageview'); 55 `}}):null}var ns=(e=>(e.Page="page",e.Sort="sort",e.Search="search",e.Sameday="sameday",e.Type="type",e.Collection="collection",e.Category="category",e.Brand="brand",e.Price="price",e.Decoration="decoration",e.Color="color",e.Size="size",e.ItemsPerPage="itemsPerPage",e))(ns||{});const Ym=["type","collection","category","brand","price","decoration","color","size"];var is=(e=>(e.PriceAsc="priceAsc",e.PriceDesc="priceDesc",e.Popular="popular",e.Latest="latest",e))(is||{});const zh=24,Kh=Us(e=>{const t={...e};return t.brands!==void 0&&t.brand===void 0&&(t.brand=Array.isArray(t.brands)?t.brands[0]:t.brands,delete t.brands),t},_s.extend({page:ye.number().min(1).optional(),sort:Zt(is).optional(),search:ye.string().optional(),sameday:vs(),type:Zt(ys).optional(),collection:ye.string().optional(),category:hn(Ws()).optional(),brand:ye.string().optional(),price:hn(ye.number()).min(1).max(2).optional(),decoration:Zt(Ve).optional(),color:ye.string().optional(),size:ye.string().optional(),itemsPerPage:ye.number().optional()}));function ep({request:e,isPod:t,isWeb:r,sameday:n,includeDrafts:i,category:a,orderBy:s}){var h,d;const{error:o,data:c}=Kh.safeParse(Fs(e)),u=(c==null?void 0:c.itemsPerPage)||zh;if(n&&c&&(c.sameday=!0),o)return{variables:{},params:{}};let f={take:u,skip:c.page?(c.page-1)*u:0,orderBy:s||[{popularity:Ue.Desc}],where:i?{}:{status:{equals:Hi.Published}}};if(a&&(f.where={...f.where,categories:{some:{slug:{equals:a.slug}}}}),t&&(f.where={...f.where,availablePOD:{equals:!0}}),r&&(f.where={...f.where,availableWeb:{equals:!0}}),c.sort){let p={};switch(c.sort){case"popular":p={popularity:Ue.Desc};break;case"latest":p={createdAt:Ue.Desc};break;case"priceAsc":p={salePrice:Ue.Asc};break;case"priceDesc":p={salePrice:Ue.Desc};break}f.orderBy={...p}}if(c.sameday&&(f.where={...f.where,isSameday:{equals:!0}}),c.decoration)switch(c.decoration){case Ve.Dtg:f.where={...f.where,hasDTG:{equals:!0}};break;case Ve.Scr:f.where={...f.where,hasSCR:{equals:!0}};break;case Ve.Emb:f.where={...f.where,hasEMB:{equals:!0}};break;case Ve.Dtf:f.where={...f.where,hasDTF:{equals:!0}};break}if(c.color&&(f.where={...f.where,colours:{some:{colour:{groups:{some:{name:{equals:c.color,mode:ae.Insensitive}}}}}}}),c.size&&(f.where={...f.where,variants:{some:{size:{code:{equals:c.size,mode:ae.Insensitive}}}}}),c.price&&(f.where={...f.where,salePrice:{gte:c.price[0].toString(),lte:(h=c.price[1])==null?void 0:h.toString()}}),c.search){const p=c.search.split(" ").map(g=>
55g.trim()).filter(Boolean);f.where={...f.where,AND:p.map(g=>({OR:[{name:{contains:g,mode:ae.Insensitive}},{code:{contains:g,mode:ae.Insensitive}},{brand:{name:{contains:g,mode:ae.Insensitive}}},{categories:{some:{name:{contains:g,mode:ae.Insensitive}}}}]}))}}if(c.type&&(f.where={...f.where,type:{equals:c.type}}),c.collection&&(f.where={...f.where,collections:{some:{code:{equals:c.collection,mode:ae.Insensitive}}}}),(d=c.category)!=null&&d.length){const[p,g]=c.category;f.where={...f.where,categories:{some:g?{code:{equals:g,mode:ae.Insensitive},parents:{some:{code:{equals:p,mode:ae.Insensitive}}}}:{OR:[{code:{equals:p,mode:ae.Insensitive}},{parents:{some:{code:{equals:p,mode:ae.Insensitive}}}}]}}}}return c.brand&&(f.where={...f.where,brand:{code:{equals:c.brand,mode:ae.Insensitive}}}),{variables:f,params:c}}function tp(e,t,r){let n=new URLSearchParams;if(Object.entries(r).map(([i,a])=>{n.set(i,typeof a!="string"?JSON.stringify(a):a)}),e!=="page"&&n.delete("page"),!t)n.delete(e);else if(e==="price")n.set(e,JSON.stringify(t));else if(e==="category"){const i=Array.isArray(t)?Array.from(t):[t],a=r.category;if(a&&a.length){const[s,o]=i;!s&&!o?n.delete(e):a[0]!==s?n.set(e,JSON.stringify(i)):o?a[1]!==o?n.set(e,JSON.stringify(i)):n.delete(e):a[1]?n.set(e,JSON.stringify(i)):n.delete(e)}else n.set(e,JSON.stringify(i))}else switch(e){default:!r[e]||r[e]!==t?n.set(e,t):n.delete(e);break}return`?${decodeURIComponent(n.toString())}`}function Jh(){return()=>{}}function Zh(){return x.useSyncExternalStore(Jh,()=>!0,()=>!1)}function Gh(){let e=Xh();return x.createElement(x.Fragment,null,e.map(t=>x.createElement(Yh,{key:t.src,...t})))}function Xh(){let e=kt(),t=Ii();return x.useMemo(()=>{let r=t.flatMap((i,a,s)=>{if(!i.handle)return[];if(i.handle===null)return[];if(typeof i.handle!="object")return[];
55if(!("scripts"in i.handle))return[];let o=i.handle.scripts;if(Array.isArray(o))return o;if(typeof o!="function")return[];let c=o({id:i.id,data:i.data,params:i.params,location:e,parentsData:s.slice(0,a).map(u=>u.data),matches:s});return Array.isArray(c)?c:[]}),n=new Map;for(let i of r)n.set(i.src,i);return[...n.values()]},[t,e])}function Yh({src:e,preload:t=!1,async:r=!0,defer:n=!0,crossOrigin:i,integrity:a,type:s,referrerPolicy:o,noModule:c,nonce:u,id:f}){let h=Zh(),d=x.useRef(h);if(x.useEffect(()=>{if(!d.current&&h)return;let m=document.createElement("script");m.src=e;let v={async:r,defer:n,crossOrigin:i,integrity:a,type:s,referrerPolicy:o,noModule:c,nonce:u,id:f};for(let[y,b]of Object.entries(v))b&&m.setAttribute(y,b.toString());return document.body.appendChild(m),()=>m.remove()},[r,i,n,a,h,c,u,o,e,s,f]),d.current&&h)return null;let p=c?"modulepreload":"preload",g=c?void 0:"script";return x.createElement(x.Fragment,null,t&&x.createElement("link",{rel:p,href:e,as:g,crossOrigin:i,integrity:a,referrerPolicy:o}),x.createElement("script",{id:f,src:e,defer:n,async:r,type:s,noModule:c,nonce:u,crossOrigin:i,integrity:a,referrerPolicy:o}))}function kr({data:e,colour:t,className:r}){const{globalContent:n}=e;return l.jsx("div",{className:W("flex space-x-2",r),children:[{link:n.instagramLink,Icon:Uh},{link:n.linkedinLink,Icon:Wh},{link:n.facebookLink,Icon:$s}].map(({link:i,Icon:a})=>l.jsx("a",{href:i,target:"_blank",children:l.jsx(a,{className:W("w-9 h-9",t==="blue"?"text-blue":"text-white")})},`footer-social-${i}`))})}function Ci({data:e,...t}){return l.jsx("p",{...t,className:W("font-normal text-sm md:text-base",t.className),children:e.acknowledgements})}function em({data:e,...t}){return l.jsxs("div",{...t,className:"space-y-4",children:[l.jsx("h5",{className:"font-belfast font-bold text-xs uppercase",children:e.businessDetailsTitle}),l.jsx("div",{className:"flex flex-col font-normal text-sm md:text-base",children:l.jsx(It,{className:"space-y-2.5 whitespace-pre-line",content:e.businessDetailsText})})]})}function $i({data:e,...t}){return l.jsxs("div",{...t,children:[l.jsx("p",{className:"font-display font-light text-lg md:text-xl",children:e.communityTitle}),l.jsx("p",{className:"hidden md:block font-normal text-base my-3",children:e.communityText}),l.jsxs("div",{className:"space-y-2.5 md:mt-10 mt-2.5",children:[l.jsx("p",{className:"font-normal text-sm md:text-base",children:"Email address"}),l.jsx("input",{className:"w-full bg-transparent border-gray-100 border rounded-3xl h-9 outline-none pl-4"}),l.jsxs("p",{className:"text-xs",children:["This site is protected by reCAPTCHA Enterprise and the Google"," ",l.jsx("a",{href:"https://policies.google.com/privacy",className:"font-bold underline",children:"Privacy Policy"})," ","and"," ",l.jsx("a",{href:"https://policies.google.com/terms",className:"font-bold underline ",children:"Terms of Service"})," ","apply."]}),l.jsx(Bi,{to:"/",size:Ce.XS,className:"bg-blue-bright text-blue fill-blue stroke-blue",icon:Ze,children:l.jsx("h5",{className:"text-xs uppercase",children:"Submit"})})]})]})}function Ni({data:e,...t}){var r;return l.jsxs("div",{...t,children:[l.jsx("h5",{className:"font-belfast font-bold text-xs uppercase mb-3",children:"MORE INFO"}),l.jsxs("div",{className:"space-y-4 flex flex-col font-normal text-sm md:text-base",children:[(r=e.moreLinks.structure)==null?void 0:r.map(n=>n?l.jsx(Q,{to:n.to||"#",className:"hover:underline",children:n.text},n.to):null),l.jsx("a",{href:"/sitemap.xml",target:"_blank",children:"Sitemap"}),l.jsx("a",{href:"/llms.txt",target:"_blank",children:"Hey AI, learn about us"}),l.jsxs("p",{children:["© Copyright ",new Date().getFullYear()," ",l.jsx("br",{}),"The Print Bar. All rights reserved."]}),l.jsxs("a",{href:"https://www.aklr.xyz/",target:"_blank",children:["Design by ",l.jsx("span",{className:"underline",children:"AKLR Studio"})]})]})]})}function tm({data:e}){var i,a;const{globalContent:t}=e,{pathname:r}=kt();return[U.Checkout.Information,U.PaymentRequest.Base].find(s=>r.includes(s))?null:l.jsx("footer",{className:"bg-blue text-gray-100 pt-20 pb-4 lg:pb-8 lg:pt-36",children:l.jsxs(et,{className:"grid grid-cols-2 lg:grid-cols-4 gap-8 lg:gap-16",children:[(i=t.tiles.structure)==null?void 0:i.map(s=>{var o,c;return s?l.jsxs("div",{className:"space-y-2 flex flex-col items-start text-left ",children:[l.jsx("img",{loading:"lazy",src:(o=s.icon)==null?void 0:o.image.url,alt:((c=s.icon)==null?void 0:c.altText)||"icon",className:"w-4 h-4"}),l.jsx("h4",{className:"font-display font-light text-lg lg:text-xl",children:s.link?l.jsx(Q,{to:s.link,children:s.title}):s.title}),l.jsx(It,{...s.text,className:"hidden sm:block font-sans"})]},s.title):null}),l.jsx("div",{className:"col-span-2 lg:col-span-1 grid grid-cols-2 text-lg lg:grid-none lg:flex lg:flex-col gap-x-16 gap-y-2.5",children:(a=t.links.structure)==null?void 0:a.map(s=>l.jsx(Q,{className:"font-display font-light text-lg md:text-xl",to:(s==null?void 0:s.to)||"#",children:s==null?void 0:s.text},s==null?void 0:s.text))}),l.jsx(em,{data:t}),l.jsx(Ni,{data:t,className:"lg:hidden"}),l.jsx(Ci,{data:t,className:"lg:hidden col-span-2"}),l.jsx($i,{data:t,className:"col-span-2 lg:hidden"}),l.jsxs("div",{className:"col-span-2 hidden lg:grid grid-cols-2 gap-x-16 gap-y-12",children:[l.jsx(Ni,{data:t}),l.jsx($i,{data:t}),l.jsx(Ci,{data:t,className:"col-span-2"})]}),l.jsx(Bs,{className:"w-12 h-12 fill-white"}),l.jsxs("div",{className:"flex col-span-2 lg:col-span-1 flex-wrap items-center space-x-3 justify-between",children:[l.jsx(kr,{data:e,colour:"white"}),l.jsx(Oi,{className:"lg:hidden",children:"Back to top"})]}),l.jsx(Oi,{className:"hidden lg:flex w-max my-auto text-white border border-white fill-white hover:scale-105 transition-all",children:"Back to top"})]})})}function rm({setQuote:e,session:t}){const[r,n]=x.useState(),[i,a]=x.useState(!1),s=pr(),o=pr();x.useEffect(()=>{console.log("fetching cart"),s.load(U.API.commerce.cart.get)},[t]),x.useEffect(()=>{var u,f,h,d;s.data&&!o.data&&o.load(U.API.commerce.operationalSettings.get),(f=(u=s.data)==null?void 0:u.quote)!=null&&f.id&&e((d=(h=s.data)==null?void 0:h.quote)==null?void 0:d.id)},[s.data]);const c=x.useCallback(()=>
55{if(s.state==="idle"&&Os(s.data),!s.data)return;const u=Jt(s.data);u>(r||0)&&(sessionStorage.getItem("cartOpened")?console.log("Cart already opened"):(a(!0),sessionStorage.setItem("cartOpened","true"))),n(u)},[s.data,r]);return x.useEffect(c,[s.data]),l.jsx(l.Fragment,{children:l.jsx(Li,{className:"h-full flex items-center",children:({open:u})=>{var f,h,d,p,g,m,v,y,b,S,R,P,C,$,_,N,T;return l.jsxs(l.Fragment,{children:[(u||i)&&l.jsx(Ui,{onClick:()=>a(!1),static:!0,className:"fixed inset-0 bg-black opacity-30"}),l.jsxs(Fe,{as:"button",onClick:F=>{a(!1)},className:W("group focus:outline-none relative z-0 flex items-center overflow-visible py-2 px-2 rounded-full","transition-colors","lg:px-3 border border-transparent lg:border-blue lg:hover:bg-blue lg:hover:text-white",(u||i)&&"bg-blue text-white z-[9999] border-blue"),children:[l.jsx("h6",{className:"text-xs hidden lg:block mr-1.5",children:(h=(f=s.data)==null?void 0:f.quote)!=null&&h.id?"Quote":"Cart"}),u||i?l.jsx(Ye,{className:"w-5 h-auto fill-blue lg:group-hover:fill-white"}):l.jsx(Qh,{className:"w-5 h-5 transition-colors fill-blue lg:group-hover:fill-white"}),!!((p=(d=s.data)==null?void 0:d.items)!=null&&p.length)&&!u&&!i&&l.jsxs("div",{className:"pointer-events-none w-3.5 h-3.5 lg:w-5 lg:h-5 bg-yellow-200 text-xs text-blue rounded-full flex justify-center items-center border-[1px] border-blue absolute top-0.5 right-0 lg:-top-2 lg:-right-1",children:[l.jsx("span",{}),Jt(s.data)]},`cart-${s.data.id}`)]}),l.jsx(ki,{show:u||i,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:l.jsxs(Wi,{static:!0,className:W("fixed right-2 mx-2 lg:mx-4 z-50 bg-white rounded-3xl overflow-y-auto border-[1px] border-blue w-[94dvw] max-w-lg max-h-[80vh]",(m=(g=s.data)==null?void 0:g.quote)!=null&&m.id?"top-[6rem] lg:top-[8rem]":"top-[4.5rem] lg:top-[7.5rem]"),children:[l.jsx("div",{className:"w-4 h-4 border-l border-t border-blue rotate-45 bg-white absolute -top-[0.55rem] right-24 lg:right-12"}),l.jsxs("div",{className:"w-full h-full overflow-y-auto",children:[l.jsxs("div",{className:"flex flex-col mt-4 pb-1 mx-4 bg-white",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h2",{className:"font-display text-xl font-light capitalize flex items-center",children:(v=s.data)!=null&&v.sameday?l.jsxs(l.Fragment,{children:[l.jsx(Es,{className:"w-6 h-6 -translate-x-1 -translate-y-0.5"}),"Sameday ",(b=(y=s.data)==null?void 0:y.quote)!=null&&b.id?"quote":"cart"]}):(R=(S=s.data)==null?void 0:S.quote)!=null&&R.id?"Quote":"Shopping cart"}),l.jsx(Fe,{onClick:F=>{a(!1)},children:l.jsx(Ye,{className:"h-5 w-5"})})]}),l.jsxs("div",{className:"flex flex-1 space-between font-belfast font-bold text-xs mt-3",children:[l.jsxs("h5",{className:"flex-1 uppercase text-xs text-blue",children:["(",Jt(s.data)," items)"]}),l.jsx("h5",{className:"uppercase text-xs text-blue",children:"PRICE"})]})]}),s.state==="idle"?o.data&&((C=(P=s.data)==null?void 0:P.items)!=null&&C.length)?l.jsxs("div",{className:"p-4 pt-0 w-full",children:[l.jsx(js,{hasPopover:!0,settings:o.data,cart:s.data,quoteSession:!!((_=($=s.data)==null?void 0:$.quote)!=null&&_.id)}),l.jsx(Ss,{settings:o.data,cart:s.data,quoteSession:!!((T=(N=s.data)==null?void 0:N.quote)!=null&&T.id)}),l.jsx(ws,{settings:o.data,cart:s.data})]}):l.jsx(Rs,{}):l.jsx("div",{className:"flex justify-center items-center w-full h-full",children:l.jsxs("div",{className:"flex flex-col items-center p-4",children:[l.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue"}),l.jsx("p",{className:"text-xs mt-3",children:"Loading..."})]})})]})]})})]})}})})}function nm({category:e,categories:t,navRef:r,activeCategory:n,setActiveCategory:i}){const a=x.useRef(null),s=x.useRef(null),[o,c]=x.useState(!1),[u,f]=Qi(o,100,{onlyDebounceWhenFalse:!0}),[h,d]=x.useState(!1);qi(r,()=>c(!1)),x.useEffect(()=>{u&&(i==null||i(e.code))},[u]),x.useEffect(()=>{n!==e.code&&c(!1)},[n]),x.useEffect(()=>{const S=P=>{["Tab","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(P.key)&&d(!0),P.key==="Escape"&&c(!1)},R=()=>d(!1);return window.addEventListener("keydown",S),window.addEventListener("mousedown",R),()=>{window.removeEventListener("keydown",S),window.removeEventListener("mousedown",R)}},[]),x.useEffect(()=>{const S=s.current;S&&(o?S.removeAttribute("inert"):S.setAttribute("inert",""))},[o]);const p=()=>c(!0),g=()=>c(!1);function m(){c(!0),requestAnimationFrame(()=>{var R;const S=(R=s.current)==null?void 0:R.querySelector("a");S==null||S.focus()})}function v(S){switch(S.key){case"ArrowDown":case"Enter":case" ":S.preventDefault(),u?c(!1):m();break}}t.filter(S=>{var R,P;return((R=S.parents)==null?void 0:R.find(C=>C.code===e.code))&&!((P=S.children)!=null&&P.length)});const y=t.filter(S=>{var R,P;return((R=S.parents)==null?void 0:R.find(C=>C.code===e.code))&&!!((P=S.children)!=null&&P.length)}),b=[e,...y];return l.jsxs("div",{className:W("h-full hidden md:block transition duration-150 ease-in-out",u&&"bg-blue/10"),onMouseEnter:p,onMouseLeave:g,children:[l.jsxs("button",{ref:a,"aria-haspopup":"true","aria-expanded":u,"aria-controls":`panel-${e.code}`,onKeyDown:v,onFocus:m,className:W("h-full inline-flex transition-all font-semibold font-belfast text-sm items-center gap-1 rounded-lg px-2",h&&"focu
55s:outline-none focus-visible:underline"),children:[e.name.toUpperCase(),l.jsx(Tt,{className:W("w-4 h-4 transition duration-300",u?"rotate-0":"rotate-180")})]}),l.jsx("div",{ref:s,id:`panel-${e.code}`,role:"region","aria-label":`${e.name} menu`,"aria-hidden":!u,className:W("transition absolute inset-x-0 top-full z-40","border-y border-blue bg-white-pearl shadow-lg",u?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),children:l.jsx("div",{className:"grid grid-cols-3 gap-12 p-6 w-full max-w-5xl mx-auto",children:b.map((S,R)=>l.jsxs("div",{className:"flex flex-col w-full",children:[S.name&&l.jsx("a",{href:U.Category(S.slug),children:l.jsxs("h5",{className:"uppercase text-sm hover:underline",children:[S.code===e.code&&"All ",S.name]})}),l.jsx("ul",{className:"[&>li::marker]:content-[''] text-sm mt-2 flex-1",children:t.filter(P=>{var C;return(C=P.parents)==null?void 0:C.some($=>$.code===S.code)}).map((P,C)=>l.jsx("li",{className:"py-2",children:l.jsx("a",{href:U.Category(P.slug),className:"hover:underline py-2",children:P.name})},C))})]},R))})})]})}function im({data:e,active:t,setActive:r,navRef:n,categories:i,className:a}){var N,T,F,O,H;const{globalContent:s}=e,o=((N=s.megaSubMenus.structure)==null?void 0:N.sort((j,E)=>((j==null?void 0:j.order)||0)-((E==null?void 0:E.order)||0)))||[],c=Cs(),[u,f]=x.useState(-1),h=c?o[-1]:o[0],d=u>-1?o[u]:h,p=x.useRef(null),g=x.useRef(null),[m,v]=x.useState(!1),[y]=Qi(m,100,{onlyDebounceWhenFalse:!0}
55),[b,S]=x.useState(!1),[R,P]=x.useState(!1),C=i==null?void 0:i.filter(j=>{var E;return!((E=j.parents)!=null&&E.length)}).sort((j,E)=>j.order-E.order);qi(n,()=>v(!1)),x.useEffect(()=>{y&&r(!0)},[y]),x.useEffect(()=>{m&&P(!0)},[m]),x.useEffect(()=>{t||v(!1)},[t]),x.useEffect(()=>{const j=D=>{["Tab","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(D.key)&&S(!0),D.key==="Escape"&&v(!1)},E=()=>S(!1);return window.addEventListener("keydown",j),window.addEventListener("mousedown",E),()=>{window.removeEventListener("keydown",j),window.removeEventListener("mousedown",E)}},[]),x.useEffect(()=>{const j=g.current;j&&(t?j.removeAttribute("inert"):j.setAttribute("inert",""))},[t]);const $=x.useCallback(()=>{c||(v(!0),requestAnimationFrame(()=>{var E;const j=(E=g.current)==null?void 0:E.querySelector("a");j==null||j.focus()}))},[c]);function _(j){switch(j.key){case"ArrowDown":case"Enter":case" ":j.preventDefault(),y?v(!1):$();break}}return l.jsxs("div",{className:a,onMouseLeave:j=>{v(!1)},children:[l.jsx("button",{ref:p,"aria-haspopup":"true","aria-expanded":y,"aria-controls":"panel-mega",onKeyDown:_,onPointerEnter:j=>{j.pointerType!=="touch"&&v(!0)},onTouchStart:()=>v(!y),className:W("h-full inline-flex transition-all font-semibold font-belfast text-sm items-center gap-1 px-2 lg:pr-4",b&&"focus:outline-none focus-visible:underline",y&&"lg:bg-blue/10"),children:l.jsxs("div",{className:"flex items-center text-xs lg:text-sm transition-all",children:[c&&y?l.jsx(Ye,{className:"h-6 w-6 lg:h-4 lg:w-4"}):!c&&y?l.jsx(Tt,{className:"h-6 w-6 lg:h-4 lg:w-4"}):l.jsx(Ks,{className:"h-6 w-6 lg:w-4 lg:h-4"}),l.jsx("p",{className:"hidden lg:block ml-2 text-inherit uppercase font-semibold font-belfast",children:"Menu"})]})}),l.jsxs("div",{ref:g,id:"panel-mega",role:"region","aria-label":"Mega menu","aria-hidden":!y,className:W("transition absolute inset-x-0 top-full z-40","border-y border-blue bg-white-pearl shadow-lg",y?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),children:[l.jsx("div",{className:"absolute right-8 top-3 hidden xl:block",children:l.jsx("button",{onClick:()=>v(!1),className:"p-1 rounded-full border border-blue",children:l.jsx(Ye,{className:"w-5 h-5"})})}),l.jsxs("div",{className:"hidden lg:flex h-full p-8",children:[l.jsxs("div",{className:"border border-blue rounded-2xl h-min relative bg-white p-8 min-w-64 mb-48",children:[l.jsxs("div",{className:"absolute flex items-center top-0 -translate-y-1/2 right-4 rounded-full border border-blue bg-yellow uppercase px-3 py-1 font-belfast text-xs font-bold",children:[l.jsx("h5",{className:"text-xs",children:"Hover for more"}),l.jsx(Mh,{className:"h-3 w-3 ml-1"})]}),l.jsxs("div",{className:"flex flex-col h-min",children:[l.jsx("div",{className:"flex flex-col gap-2 font-display font-light text-xl",children:o.map((j,E)=>{const{link:D,title:L,subLinks:K}=j||{},ie=u===-1&&!E||u===E;return D?l.jsxs(Kt,{onMouseEnter:()=>f(E),onClick:X=>{X.preventDefault(),f(E)},to:"#",className:W("transition-all flex items-center py-1 whitespace-nowrap",ie&&"opacity-100",d&&!ie&&"opacity-30"),children:[L,l.jsx(gr,{className:W("w-4 h-4 ml-2 opacity-0",ie&&"opacity-100")})]},E):null})}),l.jsx("div",{className:"flex flex-col gap-1 text-xs font-normal mt-7 mb-4",children:(T=s.megaSmallLinks.structure)==null?void 0:T.map((j,E)=>!j||!j.to?null:l.jsx(Kt,{to:j.to,className:"py-0.5",children:j==null?void 0:j.text},`${j.to}${E}`))}),l.jsx("div",{children:l.jsx(kr,{data:e,colour:"blue"})})]})]}),l.jsxs("div",{className:"flex flex-wrap",children:[!!d&&l.jsxs("div",{className:"w-full 2xl:w-1/4 py-8 px-4 lg:px-12 xl:px-20 h-fit",children:[l.jsx("h2",{className:"text-3xl",children:d.altTitle?d.altTitle:d.title}),l.jsx("div",{className:"my-4 text-base",children:l.jsx("p",{children:d.description})}),l.jsx(cn,{className:"w-fit uppercase font-belfast !font-bold text-xs",size:Ce.S,icon:Ze,href:d.link||"#",children:"See Overview"})]}),o.map((j,E)=>{var D;return(D=j==null?void 0:j.subLinks)!=null&&D.length?l.jsx("div",{className:W("w-full 2xl:w-3/4 py-8 px-4 lg:px-12 xl:px-20 flex flex-wrap h-fit",u===-1&&E!==0&&"hidden",u>-1&&u!==E&&"hidden"),children:j.subLinks.map(L=>{var K,ie;return(ie=(K=L==null?void 0:L.links)==null?void 0:K[0])!=null&&ie.to?l.jsxs("div",{className:"h-36 xl:h-28 flex gap-4 w-1/2 pr-4 mb-4 lg:mb-8",children:[l.jsx(Q,{to:L.links[0].to,className:"w-1/3 xl:w-auto",children:R?l.jsx(Hs,{size:un.Medium,image:L.image,lazyLoad:!1,className:W("rounded-2xl h-full aspect-square w-full xl:w-auto transition duration-200 ease-in-out hover:scale-110")}):l.jsx("div",{className:"rounded-2xl h-full aspect-square w-full xl:w-auto bg-blue/5"})}),l.jsx("div",{className:"w-2/3 xl:flex-1 h-full",children:l.jsxs("div",{className:"flex-grow flex flex-col justify-between gap-4 h-full w-full aspect-[5/2] lg:w-auto lg:aspect-auto",children:[l.jsxs("div",{className:"space-y-0 text-sm font-bold",children:[l.jsx(Q,{to:L.links[0].to,className:"hover:underline",children:l.jsx("h4",{className:"text-sm uppercase",children:L.title})}),l.jsx(It,{className:"space-y-2",...L.text})]}),l.jsx("div",{className:W("flex flex-wrap gap-4 mt-auto"),children:L==null?void 0:L.links.map((X,Ne)=>(X==null?void 0:X.to)&&l.jsx(cn,{className:W("w-fit uppercase font-belfast !font-bold text-xs",Ne===1&&"border-none"),size:Ce.XS,icon:Ze,href:X.to,children:X.text},`${X.text}-${Ne}`))})]})})]},`${E}-${L.title}`):null})},`sub-${E}`):null})]})]}),l.jsxs("div",{className:"lg:hidden h-screen absolute inset-0 z-40",children:[l.jsxs("div",{className:"font-sans flex flex-col h-full p-4 max-h-[80vh] overflow-y-auto bg-white-pearl border-b border-blue",children:[l.jsx("div",{className:W("flex justify-between mb-2"),children:(F=s.mainLinks.structure)==null?void 0:F.map(j=>l.jsx(Q,{to:(j==null?void 0:j.to)||"#",className:"flex font-belfast text-xs items-center underline font-bold uppercase",children:j==null?void 0:j.text},j==null?void 0:j.to))}),l.jsx("div",{className:W("flex flex-col justify-around"),children:C==null?void 0:C.map(j=>{const E=i.filter(D=>{var L;return(L=D.parents)==null?void 0:L.some(K=>K.code===j.code)});return l.jsx(ln,{className:"border-none",title:j.name,openIcon:on,closeIcon:Tt,contentClassName:"mb-0",children:l.jsxs("div",{className:"pl-4",children:[l.jsxs(Q,{to:U.Category(j.slug),className:"block py-2 font-bold text-sm",children:["All ",j.name]}),E.map(D=>{const L=i.filter(K=>{var ie;return(ie=K.parents)==null?void 0:ie.some(X=>X.code===D.code)});return L.length?l.jsx(ln,{title:D.name,openIcon:on,closeIcon:Tt,className:"border-none text-sm",contentClassName:"mb-0",children:l.jsxs("div",{className:"pl-4",children:[l.jsxs(Q,{to:U.Category(D.slug),className:"block py-2 font-bold text-sm",children:["All ",D.name]}),L.map(K=>l.jsx(Q,{to:U.Category(K.slug),className:"block py-2 text-sm",children:K.name},K.slug))]})},D.slug):l.jsx(Q,{to:U.Category(D.slug),className:"block py-2 text-sm",children:D.name},D.slug)})]})},j.slug)})}),l.jsx("div",{className:"bg-white border border-blue rounded-3xl mt-4 flex flex-col mb-4 p-4",children:d?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"relative flex items-center justify-between",children:[l.jsxs("button",{onClick:()=>f(-1),className:"flex items-center gap-1",children:[l.jsx(Mi,{className:"w-3.5 h-3.5"}),l.jsx("p",{className:"text-xs underline",children:"Back"})]}),l.jsx("h2",{children:d!=null&&d.altTitle?d.altTitle:d==null?void 0:d.title}),l.jsx(vr,{className:"text-xs underline",size:Ce.XS,icon:Ze,to:(d==null?void 0:d.link)||"#",children:"Overview"})]}),l.jsxs("div",{className:"bg-white space-y-2 mt-4 pb-4",children:[l.jsx("div",{className:"mt-2 mb-4 text-sm border-b border-blue pb-2",children:l.jsx("p",{children:d==null?void 0:d.description})}),l.jsx("div",{className:"grid grid-cols-2 gap-2",children:(O=d==null?void 0:d.subLinks)==null?void 0:O.map((j,E)=>{var D,L;return(L=(D=j==null?void 0:j.links)==null?void 0:D[0])!=null&&L.to?l.jsxs(Q,{to:j.links[0].to,className:"flex flex-col items-center w-full",children:[l.jsx("div",{className:"rounded-xl overflow-hidden w-full aspect-square bg-blue/5",children:R&&l.jsx(Ts,{size:un.Small,promoImage:j.image,className:"w-full h-full"})}),l.jsx("h4",{className:"text-xs uppercase mt-2 text-center",children:j.title}),l.jsx(It,{className:"space-y-2 hidden lg:block",...j.text})]},`${E}-${j.title}`):null})})]})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex flex-col space-y-4",children:o.map((j,E)=>{const{link:D,title:L,subLinks:K}=j||{};
55return D?l.jsxs("button",{className:"flex items-center justify-between",onClick:()=>f(E),children:[l.jsx("p",{className:"text-lg font-display font-light",children:L}),l.jsx(Ns,{className:"w-4 h-4"})]},E):null})}),l.jsx("div",{className:"flex underline gap-x-6 gap-y-2 flex-wrap mt-4",children:(H=s.megaSmallLinks.structure)==null?void 0:H.map(j=>l.jsx(Kt,{to:(j==null?void 0:j.to)||"#",children:l.jsx("h4",{className:"text-sm font-light ",children:j==null?void 0:j.text})},j==null?void 0:j.text))})]})}),l.jsx("div",{className:"flex flex-col items-center mt-auto",children:l.jsx(kr,{data:e,colour:"blue",className:"space-x-8"})})]}),l.jsx("div",{ref:g,id:"panel-mega",role:"region","aria-label":"Mega menu","aria-hidden":!y,onClick:()=>v(!1),className:W("transition bg-black/20 h-full w-full",y?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none")})]})]})]})}function am({quote:e}){const{crewDomain:t}=hm();return e?l.jsx("div",{className:"relative bg-red text-white flex items-center h-8",children:l.jsxs(et,{className:"flex justify-between text-xs font-normal py-1 md:py-0",children:[l.jsxs(vr,{className:"text-white",to:sn(dn.Quotes.Landing,t),children:[l.jsx(Mi,{className:"h-4 w-4 mr-2"}),"Return to crew"]}),l.jsx("div",{className:"items-center py-1 space-x-5 hidden md:flex",children:l.jsxs("h6",{className:"text-xs",children:["Active Quote: #",e]})}),l.jsxs(vr,{to:sn(dn.Quotes.DeleteActiveQuote,t),className:"text-white",children:[l.jsx(Ls,{className:"h-4 w-4 mr-2"}),"Delete"]})]})}):null}let hr,sm=200;function om(e,t){hr&&clearTimeout(hr),hr=setTimeout(()=>t(e),sm)}const cm=({searchTerm:e,setSearchTerm:t,inMega:r=!1,inputRef:n})=>{const{refine:i}=kd({queryHook:om}),a=ge.useCallback(s=>{t(s.target.value),i(s.target.value)},[t]);return l.jsx("form",{action:U.Products(),className:"relative mt-2",children:l.jsxs("div",{className:"relative mb-4",children:[l.jsx("input",{name:ns.Search,type:"text",placeholder:"Search term...",value:e,className:W("lg:h-12 rounded-3xl border-blue px-3 my-1 lg:px-5 font-display font-light text-sm lg:text-xl placeholder:text-blue w-full bg-inherit",r?"h-10 font-sans font-normal":"h-8"),onChange:a,ref:n}),l.jsx("button",{type:"submit",className:"absolute inset-y-0 right-1 lg:right-2 px-1 flex items-center",children:l.jsx(rs,{className:"w-auto h-4 xl:w-auto xl:h-5 absolute storke-blue right-2 lg:right-4 top-1/2 -translate-y-1/2"})})]})})},um=({data:e,close:t,setSearchTerm:r})=>{var o;const{indexUiState:n,results:i}=Ga(),a=((o=i==null?void 0:i.hits)==null?void 0:o.filter(c=>c.brand).map(c=>c.brand))||[],s=Array.from(new Map(a.filter(c=>c==null?void 0:c.name).map(c=>[c==null?void 0:c.name,c])).values());return l.jsxs("div",{className:"h-full max-h-[75vh] lg:max-h-[60vh] flex flex-col lg:flex-row gap-4 divide-y lg:divide-y-0 lg:divide-x divide-blue",children:[l.jsxs("div",{className:"lg:space-y-4 grid grid-cols-2 lg:grid-cols-1 h-min pr-0 lg:pr-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-belfast text-xs uppercase font-bold mb-2",children:"Brands"}),l.jsxs(or,{indexName:e.algoliaIndexes.brands,children:[l.jsx(ar,{hitsPerPage:4}),l.jsx(mr,{fallback:l.jsx("div",{className:"space-y-2 flex flex-col",children:s==null?void 0:s.map(c=>l.jsx(Fe,{as:Q,className:"py-1 font-belfast text-xs lg:text-sm",to:`${U.Products()}?brand="${c==null?void 0:c.code}"`,children:c==null?void 0:c.name},c==null?void 0:c.id))}),children:l.jsx(fr,{hitComponent:({hit:c})=>c?l.jsx(Fe,{as:Q,className:"py-1 font-belfast text-xs lg:text-sm",to:`${U.Products()}?brand="${c.code}"`,children:c.name}):null,classNames:{list:"space-y-2"}})})]})]}),l.jsxs("div",{children:[l.jsx("p",{className:"font-belfast text-xs uppercase font-bold mb-2 whitespace-nowrap",children:"Categories"}),l.jsxs(or,{indexName:e.algoliaIndexes.categories,children:[l.jsx(ar,{hitsPerPage:4}),l.jsx(mr,{fallback:l.jsx(l.Fragment,{}),children:l.jsx(fr,{hitComponent:({hit:c})=>c?l.jsx(Fe,{as:Q,to:U.Category(c.slug),className:"py-1 font-belfast text-xs lg:text-sm",children:c.name}):null,classNames:{list:"space-y-2"}})})]})]})]}),l.jsx("div",{className:"w-full overflow-y-auto py-4 lg:px-4 lg:py-0",children:l.jsxs(or,{indexName:e.algoliaIndexes.products,children:[l.jsx(ar,{hitsPerPage:12}),l.jsxs(mr,{fallback:l.jsxs("div",{className:"",children:[l.jsx("h5",{className:"text-lg mb-2",children:"No Results Found"}),l.jsx("p",{children:"Please try a different search query"})]}),children:[l.jsx("div",{children:l.jsx("p",{className:"font-belfast text-xs uppercase font-bold mb-2 whitespace-nowrap",children:`${i==null?void 0:i.nbHits} Result${(i==null?void 0:i.nbHits)===1?"":"s"} Found`})}),l.jsx(fr,{classNames:{root:"",list:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:gr
55id-cols-6 3xl:grid-cols-8 gap-4 p-4"},hitComponent:({hit:c})=>c.status===Hi.Published?l.jsx(Qs,{reloadDocument:!0,onClick:t,productPath:U.Product(c.slug),product:c},c.id):null}),l.jsxs(Fe,{as:Bi,to:`${U.Products()}${n.query?`?search="${n.query}"`:""}`,icon:ks,size:Ce.L,className:"absolute bottom-8 left-1/2 -translate-x-1/2 px-4 py-2 uppercase font-belfast !font-bold text-xs",children:["View All ",i==null?void 0:i.nbHits," Products"]})]})]})})]})};function mr({children:e,fallback:t}){const{results:r}=Ga();return!r.__isArtificial&&r.nbHits===0?l.jsxs(l.Fragment,{children:[t,l.jsx("div",{hidden:!0,children:e})]}):e}function lm({data:e}){const{algoliaClient:t,algoliaSearchKey:r,algoliaIndexes:n}=e,i=Hh(t,r),[a,s]=x.useState(""),o=x.useRef(null);return l.jsx(Li,{className:"h-full flex items-center",children:({open:c,close:u})=>l.jsxs(l.Fragment,{children:[l.jsxs(Fe,{as:"button",className:W("flex transition-colors focus:outline-none items-center p-2 rounded-full border-transparent border lg:border-blue hover:border-blue hover:bg-blue hover:text-white",c&&"z-[9999] border-blue bg-blue text-white"),onClick:()=>{setTimeout(()=>{var f;(f=o.current)==null||f.focus()},0)},children:[l.jsxs("span",{className:"sr-only",children:[c?"Open":"Close"," Search"]}),c?l.jsx(mn,{className:"w-5"}):l.jsx(rs,{className:"w-5 h-5"})]}),l.jsxs(ki,{as:"div",show:c,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:[l.jsx(Ui,{onClick:u,static:!0,className:"fixed inset-0 h-dvh top-[3.5rem] lg:top-[6.5rem] bg-black opacity-30"}),l.jsx(Fd,{searchClient:i,indexName:n.products,children:l.jsxs(Wi,{static:!0,className:"fixed flex flex-col focus:outline-none inset-x-0 top-[3.5rem] lg:top-[6.5rem] border-y border-blue bg-white-pearl p-4 lg:p-8 lg:pb-0 w-full rounded-b-sm overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h4",{className:"lg:text-lg",children:"Product Search"}),l.jsx("button",{className:"cursor-pointer",onClick:()=>{u()},children:l.jsx(mn,{className:"w-5 h-5"})})]}),l.jsx(cm,{searchTerm:a,setSearchTerm:s,inputRef:o}),l.jsx(um,{close:u,data:e,setSearchTerm:s})]})})]})]})})}function fm({data:e}){var R,P,C,$,_,N,T,F;const{globalContent:t,adminDomain:r,crewDomain:n,categories:i}=e,[a,s]=x.useState(""),{pathname:o}=kt(),c=x.useRef(null),[u,f]=x.useState(void 0),h=os(),d=pr(),p=x.useCallback((O,H)=>{O===u&&!H?f(void 0):O!==u&&H&&f(O)},[u]);x.useEffect(()=>{d.load(U.API.auth.fetchSession)},[]),x.useEffect(()=>{h.state!=="idle"&&u&&f(void 0)},[h.state]);const{topBanner:g,topLink:m,mainLinks:v}=t,y=m?{href:m||void 0,target:"_blank"}:{},b=i==null?void 0:i.filter(O=>{var H;return!((H=O.parents)!=null&&H.length)}).sort((O,H)=>O.order-H.order);return[U.Checkout.Information,U.PaymentRequest.Base].find(O=>o.includes(O))?null:l.jsxs("header",{className:"bg-white-pearl sticky top-0 z-50",children:[l.jsx(am,{quote:a}),l.jsx("div",{className:"relative bg-white-mid hidden lg:flex items-center h-12",children:l.jsxs(et,{className:"flex justify-end text-xs font-normal py-4 md:py-0",children:[g&&x.createElement("a",{...y}),l.jsx("div",{className:"flex flex-1 items-center space-x-4 justify-center h-full absolute top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 ",children:(R=v.structure)==null?void 0:R.map(O=>l.jsx(Q,{to:(O==null?void 0:O.to)||"#",className:"px-2 h-full text-xs relative flex items-center justify-center after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-current after:scale-x-0 after:hover:scale-x-100 after:transition-transform after:duration-700 after:ease-in-out",children:l.jsx("span",{className:"relative",children:O==null?void 0:O.text})},`${O==null?void 0:O.to}-${O==null?void 0:O.text}`))}),l.jsx("div",{className:W("items-center py-1 space-x-5 flex transition-opacity duration-500 ease-in-out",(P=d.data)!=null&&P.success?"opacity-100":"opacity-0"),children:(C=d.data)!=null&&C.success?d.data.session?l.jsxs(l.Fragment,{children:[!!d.data.session.staffRole&&l.jsxs(l.Fragment,{children:[d.data.session.staffRole.role!==bs.Staff&&l.jsx("a",{target:"_blank",href:r,children:l.jsx("h6",{className:"text-xs",children:"Admin Portal"})}),l.jsx("a",{target:"_blank",href:n,children:l.jsx("h6",{className:"text-xs",children:"Crew Portal"})})]}),l.jsx(Q,{prefetch:"intent",to:U.Account.Landing,children:l.jsx("h6",{className:"text-xs",children:"My A
55ccount"})}),l.jsx("form",{method:"post",action:U.Logout,children:l.jsx(Is,{size:Ce.S,type:"submit",className:"px-0",children:l.jsx("h6",{className:"text-xs",children:"Logout"})})})]}):l.jsxs(l.Fragment,{children:[l.jsx(Q,{prefetch:"intent",to:`${U.Login}${o==="/"?"":`?returnTo=${o}`}`,children:l.jsx("h6",{className:"text-xs",children:"Sign In"})}),l.jsx(Q,{prefetch:"intent",to:U.CreateAccount.Landing,children:l.jsx("h6",{className:"text-xs",children:"Create an Account"})})]}):null})]})}),l.jsx("nav",{ref:c,className:W("flex lg:border-t border-blue",t.marqueeText&&!((_=($=d==null?void 0:d.data)==null?void 0:$.userPrefs)!=null&&_.hideBanner)?"":"border-b"),children:l.jsxs(et,{className:"relative flex items-center justify-between px-0",children:[l.jsx("div",{className:"hidden lg:flex flex-1",children:l.jsxs(Q,{to:U.Home,className:"flex items-center h-14",children:[l.jsx("span",{className:"sr-only",children:"The Print Bar Logo"}),l.jsx(yr,{className:"fill-blue hidden xs:block h-5 w-auto lg:h-6"}),l.jsx(Wr,{className:"fill-blue h-8 w-auto xs:hidden"})]})}),l.jsx(im,{className:"h-full",data:e,categories:i||[],navRef:c,active:u==="mega",setActive:O=>p("mega",O)}),l.jsx("div",{className:"flex lg:hidden flex-1",children:l.jsxs(Q,{to:U.Home,className:"flex items-center h-14",children:[l.jsx("span",{className:"sr-only",children:"The Print Bar Logo"}),l.jsx(yr,{className:"fill-blue hidden xs:block h-5 w-auto lg:h-6"}),l.jsx(Wr,{className:"fill-blue h-8 w-auto xs:hidden"})]})}),l.jsx("div",{className:"hidden lg:flex flex-shrink-0 items-center justify-center text-base font-normal h-full",children:b==null?void 0:b.map(O=>l.jsx(nm,{activeCategory:u,setActiveCategory:()=>p(O.code,!0),navRef:c,category:O,categories:(i==null?void 0:i.sort((H,j)=>H.order-j.order))||[]},O.slug))}),l.jsxs("div",{className:"flex flex-1 items-center justify-end lg:space-x-3 h-full",children:[l.jsx("div",{className:"h-full flex items-center",children:l.jsx(lm,{data:e})}),l.jsx("div",{className:"lg:hidden h-full",children:l.jsx(Q,{to:U.Account.Landing,className:"flex h-full px-4 items-center",children:l.jsx(kh,{className:"w-5 h-5"})})}),l.jsx("div",{className:"h-full flex items-center",children:l.jsx(rm,{setQuote:s,session:(N=d.data)==null?void 0:N.session})})]})]})}),!((F=(T=d==null?void 0:d.data)==null?void 0:T.userPrefs)!=null&&F.hideBanner)&&!!t.marqueeText&&l.jsxs("div",{className:"relative",children:[l.jsx(xs,{content:t}),l.jsx(cs,{method:"post",action:"",className:"absolute inset-y-0 right-2 flex items-center",children:l.jsx("button",{className:"p-1 rounded-full border border-blue bg-pink",type:"submit",name:"hideBanner",value:"true",children:l.jsx(Ye,{className:"w-5 h-5"})})})]})]})}const Ti="/assets/tailwind-ChmZcnHG.css";function dm(e){var t;return e?{"script:ld+json":{"@context":"https://schema.org","@type":"Organization","@id":e.webDomain+"/#organization",url:e.webDomain,logo:{"@type":"ImageObject","@id":e.webDomain+"/#logo",url:`${e.webDomain}/images/logo.png`},name:"The Print Bar",legalName:"The Printing Bar Pty Ltd",description:"Australian based wholehearted printing. Custom printed tees, totes, hoodies & more.",email:e.globalContent.mainEmail,telephone:e.globalContent.mainPhone,taxID:"25 638 038 525",iso6523Code:"0060:746906930",address:(t=e.warehouses)==null?void 0:t.map(r=>({"@type":"PostalAddress",streetAddress:r.streetAddress,addressLocality:r.city,addressCountry:"AU",addressRegion:r.state,postalCode:r.postCode})),contactPoint:{"@type":"ContactPoint",email:e.globalContent.mainEmail,telephone:e.globalContent.mainPhone,contactType:"customer service",areaServed:"AU",availableLanguage:"en"},numberOfEmployees:{"@type":"QuantitativeValue",minValue:30,maxValue:50},sameAs:["https://www.instagram.com/theprintbar","https://www.linkedin.com/company/the-print-bar/","https://www.facebook.com/PrintBar"]}}:{}}const rp=({data:e,location:t})=>[{title:"Print Bar | Say something on something"},{name:"og:url",content:t.pathname},dm(e),gs(e)],np=()=>[{rel:"icon",type:"image/gif",href:"/favicon.gif"},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"},{rel:"preload",as:"style",href:Ti},{rel:"stylesheet",href:Ti},...Js];function ip({children:e}){const t=Di();return l.jsxs("html",{lang:"en",children:[l.jsxs("head",{children:[t&&l.jsxs(l.Fragment,{children:[l.jsx(Lh,{gaTrackingId:t.GATrackingId}),l.jsx(Bh,{metaPixelId:t.metaPixelId}),l.jsx(qh,{GTMId:t.GTMId}),l.jsx(Vh,{universalAnalyticsId:t.universalAnalyticsId})]}),l.jsx("meta",{charSet:"utf-8"}),l.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),!(t!=null&&t.webDomain.includes("theprintbar.com"))&&l.jsx("meta",{name:"robots",content:"noindex, nofollow"}),(t==null?void 0:t.canonicalUrl)&&l.jsx("link",{rel:"canonical",href:t.canonicalUrl}),l.jsx(ls,{}),l.jsx(fs,{})]}),l.jsxs("body",{className:"relative h-full w-full bg-white-pearl text-blue antialiased",children:[l.jsx(Ds,{}),l.jsx(Ps,{webDomain:t.webDomain,children:e}),l.jsx(ds,{}),l.jsx(Gh,{}),l.jsx(hs,{})]})]})}function hm(){var r;return(r=Ii().find(n=>{var i;return!!((i=n.data)!=null&&i.globalContent)}))==null?void 0:r.data}const ap=()=>{const e=ms();return x.useEffect(()=>{Ai(()=>import("./index.client-B2WahaPH.js"),__vite__mapDeps([0,1,2])).then(t=>{t.captureRemixErrorBoundaryError(e)}).catch(()=>{})},[e]),l.jsxs(l.Fragment,{children:[l.jsx("header",{className:"bg-white-pearl sticky top-0 z-50",children:l.jsx("nav",{className:W("flex border-t border-blue"),children:l.jsx(et,{className:"relative flex items-center justify-between",children:l.jsx("div",{className:"flex flex-1",children:l.jsxs(Q,{to:U.Home,className:"flex items-center h-14 lg:h-16",children:[l.jsx("span",{className:"sr-only",children:"The Print Bar Logo"}),l.jsx(yr,{className:"fill-blue hidden xs:block h-5 w-auto lg:h-8"}),l.jsx(Wr,{className:"fill-blue h-8 w-auto xs:hidden"})]})})})})}),l.jsx("div",{className:"flex justify-center mt-8 mb-16",children:ps(e)?l.jsxs("div",{className:"flex justify-center flex-col items-center",children:[l.jsx("img",{src:e.status===404?"/images/waiting.gif":"/images/error.png",className:"w-72 h-72 md:w-96 md:h-96"}),l.jsx("h5",{className:"text-5xl md:text-7xl uppercase font-bold mt-4 md:mt-8",children:e.status}),l.jsx("p",{className:"text-lg md:text-2xl mb-4",children:e.status===404?"We couldn't find that page":e.data}),l.jsx(fn,{icon:gr,to:"/",children:"Return home"})]}):l.jsxs("div",{className:"flex justify-center flex-col items-center",children:[l.jsx("img",{src:"/images/error.png",className:"w-72 h-72 md:w-96 md:h-96"}),l.jsx("h5",{className:"text-2xl md:text-4xl uppercase font-bold mt-4 md:mt-8",children:"Something went wrong"}),l.jsx("p",{className:"text-lg mb-4",children:"Please reach out if this problem persists"}),l.jsx(fn,{icon:gr,to:"/",children:"Return home"})]})})]})};function sp(){const e=Di();return x.useEffect(()=>{if(!e.SENTRY_DSN){console.log("Sentry DSN not found, skipping init");return}Ai(()=>import("./index-BYMDmAht.js").then(t=>t.bw),__vite__mapDeps([1,2])).then(t=>{if(t.getCurrentScope().getClient()!==void 0){console.log("Sentry client already initialized, skipping init");return}t.init({dsn:e.SENTRY_DSN,profilesSampleRate:0,tracesSampleRate:0,replaysSessionSampleRate:0,replaysOnErrorSampleRate:0})}).catch(()=>{})},[]),l.jsxs(l.Fragment,{children:[l.jsx(Vs,{}),l.jsx(fm,{data:e}),l.jsx("main",{className:"relative flex flex-col w-full",children:l.jsx(us,{})}),l.jsx(tm,{data:e})]})}
55export{kh as A,Oi as B,ar as C,ap as E,Lh as G,fr as H,Fd as I,Wh as L,Bh as M,ns as P,rs as S,Vh as U,Zh as a,is as b,Ym as c,kd as d,Ga as e,or as f,tp as g,Uh as h,Qh as i,Mh as j,Wr as k,Hh as l,qh as m,Kh as n,ep as o,zh as p,rp as q,np as r,ip as s,sp as t,hm as u}; 56//# sourceMappingURL=root-B1Jv-XYQ.js.map
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.