react-instantsearch 6.40.4 → 7.0.1

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.
Files changed (170) hide show
  1. package/README.md +113 -2
  2. package/dist/cjs/index.js +27 -0
  3. package/dist/cjs/package.json +1 -0
  4. package/dist/cjs/types/PartialKeys.js +1 -0
  5. package/dist/cjs/types/Translatable.js +1 -0
  6. package/dist/cjs/types/index.js +27 -0
  7. package/dist/cjs/ui/Breadcrumb.js +59 -0
  8. package/dist/cjs/ui/ClearRefinements.js +30 -0
  9. package/dist/cjs/ui/CurrentRefinements.js +53 -0
  10. package/dist/cjs/ui/HierarchicalMenu.js +82 -0
  11. package/dist/cjs/ui/Highlight.js +27 -0
  12. package/dist/cjs/ui/Hits.js +49 -0
  13. package/dist/cjs/ui/HitsPerPage.js +36 -0
  14. package/dist/cjs/ui/InfiniteHits.js +62 -0
  15. package/dist/cjs/ui/InternalHighlight.js +56 -0
  16. package/dist/cjs/ui/Menu.js +54 -0
  17. package/dist/cjs/ui/Pagination.js +127 -0
  18. package/dist/cjs/ui/PoweredBy.js +39 -0
  19. package/dist/cjs/ui/RangeInput.js +124 -0
  20. package/dist/cjs/ui/RefinementList.js +69 -0
  21. package/dist/cjs/ui/SearchBox.js +153 -0
  22. package/dist/cjs/ui/ShowMoreButton.js +19 -0
  23. package/dist/cjs/ui/Snippet.js +27 -0
  24. package/dist/cjs/ui/SortBy.js +37 -0
  25. package/dist/cjs/ui/Stats.js +34 -0
  26. package/dist/cjs/ui/ToggleRefinement.js +35 -0
  27. package/dist/cjs/ui/lib/cx.js +12 -0
  28. package/dist/cjs/ui/lib/isModifierClick.js +10 -0
  29. package/dist/cjs/widgets/Breadcrumb.js +49 -0
  30. package/dist/cjs/widgets/ClearRefinements.js +44 -0
  31. package/dist/cjs/widgets/CurrentRefinements.js +36 -0
  32. package/dist/cjs/widgets/HierarchicalMenu.js +70 -0
  33. package/dist/cjs/widgets/Highlight.js +33 -0
  34. package/dist/cjs/widgets/Hits.js +32 -0
  35. package/dist/cjs/widgets/HitsPerPage.js +40 -0
  36. package/dist/cjs/widgets/InfiniteHits.js +57 -0
  37. package/dist/cjs/widgets/Menu.js +64 -0
  38. package/dist/cjs/widgets/Pagination.js +76 -0
  39. package/dist/cjs/widgets/PoweredBy.js +19 -0
  40. package/dist/cjs/widgets/RangeInput.js +53 -0
  41. package/dist/cjs/widgets/RefinementList.js +124 -0
  42. package/dist/cjs/widgets/SearchBox.js +91 -0
  43. package/dist/cjs/widgets/Snippet.js +33 -0
  44. package/dist/cjs/widgets/SortBy.js +34 -0
  45. package/dist/cjs/widgets/Stats.js +43 -0
  46. package/dist/cjs/widgets/ToggleRefinement.js +40 -0
  47. package/dist/cjs/widgets/index.js +203 -0
  48. package/dist/es/index.d.ts +2 -0
  49. package/dist/es/index.js +2 -1
  50. package/dist/es/types/PartialKeys.d.ts +4 -0
  51. package/dist/es/types/PartialKeys.js +1 -0
  52. package/dist/es/types/Translatable.d.ts +5 -0
  53. package/dist/es/types/Translatable.js +1 -0
  54. package/dist/es/types/index.d.ts +2 -0
  55. package/dist/es/types/index.js +2 -0
  56. package/dist/es/ui/Breadcrumb.d.ts +48 -0
  57. package/dist/es/ui/Breadcrumb.js +52 -0
  58. package/dist/es/ui/ClearRefinements.d.ts +26 -0
  59. package/dist/es/ui/ClearRefinements.js +23 -0
  60. package/dist/es/ui/CurrentRefinements.d.ts +47 -0
  61. package/dist/es/ui/CurrentRefinements.js +46 -0
  62. package/dist/es/ui/HierarchicalMenu.d.ts +73 -0
  63. package/dist/es/ui/HierarchicalMenu.js +75 -0
  64. package/dist/es/ui/Highlight.d.ts +6 -0
  65. package/dist/es/ui/Highlight.js +20 -0
  66. package/dist/es/ui/Hits.d.ts +31 -0
  67. package/dist/es/ui/Hits.js +42 -0
  68. package/dist/es/ui/HitsPerPage.d.ts +23 -0
  69. package/dist/es/ui/HitsPerPage.js +29 -0
  70. package/dist/es/ui/InfiniteHits.d.ts +56 -0
  71. package/dist/es/ui/InfiniteHits.js +55 -0
  72. package/dist/es/ui/InternalHighlight.d.ts +32 -0
  73. package/dist/es/ui/InternalHighlight.js +47 -0
  74. package/dist/es/ui/Menu.d.ts +59 -0
  75. package/dist/es/ui/Menu.js +47 -0
  76. package/dist/es/ui/Pagination.d.ts +121 -0
  77. package/dist/es/ui/Pagination.js +120 -0
  78. package/dist/es/ui/PoweredBy.d.ts +29 -0
  79. package/dist/es/ui/PoweredBy.js +32 -0
  80. package/dist/es/ui/RangeInput.d.ts +60 -0
  81. package/dist/es/ui/RangeInput.js +115 -0
  82. package/dist/es/ui/RefinementList.d.ts +73 -0
  83. package/dist/es/ui/RefinementList.js +62 -0
  84. package/dist/es/ui/SearchBox.d.ts +64 -0
  85. package/dist/es/ui/SearchBox.js +146 -0
  86. package/dist/es/ui/ShowMoreButton.d.ts +19 -0
  87. package/dist/es/ui/ShowMoreButton.js +12 -0
  88. package/dist/es/ui/Snippet.d.ts +6 -0
  89. package/dist/es/ui/Snippet.js +20 -0
  90. package/dist/es/ui/SortBy.d.ts +21 -0
  91. package/dist/es/ui/SortBy.js +30 -0
  92. package/dist/es/ui/Stats.d.ts +20 -0
  93. package/dist/es/ui/Stats.js +27 -0
  94. package/dist/es/ui/ToggleRefinement.d.ts +25 -0
  95. package/dist/es/ui/ToggleRefinement.js +28 -0
  96. package/dist/es/ui/lib/cx.d.ts +1 -0
  97. package/dist/es/ui/lib/cx.js +6 -0
  98. package/dist/es/ui/lib/isModifierClick.d.ts +2 -0
  99. package/dist/es/ui/lib/isModifierClick.js +4 -0
  100. package/dist/es/widgets/Breadcrumb.d.ts +8 -0
  101. package/dist/es/widgets/Breadcrumb.js +42 -0
  102. package/dist/es/widgets/ClearRefinements.d.ts +8 -0
  103. package/dist/es/widgets/ClearRefinements.js +37 -0
  104. package/dist/es/widgets/CurrentRefinements.d.ts +6 -0
  105. package/dist/es/widgets/CurrentRefinements.js +29 -0
  106. package/dist/es/widgets/HierarchicalMenu.d.ts +8 -0
  107. package/dist/es/widgets/HierarchicalMenu.js +63 -0
  108. package/dist/es/widgets/Highlight.d.ts +8 -0
  109. package/dist/es/widgets/Highlight.js +26 -0
  110. package/dist/es/widgets/Hits.d.ts +7 -0
  111. package/dist/es/widgets/Hits.js +25 -0
  112. package/dist/es/widgets/HitsPerPage.d.ts +6 -0
  113. package/dist/es/widgets/HitsPerPage.js +33 -0
  114. package/dist/es/widgets/InfiniteHits.d.ts +15 -0
  115. package/dist/es/widgets/InfiniteHits.js +50 -0
  116. package/dist/es/widgets/Menu.d.ts +8 -0
  117. package/dist/es/widgets/Menu.js +57 -0
  118. package/dist/es/widgets/Pagination.d.ts +8 -0
  119. package/dist/es/widgets/Pagination.js +69 -0
  120. package/dist/es/widgets/PoweredBy.d.ts +5 -0
  121. package/dist/es/widgets/PoweredBy.js +12 -0
  122. package/dist/es/widgets/RangeInput.d.ts +8 -0
  123. package/dist/es/widgets/RangeInput.js +46 -0
  124. package/dist/es/widgets/RefinementList.d.ts +15 -0
  125. package/dist/es/widgets/RefinementList.js +116 -0
  126. package/dist/es/widgets/SearchBox.d.ts +13 -0
  127. package/dist/es/widgets/SearchBox.js +83 -0
  128. package/dist/es/widgets/Snippet.d.ts +8 -0
  129. package/dist/es/widgets/Snippet.js +26 -0
  130. package/dist/es/widgets/SortBy.d.ts +6 -0
  131. package/dist/es/widgets/SortBy.js +27 -0
  132. package/dist/es/widgets/Stats.d.ts +8 -0
  133. package/dist/es/widgets/Stats.js +36 -0
  134. package/dist/es/widgets/ToggleRefinement.d.ts +7 -0
  135. package/dist/es/widgets/ToggleRefinement.js +33 -0
  136. package/dist/es/widgets/index.d.ts +18 -0
  137. package/dist/es/widgets/index.js +18 -0
  138. package/dist/umd/ReactInstantSearch.js +19990 -0
  139. package/dist/umd/ReactInstantSearch.js.map +1 -0
  140. package/dist/umd/ReactInstantSearch.min.js +3 -0
  141. package/dist/umd/ReactInstantSearch.min.js.map +1 -0
  142. package/package.json +28 -24
  143. package/connectors.js +0 -29
  144. package/dist/README.md +0 -101
  145. package/dist/connectors.js +0 -168
  146. package/dist/dom.js +0 -198
  147. package/dist/es/connectors.js +0 -26
  148. package/dist/es/dom.js +0 -31
  149. package/dist/es/native.js +0 -5
  150. package/dist/es/server.js +0 -1
  151. package/dist/index.js +0 -12
  152. package/dist/native.js +0 -42
  153. package/dist/package.json +0 -56
  154. package/dist/server.js +0 -12
  155. package/dist/umd/Connectors.js +0 -11215
  156. package/dist/umd/Connectors.js.map +0 -1
  157. package/dist/umd/Connectors.min.js +0 -3
  158. package/dist/umd/Connectors.min.js.map +0 -1
  159. package/dist/umd/Core.js +0 -650
  160. package/dist/umd/Core.js.map +0 -1
  161. package/dist/umd/Core.min.js +0 -3
  162. package/dist/umd/Core.min.js.map +0 -1
  163. package/dist/umd/Dom.js +0 -18935
  164. package/dist/umd/Dom.js.map +0 -1
  165. package/dist/umd/Dom.min.js +0 -3
  166. package/dist/umd/Dom.min.js.map +0 -1
  167. package/dom.js +0 -34
  168. package/index.js +0 -1
  169. package/native.js +0 -8
  170. package/server.js +0 -1
