(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55136],{17331:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,i,a,o,s,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var u=Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(void 0===(i=this._events[e]))return!1;if(r(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),i.apply(this,o)}else if(n(i))for(s=0,o=Array.prototype.slice.call(arguments,1),a=(c=i.slice()).length;s0&&this._events[e].length>a&&(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),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(s=o;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){a=s;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0==arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0==arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},58431:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(67294);function i(){return(i=Object.assign||function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,a);return(0,n.createElement)(void 0===r?"span":r,i({ref:t,style:i({border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},void 0===o?{}:o)},s))})},8131:(e,t,r)=>{"use strict";var n=r(49374),i=r(67450),a=r(43650),o=r(17775),s=r(23076);function c(e,t,r,i){return new n(e,t,r,i)}c.version=r(24336),c.AlgoliaSearchHelper=n,c.SearchParameters=o,c.RecommendParameters=i,c.SearchResults=s,c.RecommendResults=a,e.exports=c},68078:(e,t,r)=>{"use strict";var n=r(17331);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(14853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},67450:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({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(e){return void 0===t[e.$$id]}).map(function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r})}},e.exports=t},43650:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach(function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]})}t.prototype={constructor:t},e.exports=t},82437:(e,t,r)=>{"use strict";var n=r(52344),i=r(90116),a=r(49803),o={addRefinement:function(e,t,r){if(o.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],s={};return s[t]=a,n({},s,e)},removeRefinement:function(e,t,r){if(void 0===r)return o.clearRefinement(e,function(e,r){return t===r});var n=""+r;return o.clearRefinement(e,function(e,r){return t===r&&n===e})},toggleRefinement:function(e,t,r){if(void 0===r)throw Error("toggleRefinement should be used with a value");return o.isRefined(e,t,r)?o.removeRefinement(e,t,r):o.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,o=Object.keys(e).reduce(function(i,a){var o=e[a]||[],s=o.filter(function(e){return!t(e,a,r)});return s.length!==o.length&&(n=!0),i[a]=s,i},{});return n?o:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;return void 0!==r&&n?-1!==e[t].indexOf(""+r):n}};e.exports=o},17775:(e,t,r)=>{"use strict";var n=r(52344),i=r(7888),a=r(22686),o=r(60185),s=r(90116),c=r(49803),u=r(28023),l=r(46801),f=r(82437);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(e,r){return h(t[r],e)}):e===t}function d(e){var t=e?d._parseNumbers(e):{};void 0===t.userToken||l(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=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(e){var n=-1!==d.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])})}d.PARAMETERS=Object.keys(new d),d._parseNumbers=function(e){if(e instanceof d)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach(function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach(function(e){var i=n[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?parseFloat(e):e}):"string"==typeof e?parseFloat(e):e});r[t][e]=i})}),t.numericRefinements=r}return o(e,t)},d.make=function(e){var t=new d(e);return(e.hierarchicalFacets||[]).forEach(function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},d.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?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?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&&s(r.numericRefinements)?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."):s(e.numericRefinements)&&r.numericFilters?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},d.prototype={constructor:d,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=o({},this.numericRefinements);return i[e]=o({},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){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(n,i){return i===e&&n.op===t&&h(n.val,u(r))})}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,n){return n===e&&r.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,r){return r===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return s(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return c(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce(function(n,i){var a=r[i],o={};return Object.keys(a=a||{}).forEach(function(r){var n=a[r]||[],s=[];n.forEach(function(t){e({val:t,op:r},i,"numeric")||s.push(t)}),s.length!==n.length&&(t=!0),o[r]=s}),n[i]=o,n},{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter(function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter(function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var a=u(r),o=void 0!==i(this.numericRefinements[e][t],function(e){return h(e,a)});return n&&o},isTagRefined:function(e){return -1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter(function(t){return Object.keys(e.numericRefinements[t]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(t){return e.disjunctiveFacetsRefinements[t].length>0}).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(t){return e.hierarchicalFacetsRefinements[t].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return -1===e.indexOf(t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach(function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)}),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=d.validate(this,e);if(t)throw t;var r=this,n=d._parseNumbers(e),i=Object.keys(this).reduce(function(e,t){return e[t]=r[t],e},{}),a=Object.keys(n).reduce(function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?c(e,[t]):(i&&(e[t]=n[t]),e)},i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?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"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(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));return t.split(r).map(function(e){return e.trim()})},toString:function(){return JSON.stringify(this,null,2)}},e.exports=d},10210:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",l=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),h=e._getHierarchicalShowParentLevel(n),d=a(e._getHierarchicalFacetSortBy(n)),p=t.every(function(e){return e.exhaustive}),m=t;return f&&(m=t.slice(f.split(l).length)),m.reduce(function(e,t,r){var n=e;if(r>0){var a=0;for(n=e;a{"use strict";var n=r(74587),i=r(52344),a=r(94039),o=r(7888),s=r(69725),c=r(82293),u=r(60185),l=r(42148),f=a.escapeFacetValue,h=a.unescapeFacetValue,d=r(10210);function p(e){var t={};return e.forEach(function(e,r){t[e]=r}),t}function m(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var a=t[0]||{};this._rawResults=t;var c=this;Object.keys(a).forEach(function(e){c[e]=a[e]});var l=u({persistHierarchicalRootCount:!1},r);Object.keys(l).forEach(function(e){c[e]=l[e]}),this.processingTimeMS=t.reduce(function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map(function(){return[]}),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),g=p(e.facets),y=p(e.disjunctiveFacets),v=1,b=a.facets||{};Object.keys(b).forEach(function(t){var r=b[t],n=o(e.hierarchicalFacets,function(e){return(e.attributes||[]).indexOf(t)>-1});if(n){var i=n.attributes.indexOf(t),u=s(e.hierarchicalFacets,function(e){return e.name===n.name});c.hierarchicalFacets[u][i]={attribute:t,data:r,exhaustive:a.exhaustiveFacetsCount}}else{var l,f=-1!==e.disjunctiveFacets.indexOf(t),h=-1!==e.facets.indexOf(t);f&&(l=y[t],c.disjunctiveFacets[l]={name:t,data:r,exhaustive:a.exhaustiveFacetsCount},m(c.disjunctiveFacets[l],a.facets_stats,t)),h&&(l=g[t],c.facets[l]={name:t,data:r,exhaustive:a.exhaustiveFacetsCount},m(c.facets[l],a.facets_stats,t))}}),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach(function(r){var n=t[v],o=n&&n.facets?n.facets:{},l=e.getHierarchicalFacetByName(r);Object.keys(o).forEach(function(t){var r,f=o[t];if(l){r=s(e.hierarchicalFacets,function(e){return e.name===l.name});var d=s(c.hierarchicalFacets[r],function(e){return e.attribute===t});if(-1===d)return;c.hierarchicalFacets[r][d].data=u({},c.hierarchicalFacets[r][d].data,f)}else{r=y[t];var p=a.facets&&a.facets[t]||{};c.disjunctiveFacets[r]={name:t,data:i({},f,p),exhaustive:n.exhaustiveFacetsCount},m(c.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach(function(n){!c.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(c.disjunctiveFacets[r].data[n]=0)})}}),v++}),e.getRefinedHierarchicalFacets().forEach(function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),o=e.getHierarchicalRefinement(r);0===o.length||o[0].split(a).length<2||t.slice(v).forEach(function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach(function(t){var u=r[t],l=s(e.hierarchicalFacets,function(e){return e.name===n.name}),f=s(c.hierarchicalFacets[l],function(e){return e.attribute===t});if(-1!==f){var h={};if(o.length>0&&!c.persistHierarchicalRootCount){var d=o[0].split(a)[0];h[d]=c.hierarchicalFacets[l][f].data[d]}c.hierarchicalFacets[l][f].data=i(h,u,c.hierarchicalFacets[l][f].data)}}),v++})}),Object.keys(e.facetsExcludes).forEach(function(t){var r=e.facetsExcludes[t],n=g[t];c.facets[n]={name:t,data:b[t],exhaustive:a.exhaustiveFacetsCount},r.forEach(function(e){c.facets[n]=c.facets[n]||{name:t},c.facets[n].data=c.facets[n].data||{},c.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(d(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function y(e,t){var r=o(e,function(e){return e.name===t});return r&&r.stats}function v(e,t,r,n,i){var a=o(i,function(e){return e.name===r}),s=a&&a.data&&a.data[n]?a.data[n]:0;return{type:t,attributeName:r,name:n,count:s,exhaustive:a&&a.exhaustive||!1}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return o(this.facets,t)||o(this.disjunctiveFacets,t)||o(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r,n=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=o(e.facets,r);return n?Object.keys(n.data).map(function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=o(e.disjunctiveFacets,r);return i?Object.keys(i.data).map(function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}}):[]}if(e._state.isHierarchicalFacet(t)){var a=o(e.hierarchicalFacets,r);if(!a)return a;var s=e._state.getHierarchicalFacetByName(t),c=e._state._getHierarchicalFacetSeparator(s),u=h(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(s.rootPath)&&(u=u.replace(s.rootPath+c,""));var l=u.split(c);return l.unshift(t),function e(t,r,n){t.isRefined=t.name===(r[n]&&r[n].trim()),t.data&&t.data.forEach(function(t){e(t,r,n+1)})}(a,l,0),a}}(this,e);if(n){var a=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;return r=Array.isArray(n)?[e]:s._state.getHierarchicalFacetByName(n.name).attributes,function e(t,r,n,a){if(a=a||0,Array.isArray(r))return t(r,n[a]);if(!r.data||0===r.data.length)return r;var o=r.data.map(function(r){return e(t,r,n,a+1)});return i({data:t(o,n[a])},r)}(function(e,t){if(a.facetOrdering){var r,n,i,o,u,f,h,d=s.renderingContent&&s.renderingContent.facetOrdering&&s.renderingContent.facetOrdering.values&&s.renderingContent.facetOrdering.values[t];if(d)return i=[],o=[],u=d.hide||[],f=(d.order||[]).reduce(function(e,t,r){return e[t]=r,e},{}),e.forEach(function(e){var t=e.path||e.name,r=u.indexOf(t)>-1;r||void 0===f[t]?r||o.push(e):i[f[t]]=e}),i=i.filter(function(e){return e}),"hidden"===(h=d.sortRemainingBy)?i:(n="alpha"===h?[["path","name"],["asc","asc"]]:[["count"],["desc"]],i.concat(l(o,n[0],n[1])))}if(Array.isArray(a.sortBy)){var p=c(a.sortBy,g.DEFAULT_SORT);return l(e,p[0],p[1])}if("function"==typeof a.sortBy)return r=a.sortBy,e.sort(r);throw Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},n,r)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach(function(n){e.facetsRefinements[n].forEach(function(i){r.push(v(e,"facet",n,i,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(n){e.facetsExcludes[n].forEach(function(i){r.push(v(e,"exclude",n,i,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(n){e.disjunctiveFacetsRefinements[n].forEach(function(i){r.push(v(e,"disjunctive",n,i,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(n){e.hierarchicalFacetsRefinements[n].forEach(function(i){var a,s,c,u,l,f,h,d;r.push((a=t.hierarchicalFacets,s=e.getHierarchicalFacetByName(n),c=e._getHierarchicalFacetSeparator(s),u=i.split(c),l=o(a,function(e){return e.name===n}),h=(f=u.reduce(function(e,t){var r=e&&o(e.data,function(e){return e.name===t});return void 0!==r?r:e},l))&&f.count||0,d=f&&f.exhaustive||!1,{type:"hierarchical",attributeName:n,name:f&&f.path||"",count:h,exhaustive:d}))})}),Object.keys(e.numericRefinements).forEach(function(t){var n=e.numericRefinements[t];Object.keys(n).forEach(function(e){n[e].forEach(function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})})})}),e.tagRefinements.forEach(function(e){r.push({type:"tag",attributeName:"_tags",name:e})}),r},e.exports=g},49374:(e,t,r)=>{"use strict";var n=r(17331),i=r(68078),a=r(94039).escapeFacetValue,o=r(14853),s=r(60185),c=r(90116),u=r(49803),l=r(67450),f=r(43650),h=r(96394),d=r(17775),p=r(23076),m=r(97878),g=r(24336);function y(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=r||{};i.index=t,this.state=d.make(i),this.recommendState=new l({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={}}function v(e){if(e<0)throw Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function b(){return this.state.page}o(y,n),y.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},y.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},y.prototype.recommend=function(){return this._recommend(),this},y.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},y.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),t){this.client.search(n).then(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new p(r,e.results),r)}).catch(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)});return}return this.client.search(n).then(function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new p(r,e.results),state:r,_originalResponse:e}},function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e})},y.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=s({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(h._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("function"!=typeof this.client.initIndex)throw Error(a);var o=this.client.initIndex(n.index);if("function"!=typeof o.findAnswers)throw Error(a);return o.findAnswers(n.query,e.queryLanguages,i)},y.prototype.searchForFacetValues=function(e,t,r,n){var i,o="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,s="function"==typeof this.client.initIndex;if(!o&&!s&&"function"!=typeof this.client.search)throw Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),l=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var f=this;return o?i=this.client.searchForFacetValues([{indexName:c.index,params:l}]):s?i=this.client.initIndex(c.index).searchForFacetValues(l):(delete l.facetName,i=this.client.search([{type:"facet",facet:e,indexName:c.index,params:l}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),i.then(function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach(function(t){t.escapedValue=a(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)}),t},function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e})},y.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},y.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},y.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},y.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},y.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},y.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},y.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},y.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},y.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},y.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},y.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},y.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},y.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},y.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},y.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},y.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},y.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},y.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},y.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},y.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},y.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},y.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},y.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},y.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},y.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},y.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},y.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},y.prototype.setCurrentPage=v,y.prototype.setPage=v,y.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},y.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},y.prototype.setState=function(e){return this._change({state:d.make(e),isPageReset:!1}),this},y.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new d(e),this},y.prototype.hasRefinements=function(e){return!!c(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},y.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},y.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},y.prototype.hasTag=function(e){return this.state.isTagRefined(e)},y.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},y.prototype.getIndex=function(){return this.state.index},y.prototype.getCurrentPage=b,y.prototype.getPage=b,y.prototype.getTags=function(){return this.state.tagRefinements},y.prototype.getRefinements=function(e){var t=[];this.state.isConjunctiveFacet(e)?(this.state.getConjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){t.push({value:e,type:"exclude"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"disjunctive"})});var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach(function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})}),t},y.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},y.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},y.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=h._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(e){var n=e.getModifiedState(t),i=n.index?h._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i}),a=Array.prototype.concat.apply(n,i),o=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,o));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,o)).catch(this._dispatchAlgoliaError.bind(this,o))}catch(e){this.emit("error",{error:e})}},y.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(e){return e.$$id});this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var a=this._recommendCache,o=this.derivedHelpers.map(function(t){var r=t.getModifiedState(e).index;if(!r)return[];var o=t.getModifiedRecommendState(new l);return n.push({state:o,index:r,helper:t}),i=Array.prototype.concat.apply(i,o.params.map(function(e){return e.$$id})),t.emit("fetch",{recommend:{state:o,results:t.lastRecommendResults}}),o._buildQueries(r,a)}),s=Array.prototype.concat.apply(this.recommendState._buildQueries(r,a),o);if(0!==s.length){if(s.length>0&&void 0===this.client.getRecommendations){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(s).then(this._dispatchRecommendResponse.bind(this,c,n,i)).catch(this._dispatchRecommendError.bind(this,c))}catch(e){this.emit("error",{error:e})}}},y.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},y.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}))},y.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}}))},y.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},y.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},y.prototype.getClient=function(){return this.client},y.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},y.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},y.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=y},74587:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},52344:e=>{"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])}),e},{})}},94039:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},7888:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e)){for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return -1;for(var r=0;r{e.exports=function(e){return e.reduce(function(e,t){return e.concat(t)},[])}},82293:(e,t,r)=>{"use strict";var n=r(7888);e.exports=function(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var i=t.split(":"),a=n(r,function(e){return e[0]===i[0]});return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1])):(e[0].push(a[0]),e[1].push(a[1])),e},[[],[]])}},14853:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},22686:e=>{"use strict";e.exports=function(e,t){return e.filter(function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n})}},60185:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){t(e)||(e={});for(var r=1,n=arguments.length;r{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},49803:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},42148:e=>{"use strict";e.exports=function(e,t,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var n=e.map(function(e,r){return{criteria:t.map(function(t){return e[t]}),index:r,value:e}});return n.sort(function(e,t){for(var n=-1;++nt||n&&i||!r)return 1;if(!n&&e=r.length)return i;if("desc"===r[n])return-i;return i}}return e.index-t.index}),n.map(function(e){return e.value})}},28023:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw Error("The value should be a number, a parsable string or an array of those.")}},96394:(e,t,r)=>{"use strict";var n=r(60185);function i(e){return Object.keys(e).sort().reduce(function(t,r){return t[r]=e[r],t},{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach(function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})}),t.getRefinedHierarchicalFacets().forEach(function(n){var i=t.getHierarchicalFacetByName(n),o=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);if(o.length>0&&o[0].split(s).length>1){var c=o[0].split(s).slice(0,-1).reduce(function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(s)})},[]);c.forEach(function(n,o){var s=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===o);function u(e){return i.attributes.some(function(t){return t===e.split(":")[0]})}var l=(s.facetFilters||[]).reduce(function(e,t){if(Array.isArray(t)){var r=t.filter(function(e){return!u(e)});r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e},[]),f=c[o-1];o>0?s.facetFilters=l.concat(f.attribute+":"+f.value):l.length>0?s.facetFilters=l:delete s.facetFilters,r.push({indexName:e,params:s})})}}),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),o=a._getNumericFilters(e),s=a._getTagFilters(e),c={};return t.length>0&&(c.facets=t.indexOf("*")>-1?["*"]:t),s.length>0&&(c.tagFilters=s),r.length>0&&(c.facetFilters=r),o.length>0&&(c.numericFilters=o),i(n({},e.getQueryParams(),c))},_getDisjunctiveFacetSearchParams:function(e,t,r){var o=a._getFacetFilters(e,t,r),s=a._getNumericFilters(e,t),c=a._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(u.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return l?u.facets=a._getDisjunctiveHierarchicalFacetAttribute(e,l,r):u.facets=t,s.length>0&&(u.numericFilters=s),o.length>0&&(u.facetFilters=o),i(n({},e.getQueryParams(),u))},_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]||{};Object.keys(i).forEach(function(e){var a=i[e]||[];t!==n&&a.forEach(function(t){if(Array.isArray(t)){var i=t.map(function(t){return n+e+t});r.push(i)}else r.push(n+e+t)})})}),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(e){(i[e]||[]).slice().sort().forEach(function(t){n.push(e+":"+t)})});var a=e.facetsExcludes||{};Object.keys(a).sort().forEach(function(e){(a[e]||[]).sort().forEach(function(t){n.push(e+":-"+t)})});var o=e.disjunctiveFacetsRefinements||{};Object.keys(o).sort().forEach(function(e){var r=o[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach(function(t){i.push(e+":"+t)}),n.push(i)}});var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach(function(i){var a,o,c=(s[i]||[])[0];if(void 0!==c){var u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===c.indexOf(l)||!f&&!0===r||f&&f.split(l).length===c.split(l).length)return;f?(o=f.split(l).length-1,c=f):(o=c.split(l).length-2,c=c.slice(0,c.lastIndexOf(l))),a=u.attributes[o]}else o=c.split(l).length-1,a=u.attributes[o];a&&n.push([a+":"+c])}}),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce(function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,o=r.attributes.slice(0,a+1);return t.concat(o)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var o=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,o+1)},getSearchForFacetQuery:function(e,t,r,o){var s=o.isDisjunctiveFacet(e)?o.clearRefinements(e):o,c={facetQuery:t,facetName:e};return"number"==typeof r&&(c.maxFacetHits=r),i(n({},a._getHitsSearchParams(s),c))}};e.exports=a},46801:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},97878:(e,t,r)=>{"use strict";var n=r(7888),i=r(7948);e.exports=function(e){var t,r,a={};return e.forEach(function(e){e.forEach(function(e,t){a[e.objectID]?a[e.objectID]={indexSum:a[e.objectID].indexSum+t,count:a[e.objectID].count+1}:a[e.objectID]={indexSum:t,count:1}})}),(t=e.length,r=[],Object.keys(a).forEach(function(e){a[e].count<2&&(a[e].indexSum+=100),r.push({objectID:e,avgOfIndices:a[e].indexSum/t})}),r.sort(function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1})).reduce(function(t,r){var a=n(i(e),function(e){return e.objectID===r.objectID});return a?t.concat(a):t},[])}},24336:e=>{"use strict";e.exports="3.22.5"},70290:function(e){var t;t=function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t(t){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var o=n(),s=i&&i.miss||function(){return Promise.resolve()};return o.then(function(e){return s(e)}).then(function(){return o})},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function a(e,t){return t&&Object.keys(t).forEach(function(r){e[r]=t[r](e)}),e}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var u={Read:1,Write:2,Any:3};function l(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t(t({},e),{},{status:r,lastUpdate:Date.now()})}function f(e){return"string"==typeof e?{protocol:"https",url:e,accept:u.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||u.Any}}var h="POST";function d(e,r,i,a){var o,s,c,u=[],h=function(e,r){if("GET"!==e.method&&(void 0!==e.data||void 0!==r.data))return JSON.stringify(Array.isArray(e.data)?e.data:t(t({},e.data),r.data))}(i,a),d=(o=t(t({},e.headers),a.headers),s={},Object.keys(o).forEach(function(e){var t=o[e];s[e.toLowerCase()]=t}),s),y=i.method,v="GET"!==i.method?{}:t(t({},i.data),a.data),b=t(t(t({"x-algolia-agent":e.userAgent.value},e.queryParameters),v),a.queryParameters),S=0,O=function t(r,n){var o,s,c,f=r.pop();if(void 0===f)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:m(u)};var v={data:h,headers:d,method:y,url:(o=i.path,s=p(b),c="".concat(f.protocol,"://").concat(f.url,"/").concat("/"===o.charAt(0)?o.substr(1):o),s.length&&(c+="?".concat(s)),c),connectTimeout:n(S,e.timeouts.connect),responseTimeout:n(S,a.timeout)},O=function(e){var t={request:v,response:e,host:f,triesLeft:r.length};return u.push(t),t},j={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw{name:"DeserializationError",message:t.message,response:e}}}(e)},onRetry:function(i){var a=O(i);return i.isTimedOut&&S++,Promise.all([e.logger.info("Retryable failure",g(a)),e.hostsCache.set(f,l(f,i.isTimedOut?3:2))]).then(function(){return t(r,n)})},onFail:function(e){throw O(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return{name:"ApiError",message:i,status:n,transporterStackTrace:t}}(e,m(u))}};return e.requester.send(v).then(function(e){var t,r,n;return(t=e.status,e.isTimedOut||(r=e.isTimedOut,n=e.status,!r&&0==~~n)||2!=~~(t/100)&&4!=~~(t/100))?j.onRetry(e):2==~~(e.status/100)?j.onSuccess(e):j.onFail(e)})};return(c=e.hostsCache,Promise.all(r.map(function(e){return c.get(e,function(){return Promise.resolve(l(e))})})).then(function(e){var t=e.filter(function(e){return 1===e.status||Date.now()-e.lastUpdate>12e4}),i=e.filter(function(e){return 3===e.status&&Date.now()-e.lastUpdate<=12e4}),a=[].concat(n(t),n(i));return{getTimeout:function(e,t){return(0===i.length&&0===e?1:i.length+3+e)*t},statelessHosts:a.length>0?a.map(function(e){return f(e)}):r}})).then(function(e){return O(n(e.statelessHosts).reverse(),e.getTimeout)})}function p(e){return Object.keys(e).map(function(t){var r;return o("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]))}).join("&")}function m(e){return e.map(function(e){return g(e)})}function g(e){var r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return t(t({},e),{},{request:t(t({},e.request),{},{headers:t(t({},e.request.headers),r)})})}var y=function(e){var n,i,o,l,h,p,m,g,y,v,b,S,O,j=e.appId,R=(n=void 0!==e.authMode?e.authMode:s.WithinHeaders,i={"x-algolia-api-key":e.apiKey,"x-algolia-application-id":j},{headers:function(){return n===s.WithinHeaders?i:{}},queryParameters:function(){return n===s.WithinQueryParameters?i:{}}}),P=(l=(o=t(t({hosts:[{url:"".concat(j,"-dsn.algolia.net"),accept:u.Read},{url:"".concat(j,".algolia.net"),accept:u.Write}].concat(function(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}([{url:"".concat(j,"-1.algolianet.com")},{url:"".concat(j,"-2.algolianet.com")},{url:"".concat(j,"-3.algolianet.com")}]))},e),{},{headers:t(t(t({},R.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:t(t({},R.queryParameters()),e.queryParameters)})).hostsCache,h=o.logger,p=o.requester,m=o.requestsCache,g=o.responsesCache,y=o.timeouts,v=o.userAgent,b=o.hosts,S=o.queryParameters,O={hostsCache:l,logger:h,requester:p,requestsCache:m,responsesCache:g,timeouts:y,userAgent:v,headers:o.headers,queryParameters:S,hosts:b.map(function(e){return f(e)}),read:function(e,t){var n=c(t,O.timeouts.read),i=function(){return d(O,O.hosts.filter(function(e){return 0!=(e.accept&u.Read)}),e,n)};if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return i();var a={request:e,mappedRequestOptions:n,transporter:{queryParameters:O.queryParameters,headers:O.headers}};return O.responsesCache.get(a,function(){return O.requestsCache.get(a,function(){return O.requestsCache.set(a,i()).then(function(e){return Promise.all([O.requestsCache.delete(a),e])},function(e){return Promise.all([O.requestsCache.delete(a),Promise.reject(e)])}).then(function(e){var t=r(e,2);return t[0],t[1]})})},{miss:function(e){return O.responsesCache.set(a,e)}})},write:function(e,t){return d(O,O.hosts.filter(function(e){return 0!=(e.accept&u.Write)}),e,c(t,O.timeouts.write))}});return a({transporter:P,appId:j,addAlgoliaAgent:function(e,t){P.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([P.requestsCache.clear(),P.responsesCache.clear()]).then(function(){})}},e.methods)},v=function(e){return function(t,r){return"GET"===t.method?e.transporter.read(t,r):e.transporter.write(t,r)}},b=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(r,n){var i=r.map(function(e){return t(t({},e),{},{params:p(e.params||{})})});return e.transporter.read({method:h,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},O=function(e){return function(r,n){return Promise.all(r.map(function(r){var i=r.params,a=i.facetName,o=i.facetQuery,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,["facetName","facetQuery"]);return b(e)(r.indexName,{methods:{searchForFacetValues:P}}).searchForFacetValues(a,o,t(t({},n),s))}))}},j=function(e){return function(t,r,n){return e.transporter.read({method:h,path:o("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},R=function(e){return function(t,r){return e.transporter.read({method:h,path:o("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},P=function(e){return function(t,r,n){return e.transporter.read({method:h,path:o("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}};function w(e,a,o){var c,u,l,f,h,d,p,m;return y(t(t(t({},{appId:e,apiKey:a,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise(function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(function(t){return r.setRequestHeader(t,e.headers[t])});var n,i=function(e,n){return setTimeout(function(){r.abort(),t({status:0,content:n,isTimedOut:!0})},1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)})}},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}},responsesCache:i(),requestsCache:i({serializable:!1}),hostsCache:function e(t){var i=n(t.caches),a=i.shift();return void 0===a?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then(function(e){return Promise.all([e,n.miss(e)])}).then(function(e){return r(e,1)[0]})},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return a.get(t,r,n).catch(function(){return e({caches:i}).get(t,r,n)})},set:function(t,r){return a.set(t,r).catch(function(){return e({caches:i}).set(t,r)})},delete:function(t){return a.delete(t).catch(function(){return e({caches:i}).delete(t)})},clear:function(){return a.clear().catch(function(){return e({caches:i}).clear()})}}}({caches:[(c={key:"".concat("4.20.0","-").concat(e)},l="algoliasearch-client-js-".concat(c.key),f=function(){return void 0===u&&(u=c.localStorage||window.localStorage),u},h=function(){return JSON.parse(f().getItem(l)||"{}")},d=function(e){f().setItem(l,JSON.stringify(e))},p=function(){var e=c.timeToLive?1e3*c.timeToLive:null,t=Object.fromEntries(Object.entries(h()).filter(function(e){return void 0!==r(e,2)[1].timestamp}));d(t),e&&d(Object.fromEntries(Object.entries(t).filter(function(t){var n=r(t,2)[1],i=(new Date).getTime();return!(n.timestamp+e2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){p();var t=JSON.stringify(e);return h()[t]}).then(function(e){return Promise.all([e?e.value:t(),void 0!==e])}).then(function(e){var t=r(e,2),i=t[0];return Promise.all([i,t[1]||n.miss(i)])}).then(function(e){return r(e,1)[0]})},set:function(e,t){return Promise.resolve().then(function(){var r=h();return r[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},f().setItem(l,JSON.stringify(r)),t})},delete:function(e){return Promise.resolve().then(function(){var t=h();delete t[JSON.stringify(e)],f().setItem(l,JSON.stringify(t))})},clear:function(){return Promise.resolve().then(function(){f().removeItem(l)})}}),i()]}),userAgent:(m={value:"Algolia for JavaScript (".concat("4.20.0",")"),add:function(e){var t="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return -1===m.value.indexOf(t)&&(m.value="".concat(m.value).concat(t)),m}}).add({segment:"Browser",version:"lite"}),authMode:s.WithinQueryParameters}),o),{},{methods:{search:S,searchForFacetValues:O,multipleQueries:S,multipleSearchForFacetValues:O,customRequest:v,initIndex:function(e){return function(t){return b(e)(t,{methods:{search:R,searchForFacetValues:P,findAnswers:j}})}}}}))}return w.version="4.20.0",w},e.exports=t()},58783:(e,t,r)=>{"use strict";r.d(t,{L7:()=>$});var n=r(45697),i=r.n(n),a=r(67294);function o(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function s(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function c(e,t){if(e.clientHeightt||a>e&&o=t&&s>=r?a-e-n:o>t&&sr?o-t+i:0}r(21726);var l=function(e,t){var r=window,n=t.scrollMode,i=t.block,a=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,f="function"==typeof s?s:function(e){return e!==s};if(!o(e))throw TypeError("Invalid target");for(var h,d,p=document.scrollingElement||document.documentElement,m=[],g=e;o(g)&&f(g);){if((g=null==(d=(h=g).parentElement)?h.getRootNode().host||null:d)===p){m.push(g);break}null!=g&&g===document.body&&c(g)&&!c(document.documentElement)||null!=g&&c(g,l)&&m.push(g)}for(var y=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,S=window.scrollY||pageYOffset,O=e.getBoundingClientRect(),j=O.height,R=O.width,P=O.top,w=O.right,x=O.bottom,E=O.left,F="start"===i||"nearest"===i?P:"end"===i?x:P+j/2,_="center"===a?E+R/2:"end"===a?w:E,I=[],T=0;T=0&&E>=0&&x<=v&&w<=y&&P>=N&&x<=L&&E>=Q&&w<=H)break;var W=getComputedStyle(A),U=parseInt(W.borderLeftWidth,10),$=parseInt(W.borderTopWidth,10),M=parseInt(W.borderRightWidth,10),q=parseInt(W.borderBottomWidth,10),B=0,V=0,J="offsetWidth"in A?A.offsetWidth-A.clientWidth-U-M:0,K="offsetHeight"in A?A.offsetHeight-A.clientHeight-$-q:0,Z="offsetWidth"in A?0===A.offsetWidth?0:C/A.offsetWidth:0,z="offsetHeight"in A?0===A.offsetHeight?0:D/A.offsetHeight:0;if(p===A)B="start"===i?F:"end"===i?F-v:"nearest"===i?u(S,S+v,v,$,q,S+F,S+F+j,j):F-v/2,V="start"===a?_:"center"===a?_-y/2:"end"===a?_-y:u(b,b+y,y,U,M,b+_,b+_+R,R),B=Math.max(0,B+S),V=Math.max(0,V+b);else{B="start"===i?F-N-$:"end"===i?F-L+q+K:"nearest"===i?u(N,L,D,$,q+K,F,F+j,j):F-(N+D/2)+K/2,V="start"===a?_-Q-U:"center"===a?_-(Q+C/2)+J/2:"end"===a?_-H+M+J:u(Q,H,C,U,M+J,_,_+R,R);var Y=A.scrollLeft,X=A.scrollTop;F+=X-(B=Math.max(0,Math.min(X+B/z,A.scrollHeight-D/z+K))),_+=Y-(V=Math.max(0,Math.min(Y+V/Z,A.scrollWidth-C/Z+J)))}I.push({el:A,top:B,left:V})}return I},f=r(97582);let h=0;function d(){}function p(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function m(e,t){let r;function n(){r&&clearTimeout(r)}function i(){for(var i=arguments.length,a=Array(i),o=0;o{r=null,e(...a)},t)}return i.cancel=n,i}function g(){for(var e=arguments.length,t=Array(e),r=0;r1?r-1:0),i=1;i(t&&t(e,...n),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault))}}function y(){for(var e=arguments.length,t=Array(e),r=0;r{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})}}function v(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=void 0!==t[n]?t[n]:e[n],r),{})}function b(e){let{key:t,keyCode:r}=e;return r>=37&&r<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function S(e,t,r,n,i){if(void 0===i&&(i=!0),0===r)return -1;let a=r-1;("number"!=typeof t||t<0||t>=r)&&(t=e>0?-1:a+1);let o=t+e;o<0?o=i?a:0:o>a&&(o=i?0:a);let s=O(e,o,r,n,i);return -1===s?t>=r?-1:t:s}function O(e,t,r,n,i){let a=n(t);if(!a||!a.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e=0;e--)if(!n(e).hasAttribute("disabled"))return e;return i?e>0?O(1,0,r,n,!1):O(-1,r-1,r,n,!1):-1}function j(e,t,r,n){return void 0===n&&(n=!0),t.some(t=>t&&(p(t,e,r)||n&&p(t,r.document.activeElement,r)))}let R=m(e=>{P(e).textContent=""},500);function P(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t)),t}let w={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},x=m((e,t)=>{!function(e,t){let r=P(t);e&&(r.textContent=e,R(t))}(e(),t)},200),E="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?a.useLayoutEffect:a.useEffect;function F(e){return/^\S{1}$/.test(e)}function _(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function I(e){let t=(0,a.useRef)(e);return t.current=e,t}let T={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){let{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""},scrollIntoView:function(e,t){e&&l(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach(e=>{let{el:t,top:r,left:n}=e;t.scrollTop=r,t.scrollLeft=n})},circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function A(e,t,r){void 0===r&&(r=w);let n=e[`default${_(t)}`];return void 0!==n?n:r[t]}function k(e,t,r){void 0===r&&(r=w);let n=e[t];if(void 0!==n)return n;let i=e[`initial${_(t)}`];return void 0!==i?i:A(e,t,r)}function D(e,t,r,n){let{items:i,initialHighlightedIndex:a,defaultHighlightedIndex:o}=e,{selectedItem:s,highlightedIndex:c}=t;return 0===i.length?-1:void 0!==a&&c===a?a:void 0!==o?o:s?0===r?i.indexOf(s):S(r,i.indexOf(s),i.length,n,!1):0===r?-1:r<0?i.length-1:0}let C=()=>d;function N(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:s,...c}=r;(0,a.useEffect)(()=>{n||x(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...c}),s.document)},t)}function H(e,t,r){let n;let{type:i,props:a}=t;switch(i){case r.ItemMouseMove:n={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:n={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:D(a,e,0)};break;case r.FunctionOpenMenu:n={isOpen:!0,highlightedIndex:D(a,e,0)};break;case r.FunctionCloseMenu:n={isOpen:!1};break;case r.FunctionSetHighlightedIndex:n={highlightedIndex:t.highlightedIndex};break;case r.FunctionSetInputValue:n={inputValue:t.inputValue};break;case r.FunctionReset:n={highlightedIndex:A(a,"highlightedIndex"),isOpen:A(a,"isOpen"),selectedItem:A(a,"selectedItem"),inputValue:A(a,"inputValue")};break;default:throw Error("Reducer called without proper action type.")}return{...e,...n}}function L(e){for(var t=e.keysSoFar,r=e.highlightedIndex,n=e.items,i=e.itemToString,a=e.getItemNodeFromIndex,o=t.toLowerCase(),s=0;s=0&&{selectedItem:i.items[o]}}}break;case 13:r={highlightedIndex:D(i,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:r={highlightedIndex:D(i,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:r={isOpen:A(i,"isOpen"),highlightedIndex:A(i,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:i.items[e.highlightedIndex]}};break;case 3:r={highlightedIndex:O(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case 4:r={highlightedIndex:O(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:r={isOpen:!1,highlightedIndex:-1};break;case 7:{let n=t.key,a=`${e.inputValue}${n}`,o=L({keysSoFar:a,highlightedIndex:e.highlightedIndex,items:i.items,itemToString:i.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});r={inputValue:a,...o>=0&&{highlightedIndex:o}}}break;case 0:r={highlightedIndex:S(a?5:1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,i.circularNavigation)};break;case 1:r={highlightedIndex:S(a?-5:-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,i.circularNavigation)};break;case 20:r={selectedItem:t.selectedItem};break;default:return H(e,t,W)}return{...e,...r}}function $(e){void 0===e&&(e={});let t={...Q,...e},{items:r,scrollIntoView:n,environment:i,initialIsOpen:o,defaultIsOpen:s,itemToString:c,getA11ySelectionMessage:u,getA11yStatusMessage:l}=t,[f,d]=function(e,t,r){let[n,i]=function(e,t,r){let n=(0,a.useRef)(),i=(0,a.useRef)(),o=(0,a.useCallback)((t,r)=>{i.current=r;let n=e(t=v(t,r.props),r);return r.props.stateReducer(t,{...r,changes:n})},[e]),[s,c]=(0,a.useReducer)(o,t),u=I(r),l=(0,a.useCallback)(e=>c({props:u.current,...e}),[u]),f=i.current;return(0,a.useEffect)(()=>{f&&n.current&&n.current!==s&&function(e,t,r){let{props:n,type:i}=e,a={};Object.keys(t).forEach(n=>{(function(e,t,r,n){let{props:i,type:a}=t,o=`on${_(e)}Change`;i[o]&&void 0!==n[e]&&n[e]!==r[e]&&i[o]({type:a,...n})})(n,e,t,r),r[n]!==t[n]&&(a[n]=r[n])}),n.onStateChange&&Object.keys(a).length&&n.onStateChange({type:i,...a})}(f,v(n.current,f.props),s),n.current=s},[s,r,f]),[s,l]}(e,t,r);return[v(n,r),i]}(U,function(e){let t=k(e,"selectedItem"),r=k(e,"isOpen"),n=k(e,"highlightedIndex"),i=k(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}(t),t),{isOpen:p,highlightedIndex:S,selectedItem:O,inputValue:R}=f,P=(0,a.useRef)(null),w=(0,a.useRef)(null),x=(0,a.useRef)({}),T=(0,a.useRef)(!0),A=(0,a.useRef)(null),D=function(e){let{id:t=`downshift-${String(h++)}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:s}=e;return(0,a.useRef)({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:i||(e=>`${t}-item-${e}`),toggleButtonId:o||`${t}-toggle-button`,inputId:s||`${t}-input`}).current}(t),H=(0,a.useRef)(),L=(0,a.useRef)(!0),W=I({state:f,props:t}),$=(0,a.useCallback)(e=>x.current[D.getItemId(e)],[D]);N(l,[p,S,R,r],{isInitialMount:L.current,previousResultCount:H.current,items:r,environment:i,itemToString:c,...f}),N(u,[O],{isInitialMount:L.current,previousResultCount:H.current,items:r,environment:i,itemToString:c,...f});let M=function(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:s}=e,c=(0,a.useRef)(!0);return E(()=>{!(t<0)&&r&&Object.keys(n.current).length&&(!1===c.current?c.current=!0:s(i(t),o))},[t]),c}({menuElement:w.current,highlightedIndex:S,isOpen:p,itemRefs:x,scrollIntoView:n,getItemNodeFromIndex:$});(0,a.useEffect)(()=>(A.current=m(e=>{e({type:21,inputValue:""})},500),()=>{A.current.cancel()}),[]),(0,a.useEffect)(()=>{R&&A.current(d)},[d,R]),L.current,(0,a.useEffect)(()=>{if(L.current){(o||s||p)&&w.current&&w.current.focus();return}if(p){w.current&&w.current.focus();return}i.document.activeElement===w.current&&P.current&&(T.current=!1,P.current.focus())},[p]),(0,a.useEffect)(()=>{L.current||(H.current=r.length)});let q=function(e,t,r,n){let i=(0,a.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,a.useEffect)(()=>{let a=()=>{i.current.isMouseDown=!0},o=a=>{i.current.isMouseDown=!1,e&&!j(a.target,t.map(e=>e.current),r)&&n()},s=()=>{i.current.isTouchMove=!1},c=()=>{i.current.isTouchMove=!0},u=a=>{!e||i.current.isTouchMove||j(a.target,t.map(e=>e.current),r,!1)||n()};return r.addEventListener("mousedown",a),r.addEventListener("mouseup",o),r.addEventListener("touchstart",s),r.addEventListener("touchmove",c),r.addEventListener("touchend",u),function(){r.removeEventListener("mousedown",a),r.removeEventListener("mouseup",o),r.removeEventListener("touchstart",s),r.removeEventListener("touchmove",c),r.removeEventListener("touchend",u)}},[e,r]),i}(p,[w,P],i,()=>{d({type:8})}),B=C("getMenuProps","getToggleButtonProps");(0,a.useEffect)(()=>{L.current=!1},[]),(0,a.useEffect)(()=>{p||(x.current={})},[p]);let V=(0,a.useMemo)(()=>({ArrowDown(e){e.preventDefault(),d({type:13,getItemNodeFromIndex:$,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),d({type:14,getItemNodeFromIndex:$,shiftKey:e.shiftKey})}}),[d,$]),J=(0,a.useMemo)(()=>({ArrowDown(e){e.preventDefault(),d({type:0,getItemNodeFromIndex:$,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),d({type:1,getItemNodeFromIndex:$,shiftKey:e.shiftKey})},Home(e){e.preventDefault(),d({type:3,getItemNodeFromIndex:$})},End(e){e.preventDefault(),d({type:4,getItemNodeFromIndex:$})},Escape(){d({type:2})},Enter(e){e.preventDefault(),d({type:5})}," "(e){e.preventDefault(),d({type:6})}}),[d,$]),K=(0,a.useCallback)(()=>{d({type:16})},[d]),Z=(0,a.useCallback)(()=>{d({type:18})},[d]),z=(0,a.useCallback)(()=>{d({type:17})},[d]),Y=(0,a.useCallback)(e=>{d({type:19,highlightedIndex:e})},[d]),X=(0,a.useCallback)(e=>{d({type:20,selectedItem:e})},[d]),G=(0,a.useCallback)(()=>{d({type:22})},[d]),ee=(0,a.useCallback)(e=>{d({type:21,inputValue:e})},[d]),et=(0,a.useCallback)(e=>({id:D.labelId,htmlFor:D.toggleButtonId,...e}),[D]),er=(0,a.useCallback)(function(e,t){let{onMouseLeave:r,refKey:n="ref",onKeyDown:i,onBlur:a,ref:o,...s}=void 0===e?{}:e,{suppressRefError:c=!1}=void 0===t?{}:t,u=W.current.state;return B("getMenuProps",c,n,w),{[n]:y(o,e=>{w.current=e}),id:D.menuId,role:"listbox","aria-labelledby":D.labelId,tabIndex:-1,...u.isOpen&&u.highlightedIndex>-1&&{"aria-activedescendant":D.getItemId(u.highlightedIndex)},onMouseLeave:g(r,()=>{d({type:9})}),onKeyDown:g(i,e=>{let t=b(e);t&&J[t]?J[t](e):F(t)&&d({type:7,key:t,getItemNodeFromIndex:$})}),onBlur:g(a,()=>{if(!1===T.current){T.current=!0;return}q.current.isMouseDown||d({type:8})}),...s}},[d,W,J,q,B,D,$]);return{getToggleButtonProps:(0,a.useCallback)(function(e,t){let{onClick:r,onKeyDown:n,refKey:i="ref",ref:a,...o}=void 0===e?{}:e,{suppressRefError:s=!1}=void 0===t?{}:t,c={[i]:y(a,e=>{P.current=e}),id:D.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":W.current.state.isOpen,"aria-labelledby":`${D.labelId} ${D.toggleButtonId}`,...o};return o.disabled||(c.onClick=g(r,()=>{d({type:12})}),c.onKeyDown=g(n,e=>{let t=b(e);t&&V[t]?V[t](e):F(t)&&d({type:15,key:t,getItemNodeFromIndex:$})})),B("getToggleButtonProps",s,i,P),c},[d,W,V,B,D,$]),getLabelProps:et,getMenuProps:er,getItemProps:(0,a.useCallback)(function(e){var t,r,n;let{item:i,index:a,onMouseMove:o,onClick:s,refKey:c="ref",ref:u,disabled:l,...f}=void 0===e?{}:e,{state:h,props:p}=W.current,m=(t=a,r=i,n=p.items,void 0!==t?t:0===n.length?-1:n.indexOf(r));if(m<0)throw Error("Pass either item or item index in getItemProps!");let v={disabled:l,role:"option","aria-selected":`${m===h.highlightedIndex}`,id:D.getItemId(m),[c]:y(u,e=>{e&&(x.current[D.getItemId(m)]=e)}),...f};return l||(v.onClick=g(s,()=>{d({type:11,index:a})})),v.onMouseMove=g(o,()=>{a!==h.highlightedIndex&&(M.current=!1,d({type:10,index:a,disabled:l}))}),v},[d,W,M,D]),toggleMenu:K,openMenu:z,closeMenu:Z,setHighlightedIndex:Y,selectItem:X,reset:G,setInputValue:ee,highlightedIndex:S,isOpen:p,selectedItem:O,inputValue:R}}$.stateChangeTypes=W;var M=Object.freeze({__proto__:null,InputKeyDownArrowDown:0,InputKeyDownArrowUp:1,InputKeyDownEscape:2,InputKeyDownHome:3,InputKeyDownEnd:4,InputKeyDownEnter:5,InputChange:6,InputBlur:7,MenuMouseLeave:8,ItemMouseMove:9,ItemClick:10,ToggleButtonClick:11,FunctionToggleMenu:12,FunctionOpenMenu:13,FunctionCloseMenu:14,FunctionSetHighlightedIndex:15,FunctionSelectItem:16,FunctionSetInputValue:17,FunctionReset:18,ControlledPropUpdatedSelectedItem:19});i().array.isRequired,i().func,i().func,i().func,i().bool,i().number,i().number,i().number,i().bool,i().bool,i().bool,i().any,i().any,i().any,i().string,i().string,i().string,i().string,i().string,i().string,i().func,i().string,i().string,i().func,i().func,i().func,i().func,i().func,i().func,i().shape({addEventListener:i().func,removeEventListener:i().func,document:i().shape({getElementById:i().func,activeElement:i().any,body:i().any})});let q={activeIndex:-1,selectedItems:[]};i().array,i().array,i().array,i().func,i().func,i().func,i().number,i().number,i().number,i().func,i().func,i().string,i().string,i().shape({addEventListener:i().func,removeEventListener:i().func,document:i().shape({getElementById:i().func,activeElement:i().any,body:i().any})}),T.itemToString,T.stateReducer,T.environment},56781:(e,t)=>{"use strict";var r=60103,n=60106,i=60107,a=60108,o=60114,s=60109,c=60110,u=60112,l=60113,f=60120,h=60115,d=60116;if("function"==typeof Symbol&&Symbol.for){var p=Symbol.for;p("react.element"),p("react.portal"),p("react.fragment"),p("react.strict_mode"),p("react.profiler"),p("react.provider"),p("react.context"),p("react.forward_ref"),p("react.suspense"),p("react.suspense_list"),p("react.memo"),p("react.lazy"),p("react.block"),p("react.server.block"),p("react.fundamental"),p("react.debug_trace_mode"),p("react.legacy_hidden")}},21726:(e,t,r)=>{"use strict";r(56781)},55904:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:n.RFC3986,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986}},57368:(e,t,r)=>{"use strict";var n=r(83307),i=r(46316),a=r(55904);e.exports={formats:a,parse:i,stringify:n}},46316:(e,t,r)=>{"use strict";var n=r(59084),i=Object.prototype.hasOwnProperty,a=Array.isArray,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t){var r={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,l=c.split(t.delimiter,u),f=-1,h=t.charset;if(t.charsetSentinel)for(d=0;d=0&&r.parseArrays&&l<=r.arrayLimit?(o=[])[l]=i:"__proto__"!==u&&(o[u]=i):o={0:i}}i=o}return i},l=function(e,t,r,n){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(a),c=s?a.slice(0,s.index):a,l=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(s=o.exec(a))&&f{"use strict";var n=r(59084),i=r(55904),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=String.prototype.split,u=Array.prototype.push,l=function(e,t){u.apply(e,s(t)?t:[t])},f=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,i,a,o,u,f,h,p,m,g,y,v,b){var S,O,j=t;if("function"==typeof f?j=f(r,j):j instanceof Date?j=m(j):"comma"===i&&s(j)&&(j=n.maybeMap(j,function(e){return e instanceof Date?m(e):e})),null===j){if(a)return u&&!v?u(r,d.encoder,b,"key",g):r;j=""}if("string"==typeof(S=j)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||n.isBuffer(j)){if(u){var R=v?r:u(r,d.encoder,b,"key",g);if("comma"===i&&v){for(var P=c.call(String(j),","),w="",x=0;x0?j.join(",")||null:void 0}];else if(s(f))O=f;else{var F=Object.keys(j);O=h?F.sort(h):F}for(var _=0;_0?g+d:""}},59084:(e,t,r)=>{"use strict";var n=r(55904),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||a===n.RFC1738&&(40===l||41===l)){c+=s.charAt(u);continue}if(l<128){c+=o[l];continue}if(l<2048){c+=o[192|l>>6]+o[128|63&l];continue}if(l<55296||l>=57344){c+=o[224|l>>12]+o[128|l>>6&63]+o[128|63&l];continue}u+=1,c+=o[240|(l=65536+((1023&l)<<10|1023&s.charCodeAt(u)))>>18]+o[128|l>>12&63]+o[128|l>>6&63]+o[128|63&l]}return c},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n{"use strict";var n=r(50414);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r}},45697:(e,t,r)=>{e.exports=r(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},53250:(e,t,r)=>{"use strict";var n=r(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&l({inst:i})},[e,r,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},61688:(e,t,r)=>{"use strict";e.exports=r(53250)},28537:(e,t,r)=>{"use strict";function n(e,t){if(void 0===e||"function"!=typeof e)throw Error("The render function is not valid (received type ".concat(Object.prototype.toString.call(e).slice(8,-1),").\n\n").concat(t))}r.d(t,{_:()=>n})},87456:(e,t,r)=>{"use strict";function n(){for(var e=arguments.length,t=Array(e),r=0;rn})},90761:(e,t,r)=>{"use strict";r.d(t,{Rn:()=>f,dg:()=>l,mY:()=>d});var n=r(67237),i=r(7105);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t",highlightPostTag:""};function h(e){var t;return(0,i.P)(e)&&"string"!=typeof e.value?Object.keys(e).reduce(function(t,r){return c(c({},t),{},u({},r,h(e[r])))},{}):Array.isArray(e)?e.map(h):c(c({},e),{},{value:(t=e.value,(0,n.Y)(t).replace(RegExp(l.highlightPreTag,"g"),f.highlightPreTag).replace(RegExp(l.highlightPostTag,"g"),f.highlightPostTag))})}function d(e){return void 0===e.__escaped&&((e=e.map(function(e){var t=o({},(function(e){if(null==e)throw TypeError("Cannot destructure "+e)}(e),e));return t._highlightResult&&(t._highlightResult=h(t._highlightResult)),t._snippetResult&&(t._snippetResult=h(t._snippetResult)),t})).__escaped=!0),e}},67237:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,Y:()=>o});var n={"&":"&","<":"<",">":">",'"':""","'":"'"},i=/[&<>"']/g,a=RegExp(i.source);function o(e){return e&&a.test(e)?e.replace(i,function(e){return n[e]}):e}var s={"&":"&","<":"<",">":">",""":'"',"'":"'"},c=/&(amp|quot|lt|gt|#39);/g,u=RegExp(c.source);function l(e){return e&&u.test(e)?e.replace(c,function(e){return s[e]}):e}},79649:(e,t,r)=>{"use strict";function n(e){return"ais.index"===e.$$type}r.d(t,{J:()=>n})},7105:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){if(!("object"===n(e)&&null!==e)||"[object Object]"!==(null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}r.d(t,{P:()=>i})},82729:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{Z:()=>u});var i=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,i);return e.setQueryParameters(r)},c=function(e,t){var r=[].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean).filter(function(e,t,r){return r.indexOf(e)===t});return r.length>0?e.setQueryParameters({ruleContexts:r}):e},u=function(){for(var e=arguments.length,t=Array(e),r=0;r{"use strict";function n(){}r.d(t,{Z:()=>n})},5852:(e,t,r)=>{"use strict";function n(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:"stalled"===e.status},status:e.status,error:e.error}}function i(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:"stalled"===e.status},status:e.status,error:e.error}}r.d(t,{d:()=>i,q:()=>n})},34004:(e,t,r)=>{"use strict";function n(e){return btoa(encodeURIComponent(JSON.stringify(e)))}r.d(t,{a:()=>n})},51477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>R});var n=r(8131),i=r(87456),a=r(79649),o=r(5852),s=r(82729),c=0;function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=["initialSearchParameters"],f=["initialRecommendParameters"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var v=(0,i.K)({name:"index-widget"});function b(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 S(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,r){return!(0,a.J)(r)&&(r.getWidgetUiState||r.getWidgetState)?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e},r)}function O(e,t){var r=t.initialSearchParameters,n=y(t,l);return e.reduce(function(e,t){return!t.getWidgetSearchParameters||(0,a.J)(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):t.getWidgetSearchParameters(e,n)},r)}function j(e,t){var r=t.initialRecommendParameters,n=y(t,f);return e.reduce(function(e,t){return!(0,a.J)(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):e},r)}let R=function(e){if(void 0===e||void 0===e.indexName)throw Error(v("The `indexName` option is required."));var t=e.indexName,r=e.indexId,i=void 0===r?t:r,u=[],l={},f=null,h=null,g=null,y=null,R=null,w=!1,x=!1;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return t},getIndexId:function(){return i},getHelper:function(){return g},getResults:function(){var e;return null!==(e=y)&&void 0!==e&&e.lastResults?(y.lastResults._state=g.state,y.lastResults):null},getResultsForWidget:function(e){var t;return"recommend"!==e.dependsOn||(0,a.J)(e)||void 0===e.$$id?this.getResults():null!==(t=g)&&void 0!==t&&t.lastRecommendResults?g.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return R},getScopedResults:function(){var e=this.getParent();return function e(t){return t.filter(a.J).reduce(function(t,r){return t.concat.apply(t,[{indexId:r.getIndexId(),results:r.getResults(),helper:r.getHelper()}].concat(m(e(r.getWidgets()))))},[])}(e?e.getWidgets():0===t.length?this.getWidgets():[this])},getParent:function(){return h},createURL:function(e){return"function"==typeof e?f._createURL(p({},i,e(l))):f._createURL(p({},i,S(u,{searchParameters:e,helper:g})))},getWidgets:function(){return u},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw Error(v("The `addWidgets` method expects an array of widgets."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw Error(v("The widget definition expects a `render` and/or an `init` method."));return e.forEach(function(e){if(!(0,a.J)(e))f&&"recommend"===e.dependsOn?f._hasRecommendWidget=!0:f?f._hasSearchWidget=!0:"recommend"===e.dependsOn?w=!0:x=!0,"recommend"===e.dependsOn&&(e.$$id=c++)}),u=u.concat(e),f&&e.length&&(b(g,{state:O(u,{uiState:l,initialSearchParameters:g.state}),recommendState:j(u,{uiState:l,initialRecommendParameters:g.recommendState}),_uiState:l}),e.forEach(function(e){e.getRenderState&&P({renderState:e.getRenderState(f.renderState[t.getIndexId()]||{},(0,o.q)(f,t,f._initialUiState)),instantSearchInstance:f,parent:t})}),e.forEach(function(e){e.init&&e.init((0,o.q)(f,t,f._initialUiState))}),f.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw Error(v("The `removeWidgets` method expects an array of widgets."));if(e.some(function(e){return"function"!=typeof e.dispose}))throw Error(v("The widget definition expects a `dispose` method."));if((u=u.filter(function(t){return -1===e.indexOf(t)})).forEach(function(e){(0,a.J)(e)||(f&&"recommend"===e.dependsOn?f._hasRecommendWidget=!0:f?f._hasSearchWidget=!0:"recommend"===e.dependsOn?w=!0:x=!0)}),f&&e.length){var r=e.reduce(function(e,r){var i=r.dispose({helper:g,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:t});return i instanceof n.RecommendParameters?e.cleanedRecommendState=i:i&&(e.cleanedSearchState=i),e},{cleanedSearchState:g.state,cleanedRecommendState:g.recommendState}),i=r.cleanedSearchState,o=r.cleanedRecommendState,s=f.future.preserveSharedStateOnUnmount?O(u,{uiState:l,initialSearchParameters:new n.SearchParameters({index:this.getIndexName()})}):O(u,{uiState:S(u,{searchParameters:i,helper:g}),initialSearchParameters:i});l=S(u,{searchParameters:s,helper:g}),g.setState(s),g.recommendState=o,u.length&&f.scheduleSearch()}return this},init:function(e){var r,c=this,d=e.instantSearchInstance,p=e.parent,v=e.uiState;if(null===g){f=d,h=p,l=v[i]||{};var E=d.mainHelper,F=O(u,{uiState:l,initialSearchParameters:new n.SearchParameters({index:t})}),_=j(u,{uiState:l,initialRecommendParameters:new n.RecommendParameters});(g=n({},F.index,F)).recommendState=_,g.search=function(){return d.onStateChange?(d.onStateChange({uiState:d.mainIndex.getWidgetUiState({}),setUiState:function(e){return d.setUiState(e,!1)}}),E):E.search()},g.searchWithoutTriggeringOnStateChange=function(){return E.search()},g.searchForFacetValues=function(e,t,r,n){var i=g.state.setQueryParameters(n);return E.searchForFacetValues(e,t,r,i)},y=E.derive(function(){return s.Z.apply(void 0,[E.state].concat(m(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(c))))},function(){return c.getHelper().recommendState});var I=null===(r=d._initialResults)||void 0===r?void 0:r[this.getIndexId()];if(null!=I&&I.results){var T=new n.SearchResults(new n.SearchParameters(I.state),I.results);y.lastResults=T,g.lastResults=T}if(null!=I&&I.recommendResults){var A=new n.RecommendResults(new n.RecommendParameters({params:I.recommendResults.params}),I.recommendResults.results);y.lastRecommendResults=A,g.lastRecommendResults=A}g.on("change",function(e){e.isPageReset&&function e(t){var r=t.filter(a.J);0!==r.length&&r.forEach(function(t){var r=t.getHelper();b(r,{state:r.state.resetPage(),recommendState:r.recommendState,isPageReset:!0}),e(t.getWidgets())})}(u)}),y.on("search",function(){d.scheduleStalledRender()}),y.on("result",function(e){var t=e.results;d.scheduleRender(),g.lastResults=t,R=null==t?void 0:t._state}),y.on("recommend:result",function(e){var t=e.recommend;d.scheduleRender(),g.lastRecommendResults=t.results}),u.forEach(function(e){e.getRenderState&&P({renderState:e.getRenderState(d.renderState[c.getIndexId()]||{},(0,o.q)(d,c,v)),instantSearchInstance:d,parent:c})}),u.forEach(function(e){e.init&&e.init((0,o.q)(d,c,v))}),g.on("change",function(e){var t=e.state,r=e._uiState;l=S(u,{searchParameters:t,helper:g},r||{}),d.onStateChange||d.onInternalStateChange()}),I&&d.scheduleRender(),w&&(d._hasRecommendWidget=!0),x&&(d._hasSearchWidget=!0)}},render:function(e){var t,r=this,n=e.instantSearchInstance;"error"===n.status&&!n.mainHelper.hasPendingRequests()&&R&&g.setState(R);var i=this.getResults()||null!==(t=y)&&void 0!==t&&t.lastRecommendResults?u:u.filter(a.J);(i=i.filter(function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:n})})).forEach(function(e){e.getRenderState&&P({renderState:e.getRenderState(n.renderState[r.getIndexId()]||{},(0,o.d)(n,r,e)),instantSearchInstance:n,parent:r})}),i.forEach(function(e){e.render&&e.render((0,o.d)(n,r,e))})},dispose:function(){var e,t,r=this;u.forEach(function(e){e.dispose&&g&&e.dispose({helper:g,state:g.state,recommendState:g.recommendState,parent:r})}),f=null,h=null,null===(e=g)||void 0===e||e.removeAllListeners(),g=null,null===(t=y)||void 0===t||t.detach(),y=null},getWidgetUiState:function(e){return u.filter(a.J).reduce(function(e,t){return t.getWidgetUiState(e)},d(d({},e),{},p({},i,d(d({},e[i]),l))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return O(u,{uiState:r,initialSearchParameters:e})},refreshUiState:function(){l=S(u,{searchParameters:this.getHelper().state,helper:this.getHelper()},l)},setIndexUiState:function(e){var t="function"==typeof e?e(l):e;f.setUiState(function(e){return d(d({},e),{},p({},i,t))})}}};function P(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=d(d({},r.renderState),{},p({},i,d(d({},r.renderState[i]),t)))}},58685:(e,t,r)=>{"use strict";r.d(t,{T:()=>v});var n=r(8131),i=r(87456),a=r(11490),o=r(7105),s=r(82729);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:a.Z,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Z;return function(r){if(!r||!(0,o.P)(r.searchParameters))throw Error(h("The `searchParameters` option expects an object."));var i={};return{$$type:"ais.configure",init:function(t){var r=t.instantSearchInstance;e(l(l({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(l(l({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var n=e.state;return t(),d(n,r)},getRenderState:function(e,t){var r,i=this.getWidgetRenderState(t);return l(l({},e),{},{configure:l(l({},i),{},{widgetParams:l(l({},i.widgetParams),{},{searchParameters:(0,s.Z)(new n.SearchParameters(null===(r=e.configure)||void 0===r?void 0:r.widgetParams.searchParameters),new n.SearchParameters(i.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var t=e.helper;return i.refine||(i.refine=function(e){var i=d(t.state,r),a=(0,s.Z)(i,new n.SearchParameters(e));r.searchParameters=e,t.setState(a).search()}),{refine:i.refine,widgetParams:r}},getWidgetSearchParameters:function(e,t){var i=t.uiState;return(0,s.Z)(e,new n.SearchParameters(l(l({},i.configure),r.searchParameters)))},getWidgetUiState:function(e){return l(l({},e),{},{configure:l(l({},e.configure),r.searchParameters)})}}}};var m=r(53874);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){var t,r;return t=function(e){for(var t=1;t{"use strict";r.d(t,{g:()=>p});var n=r(67294),i=r(95930),a=r(51477),o=r(89309),s=r(97406),c=r(58336),u=r(37556),l=r(94397),f=r(3353),h=r(33903),d=["children"];function p(e){var t,r,p,m,g,y,v,b,S,O=e.children,j=(t=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,d),r=(0,c.a)(),m=null==(p=(0,u.s)())?void 0:p.initialResults,g=(0,s.a)(),y=(0,f.q)(t),b=(v=(0,n.useMemo)(function(){return(0,a.Z)(y)},[y])).getHelper(),S=(0,o.N)(),(0,l.L)(function(){S()},[b,S]),(0,h.F)({widget:v,parentIndex:g,props:y,shouldSsr:!!(r||m)}),v);return null===j.getHelper()?null:n.createElement(i.Z.Provider,{value:j},O)}},82987:(e,t,r)=>{"use strict";r.d(t,{p:()=>eZ});var n=r(67294),i=r(95930),a=r(23130),o=r(17331),s=r(8131);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}},r=t.fallback;return"undefined"==typeof window?r():e({window:window})}var l=r(11490);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,a=void 0!==i&&i,o=e.$$automatic,s=void 0!==o&&o,f=t;t||null===t||u(function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(f=t[r]),f||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=Array(e),i=0;i1&&void 0!==arguments[1]&&arguments[1],r=O(e);if(r){var n=i.state.userToken;t?a():setTimeout(a,0)}function a(){i.overrideStateWithoutTriggeringChangeEvent(d(d({},i.state),{},{userToken:r})),n&&n!==e&&o.scheduleSearch()}},r=function(e){if(("undefined"==typeof document?"undefined":c(document))==="object"&&"string"==typeof document.cookie)for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n=3||2===r&&n>=6||1===r&&n>=10}function O(e){if(e)return"number"==typeof e?e.toString():e}var j=r(5852),R=r(57368);function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t,r){return(t=x(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e){var t=function(e,t){if("object"!==P(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==P(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===P(t)?t:String(t)}var E=function(e){e&&(window.document.title=e)},F=function(){var e;function t(e){var r=this,n=e.windowTitle,i=e.writeDelay,a=e.createURL,o=e.parseURL,s=e.getLocation,c=e.start,l=e.dispose,f=e.push,h=e.cleanUrlOnDispose;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),w(this,"$$type","ais.browser"),w(this,"windowTitle",void 0),w(this,"writeDelay",void 0),w(this,"_createURL",void 0),w(this,"parseURL",void 0),w(this,"getLocation",void 0),w(this,"writeTimer",void 0),w(this,"_onPopState",void 0),w(this,"inPopState",!1),w(this,"isDisposed",!1),w(this,"latestAcknowledgedHistory",0),w(this,"_start",void 0),w(this,"_dispose",void 0),w(this,"_push",void 0),w(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=void 0===i?400:i,this._createURL=a,this.parseURL=o,this.getLocation=s,this._start=c,this._dispose=l,this._push=f,this._cleanUrlOnDispose=void 0===h||h,u(function(e){var t=e.window;E(r.windowTitle&&r.windowTitle(r.read())),r.latestAcknowledgedHistory=t.history.length})}return e=[{key:"read",value:function(){return this.parseURL({qsModule:R,location:this.getLocation()})}},{key:"write",value:function(e){var t=this;u(function(r){var n=r.window,i=t.createURL(e),a=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout(function(){E(a),t.shouldWrite(i)&&(t._push?t._push(i):n.history.pushState(e,a||"",i),t.latestAcknowledgedHistory=n.history.length),t.inPopState=!1,t.writeTimer=void 0},t.writeDelay)})}},{key:"onUpdate",value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&(clearTimeout(t.writeTimer),t.writeTimer=void 0),t.inPopState=!0,e(t.read())},u(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:R,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,u(function(t){var r=t.window;e._onPopState&&r.removeEventListener("popstate",e._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(e){var t=this;return u(function(r){var n=r.window;if(t.isDisposed&&!t._cleanUrlOnDispose)return!1;var i=!(t.isDisposed&&t.latestAcknowledgedHistory!==n.history.length);return!t.inPopState&&i&&e!==n.location.href})}}],function(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,I)}function C(e){return e!==Object(e)}function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function L(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,a=n.hostname,o=n.port,s=void 0===o?"":o,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(a).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(a).concat(f).concat(c).concat(u)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,a=e.writeDelay,o=e.windowTitle,s=e.getLocation;return new F({createURL:r,parseURL:i,writeDelay:void 0===a?400:a,windowTitle:o,getLocation:void 0===s?function(){return u(function(e){return e.window.location},{fallback:function(){throw Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:s,start:e.start,dispose:e.dispose,push:e.push,cleanUrlOnDispose:e.cleanUrlOnDispose})}():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce(function(t,r){return A(A({},t),{},k({},r,D(e[r])))},{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,r){return A(A({},t),{},k({},r,D(e[r])))},{})}}:n,a=e.$$internal,o=void 0!==a&&a;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),a=Object.keys(e).reduce(function(t,r){return L(L({},t),{},Q({},r,e[r]))},n),o=i.stateToRoute(a);return r.createURL(o)};var n=void 0,a=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:o,onStateChange:function(e){var t=e.uiState,a=i.stateToRoute(t);(void 0===n||!function e(t,r){if(t===r)return!0;if(C(t)||C(r)||"function"==typeof t||"function"==typeof r)return t===r;if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var n=0,i=Object.keys(t);n0&&t.setUiState(i.routeToState(e))})},started:function(){var e;null===(e=r.start)||void 0===e||e.call(r)},unsubscribe:function(){r.dispose()}}}},U=r(51477),$=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName;return"".concat("ais","-").concat(e).concat(r?"-".concat(r):"").concat(n?"--".concat(n):"")}};function M(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}var q=r(90761),B=$("Highlight");function V(e){var t=q.Rn.highlightPreTag,r=q.Rn.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+r:e.value}).join("")}var J=r(67237),K=new RegExp(/\w/i);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Y(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r1?t-1:0),n=1;n0)||void 0===arguments[0]||arguments[0];!(null!==(e=t.mainHelper)&&void 0!==e&&e.hasPendingRequests())&&(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:ex(t)}),t.emit("render")})),eF(ex(t),"onInternalStateChange",el(function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach(function(t){t.instance.onStateChange({uiState:e})})})),t.setMaxListeners(100);var t,r=e.indexName,a=void 0===r?"":r,o=e.numberLocale,s=e.initialUiState,c=e.routing,f=void 0===c?null:c,h=e.insights,d=void 0===h?void 0:h,p=e.searchFunction,m=e.stalledSearchDelay,g=e.searchClient,y=void 0===g?null:g,v=e.insightsClient,S=void 0===v?null:v,O=e.onStateChange,R=e.future,P=void 0===R?eP(eP({},eA),e.future||{}):R;if(null===y)throw Error(eI("The `searchClient` option is required."));if("function"!=typeof y.search)throw 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("function"==typeof y.addAlgoliaAgent&&y.addAlgoliaAgent("instantsearch.js (".concat("4.75.1",")")),S&&"function"!=typeof S)throw Error(eI("The `insightsClient` option should be a function."));if(t.client=y,t.future=P,t.insightsClient=S,t.indexName=a,t.helper=null,t.mainHelper=null,t.mainIndex=(0,U.Z)({indexName:a}),t.onStateChange=void 0===O?null:O,t.started=!1,t.templatesConfig={helpers:{formatNumber:function(e,t){return Number(t(e)).toLocaleString(o)},highlight:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=es(es({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(M(o._highlightResult,n)||{}).value,l=B({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),(void 0===u?"":u).replace(RegExp(q.Rn.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(q.Rn.highlightPostTag,"g"),""))))}catch(e){throw Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=es(es({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(M(o._highlightResult,n)||{}).value,l=ee({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),V(X(G(void 0===u?"":u))).replace(RegExp(q.Rn.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(q.Rn.highlightPostTag,"g"),""))))}catch(e){throw Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=es(es({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(M(o._snippetResult,n)||{}).value,l=et({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),(void 0===u?"":u).replace(RegExp(q.Rn.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(q.Rn.highlightPostTag,"g"),""))))}catch(e){throw Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=es(es({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(M(o._snippetResult,n)||{}).value,l=er({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),V(X(G(void 0===u?"":u))).replace(RegExp(q.Rn.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(q.Rn.highlightPostTag,"g"),""))))}catch(e){throw Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var r,n=JSON.parse(e),i=n.method,a=n.payload;return t((r=es({objectIDs:[this.objectID]},a),function(e){var t,r=e.method,n=e.payload;if("object"!==ei(n))throw Error("The insights helper expects the payload to be an object.");try{t=(0,en.a)(n)}catch(e){throw Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(r,'" data-insights-payload="').concat(t,'"')}({method:i,payload:r})))}catch(e){throw Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}},compileOptions:{}},t._stalledSearchDelay=void 0===m?200:m,t._searchStalledTimer=null,t._createURL=eT,t._initialUiState=void 0===s?{}:s,t._initialResults=null,t._insights=d,p&&(t._searchFunction=p),t.sendEventToInsights=l.Z,f){var w="boolean"==typeof f?{}:f;w.$$internal=!0,t.use(W(w))}if(d){var x="boolean"==typeof d?{}:d;x.$$internal=!0,t.use(b(x))}return u(function(e){var t,r;return(null===(t=e.window.navigator)||void 0===t?void 0:null===(r=t.userAgent)||void 0===r?void 0:r.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})&&t.use(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.$$internal,r=void 0!==t&&t;return function(e){var t=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),a=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){var e=t.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,function e(t,r,n){var i=(0,j.q)(r,r.mainIndex,r._initialUiState);t.forEach(function(t){var a={};if(t.getWidgetRenderState){var o=t.getWidgetRenderState(i);o&&o.widgetParams&&(a=o.widgetParams)}var s=Object.keys(a).filter(function(e){return void 0!==a[e]});n.widgets.push({type:t.$$type,widgetType:t.$$widgetType,params:s}),"ais.index"===t.$$type&&e(t.getWidgets(),r,n)})}(t.mainIndex.getWidgets(),t,n),t.middleware.forEach(function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})}),i.content=JSON.stringify(n),a.appendChild(i)},0)},started:function(){},unsubscribe:function(){i.remove()}}}}({$$internal:!0})),t}return r=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n1?r-1:0),a=1;a0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(e){e.instance.started()}),void 0===this._insights&&t.derivedHelpers[0].once("result",function(){e.mainIndex.getScopedResults().some(function(e){var t=e.results;return null==t?void 0:t._automaticInsights})&&e.use(b({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null===(e=this.mainHelper)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.instance.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){e.status="stalled",e.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!this.mainHelper)throw Error(eI("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){eO("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(eO(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw Error(eI("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw Error(eI("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],function(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,eK));return r.started?n.createElement(a.Z.Provider,{value:r},n.createElement(i.Z.Provider,{value:r.mainIndex},t)):null}},2684:(e,t,r)=>{"use strict";r.d(t,{O:()=>x});var n=r(87456),i=r(11490),a=r(28537),o=r(34004);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:i.Z;return(0,a._)(e,R()),function(r){var n,i,a=r||{},s=a.escapeHTML,c=void 0===s||s,u=a.transformItems,l=void 0===u?function(e){return e}:u;return{$$type:"ais.hits",init:function(t){e(O(O({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(O(O({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.items)},getRenderState:function(e,t){return O(O({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,a,s,u,d,p,g,y,b,S,O,j,R,P,w,x,E,F,_=e.results,I=e.helper,T=e.instantSearchInstance;if(n||(a=(t={instantSearchInstance:T,getIndex:function(){return I.getIndex()},widgetType:this.$$type}).instantSearchInstance,s=t.getIndex,u=t.widgetType,d={},p=void 0,n=function(){for(var e=arguments.length,t=Array(e),r=0;r0&&(_.hits=(0,h.mY)(_.hits));var A=l((O=_.hits,j=_.page,R=_.hitsPerPage,P=O.map(function(e,t){return m(m({},e),{},{__position:R*j+t+1})}),(w=_.queryID)?P.map(function(e){return v(v({},e),{},{__queryID:w})}):P),{results:_}),k=null===(x=_.renderingContent)||void 0===x?void 0:null===(E=x.widgets)||void 0===E?void 0:null===(F=E.banners)||void 0===F?void 0:F[0];return{hits:A,items:A,results:_,banner:k,sendEvent:n,bindEvent:i,widgetParams:r}},dispose:function(e){var r=e.state;return(t(),c)?r.setQueryParameters(Object.keys(h.dg).reduce(function(e,t){return O(O({},e),{},j({},t,void 0))},{})):r},getWidgetSearchParameters:function(e,t){return c?e.setQueryParameters(h.dg):e}}}};var w=r(53874);function x(e,t){return(0,w.B)(P,e,t)}},37386:(e,t,r)=>{"use strict";r.d(t,{l:()=>d});var n=r(87456),i=r(11490),a=r(28537);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:i.Z;return(0,a._)(e,u()),function(r){var n,i,a=(r||{}).queryHook,o=void 0===a?l:a;return{$$type:"ais.searchBox",init:function(t){var r=t.instantSearchInstance;e(c(c({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(c(c({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("query",void 0)},getRenderState:function(e,t){return c(c({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,a=e.instantSearchInstance,s=e.state;return n||(n=function(e){o(e,function(e){return t.setQuery(e).search()})},i=function(){t.setQuery("").search()}),{query:s.query||"",refine:n,clear:i,widgetParams:r,isSearchStalled:"stalled"===a.status}},getWidgetUiState:function(e,t){var r=t.searchParameters.query||"";return""===r||e&&e.query===r?e:c(c({},e),{},{query:r})},getWidgetSearchParameters:function(e,t){var r=t.uiState;return e.setQueryParameter("query",r.query||"")}}}};var h=r(53874);function d(e,t){return(0,h.B)(f,e,t)}},53874:(e,t,r)=>{"use strict";r.d(t,{B:()=>b});var n=r(67294),i=r(19160),a=r(87925),o=r(97406),s=r(80258),c=r(58336),u=r(37556),l=r(3353),f=r(33903);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var d=["instantSearchInstance","widgetParams"],p=["widgetParams"];function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function b(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=(0,c.a)(),b=(0,u.s)(),S=(0,s.z)(),O=(0,o.a)(),j=(0,l.q)(r),R=(0,l.q)(h),P=(0,n.useRef)(!0),w=(0,n.useRef)(null),x=(0,n.useRef)(S.status),E=(0,n.useMemo)(function(){return y(y({},e(function(e,t){if(t){P.current=!0;return}if(P.current){var r=e.instantSearchInstance,n=(e.widgetParams,v(e,d));(0,i.J)(n,w.current,function(e,t){return(null==e?void 0:e.constructor)===Function&&(null==t?void 0:t.constructor)===Function})&&r.status===x.current||(I(n),w.current=n,x.current=r.status)}},function(){P.current=!1})(j)),R)},[e,j,R]),F=function(e){if(Array.isArray(e))return e}(t=(0,n.useState)(function(){if(E.getWidgetRenderState){var e,t=O.getHelper(),r=O.getWidgetUiState({})[O.getIndexId()];t.state=(null===(e=E.getWidgetSearchParameters)||void 0===e?void 0:e.call(E,t.state,{uiState:r}))||t.state;var n=(0,a.E)(O),i=n.results,o=n.scopedResults,s=n.recommendResults,c=E.getWidgetRenderState({helper:t,parent:O,instantSearchInstance:S,results:"recommend"===E.dependsOn&&s&&b?s[b.recommendIdx.current++]:i,scopedResults:o,state:t.state,renderState:S.renderState,templatesConfig:S.templatesConfig,createURL:O.createURL,searchMetadata:{isSearchStalled:"stalled"===S.status},status:S.status,error:S.error});return c.widgetParams,v(c,p)}return{}}))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{for(a=(r=r.call(e)).next;!(c=(n=a.call(r)).done)&&(s.push(n.value),2!==s.length);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(t,2)||function(e,t){if(e){if("string"==typeof e)return m(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),_=F[0],I=F[1];return(0,f.F)({widget:E,parentIndex:O,props:j,shouldSsr:!!g}),_}},54942:(e,t,r)=>{"use strict";r.d(t,{b:()=>h});var n=r(67294),i=r(80258),a=r(94397),o=r(79649),s=r(87925),c=r(97406);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},F=E.catchError,_=(0,i.z)(),I=(e=(0,i.z)(),r=(t=(0,c.a)()).getIndexId(),h=(f=l((0,n.useState)(function(){return e.getUiState()}),2))[0],d=f[1],p=h[r],g=(m=l((0,n.useState)(function(){return e.renderState}),2))[0],y=m[1],v=g[r]||{},b=(0,n.useCallback)(function(t){e.setUiState(t)},[e]),S=(0,n.useCallback)(function(e){t.setIndexUiState(e)},[t]),(0,n.useEffect)(function(){function t(){d(e.getUiState()),y(e.renderState)}return e.addListener("render",t),function(){e.removeListener("render",t)}},[e]),{uiState:h,setUiState:b,indexUiState:p,setIndexUiState:S,renderState:g,indexRenderState:v}),T=I.uiState,A=I.setUiState,k=I.indexUiState,D=I.setIndexUiState,C=I.renderState,N=I.indexRenderState,H=(O=(0,i.z)(),j=(0,c.a)(),w=(P=function(e){if(Array.isArray(e))return e}(R=(0,n.useState)(function(){var e=(0,s.E)(j);return{results:e.results,scopedResults:e.scopedResults}}))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{for(a=(r=r.call(e)).next;!(c=(n=a.call(r)).done)&&(s.push(n.value),2!==s.length);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(R,2)||function(e,t){if(e){if("string"==typeof e)return u(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,2)}}(R,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],x=P[1],(0,n.useEffect)(function(){function e(){var e=j.getResults();if(null!==e)x({results:e,scopedResults:j.getScopedResults()});else if(0===O.mainIndex.getIndexName().length){var t=O.mainIndex.getWidgets().find(o.J);t&&x({results:(0,s.E)(j).results,scopedResults:t.getScopedResults()})}}return O.addListener("render",e),function(){O.removeListener("render",e)}},[O,j]),w),L=H.results,Q=H.scopedResults,W=(0,n.useCallback)(function(){for(var e=arguments.length,t=Array(e),r=0;r{"use strict";r.d(t,{Z:()=>n});var n=(0,r(67294).createContext)(null)},23130:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});var n=(0,r(67294).createContext)(null)},19160:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{J:()=>function e(t,r,a){var o,s;if(null!=a&&a(t,r)||t===r)return!0;if(t&&r&&(o=t.constructor)===r.constructor){if(o===Date)return t.getTime()===r.getTime();if(o===RegExp)return t.toString()===r.toString();if(o===Array){if((s=t.length)===r.length)for(;s--&&e(t[s],r[s],a););return -1===s}if(!o||"object"===n(t)){for(o in s=0,t)if(i.call(t,o)&&++s&&!i.call(r,o)||!(o in r)||!e(t[o],r[o],a))return!1;return Object.keys(r).length===s}}return t!=t&&r!=r}});var i=Object.prototype.hasOwnProperty},87925:(e,t,r)=>{"use strict";r.d(t,{E:()=>c});var n=r(8131);function i(e){var t,r,i;return new n.SearchResults(e,[{query:null!==(t=e.query)&&void 0!==t?t:"",page:null!==(r=e.page)&&void 0!==r?r:0,hitsPerPage:null!==(i=e.hitsPerPage)&&void 0!==i?i:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";function n(e,t){if(!e)throw Error("Invariant failed")}r.d(t,{k:()=>n})},89309:(e,t,r)=>{"use strict";r.d(t,{N:()=>a});var n=r(67294);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{"use strict";r.d(t,{a:()=>o});var n=r(67294),i=r(95930),a=r(91049);function o(){var e=(0,n.useContext)(i.Z);return(0,a.k)(null!==e,"The component must be used within ."),e}},80258:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});var n=r(67294),i=r(23130),a=r(91049);function o(){var e=(0,n.useContext)(i.Z);return(0,a.k)(null!==e,"Hooks must be used inside the component.\n\nThey are not compatible with the `react-instantsearch-core@6.x` and `react-instantsearch-dom` packages, so make sure to use the component from `react-instantsearch-core@7.x`."),e}},37556:(e,t,r)=>{"use strict";r.d(t,{s:()=>a});var n=r(67294),i=(0,n.createContext)(null);function a(){return(0,n.useContext)(i)}},58336:(e,t,r)=>{"use strict";r.d(t,{a:()=>a});var n=r(67294),i=(0,n.createContext)(null);function a(){return(0,n.useContext)(i)}},94397:(e,t,r)=>{"use strict";r.d(t,{L:()=>i});var n=r(67294),i="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},628:(e,t,r)=>{"use strict";r.d(t,{P:()=>a});var n=r(67294),i=(0,n.createContext)(null);function a(){return(0,n.useContext)(i)}},3353:(e,t,r)=>{"use strict";r.d(t,{q:()=>o});var n=r(67294),i=r(19160);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{"use strict";r.d(t,{F:()=>l});var n=r(67294),i=r.t(n,2),a=r(19160),o=i.use,s=r(80258),c=r(94397),u=r(628);function l(e){var t,r,i=e.widget,l=e.parentIndex,f=e.props,h=e.shouldSsr,d=(0,u.P)(),p=(0,n.useRef)(f);(0,n.useEffect)(function(){p.current=f},[f]);var m=(0,n.useRef)(i);(0,n.useEffect)(function(){m.current=i},[i]);var g=(0,n.useRef)(null),y=h&&!l.getWidgets().includes(i),v=(0,s.z)();(0,c.L)(function(){var e=m.current;return g.current?(clearTimeout(g.current),(0,a.J)(f,p.current)||(l.removeWidgets([e]),l.addWidgets([i]))):h||l.addWidgets([i]),function(){g.current=setTimeout(function(){v._schedule(function(){v._preventWidgetCleanup||l.removeWidgets([e])})})}},[l,i,h,v,f]),(y||(null==d?void 0:null===(t=d.current)||void 0===t?void 0:t.status)==="pending")&&l.addWidgets([i]),"undefined"==typeof window&&null!=d&&d.current&&"ais.index"!==i.$$type&&(o(d.current),"ais.dynamicWidgets"!==i.$$type&&null!==(r=v.helper)&&void 0!==r&&r.lastResults&&o(d.current))}},97582:(e,t,r)=>{"use strict";r.d(t,{_T:()=>i,ev:()=>a,pi:()=>n});var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i