react-instantsearch 6.38.3 → 6.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! React InstantSearch UNRELEASED | © Algolia, inc. | https://github.com/algolia/instantsearch.js */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(((e=e||self).ReactInstantSearch=e.ReactInstantSearch||{},e.ReactInstantSearch.Connectors={}),e.React)}(this,function(e,n){"use strict";var H="default"in n?n.default:n,D="undefined"!=typeof Element,k="function"==typeof Map,M="function"==typeof Set,Q="function"==typeof ArrayBuffer;var $=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1}else if(k&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o=t.entries();!(i=o.next()).done;)if(!n.has(i.value[0]))return!1;for(o=t.entries();!(i=o.next()).done;)if(!e(i.value[1],n.get(i.value[0])))return!1}else if(M&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o=t.entries();!(i=o.next()).done;)if(!n.has(i.value[0]))return!1}else if(Q&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(t[i]!==n[i])return!1}else{if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;if(D&&t instanceof Element)return!1;for(i=r;0!=i--;)if(!("_owner"===a[i]&&t.$$typeof||e(t[a[i]],n[a[i]])))return!1}return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}};function B(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function L(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?B(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===a(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var q=function(e,t){if(e!==t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,a=0;a<n.length;a++)if(!i.call(t,n[a])||e[n[a]]!==t[n[a]])return!1}return!0},U=function(e){return e.displayName||e.name||"UnknownComponent"},W=function r(i){return Object.keys(i).forEach(function(e){var t,n=i[e];"object"!==a(t=n)||null===t||Array.isArray(t)||(G(n)?r(n):delete i[e])}),i};function z(e,n,r){return e.map(function(e,t){return L(L({},e),{},{__position:n*r+t+1})})}function Y(e,t){return t?e.map(function(e){return L(L({},e),{},{__queryID:t})}):e}function J(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function G(e){return e&&0<Object.keys(e).length}function l(e,t){if(null==e)return{};for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var a=r[i];0<=t.indexOf(a)||(n[a]=e[a])}return n}var X=function(e,t){return(Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".")).reduce(function(e,t){return e?e[t]:void 0},e)};function Z(e){return e.replace(/^\\-/,"-")}var t=n.createContext({onInternalStateUpdate:function(){},createHrefForState:function(){return"#"},onSearchForFacetValues:function(){},onSearchStateChange:function(){},onSearchParameters:function(){},store:{},widgetsManager:{},mainTargetedIndex:""}),K=t.Consumer,t=(t.Provider,n.createContext(void 0)),ee=t.Consumer,te=(t.Provider,["contextValue"]);function i(e){return(i="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 ne(){return(ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function re(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function ie(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ae(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function oe(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,le(r.key),r)}}function se(e,t){return(se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ce(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ue(n),t=(e=r?(e=ue(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t,n){(t=le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function le(e){e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===i(e)?e:String(e)}function fe(u){var o;if(u.displayName)return o="function"==typeof u.getSearchParameters||"function"==typeof u.getMetadata||"function"==typeof u.transitionState,function(i){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e);var n,r=ce(a);function a(e){var i;if(this instanceof a)return c(s(i=r.call(this,e)),"unsubscribe",void 0),c(s(i),"unregisterWidget",void 0),c(s(i),"cleanupTimerRef",null),c(s(i),"isUnmounting",!1),c(s(i),"state",{providedProps:i.getProvidedProps(i.props)}),c(s(i),"refine",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.props.contextValue.onInternalStateUpdate((e=u.refine).call.apply(e,[s(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),c(s(i),"createURL",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i.props.contextValue.createHrefForState((e=u.refine).call.apply(e,[s(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),c(s(i),"searchForFacetValues",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.props.contextValue.onSearchForFacetValues((e=u.searchForFacetValues).call.apply(e,[s(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),u.getSearchParameters&&i.props.contextValue.onSearchParameters(u.getSearchParameters.bind(s(i)),{ais:i.props.contextValue,multiIndexContext:i.props.indexContextValue},i.props,u.getMetadata&&u.getMetadata.bind(s(i)),u.displayName),i;throw new TypeError("Cannot call a class as a function")}return t=a,(e=[{key:"componentDidMount",value:function(){var e=this;this.cleanupTimerRef&&(clearTimeout(this.cleanupTimerRef),this.cleanupTimerRef=null),this.unsubscribe=this.props.contextValue.store.subscribe(function(){e.isUnmounting||e.setState({providedProps:e.getProvidedProps(e.props)})}),o&&(this.unregisterWidget=this.props.contextValue.widgetsManager.registerWidget(this))}},{key:"shouldComponentUpdate",value:function(e,t){return"function"==typeof u.shouldComponentUpdate?u.shouldComponentUpdate.call(this,this.props,e,this.state,t):(e=q(this.props,e),null===this.state.providedProps||null===t.providedProps?this.state.providedProps!==t.providedProps||!e:!e||!q(this.state.providedProps,t.providedProps))}},{key:"componentDidUpdate",value:function(e){$(e,this.props)||(this.setState({providedProps:this.getProvidedProps(this.props)}),o&&(this.props.contextValue.widgetsManager.update(),"function"==typeof u.transitionState)&&this.props.contextValue.onSearchStateChange(u.transitionState.call(this,this.props,this.props.contextValue.store.getState().widgets,this.props.contextValue.store.getState().widgets)))}},{key:"componentWillUnmount",value:function(){var t=this;this.cleanupTimerRef=setTimeout(function(){var e;t.isUnmounting=!0,t.unsubscribe&&t.unsubscribe(),t.unregisterWidget&&(t.unregisterWidget(),"function"==typeof u.cleanUp)&&(e=u.cleanUp.call(t,t.props,t.props.contextValue.store.getState().widgets),t.props.contextValue.store.setState(ae(ae({},t.props.contextValue.store.getState()),{},{widgets:e})),t.props.contextValue.onSearchStateChange(W(e)))})}},{key:"getProvidedProps",value:function(e){var t=this.props.contextValue.store.getState(),n=t.widgets,r=t.results,i=t.resultsFacetValues,a=t.searching,o=t.searchingForFacetValues,s=t.isSearchStalled,c=t.metadata,t=t.error;return u.getProvidedProps.call(this,e,n,{results:r,searching:a,searchingForFacetValues:o,isSearchStalled:s,error:t},c,i)}},{key:"getSearchParameters",value:function(e){return"function"==typeof u.getSearchParameters?u.getSearchParameters.call(this,e,this.props,this.props.contextValue.store.getState().widgets):null}},{key:"getMetadata",value:function(e){return"function"==typeof u.getMetadata?u.getMetadata.call(this,this.props,e):{}}},{key:"transitionState",value:function(e,t){return"function"==typeof u.transitionState?u.transitionState.call(this,this.props,e,t):t}},{key:"render",value:function(){var e,t,n=this.props,n=(n.contextValue,re(n,te)),r=this.state.providedProps;return null===r?null:(e="function"==typeof u.refine?{refine:this.refine,createURL:this.createURL}:{},t="function"==typeof u.searchForFacetValues?{searchForItems:this.searchForFacetValues}:{},H.createElement(i,ne({},n,r,e,t)))}}])&&oe(t.prototype,e),n&&oe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.Component);return c(t,"displayName","".concat(u.displayName,"(").concat(U(i),")")),c(t,"$$type",u.$$type),c(t,"$$widgetType",e.$$widgetType),c(t,"propTypes",u.propTypes),c(t,"defaultProps",u.defaultProps),c(t,"_connectorDesc",u),t};throw new Error("`createConnector` requires you to provide a `displayName` property.")}function o(n){return function(e,t){var r=fe(n)(e,t);return function(n){return H.createElement(K,null,function(t){return H.createElement(ee,null,function(e){return H.createElement(r,ne({contextValue:t,indexContextValue:e},n))})})}}}var he="<ais-highlight-0000000000>",me="</ais-highlight-0000000000>";function de(e){var t,n=e.preTag,r=e.postTag,e=e.highlightedValue,e=(void 0===e?"":e).split(n),i=e.shift(),a=""===i?[]:[{value:i,isHighlighted:!1}];return r===n?(t=!0,e.forEach(function(e){a.push({value:e,isHighlighted:t}),t=!t})):e.forEach(function(e){e=e.split(r);a.push({value:e[0],isHighlighted:!0}),""!==e[1]&&a.push({value:e[1],isHighlighted:!1})}),a}function pe(e){return(pe="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 ye(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function m(e,t,n){return(t=function(e){e=function(e,t){if("object"!==pe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===pe(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return y(e)?e.multiIndexContext.targetedIndex:e.ais.mainTargetedIndex}function p(e,t){if(e.results){if(e.results.hits)return e.results;t=d(t);if(e.results[t])return e.results[t]}return null}function y(e){return e&&e.multiIndexContext}function g(t,e,n,r,i){var a,o,s,c,u,l,f;return y(n)?(n=d(n),i?(s=e,c=n,l=i,u=(u=r)?{page:1}:void 0,f=(o=t).indices&&o.indices[c]?h(h({},o.indices),{},m({},c,h(h({},o.indices[c]),{},(m(f={},l,h(h({},o.indices[c][l]),s)),m(f,"page",1),f)))):h(h({},o.indices),{},m({},c,h(m({},l,s),u))),h(h({},o),{},{indices:f})):(c=e,l=n,s=(s=r)?{page:1}:void 0,l=(u=t).indices&&u.indices[l]?h(h({},u.indices),{},m({},l,h(h(h({},u.indices[l]),c),s))):h(h({},u.indices),{},m({},l,h(h({},c),s))),h(h({},u),{},{indices:l}))):(t.indices&&r&&Object.keys(t.indices).forEach(function(e){t=g(t,{page:1},{multiIndexContext:{targetedIndex:e}},!0,i)}),i?(o=e,f=i,n=(n=r)?{page:1}:void 0,h(h({},a=t),{},m({},f,h(h({},a[f]),o)),n)):(a=e,n=(n=r)?{page:1}:void 0,h(h(h({},t),a),n)))}function ge(e){e=e.match(/^([^.]*)\.(.*)/);return{namespace:e&&e[1],attributeName:e&&e[2]}}function u(e,t,n,r,i){var a,o=d(n),s=ge(r),c=s.namespace,s=s.attributeName,n={multiIndex:y(n),indexId:o,namespace:c,attributeName:s,id:r,searchState:t};return c=(o=n).multiIndex,s=o.indexId,r=o.namespace,t=o.attributeName,a=o.id,o=o.searchState,(c&&r?o.indices&&o.indices[s]&&o.indices[s][r]&&Object.hasOwnProperty.call(o.indices[s][r],t):c?o.indices&&o.indices[s]&&Object.hasOwnProperty.call(o.indices[s],a):r?o[r]&&Object.hasOwnProperty.call(o[r],t):Object.hasOwnProperty.call(o,a))?(s=(c=n).multiIndex,r=c.indexId,t=c.namespace,o=c.attributeName,a=c.id,c=c.searchState,s&&t?c.indices[r][t][o]:s?c.indices[r][a]:t?c[t][o]:c[a]):e.defaultRefinement||i}function r(e,t,n){var r,i,a,o,s=d(t),c=ge(n),u=c.namespace,c=c.attributeName;return y(t)&&Boolean(e.indices)?(s=(t={attribute:c,searchState:e,indexId:s,id:n,namespace:u}).searchState,i=t.indexId,r=t.id,o=t.namespace,t=t.attribute,a=s.indices[i],o&&a?h(h({},s),{},{indices:h(h({},s.indices),{},m({},i,h(h({},a),{},m({},o,l(a[o],[t])))))}):a?h(h({},s),{},{indices:h(h({},s.indices),{},m({},i,l(a,[r])))}):s):(t=(o={attribute:c,searchState:e,id:n,namespace:u}).searchState,i=o.id,a=o.namespace,o=o.attribute,a?h(h({},t),{},m({},a,l(t[a],[o]))):l(t,[i]))}function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var be=["children","contextValue","indexContextValue"],xe=["children","contextValue","indexContextValue"];function Pe(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Re(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pe(Object(n),!0).forEach(function(e){Se(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Se(e,t,n){return(t=function(e){e=function(e,t){if("object"!==ve(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ve(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Fe(){return"configure"}var t=o({displayName:"AlgoliaConfigure",$$type:"ais.configure",getProvidedProps:function(){return{}},getSearchParameters:function(e,t){t.children,t.contextValue,t.indexContextValue;t=je(t,be);return e.setQueryParameters(t)},transitionState:function(e,t,n){var r=Fe(),i=(e.children,e.contextValue,e.indexContextValue,je(e,xe)),a=Object.keys(e),o=this._props?Object.keys(this._props).filter(function(e){return-1===a.indexOf(e)}):[];return this._props=e,g(n,Se({},r,Re(Re({},l(n[r],o)),i)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(n,e){var r=Fe(),t=d({ais:n.contextValue,multiIndexContext:n.indexContextValue}),i=y({ais:n.contextValue,multiIndexContext:n.indexContextValue})&&e.indices?e.indices[t]:e,t=(i&&i[r]?Object.keys(i[r]):[]).reduce(function(e,t){return n[t]||(e[t]=i[r][t]),e},{});return g(e,Se({},r,t),{ais:n.contextValue,multiIndexContext:n.indexContextValue})}}),f=("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}).performance||{};f.now||f.mozNow||f.msNow||f.oNow||f.webkitNow;function Oe(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function we(e,t){var n,r;if(e!==t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"__proto__"!==i&&"constructor"!==i&&(n=t[i],void 0!==(r=e[i])&&void 0===n||(Oe(r)&&Oe(n)?e[i]=we(r,n):e[i]="object"==typeof(r=n)&&null!==r?we(Array.isArray(r)?[]:{},r):r));return e}function v(){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 b=function(e){Oe(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];Oe(r)&&we(e,r)}return e};var Ce=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})},x=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var Ve=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 _e=function(e,t){if(null===e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r};var Ee=function(e){return e&&0<Object.keys(e).length},P={addRefinement:function(e,t,n){var r;return P.isRefined(e,t,n)?e:(n=""+n,n=e[t]?e[t].concat(n):[n],(r={})[t]=n,v({},r,e))},removeRefinement:function(e,n,t){var r;return void 0===t?P.clearRefinement(e,function(e,t){return n===t}):(r=""+t,P.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 P.isRefined(e,t,n)?P.removeRefinement(e,t,n):P.addRefinement(e,t,n)},clearRefinement:function(i,a,o){var s,e;return void 0===a?Ee(i)?{}:i:"string"==typeof a?_e(i,[a]):"function"==typeof a?(s=!1,e=Object.keys(i).reduce(function(e,t){var n=i[t]||[],r=n.filter(function(e){return!a(e,t,o)});return r.length!==n.length&&(s=!0),e[t]=r,e},{}),s?e:i):void 0},isRefined:function(e,t,n){var r=!!e[t]&&0<e[t].length;return void 0!==n&&r?-1!==e[t].indexOf(""+n):r}},R=P;function Ie(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return Ie(n[t],e)}):e===n}function S(e){var r=e?S._parseNumbers(e):{},i=(void 0===r.userToken||null!==(e=r.userToken)&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)||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||{},this);Object.keys(r).forEach(function(e){var t=-1!==S.PARAMETERS.indexOf(e),n=void 0!==r[e];!t&&n&&(i[e]=r[e])})}S.PARAMETERS=Object.keys(new S),S._parseNumbers=function(i){var r,a;return i instanceof S?i:(r={},["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(e){var t,n=i[e];"string"==typeof n&&(t=parseFloat(n),r[e]=isNaN(t)?n:t)}),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&&(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),b({},i,r))},S.make=function(e){var n=new S(e);return(e.hierarchicalFacets||[]).forEach(function(e){var t;e.rootPath&&0===(t=(n=0<(t=n.getHierarchicalRefinement(e.name)).length&&0!==t[0].indexOf(e.rootPath)?n.clearRefinements(e.name):n).getHierarchicalRefinement(e.name)).length&&(n=n.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}),n},S.validate=function(e,t){t=t||{};return e.tagFilters&&t.tagRefinements&&0<t.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&&t.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&&t.numericRefinements&&Ee(t.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."):Ee(e.numericRefinements)&&t.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},S.prototype={constructor:S,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:R.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:R.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:R.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:R.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return e.numericRefinements===this.numericRefinements&&e.facetsRefinements===this.facetsRefinements&&e.facetsExcludes===this.facetsExcludes&&e.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&e.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(e)},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,n=Ve(n);return this.isNumericRefined(e,t,n)?this:((r=b({},this.numericRefinements))[e]=b({},r[e]),r[e][t]?(r[e][t]=r[e][t].slice(),r[e][t].push(n)):r[e][t]=[n],this.setQueryParameters({numericRefinements:r}))},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&&Ie(e.val,Ve(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(o){var s,t,e;return void 0===o?Ee(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof o?_e(this.numericRefinements,[o]):"function"==typeof o?(s=!1,t=this.numericRefinements,e=Object.keys(t).reduce(function(e,r){var i=t[r],a={},i=i||{};return Object.keys(i).forEach(function(t){var e=i[t]||[],n=[];e.forEach(function(e){o({val:e,op:t},r,"numeric")||n.push(e)}),n.length!==e.length&&(s=!0),a[t]=n}),e[r]=a,e},{}),s?e:this.numericRefinements):void 0},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))return R.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:R.addRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return R.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:R.addRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return R.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:R.addRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},addTagRefinement:function(e){return this.isTagRefined(e)?this:(e={tagRefinements:this.tagRefinements.concat(e)},this.setQueryParameters(e))},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))return R.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:R.removeRefinement(this.facetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return R.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:R.removeRefinement(this.facetsExcludes,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return R.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:R.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},removeTagRefinement:function(t){var e;return this.isTagRefined(t)?(e={tagRefinements:this.tagRefinements.filter(function(e){return e!==t})},this.setQueryParameters(e)):this},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))return this.setQueryParameters({facetsRefinements:R.toggleRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleExcludeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsExcludes:R.toggleRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return this.setQueryParameters({disjunctiveFacetsRefinements:R.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},toggleHierarchicalFacetRefinement:function(e,t){var n,r;if(this.isHierarchicalFacet(e))return n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={},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:v({},r,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration")},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var n;if(this.isHierarchicalFacet(e))return(n={})[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:v({},n,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.")},removeHierarchicalFacetRefinement:function(e){var t;return this.isHierarchicalFacetRefined(e)?((t={})[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:v({},t,this.hierarchicalFacetsRefinements)})):this},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)&&R.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&R.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&R.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){return!!this.isHierarchicalFacet(e)&&(e=this.getHierarchicalRefinement(e),t?-1!==e.indexOf(t):0<e.length)},isNumericRefined:function(e,t,n){var r,i;return void 0===n&&void 0===t?!!this.numericRefinements[e]:(r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==n&&r?(n=Ve(n),t=void 0!==(e=this.numericRefinements[e][t],i=n,x(e,function(e){return Ie(e,i)})),r&&t):r)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=Ce(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 Ce(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","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","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){var n;return this[e]===t?this:((n={})[e]=t,this.setQueryParameters(n))},setQueryParameters:function(e){if(!e)return this;var t=S.validate(this,e);if(t)throw t;var n=this,i=S._parseNumbers(e),t=Object.keys(this).reduce(function(e,t){return e[t]=n[t],e},{}),e=Object.keys(i).reduce(function(e,t){var n=void 0!==e[t],r=void 0!==i[t];return n&&!r?_e(e,[t]):(r&&(e[t]=i[t]),e)},t);return new this.constructor(e)},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 x(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(e){var t;return this.isHierarchicalFacet(e)&&(t=this.getHierarchicalRefinement(e)[0])?(e=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),t.split(e).map(function(e){return e.trim()})):[]},toString:function(){return JSON.stringify(this,null,2)}};var Ae=S;function Ne(e){return Array.isArray(e)?e.filter(Boolean):[]}function Te(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function He(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var n=t.split(":"),t=x(r,function(e){return e[0]===n[0]});return 1<n.length||!t?(e[0].push(n[0]),e[1].push(n[1])):(e[0].push(t[0]),e[1].push(t[1])),e},[[],[]])}var De=function(e,n,i){return Array.isArray(e)?(Array.isArray(i)||(i=[]),(e=e.map(function(t,e){return{criteria:n.map(function(e){return t[e]}),index:e,value:t}})).sort(function(e,t){for(var n=-1;++n<e.criteria.length;){var r=function(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}(e.criteria[n],t.criteria[n]);if(r)return!(n>=i.length)&&"desc"===i[n]?-r:r}return e.index-t.index}),e.map(function(e){return e.value})):[]};var f=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},j=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")},ke=function(d){return function(e,t){function n(e,o,t){var n,s=e;if(0<t){var r=0;for(s=e;r<t;){var i=s&&Array.isArray(s.data)?s.data:[],s=x(i,function(e){return e.isRefined});r++}}return s&&(n=Object.keys(o.data).map(function(e){return[e,o.data[e]]}).filter(function(e){var t,n,r,i,a,e=e[0];return e=e,t=s.path||u,n=f,r=c,a=l,(!(i=u)||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)))}),s.data=De(n.map(function(e){var t,n,r,i,a=e[0],e=e[1];return e=e,a=a,t=c,n=Qe(f),r=o.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:Me(a),count:e,isRefined:n===a||0===n.indexOf(a+t),exhaustive:r,data:null}}),a[0],a[1])),e}var a,c,u,l,f,r=d.hierarchicalFacets[t],i=d.hierarchicalFacetsRefinements[r.name]&&d.hierarchicalFacetsRefinements[r.name][0]||"",o=d._getHierarchicalFacetSeparator(r),s=d._getHierarchicalRootPath(r),h=d._getHierarchicalShowParentLevel(r),r=He(d._getHierarchicalFacetSortBy(r)),m=e.every(function(e){return e.exhaustive}),r=(a=r,c=o,l=h,f=i,e);return(r=(u=s)?e.slice(s.split(o).length):r).reduce(n,{name:d.hierarchicalFacets[t].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:m,data:null})}},Me=f,Qe=j;var $e=f,Be=j;function Le(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function qe(e,t,n){t&&t[n]&&(e.stats=t[n])}function F(l,t,n){var s=t[0],f=(this._rawResults=t,this),e=(Object.keys(s).forEach(function(e){f[e]=s[e]}),Object.keys(n||{}).forEach(function(e){f[e]=n[e]}),this.processingTimeMS=t.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=[],l.getRefinedDisjunctiveFacets()),c=Le(l.facets),u=Le(l.disjunctiveFacets),r=1,h=s.facets||{};Object.keys(h).forEach(function(e){var t,n,r,i,a=h[e],o=(r=l.hierarchicalFacets,t=e,x(r,function(e){return-1<(e.attributes||[]).indexOf(t)}));o?(r=o.attributes.indexOf(e),n=Te(l.hierarchicalFacets,function(e){return e.name===o.name}),f.hierarchicalFacets[n][r]={attribute:e,data:a,exhaustive:s.exhaustiveFacetsCount}):(n=-1!==l.disjunctiveFacets.indexOf(e),r=-1!==l.facets.indexOf(e),n&&(i=u[e],f.disjunctiveFacets[i]={name:e,data:a,exhaustive:s.exhaustiveFacetsCount},qe(f.disjunctiveFacets[i],s.facets_stats,e)),r&&(i=c[e],f.facets[i]={name:e,data:a,exhaustive:s.exhaustiveFacetsCount},qe(f.facets[i],s.facets_stats,e)))}),this.hierarchicalFacets=Ne(this.hierarchicalFacets),e.forEach(function(e){var i=t[r],a=i&&i.facets?i.facets:{},o=l.getHierarchicalFacetByName(e);Object.keys(a).forEach(function(t){var n,e,r=a[t];o?(n=Te(l.hierarchicalFacets,function(e){return e.name===o.name}),-1!==(e=Te(f.hierarchicalFacets[n],function(e){return e.attribute===t}))&&(f.hierarchicalFacets[n][e].data=b({},f.hierarchicalFacets[n][e].data,r))):(n=u[t],e=s.facets&&s.facets[t]||{},f.disjunctiveFacets[n]={name:t,data:v({},r,e),exhaustive:i.exhaustiveFacetsCount},qe(f.disjunctiveFacets[n],i.facets_stats,t),l.disjunctiveFacetsRefinements[t]&&l.disjunctiveFacetsRefinements[t].forEach(function(e){!f.disjunctiveFacets[n].data[e]&&-1<l.disjunctiveFacetsRefinements[t].indexOf(Be(e))&&(f.disjunctiveFacets[n].data[e]=0)}))}),r++}),l.getRefinedHierarchicalFacets().forEach(function(e){var s=l.getHierarchicalFacetByName(e),c=l._getHierarchicalFacetSeparator(s),u=l.getHierarchicalRefinement(e);0===u.length||u[0].split(c).length<2||t.slice(r).forEach(function(e){var o=e&&e.facets?e.facets:{};Object.keys(o).forEach(function(t){var e,n,r=o[t],i=Te(l.hierarchicalFacets,function(e){return e.name===s.name}),a=Te(f.hierarchicalFacets[i],function(e){return e.attribute===t});-1!==a&&(e={},0<u.length&&(e[n=u[0].split(c)[0]]=f.hierarchicalFacets[i][a].data[n]),f.hierarchicalFacets[i][a].data=v(e,r,f.hierarchicalFacets[i][a].data))}),r++})}),Object.keys(l.facetsExcludes).forEach(function(t){var e=l.facetsExcludes[t],n=c[t];f.facets[n]={name:t,data:s.facets[t],exhaustive:s.exhaustiveFacetsCount},e.forEach(function(e){f.facets[n]=f.facets[n]||{name:t},f.facets[n].data=f.facets[n].data||{},f.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(ke(l)),this.facets=Ne(this.facets),this.disjunctiveFacets=Ne(this.disjunctiveFacets),this._state=l}function Ue(e,t){e=x(e,function(e){return e.name===t});return e&&e.stats}function We(e,t,n,r,i){var i=x(i,function(e){return e.name===n}),a=i&&i.data&&i.data[r]?i.data[r]:0,i=i&&i.exhaustive||!1;return{type:t,attributeName:n,name:r,count:a,exhaustive:i}}F.prototype.getFacetByName=function(t){function e(e){return e.name===t}return x(this.facets,e)||x(this.disjunctiveFacets,e)||x(this.hierarchicalFacets,e)},F.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],F.prototype.getFacetValues=function(e,t){r=e;var n,r,i,a,o,s,c=(n=this)._state.isConjunctiveFacet(r)?(i=x(n.facets,u))?Object.keys(i.data).map(function(e){var t=$e(e);return{name:e,escapedValue:t,count:i.data[e],isRefined:n._state.isFacetRefined(r,t),isExcluded:n._state.isExcludeRefined(r,e)}}):[]:n._state.isDisjunctiveFacet(r)?(a=x(n.disjunctiveFacets,u))?Object.keys(a.data).map(function(e){var t=$e(e);return{name:e,escapedValue:t,count:a.data[e],isRefined:n._state.isDisjunctiveFacetRefined(r,t)}}):[]:n._state.isHierarchicalFacet(r)?x(n.hierarchicalFacets,u):void 0;function u(e){return e.name===r}if(c)return o=v({},t,{sortBy:F.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this,function t(n,e,r,i){var a;return i=i||0,Array.isArray(e)?n(e,r[i]):e.data&&0!==e.data.length?(a=e.data.map(function(e){return t(n,e,r,i+1)}),a=n(a,r[i]),v({data:a},e)):e}(function(e,t){if(o.facetOrdering){t=t;a=(a=s).renderingContent&&a.renderingContent.facetOrdering&&a.renderingContent.facetOrdering.values&&a.renderingContent.facetOrdering.values[t];if(Boolean(a))return t=e,n=[],r=[],i=((a=a).order||[]).reduce(function(e,t,n){return e[t]=n,e},{}),t.forEach(function(e){var t=e.path||e.name;void 0!==i[t]?n[i[t]]=e:r.push(e)}),n=n.filter(function(e){return e}),"hidden"===(t=a.sortRemainingBy)?n:n.concat(De(r,(a="alpha"===t?[["path","name"],["asc","asc"]]:[["count"],["desc"]])[0],a[1]))}var n,r,i,a;if(Array.isArray(o.sortBy))return t=He(o.sortBy,F.DEFAULT_SORT),De(e,t[0],t[1]);if("function"==typeof o.sortBy)return a=o.sortBy,e.sort(a);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},c,Array.isArray(c)?[e]:s._state.getHierarchicalFacetByName(c.name).attributes)},F.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?Ue(this.facets,e):this._state.isDisjunctiveFacet(e)?Ue(this.disjunctiveFacets,e):void 0},F.prototype.getRefinements=function(){var o=this._state,s=this,c=[];return Object.keys(o.facetsRefinements).forEach(function(t){o.facetsRefinements[t].forEach(function(e){c.push(We(0,"facet",t,e,s.facets))})}),Object.keys(o.facetsExcludes).forEach(function(t){o.facetsExcludes[t].forEach(function(e){c.push(We(0,"exclude",t,e,s.facets))})}),Object.keys(o.disjunctiveFacetsRefinements).forEach(function(t){o.disjunctiveFacetsRefinements[t].forEach(function(e){c.push(We(0,"disjunctive",t,e,s.disjunctiveFacets))})}),Object.keys(o.hierarchicalFacetsRefinements).forEach(function(a){o.hierarchicalFacetsRefinements[a].forEach(function(e){var t,n,r,i;c.push((t=o,n=a,e=e,r=s.hierarchicalFacets,i=t.getHierarchicalFacetByName(n),t=t._getHierarchicalFacetSeparator(i),i=e.split(t),e=x(r,function(e){return e.name===n}),t=i.reduce(function(e,t){var n=e&&x(e.data,function(e){return e.name===t});return void 0!==n?n:e},e),r=t&&t.count||0,i=t&&t.exhaustive||!1,e=t&&t.path||"",{type:"hierarchical",attributeName:n,name:e,count:r,exhaustive:i}))})}),Object.keys(o.numericRefinements).forEach(function(n){var e=o.numericRefinements[n];Object.keys(e).forEach(function(t){e[t].forEach(function(e){c.push({type:"numeric",attributeName:n,name:e,numericValue:e,operator:t})})})}),o.tagRefinements.forEach(function(e){c.push({type:"tag",attributeName:"_tags",name:e})}),c};var ze=F;function O(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}j=O;function w(e){return"function"==typeof e}function Ye(e){return"object"==typeof e&&null!==e}function Je(e){return void 0===e}O.prototype._events=void 0,O.prototype._maxListeners=void 0,O.defaultMaxListeners=10,O.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},O.prototype.emit=function(e){var t,n,r,i,a,o,s;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||Ye(this._events.error)&&!this._events.error.length))throw(s=arguments[1])instanceof Error?s:((o=new Error('Uncaught, unspecified "error" event. ('+s+")")).context=s,o);if(Je(t=this._events[e]))return!1;if(w(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),t.apply(this,r)}else if(Ye(t))for(r=Array.prototype.slice.call(arguments,1),n=(a=t.slice()).length,i=0;i<n;i++)a[i].apply(this,r);return!0},O.prototype.on=O.prototype.addListener=function(e,t){if(w(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,w(t.listener)?t.listener:t),this._events[e]?Ye(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Ye(this._events[e])&&!this._events[e].warned&&(t=Je(this._maxListeners)?O.defaultMaxListeners:this._maxListeners)&&0<t&&this._events[e].length>t&&(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;throw TypeError("listener must be a function")},O.prototype.once=function(e,t){var n;if(w(t))return n=!1,r.listener=t,this.on(e,r),this;throw TypeError("listener must be a function");function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}},O.prototype.removeListener=function(e,t){var n,r,i,a;if(!w(t))throw TypeError("listener must be a function");if(this._events&&this._events[e])if(i=(n=this._events[e]).length,r=-1,n===t||w(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Ye(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},O.prototype.removeAllListeners=function(e){var t,n;if(this._events)if(this._events.removeListener)if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener"),this._events={}}else{if(w(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e]}else 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this},O.prototype.listeners=function(e){e=this._events&&this._events[e]?w(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},O.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(w(e))return 1;if(e)return e.length}return 0},O.listenerCount=function(e,t){return e.listenerCount(t)};var C=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Ge(e,t){this.main=e,this.fn=t,this.lastResults=null}C(Ge,j),Ge.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Ge.prototype.getModifiedState=function(e){return this.fn(e)};var Xe=Ge;function Ze(n){return Object.keys(n).sort(function(e,t){return e.localeCompare(t)}).reduce(function(e,t){return e[t]=n[t],e},{})}var V={_getQueries:function(s,c){var u=[];return u.push({indexName:s,params:V._getHitsSearchParams(c)}),c.getRefinedDisjunctiveFacets().forEach(function(e){u.push({indexName:s,params:V._getDisjunctiveFacetSearchParams(c,e)})}),c.getRefinedHierarchicalFacets().forEach(function(e){var a,o=c.getHierarchicalFacetByName(e),e=c.getHierarchicalRefinement(e),r=c._getHierarchicalFacetSeparator(o);0<e.length&&1<e[0].split(r).length&&(a=e[0].split(r).slice(0,-1).reduce(function(e,t,n){return e.concat({attribute:o.attributes[n],value:0===n?t:[e[e.length-1].value,t].join(r)})},[])).forEach(function(e,t){e=V._getDisjunctiveFacetSearchParams(c,e.attribute,0===t);function r(t){return o.attributes.some(function(e){return e===t.split(":")[0]})}var n=(e.facetFilters||[]).reduce(function(e,t){var n;return Array.isArray(t)&&0<(n=t.filter(function(e){return!r(e)})).length&&e.push(n),"string"!=typeof t||r(t)||e.push(t),e},[]),i=a[t-1];e.facetFilters=0<t?n.concat(i.attribute+":"+i.value):0<n.length?n:void 0,u.push({indexName:s,params:e})})}),u},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(V._getHitsHierarchicalFacetsAttributes(e)),n=V._getFacetFilters(e),r=V._getNumericFilters(e),i=V._getTagFilters(e),t={facets:-1<t.indexOf("*")?["*"]:t,tagFilters:i};return 0<n.length&&(t.facetFilters=n),0<r.length&&(t.numericFilters=r),Ze(b({},e.getQueryParams(),t))},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=V._getFacetFilters(e,t,n),i=V._getNumericFilters(e,t),a=V._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1},a=(0<a.length&&(o.tagFilters=a),e.getHierarchicalFacetByName(t));return o.facets=a?V._getDisjunctiveHierarchicalFacetAttribute(e,a,n):t,0<i.length&&(o.numericFilters=i),0<r.length&&(o.facetFilters=r),Ze(b({},e.getQueryParams(),o))},_getNumericFilters:function(e,i){var a;return e.numericFilters||(a=[],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){var t;Array.isArray(e)?(t=e.map(function(e){return r+n+e}),a.push(t)):a.push(r+n+e)})})}),a)},_getTagFilters:function(e){return e.tagFilters||e.tagRefinements.join(",")},_getFacetFilters:function(o,s,c){var u=[],e=o.facetsRefinements||{},n=(Object.keys(e).forEach(function(t){(e[t]||[]).forEach(function(e){u.push(t+":"+e)})}),o.facetsExcludes||{}),r=(Object.keys(n).forEach(function(t){(n[t]||[]).forEach(function(e){u.push(t+":-"+e)})}),o.disjunctiveFacetsRefinements||{}),l=(Object.keys(r).forEach(function(t){var n,e=r[t]||[];t!==s&&e&&0!==e.length&&(n=[],e.forEach(function(e){n.push(t+":"+e)}),u.push(n))}),o.hierarchicalFacetsRefinements||{});return Object.keys(l).forEach(function(e){var t=(l[e]||[])[0];if(void 0!==t){var n,r=o.getHierarchicalFacetByName(e),i=o._getHierarchicalFacetSeparator(r),a=o._getHierarchicalRootPath(r);if(s===e){if(-1===t.indexOf(i)||!a&&!0===c||a&&a.split(i).length===t.split(i).length)return;t=a?(n=a.split(i).length-1,a):(n=t.split(i).length-2,t.slice(0,t.lastIndexOf(i)))}else n=t.split(i).length-1;(e=r.attributes[n])&&u.push([e+":"+t])}}),u},_getHitsHierarchicalFacetsAttributes:function(i){return i.hierarchicalFacets.reduce(function(e,t){var n,r=i.getHierarchicalRefinement(t.name)[0];return r?(n=i._getHierarchicalFacetSeparator(t),r=r.split(n).length,n=t.attributes.slice(0,r+1),e.concat(n)):(e.push(t.attributes[0]),e)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r,i=e._getHierarchicalFacetSeparator(t);return!0===n?(n=0,(r=e._getHierarchicalRootPath(t))&&(n=r.split(i).length),[t.attributes[n]]):(r=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1,t.attributes.slice(0,1+r))},getSearchForFacetQuery:function(e,t,n,r){r=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,t={facetQuery:t,facetName:e};return"number"==typeof n&&(t.maxFacetHits=n),Ze(b({},V._getHitsSearchParams(r),t))}},_=V,E="3.11.2",Ke=f;function I(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.2)"),this.setClient(e);e=n||{};e.index=t,this.state=Ae.make(e),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function et(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function tt(){return this.state.page}C(I,j),I.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},I.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},I.prototype.getQuery=function(){var e=this.state;return _._getHitsSearchParams(e)},I.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,e=_._getQueries(n.index,n),r=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(e).then(function(e){return r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),{content:new ze(n,e.results),state:n,_originalResponse:e}},function(e){throw r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),e});this.client.search(e).then(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(null,new ze(n,e.results),n)}).catch(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(e,null,n)})},I.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,n=this.derivedHelpers[0];if(!n)return Promise.resolve([]);var n=n.getModifiedState(t),t=b({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:_e(_._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),r="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(r);var i=this.client.initIndex(n.index);if("function"!=typeof i.findAnswers)throw new Error(r);return i.findAnswers(n.query,e.queryLanguages,t)},I.prototype.searchForFacetValues=function(t,e,n,r){var i,a,o,s="function"==typeof this.client.searchForFacetValues,c="function"==typeof this.client.initIndex;if(s||c||"function"==typeof this.client.search)return i=this.state.setQueryParameters(r||{}),a=i.isDisjunctiveFacet(t),r=_.getSearchForFacetQuery(t,e,n,i),this._currentNbQueries++,o=this,n=s?this.client.searchForFacetValues([{indexName:i.index,params:r}]):c?this.client.initIndex(i.index).searchForFacetValues(r):(delete r.facetName,this.client.search([{type:"facet",facet:t,indexName:i.index,params:r}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:i,facet:t,query:e}),n.then(function(e){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),(e=Array.isArray(e)?e[0]:e).facetHits.forEach(function(e){e.escapedValue=Ke(e.value),e.isRefined=a?i.isDisjunctiveFacetRefined(t,e.escapedValue):i.isFacetRefined(t,e.escapedValue)}),e},function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e});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")},I.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},I.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},I.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},I.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},I.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},I.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},I.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},I.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},I.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},I.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},I.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},I.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},I.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},I.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},I.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},I.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},I.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},I.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},I.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},I.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},I.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},I.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},I.prototype.setCurrentPage=et,I.prototype.setPage=et,I.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},I.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},I.prototype.setState=function(e){return this._change({state:Ae.make(e),isPageReset:!1}),this},I.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new Ae(e),this},I.prototype.hasRefinements=function(e){return!!Ee(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))},I.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},I.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},I.prototype.hasTag=function(e){return this.state.isTagRefined(e)},I.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},I.prototype.getIndex=function(){return this.state.index},I.prototype.getCurrentPage=tt,I.prototype.getPage=tt,I.prototype.getTags=function(){return this.state.tagRefinements},I.prototype.getRefinements=function(e){var n=[],r=(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"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"disjunctive"})}),this.state.getNumericRefinements(e));return Object.keys(r).forEach(function(e){var t=r[e];n.push({value:t,operator:e,type:"numeric"})}),n},I.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},I.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},I.prototype._search=function(e){var r=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=_._getQueries(r.index,r),i.push({state:r,queriesCount:t.length,helper:this}),this.emit("search",{state:r,results:this.lastResults})),this.derivedHelpers.map(function(e){var t=e.getModifiedState(r),n=_._getQueries(t.index,t);return i.push({state:t,queriesCount:n.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),n})),t=Array.prototype.concat.apply(t,e),e=this._queryId++;this._currentNbQueries++;try{this.client.search(t).then(this._dispatchAlgoliaResponse.bind(this,i,e)).catch(this._dispatchAlgoliaError.bind(this,e))}catch(e){this.emit("error",{error:e})}},I.prototype._dispatchAlgoliaResponse=function(e,t,n){var r;t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty"),r=n.results.slice(),e.forEach(function(e){var t=e.state,n=e.queriesCount,e=e.helper,n=r.splice(0,n),n=e.lastResults=new ze(t,n);e.emit("result",{results:n,state:t})}))},I.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"))},I.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},I.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},I.prototype._change=function(e){var t=e.state,e=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:e}))},I.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},I.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.2)"),this.client=e),this},I.prototype.getClient=function(){return this.client},I.prototype.derive=function(e){e=new Xe(this,e);return this.derivedHelpers.push(e),e},I.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},I.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var nt=I;function rt(e,t,n){return new nt(e,t,n)}rt.version=E,rt.AlgoliaSearchHelper=nt,rt.SearchParameters=Ae,rt.SearchResults=ze;var it=rt;function at(e){return(at="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 ot(e){return function(e){if(Array.isArray(e))return st(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?st(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ct(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(n),!0).forEach(function(e){lt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function lt(e,t,n){return(t=function(e){e=function(e,t){if("object"!==at(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===at(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(e){var t=e.attributeName,n=e.attributeValue,e=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(e||1,">")}function ht(){return"configure"}function mt(a){var e=Object.keys(a.matchingPatterns).reduce(function(e,t){var n=a.matchingPatterns[t],r=X(a.hit,t),i=n.score;return Array.isArray(r)?[].concat(ot(e),[r.map(function(e){return ft({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(ot(e),[ft({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]);return a.transformSearchParameters(new it.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.hit.objectID)],optionalFilters:e}))}f=o({displayName:"AlgoliaConfigureRelatedItems",$$type:"ais.configureRelatedItems",defaultProps:{transformSearchParameters:function(e){return ut({},e)}},getProvidedProps:function(){return{}},getSearchParameters:function(e,t){return e.setQueryParameters(mt(t))},transitionState:function(e,t,n){var r,i=ht(),a=(r=W(mt(e)),Object.keys(r).forEach(function(e){var t=r[e];Array.isArray(t)&&0===t.length&&delete r[e]}),r),o=Object.keys(a),s=this._searchParameters?Object.keys(this._searchParameters).filter(function(e){return-1===o.indexOf(e)}):[];return this._searchParameters=a,g(n,lt({},i,ut(ut({},l(n[i],s)),a)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){var n=this,r=ht(),i=d({ais:e.contextValue,multiIndexContext:e.indexContextValue}),a=y({ais:e.contextValue,multiIndexContext:e.indexContextValue})&&t.indices?t.indices[i]:t,i=(a&&a[r]?Object.keys(a[r]):[]).reduce(function(e,t){return n._searchParameters[t]||(e[t]=a[r][t]),e},{});return g(t,lt({},r,i),{ais:e.contextValue,multiIndexContext:e.indexContextValue})}});function dt(e,t){return e(t={exports:{}},t.exports),t.exports}var C="function"==typeof Symbol&&Symbol.for,pt=C?Symbol.for("react.element"):60103,yt=C?Symbol.for("react.portal"):60106,gt=C?Symbol.for("react.fragment"):60107,vt=C?Symbol.for("react.strict_mode"):60108,bt=C?Symbol.for("react.profiler"):60114,xt=C?Symbol.for("react.provider"):60109,Pt=C?Symbol.for("react.context"):60110,Rt=C?Symbol.for("react.async_mode"):60111,St=C?Symbol.for("react.concurrent_mode"):60111,jt=C?Symbol.for("react.forward_ref"):60112,Ft=C?Symbol.for("react.suspense"):60113,Ot=C?Symbol.for("react.suspense_list"):60120,wt=C?Symbol.for("react.memo"):60115,Ct=C?Symbol.for("react.lazy"):60116,Vt=C?Symbol.for("react.block"):60121,_t=C?Symbol.for("react.fundamental"):60117,Et=C?Symbol.for("react.responder"):60118,It=C?Symbol.for("react.scope"):60119;function A(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case pt:switch(e=e.type){case Rt:case St:case gt:case bt:case vt:case Ft:return e;default:switch(e=e&&e.$$typeof){case Pt:case jt:case Ct:case wt:case xt:return e;default:return t}}case yt:return t}}}function At(e){return A(e)===St}var Nt={AsyncMode:Rt,ConcurrentMode:St,ContextConsumer:Pt,ContextProvider:xt,Element:pt,ForwardRef:jt,Fragment:gt,Lazy:Ct,Memo:wt,Portal:yt,Profiler:bt,StrictMode:vt,Suspense:Ft,isAsyncMode:function(e){return At(e)||A(e)===Rt},isConcurrentMode:At,isContextConsumer:function(e){return A(e)===Pt},isContextProvider:function(e){return A(e)===xt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===pt},isForwardRef:function(e){return A(e)===jt},isFragment:function(e){return A(e)===gt},isLazy:function(e){return A(e)===Ct},isMemo:function(e){return A(e)===wt},isPortal:function(e){return A(e)===yt},isProfiler:function(e){return A(e)===bt},isStrictMode:function(e){return A(e)===vt},isSuspense:function(e){return A(e)===Ft},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===gt||e===St||e===bt||e===vt||e===Ft||e===Ot||"object"==typeof e&&null!==e&&(e.$$typeof===Ct||e.$$typeof===wt||e.$$typeof===xt||e.$$typeof===Pt||e.$$typeof===jt||e.$$typeof===_t||e.$$typeof===Et||e.$$typeof===It||e.$$typeof===Vt)},typeOf:A},j=dt(function(e,t){});j.AsyncMode,j.ConcurrentMode,j.ContextConsumer,j.ContextProvider,j.Element,j.ForwardRef,j.Fragment,j.Lazy,j.Memo,j.Portal,j.Profiler,j.StrictMode,j.Suspense,j.isAsyncMode,j.isConcurrentMode,j.isContextConsumer,j.isContextProvider,j.isElement,j.isForwardRef,j.isFragment,j.isLazy,j.isMemo,j.isPortal,j.isProfiler,j.isStrictMode,j.isSuspense,j.isValidElementType,j.typeOf,dt(function(e){e.exports=Nt});function Tt(){}function Ht(){}Ht.resetWarningCache=Tt;E=dt(function(e){function t(e,t,n,r,i,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a)throw(a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",a}function n(){return t}e.exports=(e={array:t.isRequired=t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Ht,resetWarningCache:Tt}).PropTypes=e}),C=o({displayName:"AlgoliaDynamicWidgets",$$type:"ais.dynamicWidgets",defaultProps:{transformItems:function(e){return e},maxValuesPerFacet:20},propTypes:{transformItems:E.func,facets:E.arrayOf(E.string),maxValuesPerFacet:E.number},getProvidedProps:function(e,t,n){var r,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(!e.facets||Array.isArray(e.facets)&&e.facets.length<=1&&("*"===e.facets[0]||void 0===e.facets[0]))return n?(r=n.renderingContent&&n.renderingContent.facetOrdering&&n.renderingContent.facetOrdering.facets&&n.renderingContent.facetOrdering.facets.order||[],20<(r=e.transformItems(r,{results:n})).length&&!e.facets&&console.warn("More than ".concat(20," facets are requested to be displayed without explicitly setting which facets to retrieve. This could have a performance impact. Set \"facets\" to [] to do two smaller network requests, or explicitly to ['*'] to avoid this warning.")),e.maxValuesPerFacet<n._state.maxValuesPerFacet&&console.warn("The maxValuesPerFacet set by dynamic widgets (".concat(e.maxValuesPerFacet,") is smaller than one of the limits set by a widget (").concat(n._state.maxValuesPerFacet,"). This causes a mismatch in query parameters and thus an extra network request when that widget is mounted.")),{attributesToRender:r}):{attributesToRender:[]};throw new Error('The `facets` prop only accepts [] or ["*"], you passed '.concat(JSON.stringify(e.facets)))},getSearchParameters:function(e,t){return(t.facets||["*"]).reduce(function(e,t){return e.addFacet(t)},e.setQueryParameters({maxValuesPerFacet:Math.max(t.maxValuesPerFacet||0,e.maxValuesPerFacet||0)}))}});function Dt(e){return(Dt="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 kt(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Dt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Dt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e){return function(e){if(Array.isArray(e))return Qt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Qt(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qt(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $t(){return"query"}function Bt(e,t,n){$t();e=u(e,t,n,"query","");return e||""}j=o({displayName:"AlgoliaAutoComplete",$$type:"ais.autoComplete",getProvidedProps:function(e,t,n){return{hits:(r=n).results?r.results.hits&&Array.isArray(r.results.hits)?z(Y(r.results.hits,r.results.queryID),r.results.hitsPerPage,r.results.page):Object.keys(r.results).reduce(function(e,t){return[].concat(Mt(e),[{index:t,hits:z(Y(r.results[t].hits,r.results[t].queryID),r.results[t].hitsPerPage,r.results[t].page)}])},[]):[],currentRefinement:Bt(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})};var r},refine:function(e,t,n){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},$t(),g(t,kt({},"query",n),e,!0)},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,$t())},getSearchParameters:function(e,t,n){return e.setQuery(Bt(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))}});function Lt(e){return(Lt="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 qt(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Lt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Lt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ut(e){return e.attributes[0]}var Wt=o({displayName:"AlgoliaBreadcrumb",$$type:"ais.breadcrumb",propTypes:{attributes:function(e,t,n){if(!Array.isArray(e[t])||e[t].some(function(e){return"string"!=typeof e})||e[t].length<1)return new Error("Invalid prop ".concat(t," supplied to ").concat(n,". Expected an Array of Strings"))},transformItems:E.func},getProvidedProps:function(e,t,n){var r=Ut(e),n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return Boolean(n)&&Boolean(n.getFacetByName(r))?(r=(n=n.getFacetValues(r)).data?function n(e){return e.reduce(function(e,t){return e=t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),t.data)?e.concat(n(t.data)):e},[])}(n.data):[],{canRefine:0<(n=e.transformItems?e.transformItems(r):r).length,items:n}):{items:[],canRefine:!1}},refine:function(e,t,n){return r={ais:e.contextValue,multiIndexContext:e.indexContextValue},g(t,qt({},Ut(e),n||""),r,!0,"hierarchicalMenu");var r}});function zt(e){return(zt="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 Yt(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Jt(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==zt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===zt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Yt(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var Gt=o({displayName:"AlgoliaCurrentRefinements",$$type:"ais.currentRefinements",propTypes:{transformItems:E.func},getProvidedProps:function(n,e,t,r){r=r.reduce(function(e,t){return void 0===t.items||!n.clearsQuery&&"query"===t.id||n.clearsQuery&&"query"===t.id&&""===t.items[0].currentRefinement?e:e.concat(t.items.map(function(e){return Jt(Jt({},e),{},{id:t.id,index:t.index})}))},[]),r=n.transformItems?n.transformItems(r):r;return{items:r,canRefine:0<r.length}},refine:function(e,t,n){return(n instanceof Array?n.map(function(e){return e.value}):[n]).reduce(function(e,t){return t(e)},t)}});function Xt(e){return(Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Zt=["defaultRefinement"];function Kt(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Xt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Xt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function en(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function tn(){return"boundingBox"}function nn(e){return[e.northEast.lat,e.northEast.lng,e.southWest.lat,e.southWest.lng].join()}function rn(e){return e=e.match(sn),{lat:parseFloat(e[1]),lng:parseFloat(e[2])}}function an(e,t,n){if(G(e=u(e,t,n,tn(),{})))return{northEast:{lat:parseFloat(e.northEast.lat),lng:parseFloat(e.northEast.lng)},southWest:{lat:parseFloat(e.southWest.lat),lng:parseFloat(e.southWest.lng)}}}function on(e,t,n){return g(e,Kt({},tn(),t),n,!0)}var sn=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/,cn=o({displayName:"AlgoliaGeoSearch",$$type:"ais.geoSearch",getProvidedProps:function(e,t,n){var r={ais:e.contextValue,multiIndexContext:e.indexContextValue},n=p(n,r),i=an(e,t,r),a=n&&n._state.insideBoundingBox&&function(e){e=e.split(",");return{northEast:{lat:parseFloat(e[0]),lng:parseFloat(e[1])},southWest:{lat:parseFloat(e[2]),lng:parseFloat(e[3])}}}(n._state.insideBoundingBox)||void 0,e=(t=t,r=r,(e=e).defaultRefinement,e=en(e,Zt),(o=u(e,t,r,"aroundLatLng"))||(o=u(e,t,r,"configure.aroundLatLng"))&&rn(o)),t=n&&n._state.aroundLatLng&&rn(n._state.aroundLatLng)||void 0,r=i||a,o=e||t;return{hits:n?n.hits.filter(function(e){return Boolean(e._geoloc)}):[],isRefinedWithMap:Boolean(r),currentRefinement:r,position:o}},refine:function(e,t,n){return on(t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,n){n=an(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return n?e.setQueryParameter("insideBoundingBox",nn(n)):e},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},tn())},getMetadata:function(e,t){var n=[],r=tn(),i={ais:e.contextValue,multiIndexContext:e.indexContextValue},a=d(i),o={},e=an(e,t,i);return e&&n.push({label:"".concat(r,": ").concat(nn(e)),value:function(e){return on(e,o,i)},currentRefinement:e}),{id:r,index:a,items:n}},shouldComponentUpdate:function(){return!0}});function un(e){return(un="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 ln(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function fn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ln(Object(n),!0).forEach(function(e){hn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function hn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===un(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){return e.attributes[0]}var mn="hierarchicalMenu";function dn(e,t,n){t=u(e,t,n,"".concat(mn,".").concat(N(e)),null);return""===t?null:t}function pn(e,c,u,l){return e.map(function(e){return{label:e.name,value:(t=e.escapedValue,r=(n=c).id,i=c.attributes,a=c.separator,o=c.rootPath,s=c.showParentLevel,null===(n=dn(c,u,l))?t:new it.SearchParameters({hierarchicalFacets:[{name:r,attributes:i,separator:a,rootPath:o,showParentLevel:s}]}).toggleHierarchicalFacetRefinement(r,n).toggleHierarchicalFacetRefinement(r,t).getHierarchicalRefinement(r)[0]),count:e.count,isRefined:e.isRefined,items:e.data&&pn(e.data,c,u,l)};var t,n,r,i,a,o,s})}function yn(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;return e.slice(0,t).map(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Array.isArray(e.items)?fn(fn({},e),{},{items:yn(e.items,t)}):e})}function gn(e,t,n,r){return g(t,hn({},N(e),n||""),r,!0,mn)}function vn(e){var t=e.attribute,n=e.hit,r=e.highlightProperty,i=void 0===(i=e.preTag)?he:i,e=e.postTag,a=void 0===(r=(t={attribute:t,highlightProperty:r,hit:n,preTag:i,postTag:void 0===e?me:e}).preTag)?"<em>":r,o=void 0===(r=t.postTag)?"</em>":r,r=t.highlightProperty,n=t.attribute;if(t=t.hit)return t=X(t[r],n)||{},Array.isArray(t)?t.map(function(e){return de({preTag:a,postTag:o,highlightedValue:e.value})}):de({preTag:a,postTag:o,highlightedValue:t.value});throw new Error("`hit`, the matching record, must be provided")}var bn=["name:asc"],xn=o({displayName:"AlgoliaHierarchicalMenu",$$type:"ais.hierarchicalMenu",propTypes:{attributes:function(e,t,n){if(!Array.isArray(e[t])||e[t].some(function(e){return"string"!=typeof e})||e[t].length<1)return new Error("Invalid prop ".concat(t," supplied to ").concat(n,". Expected an Array of Strings"))},separator:E.string,rootPath:E.string,showParentLevel:E.bool,defaultRefinement:E.string,showMore:E.bool,limit:E.number,showMoreLimit:E.number,transformItems:E.func,facetOrdering:E.bool},defaultProps:{showMore:!1,limit:10,showMoreLimit:20,separator:" > ",rootPath:null,showParentLevel:!0,facetOrdering:!0},getProvidedProps:function(e,t,n){var r=e.showMore,i=e.limit,a=e.showMoreLimit,o=e.facetOrdering,s=N(e),n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return Boolean(n)&&Boolean(n.getFacetByName(s))?(r=r?a:i,i=(a=n.getFacetValues(s,{sortBy:bn,facetOrdering:o})).data?pn(a.data,e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}):[],n=e.transformItems?e.transformItems(i):i,{items:yn(n,r),currentRefinement:dn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:0<n.length}):{items:[],currentRefinement:dn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:!1}},refine:function(e,t,n){return gn(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(mn,".").concat(N(n)));var n},getSearchParameters:function(e,t,n){var r=t.attributes,i=t.separator,a=t.rootPath,o=t.showParentLevel,s=t.showMore,c=t.limit,u=t.showMoreLimit,l=t.contextValue,f=N(t),s=s?u:c,u=(e=e.addHierarchicalFacet({name:f,attributes:r,separator:i,rootPath:a,showParentLevel:o}).setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,s)}),dn(t,n,{ais:l,multiIndexContext:t.indexContextValue}));return e=null!==u?e.toggleHierarchicalFacetRefinement(f,u):e},getMetadata:function(t,e){var n=t.attributes[0],r=N(t),e=dn(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),n=e?[{label:"".concat(n,": ").concat(Z(e)),attribute:n,value:function(e){return gn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]:[];return{id:r,index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:n}}}),Pn=o({displayName:"AlgoliaHighlighter",$$type:"ais.highlighter",propTypes:{},getProvidedProps:function(){return{highlight:vn}}}),Rn=o({displayName:"AlgoliaHits",$$type:"ais.hits",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{hits:Y(z(n.hits,n.hitsPerPage,n.page),n.queryID)}:{hits:[]}},getSearchParameters:function(e){return e}});function Sn(e){return(Sn="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 jn(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Fn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jn(Object(n),!0).forEach(function(e){On(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function On(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Sn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Sn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(){return"hitsPerPage"}function Cn(e,t,n){e=u(e,t,n,"hitsPerPage",null);return"string"==typeof e?parseInt(e,10):e}var Vn=o({displayName:"AlgoliaHitsPerPage",$$type:"ais.hitsPerPage",propTypes:{defaultRefinement:E.number.isRequired,items:E.arrayOf(E.shape({label:E.string,value:E.number.isRequired})).isRequired,transformItems:E.func},getProvidedProps:function(e,t){var n=Cn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?Fn(Fn({},e),{},{isRefined:!0}):Fn(Fn({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,On({},"hitsPerPage",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},wn())},getSearchParameters:function(e,t,n){return e.setHitsPerPage(Cn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(){return{id:wn()}}});function _n(e){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var En=["page"];function In(e,t,n){return(t=function(e){e=function(e,t){if("object"!==_n(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_n(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===_n(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(e){return function(e){if(Array.isArray(e))return Nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Nn(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nn(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tn(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Hn(e){e=e||{};e.page;return Tn(e,En)}var Dn=o({displayName:"AlgoliaInfiniteHits",$$type:"ais.infiniteHits",getProvidedProps:function(e,t,n){var r,i,a,o,s,c,u,l,f,h,m=this,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?(r=n.page,c=n.hits,f=n.hitsPerPage,i=n.nbPages,a=n._state,this._cache=e.cache||this._cache||(s=o=void 0,{read:function(e){e=e.state;return $(s,Hn(e))?o:null},write:function(e){var t=e.state,e=e.hits;s=Hn(t),o=e}}),e=this._cache.read({state:a})||{},c=Y(z(c,f,r),n.queryID),e[r]=c,this._cache.write({state:a,hits:e}),u=Math.min.apply(Math,An(Object.keys(e).map(Number))),l=Math.max.apply(Math,An(Object.keys(e).map(Number))),f=0<u,n=l<i-1,{hits:(h=e,Object.keys(h).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(h[t])},[])),hasPrevious:f,hasMore:n,refinePrevious:function(e){return m.refine(e,u-1)},refineNext:function(e){return m.refine(e,l+1)}}):{hits:[],hasPrevious:!1,hasMore:!1,refine:function(){},refinePrevious:function(){},refineNext:function(){}}},getSearchParameters:function(e,t,n){return e.setQueryParameters({page:(t={ais:(e=t).contextValue,multiIndexContext:t.indexContextValue},("string"==typeof(e=u(e,n,t,"page",1))?parseInt(e,10):e)-1)})},refine:function(e,t,n,r){return g(t,In({},"page",r+1),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!1)}});function kn(e){return(kn="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 Mn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==kn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===kn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qn="menu";function $n(e){return e.attribute}function Bn(e,t,n){t=u(e,t,n,"".concat(Qn,".").concat($n(e)),null);return""===t?null:t}function Ln(e,t,n,r){return e===Bn(t,n,r)?"":e}function qn(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function Un(e,t,n,r){return g(t,Mn({},$n(e),n||""),r,!0,Qn)}var Wn=["count:desc","name:asc"],zn=o({displayName:"AlgoliaMenu",$$type:"ais.menu",propTypes:{attribute:E.string.isRequired,showMore:E.bool,limit:E.number,showMoreLimit:E.number,defaultRefinement:E.string,transformItems:E.func,searchable:E.bool,facetOrdering:E.bool},defaultProps:{showMore:!1,limit:10,showMoreLimit:20,facetOrdering:!0},getProvidedProps:function(t,n,e,r,i){var a=t.attribute,o=t.searchable,s=t.indexContextValue,c=t.facetOrdering,e=p(e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),u=Boolean(e)&&Boolean(e.getFacetByName(a)),l=Boolean(i&&i[a]&&""!==i.query);if(o&&s)throw new Error("react-instantsearch: searching in *List is not available when used inside a multi index context");return u?(s=l?i[a].map(function(e){return{label:e.value,value:Ln(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),_highlightResult:{label:{value:e.highlighted}},count:e.count,isRefined:e.isRefined}}):e.getFacetValues(a,{sortBy:o?void 0:Wn,facetOrdering:c}).map(function(e){return{label:e.name,value:Ln(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),count:e.count,isRefined:e.isRefined}}),{items:(i=t.transformItems?t.transformItems(s):s).slice(0,qn(t)),currentRefinement:Bn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:0<i.length}):{items:[],currentRefinement:Bn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:u}},refine:function(e,t,n){return Un(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:qn(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Qn,".").concat($n(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=(e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,qn(t))})).addDisjunctiveFacet(r),Bn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}));return e=null!==n?e.addDisjunctiveFacetRefinement(r,n):e},getMetadata:function(t,e){var n=$n(t),e=Bn(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return{id:n,index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:null===e?[]:[{label:"".concat(t.attribute,": ").concat(Z(e)),attribute:t.attribute,value:function(e){return Un(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function Yn(e){return(Yn="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 Jn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Yn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?Xn(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zn(e){var t;return void 0===e.start&&void 0===e.end?"":(t=void 0!==e.start?e.start:"",e=void 0!==e.end?e.end:"","".concat(t,":").concat(e))}var Kn="multiRange";function er(e){return e.attribute}function tr(e,t,n){return u(e,t,n,"".concat(Kn,".").concat(er(e)),"")}function nr(e,t,n,r){return g(t,Jn({},er(e),n),r,!0,Kn)}var rr=o({displayName:"AlgoliaNumericMenu",$$type:"ais.numericMenu",propTypes:{id:E.string,attribute:E.string.isRequired,items:E.arrayOf(E.shape({label:E.node,start:E.number,end:E.number})).isRequired,transformItems:E.func},getProvidedProps:function(o,e,t){var n=o.attribute,s=tr(o,e,{ais:o.contextValue,multiIndexContext:o.indexContextValue}),c=p(t,{ais:o.contextValue,multiIndexContext:o.indexContextValue}),e=o.items.map(function(e){var t,n,r,i,a=Zn(e);return{label:e.label,value:a,isRefined:a===s,noRefinement:!(!c||(e=er(o),a=a,t=(t=c).getFacetByName(e)?t.getFacetStats(e):null,e=a.split(":"),i=0===Number(e[0])||""===a?Number.NEGATIVE_INFINITY:Number(e[0]),a=0===Number(e[1])||""===a?Number.POSITIVE_INFINITY:Number(e[1]),Boolean(t)&&(e=i,r=a,(n=t).min>=e&&n.min<=r||n.max>=e&&n.max<=r||(e=a,(n=i)>=(r=t).min&&n<=r.max)||e>=r.min&&e<=r.max)))}}),t=c&&c.getFacetByName(n)?c.getFacetStats(n):null,n=J(e,function(e){return!0===e.isRefined}),n=(e.some(function(e){return""===e.value})||e.push({value:"",isRefined:void 0===n,noRefinement:!t,label:"All"}),o.transformItems?o.transformItems(e):e);return{items:n,currentRefinement:s,canRefine:0<n.length&&n.some(function(e){return!1===e.noRefinement})}},refine:function(e,t,n){return nr(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Kn,".").concat(er(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,t=0===(n=tr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})).length?{start:null,end:null}:(t=(n=Gn(n.split(":"),2))[0],n=n[1],{start:0<t.length?parseFloat(t):null,end:0<n.length?parseFloat(n):null}),n=t.start,t=t.end;return e=e.addDisjunctiveFacet(r),"number"==typeof n&&(e=e.addNumericRefinement(r,">=",n)),e="number"==typeof t?e.addNumericRefinement(r,"<=",t):e},getMetadata:function(t,e){var n,r=er(t),i=tr(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),e=[],a=d({ais:t.contextValue,multiIndexContext:t.indexContextValue});return""!==i&&(n=J(t.items,function(e){return Zn(e)===i}).label,e.push({label:"".concat(t.attribute,": ").concat(n),attribute:t.attribute,currentRefinement:n,value:function(e){return nr(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})}})),{id:r,index:a,items:e}}});function ir(e){return(ir="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 ar(e,t,n){return(t=function(e){e=function(e,t){if("object"!==ir(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ir(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(){return"page"}function sr(e,t,n){e=u(e,t,n,"page",1);return"string"==typeof e?parseInt(e,10):e}var cr=o({displayName:"AlgoliaPagination",$$type:"ais.pagination",getProvidedProps:function(e,t,n){var n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{nbPages:n=n.nbPages,currentRefinement:sr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:1<n}:null},refine:function(e,t,n){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},g(t,ar({},"page",n),e,!1)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},or())},getSearchParameters:function(e,t,n){return e.setPage(sr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})-1)},getMetadata:function(){return{id:or()}}}),ur=o({displayName:"AlgoliaPoweredBy",$$type:"ais.poweredBy",getProvidedProps:function(){var e="undefined"==typeof window||void 0===window.location?"":window.location.hostname;return{url:"https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&"+"utm_content=".concat(e,"&")+"utm_campaign=poweredby"}}});function lr(e){return(lr="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 fr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==lr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===lr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hr(e){return e.attribute}var mr="range";function dr(e,t,n,r){var t=u(e,t,r,"".concat(mr,".").concat(hr(e)),{}),r=t.min,t=t.max,i=Boolean(e.precision),r={min:r="string"==typeof r?i?parseFloat(r):parseInt(r,10):r,max:t="string"==typeof t?i?parseFloat(t):parseInt(t,10):t},i=void 0!==e.min,t=void 0!==e.max,e=void 0!==r.min,a=void 0!==r.max;if(i&&e&&r.min<n.min)throw Error("You can't provide min value lower than range.");if(t&&a&&r.max>n.max)throw Error("You can't provide max value greater than range.");return i&&!e&&(r.min=n.min),t&&!a&&(r.max=n.max),r}function pr(e,t){return{min:(void 0!==e.min?e:t).min,max:(void 0!==e.max?e:t).max}}function yr(e,t,n,r){e=e||n!==r?e&&t?n:r:void 0;return e}function gr(e,t,n,r,i){var a=n.min,n=n.max,o=r.min,r=r.max,s=void 0===a||""===a,c=void 0===n||""===n,a=s?void 0:parseFloat(a),n=c?void 0:parseFloat(n),u=s||isFinite(a),l=c||isFinite(n);if(!u||!l)throw Error("You can't provide non finite values to the range connector.");if(a<o)throw Error("You can't provide min value lower than range.");if(r<n)throw Error("You can't provide max value greater than range.");return g(t,fr({},hr(e),{min:yr(void 0!==e.min,s,o,a),max:yr(void 0!==e.max,c,r,n)}),i,!0,mr)}var vr=o({displayName:"AlgoliaRange",$$type:"ais.range",propTypes:{id:E.string,attribute:E.string.isRequired,defaultRefinement:E.shape({min:E.number,max:E.number}),min:E.number,max:E.number,precision:E.number,header:E.node,footer:E.node},defaultProps:{precision:0},getProvidedProps:function(e,t,n){var r=e.attribute,i=e.precision,a=e.min,o=e.max,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),s=n&&n.getFacetByName(r),c=s&&n.getFacetStats(r)||{},s=(s?n.getFacetValues(r):[]).map(function(e){return{value:e.name,count:e.count}}),c=(n={min:a,max:o},r=c,a=i,a=Math.pow(10,a),o="number"==typeof n.min&&isFinite(n.min)?n.min:"number"==typeof r.min&&isFinite(r.min)?r.min:void 0,n="number"==typeof n.max&&isFinite(n.max)?n.max:"number"==typeof r.max&&isFinite(r.max)?r.max:void 0,{min:void 0!==o?Math.floor(o*a)/a:o,max:void 0!==n?Math.ceil(n*a)/a:n}),r=c.min,o=c.max,a=(this._currentRange={min:r,max:o},dr(e,t,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue}));return{min:r,max:o,canRefine:0<s.length,currentRefinement:pr(a,this._currentRange),count:s,precision:i}},refine:function(e,t,n){return gr(e,t,n,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(mr,".").concat(hr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=dr(t,n,this._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),t=n.min,n=n.max;return e=e.addDisjunctiveFacet(r),void 0!==t&&(e=e.addNumericRefinement(r,">=",t)),e=void 0!==n?e.addNumericRefinement(r,"<=",n):e},getMetadata:function(t,e){var n=this,r=this._currentRange,i=r.min,r=r.max,e=dr(t,e,this._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),a=e.min,e=e.max,o=[],s=void 0!==a,c=void 0!==e;return(s&&a!==i||c&&e!==r)&&(s=[s?"".concat(a," <= "):"",t.attribute,c?" <= ".concat(e):""],o.push({label:s.join(""),attribute:t.attribute,value:function(e){return gr(t,e,{},n._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:pr({min:a,max:e},{min:i,max:r})})),{id:hr(t),index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:o}}});function br(e){return(br="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 xr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==br(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===br(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pr="refinementList";function Rr(e){return e.attribute}function T(e,t,n){t=u(e,t,n,"".concat(Pr,".").concat(Rr(e)),[]);return"string"!=typeof t?t:t?[t]:[]}function Sr(t,e,n,r){e=T(e,n,r);return-1===e.indexOf(t)?e.concat([t]):e.filter(function(e){return e!==t})}function jr(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function Fr(e,t,n,r){return g(t,xr({},Rr(e),0<n.length?n:""),r,!0,Pr)}var Or=["isRefined","count:desc","name:asc"],wr=o({displayName:"AlgoliaRefinementList",$$type:"ais.refinementList",propTypes:{id:E.string,attribute:E.string.isRequired,operator:E.oneOf(["and","or"]),showMore:E.bool,limit:E.number,showMoreLimit:E.number,defaultRefinement:E.arrayOf(E.oneOfType([E.string,E.number])),searchable:E.bool,transformItems:E.func,facetOrdering:E.bool},defaultProps:{operator:"or",showMore:!1,limit:10,showMoreLimit:20,facetOrdering:!0},getProvidedProps:function(t,n,e,r,i){var a=t.attribute,o=t.searchable,s=t.indexContextValue,c=t.facetOrdering,e=p(e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),u=Boolean(e)&&Boolean(e.getFacetByName(a)),l=Boolean(i&&i[a]&&""!==i.query);if(o&&s)throw new Error("react-instantsearch: searching in *List is not available when used inside a multi index context");return u?(s=l?i[a].map(function(e){return{label:e.value,value:Sr(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),_highlightResult:{label:{value:e.highlighted}},count:e.count,isRefined:e.isRefined}}):e.getFacetValues(a,{sortBy:Or,facetOrdering:c}).map(function(e){return{label:e.name,value:Sr(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),count:e.count,isRefined:e.isRefined}}),{items:(i=t.transformItems?t.transformItems(s):s).slice(0,jr(t)),currentRefinement:T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:0<i.length}):{items:[],currentRefinement:T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),canRefine:u,isFromSearch:l,searchable:o}},refine:function(e,t,n){return Fr(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:jr(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Pr,".").concat(Rr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,i="and"===t.operator?"addFacet":"addDisjunctiveFacet",a="".concat(i,"Refinement");return e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,jr(t))}))[i](r),T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}).reduce(function(e,t){return e[a](r,t)},e)},getMetadata:function(n,r){var e=Rr(n),i={ais:n.contextValue,multiIndexContext:n.indexContextValue};return{id:e,index:d(i),items:0<T(n,r,i).length?[{attribute:n.attribute,label:"".concat(n.attribute,": "),currentRefinement:T(n,r,i),value:function(e){return Fr(n,e,[],i)},items:T(n,r,i).map(function(t){return{label:Z("".concat(t)),value:function(e){e=T(n,e,i).filter(function(e){return e!==t});return Fr(n,r,e,i)}}})}]:[]}}}),Cr=o({displayName:"AlgoliaScrollTo",$$type:"ais.scrollTo",propTypes:{scrollOn:E.string},defaultProps:{scrollOn:"page"},getProvidedProps:function(e,t){var n=e.scrollOn,r=u(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},n,null),e=(this._prevSearchState||(this._prevSearchState={}),l(t=y({ais:e.contextValue,multiIndexContext:e.indexContextValue})?t.indices?t.indices[d({ais:e.contextValue,multiIndexContext:e.indexContextValue})]:{}:t,["configure",n])),t=q(this._prevSearchState,e);return this._prevSearchState=e,{value:r,hasNotChanged:t}}});function Vr(e){return(Vr="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 _r(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Vr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Vr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Er(){return"query"}function Ir(e,t,n){e=u(e,t,n,"query","");return e||""}function Ar(e,t,n,r){return g(t,_r({},"query",n),r,!0)}var Nr=o({displayName:"AlgoliaSearchBox",$$type:"ais.searchBox",propTypes:{defaultRefinement:E.string},getProvidedProps:function(e,t,n){return{currentRefinement:Ir(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),isSearchStalled:n.isSearchStalled}},refine:function(e,t,n){return Ar(0,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,Er())},getSearchParameters:function(e,t,n){return e.setQuery(Ir(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(t,e){e=Ir(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return{id:"query",index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:null===e?[]:[{label:"".concat("query",": ").concat(e),value:function(e){return Ar(0,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function Tr(e){return(Tr="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 Hr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Tr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Tr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dr(){return"relevancyStrictness"}var kr=o({displayName:"AlgoliaRelevantSort",$$type:"ais.relevantSort",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{isVirtualReplica:void 0!==n.appliedRelevancyStrictness,isRelevantSorted:void 0!==n.appliedRelevancyStrictness&&0<n.appliedRelevancyStrictness}:{isVirtualReplica:!1,isRelevantSorted:!1}},getSearchParameters:function(e,t,n){return e.setQueryParameter("relevancyStrictness",(e={ais:t.contextValue,multiIndexContext:t.indexContextValue},u(t,n,e,"relevancyStrictness")))},refine:function(e,t,n){return g(t,Hr({},Dr(),n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)}});function Mr(e){return(Mr="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 Qr(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function $r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qr(Object(n),!0).forEach(function(e){Br(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Br(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Mr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Mr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lr(){return"sortBy"}function qr(e,t,n){e=u(e,t,n,"sortBy",null);return e||null}var Ur=o({displayName:"AlgoliaSortBy",$$type:"ais.sortBy",propTypes:{defaultRefinement:E.string,items:E.arrayOf(E.shape({label:E.string,value:E.string.isRequired})).isRequired,transformItems:E.func},getProvidedProps:function(e,t){var n=qr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?$r($r({},e),{},{isRefined:!0}):$r($r({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,Br({},"sortBy",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},Lr())},getSearchParameters:function(e,t,n){n=qr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return e.setIndex(n)},getMetadata:function(){return{id:Lr()}}}),Wr=o({displayName:"AlgoliaStateResults",$$type:"ais.stateResults",getProvidedProps:function(e,t,n){return{searchState:t,searchResults:p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),allSearchResults:n.results,searching:n.searching,isSearchStalled:n.isSearchStalled,error:n.error,searchingForFacetValues:n.searchingForFacetValues,props:e}}}),zr=o({displayName:"AlgoliaStats",$$type:"ais.stats",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{areHitsSorted:void 0!==n.appliedRelevancyStrictness&&0<n.appliedRelevancyStrictness&&n.nbHits!==n.nbSortedHits,nbHits:n.nbHits,nbSortedHits:n.nbSortedHits,processingTimeMS:n.processingTimeMS}:null}});function Yr(e){return(Yr="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 Jr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Yr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Yr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e){return e.attribute}var Xr="toggle",Zr=["0","false","null","undefined"];function Kr(e,t,n){t=u(e,t,n,"".concat(Xr,".").concat(Gr(e)),!1);return-1===Zr.indexOf(t)&&Boolean(t)}function ei(e,t,n,r){return g(t,Jr({},Gr(e),n||!1),r,!0,Xr)}E=o({displayName:"AlgoliaToggle",$$type:"ais.toggle",propTypes:{label:E.string.isRequired,attribute:E.string.isRequired,value:E.any.isRequired,filter:E.func,defaultRefinement:E.bool},getProvidedProps:function(e,t,n){var r=e.attribute,i=e.value,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=Kr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),e=n&&n.getFacetByName(r)?n.getFacetValues(r):null,n=e&&e.length?J(e,function(e){return e.name===i.toString()}):null,r=n&&n.count,n=e&&e.length?e.reduce(function(e,t){return e+t.count},0):null;return{currentRefinement:t,canRefine:t?null!==n&&0<n:null!==r&&0<r,count:{checked:n,unchecked:r}}},refine:function(e,t,n){return ei(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Xr,".").concat(Gr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,i=t.value,a=t.filter,n=Kr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),t=e.addDisjunctiveFacet(r);return t=n&&(t=t.addDisjunctiveFacetRefinement(r,i),a)?a(t):t},getMetadata:function(t,e){var n=Gr(t),e=Kr(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),r=[],i=d({ais:t.contextValue,multiIndexContext:t.indexContextValue});return e&&r.push({label:t.label,currentRefinement:e,attribute:t.attribute,value:function(e){return ei(t,e,!1,{ais:t.contextValue,multiIndexContext:t.indexContextValue})}}),{id:n,index:i,items:r}}});function ti(e){return(ti="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 ni(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ri(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ni(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==ti(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ti(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ni(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function ii(r,i,a){return function(e,t){if("function"!=typeof r)throw new TypeError("Expected insightsClient to be a Function");var n=function(e){var t=e.method,n=e.results,r=e.currentHit,i=n.index,a=r.__queryID,o=[r.objectID];if(!a)throw new Error("Could not infer `queryID`. Ensure `clickAnalytics: true` was added with the Configure widget.\nSee: https://alg.li/VpPpLt");switch(t){case"clickedObjectIDsAfterSearch":return{index:i,queryID:a,objectIDs:o,positions:[r.__position]};case"convertedObjectIDsAfterSearch":return{index:i,queryID:a,objectIDs:o};default:throw new Error('Unsupported method "'.concat(t,'" passed to the insights function. The supported methods are: "clickedObjectIDsAfterSearch", "convertedObjectIDsAfterSearch".'))}}({method:e,results:i,currentHit:a});r(e,ri(ri({},n),t))}}var ai=C;e.EXPERIMENTAL_connectConfigureRelatedItems=f,e.EXPERIMENTAL_connectDynamicWidgets=ai,e.connectAutoComplete=j,e.connectBreadcrumb=Wt,e.connectConfigure=t,e.connectCurrentRefinements=Gt,e.connectDynamicWidgets=C,e.connectGeoSearch=cn,e.connectHierarchicalMenu=xn,e.connectHighlight=Pn,e.connectHitInsights=function(r){return o({displayName:"AlgoliaInsights",$$type:"ais.insights",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return{insights:ii(r,n,e.hit)}}})},e.connectHits=Rn,e.connectHitsPerPage=Vn,e.connectInfiniteHits=Dn,e.connectMenu=zn,e.connectNumericMenu=rr,e.connectPagination=cr,e.connectPoweredBy=ur,e.connectRange=vr,e.connectRefinementList=wr,e.connectRelevantSort=kr,e.connectScrollTo=Cr,e.connectSearchBox=Nr,e.connectSortBy=Ur,e.connectStateResults=Wr,e.connectStats=zr,e.connectToggleRefinement=E,Object.defineProperty(e,"__esModule",{value:!0})});
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(((e=e||self).ReactInstantSearch=e.ReactInstantSearch||{},e.ReactInstantSearch.Connectors={}),e.React)}(this,function(e,n){"use strict";var H="default"in n?n.default:n,D="undefined"!=typeof Element,k="function"==typeof Map,M="function"==typeof Set,Q="function"==typeof ArrayBuffer;var $=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1}else if(k&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o=t.entries();!(i=o.next()).done;)if(!n.has(i.value[0]))return!1;for(o=t.entries();!(i=o.next()).done;)if(!e(i.value[1],n.get(i.value[0])))return!1}else if(M&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o=t.entries();!(i=o.next()).done;)if(!n.has(i.value[0]))return!1}else if(Q&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(t[i]!==n[i])return!1}else{if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;if(D&&t instanceof Element)return!1;for(i=r;0!=i--;)if(!("_owner"===a[i]&&t.$$typeof||e(t[a[i]],n[a[i]])))return!1}return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}};function B(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function L(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?B(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===a(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var q=function(e,t){if(e!==t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,a=0;a<n.length;a++)if(!i.call(t,n[a])||e[n[a]]!==t[n[a]])return!1}return!0},U=function(e){return e.displayName||e.name||"UnknownComponent"},W=function r(i){return Object.keys(i).forEach(function(e){var t,n=i[e];"object"!==a(t=n)||null===t||Array.isArray(t)||(G(n)?r(n):delete i[e])}),i};function z(e,n,r){return e.map(function(e,t){return L(L({},e),{},{__position:n*r+t+1})})}function Y(e,t){return t?e.map(function(e){return L(L({},e),{},{__queryID:t})}):e}function J(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function G(e){return e&&0<Object.keys(e).length}function l(e,t){if(null==e)return{};for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var a=r[i];0<=t.indexOf(a)||(n[a]=e[a])}return n}var X=function(e,t){return(Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".")).reduce(function(e,t){return e?e[t]:void 0},e)};function Z(e){return e.replace(/^\\-/,"-")}var t=n.createContext({onInternalStateUpdate:function(){},createHrefForState:function(){return"#"},onSearchForFacetValues:function(){},onSearchStateChange:function(){},onSearchParameters:function(){},store:{},widgetsManager:{},mainTargetedIndex:""}),K=t.Consumer,t=(t.Provider,n.createContext(void 0)),ee=t.Consumer,te=(t.Provider,["contextValue"]);function i(e){return(i="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 ne(){return(ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function re(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function ie(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ae(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function oe(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,le(r.key),r)}}function se(e,t){return(se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ce(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=ue(n),t=(e=r?(e=ue(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t,n){(t=le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function le(e){e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===i(e)?e:String(e)}function fe(u){var o;if(u.displayName)return o="function"==typeof u.getSearchParameters||"function"==typeof u.getMetadata||"function"==typeof u.transitionState,function(i){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e);var n,r=ce(a);function a(e){var i;if(this instanceof a)return c(s(i=r.call(this,e)),"unsubscribe",void 0),c(s(i),"unregisterWidget",void 0),c(s(i),"cleanupTimerRef",null),c(s(i),"isUnmounting",!1),c(s(i),"state",{providedProps:i.getProvidedProps(i.props)}),c(s(i),"refine",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.props.contextValue.onInternalStateUpdate((e=u.refine).call.apply(e,[s(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),c(s(i),"createURL",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i.props.contextValue.createHrefForState((e=u.refine).call.apply(e,[s(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),c(s(i),"searchForFacetValues",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.props.contextValue.onSearchForFacetValues((e=u.searchForFacetValues).call.apply(e,[s(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),u.getSearchParameters&&i.props.contextValue.onSearchParameters(u.getSearchParameters.bind(s(i)),{ais:i.props.contextValue,multiIndexContext:i.props.indexContextValue},i.props,u.getMetadata&&u.getMetadata.bind(s(i)),u.displayName),i;throw new TypeError("Cannot call a class as a function")}return t=a,(e=[{key:"componentDidMount",value:function(){var e=this;this.cleanupTimerRef&&(clearTimeout(this.cleanupTimerRef),this.cleanupTimerRef=null),this.unsubscribe=this.props.contextValue.store.subscribe(function(){e.isUnmounting||e.setState({providedProps:e.getProvidedProps(e.props)})}),o&&(this.unregisterWidget=this.props.contextValue.widgetsManager.registerWidget(this))}},{key:"shouldComponentUpdate",value:function(e,t){return"function"==typeof u.shouldComponentUpdate?u.shouldComponentUpdate.call(this,this.props,e,this.state,t):(e=q(this.props,e),null===this.state.providedProps||null===t.providedProps?this.state.providedProps!==t.providedProps||!e:!e||!q(this.state.providedProps,t.providedProps))}},{key:"componentDidUpdate",value:function(e){$(e,this.props)||(this.setState({providedProps:this.getProvidedProps(this.props)}),o&&(this.props.contextValue.widgetsManager.update(),"function"==typeof u.transitionState)&&this.props.contextValue.onSearchStateChange(u.transitionState.call(this,this.props,this.props.contextValue.store.getState().widgets,this.props.contextValue.store.getState().widgets)))}},{key:"componentWillUnmount",value:function(){var t=this;this.cleanupTimerRef=setTimeout(function(){var e;t.isUnmounting=!0,t.unsubscribe&&t.unsubscribe(),t.unregisterWidget&&(t.unregisterWidget(),"function"==typeof u.cleanUp)&&(e=u.cleanUp.call(t,t.props,t.props.contextValue.store.getState().widgets),t.props.contextValue.store.setState(ae(ae({},t.props.contextValue.store.getState()),{},{widgets:e})),t.props.contextValue.onSearchStateChange(W(e)))})}},{key:"getProvidedProps",value:function(e){var t=this.props.contextValue.store.getState(),n=t.widgets,r=t.results,i=t.resultsFacetValues,a=t.searching,o=t.searchingForFacetValues,s=t.isSearchStalled,c=t.metadata,t=t.error;return u.getProvidedProps.call(this,e,n,{results:r,searching:a,searchingForFacetValues:o,isSearchStalled:s,error:t},c,i)}},{key:"getSearchParameters",value:function(e){return"function"==typeof u.getSearchParameters?u.getSearchParameters.call(this,e,this.props,this.props.contextValue.store.getState().widgets):null}},{key:"getMetadata",value:function(e){return"function"==typeof u.getMetadata?u.getMetadata.call(this,this.props,e):{}}},{key:"transitionState",value:function(e,t){return"function"==typeof u.transitionState?u.transitionState.call(this,this.props,e,t):t}},{key:"render",value:function(){var e,t,n=this.props,n=(n.contextValue,re(n,te)),r=this.state.providedProps;return null===r?null:(e="function"==typeof u.refine?{refine:this.refine,createURL:this.createURL}:{},t="function"==typeof u.searchForFacetValues?{searchForItems:this.searchForFacetValues}:{},H.createElement(i,ne({},n,r,e,t)))}}])&&oe(t.prototype,e),n&&oe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.Component);return c(t,"displayName","".concat(u.displayName,"(").concat(U(i),")")),c(t,"$$type",u.$$type),c(t,"$$widgetType",e.$$widgetType),c(t,"propTypes",u.propTypes),c(t,"defaultProps",u.defaultProps),c(t,"_connectorDesc",u),t};throw new Error("`createConnector` requires you to provide a `displayName` property.")}function o(n){return function(e,t){var r=fe(n)(e,t);return function(n){return H.createElement(K,null,function(t){return H.createElement(ee,null,function(e){return H.createElement(r,ne({contextValue:t,indexContextValue:e},n))})})}}}var he="<ais-highlight-0000000000>",me="</ais-highlight-0000000000>";function de(e){var t,n=e.preTag,r=e.postTag,e=e.highlightedValue,e=(void 0===e?"":e).split(n),i=e.shift(),a=""===i?[]:[{value:i,isHighlighted:!1}];return r===n?(t=!0,e.forEach(function(e){a.push({value:e,isHighlighted:t}),t=!t})):e.forEach(function(e){e=e.split(r);a.push({value:e[0],isHighlighted:!0}),""!==e[1]&&a.push({value:e[1],isHighlighted:!1})}),a}function pe(e){return(pe="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 ye(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function m(e,t,n){return(t=function(e){e=function(e,t){if("object"!==pe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===pe(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return y(e)?e.multiIndexContext.targetedIndex:e.ais.mainTargetedIndex}function p(e,t){if(e.results){if(e.results.hits)return e.results;t=d(t);if(e.results[t])return e.results[t]}return null}function y(e){return e&&e.multiIndexContext}function g(t,e,n,r,i){var a,o,s,c,u,l,f;return y(n)?(n=d(n),i?(s=e,c=n,l=i,u=(u=r)?{page:1}:void 0,f=(o=t).indices&&o.indices[c]?h(h({},o.indices),{},m({},c,h(h({},o.indices[c]),{},(m(f={},l,h(h({},o.indices[c][l]),s)),m(f,"page",1),f)))):h(h({},o.indices),{},m({},c,h(m({},l,s),u))),h(h({},o),{},{indices:f})):(c=e,l=n,s=(s=r)?{page:1}:void 0,l=(u=t).indices&&u.indices[l]?h(h({},u.indices),{},m({},l,h(h(h({},u.indices[l]),c),s))):h(h({},u.indices),{},m({},l,h(h({},c),s))),h(h({},u),{},{indices:l}))):(t.indices&&r&&Object.keys(t.indices).forEach(function(e){t=g(t,{page:1},{multiIndexContext:{targetedIndex:e}},!0,i)}),i?(o=e,f=i,n=(n=r)?{page:1}:void 0,h(h({},a=t),{},m({},f,h(h({},a[f]),o)),n)):(a=e,n=(n=r)?{page:1}:void 0,h(h(h({},t),a),n)))}function ge(e){e=e.match(/^([^.]*)\.(.*)/);return{namespace:e&&e[1],attributeName:e&&e[2]}}function u(e,t,n,r,i){var a,o=d(n),s=ge(r),c=s.namespace,s=s.attributeName,n={multiIndex:y(n),indexId:o,namespace:c,attributeName:s,id:r,searchState:t};return c=(o=n).multiIndex,s=o.indexId,r=o.namespace,t=o.attributeName,a=o.id,o=o.searchState,(c&&r?o.indices&&o.indices[s]&&o.indices[s][r]&&Object.hasOwnProperty.call(o.indices[s][r],t):c?o.indices&&o.indices[s]&&Object.hasOwnProperty.call(o.indices[s],a):r?o[r]&&Object.hasOwnProperty.call(o[r],t):Object.hasOwnProperty.call(o,a))?(s=(c=n).multiIndex,r=c.indexId,t=c.namespace,o=c.attributeName,a=c.id,c=c.searchState,s&&t?c.indices[r][t][o]:s?c.indices[r][a]:t?c[t][o]:c[a]):e.defaultRefinement||i}function r(e,t,n){var r,i,a,o,s=d(t),c=ge(n),u=c.namespace,c=c.attributeName;return y(t)&&Boolean(e.indices)?(s=(t={attribute:c,searchState:e,indexId:s,id:n,namespace:u}).searchState,i=t.indexId,r=t.id,o=t.namespace,t=t.attribute,a=s.indices[i],o&&a?h(h({},s),{},{indices:h(h({},s.indices),{},m({},i,h(h({},a),{},m({},o,l(a[o],[t])))))}):a?h(h({},s),{},{indices:h(h({},s.indices),{},m({},i,l(a,[r])))}):s):(t=(o={attribute:c,searchState:e,id:n,namespace:u}).searchState,i=o.id,a=o.namespace,o=o.attribute,a?h(h({},t),{},m({},a,l(t[a],[o]))):l(t,[i]))}function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var be=["children","contextValue","indexContextValue"],xe=["children","contextValue","indexContextValue"];function Pe(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Re(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pe(Object(n),!0).forEach(function(e){Se(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Se(e,t,n){return(t=function(e){e=function(e,t){if("object"!==ve(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ve(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Fe(){return"configure"}var t=o({displayName:"AlgoliaConfigure",$$type:"ais.configure",getProvidedProps:function(){return{}},getSearchParameters:function(e,t){t.children,t.contextValue,t.indexContextValue;t=je(t,be);return e.setQueryParameters(t)},transitionState:function(e,t,n){var r=Fe(),i=(e.children,e.contextValue,e.indexContextValue,je(e,xe)),a=Object.keys(e),o=this._props?Object.keys(this._props).filter(function(e){return-1===a.indexOf(e)}):[];return this._props=e,g(n,Se({},r,Re(Re({},l(n[r],o)),i)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(n,e){var r=Fe(),t=d({ais:n.contextValue,multiIndexContext:n.indexContextValue}),i=y({ais:n.contextValue,multiIndexContext:n.indexContextValue})&&e.indices?e.indices[t]:e,t=(i&&i[r]?Object.keys(i[r]):[]).reduce(function(e,t){return n[t]||(e[t]=i[r][t]),e},{});return g(e,Se({},r,t),{ais:n.contextValue,multiIndexContext:n.indexContextValue})}}),f=("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}).performance||{};f.now||f.mozNow||f.msNow||f.oNow||f.webkitNow;function Oe(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function we(e,t){var n,r;if(e!==t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"__proto__"!==i&&"constructor"!==i&&(n=t[i],void 0!==(r=e[i])&&void 0===n||(Oe(r)&&Oe(n)?e[i]=we(r,n):e[i]="object"==typeof(r=n)&&null!==r?we(Array.isArray(r)?[]:{},r):r));return e}function v(){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 b=function(e){Oe(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];Oe(r)&&we(e,r)}return e};var Ce=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})},x=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var Ve=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 _e=function(e,t){if(null===e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r};var Ee=function(e){return e&&0<Object.keys(e).length},P={addRefinement:function(e,t,n){var r;return P.isRefined(e,t,n)?e:(n=""+n,n=e[t]?e[t].concat(n):[n],(r={})[t]=n,v({},r,e))},removeRefinement:function(e,n,t){var r;return void 0===t?P.clearRefinement(e,function(e,t){return n===t}):(r=""+t,P.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 P.isRefined(e,t,n)?P.removeRefinement(e,t,n):P.addRefinement(e,t,n)},clearRefinement:function(i,a,o){var s,e;return void 0===a?Ee(i)?{}:i:"string"==typeof a?_e(i,[a]):"function"==typeof a?(s=!1,e=Object.keys(i).reduce(function(e,t){var n=i[t]||[],r=n.filter(function(e){return!a(e,t,o)});return r.length!==n.length&&(s=!0),e[t]=r,e},{}),s?e:i):void 0},isRefined:function(e,t,n){var r=!!e[t]&&0<e[t].length;return void 0!==n&&r?-1!==e[t].indexOf(""+n):r}},R=P;function Ie(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return Ie(n[t],e)}):e===n}function S(e){var r=e?S._parseNumbers(e):{},i=(void 0===r.userToken||null!==(e=r.userToken)&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)||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||{},this);Object.keys(r).forEach(function(e){var t=-1!==S.PARAMETERS.indexOf(e),n=void 0!==r[e];!t&&n&&(i[e]=r[e])})}S.PARAMETERS=Object.keys(new S),S._parseNumbers=function(i){var r,a;return i instanceof S?i:(r={},["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(e){var t,n=i[e];"string"==typeof n&&(t=parseFloat(n),r[e]=isNaN(t)?n:t)}),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&&(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),b({},i,r))},S.make=function(e){var n=new S(e);return(e.hierarchicalFacets||[]).forEach(function(e){var t;e.rootPath&&0===(t=(n=0<(t=n.getHierarchicalRefinement(e.name)).length&&0!==t[0].indexOf(e.rootPath)?n.clearRefinements(e.name):n).getHierarchicalRefinement(e.name)).length&&(n=n.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}),n},S.validate=function(e,t){t=t||{};return e.tagFilters&&t.tagRefinements&&0<t.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&&t.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&&t.numericRefinements&&Ee(t.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."):Ee(e.numericRefinements)&&t.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},S.prototype={constructor:S,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:R.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:R.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:R.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:R.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return e.numericRefinements===this.numericRefinements&&e.facetsRefinements===this.facetsRefinements&&e.facetsExcludes===this.facetsExcludes&&e.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&e.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(e)},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,n=Ve(n);return this.isNumericRefined(e,t,n)?this:((r=b({},this.numericRefinements))[e]=b({},r[e]),r[e][t]?(r[e][t]=r[e][t].slice(),r[e][t].push(n)):r[e][t]=[n],this.setQueryParameters({numericRefinements:r}))},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&&Ie(e.val,Ve(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(o){var s,t,e;return void 0===o?Ee(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof o?_e(this.numericRefinements,[o]):"function"==typeof o?(s=!1,t=this.numericRefinements,e=Object.keys(t).reduce(function(e,r){var i=t[r],a={},i=i||{};return Object.keys(i).forEach(function(t){var e=i[t]||[],n=[];e.forEach(function(e){o({val:e,op:t},r,"numeric")||n.push(e)}),n.length!==e.length&&(s=!0),a[t]=n}),e[r]=a,e},{}),s?e:this.numericRefinements):void 0},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))return R.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:R.addRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return R.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:R.addRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return R.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:R.addRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},addTagRefinement:function(e){return this.isTagRefined(e)?this:(e={tagRefinements:this.tagRefinements.concat(e)},this.setQueryParameters(e))},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))return R.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:R.removeRefinement(this.facetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return R.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:R.removeRefinement(this.facetsExcludes,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return R.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:R.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},removeTagRefinement:function(t){var e;return this.isTagRefined(t)?(e={tagRefinements:this.tagRefinements.filter(function(e){return e!==t})},this.setQueryParameters(e)):this},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))return this.setQueryParameters({facetsRefinements:R.toggleRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleExcludeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsExcludes:R.toggleRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return this.setQueryParameters({disjunctiveFacetsRefinements:R.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},toggleHierarchicalFacetRefinement:function(e,t){var n,r;if(this.isHierarchicalFacet(e))return n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={},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:v({},r,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration")},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var n;if(this.isHierarchicalFacet(e))return(n={})[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:v({},n,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.")},removeHierarchicalFacetRefinement:function(e){var t;return this.isHierarchicalFacetRefined(e)?((t={})[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:v({},t,this.hierarchicalFacetsRefinements)})):this},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)&&R.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&R.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&R.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){return!!this.isHierarchicalFacet(e)&&(e=this.getHierarchicalRefinement(e),t?-1!==e.indexOf(t):0<e.length)},isNumericRefined:function(e,t,n){var r,i;return void 0===n&&void 0===t?!!this.numericRefinements[e]:(r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==n&&r?(n=Ve(n),t=void 0!==(e=this.numericRefinements[e][t],i=n,x(e,function(e){return Ie(e,i)})),r&&t):r)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=Ce(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 Ce(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","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","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){var n;return this[e]===t?this:((n={})[e]=t,this.setQueryParameters(n))},setQueryParameters:function(e){if(!e)return this;var t=S.validate(this,e);if(t)throw t;var n=this,i=S._parseNumbers(e),t=Object.keys(this).reduce(function(e,t){return e[t]=n[t],e},{}),e=Object.keys(i).reduce(function(e,t){var n=void 0!==e[t],r=void 0!==i[t];return n&&!r?_e(e,[t]):(r&&(e[t]=i[t]),e)},t);return new this.constructor(e)},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 x(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(e){var t;return this.isHierarchicalFacet(e)&&(t=this.getHierarchicalRefinement(e)[0])?(e=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),t.split(e).map(function(e){return e.trim()})):[]},toString:function(){return JSON.stringify(this,null,2)}};var Ae=S;function Ne(e){return Array.isArray(e)?e.filter(Boolean):[]}function Te(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function He(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var n=t.split(":"),t=x(r,function(e){return e[0]===n[0]});return 1<n.length||!t?(e[0].push(n[0]),e[1].push(n[1])):(e[0].push(t[0]),e[1].push(t[1])),e},[[],[]])}var De=function(e,n,i){return Array.isArray(e)?(Array.isArray(i)||(i=[]),(e=e.map(function(t,e){return{criteria:n.map(function(e){return t[e]}),index:e,value:t}})).sort(function(e,t){for(var n=-1;++n<e.criteria.length;){var r=function(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}(e.criteria[n],t.criteria[n]);if(r)return!(n>=i.length)&&"desc"===i[n]?-r:r}return e.index-t.index}),e.map(function(e){return e.value})):[]};var f=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},j=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")},ke=function(d){return function(e,t){function n(e,o,t){var n,s=e;if(0<t){var r=0;for(s=e;r<t;){var i=s&&Array.isArray(s.data)?s.data:[],s=x(i,function(e){return e.isRefined});r++}}return s&&(n=Object.keys(o.data).map(function(e){return[e,o.data[e]]}).filter(function(e){var t,n,r,i,a,e=e[0];return e=e,t=s.path||u,n=f,r=c,a=l,(!(i=u)||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)))}),s.data=De(n.map(function(e){var t,n,r,i,a=e[0],e=e[1];return e=e,a=a,t=c,n=Qe(f),r=o.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:Me(a),count:e,isRefined:n===a||0===n.indexOf(a+t),exhaustive:r,data:null}}),a[0],a[1])),e}var a,c,u,l,f,r=d.hierarchicalFacets[t],i=d.hierarchicalFacetsRefinements[r.name]&&d.hierarchicalFacetsRefinements[r.name][0]||"",o=d._getHierarchicalFacetSeparator(r),s=d._getHierarchicalRootPath(r),h=d._getHierarchicalShowParentLevel(r),r=He(d._getHierarchicalFacetSortBy(r)),m=e.every(function(e){return e.exhaustive}),r=(a=r,c=o,l=h,f=i,e);return(r=(u=s)?e.slice(s.split(o).length):r).reduce(n,{name:d.hierarchicalFacets[t].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:m,data:null})}},Me=f,Qe=j;var $e=f,Be=j;function Le(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function qe(e,t,n){t&&t[n]&&(e.stats=t[n])}function F(l,t,n){var s=t[0],f=(this._rawResults=t,this),e=(Object.keys(s).forEach(function(e){f[e]=s[e]}),Object.keys(n||{}).forEach(function(e){f[e]=n[e]}),this.processingTimeMS=t.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=[],l.getRefinedDisjunctiveFacets()),c=Le(l.facets),u=Le(l.disjunctiveFacets),r=1,h=s.facets||{};Object.keys(h).forEach(function(e){var t,n,r,i,a=h[e],o=(r=l.hierarchicalFacets,t=e,x(r,function(e){return-1<(e.attributes||[]).indexOf(t)}));o?(r=o.attributes.indexOf(e),n=Te(l.hierarchicalFacets,function(e){return e.name===o.name}),f.hierarchicalFacets[n][r]={attribute:e,data:a,exhaustive:s.exhaustiveFacetsCount}):(n=-1!==l.disjunctiveFacets.indexOf(e),r=-1!==l.facets.indexOf(e),n&&(i=u[e],f.disjunctiveFacets[i]={name:e,data:a,exhaustive:s.exhaustiveFacetsCount},qe(f.disjunctiveFacets[i],s.facets_stats,e)),r&&(i=c[e],f.facets[i]={name:e,data:a,exhaustive:s.exhaustiveFacetsCount},qe(f.facets[i],s.facets_stats,e)))}),this.hierarchicalFacets=Ne(this.hierarchicalFacets),e.forEach(function(e){var i=t[r],a=i&&i.facets?i.facets:{},o=l.getHierarchicalFacetByName(e);Object.keys(a).forEach(function(t){var n,e,r=a[t];o?(n=Te(l.hierarchicalFacets,function(e){return e.name===o.name}),-1!==(e=Te(f.hierarchicalFacets[n],function(e){return e.attribute===t}))&&(f.hierarchicalFacets[n][e].data=b({},f.hierarchicalFacets[n][e].data,r))):(n=u[t],e=s.facets&&s.facets[t]||{},f.disjunctiveFacets[n]={name:t,data:v({},r,e),exhaustive:i.exhaustiveFacetsCount},qe(f.disjunctiveFacets[n],i.facets_stats,t),l.disjunctiveFacetsRefinements[t]&&l.disjunctiveFacetsRefinements[t].forEach(function(e){!f.disjunctiveFacets[n].data[e]&&-1<l.disjunctiveFacetsRefinements[t].indexOf(Be(e))&&(f.disjunctiveFacets[n].data[e]=0)}))}),r++}),l.getRefinedHierarchicalFacets().forEach(function(e){var s=l.getHierarchicalFacetByName(e),c=l._getHierarchicalFacetSeparator(s),u=l.getHierarchicalRefinement(e);0===u.length||u[0].split(c).length<2||t.slice(r).forEach(function(e){var o=e&&e.facets?e.facets:{};Object.keys(o).forEach(function(t){var e,n,r=o[t],i=Te(l.hierarchicalFacets,function(e){return e.name===s.name}),a=Te(f.hierarchicalFacets[i],function(e){return e.attribute===t});-1!==a&&(e={},0<u.length&&(e[n=u[0].split(c)[0]]=f.hierarchicalFacets[i][a].data[n]),f.hierarchicalFacets[i][a].data=v(e,r,f.hierarchicalFacets[i][a].data))}),r++})}),Object.keys(l.facetsExcludes).forEach(function(t){var e=l.facetsExcludes[t],n=c[t];f.facets[n]={name:t,data:s.facets[t],exhaustive:s.exhaustiveFacetsCount},e.forEach(function(e){f.facets[n]=f.facets[n]||{name:t},f.facets[n].data=f.facets[n].data||{},f.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(ke(l)),this.facets=Ne(this.facets),this.disjunctiveFacets=Ne(this.disjunctiveFacets),this._state=l}function Ue(n,r){function e(e){return e.name===r}var i,a,t,o;return n._state.isConjunctiveFacet(r)?(i=x(n.facets,e))?Object.keys(i.data).map(function(e){var t=$e(e);return{name:e,escapedValue:t,count:i.data[e],isRefined:n._state.isFacetRefined(r,t),isExcluded:n._state.isExcludeRefined(r,e)}}):[]:n._state.isDisjunctiveFacet(r)?(a=x(n.disjunctiveFacets,e))?Object.keys(a.data).map(function(e){var t=$e(e);return{name:e,escapedValue:t,count:a.data[e],isRefined:n._state.isDisjunctiveFacetRefined(r,t)}}):[]:n._state.isHierarchicalFacet(r)?((t=x(n.hierarchicalFacets,e))&&(o=n._state.getHierarchicalFacetByName(r),(o=Be(n._state.getHierarchicalRefinement(r)[0]||"").split(n._state._getHierarchicalFacetSeparator(o))).unshift(r),function t(e,n,r){e.isRefined=e.name===n[r];e.data&&e.data.forEach(function(e){t(e,n,r+1)})}(t,o,0)),t):void 0}function We(e,t){e=x(e,function(e){return e.name===t});return e&&e.stats}function ze(e,t,n,r,i){var i=x(i,function(e){return e.name===n}),a=i&&i.data&&i.data[r]?i.data[r]:0,i=i&&i.exhaustive||!1;return{type:t,attributeName:n,name:r,count:a,exhaustive:i}}F.prototype.getFacetByName=function(t){function e(e){return e.name===t}return x(this.facets,e)||x(this.disjunctiveFacets,e)||x(this.hierarchicalFacets,e)},F.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],F.prototype.getFacetValues=function(e,t){var o,s,n=Ue(this,e);if(n)return o=v({},t,{sortBy:F.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this,function t(n,e,r,i){var a;return i=i||0,Array.isArray(e)?n(e,r[i]):e.data&&0!==e.data.length?(a=e.data.map(function(e){return t(n,e,r,i+1)}),a=n(a,r[i]),v({data:a},e)):e}(function(e,t){if(o.facetOrdering){t=t;a=(a=s).renderingContent&&a.renderingContent.facetOrdering&&a.renderingContent.facetOrdering.values&&a.renderingContent.facetOrdering.values[t];if(Boolean(a))return t=e,n=[],r=[],i=((a=a).order||[]).reduce(function(e,t,n){return e[t]=n,e},{}),t.forEach(function(e){var t=e.path||e.name;void 0!==i[t]?n[i[t]]=e:r.push(e)}),n=n.filter(function(e){return e}),"hidden"===(t=a.sortRemainingBy)?n:n.concat(De(r,(a="alpha"===t?[["path","name"],["asc","asc"]]:[["count"],["desc"]])[0],a[1]))}var n,r,i,a;if(Array.isArray(o.sortBy))return t=He(o.sortBy,F.DEFAULT_SORT),De(e,t[0],t[1]);if("function"==typeof o.sortBy)return a=o.sortBy,e.sort(a);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},n,Array.isArray(n)?[e]:s._state.getHierarchicalFacetByName(n.name).attributes)},F.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?We(this.facets,e):this._state.isDisjunctiveFacet(e)?We(this.disjunctiveFacets,e):void 0},F.prototype.getRefinements=function(){var o=this._state,s=this,c=[];return Object.keys(o.facetsRefinements).forEach(function(t){o.facetsRefinements[t].forEach(function(e){c.push(ze(0,"facet",t,e,s.facets))})}),Object.keys(o.facetsExcludes).forEach(function(t){o.facetsExcludes[t].forEach(function(e){c.push(ze(0,"exclude",t,e,s.facets))})}),Object.keys(o.disjunctiveFacetsRefinements).forEach(function(t){o.disjunctiveFacetsRefinements[t].forEach(function(e){c.push(ze(0,"disjunctive",t,e,s.disjunctiveFacets))})}),Object.keys(o.hierarchicalFacetsRefinements).forEach(function(a){o.hierarchicalFacetsRefinements[a].forEach(function(e){var t,n,r,i;c.push((t=o,n=a,e=e,r=s.hierarchicalFacets,i=t.getHierarchicalFacetByName(n),t=t._getHierarchicalFacetSeparator(i),i=e.split(t),e=x(r,function(e){return e.name===n}),t=i.reduce(function(e,t){var n=e&&x(e.data,function(e){return e.name===t});return void 0!==n?n:e},e),r=t&&t.count||0,i=t&&t.exhaustive||!1,e=t&&t.path||"",{type:"hierarchical",attributeName:n,name:e,count:r,exhaustive:i}))})}),Object.keys(o.numericRefinements).forEach(function(n){var e=o.numericRefinements[n];Object.keys(e).forEach(function(t){e[t].forEach(function(e){c.push({type:"numeric",attributeName:n,name:e,numericValue:e,operator:t})})})}),o.tagRefinements.forEach(function(e){c.push({type:"tag",attributeName:"_tags",name:e})}),c};var Ye=F;function O(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}j=O;function w(e){return"function"==typeof e}function Je(e){return"object"==typeof e&&null!==e}function Ge(e){return void 0===e}O.prototype._events=void 0,O.prototype._maxListeners=void 0,O.defaultMaxListeners=10,O.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},O.prototype.emit=function(e){var t,n,r,i,a,o,s;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||Je(this._events.error)&&!this._events.error.length))throw(s=arguments[1])instanceof Error?s:((o=new Error('Uncaught, unspecified "error" event. ('+s+")")).context=s,o);if(Ge(t=this._events[e]))return!1;if(w(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),t.apply(this,r)}else if(Je(t))for(r=Array.prototype.slice.call(arguments,1),n=(a=t.slice()).length,i=0;i<n;i++)a[i].apply(this,r);return!0},O.prototype.on=O.prototype.addListener=function(e,t){if(w(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,w(t.listener)?t.listener:t),this._events[e]?Je(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Je(this._events[e])&&!this._events[e].warned&&(t=Ge(this._maxListeners)?O.defaultMaxListeners:this._maxListeners)&&0<t&&this._events[e].length>t&&(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;throw TypeError("listener must be a function")},O.prototype.once=function(e,t){var n;if(w(t))return n=!1,r.listener=t,this.on(e,r),this;throw TypeError("listener must be a function");function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}},O.prototype.removeListener=function(e,t){var n,r,i,a;if(!w(t))throw TypeError("listener must be a function");if(this._events&&this._events[e])if(i=(n=this._events[e]).length,r=-1,n===t||w(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Je(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},O.prototype.removeAllListeners=function(e){var t,n;if(this._events)if(this._events.removeListener)if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener"),this._events={}}else{if(w(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e]}else 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this},O.prototype.listeners=function(e){e=this._events&&this._events[e]?w(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},O.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(w(e))return 1;if(e)return e.length}return 0},O.listenerCount=function(e,t){return e.listenerCount(t)};var C=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Xe(e,t){this.main=e,this.fn=t,this.lastResults=null}C(Xe,j),Xe.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Xe.prototype.getModifiedState=function(e){return this.fn(e)};var Ze=Xe;function Ke(n){return Object.keys(n).sort(function(e,t){return e.localeCompare(t)}).reduce(function(e,t){return e[t]=n[t],e},{})}var V={_getQueries:function(s,c){var u=[];return u.push({indexName:s,params:V._getHitsSearchParams(c)}),c.getRefinedDisjunctiveFacets().forEach(function(e){u.push({indexName:s,params:V._getDisjunctiveFacetSearchParams(c,e)})}),c.getRefinedHierarchicalFacets().forEach(function(e){var a,o=c.getHierarchicalFacetByName(e),e=c.getHierarchicalRefinement(e),r=c._getHierarchicalFacetSeparator(o);0<e.length&&1<e[0].split(r).length&&(a=e[0].split(r).slice(0,-1).reduce(function(e,t,n){return e.concat({attribute:o.attributes[n],value:0===n?t:[e[e.length-1].value,t].join(r)})},[])).forEach(function(e,t){e=V._getDisjunctiveFacetSearchParams(c,e.attribute,0===t);function r(t){return o.attributes.some(function(e){return e===t.split(":")[0]})}var n=(e.facetFilters||[]).reduce(function(e,t){var n;return Array.isArray(t)&&0<(n=t.filter(function(e){return!r(e)})).length&&e.push(n),"string"!=typeof t||r(t)||e.push(t),e},[]),i=a[t-1];e.facetFilters=0<t?n.concat(i.attribute+":"+i.value):0<n.length?n:void 0,u.push({indexName:s,params:e})})}),u},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(V._getHitsHierarchicalFacetsAttributes(e)),n=V._getFacetFilters(e),r=V._getNumericFilters(e),i=V._getTagFilters(e),t={facets:-1<t.indexOf("*")?["*"]:t,tagFilters:i};return 0<n.length&&(t.facetFilters=n),0<r.length&&(t.numericFilters=r),Ke(b({},e.getQueryParams(),t))},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=V._getFacetFilters(e,t,n),i=V._getNumericFilters(e,t),a=V._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1},a=(0<a.length&&(o.tagFilters=a),e.getHierarchicalFacetByName(t));return o.facets=a?V._getDisjunctiveHierarchicalFacetAttribute(e,a,n):t,0<i.length&&(o.numericFilters=i),0<r.length&&(o.facetFilters=r),Ke(b({},e.getQueryParams(),o))},_getNumericFilters:function(e,i){var a;return e.numericFilters||(a=[],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){var t;Array.isArray(e)?(t=e.map(function(e){return r+n+e}),a.push(t)):a.push(r+n+e)})})}),a)},_getTagFilters:function(e){return e.tagFilters||e.tagRefinements.join(",")},_getFacetFilters:function(o,s,c){var u=[],e=o.facetsRefinements||{},n=(Object.keys(e).forEach(function(t){(e[t]||[]).forEach(function(e){u.push(t+":"+e)})}),o.facetsExcludes||{}),r=(Object.keys(n).forEach(function(t){(n[t]||[]).forEach(function(e){u.push(t+":-"+e)})}),o.disjunctiveFacetsRefinements||{}),l=(Object.keys(r).forEach(function(t){var n,e=r[t]||[];t!==s&&e&&0!==e.length&&(n=[],e.forEach(function(e){n.push(t+":"+e)}),u.push(n))}),o.hierarchicalFacetsRefinements||{});return Object.keys(l).forEach(function(e){var t=(l[e]||[])[0];if(void 0!==t){var n,r=o.getHierarchicalFacetByName(e),i=o._getHierarchicalFacetSeparator(r),a=o._getHierarchicalRootPath(r);if(s===e){if(-1===t.indexOf(i)||!a&&!0===c||a&&a.split(i).length===t.split(i).length)return;t=a?(n=a.split(i).length-1,a):(n=t.split(i).length-2,t.slice(0,t.lastIndexOf(i)))}else n=t.split(i).length-1;(e=r.attributes[n])&&u.push([e+":"+t])}}),u},_getHitsHierarchicalFacetsAttributes:function(i){return i.hierarchicalFacets.reduce(function(e,t){var n,r=i.getHierarchicalRefinement(t.name)[0];return r?(n=i._getHierarchicalFacetSeparator(t),r=r.split(n).length,n=t.attributes.slice(0,r+1),e.concat(n)):(e.push(t.attributes[0]),e)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r,i=e._getHierarchicalFacetSeparator(t);return!0===n?(n=0,(r=e._getHierarchicalRootPath(t))&&(n=r.split(i).length),[t.attributes[n]]):(r=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1,t.attributes.slice(0,1+r))},getSearchForFacetQuery:function(e,t,n,r){r=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,t={facetQuery:t,facetName:e};return"number"==typeof n&&(t.maxFacetHits=n),Ke(b({},V._getHitsSearchParams(r),t))}},_=V,E="3.11.3",et=f;function I(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.3)"),this.setClient(e);e=n||{};e.index=t,this.state=Ae.make(e),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function tt(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function nt(){return this.state.page}C(I,j),I.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},I.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},I.prototype.getQuery=function(){var e=this.state;return _._getHitsSearchParams(e)},I.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,e=_._getQueries(n.index,n),r=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(e).then(function(e){return r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),{content:new Ye(n,e.results),state:n,_originalResponse:e}},function(e){throw r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),e});this.client.search(e).then(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(null,new Ye(n,e.results),n)}).catch(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(e,null,n)})},I.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,n=this.derivedHelpers[0];if(!n)return Promise.resolve([]);var n=n.getModifiedState(t),t=b({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:_e(_._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),r="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(r);var i=this.client.initIndex(n.index);if("function"!=typeof i.findAnswers)throw new Error(r);return i.findAnswers(n.query,e.queryLanguages,t)},I.prototype.searchForFacetValues=function(t,e,n,r){var i,a,o,s="function"==typeof this.client.searchForFacetValues,c="function"==typeof this.client.initIndex;if(s||c||"function"==typeof this.client.search)return i=this.state.setQueryParameters(r||{}),a=i.isDisjunctiveFacet(t),r=_.getSearchForFacetQuery(t,e,n,i),this._currentNbQueries++,o=this,n=s?this.client.searchForFacetValues([{indexName:i.index,params:r}]):c?this.client.initIndex(i.index).searchForFacetValues(r):(delete r.facetName,this.client.search([{type:"facet",facet:t,indexName:i.index,params:r}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:i,facet:t,query:e}),n.then(function(e){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),(e=Array.isArray(e)?e[0]:e).facetHits.forEach(function(e){e.escapedValue=et(e.value),e.isRefined=a?i.isDisjunctiveFacetRefined(t,e.escapedValue):i.isFacetRefined(t,e.escapedValue)}),e},function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e});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")},I.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},I.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},I.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},I.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},I.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},I.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},I.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},I.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},I.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},I.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},I.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},I.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},I.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},I.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},I.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},I.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},I.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},I.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},I.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},I.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},I.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},I.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},I.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},I.prototype.setCurrentPage=tt,I.prototype.setPage=tt,I.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},I.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},I.prototype.setState=function(e){return this._change({state:Ae.make(e),isPageReset:!1}),this},I.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new Ae(e),this},I.prototype.hasRefinements=function(e){return!!Ee(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))},I.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},I.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},I.prototype.hasTag=function(e){return this.state.isTagRefined(e)},I.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},I.prototype.getIndex=function(){return this.state.index},I.prototype.getCurrentPage=nt,I.prototype.getPage=nt,I.prototype.getTags=function(){return this.state.tagRefinements},I.prototype.getRefinements=function(e){var n=[],r=(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"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"disjunctive"})}),this.state.getNumericRefinements(e));return Object.keys(r).forEach(function(e){var t=r[e];n.push({value:t,operator:e,type:"numeric"})}),n},I.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},I.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},I.prototype._search=function(e){var r=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=_._getQueries(r.index,r),i.push({state:r,queriesCount:t.length,helper:this}),this.emit("search",{state:r,results:this.lastResults})),this.derivedHelpers.map(function(e){var t=e.getModifiedState(r),n=_._getQueries(t.index,t);return i.push({state:t,queriesCount:n.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),n})),t=Array.prototype.concat.apply(t,e),e=this._queryId++;this._currentNbQueries++;try{this.client.search(t).then(this._dispatchAlgoliaResponse.bind(this,i,e)).catch(this._dispatchAlgoliaError.bind(this,e))}catch(e){this.emit("error",{error:e})}},I.prototype._dispatchAlgoliaResponse=function(e,t,n){var r;t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty"),r=n.results.slice(),e.forEach(function(e){var t=e.state,n=e.queriesCount,e=e.helper,n=r.splice(0,n),n=e.lastResults=new Ye(t,n);e.emit("result",{results:n,state:t})}))},I.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"))},I.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},I.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},I.prototype._change=function(e){var t=e.state,e=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:e}))},I.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},I.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.3)"),this.client=e),this},I.prototype.getClient=function(){return this.client},I.prototype.derive=function(e){e=new Ze(this,e);return this.derivedHelpers.push(e),e},I.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},I.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var rt=I;function it(e,t,n){return new rt(e,t,n)}it.version=E,it.AlgoliaSearchHelper=rt,it.SearchParameters=Ae,it.SearchResults=Ye;var at=it;function ot(e){return(ot="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 st(e){return function(e){if(Array.isArray(e))return ct(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?ct(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ut(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function lt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(n),!0).forEach(function(e){ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ft(e,t,n){return(t=function(e){e=function(e,t){if("object"!==ot(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ot(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e){var t=e.attributeName,n=e.attributeValue,e=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(e||1,">")}function mt(){return"configure"}function dt(a){var e=Object.keys(a.matchingPatterns).reduce(function(e,t){var n=a.matchingPatterns[t],r=X(a.hit,t),i=n.score;return Array.isArray(r)?[].concat(st(e),[r.map(function(e){return ht({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(st(e),[ht({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]);return a.transformSearchParameters(new at.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.hit.objectID)],optionalFilters:e}))}f=o({displayName:"AlgoliaConfigureRelatedItems",$$type:"ais.configureRelatedItems",defaultProps:{transformSearchParameters:function(e){return lt({},e)}},getProvidedProps:function(){return{}},getSearchParameters:function(e,t){return e.setQueryParameters(dt(t))},transitionState:function(e,t,n){var r,i=mt(),a=(r=W(dt(e)),Object.keys(r).forEach(function(e){var t=r[e];Array.isArray(t)&&0===t.length&&delete r[e]}),r),o=Object.keys(a),s=this._searchParameters?Object.keys(this._searchParameters).filter(function(e){return-1===o.indexOf(e)}):[];return this._searchParameters=a,g(n,ft({},i,lt(lt({},l(n[i],s)),a)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){var n=this,r=mt(),i=d({ais:e.contextValue,multiIndexContext:e.indexContextValue}),a=y({ais:e.contextValue,multiIndexContext:e.indexContextValue})&&t.indices?t.indices[i]:t,i=(a&&a[r]?Object.keys(a[r]):[]).reduce(function(e,t){return n._searchParameters[t]||(e[t]=a[r][t]),e},{});return g(t,ft({},r,i),{ais:e.contextValue,multiIndexContext:e.indexContextValue})}});function pt(e,t){return e(t={exports:{}},t.exports),t.exports}var C="function"==typeof Symbol&&Symbol.for,yt=C?Symbol.for("react.element"):60103,gt=C?Symbol.for("react.portal"):60106,vt=C?Symbol.for("react.fragment"):60107,bt=C?Symbol.for("react.strict_mode"):60108,xt=C?Symbol.for("react.profiler"):60114,Pt=C?Symbol.for("react.provider"):60109,Rt=C?Symbol.for("react.context"):60110,St=C?Symbol.for("react.async_mode"):60111,jt=C?Symbol.for("react.concurrent_mode"):60111,Ft=C?Symbol.for("react.forward_ref"):60112,Ot=C?Symbol.for("react.suspense"):60113,wt=C?Symbol.for("react.suspense_list"):60120,Ct=C?Symbol.for("react.memo"):60115,Vt=C?Symbol.for("react.lazy"):60116,_t=C?Symbol.for("react.block"):60121,Et=C?Symbol.for("react.fundamental"):60117,It=C?Symbol.for("react.responder"):60118,At=C?Symbol.for("react.scope"):60119;function A(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case yt:switch(e=e.type){case St:case jt:case vt:case xt:case bt:case Ot:return e;default:switch(e=e&&e.$$typeof){case Rt:case Ft:case Vt:case Ct:case Pt:return e;default:return t}}case gt:return t}}}function Nt(e){return A(e)===jt}var Tt={AsyncMode:St,ConcurrentMode:jt,ContextConsumer:Rt,ContextProvider:Pt,Element:yt,ForwardRef:Ft,Fragment:vt,Lazy:Vt,Memo:Ct,Portal:gt,Profiler:xt,StrictMode:bt,Suspense:Ot,isAsyncMode:function(e){return Nt(e)||A(e)===St},isConcurrentMode:Nt,isContextConsumer:function(e){return A(e)===Rt},isContextProvider:function(e){return A(e)===Pt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===yt},isForwardRef:function(e){return A(e)===Ft},isFragment:function(e){return A(e)===vt},isLazy:function(e){return A(e)===Vt},isMemo:function(e){return A(e)===Ct},isPortal:function(e){return A(e)===gt},isProfiler:function(e){return A(e)===xt},isStrictMode:function(e){return A(e)===bt},isSuspense:function(e){return A(e)===Ot},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===vt||e===jt||e===xt||e===bt||e===Ot||e===wt||"object"==typeof e&&null!==e&&(e.$$typeof===Vt||e.$$typeof===Ct||e.$$typeof===Pt||e.$$typeof===Rt||e.$$typeof===Ft||e.$$typeof===Et||e.$$typeof===It||e.$$typeof===At||e.$$typeof===_t)},typeOf:A},j=pt(function(e,t){});j.AsyncMode,j.ConcurrentMode,j.ContextConsumer,j.ContextProvider,j.Element,j.ForwardRef,j.Fragment,j.Lazy,j.Memo,j.Portal,j.Profiler,j.StrictMode,j.Suspense,j.isAsyncMode,j.isConcurrentMode,j.isContextConsumer,j.isContextProvider,j.isElement,j.isForwardRef,j.isFragment,j.isLazy,j.isMemo,j.isPortal,j.isProfiler,j.isStrictMode,j.isSuspense,j.isValidElementType,j.typeOf,pt(function(e){e.exports=Tt});function Ht(){}function Dt(){}Dt.resetWarningCache=Ht;E=pt(function(e){function t(e,t,n,r,i,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a)throw(a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",a}function n(){return t}e.exports=(e={array:t.isRequired=t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Dt,resetWarningCache:Ht}).PropTypes=e}),C=o({displayName:"AlgoliaDynamicWidgets",$$type:"ais.dynamicWidgets",defaultProps:{transformItems:function(e){return e},maxValuesPerFacet:20},propTypes:{transformItems:E.func,facets:E.arrayOf(E.string),maxValuesPerFacet:E.number},getProvidedProps:function(e,t,n){var r,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(!e.facets||Array.isArray(e.facets)&&e.facets.length<=1&&("*"===e.facets[0]||void 0===e.facets[0]))return n?(r=n.renderingContent&&n.renderingContent.facetOrdering&&n.renderingContent.facetOrdering.facets&&n.renderingContent.facetOrdering.facets.order||[],20<(r=e.transformItems(r,{results:n})).length&&!e.facets&&console.warn("More than ".concat(20," facets are requested to be displayed without explicitly setting which facets to retrieve. This could have a performance impact. Set \"facets\" to [] to do two smaller network requests, or explicitly to ['*'] to avoid this warning.")),e.maxValuesPerFacet<n._state.maxValuesPerFacet&&console.warn("The maxValuesPerFacet set by dynamic widgets (".concat(e.maxValuesPerFacet,") is smaller than one of the limits set by a widget (").concat(n._state.maxValuesPerFacet,"). This causes a mismatch in query parameters and thus an extra network request when that widget is mounted.")),{attributesToRender:r}):{attributesToRender:[]};throw new Error('The `facets` prop only accepts [] or ["*"], you passed '.concat(JSON.stringify(e.facets)))},getSearchParameters:function(e,t){return(t.facets||["*"]).reduce(function(e,t){return e.addFacet(t)},e.setQueryParameters({maxValuesPerFacet:Math.max(t.maxValuesPerFacet||0,e.maxValuesPerFacet||0)}))}});function kt(e){return(kt="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 Mt(e,t,n){return(t=function(e){e=function(e,t){if("object"!==kt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===kt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){return function(e){if(Array.isArray(e))return $t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?$t(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$t(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bt(){return"query"}function Lt(e,t,n){Bt();e=u(e,t,n,"query","");return e||""}j=o({displayName:"AlgoliaAutoComplete",$$type:"ais.autoComplete",getProvidedProps:function(e,t,n){return{hits:(r=n).results?r.results.hits&&Array.isArray(r.results.hits)?z(Y(r.results.hits,r.results.queryID),r.results.hitsPerPage,r.results.page):Object.keys(r.results).reduce(function(e,t){return[].concat(Qt(e),[{index:t,hits:z(Y(r.results[t].hits,r.results[t].queryID),r.results[t].hitsPerPage,r.results[t].page)}])},[]):[],currentRefinement:Lt(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})};var r},refine:function(e,t,n){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},Bt(),g(t,Mt({},"query",n),e,!0)},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,Bt())},getSearchParameters:function(e,t,n){return e.setQuery(Lt(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))}});function qt(e){return(qt="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 Ut(e,t,n){return(t=function(e){e=function(e,t){if("object"!==qt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===qt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e){return e.attributes[0]}var zt=o({displayName:"AlgoliaBreadcrumb",$$type:"ais.breadcrumb",propTypes:{attributes:function(e,t,n){if(!Array.isArray(e[t])||e[t].some(function(e){return"string"!=typeof e})||e[t].length<1)return new Error("Invalid prop ".concat(t," supplied to ").concat(n,". Expected an Array of Strings"))},transformItems:E.func},getProvidedProps:function(e,t,n){var r=Wt(e),n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return Boolean(n)&&Boolean(n.getFacetByName(r))?(r=(n=n.getFacetValues(r)).data?function n(e){return e.reduce(function(e,t){return e=t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),t.data)?e.concat(n(t.data)):e},[])}(n.data):[],{canRefine:0<(n=e.transformItems?e.transformItems(r):r).length,items:n}):{items:[],canRefine:!1}},refine:function(e,t,n){return r={ais:e.contextValue,multiIndexContext:e.indexContextValue},g(t,Ut({},Wt(e),n||""),r,!0,"hierarchicalMenu");var r}});function Yt(e){return(Yt="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 Jt(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Gt(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Jt(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==Yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Jt(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var Xt=o({displayName:"AlgoliaCurrentRefinements",$$type:"ais.currentRefinements",propTypes:{transformItems:E.func},getProvidedProps:function(n,e,t,r){r=r.reduce(function(e,t){return void 0===t.items||!n.clearsQuery&&"query"===t.id||n.clearsQuery&&"query"===t.id&&""===t.items[0].currentRefinement?e:e.concat(t.items.map(function(e){return Gt(Gt({},e),{},{id:t.id,index:t.index})}))},[]),r=n.transformItems?n.transformItems(r):r;return{items:r,canRefine:0<r.length}},refine:function(e,t,n){return(n instanceof Array?n.map(function(e){return e.value}):[n]).reduce(function(e,t){return t(e)},t)}});function Zt(e){return(Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Kt=["defaultRefinement"];function en(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Zt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Zt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tn(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function nn(){return"boundingBox"}function rn(e){return[e.northEast.lat,e.northEast.lng,e.southWest.lat,e.southWest.lng].join()}function an(e){return e=e.match(cn),{lat:parseFloat(e[1]),lng:parseFloat(e[2])}}function on(e,t,n){if(G(e=u(e,t,n,nn(),{})))return{northEast:{lat:parseFloat(e.northEast.lat),lng:parseFloat(e.northEast.lng)},southWest:{lat:parseFloat(e.southWest.lat),lng:parseFloat(e.southWest.lng)}}}function sn(e,t,n){return g(e,en({},nn(),t),n,!0)}var cn=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/,un=o({displayName:"AlgoliaGeoSearch",$$type:"ais.geoSearch",getProvidedProps:function(e,t,n){var r={ais:e.contextValue,multiIndexContext:e.indexContextValue},n=p(n,r),i=on(e,t,r),a=n&&n._state.insideBoundingBox&&function(e){e=e.split(",");return{northEast:{lat:parseFloat(e[0]),lng:parseFloat(e[1])},southWest:{lat:parseFloat(e[2]),lng:parseFloat(e[3])}}}(n._state.insideBoundingBox)||void 0,e=(t=t,r=r,(e=e).defaultRefinement,e=tn(e,Kt),(o=u(e,t,r,"aroundLatLng"))||(o=u(e,t,r,"configure.aroundLatLng"))&&an(o)),t=n&&n._state.aroundLatLng&&an(n._state.aroundLatLng)||void 0,r=i||a,o=e||t;return{hits:n?n.hits.filter(function(e){return Boolean(e._geoloc)}):[],isRefinedWithMap:Boolean(r),currentRefinement:r,position:o}},refine:function(e,t,n){return sn(t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,n){n=on(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return n?e.setQueryParameter("insideBoundingBox",rn(n)):e},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},nn())},getMetadata:function(e,t){var n=[],r=nn(),i={ais:e.contextValue,multiIndexContext:e.indexContextValue},a=d(i),o={},e=on(e,t,i);return e&&n.push({label:"".concat(r,": ").concat(rn(e)),value:function(e){return sn(e,o,i)},currentRefinement:e}),{id:r,index:a,items:n}},shouldComponentUpdate:function(){return!0}});function ln(e){return(ln="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 fn(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function hn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fn(Object(n),!0).forEach(function(e){mn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function mn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==ln(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ln(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){return e.attributes[0]}var dn="hierarchicalMenu";function pn(e,t,n){t=u(e,t,n,"".concat(dn,".").concat(N(e)),null);return""===t?null:t}function yn(e,c,u,l){return e.map(function(e){return{label:e.name,value:(t=e.escapedValue,r=(n=c).id,i=c.attributes,a=c.separator,o=c.rootPath,s=c.showParentLevel,null===(n=pn(c,u,l))?t:new at.SearchParameters({hierarchicalFacets:[{name:r,attributes:i,separator:a,rootPath:o,showParentLevel:s}]}).toggleHierarchicalFacetRefinement(r,n).toggleHierarchicalFacetRefinement(r,t).getHierarchicalRefinement(r)[0]),count:e.count,isRefined:e.isRefined,items:e.data&&yn(e.data,c,u,l)};var t,n,r,i,a,o,s})}function gn(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;return e.slice(0,t).map(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Array.isArray(e.items)?hn(hn({},e),{},{items:gn(e.items,t)}):e})}function vn(e,t,n,r){return g(t,mn({},N(e),n||""),r,!0,dn)}function bn(e){var t=e.attribute,n=e.hit,r=e.highlightProperty,i=void 0===(i=e.preTag)?he:i,e=e.postTag,a=void 0===(r=(t={attribute:t,highlightProperty:r,hit:n,preTag:i,postTag:void 0===e?me:e}).preTag)?"<em>":r,o=void 0===(r=t.postTag)?"</em>":r,r=t.highlightProperty,n=t.attribute;if(t=t.hit)return t=X(t[r],n)||{},Array.isArray(t)?t.map(function(e){return de({preTag:a,postTag:o,highlightedValue:e.value})}):de({preTag:a,postTag:o,highlightedValue:t.value});throw new Error("`hit`, the matching record, must be provided")}var xn=["name:asc"],Pn=o({displayName:"AlgoliaHierarchicalMenu",$$type:"ais.hierarchicalMenu",propTypes:{attributes:function(e,t,n){if(!Array.isArray(e[t])||e[t].some(function(e){return"string"!=typeof e})||e[t].length<1)return new Error("Invalid prop ".concat(t," supplied to ").concat(n,". Expected an Array of Strings"))},separator:E.string,rootPath:E.string,showParentLevel:E.bool,defaultRefinement:E.string,showMore:E.bool,limit:E.number,showMoreLimit:E.number,transformItems:E.func,facetOrdering:E.bool},defaultProps:{showMore:!1,limit:10,showMoreLimit:20,separator:" > ",rootPath:null,showParentLevel:!0,facetOrdering:!0},getProvidedProps:function(e,t,n){var r=e.showMore,i=e.limit,a=e.showMoreLimit,o=e.facetOrdering,s=N(e),n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return Boolean(n)&&Boolean(n.getFacetByName(s))?(r=r?a:i,i=(a=n.getFacetValues(s,{sortBy:xn,facetOrdering:o})).data?yn(a.data,e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}):[],n=e.transformItems?e.transformItems(i):i,{items:gn(n,r),currentRefinement:pn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:0<n.length}):{items:[],currentRefinement:pn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:!1}},refine:function(e,t,n){return vn(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(dn,".").concat(N(n)));var n},getSearchParameters:function(e,t,n){var r=t.attributes,i=t.separator,a=t.rootPath,o=t.showParentLevel,s=t.showMore,c=t.limit,u=t.showMoreLimit,l=t.contextValue,f=N(t),s=s?u:c,u=(e=e.addHierarchicalFacet({name:f,attributes:r,separator:i,rootPath:a,showParentLevel:o}).setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,s)}),pn(t,n,{ais:l,multiIndexContext:t.indexContextValue}));return e=null!==u?e.toggleHierarchicalFacetRefinement(f,u):e},getMetadata:function(t,e){var n=t.attributes[0],r=N(t),e=pn(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),n=e?[{label:"".concat(n,": ").concat(Z(e)),attribute:n,value:function(e){return vn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]:[];return{id:r,index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:n}}}),Rn=o({displayName:"AlgoliaHighlighter",$$type:"ais.highlighter",propTypes:{},getProvidedProps:function(){return{highlight:bn}}}),Sn=o({displayName:"AlgoliaHits",$$type:"ais.hits",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{hits:Y(z(n.hits,n.hitsPerPage,n.page),n.queryID)}:{hits:[]}},getSearchParameters:function(e){return e}});function jn(e){return(jn="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 Fn(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function On(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fn(Object(n),!0).forEach(function(e){wn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function wn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==jn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===jn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cn(){return"hitsPerPage"}function Vn(e,t,n){e=u(e,t,n,"hitsPerPage",null);return"string"==typeof e?parseInt(e,10):e}var _n=o({displayName:"AlgoliaHitsPerPage",$$type:"ais.hitsPerPage",propTypes:{defaultRefinement:E.number.isRequired,items:E.arrayOf(E.shape({label:E.string,value:E.number.isRequired})).isRequired,transformItems:E.func},getProvidedProps:function(e,t){var n=Vn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?On(On({},e),{},{isRefined:!0}):On(On({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,wn({},"hitsPerPage",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},Cn())},getSearchParameters:function(e,t,n){return e.setHitsPerPage(Vn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(){return{id:Cn()}}});function En(e){return(En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var In=["page"];function An(e,t,n){return(t=function(e){e=function(e,t){if("object"!==En(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==En(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===En(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nn(e){return function(e){if(Array.isArray(e))return Tn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Tn(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tn(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hn(e,t){if(null==e)return{};var n,r=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)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function Dn(e){e=e||{};e.page;return Hn(e,In)}var kn=o({displayName:"AlgoliaInfiniteHits",$$type:"ais.infiniteHits",getProvidedProps:function(e,t,n){var r,i,a,o,s,c,u,l,f,h,m=this,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?(r=n.page,c=n.hits,f=n.hitsPerPage,i=n.nbPages,a=n._state,this._cache=e.cache||this._cache||(s=o=void 0,{read:function(e){e=e.state;return $(s,Dn(e))?o:null},write:function(e){var t=e.state,e=e.hits;s=Dn(t),o=e}}),e=this._cache.read({state:a})||{},c=Y(z(c,f,r),n.queryID),e[r]=c,this._cache.write({state:a,hits:e}),u=Math.min.apply(Math,Nn(Object.keys(e).map(Number))),l=Math.max.apply(Math,Nn(Object.keys(e).map(Number))),f=0<u,n=l<i-1,{hits:(h=e,Object.keys(h).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(h[t])},[])),hasPrevious:f,hasMore:n,refinePrevious:function(e){return m.refine(e,u-1)},refineNext:function(e){return m.refine(e,l+1)}}):{hits:[],hasPrevious:!1,hasMore:!1,refine:function(){},refinePrevious:function(){},refineNext:function(){}}},getSearchParameters:function(e,t,n){return e.setQueryParameters({page:(t={ais:(e=t).contextValue,multiIndexContext:t.indexContextValue},("string"==typeof(e=u(e,n,t,"page",1))?parseInt(e,10):e)-1)})},refine:function(e,t,n,r){return g(t,An({},"page",r+1),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!1)}});function Mn(e){return(Mn="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 Qn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Mn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Mn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Mn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $n="menu";function Bn(e){return e.attribute}function Ln(e,t,n){t=u(e,t,n,"".concat($n,".").concat(Bn(e)),null);return""===t?null:t}function qn(e,t,n,r){return e===Ln(t,n,r)?"":e}function Un(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function Wn(e,t,n,r){return g(t,Qn({},Bn(e),n||""),r,!0,$n)}var zn=["count:desc","name:asc"],Yn=o({displayName:"AlgoliaMenu",$$type:"ais.menu",propTypes:{attribute:E.string.isRequired,showMore:E.bool,limit:E.number,showMoreLimit:E.number,defaultRefinement:E.string,transformItems:E.func,searchable:E.bool,facetOrdering:E.bool},defaultProps:{showMore:!1,limit:10,showMoreLimit:20,facetOrdering:!0},getProvidedProps:function(t,n,e,r,i){var a=t.attribute,o=t.searchable,s=t.indexContextValue,c=t.facetOrdering,e=p(e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),u=Boolean(e)&&Boolean(e.getFacetByName(a)),l=Boolean(i&&i[a]&&""!==i.query);if(o&&s)throw new Error("react-instantsearch: searching in *List is not available when used inside a multi index context");return u?(s=l?i[a].map(function(e){return{label:e.value,value:qn(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),_highlightResult:{label:{value:e.highlighted}},count:e.count,isRefined:e.isRefined}}):e.getFacetValues(a,{sortBy:o?void 0:zn,facetOrdering:c}).map(function(e){return{label:e.name,value:qn(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),count:e.count,isRefined:e.isRefined}}),{items:(i=t.transformItems?t.transformItems(s):s).slice(0,Un(t)),currentRefinement:Ln(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:0<i.length}):{items:[],currentRefinement:Ln(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:u}},refine:function(e,t,n){return Wn(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:Un(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat($n,".").concat(Bn(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=(e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,Un(t))})).addDisjunctiveFacet(r),Ln(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}));return e=null!==n?e.addDisjunctiveFacetRefinement(r,n):e},getMetadata:function(t,e){var n=Bn(t),e=Ln(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return{id:n,index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:null===e?[]:[{label:"".concat(t.attribute,": ").concat(Z(e)),attribute:t.attribute,value:function(e){return Wn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function Jn(e){return(Jn="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 Gn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Jn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Jn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?Zn(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kn(e){var t;return void 0===e.start&&void 0===e.end?"":(t=void 0!==e.start?e.start:"",e=void 0!==e.end?e.end:"","".concat(t,":").concat(e))}var er="multiRange";function tr(e){return e.attribute}function nr(e,t,n){return u(e,t,n,"".concat(er,".").concat(tr(e)),"")}function rr(e,t,n,r){return g(t,Gn({},tr(e),n),r,!0,er)}var ir=o({displayName:"AlgoliaNumericMenu",$$type:"ais.numericMenu",propTypes:{id:E.string,attribute:E.string.isRequired,items:E.arrayOf(E.shape({label:E.node,start:E.number,end:E.number})).isRequired,transformItems:E.func},getProvidedProps:function(o,e,t){var n=o.attribute,s=nr(o,e,{ais:o.contextValue,multiIndexContext:o.indexContextValue}),c=p(t,{ais:o.contextValue,multiIndexContext:o.indexContextValue}),e=o.items.map(function(e){var t,n,r,i,a=Kn(e);return{label:e.label,value:a,isRefined:a===s,noRefinement:!(!c||(e=tr(o),a=a,t=(t=c).getFacetByName(e)?t.getFacetStats(e):null,e=a.split(":"),i=0===Number(e[0])||""===a?Number.NEGATIVE_INFINITY:Number(e[0]),a=0===Number(e[1])||""===a?Number.POSITIVE_INFINITY:Number(e[1]),Boolean(t)&&(e=i,r=a,(n=t).min>=e&&n.min<=r||n.max>=e&&n.max<=r||(e=a,(n=i)>=(r=t).min&&n<=r.max)||e>=r.min&&e<=r.max)))}}),t=c&&c.getFacetByName(n)?c.getFacetStats(n):null,n=J(e,function(e){return!0===e.isRefined}),n=(e.some(function(e){return""===e.value})||e.push({value:"",isRefined:void 0===n,noRefinement:!t,label:"All"}),o.transformItems?o.transformItems(e):e);return{items:n,currentRefinement:s,canRefine:0<n.length&&n.some(function(e){return!1===e.noRefinement})}},refine:function(e,t,n){return rr(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(er,".").concat(tr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,t=0===(n=nr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})).length?{start:null,end:null}:(t=(n=Xn(n.split(":"),2))[0],n=n[1],{start:0<t.length?parseFloat(t):null,end:0<n.length?parseFloat(n):null}),n=t.start,t=t.end;return e=e.addDisjunctiveFacet(r),"number"==typeof n&&(e=e.addNumericRefinement(r,">=",n)),e="number"==typeof t?e.addNumericRefinement(r,"<=",t):e},getMetadata:function(t,e){var n,r=tr(t),i=nr(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),e=[],a=d({ais:t.contextValue,multiIndexContext:t.indexContextValue});return""!==i&&(n=J(t.items,function(e){return Kn(e)===i}).label,e.push({label:"".concat(t.attribute,": ").concat(n),attribute:t.attribute,currentRefinement:n,value:function(e){return rr(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})}})),{id:r,index:a,items:e}}});function ar(e){return(ar="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 or(e,t,n){return(t=function(e){e=function(e,t){if("object"!==ar(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ar(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ar(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(){return"page"}function cr(e,t,n){e=u(e,t,n,"page",1);return"string"==typeof e?parseInt(e,10):e}var ur=o({displayName:"AlgoliaPagination",$$type:"ais.pagination",getProvidedProps:function(e,t,n){var n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{nbPages:n=n.nbPages,currentRefinement:cr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:1<n}:null},refine:function(e,t,n){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},g(t,or({},"page",n),e,!1)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},sr())},getSearchParameters:function(e,t,n){return e.setPage(cr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})-1)},getMetadata:function(){return{id:sr()}}}),lr=o({displayName:"AlgoliaPoweredBy",$$type:"ais.poweredBy",getProvidedProps:function(){var e="undefined"==typeof window||void 0===window.location?"":window.location.hostname;return{url:"https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&"+"utm_content=".concat(e,"&")+"utm_campaign=poweredby"}}});function fr(e){return(fr="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 hr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==fr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==fr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===fr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mr(e){return e.attribute}var dr="range";function pr(e,t,n,r){var t=u(e,t,r,"".concat(dr,".").concat(mr(e)),{}),r=t.min,t=t.max,i=Boolean(e.precision),r={min:r="string"==typeof r?i?parseFloat(r):parseInt(r,10):r,max:t="string"==typeof t?i?parseFloat(t):parseInt(t,10):t},i=void 0!==e.min,t=void 0!==e.max,e=void 0!==r.min,a=void 0!==r.max;if(i&&e&&r.min<n.min)throw Error("You can't provide min value lower than range.");if(t&&a&&r.max>n.max)throw Error("You can't provide max value greater than range.");return i&&!e&&(r.min=n.min),t&&!a&&(r.max=n.max),r}function yr(e,t){return{min:(void 0!==e.min?e:t).min,max:(void 0!==e.max?e:t).max}}function gr(e,t,n,r){e=e||n!==r?e&&t?n:r:void 0;return e}function vr(e,t,n,r,i){var a=n.min,n=n.max,o=r.min,r=r.max,s=void 0===a||""===a,c=void 0===n||""===n,a=s?void 0:parseFloat(a),n=c?void 0:parseFloat(n),u=s||isFinite(a),l=c||isFinite(n);if(!u||!l)throw Error("You can't provide non finite values to the range connector.");if(a<o)throw Error("You can't provide min value lower than range.");if(r<n)throw Error("You can't provide max value greater than range.");return g(t,hr({},mr(e),{min:gr(void 0!==e.min,s,o,a),max:gr(void 0!==e.max,c,r,n)}),i,!0,dr)}var br=o({displayName:"AlgoliaRange",$$type:"ais.range",propTypes:{id:E.string,attribute:E.string.isRequired,defaultRefinement:E.shape({min:E.number,max:E.number}),min:E.number,max:E.number,precision:E.number,header:E.node,footer:E.node},defaultProps:{precision:0},getProvidedProps:function(e,t,n){var r=e.attribute,i=e.precision,a=e.min,o=e.max,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),s=n&&n.getFacetByName(r),c=s&&n.getFacetStats(r)||{},s=(s?n.getFacetValues(r):[]).map(function(e){return{value:e.name,count:e.count}}),c=(n={min:a,max:o},r=c,a=i,a=Math.pow(10,a),o="number"==typeof n.min&&isFinite(n.min)?n.min:"number"==typeof r.min&&isFinite(r.min)?r.min:void 0,n="number"==typeof n.max&&isFinite(n.max)?n.max:"number"==typeof r.max&&isFinite(r.max)?r.max:void 0,{min:void 0!==o?Math.floor(o*a)/a:o,max:void 0!==n?Math.ceil(n*a)/a:n}),r=c.min,o=c.max,a=(this._currentRange={min:r,max:o},pr(e,t,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue}));return{min:r,max:o,canRefine:0<s.length,currentRefinement:yr(a,this._currentRange),count:s,precision:i}},refine:function(e,t,n){return vr(e,t,n,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(dr,".").concat(mr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=pr(t,n,this._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),t=n.min,n=n.max;return e=e.addDisjunctiveFacet(r),void 0!==t&&(e=e.addNumericRefinement(r,">=",t)),e=void 0!==n?e.addNumericRefinement(r,"<=",n):e},getMetadata:function(t,e){var n=this,r=this._currentRange,i=r.min,r=r.max,e=pr(t,e,this._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),a=e.min,e=e.max,o=[],s=void 0!==a,c=void 0!==e;return(s&&a!==i||c&&e!==r)&&(s=[s?"".concat(a," <= "):"",t.attribute,c?" <= ".concat(e):""],o.push({label:s.join(""),attribute:t.attribute,value:function(e){return vr(t,e,{},n._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:yr({min:a,max:e},{min:i,max:r})})),{id:mr(t),index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:o}}});function xr(e){return(xr="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 Pr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==xr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===xr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rr="refinementList";function Sr(e){return e.attribute}function T(e,t,n){t=u(e,t,n,"".concat(Rr,".").concat(Sr(e)),[]);return"string"!=typeof t?t:t?[t]:[]}function jr(t,e,n,r){e=T(e,n,r);return-1===e.indexOf(t)?e.concat([t]):e.filter(function(e){return e!==t})}function Fr(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function Or(e,t,n,r){return g(t,Pr({},Sr(e),0<n.length?n:""),r,!0,Rr)}var wr=["isRefined","count:desc","name:asc"],Cr=o({displayName:"AlgoliaRefinementList",$$type:"ais.refinementList",propTypes:{id:E.string,attribute:E.string.isRequired,operator:E.oneOf(["and","or"]),showMore:E.bool,limit:E.number,showMoreLimit:E.number,defaultRefinement:E.arrayOf(E.oneOfType([E.string,E.number])),searchable:E.bool,transformItems:E.func,facetOrdering:E.bool},defaultProps:{operator:"or",showMore:!1,limit:10,showMoreLimit:20,facetOrdering:!0},getProvidedProps:function(t,n,e,r,i){var a=t.attribute,o=t.searchable,s=t.indexContextValue,c=t.facetOrdering,e=p(e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),u=Boolean(e)&&Boolean(e.getFacetByName(a)),l=Boolean(i&&i[a]&&""!==i.query);if(o&&s)throw new Error("react-instantsearch: searching in *List is not available when used inside a multi index context");return u?(s=l?i[a].map(function(e){return{label:e.value,value:jr(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),_highlightResult:{label:{value:e.highlighted}},count:e.count,isRefined:e.isRefined}}):e.getFacetValues(a,{sortBy:wr,facetOrdering:c}).map(function(e){return{label:e.name,value:jr(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),count:e.count,isRefined:e.isRefined}}),{items:(i=t.transformItems?t.transformItems(s):s).slice(0,Fr(t)),currentRefinement:T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:0<i.length}):{items:[],currentRefinement:T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),canRefine:u,isFromSearch:l,searchable:o}},refine:function(e,t,n){return Or(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:Fr(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Rr,".").concat(Sr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,i="and"===t.operator?"addFacet":"addDisjunctiveFacet",a="".concat(i,"Refinement");return e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,Fr(t))}))[i](r),T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}).reduce(function(e,t){return e[a](r,t)},e)},getMetadata:function(n,r){var e=Sr(n),i={ais:n.contextValue,multiIndexContext:n.indexContextValue};return{id:e,index:d(i),items:0<T(n,r,i).length?[{attribute:n.attribute,label:"".concat(n.attribute,": "),currentRefinement:T(n,r,i),value:function(e){return Or(n,e,[],i)},items:T(n,r,i).map(function(t){return{label:Z("".concat(t)),value:function(e){e=T(n,e,i).filter(function(e){return e!==t});return Or(n,r,e,i)}}})}]:[]}}}),Vr=o({displayName:"AlgoliaScrollTo",$$type:"ais.scrollTo",propTypes:{scrollOn:E.string},defaultProps:{scrollOn:"page"},getProvidedProps:function(e,t){var n=e.scrollOn,r=u(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},n,null),e=(this._prevSearchState||(this._prevSearchState={}),l(t=y({ais:e.contextValue,multiIndexContext:e.indexContextValue})?t.indices?t.indices[d({ais:e.contextValue,multiIndexContext:e.indexContextValue})]:{}:t,["configure",n])),t=q(this._prevSearchState,e);return this._prevSearchState=e,{value:r,hasNotChanged:t}}});function _r(e){return(_r="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 Er(e,t,n){return(t=function(e){e=function(e,t){if("object"!==_r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===_r(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ir(){return"query"}function Ar(e,t,n){e=u(e,t,n,"query","");return e||""}function Nr(e,t,n,r){return g(t,Er({},"query",n),r,!0)}var Tr=o({displayName:"AlgoliaSearchBox",$$type:"ais.searchBox",propTypes:{defaultRefinement:E.string},getProvidedProps:function(e,t,n){return{currentRefinement:Ar(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),isSearchStalled:n.isSearchStalled}},refine:function(e,t,n){return Nr(0,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,Ir())},getSearchParameters:function(e,t,n){return e.setQuery(Ar(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(t,e){e=Ar(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return{id:"query",index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:null===e?[]:[{label:"".concat("query",": ").concat(e),value:function(e){return Nr(0,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function Hr(e){return(Hr="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 Dr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Hr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Hr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kr(){return"relevancyStrictness"}var Mr=o({displayName:"AlgoliaRelevantSort",$$type:"ais.relevantSort",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{isVirtualReplica:void 0!==n.appliedRelevancyStrictness,isRelevantSorted:void 0!==n.appliedRelevancyStrictness&&0<n.appliedRelevancyStrictness}:{isVirtualReplica:!1,isRelevantSorted:!1}},getSearchParameters:function(e,t,n){return e.setQueryParameter("relevancyStrictness",(e={ais:t.contextValue,multiIndexContext:t.indexContextValue},u(t,n,e,"relevancyStrictness")))},refine:function(e,t,n){return g(t,Dr({},kr(),n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)}});function Qr(e){return(Qr="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 $r(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Br(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$r(Object(n),!0).forEach(function(e){Lr(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Lr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Qr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Qr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qr(){return"sortBy"}function Ur(e,t,n){e=u(e,t,n,"sortBy",null);return e||null}var Wr=o({displayName:"AlgoliaSortBy",$$type:"ais.sortBy",propTypes:{defaultRefinement:E.string,items:E.arrayOf(E.shape({label:E.string,value:E.string.isRequired})).isRequired,transformItems:E.func},getProvidedProps:function(e,t){var n=Ur(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?Br(Br({},e),{},{isRefined:!0}):Br(Br({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,Lr({},"sortBy",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},qr())},getSearchParameters:function(e,t,n){n=Ur(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return e.setIndex(n)},getMetadata:function(){return{id:qr()}}}),zr=o({displayName:"AlgoliaStateResults",$$type:"ais.stateResults",getProvidedProps:function(e,t,n){return{searchState:t,searchResults:p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),allSearchResults:n.results,searching:n.searching,isSearchStalled:n.isSearchStalled,error:n.error,searchingForFacetValues:n.searchingForFacetValues,props:e}}}),Yr=o({displayName:"AlgoliaStats",$$type:"ais.stats",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{areHitsSorted:void 0!==n.appliedRelevancyStrictness&&0<n.appliedRelevancyStrictness&&n.nbHits!==n.nbSortedHits,nbHits:n.nbHits,nbSortedHits:n.nbSortedHits,processingTimeMS:n.processingTimeMS}:null}});function Jr(e){return(Jr="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 Gr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Jr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==Jr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Jr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xr(e){return e.attribute}var Zr="toggle",Kr=["0","false","null","undefined"];function ei(e,t,n){t=u(e,t,n,"".concat(Zr,".").concat(Xr(e)),!1);return-1===Kr.indexOf(t)&&Boolean(t)}function ti(e,t,n,r){return g(t,Gr({},Xr(e),n||!1),r,!0,Zr)}E=o({displayName:"AlgoliaToggle",$$type:"ais.toggle",propTypes:{label:E.string.isRequired,attribute:E.string.isRequired,value:E.any.isRequired,filter:E.func,defaultRefinement:E.bool},getProvidedProps:function(e,t,n){var r=e.attribute,i=e.value,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=ei(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),e=n&&n.getFacetByName(r)?n.getFacetValues(r):null,n=e&&e.length?J(e,function(e){return e.name===i.toString()}):null,r=n&&n.count,n=e&&e.length?e.reduce(function(e,t){return e+t.count},0):null;return{currentRefinement:t,canRefine:t?null!==n&&0<n:null!==r&&0<r,count:{checked:n,unchecked:r}}},refine:function(e,t,n){return ti(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Zr,".").concat(Xr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,i=t.value,a=t.filter,n=ei(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),t=e.addDisjunctiveFacet(r);return t=n&&(t=t.addDisjunctiveFacetRefinement(r,i),a)?a(t):t},getMetadata:function(t,e){var n=Xr(t),e=ei(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),r=[],i=d({ais:t.contextValue,multiIndexContext:t.indexContextValue});return e&&r.push({label:t.label,currentRefinement:e,attribute:t.attribute,value:function(e){return ti(t,e,!1,{ais:t.contextValue,multiIndexContext:t.indexContextValue})}}),{id:n,index:i,items:r}}});function ni(e){return(ni="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 ri(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function ii(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ri(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==ni(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==ni(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ni(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ri(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function ai(r,i,a){return function(e,t){if("function"!=typeof r)throw new TypeError("Expected insightsClient to be a Function");var n=function(e){var t=e.method,n=e.results,r=e.currentHit,i=n.index,a=r.__queryID,o=[r.objectID];if(!a)throw new Error("Could not infer `queryID`. Ensure `clickAnalytics: true` was added with the Configure widget.\nSee: https://alg.li/VpPpLt");switch(t){case"clickedObjectIDsAfterSearch":return{index:i,queryID:a,objectIDs:o,positions:[r.__position]};case"convertedObjectIDsAfterSearch":return{index:i,queryID:a,objectIDs:o};default:throw new Error('Unsupported method "'.concat(t,'" passed to the insights function. The supported methods are: "clickedObjectIDsAfterSearch", "convertedObjectIDsAfterSearch".'))}}({method:e,results:i,currentHit:a});r(e,ii(ii({},n),t))}}var oi=C;e.EXPERIMENTAL_connectConfigureRelatedItems=f,e.EXPERIMENTAL_connectDynamicWidgets=oi,e.connectAutoComplete=j,e.connectBreadcrumb=zt,e.connectConfigure=t,e.connectCurrentRefinements=Xt,e.connectDynamicWidgets=C,e.connectGeoSearch=un,e.connectHierarchicalMenu=Pn,e.connectHighlight=Rn,e.connectHitInsights=function(r){return o({displayName:"AlgoliaInsights",$$type:"ais.insights",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return{insights:ai(r,n,e.hit)}}})},e.connectHits=Sn,e.connectHitsPerPage=_n,e.connectInfiniteHits=kn,e.connectMenu=Yn,e.connectNumericMenu=ir,e.connectPagination=ur,e.connectPoweredBy=lr,e.connectRange=br,e.connectRefinementList=Cr,e.connectRelevantSort=Mr,e.connectScrollTo=Vr,e.connectSearchBox=Tr,e.connectSortBy=Wr,e.connectStateResults=zr,e.connectStats=Yr,e.connectToggleRefinement=E,Object.defineProperty(e,"__esModule",{value:!0})});
3
3
  //# sourceMappingURL=Connectors.min.js.map