@@ -1,3 +0,0 @@
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}},t=n.createContext({onInternalStateUpdate:function(){},createHrefForState:function(){return"#"},onSearchForFacetValues:function(){},onSearchStateChange:function(){},onSearchParameters:function(){},store:{},widgetsManager:{},mainTargetedIndex:""}),B=t.Consumer,t=(t.Provider,n.createContext(void 0)),L=t.Consumer;t.Provider;function q(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 U(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?q(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)):q(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 W=Object.prototype.hasOwnProperty,z=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=0;i<n.length;i++)if(!W.call(t,n[i])||e[n[i]]!==t[n[i]])return!1}return!0},Y=function(e){return e.displayName||e.name||"UnknownComponent"},J=function r(i){return Object.keys(i).forEach(function(e){var t,n=i[e];"object"!==a(t=n)||null===t||Array.isArray(t)||(K(n)?r(n):delete i[e])}),i};function G(e,n,r){return e.map(function(e,t){return U(U({},e),{},{__position:n*r+t+1})})}function X(e,t){return t?e.map(function(e){return U(U({},e),{},{__queryID:t})}):e}function Z(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function K(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 ee=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 te(e){return e.replace(/^\\-/,"-")}var ne=["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 re(){return(re=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 ie(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 ae(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 oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ae(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function se(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,fe(r.key),r)}}function ce(e,t){return(ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(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=le(n),t=(e=r?(e=le(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 le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t,n){(t=fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function fe(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 he(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&&ce(t,e);var n,r=ue(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=z(this.props,e),null===this.state.providedProps||null===t.providedProps?this.state.providedProps!==t.providedProps||!e:!e||!z(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(oe(oe({},t.props.contextValue.store.getState()),{},{widgets:e})),t.props.contextValue.onSearchStateChange(J(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,ie(n,ne)),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,re({},n,r,e,t)))}}])&&se(t.prototype,e),n&&se(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.Component);return c(t,"displayName","".concat(u.displayName,"(").concat(Y(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=he(n)(e,t);return function(n){return H.createElement(B,null,function(t){return H.createElement(L,null,function(e){return H.createElement(r,re({contextValue:t,indexContextValue:e},n))})})}}}var me="<ais-highlight-0000000000>",de="</ais-highlight-0000000000>";function pe(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 ye(e){return(ye="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 ge(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?ge(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ge(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"!==ye(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"!==ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ye(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 ve(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=ve(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=ve(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 be(e){return(be="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 xe=["children","contextValue","indexContextValue"],Pe=["children","contextValue","indexContextValue"];function Re(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 Se(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(n),!0).forEach(function(e){je(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function je(e,t,n){return(t=function(e){e=function(e,t){if("object"!==be(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"!==be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===be(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(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 Oe(){return"configure"}var t=o({displayName:"AlgoliaConfigure",$$type:"ais.configure",getProvidedProps:function(){return{}},getSearchParameters:function(e,t){t.children,t.contextValue,t.indexContextValue;t=Fe(t,xe);return e.setQueryParameters(t)},transitionState:function(e,t,n){var r=Oe(),i=(e.children,e.contextValue,e.indexContextValue,Fe(e,Pe)),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,je({},r,Se(Se({},l(n[r],o)),i)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(n,e){var r=Oe(),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,je({},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 we(e,t){return e(t={exports:{}},t.exports),t.exports}var f="function"==typeof Symbol&&Symbol.for,Ce=f?Symbol.for("react.element"):60103,Ve=f?Symbol.for("react.portal"):60106,_e=f?Symbol.for("react.fragment"):60107,Ee=f?Symbol.for("react.strict_mode"):60108,Ie=f?Symbol.for("react.profiler"):60114,Ae=f?Symbol.for("react.provider"):60109,Ne=f?Symbol.for("react.context"):60110,Te=f?Symbol.for("react.async_mode"):60111,He=f?Symbol.for("react.concurrent_mode"):60111,De=f?Symbol.for("react.forward_ref"):60112,ke=f?Symbol.for("react.suspense"):60113,Me=f?Symbol.for("react.suspense_list"):60120,Qe=f?Symbol.for("react.memo"):60115,$e=f?Symbol.for("react.lazy"):60116,Be=f?Symbol.for("react.block"):60121,Le=f?Symbol.for("react.fundamental"):60117,qe=f?Symbol.for("react.responder"):60118,Ue=f?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ce:switch(e=e.type){case Te:case He:case _e:case Ie:case Ee:case ke:return e;default:switch(e=e&&e.$$typeof){case Ne:case De:case $e:case Qe:case Ae:return e;default:return t}}case Ve:return t}}}function We(e){return v(e)===He}var ze={AsyncMode:Te,ConcurrentMode:He,ContextConsumer:Ne,ContextProvider:Ae,Element:Ce,ForwardRef:De,Fragment:_e,Lazy:$e,Memo:Qe,Portal:Ve,Profiler:Ie,StrictMode:Ee,Suspense:ke,isAsyncMode:function(e){return We(e)||v(e)===Te},isConcurrentMode:We,isContextConsumer:function(e){return v(e)===Ne},isContextProvider:function(e){return v(e)===Ae},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ce},isForwardRef:function(e){return v(e)===De},isFragment:function(e){return v(e)===_e},isLazy:function(e){return v(e)===$e},isMemo:function(e){return v(e)===Qe},isPortal:function(e){return v(e)===Ve},isProfiler:function(e){return v(e)===Ie},isStrictMode:function(e){return v(e)===Ee},isSuspense:function(e){return v(e)===ke},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===_e||e===He||e===Ie||e===Ee||e===ke||e===Me||"object"==typeof e&&null!==e&&(e.$$typeof===$e||e.$$typeof===Qe||e.$$typeof===Ae||e.$$typeof===Ne||e.$$typeof===De||e.$$typeof===Le||e.$$typeof===qe||e.$$typeof===Ue||e.$$typeof===Be)},typeOf:v},f=we(function(e,t){});f.AsyncMode,f.ConcurrentMode,f.ContextConsumer,f.ContextProvider,f.Element,f.ForwardRef,f.Fragment,f.Lazy,f.Memo,f.Portal,f.Profiler,f.StrictMode,f.Suspense,f.isAsyncMode,f.isConcurrentMode,f.isContextConsumer,f.isContextProvider,f.isElement,f.isForwardRef,f.isFragment,f.isLazy,f.isMemo,f.isPortal,f.isProfiler,f.isStrictMode,f.isSuspense,f.isValidElementType,f.typeOf,we(function(e){e.exports=ze});function Ye(){}function Je(){}Je.resetWarningCache=Ye;f=we(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:Je,resetWarningCache:Ye}).PropTypes=e});function b(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var Ge=b;function x(e){return"function"==typeof e}function P(e){return"object"==typeof e&&null!==e}function Xe(e){return void 0===e}b.prototype._events=void 0,b.prototype._maxListeners=void 0,b.defaultMaxListeners=10,b.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},b.prototype.emit=function(e){var t,n,r,i,a,o,s;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||P(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(Xe(t=this._events[e]))return!1;if(x(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(P(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},b.prototype.on=b.prototype.addListener=function(e,t){if(x(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,x(t.listener)?t.listener:t),this._events[e]?P(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,P(this._events[e])&&!this._events[e].warned&&(t=Xe(this._maxListeners)?b.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")},b.prototype.once=function(e,t){var n;if(x(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))}},b.prototype.removeListener=function(e,t){var n,r,i,a;if(!x(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||x(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(P(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},b.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(x(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},b.prototype.listeners=function(e){e=this._events&&this._events[e]?x(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},b.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(x(e))return 1;if(e)return e.length}return 0},b.listenerCount=function(e,t){return e.listenerCount(t)};var R=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Ze(e,t){this.main=e,this.fn=t,this.lastResults=null}R(Ze,Ge),Ze.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Ze.prototype.getModifiedState=function(e){return this.fn(e)};var Ke=Ze;var S=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},et=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")};function tt(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function nt(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||(tt(r)&&tt(n)?e[i]=nt(r,n):e[i]="object"==typeof(r=n)&&null!==r?nt(Array.isArray(r)?[]:{},r):r));return e}var j=function(e){tt(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];tt(r)&&nt(e,r)}return e};var rt=function(e){return e&&0<Object.keys(e).length};var it=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};function at(n){return Object.keys(n).sort().reduce(function(e,t){return e[t]=n[t],e},{})}function F(){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 O={_getQueries:function(s,c){var u=[];return u.push({indexName:s,params:O._getHitsSearchParams(c)}),c.getRefinedDisjunctiveFacets().forEach(function(e){u.push({indexName:s,params:O._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=O._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(O._getHitsHierarchicalFacetsAttributes(e)).sort(),n=O._getFacetFilters(e),r=O._getNumericFilters(e),i=O._getTagFilters(e),t={facets:-1<t.indexOf("*")?["*"]:t,tagFilters:i};return 0<n.length&&(t.facetFilters=n),0<r.length&&(t.numericFilters=r),at(j({},e.getQueryParams(),t))},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=O._getFacetFilters(e,t,n),i=O._getNumericFilters(e,t),a=O._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?O._getDisjunctiveHierarchicalFacetAttribute(e,a,n):t,0<i.length&&(o.numericFilters=i),0<r.length&&(o.facetFilters=r),at(j({},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).sort().forEach(function(t){(e[t]||[]).sort().forEach(function(e){u.push(t+":"+e)})}),o.facetsExcludes||{}),r=(Object.keys(n).sort().forEach(function(t){(n[t]||[]).sort().forEach(function(e){u.push(t+":-"+e)})}),o.disjunctiveFacetsRefinements||{}),l=(Object.keys(r).sort().forEach(function(t){var n,e=r[t]||[];t!==s&&e&&0!==e.length&&(n=[],e.sort().forEach(function(e){n.push(t+":"+e)}),u.push(n))}),o.hierarchicalFacetsRefinements||{});return Object.keys(l).sort().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),at(j({},O._getHitsSearchParams(r),t))}},w=O,C=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var ot=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})};var st=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.")},V={addRefinement:function(e,t,n){var r;return V.isRefined(e,t,n)?e:(n=""+n,n=e[t]?e[t].concat(n):[n],(r={})[t]=n,F({},r,e))},removeRefinement:function(e,n,t){var r;return void 0===t?V.clearRefinement(e,function(e,t){return n===t}):(r=""+t,V.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 V.isRefined(e,t,n)?V.removeRefinement(e,t,n):V.addRefinement(e,t,n)},clearRefinement:function(i,a,o){var s,e;return void 0===a?rt(i)?{}:i:"string"==typeof a?it(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=Boolean(e[t])&&0<e[t].length;return void 0!==n&&r?-1!==e[t].indexOf(""+n):r}},_=V;function ct(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return ct(n[t],e)}):e===n}function E(e){var r=e?E._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!==E.PARAMETERS.indexOf(e),n=void 0!==r[e];!t&&n&&(i[e]=r[e])})}E.PARAMETERS=Object.keys(new E),E._parseNumbers=function(i){var r,a;return i instanceof E?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),j({},i,r))},E.make=function(e){var n=new E(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},E.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&&rt(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."):rt(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},E.prototype={constructor:E,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:_.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:_.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:_.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:_.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=st(n);return this.isNumericRefined(e,t,n)?this:((r=j({},this.numericRefinements))[e]=j({},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,e){var i=e;return void 0!==i?this.isNumericRefined(n,r,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r&&ct(e.val,st(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?rt(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof o?it(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 _.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:_.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 _.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:_.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 _.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:_.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 _.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:_.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 _.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:_.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 _.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:_.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:_.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:_.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:_.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:F({},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:F({},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:F({},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)&&_.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&_.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&_.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?Boolean(this.numericRefinements[e]):(r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==n&&r?(n=st(n),t=void 0!==(e=this.numericRefinements[e][t],i=n,C(e,function(e){return ct(e,i)})),r&&t):r)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=ot(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()).sort()},getRefinedHierarchicalFacets:function(){var t=this;return ot(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(e){return 0<t.hierarchicalFacetsRefinements[e].length})).sort()},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=E.validate(this,e);if(t)throw t;var n=this,i=E._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?it(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 C(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)}};function ut(e){return Array.isArray(e)?e.filter(Boolean):[]}function lt(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function ft(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var n=t.split(":"),t=C(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 ht=E;var mt=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})):[]},dt=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=C(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=mt(n.map(function(e){var t,n,r,i,a=e[0],e=e[1];return e=e,a=a,t=c,n=yt(f),r=o.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:pt(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=ft(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})}},pt=S,yt=et;var gt=S,vt=et;function bt(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function xt(e,t,n){t&&t[n]&&(e.stats=t[n])}function I(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=bt(l.facets),u=bt(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,C(r,function(e){return-1<(e.attributes||[]).indexOf(t)}));o?(r=o.attributes.indexOf(e),n=lt(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},xt(f.disjunctiveFacets[i],s.facets_stats,e)),r&&(i=c[e],f.facets[i]={name:e,data:a,exhaustive:s.exhaustiveFacetsCount},xt(f.facets[i],s.facets_stats,e)))}),this.hierarchicalFacets=ut(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=lt(l.hierarchicalFacets,function(e){return e.name===o.name}),-1!==(e=lt(f.hierarchicalFacets[n],function(e){return e.attribute===t}))&&(f.hierarchicalFacets[n][e].data=j({},f.hierarchicalFacets[n][e].data,r))):(n=u[t],e=s.facets&&s.facets[t]||{},f.disjunctiveFacets[n]={name:t,data:F({},r,e),exhaustive:i.exhaustiveFacetsCount},xt(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(vt(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=lt(l.hierarchicalFacets,function(e){return e.name===s.name}),a=lt(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=F(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:h[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(dt(l)),this.facets=ut(this.facets),this.disjunctiveFacets=ut(this.disjunctiveFacets),this._state=l}function Pt(n,r){function e(e){return e.name===r}var i,a,t,o,s,c;return n._state.isConjunctiveFacet(r)?(i=C(n.facets,e))?Object.keys(i.data).map(function(e){var t=gt(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=C(n.disjunctiveFacets,e))?Object.keys(a.data).map(function(e){var t=gt(e);return{name:e,escapedValue:t,count:a.data[e],isRefined:n._state.isDisjunctiveFacetRefined(r,t)}}):[]:n._state.isHierarchicalFacet(r)?((t=C(n.hierarchicalFacets,e))&&(c=n._state.getHierarchicalFacetByName(r),o=n._state._getHierarchicalFacetSeparator(c),(c=(s=0===(s=vt(n._state.getHierarchicalRefinement(r)[0]||"")).indexOf(c.rootPath)?s.replace(c.rootPath+o,""):s).split(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,c,0)),t):void 0}function Rt(e,t){e=C(e,function(e){return e.name===t});return e&&e.stats}function St(e,t,n,r,i){var i=C(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}}I.prototype.getFacetByName=function(t){function e(e){return e.name===t}return C(this.facets,e)||C(this.disjunctiveFacets,e)||C(this.hierarchicalFacets,e)},I.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],I.prototype.getFacetValues=function(e,t){var o,s,n=Pt(this,e);if(n)return o=F({},t,{sortBy:I.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]),F({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(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(mt(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=ft(o.sortBy,I.DEFAULT_SORT),mt(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)},I.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?Rt(this.facets,e):this._state.isDisjunctiveFacet(e)?Rt(this.disjunctiveFacets,e):void 0},I.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(St(0,"facet",t,e,s.facets))})}),Object.keys(o.facetsExcludes).forEach(function(t){o.facetsExcludes[t].forEach(function(e){c.push(St(0,"exclude",t,e,s.facets))})}),Object.keys(o.disjunctiveFacetsRefinements).forEach(function(t){o.disjunctiveFacetsRefinements[t].forEach(function(e){c.push(St(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=C(r,function(e){return e.name===n}),t=i.reduce(function(e,t){var n=e&&C(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 jt=I,et="3.14.0",Ft=S;function A(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.14.0)"),this.setClient(e);e=n||{};e.index=t,this.state=ht.make(e),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function Ot(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function wt(){return this.state.page}R(A,Ge),A.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},A.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},A.prototype.getQuery=function(){var e=this.state;return w._getHitsSearchParams(e)},A.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,e=w._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 jt(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 jt(n,e.results),n)}).catch(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(e,null,n)})},A.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=j({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:it(w._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)},A.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=w.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=Ft(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")},A.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},A.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},A.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},A.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},A.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},A.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},A.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},A.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},A.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},A.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},A.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},A.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},A.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},A.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},A.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},A.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},A.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},A.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},A.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},A.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},A.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},A.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},A.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},A.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},A.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},A.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},A.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},A.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},A.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},A.prototype.setCurrentPage=Ot,A.prototype.setPage=Ot,A.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},A.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},A.prototype.setState=function(e){return this._change({state:ht.make(e),isPageReset:!1}),this},A.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new ht(e),this},A.prototype.hasRefinements=function(e){return!!rt(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))},A.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},A.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},A.prototype.hasTag=function(e){return this.state.isTagRefined(e)},A.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},A.prototype.getIndex=function(){return this.state.index},A.prototype.getCurrentPage=wt,A.prototype.getPage=wt,A.prototype.getTags=function(){return this.state.tagRefinements},A.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},A.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},A.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},A.prototype._search=function(e){var r=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=w._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=t.index?w._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++;if(this._currentNbQueries++,!t.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,i,e));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})}},A.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);t.index?(e.lastResults=new jt(t,n),e.emit("result",{results:e.lastResults,state:t})):e.emit("result",{results:null,state:t})}))},A.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"))},A.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},A.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},A.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}))},A.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},A.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.14.0)"),this.client=e),this},A.prototype.getClient=function(){return this.client},A.prototype.derive=function(e){e=new Ke(this,e);return this.derivedHelpers.push(e),e},A.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},A.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var Ct=A;function Vt(e,t,n){return new Ct(e,t,n)}Vt.version=et,Vt.AlgoliaSearchHelper=Ct,Vt.SearchParameters=ht,Vt.SearchResults=jt;var _t=Vt;function Et(e){return(Et="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 It(e){return function(e){if(Array.isArray(e))return At(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?At(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)?At(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 At(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 Nt(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 Tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(n),!0).forEach(function(e){Ht(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ht(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Et(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"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Et(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e){var t=e.attributeName,n=e.attributeValue,e=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(e||1,">")}function kt(){return"configure"}function Mt(a){var e=Object.keys(a.matchingPatterns).reduce(function(e,t){var n=a.matchingPatterns[t],r=ee(a.hit,t),i=n.score;return Array.isArray(r)?[].concat(It(e),[r.map(function(e){return Dt({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(It(e),[Dt({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]);return a.transformSearchParameters(new _t.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.hit.objectID)],optionalFilters:e}))}S=o({displayName:"AlgoliaConfigureRelatedItems",$$type:"ais.configureRelatedItems",defaultProps:{transformSearchParameters:function(e){return Tt({},e)}},getProvidedProps:function(){return{}},getSearchParameters:function(e,t){return e.setQueryParameters(Mt(t))},transitionState:function(e,t,n){var r,i=kt(),a=(r=J(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,Ht({},i,Tt(Tt({},l(n[i],s)),a)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){var n=this,r=kt(),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,Ht({},r,i),{ais:e.contextValue,multiIndexContext:e.indexContextValue})}}),R=o({displayName:"AlgoliaDynamicWidgets",$$type:"ais.dynamicWidgets",defaultProps:{transformItems:function(e){return e},maxValuesPerFacet:20},propTypes:{transformItems:f.func,facets:f.arrayOf(f.string),maxValuesPerFacet:f.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 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 $t(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 Bt(e){return function(e){if(Array.isArray(e))return Lt(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?Lt(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)?Lt(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 Lt(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 qt(){return"query"}function Ut(e,t,n){qt();e=u(e,t,n,"query","");return e||""}Ge=o({displayName:"AlgoliaAutoComplete",$$type:"ais.autoComplete",getProvidedProps:function(e,t,n){return{hits:(r=n).results?r.results.hits&&Array.isArray(r.results.hits)?G(X(r.results.hits,r.results.queryID),r.results.hitsPerPage,r.results.page):Object.keys(r.results).reduce(function(e,t){return[].concat(Bt(e),[{index:t,hits:G(X(r.results[t].hits,r.results[t].queryID),r.results[t].hitsPerPage,r.results[t].page)}])},[]):[],currentRefinement:Ut(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})};var r},refine:function(e,t,n){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},qt(),g(t,$t({},"query",n),e,!0)},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,qt())},getSearchParameters:function(e,t,n){return e.setQuery(Ut(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))}});function Wt(e){return(Wt="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 zt(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Wt(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"!==Wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Wt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(e){return e.attributes[0]}et=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:f.func},getProvidedProps:function(e,t,n){var r=Yt(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,zt({},Yt(e),n||""),r,!0,"hierarchicalMenu");var r}});function Jt(e){return(Jt="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 Gt(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 Xt(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Gt(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==Jt(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"!==Jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Jt(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)):Gt(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var Zt=o({displayName:"AlgoliaCurrentRefinements",$$type:"ais.currentRefinements",propTypes:{transformItems:f.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 Xt(Xt({},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 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)}var en=["defaultRefinement"];function tn(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 nn(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 rn(){return"boundingBox"}function an(e){return[e.northEast.lat,e.northEast.lng,e.southWest.lat,e.southWest.lng].join()}function on(e){return e=e.match(un),{lat:parseFloat(e[1]),lng:parseFloat(e[2])}}function sn(e,t,n){if(K(e=u(e,t,n,rn(),{})))return{northEast:{lat:parseFloat(e.northEast.lat),lng:parseFloat(e.northEast.lng)},southWest:{lat:parseFloat(e.southWest.lat),lng:parseFloat(e.southWest.lng)}}}function cn(e,t,n){return g(e,tn({},rn(),t),n,!0)}var un=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/,ln=o({displayName:"AlgoliaGeoSearch",$$type:"ais.geoSearch",getProvidedProps:function(e,t,n){var r={ais:e.contextValue,multiIndexContext:e.indexContextValue},n=p(n,r),i=sn(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=nn(e,en),(o=u(e,t,r,"aroundLatLng"))||(o=u(e,t,r,"configure.aroundLatLng"))&&on(o)),t=n&&n._state.aroundLatLng&&on(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 cn(t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,n){n=sn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return n?e.setQueryParameter("insideBoundingBox",an(n)):e},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},rn())},getMetadata:function(e,t){var n=[],r=rn(),i={ais:e.contextValue,multiIndexContext:e.indexContextValue},a=d(i),o={},e=sn(e,t,i);return e&&n.push({label:"".concat(r,": ").concat(an(e)),value:function(e){return cn(e,o,i)},currentRefinement:e}),{id:r,index:a,items:n}},shouldComponentUpdate:function(){return!0}});function fn(e){return(fn="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 hn(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 mn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hn(Object(n),!0).forEach(function(e){dn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function dn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==fn(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"!==fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===fn(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 pn="hierarchicalMenu";function yn(e,t,n){t=u(e,t,n,"".concat(pn,".").concat(N(e)),null);return""===t?null:t}function gn(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=yn(c,u,l))?t:new _t.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&&gn(e.data,c,u,l)};var t,n,r,i,a,o,s})}function vn(){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)?mn(mn({},e),{},{items:vn(e.items,t)}):e})}function bn(e,t,n,r){return g(t,dn({},N(e),n||""),r,!0,pn)}function xn(e){var t=e.attribute,n=e.hit,r=e.highlightProperty,i=void 0===(i=e.preTag)?me:i,e=e.postTag,a=void 0===(r=(t={attribute:t,highlightProperty:r,hit:n,preTag:i,postTag:void 0===e?de:e}).preTag)?"<em>":r,o=void 0===(r=t.postTag)?"</em>":r,r=t.highlightProperty,n=t.attribute;if(t=t.hit)return t=ee(t[r],n)||{},Array.isArray(t)?t.map(function(e){return pe({preTag:a,postTag:o,highlightedValue:e.value})}):pe({preTag:a,postTag:o,highlightedValue:t.value});throw new Error("`hit`, the matching record, must be provided")}var Pn=["name:asc"],Rn=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:f.string,rootPath:f.string,showParentLevel:f.bool,defaultRefinement:f.string,showMore:f.bool,limit:f.number,showMoreLimit:f.number,transformItems:f.func,facetOrdering:f.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:Pn,facetOrdering:o})).data?gn(a.data,e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}):[],n=e.transformItems?e.transformItems(i):i,{items:vn(n,r),currentRefinement:yn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:0<n.length}):{items:[],currentRefinement:yn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:!1}},refine:function(e,t,n){return bn(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(pn,".").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)}),yn(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=yn(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),n=e?[{label:"".concat(n,": ").concat(te(e)),attribute:n,value:function(e){return bn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]:[];return{id:r,index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:n}}}),Sn=o({displayName:"AlgoliaHighlighter",$$type:"ais.highlighter",propTypes:{},getProvidedProps:function(){return{highlight:xn}}}),jn=o({displayName:"AlgoliaHits",$$type:"ais.hits",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{hits:X(G(n.hits,n.hitsPerPage,n.page),n.queryID)}:{hits:[]}},getSearchParameters:function(e){return e}});function Fn(e){return(Fn="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 On(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 wn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?On(Object(n),!0).forEach(function(e){Cn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Cn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Fn(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"!==Fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Fn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vn(){return"hitsPerPage"}function _n(e,t,n){e=u(e,t,n,"hitsPerPage",null);return"string"==typeof e?parseInt(e,10):e}var En=o({displayName:"AlgoliaHitsPerPage",$$type:"ais.hitsPerPage",propTypes:{defaultRefinement:f.number.isRequired,items:f.arrayOf(f.shape({label:f.string,value:f.number.isRequired})).isRequired,transformItems:f.func},getProvidedProps:function(e,t){var n=_n(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?wn(wn({},e),{},{isRefined:!0}):wn(wn({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,Cn({},"hitsPerPage",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},Vn())},getSearchParameters:function(e,t,n){return e.setHitsPerPage(_n(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(){return{id:Vn()}}});function In(e){return(In="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 An=["page"];function Nn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==In(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"!==In(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===In(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){return function(e){if(Array.isArray(e))return Hn(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?Hn(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)?Hn(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 Hn(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 Dn(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 kn(e){e=e||{};e.page;return Dn(e,An)}var Mn=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,kn(e))?o:null},write:function(e){var t=e.state,e=e.hits;s=kn(t),o=e}}),e=this._cache.read({state:a})||{},c=X(G(c,f,r),n.queryID),e[r]=c,this._cache.write({state:a,hits:e}),u=Math.min.apply(Math,Tn(Object.keys(e).map(Number))),l=Math.max.apply(Math,Tn(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,Nn({},"page",r+1),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!1)}});function Qn(e){return(Qn="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 $n(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Qn(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"!==Qn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Qn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bn="menu";function Ln(e){return e.attribute}function qn(e,t,n){t=u(e,t,n,"".concat(Bn,".").concat(Ln(e)),null);return""===t?null:t}function Un(e,t,n,r){return e===qn(t,n,r)?"":e}function Wn(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function zn(e,t,n,r){return g(t,$n({},Ln(e),n||""),r,!0,Bn)}var Yn=["count:desc","name:asc"],Jn=o({displayName:"AlgoliaMenu",$$type:"ais.menu",propTypes:{attribute:f.string.isRequired,showMore:f.bool,limit:f.number,showMoreLimit:f.number,defaultRefinement:f.string,transformItems:f.func,searchable:f.bool,facetOrdering:f.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:Un(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:Yn,facetOrdering:c}).map(function(e){return{label:e.name,value:Un(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,Wn(t)),currentRefinement:qn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:0<i.length}):{items:[],currentRefinement:qn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:o,canRefine:u}},refine:function(e,t,n){return zn(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:Wn(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Bn,".").concat(Ln(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=(e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,Wn(t))})).addDisjunctiveFacet(r),qn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}));return e=null!==n?e.addDisjunctiveFacetRefinement(r,n):e},getMetadata:function(t,e){var n=Ln(t),e=qn(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(te(e)),attribute:t.attribute,value:function(e){return zn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function Gn(e){return(Gn="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 Xn(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Gn(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"!==Gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Gn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zn(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?Kn(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)?Kn(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 Kn(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 er(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 tr="multiRange";function nr(e){return e.attribute}function rr(e,t,n){return u(e,t,n,"".concat(tr,".").concat(nr(e)),"")}function ir(e,t,n,r){return g(t,Xn({},nr(e),n),r,!0,tr)}var ar=o({displayName:"AlgoliaNumericMenu",$$type:"ais.numericMenu",propTypes:{id:f.string,attribute:f.string.isRequired,items:f.arrayOf(f.shape({label:f.node,start:f.number,end:f.number})).isRequired,transformItems:f.func},getProvidedProps:function(o,e,t){var n=o.attribute,s=rr(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=er(e);return{label:e.label,value:a,isRefined:a===s,noRefinement:!(!c||(e=nr(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=Z(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 ir(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(tr,".").concat(nr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,t=0===(n=rr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})).length?{start:null,end:null}:(t=(n=Zn(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=nr(t),i=rr(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),e=[],a=d({ais:t.contextValue,multiIndexContext:t.indexContextValue});return""!==i&&(n=Z(t.items,function(e){return er(e)===i}).label,e.push({label:"".concat(t.attribute,": ").concat(n),attribute:t.attribute,currentRefinement:n,value:function(e){return ir(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})}})),{id:r,index:a,items:e}}});function or(e){return(or="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 sr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==or(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"!==or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===or(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cr(){return"page"}function ur(e,t,n){e=u(e,t,n,"page",1);return"string"==typeof e?parseInt(e,10):e}var lr=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:ur(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,sr({},"page",n),e,!1)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},cr())},getSearchParameters:function(e,t,n){return e.setPage(ur(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})-1)},getMetadata:function(){return{id:cr()}}}),fr=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 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 mr(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 dr(e){return e.attribute}var pr="range";function yr(e,t,n,r){var t=u(e,t,r,"".concat(pr,".").concat(dr(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 gr(e,t){return{min:(void 0!==e.min?e:t).min,max:(void 0!==e.max?e:t).max}}function vr(e,t,n,r){e=e||n!==r?e&&t?n:r:void 0;return e}function br(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,mr({},dr(e),{min:vr(void 0!==e.min,s,o,a),max:vr(void 0!==e.max,c,r,n)}),i,!0,pr)}var xr=o({displayName:"AlgoliaRange",$$type:"ais.range",propTypes:{id:f.string,attribute:f.string.isRequired,defaultRefinement:f.shape({min:f.number,max:f.number}),min:f.number,max:f.number,precision:f.number,header:f.node,footer:f.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},yr(e,t,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue}));return{min:r,max:o,canRefine:0<s.length,currentRefinement:gr(a,this._currentRange),count:s,precision:i}},refine:function(e,t,n){return br(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(pr,".").concat(dr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=yr(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=yr(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 br(t,e,{},n._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:gr({min:a,max:e},{min:i,max:r})})),{id:dr(t),index:d({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:o}}});function Pr(e){return(Pr="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 Rr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Pr(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"!==Pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Pr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sr="refinementList";function jr(e){return e.attribute}function T(e,t,n){t=u(e,t,n,"".concat(Sr,".").concat(jr(e)),[]);return"string"!=typeof t?t:t?[t]:[]}function Fr(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 Or(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function wr(e,t,n,r){return g(t,Rr({},jr(e),0<n.length?n:""),r,!0,Sr)}var Cr=["isRefined","count:desc","name:asc"],Vr=o({displayName:"AlgoliaRefinementList",$$type:"ais.refinementList",propTypes:{id:f.string,attribute:f.string.isRequired,operator:f.oneOf(["and","or"]),showMore:f.bool,limit:f.number,showMoreLimit:f.number,defaultRefinement:f.arrayOf(f.oneOfType([f.string,f.number])),searchable:f.bool,transformItems:f.func,facetOrdering:f.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:Fr(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:Cr,facetOrdering:c}).map(function(e){return{label:e.name,value:Fr(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,Or(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 wr(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:Or(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Sr,".").concat(jr(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,Or(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=jr(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 wr(n,e,[],i)},items:T(n,r,i).map(function(t){return{label:te("".concat(t)),value:function(e){e=T(n,e,i).filter(function(e){return e!==t});return wr(n,r,e,i)}}})}]:[]}}}),_r=o({displayName:"AlgoliaScrollTo",$$type:"ais.scrollTo",propTypes:{scrollOn:f.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=z(this._prevSearchState,e);return this._prevSearchState=e,{value:r,hasNotChanged:t}}});function Er(e){return(Er="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 Ir(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Er(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"!==Er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Er(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ar(){return"query"}function Nr(e,t,n){e=u(e,t,n,"query","");return e||""}function Tr(e,t,n,r){return g(t,Ir({},"query",n),r,!0)}var Hr=o({displayName:"AlgoliaSearchBox",$$type:"ais.searchBox",propTypes:{defaultRefinement:f.string},getProvidedProps:function(e,t,n){return{currentRefinement:Nr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),isSearchStalled:n.isSearchStalled}},refine:function(e,t,n){return Tr(0,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,Ar())},getSearchParameters:function(e,t,n){return e.setQuery(Nr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(t,e){e=Nr(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 Tr(0,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function Dr(e){return(Dr="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 kr(e,t,n){return(t=function(e){e=function(e,t){if("object"!==Dr(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"!==Dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Dr(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(){return"relevancyStrictness"}var Qr=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,kr({},Mr(),n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)}});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 Br(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 Lr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Br(Object(n),!0).forEach(function(e){qr(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Br(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function qr(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 Ur(){return"sortBy"}function Wr(e,t,n){e=u(e,t,n,"sortBy",null);return e||null}var zr=o({displayName:"AlgoliaSortBy",$$type:"ais.sortBy",propTypes:{defaultRefinement:f.string,items:f.arrayOf(f.shape({label:f.string,value:f.string.isRequired})).isRequired,transformItems:f.func},getProvidedProps:function(e,t){var n=Wr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?Lr(Lr({},e),{},{isRefined:!0}):Lr(Lr({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,qr({},"sortBy",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},Ur())},getSearchParameters:function(e,t,n){n=Wr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return e.setIndex(n)},getMetadata:function(){return{id:Ur()}}}),Yr=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}}}),Jr=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 Gr(e){return(Gr="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"!==Gr(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"!==Gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Gr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zr(e){return e.attribute}var Kr="toggle",ei=["0","false","null","undefined"];function ti(e,t,n){t=u(e,t,n,"".concat(Kr,".").concat(Zr(e)),!1);return-1===ei.indexOf(t)&&Boolean(t)}function ni(e,t,n,r){return g(t,Xr({},Zr(e),n||!1),r,!0,Kr)}f=o({displayName:"AlgoliaToggle",$$type:"ais.toggle",propTypes:{label:f.string.isRequired,attribute:f.string.isRequired,value:f.any.isRequired,filter:f.func,defaultRefinement:f.bool},getProvidedProps:function(e,t,n){var r=e.attribute,i=e.value,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=ti(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),e=n&&n.getFacetByName(r)?n.getFacetValues(r):null,n=e&&e.length?Z(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 ni(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(Kr,".").concat(Zr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,i=t.value,a=t.filter,n=ti(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=Zr(t),e=ti(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 ni(t,e,!1,{ais:t.contextValue,multiIndexContext:t.indexContextValue})}}),{id:n,index:i,items:r}}});function ri(e){return(ri="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 ii(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 ai(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ii(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=function(e){e=function(e,t){if("object"!==ri(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"!==ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ri(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)):ii(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function oi(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,ai(ai({},n),t))}}var si=R;e.EXPERIMENTAL_connectConfigureRelatedItems=S,e.EXPERIMENTAL_connectDynamicWidgets=si,e.connectAutoComplete=Ge,e.connectBreadcrumb=et,e.connectConfigure=t,e.connectCurrentRefinements=Zt,e.connectDynamicWidgets=R,e.connectGeoSearch=ln,e.connectHierarchicalMenu=Rn,e.connectHighlight=Sn,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:oi(r,n,e.hit)}}})},e.connectHits=jn,e.connectHitsPerPage=En,e.connectInfiniteHits=Mn,e.connectMenu=Jn,e.connectNumericMenu=ar,e.connectPagination=lr,e.connectPoweredBy=fr,e.connectRange=xr,e.connectRefinementList=Vr,e.connectRelevantSort=Qr,e.connectScrollTo=_r,e.connectSearchBox=Hr,e.connectSortBy=zr,e.connectStateResults=Yr,e.connectStats=Jr,e.connectToggleRefinement=f,Object.defineProperty(e,"__esModule",{value:!0})});
3
- //# sourceMappingURL=Connectors.min.js.map