LocalCDN-Firefox-Chrome-Brave/resources/instantsearch.js/4.13.2/instantsearch.production.mi...

4 lines
253 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! InstantSearch.js 4.13.2 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).instantsearch=t()}(this,function(){"use strict";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)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){M(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?H(e):t}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function P(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function s(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){if(e===t)return e;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n],i=e[n];void 0!==i&&void 0===r||(s(i)&&s(r)?e[n]=o(i,r):e[n]="object"==typeof(a=r)&&null!==a?o(Array.isArray(a)?[]:{},a):a)}var a;return e}function m(){return Array.prototype.slice.call(arguments).reduceRight(function(t,n){return Object.keys(Object(n)).forEach(function(e){void 0!==n[e]&&(void 0!==t[e]&&delete t[e],t[e]=n[e])}),t},{})}var p=function(e){s(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];s(r)&&o(e,r)}return e};var a=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})},g=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var c=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 new Error("The value should be a number, a parsable string or an array of those.")};var u=function(e,t){if(null===e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(i[n]=e[n]);return i};var l=function(e){return e&&0<Object.keys(e).length},t=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)},f={addRefinement:function(e,t,n){if(f.isRefined(e,t,n))return e;var r=""+n,i=e[t]?e[t].concat(r):[r],a={};return a[t]=i,m({},a,e)},removeRefinement:function(e,n,t){if(void 0===t)return f.clearRefinement(e,function(e,t){return n===t});var r=""+t;return f.clearRefinement(e,function(e,t){return n===t&&r===e})},toggleRefinement:function(e,t,n){if(void 0===n)throw new Error("toggleRefinement should be used with a value");return f.isRefined(e,t,n)?f.removeRefinement(e,t,n):f.addRefinement(e,t,n)},clearRefinement:function(i,a,s){if(void 0===a)return l(i)?{}:i;if("string"==typeof a)return u(i,[a]);if("function"==typeof a){var o=!1,e=Object.keys(i).reduce(function(e,t){var n=i[t]||[],r=n.filter(function(e){return!a(e,t,s)});return r.length!==n.length&&(o=!0),e[t]=r,e},{});return o?e:i}},isRefined:function(e,t,n){var r=!!e[t]&&0<e[t].length;if(void 0===n||!r)return r;var i=""+n;return-1!==e[t].indexOf(i)}},v=f;function y(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return y(n[t],e)}):e===n}function b(e){var r=e?b._parseNumbers(e):{};void 0===r.userToken||t(r.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=r.facets||[],this.disjunctiveFacets=r.disjunctiveFacets||[],this.hierarchicalFacets=r.hierarchicalFacets||[],this.facetsRefinements=r.facetsRefinements||{},this.facetsExcludes=r.facetsExcludes||{},this.disjunctiveFacetsRefinements=r.disjunctiveFacetsRefinements||{},this.numericRefinements=r.numericRefinements||{},this.tagRefinements=r.tagRefinements||[],this.hierarchicalFacetsRefinements=r.hierarchicalFacetsRefinements||{};var i=this;Object.keys(r).forEach(function(e){var t=-1!==b.PARAMETERS.indexOf(e),n=void 0!==r[e];!t&&n&&(i[e]=r[e])})}b.PARAMETERS=Object.keys(new b),b._parseNumbers=function(i){if(i instanceof b)return i;var r={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(e){var t=i[e];if("string"==typeof t){var n=parseFloat(t);r[e]=isNaN(n)?t:n}}),Array.isArray(i.insideBoundingBox)&&(r.insideBoundingBox=i.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),i.numericRefinements){var a={};Object.keys(i.numericRefinements).forEach(function(n){var r=i.numericRefinements[n]||{};a[n]={},Object.keys(r).forEach(function(e){var t=r[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});a[n][e]=t})}),r.numericRefinements=a}return p({},i,r)},b.make=function(e){var n=new b(e);return(e.hierarchicalFacets||[]).forEach(function(e){if(e.rootPath){var t=n.getHierarchicalRefinement(e.name);0<t.length&&0!==t[0].indexOf(e.rootPath)&&(n=n.clearRefinements(e.name)),0===(t=n.getHierarchicalRefinement(e.name)).length&&(n=n.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),n},b.validate=function(e,t){var n=t||{};return e.tagFilters&&n.tagRefinements&&0<n.tagRefinements.length?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):0<e.tagRefinements.length&&n.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&n.numericRefinements&&l(n.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):l(e.numericRefinements)&&n.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},b.prototype={constructor:b,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:v.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:v.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:v.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:v.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,n){var r=c(n);if(this.isNumericRefined(e,t,r))return this;var i=p({},this.numericRefinements);return i[e]=p({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(r)):i[e][t]=[r],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(n,r,i){return void 0!==i?this.isNumericRefined(n,r,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r&&y(e.val,c(i))})}):this:void 0!==r?this.isNumericRefined(n,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r})}):this:this.isNumericRefined(n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(s){if(void 0===s)return l(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof s)return u(this.numericRefinements,[s]);if("function"==typeof s){var o=!1,t=this.numericRefinements,e=Object.keys(t).reduce(function(e,r){var i=t[r],a={};return i=i||{},Object.keys(i).forEach(function(t){var e=i[t]||[],n=[];e.forEach(function(e){s({val:e,op:t},r,"numeric")||n.push(e)}),n.length!==e.length&&(o=!0),a[t]=n}),e[r]=a,e},{});return o?e: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 new 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 new Error(e+" is not defined in the facets attribute of the helper configuration");return v.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:v.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return v.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:v.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return v.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:v.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(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(e){return e!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(e){return e!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(e){return e.name!==t})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return v.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:v.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return v.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:v.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return v.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:v.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(t){if(!this.isTagRefined(t))return this;var e={tagRefinements:this.tagRefinements.filter(function(e){return e!==t})};return this.setQueryParameters(e)},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 new 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 new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:v.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:v.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:v.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={};return void 0!==this.hierarchicalFacetsRefinements[e]&&0<this.hierarchicalFacetsRefinements[e].length&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:m({},r,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var n={};return n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:m({},n,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:m({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return-1<this.disjunctiveFacets.indexOf(e)},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return-1<this.facets.indexOf(e)},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&v.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&v.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&v.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var n=this.getHierarchicalRefinement(e);return t?-1!==n.indexOf(t):0<n.length},isNumericRefined:function(e,t,n){if(void 0===n&&void 0===t)return!!this.numericRefinements[e];var r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===n||!r)return r;var i=c(n),a=void 0!==function(e,t){return g(e,function(e){return y(e,t)})}(this.numericRefinements[e][t],i);return r&&a},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=a(Object.keys(this.numericRefinements).filter(function(e){return 0<Object.keys(t.numericRefinements[e]).length}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(e){return 0<t.disjunctiveFacetsRefinements[e].length}).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var t=this;return a(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(e){return 0<t.hierarchicalFacetsRefinements[e].length}))},getUnrefinedDisjunctiveFacets:function(){var t=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return-1===t.indexOf(e)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var n=this.managedParameters,r={},i=this;return Object.keys(this).forEach(function(e){var t=i[e];-1===n.indexOf(e)&&void 0!==t&&(r[e]=t)}),r},setQueryParameter:function(e,t){if(this[e]===t)return this;var n={};return n[e]=t,this.setQueryParameters(n)},setQueryParameters:function(e){if(!e)return this;var t=b.validate(this,e);if(t)throw t;var n=this,i=b._parseNumbers(e),r=Object.keys(this).reduce(function(e,t){return e[t]=n[t],e},{}),a=Object.keys(i).reduce(function(e,t){var n=void 0!==e[t],r=void 0!==i[t];return n&&!r?u(e,[t]):(r&&(e[t]=i[t]),e)},r);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(t){return g(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(n).map(function(e){return e.trim()})},toString:function(){return JSON.stringify(this,null,2)}};var R=b;function S(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=void 0!==t,a=null===t;if(!a&&t<e||r&&i||!n)return 1;if(!r&&e<t||a&&n||!i)return-1}return 0}function w(e){return Array.isArray(e)?e.filter(Boolean):[]}function x(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function N(e,t){var i=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var n=t.split(":"),r=g(i,function(e){return e[0]===n[0]});return 1<n.length||!r?(e[0].push(n[0]),e[1].push(n[1])):(e[0].push(r[0]),e[1].push(r[1])),e},[[],[]])}var _=function(e,n,i){if(!Array.isArray(e))return[];Array.isArray(i)||(i=[]);var t=e.map(function(t,e){return{criteria:n.map(function(e){return t[e]}),index:e,value:t}});return t.sort(function(e,t){for(var n=-1;++n<e.criteria.length;){var r=S(e.criteria[n],t.criteria[n]);if(r)return n>=i.length?r:"desc"===i[n]?-r:r}return e.index-t.index}),t.map(function(e){return e.value})},I=function(h){return function(e,t){var n=h.hierarchicalFacets[t],r=h.hierarchicalFacetsRefinements[n.name]&&h.hierarchicalFacetsRefinements[n.name][0]||"",i=h._getHierarchicalFacetSeparator(n),a=h._getHierarchicalRootPath(n),s=h._getHierarchicalShowParentLevel(n),o=N(h._getHierarchicalFacetSortBy(n)),c=e.every(function(e){return e.exhaustive}),u=function(o,c,u,l,h){return function(e,n,t){var r=e;if(0<t){var i=0;for(r=e;i<t;){var a=r&&Array.isArray(r.data)?r.data:[];r=g(a,function(e){return e.isRefined}),i++}}if(r){var s=Object.keys(n.data).map(function(e){return[e,n.data[e]]}).filter(function(e){return function(e,t,n,r,i,a){return(!i||0===e.indexOf(i)&&i!==e)&&(!i&&-1===e.indexOf(r)||i&&e.split(r).length-i.split(r).length==1||-1===e.indexOf(r)&&-1===n.indexOf(r)||0===n.indexOf(e)||0===e.indexOf(t+r)&&(a||0===e.indexOf(n)))}(e[0],r.path||u,h,c,u,l)});r.data=_(s.map(function(e){var t=e[0];return function(e,t,n,r,i){var a=t.split(n);return{name:a[a.length-1].trim(),path:t,count:e,isRefined:r===t||0===r.indexOf(t+n),exhaustive:i,data:null}}(e[1],t,c,h,n.exhaustive)}),o[0],o[1])}return e}}(o,i,a,s,r),l=e;return a&&(l=e.slice(a.split(i).length)),l.reduce(u,{name:h.hierarchicalFacets[t].name,count:null,isRefined:!0,path:null,exhaustive:c,data:null})}};function F(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function C(e,t,n){t&&t[n]&&(e.stats=t[n])}function T(l,n){var c=n[0];this._rawResults=n;var h=this;Object.keys(c).forEach(function(e){h[e]=c[e]}),this.processingTimeMS=n.reduce(function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=l.hierarchicalFacets.map(function(){return[]}),this.facets=[];var e=l.getRefinedDisjunctiveFacets(),u=F(l.facets),d=F(l.disjunctiveFacets),r=1,f=c.facets||{};Object.keys(f).forEach(function(e){var t=f[e],n=function(e,t){return g(e,function(e){return-1<(e.attributes||[]).indexOf(t)})}(l.hierarchicalFacets,e);if(n){var r=n.attributes.indexOf(e),i=x(l.hierarchicalFacets,function(e){return e.name===n.name});h.hierarchicalFacets[i][r]={attribute:e,data:t,exhaustive:c.exhaustiveFacetsCount}}else{var a,s=-1!==l.disjunctiveFacets.indexOf(e),o=-1!==l.facets.indexOf(e);s&&(a=d[e],h.disjunctiveFacets[a]={name:e,data:t,exhaustive:c.exhaustiveFacetsCount},C(h.disjunctiveFacets[a],c.facets_stats,e)),o&&(a=u[e],h.facets[a]={name:e,data:t,exhaustive:c.exhaustiveFacetsCount},C(h.facets[a],c.facets_stats,e))}}),this.hierarchicalFacets=w(this.hierarchicalFacets),e.forEach(function(e){var a=n[r],s=a&&a.facets?a.facets:{},o=l.getHierarchicalFacetByName(e);Object.keys(s).forEach(function(t){var n,e=s[t];if(o){n=x(l.hierarchicalFacets,function(e){return e.name===o.name});var r=x(h.hierarchicalFacets[n],function(e){return e.attribute===t});if(-1===r)return;h.hierarchicalFacets[n][r].data=p({},h.hierarchicalFacets[n][r].data,e)}else{n=d[t];var i=c.facets&&c.facets[t]||{};h.disjunctiveFacets[n]={name:t,data:m({},e,i),exhaustive:a.exhaustiveFacetsCount},C(h.disjunctiveFacets[n],a.facets_stats,t),l.disjunctiveFacetsRefinements[t]&&l.disjunctiveFacetsRefinements[t].forEach(function(e){!h.disjunctiveFacets[n].data[e]&&-1<l.disjunctiveFacetsRefinements[t].indexOf(e)&&(h.disjunctiveFacets[n].data[e]=0)})}}),r++}),l.getRefinedHierarchicalFacets().forEach(function(e){var s=l.getHierarchicalFacetByName(e),o=l._getHierarchicalFacetSeparator(s),c=l.getHierarchicalRefinement(e);if(!(0===c.length||c[0].split(o).length<2)){var t=n[r],u=t&&t.facets?t.facets:{};Object.keys(u).forEach(function(t){var e=u[t],n=x(l.hierarchicalFacets,function(e){return e.name===s.name}),r=x(h.hierarchicalFacets[n],function(e){return e.attribute===t});if(-1!==r){var i={};if(0<c.length){var a=c[0].split(o)[0];i[a]=h.hierarchicalFacets[n][r].data[a]}h.hierarchicalFacets[n][r].data=m(i,e,h.hierarchicalFacets[n][r].data)}}),r++}}),Object.keys(l.facetsExcludes).forEach(function(t){var e=l.facetsExcludes[t],n=u[t];h.facets[n]={name:t,data:c.facets[t],exhaustive:c.exhaustiveFacetsCount},e.forEach(function(e){h.facets[n]=h.facets[n]||{name:t},h.facets[n].data=h.facets[n].data||{},h.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(I(l)),this.facets=w(this.facets),this.disjunctiveFacets=w(this.disjunctiveFacets),this._state=l}function E(t,e){if(!e.data||0===e.data.length)return e;var n=e.data.map(function(e){return E(t,e)}),r=t(n);return p({},e,{data:r})}function U(e,t){var n=g(e,function(e){return e.name===t});return n&&n.stats}function Q(e,t,n,r,i){var a=g(i,function(e){return e.name===n}),s=a&&a.data&&a.data[r]?a.data[r]:0,o=a&&a.exhaustive||!1;return{type:t,attributeName:n,name:r,count:s,exhaustive:o}}T.prototype.getFacetByName=function(t){function e(e){return e.name===t}return g(this.facets,e)||g(this.disjunctiveFacets,e)||g(this.hierarchicalFacets,e)},T.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],T.prototype.getFacetValues=function(e,t){var n=function(t,n){function e(e){return e.name===n}if(t._state.isConjunctiveFacet(n)){var r=g(t.facets,e);return r?Object.keys(r.data).map(function(e){return{name:e,count:r.data[e],isRefined:t._state.isFacetRefined(n,e),isExcluded:t._state.isExcludeRefined(n,e)}}):[]}if(t._state.isDisjunctiveFacet(n)){var i=g(t.disjunctiveFacets,e);return i?Object.keys(i.data).map(function(e){return{name:e,count:i.data[e],isRefined:t._state.isDisjunctiveFacetRefined(n,e)}}):[]}if(t._state.isHierarchicalFacet(n))return g(t.hierarchicalFacets,e)}(this,e);if(n){var r=m({},t,{sortBy:T.DEFAULT_SORT});if(Array.isArray(r.sortBy)){var i=N(r.sortBy,T.DEFAULT_SORT);return Array.isArray(n)?_(n,i[0],i[1]):E(function(e){return _(e,i[0],i[1])},n)}if("function"==typeof r.sortBy)return Array.isArray(n)?n.sort(r.sortBy):E(function(e){return function(e,t){return t.sort(e)}(r.sortBy,e)},n);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}},T.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?U(this.facets,e):this._state.isDisjunctiveFacet(e)?U(this.disjunctiveFacets,e):void 0},T.prototype.getRefinements=function(){var r=this._state,n=this,i=[];return Object.keys(r.facetsRefinements).forEach(function(t){r.facetsRefinements[t].forEach(function(e){i.push(Q(r,"facet",t,e,n.facets))})}),Object.keys(r.facetsExcludes).forEach(function(t){r.facetsExcludes[t].forEach(function(e){i.push(Q(r,"exclude",t,e,n.facets))})}),Object.keys(r.disjunctiveFacetsRefinements).forEach(function(t){r.disjunctiveFacetsRefinements[t].forEach(function(e){i.push(Q(r,"disjunctive",t,e,n.disjunctiveFacets))})}),Object.keys(r.hierarchicalFacetsRefinements).forEach(function(t){r.hierarchicalFacetsRefinements[t].forEach(function(e){i.push(function(e,t,n,r){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=n.split(a),o=g(r,function(e){return e.name===t}),c=s.reduce(function(e,t){var n=e&&g(e.data,function(e){return e.name===t});return void 0!==n?n:e},o),u=c&&c.count||0,l=c&&c.exhaustive||!1,h=c&&c.path||"";return{type:"hierarchical",attributeName:t,name:h,count:u,exhaustive:l}}(r,t,e,n.hierarchicalFacets))})}),Object.keys(r.numericRefinements).forEach(function(n){var e=r.numericRefinements[n];Object.keys(e).forEach(function(t){e[t].forEach(function(e){i.push({type:"numeric",attributeName:n,name:e,numericValue:e,operator:t})})})}),r.tagRefinements.forEach(function(e){i.push({type:"tag",attributeName:"_tags",name:e})}),i};var q=T;function $(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var e=$;function V(e){return"function"==typeof e}function K(e){return"object"==typeof e&&null!==e}function z(e){return void 0===e}($.EventEmitter=$).prototype._events=void 0,$.prototype._maxListeners=void 0,$.defaultMaxListeners=10,$.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},$.prototype.emit=function(e){var t,n,r,i,a,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||K(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var o=new Error('Uncaught, unspecified "error" event. ('+t+")");throw o.context=t,o}if(z(n=this._events[e]))return!1;if(V(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),n.apply(this,i)}else if(K(n))for(i=Array.prototype.slice.call(arguments,1),r=(s=n.slice()).length,a=0;a<r;a++)s[a].apply(this,i);return!0},$.prototype.on=$.prototype.addListener=function(e,t){var n;if(!V(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,V(t.listener)?t.listener:t),this._events[e]?K(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,K(this._events[e])&&!this._events[e].warned&&(n=z(this._maxListeners)?$.defaultMaxListeners:this._maxListeners)&&0<n&&this._events[e].length>n&&(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},$.prototype.once=function(e,t){if(!V(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},$.prototype.removeListener=function(e,t){var n,r,i,a;if(!V(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||V(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(K(n)){for(a=i;0<a--;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},$.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(V(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},$.prototype.listeners=function(e){return this._events&&this._events[e]?V(this._events[e])?[this._events[e]]:this._events[e].slice():[]},$.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(V(t))return 1;if(t)return t.length}return 0},$.listenerCount=function(e,t){return e.listenerCount(t)};var J=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Y(e,t){this.main=e,this.fn=t,this.lastResults=null}J(Y,e.EventEmitter),Y.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Y.prototype.getModifiedState=function(e){return this.fn(e)};var G=Y,Z={_getQueries:function(i,a){var s=[];return s.push({indexName:i,params:Z._getHitsSearchParams(a)}),a.getRefinedDisjunctiveFacets().forEach(function(e){s.push({indexName:i,params:Z._getDisjunctiveFacetSearchParams(a,e)})}),a.getRefinedHierarchicalFacets().forEach(function(e){var t=a.getHierarchicalFacetByName(e),n=a.getHierarchicalRefinement(e),r=a._getHierarchicalFacetSeparator(t);0<n.length&&1<n[0].split(r).length&&s.push({indexName:i,params:Z._getDisjunctiveFacetSearchParams(a,e,!0)})}),s},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(Z._getHitsHierarchicalFacetsAttributes(e)),n=Z._getFacetFilters(e),r=Z._getNumericFilters(e),i={facets:t,tagFilters:Z._getTagFilters(e)};return 0<n.length&&(i.facetFilters=n),0<r.length&&(i.numericFilters=r),p({},e.getQueryParams(),i)},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=Z._getFacetFilters(e,t,n),i=Z._getNumericFilters(e,t),a={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:Z._getTagFilters(e),analytics:!1,clickAnalytics:!1},s=e.getHierarchicalFacetByName(t);return a.facets=s?Z._getDisjunctiveHierarchicalFacetAttribute(e,s,n):t,0<i.length&&(a.numericFilters=i),0<r.length&&(a.facetFilters=r),p({},e.getQueryParams(),a)},_getNumericFilters:function(e,i){if(e.numericFilters)return e.numericFilters;var a=[];return Object.keys(e.numericRefinements).forEach(function(r){var t=e.numericRefinements[r]||{};Object.keys(t).forEach(function(n){var e=t[n]||[];i!==r&&e.forEach(function(e){if(Array.isArray(e)){var t=e.map(function(e){return r+n+e});a.push(t)}else a.push(r+n+e)})})}),a},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(o,c,u){var l=[],e=o.facetsRefinements||{};Object.keys(e).forEach(function(t){(e[t]||[]).forEach(function(e){l.push(t+":"+e)})});var n=o.facetsExcludes||{};Object.keys(n).forEach(function(t){(n[t]||[]).forEach(function(e){l.push(t+":-"+e)})});var r=o.disjunctiveFacetsRefinements||{};Object.keys(r).forEach(function(t){var e=r[t]||[];if(t!==c&&e&&0!==e.length){var n=[];e.forEach(function(e){n.push(t+":"+e)}),l.push(n)}});var h=o.hierarchicalFacetsRefinements||{};return Object.keys(h).forEach(function(e){var t=(h[e]||[])[0];if(void 0!==t){var n,r,i=o.getHierarchicalFacetByName(e),a=o._getHierarchicalFacetSeparator(i),s=o._getHierarchicalRootPath(i);if(c===e){if(-1===t.indexOf(a)||!s&&!0===u||s&&s.split(a).length===t.split(a).length)return;t=s?(r=s.split(a).length-1,s):(r=t.split(a).length-2,t.slice(0,t.lastIndexOf(a))),n=i.attributes[r]}else r=t.split(a).length-1,n=i.attributes[r];n&&l.push([n+":"+t])}}),l},_getHitsHierarchicalFacetsAttributes:function(s){return s.hierarchicalFacets.reduce(function(e,t){var n=s.getHierarchicalRefinement(t.name)[0];if(!n)return e.push(t.attributes[0]),e;var r=s._getHierarchicalFacetSeparator(t),i=n.split(r).length,a=t.attributes.slice(0,i+1);return e.concat(a)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(!0===n){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(r).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(r).length-1;return t.attributes.slice(0,1+s)},getSearchForFacetQuery:function(e,t,n,r){var i=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,a={facetQuery:t,facetName:e};return"number"==typeof n&&(a.maxFacetHits=n),p({},Z._getHitsSearchParams(i),a)}},X=Z,ee="3.3.4";function te(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.3.4)"),this.setClient(e);var r=n||{};r.index=t,this.state=R.make(r),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function ne(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function re(){return this.state.page}J(te,e.EventEmitter),te.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},te.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},te.prototype.getQuery=function(){var e=this.state;return X._getHitsSearchParams(e)},te.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,r=X._getQueries(n.index,n),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(r).then(function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new q(n,e.results),state:n,_originalResponse:e}},function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e});this.client.search(r).then(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new q(n,e.results),n)}).catch(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,n)})},te.prototype.searchForFacetValues=function(t,e,n,r){var i="function"==typeof this.client.searchForFacetValues;if(!i&&"function"!=typeof this.client.initIndex)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var a=this.state.setQueryParameters(r||{}),s=a.isDisjunctiveFacet(t),o=X.getSearchForFacetQuery(t,e,n,a);this._currentNbQueries++;var c=this;return this.emit("searchForFacetValues",{state:a,facet:t,query:e}),(i?this.client.searchForFacetValues([{indexName:a.index,params:o}]):this.client.initIndex(a.index).searchForFacetValues(o)).then(function(e){return c._currentNbQueries--,0===c._currentNbQueries&&c.emit("searchQueueEmpty"),(e=Array.isArray(e)?e[0]:e).facetHits.forEach(function(e){e.isRefined=s?a.isDisjunctiveFacetRefined(t,e.value):a.isFacetRefined(t,e.value)}),e},function(e){throw c._currentNbQueries--,0===c._currentNbQueries&&c.emit("searchQueueEmpty"),e})},te.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},te.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},te.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},te.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},te.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},te.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},te.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},te.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},te.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},te.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},te.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},te.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},te.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},te.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},te.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},te.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},te.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},te.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},te.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},te.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},te.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},te.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},te.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},te.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},te.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},te.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},te.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},te.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},te.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},te.prototype.setCurrentPage=ne,te.prototype.setPage=ne,te.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},te.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},te.prototype.setState=function(e){return this._change({state:R.make(e),isPageReset:!1}),this},te.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new R(e),this},te.prototype.hasRefinements=function(e){return!!l(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))},te.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},te.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},te.prototype.hasTag=function(e){return this.state.isTagRefined(e)},te.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},te.prototype.getIndex=function(){return this.state.index},te.prototype.getCurrentPage=re,te.prototype.getPage=re,te.prototype.getTags=function(){return this.state.tagRefinements},te.prototype.getRefinements=function(e){var n=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){n.push({value:e,type:"exclude"})});else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"disjunctive"})})}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach(function(e){var t=r[e];n.push({value:t,operator:e,type:"numeric"})}),n},te.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},te.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},te.prototype._search=function(e){var r=this.state,i=[],t=[];e.onlyWithDerivedHelpers||(t=X._getQueries(r.index,r),i.push({state:r,queriesCount:t.length,helper:this}),this.emit("search",{state:r,results:this.lastResults}));var n=this.derivedHelpers.map(function(e){var t=e.getModifiedState(r),n=X._getQueries(t.index,t);return i.push({state:t,queriesCount:n.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),n}),a=Array.prototype.concat.apply(t,n),s=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,i,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(e){this.emit("error",{error:e})}},te.prototype._dispatchAlgoliaResponse=function(e,t,n){if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty");var s=n.results.slice();e.forEach(function(e){var t=e.state,n=e.queriesCount,r=e.helper,i=s.splice(0,n),a=r.lastResults=new q(t,i);r.emit("result",{results:a,state:t})})}},te.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbQueries&&this.emit("searchQueueEmpty"))},te.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},te.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},te.prototype._change=function(e){var t=e.state,n=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:n}))},te.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},te.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.3.4)"),this.client=e),this},te.prototype.getClient=function(){return this.client},te.prototype.derive=function(e){var t=new G(this,e);return this.derivedHelpers.push(t),t},te.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},te.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var ie=te;function ae(e,t,n){return new ie(e,t,n)}ae.version=ee,ae.AlgoliaSearchHelper=ie,ae.SearchParameters=R,ae.SearchResults=q;var se=ae;function oe(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null===i&&(i=ce.then(function(){i=null,a?a=!1:r.apply(void 0,t)}))}var i=null,a=!1;return e.wait=function(){if(null===i)throw new Error("The deferred function should be called before calling `wait()`");return i},e.cancel=function(){null!==i&&(a=!0)},e}var ce=Promise.resolve();function ue(e){var t="string"==typeof e,n=t?document.querySelector(e):e;if(function(e){return e instanceof HTMLElement||Boolean(e)&&0<e.nodeType}(n))return n;var r="Container must be `string` or `HTMLElement`.";throw t&&(r+=" Unable to find ".concat(e)),new Error(r)}function le(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function he(e){return e.filter(function(e,t,n){return n.indexOf(e)===t})}function de(e){var t=e.defaultTemplates,n=e.templates;return D({templatesConfig:e.templatesConfig},function(e,t){var a=0<arguments.length&&void 0!==e?e:{},s=1<arguments.length&&void 0!==t?t:{};return he([].concat(P(Object.keys(a)),P(Object.keys(s)))).reduce(function(e,t){var n=a[t],r=s[t],i=void 0!==r&&r!==n;return e.templates[t]=i?r:n,e.useCustomCompileOptions[t]=i,e},{templates:{},useCustomCompileOptions:{}})}(t,n))}function fe(e,t){return e(t={exports:{}},t.exports),t.exports}var me=fe(function(e,t){!function(R){var S=/\S/,t=/\"/g,n=/\n/g,r=/\r/g,i=/\\/g,a=/\u2028/,s=/\u2029/;function w(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function P(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function x(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var r=1,i=e.length;r<i;r++)if(t.charAt(n+r)!=e.charAt(r))return!1;return!0}R.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},R.scan=function(e,t){var n,r,i,a,s,o=e.length,c=0,u=null,l=null,h="",d=[],f=!1,m=0,p=0,g="{{",v="}}";function y(){0<h.length&&(d.push({tag:"_t",text:new String(h)}),h="")}function b(e,t){if(y(),e&&function(){for(var e=!0,t=p;t<d.length;t++)if(!(e=R.tags[d[t].tag]<R.tags._v||"_t"==d[t].tag&&null===d[t].text.match(S)))return!1;return e}())for(var n,r=p;r<d.length;r++)d[r].text&&((n=d[r+1])&&">"==n.tag&&(n.indent=d[r].text.toString()),d.splice(r,1));else t||d.push({tag:"\n"});f=!1,p=d.length}for(t&&(t=t.split(" "),g=t[0],v=t[1]),m=0;m<o;m++)0==c?x(g,e,m)?(--m,y(),c=1):"\n"==e.charAt(m)?b(f):h+=e.charAt(m):1==c?(m+=g.length-1,c="="==(u=(l=R.tags[e.charAt(m+1)])?e.charAt(m+1):"_v")?(r=m,void 0,i="="+v,a=(n=e).indexOf(i,r),s=P(n.substring(n.indexOf("=",r)+1,a)).split(" "),g=s[0],v=s[s.length-1],m=a+i.length-1,0):(l&&m++,2),f=m):x(v,e,m)?(d.push({tag:u,n:P(h),otag:g,ctag:v,i:"/"==u?f-g.length:m+v.length}),h="",m+=v.length-1,c=0,"{"==u&&("}}"==v?m++:w(d[d.length-1]))):h+=e.charAt(m);return b(f,!0),d};var u={_t:!0,"\n":!0,$:!0,"/":!0};function l(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#",!0}function h(e,t,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==e&&n[r].o==t)return!0}function o(e){var t=[];for(var n in e.partials)t.push('"'+d(n)+'":{name:"'+d(e.partials[n].name)+'", '+o(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var n in e)t.push('"'+d(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}(e.subs)}R.stringify=function(e,t,n){return"{code: function (c,p,i) { "+R.wrapMain(e.code)+" },"+o(e)+"}"};var c=0;function d(e){return e.replace(i,"\\\\").replace(t,'\\"').replace(n,"\\n").replace(r,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function f(e){return~e.indexOf(".")?"d":"f"}function m(e,t){var n="<"+(t.prefix||"")+e.n+c++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+d(n)+'",c,p,"'+(e.indent||"")+'"));',n}function e(e,t){t.code+="t.b(t.t(t."+f(e.n)+'("'+d(e.n)+'",c,p,0)));'}function p(e){return"t.b("+e+");"}R.generate=function(e,t,n){c=0;var r={code:"",subs:{},partials:{}};return R.walk(e,r),n.asString?this.stringify(r,t,n):this.makeTemplate(r,t,n)},R.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},R.template=R.Template,R.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},R.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},R.codegen={"#":function(e,t){t.code+="if(t.s(t."+f(e.n)+'("'+d(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',R.walk(e.nodes,t),t.code+="});c.pop();}"},"^":function(e,t){t.code+="if(!t.s(t."+f(e.n)+'("'+d(e.n)+'",c,p,1),c,p,1,0,0,"")){',R.walk(e.nodes,t),t.code+="};"},">":m,"<":function(e,t){var n={partials:{},code:"",subs:{},inPartial:!0};R.walk(e.nodes,n);var r=t.partials[m(e,t)];r.subs=n.subs,r.partials=n.partials},$:function(e,t){var n={subs:{},code:"",partials:t.partials,prefix:e.n};R.walk(e.nodes,n),t.subs[e.n]=n.code,t.inPartial||(t.code+='t.sub("'+d(e.n)+'",c,p,i);')},"\n":function(e,t){t.code+=p('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+f(e.n)+'("'+d(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=p('"'+d(e.text)+'"')},"{":e,"&":e},R.walk=function(e,t){for(var n,r=0,i=e.length;r<i;r++)(n=R.codegen[e[r].tag])&&n(e[r],t);return t},R.parse=function(e,t,n){return function e(t,n,r,i){var a,s=[],o=null,c=null;for(a=r[r.length-1];0<t.length;){if(c=t.shift(),a&&"<"==a.tag&&!(c.tag in u))throw new Error("Illegal content in < super tag.");if(R.tags[c.tag]<=R.tags.$||l(c,i))r.push(c),c.nodes=e(t,c.tag,r,i);else{if("/"==c.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+c.n);if(o=r.pop(),c.n!=o.n&&!h(c.n,o.n,i))throw new Error("Nesting error: "+o.n+" vs. "+c.n);return o.end=c.i,s}"\n"==c.tag&&(c.last=0==t.length||"\n"==t[0].tag)}s.push(c)}if(0<r.length)throw new Error("missing closing tag: "+r.pop().n);return s}(e,0,[],(n=n||{}).sectionTags||[])},R.cache={},R.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},R.compile=function(e,t){t=t||{};var n=R.cacheKey(e,t),r=this.cache[n];if(r){var i=r.partials;for(var a in i)delete i[a].instance;return r}return r=this.generate(this.parse(this.scan(e,t.delimiters),e,t),e,t),this.cache[n]=r}}(t)}),pe=fe(function(e,t){!function(e){function l(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}e.Template=function(e,t,n,r){e=e||{},this.r=e.code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=o(e),s.test(e)?e.replace(t,"&amp;").replace(n,"&lt;").replace(r,"&gt;").replace(i,"&#39;").replace(a,"&quot;"):e},t:o,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],r=t[n.name];if(n.instance&&n.base==r)return n.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[e].base=r,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);r=function(e,t,n,r,i,a){function s(){}function o(){}var c;o.prototype=(s.prototype=e).subs;var u=new s;for(c in u.subs=new o,u.subsText={},u.buf="",r=r||{},u.stackSubs=r,u.subsText=a,t)r[c]||(r[c]=t[c]);for(c in r)u.subs[c]=r[c];for(c in i=i||{},u.stackPartials=i,n)i[c]||(i[c]=n[c]);for(c in i)u.partials[c]=i[c];return u}(r,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=r},rp:function(e,t,n,r){var i=this.ep(e,n);return i?i.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(h(r))for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,i,a,s){var o;return(!h(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,r,i,a,s)),o=!!e,!r&&o&&t&&t.push("object"==typeof e?e:t[t.length-1]),o)},d:function(e,t,n,r){var i,a=e.split("."),s=this.f(a[0],t,n,r),o=this.options.modelGet,c=null;if("."===e&&h(t[t.length-2]))s=t[t.length-1];else for(var u=1;u<a.length;u++)s=void 0!==(i=l(a[u],s,o))?(c=s,i):"";return!(r&&!s)&&(r||"function"!=typeof s||(t.push(c),s=this.mv(s,t,n),t.pop()),s)},f:function(e,t,n,r){for(var i=!1,a=!1,s=this.options.modelGet,o=t.length-1;0<=o;o--)if(void 0!==(i=l(e,t[o],s))){a=!0;break}return a?(r||"function"!=typeof i||(i=this.mv(i,t,n)),i):!r&&""},ls:function(e,t,n,r,i){var a=this.options.delimiters;return this.options.delimiters=i,this.b(this.ct(o(e.call(t,r)),t,n)),this.options.delimiters=a,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,i,a,s){var o,c=t[t.length-1],u=e.call(c);return"function"==typeof u?!!r||(o=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(u,c,n,o.substring(i,a),s)):u},mv:function(e,t,n){var r=t[t.length-1],i=e.call(r);return"function"==typeof i?this.ct(o(i.call(r)),r,n):i},sub:function(e,t,n,r){var i=this.subs[e];i&&(this.activeSub=e,i(t,n,this,r),this.activeSub=!1)}};var t=/&/g,n=/</g,r=/>/g,i=/\'/g,a=/\"/g,s=/[&<>\"\']/;function o(e){return String(null==e?"":e)}var h=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)});me.Template=pe.Template,me.template=me.Template;var ge=me;function ve(e){var t=e.templates,n=e.templateKey,r=e.compileOptions,i=e.helpers,a=e.data,s=e.bindEvent,o=t[n],c=h(o),u="function"===c;if(!("string"===c)&&!u)throw new Error("Template must be 'string' or 'function', was '".concat(c,"' (key: ").concat(n,")"));if(u)return o(a,s);var l=function(e,t,n){var r=0<arguments.length&&void 0!==e?e:{},i=1<arguments.length?t:void 0,a=2<arguments.length?n:void 0;return Object.keys(r).reduce(function(e,n){return D({},e,M({},n,function(){var t=this;return function(e){return r[n].call(a,e,function(e){return ge.compile(e,i).render(t)})}}))},{})}(i,r,a);return ge.compile(o,r).render(D({},a,{helpers:l})).replace(/[ \n\r\t\f\xA0]+/g,function(e){return e.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")}).trim()}function ye(e,t){for(var n,r=0;r<e.length;r++)if(t(n=e[r],r,e))return n}function be(e){return String(e).replace(/^\\-/,"-")}function Re(i,e,a,s,t){var o,n={type:e,attribute:a,name:s},c=ye(4<arguments.length&&void 0!==t?t:[],function(e){return e.name===a});"hierarchical"===e?function(){for(var e=i.getHierarchicalFacetByName(a),n=s.split(e.separator),t=function(t){c=c&&c.data&&ye(Object.keys(c.data).map(function(t){return function(e){return t[e]}}(c.data)),function(e){return e.name===n[t]})},r=0;void 0!==c&&r<n.length;++r)t(r);o=c&&c.count}():o=c&&c.data&&c.data[n.name];var r=c&&c.exhaustive;return void 0!==o&&(n.count=o),void 0!==r&&(n.exhaustive=r),n}function Se(n,r,e){var t=2<arguments.length&&void 0!==e&&e,a=[],i=r.facetsRefinements,s=void 0===i?{}:i,o=r.facetsExcludes,c=void 0===o?{}:o,u=r.disjunctiveFacetsRefinements,l=void 0===u?{}:u,h=r.hierarchicalFacetsRefinements,d=void 0===h?{}:h,f=r.numericRefinements,m=void 0===f?{}:f,p=r.tagRefinements,g=void 0===p?[]:p;return Object.keys(s).forEach(function(t){s[t].forEach(function(e){a.push(Re(r,"facet",t,e,n.facets))})}),Object.keys(c).forEach(function(t){c[t].forEach(function(e){a.push({type:"exclude",attribute:t,name:e,exclude:!0})})}),Object.keys(l).forEach(function(t){l[t].forEach(function(e){a.push(Re(r,"disjunctive",t,be(e),n.disjunctiveFacets))})}),Object.keys(d).forEach(function(t){d[t].forEach(function(e){a.push(Re(r,"hierarchical",t,e,n.hierarchicalFacets))})}),Object.keys(m).forEach(function(r){var i=m[r];Object.keys(i).forEach(function(e){var t=e,n=i[t];(Array.isArray(n)?n:[n]).forEach(function(e){a.push({type:"numeric",attribute:r,name:"".concat(e),numericValue:e,operator:t})})})}),g.forEach(function(e){a.push({type:"tag",attribute:"_tags",name:e})}),t&&r.query&&r.query.trim()&&a.push({attribute:"query",type:"query",name:r.query,query:r.query}),a}function we(e){var t=e.helper,n=e.attributesToClear,r=void 0===n?[]:n,i=t.state.setPage(0);return i=r.reduce(function(e,t){return i.isNumericRefined(t)?e.removeNumericRefinement(t):i.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):i.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):i.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e},i),-1!==r.indexOf("query")&&(i=i.setQuery("")),i}function Pe(e){return"number"==typeof e&&e<0&&(e=String(e).replace(/^-/,"\\-")),e}function xe(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat(function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e),").\n\n").concat(t))}function Ne(){}function _e(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}function Ie(e){return"number"==typeof e&&isFinite(e)}function Fe(e){if(!function(e){return"object"===h(e)&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}(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}function Ce(e){var t=e.start,n=void 0===t?0:t,r=e.end,i=e.step,a=void 0===i?1:i,s=0===a?1:a,o=Math.round((r-n)/s);return P(Array(o)).map(function(e,t){return n+t*s})}function Te(e){return e!==Object(e)}function Ee(e,t){if(e===t)return!0;if(Te(e)||Te(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!(i in t))return!1;if(!Ee(e[i],t[i]))return!1}return!0}var ke={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Le=/[&<>"']/g,Me=RegExp(Le.source);var je={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Oe=/&(amp|quot|lt|gt|#39);/g,Ae=RegExp(Oe.source);var He={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},De={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function We(e){return function(e){return e&&Me.test(e)?e.replace(Le,function(e){return ke[e]}):e}(e).replace(new RegExp(He.highlightPreTag,"g"),De.highlightPreTag).replace(new RegExp(He.highlightPostTag,"g"),De.highlightPostTag)}function Be(n){return Fe(n)&&"string"!=typeof n.value?Object.keys(n).reduce(function(e,t){return D({},e,M({},t,Be(n[t])))},{}):Array.isArray(n)?n.map(Be):D({},n,{value:We(n.value)})}function Ue(e){return void 0===e.__escaped&&((e=e.map(function(e){var t=d({},e);return t._highlightResult&&(t._highlightResult=Be(t._highlightResult)),t._snippetResult&&(t._snippetResult=Be(t._snippetResult)),t})).__escaped=!0),e}function Qe(e){return e.map(function(e){return D({},e,{highlighted:We(e.highlighted)})})}function qe(e){var t=De.highlightPreTag,n=De.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+n:e.value}).join("")}function $e(e){var n=De.highlightPostTag,t=De.highlightPreTag,r=e.split(t),i=r.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return r.forEach(function(e){var t=e.split(n);a.push({value:t[0],isHighlighted:!0}),""!==t[1]&&a.push({value:t[1],isHighlighted:!1})}),a}var Ve=new RegExp(/\w/i);function Ke(e,t){var n,r,i=e[t],a=(null===(n=e[t+1])||void 0===n?void 0:n.isHighlighted)||!0,s=(null===(r=e[t-1])||void 0===r?void 0:r.isHighlighted)||!0;return Ve.test(function(e){return e&&Ae.test(e)?e.replace(Oe,function(e){return je[e]}):e}(i.value))||s!==a?i.isHighlighted:s}function ze(n){return n.some(function(e){return e.isHighlighted})?n.map(function(e,t){return D({},e,{isHighlighted:!Ke(n,t)})}):n.map(function(e){return D({},e,{isHighlighted:!1})})}function Je(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var n=function(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e,function(e){return e.name===t.name});if(-1===n)return e.concat(t);var r=e.slice();return r.splice(n,1,t),r},e.hierarchicalFacets)})}function Ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){var n=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:D({},e.hierarchicalFacetsRefinements,{},t.hierarchicalFacetsRefinements)})}(e,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var n=A(t,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return e.setQueryParameters(n)}(function(e,t){return t.facets.reduce(function(e,t){return e.addFacet(t)},e)}(function(e,t){var n=he([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return 0<n.length?e.setQueryParameters({ruleContexts:n}):e}(function(e,t){return t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},e)}(function(e,t){return e.setQueryParameters({facetsRefinements:D({},e.facetsRefinements,{},t.facetsRefinements)})}(function(e,t){return e.setQueryParameters({facetsExcludes:D({},e.facetsExcludes,{},t.facetsExcludes)})}(function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:D({},e.disjunctiveFacetsRefinements,{},t.disjunctiveFacetsRefinements)})}(function(e,t){return e.setQueryParameters({numericRefinements:D({},e.numericRefinements,{},t.numericRefinements)})}(function(e,t){return t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},e)}(Je(n,t),t),t),t),t),t),t),t),t),t)})}function Ge(e){return Array.isArray(e)?e:[e]}function Ze(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(function(e){return function(e){var t=e.name,n=e.connector;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",void 0!==n&&n?"#connector":""].join("")}(e)}).join(", ");return function(e){return[e,"See documentation: ".concat(r)].filter(Boolean).join("\n\n")}}var Xe=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/;function et(e){return Array.isArray(e)?function(e){var t=B(e,1)[0],n=B(t=void 0===t?[void 0,void 0,void 0,void 0]:t,4),r=n[0],i=n[1],a=n[2],s=n[3];if(!(r&&i&&a&&s))throw new Error('Invalid value for "insideBoundingBox" parameter: ['.concat(e,"]"));return{northEast:{lat:r,lng:i},southWest:{lat:a,lng:s}}}(e):function(e){var t=B(e.split(",").map(parseFloat),4),n=t[0],r=t[1],i=t[2],a=t[3];if(!(n&&r&&i&&a))throw new Error('Invalid value for "insideBoundingBox" parameter: "'.concat(e,'"'));return{northEast:{lat:n,lng:r},southWest:{lat:i,lng:a}}}(e)}function tt(e,n,r){return e.map(function(e,t){return D({},e,{__position:r*n+t+1})})}function nt(e,t){return t?e.map(function(e){return D({},e,{__queryID:t})}):e}function rt(e){var o=e.instantSearchInstance,c=e.helper,u=e.attribute,l=e.widgetType;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],a=t[2],s=void 0===a?"Filter Applied":a;1===t.length&&"object"===h(t[0])?o.sendEventToInsights(t[0]):"click"!==r||2!==t.length&&3!==t.length||function(e,t,n){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,n):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,n):e.state.isDisjunctiveFacetRefined(t,n)}(c,u,i)||o.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:l,eventType:r,payload:{eventName:s,index:c.getIndex(),filters:["".concat(u,":").concat(i)]}})}}function it(e){var t=e.index,n=e.widgetType,r=(e.methodName,e.args);if(1===r.length&&"object"===h(r[0]))return r[0];var i=r[0],a=r[1],s=r[2];if(!a)return null;if(("click"===i||"conversion"===i)&&!s)return null;var o=Array.isArray(a)?a:[a];if(0===o.length)return null;var c=o[0].__queryID,u=o.map(function(e){return e.objectID}),l=o.map(function(e){return e.__position});return"view"===i?{insightsMethod:"viewedObjectIDs",widgetType:n,eventType:i,payload:{eventName:s||"Hits Viewed",index:t,objectIDs:u}}:"click"===i?{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:n,eventType:i,payload:{eventName:s,index:t,queryID:c,objectIDs:u,positions:l}}:"conversion"===i?{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:n,eventType:i,payload:{eventName:s,index:t,queryID:c,objectIDs:u}}:null}function at(e){var i=e.instantSearchInstance,a=e.index,s=e.widgetType;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=it({widgetType:s,index:a,methodName:"sendEvent",args:t});r&&i.sendEventToInsights(r)}}function st(e){var i=e.index,a=e.widgetType;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=it({widgetType:a,index:i,methodName:"bindEvent",args:t});return r?"data-insights-event=".concat(btoa(JSON.stringify(r))):""}}function ot(e,n){if(!e)return null;var r=e.numericRefinements[n],i=[];return Object.keys(r).filter(function(e){return Array.isArray(r[e])&&0<r[e].length}).forEach(function(t){r[t].forEach(function(e){i.push("".concat(n).concat(t).concat(e))})}),i}var ct=Ze({name:"index-widget"});function ut(e){return"ais.index"===e.$$type}function lt(e,t){var n=t.state,r=t.isPageReset,i=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:r,_uiState:i}))}function ht(e,n,t){var r=2<arguments.length&&void 0!==t?t:{};return e.filter(function(e){return!ut(e)}).reduce(function(e,t){return t.getWidgetUiState||t.getWidgetState?t.getWidgetUiState?t.getWidgetUiState(e,n):t.getWidgetState(e,n):e},r)}function dt(e,t){var n=t.initialSearchParameters,r=A(t,["initialSearchParameters"]);return e.filter(function(e){return!ut(e)}).reduce(function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,r):e},n)}function ft(e){if(void 0===e||void 0===e.indexName)throw new Error(ct("The `indexName` option is required."));var o=e.indexName,t=e.indexId,c=void 0===t?o:t,u=[],l={},h=null,d=null,f=null,m=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return o},getIndexId:function(){return c},getHelper:function(){return f},getResults:function(){return m&&m.lastResults},getScopedResults:function(){var e=this.getParent();return function n(e){return e.filter(ut).reduce(function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(P(n(t.getWidgets()))))},[])}(e?e.getWidgets():[this])},getParent:function(){return d},createURL:function(e){return h._createURL(M({},c,ht(u,{searchParameters:e,helper:f})))},getWidgets:function(){return u},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(ct("The `addWidgets` method expects an array of widgets."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(ct("The widget definition expects a `render` and/or an `init` method."));return u=u.concat(e),h&&Boolean(e.length)&&(lt(f,{state:dt(u,{uiState:l,initialSearchParameters:f.state}),_uiState:l}),e.forEach(function(e){e.getRenderState&&mt({renderState:e.getRenderState(h.renderState[t.getIndexId()]||{},{uiState:h._initialUiState,helper:t.getHelper(),parent:t,instantSearchInstance:h,state:f.state,renderState:h.renderState,templatesConfig:h.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:h._isSearchStalled}}),instantSearchInstance:h,parent:t})}),e.forEach(function(e){e.init&&e.init({helper:f,parent:t,uiState:h._initialUiState,instantSearchInstance:h,state:f.state,renderState:h.renderState,templatesConfig:h.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:h._isSearchStalled}})}),h.scheduleSearch()),this},removeWidgets:function(t){if(!Array.isArray(t))throw new Error(ct("The `removeWidgets` method expects an array of widgets."));if(t.some(function(e){return"function"!=typeof e.dispose}))throw new Error(ct("The widget definition expects a `dispose` method."));if(u=u.filter(function(e){return-1===t.indexOf(e)}),h&&Boolean(t.length)){var e=t.reduce(function(e,t){return t.dispose({helper:f,state:e})||e},f.state);l=ht(u,{searchParameters:e,helper:f}),f.setState(dt(u,{uiState:l,initialSearchParameters:e})),u.length&&h.scheduleSearch()}return this},init:function(e){var t=this,r=e.instantSearchInstance,n=e.parent,i=e.uiState;if(null===f){h=r,d=n,l=i[c]||{};var a=r.mainHelper,s=dt(u,{uiState:l,initialSearchParameters:new se.SearchParameters({index:o})});(f=se({},s.index,s)).search=function(){return r.onStateChange?(r.onStateChange({uiState:r.mainIndex.getWidgetUiState({}),setUiState:r.setUiState.bind(r)}),a):a.search()},f.searchWithoutTriggeringOnStateChange=function(){return a.search()},f.searchForFacetValues=function(e,t,n,r){var i=f.state.setQueryParameters(r);return a.searchForFacetValues(e,t,n,i)},m=a.derive(function(){return Ye.apply(void 0,P(function(e){for(var t=e.getParent(),n=[e.getHelper().state];null!==t;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}(t)))}),f.on("change",function(e){e.isPageReset&&!function n(e){var t=e.filter(ut);0!==t.length&&t.forEach(function(e){var t=e.getHelper();lt(t,{state:t.state.resetPage(),isPageReset:!0}),n(e.getWidgets())})}(u)}),m.on("search",function(){r.scheduleStalledRender()}),m.on("result",function(e){var t=e.results;r.scheduleRender(),f.lastResults=t}),u.forEach(function(e){e.getRenderState&&mt({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},{uiState:i,helper:f,parent:t,instantSearchInstance:r,state:f.state,renderState:r.renderState,templatesConfig:r.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:r._isSearchStalled}}),instantSearchInstance:r,parent:t})}),u.forEach(function(e){e.init&&e.init({uiState:i,helper:f,parent:t,instantSearchInstance:r,state:f.state,renderState:r.renderState,templatesConfig:r.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:r._isSearchStalled}})}),f.on("change",function(e){var t=e.state,n=e._uiState;l=ht(u,{searchParameters:t,helper:f},n||{}),r.onStateChange||r.onInternalStateChange()})}},render:function(e){var t=this,n=e.instantSearchInstance;this.getResults()&&(u.forEach(function(e){e.getRenderState&&mt({renderState:e.getRenderState(n.renderState[t.getIndexId()]||{},{helper:t.getHelper(),parent:t,instantSearchInstance:n,results:t.getResults(),scopedResults:t.getScopedResults(),state:t.getResults()._state,renderState:n.renderState,templatesConfig:n.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:n._isSearchStalled}}),instantSearchInstance:n,parent:t})}),u.forEach(function(e){e.render&&e.render({helper:f,parent:t,instantSearchInstance:n,results:t.getResults(),scopedResults:t.getScopedResults(),state:t.getResults()._state,renderState:n.renderState,templatesConfig:n.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:n._isSearchStalled}})}))},dispose:function(){u.forEach(function(e){e.dispose&&e.dispose({helper:f,state:f.state})}),d=h=null,f.removeAllListeners(),f=null,m.detach(),m=null},getWidgetUiState:function(e){return u.filter(ut).reduce(function(e,t){return t.getWidgetUiState(e)},D({},e,M({},this.getIndexId(),l)))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var n=t.uiState;return dt(u,{uiState:n,initialSearchParameters:e})},refreshUiState:function(){l=ht(u,{searchParameters:this.getHelper().state,helper:this.getHelper()})}}}function mt(e){var t=e.renderState,n=e.instantSearchInstance,r=e.parent,i=r?r.getIndexId():n.mainIndex.getIndexId();n.renderState=D({},n.renderState,M({},i,D({},n.renderState[i],{},t)))}function pt(a){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.descendantName,n=e.modifierName,r=t?"-".concat(t):"",i=n?"--".concat(n):"";return"".concat("ais","-").concat(a).concat(r).concat(i)}}var gt=pt("Highlight");function vt(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasses,s=void 0===a?{}:a,o=(_e(i._highlightResult,t)||{}).value,c=void 0===o?"":o,u=gt({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return c.replace(new RegExp(De.highlightPreTag,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(De.highlightPostTag,"g"),"</".concat(r,">"))}var yt=pt("ReverseHighlight");function bt(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasses,s=void 0===a?{}:a,o=(_e(i._highlightResult,t)||{}).value,c=void 0===o?"":o,u=yt({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return qe(ze($e(c))).replace(new RegExp(De.highlightPreTag,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(De.highlightPostTag,"g"),"</".concat(r,">"))}var Rt=pt("Snippet");function St(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasses,s=void 0===a?{}:a,o=(_e(i._snippetResult,t)||{}).value,c=void 0===o?"":o,u=Rt({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return c.replace(new RegExp(De.highlightPreTag,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(De.highlightPostTag,"g"),"</".concat(r,">"))}var wt=pt("ReverseSnippet");function Pt(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasses,s=void 0===a?{}:a,o=(_e(i._snippetResult,t)||{}).value,c=void 0===o?"":o,u=wt({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return qe(ze($e(c))).replace(new RegExp(De.highlightPreTag,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(De.highlightPostTag,"g"),"</".concat(r,">"))}function xt(e,t){return function(e){var t,n=e.method,r=e.payload;if("object"!==h(r))throw new Error("The insights helper expects the payload to be an object.");try{t=btoa(JSON.stringify(r))}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(n,'" data-insights-payload="').concat(t,'"')}({method:e,payload:t})}function Nt(){return function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}}("_ALGOLIA")}function _t(e){e.configure;return A(e,["configure"])}function It(){return{stateToRoute:function(n){return Object.keys(n).reduce(function(e,t){return D({},e,M({},t,_t(n[t])))},{})},routeToState:function(e){var n=0<arguments.length&&void 0!==e?e:{};return Object.keys(n).reduce(function(e,t){return D({},e,M({},t,_t(n[t])))},{})}}}function Ft(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n}function Ct(e,t){Vt.apply(e,$t(t)?t:[t])}function Tt(e,t,n,r,i,a,s,o,c,u,l,h,d){var f=e;if("function"==typeof s?f=s(t,f):f instanceof Date?f=u(f):"comma"===n&&$t(f)&&(f=f.join(",")),null===f){if(r)return a&&!h?a(t,Jt.encoder,d):t;f=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(f)||Ht.isBuffer(f))return a?[l(h?t:a(t,Jt.encoder,d))+"="+l(a(f,Jt.encoder,d))]:[l(t)+"="+l(String(f))];var m,p=[];if(void 0===f)return p;if($t(s))m=s;else{var g=Object.keys(f);m=o?g.sort(o):g}for(var v=0;v<m.length;++v){var y=m[v];i&&null===f[y]||($t(f)?Ct(p,Tt(f[y],"function"==typeof n?n(t,y):t,n,r,i,a,s,o,c,u,l,h,d)):Ct(p,Tt(f[y],t+(c?"."+y:"["+y+"]"),n,r,i,a,s,o,c,u,l,h,d)))}return p}function Et(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=0<n.depth&&/(\[[^[\]]*])/.exec(r),s=a?r.slice(0,a.index):r,o=[];if(s){if(!n.plainObjects&&Yt.call(Object.prototype,s)&&!n.allowPrototypes)return;o.push(s)}for(var c=0;0<n.depth&&null!==(a=i.exec(r))&&c<n.depth;){if(c+=1,!n.plainObjects&&Yt.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;o.push(a[1])}return a&&o.push("["+r.slice(a.index)+"]"),function(e,t,n){for(var r=t,i=e.length-1;0<=i;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(r);else{a=n.plainObjects?Object.create(null):{};var o="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(o,10);n.parseArrays||""!==o?!isNaN(c)&&s!==o&&String(c)===o&&0<=c&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=r:a[o]=r:a={0:r}}r=a}return r}(o,t,n)}}function kt(e){var t=e.qsModule,n=e.routeState,r=e.location,i=r.protocol,a=r.hostname,s=r.port,o=void 0===s?"":s,c=r.pathname,u=r.hash,l=t.stringify(n),h=""===o?"":":".concat(o);return l?"".concat(i,"//").concat(a).concat(h).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(a).concat(h).concat(c).concat(u)}function Lt(e){var t=e.qsModule,n=e.location;return t.parse(n.search.slice(1),{arrayLimit:99})}function Mt(e){e&&(window.document.title=e)}var jt=Object.prototype.hasOwnProperty,Ot=Array.isArray,At=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ht={arrayToObject:Ft,assign:function(e,n){return Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),o=0;o<s.length;++o){var c=s[o],u=a[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:c}),n.push(u))}return function(e){for(;1<e.length;){var t=e.pop(),n=t.obj[t.prop];if(Ot(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var i="",a=0;a<r.length;++a){var s=r.charCodeAt(a);45===s||46===s||95===s||126===s||48<=s&&s<=57||65<=s&&s<=90||97<=s&&s<=122?i+=r.charAt(a):s<128?i+=At[s]:s<2048?i+=At[192|s>>6]+At[128|63&s]:s<55296||57344<=s?i+=At[224|s>>12]+At[128|s>>6&63]+At[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(a)),i+=At[240|s>>18]+At[128|s>>12&63]+At[128|s>>6&63]+At[128|63&s])}return i},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)},merge:function r(i,a,s){if(!a)return i;if("object"!=typeof a){if(Ot(i))i.push(a);else{if(!i||"object"!=typeof i)return[i,a];(s&&(s.plainObjects||s.allowPrototypes)||!jt.call(Object.prototype,a))&&(i[a]=!0)}return i}if(!i||"object"!=typeof i)return[i].concat(a);var e=i;return Ot(i)&&!Ot(a)&&(e=Ft(i,s)),Ot(i)&&Ot(a)?(a.forEach(function(e,t){if(jt.call(i,t)){var n=i[t];n&&"object"==typeof n&&e&&"object"==typeof e?i[t]=r(n,e,s):i.push(e)}else i[t]=e}),i):Object.keys(a).reduce(function(e,t){var n=a[t];return jt.call(e,t)?e[t]=r(e[t],n,s):e[t]=n,e},e)}},Dt=String.prototype.replace,Wt=/%20/g,Bt={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ut=Ht.assign({default:Bt.RFC3986,formatters:{RFC1738:function(e){return Dt.call(e,Wt,"+")},RFC3986:function(e){return String(e)}}},Bt),Qt=Object.prototype.hasOwnProperty,qt={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},$t=Array.isArray,Vt=Array.prototype.push,Kt=Date.prototype.toISOString,zt=Ut.default,Jt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ht.encode,encodeValuesOnly:!1,format:zt,formatter:Ut.formatters[zt],indices:!1,serializeDate:function(e){return Kt.call(e)},skipNulls:!1,strictNullHandling:!1},Yt=Object.prototype.hasOwnProperty,Gt={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ht.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Zt={formats:Ut,parse:function(e,t){var n=function(e){if(!e)return Gt;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?Gt.charset:e.charset;return{allowDots:void 0===e.allowDots?Gt.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Gt.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Gt.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Gt.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Gt.comma,decoder:"function"==typeof e.decoder?e.decoder:Gt.decoder,delimiter:"string"==typeof e.delimiter||Ht.isRegExp(e.delimiter)?e.delimiter:Gt.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Gt.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Gt.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Gt.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Gt.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Gt.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=i.split(t.delimiter,a),o=-1,c=t.charset;if(t.charsetSentinel)for(n=0;n<s.length;++n)0===s[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[n]?c="utf-8":"utf8=%26%2310003%3B"===s[n]&&(c="iso-8859-1"),o=n,n=s.length);for(n=0;n<s.length;++n)if(n!==o){var u,l,h=s[n],d=h.indexOf("]="),f=-1===d?h.indexOf("="):d+1;(l=-1===f?(u=t.decoder(h,Gt.decoder,c),t.strictNullHandling?null:""):(u=t.decoder(h.slice(0,f),Gt.decoder,c),t.decoder(h.slice(f+1),Gt.decoder,c)))&&t.interpretNumericEntities&&"iso-8859-1"===c&&(l=l.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),l&&t.comma&&-1<l.indexOf(",")&&(l=l.split(",")),Yt.call(r,u)?r[u]=Ht.combine(r[u],l):r[u]=l}return r}(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),s=0;s<a.length;++s){var o=a[s],c=Et(o,r[o],n);i=Ht.merge(i,c,n)}return Ht.compact(i)},stringify:function(e,t){var n,r=e,i=function(e){if(!e)return Jt;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||Jt.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Ut.default;if(void 0!==e.format){if(!Qt.call(Ut.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=Ut.formatters[n],i=Jt.filter;return"function"!=typeof e.filter&&!$t(e.filter)||(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:Jt.addQueryPrefix,allowDots:void 0===e.allowDots?Jt.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Jt.charsetSentinel,delimiter:void 0===e.delimiter?Jt.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:Jt.encode,encoder:"function"==typeof e.encoder?e.encoder:Jt.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:Jt.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:Jt.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:Jt.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Jt.strictNullHandling}}(t);"function"==typeof i.filter?r=(0,i.filter)("",r):$t(i.filter)&&(n=i.filter);var a,s=[];if("object"!=typeof r||null===r)return"";a=t&&t.arrayFormat in qt?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var o=qt[a];n=n||Object.keys(r),i.sort&&n.sort(i.sort);for(var c=0;c<n.length;++c){var u=n[c];i.skipNulls&&null===r[u]||Ct(s,Tt(r[u],u,o,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.formatter,i.encodeValuesOnly,i.charset))}var l=s.join(i.delimiter),h=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),0<l.length?h+l:""}},Xt=function(){function u(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.windowTitle,n=e.writeDelay,r=void 0===n?400:n,i=e.createURL,a=void 0===i?kt:i,s=e.parseURL,o=void 0===s?Lt:s;k(this,u),M(this,"windowTitle",void 0),M(this,"writeDelay",void 0),M(this,"_createURL",void 0),M(this,"parseURL",void 0),M(this,"writeTimer",void 0),this.windowTitle=t,this.writeTimer=void 0,this.writeDelay=r,this._createURL=a,this.parseURL=o;var c=this.windowTitle&&this.windowTitle(this.read());Mt(c)}return L(u,[{key:"read",value:function(){return this.parseURL({qsModule:Zt,location:window.location})}},{key:"write",value:function(e){var t=this,n=this.createURL(e),r=this.windowTitle&&this.windowTitle(e);this.writeTimer&&window.clearTimeout(this.writeTimer),this.writeTimer=window.setTimeout(function(){Mt(r),window.history.pushState(e,r||"",n),t.writeTimer=void 0},this.writeDelay)}},{key:"onUpdate",value:function(n){var r=this;this._onPopState=function(e){r.writeTimer&&(window.clearTimeout(r.writeTimer),r.writeTimer=void 0);var t=e.state;n(t||r.read())},window.addEventListener("popstate",this._onPopState)}},{key:"createURL",value:function(e){return this._createURL({qsModule:Zt,routeState:e,location:window.location})}},{key:"dispose",value:function(){this._onPopState&&window.removeEventListener("popstate",this._onPopState),this.writeTimer&&window.clearTimeout(this.writeTimer),this.write({})}}]),u}();function en(e){return new Xt(e)}function tn(e){var t=0<arguments.length&&void 0!==e?e:{},n=t.router,a=void 0===n?en():n,r=t.stateMapping,s=void 0===r?It():r;return function(e){var r=e.instantSearchInstance;r._createURL=function(n){var e=Object.keys(n).reduce(function(e,t){return D({},e,M({},t,n[t]))},r.mainIndex.getWidgetUiState({})),t=s.stateToRoute(e);return a.createURL(t)},r._initialUiState=D({},r._initialUiState,{},s.routeToState(a.read()));var i=void 0;return{onStateChange:function(e){var t=e.uiState,n=s.stateToRoute(t);void 0!==i&&Ee(i,n)||(a.write(n),i=n)},subscribe:function(){a.onUpdate(function(e){r.setUiState(s.routeToState(e))})},unsubscribe:function(){a.dispose()}}}}function nn(){return"undefined"!=typeof window&&-1<window.navigator.userAgent.indexOf("Algolia Crawler")}function rn(){return function(e){var t=e.instantSearchInstance,n={widgets:[]},r=document.createElement("meta"),i=document.querySelector("head");return r.name="instantsearch:widgets",{onStateChange:function(){},subscribe:function(){setTimeout(function(){!function i(e,a,s){var t=a.mainIndex,o={instantSearchInstance:a,parent:t,scopedResults:[],state:t.getHelper().state,helper:t.getHelper(),createURL:t.createURL,uiState:a._initialUiState,renderState:a.renderState,templatesConfig:a.templatesConfig,searchMetadata:{isSearchStalled:a._isSearchStalled}};e.forEach(function(e){var t={};if(e.getWidgetRenderState){var n=e.getWidgetRenderState(o);n&&n.widgetParams&&(t=n.widgetParams)}var r=Object.keys(t).filter(function(e){return void 0!==t[e]});s.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:r}),"ais.index"===e.$$type&&i(e.getWidgets(),a,s)})}(t.mainIndex.getWidgets(),t,n),r.content=JSON.stringify(n),i.appendChild(r)},0)},unsubscribe:function(){var e;null===(e=r.parentNode)||void 0===e||e.removeChild(r)}}}}var an=Ze({name:"instantsearch"});function sn(){return"#"}function on(h,e){var d=1<arguments.length&&void 0!==e?e:Ne;return xe(h,un()),function(r){var e=r||{},t=e.includedAttributes,i=void 0===t?[]:t,n=e.excludedAttributes,a=void 0===n?["query"]:n,s=e.transformItems,o=void 0===s?function(e){return e}:s;if(r.includedAttributes&&r.excludedAttributes)throw new Error(un("The options `includedAttributes` and `excludedAttributes` cannot be used together."));function c(){return l.refine()}function u(){return l.createURL()}var l={refine:Ne,createURL:function(){return""},attributesToClear:[]};return{$$type:"ais.clearRefinements",init:function(e){var t=e.instantSearchInstance;h(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;h(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(){d()},getRenderState:function(e,t){return D({},e,{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,n=e.scopedResults;return l.attributesToClear=n.reduce(function(e,t){return e.concat(function(e){var t=e.scopedResult,n=e.includedAttributes,r=e.excludedAttributes,i=e.transformItems,a=-1!==n.indexOf("query")||-1===r.indexOf("query");return{helper:t.helper,items:i(he(Se(t.results,t.helper.state,a).map(function(e){return e.attribute}).filter(function(e){return 0===n.length||-1!==n.indexOf(e)}).filter(function(e){return"query"===e&&a||-1===r.indexOf(e)})))}}({scopedResult:t,includedAttributes:i,excludedAttributes:a,transformItems:o}))},[]),l.refine=function(){l.attributesToClear.forEach(function(e){var t=e.helper,n=e.items;t.setState(we({helper:t,attributesToClear:n})).search()})},l.createURL=function(){return t(Ye.apply(void 0,P(l.attributesToClear.map(function(e){return we({helper:e.helper,attributesToClear:e.items})}))))},{hasRefinements:l.attributesToClear.some(function(e){return 0<e.items.length}),refine:c,createURL:u,widgetParams:r}}}}}var cn=function(){function b(e){var n;k(this,b),M(H(n=W(this,O(b).call(this))),"client",void 0),M(H(n),"indexName",void 0),M(H(n),"insightsClient",void 0),M(H(n),"onStateChange",null),M(H(n),"helper",void 0),M(H(n),"mainHelper",void 0),M(H(n),"mainIndex",void 0),M(H(n),"started",void 0),M(H(n),"templatesConfig",void 0),M(H(n),"renderState",{}),M(H(n),"_stalledSearchDelay",void 0),M(H(n),"_searchStalledTimer",void 0),M(H(n),"_isSearchStalled",void 0),M(H(n),"_initialUiState",void 0),M(H(n),"_createURL",void 0),M(H(n),"_searchFunction",void 0),M(H(n),"_mainHelperSearch",void 0),M(H(n),"middleware",[]),M(H(n),"sendEventToInsights",void 0),M(H(n),"scheduleSearch",oe(function(){n.started&&n.mainHelper.search()})),M(H(n),"scheduleRender",oe(function(){n.mainHelper.hasPendingRequests()||(clearTimeout(n._searchStalledTimer),n._searchStalledTimer=null,n._isSearchStalled=!1),n.mainIndex.render({instantSearchInstance:H(n)}),n.emit("render")})),M(H(n),"onInternalStateChange",function(){var t=n.mainIndex.getWidgetUiState({});n.middleware.forEach(function(e){e.onStateChange({uiState:t})})});var t=e.indexName,r=void 0===t?null:t,i=e.numberLocale,a=e.initialUiState,s=void 0===a?{}:a,o=e.routing,c=void 0===o?null:o,u=e.searchFunction,l=e.stalledSearchDelay,h=void 0===l?200:l,d=e.searchClient,f=void 0===d?null:d,m=e.insightsClient,p=void 0===m?null:m,g=e.onStateChange,v=void 0===g?null:g;if(null===r)throw new Error(an("The `indexName` option is required."));if(null===f)throw new Error(an("The `searchClient` option is required."));if("function"!=typeof f.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof f.addAlgoliaAgent&&f.addAlgoliaAgent("instantsearch.js (".concat("4.13.2",")")),p&&"function"!=typeof p)throw new Error(an("The `insightsClient` option should be a function."));if(n.client=f,n.insightsClient=p,n.indexName=r,n.helper=null,n.mainHelper=null,n.mainIndex=ft({indexName:r}),n.onStateChange=v,n.started=!1,n.templatesConfig={helpers:function(e){var n=e.numberLocale;return{formatNumber:function(e,t){return Number(t(e)).toLocaleString(n)},highlight:function(e,t){try{return t(vt(D({},JSON.parse(e),{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{return t(bt(D({},JSON.parse(e),{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(St(D({},JSON.parse(e),{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{return t(Pt(D({},JSON.parse(e),{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var n=JSON.parse(e),r=n.method,i=n.payload;return t(xt(r,D({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}}({numberLocale:i}),compileOptions:{}},n._stalledSearchDelay=h,n._searchStalledTimer=null,n._isSearchStalled=!1,n._createURL=sn,n._initialUiState=s,u&&(n._searchFunction=u),n.sendEventToInsights=Ne,c){var y="boolean"==typeof c?void 0:c;n.use(tn(y))}return nn()&&n.use(rn()),n}return j(b,e),L(b,[{key:"use",value:function(){for(var n=this,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t.map(function(e){var t=e({instantSearchInstance:n});return n.middleware.push(t),t});return this.started&&i.forEach(function(e){e.subscribe()}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw new Error(an("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(an("The widget definition expects a `render` and/or an `init` method."));return this.mainIndex.addWidgets(e),this}},{key:"removeWidget",value:function(e){return this.removeWidgets([e])}},{key:"removeWidgets",value:function(e){if(!Array.isArray(e))throw new Error(an("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(e.some(function(e){return"function"!=typeof e.dispose}))throw new Error(an("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var r=this;if(this.started)throw new Error(an("The `start` method has already been called once."));var t=se(this.client,this.indexName);if(t.search=function(){return t.searchOnlyWithDerivedHelpers()},this._searchFunction){var i={search:function(){return new Promise(Ne)}};this._mainHelperSearch=t.search.bind(t),t.search=function(){var n=r.mainIndex.getHelper(),e=se(i,n.state.index,n.state);return e.once("search",function(e){var t=e.state;n.overrideStateWithoutTriggeringChangeEvent(t),r._mainHelperSearch()}),e.on("change",function(e){var t=e.state;n.setState(t)}),r._searchFunction(e),t}}t.on("error",function(e){var t=e.error;r.emit("error",{error:t})}),this.mainHelper=t,this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this.middleware.forEach(function(e){e.subscribe()}),t.search(),this.helper=this.mainIndex.getHelper(),this.started=!0}},{key:"dispose",value:function(){this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),this.mainHelper.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){e._isSearchStalled=!0,e.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(e){if(!this.mainHelper)throw new Error(an("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;!function e(t){t.getHelper().overrideStateWithoutTriggeringChangeEvent(t.getWidgetSearchParameters(t.getHelper().state,{uiState:n[t.getIndexId()]})),t.getWidgets().filter(ut).forEach(e)}(this.mainIndex),this.scheduleSearch(),this.onInternalStateChange()}},{key:"createURL",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};if(!this.started)throw new Error(an("The `start` method needs to be called before `createURL`."));return this._createURL(t)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(an("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),b}(),un=Ze({name:"clear-refinements",connector:!0});function ln(r,e){var i=1<arguments.length&&void 0!==e?e:Ne;return xe(r,hn()),function(a){if((a||{}).includedAttributes&&(a||{}).excludedAttributes)throw new Error(hn("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var e=a||{},s=e.includedAttributes,t=e.excludedAttributes,o=void 0===t?["query"]:t,n=e.transformItems,c=void 0===n?function(e){return e}:n;return{$$type:"ais.currentRefinements",init:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(){i()},getRenderState:function(e,t){return D({},e,{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.scopedResults,r=e.createURL,i=e.helper;return{items:t?n.reduce(function(e,t){return e.concat(c(dn({results:t.results,helper:t.helper,includedAttributes:s,excludedAttributes:o})))},[]):c(dn({results:{},helper:i,includedAttributes:s,excludedAttributes:o})),refine:function(e){return mn(i,e)},createURL:function(e){return r(fn(i.state,e))},widgetParams:a}}}}}var hn=Ze({name:"current-refinements",connector:!0});function dn(e){var t=e.results,n=e.helper,r=e.includedAttributes,i=e.excludedAttributes,a=-1!==(r||[]).indexOf("query")||-1===(i||[]).indexOf("query"),s=r?function(e){return-1!==r.indexOf(e.attribute)}:function(e){return-1===i.indexOf(e.attribute)},o=Se(t,n.state,a).map(pn).filter(s);return o.reduce(function(e,t){return[].concat(P(e.filter(function(e){return e.attribute!==t.attribute})),[{indexName:n.state.index,attribute:t.attribute,label:t.attribute,refinements:o.filter(function(e){return e.attribute===t.attribute}).sort(function(e,t){return"numeric"===e.type?e.value-t.value:0}),refine:function(e){return mn(n,e)}}])},[])}function fn(e,t){switch(t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function mn(e,t){e.setState(fn(e.state,t)).search()}function pn(e){var t="numeric"===e.type?Number(e.name):e.name,n=e.operator?"".concat(function(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}(e.operator)," ").concat(e.name):e.name,r={attribute:e.attribute,type:e.type,value:t,label:n};return void 0!==e.operator&&(r.operator=e.operator),void 0!==e.count&&(r.count=e.count),void 0!==e.exhaustive&&(r.exhaustive=e.exhaustive),r}var gn=Ze({name:"hierarchical-menu",connector:!0});function vn(w){var P=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(w,gn()),function(){var c=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},u=c.attributes,e=c.separator,l=void 0===e?" > ":e,t=c.rootPath,h=void 0===t?null:t,n=c.showParentLevel,d=void 0===n||n,r=c.limit,f=void 0===r?10:r,i=c.showMore,m=void 0!==i&&i,a=c.showMoreLimit,p=void 0===a?20:a,s=c.sortBy,g=void 0===s?["name:asc"]:s,o=c.transformItems,v=void 0===o?function(e){return e}:o;if(!u||!Array.isArray(u)||0===u.length)throw new Error(gn("The `attributes` option expects an array of strings."));if(!0===m&&p<=f)throw new Error(gn("The `showMoreLimit` option must be greater than `limit`."));var y,b=B(u,1)[0],R=function(){};function S(){R()}return{$$type:"ais.hierarchicalMenu",isShowingMore:!1,createToggleShowMore:function(e){var t=this;return function(){t.isShowingMore=!t.isShowingMore,t.render(e)}},getLimit:function(){return this.isShowingMore?p:f},init:function(e){var t=e.instantSearchInstance;w(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},_prepareFacetValues:function(e){var i=this;return e.slice(0,this.getLimit()).map(function(e){var t=e.name,n=e.path,r=A(e,["name","path"]);return Array.isArray(r.data)&&(r.data=i._prepareFacetValues(r.data)),D({},r,{label:t,value:n})})},render:function(e){var t=e.instantSearchInstance;R=this.createToggleShowMore(e),w(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return P(),t.removeHierarchicalFacet(b).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return D({},e,{hierarchicalMenu:D({},e.hierarchicalMenu,M({},b,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,r=e.state,i=e.createURL,a=e.instantSearchInstance,s=e.helper;y=y||rt({instantSearchInstance:a,helper:s,attribute:b,widgetType:this.$$type}),this._refine||(this._refine=function(e){y("click",e),s.toggleRefinement(b,e).search()});var o=n&&n.getFacetValues(b,{sortBy:g}).data||[];return{items:v(n?this._prepareFacetValues(o):[]),refine:this._refine,createURL:function(e){return i(r.toggleRefinement(b,e))},sendEvent:y,widgetParams:c,isShowingMore:this.isShowingMore,toggleShowMore:S,canToggleShowMore:m&&(this.isShowingMore||!function(){if(!n)return!1;var e=t.getLimit();return r.maxValuesPerFacet>e?o.length<=e:o.length<e}())}},getWidgetUiState:function(e,t){var n=t.searchParameters.getHierarchicalFacetBreadcrumb(b);return n.length?D({},e,{hierarchicalMenu:D({},e.hierarchicalMenu,M({},b,n))}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=n.hierarchicalMenu&&n.hierarchicalMenu[b];if(e.isHierarchicalFacet(b))e.getHierarchicalFacetByName(b);var i=e.removeHierarchicalFacet(b).addHierarchicalFacet({name:b,attributes:u,separator:l,rootPath:h,showParentLevel:d}),a=i.maxValuesPerFacet||0,s=Math.max(a,m?p:f),o=i.setQueryParameter("maxValuesPerFacet",s);return r?o.addHierarchicalFacetRefinement(b,r.join(l)):o.setQueryParameters({hierarchicalFacetsRefinements:D({},o.hierarchicalFacetsRefinements,M({},b,[]))})}}}}function yn(r,e){var i=1<arguments.length&&void 0!==e?e:Ne;return xe(r,Rn()),function(a){var s,o,e=a||{},t=e.escapeHTML,c=void 0===t||t,n=e.transformItems,u=void 0===n?function(e){return e}:n;return{$$type:"ais.hits",init:function(e){r(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);t.sendEvent("view",t.hits),r(D({},t,{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return D({},e,{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.instantSearchInstance;if(s=s||at({instantSearchInstance:r,index:n.getIndex(),widgetType:this.$$type}),o=o||st({index:n.getIndex(),widgetType:this.$$type}),!t)return{hits:[],results:void 0,sendEvent:s,bindEvent:o,widgetParams:a};c&&0<t.hits.length&&(t.hits=Ue(t.hits));var i=t.hits.__escaped;return t.hits=tt(t.hits,t.page,t.hitsPerPage),t.hits=nt(t.hits,t.queryID),t.hits=u(t.hits),t.hits.__escaped=i,{hits:t.hits,results:t,sendEvent:s,bindEvent:o,widgetParams:a}},dispose:function(e){var t=e.state;return i(),c?t.setQueryParameters(Object.keys(He).reduce(function(e,t){return D({},e,M({},t,void 0))},{})):t},getWidgetSearchParameters:function(e){return c?e.setQueryParameters(He):e}}}}function bn(e){var t=e.method,n=e.results,r=e.hits,i=e.objectIDs,a=n.index,s=function(n,e){return e.map(function(t){var e=ye(n,function(e){return e.objectID===t});if(void 0===e)throw new Error('Could not find objectID "'.concat(t,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return e})}(r,i),o=function(e){var t=he(e.map(function(e){return e.__queryID}));if(1<t.length)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var n=t[0];if("string"!=typeof n)throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return n}(s);switch(t){case"clickedObjectIDsAfterSearch":return{index:a,queryID:o,objectIDs:i,positions:function(e){return e.map(function(e){return e.__position})}(s)};case"convertedObjectIDsAfterSearch":return{index:a,queryID:o,objectIDs:i};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}}var Rn=Ze({name:"hits",connector:!0});function Sn(n){function r(s){return function(e,t){var n=e.results,r=e.hits,i=e.instantSearchInstance;if(n&&r&&i){var a=function(i,a,s){return function(e,t){if(!i){var n=Ze({name:"instantsearch"});throw new Error(n("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(t.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var r=bn({method:e,results:a,hits:s,objectIDs:t.objectIDs});i(e,D({},r,{},t))}}(i.insightsClient,n,r);return s(D({},e,{insights:a}),t)}return s(e,t)}}return function(e,t){return n(r(e),t)}}var wn,Pn,xn,Nn,_n,In={},Fn=[],Cn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;function Tn(e,t){for(var n in t)e[n]=t[n];return e}function En(e){var t=e.parentNode;t&&t.removeChild(e)}function kn(e,t,n){var r,i,a,s,o=arguments;if(t=Tn({},t),3<arguments.length)for(n=[n],r=3;r<arguments.length;r++)n.push(o[r]);if(null!=n&&(t.children=n),null!=e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===t[i]&&(t[i]=e.defaultProps[i]);return s=t.key,null!=(a=t.ref)&&delete t.ref,null!=s&&delete t.key,Ln(e,t,s,a)}function Ln(e,t,n,r){var i={type:e,props:t,key:n,ref:r,__k:null,__p:null,__b:0,__e:null,l:null,__c:null,constructor:void 0};return wn.vnode&&wn.vnode(i),i}function Mn(e){return e.children}function jn(e,t){this.props=e,this.context=t}function On(e,t){if(null==t)return e.__p?On(e.__p,e.__p.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?On(e):null}function An(e){var t,n;if(null!=(e=e.__p)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return An(e)}}function Hn(e){(!e.__d&&(e.__d=!0)&&1===Pn.push(e)||Nn!==wn.debounceRendering)&&(Nn=wn.debounceRendering,(wn.debounceRendering||xn)(Dn))}function Dn(){var e,t,n,r,i,a,s,o;for(Pn.sort(function(e,t){return t.__v.__b-e.__v.__b});e=Pn.pop();)e.__d&&(r=n=void 0,a=(i=(t=e).__v).__e,s=t.__P,o=t.u,t.u=!1,s&&(n=[],r=$n(s,i,Tn({},i),t.__n,void 0!==s.ownerSVGElement,null,n,o,null==a?On(i):a),Vn(n,i),r!=a&&An(i)))}function Wn(t,n,e,r,i,a,s,o,c){var u,l,h,d,f,m,p,g=e&&e.__k||Fn,v=g.length;if(o==In&&(o=null!=a?a[0]:v?On(e,0):null),u=0,n.__k=Bn(n.__k,function(e){if(null!=e){if(e.__p=n,e.__b=n.__b+1,null===(h=g[u])||h&&e.key==h.key&&e.type===h.type)g[u]=void 0;else for(l=0;l<v;l++){if((h=g[l])&&e.key==h.key&&e.type===h.type){g[l]=void 0;break}h=null}if(d=$n(t,e,h=h||In,r,i,a,s,null,o,c),(l=e.ref)&&h.ref!=l&&(p=p||[]).push(l,e.__c||d,e),null!=d){if(null==m&&(m=d),null!=e.l)d=e.l,e.l=null;else if(a==h||d!=o||null==d.parentNode){e:if(null==o||o.parentNode!==t)t.appendChild(d);else{for(f=o,l=0;(f=f.nextSibling)&&l<v;l+=2)if(f==d)break e;t.insertBefore(d,o)}"option"==n.type&&(t.value="")}o=d.nextSibling,"function"==typeof n.type&&(n.l=d)}}return u++,e}),n.__e=m,null!=a&&"function"!=typeof n.type)for(u=a.length;u--;)null!=a[u]&&En(a[u]);for(u=v;u--;)null!=g[u]&&zn(g[u],g[u]);if(p)for(u=0;u<p.length;u++)Kn(p[u],p[++u],p[++u])}function Bn(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)Bn(e[r],t,n);else n.push(t?t(function(e){if(null==e||"boolean"==typeof e)return null;if("string"==typeof e||"number"==typeof e)return Ln(null,e,null,null);if(null==e.__e&&null==e.__c)return e;var t=Ln(e.type,e.props,e.key,null);return t.__e=e.__e,t}(e)):e);return n}function Un(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===Cn.test(t)?n+"px":null==n?"":n}function Qn(e,t,n,r,i){var a,s,o,c,u;if("key"===(t=i?"className"===t?"class":t:"class"===t?"className":t)||"children"===t);else if("style"===t)if(a=e.style,"string"==typeof n)a.cssText=n;else{if("string"==typeof r&&(a.cssText="",r=null),r)for(s in r)n&&s in n||Un(a,s,"");if(n)for(o in n)r&&n[o]===r[o]||Un(a,o,n[o])}else"o"===t[0]&&"n"===t[1]?(c=t!==(t=t.replace(/Capture$/,"")),t=((u=t.toLowerCase())in e?u:t).slice(2),n?(r||e.addEventListener(t,qn,c),(e.t||(e.t={}))[t]=n):e.removeEventListener(t,qn,c)):"list"!==t&&"tagName"!==t&&"form"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n?e.removeAttribute(t):e.setAttribute(t,n))}function qn(e){return this.t[e.type](wn.event?wn.event(e):e)}function $n(e,t,n,r,i,a,s,o,c,u){var l,h,d,f,m,p,g,v,y,b,R=t.type;if(void 0!==t.constructor)return null;(l=wn.__b)&&l(t);try{e:if("function"==typeof R){if(v=t.props,y=(l=R.contextType)&&r[l.__c],b=l?y?y.props.value:l.__p:r,n.__c?g=(h=t.__c=n.__c).__p=h.__E:("prototype"in R&&R.prototype.render?t.__c=h=new R(v,b):(t.__c=h=new jn(v,b),h.constructor=R,h.render=Jn),y&&y.sub(h),h.props=v,h.state||(h.state={}),h.context=b,h.__n=r,d=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=R.getDerivedStateFromProps&&Tn(h.__s==h.state?h.__s=Tn({},h.__s):h.__s,R.getDerivedStateFromProps(v,h.__s)),d)null==R.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&s.push(h);else{if(null==R.getDerivedStateFromProps&&null==o&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,b),!o&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,b)){for(h.props=v,h.state=h.__s,h.__d=!1,(h.__v=t).__e=null!=c?c!==n.__e?c:n.__e:null,t.__k=n.__k,l=0;l<t.__k.length;l++)t.__k[l]&&(t.__k[l].__p=t);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,b)}for(f=h.props,m=h.state,h.context=b,h.props=v,h.state=h.__s,(l=wn.__r)&&l(t),h.__d=!1,h.__v=t,h.__P=e,l=h.render(h.props,h.state,h.context),t.__k=Bn(null!=l&&l.type==Mn&&null==l.key?l.props.children:l),null!=h.getChildContext&&(r=Tn(Tn({},r),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(p=h.getSnapshotBeforeUpdate(f,m)),Wn(e,t,n,r,i,a,s,c,u),h.base=t.__e;l=h.__h.pop();)h.__s&&(h.state=h.__s),l.call(h);d||null==f||null==h.componentDidUpdate||h.componentDidUpdate(f,m,p),g&&(h.__E=h.__p=null)}else t.__e=function(e,t,n,r,i,a,s,o){var c,u,l,h,d=n.props,f=t.props;if(i="svg"===t.type||i,null==e&&null!=a)for(c=0;c<a.length;c++)if(null!=(u=a[c])&&(null===t.type?3===u.nodeType:u.localName===t.type)){e=u,a[c]=null;break}if(null==e){if(null===t.type)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type),a=null}return null===t.type?d!==f&&(null!=a&&(a[a.indexOf(e)]=null),e.data=f):t!==n&&(null!=a&&(a=Fn.slice.call(e.childNodes)),l=(d=n.props||In).dangerouslySetInnerHTML,h=f.dangerouslySetInnerHTML,o||(h||l)&&(h&&l&&h.__html==l.__html||(e.innerHTML=h&&h.__html||"")),function(e,t,n,r,i){var a;for(a in n)a in t||Qn(e,a,null,n[a],r);for(a in t)i&&"function"!=typeof t[a]||"value"===a||"checked"===a||n[a]===t[a]||Qn(e,a,t[a],n[a],r)}(e,f,d,i,o),t.__k=t.props.children,h||Wn(e,t,n,r,"foreignObject"!==t.type&&i,a,s,In,o),o||("value"in f&&void 0!==f.value&&f.value!==e.value&&(e.value=null==f.value?"":f.value),"checked"in f&&void 0!==f.checked&&f.checked!==e.checked&&(e.checked=f.checked))),e}(n.__e,t,n,r,i,a,s,u);(l=wn.diffed)&&l(t)}catch(e){wn.__e(e,t,n)}return t.__e}function Vn(e,t){for(var n;n=e.pop();)try{n.componentDidMount()}catch(e){wn.__e(e,n.__v)}wn.__c&&wn.__c(t)}function Kn(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){wn.__e(e,n)}}function zn(e,t,n){var r,i,a;if(wn.unmount&&wn.unmount(e),(r=e.ref)&&Kn(r,null,t),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.l=null,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){wn.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&zn(r[a],t,n);null!=i&&En(i)}function Jn(e,t,n){return this.constructor(e,n)}function Yn(e,t,n){var r,i,a;wn.__p&&wn.__p(e,t),i=(r=n===_n)?null:n&&n.__k||t.__k,e=kn(Mn,null,[e]),a=[],$n(t,r?t.__k=e:(n||t).__k=e,i||In,In,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:Fn.slice.call(t.childNodes),a,!1,n||In,r),Vn(a,e)}wn={},jn.prototype.setState=function(e,t){var n=this.__s!==this.state&&this.__s||(this.__s=Tn({},this.state));"function"==typeof e&&!(e=e(n,this.props))||Tn(n,e),null!=e&&this.__v&&(this.u=!1,t&&this.__h.push(t),Hn(this))},jn.prototype.forceUpdate=function(e){this.__v&&(e&&this.__h.push(e),this.u=!0,Hn(this))},jn.prototype.render=Mn,Pn=[],xn="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Nn=wn.debounceRendering,wn.__e=function(e,t,n){for(var r;t=t.__p;)if((r=t.__c)&&!r.__p)try{if(r.constructor&&null!=r.constructor.getDerivedStateFromError)r.setState(r.constructor.getDerivedStateFromError(e));else{if(null==r.componentDidCatch)continue;r.componentDidCatch(e)}return Hn(r.__E=r)}catch(t){e=t}throw e},_n=In;function Gn(e,t,n){for(var r=e;r&&!n(r);){if(r===t)return null;r=r.parentElement}return r}function Zn(e){return function(o){return kn("div",{onClick:function(e){if(o.sendEvent){var t=Gn(e.target,e.currentTarget,function(e){return e.hasAttribute("data-insights-event")});if(t){var n=function(e){var t=e.getAttribute("data-insights-event");if("string"!=typeof t)throw new Error("The insights middleware expects `data-insights-event` to be a base64-encoded JSON string.");try{return JSON.parse(atob(t))}catch(e){throw new Error("The insights middleware was unable to parse `data-insights-event`.")}}(t);o.sendEvent(n)}}var r=Gn(e.target,e.currentTarget,function(e){return function(e){return e.hasAttribute("data-insights-method")}(e)});if(r){var i=function(e){var t=e.getAttribute("data-insights-method"),n=e.getAttribute("data-insights-payload");if("string"!=typeof n)throw new Error("The insights helper expects `data-insights-payload` to be a base64-encoded JSON string.");try{return{method:t,payload:JSON.parse(atob(n))}}catch(e){throw new Error("The insights helper was unable to parse `data-insights-payload`.")}}(r),a=i.method,s=i.payload;o.insights(a,s)}}},kn(e,o))}}function Xn(l,e){var h=1<arguments.length&&void 0!==e?e:Ne;return xe(l,tr()),function(a){var e=a||{},t=e.items,n=e.transformItems,s=void 0===n?function(e){return e}:n,o=t;if(!Array.isArray(o))throw new Error(tr("The `items` option expects an array of objects."));var r=o.filter(function(e){return!0===e.default});if(0===r.length)throw new Error(tr("A default value must be specified in `items`."));if(1<r.length)throw new Error(tr("More than one default value is specified in `items`."));var i=r[0],c=function(t){return function(e){return e||0===e?t.setQueryParameter("hitsPerPage",e).search():t.setQueryParameter("hitsPerPage",void 0).search()}},u=function(e){var t=e.state,n=e.createURL;return function(e){return n(t.setQueryParameter("hitsPerPage",e||0===e?e:void 0))}};return{$$type:"ais.hitsPerPage",init:function(e){var t=e.state,n=e.instantSearchInstance;o.some(function(e){return Number(t.hitsPerPage)===Number(e.value)})||(o=[{value:"",label:""}].concat(P(o))),l(D({},this.getWidgetRenderState(e),{instantSearchInstance:n}),!0)},render:function(e){var t=e.instantSearchInstance;l(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return h(),t.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return D({},e,{hitsPerPage:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.state,n=e.results,r=e.createURL,i=e.helper;return{items:s(function(e){var t=e.hitsPerPage;return o.map(function(e){return D({},e,{isRefined:Number(e.value)===Number(t)})})}(t)),refine:c(i),createURL:u({state:t,createURL:r}),hasNoResults:!n||0===n.nbHits,widgetParams:a}},getWidgetUiState:function(e,t){var n=t.searchParameters.hitsPerPage;return void 0===n||n===i.value?e:D({},e,{hitsPerPage:n})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameters({hitsPerPage:n.hitsPerPage||i.value})}}}}var er=Sn(yn),tr=Ze({name:"hits-per-page",connector:!0}),nr=Ze({name:"infinite-hits",connector:!0});function rr(e){var t=e||{};t.page;return A(t,["page"])}function ir(i,e){var a=1<arguments.length&&void 0!==e?e:Ne;return xe(i,nr()),function(f){function m(e,t){var n=e.page,r=void 0===n?0:n,i=Object.keys(t).map(Number);return 0===i.length?r:Math.min.apply(Math,[r].concat(P(i)))}function p(e,t){var n=e.page,r=void 0===n?0:n,i=Object.keys(t).map(Number);return 0===i.length?r:Math.max.apply(Math,[r].concat(P(i)))}var g,v,y,b,e=f||{},t=e.escapeHTML,R=void 0===t||t,n=e.transformItems,S=void 0===n?function(e){return e}:n,r=e.cache,w=void 0===r?function(){var r=null,i=void 0;return{read:function(e){var t=e.state;return Ee(i,rr(t))?r:null},write:function(e){var t=e.state,n=e.hits;i=rr(t),r=n}}}():r;return{$$type:"ais.infiniteHits",init:function(e){i(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=e.instantSearchInstance,n=this.getWidgetRenderState(e);y("view",n.currentPageHits),i(D({},n,{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return D({},e,{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n=e.results,r=e.helper,i=e.state,a=e.instantSearchInstance,s=[],o=w.read({state:i})||{};if(n){var c=i.page,u=void 0===c?0:c;R&&0<n.hits.length&&(n.hits=Ue(n.hits));var l=n.hits.__escaped;n.hits=tt(n.hits,n.page,n.hitsPerPage),n.hits=nt(n.hits,n.queryID),n.hits=S(n.hits),n.hits.__escaped=l,void 0===o[u]&&(o[u]=n.hits,w.write({state:i,hits:o})),s=n.hits,t=0===m(i,o)}else g=function(e,t){return function(){e.overrideStateWithoutTriggeringChangeEvent(D({},e.state,{page:m(e.state,t)-1})).searchWithoutTriggeringOnStateChange()}}(r,o),v=function(e,t){return function(){e.setPage(p(e.state,t)+1).search()}}(r,o),y=at({instantSearchInstance:a,index:r.getIndex(),widgetType:this.$$type}),b=st({index:r.getIndex(),widgetType:this.$$type}),t=void 0===r.state.page||0===m(r.state,o);var h=function(n){return Object.keys(n).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(n[t])},[])}(o),d=!n||n.nbPages<=p(i,o)+1;return{hits:h,currentPageHits:s,sendEvent:y,bindEvent:b,results:n,showPrevious:g,showMore:v,isFirstPage:t,isLastPage:d,widgetParams:f}},dispose:function(e){var t=e.state;a();var n=t.setQueryParameter("page",void 0);return R?n.setQueryParameters(Object.keys(He).reduce(function(e,t){return D({},e,M({},t,void 0))},{})):n},getWidgetUiState:function(e,t){var n=t.searchParameters.page||0;return n?D({},e,{page:n+1}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=e;R&&(r=e.setQueryParameters(He));var i=n.page?n.page-1:0;return r.setQueryParameter("page",i)}}}}var ar=Sn(ir),sr=Ze({name:"menu",connector:!0});function or(a){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(a,sr()),function(){var u,l=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},h=l.attribute,e=l.limit,c=void 0===e?10:e,t=l.showMore,d=void 0!==t&&t,n=l.showMoreLimit,f=void 0===n?20:n,r=l.sortBy,m=void 0===r?["isRefined","name:asc"]:r,i=l.transformItems,p=void 0===i?function(e){return e}:i;if(!h)throw new Error(sr("The `attribute` option is required."));if(!0===d&&f<=c)throw new Error(sr("The `showMoreLimit` option must be greater than `limit`."));var g=function(){};function v(){g()}return{$$type:"ais.menu",isShowingMore:!1,createToggleShowMore:function(e){var t=this,n=e.results,r=e.instantSearchInstance;return function(){t.isShowingMore=!t.isShowingMore,t.render({results:n,instantSearchInstance:r})}},getLimit:function(){return this.isShowingMore?f:c},init:function(e){var t=e.instantSearchInstance;a(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;a(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return s(),t.removeHierarchicalFacet(h).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return D({},e,{menu:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.createURL,r=e.instantSearchInstance,i=e.helper,a=[],s=!1;if(u=u||rt({instantSearchInstance:r,helper:i,attribute:h,widgetType:this.$$type}),this._createURL||(this._createURL=function(e){return n(i.state.toggleRefinement(h,e))}),this._refine||(this._refine=function(e){var t=B(i.getHierarchicalFacetBreadcrumb(h),1)[0];u("click",e||t),i.toggleRefinement(h,e||t).search()}),g=this.createToggleShowMore({results:t,instantSearchInstance:r}),t){var o=t.getFacetValues(h,{sortBy:m}),c=o&&o.data?o.data:[];s=d&&(this.isShowingMore||c.length>this.getLimit()),a=p(c.slice(0,this.getLimit()).map(function(e){var t=e.name,n=e.path;return D({},A(e,["name","path"]),{label:t,value:n})}))}return{items:a,createURL:this._createURL,refine:this._refine,sendEvent:u,canRefine:0<a.length,widgetParams:l,isShowingMore:this.isShowingMore,toggleShowMore:v,canToggleShowMore:s}},getWidgetUiState:function(e,t){var n=B(t.searchParameters.getHierarchicalFacetBreadcrumb(h),1)[0];return n?D({},e,{menu:D({},e.menu,M({},h,n))}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=n.menu&&n.menu[h],i=e.removeHierarchicalFacet(h).addHierarchicalFacet({name:h,attributes:[h]}),a=i.maxValuesPerFacet||0,s=Math.max(a,d?f:c),o=i.setQueryParameter("maxValuesPerFacet",s);return r?o.addHierarchicalFacetRefinement(h,r):o.setQueryParameters({hierarchicalFacetsRefinements:D({},o.hierarchicalFacetsRefinements,M({},h,[]))})}}}}function cr(i,e){var a=1<arguments.length&&void 0!==e?e:Ne;return xe(i,ur()),function(s){var e=s||{},t=e.attribute,u=void 0===t?"":t,n=e.items,o=void 0===n?[]:n,r=e.transformItems,c=void 0===r?function(e){return e}:r;if(""===u)throw new Error(ur("The `attribute` option is required."));if(!o||0===o.length)throw new Error(ur("The `items` option expects an array of objects."));var l={};return{$$type:lr,init:function(e){var t=e.instantSearchInstance;i(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;i(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return a(),t.clearRefinements(u)},getWidgetUiState:function(e,t){var n=t.searchParameters.getNumericRefinements(u),r=n["="]&&n["="][0];if(r||0===r)return D({},e,{numericMenu:D({},e.numericMenu,M({},u,"".concat(n["="])))});var i=n[">="]&&n[">="][0]||"",a=n["<="]&&n["<="][0]||"";return""===i&&""===a?e:D({},e,{numericMenu:D({},e.numericMenu,M({},u,"".concat(i,":").concat(a)))})},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=n.numericMenu&&n.numericMenu[u],i=e.clearRefinements(u);if(!r)return i.setQueryParameters({numericRefinements:D({},i.numericRefinements,M({},u,{}))});if(-1===r.indexOf(":"))return i.addNumericRefinement(u,"=",Number(r));var a=B(r.split(":").map(parseFloat),2),s=a[0],o=a[1],c=Ie(s)?i.addNumericRefinement(u,">=",s):i;return Ie(o)?c.addNumericRefinement(u,"<=",o):c},getRenderState:function(e,t){return D({},e,{numericMenu:D({},e.numericMenu,M({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.results,n=e.state,r=e.instantSearchInstance,i=e.helper,a=e.createURL;return l.refine||(l.refine=function(e){var t=dr(i.state,u,e);l.sendEvent("click",e),i.setState(t).search()}),l.createURL||(l.createURL=function(t){return function(e){return a(dr(t,u,e))}}),l.sendEvent||(l.sendEvent=function(e){var c=e.instantSearchInstance,u=e.helper,l=e.attribute;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1!==t.length){var r=t[0],i=t[1],a=t[2],s=void 0===a?"Filter Applied":a;if("click"===r){var o=ot(dr(u.state,l,i),l);o&&0<o.length&&c.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:lr,eventType:r,payload:{eventName:s,index:u.getIndex(),filters:o}})}}else c.sendEventToInsights(t[0])}}({instantSearchInstance:r,helper:i,attribute:u})),{createURL:l.createURL(n),items:c(function(i){return o.map(function(e){var t=e.start,n=e.end,r=e.label;return{label:r,value:window.encodeURI(JSON.stringify({start:t,end:n})),isRefined:hr(i,u,{start:t,end:n,label:r})}})}(n)),hasNoResults:!t||0===t.nbHits,refine:l.refine,sendEvent:l.sendEvent,widgetParams:s}}}}}var ur=Ze({name:"numeric-menu",connector:!0}),lr="ais.numericMenu";function hr(e,t,n){var r=e.getNumericRefinements(t);return void 0!==n.start&&void 0!==n.end&&n.start===n.end?fr(r,"=",n.start):void 0!==n.start?fr(r,">=",n.start):void 0!==n.end?fr(r,"<=",n.end):void 0===n.start&&void 0===n.end&&Object.keys(r).every(function(e){return 0===(r[e]||[]).length})}function dr(e,t,n){var r=e,i=JSON.parse(window.decodeURI(n)),a=r.getNumericRefinements(t);if(void 0===i.start&&void 0===i.end)return r.removeNumericRefinement(t);if(hr(r,t,i)||(r=r.removeNumericRefinement(t)),void 0!==i.start&&void 0!==i.end){if(i.start>i.end)throw new Error("option.start should be > to option.end");if(i.start===i.end)return r=fr(a,"=",i.start)?r.removeNumericRefinement(t,"=",i.start):r.addNumericRefinement(t,"=",i.start)}return void 0!==i.start&&(r=fr(a,">=",i.start)?r.removeNumericRefinement(t,">=",i.start):r.addNumericRefinement(t,">=",i.start)),void 0!==i.end&&(r=fr(a,"<=",i.end)?r.removeNumericRefinement(t,"<=",i.end):r.addNumericRefinement(t,"<=",i.end)),"number"==typeof r.page&&(r.page=0),r}function fr(e,t,n){return void 0!==e[t]&&e[t].includes(n)}function mr(n,e){var r=1<arguments.length&&void 0!==e?e:Ne;return xe(n,gr()),function(o){var e=o||{},c=e.totalPages,t=e.padding,u=new pr({currentPage:0,total:0,padding:void 0===t?3:t}),l={};return{$$type:"ais.pagination",init:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return r(),t.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){var n=t.searchParameters.page||0;return n?D({},e,{page:n+1}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=n.page?n.page-1:0;return e.setQueryParameter("page",r)},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.createURL;l.refine||(l.refine=function(e){n.setPage(e),n.search()}),l.createURL||(l.createURL=function(t){return function(e){return r(t.setPage(e))}});var i=n.state,a=i.page||0,s=function(e){var t=e.nbPages;return void 0!==c?Math.min(c,t):t}(t||{nbPages:0});return u.currentPage=a,u.total=s,{createURL:l.createURL(i),refine:l.refine,currentRefinement:a,nbHits:(null==t?void 0:t.nbHits)||0,nbPages:s,pages:t?u.pages():[],isFirstPage:u.isFirstPage(),isLastPage:u.isLastPage(),widgetParams:o}},getRenderState:function(e,t){return D({},e,{pagination:this.getWidgetRenderState(t)})}}}}var pr=function(){function t(e){k(this,t),M(this,"currentPage",void 0),M(this,"total",void 0),M(this,"padding",void 0),this.currentPage=e.currentPage,this.total=e.total,this.padding=e.padding}return L(t,[{key:"pages",value:function(){var e=this.total,t=this.currentPage,n=this.padding;if(0===e)return[0];var r=this.nbPagesDisplayed(n,e);if(r===e)return Ce({end:e});var i=this.calculatePaddingLeft(t,n,e,r);return Ce({start:t-i,end:t+(r-i)})}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,n,r){return e<=t?e:n-t<=e?r-(n-e):t}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1||0===this.total}},{key:"isFirstPage",value:function(){return 0===this.currentPage}}]),t}(),gr=Ze({name:"pagination",connector:!0}),vr=Ze({name:"range-input",connector:!0},{name:"range-slider",connector:!0}),yr="ais.range";function br(e){var t=e.min,n=e.max,r=e.precision,i=Math.pow(10,r);return{min:t?Math.floor(t*i)/i:t,max:n?Math.ceil(n*i)/i:n}}function Rr(n,e){var r=1<arguments.length&&void 0!==e?e:Ne;return xe(n,vr()),function(o){var e=o||{},w=e.attribute,P=e.min,x=e.max,t=e.precision,N=void 0===t?0:t;if(!w)throw new Error(vr("The `attribute` option is required."));if(Ie(P)&&Ie(x)&&x<P)throw new Error(vr("The `max` option can't be lower than `min`."));function f(e,t,n,r){var i,a,s=e.state,o=t.min,c=t.max,u=B(s.getNumericRefinement(w,">=")||[],1)[0],l=B(s.getNumericRefinement(w,"<=")||[],1)[0],h=void 0===n||""===n,d=void 0===r||""===r,f=br({min:h?void 0:parseFloat(n),max:d?void 0:parseFloat(r),precision:N}),m=f.min,p=f.max;i=Ie(P)||o!==m?Ie(P)&&h?P:m:void 0,a=Ie(x)||c!==p?Ie(x)&&d?x:p:void 0;var g=void 0===i,v=Ie(o)&&o<=i,y=g||Ie(i)&&(!Ie(o)||v),b=void 0===a,R=Ie(a)&&a<=c,S=b||Ie(a)&&(!Ie(c)||R);return(u!==i||l!==a)&&y&&S?(s=s.removeNumericRefinement(w),Ie(i)&&(s=s.addNumericRefinement(w,">=",i)),Ie(a)&&(s=s.addNumericRefinement(w,"<=",a)),s):null}function m(e,t,n,r){var i=3<arguments.length&&void 0!==r?r:"Filter Applied",a=ot(e,w);a&&0<a.length&&t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:yr,eventType:"click",payload:{eventName:i,index:n.getIndex(),filters:a}})}var c={from:function(e){return e.toLocaleString()},to:function(e){return function(e){return Number(Number(e).toFixed(N))}(e).toLocaleString()}};function u(i,a,s){return function(){var e=B(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],2),t=e[0],n=e[1],r=f(a,s,t,n);r&&(m(r,i,a),a.setState(r).search())}}return{$$type:yr,init:function(e){n(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){n(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return D({},e,{range:D({},e.range,M({},w,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.instantSearchInstance,i=ye(t&&t.disjunctiveFacets||[],function(e){return e.name===w}),a=function(e){return br({min:Ie(P)?P:Ie(e.min)?e.min:0,max:Ie(x)?x:Ie(e.max)?e.max:0,precision:N})}(i&&i.stats||{min:void 0,max:void 0}),s=function(e){var t=B(e.getNumericRefinement(w,">=")||[],1)[0],n=B(e.getNumericRefinement(w,"<=")||[],1)[0];return[Ie(t)?t:-1/0,Ie(n)?n:1/0]}(n);return{refine:u(r,n,t?a:{min:void 0,max:void 0}),format:c,range:a,sendEvent:function(l,h,d){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1!==t.length){var r=t[0],i=t[1],a=t[2];if("click"===r){var s=B(i,2),o=s[0],c=s[1],u=f(h,d,o,c);m(u,l,h,a)}}else l.sendEventToInsights(t[0])}}(r,n,a),widgetParams:D({},o,{precision:N}),start:s}},dispose:function(e){var t=e.state;return r(),t.removeDisjunctiveFacet(w).removeNumericRefinement(w)},getWidgetUiState:function(e,t){var n=t.searchParameters.getNumericRefinements(w),r=n[">="],i=void 0===r?[]:r,a=n["<="],s=void 0===a?[]:a;return 0===i.length&&0===s.length?e:D({},e,{range:D({},e.range,M({},w,"".concat(i,":").concat(s)))})},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=e.addDisjunctiveFacet(w).setQueryParameters({numericRefinements:D({},e.numericRefinements,M({},w,{}))});Ie(P)&&(r=r.addNumericRefinement(w,">=",P)),Ie(x)&&(r=r.addNumericRefinement(w,"<=",x));var i=n.range&&n.range[w];if(!i||-1===i.indexOf(":"))return r;var a=B(i.split(":").map(parseFloat),2),s=a[0],o=a[1];return Ie(s)&&(!Ie(P)||P<s)&&(r=(r=r.removeNumericRefinement(w,">=")).addNumericRefinement(w,">=",s)),Ie(o)&&(!Ie(x)||o<x)&&(r=(r=r.removeNumericRefinement(w,"<=")).addNumericRefinement(w,"<=",o)),r}}}}var Sr=Ze({name:"refinement-list",connector:!0});function wr(T){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(T,Sr()),function(){var m=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},p=m.attribute,e=m.operator,h=void 0===e?"or":e,t=m.limit,g=void 0===t?10:t,n=m.showMore,v=void 0!==n&&n,r=m.showMoreLimit,d=void 0===r?20:r,i=m.sortBy,y=void 0===i?["isRefined","count:desc","name:asc"]:i,a=m.escapeFacetValues,b=void 0===a||a,s=m.transformItems,R=void 0===s?function(e){return e}:s;if(!p)throw new Error(Sr("The `attribute` option is required."));if(!/^(and|or)$/.test(h))throw new Error(Sr('The `operator` must one of: `"and"`, `"or"` (got "'.concat(h,'").')));if(!0===v&&d<=g)throw new Error(Sr("`showMoreLimit` should be greater than `limit`."));function S(e){var t=e.name;return D({},A(e,["name"]),{label:t,value:t,highlighted:t})}function w(e){return e?d:g}var P,x,N,_,I,F=[],C=!0;return{$$type:"ais.refinementList",isShowingMore:!1,toggleShowMore:function(){},cachedToggleShowMore:function(){I()},createToggleShowMore:function(e){var t=this;return function(){t.isShowingMore=!t.isShowingMore,t.render(e)}},getLimit:function(){return w(this.isShowingMore)},init:function(e){T(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){T(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return D({},e,{refinementList:D({},e.refinementList,M({},p,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,r=e.state,i=e.createURL,a=e.instantSearchInstance,s=e.isFromSearch,o=void 0!==s&&s,c=e.helper,u=[];if(_&&N&&x||(_=rt({instantSearchInstance:a,helper:c,attribute:p,widgetType:this.$$type}),N=function(e){_("click",e),c.toggleRefinement(p,e).search()},x=function(n){var s=this;return function(a){return function(e){var i=a.instantSearchInstance;if(""===e&&F)T(D({},s.getWidgetRenderState(D({},a,{results:P})),{instantSearchInstance:i}));else{var t={highlightPreTag:b?He.highlightPreTag:De.highlightPreTag,highlightPostTag:b?He.highlightPostTag:De.highlightPostTag};n.searchForFacetValues(p,e,Math.min(w(s.isShowingMore),100),t).then(function(e){var t=b?Qe(e.facetHits):e.facetHits,n=R(t.map(function(e){var t=e.value;return D({},A(e,["value"]),{value:t,label:t})})),r=s.isShowingMore&&F.length>g;T(D({},s.getWidgetRenderState(D({},a,{results:P})),{items:n,canToggleShowMore:r,canRefine:!0,instantSearchInstance:i,isFromSearch:!0}))})}}}}.call(this,c)),n){u=o?(t=b?Qe(n.facetHits):n.facetHits,R(t.map(function(e){var t=e.value;return D({},A(e,["value"]),{value:t,label:t})}))):(t=n.getFacetValues(p,{sortBy:y})||[],R(t.slice(0,this.getLimit()).map(S)));var l=r.maxValuesPerFacet,h=this.getLimit();C=h<l?t.length<=h:t.length<h,P=n,F=u,I=this.createToggleShowMore(e)}var d=x&&x(e),f=this.isShowingMore&&F.length>g||v&&!o&&!C;return{createURL:function(e){return i(r.toggleRefinement(p,e))},items:u,refine:N,searchForItems:d,isFromSearch:o,canRefine:o||0<u.length,widgetParams:m,isShowingMore:this.isShowingMore,canToggleShowMore:f,toggleShowMore:this.cachedToggleShowMore,sendEvent:_,hasExhaustiveItems:C}},dispose:function(e){var t=e.state;o();var n=t.setQueryParameter("maxValuesPerFacet",void 0);return"and"===h?n.removeFacet(p):n.removeDisjunctiveFacet(p)},getWidgetUiState:function(e,t){var n=t.searchParameters,r="or"===h?n.getDisjunctiveRefinements(p):n.getConjunctiveRefinements(p);return r.length?D({},e,{refinementList:D({},e.refinementList,M({},p,r))}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r="or"===h,i=n.refinementList&&n.refinementList[p],a=e.clearRefinements(p),s=r?a.addDisjunctiveFacet(p):a.addFacet(p),o=s.maxValuesPerFacet||0,c=Math.max(o,v?d:g),u=s.setQueryParameter("maxValuesPerFacet",c);if(i)return i.reduce(function(e,t){return r?e.addDisjunctiveFacetRefinement(p,t):e.addFacetRefinement(p,t)},u);var l=r?"disjunctiveFacetsRefinements":"facetsRefinements";return u.setQueryParameters(M({},l,D({},u[l],M({},p,[]))))}}}}var Pr=Ze({name:"search-box",connector:!0});function xr(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(n,Pr()),function(){var i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=i.queryHook;var s=function(){};function o(){s()}return{$$type:"ais.searchBox",init:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return r(),t.setQueryParameter("query",void 0)},getRenderState:function(e,t){return D({},e,{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,n=e.searchMetadata;if(!this._refine){var r=function(e){e!==t.state.query&&t.setQuery(e).search()};this._refine=function(e){a?a(e,r):r(e)}}return s=function(e){return function(){e.setQuery("").search()}}(t),{query:t.state.query||"",refine:this._refine,clear:o,widgetParams:i,isSearchStalled:n.isSearchStalled}},getWidgetUiState:function(e,t){var n=t.searchParameters.query||"";return""===n||e&&e.query===n?e:D({},e,{query:n})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameter("query",n.query||"")}}}}var Nr=Ze({name:"sort-by",connector:!0});function _r(o){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(o,Nr()),function(){var i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=i.items,e=i.transformItems,s=void 0===e?function(e){return e}:e;if(!Array.isArray(a))throw new Error(Nr("The `items` option expects an array of objects."));return{$$type:"ais.sortBy",init:function(e){var t=e.instantSearchInstance,n=this.getWidgetRenderState(e),r=n.currentRefinement;ye(a,function(e){return e.value===r});o(D({},n,{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;o(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return n(),t.setIndex(this.initialIndex)},getRenderState:function(e,t){return D({},e,{sortBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.parent;return this.initialIndex||(this.initialIndex=r.getIndexName()),this.setIndex||(this.setIndex=function(e){n.setIndex(e).search()}),{currentRefinement:n.state.index,options:s(a),refine:this.setIndex,hasNoResults:!t||0===t.nbHits,widgetParams:i}},getWidgetUiState:function(e,t){var n=t.searchParameters.index;return n===this.initialIndex?e:D({},e,{sortBy:n})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameter("index",n.sortBy||this.initialIndex||e.index)}}}}var Ir=Ze({name:"rating-menu",connector:!0}),Fr="ais.ratingMenu",Cr=1,Tr=function(e){var o=e.instantSearchInstance,c=e.helper,u=e.getRefinedStar,l=e.attribute;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1!==t.length){var r=t[0],i=t[1],a=t[2],s=void 0===a?"Filter Applied":a;if("click"===r)u()===Number(i)||o.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Fr,eventType:r,payload:{eventName:s,index:c.getIndex(),filters:["".concat(l,">=").concat(i)]}})}else o.sendEventToInsights(t[0])}};function Er(n){var t=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(n,Ir()),function(){var h,d=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},f=d.attribute,e=d.max,m=void 0===e?5:e;if(!f)throw new Error(Ir("The `attribute` option is required."));function p(e){var t,n=e.getNumericRefinements(f);if(null===(t=n[">="])||void 0===t?void 0:t.length)return n[">="][0]}var g=function(e){return function(e,t){h("click",t);var n=p(e.state)===Number(t);e.removeNumericRefinement(f),n||e.addNumericRefinement(f,"<=",m).addNumericRefinement(f,">=",t),e.search()}.bind(t,e)},v=function(e){var t=e.state,n=e.createURL;return function(e){return n(t.removeNumericRefinement(f).addNumericRefinement(f,"<=",m).addNumericRefinement(f,">=",e))}};return{$$type:Fr,init:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return D({},e,{ratingMenu:D({},e.ratingMenu,M({},f,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.helper,n=e.results,r=e.state,i=e.instantSearchInstance,a=e.createURL,s=[];if(h=h||Tr({instantSearchInstance:i,helper:t,getRefinedStar:function(){return p(t.state)},attribute:f}),n)for(var o=n.getFacetValues(f),c=(o.length,function(e){var r=0;e.forEach(function(e){var t=B(e.name.split("."),2)[1],n=void 0===t?"":t;r=Math.max(r,n.length)})}(o),p(r)),u=function(n){var e=c===n,t=o.filter(function(e){return Number(e.name)>=n&&Number(e.name)<=m}).map(function(e){return e.count}).reduce(function(e,t){return e+t},0);if(c&&!e&&0===t)return"continue";var r=P(new Array(Math.floor(m/Cr))).map(function(e,t){return t*Cr<n});s.push({stars:r,name:String(n),value:String(n),count:t,isRefined:e})},l=Cr;l<m;l+=Cr)u(l);return{items:s=s.reverse(),hasNoResults:!n||0===n.nbHits,refine:g(t),sendEvent:h,createURL:v({state:r,createURL:a}),widgetParams:d}},dispose:function(e){var t=e.state;return r(),t.removeNumericRefinement(f)},getWidgetUiState:function(e,t){var n=t.searchParameters,r=p(n);return"number"!=typeof r?e:D({},e,{ratingMenu:D({},e.ratingMenu,M({},f,r))})},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=n.ratingMenu&&n.ratingMenu[f],i=e.clearRefinements(f).addDisjunctiveFacet(f);return r?i.addNumericRefinement(f,"<=",m).addNumericRefinement(f,">=",r):i.setQueryParameters({numericRefinements:D({},i.numericRefinements,M({},f,[]))})}}}}var kr=Ze({name:"stats",connector:!0});function Lr(n){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(n,kr()),function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return{$$type:"ais.stats",init:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(){e()},getRenderState:function(e,t){return D({},e,{stats:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper;return t?{hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,widgetParams:r}:{hitsPerPage:n.state.hitsPerPage,nbHits:0,nbPages:0,page:n.state.page||0,processingTimeMS:-1,query:n.state.query||"",widgetParams:r}}}}}var Mr=Ze({name:"toggle-refinement",connector:!0}),jr="ais.toggleRefinement",Or=function(e){var o=e.instantSearchInstance,c=e.attribute,u=e.on,l=e.helper;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1!==t.length){var r=t[0],i=t[1],a=t[2],s=void 0===a?"Filter Applied":a;"click"===r&&void 0!==u&&(i||o.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:jr,eventType:r,payload:{eventName:s,index:l.getIndex(),filters:u.map(function(e){return"".concat(c,":").concat(e)})}}))}else o.sendEventToInsights(t[0])}};function Ar(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ne;return xe(r,Mr()),function(){var f=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},m=f.attribute,e=f.on,t=void 0===e||e,n=f.off;if(!m)throw new Error(Mr("The `attribute` option is required."));var p,g=void 0!==n,v=void 0!==t?Ge(t).map(Pe):void 0,y=g?Ge(n).map(Pe):void 0,b=function(n,e){var r=e.state,i=e.createURL;return function(){var e=n?v:y;e&&e.forEach(function(e){r.removeDisjunctiveFacetRefinement(m,e)});var t=n?y:v;return t&&t.forEach(function(e){r.addDisjunctiveFacetRefinement(m,e)}),i(r)}};return{$$type:jr,init:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return i(),t.removeDisjunctiveFacet(m)},getRenderState:function(e,t){return D({},e,{toggleRefinement:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.state,n=e.helper,r=e.results,i=e.createURL,a=e.instantSearchInstance,s=r?null==v?void 0:v.every(function(e){return n.state.isDisjunctiveFacetRefined(m,e)}):null==v?void 0:v.every(function(e){return t.isDisjunctiveFacetRefined(m,e)}),o={isRefined:s,count:0},c={isRefined:g&&!s,count:0};if(r){var u=Ge(y||!1),l=r.getFacetValues(m)||[],h=null==v?void 0:v.map(function(t){return ye(l,function(e){return e.name===be(t)})}).filter(function(e){return void 0!==e}),d=g?u.map(function(t){return ye(l,function(e){return e.name===be(t)})}).filter(function(e){return void 0!==e}):[];o={isRefined:!!h.length&&h.every(function(e){return e.isRefined}),count:h.reduce(function(e,t){return e+t.count},0)||null},c={isRefined:!!d.length&&d.every(function(e){return e.isRefined}),count:d.reduce(function(e,t){return e+t.count},0)||l.reduce(function(e,t){return e+t.count},0)}}else g&&!s&&(y&&y.forEach(function(e){return n.addDisjunctiveFacetRefinement(m,e)}),n.setPage(n.state.page));return p=p||Or({instantSearchInstance:a,attribute:m,on:v,helper:n}),{value:{name:m,isRefined:s,count:r?(s?c:o).count:null,onFacetValue:o,offFacetValue:c},state:t,createURL:b(s,{state:t,createURL:i}),sendEvent:p,refine:function(t){return function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).isRefined;e?(v.forEach(function(e){return t.removeDisjunctiveFacetRefinement(m,e)}),g&&y.forEach(function(e){return t.addDisjunctiveFacetRefinement(m,e)})):(p("click",e),g&&y.forEach(function(e){return t.removeDisjunctiveFacetRefinement(m,e)}),v.forEach(function(e){return t.addDisjunctiveFacetRefinement(m,e)})),t.search()}}(n),widgetParams:f}},getWidgetUiState:function(e,t){var n=t.searchParameters,r=v&&v.every(function(e){return n.isDisjunctiveFacetRefined(m,e)});return r?D({},e,{toggle:D({},e.toggle,M({},m,r))}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=e.clearRefinements(m).addDisjunctiveFacet(m);return Boolean(n.toggle&&n.toggle[m])?(v&&v.forEach(function(e){r=r.addDisjunctiveFacetRefinement(m,e)}),r):g?(y&&y.forEach(function(e){r=r.addDisjunctiveFacetRefinement(m,e)}),r):r.setQueryParameters({disjunctiveFacetsRefinements:D({},e.disjunctiveFacetsRefinements,M({},m,[]))})}}}}function Hr(l,e){var h=1<arguments.length&&void 0!==e?e:Ne;xe(l,Dr());var d={};return function(s){var e=s||{},t=e.attributes,n=e.separator,r=void 0===n?" > ":n,i=e.rootPath,a=void 0===i?null:i,o=e.transformItems,c=void 0===o?function(e){return e}:o;if(!t||!Array.isArray(t)||0===t.length)throw new Error(Dr("The `attributes` option expects an array of strings."));var u=B(t,1)[0];return{$$type:"ais.breadcrumb",init:function(e){l(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){l(D({},this.getWidgetRenderState(e),{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(){h()},getRenderState:function(e,t){return D({},e,{breadcrumb:D({},e.breadcrumb,M({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var n=e.helper,r=e.createURL,i=e.results,a=e.state;var t=function(){if(!i)return[];var e=B(a.hierarchicalFacets,1)[0].name,t=i.getFacetValues(e,{}),n=Array.isArray(t.data)?t.data:[];return c(function(n){return n.map(function(e,t){return{label:e.label,value:t+1===n.length?null:n[t+1].value}})}(function n(e){return e.reduce(function(e,t){return t.isRefined&&(e.push({label:t.name,value:t.path}),Array.isArray(t.data)&&(e=e.concat(n(t.data)))),e},[])}(n)))}();return d.createURL||(d.createURL=function(e){if(!e){var t=n.getHierarchicalFacetBreadcrumb(u);if(0<t.length)return r(n.state.toggleFacetRefinement(u,t[0]))}return r(n.state.toggleFacetRefinement(u,e))}),d.refine||(d.refine=function(e){if(e)n.toggleRefinement(u,e).search();else{var t=n.getHierarchicalFacetBreadcrumb(u);0<t.length&&n.toggleRefinement(u,t[0]).search()}}),{canRefine:0<t.length,createURL:d.createURL,items:t,refine:d.refine,widgetParams:s}},getWidgetSearchParameters:function(e){if(e.isHierarchicalFacet(u)){e.getHierarchicalFacetByName(u);return e}return e.addHierarchicalFacet({name:u,attributes:t,separator:r,rootPath:a})}}}}var Dr=Ze({name:"breadcrumb",connector:!0});function Wr(v,e){var r=1<arguments.length&&void 0!==e?e:Ne;return xe(v,Ur()),function(){function s(e){return e.aroundLatLng&&function(e){var t=e.match(Xe);if(!t)throw new Error('Invalid value for "aroundLatLng" parameter: "'.concat(e,'"'));return{lat:parseFloat(t[1]),lng:parseFloat(t[2])}}(e.aroundLatLng)}function o(){return g.internalToggleRefineOnMapMove()}function c(e,t){return function(){g.isRefineOnMapMove=!g.isRefineOnMapMove,e(t)}}function u(){return g.isRefineOnMapMove}function l(){return g.internalSetMapMoveSinceLastRefine()}function h(t,n){return function(){var e=!0!==g.hasMapMoveSinceLastRefine;g.hasMapMoveSinceLastRefine=!0,e&&t(n)}}function d(){return g.hasMapMoveSinceLastRefine}var f,m=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=m.enableRefineOnMapMove,t=void 0===e||e,n=m.transformItems,p=void 0===n?function(e){return e}:n,g={isRefineOnMapMove:t,hasMapMoveSinceLastRefine:!1,lastRefinePosition:"",lastRefineBoundingBox:"",internalToggleRefineOnMapMove:Ne,internalSetMapMoveSinceLastRefine:Ne};return{$$type:Qr,init:function(e){var t=e.instantSearchInstance;g.internalToggleRefineOnMapMove=c(Ne,e),g.internalSetMapMoveSinceLastRefine=h(Ne,e),v(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.helper,n=e.instantSearchInstance,r=t.state,i=Boolean(r.aroundLatLng)&&Boolean(g.lastRefinePosition)&&r.aroundLatLng!==g.lastRefinePosition,a=!r.insideBoundingBox&&Boolean(g.lastRefineBoundingBox)&&r.insideBoundingBox!==g.lastRefineBoundingBox;(i||a)&&(g.hasMapMoveSinceLastRefine=!1),g.lastRefinePosition=r.aroundLatLng||"",g.lastRefineBoundingBox=r.insideBoundingBox||"",g.internalToggleRefineOnMapMove=c(this.render.bind(this),e),g.internalSetMapMoveSinceLastRefine=h(this.render.bind(this),e);var s=this.getWidgetRenderState(e);f("view",s.items),v(D({},s,{instantSearchInstance:n}),!1)},getWidgetRenderState:function(e){var t=e.helper,n=e.results,r=e.instantSearchInstance,i=t.state,a=n?p(n.hits.filter(function(e){return e._geoloc})):[];return f=f||at({instantSearchInstance:r,index:t.getIndex(),widgetType:Qr}),{items:a,position:s(i),currentRefinement:function(e){return e.insideBoundingBox&&et(e.insideBoundingBox)}(i),refine:function(i){return function(e){var t=e.northEast,n=e.southWest,r=[t.lat,t.lng,n.lat,n.lng].join();i.setQueryParameter("insideBoundingBox",r).search(),g.hasMapMoveSinceLastRefine=!1,g.lastRefineBoundingBox=r}}(t),sendEvent:f,clearMapRefinement:function(e){return function(){e.setQueryParameter("insideBoundingBox",void 0).search()}}(t),isRefinedWithMap:function(e){return function(){return Boolean(e.insideBoundingBox)}}(i),toggleRefineOnMapMove:o,isRefineOnMapMove:u,setMapMoveSinceLastRefine:l,hasMapMoveSinceLastRefine:d,widgetParams:m}},getRenderState:function(e,t){return D({},e,{geoSearch:this.getWidgetRenderState(t)})},dispose:function(e){var t=e.state;return r(),t.setQueryParameter("insideBoundingBox",void 0)},getWidgetUiState:function(e,t){var n=t.searchParameters.insideBoundingBox;return!n||e&&e.geoSearch&&e.geoSearch.boundingBox===n?e:D({},e,{geoSearch:{boundingBox:n}})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return n&&n.geoSearch?e.setQueryParameter("insideBoundingBox",n.geoSearch.boundingBox):e.setQueryParameter("insideBoundingBox",void 0)}}}}function Br(r,e){var i=1<arguments.length&&void 0!==e?e:Ne;xe(r,qr());var a="https://www.algolia.com/?utm_source=instantsearch.js&utm_medium=website&"+"utm_content=".concat("undefined"!=typeof window&&window.location?window.location.hostname:"","&")+"utm_campaign=poweredby";return function(e){var t=(e||{}).url,n=void 0===t?a:t;return{$$type:"ais.poweredBy",init:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return D({},e,{poweredBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{url:n,widgetParams:e}},dispose:function(){i()}}}}var Ur=Ze({name:"geo-search",connector:!0}),Qr="ais.geoSearch",qr=Ze({name:"powered-by",connector:!0}),$r=Ze({name:"configure",connector:!0});function Vr(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return D({},e,M({},t,void 0))},{}))}function Kr(e,t){var r=0<arguments.length&&void 0!==e?e:Ne,a=1<arguments.length&&void 0!==t?t:Ne;return function(i){if(!i||!Fe(i.searchParameters))throw new Error($r("The `searchParameters` option expects an object."));var n={};return{$$type:"ais.configure",init:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},dispose:function(e){var t=e.state;return a(),Vr(t,i)},getRenderState:function(e,t){var n,r=this.getWidgetRenderState(t);return D({},e,{configure:D({},r,{widgetParams:D({},r.widgetParams,{searchParameters:Ye(new se.SearchParameters(null===(n=e.configure)||void 0===n?void 0:n.widgetParams.searchParameters),new se.SearchParameters(r.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var t=e.helper;return n.refine||(n.refine=function(r){return function(e){var t=Vr(r.state,i),n=Ye(t,new se.SearchParameters(e));i.searchParameters=e,r.setState(n).search()}}(t)),{refine:n.refine,widgetParams:i}},getWidgetSearchParameters:function(e,t){var n=t.uiState;return Ye(e,new se.SearchParameters(D({},n.configure,{},i.searchParameters)))},getWidgetUiState:function(e){return D({},e,{configure:D({},e.configure,{},i.searchParameters)})}}}}var zr=Ze({name:"configure-related-items",connector:!0});function Jr(e){var t=e.attributeName,n=e.attributeValue,r=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(r||1,">")}function Yr(c,u){return function(e){var t=e||{},a=t.hit,s=t.matchingPatterns,n=t.transformSearchParameters,r=void 0===n?function(e){return e}:n;if(!a)throw new Error(zr("The `hit` option is required."));if(!s)throw new Error(zr("The `matchingPatterns` option is required."));var i=Object.keys(s).reduce(function(e,t){var n=s[t],r=_e(a,t),i=n.score;return Array.isArray(r)?[].concat(P(e),[r.map(function(e){return Jr({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(P(e),[Jr({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]),o=D({},r(new se.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.objectID)],optionalFilters:i})));return D({},Kr(c,u)({searchParameters:o}),{$$type:"ais.configureRelatedItems"})}}var Gr=Ze({name:"autocomplete",connector:!0}),Zr=Ze({name:"query-rules",connector:!0});function Xr(e){var t=this.helper,n=this.initialRuleContexts,r=this.trackedFilters,i=this.transformRuleContexts,a=e.state,s=a.ruleContexts||[],o=function(e){var i=e.helper,a=e.sharedHelperState,s=e.trackedFilters;return Object.keys(s).reduce(function(e,t){var n=Se(i.lastResults||{},a).filter(function(e){return e.attribute===t}).map(function(e){return e.numericValue||e.name}),r=(0,s[t])(n);return[].concat(P(e),P(n.filter(function(e){return r.includes(e)}).map(function(e){return function(e){return e.replace(/[^a-z0-9-_]+/gi,"_")}("ais-".concat(t,"-").concat(e))})))},[])}({helper:t,sharedHelperState:a,trackedFilters:r}),c=i([].concat(P(n),P(o))).slice(0,10);Ee(s,c)||t.overrideStateWithoutTriggeringChangeEvent(D({},a,{ruleContexts:c}))}function ei(h,e){var d=1<arguments.length&&void 0!==e?e:Ne;return xe(h,Zr()),function(i){var e=i||{},t=e.trackedFilters,a=void 0===t?{}:t,n=e.transformRuleContexts,s=void 0===n?function(e){return e}:n,r=e.transformItems,o=void 0===r?function(e){return e}:r;Object.keys(a).forEach(function(e){if("function"!=typeof a[e])throw new Error(Zr("'The \"".concat(e,'" filter value in the `trackedFilters` option expects a function.')))});var c,u=0<Object.keys(a).length,l=[];return{$$type:"ais.queryRules",init:function(e){var t=e.helper,n=e.state,r=e.instantSearchInstance;l=n.ruleContexts||[],c=Xr.bind({helper:t,initialRuleContexts:l,trackedFilters:a,transformRuleContexts:s}),u&&((function(e){return[e.disjunctiveFacetsRefinements,e.facetsRefinements,e.hierarchicalFacetsRefinements,e.numericRefinements].some(function(e){return Boolean(e&&0<Object.keys(e).length)})}(n)||Boolean(i.transformRuleContexts))&&c({state:n}),t.on("change",c)),h(D({},this.getWidgetRenderState(e),{instantSearchInstance:r}),!0)},render:function(e){var t=e.instantSearchInstance;h(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},getWidgetRenderState:function(e){var t=(e.results||{}).userData;return{items:o(void 0===t?[]:t),widgetParams:i}},getRenderState:function(e,t){return D({},e,{queryRules:this.getWidgetRenderState(t)})},dispose:function(e){var t=e.helper,n=e.state;return d(),u?(t.removeListener("change",c),n.setQueryParameter("ruleContexts",l)):n}}}}function ti(e){function t(e){return{status:e,transcript:"",isSpeechFinal:!1,errorCode:void 0}}function n(e){p=D({},p,{},0<arguments.length&&void 0!==e?e:{}),f()}function r(e){n(t(0<arguments.length&&void 0!==e?e:"initial"))}function i(){n({status:"waiting"})}function a(e){n({status:"error",errorCode:e.error})}function s(e){n({status:"recognizing",transcript:e.results[0]&&e.results[0][0]&&e.results[0][0].transcript||"",isSpeechFinal:e.results[0]&&e.results[0].isFinal}),l&&p.transcript&&d(p.transcript)}function o(){p.errorCode||!p.transcript||l||d(p.transcript),"error"!==p.status&&n({status:"finished"})}function c(){u&&(u.stop(),u.removeEventListener("start",i),u.removeEventListener("error",a),u.removeEventListener("result",s),u.removeEventListener("end",o),u=void 0)}var u,l=e.searchAsYouSpeak,h=e.language,d=e.onQueryChange,f=e.onStateChange,m=window.webkitSpeechRecognition||window.SpeechRecognition,p=t("initial");return{getState:function(){return p},isBrowserSupported:function(){return Boolean(m)},isListening:function(){return"askingPermission"===p.status||"waiting"===p.status||"recognizing"===p.status},startListening:function(){(u=new m)&&(r("askingPermission"),u.interimResults=!0,h&&(u.lang=h),u.addEventListener("start",i),u.addEventListener("error",a),u.addEventListener("result",s),u.addEventListener("end",o),u.start())},stopListening:function(){c(),r("finished")},dispose:c}}function ni(p,e){var a=1<arguments.length&&void 0!==e?e:Ne;return xe(p,ri()),function(l){var e=l.searchAsYouSpeak,h=void 0!==e&&e,d=l.language,f=l.additionalQueryParameters,t=l.createVoiceSearchHelper,m=void 0===t?ti:t;return{$$type:"ais.voiceSearch",init:function(e){var t=e.instantSearchInstance;p(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;p(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return D({},e,{voiceSearch:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=this,n=e.helper,r=e.instantSearchInstance;this._refine||(this._refine=function(e){if(e!==n.state.query){var t=d?[d.split("-")[0]]:void 0;n.setQueryParameter("queryLanguages",t),"function"==typeof f&&n.setState(n.state.setQueryParameters(D({ignorePlurals:!0,removeStopWords:!0,optionalWords:e},f({query:e})))),n.setQuery(e).search()}}),this._voiceSearchHelper||(this._voiceSearchHelper=m({searchAsYouSpeak:h,language:d,onQueryChange:function(e){return t._refine(e)},onStateChange:function(){p(D({},t.getWidgetRenderState(e),{instantSearchInstance:r}),!1)}}));var i=this._voiceSearchHelper,a=i.isBrowserSupported,s=i.isListening,o=i.startListening,c=i.stopListening,u=i.getState;return{isBrowserSupported:a(),isListening:s(),toggleListening:function(){a()&&(s()?c():o())},voiceListeningState:u(),widgetParams:l}},dispose:function(e){var t=e.state;this._voiceSearchHelper.dispose(),a();var n=t;if("function"==typeof f){var r=f({query:""}),i=r?Object.keys(r).reduce(function(e,t){return e[t]=void 0,e},{}):{};n=t.setQueryParameters(D({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},i))}return n.setQueryParameter("query",void 0)},getWidgetUiState:function(e,t){var n=t.searchParameters.query||"";return n?D({},e,{query:n}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameter("query",n.query||"")}}}}var ri=Ze({name:"voice-search",connector:!0}),ii=Object.freeze({__proto__:null,connectClearRefinements:on,connectCurrentRefinements:ln,connectHierarchicalMenu:vn,connectHits:yn,connectHitsWithInsights:er,connectHitsPerPage:Xn,connectInfiniteHits:ir,connectInfiniteHitsWithInsights:ar,connectMenu:or,connectNumericMenu:cr,connectPagination:mr,connectRange:Rr,connectRefinementList:wr,connectSearchBox:xr,connectSortBy:_r,connectRatingMenu:Er,connectStats:Lr,connectToggleRefinement:Ar,connectBreadcrumb:Hr,connectGeoSearch:Wr,connectPoweredBy:Br,connectConfigure:Kr,EXPERIMENTAL_connectConfigureRelatedItems:Yr,connectAutocomplete:function(r,e){var i=1<arguments.length&&void 0!==e?e:Ne;return xe(r,Gr()),function(s){var e=(s||{}).escapeHTML,o=void 0===e||e,c={};return{$$type:"ais.autocomplete",init:function(e){var t=e.instantSearchInstance;r(D({},this.getWidgetRenderState(e),{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance,n=this.getWidgetRenderState(e);n.indices.forEach(function(e){(0,e.sendEvent)("view",e.hits)}),r(D({},n,{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return D({},e,{autocomplete:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var n=this,t=e.helper,r=e.scopedResults,i=e.instantSearchInstance;c.refine||(c.refine=function(e){t.setQuery(e).search()});var a=r.map(function(e){e.results.hits=o?Ue(e.results.hits):e.results.hits;var t=at({instantSearchInstance:i,index:e.results.index,widgetType:n.$$type});return{indexId:e.indexId,indexName:e.results.index,hits:e.results.hits,results:e.results,sendEvent:t}});return{currentRefinement:t.state.query||"",indices:a,refine:c.refine,widgetParams:s}},getWidgetUiState:function(e,t){var n=t.searchParameters.query||"";return""===n||e&&e.query===n?e:D({},e,{query:n})},getWidgetSearchParameters:function(e,t){var n={query:t.uiState.query||""};return o?e.setQueryParameters(D({},n,{},He)):e.setQueryParameters(n)},dispose:function(e){var t=e.state;i();var n=t.setQueryParameter("query",void 0);return o?n.setQueryParameters(Object.keys(He).reduce(function(e,t){return D({},e,M({},t,void 0))},{})):n}}}},connectQueryRules:ei,connectVoiceSearch:ni}),ai=fe(function(e){function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"==r||"number"==r)e.push(n);else if(Array.isArray(n)&&n.length){var i=s.apply(null,n);i&&e.push(i)}else if("object"==r)for(var a in n)o.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}var o;o={}.hasOwnProperty,e.exports?(s.default=s,e.exports=s):window.classNames=s}),si=function(){function e(){return k(this,e),W(this,O(e).apply(this,arguments))}return j(e,jn),L(e,[{key:"shouldComponentUpdate",value:function(e){return!Ee(this.props.data,e.data)||this.props.templateKey!==e.templateKey||!Ee(this.props.rootProps,e.rootProps)}},{key:"render",value:function(){var e=this.props.rootTagName,t=this.props.useCustomCompileOptions[this.props.templateKey]?this.props.templatesConfig.compileOptions:{},n=ve({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:t,helpers:this.props.templatesConfig.helpers,data:this.props.data,bindEvent:this.props.bindEvent});return null===n?null:kn(e,d({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:n}}))}}]),e}();si.defaultProps={data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}};function oi(e){var t=e.hasRefinements,n=e.refine,r=e.cssClasses,i=e.templateProps;return kn("div",{className:r.root},kn(si,d({},i,{templateKey:"resetLabel",rootTagName:"button",rootProps:{className:ai(r.button,M({},r.disabledButton,!t)),onClick:n,disabled:!t},data:{hasRefinements:t}})))}function ci(e){var t=e.items,n=e.cssClasses;return kn("div",{className:n.root},kn("ul",{className:n.list},t.map(function(t,e){return kn("li",{key:"".concat(t.indexName,"-").concat(t.attribute,"-").concat(e),className:n.item},kn("span",{className:n.label},function(e){return e.toString().charAt(0).toUpperCase()+e.toString().slice(1)}(t.label),":"),t.refinements.map(function(e){return kn("span",{key:function(e){var t=e.attribute,n=e.value;return[t,e.type,n,e.operator].map(function(e){return e}).filter(Boolean).join(":")}(e),className:n.category},kn("span",{className:n.categoryLabel},"query"===e.attribute?kn("q",null,e.label):e.label),kn("button",{className:n.delete,onClick:function(t){return function(e){le(e)||(e.preventDefault(),t())}}(t.refine.bind(null,e))},"✕"))}))})))}function ui(e,t){var n=e.items,r=e.widgetParams;if(!t){var i=r.container,a=r.cssClasses;Yn(kn(ci,{cssClasses:a,items:n}),i)}}function li(e){var t=e.className,n=e.disabled;return kn("button",{className:t,onClick:e.onClick,disabled:n},e.children)}var hi={resetLabel:"Clear refinements"},di=Ze({name:"clear-refinements"}),fi=pt("ClearRefinements"),mi=Ze({name:"current-refinements"}),pi=pt("CurrentRefinements");li.defaultProps={disabled:!1};function gi(e){var t=e.classNameLabel,n=e.classNameInput,r=e.checked,i=e.onToggle,a=e.children;return kn("label",{className:t},kn("input",{className:n,type:"checkbox",checked:r,onChange:i}),a)}function vi(e){var t=e.cssClasses,n=e.enableRefine,r=e.enableRefineControl,i=e.enableClearMapRefinement,a=e.isRefineOnMapMove,s=e.isRefinedWithMap,o=e.hasMapMoveSinceLastRefine,c=e.onRefineToggle,u=e.onRefineClick,l=e.onClearClick,h=e.templateProps;return n&&kn("div",null,r&&kn("div",{className:t.control},a||!o?kn(gi,{classNameLabel:ai(t.label,M({},t.selectedLabel,a)),classNameInput:t.input,checked:a,onToggle:c},kn(si,d({},h,{templateKey:"toggle",rootTagName:"span"}))):kn(li,{className:t.redo,disabled:!o,onClick:u},kn(si,d({},h,{templateKey:"redo",rootTagName:"span"})))),!r&&!a&&kn("div",{className:t.control},kn(li,{className:ai(t.redo,M({},t.disabledRedo,!o)),disabled:!o,onClick:u},kn(si,d({},h,{templateKey:"redo",rootTagName:"span"})))),i&&s&&kn(li,{className:t.reset,onClick:l},kn(si,d({},h,{templateKey:"reset",rootTagName:"span"}))))}function yi(e){var t=e.refine,n=e.mapInstance;return t({northEast:n.getBounds().getNorthEast().toJSON(),southWest:n.getBounds().getSouthWest().toJSON()})}function bi(e,t){e.isUserInteraction=!1,t(),e.isUserInteraction=!0}function Ri(e,t){var n=e.items,r=e.position,i=e.currentRefinement,a=e.refine,s=e.clearMapRefinement,o=e.toggleRefineOnMapMove,c=e.isRefineOnMapMove,u=e.setMapMoveSinceLastRefine,l=e.hasMapMoveSinceLastRefine,h=e.isRefinedWithMap,d=e.widgetParams,f=e.instantSearchInstance,m=d.container,p=d.googleReference,g=d.cssClasses,v=d.templates,y=d.initialZoom,b=d.initialPosition,R=d.enableRefine,S=d.enableClearMapRefinement,w=d.enableRefineControl,P=d.mapOptions,x=d.createMarker,N=d.markerOptions,_=d.renderState;if(t){_.isUserInteraction=!0,_.isPendingRefine=!1,_.markers=[];var I=document.createElement("div");I.className=g.root,m.appendChild(I);var F=document.createElement("div");F.className=g.map,I.appendChild(F);var C=document.createElement("div");C.className=g.tree,I.appendChild(C),_.mapInstance=new p.maps.Map(F,D({mapTypeControl:!1,fullscreenControl:!1,streetViewControl:!1,clickableIcons:!1,zoomControlOptions:{position:p.maps.ControlPosition.LEFT_TOP}},P));return p.maps.event.addListenerOnce(_.mapInstance,"idle",function(){function e(){_.isUserInteraction&&R&&(u(),c()&&(_.isPendingRefine=!0))}_.mapInstance.addListener("center_changed",e),_.mapInstance.addListener("zoom_changed",e),_.mapInstance.addListener("dragstart",e),_.mapInstance.addListener("idle",function(){_.isUserInteraction&&_.isPendingRefine&&(_.isPendingRefine=!1,yi({mapInstance:_.mapInstance,refine:a}))})}),void(_.templateProps=de({templatesConfig:f.templatesConfig,templates:v}))}var T=n.map(function(e){return e.objectID}),E=B(function(e,a){return e.reduce(function(e,t){var n=B(e,2),r=n[0],i=n[1];return a.includes(t.__id)?[r.concat(t),i]:[r,i.concat(t)]},[[],[]])}(_.markers,T),2),k=E[0],L=E[1],M=k.map(function(e){return e.__id}),j=n.filter(function(e){return!M.includes(e.objectID)});L.forEach(function(e){return e.setMap(null)}),_.markers=k.concat(j.map(function(n){var r=x({map:_.mapInstance,item:n});return Object.keys(N.events).forEach(function(t){r.addListener(t,function(e){N.events[t]({map:_.mapInstance,event:e,item:n,marker:r})})}),r}));var O=!l(),A=i?0:null,H=!i&&Boolean(_.markers.length)?function(e,t){var n=t.reduce(function(e,t){return e.extend(t.getPosition())},new e.maps.LatLngBounds);return{northEast:n.getNorthEast().toJSON(),southWest:n.getSouthWest().toJSON()}}(p,_.markers):i;H&&O?bi(_,function(){_.mapInstance.fitBounds(new p.maps.LatLngBounds(H.southWest,H.northEast),A)}):O&&bi(_,function(){_.mapInstance.setCenter(r||b),_.mapInstance.setZoom(y)}),Yn(kn(vi,{cssClasses:g,enableRefine:R,enableRefineControl:w,enableClearMapRefinement:S,isRefineOnMapMove:c(),isRefinedWithMap:h(),hasMapMoveSinceLastRefine:l(),onRefineToggle:o,onRefineClick:function(){return yi({mapInstance:_.mapInstance,refine:a})},onClearClick:s,templateProps:_.templateProps}),m.querySelector(".".concat(g.tree)))}var Si={HTMLMarker:"<p>Your custom HTML Marker</p>",reset:"Clear the map refinement",toggle:"Search as I move the map",redo:"Redo search here"},wi=Ze({name:"geo-search"}),Pi=pt("GeoSearch");function xi(e){var t=e.className,n=e.handleClick,r=e.facetValueToRefine,i=e.isRefined,a=e.templateProps,s=e.templateKey,o=e.templateData,c=e.subItems;return kn("li",{className:t,onClick:function(e){n({facetValueToRefine:r,isRefined:i,originalEvent:e})}},kn(si,d({},a,{templateKey:s,data:o})),c)}var Ni=function(){function i(){var e,s;k(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return M(H(s=W(this,(e=O(i)).call.apply(e,[this].concat(n)))),"state",{query:s.props.query,focused:!1}),M(H(s),"onInput",function(e){var t=s.props,n=t.searchAsYouType,r=t.refine,i=t.onChange,a=e.target.value;n&&r(a),s.setState({query:a}),i(e)}),M(H(s),"onSubmit",function(e){var t=s.props,n=t.searchAsYouType,r=t.refine,i=t.onSubmit;return e.preventDefault(),e.stopPropagation(),s.input.blur(),n||r(s.state.query),i(e),!1}),M(H(s),"onReset",function(e){var t=s.props,n=t.refine,r=t.onReset;s.input.focus(),n(""),s.setState({query:""}),r(e)}),M(H(s),"onBlur",function(){s.setState({focused:!1})}),M(H(s),"onFocus",function(){s.setState({focused:!0})}),s}return j(i,jn),L(i,[{key:"resetInput",value:function(){this.setState({query:""})}},{key:"componentWillReceiveProps",value:function(e){this.state.focused||e.query===this.state.query||this.setState({query:e.query})}},{key:"render",value:function(){var t=this,e=this.props,n=e.cssClasses,r=e.placeholder,i=e.autofocus,a=e.showSubmit,s=e.showReset,o=e.showLoadingIndicator,c=e.templates,u=e.isSearchStalled;return kn("div",{className:n.root},kn("form",{action:"",role:"search",className:n.form,noValidate:!0,onSubmit:this.onSubmit,onReset:this.onReset},kn("input",{ref:function(e){return t.input=e},value:this.state.query,disabled:this.props.disabled,className:n.input,type:"search",placeholder:r,autoFocus:i,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus}),kn(si,{templateKey:"submit",rootTagName:"button",rootProps:{className:n.submit,type:"submit",title:"Submit the search query.",hidden:!a},templates:c,data:{cssClasses:n}}),kn(si,{templateKey:"reset",rootTagName:"button",rootProps:{className:n.reset,type:"reset",title:"Clear the search query.",hidden:!(s&&this.state.query.trim()&&!u)},templates:c,data:{cssClasses:n}}),o&&kn(si,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:n.loadingIndicator,hidden:!u},templates:c,data:{cssClasses:n}})))}}]),i}();M(Ni,"defaultProps",{query:"",showSubmit:!0,showReset:!0,showLoadingIndicator:!0,autofocus:!1,searchAsYouType:!0,isSearchStalled:!1,disabled:!1,onChange:Ne,onSubmit:Ne,onReset:Ne,refine:Ne});var _i=function(){function c(e){var t;return k(this,c),(t=W(this,O(c).call(this,e))).handleItemClick=t.handleItemClick.bind(H(t)),t}return j(c,jn),L(c,[{key:"shouldComponentUpdate",value:function(e,t){var n=this.state!==t,r=!Ee(this.props.facetValues,e.facetValues);return n||r}},{key:"refine",value:function(e,t){this.props.toggleRefinement(e,t)}},{key:"_generateFacetItem",value:function(e){var t,n,r=e.data&&0<e.data.length;if(r){var i=this.props.cssClasses,a=(i.root,A(i,["root"]));n=kn(c,d({},this.props,{cssClasses:a,depth:this.props.depth+1,facetValues:e.data,showMore:!1,className:this.props.cssClasses.childList}))}var s=D({},e,{url:this.props.createURL(e.value),attribute:this.props.attribute,cssClasses:this.props.cssClasses,isFromSearch:this.props.isFromSearch}),o=e.value;return void 0!==e.isRefined&&(o+="/".concat(e.isRefined)),void 0!==e.count&&(o+="/".concat(e.count)),kn(xi,{templateKey:"item",key:o,facetValueToRefine:e.value,handleClick:this.handleItemClick,isRefined:e.isRefined,className:ai(this.props.cssClasses.item,(t={},M(t,this.props.cssClasses.selectedItem,e.isRefined),M(t,this.props.cssClasses.disabledItem,!e.count),M(t,this.props.cssClasses.parentItem,r),t)),subItems:n,templateData:s,templateProps:this.props.templateProps})}},{key:"handleItemClick",value:function(e){var t=e.facetValueToRefine,n=e.originalEvent,r=e.isRefined;if(!(le(n)||r&&n.target.parentNode.querySelector('input[type="radio"]:checked')))if("INPUT"!==n.target.tagName){for(var i=n.target;i!==n.currentTarget;){if("LABEL"===i.tagName&&(i.querySelector('input[type="checkbox"]')||i.querySelector('input[type="radio"]')))return;"A"===i.tagName&&i.href&&n.preventDefault(),i=i.parentNode}n.stopPropagation(),this.refine(t,r)}else this.refine(t,r)}},{key:"componentWillReceiveProps",value:function(e){this.searchBox&&!e.isFromSearch&&this.searchBox.resetInput()}},{key:"refineFirstValue",value:function(){var e=this.props.facetValues[0];if(e){var t=e.value;this.props.toggleRefinement(t)}}},{key:"render",value:function(){var t=this,e=ai(this.props.cssClasses.list,M({},"".concat(this.props.cssClasses.depth).concat(this.props.depth),this.props.cssClasses.depth)),n=ai(this.props.cssClasses.showMore,M({},this.props.cssClasses.disabledShowMore,!(!0===this.props.showMore&&this.props.canToggleShowMore))),r=!0===this.props.showMore&&kn(si,d({},this.props.templateProps,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:n,disabled:!this.props.canToggleShowMore,onClick:this.props.toggleShowMore},data:{isShowingMore:this.props.isShowingMore}})),i=!0!==this.props.searchIsAlwaysActive&&!(this.props.isFromSearch||!this.props.hasExhaustiveItems),a=this.props.searchFacetValues&&kn("div",{className:this.props.cssClasses.searchBox},kn(Ni,{ref:function(e){return t.searchBox=e},placeholder:this.props.searchPlaceholder,disabled:i,cssClasses:this.props.cssClasses.searchable,templates:this.props.templateProps.templates,onChange:function(e){return t.props.searchFacetValues(e.target.value)},onReset:function(){return t.props.searchFacetValues("")},onSubmit:function(){return t.refineFirstValue()},searchAsYouType:!1})),s=this.props.facetValues&&0<this.props.facetValues.length&&kn("ul",{className:e},this.props.facetValues.map(this._generateFacetItem,this)),o=this.props.searchFacetValues&&this.props.isFromSearch&&0===this.props.facetValues.length&&kn(si,d({},this.props.templateProps,{templateKey:"searchableNoResults",rootProps:{className:this.props.cssClasses.noResults}}));return kn("div",{className:ai(this.props.cssClasses.root,M({},this.props.cssClasses.noRefinementRoot,!this.props.facetValues||0===this.props.facetValues.length),this.props.className)},this.props.children,a,s,o,r)}}]),c}();_i.defaultProps={cssClasses:{},depth:0};var Ii={item:'<a class="{{cssClasses.link}}" href="{{url}}"><span class="{{cssClasses.label}}">{{label}}</span><span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span></a>',showMoreText:"\n {{#isShowingMore}}\n Show less\n {{/isShowingMore}}\n {{^isShowingMore}}\n Show more\n {{/isShowingMore}}\n "},Fi=Ze({name:"hierarchical-menu"}),Ci=pt("HierarchicalMenu");function Ti(e){var t=e.results,n=e.hits,r=e.bindEvent,i=e.cssClasses,a=e.templateProps;return 0===t.hits.length?kn(si,d({},a,{templateKey:"empty",rootProps:{className:ai(i.root,i.emptyRoot)},data:t})):kn("div",{className:i.root},kn("ol",{className:i.list},n.map(function(e,t){return kn(si,d({},a,{templateKey:"item",rootTagName:"li",rootProps:{className:i.item},key:e.objectID,data:D({},e,{__hitIndex:t}),bindEvent:r}))})))}Ti.defaultProps={results:{hits:[]},hits:[]};var Ei={empty:"No results",item:function(e){return JSON.stringify(e,null,2)}},ki=Ze({name:"hits"}),Li=pt("Hits"),Mi=Zn(Ti);function ji(e){var t=e.currentValue,n=e.options,r=e.cssClasses,i=e.setValue;return kn("select",{className:ai(r.select),onChange:function(e){return i(e.target.value)},value:"".concat(t)},n.map(function(e){return kn("option",{className:ai(r.option),key:e.label+e.value,value:"".concat(e.value)},e.label)}))}var Oi=Ze({name:"hits-per-page"}),Ai=pt("HitsPerPage"),Hi={empty:"No results",showPreviousText:"Show previous results",showMoreText:"Show more results",item:function(e){return JSON.stringify(e,null,2)}},Di=Ze({name:"infinite-hits"}),Wi=pt("InfiniteHits"),Bi=Zn(function(e){var t=e.results,n=e.hits,r=e.bindEvent,i=e.hasShowPrevious,a=e.showPrevious,s=e.showMore,o=e.isFirstPage,c=e.isLastPage,u=e.cssClasses,l=e.templateProps;return 0===t.hits.length?kn(si,d({},l,{templateKey:"empty",rootProps:{className:ai(u.root,u.emptyRoot)},data:t})):kn("div",{className:u.root},i&&kn(si,d({},l,{templateKey:"showPreviousText",rootTagName:"button",rootProps:{className:ai(u.loadPrevious,M({},u.disabledLoadPrevious,o)),disabled:o,onClick:a}})),kn("ol",{className:u.list},n.map(function(e,t){return kn(si,d({},l,{templateKey:"item",rootTagName:"li",rootProps:{className:u.item},key:e.objectID,data:D({},e,{__hitIndex:t}),bindEvent:r}))})),kn(si,d({},l,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:ai(u.loadMore,M({},u.disabledLoadMore,c)),disabled:c,onClick:s}})))}),Ui={item:'<a class="{{cssClasses.link}}" href="{{url}}"><span class="{{cssClasses.label}}">{{label}}</span><span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span></a>',showMoreText:"\n {{#isShowingMore}}\n Show less\n {{/isShowingMore}}\n {{^isShowingMore}}\n Show more\n {{/isShowingMore}}\n "},Qi=Ze({name:"menu"}),qi=pt("Menu");var $i={reset:'\n<svg class="{{cssClasses.resetIcon}}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="10" height="10">\n <path d="M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"></path>\n</svg>\n ',submit:'\n<svg class="{{cssClasses.submitIcon}}" xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 40 40">\n <path d="M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"></path>\n</svg>\n ',loadingIndicator:'\n<svg class="{{cssClasses.loadingIcon}}" width="16" height="16" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#444">\n <g fill="none" fillRule="evenodd">\n <g transform="translate(1 1)" strokeWidth="2">\n <circle strokeOpacity=".5" cx="18" cy="18" r="18" />\n <path d="M36 18c0-9.94-8.06-18-18-18">\n <animateTransform\n attributeName="transform"\n type="rotate"\n from="0 18 18"\n to="360 18 18"\n dur="1s"\n repeatCount="indefinite"\n />\n </path>\n </g>\n </g>\n</svg>\n '},Vi={item:'<label class="{{cssClasses.label}}">\n <input type="checkbox"\n class="{{cssClasses.checkbox}}"\n value="{{value}}"\n {{#isRefined}}checked{{/isRefined}} />\n <span class="{{cssClasses.labelText}}">{{#isFromSearch}}{{{highlighted}}}{{/isFromSearch}}{{^isFromSearch}}{{highlighted}}{{/isFromSearch}}</span>\n <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>\n</label>',showMoreText:"\n {{#isShowingMore}}\n Show less\n {{/isShowingMore}}\n {{^isShowingMore}}\n Show more\n {{/isShowingMore}}\n ",searchableNoResults:"No results",searchableReset:$i.reset,searchableSubmit:$i.submit,searchableLoadingIndicator:$i.loadingIndicator},Ki=Ze({name:"refinement-list"}),zi=pt("RefinementList"),Ji=pt("SearchBox");var Yi={item:'<label class="{{cssClasses.label}}">\n <input type="radio" class="{{cssClasses.radio}}" name="{{attribute}}"{{#isRefined}} checked{{/isRefined}} />\n <span class="{{cssClasses.labelText}}">{{label}}</span>\n</label>'},Gi=Ze({name:"numeric-menu"}),Zi=pt("NumericMenu");function Xi(e){var t=e.cssClasses,n=e.label,r=e.ariaLabel,i=e.url,a=e.isDisabled,s=e.handleClick,o=e.pageNumber;return kn("li",{className:t.item},a?kn("span",{className:t.link,dangerouslySetInnerHTML:{__html:n}}):kn("a",{className:t.link,"aria-label":r,href:i,onClick:function(e){return s(o,e)},dangerouslySetInnerHTML:{__html:n}}))}var ea=function(){function a(){var e,n;k(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return M(H(n=W(this,(e=O(a)).call.apply(e,[this].concat(r)))),"handleClick",function(e,t){le(t)||(t.preventDefault(),n.props.setCurrentPage(e))}),n}return j(a,jn),L(a,[{key:"pageLink",value:function(e){var t=e.label,n=e.ariaLabel,r=e.pageNumber,i=e.additionalClassName,a=void 0===i?null:i,s=e.isDisabled,o=void 0!==s&&s,c=e.isSelected,u=void 0!==c&&c,l=e.createURL,h={item:ai(this.props.cssClasses.item,a),link:this.props.cssClasses.link};o?h.item=ai(h.item,this.props.cssClasses.disabledItem):u&&(h.item=ai(h.item,this.props.cssClasses.selectedItem));var d=l&&!o?l(r):"#";return kn(Xi,{ariaLabel:n,cssClasses:h,handleClick:this.handleClick,isDisabled:o,key:t+r+n,label:t,pageNumber:r,url:d})}},{key:"previousPageLink",value:function(e){var t=e.isFirstPage,n=e.currentPage,r=e.createURL;return this.pageLink({ariaLabel:"Previous",additionalClassName:this.props.cssClasses.previousPageItem,isDisabled:t,label:this.props.templates.previous,pageNumber:n-1,createURL:r})}},{key:"nextPageLink",value:function(e){var t=e.isLastPage,n=e.currentPage,r=e.createURL;return this.pageLink({ariaLabel:"Next",additionalClassName:this.props.cssClasses.nextPageItem,isDisabled:t,label:this.props.templates.next,pageNumber:n+1,createURL:r})}},{key:"firstPageLink",value:function(e){var t=e.isFirstPage,n=e.createURL;return this.pageLink({ariaLabel:"First",additionalClassName:this.props.cssClasses.firstPageItem,isDisabled:t,label:this.props.templates.first,pageNumber:0,createURL:n})}},{key:"lastPageLink",value:function(e){var t=e.isLastPage,n=e.nbPages,r=e.createURL;return this.pageLink({ariaLabel:"Last",additionalClassName:this.props.cssClasses.lastPageItem,isDisabled:t,label:this.props.templates.last,pageNumber:n-1,createURL:r})}},{key:"pages",value:function(e){var t=this,n=e.currentPage,r=e.pages,i=e.createURL;return r.map(function(e){return t.pageLink({ariaLabel:e+1,additionalClassName:t.props.cssClasses.pageItem,isSelected:e===n,label:e+1,pageNumber:e,createURL:i})})}},{key:"render",value:function(){return kn("div",{className:ai(this.props.cssClasses.root,M({},this.props.cssClasses.noRefinementRoot,this.props.nbPages<=1))},kn("ul",{className:this.props.cssClasses.list},this.props.showFirst&&this.firstPageLink(this.props),this.props.showPrevious&&this.previousPageLink(this.props),this.pages(this.props),this.props.showNext&&this.nextPageLink(this.props),this.props.showLast&&this.lastPageLink(this.props)))}}]),a}();ea.defaultProps={nbHits:0,currentPage:0,nbPages:0};var ta=Ze({name:"pagination"}),na=pt("Pagination"),ra={previous:"",next:"",first:"«",last:"»"};var ia=function(){function t(e){var n;return k(this,t),M(H(n=W(this,O(t).call(this,e))),"onInput",function(t){return function(e){n.setState(M({},t,e.currentTarget.value))}}),M(H(n),"onSubmit",function(e){e.preventDefault(),n.props.refine([n.state.min&&Number(n.state.min),n.state.max&&Number(n.state.max)])}),n.state={min:e.values.min,max:e.values.max},n}return j(t,jn),L(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({min:e.values.min,max:e.values.max})}},{key:"render",value:function(){var e=this.state,t=e.min,n=e.max,r=this.props,i=r.min,a=r.max,s=r.step,o=r.cssClasses,c=r.templateProps,u=a<=i,l=Boolean(t||n);return kn("div",{className:ai(o.root,M({},o.noRefinement,!l))},kn("form",{className:o.form,onSubmit:this.onSubmit},kn("label",{className:o.label},kn("input",{className:ai(o.input,o.inputMin),type:"number",min:i,max:a,step:s,value:null!=t?t:"",onInput:this.onInput("min"),placeholder:i,disabled:u})),kn(si,d({},c,{templateKey:"separatorText",rootTagName:"span",rootProps:{className:o.separator}})),kn("label",{className:o.label},kn("input",{className:ai(o.input,o.inputMax),type:"number",min:i,max:a,step:s,value:null!=n?n:"",onInput:this.onInput("max"),placeholder:a,disabled:u})),kn(si,d({},c,{templateKey:"submitText",rootTagName:"button",rootProps:{type:"submit",className:o.submit,disabled:u}}))))}}]),t}(),aa=Ze({name:"range-input"}),sa=pt("RangeInput");var oa=Ze({name:"search-box"}),ca=pt("SearchBox");var ua=40,la=35,ha=27,da=36,fa=37,ma=34,pa=33,ga=39,va=38,ya=100;function ba(e,t,n){return(e-t)/(n-t)*100}function Ra(e,t,n){var r=e/100;return 0===e?t:100===e?n:Math.round((n-t)*r+t)}function Sa(e){return["rheostat","vertical"===e.orientation?"rheostat-vertical":"rheostat-horizontal"].concat(e.className.split(" ")).join(" ")}function wa(e){return Number(e.currentTarget.getAttribute("data-handle-key"))}function Pa(e){e.stopPropagation(),e.preventDefault()}var xa=function(){function e(){return k(this,e),W(this,O(e).apply(this,arguments))}return j(e,jn),L(e,[{key:"render",value:function(){return kn("button",d({},this.props,{type:"button"}))}}]),e}(),Na=kn("div",{className:"rheostat-background"}),_a=function(){function n(e){var t;return k(this,n),M(H(t=W(this,O(n).call(this,e))),"state",{className:Sa(t.props),handlePos:t.props.values.map(function(e){return ba(e,t.props.min,t.props.max)}),handleDimensions:0,mousePos:null,sliderBox:{},slidingIndex:null,values:t.props.values}),t.getPublicState=t.getPublicState.bind(H(t)),t.getSliderBoundingBox=t.getSliderBoundingBox.bind(H(t)),t.getProgressStyle=t.getProgressStyle.bind(H(t)),t.getMinValue=t.getMinValue.bind(H(t)),t.getMaxValue=t.getMaxValue.bind(H(t)),t.getHandleDimensions=t.getHandleDimensions.bind(H(t)),t.getClosestSnapPoint=t.getClosestSnapPoint.bind(H(t)),t.getSnapPosition=t.getSnapPosition.bind(H(t)),t.getNextPositionForKey=t.getNextPositionForKey.bind(H(t)),t.getNextState=t.getNextState.bind(H(t)),t.handleClick=t.handleClick.bind(H(t)),t.getClosestHandle=t.getClosestHandle.bind(H(t)),t.setStartSlide=t.setStartSlide.bind(H(t)),t.startMouseSlide=t.startMouseSlide.bind(H(t)),t.startTouchSlide=t.startTouchSlide.bind(H(t)),t.handleMouseSlide=t.handleMouseSlide.bind(H(t)),t.handleTouchSlide=t.handleTouchSlide.bind(H(t)),t.handleSlide=t.handleSlide.bind(H(t)),t.endSlide=t.endSlide.bind(H(t)),t.handleKeydown=t.handleKeydown.bind(H(t)),t.validatePosition=t.validatePosition.bind(H(t)),t.validateValues=t.validateValues.bind(H(t)),t.canMove=t.canMove.bind(H(t)),t.fireChangeEvent=t.fireChangeEvent.bind(H(t)),t.slideTo=t.slideTo.bind(H(t)),t.updateNewValues=t.updateNewValues.bind(H(t)),t}return j(n,jn),L(n,[{key:"componentWillReceiveProps",value:function(n){var e=this.props,t=e.className,r=e.disabled,i=e.min,a=e.max,s=e.orientation,o=this.state,c=o.values,u=o.slidingIndex,l=n.min!==i||n.max!==a,h=c.length!==n.values.length||c.some(function(e,t){return n.values[t]!==e}),d=n.className!==t||n.orientation!==s,f=n.disabled&&!r;d&&this.setState({className:Sa(n)}),(l||h)&&this.updateNewValues(n),f&&null!==u&&this.endSlide()}},{key:"getPublicState",value:function(){var e=this.props,t=e.min;return{max:e.max,min:t,values:this.state.values}}},{key:"getSliderBoundingBox",value:function(){var e=this.rheostat.getDOMNode?this.rheostat.getDOMNode():this.rheostat,t=e.getBoundingClientRect();return{height:t.height||e.clientHeight,left:t.left,top:t.top,width:t.width||e.clientWidth}}},{key:"getProgressStyle",value:function(e){var t=this.state.handlePos,n=t[e];if(0===e)return"vertical"===this.props.orientation?{height:"".concat(n,"%"),top:0}:{left:0,width:"".concat(n,"%")};var r=t[e-1],i=n-r;return"vertical"===this.props.orientation?{height:"".concat(i,"%"),top:"".concat(r,"%")}:{left:"".concat(r,"%"),width:"".concat(i,"%")}}},{key:"getMinValue",value:function(e){return this.state.values[e-1]?Math.max(this.props.min,this.state.values[e-1]):this.props.min}},{key:"getMaxValue",value:function(e){return this.state.values[e+1]?Math.min(this.props.max,this.state.values[e+1]):this.props.max}},{key:"getHandleDimensions",value:function(e,t){var n=e.currentTarget||null;return n?"vertical"===this.props.orientation?n.clientHeight/t.height*ya/2:n.clientWidth/t.width*ya/2:0}},{key:"getClosestSnapPoint",value:function(n){return this.props.snapPoints.length?this.props.snapPoints.reduce(function(e,t){return Math.abs(e-n)<Math.abs(t-n)?e:t}):n}},{key:"getSnapPosition",value:function(e){if(!this.props.snap)return e;var t=this.props,n=t.max,r=t.min,i=Ra(e,r,n);return ba(this.getClosestSnapPoint(i),r,n)}},{key:"getNextPositionForKey",value:function(e,t){var n,r=this.state,i=r.handlePos,a=r.values,s=this.props,o=s.max,c=s.min,u=s.snapPoints,l=this.props.snap,h=a[e],d=i[e],f=d,m=1;100<=o?d=Math.round(d):m=100/(o-c);var p=null;l&&(p=u.indexOf(this.getClosestSnapPoint(a[e])));var g=(M(n={},fa,function(e){return-1*e}),M(n,ga,function(e){return e}),M(n,va,function(e){return e}),M(n,ua,function(e){return-1*e}),M(n,ma,function(e){return 1<e?-e:-10*e}),M(n,pa,function(e){return 1<e?e:10*e}),n);if(Object.prototype.hasOwnProperty.call(g,t))d+=g[t](m),l&&(f<d?p<u.length-1&&(h=u[p+1]):0<p&&(h=u[p-1]));else if(t===da)d=0,l&&(h=u[0]);else{if(t!==la)return null;d=ya,l&&(h=u[u.length-1])}return l?ba(h,c,o):d}},{key:"getNextState",value:function(n,e){var t=this.state.handlePos,r=this.props,i=r.max,a=r.min,s=this.validatePosition(n,e),o=t.map(function(e,t){return t===n?s:e});return{handlePos:o,values:o.map(function(e){return Ra(e,a,i)})}}},{key:"getClosestHandle",value:function(r){var i=this.state.handlePos;return i.reduce(function(e,t,n){return Math.abs(i[n]-r)<Math.abs(i[e]-r)?n:e},0)}},{key:"setStartSlide",value:function(e,t,n){var r=this.getSliderBoundingBox();this.setState({handleDimensions:this.getHandleDimensions(e,r),mousePos:{x:t,y:n},sliderBox:r,slidingIndex:wa(e)})}},{key:"startMouseSlide",value:function(e){this.setStartSlide(e,e.clientX,e.clientY),"function"==typeof document.addEventListener?(document.addEventListener("mousemove",this.handleMouseSlide,!1),document.addEventListener("mouseup",this.endSlide,!1)):(document.attachEvent("onmousemove",this.handleMouseSlide),document.attachEvent("onmouseup",this.endSlide)),Pa(e)}},{key:"startTouchSlide",value:function(e){if(!(1<e.changedTouches.length)){var t=e.changedTouches[0];this.setStartSlide(e,t.clientX,t.clientY),document.addEventListener("touchmove",this.handleTouchSlide,!1),document.addEventListener("touchend",this.endSlide,!1),this.props.onSliderDragStart&&this.props.onSliderDragStart(),Pa(e)}}},{key:"handleMouseSlide",value:function(e){null!==this.state.slidingIndex&&(this.handleSlide(e.clientX,e.clientY),Pa(e))}},{key:"handleTouchSlide",value:function(e){if(null!==this.state.slidingIndex)if(1<e.changedTouches.length)this.endSlide();else{var t=e.changedTouches[0];this.handleSlide(t.clientX,t.clientY),Pa(e)}}},{key:"handleSlide",value:function(e,t){var n=this.state,r=n.slidingIndex,i=n.sliderBox,a="vertical"===this.props.orientation?(t-i.top)/i.height*ya:(e-i.left)/i.width*ya;this.slideTo(r,a),this.canMove(r,a)&&(this.setState({x:e,y:t}),this.props.onSliderDragMove&&this.props.onSliderDragMove())}},{key:"endSlide",value:function(){var e=this,t=this.state.slidingIndex;if(this.setState({slidingIndex:null}),"function"==typeof document.removeEventListener?(document.removeEventListener("mouseup",this.endSlide,!1),document.removeEventListener("touchend",this.endSlide,!1),document.removeEventListener("touchmove",this.handleTouchSlide,!1),document.removeEventListener("mousemove",this.handleMouseSlide,!1)):(document.detachEvent("onmousemove",this.handleMouseSlide),document.detachEvent("onmouseup",this.endSlide)),this.props.onSliderDragEnd&&this.props.onSliderDragEnd(),this.props.snap){var n=this.getSnapPosition(this.state.handlePos[t]);this.slideTo(t,n,function(){return e.fireChangeEvent()})}else this.fireChangeEvent()}},{key:"handleClick",value:function(e){var t=this;if(!e.target.getAttribute("data-handle-key")){var n=this.getSliderBoundingBox(),r=("vertical"===this.props.orientation?(e.clientY-n.top)/n.height:(e.clientX-n.left)/n.width)*ya,i=this.getClosestHandle(r),a=this.getSnapPosition(r);this.slideTo(i,a,function(){return t.fireChangeEvent()}),this.props.onClick&&this.props.onClick()}}},{key:"handleKeydown",value:function(e){var t=this,n=wa(e);if(e.keyCode!==ha){var r=this.getNextPositionForKey(n,e.keyCode);null!==r&&(this.canMove(n,r)&&(this.slideTo(n,r,function(){return t.fireChangeEvent()}),this.props.onKeyPress&&this.props.onKeyPress()),Pa(e))}else e.currentTarget.blur()}},{key:"validatePosition",value:function(e,t){var n=this.state,r=n.handlePos,i=n.handleDimensions;return Math.max(Math.min(t,void 0!==r[e+1]?r[e+1]-i:ya),void 0!==r[e-1]?r[e-1]+i:0)}},{key:"validateValues",value:function(e,t){var n=t||this.props,i=n.max,a=n.min;return e.map(function(e,t,n){var r=Math.max(Math.min(e,i),a);return n.length&&r<n[t-1]?n[t-1]:r})}},{key:"canMove",value:function(e,t){var n=this.state,r=n.handlePos,i=n.handleDimensions;return!(t<0)&&(!(ya<t)&&(!((void 0!==r[e+1]?r[e+1]-i:1/0)<t)&&!(t<(void 0!==r[e-1]?r[e-1]+i:-1/0))))}},{key:"fireChangeEvent",value:function(){var e=this.props.onChange;e&&e(this.getPublicState())}},{key:"slideTo",value:function(e,t,n){var r=this,i=this.getNextState(e,t);this.setState(i,function(){var e=r.props.onValuesUpdated;e&&e(r.getPublicState()),n&&n()})}},{key:"updateNewValues",value:function(e){var t=this;if(null===this.state.slidingIndex){var n=e.max,r=e.min,i=e.values,a=this.validateValues(i,e);this.setState({handlePos:a.map(function(e){return ba(e,r,n)}),values:a},function(){return t.fireChangeEvent()})}}},{key:"render",value:function(){var r=this,e=this.props,t=e.children,i=e.disabled,a=e.handle,s=e.max,o=e.min,c=e.orientation,u=e.pitComponent,n=e.pitPoints,l=e.progressBar,h=this.state,d=h.className,f=h.handlePos,m=h.values;return kn("div",{className:d,ref:function(e){r.rheostat=e},onClick:!i&&this.handleClick,style:{position:"relative"}},Na,f.map(function(e,t){var n="vertical"===c?{top:"".concat(e,"%"),position:"absolute"}:{left:"".concat(e,"%"),position:"absolute"};return kn(a,{"aria-valuemax":r.getMaxValue(t),"aria-valuemin":r.getMinValue(t),"aria-valuenow":m[t],"aria-disabled":i,"data-handle-key":t,className:"rheostat-handle",key:"handle-".concat(t),onClick:r.killEvent,onKeyDown:!i&&r.handleKeydown,onMouseDown:!i&&r.startMouseSlide,onTouchStart:!i&&r.startTouchSlide,role:"slider",style:n,tabIndex:0})}),f.map(function(e,t,n){return 0===t&&1<n.length?null:kn(l,{className:"rheostat-progress",key:"progress-bar-".concat(t),style:r.getProgressStyle(t)})}),u&&n.map(function(e){var t=ba(e,o,s),n="vertical"===c?{top:"".concat(t,"%"),position:"absolute"}:{left:"".concat(t,"%"),position:"absolute"};return kn(u,{key:"pit-".concat(e),style:n},e)}),t)}}]),n}();M(_a,"defaultProps",{className:"",children:null,disabled:!1,handle:xa,max:ya,min:0,onClick:null,onChange:null,onKeyPress:null,onSliderDragEnd:null,onSliderDragMove:null,onSliderDragStart:null,onValuesUpdated:null,orientation:"horizontal",pitComponent:null,pitPoints:[],progressBar:"div",snap:!1,snapPoints:[],values:[0]});function Ia(e){var t=e.style,n=e.children,r=Math.round(parseFloat(t.left)),i=[0,50,100].includes(r),a=Array.isArray(n)?n[0]:n,s=Math.round(100*parseInt(a,10))/100;return kn("div",{style:D({},t,{marginLeft:100===r?"-2px":0}),className:ai("rheostat-marker","rheostat-marker-horizontal",{"rheostat-marker-large":i})},i&&kn("div",{className:"rheostat-value"},s))}var Fa=function(){function a(){var e,n;k(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return M(H(n=W(this,(e=O(a)).call.apply(e,[this].concat(r)))),"handleChange",function(e){var t=e.values;n.isDisabled||n.props.refine(t)}),M(H(n),"createHandleComponent",function(r){return function(e){var t=Math.round(100*parseFloat(e["aria-valuenow"]))/100,n=r&&r.format?r.format(t):t;return kn("div",d({},e,{className:ai(e.className,{"rheostat-handle-lower":0===e["data-handle-key"],"rheostat-handle-upper":1===e["data-handle-key"]})}),r&&kn("div",{className:"rheostat-tooltip"},n))}}),n}return j(a,jn),L(a,[{key:"computeDefaultPitPoints",value:function(e){var t=e.min,n=e.max,r=(n-t)/34;return[t].concat(P(Ce({end:33}).map(function(e){return t+r*(e+1)})),[n])}},{key:"computeSnapPoints",value:function(e){var t=e.min,n=e.max,r=e.step;if(r)return[].concat(P(Ce({start:t,end:n,step:r})),[n])}},{key:"render",value:function(){var e=this.props,t=e.tooltips,n=e.step,r=e.pips,i=e.values,a=e.cssClasses,s=this.isDisabled?{min:this.props.min,max:this.props.max+.001}:this.props,o=s.min,c=s.max,u=this.computeSnapPoints({min:o,max:c,step:n}),l=!1===r?[]:this.computeDefaultPitPoints({min:o,max:c});return kn("div",{className:ai(a.root,M({},a.disabledRoot,this.isDisabled))},kn(_a,{handle:this.createHandleComponent(t),onChange:this.handleChange,min:o,max:c,pitComponent:Ia,pitPoints:l,snap:!0,snapPoints:u,values:this.isDisabled?[o,c]:i,disabled:this.isDisabled}))}},{key:"isDisabled",get:function(){return this.props.min>=this.props.max}}]),a}(),Ca=Ze({name:"range-slider"}),Ta=pt("RangeSlider");var Ea=Ze({name:"sort-by"}),ka=pt("SortBy");var La={item:'{{#count}}<a class="{{cssClasses.link}}" aria-label="{{value}} & up" href="{{href}}">{{/count}}{{^count}}<div class="{{cssClasses.link}}" aria-label="{{value}} & up" disabled>{{/count}}\n {{#stars}}<svg class="{{cssClasses.starIcon}} {{#.}}{{cssClasses.fullStarIcon}}{{/.}}{{^.}}{{cssClasses.emptyStarIcon}}{{/.}}" aria-hidden="true" width="24" height="24">\n {{#.}}<use xlink:href="#ais-RatingMenu-starSymbol"></use>{{/.}}{{^.}}<use xlink:href="#ais-RatingMenu-starEmptySymbol"></use>{{/.}}\n </svg>{{/stars}}\n <span class="{{cssClasses.label}}">& Up</span>\n {{#count}}<span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>{{/count}}\n{{#count}}</a>{{/count}}{{^count}}</div>{{/count}}'},Ma=Ze({name:"rating-menu"}),ja=pt("RatingMenu"),Oa=kn("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"}),Aa=kn("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"});function Ha(e){var t=e.nbHits,n=e.hitsPerPage,r=e.nbPages,i=e.page,a=e.processingTimeMS,s=e.query,o=e.templateProps,c=e.cssClasses;return kn("div",{className:c.root},kn(si,d({},o,{templateKey:"text",rootTagName:"span",rootProps:{className:c.text},data:{hasManyResults:1<t,hasNoResults:0===t,hasOneResult:1===t,hitsPerPage:n,nbHits:t,nbPages:r,page:i,processingTimeMS:a,query:s,cssClasses:c}})))}var Da={text:"{{#hasNoResults}}No results{{/hasNoResults}}\n {{#hasOneResult}}1 result{{/hasOneResult}}\n {{#hasManyResults}}{{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}} results{{/hasManyResults}} found in {{processingTimeMS}}ms"},Wa=Ze({name:"stats"}),Ba=pt("Stats");function Ua(e){var t=e.currentRefinement,n=e.refine,r=e.cssClasses,i=e.templateProps;return kn("div",{className:r.root},kn("label",{className:r.label},kn("input",{className:r.checkbox,type:"checkbox",checked:t.isRefined,onChange:function(e){return n(!e.target.checked)}}),kn(si,d({},i,{rootTagName:"span",rootProps:{className:r.labelText},templateKey:"labelText",data:t}))))}var Qa={labelText:"{{name}}"},qa=Ze({name:"toggle-refinement"}),$a=pt("ToggleRefinement");function Va(e){var r=e.items,i=e.cssClasses,a=e.templateProps,s=e.createURL,o=e.refine;return kn("div",{className:ai(i.root,M({},i.noRefinementRoot,0===r.length))},kn("ul",{className:i.list},kn("li",{className:ai(i.item,M({},i.selectedItem,0===r.length))},kn(si,d({},a,{templateKey:"home",rootTagName:"a",rootProps:{className:i.link,href:s(void 0),onClick:function(e){e.preventDefault(),o(void 0)}}}))),r.map(function(t,e){var n=e===r.length-1;return kn("li",{key:t.label+e,className:ai(i.item,M({},i.selectedItem,n))},kn(si,d({},a,{templateKey:"separator",rootTagName:"span",rootProps:{className:i.separator,"aria-hidden":!0}})),n?t.label:kn("a",{className:i.link,href:s(t.value),onClick:function(e){e.preventDefault(),o(t.value)}},t.label))})))}var Ka=Ze({name:"analytics"}),za={home:"Home",separator:">"},Ja=Ze({name:"breadcrumb"}),Ya=pt("Breadcrumb");function Ga(e){var t=e.cssClasses,n=e.templateProps,r=e.items,i=e.refine,a=(ye(r,function(e){return e.isRefined})||{value:""}).value;return kn("div",{className:ai(t.root,M({},t.noRefinementRoot,0===r.length))},kn("select",{className:t.select,value:a,onChange:function(e){i(e.target.value)}},kn(si,d({},n,{templateKey:"defaultOption",rootTagName:"option",rootProps:{value:"",className:t.option}})),r.map(function(e){return kn(si,d({},n,{templateKey:"item",rootTagName:"option",rootProps:{value:e.value,className:t.option},key:e.value,data:e}))})))}var Za={item:"{{label}} ({{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}})",defaultOption:"See all"},Xa=Ze({name:"menu-select"}),es=pt("MenuSelect");function ts(e){var t=e.url,n=e.theme,r=e.cssClasses;return kn("div",{className:r.root},kn("a",{href:t,target:"_blank",className:r.link,"aria-label":"Search by Algolia",rel:"noopener noreferrer"},kn("svg",{height:"1.2em",className:r.logo,viewBox:"0 0 168 24",style:{width:"auto"}},kn("path",{fill:"dark"===n?"#FFF":"#5D6494",d:"M6.97 6.68V8.3a4.47 4.47 0 00-2.42-.67 2.2 2.2 0 00-1.38.4c-.34.26-.5.6-.5 1.02 0 .43.16.77.49 1.03.33.25.83.53 1.51.83a7.04 7.04 0 011.9 1.08c.34.24.58.54.73.89.15.34.23.74.23 1.18 0 .95-.33 1.7-1 2.24a4 4 0 01-2.6.81 5.71 5.71 0 01-2.94-.68v-1.71c.84.63 1.81.94 2.92.94.58 0 1.05-.14 1.39-.4.34-.28.5-.65.5-1.13 0-.29-.1-.55-.3-.8a2.2 2.2 0 00-.65-.53 23.03 23.03 0 00-1.64-.78 13.67 13.67 0 01-1.11-.64c-.12-.1-.28-.22-.46-.4a1.72 1.72 0 01-.39-.5 4.46 4.46 0 01-.22-.6c-.07-.23-.1-.48-.1-.75 0-.91.33-1.63 1-2.17a4 4 0 012.57-.8c.97 0 1.8.18 2.47.52zm7.47 5.7v-.3a2.26 2.26 0 00-.5-1.44c-.3-.35-.74-.53-1.32-.53-.53 0-.99.2-1.37.58a2.9 2.9 0 00-.72 1.68h3.91zm1 2.79v1.4c-.6.34-1.38.51-2.36.51a4.02 4.02 0 01-3-1.13 4.04 4.04 0 01-1.11-2.97c0-1.3.34-2.32 1.02-3.06a3.38 3.38 0 012.6-1.1c1.03 0 1.85.32 2.46.96.6.64.9 1.57.9 2.78 0 .33-.03.68-.09 1.04h-5.31c.1.7.4 1.24.89 1.61.49.38 1.1.56 1.85.56.86 0 1.58-.2 2.15-.6zm6.61-1.78h-1.21c-.6 0-1.05.12-1.35.36-.3.23-.46.53-.46.89 0 .37.12.66.36.88.23.2.57.32 1.02.32.5 0 .9-.15 1.2-.43.3-.28.44-.65.44-1.1v-.92zm-4.07-2.55V9.33a4.96 4.96 0 012.5-.55c2.1 0 3.17 1.03 3.17 3.08V17H22.1v-.96c-.42.68-1.15 1.02-2.19 1.02-.76 0-1.38-.22-1.84-.66-.46-.44-.7-1-.7-1.68 0-.78.3-1.38.88-1.81.59-.43 1.4-.65 2.46-.65h1.34v-.46c0-.55-.13-.97-.4-1.25-.26-.29-.7-.43-1.32-.43-.86 0-1.65.24-2.35.72zm9.34-1.93v1.42c.39-1 1.1-1.5 2.12-1.5.15 0 .31.02.5.05v1.53c-.23-.1-.48-.14-.76-.14-.54 0-.99.24-1.34.71a2.8 2.8 0 00-.52 1.71V17h-1.57V8.91h1.57zm5 4.09a3 3 0 00.76 2.01c.47.53 1.14.8 2 .8.64 0 1.24-.18 1.8-.53v1.4c-.53.32-1.2.48-2 .48a3.98 3.98 0 01-4.17-4.18c0-1.16.38-2.15 1.14-2.98a4 4 0 013.1-1.23c.7 0 1.34.15 1.92.44v1.44a3.24 3.24 0 00-1.77-.5A2.65 2.65 0 0032.33 13zm7.92-7.28v4.58c.46-1 1.3-1.5 2.5-1.5.8 0 1.42.24 1.9.73.48.5.72 1.17.72 2.05V17H43.8v-5.1c0-.56-.14-.99-.43-1.29-.28-.3-.65-.45-1.1-.45-.54 0-1 .2-1.42.6-.4.4-.61 1.02-.61 1.85V17h-1.56V5.72h1.56zM55.2 15.74c.6 0 1.1-.25 1.5-.76.4-.5.6-1.16.6-1.95 0-.92-.2-1.62-.6-2.12-.4-.5-.92-.74-1.55-.74-.56 0-1.05.22-1.5.67-.44.45-.66 1.13-.66 2.06 0 .96.22 1.67.64 2.14.43.47.95.7 1.57.7zM53 5.72v4.42a2.74 2.74 0 012.43-1.34c1.03 0 1.86.38 2.51 1.15.65.76.97 1.78.97 3.05 0 1.13-.3 2.1-.92 2.9-.62.81-1.47 1.21-2.54 1.21s-1.9-.45-2.46-1.34V17h-1.58V5.72H53zm9.9 11.1l-3.22-7.9h1.74l1 2.62 1.26 3.42c.1-.32.48-1.46 1.15-3.42l.91-2.63h1.66l-2.92 7.87c-.78 2.07-1.96 3.1-3.56 3.1-.28 0-.53-.02-.73-.07v-1.34c.17.04.35.06.54.06 1.03 0 1.76-.57 2.17-1.7z"}),ns,rs,kn("path",{fill:"dark"===n?"#FFF":"#5468FF",d:"M120.92 18.8c-4.38.02-4.38-3.54-4.38-4.1V1.36l2.67-.42v13.25c0 .32 0 2.36 1.71 2.37v2.24zm-10.84-2.18c.82 0 1.43-.04 1.85-.12v-2.72a5.48 5.48 0 00-1.57-.2c-.3 0-.6.02-.9.07-.3.04-.57.12-.81.24-.24.11-.44.28-.58.49a.93.93 0 00-.22.65c0 .63.22 1 .61 1.23.4.24.94.36 1.62.36zm-.23-9.7c.88 0 1.62.11 2.23.33.6.22 1.09.53 1.44.92.36.4.61.92.76 1.48.16.56.23 1.17.23 1.85v6.87a21.69 21.69 0 01-4.68.5c-.69 0-1.32-.07-1.9-.2a4 4 0 01-1.46-.63 3.3 3.3 0 01-.96-1.13 4.3 4.3 0 01-.34-1.8 3.13 3.13 0 011.43-2.63c.45-.3.95-.5 1.54-.62a8.8 8.8 0 013.79.05v-.44c0-.3-.04-.6-.11-.87a1.78 1.78 0 00-1.1-1.22 3.2 3.2 0 00-1.15-.2 9.75 9.75 0 00-2.95.46l-.33-2.19a11.43 11.43 0 013.56-.53zm52.84 9.63c.82 0 1.43-.05 1.85-.13V13.7a5.42 5.42 0 00-1.57-.2c-.3 0-.6.02-.9.07-.3.04-.57.12-.81.24-.24.12-.44.28-.58.5a.93.93 0 00-.22.65c0 .63.22.99.61 1.23.4.24.94.36 1.62.36zm-.23-9.7c.88 0 1.63.11 2.23.33.6.22 1.1.53 1.45.92.35.39.6.92.76 1.48.15.56.23 1.18.23 1.85v6.88c-.41.08-1.03.19-1.87.31-.83.12-1.77.18-2.81.18-.7 0-1.33-.06-1.9-.2a4 4 0 01-1.47-.63c-.4-.3-.72-.67-.95-1.13a4.3 4.3 0 01-.34-1.8c0-.66.13-1.08.38-1.53.26-.45.61-.82 1.05-1.1.44-.3.95-.5 1.53-.62a8.8 8.8 0 013.8.05v-.43c0-.31-.04-.6-.12-.88-.07-.28-.2-.52-.38-.73a1.78 1.78 0 00-.73-.5c-.3-.1-.68-.2-1.14-.2a9.85 9.85 0 00-2.95.47l-.32-2.19a11.63 11.63 0 013.55-.53zm-8.03-1.27a1.62 1.62 0 000-3.24 1.62 1.62 0 100 3.24zm1.35 13.22h-2.7V7.27l2.7-.42V18.8zm-4.72 0c-4.38.02-4.38-3.54-4.38-4.1l-.01-13.34 2.67-.42v13.25c0 .32 0 2.36 1.72 2.37v2.24zm-8.7-5.9a4.7 4.7 0 00-.74-2.79 2.4 2.4 0 00-2.07-1 2.4 2.4 0 00-2.06 1 4.7 4.7 0 00-.74 2.8c0 1.16.25 1.94.74 2.62a2.4 2.4 0 002.07 1.02c.88 0 1.57-.34 2.07-1.02a4.2 4.2 0 00.73-2.63zm2.74 0a6.46 6.46 0 01-1.52 4.23c-.49.53-1.07.94-1.76 1.22-.68.29-1.73.45-2.26.45a6.6 6.6 0 01-2.25-.45 5.1 5.1 0 01-2.88-3.13 7.3 7.3 0 01-.01-4.84 5.13 5.13 0 012.9-3.1 5.67 5.67 0 012.22-.42c.81 0 1.56.14 2.24.42.69.29 1.28.69 1.75 1.22.49.52.87 1.15 1.14 1.89a7 7 0 01.43 2.5zm-20.14 0c0 1.11.25 2.36.74 2.88.5.52 1.13.78 1.91.78a4.07 4.07 0 002.12-.6V9.33c-.19-.04-.99-.2-1.76-.23a2.67 2.67 0 00-2.23 1 4.73 4.73 0 00-.78 2.8zm7.44 5.27c0 1.82-.46 3.16-1.4 4-.94.85-2.37 1.27-4.3 1.27-.7 0-2.17-.13-3.34-.4l.43-2.11c.98.2 2.27.26 2.95.26 1.08 0 1.84-.22 2.3-.66.46-.43.68-1.08.68-1.94v-.44a5.2 5.2 0 01-2.54.6 5.6 5.6 0 01-2.01-.36 4.2 4.2 0 01-2.58-2.71 9.88 9.88 0 01.02-5.35 4.92 4.92 0 012.93-2.96 6.6 6.6 0 012.43-.46 19.64 19.64 0 014.43.66v10.6z"}))))}var ns=kn("path",{fill:"#5468FF",d:"M78.99.94h16.6a2.97 2.97 0 012.96 2.96v16.6a2.97 2.97 0 01-2.97 2.96h-16.6a2.97 2.97 0 01-2.96-2.96V3.9A2.96 2.96 0 0179 .94"}),rs=kn("path",{fill:"#FFF",d:"M89.63 5.97v-.78a.98.98 0 00-.98-.97h-2.28a.98.98 0 00-.97.97V6c0 .09.08.15.17.13a7.13 7.13 0 013.9-.02c.08.02.16-.04.16-.13m-6.25 1L83 6.6a.98.98 0 00-1.38 0l-.46.46a.97.97 0 000 1.38l.38.39c.06.06.15.04.2-.02a7.49 7.49 0 011.63-1.62c.07-.04.08-.14.02-.2m4.16 2.45v3.34c0 .1.1.17.2.12l2.97-1.54c.06-.03.08-.12.05-.18a3.7 3.7 0 00-3.08-1.87c-.07 0-.14.06-.14.13m0 8.05a4.49 4.49 0 110-8.98 4.49 4.49 0 010 8.98m0-10.85a6.37 6.37 0 100 12.74 6.37 6.37 0 000-12.74"}),is=pt("PoweredBy"),as=Ze({name:"powered-by"});var ss,os,cs=[],us=wn.__r;wn.__r=function(e){us&&us(e),ss=0,(os=e.__c).__H&&(os.__H.t=ys(os.__H.t))};var ls=wn.diffed;wn.diffed=function(e){ls&&ls(e);var t=e.__c;if(t){var n=t.__H;n&&(n.u=(n.u.some(function(e){e.ref&&(e.ref.current=e.createHandle())}),[]),n.i=ys(n.i))}};var hs=wn.unmount;function ds(e){wn.__h&&wn.__h(os);var t=os.__H||(os.__H={o:[],t:[],i:[],u:[]});return e>=t.o.length&&t.o.push({}),t.o[e]}function fs(e){return function(n,e,t){var r=ds(ss++);return r.__c||(r.__c=os,r.v=[t?t(e):ws(void 0,e),function(e){var t=n(r.v[0],e);r.v[0]!==t&&(r.v[0]=t,r.__c.setState({}))}]),r.v}(ws,e)}function ms(e){return function(e,t){var n=ds(ss++);return Ss(n.m,t)?(n.m=t,n.p=e,n.v=e()):n.v}(function(){return{current:e}},[])}wn.unmount=function(e){hs&&hs(e);var t=e.__c;if(t){var n=t.__H;n&&n.o.forEach(function(e){return e.l&&e.l()})}};var ps=function(){};function gs(){cs.some(function(e){e.s=!1,e.__P&&(e.__H.t=ys(e.__H.t))}),cs=[]}if("undefined"!=typeof window){var vs=wn.requestAnimationFrame;ps=function(e){(!e.s&&(e.s=!0)&&1===cs.push(e)||vs!==wn.requestAnimationFrame)&&(vs=wn.requestAnimationFrame,(wn.requestAnimationFrame||function(e){function t(){clearTimeout(n),cancelAnimationFrame(r),setTimeout(e)}var n=setTimeout(t,100),r=requestAnimationFrame(t)})(gs))}}function ys(e){return e.forEach(bs),e.forEach(Rs),[]}function bs(e){e.l&&e.l()}function Rs(e){var t=e.v();"function"==typeof t&&(e.l=t)}function Ss(n,e){return!n||e.some(function(e,t){return e!==n[t]})}function ws(e,t){return"function"==typeof t?t(e):t}function Ps(e){var t,n=B(fs(e.isCollapsed),2),r=n[0],i=n[1],a=B(fs(!1),2),s=a[0],o=a[1],c=ms(null);return function(e,t){var n=ds(ss++);Ss(n.m,t)&&(n.v=e,n.m=t,os.__H.t.push(n),ps(os))}(function(){if(c.current)return c.current.appendChild(e.bodyElement),function(){c.current.removeChild(e.bodyElement)}},[c,e.bodyElement]),s||e.isCollapsed===r||i(e.isCollapsed),kn("div",{className:ai(e.cssClasses.root,(t={},M(t,e.cssClasses.noRefinementRoot,e.hidden),M(t,e.cssClasses.collapsibleRoot,e.collapsible),M(t,e.cssClasses.collapsedRoot,r),t)),hidden:e.hidden},e.templates.header&&kn("div",{className:e.cssClasses.header},kn(si,{templates:e.templates,templateKey:"header",rootTagName:"span",data:e.data}),e.collapsible&&kn("button",{className:e.cssClasses.collapseButton,"aria-expanded":!r,onClick:function(e){e.preventDefault(),o(!0),i(function(e){return!e})}},kn(si,{templates:e.templates,templateKey:"collapseButtonText",rootTagName:"span",data:{collapsed:r}}))),kn("div",{className:e.cssClasses.body,ref:c}),e.templates.footer&&kn(si,{templates:e.templates,templateKey:"footer",rootProps:{className:e.cssClasses.footer},data:e.data}))}function xs(e){var t=e.cssClasses,n=e.isBrowserSupported,r=e.isListening,i=e.toggleListening,a=e.voiceListeningState,s=e.templates,o=a.status,c=a.transcript,u=a.isSpeechFinal,l=a.errorCode;return kn("div",{className:t.root},kn(si,{templateKey:"buttonText",rootTagName:"button",rootProps:{className:t.button,type:"button",title:"Search by voice".concat(n?"":" (not supported on this browser)"),onClick:function(e){e.currentTarget.blur(),i()},disabled:!n},data:{status:o,errorCode:l,isListening:r,transcript:c,isSpeechFinal:u,isBrowserSupported:n},templates:s}),kn(si,{templateKey:"status",rootProps:{className:t.status},data:{status:o,errorCode:l,isListening:r,transcript:c,isSpeechFinal:u,isBrowserSupported:n},templates:s}))}function Ns(e){var t=e.isBrowserSupported,n=e.isListening,r=e.toggleListening,i=e.voiceListeningState,a=e.widgetParams,s=a.container,o=a.cssClasses,c=a.templates;Yn(kn(xs,{cssClasses:o,templates:c,isBrowserSupported:t,isListening:n,toggleListening:r,voiceListeningState:i}),s)}function _s(e){var t=e.cssClasses,n=e.templates,r=e.items;return kn(si,{templateKey:"default",templates:n,rootProps:{className:t.root},data:{items:r}})}function Is(e){var t=e.items,n=e.widgetParams,r=n.container,i=n.cssClasses,a=n.templates;Yn(kn(_s,{cssClasses:i,templates:a,items:t}),r)}var Fs=Ze({name:"panel"}),Cs=pt("Panel"),Ts={buttonText:function(e){var t=e.status,n=e.errorCode,r=e.isListening;return'<svg\n xmlns="http://www.w3.org/2000/svg"\n width="16"\n height="16"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n >\n '.concat(function(e,t,n){return"error"===e&&"not-allowed"===t?'<line x1="1" y1="1" x2="23" y2="23"></line>\n <path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path>\n <path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path>\n <line x1="12" y1="19" x2="12" y2="23"></line>\n <line x1="8" y1="23" x2="16" y2="23"></line>':'<path\n d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"\n fill="'.concat(n?"currentColor":"none",'">\n </path>\n <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>\n <line x1="12" y1="19" x2="12" y2="23"></line>\n <line x1="8" y1="23" x2="16" y2="23"></line>')}(t,n,r),"\n </svg>")},status:"<p>{{transcript}}</p>"},Es=Ze({name:"voice-search"}),ks=pt("VoiceSearch"),Ls=Ze({name:"query-rule-custom-data"}),Ms=pt("QueryRuleCustomData"),js=Ze({name:"query-rule-context"}),Os=Object.freeze({__proto__:null,clearRefinements:function(e){var t=e||{},n=t.container,r=t.templates,i=void 0===r?hi:r,a=t.includedAttributes,s=t.excludedAttributes,o=t.transformItems,c=t.cssClasses,u=void 0===c?{}:c;if(!n)throw new Error(di("The `container` option is required."));var l=ue(n),h={root:ai(fi(),u.root),button:ai(fi({descendantName:"button"}),u.button),disabledButton:ai(fi({descendantName:"button",modifierName:"disabled"}),u.disabledButton)},d=function(e){var a=e.containerNode,s=e.cssClasses,o=e.renderState,c=e.templates;return function(e,t){var n=e.refine,r=e.hasRefinements,i=e.instantSearchInstance;t?o.templateProps=de({defaultTemplates:hi,templatesConfig:i.templatesConfig,templates:c}):Yn(kn(oi,{refine:n,cssClasses:s,hasRefinements:r,templateProps:o.templateProps}),a)}}({containerNode:l,cssClasses:h,renderState:{},templates:i});return D({},on(d,function(){return Yn(null,l)})({includedAttributes:a,excludedAttributes:s,transformItems:o}),{$$widgetType:"ais.clearRefinements"})},configure:function(e){return D({},Kr(Ne)({searchParameters:e}),{$$widgetType:"ais.configure"})},EXPERIMENTAL_configureRelatedItems:function(e){return D({},Yr(Ne)(e),{$$widgetType:"ais.configureRelatedItems"})},currentRefinements:function(e){var t=e||{},n=t.container,r=t.includedAttributes,i=t.excludedAttributes,a=t.cssClasses,s=void 0===a?{}:a,o=t.transformItems;if(!n)throw new Error(mi("The `container` option is required."));var c=ue(n),u={root:ai(pi(),s.root),list:ai(pi({descendantName:"list"}),s.list),item:ai(pi({descendantName:"item"}),s.item),label:ai(pi({descendantName:"label"}),s.label),category:ai(pi({descendantName:"category"}),s.category),categoryLabel:ai(pi({descendantName:"categoryLabel"}),s.categoryLabel),delete:ai(pi({descendantName:"delete"}),s.delete)};return D({},ln(ui,function(){return Yn(null,c)})({container:c,cssClasses:u,includedAttributes:r,excludedAttributes:i,transformItems:o}),{$$widgetType:"ais.currentRefinements"})},geoSearch:function(e){var t=e||{},n=t.initialZoom,r=void 0===n?1:n,i=t.initialPosition,a=void 0===i?{lat:0,lng:0}:i,s=t.templates,o=void 0===s?{}:s,c=t.cssClasses,u=void 0===c?{}:c,l=t.builtInMarker,h=void 0===l?{}:l,d=t.customHTMLMarker,f=t.enableRefine,m=void 0===f||f,p=t.enableClearMapRefinement,g=void 0===p||p,v=t.enableRefineControl,y=void 0===v||v,b=t.container,R=t.googleReference,S=A(t,["initialZoom","initialPosition","templates","cssClasses","builtInMarker","customHTMLMarker","enableRefine","enableClearMapRefinement","enableRefineControl","container","googleReference"]),w={createOptions:Ne,events:{}},P={createOptions:Ne,events:{}};if(!b)throw new Error(wi("The `container` option is required."));if(!R)throw new Error(wi("The `googleReference` option is required."));var x=ue(b),N={root:ai(Pi(),u.root),tree:Pi({descendantName:"tree"}),map:ai(Pi({descendantName:"map"}),u.map),control:ai(Pi({descendantName:"control"}),u.control),label:ai(Pi({descendantName:"label"}),u.label),selectedLabel:ai(Pi({descendantName:"label",modifierName:"selected"}),u.selectedLabel),input:ai(Pi({descendantName:"input"}),u.input),redo:ai(Pi({descendantName:"redo"}),u.redo),disabledRedo:ai(Pi({descendantName:"redo",modifierName:"disabled"}),u.disabledRedo),reset:ai(Pi({descendantName:"reset"}),u.reset)},_=D({},Si,{},o),I=D({},w,{},h),F=(Boolean(d)||Boolean(o.HTMLMarker))&&D({},P,{},d),C=function(l){return function(){function u(e){var t,n=e.__id,r=e.position,i=e.map,a=e.template,s=e.className,o=e.anchor,c=void 0===o?{x:0,y:0}:o;return k(this,u),M(H(t=W(this,O(u).call(this))),"__id",void 0),M(H(t),"anchor",void 0),M(H(t),"offset",void 0),M(H(t),"listeners",void 0),M(H(t),"latLng",void 0),M(H(t),"element",void 0),t.__id=n,t.anchor=c,t.listeners={},t.latLng=new l.maps.LatLng(r),t.element=document.createElement("div"),t.element.className=s,t.element.style.position="absolute",t.element.innerHTML=a,t.setMap(i),t}return j(u,l.maps.OverlayView),L(u,[{key:"onAdd",value:function(){this.getPanes().overlayMouseTarget.appendChild(this.element);var e=this.element.getBoundingClientRect();this.offset={x:this.anchor.x+e.width/2,y:this.anchor.y+e.height},this.element.style.width="".concat(e.width,"px")}},{key:"draw",value:function(){var e=this.getProjection().fromLatLngToDivPixel(this.latLng);this.element.style.left="".concat(Math.round(e.x-this.offset.x),"px"),this.element.style.top="".concat(Math.round(e.y-this.offset.y),"px"),this.element.style.zIndex=String(parseInt(this.element.style.top,10))}},{key:"onRemove",value:function(){var t=this;this.element&&(this.element.parentNode.removeChild(this.element),Object.keys(this.listeners).forEach(function(e){t.element.removeEventListener(e,t.listeners[e])}),delete this.element,delete this.listeners)}},{key:"addListener",value:function(e,t){this.listeners[e]=t;var n=this.element;return n.addEventListener(e,t),{remove:function(){return n.removeEventListener(e,t)}}}},{key:"getPosition",value:function(){return this.latLng}}]),u}()}(R),T=F?function(e){var t=e.item,n=A(e,["item"]);return new C(D({},F.createOptions(t),{},n,{__id:t.objectID,position:t._geoloc,className:ai(Pi({descendantName:"marker"})),template:ve({templateKey:"HTMLMarker",templates:_,data:t})}))}:function(e){var t=e.item,n=A(e,["item"]);return new R.maps.Marker(D({},I.createOptions(t),{},n,{__id:t.objectID,position:t._geoloc}))},E=F||I;return D({},Wr(Ri,function(){return Yn(null,x)})(D({},S,{renderState:{},container:x,googleReference:R,initialZoom:r,initialPosition:a,templates:_,cssClasses:N,createMarker:T,markerOptions:E,enableRefine:m,enableClearMapRefinement:g,enableRefineControl:y})),{$$widgetType:"ais.geoSearch"})},hierarchicalMenu:function(e){var t=e||{},n=t.container,r=t.attributes,i=t.separator,a=t.rootPath,s=t.showParentLevel,o=t.limit,c=t.showMore,u=void 0!==c&&c,l=t.showMoreLimit,h=t.sortBy,d=t.transformItems,f=t.templates,m=void 0===f?Ii:f,p=t.cssClasses,g=void 0===p?{}:p;if(!n)throw new Error(Fi("The `container` option is required."));var v=ue(n);return D({},vn(function(e){var u=e.cssClasses,l=e.containerNode,h=e.showMore,d=e.templates,f=e.renderState;return function(e,t){var n=e.createURL,r=e.items,i=e.refine,a=e.instantSearchInstance,s=e.isShowingMore,o=e.toggleShowMore,c=e.canToggleShowMore;t?f.templateProps=de({defaultTemplates:Ii,templatesConfig:a.templatesConfig,templates:d}):Yn(kn(_i,{createURL:n,cssClasses:u,facetValues:r,templateProps:f.templateProps,toggleRefinement:i,showMore:h,toggleShowMore:o,isShowingMore:s,canToggleShowMore:c}),l)}}({cssClasses:{root:ai(Ci(),g.root),noRefinementRoot:ai(Ci({modifierName:"noRefinement"}),g.noRefinementRoot),list:ai(Ci({descendantName:"list"}),g.list),childList:ai(Ci({descendantName:"list",modifierName:"child"}),g.childList),item:ai(Ci({descendantName:"item"}),g.item),selectedItem:ai(Ci({descendantName:"item",modifierName:"selected"}),g.selectedItem),parentItem:ai(Ci({descendantName:"item",modifierName:"parent"}),g.parentItem),link:ai(Ci({descendantName:"link"}),g.link),label:ai(Ci({descendantName:"label"}),g.label),count:ai(Ci({descendantName:"count"}),g.count),showMore:ai(Ci({descendantName:"showMore"}),g.showMore),disabledShowMore:ai(Ci({descendantName:"showMore",modifierName:"disabled"}),g.disabledShowMore)},containerNode:v,templates:m,showMore:u,renderState:{}}),function(){return Yn(null,v)})({attributes:r,separator:i,rootPath:a,showParentLevel:s,limit:o,showMore:u,showMoreLimit:l,sortBy:h,transformItems:d}),{$$widgetType:"ais.hierarchicalMenu"})},hits:function(e){var t=e||{},n=t.container,r=t.escapeHTML,i=t.transformItems,a=t.templates,s=void 0===a?Ei:a,o=t.cssClasses,c=void 0===o?{}:o;if(!n)throw new Error(ki("The `container` option is required."));var u=ue(n),l={root:ai(Li(),c.root),emptyRoot:ai(Li({modifierName:"empty"}),c.emptyRoot),list:ai(Li({descendantName:"list"}),c.list),item:ai(Li({descendantName:"item"}),c.item)},h=function(e){var o=e.renderState,c=e.cssClasses,u=e.containerNode,l=e.templates;return function(e,t){var n=e.hits,r=e.results,i=e.instantSearchInstance,a=e.insights,s=e.bindEvent;t?o.templateProps=de({defaultTemplates:Ei,templatesConfig:i.templatesConfig,templates:l}):Yn(kn(Mi,{cssClasses:c,hits:n,results:r,templateProps:o.templateProps,insights:a,sendEvent:function(e){i.sendEventToInsights(e)},bindEvent:s}),u)}}({containerNode:u,cssClasses:l,renderState:{},templates:s});return D({},Sn(yn)(h,function(){return Yn(null,u)})({escapeHTML:r,transformItems:i}),{$$widgetType:"ais.hits"})},hitsPerPage:function(e){var t=e||{},n=t.container,r=t.items,i=t.cssClasses,a=void 0===i?{}:i,s=t.transformItems;if(!n)throw new Error(Oi("The `container` option is required."));var o=ue(n),c={root:ai(Ai(),a.root),select:ai(Ai({descendantName:"select"}),a.select),option:ai(Ai({descendantName:"option"}),a.option)},u=function(e){var a=e.containerNode,s=e.cssClasses;return function(e,t){var n=e.items,r=e.refine;if(!t){var i=(ye(n,function(e){return e.isRefined})||{}).value;Yn(kn("div",{className:s.root},kn(ji,{cssClasses:s,currentValue:i,options:n,setValue:r})),a)}}}({containerNode:o,cssClasses:c});return D({},Xn(u,function(){return Yn(null,o)})({items:r,transformItems:s}),{$$widgetType:"ais.hitsPerPage"})},infiniteHits:function(e){var t=e||{},n=t.container,r=t.escapeHTML,i=t.transformItems,a=t.templates,s=void 0===a?Hi:a,o=t.cssClasses,c=void 0===o?{}:o,u=t.showPrevious,l=t.cache;if(!n)throw new Error(Di("The `container` option is required."));var h=ue(n),d={root:ai(Wi(),c.root),emptyRoot:ai(Wi({modifierName:"empty"}),c.emptyRoot),item:ai(Wi({descendantName:"item"}),c.item),list:ai(Wi({descendantName:"list"}),c.list),loadPrevious:ai(Wi({descendantName:"loadPrevious"}),c.loadPrevious),disabledLoadPrevious:ai(Wi({descendantName:"loadPrevious",modifierName:"disabled"}),c.disabledLoadPrevious),loadMore:ai(Wi({descendantName:"loadMore"}),c.loadMore),disabledLoadMore:ai(Wi({descendantName:"loadMore",modifierName:"disabled"}),c.disabledLoadMore)},f=function(e){var h=e.cssClasses,d=e.containerNode,f=e.renderState,m=e.templates,p=e.showPrevious;return function(e,t){var n=e.hits,r=e.results,i=e.showMore,a=e.showPrevious,s=e.isFirstPage,o=e.isLastPage,c=e.instantSearchInstance,u=e.insights,l=e.bindEvent;t?f.templateProps=de({defaultTemplates:Hi,templatesConfig:c.templatesConfig,templates:m}):Yn(kn(Bi,{cssClasses:h,hits:n,results:r,hasShowPrevious:p,showPrevious:a,showMore:i,templateProps:f.templateProps,isFirstPage:s,isLastPage:o,insights:u,sendEvent:function(e){c.sendEventToInsights(e)},bindEvent:l}),d)}}({containerNode:h,cssClasses:d,templates:s,showPrevious:u,renderState:{}});return D({},Sn(ir)(f,function(){return Yn(null,h)})({escapeHTML:r,transformItems:i,showPrevious:u,cache:l}),{$$widgetType:"ais.infiniteHits"})},menu:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.sortBy,a=t.limit,s=t.showMore,o=t.showMoreLimit,c=t.cssClasses,u=void 0===c?{}:c,l=t.templates,h=void 0===l?Ui:l,d=t.transformItems;if(!n)throw new Error(Qi("The `container` option is required."));var f=ue(n),m={root:ai(qi(),u.root),noRefinementRoot:ai(qi({modifierName:"noRefinement"}),u.noRefinementRoot),list:ai(qi({descendantName:"list"}),u.list),item:ai(qi({descendantName:"item"}),u.item),selectedItem:ai(qi({descendantName:"item",modifierName:"selected"}),u.selectedItem),link:ai(qi({descendantName:"link"}),u.link),label:ai(qi({descendantName:"label"}),u.label),count:ai(qi({descendantName:"count"}),u.count),showMore:ai(qi({descendantName:"showMore"}),u.showMore),disabledShowMore:ai(qi({descendantName:"showMore",modifierName:"disabled"}),u.disabledShowMore)};return D({},or(function(e){var l=e.containerNode,h=e.cssClasses,d=e.renderState,f=e.templates,m=e.showMore;return function(e,t){var n=e.refine,r=e.items,i=e.createURL,a=e.instantSearchInstance,s=e.isShowingMore,o=e.toggleShowMore,c=e.canToggleShowMore;if(t)d.templateProps=de({defaultTemplates:Ui,templatesConfig:a.templatesConfig,templates:f});else{var u=r.map(function(e){return D({},e,{url:i(e.name)})});Yn(kn(_i,{createURL:i,cssClasses:h,facetValues:u,showMore:m,templateProps:d.templateProps,toggleRefinement:n,toggleShowMore:o,isShowingMore:s,canToggleShowMore:c}),l)}}}({containerNode:f,cssClasses:m,renderState:{},templates:h,showMore:s}),function(){return Yn(null,f)})({attribute:r,limit:a,showMore:s,showMoreLimit:o,sortBy:i,transformItems:d}),{$$widgetType:"ais.menu"})},refinementList:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.operator,a=t.sortBy,s=t.limit,o=t.showMore,c=t.showMoreLimit,u=t.searchable,l=void 0!==u&&u,h=t.searchablePlaceholder,d=void 0===h?"Search...":h,f=t.searchableEscapeFacetValues,m=void 0===f||f,p=t.searchableIsAlwaysActive,g=void 0===p||p,v=t.cssClasses,y=void 0===v?{}:v,b=t.templates,R=void 0===b?Vi:b,S=t.transformItems;if(!n)throw new Error(Ki("The `container` option is required."));var w=!!l&&Boolean(m),P=ue(n),x=function(e){var t=D({},e,{submit:e.searchableSubmit,reset:e.searchableReset,loadingIndicator:e.searchableLoadingIndicator});return t.searchableReset,t.searchableSubmit,t.searchableLoadingIndicator,A(t,["searchableReset","searchableSubmit","searchableLoadingIndicator"])}(D({},Vi,{},R)),N={root:ai(zi(),y.root),noRefinementRoot:ai(zi({modifierName:"noRefinement"}),y.noRefinementRoot),list:ai(zi({descendantName:"list"}),y.list),item:ai(zi({descendantName:"item"}),y.item),selectedItem:ai(zi({descendantName:"item",modifierName:"selected"}),y.selectedItem),searchBox:ai(zi({descendantName:"searchBox"}),y.searchBox),label:ai(zi({descendantName:"label"}),y.label),checkbox:ai(zi({descendantName:"checkbox"}),y.checkbox),labelText:ai(zi({descendantName:"labelText"}),y.labelText),count:ai(zi({descendantName:"count"}),y.count),noResults:ai(zi({descendantName:"noResults"}),y.noResults),showMore:ai(zi({descendantName:"showMore"}),y.showMore),disabledShowMore:ai(zi({descendantName:"showMore",modifierName:"disabled"}),y.disabledShowMore),searchable:{root:ai(Ji(),y.searchableRoot),form:ai(Ji({descendantName:"form"}),y.searchableForm),input:ai(Ji({descendantName:"input"}),y.searchableInput),submit:ai(Ji({descendantName:"submit"}),y.searchableSubmit),submitIcon:ai(Ji({descendantName:"submitIcon"}),y.searchableSubmitIcon),reset:ai(Ji({descendantName:"reset"}),y.searchableReset),resetIcon:ai(Ji({descendantName:"resetIcon"}),y.searchableResetIcon),loadingIndicator:ai(Ji({descendantName:"loadingIndicator"}),y.searchableLoadingIndicator),loadingIcon:ai(Ji({descendantName:"loadingIcon"}),y.searchableLoadingIcon)}};return D({},wr(function(e){var d=e.containerNode,f=e.cssClasses,m=e.templates,p=e.renderState,g=e.showMore,v=e.searchable,y=e.searchablePlaceholder,b=e.searchableIsAlwaysActive;return function(e,t){var n=e.refine,r=e.items,i=e.createURL,a=e.searchForItems,s=e.isFromSearch,o=e.instantSearchInstance,c=e.toggleShowMore,u=e.isShowingMore,l=e.hasExhaustiveItems,h=e.canToggleShowMore;t?p.templateProps=de({templatesConfig:o.templatesConfig,templates:m}):Yn(kn(_i,{createURL:i,cssClasses:f,facetValues:r,templateProps:p.templateProps,toggleRefinement:n,searchFacetValues:v?a:void 0,searchPlaceholder:y,searchIsAlwaysActive:b,isFromSearch:s,showMore:g&&!s&&0<r.length,toggleShowMore:c,isShowingMore:u,hasExhaustiveItems:l,canToggleShowMore:h}),d)}}({containerNode:P,cssClasses:N,templates:x,renderState:{},searchable:l,searchablePlaceholder:d,searchableIsAlwaysActive:g,showMore:o}),function(){return Yn(null,P)})({attribute:r,operator:i,limit:s,showMore:o,showMoreLimit:c,sortBy:a,escapeFacetValues:w,transformItems:S}),{$$widgetType:"ais.refinementList"})},numericMenu:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.items,a=t.cssClasses,s=void 0===a?{}:a,o=t.templates,c=void 0===o?Yi:o,u=t.transformItems;if(!n)throw new Error(Gi("The `container` option is required."));var l=ue(n),h={root:ai(Zi(),s.root),noRefinementRoot:ai(Zi({modifierName:"noRefinement"}),s.noRefinementRoot),list:ai(Zi({descendantName:"list"}),s.list),item:ai(Zi({descendantName:"item"}),s.item),selectedItem:ai(Zi({descendantName:"item",modifierName:"selected"}),s.selectedItem),label:ai(Zi({descendantName:"label"}),s.label),radio:ai(Zi({descendantName:"radio"}),s.radio),labelText:ai(Zi({descendantName:"labelText"}),s.labelText)},d=function(e){var s=e.containerNode,o=e.attribute,c=e.cssClasses,u=e.renderState,l=e.templates;return function(e,t){var n=e.createURL,r=e.instantSearchInstance,i=e.refine,a=e.items;t?u.templateProps=de({defaultTemplates:Yi,templatesConfig:r.templatesConfig,templates:l}):Yn(kn(_i,{createURL:n,cssClasses:c,facetValues:a,templateProps:u.templateProps,toggleRefinement:i,attribute:o}),s)}}({containerNode:l,attribute:r,cssClasses:h,renderState:{},templates:c});return D({},cr(d,function(){return Yn(null,l)})({attribute:r,items:i,transformItems:u}),{$$widgetType:"ais.numericMenu"})},pagination:function(e){var t=e||{},n=t.container,r=t.templates,i=void 0===r?{}:r,a=t.cssClasses,s=void 0===a?{}:a,o=t.totalPages,c=t.padding,u=t.showFirst,l=void 0===u||u,h=t.showLast,d=void 0===h||h,f=t.showPrevious,m=void 0===f||f,p=t.showNext,g=void 0===p||p,v=t.scrollTo,y=void 0===v?"body":v;if(!n)throw new Error(ta("The `container` option is required."));var b=ue(n),R=!0===y?"body":y,S=!1!==R&&ue(R),w={root:ai(na(),s.root),noRefinementRoot:ai(na({modifierName:"noRefinement"}),s.noRefinementRoot),list:ai(na({descendantName:"list"}),s.list),item:ai(na({descendantName:"item"}),s.item),firstPageItem:ai(na({descendantName:"item",modifierName:"firstPage"}),s.firstPageItem),lastPageItem:ai(na({descendantName:"item",modifierName:"lastPage"}),s.lastPageItem),previousPageItem:ai(na({descendantName:"item",modifierName:"previousPage"}),s.previousPageItem),nextPageItem:ai(na({descendantName:"item",modifierName:"nextPage"}),s.nextPageItem),pageItem:ai(na({descendantName:"item",modifierName:"page"}),s.pageItem),selectedItem:ai(na({descendantName:"item",modifierName:"selected"}),s.selectedItem),disabledItem:ai(na({descendantName:"item",modifierName:"disabled"}),s.disabledItem),link:ai(na({descendantName:"link"}),s.link)},P=D({},ra,{},i),x=function(e){var l=e.containerNode,h=e.cssClasses,d=e.templates,f=e.totalPages,m=e.showFirst,p=e.showLast,g=e.showPrevious,v=e.showNext,y=e.scrollToNode;return function(e,t){var n=e.createURL,r=e.currentRefinement,i=e.nbHits,a=e.nbPages,s=e.pages,o=e.isFirstPage,c=e.isLastPage,u=e.refine;if(!t){Yn(kn(ea,{createURL:n,cssClasses:h,currentPage:r,templates:d,nbHits:i,nbPages:a,pages:s,totalPages:f,isFirstPage:o,isLastPage:c,setCurrentPage:function(e){u(e),!1!==y&&y.scrollIntoView()},showFirst:m,showLast:p,showPrevious:g,showNext:v}),l)}}}({containerNode:b,cssClasses:w,templates:P,showFirst:l,showLast:d,showPrevious:m,showNext:g,padding:c,scrollToNode:S});return D({},mr(x,function(){return Yn(null,b)})({totalPages:o,padding:c}),{$$widgetType:"ais.pagination"})},rangeInput:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.min,a=t.max,s=t.precision,o=void 0===s?0:s,c=t.cssClasses,u=void 0===c?{}:c,l=t.templates,h=void 0===l?{}:l;if(!n)throw new Error(aa("The `container` option is required."));var d=ue(n),f=D({separatorText:"to",submitText:"Go"},h),m={root:ai(sa(),u.root),noRefinement:ai(sa({modifierName:"noRefinement"})),form:ai(sa({descendantName:"form"}),u.form),label:ai(sa({descendantName:"label"}),u.label),input:ai(sa({descendantName:"input"}),u.input),inputMin:ai(sa({descendantName:"input",modifierName:"min"}),u.inputMin),inputMax:ai(sa({descendantName:"input",modifierName:"max"}),u.inputMax),separator:ai(sa({descendantName:"separator"}),u.separator),submit:ai(sa({descendantName:"submit"}),u.submit)},p=function(e){var f=e.containerNode,m=e.cssClasses,p=e.renderState,g=e.templates;return function(e,t){var n=e.refine,r=e.range,i=e.start,a=e.widgetParams,s=e.instantSearchInstance;if(t)p.templateProps=de({templatesConfig:s.templatesConfig,templates:g});else{var o=r.min,c=r.max,u=B(i,2),l=u[0],h=u[1],d=1/Math.pow(10,a.precision);Yn(kn(ia,{min:o,max:c,step:d,values:{min:l!==-1/0&&l!==o?l:void 0,max:h!==1/0&&h!==c?h:void 0},cssClasses:m,refine:n,templateProps:p.templateProps}),f)}}}({containerNode:d,cssClasses:m,templates:f,renderState:{}});return D({},Rr(p,function(){return Yn(null,d)})({attribute:r,min:i,max:a,precision:o}),{$$type:"ais.rangeInput",$$widgetType:"ais.rangeInput"})},searchBox:function(e){var t=e||{},n=t.container,r=t.placeholder,i=void 0===r?"":r,a=t.cssClasses,s=void 0===a?{}:a,o=t.autofocus,c=void 0!==o&&o,u=t.searchAsYouType,l=void 0===u||u,h=t.showReset,d=void 0===h||h,f=t.showSubmit,m=void 0===f||f,p=t.showLoadingIndicator,g=void 0===p||p,v=t.queryHook,y=t.templates;if(!n)throw new Error(oa("The `container` option is required."));var b=ue(n),R={root:ai(ca(),s.root),form:ai(ca({descendantName:"form"}),s.form),input:ai(ca({descendantName:"input"}),s.input),submit:ai(ca({descendantName:"submit"}),s.submit),submitIcon:ai(ca({descendantName:"submitIcon"}),s.submitIcon),reset:ai(ca({descendantName:"reset"}),s.reset),resetIcon:ai(ca({descendantName:"resetIcon"}),s.resetIcon),loadingIndicator:ai(ca({descendantName:"loadingIndicator"}),s.loadingIndicator),loadingIcon:ai(ca({descendantName:"loadingIcon"}),s.loadingIcon)};return D({},xr(function(e){var i=e.containerNode,a=e.cssClasses,s=e.placeholder,o=e.templates,c=e.autofocus,u=e.searchAsYouType,l=e.showReset,h=e.showSubmit,d=e.showLoadingIndicator;return function(e){var t=e.refine,n=e.query,r=e.isSearchStalled;Yn(kn(Ni,{query:n,placeholder:s,autofocus:c,refine:t,searchAsYouType:u,templates:o,showSubmit:h,showReset:l,showLoadingIndicator:d,isSearchStalled:r,cssClasses:a}),i)}}({containerNode:b,cssClasses:R,placeholder:i,templates:D({},$i,{},y),autofocus:c,searchAsYouType:l,showReset:d,showSubmit:m,showLoadingIndicator:g}),function(){return Yn(null,b)})({queryHook:v}),{$$widgetType:"ais.searchBox"})},rangeSlider:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.min,a=t.max,s=t.cssClasses,o=void 0===s?{}:s,c=t.step,u=t.pips,l=void 0===u||u,h=t.precision,d=void 0===h?0:h,f=t.tooltips,m=void 0===f||f;if(!n)throw new Error(Ca("The `container` option is required."));var p=ue(n),g={root:ai(Ta(),o.root),disabledRoot:ai(Ta({modifierName:"disabled"}),o.disabledRoot)},v=function(e){var d=e.containerNode,f=e.cssClasses,m=e.pips,p=e.step,g=e.tooltips;return function(e,t){var n=e.refine,r=e.range,i=e.start;if(!t){var a=r.min,s=r.max,o=B(i,2),c=o[0],u=o[1],l=c===-1/0?a:c,h=u===1/0?s:u;Yn(kn(Fa,{cssClasses:f,refine:n,min:a,max:s,values:[s<l?s:l,h<a?a:h],tooltips:g,step:p,pips:m}),d)}}}({containerNode:p,step:c,pips:l,tooltips:m,renderState:{},cssClasses:g});return D({},Rr(v,function(){return Yn(null,p)})({attribute:r,min:i,max:a,precision:d}),{$$type:"ais.rangeSlider",$$widgetType:"ais.rangeSlider"})},sortBy:function(e){var t=e||{},n=t.container,r=t.items,i=t.cssClasses,a=void 0===i?{}:i,s=t.transformItems;if(!n)throw new Error(Ea("The `container` option is required."));var o=ue(n),c={root:ai(ka(),a.root),select:ai(ka({descendantName:"select"}),a.select),option:ai(ka({descendantName:"option"}),a.option)};return D({},_r(function(e){var a=e.containerNode,s=e.cssClasses;return function(e,t){var n=e.currentRefinement,r=e.options,i=e.refine;t||Yn(kn("div",{className:s.root},kn(ji,{cssClasses:s,currentValue:n,options:r,setValue:i})),a)}}({containerNode:o,cssClasses:c}),function(){return Yn(null,o)})({items:r,transformItems:s}),{$$widgetType:"ais.sortBy"})},ratingMenu:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.max,a=void 0===i?5:i,s=t.cssClasses,o=void 0===s?{}:s,c=t.templates,u=void 0===c?La:c;if(!n)throw new Error(Ma("The `container` option is required."));var l=ue(n),h={root:ai(ja(),o.root),noRefinementRoot:ai(ja({modifierName:"noRefinement"}),o.noRefinementRoot),list:ai(ja({descendantName:"list"}),o.list),item:ai(ja({descendantName:"item"}),o.item),selectedItem:ai(ja({descendantName:"item",modifierName:"selected"}),o.selectedItem),disabledItem:ai(ja({descendantName:"item",modifierName:"disabled"}),o.disabledItem),link:ai(ja({descendantName:"link"}),o.link),starIcon:ai(ja({descendantName:"starIcon"}),o.starIcon),fullStarIcon:ai(ja({descendantName:"starIcon",modifierName:"full"}),o.fullStarIcon),emptyStarIcon:ai(ja({descendantName:"starIcon",modifierName:"empty"}),o.emptyStarIcon),label:ai(ja({descendantName:"label"}),o.label),count:ai(ja({descendantName:"count"}),o.count)};return D({},Er(function(e){var s=e.containerNode,o=e.cssClasses,c=e.templates,u=e.renderState;return function(e,t){var n=e.refine,r=e.items,i=e.createURL,a=e.instantSearchInstance;t?u.templateProps=de({defaultTemplates:La,templatesConfig:a.templatesConfig,templates:c}):Yn(kn(_i,{createURL:i,cssClasses:o,facetValues:r,templateProps:u.templateProps,toggleRefinement:n},kn("svg",{xmlns:"http://www.w3.org/2000/svg",style:"display:none;"},kn("symbol",{id:ja({descendantName:"starSymbol"}),viewBox:"0 0 24 24"},Oa),kn("symbol",{id:ja({descendantName:"starEmptySymbol"}),viewBox:"0 0 24 24"},Aa))),s)}}({containerNode:l,cssClasses:h,renderState:{},templates:u}),function(){return Yn(null,l)})({attribute:r,max:a}),{$$widgetType:"ais.ratingMenu"})},stats:function(e){var t=e||{},n=t.container,r=t.cssClasses,i=void 0===r?{}:r,a=t.templates,s=void 0===a?Da:a;if(!n)throw new Error(Wa("The `container` option is required."));var o=ue(n),c={root:ai(Ba(),i.root),text:ai(Ba({descendantName:"text"}),i.text)};return D({},Lr(function(e){var u=e.containerNode,l=e.cssClasses,h=e.renderState,d=e.templates;return function(e,t){var n=e.hitsPerPage,r=e.nbHits,i=e.nbPages,a=e.page,s=e.processingTimeMS,o=e.query,c=e.instantSearchInstance;t?h.templateProps=de({defaultTemplates:Da,templatesConfig:c.templatesConfig,templates:d}):Yn(kn(Ha,{cssClasses:l,hitsPerPage:n,nbHits:r,nbPages:i,page:a,processingTimeMS:s,query:o,templateProps:h.templateProps}),u)}}({containerNode:o,cssClasses:c,renderState:{},templates:s}),function(){return Yn(null,o)})(),{$$widgetType:"ais.stats"})},toggleRefinement:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.cssClasses,a=void 0===i?{}:i,s=t.templates,o=void 0===s?Qa:s,c=t.on,u=void 0===c||c,l=t.off;if(!n)throw new Error(qa("The `container` option is required."));var h=ue(n),d={root:ai($a(),a.root),label:ai($a({descendantName:"label"}),a.label),checkbox:ai($a({descendantName:"checkbox"}),a.checkbox),labelText:ai($a({descendantName:"labelText"}),a.labelText)};return D({},Ar(function(e){var s=e.containerNode,o=e.cssClasses,c=e.renderState,u=e.templates;return function(e,t){var n=e.value,r=e.createURL,i=e.refine,a=e.instantSearchInstance;t?c.templateProps=de({defaultTemplates:Qa,templatesConfig:a.templatesConfig,templates:u}):Yn(kn(Ua,{createURL:r,cssClasses:o,currentRefinement:n,templateProps:c.templateProps,refine:function(e){return i({isRefined:e})}}),s)}}({containerNode:h,cssClasses:d,renderState:{},templates:o}),function(){return Yn(null,h)})({attribute:r,on:u,off:l}),{$$widgetType:"ais.toggleRefinement"})},analytics:function(e){var t=e||{},s=t.pushFunction,n=t.delay,r=void 0===n?3e3:n,i=t.triggerOnUIInteraction,a=void 0!==i&&i,o=t.pushInitialSearch,c=void 0===o||o,u=t.pushPagination,l=void 0!==u&&u;if(!s)throw new Error(Ka("The `pushFunction` option is required."));function h(e){if(null!==e){var t=[],n=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n].join("+");t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(n),"_").concat(encodeURIComponent(r)))}return t.join("&")}(D({},e.state.disjunctiveFacetsRefinements,{},e.state.facetsRefinements,{},e.state.hierarchicalFacetsRefinements)),r=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(r.hasOwnProperty(">=")&&r.hasOwnProperty("<="))r[">="]&&r[">="][0]===r["<="]&&r["<="][0]?t.push("".concat(n,"=").concat(n,"_").concat(r[">="])):t.push("".concat(n,"=").concat(n,"_").concat(r[">="],"to").concat(r["<="]));else if(r.hasOwnProperty(">="))t.push("".concat(n,"=").concat(n,"_from").concat(r[">="]));else if(r.hasOwnProperty("<="))t.push("".concat(n,"=").concat(n,"_to").concat(r["<="]));else if(r.hasOwnProperty("=")){var i=[];for(var a in r["="])r["="].hasOwnProperty(a)&&i.push(r["="][a]);t.push("".concat(n,"=").concat(n,"_").concat(i.join("-")))}}return t.join("&")}(e.state.numericRefinements);""!==n&&t.push(n),""!==r&&t.push(r);var i=t.join("&"),a="Query: ".concat(e.state.query||"",", ").concat(i);!0===l&&(a+=", Page: ".concat(e.state.page||0)),m!==a&&(s(i,e.state,e.results),m=a)}}var d,f=null,m="",p=!0;!0===c&&(p=!1);function g(){h(f)}function v(){h(f)}return{$$type:"ais.analytics",$$widgetType:"ais.analytics",init:function(){!0===a&&(document.addEventListener("click",g),window.addEventListener("beforeunload",v))},render:function(e){var t=e.results,n=e.state;!0!==p?(f={results:t,state:n},d&&clearTimeout(d),d=window.setTimeout(function(){return h(f)},r)):p=!1},dispose:function(){!0===a&&(document.removeEventListener("click",g),window.removeEventListener("beforeunload",v))},getRenderState:function(e,t){return D({},e,{analytics:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}}},breadcrumb:function(e){var t=e||{},n=t.container,r=t.attributes,i=t.separator,a=t.rootPath,s=t.transformItems,o=t.templates,c=void 0===o?za:o,u=t.cssClasses,l=void 0===u?{}:u;if(!n)throw new Error(Ja("The `container` option is required."));var h=ue(n),d={root:ai(Ya(),l.root),noRefinementRoot:ai(Ya({modifierName:"noRefinement"}),l.noRefinementRoot),list:ai(Ya({descendantName:"list"}),l.list),item:ai(Ya({descendantName:"item"}),l.item),selectedItem:ai(Ya({descendantName:"item",modifierName:"selected"}),l.selectedItem),separator:ai(Ya({descendantName:"separator"}),l.separator),link:ai(Ya({descendantName:"link"}),l.link)},f=function(e){var o=e.containerNode,c=e.cssClasses,u=e.renderState,l=e.templates;return function(e,t){var n=e.canRefine,r=e.createURL,i=e.instantSearchInstance,a=e.items,s=e.refine;t?u.templateProps=de({defaultTemplates:za,templatesConfig:i.templatesConfig,templates:l}):Yn(kn(Va,{canRefine:n,cssClasses:c,createURL:r,items:a,refine:s,templateProps:u.templateProps}),o)}}({containerNode:h,cssClasses:d,renderState:{},templates:c});return D({},Hr(f,function(){return Yn(null,h)})({attributes:r,separator:i,rootPath:a,transformItems:s}),{$$widgetType:"ais.breadcrumb"})},menuSelect:function(e){var t=e||{},n=t.container,r=t.attribute,i=t.sortBy,a=void 0===i?["name:asc"]:i,s=t.limit,o=void 0===s?10:s,c=t.cssClasses,u=void 0===c?{}:c,l=t.templates,h=void 0===l?Za:l,d=t.transformItems;if(!n)throw new Error(Xa("The `container` option is required."));var f=ue(n),m={root:ai(es(),u.root),noRefinementRoot:ai(es({modifierName:"noRefinement"}),u.noRefinementRoot),select:ai(es({descendantName:"select"}),u.select),option:ai(es({descendantName:"option"}),u.option)};return D({},or(function(e){var s=e.containerNode,o=e.cssClasses,c=e.renderState,u=e.templates;return function(e,t){var n=e.refine,r=e.items,i=e.canRefine,a=e.instantSearchInstance;t?c.templateProps=de({defaultTemplates:Za,templatesConfig:a.templatesConfig,templates:u}):Yn(kn(Ga,{cssClasses:o,items:r,refine:n,templateProps:c.templateProps,canRefine:i}),s)}}({containerNode:f,cssClasses:m,renderState:{},templates:h}),function(){return Yn(null,f)})({attribute:r,limit:o,sortBy:a,transformItems:d}),{$$widgetType:"ais.menuSelect"})},poweredBy:function(e){var t=e||{},n=t.container,r=t.cssClasses,i=void 0===r?{}:r,a=t.theme,s=void 0===a?"light":a;if(!n)throw new Error(as("The `container` option is required."));var o=ue(n),c={root:ai(is(),is({modifierName:"dark"===s?"dark":"light"}),i.root),link:ai(is({descendantName:"link"}),i.link),logo:ai(is({descendantName:"logo"}),i.logo)},u=function(e){var a=e.containerNode,s=e.cssClasses;return function(e,t){var n=e.url,r=e.widgetParams;if(t){var i=r.theme;Yn(kn(ts,{cssClasses:s,url:n,theme:i}),a)}else;}}({containerNode:o,cssClasses:c});return D({},Br(u,function(){return Yn(null,o)})({theme:s}),{$$widgetType:"ais.poweredBy"})},panel:function(e){var t=e||{},n=t.templates,r=void 0===n?{}:n,i=t.hidden,c=void 0===i?function(){return!1}:i,a=t.collapsed,s=t.cssClasses,o=void 0===s?{}:s,u=document.createElement("div"),l=Boolean(a),h="function"==typeof a?a:function(){return!1},d={root:ai(Cs(),o.root),noRefinementRoot:ai(Cs({modifierName:"noRefinement"}),o.noRefinementRoot),collapsibleRoot:ai(Cs({modifierName:"collapsible"}),o.collapsibleRoot),collapsedRoot:ai(Cs({modifierName:"collapsed"}),o.collapsedRoot),collapseButton:ai(Cs({descendantName:"collapseButton"}),o.collapseButton),collapseIcon:ai(Cs({descendantName:"collapseIcon"}),o.collapseIcon),body:ai(Cs({descendantName:"body"}),o.body),header:ai(Cs({descendantName:"header"}),o.header),footer:ai(Cs({descendantName:"footer"}),o.footer)};return function(n){return function(e){var i=(e||{}).container;if(!i)throw new Error(Fs("The `container` option is required in the widget within the panel."));var t={header:"",footer:"",collapseButtonText:function(e){var t=e.collapsed;return'<svg\n class="'.concat(d.collapseIcon,'"\n width="1em"\n height="1em"\n viewBox="0 0 500 500"\n >\n <path d="').concat(t?"M100 250l300-150v300z":"M250 400l150-300H100z",'" fill="currentColor" />\n </svg>')}},s=function(e){var a=e.containerNode,s=e.bodyContainerNode,o=e.cssClasses,c=e.templates;return function(e){var t=e.options,n=e.hidden,r=e.collapsible,i=e.collapsed;Yn(kn(Ps,{cssClasses:o,hidden:n,collapsible:r,isCollapsed:i,templates:c,data:t,bodyElement:s}),a)}}({containerNode:ue(i),bodyContainerNode:u,cssClasses:d,templates:D({},t,{},r)});s({options:{},hidden:!0,collapsible:l,collapsed:!1});var o=n(D({},e,{container:u}));return D({},o,{dispose:function(){if(Yn(null,ue(i)),"function"==typeof o.dispose){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.dispose).call.apply(e,[this].concat(n))}},render:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0],a=D({},o.getWidgetRenderState?o.getWidgetRenderState(i):{},{},i);s({options:a,hidden:Boolean(c(a)),collapsible:l,collapsed:Boolean(h(a))}),"function"==typeof o.render&&(r=o.render).call.apply(r,[this].concat(t))}})}}},voiceSearch:function(e){var t=e||{},n=t.container,r=t.cssClasses,i=void 0===r?{}:r,a=t.templates,s=t.searchAsYouSpeak,o=void 0!==s&&s,c=t.language,u=t.additionalQueryParameters,l=t.createVoiceSearchHelper;if(!n)throw new Error(Es("The `container` option is required."));var h=ue(n),d={root:ai(ks(),i.root),button:ai(ks({descendantName:"button"}),i.button),status:ai(ks({descendantName:"status"}),i.status)};return D({},ni(Ns,function(){return Yn(null,h)})({container:h,cssClasses:d,templates:D({},Ts,{},a),searchAsYouSpeak:o,language:c,additionalQueryParameters:u,createVoiceSearchHelper:l}),{$$widgetType:"ais.voiceSearch"})},queryRuleCustomData:function(e){var t=e||{},n=t.container,r=t.cssClasses,i=void 0===r?{}:r,a=t.templates,s=void 0===a?{}:a,o=t.transformItems,c=void 0===o?function(e){return e}:o;if(!n)throw new Error(Ls("The `container` option is required."));var u={root:ai(Ms(),i.root)},l=D({},{default:function(e){var t=e.items;return JSON.stringify(t,null,2)}},{},s),h=ue(n);return D({},ei(Is,function(){Yn(null,h)})({container:h,cssClasses:u,templates:l,transformItems:c}),{$$widgetType:"ais.queryRuleCustomData"})},queryRuleContext:function(e){var t=0<arguments.length&&void 0!==e?e:{};if(!t.trackedFilters)throw new Error(js("The `trackedFilters` option is required."));return D({},ei(Ne)(t),{$$widgetType:"ais.queryRuleContext"})},index:ft,places:function(e){var t=e||{},n=t.placesReference,r=t.defaultPosition,o=void 0===r?[]:r,i=A(t,["placesReference","defaultPosition"]);if("function"!=typeof n)throw new Error("The `placesReference` option requires a valid Places.js reference.");var c=n(i),u={query:"",initialLatLngViaIP:void 0,isInitialLatLngViaIPSet:!1};return{$$type:"ais.places",$$widgetType:"ais.places",init:function(e){var s=e.helper;c.on("change",function(e){var t=e.suggestion,n=t.value,r=t.latlng,i=r.lat,a=r.lng;u.query=n,s.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng","".concat(i,",").concat(a)).search()}),c.on("clear",function(){u.query="",s.setQueryParameter("insideBoundingBox",void 0),1<o.length?s.setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",o.join(",")):s.setQueryParameter("aroundLatLngViaIP",u.initialLatLngViaIP).setQueryParameter("aroundLatLng",void 0),s.search()})},getWidgetUiState:function(e,t){var n=t.searchParameters.aroundLatLng||o.join(",");if(n!==o.join(",")||u.query)return D({},e,{places:{query:u.query,position:n}});e.places;return A(e,["places"])},getWidgetSearchParameters:function(e,t){var n=t.uiState.places||{},r=n.query,i=void 0===r?"":r,a=n.position,s=void 0===a?o.join(","):a;return u.query=i,u.isInitialLatLngViaIPSet||(u.isInitialLatLngViaIPSet=!0,u.initialLatLngViaIP=e.aroundLatLngViaIP),c.setVal(i),c.close(),e.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",s||void 0)},getRenderState:function(e,t){return D({},e,{places:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}}}}),As=Object.freeze({__proto__:null,createInsightsMiddleware:function(e){var t=e||{},c=t.insightsClient,u=t.insightsInitParams,l=t.onEvent;if(null!==c&&!c)throw new Error("The `insightsClient` option is required. To disable, set it to `null`.");var h=Boolean(c),d=null===c?Ne:c;return function(e){var n=e.instantSearchInstance,t=B(function(e){if(e.transporter){var t=e.transporter,n=t.headers,r=t.queryParameters,i="x-algolia-application-id",a="x-algolia-api-key";return[n[i]||r[i],n[a]||r[a]]}return[e.applicationID,e.apiKey]}(n.client),2),r=t[0],i=t[1],a=void 0,s=void 0;if(Array.isArray(d.queue)){var o=B(ye(d.queue.slice().reverse(),function(e){return"setUserToken"===B(e,1)[0]})||[],2);a=o[1]}return d("_get","_userToken",function(e){s=e}),d("init",D({appId:r,apiKey:i},u)),{onStateChange:function(){},subscribe:function(){function e(e){e&&n.mainIndex.getHelper().setQueryParameter("userToken",e)}n.mainIndex.getHelper().setQueryParameter("clickAnalytics",!0);var t=Nt();h&&t&&e(t),s?d("setUserToken",s):a&&d("setUserToken",a),d("onUserTokenChange",e,{immediate:!0}),n.sendEventToInsights=function(e){l?l(e,c):e.insightsMethod&&d(e.insightsMethod,e.payload)}},unsubscribe:function(){d("onUserTokenChange",void 0),n.sendEventToInsights=Ne}}}},createRouterMiddleware:tn,isMetadataEnabled:nn,createMetadataMiddleware:rn}),Hs=Object.freeze({__proto__:null,history:en});function Ds(e){e.configure;return A(e,["configure"])}var Ws=Object.freeze({__proto__:null,simple:It,singleIndex:function(t){return{stateToRoute:function(e){return Ds(e[t]||{})},routeToState:function(e){return M({},t,Ds(0<arguments.length&&void 0!==e?e:{}))}}}});function Bs(e){var t=e||{};t.page;return A(t,["page"])}var Us="ais.infiniteHits";function Qs(){return"undefined"!=typeof window&&void 0!==window.sessionStorage}function qs(e){return new cn(e)}return qs.routers=Hs,qs.stateMappings=Ws,qs.connectors=ii,qs.widgets=Os,qs.version="4.13.2",qs.createInfiniteHitsSessionStorageCache=function(){return{read:function(e){var t=e.state;if(!Qs())return null;try{var n=JSON.parse(window.sessionStorage.getItem(Us));return n&&Ee(n.state,Bs(t))?n.hits:null}catch(e){if(e instanceof SyntaxError)try{window.sessionStorage.removeItem(Us)}catch(e){}return null}},write:function(e){var t=e.state,n=e.hits;if(Qs())try{window.sessionStorage.setItem(Us,JSON.stringify({state:Bs(t),hits:n}))}catch(e){}}}},qs.highlight=vt,qs.reverseHighlight=bt,qs.snippet=St,qs.reverseSnippet=Pt,qs.insights=xt,qs.middlewares=As,qs});
//# sourceMappingURL=instantsearch.production.min.js.map