4 lines
278 KiB
JavaScript
4 lines
278 KiB
JavaScript
/*! InstantSearch.js 4.55.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
|
||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).instantsearch=t()}(this,function(){"use strict";function o(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 C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){T(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function y(e){return(y="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 A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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,V(r.key),r)}}function W(e,t,n){t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function T(e,t,n){return(t=V(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){return(m=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 D(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$(e,t)}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){if(null==e)return{};var n,r=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}(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 b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(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=B(n),t=(e=r?(e=B(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}}function k(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,s,o=[],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)&&(o.push(r.value),o.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||q(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 w(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(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 q(e,t){var n;if(e)return"string"==typeof e?Q(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)?Q(e,t):void 0}function Q(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 V(e){e=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==typeof e?e:String(e)}function v(){}function K(e,t){return e}function h(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat(Object.prototype.toString.call(e).slice(8,-1),").\n\n").concat(t))}function z(e){var t=e.helper,e=e.attributesToClear,e=void 0===e?[]:e,n=t.state.setPage(0),n=e.reduce(function(e,t){return n.isNumericRefined(t)?e.removeNumericRefinement(t):n.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):n.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):n.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e},n);return n=-1!==e.indexOf("query")?n.setQuery(""):n}var J={"&":"&","<":"<",">":">",'"':""","'":"'"},Z=/[&<>"']/g,Y=RegExp(Z.source);var X={"&":"&","<":"<",">":">",""":'"',"'":"'"},G=/&(amp|quot|lt|gt|#39);/g,ee=RegExp(G.source);function te(e){return e&&ee.test(e)?e.replace(G,function(e){return X[e]}):e}function ne(e){if("object"===y(t=e)&&null!==t&&"[object Object]"===(null===(t=e)?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t))){var t;if(null===Object.getPrototypeOf(e))return 1;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}}var re={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},u={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function ie(e){return((e=e)&&Y.test(e)?e.replace(Z,function(e){return J[e]}):e).replace(new RegExp(re.highlightPreTag,"g"),u.highlightPreTag).replace(new RegExp(re.highlightPostTag,"g"),u.highlightPostTag)}function ae(n){return ne(n)&&"string"!=typeof n.value?Object.keys(n).reduce(function(e,t){return C(C({},e),{},T({},t,ae(n[t])))},{}):Array.isArray(n)?n.map(ae):C(C({},n),{},{value:ie(n.value)})}function se(e){return void 0===e.__escaped&&((e=e.map(function(e){e=m({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return e._highlightResult&&(e._highlightResult=ae(e._highlightResult)),e._snippetResult&&(e._snippetResult=ae(e._snippetResult)),e})).__escaped=!0),e}function oe(e){var t=u.highlightPreTag,n=u.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+n:e.value}).join("")}function ce(e){var d=e.instantSearchInstance,h=e.helper,f=e.attribute,m=e.widgetType;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i,a,s=t[1],o=t[2],o=void 0===o?"Filter Applied":o,c=k(t[0].split(":"),2),u=c[0],c=c[1],l="string"==typeof f?f:f(s);1===t.length&&"object"===y(t[0])?d.sendEventToInsights(t[0]):"click"!==u||2!==t.length&&3!==t.length||(i=l,a=s,(r=h).state.isHierarchicalFacet(i)?r.state.isHierarchicalFacetRefined(i,a):r.state.isConjunctiveFacet(i)?r.state.isFacetRefined(i,a):r.state.isDisjunctiveFacetRefined(i,a))||d.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:m,eventType:u,eventModifier:c,payload:{eventName:o,index:h.getIndex(),filters:["".concat(l,":").concat(s)]},attribute:l})}}function ue(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function le(e){return JSON.parse(decodeURIComponent(atob(e)))}function de(e){var n,r,i,a,t,s,o,c=e.index,u=e.widgetType,l=(e.methodName,e.args),e=e.instantSearchInstance;return 1===l.length&&"object"===y(l[0])?[l[0]]:(t=k(l[0].split(":"),2),n=t[0],r=t[1],t=l[1],i=l[2],!t||!("click"!==n&&"conversion"!==n||i)||0===(l=Array.isArray(t)?t:[t]).length?[]:(a=l[0].__queryID,t=function(e,t){for(var n=1<arguments.length&&void 0!==t?t:20,r=[],i=0;i<Math.ceil(e.length/n);i++)r.push(e.slice(i*n,(i+1)*n));return r}(l),s=t.map(function(e){return e.map(function(e){return e.objectID})}),o=t.map(function(e){return e.map(function(e){return e.__position})}),"view"===n?"idle"!==e.status?[]:t.map(function(e,t){return{insightsMethod:"viewedObjectIDs",widgetType:u,eventType:n,payload:{eventName:i||"Hits Viewed",index:c,objectIDs:s[t]},hits:e,eventModifier:r}}):"click"===n?t.map(function(e,t){return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:u,eventType:n,payload:{eventName:i||"Hit Clicked",index:c,queryID:a,objectIDs:s[t],positions:o[t]},hits:e,eventModifier:r}}):"conversion"===n?t.map(function(e,t){return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:u,eventType:n,payload:{eventName:i||"Hit Converted",index:c,queryID:a,objectIDs:s[t]},hits:e,eventModifier:r}}):[]))}function he(e){var r=e.instantSearchInstance,i=e.index,a=e.widgetType,s={},o=void 0;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];de({widgetType:a,index:i,methodName:"sendEvent",args:t,instantSearchInstance:r}).forEach(function(e){"click"===e.eventType&&"internal"===e.eventModifier&&s[e.eventType]||(s[e.eventType]=!0,r.sendEventToInsights(e))}),clearTimeout(o),o=setTimeout(function(){s={}},0)}}function fe(e){var i=e.index,a=e.widgetType,s=e.instantSearchInstance;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=de({widgetType:a,index:i,methodName:"bindEvent",args:t,instantSearchInstance:s});return r.length?"data-insights-event=".concat(ue(r)):""}}function me(e){return"ais.index"===e.$$type}function pe(t,e){var n=t[e.getIndexId()]||{};e.getHelper().setState(e.getWidgetSearchParameters(e.getHelper().state,{uiState:n})),e.getWidgets().filter(me).forEach(function(e){return pe(t,e)})}function ge(r,i){var a=null;return function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return new Promise(function(e,t){a&&clearTimeout(a),a=setTimeout(function(){a=null,Promise.resolve(r.apply(void 0,n)).then(e).catch(t)},i)})}}var ve=Promise.resolve();function ye(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null===i&&(i=ve.then(function(){i=null,a?a=!1:r.apply(void 0,t)}))}var i=null,a=!1;return e.wait=function(){if(null===i)throw new Error("The deferred function should be called before calling `wait()`");return i},e.cancel=function(){null!==i&&(a=!0)},e}function l(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(function(e){return t=(e=e).name,e=e.connector,["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",void 0!==e&&e?"#connector":""].join("");var t}).join(", ");return function(e){return[e,"See documentation: ".concat(r)].filter(Boolean).join("\n\n")}}function be(e){return"number"==typeof e&&e<0||"string"==typeof e?String(e).replace(/^-/,"\\-"):e}function Re(e,t){for(var n,r=0;r<e.length;r++)if(t(n=e[r],r,e))return n}var Se=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/;function _e(e){if(Array.isArray(e)){var t=e,n=k(t,1)[0],r=(n=k(void 0===n?[void 0,void 0,void 0,void 0]:n,4))[0],i=n[1],a=n[2],n=n[3];if(r&&i&&a&&n)return{northEast:{lat:r,lng:i},southWest:{lat:a,lng:n}};throw new Error('Invalid value for "insideBoundingBox" parameter: ['.concat(t,"]"))}r=e,a=(i=k(r.split(",").map(parseFloat),4))[0],n=i[1],t=i[2],i=i[3];if(a&&n&&t&&i)return{northEast:{lat:a,lng:n},southWest:{lat:t,lng:i}};throw new Error('Invalid value for "insideBoundingBox" parameter: "'.concat(r,'"'))}function P(e){var t,n="string"==typeof e,r=n?document.querySelector(e):e;if((t=r)instanceof HTMLElement||Boolean(t)&&0<t.nodeType)return r;throw t="Container must be `string` or `HTMLElement`.",n&&(t+=" Unable to find ".concat(e)),new Error(t)}function we(e){var t=u.highlightPostTag,n=u.highlightPreTag,e=e.split(n),n=e.shift(),r=n?[{value:n,isHighlighted:!1}]:[];return e.forEach(function(e){e=e.split(t);r.push({value:e[0],isHighlighted:!0}),""!==e[1]&&r.push({value:e[1],isHighlighted:!1})}),r}var Pe=new RegExp(/\w/i);function Ne(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}function xe(e,t,n,r,i){var a,i=4<arguments.length&&void 0!==i?i:[],s={type:t,attribute:n,name:r,escapedValue:be(r)},o=Re(i,function(e){return e.name===n});if("hierarchical"===t){for(var i=e.getHierarchicalFacetByName(n),c=r.split(i.separator),u=0;void 0!==o&&u<c.length;++u)!function(t){var n;o=o&&o.data&&Re(Object.keys(o.data).map((n=o.data,function(e){return n[e]})),function(e){return e.name===c[t]})}(u);a=o&&o.count}else a=o&&o.data&&o.data[s.name];return void 0!==a&&(s.count=a),o&&void 0!==o.exhaustive&&(s.exhaustive=o.exhaustive),s}function Ie(n,r,e){var e=2<arguments.length&&void 0!==e&&e,i=[],t=r.facetsRefinements,a=void 0===t?{}:t,t=r.facetsExcludes,s=void 0===t?{}:t,t=r.disjunctiveFacetsRefinements,o=void 0===t?{}:t,t=r.hierarchicalFacetsRefinements,c=void 0===t?{}:t,t=r.numericRefinements,u=void 0===t?{}:t,t=r.tagRefinements,t=void 0===t?[]:t;return Object.keys(a).forEach(function(t){a[t].forEach(function(e){i.push(xe(r,"facet",t,e,n.facets))})}),Object.keys(s).forEach(function(t){s[t].forEach(function(e){i.push({type:"exclude",attribute:t,name:e,exclude:!0})})}),Object.keys(o).forEach(function(t){o[t].forEach(function(e){i.push(xe(r,"disjunctive",t,"string"==typeof(e=e)?e.replace(/^\\-/,"-"):e,n.disjunctiveFacets))})}),Object.keys(c).forEach(function(t){c[t].forEach(function(e){i.push(xe(r,"hierarchical",t,e,n.hierarchicalFacets))})}),Object.keys(u).forEach(function(n){var r=u[n];Object.keys(r).forEach(function(e){var t=e,e=r[t];(Array.isArray(e)?e:[e]).forEach(function(e){i.push({type:"numeric",attribute:n,name:"".concat(e),numericValue:e,operator:t})})})}),t.forEach(function(e){i.push({type:"tag",attribute:"_tags",name:e})}),e&&r.query&&r.query.trim()&&i.push({attribute:"query",type:"query",name:r.query,query:r.query}),i}function Fe(e,t){var n=null==(n=e.getWidgetRenderState)?void 0:n.call(e,t),t=null;if(n&&n.widgetParams&&((n=n.widgetParams).attribute?t=n.attribute:Array.isArray(n.attributes)&&(t=n.attributes[0])),"string"!=typeof t)throw new Error("Could not find the attribute of the widget:\n\n".concat(JSON.stringify(e),"\n\nPlease check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly."));return t}function Te(e,n,r){return e.map(function(e,t){return C(C({},e),{},{__position:r*n+t+1})})}function Ce(e,t){return t?e.map(function(e){return C(C({},e),{},{__queryID:t})}):e}function Ee(e){return e!==Object(e)}function ke(e,t){if(e===t)return 1;if(Ee(e)||Ee(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length===Object.keys(t).length){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!(i in t))return;if(!ke(e[i],t[i]))return}return 1}}function R(e){return"number"==typeof e&&isFinite(e)}function je(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Le(e){return e.filter(function(e,t,n){return n.indexOf(e)===t})}var Me=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"],Oe=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;t=E(t,Me);return e.setQueryParameters(t)},He=function(e,t){return t.facets.reduce(function(e,t){return e.addFacet(t)},e)},Ae=function(e,t){return t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},e)},We=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var n=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e,function(e){return e.name===t.name});return-1===n?e.concat(t):((e=e.slice()).splice(n,1,t),e)},e.hierarchicalFacets)})},De=function(e,t){return t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},e)},Be=function(e,t){return e.setQueryParameters({facetsRefinements:C(C({},e.facetsRefinements),t.facetsRefinements)})},$e=function(e,t){return e.setQueryParameters({facetsExcludes:C(C({},e.facetsExcludes),t.facetsExcludes)})},Ue=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:C(C({},e.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)})},qe=function(e,t){return e.setQueryParameters({numericRefinements:C(C({},e.numericRefinements),t.numericRefinements)})},Qe=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:C(C({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)})},Ve=function(e,t){t=Le([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return 0<t.length?e.setQueryParameters({ruleContexts:t}):e},Ke=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){e=Qe(e,t),e=We(e,t),e=De(e,t),e=qe(e,t),e=Ue(e,t),e=$e(e,t),e=Be(e,t),e=Ae(e,t),e=Ve(e,t),e=He(e,t);return Oe(e,t)})};function ze(n,r){return null==n?n:Object.keys(n).reduce(function(e,t){return 0<=r.indexOf(t)||(e[t]=n[t]),e},{})}function Je(e){var t=e.start,n=void 0===t?0:t,t=e.end,e=e.step,e=void 0===e?1:e,r=0===e?1:e,e=Math.round((t-n)/r);return w(Array(e)).map(function(e,t){return n+t*r})}function Ze(e,t,n){var r=t.getHelper();return{uiState:n,helper:r,parent:t,instantSearchInstance:e,state:r.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Ye(e,t){var n=t.getResults();return{helper:t.getHelper(),parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n._state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Xe(i){return i.some(function(e){return e.isHighlighted})?i.map(function(e,t){return C(C({},e),{},{isHighlighted:(n=(e=i)[t=t],r=(null==(r=i[t+1])?void 0:r.isHighlighted)||!0,t=(null==(e=i[t-1])?void 0:e.isHighlighted)||!0,!(Pe.test(te(n.value))||t!==r?n.isHighlighted:t))});var n,r}):i.map(function(e){return C(C({},e),{},{isHighlighted:!1})})}function Ge(e,t){t=(1<arguments.length&&void 0!==t?t:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window:window})}function et(e){return Array.isArray(e)?e:[e]}function tt(y){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(y,it()),function(e){var r,n,i,a,s,o,c,u,t=e||{},l=t.queryLanguages,d=t.attributesForPrediction,h=t.nbHits,f=void 0===h?1:h,h=t.renderDebounceTime,m=t.searchDebounceTime,p=void 0===m?100:m,m=t.escapeHTML,g=void 0===m||m,m=t.extraParameters,v=void 0===m?{}:m;if(l&&0!==l.length)return r=function(e){var t=++n;return Promise.resolve(e).then(function(e){return a&&t<i?a:(i=t,a=e)})},s=[],o=!(i=n=-1),c=ge(y,(a=void 0)===h?100:h),{$$type:"ais.answers",init:function(e){var t=e.state,t=e.instantSearchInstance.client.initIndex(t.index);if("function"!=typeof t.findAnswers)throw new Error(it("`algoliasearch` >= 4.8.0 required."));u=ge(t.findAnswers,p),y(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(t){var n=this,e=t.state.query;e?(s=[],o=!0,y(C(C({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1),r(u(e,l,C(C({},v),{},{nbHits:f,attributesForPrediction:d}))).then(function(e){e&&(g&&0<e.hits.length&&(e.hits=se(e.hits)),e=Ce(Te(e.hits,0,f),e.queryID),s=e,o=!1,c(C(C({},n.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1))})):(o=!(s=[]),y(C(C({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1))},getRenderState:function(e,t){return C(C({},e),{},{answers:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{hits:s,isLoading:o,widgetParams:e}},dispose:function(e){e=e.state;return b(),e},getWidgetSearchParameters:function(e){return e}};throw new Error(it("The `queryLanguages` expects an array of strings."))}}function nt(u){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(u,at()),function(n){var o,e=n.widgets,t=n.maxValuesPerFacet,r=void 0===t?20:t,t=n.facets,i=void 0===t?["*"]:t,t=n.transformItems,a=void 0===t?function(e){return e}:t,c=n.fallbackWidget;if(!(e&&Array.isArray(e)&&e.every(function(e){return"object"===y(e)})))throw new Error(at("The `widgets` option expects an array of widgets."));if(Array.isArray(i)&&i.length<=1&&("*"===i[0]||void 0===i[0]))return o=new Map,{$$type:"ais.dynamicWidgets",init:function(n){e.forEach(function(e){var t=Fe(e,n);o.set(t,{widget:e,isMounted:!1})}),u(C(C({},this.getWidgetRenderState(n)),{},{instantSearchInstance:n.instantSearchInstance}),!0)},render:function(e){var t=e.parent,i=this.getWidgetRenderState(e),a=[],s=[];c&&i.attributesToRender.forEach(function(e){var t;o.has(e)||(t=c({attribute:e}),o.set(e,{widget:t,isMounted:!1}))}),o.forEach(function(e,t){var n=e.widget,e=e.isMounted,r=-1<i.attributesToRender.indexOf(t);!e&&r?(s.push(n),o.set(t,{widget:n,isMounted:!0})):e&&!r&&(a.push(n),o.set(t,{widget:n,isMounted:!1}))}),t.addWidgets(s),setTimeout(function(){return t.removeWidgets(a)},0),u(C(C({},i),{},{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(e){var e=e.parent,n=[];o.forEach(function(e){var t=e.widget;e.isMounted&&n.push(t)}),e.removeWidgets(n),s()},getWidgetSearchParameters:function(e){return i.reduce(function(e,t){return e.addFacet(t)},e.setQueryParameters({maxValuesPerFacet:Math.max(r||0,e.maxValuesPerFacet||0)}))},getRenderState:function(e,t){return C(C({},e),{},{dynamicWidgets:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results;e.state;if(!t)return{attributesToRender:[],widgetParams:n};e=a(null!=(e=null==(e=t.renderingContent)||null==(e=e.facetOrdering)||null==(e=e.facets)?void 0:e.order)?e:[],{results:t});if(Array.isArray(e))return{attributesToRender:e,widgetParams:n};throw new Error(at("The `transformItems` option expects a function that returns an Array."))}};throw new Error(at('The `facets` option only accepts [] or ["*"], you passed '.concat(JSON.stringify(i))))}}function rt(n){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,st()),function(r){var e=r||{},t=e.includedAttributes,o=void 0===t?[]:t,t=e.excludedAttributes,c=void 0===t?["query"]:t,t=e.transformItems,u=void 0===t?function(e){return e}:t;if(r&&r.includedAttributes&&r.excludedAttributes)throw new Error(st("The options `includedAttributes` and `excludedAttributes` cannot be used together."));function i(){return l.refine()}function a(){return l.createURL()}var l={refine:v,createURL:function(){return""},attributesToClear:[]};return{$$type:"ais.clearRefinements",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){s()},getRenderState:function(e,t){return C(C({},e),{},{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,n=e.scopedResults,s=e.results,e=(l.attributesToClear=n.reduce(function(e,t){return e.concat((t=(e={scopedResult:t,includedAttributes:o,excludedAttributes:c,transformItems:u,results:s}).scopedResult,n=e.includedAttributes,r=e.excludedAttributes,i=e.transformItems,e=e.results,a=-1!==n.indexOf("query")||-1===r.indexOf("query"),{helper:t.helper,items:i(Le(Ie(t.results,t.helper.state,a).map(function(e){return e.attribute}).filter(function(e){return 0===n.length||-1!==n.indexOf(e)}).filter(function(e){return"query"===e&&a||-1===r.indexOf(e)})),{results:e})}));var n,r,i,a},[]),l.refine=function(){l.attributesToClear.forEach(function(e){var t=e.helper,e=e.items;t.setState(z({helper:t,attributesToClear:e})).search()})},l.createURL=function(){return t(Ke.apply(void 0,w(l.attributesToClear.map(function(e){return z({helper:e.helper,attributesToClear:e.items})}))))},l.attributesToClear.some(function(e){return 0<e.items.length}));return{canRefine:e,hasRefinements:e,refine:i,createURL:a,widgetParams:r}}}}}var it=l({name:"answers",connector:!0}),at=l({name:"dynamic-widgets",connector:!0}),st=l({name:"clear-refinements",connector:!0});function ot(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,ct()),function(a){if((a||{}).includedAttributes&&(a||{}).excludedAttributes)throw new Error(ct("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var e=a||{},s=e.includedAttributes,t=e.excludedAttributes,o=void 0===t?["query"]:t,t=e.transformItems,c=void 0===t?function(e){return e}:t;return{$$type:"ais.currentRefinements",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){r()},getRenderState:function(e,t){return C(C({},e),{},{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var n=e.results,t=e.scopedResults,r=e.createURL,i=e.helper;e=n?t.reduce(function(e,t){return e.concat(c(ut({results:t.results,helper:t.helper,indexId:t.indexId,includedAttributes:s,excludedAttributes:o}),{results:n}))},[]):c(ut({results:{},helper:i,indexId:i.state.index,includedAttributes:s,excludedAttributes:o}),{results:n});return{items:e,canRefine:0<e.length,refine:function(e){return dt(i,e)},createURL:function(e){return r(lt(i.state,e))},widgetParams:a}}}}}var ct=l({name:"current-refinements",connector:!0});function ut(e){var t=e.results,n=e.helper,r=e.indexId,i=e.includedAttributes,a=e.excludedAttributes,e=-1!==(i||[]).indexOf("query")||-1===(a||[]).indexOf("query"),s=i?function(e){return-1!==i.indexOf(e.attribute)}:function(e){return-1===a.indexOf(e.attribute)},o=Ie(t,n.state,e).map(ht).filter(s);return o.reduce(function(e,t){return[].concat(w(e.filter(function(e){return e.attribute!==t.attribute})),[{indexName:n.state.index,indexId:r,attribute:t.attribute,label:t.attribute,refinements:o.filter(function(e){return e.attribute===t.attribute}).sort(function(e,t){return"numeric"===e.type?e.value-t.value:0}),refine:function(e){return dt(n,e)}}])},[])}function lt(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function dt(e,t){e.setState(lt(e.state,t)).search()}function ht(e){var t=function(e){if("numeric"===e.type)return Number(e.name);if("escapedValue"in e)return e.escapedValue;return e.name}(e),n=e.operator?"".concat(function(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}(e.operator)," ").concat(e.name):e.name,t={attribute:e.attribute,type:e.type,value:t,label:n};return void 0!==e.operator&&(t.operator=e.operator),void 0!==e.count&&(t.count=e.count),void 0!==e.exhaustive&&(t.exhaustive=e.exhaustive),t}function ft(R){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(R,gt()),function(c){var e=c||{},u=e.attributes,t=e.separator,l=void 0===t?" > ":t,t=e.rootPath,r=void 0===t?null:t,t=e.showParentLevel,i=void 0===t||t,t=e.limit,a=void 0===t?10:t,t=e.showMore,d=void 0!==t&&t,t=e.showMoreLimit,s=void 0===t?20:t,t=e.sortBy,h=void 0===t?vt:t,t=e.transformItems,f=void 0===t?function(e){return e}:t;if(!u||!Array.isArray(u)||0===u.length)throw new Error(gt("The `attributes` option expects an array of strings."));if(!0===d&&s<=a)throw new Error(gt("The `showMoreLimit` option must be greater than `limit`."));var m,p,g=k(u,1)[0],o=function(){};function v(){o()}var y=!1;function b(){return y?s:a}return{$$type:"ais.hierarchicalMenu",init:function(e){var t=e.instantSearchInstance;R(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t,n,r=e.instantSearchInstance;t=e,o=function(){y=!y,n.render(t)},R(C(C({},(n=this).getWidgetRenderState(e)),{},{instantSearchInstance:r}),!1)},dispose:function(e){e=e.state;return n(),e.removeHierarchicalFacet(g).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return C(C({},e),{},{hierarchicalMenu:C(C({},e.hierarchicalMenu),{},T({},g,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,r=e.state,i=e.createURL,a=e.instantSearchInstance,s=e.helper,e=[],o=!1;return m=m||ce({instantSearchInstance:a,helper:s,attribute:function(e){e=e.split(l).length-1;return u[e]},widgetType:this.$$type}),p=p||function(e){m("click:internal",e),s.toggleFacetRefinement(g,e).search()},n&&(a=(a=n.getFacetValues(g,{sortBy:h,facetOrdering:h===vt}))&&!Array.isArray(a)&&a.data?a.data:[],t=(r.maxValuesPerFacet||0)>b()?a.length<=b():a.length<b(),o=d&&(y||!t),e=f(function i(e){return e.slice(0,b()).map(function(e){var t=e.name,n=e.escapedValue,r=e.data,e=(e.path,C(C({},E(e,pt)),{},{value:n,label:t,data:null}));return Array.isArray(r)&&(e.data=i(r)),e})}(a),{results:n})),{items:e,refine:p,canRefine:0<e.length,createURL:function(e){return i(r.resetPage().toggleFacetRefinement(g,e))},sendEvent:m,widgetParams:c,isShowingMore:y,toggleShowMore:v,canToggleShowMore:o}},getWidgetUiState:function(e,t){t=t.searchParameters.getHierarchicalFacetBreadcrumb(g);return t.length?C(C({},e),{},{hierarchicalMenu:C(C({},e.hierarchicalMenu),{},T({},g,t))}):e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.hierarchicalMenu&&t.hierarchicalMenu[g];if(e.isConjunctiveFacet(g)||e.isDisjunctiveFacet(g))return e;e.isHierarchicalFacet(g)&&e.getHierarchicalFacetByName(g);var e=e.removeHierarchicalFacet(g).addHierarchicalFacet({name:g,attributes:u,separator:l,rootPath:r,showParentLevel:i}),n=e.maxValuesPerFacet||0,n=Math.max(n,d?s:a),e=e.setQueryParameter("maxValuesPerFacet",n);return t?e.addHierarchicalFacetRefinement(g,t.join(l)):e.setQueryParameters({hierarchicalFacetsRefinements:C(C({},e.hierarchicalFacetsRefinements),{},T({},g,[]))})}}}}function mt(n){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,yt()),function(r){var i,a,e=r||{},t=e.escapeHTML,s=void 0===t||t,t=e.transformItems,o=void 0===t?function(e){return e}:t;return{$$type:"ais.hits",init:function(e){n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);n(C(C({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1),t.sendEvent("view:internal",t.hits)},getRenderState:function(e,t){return C(C({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,e=e.instantSearchInstance;if(i=i||he({instantSearchInstance:e,index:n.getIndex(),widgetType:this.$$type}),a=a||fe({index:n.getIndex(),widgetType:this.$$type,instantSearchInstance:e}),!t)return{hits:[],results:void 0,sendEvent:i,bindEvent:a,widgetParams:r};s&&0<t.hits.length&&(t.hits=se(t.hits));n=Ce(Te(t.hits,t.page,t.hitsPerPage),t.queryID);return{hits:o(n,{results:t}),results:t,sendEvent:i,bindEvent:a,widgetParams:r}},dispose:function(e){e=e.state;return c(),s?e.setQueryParameters(Object.keys(re).reduce(function(e,t){return C(C({},e),{},T({},t,void 0))},{})):e},getWidgetSearchParameters:function(e){return s?e.setQueryParameters(re):e}}}}var pt=["name","escapedValue","data","path"],gt=l({name:"hierarchical-menu",connector:!0}),vt=["name:asc"],yt=l({name:"hits",connector:!0}),bt=function(e){var n,t=e.method,r=e.results,i=e.hits,a=e.objectIDs,s=r.index,o=(n=i,a.map(function(t){var e=Re(n,function(e){return e.objectID===t});if(void 0===e)throw new Error('Could not find objectID "'.concat(t,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return e})),c=function(e){e=Le(e.map(function(e){return e.__queryID}));if(1<e.length)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");e=e[0];if("string"!=typeof e)throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return e}(o);switch(t){case"clickedObjectIDsAfterSearch":return{index:s,queryID:c,objectIDs:a,positions:o.map(function(e){return e.__position})};case"convertedObjectIDsAfterSearch":return{index:s,queryID:c,objectIDs:a};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}};function Rt(t){return function(a,e){return t(function(e,t){var s,o,c,n=e.results,r=e.hits,i=e.instantSearchInstance;return n&&r&&i?(s=i.insightsClient,o=n,c=r,i=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0];if(!s)throw a=l({name:"instantsearch"}),new Error(a("The `insightsClient` option has not been provided to `instantsearch`."));if(!Array.isArray(i.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var a=bt({method:e,results:o,hits:c,objectIDs:i.objectIDs});s(e,C(C({},a),i))},a(C(C({},e),{},{insights:i}),t)):a(e,t)},e)}}var St,N,_t,wt,Pt,Nt={},xt=[],It=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ft(e,t){for(var n in t)e[n]=t[n];return e}function Tt(e){var t=e.parentNode;t&&t.removeChild(e)}function j(e,t,n){var r,i,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(2<arguments.length&&(s.children=3<arguments.length?St.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return Ct(e,s,r,i,null)}function Ct(e,t,n,r,i){e={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_t:i};return null==i&&null!=N.vnode&&N.vnode(e),e}function Et(){return{current:null}}function kt(e){return e.children}function jt(e,t){this.props=e,this.context=t}function Lt(e,t){if(null==t)return e.__?Lt(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Lt(e):null}function Mt(e){(e.__d||(e.__d=!0,!wt.push(e))||Ot.__r++)&&Pt===N.debounceRendering||((Pt=N.debounceRendering)||setTimeout)(Ot)}function Ot(){for(var e;Ot.__r=wt.length;)e=wt.sort(function(e,t){return e.__v.__b-t.__v.__b}),wt=[],e.some(function(e){var t,n,r,i,a;e.__d&&(i=(r=(e=e).__v).__e,a=e.__P)&&(t=[],(n=Ft({},r)).__v=r.__v+1,Ut(a,r,n,e.__n,void 0!==a.ownerSVGElement,null!=r.__h?[i]:null,t,null==i?Lt(r):i,r.__h),qt(t,r),r.__e!=i)&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(r)})}function Ht(e,t,n,r,i,a,s,o,c,u){var l,d,h,f,m,p,g,v=r&&r.__k||xt,y=v.length;for(n.__k=[],l=0;l<t.length;l++)if(null!=(f=n.__k[l]=null==(f=t[l])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?Ct(null,f,null,null,f):Array.isArray(f)?Ct(kt,{children:f},null,null,null):0<f.__b?Ct(f.type,f.props,f.key,f.ref||null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(h=v[l])||h&&f.key==h.key&&f.type===h.type)v[l]=void 0;else for(d=0;d<y;d++){if((h=v[d])&&f.key==h.key&&f.type===h.type){v[d]=void 0;break}h=null}Ut(e,f,h=h||Nt,i,a,s,o,c,u),m=f.__e,(d=f.ref)&&h.ref!=d&&(g=g||[],h.ref&&g.push(h.ref,null,f),g.push(d,f.__c||m,f)),null!=m?(null==p&&(p=m),"function"==typeof f.type&&f.__k===h.__k?f.__d=c=function e(t,n,r){for(var i,a=t.__k,s=0;a&&s<a.length;s++)(i=a[s])&&(i.__=t,n="function"==typeof i.type?e(i,n,r):At(r,i,i,a,i.__e,n));return n}(f,c,e):c=At(e,f,h,v,m,c),"function"==typeof n.type&&(n.__d=c)):c&&h.__e==c&&c.parentNode!=e&&(c=Lt(h))}for(n.__e=p,l=y;l--;)null!=v[l]&&("function"==typeof n.type&&null!=v[l].__e&&v[l].__e==n.__d&&(n.__d=Lt(r,l+1)),function e(t,n,r){var i,a;if(N.unmount&&N.unmount(t),!(i=t.ref)||i.current&&i.current!==t.__e||Qt(i,null,n),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){N.__e(t,n)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(a=0;a<i.length;a++)i[a]&&e(i[a],n,"function"!=typeof t.type);r||null==t.__e||Tt(t.__e),t.__=t.__e=t.__d=void 0}(v[l],v[l]));if(g)for(l=0;l<g.length;l++)Qt(g[l],g[++l],g[++l])}function At(e,t,n,r,i,a){var s,o,c;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=a||null==i.parentNode)e:if(null==a||a.parentNode!==e)e.appendChild(i),s=null;else{for(o=a,c=0;(o=o.nextSibling)&&c<r.length;c+=2)if(o==i)break e;e.insertBefore(i,a),s=a}return void 0!==s?s:i.nextSibling}function Wt(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||It.test(t)?n:n+"px"}function Dt(e,t,n,r,i){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Wt(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Wt(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=(t.toLowerCase()in e?t.toLowerCase():t).slice(2),e.l||(e.l={}),(e.l[t+a]=n)?r||e.addEventListener(t,a?$t:Bt,a):e.removeEventListener(t,a?$t:Bt,a);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"!=typeof n&&(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function Bt(e){this.l[e.type+!1](N.event?N.event(e):e)}function $t(e){this.l[e.type+!0](N.event?N.event(e):e)}function Ut(e,t,n,r,i,a,s,o,c){var u,l,d,h,f,m,p,g,v,y,b,R,S,_=t.type;if(void 0===t.constructor){null!=n.__h&&(c=n.__h,o=t.__e=n.__e,t.__h=null,a=[o]),(u=N.__b)&&u(t);try{e:if("function"==typeof _){if(g=t.props,v=(u=_.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?p=(l=t.__c=n.__c).__=l.__E:("prototype"in _&&_.prototype.render?t.__c=l=new _(g,y):(t.__c=l=new jt(g,y),l.constructor=_,l.render=Vt),v&&v.sub(l),l.props=g,l.state||(l.state={}),l.context=y,l.__n=r,d=l.__d=!0,l.__h=[]),null==l.__s&&(l.__s=l.state),null!=_.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=Ft({},l.__s)),Ft(l.__s,_.getDerivedStateFromProps(g,l.__s))),h=l.props,f=l.state,d)null==_.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==_.getDerivedStateFromProps&&g!==h&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(g,y),!l.__e&&null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(g,l.__s,y)||t.__v===n.__v){l.props=g,l.state=l.__s,t.__v!==n.__v&&(l.__d=!1),(l.__v=t).__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),l.__h.length&&s.push(l);break e}null!=l.componentWillUpdate&&l.componentWillUpdate(g,l.__s,y),null!=l.componentDidUpdate&&l.__h.push(function(){l.componentDidUpdate(h,f,m)})}if(l.context=y,l.props=g,l.__v=t,l.__P=e,b=N.__r,R=0,"prototype"in _&&_.prototype.render)l.state=l.__s,l.__d=!1,b&&b(t),u=l.render(l.props,l.state,l.context);else for(;l.__d=!1,b&&b(t),u=l.render(l.props,l.state,l.context),l.state=l.__s,l.__d&&++R<25;);l.state=l.__s,null!=l.getChildContext&&(r=Ft(Ft({},r),l.getChildContext())),d||null==l.getSnapshotBeforeUpdate||(m=l.getSnapshotBeforeUpdate(h,f)),S=null!=u&&u.type===kt&&null==u.key?u.props.children:u,Ht(e,Array.isArray(S)?S:[S],t,n,r,i,a,s,o,c),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),p&&(l.__E=l.__=null),l.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,s,o){var c,u,l,d=n.props,h=t.props,f=t.type,m=0;if("svg"===f&&(i=!0),null!=a)for(;m<a.length;m++)if((c=a[m])&&"setAttribute"in c==!!f&&(f?c.localName===f:3===c.nodeType)){e=c,a[m]=null;break}if(null==e){if(null===f)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,h.is&&h),a=null,o=!1}if(null===f)d===h||o&&e.data===h||(e.data=h);else{if(a=a&&St.call(e.childNodes),u=(d=n.props||Nt).dangerouslySetInnerHTML,l=h.dangerouslySetInnerHTML,!o){if(null!=a)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;!l&&!u||l&&(u&&l.__html==u.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||"")}if(function(e,t,n,r,i){for(var a in n)"children"===a||"key"===a||a in t||Dt(e,a,null,n[a],r);for(a in t)i&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||Dt(e,a,t[a],n[a],r)}(e,h,d,i,o),l)t.__k=[];else if(m=t.props.children,Ht(e,Array.isArray(m)?m:[m],t,n,r,i&&"foreignObject"!==f,a,s,a?a[0]:n.__k&&Lt(n,0),o),null!=a)for(m=a.length;m--;)null!=a[m]&&Tt(a[m]);o||("value"in h&&void 0!==(m=h.value)&&(m!==e.value||"progress"===f&&!m||"option"===f&&m!==d.value)&&Dt(e,"value",m,d.value,!1),"checked"in h&&void 0!==(m=h.checked)&&m!==e.checked&&Dt(e,"checked",m,d.checked,!1))}return e}(n.__e,t,n,r,i,a,s,c);(u=N.diffed)&&u(t)}catch(e){t.__v=null,!c&&null==a||(t.__e=o,t.__h=!!c,a[a.indexOf(o)]=null),N.__e(e,t,n)}}}function qt(e,t){N.__c&&N.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){N.__e(e,t.__v)}})}function Qt(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){N.__e(e,n)}}function Vt(e,t,n){return this.constructor(e,n)}function L(e,t,n){var r,i,a;N.__&&N.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],Ut(t,e=(!r&&n||t).__k=j(kt,null,[e]),i||Nt,Nt,void 0!==t.ownerSVGElement,!r&&n?[n]:!i&&t.firstChild?St.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),qt(a,e)}function Kt(e,t){var n,e={method:e,payload:t},t=e.method;if("object"!==y(e=e.payload))throw new Error("The insights helper expects the payload to be an object.");try{n=ue(e)}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(n,'"')}St=xt.slice,N={__e:function(e,t,n,r){for(var i,a,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&null!=a.getDerivedStateFromError&&(i.setState(a.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},_t=0,jt.prototype.setState=function(e,t){var n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state);(e="function"==typeof e?e(Ft({},n),this.props):e)&&Ft(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),Mt(this))},jt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Mt(this))},jt.prototype.render=kt,wt=[],Ot.__r=0;function zt(e){var n=e.insights,r=e.sendEvent;return function(e){var t=Jt(e.target,e.currentTarget,function(e){return e.hasAttribute("data-insights-event")}),t=(t&&function(e){e=e.getAttribute("data-insights-event");if("string"!=typeof e)throw new Error("The insights middleware expects `data-insights-event` to be a base64-encoded JSON string.");try{return le(e)}catch(e){throw new Error("The insights middleware was unable to parse `data-insights-event`.")}}(t).forEach(function(e){return r(e)}),Jt(e.target,e.currentTarget,function(e){return e.hasAttribute("data-insights-method")&&e.hasAttribute("data-insights-payload")}));t&&(t=(e=function(e){var t=e.getAttribute("data-insights-method");if("string"!=typeof(e=e.getAttribute("data-insights-payload")))throw new Error("The insights helper expects `data-insights-payload` to be a base64-encoded JSON string.");try{return{method:t,payload:le(e)}}catch(e){throw new Error("The insights helper was unable to parse `data-insights-payload`.")}}(t)).method,e=e.payload,n(t,e))}}function Jt(e,t,n){for(var r=e;r&&!n(r);){if(r===t)return null;r=r.parentElement}return r}function Zt(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,Xt()),function(s){var e=s||{},t=e.items,e=e.transformItems,o=void 0===e?function(e){return e}:e;if(!Array.isArray(t))throw new Error(Xt("The `items` option expects an array of objects."));var c=t,e=c.filter(function(e){return!0===e.default});if(0===e.length)throw new Error(Xt("A default value must be specified in `items`."));if(1<e.length)throw new Error(Xt("More than one default value is specified in `items`."));var n=e[0],u=function(t){return function(e){return(e||0===e?t.setQueryParameter("hitsPerPage",e):t.setQueryParameter("hitsPerPage",void 0)).search()}},l=function(e){var t=e.state,n=e.createURL;return function(e){return n(t.resetPage().setQueryParameter("hitsPerPage",e||0===e?e:void 0))}};return{$$type:"ais.hitsPerPage",init:function(e){var t=e.state,n=e.instantSearchInstance;c.some(function(e){return Number(t.hitsPerPage)===Number(e.value)})||(c=[{value:"",label:""}].concat(w(c))),r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:n}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),e.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return C(C({},e),{},{hitsPerPage:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n=e.state,r=e.results,i=e.createURL,e=e.helper,a=!!r&&0<r.nbHits;return{items:o((t=n.hitsPerPage,c.map(function(e){return C(C({},e),{},{isRefined:Number(e.value)===Number(t)})})),{results:r}),refine:u(e),createURL:l({state:n,createURL:i}),hasNoResults:!a,canRefine:a,widgetParams:s}},getWidgetUiState:function(e,t){t=t.searchParameters.hitsPerPage;return void 0===t||t===n.value?e:C(C({},e),{},{hitsPerPage:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameters({hitsPerPage:t.hitsPerPage||n.value})}}}}var Yt=Rt(mt),Xt=l({name:"hits-per-page",connector:!0}),Gt=["page"],en=["clickAnalytics","userToken"],tn=l({name:"infinite-hits",connector:!0});function nn(e){e=e||{};e.page;return E(e,Gt)}function rn(e){e=e||{};e.clickAnalytics,e.userToken;return E(e,en)}function an(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(i,tn()),function(d){var n,r,h,f,m,p,e=d||{},t=e.escapeHTML,g=void 0===t||t,t=e.transformItems,v=void 0===t?function(e){return e}:t,t=e.cache,y=void 0===t?(r=n=null,{read:function(e){e=e.state;return ke(r,nn(e))?n:null},write:function(e){var t=e.state,e=e.hits;r=nn(t),n=e}}):t,b=function(e,t){e=e.page,e=void 0===e?0:e,t=Object.keys(t).map(Number);return 0===t.length?e:Math.min.apply(Math,[e].concat(w(t)))},R=function(e,t){e=e.page,e=void 0===e?0:e,t=Object.keys(t).map(Number);return 0===t.length?e:Math.max.apply(Math,[e].concat(w(t)))};return{$$type:"ais.infiniteHits",init:function(e){i(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e);i(C(C({},e),{},{instantSearchInstance:t}),!1),m("view:internal",e.currentPageHits)},getRenderState:function(e,t){return C(C({},e),{},{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n,r,i=e.results,a=e.helper,s=e.parent,o=e.state,e=e.instantSearchInstance,c=[],s=s.getPreviousState()||o,o=y.read({state:rn(s)})||{},u=i?(u=void 0===(u=s.page)?0:u,g&&0<i.hits.length&&(i.hits=se(i.hits)),l=Ce(Te(i.hits,i.page,i.hitsPerPage),i.queryID),l=v(l,{results:i}),void 0!==o[u]||i.__isArtificial||"idle"!==e.status||(o[u]=l,y.write({state:rn(s),hits:o})),c=l,0===b(s,o)):(h=function(){n.overrideStateWithoutTriggeringChangeEvent(C(C({},n.state),{},{page:b(n.state,y.read({state:rn(n.state)})||{})-1})).searchWithoutTriggeringOnStateChange()},f=function(){t.setPage(R(t.state,y.read({state:rn(t.state)})||{})+1).search()},m=he({instantSearchInstance:e,index:(t=n=a).getIndex(),widgetType:this.$$type}),p=fe({index:a.getIndex(),widgetType:this.$$type,instantSearchInstance:e}),void 0===s.page||0===b(s,o)),l=(r=o,Object.keys(r).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(r[t])},[])),a=!i||i.nbPages<=R(s,o)+1;return{hits:l,currentPageHits:c,sendEvent:m,bindEvent:p,results:i,showPrevious:h,showMore:f,isFirstPage:u,isLastPage:a,widgetParams:d}},dispose:function(e){e=e.state,a(),e=e.setQueryParameter("page",void 0);return g?e.setQueryParameters(Object.keys(re).reduce(function(e,t){return C(C({},e),{},T({},t,void 0))},{})):e},getWidgetUiState:function(e,t){t=t.searchParameters.page||0;return t?C(C({},e),{},{page:t+1}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,n=e,e=(g&&(n=e.setQueryParameters(re)),t.page?t.page-1:0);return n.setQueryParameter("page",e)}}}}function sn(n){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,ln()),function(u){var l,d,h,e=u||{},f=e.attribute,t=e.limit,r=void 0===t?10:t,t=e.showMore,m=void 0!==t&&t,t=e.showMoreLimit,i=void 0===t?20:t,t=e.sortBy,p=void 0===t?dn:t,t=e.transformItems,g=void 0===t?function(e){return e}:t;if(!f)throw new Error(ln("The `attribute` option is required."));if(!0===m&&i<=r)throw new Error(ln("The `showMoreLimit` option must be greater than `limit`."));var v=!1,y=function(){};function b(){y()}function R(){return v?i:r}return{$$type:"ais.menu",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return a(),e.removeHierarchicalFacet(f).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return C(C({},e),{},{menu:C(C({},e.menu),{},T({},f,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n,r=e.results,i=e.createURL,a=e.instantSearchInstance,s=e.helper,o=[],c=!1;return l=l||ce({instantSearchInstance:a,helper:s,attribute:f,widgetType:this.$$type}),d=d||function(e){return i(s.state.resetPage().toggleFacetRefinement(f,e))},h=h||function(e){var t=k(s.getHierarchicalFacetBreadcrumb(f),1)[0];l("click:internal",e||t),s.toggleFacetRefinement(f,e||t).search()},e.results&&(t=e,n=this,y=function(){v=!v,n.render(t)}),r&&(e=(a=r.getFacetValues(f,{sortBy:p,facetOrdering:p===dn}))&&!Array.isArray(a)&&a.data?a.data:[],c=m&&(v||e.length>R()),o=g(e.slice(0,R()).map(function(e){var t=e.name,n=e.escapedValue;e.path;return C(C({},E(e,un)),{},{label:t,value:n})}),{results:r})),{items:o,createURL:d,refine:h,sendEvent:l,canRefine:0<o.length,widgetParams:u,isShowingMore:v,toggleShowMore:b,canToggleShowMore:c}},getWidgetUiState:function(e,t){t=k(t.searchParameters.getHierarchicalFacetBreadcrumb(f),1)[0];return t?C(C({},e),{},{menu:C(C({},e.menu),{},T({},f,t))}):e},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,t=t.menu&&t.menu[f];return e.isConjunctiveFacet(f)||e.isDisjunctiveFacet(f)?e:(n=(e=e.removeHierarchicalFacet(f).addHierarchicalFacet({name:f,attributes:[f]})).maxValuesPerFacet||0,n=Math.max(n,m?i:r),e=e.setQueryParameter("maxValuesPerFacet",n),t?e.addHierarchicalFacetRefinement(f,t):e.setQueryParameters({hierarchicalFacetsRefinements:C(C({},e.hierarchicalFacetsRefinements),{},T({},f,[]))}))}}}}function on(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,hn()),function(h){var f,e=h||{},t=e.attribute,m=void 0===t?"":t,t=e.items,p=void 0===t?[]:t,t=e.transformItems,g=void 0===t?function(e){return e}:t;if(""===m)throw new Error(hn("The `attribute` option is required."));if(p&&0!==p.length)return f={},{$$type:"ais.numericMenu",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return r(),e.clearRefinements(m)},getWidgetUiState:function(e,t){var t=t.searchParameters.getNumericRefinements(m),n=t["="]&&t["="][0];return n||0===n?C(C({},e),{},{numericMenu:C(C({},e.numericMenu),{},T({},m,"".concat(t["="])))}):(n=t[">="]&&t[">="][0]||"",t=t["<="]&&t["<="][0]||"",""===n&&""===t?e:C(C({},e),{},{numericMenu:C(C({},e.numericMenu),{},T({},m,"".concat(n,":").concat(t)))}))},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,t=t.numericMenu&&t.numericMenu[m],e=e.clearRefinements(m);return t?-1===t.indexOf(":")?e.addNumericRefinement(m,"=",Number(t)):(n=(t=k(t.split(":").map(parseFloat),2))[0],t=t[1],n=R(n)?e.addNumericRefinement(m,">=",n):e,R(t)?n.addNumericRefinement(m,"<=",t):n):e.setQueryParameters({numericRefinements:C(C({},e.numericRefinements),{},T({},m,{}))})},getRenderState:function(e,t){return C(C({},e),{},{numericMenu:C(C({},e.numericMenu),{},T({},m,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,r,n,i=e.results,a=e.state,s=e.instantSearchInstance,o=e.helper,c=e.createURL,e=(f.refine||(f.refine=function(e){var t=mn(o.state,m,e);f.sendEvent("click:internal",e),o.setState(t).search()}),f.createURL||(f.createURL=function(t){return function(e){return c(mn(t,m,e))}}),f.sendEvent||(f.sendEvent=(t={instantSearchInstance:s}.instantSearchInstance,function(){1===arguments.length&&t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])})),!i||0===i.nbHits),s=(r=a,p.map(function(e){var t=e.start,n=e.end,e=e.label;return{label:e,value:encodeURI(JSON.stringify({start:t,end:n})),isRefined:fn(r,m,{start:t,end:n,label:e})}})),u=!0,l=function(e,t){var n,r,i,a,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return r=!(n=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==s.return||s.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(s=q(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(s);try{for(l.s();!(n=l.n()).done;){var d=n.value;if(d.isRefined&&"{}"!==decodeURI(d.value)){u=!1;break}}}catch(e){l.e(e)}finally{l.f()}return{createURL:f.createURL(a),items:g(s,{results:i}),hasNoResults:e,canRefine:!(e&&u),refine:f.refine,sendEvent:f.sendEvent,widgetParams:h}}};throw new Error(hn("The `items` option expects an array of objects."))}}var cn=Rt(an),un=["name","escapedValue","path"],ln=l({name:"menu",connector:!0}),dn=["isRefined","name:asc"],hn=l({name:"numeric-menu",connector:!0});function fn(e,t,n){var r=e.getNumericRefinements(t);return void 0!==n.start&&void 0!==n.end?n.start===n.end?pn(r,"=",n.start):pn(r,">=",n.start)&&pn(r,"<=",n.end):void 0!==n.start?pn(r,">=",n.start):void 0!==n.end?pn(r,"<=",n.end):void 0===n.start&&void 0===n.end&&Object.keys(r).every(function(e){return 0===(r[e]||[]).length})}function mn(e,t,n){var n=JSON.parse(decodeURI(n)),r=e.getNumericRefinements(t);if(void 0===n.start&&void 0===n.end)return e.removeNumericRefinement(t);if(fn(e,t,n)||(e=e.removeNumericRefinement(t)),void 0!==n.start&&void 0!==n.end){if(n.start>n.end)throw new Error("option.start should be > to option.end");if(n.start===n.end)return e=pn(r,"=",n.start)?e.removeNumericRefinement(t,"=",n.start):e.addNumericRefinement(t,"=",n.start)}return void 0!==n.start&&(e=(e=pn(r,">=",n.start)?e.removeNumericRefinement(t,">=",n.start):e).addNumericRefinement(t,">=",n.start)),"number"==typeof(e=void 0!==n.end?(e=pn(r,"<=",n.end)?e.removeNumericRefinement(t,"<=",n.end):e).addNumericRefinement(t,"<=",n.end):e).page&&(e.page=0),e}function pn(e,t,n){return void 0!==e[t]&&e[t].includes(n)}function gn(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,yn()),function(s){var e=s||{},o=e.totalPages,e=e.padding,c=new vn({currentPage:0,total:0,padding:void 0===e?3:e}),u={};return{$$type:"ais.pagination",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){t=t.searchParameters.page||0;return t?C(C({},e),{},{page:t+1}):e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.page?t.page-1:0;return e.setQueryParameter("page",t)},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.state,i=e.createURL,e=(u.refine||(u.refine=function(e){n.setPage(e),n.search()}),u.createURL||(u.createURL=function(t){return function(e){return i(t.setPage(e))}}),r.page||0),a=(a=(a=t||{nbPages:0}).nbPages,void 0!==o?Math.min(o,a):a);return c.currentPage=e,c.total=a,{createURL:u.createURL(r),refine:u.refine,canRefine:1<a,currentRefinement:e,nbHits:(null==t?void 0:t.nbHits)||0,nbPages:a,pages:t?c.pages():[],isFirstPage:c.isFirstPage(),isLastPage:c.isLastPage(),widgetParams:s}},getRenderState:function(e,t){return C(C({},e),{},{pagination:this.getWidgetRenderState(t)})}}}}var vn=function(){function t(e){A(this,t),T(this,"currentPage",void 0),T(this,"total",void 0),T(this,"padding",void 0),this.currentPage=e.currentPage,this.total=e.total,this.padding=e.padding}return W(t,[{key:"pages",value:function(){var e,t=this.total,n=this.currentPage,r=this.padding;return 0===t?[0]:Je((e=this.nbPagesDisplayed(r,t))===t?{end:t}:{start:n-(r=this.calculatePaddingLeft(n,r,t,e)),end:n+(e-r)})}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,n,r){return e<=t?e:n-t<=e?r-(n-e):t}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1||0===this.total}},{key:"isFirstPage",value:function(){return 0===this.currentPage}}]),t}(),yn=l({name:"pagination",connector:!0}),bn=l({name:"range-input",connector:!0},{name:"range-slider",connector:!0});function Rn(e){var t=e.min,n=e.max,e=e.precision,e=Math.pow(10,e);return{min:t&&Math.floor(t*e)/e,max:n&&Math.ceil(n*e)/e}}function Sn(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,bn()),function(o){var e=o||{},t=e.attribute,u=void 0===t?"":t,l=e.min,d=e.max,t=e.precision,h=void 0===t?0:t;if(!u)throw new Error(bn("The `attribute` option is required."));if(R(l)&&R(d)&&d<l)throw new Error(bn("The `max` option can't be lower than `min`."));var c={from:function(e){return e.toLocaleString()},to:function(e){return Number(Number(e).toFixed(h)).toLocaleString()}},i=function(e,t,n,r){var e=e.state,i=t.min,t=t.max,a=k(e.getNumericRefinement(u,">=")||[],1)[0],s=k(e.getNumericRefinement(u,"<=")||[],1)[0],o=void 0===n||""===n,c=void 0===r||""===r,n=Rn({min:o?void 0:parseFloat(n),max:c?void 0:parseFloat(r),precision:h}),r=n.min,n=n.max,o=R(l)||i!==r?R(l)&&o?l:r:void 0,r=R(d)||t!==n?R(d)&&c?d:n:void 0,c=void 0===o,n=R(i)&&i<=o,c=c||R(o)&&(!R(i)||n),i=void 0===r,n=R(r)&&r<=t,i=i||R(r)&&(!R(t)||n);return(a!==o||s!==r)&&c&&i?(e=e.removeNumericRefinement(u),R(o)&&(e=e.addNumericRefinement(u,">=",o)),(e=R(r)?e.addNumericRefinement(u,"<=",r):e).resetPage()):null};function f(n,r){return function(){var e=k(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],2),t=e[0],e=e[1],t=i(n,r,t,e);t&&n.setState(t).search()}}return{$$type:"ais.range",init:function(e){n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return C(C({},e),{},{range:C(C({},e.range),{},T({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,r=e.helper,e=e.instantSearchInstance,i=Re(n&&n.disjunctiveFacets||[],function(e){return e.name===u}),i=i&&i.stats||{min:void 0,max:void 0},a=(i=i,a=R(l)?l:R(i.min)?i.min:0,i=R(d)?d:R(i.max)?i.max:0,Rn({min:a,max:i,precision:h})),s=(s=k((i=r).getNumericRefinement(u,">=")||[],1)[0],i=k(i.getNumericRefinement(u,"<=")||[],1)[0],[R(s)?s:-1/0,R(i)?i:1/0]),i=f(r,n?a:{min:void 0,max:void 0});return{refine:i,canRefine:a.min!==a.max,format:c,range:a,sendEvent:(t=e,function(){1===arguments.length&&t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])}),widgetParams:C(C({},o),{},{precision:h}),start:s}},dispose:function(e){e=e.state;return r(),e.removeDisjunctiveFacet(u).removeNumericRefinement(u)},getWidgetUiState:function(e,t){var t=t.searchParameters.getNumericRefinements(u),n=t[">="],n=void 0===n?[]:n,t=t["<="],t=void 0===t?[]:t;return 0===n.length&&0===t.length?e:C(C({},e),{},{range:C(C({},e.range),{},T({},u,"".concat(n,":").concat(t)))})},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,e=e.addDisjunctiveFacet(u).setQueryParameters({numericRefinements:C(C({},e.numericRefinements),{},T({},u,{}))}),t=(R(l)&&(e=e.addNumericRefinement(u,">=",l)),R(d)&&(e=e.addNumericRefinement(u,"<=",d)),t.range&&t.range[u]);return e=t&&-1!==t.indexOf(":")&&(n=(t=k(t.split(":").map(parseFloat),2))[0],t=t[1],R(n)&&(!R(l)||l<n)&&(e=(e=e.removeNumericRefinement(u,">=")).addNumericRefinement(u,">=",n)),R(t))&&(!R(d)||t<d)?(e=e.removeNumericRefinement(u,"<=")).addNumericRefinement(u,"<=",t):e}}}}function _n(c){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(c,kn()),function(d){var e=d||{},h=e.attribute,t=e.operator,i=void 0===t?"or":t,t=e.limit,f=void 0===t?10:t,t=e.showMore,m=void 0!==t&&t,t=e.showMoreLimit,a=void 0===t?20:t,t=e.sortBy,p=void 0===t?jn:t,t=e.escapeFacetValues,o=void 0===t||t,t=e.transformItems,g=void 0===t?function(e){return e}:t;if(!h)throw new Error(kn("The `attribute` option is required."));if(!/^(and|or)$/.test(i))throw new Error(kn('The `operator` must one of: `"and"`, `"or"` (got "'.concat(i,'").')));if(!0===m&&a<=f)throw new Error(kn("`showMoreLimit` should be greater than `limit`."));function v(e){var t=e.name,n=e.escapedValue;return C(C({},E(e,Cn)),{},{value:n,label:t,highlighted:t})}var y,b,R,S=[],_=!0,w=!1,P=function(){};function N(){P()}function x(){return w?a:f}function I(a,s){return function(i){return function(e){var t,n=i.instantSearchInstance,r=i.results;""===e&&S?c(C(C({},s.getWidgetRenderState(C(C({},i),{},{results:y}))),{},{instantSearchInstance:n}),!1):(t={highlightPreTag:(o?re:u).highlightPreTag,highlightPostTag:(o?re:u).highlightPostTag},a.searchForFacetValues(h,e,Math.min(x(),100),t).then(function(e){e=o?e.facetHits.map(function(e){return C(C({},e),{},{highlighted:ie(e.highlighted)})}):e.facetHits,e=g(e.map(function(e){var t=e.escapedValue,n=e.value;return C(C({},E(e,En)),{},{value:t,label:n})}),{results:r});c(C(C({},s.getWidgetRenderState(C(C({},i),{},{results:y}))),{},{items:e,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:n}),!1)}))}}}var F=function(){return function(){}};return{$$type:"ais.refinementList",init:function(e){c(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){c(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return C(C({},e),{},{refinementList:C(C({},e.refinementList),{},T({},h,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n,r=e.results,i=e.state,a=e.createURL,s=e.instantSearchInstance,o=e.helper,c=[],u=[],s=(R&&b&&F||(R=ce({instantSearchInstance:s,helper:o,attribute:h,widgetType:this.$$type}),b=function(e){R("click:internal",e),o.toggleFacetRefinement(h,e).search()},F=I(o,this)),r&&(u=(s=r.getFacetValues(h,{sortBy:p,facetOrdering:p===jn}))&&Array.isArray(s)?s:[],c=g(u.slice(0,x()).map(v),{results:r}),s=i.maxValuesPerFacet,l=x(),_=l<s?u.length<=l:u.length<l,y=r,S=c,e.results)&&(t=e,n=this,P=function(){w=!w,n.render(t)}),F&&F(e)),u=w&&S.length>f,l=m&&!_;return{createURL:function(e){return a(i.resetPage().toggleFacetRefinement(h,e))},items:c,refine:b,searchForItems:s,isFromSearch:!1,canRefine:0<c.length,widgetParams:d,isShowingMore:w,canToggleShowMore:u||l,toggleShowMore:N,sendEvent:R,hasExhaustiveItems:_}},dispose:function(e){e=e.state,n(),e=e.setQueryParameter("maxValuesPerFacet",void 0);return"and"===i?e.removeFacet(h):e.removeDisjunctiveFacet(h)},getWidgetUiState:function(e,t){t=t.searchParameters,t="or"===i?t.getDisjunctiveRefinements(h):t.getConjunctiveRefinements(h);return t.length?C(C({},e),{},{refinementList:C(C({},e.refinementList),{},T({},h,t))}):e},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,r="or"===i;return e.isHierarchicalFacet(h)||r&&e.isConjunctiveFacet(h)||!r&&e.isDisjunctiveFacet(h)?e:(t=t.refinementList&&t.refinementList[h],e=e.clearRefinements(h),n=(e=r?e.addDisjunctiveFacet(h):e.addFacet(h)).maxValuesPerFacet||0,n=Math.max(n,m?a:f),e=e.setQueryParameter("maxValuesPerFacet",n),t?t.reduce(function(e,t){return r?e.addDisjunctiveFacetRefinement(h,t):e.addFacetRefinement(h,t)},e):e.setQueryParameters(T({},n=r?"disjunctiveFacetsRefinements":"facetsRefinements",C(C({},e[n]),{},T({},h,[])))))}}}}function wn(e,t){return t(e)}function Pn(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,Ln()),function(r){var i,a,e=(r||{}).queryHook,s=void 0===e?wn:e;return{$$type:"ais.searchBox",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("query",void 0)},getRenderState:function(e,t){return C(C({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,n=e.searchMetadata,e=e.state;return i||(i=function(e){s(e,function(e){return t.setQuery(e).search()})},a=function(){t.setQuery("").search()}),{query:e.query||"",refine:i,clear:a,widgetParams:r,isSearchStalled:n.isSearchStalled}},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return""===t||e&&e.query===t?e:C(C({},e),{},{query:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("query",t.query||"")}}}}function Nn(r){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,o=(h(r,Mn()),{});return function(i){var e=i||{},a=e.items,e=e.transformItems,s=void 0===e?function(e){return e}:e;if(Array.isArray(a))return{$$type:"ais.sortBy",init:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e),n=e.currentRefinement;Re(a,function(e){return e.value===n});r(C(C({},e),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),o.initialIndex?e.setIndex(o.initialIndex):e},getRenderState:function(e,t){return C(C({},e),{},{sortBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,r=e.state,e=e.parent,e=(!o.initialIndex&&e&&(o.initialIndex=e.getIndexName()),o.setIndex||(o.setIndex=function(e){n.setIndex(e).search()}),!t||0===t.nbHits);return{currentRefinement:r.index,options:s(a,{results:t}),refine:o.setIndex,hasNoResults:e,canRefine:!e&&0<a.length,widgetParams:i}},getWidgetUiState:function(e,t){t=t.searchParameters.index;return C(C({},e),{},{sortBy:t!==o.initialIndex?t:void 0})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("index",t.sortBy||o.initialIndex||e.index)}};throw new Error(Mn("The `items` option expects an array of objects."))}}function xn(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,On()),function(g){var v,y,b,R,e=g||{},S=e.attribute,e=e.max,_=void 0===e?5:e;if(S)return y=function(e){var t,e=e.getNumericRefinements(S);if(null!=(t=e[">="])&&t.length)return e[">="][0]},b=function(e){return function(e,t){v("click:internal",t),e.setState(r(e.state,t)).search()}.bind(null,e)},R=function(e){var t=e.state,n=e.createURL;return function(e){return n(r(t,e))}},{$$type:Hn,init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{ratingMenu:C(C({},e.ratingMenu),{},T({},S,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var o,c,u,l,t,n=e.helper,r=e.results,i=e.state,a=e.instantSearchInstance,e=e.createURL,s=[],d=(v||(o=(a={instantSearchInstance:a,helper:n,getRefinedStar:function(){return y(n.state)},attribute:S}).instantSearchInstance,c=a.helper,u=a.getRefinedStar,l=a.attribute,v=function(){for(var e,t,n,r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];1===a.length?o.sendEventToInsights(a[0]):(e=a[1],t=void 0===(t=a[2])?"Filter Applied":t,n=(r=k(a[0].split(":"),2))[0],r=r[1],"click"===n&&u()!==Number(e)&&o.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Hn,eventType:n,eventModifier:r,payload:{eventName:t,index:c.getIndex(),filters:["".concat(l,">=").concat(e)]},attribute:l}))}),!1),h=0,f=null==r?void 0:r.getFacetValues(S,{});if(r&&f){f.length,t=0,f.forEach(function(e){e=k(e.name.split("."),2)[1];t=Math.max(t,(void 0===e?"":e).length)});for(var m=y(i),p=1;p<_;p+=1)(function(n){var e=m===n,t=(d=d||e,f.filter(function(e){return Number(e.name)>=n&&Number(e.name)<=_}).map(function(e){return e.count}).reduce(function(e,t){return e+t},0));if(h+=t,m&&!e&&0===t)return;var r=w(new Array(Math.floor(+_))).map(function(e,t){return+t<n});s.push({stars:r,name:String(n),label:String(n),value:String(n),count:t,isRefined:e})})(p)}s=s.reverse(),a=!r||0===r.nbHits;return{items:s,hasNoResults:a,canRefine:(!a||d)&&0<h,refine:b(n),sendEvent:v,createURL:R({state:i,createURL:e}),widgetParams:g}},dispose:function(e){e=e.state;return t(),e.removeNumericRefinement(S)},getWidgetUiState:function(e,t){t=t.searchParameters,t=y(t);return"number"!=typeof t?e:C(C({},e),{},{ratingMenu:C(C({},e.ratingMenu),{},T({},S,t))})},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.ratingMenu&&t.ratingMenu[S],e=e.clearRefinements(S).addDisjunctiveFacet(S);return t?e.addNumericRefinement(S,"<=",_).addNumericRefinement(S,">=",t):e.setQueryParameters({numericRefinements:C(C({},e.numericRefinements),{},T({},S,{}))})}};throw new Error(On("The `attribute` option is required."));function r(e,t){var n=y(e)===Number(t),e=e.resetPage().removeNumericRefinement(S);return n?e:e.addNumericRefinement(S,"<=",_).addNumericRefinement(S,">=",Number(t))}}}function In(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,An()),function(n){return{$$type:"ais.stats",init:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){e()},getRenderState:function(e,t){return C(C({},e),{},{stats:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,e=e.state;return t?{hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbSortedHits:t.nbSortedHits,areHitsSorted:void 0!==t.appliedRelevancyStrictness&&0<t.appliedRelevancyStrictness&&t.nbSortedHits!==t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,widgetParams:n}:{hitsPerPage:e.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:e.page||0,processingTimeMS:-1,query:e.query||"",widgetParams:n}}}}}function Fn(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,Wn()),function(g){var v,y,b,R,S,e=g||{},_=e.attribute,t=e.on,e=e.off;if(_)return v=void 0!==e,y=et(void 0===t||t).map(be),b=v?et(e).map(be):void 0,S=function(t,e){var n=e.state,r=e.createURL;return function(){n=n.resetPage();var e=t?y:b,e=(e&&e.forEach(function(e){n=n.removeDisjunctiveFacetRefinement(_,e)}),t?b:y);return e&&e.forEach(function(e){n=n.addDisjunctiveFacetRefinement(_,e)}),r(n)}},{$$type:Dn,init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return r(),e.removeDisjunctiveFacet(_)},getRenderState:function(e,t){return C(C({},e),{},{toggleRefinement:C(C({},e.toggleRefinement),{},T({},_,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var n,t,o,c,u,l,r,i=e.state,a=e.helper,s=e.results,d=e.createURL,e=e.instantSearchInstance,h=s?y.every(function(e){return i.isDisjunctiveFacetRefined(_,e)}):y.every(function(e){return i.isDisjunctiveFacetRefined(_,e)}),f={isRefined:h,count:0},m={isRefined:v&&!h,count:0},p=(s&&(p=et(b||!1),n=s.getFacetValues(_,{})||[],t=y.map(function(t){return Re(n,function(e){return e.escapedValue===be(String(t))})}).filter(function(e){return void 0!==e}),p=v?p.map(function(t){return Re(n,function(e){return e.escapedValue===be(String(t))})}).filter(function(e){return void 0!==e}):[],f={isRefined:!!t.length&&t.every(function(e){return e.isRefined}),count:t.reduce(function(e,t){return e+t.count},0)||null},m={isRefined:!!p.length&&p.every(function(e){return e.isRefined}),count:p.reduce(function(e,t){return e+t.count},0)||n.reduce(function(e,t){return e+t.count},0)}),R||(o=(t={instantSearchInstance:e,attribute:_,on:y,helper:a}).instantSearchInstance,c=t.helper,u=t.attribute,l=t.on,R=function(){for(var e,t,n,r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];1===a.length?o.sendEventToInsights(a[0]):(e=a[1],t=void 0===(t=a[2])?"Filter Applied":t,n=(r=k(a[0].split(":"),2))[0],r=r[1],"click"!==n||void 0===l||e||o.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Dn,eventType:n,eventModifier:r,payload:{eventName:t,index:c.getIndex(),filters:l.map(function(e){return"".concat(u,":").concat(e)})},attribute:u}))}),h?m:f);return{value:{name:_,isRefined:h,count:s?p.count:null,onFacetValue:f,offFacetValue:m},createURL:S(h,{state:i,createURL:d}),sendEvent:R,canRefine:Boolean(s?p.count:null),refine:(r=a,function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{isRefined:!1}).isRefined;e?(y.forEach(function(e){return r.removeDisjunctiveFacetRefinement(_,e)}),v&&b.forEach(function(e){return r.addDisjunctiveFacetRefinement(_,e)})):(R("click:internal",e),v&&b.forEach(function(e){return r.removeDisjunctiveFacetRefinement(_,e)}),y.forEach(function(e){return r.addDisjunctiveFacetRefinement(_,e)})),r.search()}),widgetParams:g}},getWidgetUiState:function(e,t){var n=t.searchParameters,t=y&&y.every(function(e){return n.isDisjunctiveFacetRefined(_,e)});return t?C(C({},e),{},{toggle:C(C({},e.toggle),{},T({},_,t))}):e},getWidgetSearchParameters:function(e,t){var n,t=t.uiState;return e.isHierarchicalFacet(_)||e.isConjunctiveFacet(_)?e:(n=e.clearRefinements(_).addDisjunctiveFacet(_),Boolean(t.toggle&&t.toggle[_])?(y&&y.forEach(function(e){n=n.addDisjunctiveFacetRefinement(_,e)}),n):v?(b&&b.forEach(function(e){n=n.addDisjunctiveFacetRefinement(_,e)}),n):n.setQueryParameters({disjunctiveFacetsRefinements:C(C({},e.disjunctiveFacetsRefinements),{},T({},_,[]))}))}};throw new Error(Wn("The `attribute` option is required."))}}function Tn(u){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,d=(h(u,Bn()),{});return function(a){var n,e=a||{},t=e.attributes,r=e.separator,i=void 0===r?" > ":r,r=e.rootPath,s=void 0===r?null:r,r=e.transformItems,o=void 0===r?function(e){return e}:r;if(t&&Array.isArray(t)&&0!==t.length)return n=k(t,1)[0],{$$type:"ais.breadcrumb",init:function(e){u(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){u(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(){l()},getRenderState:function(e,t){return C(C({},e),{},{breadcrumb:C(C({},e.breadcrumb),{},T({},n,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.helper,n=e.createURL,r=e.results,e=e.state;var i,e=r&&0!==e.hierarchicalFacets.length?(e=k(e.hierarchicalFacets,1)[0].name,e=(e=r.getFacetValues(e,{}))&&!Array.isArray(e)&&e.data?e.data:[],o((i=function n(e){return e.reduce(function(e,t){return e=t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),Array.isArray(t.data))?e.concat(n(t.data)):e},[])}(e)).map(function(e,t){return{label:e.label,value:t+1===i.length?null:i[t+1].value}}),{results:r})):[];return d.createURL||(d.createURL=function(e){return n(c(t.state,e))}),d.refine||(d.refine=function(e){t.setState(c(t.state,e)).search()}),{canRefine:0<e.length,createURL:d.createURL,items:e,refine:d.refine,widgetParams:a}},getWidgetSearchParameters:function(e){return e.isHierarchicalFacet(n)?(e.getHierarchicalFacetByName(n),e):e.addHierarchicalFacet({name:n,attributes:t,separator:i,rootPath:s})}};throw new Error(Bn("The `attributes` option expects an array of strings."));function c(e,t){return t?e.resetPage().toggleFacetRefinement(n,t):0===(t=e.getHierarchicalFacetBreadcrumb(n)).length?e:e.resetPage().toggleFacetRefinement(n,t[0])}}}var Cn=["name","escapedValue"],En=["escapedValue","value"],kn=l({name:"refinement-list",connector:!0}),jn=["isRefined","count:desc","name:asc"],Ln=l({name:"search-box",connector:!0}),Mn=l({name:"sort-by",connector:!0}),On=l({name:"rating-menu",connector:!0}),Hn="ais.ratingMenu",An=l({name:"stats",connector:!0}),Wn=l({name:"toggle-refinement",connector:!0}),Dn="ais.toggleRefinement",Bn=l({name:"breadcrumb",connector:!0});var $n=l({name:"geo-search",connector:!0});function Un(e){return e.insideBoundingBox||""}function qn(e,t){return e.setQueryParameter("insideBoundingBox",t)}function Qn(g){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(g,$n()),function(o){function c(e){if(e.aroundLatLng){var e=e.aroundLatLng,t=e.match(Se);if(t)return{lat:parseFloat(t[1]),lng:parseFloat(t[2])};throw new Error('Invalid value for "aroundLatLng" parameter: "'.concat(e,'"'))}}function u(){return p.internalToggleRefineOnMapMove()}function a(e,t){return function(){p.isRefineOnMapMove=!p.isRefineOnMapMove,t(e)}}function l(){return p.isRefineOnMapMove}function d(){return p.internalSetMapMoveSinceLastRefine()}function s(t,n){return function(){var e=!0!==p.hasMapMoveSinceLastRefine;p.hasMapMoveSinceLastRefine=!0,e&&n(t)}}function h(){return p.hasMapMoveSinceLastRefine}var f,e=o||{},t=e.enableRefineOnMapMove,e=e.transformItems,m=void 0===e?function(e){return e}:e,p={isRefineOnMapMove:void 0===t||t,hasMapMoveSinceLastRefine:!1,lastRefinePosition:"",lastRefineBoundingBox:"",internalToggleRefineOnMapMove:v,internalSetMapMoveSinceLastRefine:v};return{$$type:Kn,init:function(e){var t=e.instantSearchInstance;p.internalToggleRefineOnMapMove=a(e,v),p.internalSetMapMoveSinceLastRefine=s(e,v),g(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.helper,n=e.instantSearchInstance,t=t.state,r=Boolean(t.aroundLatLng)&&Boolean(p.lastRefinePosition)&&t.aroundLatLng!==p.lastRefinePosition,i=!t.insideBoundingBox&&Boolean(p.lastRefineBoundingBox)&&t.insideBoundingBox!==p.lastRefineBoundingBox,r=((r||i)&&(p.hasMapMoveSinceLastRefine=!1),p.lastRefinePosition=t.aroundLatLng||"",p.lastRefineBoundingBox=Un(t),p.internalToggleRefineOnMapMove=a(e,this.render.bind(this)),p.internalSetMapMoveSinceLastRefine=s(e,this.render.bind(this)),this.getWidgetRenderState(e));f("view:internal",r.items),g(C(C({},r),{},{instantSearchInstance:n}),!1)},getWidgetRenderState:function(e){var t,n,r,i=e.helper,a=e.results,e=e.instantSearchInstance,s=i.state,a=a?m(a.hits.filter(function(e){return e._geoloc}),{results:a}):[];return f=f||he({instantSearchInstance:e,index:i.getIndex(),widgetType:Kn}),{items:a,position:c(s),currentRefinement:(e=s).insideBoundingBox&&_e(e.insideBoundingBox),refine:function(e){var t=e.northEast,e=e.southWest,t=[t.lat,t.lng,e.lat,e.lng].join();r.setState(qn(r.state,t).resetPage()).search(),p.hasMapMoveSinceLastRefine=!1,p.lastRefineBoundingBox=t},sendEvent:f,clearMapRefinement:(n=r=i,function(){n.setQueryParameter("insideBoundingBox",void 0).search()}),isRefinedWithMap:(t=s,function(){return Boolean(t.insideBoundingBox)}),toggleRefineOnMapMove:u,isRefineOnMapMove:l,setMapMoveSinceLastRefine:d,hasMapMoveSinceLastRefine:h,widgetParams:o}},getRenderState:function(e,t){return C(C({},e),{},{geoSearch:this.getWidgetRenderState(t)})},dispose:function(e){e=e.state;return n(),e.setQueryParameter("insideBoundingBox",void 0)},getWidgetUiState:function(e,t){t=Un(t.searchParameters);return!t||e&&e.geoSearch&&e.geoSearch.boundingBox===t?e:C(C({},e),{},{geoSearch:{boundingBox:t}})},getWidgetSearchParameters:function(e,t){t=t.uiState;return t&&t.geoSearch?qn(e,t.geoSearch.boundingBox):e.setQueryParameter("insideBoundingBox",void 0)}}}}function Vn(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,a=(h(r,zn()),"https://www.algolia.com/?utm_source=instantsearch.js&utm_medium=website&"+"utm_content=".concat(Ge(function(e){return(null==(e=e.window.location)?void 0:e.hostname)||""},{fallback:function(){return""}}),"&")+"utm_campaign=poweredby");return function(e){var t=(e||{}).url,n=void 0===t?a:t;return{$$type:"ais.poweredBy",init:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{poweredBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{url:n,widgetParams:e}},dispose:function(){i()}}}}var Kn="ais.geoSearch",zn=l({name:"powered-by",connector:!0});function Jn(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function Zn(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||(Jn(r)&&Jn(n)?e[i]=Zn(r,n):e[i]="object"==typeof(r=n)&&null!==r?Zn(Array.isArray(r)?[]:{},r):r));return e}function Yn(){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 Xn=function(e){Jn(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];Jn(r)&&Zn(e,r)}return e};var Gn=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})},p=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var er=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")};var tr=function(e,t){if(null===e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r};var nr=function(e){return e&&0<Object.keys(e).length},rr={addRefinement:function(e,t,n){var r;return rr.isRefined(e,t,n)?e:(n=""+n,n=e[t]?e[t].concat(n):[n],(r={})[t]=n,Yn({},r,e))},removeRefinement:function(e,n,t){var r;return void 0===t?rr.clearRefinement(e,function(e,t){return n===t}):(r=""+t,rr.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 rr.isRefined(e,t,n)?rr.removeRefinement(e,t,n):rr.addRefinement(e,t,n)},clearRefinement:function(i,a,s){var o,e;return void 0===a?nr(i)?{}:i:"string"==typeof a?tr(i,[a]):"function"==typeof a?(o=!1,e=Object.keys(i).reduce(function(e,t){var n=i[t]||[],r=n.filter(function(e){return!a(e,t,s)});return r.length!==n.length&&(o=!0),e[t]=r,e},{}),o?e:i):void 0},isRefined:function(e,t,n){var r=!!e[t]&&0<e[t].length;return void 0!==n&&r?-1!==e[t].indexOf(""+n):r}},n=rr;function ir(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return ir(n[t],e)}):e===n}function s(e){var r=e?s._parseNumbers(e):{},i=(void 0===r.userToken||null!==(e=r.userToken)&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=r.facets||[],this.disjunctiveFacets=r.disjunctiveFacets||[],this.hierarchicalFacets=r.hierarchicalFacets||[],this.facetsRefinements=r.facetsRefinements||{},this.facetsExcludes=r.facetsExcludes||{},this.disjunctiveFacetsRefinements=r.disjunctiveFacetsRefinements||{},this.numericRefinements=r.numericRefinements||{},this.tagRefinements=r.tagRefinements||[],this.hierarchicalFacetsRefinements=r.hierarchicalFacetsRefinements||{},this);Object.keys(r).forEach(function(e){var t=-1!==s.PARAMETERS.indexOf(e),n=void 0!==r[e];!t&&n&&(i[e]=r[e])})}s.PARAMETERS=Object.keys(new s),s._parseNumbers=function(i){var r,a;return i instanceof s?i:(r={},["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(e){var t,n=i[e];"string"==typeof n&&(t=parseFloat(n),r[e]=isNaN(t)?n:t)}),Array.isArray(i.insideBoundingBox)&&(r.insideBoundingBox=i.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),i.numericRefinements&&(a={},Object.keys(i.numericRefinements).forEach(function(n){var r=i.numericRefinements[n]||{};a[n]={},Object.keys(r).forEach(function(e){var t=r[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?parseFloat(e):e}):"string"==typeof e?parseFloat(e):e});a[n][e]=t})}),r.numericRefinements=a),Xn({},i,r))},s.make=function(e){var n=new s(e);return(e.hierarchicalFacets||[]).forEach(function(e){var t;e.rootPath&&0===(t=(n=0<(t=n.getHierarchicalRefinement(e.name)).length&&0!==t[0].indexOf(e.rootPath)?n.clearRefinements(e.name):n).getHierarchicalRefinement(e.name)).length&&(n=n.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}),n},s.validate=function(e,t){t=t||{};return e.tagFilters&&t.tagRefinements&&0<t.tagRefinements.length?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):0<e.tagRefinements.length&&t.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&t.numericRefinements&&nr(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."):nr(e.numericRefinements)&&t.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},s.prototype={constructor:s,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:n.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:n.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:n.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:n.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=er(n);return this.isNumericRefined(e,t,n)?this:((r=Xn({},this.numericRefinements))[e]=Xn({},r[e]),r[e][t]?(r[e][t]=r[e][t].slice(),r[e][t].push(n)):r[e][t]=[n],this.setQueryParameters({numericRefinements:r}))},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(n,r,i){return void 0!==i?this.isNumericRefined(n,r,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r&&ir(e.val,er(i))})}):this:void 0!==r?this.isNumericRefined(n,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r})}):this:this.isNumericRefined(n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(s){var o,t,e;return void 0===s?nr(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof s?tr(this.numericRefinements,[s]):"function"==typeof s?(o=!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){s({val:e,op:t},r,"numeric")||n.push(e)}),n.length!==e.length&&(o=!0),a[t]=n}),e[r]=a,e},{}),o?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 n.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:n.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 n.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:n.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 n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:n.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 n.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:n.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 n.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:n.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 n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:n.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:n.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:n.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:n.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:Yn({},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:Yn({},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:Yn({},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)&&n.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&n.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&n.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){return!!this.isHierarchicalFacet(e)&&(e=this.getHierarchicalRefinement(e),t?-1!==e.indexOf(t):0<e.length)},isNumericRefined:function(e,t,n){var r,i;return void 0===n&&void 0===t?!!this.numericRefinements[e]:(r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==n&&r?(n=er(n),t=void 0!==(e=this.numericRefinements[e][t],i=n,p(e,function(e){return ir(e,i)})),r&&t):r)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=Gn(Object.keys(this.numericRefinements).filter(function(e){return 0<Object.keys(t.numericRefinements[e]).length}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(e){return 0<t.disjunctiveFacetsRefinements[e].length}).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var t=this;return Gn(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(e){return 0<t.hierarchicalFacetsRefinements[e].length}))},getUnrefinedDisjunctiveFacets:function(){var t=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return-1===t.indexOf(e)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var n=this.managedParameters,r={},i=this;return Object.keys(this).forEach(function(e){var t=i[e];-1===n.indexOf(e)&&void 0!==t&&(r[e]=t)}),r},setQueryParameter:function(e,t){var n;return this[e]===t?this:((n={})[e]=t,this.setQueryParameters(n))},setQueryParameters:function(e){if(!e)return this;var t=s.validate(this,e);if(t)throw t;var n=this,i=s._parseNumbers(e),t=Object.keys(this).reduce(function(e,t){return e[t]=n[t],e},{}),e=Object.keys(i).reduce(function(e,t){var n=void 0!==e[t],r=void 0!==i[t];return n&&!r?tr(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 p(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(e){var t;return this.isHierarchicalFacet(e)&&(t=this.getHierarchicalRefinement(e)[0])?(e=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),t.split(e).map(function(e){return e.trim()})):[]},toString:function(){return JSON.stringify(this,null,2)}};var ar=s;function sr(e){return Array.isArray(e)?e.filter(Boolean):[]}function or(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function cr(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var n=t.split(":"),t=p(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 ur=function(e,n,i){return Array.isArray(e)?(Array.isArray(i)||(i=[]),(e=e.map(function(t,e){return{criteria:n.map(function(e){return t[e]}),index:e,value:t}})).sort(function(e,t){for(var n=-1;++n<e.criteria.length;){var r=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=void 0!==t,a=null===t;if(!a&&t<e||r&&i||!n)return 1;if(!r&&e<t||a&&n||!i)return-1}return 0}(e.criteria[n],t.criteria[n]);if(r)return!(n>=i.length)&&"desc"===i[n]?-r:r}return e.index-t.index}),e.map(function(e){return e.value})):[]};var lr=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},e=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")},dr=function(m){return function(e,t){function n(e,s,t){var n,o=e;if(0<t){var r=0;for(o=e;r<t;){var i=o&&Array.isArray(o.data)?o.data:[],o=p(i,function(e){return e.isRefined});r++}}return o&&(n=Object.keys(s.data).map(function(e){return[e,s.data[e]]}).filter(function(e){var t,n,r,i,a,e=e[0];return e=e,t=o.path||u,n=d,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)))}),o.data=ur(n.map(function(e){var t,n,r,i,a=e[0],e=e[1];return e=e,a=a,t=c,n=fr(d),r=s.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:hr(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,d,r=m.hierarchicalFacets[t],i=m.hierarchicalFacetsRefinements[r.name]&&m.hierarchicalFacetsRefinements[r.name][0]||"",s=m._getHierarchicalFacetSeparator(r),o=m._getHierarchicalRootPath(r),h=m._getHierarchicalShowParentLevel(r),r=cr(m._getHierarchicalFacetSortBy(r)),f=e.every(function(e){return e.exhaustive}),r=(a=r,c=s,l=h,d=i,e);return(r=(u=o)?e.slice(o.split(s).length):r).reduce(n,{name:m.hierarchicalFacets[t].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:f,data:null})}},hr=lr,fr=e;var mr=lr,pr=e;function gr(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function vr(e,t,n){t&&t[n]&&(e.stats=t[n])}function yr(l,t,n){var o=t[0],d=(this._rawResults=t,this),e=(Object.keys(o).forEach(function(e){d[e]=o[e]}),Object.keys(n||{}).forEach(function(e){d[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=gr(l.facets),u=gr(l.disjunctiveFacets),r=1,h=o.facets||{};Object.keys(h).forEach(function(e){var t,n,r,i,a=h[e],s=(r=l.hierarchicalFacets,t=e,p(r,function(e){return-1<(e.attributes||[]).indexOf(t)}));s?(r=s.attributes.indexOf(e),n=or(l.hierarchicalFacets,function(e){return e.name===s.name}),d.hierarchicalFacets[n][r]={attribute:e,data:a,exhaustive:o.exhaustiveFacetsCount}):(n=-1!==l.disjunctiveFacets.indexOf(e),r=-1!==l.facets.indexOf(e),n&&(i=u[e],d.disjunctiveFacets[i]={name:e,data:a,exhaustive:o.exhaustiveFacetsCount},vr(d.disjunctiveFacets[i],o.facets_stats,e)),r&&(i=c[e],d.facets[i]={name:e,data:a,exhaustive:o.exhaustiveFacetsCount},vr(d.facets[i],o.facets_stats,e)))}),this.hierarchicalFacets=sr(this.hierarchicalFacets),e.forEach(function(e){var i=t[r],a=i&&i.facets?i.facets:{},s=l.getHierarchicalFacetByName(e);Object.keys(a).forEach(function(t){var n,e,r=a[t];s?(n=or(l.hierarchicalFacets,function(e){return e.name===s.name}),-1!==(e=or(d.hierarchicalFacets[n],function(e){return e.attribute===t}))&&(d.hierarchicalFacets[n][e].data=Xn({},d.hierarchicalFacets[n][e].data,r))):(n=u[t],e=o.facets&&o.facets[t]||{},d.disjunctiveFacets[n]={name:t,data:Yn({},r,e),exhaustive:i.exhaustiveFacetsCount},vr(d.disjunctiveFacets[n],i.facets_stats,t),l.disjunctiveFacetsRefinements[t]&&l.disjunctiveFacetsRefinements[t].forEach(function(e){!d.disjunctiveFacets[n].data[e]&&-1<l.disjunctiveFacetsRefinements[t].indexOf(pr(e))&&(d.disjunctiveFacets[n].data[e]=0)}))}),r++}),l.getRefinedHierarchicalFacets().forEach(function(e){var o=l.getHierarchicalFacetByName(e),c=l._getHierarchicalFacetSeparator(o),u=l.getHierarchicalRefinement(e);0===u.length||u[0].split(c).length<2||t.slice(r).forEach(function(e){var s=e&&e.facets?e.facets:{};Object.keys(s).forEach(function(t){var e,n,r=s[t],i=or(l.hierarchicalFacets,function(e){return e.name===o.name}),a=or(d.hierarchicalFacets[i],function(e){return e.attribute===t});-1!==a&&(e={},0<u.length&&(e[n=u[0].split(c)[0]]=d.hierarchicalFacets[i][a].data[n]),d.hierarchicalFacets[i][a].data=Yn(e,r,d.hierarchicalFacets[i][a].data))}),r++})}),Object.keys(l.facetsExcludes).forEach(function(t){var e=l.facetsExcludes[t],n=c[t];d.facets[n]={name:t,data:o.facets[t],exhaustive:o.exhaustiveFacetsCount},e.forEach(function(e){d.facets[n]=d.facets[n]||{name:t},d.facets[n].data=d.facets[n].data||{},d.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(dr(l)),this.facets=sr(this.facets),this.disjunctiveFacets=sr(this.disjunctiveFacets),this._state=l}function br(n,r){function e(e){return e.name===r}var i,a,t,s;return n._state.isConjunctiveFacet(r)?(i=p(n.facets,e))?Object.keys(i.data).map(function(e){var t=mr(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=p(n.disjunctiveFacets,e))?Object.keys(a.data).map(function(e){var t=mr(e);return{name:e,escapedValue:t,count:a.data[e],isRefined:n._state.isDisjunctiveFacetRefined(r,t)}}):[]:n._state.isHierarchicalFacet(r)?((t=p(n.hierarchicalFacets,e))&&(s=n._state.getHierarchicalFacetByName(r),(s=pr(n._state.getHierarchicalRefinement(r)[0]||"").split(n._state._getHierarchicalFacetSeparator(s))).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,s,0)),t):void 0}function Rr(e,t){e=p(e,function(e){return e.name===t});return e&&e.stats}function Sr(e,t,n,r,i){var i=p(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}}yr.prototype.getFacetByName=function(t){function e(e){return e.name===t}return p(this.facets,e)||p(this.disjunctiveFacets,e)||p(this.hierarchicalFacets,e)},yr.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],yr.prototype.getFacetValues=function(e,t){var s,o,n=br(this,e);if(n)return s=Yn({},t,{sortBy:yr.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),o=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]),Yn({data:a},e)):e}(function(e,t){if(s.facetOrdering){t=t;a=(a=o).renderingContent&&a.renderingContent.facetOrdering&&a.renderingContent.facetOrdering.values&&a.renderingContent.facetOrdering.values[t];if(Boolean(a))return t=e,n=[],r=[],i=((a=a).order||[]).reduce(function(e,t,n){return e[t]=n,e},{}),t.forEach(function(e){var t=e.path||e.name;void 0!==i[t]?n[i[t]]=e:r.push(e)}),n=n.filter(function(e){return e}),"hidden"===(t=a.sortRemainingBy)?n:n.concat(ur(r,(a="alpha"===t?[["path","name"],["asc","asc"]]:[["count"],["desc"]])[0],a[1]))}var n,r,i,a;if(Array.isArray(s.sortBy))return t=cr(s.sortBy,yr.DEFAULT_SORT),ur(e,t[0],t[1]);if("function"==typeof s.sortBy)return a=s.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]:o._state.getHierarchicalFacetByName(n.name).attributes)},yr.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?Rr(this.facets,e):this._state.isDisjunctiveFacet(e)?Rr(this.disjunctiveFacets,e):void 0},yr.prototype.getRefinements=function(){var s=this._state,o=this,c=[];return Object.keys(s.facetsRefinements).forEach(function(t){s.facetsRefinements[t].forEach(function(e){c.push(Sr(0,"facet",t,e,o.facets))})}),Object.keys(s.facetsExcludes).forEach(function(t){s.facetsExcludes[t].forEach(function(e){c.push(Sr(0,"exclude",t,e,o.facets))})}),Object.keys(s.disjunctiveFacetsRefinements).forEach(function(t){s.disjunctiveFacetsRefinements[t].forEach(function(e){c.push(Sr(0,"disjunctive",t,e,o.disjunctiveFacets))})}),Object.keys(s.hierarchicalFacetsRefinements).forEach(function(a){s.hierarchicalFacetsRefinements[a].forEach(function(e){var t,n,r,i;c.push((t=s,n=a,e=e,r=o.hierarchicalFacets,i=t.getHierarchicalFacetByName(n),t=t._getHierarchicalFacetSeparator(i),i=e.split(t),e=p(r,function(e){return e.name===n}),t=i.reduce(function(e,t){var n=e&&p(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(s.numericRefinements).forEach(function(n){var e=s.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})})})}),s.tagRefinements.forEach(function(e){c.push({type:"tag",attributeName:"_tags",name:e})}),c};var _r=yr;function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var wr=r;function Pr(e){return"function"==typeof e}function Nr(e){return"object"==typeof e&&null!==e}function xr(e){return void 0===e}r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.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},r.prototype.emit=function(e){var t,n,r,i,a,s,o;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||Nr(this._events.error)&&!this._events.error.length))throw(o=arguments[1])instanceof Error?o:((s=new Error('Uncaught, unspecified "error" event. ('+o+")")).context=o,s);if(xr(t=this._events[e]))return!1;if(Pr(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(Nr(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},r.prototype.on=r.prototype.addListener=function(e,t){if(Pr(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Pr(t.listener)?t.listener:t),this._events[e]?Nr(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Nr(this._events[e])&&!this._events[e].warned&&(t=xr(this._maxListeners)?r.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")},r.prototype.once=function(e,t){var n;if(Pr(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))}},r.prototype.removeListener=function(e,t){var n,r,i,a;if(!Pr(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||Pr(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Nr(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},r.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(Pr(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},r.prototype.listeners=function(e){e=this._events&&this._events[e]?Pr(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},r.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(Pr(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)};e=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Ir(e,t){this.main=e,this.fn=t,this.lastResults=null}e(Ir,wr),Ir.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Ir.prototype.getModifiedState=function(e){return this.fn(e)};var Fr=Ir;function Tr(n){return Object.keys(n).sort(function(e,t){return e.localeCompare(t)}).reduce(function(e,t){return e[t]=n[t],e},{})}var d={_getQueries:function(o,c){var u=[];return u.push({indexName:o,params:d._getHitsSearchParams(c)}),c.getRefinedDisjunctiveFacets().forEach(function(e){u.push({indexName:o,params:d._getDisjunctiveFacetSearchParams(c,e)})}),c.getRefinedHierarchicalFacets().forEach(function(e){var a,s=c.getHierarchicalFacetByName(e),e=c.getHierarchicalRefinement(e),r=c._getHierarchicalFacetSeparator(s);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:s.attributes[n],value:0===n?t:[e[e.length-1].value,t].join(r)})},[])).forEach(function(e,t){e=d._getDisjunctiveFacetSearchParams(c,e.attribute,0===t);function r(t){return s.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:o,params:e})})}),u},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(d._getHitsHierarchicalFacetsAttributes(e)),n=d._getFacetFilters(e),r=d._getNumericFilters(e),i=d._getTagFilters(e),t={facets:-1<t.indexOf("*")?["*"]:t,tagFilters:i};return 0<n.length&&(t.facetFilters=n),0<r.length&&(t.numericFilters=r),Tr(Xn({},e.getQueryParams(),t))},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=d._getFacetFilters(e,t,n),i=d._getNumericFilters(e,t),a=d._getTagFilters(e),s={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1},a=(0<a.length&&(s.tagFilters=a),e.getHierarchicalFacetByName(t));return s.facets=a?d._getDisjunctiveHierarchicalFacetAttribute(e,a,n):t,0<i.length&&(s.numericFilters=i),0<r.length&&(s.facetFilters=r),Tr(Xn({},e.getQueryParams(),s))},_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(s,o,c){var u=[],e=s.facetsRefinements||{},n=(Object.keys(e).forEach(function(t){(e[t]||[]).forEach(function(e){u.push(t+":"+e)})}),s.facetsExcludes||{}),r=(Object.keys(n).forEach(function(t){(n[t]||[]).forEach(function(e){u.push(t+":-"+e)})}),s.disjunctiveFacetsRefinements||{}),l=(Object.keys(r).forEach(function(t){var n,e=r[t]||[];t!==o&&e&&0!==e.length&&(n=[],e.forEach(function(e){n.push(t+":"+e)}),u.push(n))}),s.hierarchicalFacetsRefinements||{});return Object.keys(l).forEach(function(e){var t=(l[e]||[])[0];if(void 0!==t){var n,r=s.getHierarchicalFacetByName(e),i=s._getHierarchicalFacetSeparator(r),a=s._getHierarchicalRootPath(r);if(o===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),Tr(Xn({},d._getHitsSearchParams(r),t))}},Cr=d,Er="3.11.3",kr=lr;function t(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.3)"),this.setClient(e);e=n||{};e.index=t,this.state=ar.make(e),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function jr(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function Lr(){return this.state.page}e(t,wr),t.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},t.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},t.prototype.getQuery=function(){var e=this.state;return Cr._getHitsSearchParams(e)},t.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,e=Cr._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 _r(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 _r(n,e.results),n)}).catch(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(e,null,n)})},t.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=Xn({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:tr(Cr._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)},t.prototype.searchForFacetValues=function(t,e,n,r){var i,a,s,o="function"==typeof this.client.searchForFacetValues,c="function"==typeof this.client.initIndex;if(o||c||"function"==typeof this.client.search)return i=this.state.setQueryParameters(r||{}),a=i.isDisjunctiveFacet(t),r=Cr.getSearchForFacetQuery(t,e,n,i),this._currentNbQueries++,s=this,n=o?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 s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),(e=Array.isArray(e)?e[0]:e).facetHits.forEach(function(e){e.escapedValue=kr(e.value),e.isRefined=a?i.isDisjunctiveFacetRefined(t,e.escapedValue):i.isFacetRefined(t,e.escapedValue)}),e},function(e){throw s._currentNbQueries--,0===s._currentNbQueries&&s.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")},t.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},t.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},t.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},t.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},t.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},t.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},t.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},t.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},t.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},t.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},t.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},t.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},t.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},t.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},t.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},t.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},t.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},t.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},t.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},t.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},t.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},t.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},t.prototype.setCurrentPage=jr,t.prototype.setPage=jr,t.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},t.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},t.prototype.setState=function(e){return this._change({state:ar.make(e),isPageReset:!1}),this},t.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new ar(e),this},t.prototype.hasRefinements=function(e){return!!nr(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))},t.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},t.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},t.prototype.hasTag=function(e){return this.state.isTagRefined(e)},t.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},t.prototype.getIndex=function(){return this.state.index},t.prototype.getCurrentPage=Lr,t.prototype.getPage=Lr,t.prototype.getTags=function(){return this.state.tagRefinements},t.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},t.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},t.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},t.prototype._search=function(e){var r=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=Cr._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=Cr._getQueries(t.index,t);return i.push({state:t,queriesCount:n.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),n})),t=Array.prototype.concat.apply(t,e),e=this._queryId++;this._currentNbQueries++;try{this.client.search(t).then(this._dispatchAlgoliaResponse.bind(this,i,e)).catch(this._dispatchAlgoliaError.bind(this,e))}catch(e){this.emit("error",{error:e})}},t.prototype._dispatchAlgoliaResponse=function(e,t,n){var r;t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty"),r=n.results.slice(),e.forEach(function(e){var t=e.state,n=e.queriesCount,e=e.helper,n=r.splice(0,n),n=e.lastResults=new _r(t,n);e.emit("result",{results:n,state:t})}))},t.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"))},t.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},t.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},t.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}))},t.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},t.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.11.3)"),this.client=e),this},t.prototype.getClient=function(){return this.client},t.prototype.derive=function(e){e=new Fr(this,e);return this.derivedHelpers.push(e),e},t.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},t.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var Mr=t;function Or(e,t,n){return new Mr(e,t,n)}Or.version=Er,Or.AlgoliaSearchHelper=Mr,Or.SearchParameters=ar,Or.SearchResults=_r;var Hr=Or,Ar=l({name:"configure",connector:!0});function Wr(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return C(C({},e),{},T({},t,void 0))},{}))}function Dr(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:v,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return function(r){var t;if(r&&ne(r.searchParameters))return t={},{$$type:"ais.configure",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),Wr(e,r)},getRenderState:function(e,t){t=this.getWidgetRenderState(t);return C(C({},e),{},{configure:C(C({},t),{},{widgetParams:C(C({},t.widgetParams),{},{searchParameters:Ke(new Hr.SearchParameters(null==(e=e.configure)?void 0:e.widgetParams.searchParameters),new Hr.SearchParameters(t.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var n,e=e.helper;return t.refine||(t.refine=(n=e,function(e){var t=Wr(n.state,r),t=Ke(t,new Hr.SearchParameters(e));r.searchParameters=e,n.setState(t).search()})),{refine:t.refine,widgetParams:r}},getWidgetSearchParameters:function(e,t){t=t.uiState;return Ke(e,new Hr.SearchParameters(C(C({},t.configure),r.searchParameters)))},getWidgetUiState:function(e){return C(C({},e),{},{configure:C(C({},e.configure),r.searchParameters)})}};throw new Error(Ar("The `searchParameters` option expects an object."))}}var Br=l({name:"configure-related-items",connector:!0});function $r(e){var t=e.attributeName,n=e.attributeValue,e=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(e||1,">")}function Ur(n,r){return function(e){var t,e=e||{},a=e.hit,s=e.matchingPatterns,e=e.transformSearchParameters,e=void 0===e?function(e){return e}:e;if(!a)throw new Error(Br("The `hit` option is required."));if(s)return t=Object.keys(s).reduce(function(e,t){var n=s[t],r=Ne(a,t),i=n.score;return Array.isArray(r)?[].concat(w(e),[r.map(function(e){return $r({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(w(e),[$r({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]),e=C({},e(new Hr.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.objectID)],optionalFilters:t}))),C(C({},Dr(n,r)({searchParameters:e})),{},{$$type:"ais.configureRelatedItems"});throw new Error(Br("The `matchingPatterns` option is required."))}}var qr=l({name:"autocomplete",connector:!0}),Qr=l({name:"query-rules",connector:!0});function Vr(e){var i,a,s,t=this.helper,n=this.initialRuleContexts,r=this.trackedFilters,o=this.transformRuleContexts,e=e.state,c=e.ruleContexts||[],r=(i=(r={helper:t,sharedHelperState:e,trackedFilters:r}).helper,a=r.sharedHelperState,s=r.trackedFilters,Object.keys(s).reduce(function(e,t){var n=Ie(i.lastResults||{},a,!0).filter(function(e){return e.attribute===t}).map(function(e){return e.numericValue||e.name}),r=(0,s[t])(n);return[].concat(w(e),w(n.filter(function(e){return r.includes(e)}).map(function(e){return"ais-".concat(t,"-").concat(e).replace(/[^a-z0-9-_]+/gi,"_")})))},[])),o=o([].concat(w(n),w(r))).slice(0,10);ke(c,o)||t.overrideStateWithoutTriggeringChangeEvent(C(C({},e),{},{ruleContexts:o}))}function Kr(l){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(l,Qr()),function(i){var a,e=i||{},t=e.trackedFilters,s=void 0===t?{}:t,t=e.transformRuleContexts,o=void 0===t?function(e){return e}:t,t=e.transformItems,n=void 0===t?function(e){return e}:t,c=(Object.keys(s).forEach(function(e){if("function"!=typeof s[e])throw new Error(Qr("'The \"".concat(e,'" filter value in the `trackedFilters` option expects a function.')))}),0<Object.keys(s).length),u=[];return{$$type:"ais.queryRules",init:function(e){var t=e.helper,n=e.state,r=e.instantSearchInstance;u=n.ruleContexts||[],a=Vr.bind({helper:t,initialRuleContexts:u,trackedFilters:s,transformRuleContexts:o}),c&&(([n.disjunctiveFacetsRefinements,n.facetsRefinements,n.hierarchicalFacetsRefinements,n.numericRefinements].some(function(e){return Boolean(e&&0<Object.keys(e).length)})||Boolean(i.transformRuleContexts))&&a({state:n}),t.on("change",a)),l(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!0)},render:function(e){var t=e.instantSearchInstance;l(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getWidgetRenderState:function(e){var e=e.results,t=(e||{}).userData;return{items:n(void 0===t?[]:t,{results:e}),widgetParams:i}},getRenderState:function(e,t){return C(C({},e),{},{queryRules:this.getWidgetRenderState(t)})},dispose:function(e){var t=e.helper,e=e.state;return r(),c?(t.removeListener("change",a),e.setQueryParameter("ruleContexts",u)):e}}}}function zr(e){function t(){d(u(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"initial"))}function n(){r&&(r.stop(),r.removeEventListener("start",h),r.removeEventListener("error",f),r.removeEventListener("result",m),r.removeEventListener("end",p),r=void 0)}var r,i=e.searchAsYouSpeak,a=e.language,s=e.onQueryChange,o=e.onStateChange,c=window.webkitSpeechRecognition||window.SpeechRecognition,u=function(e){return{status:e,transcript:"",isSpeechFinal:!1,errorCode:void 0}},l=u("initial"),d=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l=C(C({},l),e),o()},h=function(){d({status:"waiting"})},f=function(e){d({status:"error",errorCode:e.error})},m=function(e){d({status:"recognizing",transcript:e.results[0]&&e.results[0][0]&&e.results[0][0].transcript||"",isSpeechFinal:e.results[0]&&e.results[0].isFinal}),i&&l.transcript&&s(l.transcript)},p=function(){l.errorCode||!l.transcript||i||s(l.transcript),"error"!==l.status&&d({status:"finished"})};return{getState:function(){return l},isBrowserSupported:function(){return Boolean(c)},isListening:function(){return"askingPermission"===l.status||"waiting"===l.status||"recognizing"===l.status},startListening:function(){(r=new c)&&(t("askingPermission"),r.interimResults=!0,a&&(r.lang=a),r.addEventListener("start",h),r.addEventListener("error",f),r.addEventListener("result",m),r.addEventListener("end",p),r.start())},stopListening:function(){n(),t("finished")},dispose:n}}function Jr(m){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(m,Yr()),function(u){var e=u.searchAsYouSpeak,l=void 0!==e&&e,d=u.language,h=u.additionalQueryParameters,e=u.createVoiceSearchHelper,f=void 0===e?zr:e;return{$$type:"ais.voiceSearch",init:function(e){var t=e.instantSearchInstance;m(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;m(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{voiceSearch:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=this,n=e.helper,r=e.instantSearchInstance,i=(this._refine||(this._refine=function(e){var t;e!==n.state.query&&(t=d?[d.split("-")[0]]:void 0,n.setQueryParameter("queryLanguages",t),"function"==typeof h&&n.setState(n.state.setQueryParameters(C({ignorePlurals:!0,removeStopWords:!0,optionalWords:e},h({query:e})))),n.setQuery(e).search())}),this._voiceSearchHelper||(this._voiceSearchHelper=f({searchAsYouSpeak:l,language:d,onQueryChange:function(e){return t._refine(e)},onStateChange:function(){m(C(C({},t.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!1)}})),this._voiceSearchHelper),a=i.isBrowserSupported,s=i.isListening,o=i.startListening,c=i.stopListening,i=i.getState;return{isBrowserSupported:a(),isListening:s(),toggleListening:function(){a()&&(s()?c:o)()},voiceListeningState:i(),widgetParams:u}},dispose:function(e){var t,e=e.state,n=(this._voiceSearchHelper.dispose(),r(),e);return"function"==typeof h&&(t=(t=h({query:""}))?Object.keys(t).reduce(function(e,t){return e[t]=void 0,e},{}):{},n=e.setQueryParameters(C({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},t))),n.setQueryParameter("query",void 0)},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return t?C(C({},e),{},{query:t}):e},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("query",t.query||"")}}}}function Zr(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:v,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return function(r){var i={};return{$$type:"ais.relevantSort",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(e,t){return C(C({},e),{},{relevantSort:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper;i.refine||(i.refine=function(e){n.setQueryParameter("relevancyStrictness",e).search()});e=(t||{}).appliedRelevancyStrictness,t=void 0!==e;return{isRelevantSorted:void 0!==e&&0<e,isVirtualReplica:t,canRefine:t,refine:i.refine,widgetParams:r}},getWidgetSearchParameters:function(e,t){var t=t.uiState;return e.setQueryParameter("relevancyStrictness",null!=(t=t.relevantSort)?t:e.relevancyStrictness)},getWidgetUiState:function(e,t){t=t.searchParameters;return C(C({},e),{},{relevantSort:t.relevancyStrictness||e.relevantSort})}}}}function i(n){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.descendantName,e=e.modifierName,t=t?"-".concat(t):"",e=e?"--".concat(e):"";return"".concat("ais","-").concat(n).concat(t).concat(e)}}var Yr=l({name:"voice-search",connector:!0}),lr=K(tt),e=K(nt),Er=Object.freeze({__proto__:null,EXPERIMENTAL_connectAnswers:lr,EXPERIMENTAL_connectDynamicWidgets:e,connectDynamicWidgets:nt,connectClearRefinements:rt,connectCurrentRefinements:ot,connectHierarchicalMenu:ft,connectHits:mt,connectHitsWithInsights:Yt,connectHitsPerPage:Zt,connectInfiniteHits:an,connectInfiniteHitsWithInsights:cn,connectMenu:sn,connectNumericMenu:on,connectPagination:gn,connectRange:Sn,connectRefinementList:_n,connectSearchBox:Pn,connectSortBy:Nn,connectRatingMenu:xn,connectStats:In,connectToggleRefinement:Fn,connectBreadcrumb:Tn,connectGeoSearch:Qn,connectPoweredBy:Vn,connectConfigure:Dr,EXPERIMENTAL_connectConfigureRelatedItems:Ur,connectAutocomplete:function(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,qr()),function(s){var e=(s||{}).escapeHTML,o=void 0===e||e,c={};return{$$type:"ais.autocomplete",init:function(e){var t=e.instantSearchInstance;n(C(C({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e);e.indices.forEach(function(e){(0,e.sendEvent)("view:internal",e.hits)}),n(C(C({},e),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return C(C({},e),{},{autocomplete:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var n=this,t=e.helper,r=e.state,i=e.scopedResults,a=e.instantSearchInstance,e=(c.refine||(c.refine=function(e){t.setQuery(e).search()}),i.map(function(e){e.results.hits=o?se(e.results.hits):e.results.hits;var t=he({instantSearchInstance:a,index:e.results.index,widgetType:n.$$type});return{indexId:e.indexId,indexName:e.results.index,hits:e.results.hits,results:e.results,sendEvent:t}}));return{currentRefinement:r.query||"",indices:e,refine:c.refine,widgetParams:s}},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return""===t||e&&e.query===t?e:C(C({},e),{},{query:t})},getWidgetSearchParameters:function(e,t){t={query:t.uiState.query||""};return o?e.setQueryParameters(C(C({},t),re)):e.setQueryParameters(t)},dispose:function(e){e=e.state,t(),e=e.setQueryParameter("query",void 0);return o?e.setQueryParameters(Object.keys(re).reduce(function(e,t){return C(C({},e),{},T({},t,void 0))},{})):e}}}},connectQueryRules:Kr,connectVoiceSearch:Jr,connectRelevantSort:Zr}),Xr=i("Highlight");function Gr(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._highlightResult,t)||{}).value,t=void 0===r?"":r,r=Xr({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return t.replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var ei=i("ReverseHighlight");function ti(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._highlightResult,t)||{}).value,t=void 0===r?"":r,r=ei({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return oe(Xe(we(t))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var ni=i("Snippet");function ri(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._snippetResult,t)||{}).value,t=void 0===r?"":r,r=ni({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return t.replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var ii=i("ReverseSnippet");function ai(e){var t=e.attribute,n=e.highlightedTagName,n=void 0===n?"mark":n,r=e.hit,e=e.cssClasses,e=void 0===e?{}:e,r=(Ne(r._snippetResult,t)||{}).value,t=void 0===r?"":r,r=ii({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return oe(Xe(we(t))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var si="_ALGOLIA";function oi(){var e=si;if("object"===("undefined"==typeof document?"undefined":y(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}}var ci=["page"];function ui(e){e=e||{};e.page;return E(e,ci)}var li="ais.infiniteHits";var di="2.6.0",hi="https://cdn.jsdelivr.net/npm/search-insights@".concat(di,"/dist/search-insights.min.js");function fi(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,d=e.insightsInitParams,h=e.onEvent,e=e.$$internal,f=void 0!==e&&e,n=t,m=(t||null===t||Ge(function(e){var r=e.window,i=r.AlgoliaAnalyticsObject||"aa";(n="string"==typeof i?r[i]:n)||(r.AlgoliaAnalyticsObject=i,r[i]||(r[i]=function(){r[i].queue||(r[i].queue=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r[i].queue.push(t)},r[i].version=di,r[i].shouldAddScript=!0),n=r[i])}),n||v);return function(e){var r=e.instantSearchInstance,e=r.middleware.filter(function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal}).map(function(e){return e.creator});r.unuse.apply(r,w(e));var t,n,i,a,s=k((e=r.client).transporter?(s=(n=e.transporter).headers,n=n.queryParameters,[s[t="x-algolia-application-id"]||n[t],s[t="x-algolia-api-key"]||n[t]]):[e.applicationID,e.apiKey],2),o=s[0],c=s[1],u=void 0,l=void 0;return Array.isArray(m.queue)&&(n=Re(m.queue.slice().reverse(),function(e){return"setUserToken"===k(e,1)[0]})||[],u=k(n,2)[1]),m("getUserToken",null,function(e,t){l=t}),!d&&mi(m)||m("init",C({appId:o,apiKey:c,partial:!0},d)),{$$type:"ais.insights",$$internal:f,onStateChange:function(){},subscribe:function(){if(m.shouldAddScript){var t="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var e=document.createElement("script");e.async=!0,e.src=hi,e.onerror=function(){r.emit("error",new Error(t))},document.body.appendChild(e),m.shouldAddScript=!1}catch(e){m.shouldAddScript=!1,r.emit("error",new Error(t))}}},started:function(){m("addAlgoliaAgent","insights-middleware"),a=r.helper,i={userToken:a.state.userToken,clickAnalytics:a.state.clickAnalytics},a.overrideStateWithoutTriggeringChangeEvent(C(C({},a.state),{},{clickAnalytics:!0})),f||r.scheduleSearch();function e(e){var t;e&&(t=a.state.userToken,a.overrideStateWithoutTriggeringChangeEvent(C(C({},a.state),{},{userToken:e})),t)&&t!==e&&r.scheduleSearch()}var t=oi(),n=(t&&e(t),l?(e(l),m("setUserToken",l)):u&&(e(u),m("setUserToken",u)),m("onUserTokenChange",e,{immediate:!0}),m);mi(m)&&(n=function(e,t){return m(e,t,{headers:{"X-Algolia-Application-Id":o,"X-Algolia-API-Key":c}})}),r.sendEventToInsights=function(e){h?h(e,n):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),n(e.insightsMethod,e.payload))}},unsubscribe:function(){m("onUserTokenChange",void 0),r.sendEventToInsights=v,a&&i&&(a.overrideStateWithoutTriggeringChangeEvent(C(C({},a.state),i)),r.scheduleSearch())}}}}function mi(e){var e=k((e.version||"").split(".").map(Number),2),t=e[0],e=e[1];return 3<=t||2===t&&6<=e||1===t&&10<=e}function pi(){return Ge(function(e){return-1<(null==(e=e.window.navigator)||null==(e=e.userAgent)?void 0:e.indexOf("Algolia Crawler"))},{fallback:function(){return!1}})}function gi(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).$$internal,a=void 0!==e&&e;return function(e){var t=e.instantSearchInstance,n={widgets:[]},r=document.createElement("meta"),i=document.querySelector("head");return r.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:a,onStateChange:function(){},subscribe:function(){setTimeout(function(){var e=t.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,function r(e,i,a){var s=Ze(i,i.mainIndex,i._initialUiState);e.forEach(function(e){var t={},n=(e.getWidgetRenderState&&(n=e.getWidgetRenderState(s))&&n.widgetParams&&(t=n.widgetParams),Object.keys(t).filter(function(e){return void 0!==t[e]}));a.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:n}),"ais.index"===e.$$type&&r(e.getWidgets(),i,a)})}(t.mainIndex.getWidgets(),t,n),t.middleware.forEach(function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})}),r.content=JSON.stringify(n),i.appendChild(r)},0)},started:function(){},unsubscribe:function(){r.remove()}}}}function vi(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n}function yi(e,t,n,r,i,a,s,o,c,u,l,d,h,f){var m=e;if("function"==typeof s?m=s(t,m):m instanceof Date?m=u(m):"comma"===n&&Ti(m)&&(m=xi.maybeMap(m,function(e){return e instanceof Date?u(e):e})),null===m){if(r)return a&&!h?a(t,x.encoder,f,"key",l):t;m=""}if(Li(m)||xi.isBuffer(m)){if(a){e=h?t:a(t,x.encoder,f,"key",l);if("comma"===n&&h){for(var p=Ci.call(String(m),","),g="",v=0;v<p.length;++v)g+=(0===v?"":",")+d(a(p[v],x.encoder,f,"value",l));return[d(e)+"="+g]}return[d(e)+"="+d(a(m,x.encoder,f,"value",l))]}return[d(t)+"="+d(String(m))]}var y,b=[];if(void 0!==m){y="comma"===n&&Ti(m)?[{value:0<m.length?m.join(",")||null:void 0}]:Ti(s)?s:(e=Object.keys(m),o?e.sort(o):e);for(var R=0;R<y.length;++R){var S=y[R],_="object"==typeof S&&void 0!==S.value?S.value:m[S];i&&null===_||(S=Ti(m)?"function"==typeof n?n(t,S):t:t+(c?"."+S:"["+S+"]"),ki(b,yi(_,S,n,r,i,a,s,o,c,u,l,d,h,f)))}}return b}function bi(e){e&&(window.document.title=e)}var Ri=String.prototype.replace,Si=/%20/g,lr="RFC3986",_i={default:lr,formatters:{RFC1738:function(e){return Ri.call(e,Si,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:lr},wi=Object.prototype.hasOwnProperty,Pi=Array.isArray,Ni=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),xi={arrayToObject:vi,assign:function(e,n){return Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),o=0;o<s.length;++o){var c=s[o],u=a[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:c}),n.push(u))}for(var l=t;1<l.length;){var d=l.pop(),h=d.obj[d.prop];if(Pi(h)){for(var f=[],m=0;m<h.length;++m)void 0!==h[m]&&f.push(h[m]);d.obj[d.prop]=f}}return e},decode:function(t,e,n){t=t.replace(/\+/g," ");if("iso-8859-1"===n)return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch(e){return t}},encode:function(e,t,n,r,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var s="",o=0;o<a.length;++o){var c=a.charCodeAt(o);45===c||46===c||95===c||126===c||48<=c&&c<=57||65<=c&&c<=90||97<=c&&c<=122||i===_i.RFC1738&&(40===c||41===c)?s+=a.charAt(o):c<128?s+=Ni[c]:c<2048?s+=Ni[192|c>>6]+Ni[128|63&c]:c<55296||57344<=c?s+=Ni[224|c>>12]+Ni[128|c>>6&63]+Ni[128|63&c]:(o+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(o)),s+=Ni[240|c>>18]+Ni[128|c>>12&63]+Ni[128|c>>6&63]+Ni[128|63&c])}return s},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Pi(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function r(i,a,s){if(!a)return i;if("object"!=typeof a){if(Pi(i))i.push(a);else{if(!i||"object"!=typeof i)return[i,a];(s&&(s.plainObjects||s.allowPrototypes)||!wi.call(Object.prototype,a))&&(i[a]=!0)}return i}var e;return i&&"object"==typeof i?(Pi(e=i)&&!Pi(a)&&(e=vi(i,s)),Pi(i)&&Pi(a)?(a.forEach(function(e,t){var n;wi.call(i,t)?(n=i[t])&&"object"==typeof n&&e&&"object"==typeof e?i[t]=r(n,e,s):i.push(e):i[t]=e}),i):Object.keys(a).reduce(function(e,t){var n=a[t];return wi.call(e,t)?e[t]=r(e[t],n,s):e[t]=n,e},e)):[i].concat(a)}},Ii=Object.prototype.hasOwnProperty,Fi={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Ti=Array.isArray,Ci=String.prototype.split,Ei=Array.prototype.push,ki=function(e,t){Ei.apply(e,Ti(t)?t:[t])},ji=Date.prototype.toISOString,e=_i.default,x={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:xi.encode,encodeValuesOnly:!1,format:e,formatter:_i.formatters[e],indices:!1,serializeDate:function(e){return ji.call(e)},skipNulls:!1,strictNullHandling:!1},Li=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},Mi=Object.prototype.hasOwnProperty,Oi=Array.isArray,f={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:xi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Hi=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Ai=function(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e},Wi="utf8=%26%2310003%3B",Di="utf8=%E2%9C%93",Bi=function(e,t,n,r){for(var i=r?t:Ai(t,n),a=e.length-1;0<=a;--a){var s,o,c,u=e[a];"[]"===u&&n.parseArrays?s=[].concat(i):(s=n.plainObjects?Object.create(null):{},o="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,c=parseInt(o,10),n.parseArrays||""!==o?!isNaN(c)&&u!==o&&String(c)===o&&0<=c&&n.parseArrays&&c<=n.arrayLimit?(s=[])[c]=i:"__proto__"!==o&&(s[o]=i):s={0:i}),i=s}return i},$i={formats:_i,parse:function(e,t){var n=function(e){if(!e)return f;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=(void 0===e.charset?f:e).charset;return{allowDots:void 0===e.allowDots?f.allowDots:!!e.allowDots,allowPrototypes:("boolean"==typeof e.allowPrototypes?e:f).allowPrototypes,arrayLimit:("number"==typeof e.arrayLimit?e:f).arrayLimit,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:f).charsetSentinel,comma:("boolean"==typeof e.comma?e:f).comma,decoder:("function"==typeof e.decoder?e:f).decoder,delimiter:("string"==typeof e.delimiter||xi.isRegExp(e.delimiter)?e:f).delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:f.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:("boolean"==typeof e.interpretNumericEntities?e:f).interpretNumericEntities,parameterLimit:("number"==typeof e.parameterLimit?e:f).parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:("boolean"==typeof e.plainObjects?e:f).plainObjects,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:f).strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r,i,a,s={},e=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,c=e.split(t.delimiter,o),u=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<c.length;++n)0===c[n].indexOf("utf8=")&&(c[n]===Di?l="utf-8":c[n]===Wi&&(l="iso-8859-1"),u=n,n=c.length);for(n=0;n<c.length;++n)n!==u&&((a=-1===(a=-1===(a=(r=c[n]).indexOf("]="))?r.indexOf("="):a+1)?(i=t.decoder(r,f.decoder,l,"key"),t.strictNullHandling?null:""):(i=t.decoder(r.slice(0,a),f.decoder,l,"key"),xi.maybeMap(Ai(r.slice(a+1),t),function(e){return t.decoder(e,f.decoder,l,"value")})))&&t.interpretNumericEntities&&"iso-8859-1"===l&&(a=Hi(a)),-1<r.indexOf("[]=")&&(a=Oi(a)?[a]:a),Mi.call(s,i)?s[i]=xi.combine(s[i],a):s[i]=a);return s}(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),s=0;s<a.length;++s)var o=a[s],o=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=0<n.depth&&/(\[[^[\]]*])/.exec(i),e=s?i.slice(0,s.index):i,o=[];if(e){if(!n.plainObjects&&Mi.call(Object.prototype,e)&&!n.allowPrototypes)return;o.push(e)}for(var c=0;0<n.depth&&null!==(s=a.exec(i))&&c<n.depth;){if(c+=1,!n.plainObjects&&Mi.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;o.push(s[1])}return s&&o.push("["+i.slice(s.index)+"]"),Bi(o,t,n,r)}}(o,r[o],n,"string"==typeof e),i=xi.merge(i,o,n);return xi.compact(i)},stringify:function(e,t){var n=e,r=function(e){if(!e)return x;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||x.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=_i.default;if(void 0!==e.format){if(!Ii.call(_i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=_i.formatters[n],i=x.filter;return"function"!=typeof e.filter&&!Ti(e.filter)||(i=e.filter),{addQueryPrefix:("boolean"==typeof e.addQueryPrefix?e:x).addQueryPrefix,allowDots:void 0===e.allowDots?x.allowDots:!!e.allowDots,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:x).charsetSentinel,delimiter:(void 0===e.delimiter?x:e).delimiter,encode:("boolean"==typeof e.encode?e:x).encode,encoder:("function"==typeof e.encoder?e:x).encoder,encodeValuesOnly:("boolean"==typeof e.encodeValuesOnly?e:x).encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:("function"==typeof e.serializeDate?e:x).serializeDate,skipNulls:("boolean"==typeof e.skipNulls?e:x).skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:x).strictNullHandling}}(t),i=("function"==typeof r.filter?n=(0,r.filter)("",n):Ti(r.filter)&&(s=r.filter),[]);if("object"!=typeof n||null===n)return"";var e=t&&t.arrayFormat in Fi?t.arrayFormat:!(t&&"indices"in t)||t.indices?"indices":"repeat",a=Fi[e],s=s||Object.keys(n);r.sort&&s.sort(r.sort);for(var o=0;o<s.length;++o){var c=s[o];r.skipNulls&&null===n[c]||ki(i,yi(n[c],c,a,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset))}t=i.join(r.delimiter),e=!0===r.addQueryPrefix?"?":"";return r.charsetSentinel&&("iso-8859-1"===r.charset?e+="utf8=%26%2310003%3B&":e+="utf8=%E2%9C%93&"),0<t.length?e+t:""}},Ui=function(){function u(e){var n=this,t=e.windowTitle,r=e.writeDelay,r=void 0===r?400:r,i=e.createURL,a=e.parseURL,s=e.getLocation,o=e.start,c=e.dispose,e=e.push;A(this,u),T(this,"$$type","ais.browser"),T(this,"windowTitle",void 0),T(this,"writeDelay",void 0),T(this,"_createURL",void 0),T(this,"parseURL",void 0),T(this,"getLocation",void 0),T(this,"writeTimer",void 0),T(this,"inPopState",!1),T(this,"isDisposed",!1),T(this,"latestAcknowledgedHistory",0),T(this,"_start",void 0),T(this,"_dispose",void 0),T(this,"_push",void 0),this.windowTitle=t,this.writeTimer=void 0,this.writeDelay=r,this._createURL=i,this.parseURL=a,this.getLocation=s,this._start=o,this._dispose=c,this._push=e,Ge(function(e){var e=e.window,t=n.windowTitle&&n.windowTitle(n.read());bi(t),n.latestAcknowledgedHistory=e.history.length})}return W(u,[{key:"read",value:function(){return this.parseURL({qsModule:$i,location:this.getLocation()})}},{key:"write",value:function(i){var a=this;Ge(function(e){var t=e.window,n=a.createURL(i),r=a.windowTitle&&a.windowTitle(i);a.writeTimer&&clearTimeout(a.writeTimer),a.writeTimer=setTimeout(function(){bi(r),a.shouldWrite(n)&&(a._push?a._push(n):t.history.pushState(i,r||"",n),a.latestAcknowledgedHistory=t.history.length),a.inPopState=!1,a.writeTimer=void 0},a.writeDelay)})}},{key:"onUpdate",value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&(clearTimeout(t.writeTimer),t.writeTimer=void 0),t.inPopState=!0,e(t.read())},Ge(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:$i,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var t=this;this._dispose&&this._dispose(),this.isDisposed=!0,Ge(function(e){e=e.window;t._onPopState&&e.removeEventListener("popstate",t._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(n){var r=this;return Ge(function(e){var e=e.window,t=!(r.isDisposed&&r.latestAcknowledgedHistory!==e.history.length);return!r.inPopState&&t&&n!==e.location.href})}}]),u}();function qi(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,n=e.parseURL,r=e.writeDelay,i=e.windowTitle,a=e.getLocation,s=e.start,o=e.dispose,e=e.push;return new Ui({createURL:void 0===t?function(e){var t=e.qsModule,n=e.routeState,e=e.location,r=e.protocol,i=e.hostname,a=e.port,a=void 0===a?"":a,s=e.pathname,e=e.hash,t=t.stringify(n),n=""===a?"":":".concat(a);return(t?"".concat(r,"//").concat(i).concat(n).concat(s,"?").concat(t):"".concat(r,"//").concat(i).concat(n).concat(s)).concat(e)}:t,parseURL:void 0===n?function(e){var t=e.qsModule,e=e.location;return t.parse(e.search.slice(1),{arrayLimit:99})}:n,writeDelay:void 0===r?400:r,windowTitle:i,getLocation:void 0===a?function(){return Ge(function(e){return e.window.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:a,start:s,dispose:o,push:e})}var Qi=["configure"];function Vi(e){e.configure;return E(e,Qi)}function Ki(){return{$$type:"ais.simple",stateToRoute:function(n){return Object.keys(n).reduce(function(e,t){return C(C({},e),{},T({},t,Vi(n[t])))},{})},routeToState:function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(n).reduce(function(e,t){return C(C({},e),{},T({},t,Vi(n[t])))},{})}}}function zi(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.router,i=void 0===t?qi():t,a=void 0===(t=e.stateMapping)?Ki():t,s=void 0!==(t=e.$$internal)&&t;return function(e){var t=e.instantSearchInstance;t._createURL=function(n){var e=Object.keys(n).reduce(function(e,t){return C(C({},e),{},T({},t,n[t]))},t.mainIndex.getWidgetUiState({})),e=a.stateToRoute(e);return i.createURL(e)};var n=void 0,r=t._initialUiState;return{$$type:"ais.router({router:".concat(i.$$type||"__unknown__",", stateMapping:").concat(a.$$type||"__unknown__","})"),$$internal:s,onStateChange:function(e){e=e.uiState,e=a.stateToRoute(e);void 0!==n&&ke(n,e)||(i.write(e),n=e)},subscribe:function(){t._initialUiState=C(C({},r),a.routeToState(i.read())),i.onUpdate(function(e){t.setUiState(a.routeToState(e))})},started:function(){var e;null!=(e=i.start)&&e.call(i)},unsubscribe:function(){i.dispose()}}}}var Ji=["initialSearchParameters"],Zi=l({name:"index-widget"});function Yi(e,t){var n=t.state,r=t.isPageReset,t=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:r,_uiState:t}))}function Xi(e,n,t){return e.reduce(function(e,t){return!me(t)&&(t.getWidgetUiState||t.getWidgetState)?t.getWidgetUiState?t.getWidgetUiState(e,n):t.getWidgetState(e,n):e},2<arguments.length&&void 0!==t?t:{})}function Gi(e,t){var n=t.initialSearchParameters,r=E(t,Ji);return e.filter(function(e){return!me(e)}).reduce(function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,r):e},n)}function ea(e){if(void 0===e||void 0===e.indexName)throw new Error(Zi("The `indexName` option is required."));var s=e.indexName,o=void 0===(e=e.indexId)?s:e,c=[],u={},l=null,d=null,h=null,f=null,m=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return s},getIndexId:function(){return o},getHelper:function(){return h},getResults:function(){var e;return null!=(e=f)&&e.lastResults?(f.lastResults._state=h.state,f.lastResults):null},getPreviousState:function(){return m},getScopedResults:function(){var e=this.getParent();return function n(e){return e.filter(me).reduce(function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(w(n(t.getWidgets()))))},[])}(e?e.getWidgets():[this])},getParent:function(){return d},createURL:function(e){return l._createURL(T({},o,Xi(c,{searchParameters:e,helper:h})))},getWidgets:function(){return c},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Zi("The `addWidgets` method expects an array of widgets."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(Zi("The widget definition expects a `render` and/or an `init` method."));return c=c.concat(e),l&&Boolean(e.length)&&(Yi(h,{state:Gi(c,{uiState:u,initialSearchParameters:h.state}),_uiState:u}),e.forEach(function(e){e.getRenderState&&ta({renderState:e.getRenderState(l.renderState[t.getIndexId()]||{},Ze(l,t,l._initialUiState)),instantSearchInstance:l,parent:t})}),e.forEach(function(e){e.init&&e.init(Ze(l,t,l._initialUiState))}),l.scheduleSearch()),this},removeWidgets:function(t){var e,n=this;if(!Array.isArray(t))throw new Error(Zi("The `removeWidgets` method expects an array of widgets."));if(t.some(function(e){return"function"!=typeof e.dispose}))throw new Error(Zi("The widget definition expects a `dispose` method."));return c=c.filter(function(e){return-1===t.indexOf(e)}),l&&Boolean(t.length)&&(e=t.reduce(function(e,t){return t.dispose({helper:h,state:e,parent:n})||e},h.state),u=Xi(c,{searchParameters:e,helper:h}),h.setState(Gi(c,{uiState:u,initialSearchParameters:e})),c.length)&&l.scheduleSearch(),this},init:function(e){var i,t=this,n=e.instantSearchInstance,r=e.parent,a=e.uiState;null===h&&(l=n,d=r,u=a[o]||{},i=n.mainHelper,e=Gi(c,{uiState:u,initialSearchParameters:new Hr.SearchParameters({index:s})}),(h=Hr({},e.index,e)).search=function(){return n.onStateChange?(n.onStateChange({uiState:n.mainIndex.getWidgetUiState({}),setUiState:function(e){return n.setUiState(e,!1)}}),i):i.search()},h.searchWithoutTriggeringOnStateChange=function(){return i.search()},h.searchForFacetValues=function(e,t,n,r){r=h.state.setQueryParameters(r);return i.searchForFacetValues(e,t,n,r)},f=i.derive(function(){return Ke.apply(void 0,w(function(e){for(var t=e.getParent(),n=[e.getHelper().state];null!==t;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}(t)))}),(e=null==(r=n._initialResults)?void 0:r[this.getIndexId()])&&(r=new Hr.SearchResults(new Hr.SearchParameters(e.state),e.results),f.lastResults=r,h.lastResults=r),h.on("change",function(e){e.isPageReset&&!function n(e){e=e.filter(me);0!==e.length&&e.forEach(function(e){var t=e.getHelper();Yi(t,{state:t.state.resetPage(),isPageReset:!0}),n(e.getWidgets())})}(c)}),f.on("search",function(){n.scheduleStalledRender()}),f.on("result",function(e){e=e.results;n.scheduleRender(),h.lastResults=e,m=e._state}),c.forEach(function(e){e.getRenderState&&ta({renderState:e.getRenderState(n.renderState[t.getIndexId()]||{},Ze(n,t,a)),instantSearchInstance:n,parent:t})}),c.forEach(function(e){e.init&&e.init(Ze(n,t,a))}),h.on("change",function(e){var t=e.state,e=e._uiState;u=Xi(c,{searchParameters:t,helper:h},e||{}),n.onStateChange||n.onInternalStateChange()}),e)&&n.scheduleRender()},render:function(e){var t=this,n=e.instantSearchInstance;this.getResults()&&("error"!==n.status||n.mainHelper.hasPendingRequests()||h.setState(m),c.forEach(function(e){e.getRenderState&&ta({renderState:e.getRenderState(n.renderState[t.getIndexId()]||{},Ye(n,t)),instantSearchInstance:n,parent:t})}),c.forEach(function(e){e.render&&e.render(Ye(n,t))}))},dispose:function(){var e,t=this;c.forEach(function(e){e.dispose&&e.dispose({helper:h,state:h.state,parent:t})}),(d=l=null)!=(e=h)&&e.removeAllListeners(),(h=null)!=(e=f)&&e.detach(),f=null},getWidgetUiState:function(e){return c.filter(me).reduce(function(e,t){return t.getWidgetUiState(e)},C(C({},e),{},T({},o,C(C({},e[o]),u))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){t=t.uiState;return Gi(c,{uiState:t,initialSearchParameters:e})},refreshUiState:function(){u=Xi(c,{searchParameters:this.getHelper().state,helper:this.getHelper()},u)},setIndexUiState:function(e){var t="function"==typeof e?e(u):e;l.setUiState(function(e){return C(C({},e),{},T({},o,t))})}}}function ta(e){var t=e.renderState,n=e.instantSearchInstance,e=e.parent,e=(e||n.mainIndex).getIndexId();n.renderState=C(C({},n.renderState),{},T({},e,C(C({},n.renderState[e]),t)))}function na(e,t){return e.toLocaleString(t)}var ra=l({name:"instantsearch"});function ia(){return"#"}var aa=function(){D(f,wr);var h=U(f);function f(e){A(this,f),T(b(n=h.call(this)),"client",void 0),T(b(n),"indexName",void 0),T(b(n),"insightsClient",void 0),T(b(n),"onStateChange",null),T(b(n),"helper",void 0),T(b(n),"mainHelper",void 0),T(b(n),"mainIndex",void 0),T(b(n),"started",void 0),T(b(n),"templatesConfig",void 0),T(b(n),"renderState",{}),T(b(n),"_stalledSearchDelay",void 0),T(b(n),"_searchStalledTimer",void 0),T(b(n),"_initialUiState",void 0),T(b(n),"_initialResults",void 0),T(b(n),"_createURL",void 0),T(b(n),"_searchFunction",void 0),T(b(n),"_mainHelperSearch",void 0),T(b(n),"middleware",[]),T(b(n),"sendEventToInsights",void 0),T(b(n),"status","idle"),T(b(n),"error",void 0),T(b(n),"scheduleSearch",ye(function(){n.started&&n.mainHelper.search()})),T(b(n),"scheduleRender",ye(function(){var e,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];null!=(e=n.mainHelper)&&e.hasPendingRequests()||(clearTimeout(n._searchStalledTimer),n._searchStalledTimer=null,t&&(n.status="idle",n.error=void 0)),n.mainIndex.render({instantSearchInstance:b(n)}),n.emit("render")})),T(b(n),"onInternalStateChange",ye(function(){var t=n.mainIndex.getWidgetUiState({});n.middleware.forEach(function(e){e.instance.onStateChange({uiState:t})})})),n.setMaxListeners(100);var n,r,t=e.indexName,t=void 0===t?null:t,i=e.numberLocale,a=e.initialUiState,a=void 0===a?{}:a,s=e.routing,s=void 0===s?null:s,o=e.insights,o=void 0!==o&&o,c=e.searchFunction,u=e.stalledSearchDelay,u=void 0===u?200:u,l=e.searchClient,l=void 0===l?null:l,d=e.insightsClient,d=void 0===d?null:d,e=e.onStateChange,e=void 0===e?null:e;if(null===t)throw new Error(ra("The `indexName` option is required."));if(null===l)throw new Error(ra("The `searchClient` option is required."));if("function"!=typeof l.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof l.addAlgoliaAgent&&l.addAlgoliaAgent("instantsearch.js (".concat("4.55.0",")")),d&&"function"!=typeof d)throw new Error(ra("The `insightsClient` option should be a function."));return n.client=l,n.insightsClient=d,n.indexName=t,n.helper=null,n.mainHelper=null,n.mainIndex=ea({indexName:t}),n.onStateChange=e,n.started=!1,n.templatesConfig={helpers:(r={numberLocale:i}.numberLocale,{formatNumber:function(e,t){return na(Number(t(e)),r)},highlight:function(e,t){try{return t(Gr(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{return t(ti(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(ri(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{return t(ai(C(C({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var n=JSON.parse(e),r=n.method,i=n.payload;return t(Kt(r,C({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}),compileOptions:{}},n._stalledSearchDelay=u,n._searchStalledTimer=null,n._createURL=ia,n._initialUiState=a,n._initialResults=null,c&&(n._searchFunction=c),n.sendEventToInsights=v,s&&((l="boolean"==typeof s?{}:s).$$internal=!0,n.use(zi(l))),o&&((d="boolean"==typeof o?{}:o).$$internal=!0,n.use(fi(d))),pi()&&n.use(gi({$$internal:!0})),n}return W(f,[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var n=this,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t.map(function(e){var t=C({$$type:"__unknown__",$$internal:!1,subscribe:v,started:v,unsubscribe:v,onStateChange:v},e({instantSearchInstance:n}));return n.middleware.push({creator:e,instance:t}),t});return this.started&&i.forEach(function(e){e.subscribe(),e.started()}),this}},{key:"unuse",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.middleware.filter(function(e){return t.includes(e.creator)}).forEach(function(e){return e.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(e){return!t.includes(e.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw new Error(ra("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(ra("The widget definition expects a `render` and/or an `init` method."));return this.mainIndex.addWidgets(e),this}},{key:"removeWidget",value:function(e){return this.removeWidgets([e])}},{key:"removeWidgets",value:function(e){if(!Array.isArray(e))throw new Error(ra("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(e.some(function(e){return"function"!=typeof e.dispose}))throw new Error(ra("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var r=this;if(this.started)throw new Error(ra("The `start` method has already been called once."));var n,e,i=this.mainHelper||Hr(this.client,this.indexName);i.search=function(){return r.status="loading",r.scheduleRender(!1),i.searchOnlyWithDerivedHelpers()},this._searchFunction&&(n={search:function(){return new Promise(v)}},this._mainHelperSearch=i.search.bind(i),i.search=function(){var t=r.mainIndex.getHelper(),e=Hr(n,t.state.index,t.state);return e.once("search",function(e){e=e.state;t.overrideStateWithoutTriggeringChangeEvent(e),r._mainHelperSearch()}),e.on("change",function(e){e=e.state;t.setState(e)}),r._searchFunction(e),i}),i.on("error",function(e){var n,e=e.error;e instanceof Error||(n=e,e=Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},new Error(n.message))),e.error=e,r.error=e,r.status="error",r.scheduleRender(!1),r.emit("error",e)}),this.mainHelper=i,this.middleware.forEach(function(e){e.instance.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults?(e=this.scheduleSearch,this.scheduleSearch=ye(v),ye(function(){r.scheduleSearch=e})()):0<this.mainIndex.getWidgets().length&&this.scheduleSearch(),this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(e){e.instance.started()})}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null!=(e=this.mainHelper)&&e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.instance.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){e.status="stalled",e.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(ra("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var r="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&n?this.onStateChange({uiState:r,setUiState:function(e){pe("function"==typeof e?e(r):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(pe(r,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){if(this.started)return this._createURL(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});throw new Error(ra("The `start` method needs to be called before `createURL`."))}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(ra("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),f}(),Yt=Object.freeze({__proto__:null,history:qi}),sa=["configure"];function oa(e){e.configure;return E(e,sa)}cn=Object.freeze({__proto__:null,simple:Ki,singleIndex:function(t){return{$$type:"ais.singleIndex",stateToRoute:function(e){return oa(e[t]||{})},routeToState:function(){return T({},t,oa(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}))}}}}),lr=Object.freeze({__proto__:null,createInsightsMiddleware:fi,createRouterMiddleware:zi,isMetadataEnabled:pi,createMetadataMiddleware:gi});function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){return Array.isArray(t)?e.concat(t):e.concat([t])},[]).filter(Boolean).join(" ")}function M(e){var t=e.defaultTemplates,n=e.templates;return C({templatesConfig:e.templatesConfig},function(a,e){var s=1<arguments.length&&void 0!==e?e:{};return Le([].concat(w(Object.keys(a||{})),w(Object.keys(s)))).reduce(function(e,t){var n=a?a[t]:void 0,r=s[t],i=void 0!==r&&r!==n;return e.templates[t]=i?r:n,e.useCustomCompileOptions[t]=i,e},{templates:{},useCustomCompileOptions:{}})}(t,n))}function ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ua(e,t){return e(t={exports:{}},t.exports),t.exports}var e=ua(function(e,t){function b(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function R(e,t,n){if(t.charAt(n)==e.charAt(0)){for(var r=1,i=e.length;r<i;r++)if(t.charAt(n+r)!=e.charAt(r))return;return 1}}function c(e,t,n,r){for(var i=[],a=null,s=null,o=n[n.length-1];0<e.length;){if(s=e.shift(),o&&"<"==o.tag&&!(s.tag in p))throw new Error("Illegal content in < super tag.");if(S.tags[s.tag]<=S.tags.$||function(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#"}(s,r))n.push(s),s.nodes=c(e,s.tag,n,r);else{if("/"==s.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+s.n);if(a=n.pop(),s.n==a.n||function(e,t,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==e&&n[r].o==t)return 1}(s.n,a.n,r))return a.end=s.i,i;throw new Error("Nesting error: "+a.n+" vs. "+s.n)}"\n"==s.tag&&(s.last=0==e.length||"\n"==e[0].tag)}i.push(s)}if(0<n.length)throw new Error("missing closing tag: "+n.pop().n);return i}function r(e){var t,n=[];for(t in e.partials)n.push('"'+i(t)+'":{name:"'+i(e.partials[t].name)+'", '+r(e.partials[t])+"}");return"partials: {"+n.join(",")+"}, subs: "+function(e){var t,n=[];for(t in e)n.push('"'+i(t)+'": function(c,p,t,i) {'+e[t]+"}");return"{ "+n.join(",")+" }"}(e.subs)}function i(e){return e.replace(h,"\\\\").replace(u,'\\"').replace(l,"\\n").replace(d,"\\r").replace(f,"\\u2028").replace(m,"\\u2029")}function n(e){return~e.indexOf(".")?"d":"f"}function a(e,t){var n="<"+(t.prefix||"")+e.n+g++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+i(n)+'",c,p,"'+(e.indent||"")+'"));',n}function s(e,t){t.code+="t.b(t.t(t."+n(e.n)+'("'+i(e.n)+'",c,p,0)));'}function o(e){return"t.b("+e+");"}var S,_,u,l,d,h,f,m,p,g;_=/\S/,u=/\"/g,l=/\n/g,d=/\r/g,h=/\\/g,f=/\u2028/,m=/\u2029/,(S=t).tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},S.scan=function(e,t){var n,r,i,a,s,o=e.length,c=0,u=null,l="",d=[],h=!1,f=0,m=0,p="{{",g="}}";function v(){0<l.length&&(d.push({tag:"_t",text:new String(l)}),l="")}function y(e,t){if(v(),e&&function(){for(var e=!0,t=m;t<d.length;t++)if(!(e=S.tags[d[t].tag]<S.tags._v||"_t"==d[t].tag&&null===d[t].text.match(_)))return;return e}())for(var n,r=m;r<d.length;r++)d[r].text&&((n=d[r+1])&&">"==n.tag&&(n.indent=d[r].text.toString()),d.splice(r,1));else t||d.push({tag:"\n"});h=!1,m=d.length}for(t&&(t=t.split(" "),p=t[0],g=t[1]),f=0;f<o;f++)0==c?R(p,e,f)?(--f,v(),c=1):"\n"==e.charAt(f)?y(h):l+=e.charAt(f):1==c?(f+=p.length-1,c="="==(u=(n=S.tags[e.charAt(f+1)])?e.charAt(f+1):"_v")?(i=f,s=a=void 0,a="="+g,s=(r=e).indexOf(a,i),r=b(r.substring(r.indexOf("=",i)+1,s)).split(" "),p=r[0],g=r[r.length-1],f=s+a.length-1,0):(n&&f++,2),h=f):R(g,e,f)?(d.push({tag:u,n:b(l),otag:p,ctag:g,i:"/"==u?h-p.length:f+g.length}),l="",f+=g.length-1,c=0,"{"==u&&("}}"==g?f++:"}"===(i=d[d.length-1]).n.substr(i.n.length-1)&&(i.n=i.n.substring(0,i.n.length-1)))):l+=e.charAt(f);return y(h,!0),d},p={_t:!0,"\n":!0,$:!0,"/":!0},S.stringify=function(e,t,n){return"{code: function (c,p,i) { "+S.wrapMain(e.code)+" },"+r(e)+"}"},g=0,S.generate=function(e,t,n){g=0;var r={code:"",subs:{},partials:{}};return S.walk(e,r),n.asString?this.stringify(r,t,n):this.makeTemplate(r,t,n)},S.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},S.template=S.Template,S.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},S.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},S.codegen={"#":function(e,t){t.code+="if(t.s(t."+n(e.n)+'("'+i(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',S.walk(e.nodes,t),t.code+="});c.pop();}"},"^":function(e,t){t.code+="if(!t.s(t."+n(e.n)+'("'+i(e.n)+'",c,p,1),c,p,1,0,0,"")){',S.walk(e.nodes,t),t.code+="};"},">":a,"<":function(e,t){var n={partials:{},code:"",subs:{},inPartial:!0},e=(S.walk(e.nodes,n),t.partials[a(e,t)]);e.subs=n.subs,e.partials=n.partials},$:function(e,t){var n={subs:{},code:"",partials:t.partials,prefix:e.n};S.walk(e.nodes,n),t.subs[e.n]=n.code,t.inPartial||(t.code+='t.sub("'+i(e.n)+'",c,p,i);')},"\n":function(e,t){t.code+=o('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+n(e.n)+'("'+i(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=o('"'+i(e.text)+'"')},"{":s,"&":s},S.walk=function(e,t){for(var n,r=0,i=e.length;r<i;r++)(n=S.codegen[e[r].tag])&&n(e[r],t);return t},S.parse=function(e,t,n){return c(e,0,[],(n=n||{}).sectionTags||[])},S.cache={},S.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},S.compile=function(e,t){var n=S.cacheKey(e,t=t||{}),r=this.cache[n];if(r){var i,a=r.partials;for(i in a)delete a[i].instance;return r}return r=this.generate(this.parse(this.scan(e,t.delimiters),e,t),e,t),this.cache[n]=r}}),la=ua(function(e,t){function l(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}function s(e){return String(null==e?"":e)}var n,r,i,a,o,c,d;(t=t).Template=function(e,t,n,r){this.r=(e=e||{}).code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},t.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=s(e),c.test(e)?e.replace(n,"&").replace(r,"<").replace(i,">").replace(a,"'").replace(o,"""):e},t:s,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],r=t[n.name];if(n.instance&&n.base==r)return n.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[e].base=r,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);r=function(e,t,n,r,i,a){function s(){}function o(){}o.prototype=(s.prototype=e).subs;var c,u=new s;for(c in u.subs=new o,u.subsText={},u.buf="",r=r||{},u.stackSubs=r,u.subsText=a,t)r[c]||(r[c]=t[c]);for(c in r)u.subs[c]=r[c];for(c in i=i||{},u.stackPartials=i,n)i[c]||(i[c]=n[c]);for(c in i)u.partials[c]=i[c];return u}(r,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=r},rp:function(e,t,n,r){e=this.ep(e,n);return e?e.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(d(r))for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,i,a,s){return(!d(e)||0!==e.length)&&(n=!!(e="function"==typeof e?this.ms(e,t,n,r,i,a,s):e),!r&&n&&t&&t.push("object"==typeof e?e:t[t.length-1]),n)},d:function(e,t,n,r){var i,a=e.split("."),s=this.f(a[0],t,n,r),o=this.options.modelGet,c=null;if("."===e&&d(t[t.length-2]))s=t[t.length-1];else for(var u=1;u<a.length;u++)s=void 0!==(i=l(a[u],s,o))?(c=s,i):"";return!(r&&!s)&&(r||"function"!=typeof s||(t.push(c),s=this.mv(s,t,n),t.pop()),s)},f:function(e,t,n,r){for(var i=!1,a=!1,s=this.options.modelGet,o=t.length-1;0<=o;o--)if(void 0!==(i=l(e,t[o],s))){a=!0;break}return a?r||"function"!=typeof i?i:this.mv(i,t,n):!r&&""},ls:function(e,t,n,r,i){var a=this.options.delimiters;return this.options.delimiters=i,this.b(this.ct(s(e.call(t,r)),t,n)),this.options.delimiters=a,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,i,a,s){t=t[t.length-1],e=e.call(t);return"function"==typeof e?!!r||(r=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(e,t,n,r.substring(i,a),s)):e},mv:function(e,t,n){t=t[t.length-1],e=e.call(t);return"function"==typeof e?this.ct(s(e.call(t)),t,n):e},sub:function(e,t,n,r){var i=this.subs[e];i&&(this.activeSub=e,i(t,n,this,r),this.activeSub=!1)}},n=/&/g,r=/</g,i=/>/g,a=/\'/g,o=/\"/g,c=/[&<>\"\']/,d=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}),da=(e.Template=la.Template,e.template=e.Template,e),ha=function(e,t,n,r){t[0]=0;for(var i=1;i<t.length;i++){var a=t[i++],s=t[i]?(t[0]|=a?1:2,n[t[i++]]):t[++i];3===a?r[0]=s:4===a?r[1]=Object.assign(r[1]||{},s):5===a?(r[1]=r[1]||{})[t[++i]]=s:6===a?r[1][t[++i]]+=s+"":a?(a=e.apply(s,ha(e,s,n,["",null])),r.push(a),s[0]?t[0]|=2:(t[i-2]=0,t[i]=a)):r.push(s)}return r},fa=new Map;var ma=function(e){var t=fa.get(this);return t||(t=new Map,fa.set(this,t)),1<(t=ha(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,r=1,i="",a="",s=[0],o=function(e){1===r&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,i):3===r&&(e||i)?(s.push(3,e,i),r=2):2===r&&"..."===i&&e?s.push(4,e,0):2===r&&i&&!e?s.push(5,0,!0,i):5<=r&&((i||!e&&5===r)&&(s.push(r,0,i,n),r=6),e)&&(s.push(r,e,0,n),r=6),i=""},c=0;c<e.length;c++){c&&(1===r&&o(),o(c));for(var u=0;u<e[c].length;u++)t=e[c][u],1===r?"<"===t?(o(),s=[s],r=3):i+=t:4===r?i="--"===i&&">"===t?(r=1,""):t+i[0]:a?t===a?a="":i+=t:'"'===t||"'"===t?a=t:">"===t?(o(),r=1):r&&("="===t?(r=5,n=i,i=""):"/"===t&&(r<5||">"===e[c][u+1])?(o(),3===r&&(s=s[0]),(s=(r=s)[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(o(),r=2):i+=t),3===r&&"!--"===i&&(r=4,s=s[0])}return o(),s}(e)),t),arguments,[])).length?t:t[0]}.bind(j),pa=ca(ua(function(e){function t(){return e.exports=t=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},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),ga=ua(function(e){e.exports=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},e.exports.__esModule=!0,e.exports.default=e.exports}),la=(ca(ga),ua(function(e){e.exports=function(e,t){if(null==e)return{};var n,r=ga(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},e.exports.__esModule=!0,e.exports.default=e.exports})),va=ca(la),ya=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];Ra=(e={createElement:j,Fragment:kt}).createElement,Sa=e.Fragment,ba={createElement:Ra,Fragment:Sa}.createElement;var ba,Ra,Sa,_a=function(e){var r=e.parts,t=e.highlightedTagName,i=void 0===t?"mark":t,t=e.nonHighlightedTagName,a=void 0===t?"span":t,t=e.separator,s=void 0===t?", ":t,t=e.className,n=e.classNames,o=void 0===n?{}:n,n=va(e,ya);return Ra("span",pa({},n,{className:I(o.root,t)}),r.map(function(e,t){var n=t===r.length-1;return Ra(Sa,{key:t},e.map(function(e,t){return Ra(wa,{key:t,classNames:o,highlightedTagName:i,nonHighlightedTagName:a,isHighlighted:e.isHighlighted},e.value)}),!n&&Ra("span",{className:o.separator},s))}))};function wa(e){var t=e.classNames,n=e.children,r=e.highlightedTagName,i=e.isHighlighted,e=e.nonHighlightedTagName;return ba(i?r:e,{className:i?t.highlighted:t.nonHighlighted},n)}var Pa=["classNames"];function Na(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,Pa);return j(_a,m({classNames:{root:I("ais-Highlight",t.root),highlighted:I("ais-Highlight-highlighted",t.highlighted),nonHighlighted:I("ais-Highlight-nonHighlighted",t.nonHighlighted),separator:I("ais-Highlight-separator",t.separator)}},e))}var xa=["hit","attribute","cssClasses"];function Ia(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(Na,m({},E(e,xa),{parts:et(Ne(t._highlightResult,n)||[]).map(function(e){return we(te(e.value||""))}),classNames:r}))}var Fa=["classNames"];function Ta(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,Fa);return j(_a,m({classNames:{root:I("ais-ReverseHighlight",t.root),highlighted:I("ais-ReverseHighlight-highlighted",t.highlighted),nonHighlighted:I("ais-ReverseHighlight-nonHighlighted",t.nonHighlighted),separator:I("ais-ReverseHighlight-separator",t.separator)}},e))}var Ca=["hit","attribute","cssClasses"],Ea=["isHighlighted"];function ka(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(Ta,m({},E(e,Ca),{parts:et(Ne(t._highlightResult,n)||[]).map(function(e){return we(te(e.value||"")).map(function(e){var t=e.isHighlighted;return C(C({},E(e,Ea)),{},{isHighlighted:!t})})}),classNames:r}))}var ja=["classNames"];function La(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,ja);return j(_a,m({classNames:{root:I("ais-ReverseSnippet",t.root),highlighted:I("ais-ReverseSnippet-highlighted",t.highlighted),nonHighlighted:I("ais-ReverseSnippet-nonHighlighted",t.nonHighlighted),separator:I("ais-ReverseSnippet-separator",t.separator)}},e))}var Ma=["hit","attribute","cssClasses"],Oa=["isHighlighted"];function Ha(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(La,m({},E(e,Ma),{parts:et(Ne(t._snippetResult,n)||[]).map(function(e){return we(te(e.value||"")).map(function(e){var t=e.isHighlighted;return C(C({},E(e,Oa)),{},{isHighlighted:!t})})}),classNames:r}))}var Aa=["classNames"];function Wa(e){var t=e.classNames,t=void 0===t?{}:t,e=E(e,Aa);return j(_a,m({classNames:{root:I("ais-Snippet",t.root),highlighted:I("ais-Snippet-highlighted",t.highlighted),nonHighlighted:I("ais-Snippet-nonHighlighted",t.nonHighlighted),separator:I("ais-Snippet-separator",t.separator)}},e))}var Da=["hit","attribute","cssClasses"];function Ba(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return j(Wa,m({},E(e,Da),{parts:et(Ne(t._snippetResult,n)||[]).map(function(e){return we(te(e.value||""))}),classNames:r}))}function $a(e){var t=e.templates,n=e.templateKey,r=e.compileOptions,i=e.helpers,a=e.data,s=e.bindEvent,e=e.sendEvent,t=t[n];if("string"!=typeof t&&"function"!=typeof t)throw new Error("Template must be 'string' or 'function', was '".concat(y(t),"' (key: ").concat(n,")"));return"function"==typeof t?((n=s||{}).html=ma,n.sendEvent=e,n.components={Highlight:Ia,ReverseHighlight:ka,Snippet:Ba,ReverseSnippet:Ha},t(a,n)):(s=function(e,t,n){var r=0<arguments.length&&void 0!==e?e:{},i=1<arguments.length?t:void 0,a=2<arguments.length?n:void 0;return Object.keys(r).reduce(function(e,n){return C(C({},e),{},T({},n,function(){var t=this;return function(e){return r[n].call(a,e,function(e){return da.compile(e,i).render(t)})}}))},{})}(i,r,a),da.compile(t,r).render(C(C({},a),{},{helpers:s})).replace(/[ \n\r\t\f\xA0]+/g,function(e){return e.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")}).trim())}var g=function(){D(t,jt);var e=U(t);function t(){return A(this,t),e.apply(this,arguments)}return W(t,[{key:"shouldComponentUpdate",value:function(e){return!ke(this.props.data,e.data)||this.props.templateKey!==e.templateKey||!ke(this.props.rootProps,e.rootProps)}},{key:"render",value:function(){var e=this.props.rootTagName,t=this.props.useCustomCompileOptions[this.props.templateKey]?this.props.templatesConfig.compileOptions:{},t=$a({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:t,helpers:this.props.templatesConfig.helpers,data:this.props.data,bindEvent:this.props.bindEvent,sendEvent:this.props.sendEvent});return null===t?null:"object"===y(t)?j(e,this.props.rootProps,t):j(e,m({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:t}}))}}]),t}(),Ua=(T(g,"defaultProps",{data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}}),function(e){var t=e.hits,n=e.isLoading,r=e.cssClasses,i=e.templateProps;return j("div",{className:I(r.root,0===t.length&&r.emptyRoot)},j(g,m({},i,{templateKey:"header",rootProps:{className:r.header},data:{hits:t,isLoading:n}})),n?j(g,m({},i,{templateKey:"loader",rootProps:{className:r.loader}})):j("ul",{className:r.list},t.map(function(e,t){return j(g,m({},i,{templateKey:"item",rootTagName:"li",rootProps:{className:r.item},key:e.objectID,data:C(C({},e),{},{get __hitIndex(){return t}})}))})))}),qa={header:function(){return""},loader:function(){return""},item:function(e){return JSON.stringify(e)}},Qa=l({name:"answers"}),Va=i("Answers"),Ka=["container","widgets","fallbackWidget"],za=l({name:"dynamic-widgets"}),Ja=i("DynamicWidgets");function Za(e){var t=document.createElement("div");return t.className=Ja({descendantName:"widget"}),e.appendChild(t),t}function Ya(e){var n,i,a,s,t,r=(e=e||{}).container,o=e.widgets,c=e.fallbackWidget,e=E(e,Ka);if(!r)throw new Error(za("The `container` option is required."));if(o&&Array.isArray(o)&&o.every(function(e){return"function"==typeof e}))return n=P(r),(i=document.createElement("div")).className=Ja(),a=new Map,s=[],t=nt(function(e,t){e=e.attributesToRender;t&&n.appendChild(i),e.forEach(function(e){a.has(e)&&(e=a.get(e),i.appendChild(e))})},function(){n.removeChild(i)})(C(C({},e),{},{widgets:s,fallbackWidget:"function"==typeof c?function(e){var e=e.attribute,t=Za(i);return a.set(e,t),c({attribute:e,container:t})}:void 0})),C(C({},t),{},{init:function(r){o.forEach(function(e){var t=Za(i),e=e(t),n=Fe(e,r);a.set(n,t),s.push(e)}),t.init(r)},$$widgetType:"ais.dynamicWidgets"});throw new Error(za("The `widgets` option expects an array of callbacks."))}function Xa(e,t){var n=e.items,r=e.widgetParams,e=e.canRefine;t||(t=r.container,r=r.cssClasses,L(j(ds,{cssClasses:r,items:n,canRefine:e}),t))}function Ga(e){var t=e.className,n=e.disabled;return j("button",{className:t,onClick:e.onClick,disabled:void 0!==n&&n},e.children)}function es(e){var t=e.classNameLabel,n=e.classNameInput,r=e.checked,i=e.onToggle,e=e.children;return j("label",{className:t},j("input",{className:n,type:"checkbox",checked:r,onChange:i}),e)}function ts(e,t){var n,r,i,a,s=e.items,o=e.position,c=e.currentRefinement,u=e.refine,l=e.clearMapRefinement,d=e.toggleRefineOnMapMove,h=e.isRefineOnMapMove,f=e.setMapMoveSinceLastRefine,m=e.hasMapMoveSinceLastRefine,p=e.isRefinedWithMap,g=e.widgetParams,e=e.instantSearchInstance,v=g.container,y=g.googleReference,b=g.cssClasses,R=g.templates,S=g.initialZoom,_=g.initialPosition,w=g.enableRefine,P=g.enableClearMapRefinement,N=g.enableRefineControl,x=g.mapOptions,I=g.createMarker,F=g.markerOptions,T=g.renderState;t?(T.isUserInteraction=!0,T.isPendingRefine=!1,T.markers=[],(g=document.createElement("div")).className=b.root,v.appendChild(g),(t=document.createElement("div")).className=b.map,g.appendChild(t),(n=document.createElement("div")).className=b.tree,g.appendChild(n),T.mapInstance=new y.maps.Map(t,C({mapTypeControl:!1,fullscreenControl:!1,streetViewControl:!1,clickableIcons:!1,zoomControlOptions:{position:y.maps.ControlPosition.LEFT_TOP}},x)),y.maps.event.addListenerOnce(T.mapInstance,"idle",function(){function e(){T.isUserInteraction&&w&&(f(),h())&&(T.isPendingRefine=!0)}T.mapInstance.addListener("center_changed",e),T.mapInstance.addListener("zoom_changed",e),T.mapInstance.addListener("dragstart",e),T.mapInstance.addListener("idle",function(){T.isUserInteraction&&T.isPendingRefine&&(T.isPendingRefine=!1,vs({mapInstance:T.mapInstance,refine:u}))})}),T.templateProps=M({templatesConfig:e.templatesConfig,templates:R})):(g=s.map(function(e){return e.objectID}),t=(n=k(ys(T.markers,g),2))[0],x=n[1],r=t.map(function(e){return e.__id}),e=s.filter(function(e){return!r.includes(e.objectID)}),x.forEach(function(e){return e.setMap(null)}),T.markers=t.concat(e.map(function(n){var r=I({map:T.mapInstance,item:n});return Object.keys(F.events).forEach(function(t){r.addListener(t,function(e){F.events[t]({map:T.mapInstance,event:e,item:n,marker:r})})}),r})),R=!m(),i=c?0:null,(a=!c&&Boolean(T.markers.length)?bs(y,T.markers):c)&&R?Rs(T,function(){T.mapInstance.fitBounds(new y.maps.LatLngBounds(a.southWest,a.northEast),i)}):R&&Rs(T,function(){T.mapInstance.setCenter(o||_),T.mapInstance.setZoom(S)}),L(j(gs,{cssClasses:b,enableRefine:w,enableRefineControl:N,enableClearMapRefinement:P,isRefineOnMapMove:h(),isRefinedWithMap:p(),hasMapMoveSinceLastRefine:m(),onRefineToggle:d,onRefineClick:function(){return vs({mapInstance:T.mapInstance,refine:u})},onClearClick:l,templateProps:T.templateProps}),v.querySelector(".".concat(b.tree))))}var ns=l({name:"analytics"}),rs=function(e){var r=e.items,i=e.cssClasses,a=e.templateProps,s=e.createURL,o=e.refine;return j("div",{className:I(i.root,0===r.length&&i.noRefinementRoot)},j("ul",{className:i.list},j("li",{className:I(i.item,0===r.length&&i.selectedItem)},j(g,m({},a,{templateKey:"home",rootTagName:"a",rootProps:{className:i.link,href:s(void 0),onClick:function(e){e.preventDefault(),o(void 0)}}}))),r.map(function(t,e){var n=e===r.length-1;return j("li",{key:t.label+e,className:I(i.item,n&&i.selectedItem)},j(g,m({},a,{templateKey:"separator",rootTagName:"span",rootProps:{className:i.separator,"aria-hidden":!0}})),n?t.label:j("a",{className:i.link,href:s(t.value),onClick:function(e){e.preventDefault(),o(t.value)}},t.label))})))},is={home:function(){return"Home"},separator:function(){return">"}},as=l({name:"breadcrumb"}),ss=i("Breadcrumb"),os=function(e){var t=e.hasRefinements,n=e.refine,r=e.cssClasses,e=e.templateProps;return j("div",{className:r.root},j(g,m({},e,{templateKey:"resetLabel",rootTagName:"button",rootProps:{className:I(r.button,!t&&r.disabledButton),onClick:n,disabled:!t},data:{hasRefinements:t}})))},cs={resetLabel:function(){return"Clear refinements"}},us=l({name:"clear-refinements"}),ls=i("ClearRefinements"),ds=function(e){var t=e.items,a=e.cssClasses,e=e.canRefine;return j("div",{className:I(a.root,!e&&a.noRefinementRoot)},j("ul",{className:a.list},t.map(function(i,e){return j("li",{key:"".concat(i.indexName,"-").concat(i.attribute,"-").concat(e),className:a.item},j("span",{className:a.label},(e=i.label).toString().charAt(0).toUpperCase()+e.toString().slice(1),":"),i.refinements.map(function(e){return j("span",{key:(n=e.attribute,r=e.value,[n,e.type,r,e.operator].map(function(e){return e}).filter(Boolean).join(":")),className:a.category},j("span",{className:a.categoryLabel},"query"===e.attribute?j("q",null,e.label):e.label),j("button",{className:a.delete,onClick:(t=i.refine.bind(null,e),function(e){je(e)||(e.preventDefault(),t())})},"✕"));var t,n,r}))})))},hs=l({name:"current-refinements"}),fs=i("CurrentRefinements"),ms=j("p",null,"Your custom HTML Marker"),ps={HTMLMarker:function(){return ms},reset:function(){return"Clear the map refinement"},toggle:function(){return"Search as I move the map"},redo:function(){return"Redo search here"}},gs=function(e){var t=e.cssClasses,n=e.enableRefine,r=e.enableRefineControl,i=e.enableClearMapRefinement,a=e.isRefineOnMapMove,s=e.isRefinedWithMap,o=e.hasMapMoveSinceLastRefine,c=e.onRefineToggle,u=e.onRefineClick,l=e.onClearClick,e=e.templateProps;return j(kt,null,n&&j("div",null,r&&j("div",{className:t.control},a||!o?j(es,{classNameLabel:I(t.label,a&&t.selectedLabel),classNameInput:t.input,checked:a,onToggle:c},j(g,m({},e,{templateKey:"toggle",rootTagName:"span"}))):j(Ga,{className:t.redo,disabled:!o,onClick:u},j(g,m({},e,{templateKey:"redo",rootTagName:"span"})))),!r&&!a&&j("div",{className:t.control},j(Ga,{className:I(t.redo,!o&&t.disabledRedo),disabled:!o,onClick:u},j(g,m({},e,{templateKey:"redo",rootTagName:"span"})))),i&&s&&j(Ga,{className:t.reset,onClick:l},j(g,m({},e,{templateKey:"reset",rootTagName:"span"})))))},vs=function(e){var t=e.refine,e=e.mapInstance;return t({northEast:e.getBounds().getNorthEast().toJSON(),southWest:e.getBounds().getSouthWest().toJSON()})},ys=function(e,r){return e.reduce(function(e,t){var e=k(e,2),n=e[0],e=e[1];return r.includes(t.__id)?[n.concat(t),e]:[n,e.concat(t)]},[[],[]])},bs=function(e,t){t=t.reduce(function(e,t){return e.extend(t.getPosition())},new e.maps.LatLngBounds);return{northEast:t.getNorthEast().toJSON(),southWest:t.getSouthWest().toJSON()}},Rs=function(e,t){e.isUserInteraction=!1,t(),e.isUserInteraction=!0},Ss=["initialZoom","initialPosition","templates","cssClasses","builtInMarker","customHTMLMarker","enableRefine","enableClearMapRefinement","enableRefineControl","container","googleReference"],_s=["item"],ws=["item"],Ps=l({name:"geo-search"}),Ns=i("GeoSearch"),la={query:"",showSubmit:!0,showReset:!0,showLoadingIndicator:!0,autofocus:!1,searchAsYouType:!0,isSearchStalled:!1,disabled:!1,onChange:v,onSubmit:v,onReset:v,refine:v},xs=function(){D(i,jt);var r=U(i);function i(){var a;A(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(b(a=r.call.apply(r,[this].concat(t))),"state",{query:a.props.query,focused:!1}),T(b(a),"input",Et()),T(b(a),"onInput",function(e){var t=a.props,n=t.searchAsYouType,r=t.refine,t=t.onChange,i=e.target.value;n&&r(i),a.setState({query:i}),t(e)}),T(b(a),"onSubmit",function(e){var t=a.props,n=t.searchAsYouType,r=t.refine,t=t.onSubmit;return e.preventDefault(),e.stopPropagation(),a.input.current&&a.input.current.blur(),n||r(a.state.query),t(e),!1}),T(b(a),"onReset",function(e){var t=a.props,n=t.refine,t=t.onReset;a.input.current&&a.input.current.focus(),n(""),a.setState({query:""}),t(e)}),T(b(a),"onBlur",function(){a.setState({focused:!1})}),T(b(a),"onFocus",function(){a.setState({focused:!0})}),a}return W(i,[{key:"resetInput",value:function(){this.setState({query:""})}},{key:"componentWillReceiveProps",value:function(e){this.state.focused||e.query===this.state.query||this.setState({query:e.query})}},{key:"render",value:function(){var e=this.props,t=e.cssClasses,n=e.placeholder,r=e.autofocus,i=e.showSubmit,a=e.showReset,s=e.showLoadingIndicator,o=e.templates,e=e.isSearchStalled;return j("div",{className:t.root},j("form",{action:"",role:"search",className:t.form,noValidate:!0,onSubmit:this.onSubmit,onReset:this.onReset},j("input",{ref:this.input,value:this.state.query,disabled:this.props.disabled,className:t.input,type:"search",placeholder:n,autoFocus:r,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus}),j(g,{templateKey:"submit",rootTagName:"button",rootProps:{className:t.submit,type:"submit",title:"Submit the search query.",hidden:!i},templates:o,data:{cssClasses:t}}),j(g,{templateKey:"reset",rootTagName:"button",rootProps:{className:t.reset,type:"reset",title:"Clear the search query.",hidden:!(a&&this.state.query.trim()&&!e)},templates:o,data:{cssClasses:t}}),s&&j(g,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:t.loadingIndicator,hidden:!e},templates:o,data:{cssClasses:t}})))}}]),i}();function Is(e){var t=e.className,n=e.handleClick,r=e.facetValueToRefine,i=e.isRefined,a=e.templateProps,s=e.templateKey,o=e.templateData,e=e.subItems;return j("li",{className:t,onClick:function(e){n({facetValueToRefine:r,isRefined:i,originalEvent:e})}},j(g,m({},a,{templateKey:s,data:o})),e)}T(xs,"defaultProps",la);var Fs=["root"];function Ts(e){return void 0!==e.data}var Cs=function(){D(a,jt);var t=U(a);function a(e){return A(this,a),T(b(e=t.call(this,e)),"searchBox",Et()),e.handleItemClick=e.handleItemClick.bind(b(e)),e}return W(a,[{key:"shouldComponentUpdate",value:function(e){return!ke(this.props.facetValues,e.facetValues)}},{key:"refine",value:function(e){this.props.toggleRefinement(e)}},{key:"_generateFacetItem",value:function(e){Ts(e)&&Array.isArray(e.data)&&0<e.data.length&&((t=this.props.cssClasses).root,t=E(t,Fs),t=j(a,m({},this.props,{cssClasses:t,depth:this.props.depth+1,facetValues:e.data,showMore:!1,className:this.props.cssClasses.childList})));var t,n=this.props.createURL(e.value),n=C(C({},e),{},{url:n,attribute:this.props.attribute,cssClasses:this.props.cssClasses,isFromSearch:this.props.isFromSearch}),r=e.value,i=(void 0!==e.isRefined&&(r+="/".concat(e.isRefined)),void 0!==e.count&&(r+="/".concat(e.count)),I(this.props.cssClasses.item,e.isRefined&&this.props.cssClasses.selectedItem,!e.count&&this.props.cssClasses.disabledItem,Boolean(Ts(e)&&Array.isArray(e.data)&&0<e.data.length)&&this.props.cssClasses.parentItem));return j(Is,{templateKey:"item",key:r,facetValueToRefine:e.value,handleClick:this.handleItemClick,isRefined:e.isRefined,className:i,subItems:t,templateData:n,templateProps:this.props.templateProps})}},{key:"handleItemClick",value:function(e){var t=e.facetValueToRefine,n=e.isRefined,r=e.originalEvent;if(!je(r)&&r.target instanceof HTMLElement&&r.target.parentNode instanceof HTMLElement&&(!n||!r.target.parentNode.querySelector('input[type="radio"]:checked'))){if("INPUT"!==r.target.tagName){for(var i=r.target;i!==r.currentTarget;){if("LABEL"===i.tagName&&(i.querySelector('input[type="checkbox"]')||i.querySelector('input[type="radio"]')))return;"A"===i.tagName&&i.href&&r.preventDefault(),i=i.parentNode}r.stopPropagation()}this.refine(t)}}},{key:"componentWillReceiveProps",value:function(e){this.searchBox.current&&!e.isFromSearch&&this.searchBox.current.resetInput()}},{key:"refineFirstValue",value:function(){var e=this.props.facetValues&&this.props.facetValues[0];e&&(e=e.value,this.props.toggleRefinement(e))}},{key:"render",value:function(){var t=this,e=I(this.props.cssClasses.showMore,!(!0===this.props.showMore&&this.props.canToggleShowMore)&&this.props.cssClasses.disabledShowMore),e=!0===this.props.showMore&&j(g,m({},this.props.templateProps,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:e,disabled:!this.props.canToggleShowMore,onClick:this.props.toggleShowMore},data:{isShowingMore:this.props.isShowingMore}})),n=!0!==this.props.searchIsAlwaysActive&&!(this.props.isFromSearch||!this.props.hasExhaustiveItems),n=this.props.searchFacetValues&&j("div",{className:this.props.cssClasses.searchBox},j(xs,{ref:this.searchBox,placeholder:this.props.searchPlaceholder,disabled:n,cssClasses:this.props.cssClasses.searchable,templates:this.props.searchBoxTemplateProps.templates,onChange:function(e){return t.props.searchFacetValues(e.target.value)},onReset:function(){return t.props.searchFacetValues("")},onSubmit:function(){return t.refineFirstValue()},searchAsYouType:!1})),r=this.props.facetValues&&0<this.props.facetValues.length&&j("ul",{className:this.props.cssClasses.list},this.props.facetValues.map(this._generateFacetItem,this)),i=this.props.searchFacetValues&&this.props.isFromSearch&&(!this.props.facetValues||0===this.props.facetValues.length)&&j(g,m({},this.props.templateProps,{templateKey:"searchableNoResults",rootProps:{className:this.props.cssClasses.noResults}}));return j("div",{className:I(this.props.cssClasses.root,(!this.props.facetValues||0===this.props.facetValues.length)&&this.props.cssClasses.noRefinementRoot,this.props.className)},this.props.children,n,r,i,e)}}]),a}(),Es=(T(Cs,"defaultProps",{cssClasses:{},depth:0}),{item:function(e){var t=e.url,n=e.label,r=e.count,i=e.cssClasses,e=e.isRefined;return j("a",{className:I(I(i.link),I(e?i.selectedItemLink:void 0)),href:t},j("span",{className:I(i.label)},n),j("span",{className:I(i.count)},na(r)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"}}),ks=l({name:"hierarchical-menu"}),S=i("HierarchicalMenu");function js(e){var t=e.results,n=e.hits,r=e.insights,i=e.bindEvent,a=e.sendEvent,s=e.cssClasses,o=e.templateProps,c=zt({insights:r,sendEvent:a});return 0===t.hits.length?j(g,m({},o,{templateKey:"empty",rootProps:{className:I(s.root,s.emptyRoot),onClick:c},data:t})):j("div",{className:s.root},j("ol",{className:s.list},n.map(function(t,e){return j(g,m({},o,{templateKey:"item",rootTagName:"li",rootProps:{className:s.item,onClick:function(e){c(e),a("click:internal",t,"Hit Clicked")}},key:t.objectID,data:C(C({},t),{},{get __hitIndex(){return e}}),bindEvent:i,sendEvent:a}))})))}var Ls={empty:function(){return"No results"},item:function(e){return JSON.stringify(ze(e,["__hitIndex"]),null,2)}},Ms=l({name:"hits"}),Os=i("Hits");function Hs(e){var t=e.currentValue,n=e.options,r=e.cssClasses,i=e.setValue;return j("select",{className:I(r.select),onChange:function(e){return i(e.target.value)},value:"".concat(t)},n.map(function(e){return j("option",{className:I(r.option),key:e.label+e.value,value:"".concat(e.value)},e.label)}))}var As=l({name:"hits-per-page"}),Ws=i("HitsPerPage"),Ds=function(e){var t=e.results,n=e.hits,r=e.insights,i=e.bindEvent,a=e.sendEvent,s=e.hasShowPrevious,o=e.showPrevious,c=e.showMore,u=e.isFirstPage,l=e.isLastPage,d=e.cssClasses,h=e.templateProps,f=zt({insights:r,sendEvent:a});return 0===t.hits.length?j(g,m({},h,{templateKey:"empty",rootProps:{className:I(d.root,d.emptyRoot),onClick:f},data:t})):j("div",{className:d.root},s&&j(g,m({},h,{templateKey:"showPreviousText",rootTagName:"button",rootProps:{className:I(d.loadPrevious,u&&d.disabledLoadPrevious),disabled:u,onClick:o}})),j("ol",{className:d.list},n.map(function(t,e){return j(g,m({},h,{templateKey:"item",rootTagName:"li",rootProps:{className:d.item,onClick:function(e){f(e),a("click:internal",t,"Hit Clicked")}},key:t.objectID,data:C(C({},t),{},{get __hitIndex(){return e}}),bindEvent:i,sendEvent:a}))})),j(g,m({},h,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:I(d.loadMore,l&&d.disabledLoadMore),disabled:l,onClick:c}})))},Bs={empty:function(){return"No results"},showPreviousText:function(){return"Show previous results"},showMoreText:function(){return"Show more results"},item:function(e){return JSON.stringify(ze(e,["__hitIndex"]),null,2)}},$s=l({name:"infinite-hits"}),Us=i("InfiniteHits"),qs={item:function(e){var t=e.cssClasses,n=e.url,r=e.label,e=e.count;return j("a",{className:I(t.link),href:n},j("span",{className:I(t.label)},r),j("span",{className:I(t.count)},na(e)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"}},Qs=l({name:"menu"}),Vs=i("Menu");function Ks(e){var t=e.cssClasses,n=e.templateProps,r=e.items,i=e.refine,e=(Re(r,function(e){return e.isRefined})||{value:""}).value;return j("div",{className:I(t.root,0===r.length&&t.noRefinementRoot)},j("select",{className:t.select,value:e,onChange:function(e){i(e.target.value)}},j(g,m({},n,{templateKey:"defaultOption",rootTagName:"option",rootProps:{value:"",className:t.option}})),r.map(function(e){return j(g,m({},n,{templateKey:"item",rootTagName:"option",rootProps:{value:e.value,className:t.option},key:e.value,data:e}))})))}var zs={item:function(e){var t=e.label,e=e.count;return"".concat(t," (").concat(na(e),")")},defaultOption:function(){return"See all"}},Js=l({name:"menu-select"}),Zs=i("MenuSelect"),Ys={item:function(e){var t=e.cssClasses,n=e.attribute,r=e.label,e=e.isRefined;return j("label",{className:t.label},j("input",{type:"radio",className:t.radio,name:n,defaultChecked:e}),j("span",{className:t.labelText},r))}},Xs=l({name:"numeric-menu"}),Gs=i("NumericMenu");function eo(n){function t(t){return function(e){je(e)||(e.preventDefault(),n.setCurrentPage(t))}}return j("div",{className:I(n.cssClasses.root,n.nbPages<=1&&n.cssClasses.noRefinementRoot)},j("ul",{className:n.cssClasses.list},n.showFirst&&j(to,{ariaLabel:"First",className:n.cssClasses.firstPageItem,isDisabled:n.isFirstPage,templates:n.templates,templateKey:"first",pageNumber:0,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t}),n.showPrevious&&j(to,{ariaLabel:"Previous",className:n.cssClasses.previousPageItem,isDisabled:n.isFirstPage,templates:n.templates,templateKey:"previous",pageNumber:n.currentPage-1,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t}),n.pages.map(function(e){return j(to,{key:e,ariaLabel:"Page ".concat(e+1),className:n.cssClasses.pageItem,isSelected:e===n.currentPage,templates:n.templates,templateKey:"page",pageNumber:e,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t})}),n.showNext&&j(to,{ariaLabel:"Next",className:n.cssClasses.nextPageItem,isDisabled:n.isLastPage,templates:n.templates,templateKey:"next",pageNumber:n.currentPage+1,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t}),n.showLast&&j(to,{ariaLabel:"Last",className:n.cssClasses.lastPageItem,isDisabled:n.isLastPage,templates:n.templates,templateKey:"last",pageNumber:n.nbPages-1,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t})))}function to(e){var t=e.templates,n=e.templateKey,r=e.ariaLabel,i=e.pageNumber,a=e.className,s=e.isDisabled,s=void 0!==s&&s,o=e.isSelected,c=e.cssClasses,u=e.createURL,e=e.createClickHandler;return j("li",{className:I(c.item,a,s&&c.disabledItem,void 0!==o&&o&&c.selectedItem)},j(g,s?{rootTagName:"span",rootProps:{className:c.link},templateKey:n,templates:t,data:{page:i+1}}:{rootTagName:"a",rootProps:{className:c.link,"aria-label":r,href:u(i),onClick:e(i)},templateKey:n,templates:t,data:{page:i+1}}))}var no,_,ro,io,F=i("Pagination"),ao=l({name:"pagination"}),so={previous:function(){return"‹"},next:function(){return"›"},page:function(e){e=e.page;return"".concat(e)},first:function(){return"«"},last:function(){return"»"}},oo=0,co=[],uo=[],lo=N.__b,ho=N.__r,fo=N.diffed,mo=N.__c,po=N.unmount;function go(e,t){N.__h&&N.__h(_,e,oo||t),oo=0;t=_.__H||(_.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:uo}),t.__[e]}function vo(e){oo=1;var a,t=Po,n=void 0,s=go(no++,2);return s.t=t,s.__c||(s.__=[n?n(e):Po(void 0,e),function(e){var t=(s.__N||s.__)[0],e=s.t(t,e);t!==e&&(s.__N=[e,s.__[1]],s.__c.setState({}))}],(s.__c=_).u)||(_.u=!0,a=_.shouldComponentUpdate,_.shouldComponentUpdate=function(e,t,n){var r,i;return!s.__c.__H||((r=s.__c.__H.__.filter(function(e){return e.__c})).every(function(e){return!e.__N})||(i=!1,r.forEach(function(e){var t;e.__N&&(t=e.__[0],e.__=e.__N,e.__N=void 0,t!==e.__[0])&&(i=!0)}),!!i))&&(!a||a.call(this,e,t,n))}),s.__N||s.__}function yo(e){return oo=5,t=function(){return{current:e}},n=[],wo((r=go(no++,7)).__H,n)?(r.__V=t(),r.i=n,r.__h=t,r.__V):r.__;var t,n,r}function bo(){for(var t;t=co.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(So),t.__H.__h.forEach(_o),t.__H.__h=[]}catch(e){t.__H.__h=[],N.__e(e,t.__v)}}N.__b=function(e){"function"!=typeof e.type||e.o||e.type===kt?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),_=null,lo&&lo(e)},N.__r=function(e){ho&&ho(e),no=0;e=(_=e.__c).__H;e&&(ro===_?(e.__h=[],_.__h=[],e.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=uo,e.__N=e.i=void 0})):(e.__h.forEach(So),e.__h.forEach(_o),e.__h=[])),ro=_},N.diffed=function(e){fo&&fo(e);e=e.__c;e&&e.__H&&(!e.__H.__h.length||1!==co.push(e)&&io===N.requestAnimationFrame||((io=N.requestAnimationFrame)||function(e){function t(){clearTimeout(r),Ro&&cancelAnimationFrame(n),setTimeout(e)}var n,r=setTimeout(t,100);Ro&&(n=requestAnimationFrame(t))})(bo),e.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==uo&&(e.__=e.__V),e.i=void 0,e.__V=uo})),ro=_=null},N.__c=function(e,n){n.some(function(t){try{t.__h.forEach(So),t.__h=t.__h.filter(function(e){return!e.__||_o(e)})}catch(e){n.some(function(e){e.__h&&(e.__h=[])}),n=[],N.__e(e,t.__v)}}),mo&&mo(e,n)},N.unmount=function(e){po&&po(e);var t,e=e.__c;e&&e.__H&&(e.__H.__.forEach(function(e){try{So(e)}catch(e){t=e}}),e.__H=void 0,t)&&N.__e(t,e.__v)};var Ro="function"==typeof requestAnimationFrame;function So(e){var t=_,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),_=t}function _o(e){var t=_;e.__c=e.__(),_=t}function wo(n,e){return!n||n.length!==e.length||e.some(function(e,t){return e!==n[t]})}function Po(e,t){return"function"==typeof t?t(e):t}function No(t){var e,n,r=k(vo(t.isCollapsed),2),i=r[0],a=r[1],r=k(vo(!1),2),s=r[0],o=r[1],c=yo(null);return r=function(){var e=c.current;if(e)return e.appendChild(t.bodyElement),function(){e.removeChild(t.bodyElement)}},e=[c,t.bodyElement],n=go(no++,3),!N.__s&&wo(n.__H,e)&&(n.__=r,n.i=e,_.__H.__h.push(n)),s||t.isCollapsed===i||a(t.isCollapsed),j("div",{className:I(t.cssClasses.root,t.hidden&&t.cssClasses.noRefinementRoot,t.collapsible&&t.cssClasses.collapsibleRoot,i&&t.cssClasses.collapsedRoot),hidden:t.hidden},t.templates.header&&j("div",{className:t.cssClasses.header},j(g,{templates:t.templates,templateKey:"header",rootTagName:"span",data:t.data}),t.collapsible&&j("button",{className:t.cssClasses.collapseButton,"aria-expanded":!i,onClick:function(e){e.preventDefault(),o(!0),a(function(e){return!e})}},j(g,{templates:t.templates,templateKey:"collapseButtonText",rootTagName:"span",data:{collapsed:i}}))),j("div",{className:t.cssClasses.body,ref:c}),t.templates.footer&&j(g,{templates:t.templates,templateKey:"footer",rootProps:{className:t.cssClasses.footer},data:t.data}))}function xo(e){var t=e.style,e=e.children,n=Math.round(parseFloat(t.left)),r=[0,50,100].includes(n),e=Math.round(100*parseInt(e,10))/100;return j("div",{style:C(C({},t),{},{marginLeft:100===n?"-2px":0}),className:I("rheostat-marker","rheostat-marker-horizontal",r&&"rheostat-marker-large")},r&&j("div",{className:"rheostat-value"},e))}var Io=l({name:"panel"}),Fo=i("Panel"),To=["placesReference","defaultPosition"],Co=["places"],Eo=function(e){var t=e.url,n=e.theme,e=e.cssClasses;return j("div",{className:e.root},j("a",{href:t,target:"_blank",className:e.link,"aria-label":"Search by Algolia",rel:"noopener noreferrer"},j("svg",{height:"1.2em",className:e.logo,viewBox:"0 0 572 64",style:{width:"auto"}},j("path",{fill:"dark"===n?"#FFF":"#36395A",d:"M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.7-1.3-1-3.3-1.6-5.9-1.8l-4-.4c-3.7-.3-6.6-1.4-8.8-3.4a10 10 0 0 1-3.3-7.9c0-2.4.6-4.6 1.8-6.4a12 12 0 0 1 5-4.3c2.2-1 4.7-1.6 7.5-1.6s5.5.5 7.6 1.6a12 12 0 0 1 5 4.4c1.2 1.8 1.8 4 1.8 6.7h-6.5a6.4 6.4 0 0 0-3.5-5.9c-1-.6-2.6-1-4.4-1s-3.2.3-4.4 1c-1.1.6-2 1.4-2.6 2.4-.5 1-.8 2-.8 3.1a5 5 0 0 0 1.5 3.6c1 1 2.6 1.7 4.7 1.9l4 .3c2.8.2 5.2.8 7.2 1.8 2.1 1 3.7 2.2 4.9 3.8a9.7 9.7 0 0 1 1.7 5.8c0 2.5-.7 4.7-2 6.6a13 13 0 0 1-5.6 4.4c-2.4 1-5.2 1.6-8.4 1.6Zm35.6 0c-2.6 0-4.8-.4-6.7-1.3a13 13 0 0 1-4.7-3.5 17.1 17.1 0 0 1-3.6-10.4v-1c0-2 .3-3.8 1-5.6a13 13 0 0 1 7.3-8.3 15 15 0 0 1 6.3-1.4A13.2 13.2 0 0 1 64 24.3c1 2.2 1.6 4.6 1.6 7.2V34H39.4v-4.3h21.8l-1.8 2.2c0-2-.3-3.7-.9-5.1a7.3 7.3 0 0 0-2.7-3.4c-1.2-.7-2.7-1.1-4.6-1.1s-3.4.4-4.7 1.3a8 8 0 0 0-2.9 3.6c-.6 1.5-.9 3.3-.9 5.4 0 2 .3 3.7 1 5.3a7.9 7.9 0 0 0 2.8 3.7c1.3.8 3 1.3 5 1.3s3.8-.5 5.1-1.3c1.3-1 2.1-2 2.4-3.2h6a11.8 11.8 0 0 1-7 8.7 16 16 0 0 1-6.4 1.2ZM80 48c-2.2 0-4-.3-5.7-1a8.4 8.4 0 0 1-3.7-3.3 9.7 9.7 0 0 1-1.3-5.2c0-2 .5-3.8 1.5-5.2a9 9 0 0 1 4.3-3.1c1.8-.7 4-1 6.7-1H89v4.1h-7.5c-2 0-3.4.5-4.4 1.4-1 1-1.6 2.1-1.6 3.6s.5 2.7 1.6 3.6c1 1 2.5 1.4 4.4 1.4 1.1 0 2.2-.2 3.2-.7 1-.4 1.9-1 2.6-2 .6-1 1-2.4 1-4.2l1.7 2.1c-.2 2-.7 3.8-1.5 5.2a9 9 0 0 1-3.4 3.3 12 12 0 0 1-5.3 1Zm9.5-.7v-8.8h-1v-10c0-1.8-.5-3.2-1.4-4.1-1-1-2.4-1.4-4.2-1.4a142.9 142.9 0 0 0-10.2.4v-5.6a74.8 74.8 0 0 1 8.6-.4c3 0 5.5.4 7.5 1.2s3.4 2 4.4 3.6c1 1.7 1.4 4 1.4 6.7v18.4h-5Zm12.9 0V17.8h5v12.3h-.2c0-4.2 1-7.4 2.8-9.5a11 11 0 0 1 8.3-3.1h1v5.6h-2a9 9 0 0 0-6.3 2.2c-1.5 1.5-2.2 3.6-2.2 6.4v15.6h-6.4Zm34.4 1a15 15 0 0 1-6.6-1.3c-1.9-.9-3.4-2-4.7-3.5a15.5 15.5 0 0 1-2.7-5c-.6-1.7-1-3.6-1-5.4v-1c0-2 .4-3.8 1-5.6a15 15 0 0 1 2.8-4.9c1.3-1.5 2.8-2.6 4.6-3.5a16.4 16.4 0 0 1 13.3.2c2 1 3.5 2.3 4.8 4a12 12 0 0 1 2 6H144c-.2-1.6-1-3-2.2-4.1a7.5 7.5 0 0 0-5.2-1.7 8 8 0 0 0-4.7 1.3 8 8 0 0 0-2.8 3.6 13.8 13.8 0 0 0 0 10.3c.6 1.5 1.5 2.7 2.8 3.6s2.8 1.3 4.8 1.3c1.5 0 2.7-.2 3.8-.8a7 7 0 0 0 2.6-2c.7-1 1-2 1.2-3.2h6.2a11 11 0 0 1-2 6.2 15.1 15.1 0 0 1-11.8 5.5Zm19.7-1v-40h6.4V31h-1.3c0-3 .4-5.5 1.1-7.6a9.7 9.7 0 0 1 3.5-4.8A9.9 9.9 0 0 1 172 17h.3c3.5 0 6 1.1 7.9 3.5 1.7 2.3 2.6 5.7 2.6 10v16.8h-6.4V29.6c0-2.1-.6-3.8-1.8-5a6.4 6.4 0 0 0-4.8-1.8c-2 0-3.7.7-5 2a7.8 7.8 0 0 0-1.9 5.5v17h-6.4Zm63.8 1a12.2 12.2 0 0 1-10.9-6.2 19 19 0 0 1-1.8-7.3h1.4v12.5h-5.1v-40h6.4v19.8l-2 3.5c.2-3.1.8-5.7 1.9-7.7a11 11 0 0 1 4.4-4.5c1.8-1 3.9-1.5 6.1-1.5a13.4 13.4 0 0 1 12.8 9.1c.7 1.9 1 3.8 1 6v1c0 2.2-.3 4.1-1 6a13.6 13.6 0 0 1-13.2 9.4Zm-1.2-5.5a8.4 8.4 0 0 0 7.9-5c.7-1.5 1.1-3.3 1.1-5.3s-.4-3.8-1.1-5.3a8.7 8.7 0 0 0-3.2-3.6 9.6 9.6 0 0 0-9.2-.2 8.5 8.5 0 0 0-3.3 3.2c-.8 1.4-1.3 3-1.3 5v2.3a9 9 0 0 0 1.3 4.8 9 9 0 0 0 3.4 3c1.4.7 2.8 1 4.4 1Zm27.3 3.9-10-28.9h6.5l9.5 28.9h-6Zm-7.5 12.2v-5.7h4.9c1 0 2-.1 2.9-.4a4 4 0 0 0 2-1.4c.4-.7.9-1.6 1.2-2.7l8.6-30.9h6.2l-9.3 32.4a14 14 0 0 1-2.5 5 8.9 8.9 0 0 1-4 2.8c-1.5.6-3.4.9-5.6.9h-4.4Zm9-12.2v-5.2h6.4v5.2H248Z"}),j("path",{fill:"dark"===n?"#FFF":"#003DFF",d:"M534.4 9.1H528a.8.8 0 0 1-.7-.7V1.8c0-.4.2-.7.6-.8l6.5-1c.4 0 .8.2.9.6v7.8c0 .4-.4.7-.8.7zM428 35.2V.8c0-.5-.3-.8-.7-.8h-.2l-6.4 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.5 0 .8-.4.8-.8V43c0-.4-.3-.7-.6-.8-4.5-.5-4.5-6-4.5-7zm106.5-21.8H528c-.4 0-.7.4-.7.8v34c0 .4.3.8.7.8h6.5c.4 0 .8-.4.8-.8v-34c0-.5-.4-.8-.8-.8zm-17.7 21.8V.8c0-.5-.3-.8-.8-.8l-6.5 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.4 0 .8-.4.8-.8V43c0-.4-.3-.7-.7-.8-4.4-.5-4.4-6-4.4-7zm-22.2-20.6a16.5 16.5 0 0 1 8.6 9.3c.8 2.2 1.3 4.8 1.3 7.5a19.4 19.4 0 0 1-4.6 12.6 14.8 14.8 0 0 1-5.2 3.6c-2 .9-5.2 1.4-6.8 1.4a21 21 0 0 1-6.7-1.4 15.4 15.4 0 0 1-8.6-9.3 21.3 21.3 0 0 1 0-14.4 15.2 15.2 0 0 1 8.6-9.3c2-.8 4.3-1.2 6.7-1.2s4.6.4 6.7 1.2zm-6.7 27.6c2.7 0 4.7-1 6.2-3s2.2-4.3 2.2-7.8-.7-6.3-2.2-8.3-3.5-3-6.2-3-4.7 1-6.1 3c-1.5 2-2.2 4.8-2.2 8.3s.7 5.8 2.2 7.8 3.5 3 6.2 3zm-88.8-28.8c-6.2 0-11.7 3.3-14.8 8.2a18.6 18.6 0 0 0 4.8 25.2c1.8 1.2 4 1.8 6.2 1.7s.1 0 .1 0h.9c4.2-.7 8-4 9.1-8.1v7.4c0 .4.3.7.8.7h6.4a.7.7 0 0 0 .7-.7V14.2c0-.5-.3-.8-.7-.8h-13.5zm6.3 26.5a9.8 9.8 0 0 1-5.7 2h-.5a10 10 0 0 1-9.2-14c1.4-3.7 5-6.3 9-6.3h6.4v18.3zm152.3-26.5h13.5c.5 0 .8.3.8.7v33.7c0 .4-.3.7-.8.7h-6.4a.7.7 0 0 1-.8-.7v-7.4c-1.2 4-4.8 7.4-9 8h-.1a4.2 4.2 0 0 1-.5.1h-.9a10.3 10.3 0 0 1-7-2.6c-4-3.3-6.5-8.4-6.5-14.2 0-3.7 1-7.2 3-10 3-5 8.5-8.3 14.7-8.3zm.6 28.4c2.2-.1 4.2-.6 5.7-2V21.7h-6.3a9.8 9.8 0 0 0-9 6.4 10.2 10.2 0 0 0 9.1 13.9h.5zM452.8 13.4c-6.2 0-11.7 3.3-14.8 8.2a18.5 18.5 0 0 0 3.6 24.3 10.4 10.4 0 0 0 13 .6c2.2-1.5 3.8-3.7 4.5-6.1v7.8c0 2.8-.8 5-2.2 6.3-1.5 1.5-4 2.2-7.5 2.2l-6-.3c-.3 0-.7.2-.8.5l-1.6 5.5c-.1.4.1.8.5 1h.1c2.8.4 5.5.6 7 .6 6.3 0 11-1.4 14-4.1 2.7-2.5 4.2-6.3 4.5-11.4V14.2c0-.5-.4-.8-.8-.8h-13.5zm6.3 8.2v18.3a9.6 9.6 0 0 1-5.6 2h-1a10.3 10.3 0 0 1-8.8-14c1.4-3.7 5-6.3 9-6.3h6.4zM291 31.5A32 32 0 0 1 322.8 0h30.8c.6 0 1.2.5 1.2 1.2v61.5c0 1.1-1.3 1.7-2.2 1l-19.2-17a18 18 0 0 1-11 3.4 18.1 18.1 0 1 1 18.2-14.8c-.1.4-.5.7-.9.6-.1 0-.3 0-.4-.2l-3.8-3.4c-.4-.3-.6-.8-.7-1.4a12 12 0 1 0-2.4 8.3c.4-.4 1-.5 1.6-.2l14.7 13.1v-46H323a26 26 0 1 0 10 49.7c.8-.4 1.6-.2 2.3.3l3 2.7c.3.2.3.7 0 1l-.2.2a32 32 0 0 1-47.2-28.6z"}))))},ko=i("PoweredBy"),jo=l({name:"powered-by"}),Lo=l({name:"query-rule-context"}),Mo=function(e){var t=e.cssClasses,n=e.templates,e=e.items;return j(g,{templateKey:"default",templates:n,rootProps:{className:t.root},data:{items:e}})},Oo={default:function(e){e=e.items;return JSON.stringify(e,null,2)}},Ho=l({name:"query-rule-custom-data"}),Ao=i("QueryRuleCustomData"),Wo=function(){D(a,jt);var i=U(a);function a(){var n;A(this,a);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return T(b(n=i.call.apply(i,[this].concat(t))),"state",{min:n.props.values.min,max:n.props.values.max}),T(b(n),"onInput",function(t){return function(e){e=e.currentTarget.value;n.setState(T({},t,Number(e)))}}),T(b(n),"onSubmit",function(e){e.preventDefault(),n.props.refine([n.state.min,n.state.max])}),n}return W(a,[{key:"componentWillReceiveProps",value:function(e){this.setState({min:e.values.min,max:e.values.max})}},{key:"render",value:function(){var e=this.state,t=e.min,e=e.max,n=this.props,r=n.min,i=n.max,a=n.step,s=n.cssClasses,n=n.templateProps,o=!(!r||!i)&&i<=r,c=Boolean(t||e);return j("div",{className:I(s.root,!c&&s.noRefinement)},j("form",{className:s.form,onSubmit:this.onSubmit},j("label",{className:s.label},j("input",{className:I(s.input,s.inputMin),type:"number",min:r,max:i,step:a,value:null!=t?t:"",onInput:this.onInput("min"),placeholder:null==r?void 0:r.toString(),disabled:o})),j(g,m({},n,{templateKey:"separatorText",rootTagName:"span",rootProps:{className:s.separator}})),j("label",{className:s.label},j("input",{className:I(s.input,s.inputMax),type:"number",min:r,max:i,step:a,value:null!=e?e:"",onInput:this.onInput("max"),placeholder:null==i?void 0:i.toString(),disabled:o})),j(g,m({},n,{templateKey:"submitText",rootTagName:"button",rootProps:{type:"submit",className:s.submit,disabled:o}}))))}}]),a}(),Do=l({name:"range-input"}),Bo=i("RangeInput"),$o={separatorText:function(){return"to"},submitText:function(){return"Go"}},Uo=40,qo=35,Qo=27,Vo=36,Ko=37,zo=34,Jo=33,Zo=39,Yo=38,Xo=100;function Go(e,t,n){return(e-t)/(n-t)*100}function ec(e,t,n){return 0===e?t:100===e?n:Math.round((n-t)*(e/100)+t)}function tc(e){return["rheostat","vertical"===e.orientation?"rheostat-vertical":"rheostat-horizontal"].concat(e.className.split(" ")).join(" ")}function nc(e){return Number(e.currentTarget.getAttribute("data-handle-key"))}function rc(e){e.stopPropagation(),e.preventDefault()}var ic=j("div",{className:"rheostat-background"}),ac=function(){D(r,jt);var n=U(r);function r(e){var t;return A(this,r),T(b(t=n.call(this,e)),"state",{className:tc(t.props),handlePos:t.props.values.map(function(e){return Go(e,t.props.min,t.props.max)}),handleDimensions:0,mousePos:null,sliderBox:{},slidingIndex:null,values:t.props.values}),T(b(t),"rheostat",Et()),t.getPublicState=t.getPublicState.bind(b(t)),t.getSliderBoundingBox=t.getSliderBoundingBox.bind(b(t)),t.getProgressStyle=t.getProgressStyle.bind(b(t)),t.getMinValue=t.getMinValue.bind(b(t)),t.getMaxValue=t.getMaxValue.bind(b(t)),t.getHandleDimensions=t.getHandleDimensions.bind(b(t)),t.getClosestSnapPoint=t.getClosestSnapPoint.bind(b(t)),t.getSnapPosition=t.getSnapPosition.bind(b(t)),t.getNextPositionForKey=t.getNextPositionForKey.bind(b(t)),t.getNextState=t.getNextState.bind(b(t)),t.handleClick=t.handleClick.bind(b(t)),t.getClosestHandle=t.getClosestHandle.bind(b(t)),t.setStartSlide=t.setStartSlide.bind(b(t)),t.startMouseSlide=t.startMouseSlide.bind(b(t)),t.startTouchSlide=t.startTouchSlide.bind(b(t)),t.handleMouseSlide=t.handleMouseSlide.bind(b(t)),t.handleTouchSlide=t.handleTouchSlide.bind(b(t)),t.handleSlide=t.handleSlide.bind(b(t)),t.endSlide=t.endSlide.bind(b(t)),t.handleKeydown=t.handleKeydown.bind(b(t)),t.validatePosition=t.validatePosition.bind(b(t)),t.validateValues=t.validateValues.bind(b(t)),t.canMove=t.canMove.bind(b(t)),t.fireChangeEvent=t.fireChangeEvent.bind(b(t)),t.slideTo=t.slideTo.bind(b(t)),t.updateNewValues=t.updateNewValues.bind(b(t)),t}return W(r,[{key:"componentWillReceiveProps",value:function(n){var e=this.props,t=e.className,r=e.disabled,i=e.min,a=e.max,e=e.orientation,s=this.state,o=s.values,s=s.slidingIndex,i=n.min!==i||n.max!==a,a=o.length!==n.values.length||o.some(function(e,t){return n.values[t]!==e}),o=n.className!==t||n.orientation!==e,t=n.disabled&&!r;o&&this.setState({className:tc(n)}),(i||a)&&this.updateNewValues(n),t&&null!==s&&this.endSlide()}},{key:"getPublicState",value:function(){var e=this.props,t=e.min;return{max:e.max,min:t,values:this.state.values}}},{key:"getSliderBoundingBox",value:function(){var e=this.rheostat.current,t=e.getBoundingClientRect();return{height:t.height||e.clientHeight,left:t.left,top:t.top,width:t.width||e.clientWidth}}},{key:"getProgressStyle",value:function(e){var t=this.state.handlePos,n=t[e];return 0===e?"vertical"===this.props.orientation?{height:"".concat(n,"%"),top:0}:{left:0,width:"".concat(n,"%")}:(t=n-(n=t[e-1]),"vertical"===this.props.orientation?{height:"".concat(t,"%"),top:"".concat(n,"%")}:{left:"".concat(n,"%"),width:"".concat(t,"%")})}},{key:"getMinValue",value:function(e){return this.state.values[e-1]?Math.max(this.props.min,this.state.values[e-1]):this.props.min}},{key:"getMaxValue",value:function(e){return this.state.values[e+1]?Math.min(this.props.max,this.state.values[e+1]):this.props.max}},{key:"getHandleDimensions",value:function(e,t){e=e.currentTarget||null;return e?"vertical"===this.props.orientation?e.clientHeight/t.height*Xo/2:e.clientWidth/t.width*Xo/2:0}},{key:"getClosestSnapPoint",value:function(n){return this.props.snapPoints.length?this.props.snapPoints.reduce(function(e,t){return Math.abs(e-n)<Math.abs(t-n)?e:t}):n}},{key:"getSnapPosition",value:function(e){var t,n,r;return this.props.snap?(t=(n=this.props).max,r=ec(e,n=n.min,t),Go(this.getClosestSnapPoint(r),n,t)):e}},{key:"getNextPositionForKey",value:function(e,t){var n=this.state,r=n.handlePos,n=n.values,i=this.props,a=i.max,s=i.min,i=i.snapPoints,o=this.props.snap,c=n[e],r=r[e],u=r,l=1,d=(100<=a?r=Math.round(r):l=100/(a-s),null),e=(o&&(d=i.indexOf(this.getClosestSnapPoint(n[e]))),T(n={},Ko,function(e){return-1*e}),T(n,Zo,function(e){return e}),T(n,Yo,function(e){return e}),T(n,Uo,function(e){return-1*e}),T(n,zo,function(e){return 1<e?-e:-10*e}),T(n,Jo,function(e){return 1<e?e:10*e}),n);if(Object.prototype.hasOwnProperty.call(e,t))r+=e[t](l),o&&d&&(u<r?d<i.length-1&&(c=i[d+1]):0<d&&(c=i[d-1]));else if(t===Vo)r=0,o&&(c=i[0]);else{if(t!==qo)return null;r=Xo,o&&(c=i[i.length-1])}return o?Go(c,s,a):r}},{key:"getNextState",value:function(n,e){var t=this.state.handlePos,r=this.props,i=r.max,a=r.min,s=this.validatePosition(n,e),r=t.map(function(e,t){return t===n?s:e});return{handlePos:r,values:r.map(function(e){return ec(e,a,i)})}}},{key:"getClosestHandle",value:function(r){var i=this.state.handlePos;return i.reduce(function(e,t,n){return Math.abs(i[n]-r)<Math.abs(i[e]-r)?n:e},0)}},{key:"setStartSlide",value:function(e,t,n){var r=this.getSliderBoundingBox();this.setState({handleDimensions:this.getHandleDimensions(e,r),mousePos:{x:t,y:n},sliderBox:r,slidingIndex:nc(e)})}},{key:"startMouseSlide",value:function(e){this.setStartSlide(e,e.clientX,e.clientY),document.addEventListener("mousemove",this.handleMouseSlide,!1),document.addEventListener("mouseup",this.endSlide,!1),rc(e)}},{key:"startTouchSlide",value:function(e){var t;1<e.changedTouches.length||(t=e.changedTouches[0],this.setStartSlide(e,t.clientX,t.clientY),document.addEventListener("touchmove",this.handleTouchSlide,!1),document.addEventListener("touchend",this.endSlide,!1),this.props.onSliderDragStart&&this.props.onSliderDragStart(),rc(e))}},{key:"handleMouseSlide",value:function(e){null!==this.state.slidingIndex&&(this.handleSlide(e.clientX,e.clientY),rc(e))}},{key:"handleTouchSlide",value:function(e){var t;null!==this.state.slidingIndex&&(1<e.changedTouches.length?this.endSlide():(t=e.changedTouches[0],this.handleSlide(t.clientX,t.clientY),rc(e)))}},{key:"handleSlide",value:function(e,t){var n=this.state,r=n.slidingIndex,n=n.sliderBox,n="vertical"===this.props.orientation?(t-n.top)/n.height*Xo:(e-n.left)/n.width*Xo;this.slideTo(r,n),this.canMove(r,n)&&(this.setState({mousePos:{x:e,y:t}}),this.props.onSliderDragMove)&&this.props.onSliderDragMove()}},{key:"endSlide",value:function(){var e,t=this,n=this.state.slidingIndex;this.setState({slidingIndex:null}),document.removeEventListener("mouseup",this.endSlide,!1),document.removeEventListener("touchend",this.endSlide,!1),document.removeEventListener("touchmove",this.handleTouchSlide,!1),document.removeEventListener("mousemove",this.handleMouseSlide,!1),this.props.onSliderDragEnd&&this.props.onSliderDragEnd(),this.props.snap?(e=this.getSnapPosition(this.state.handlePos[n]),this.slideTo(n,e,function(){return t.fireChangeEvent()})):this.fireChangeEvent()}},{key:"handleClick",value:function(e){var t,n=this;e.target.getAttribute("data-handle-key")||(t=this.getSliderBoundingBox(),e=("vertical"===this.props.orientation?(e.clientY-t.top)/t.height:(e.clientX-t.left)/t.width)*Xo,t=this.getClosestHandle(e),e=this.getSnapPosition(e),this.slideTo(t,e,function(){return n.fireChangeEvent()}),this.props.onClick&&this.props.onClick())}},{key:"handleKeydown",value:function(e){var t,n=this,r=nc(e);e.keyCode===Qo?e.currentTarget.blur():null!==(t=this.getNextPositionForKey(r,e.keyCode))&&(this.canMove(r,t)&&(this.slideTo(r,t,function(){return n.fireChangeEvent()}),this.props.onKeyPress)&&this.props.onKeyPress(),rc(e))}},{key:"validatePosition",value:function(e,t){var n=this.state,r=n.handlePos,n=n.handleDimensions;return Math.max(Math.min(t,void 0!==r[e+1]?r[e+1]-n:Xo),void 0!==r[e-1]?r[e-1]+n:0)}},{key:"validateValues",value:function(e,t){var t=t||this.props,r=t.max,i=t.min;return e.map(function(e,t,n){e=Math.max(Math.min(e,r),i);return n.length&&e<n[t-1]?n[t-1]:e})}},{key:"canMove",value:function(e,t){var n=this.state,r=n.handlePos,n=n.handleDimensions;return!(t<0||Xo<t||(void 0!==r[e+1]?r[e+1]-n:1/0)<t||t<(void 0!==r[e-1]?r[e-1]+n:-1/0))}},{key:"fireChangeEvent",value:function(){var e=this.props.onChange;e&&e(this.getPublicState())}},{key:"slideTo",value:function(e,t,n){var r=this,e=this.getNextState(e,t);this.setState(e,function(){var e=r.props.onValuesUpdated;e&&e(r.getPublicState()),n&&n()})}},{key:"updateNewValues",value:function(e){var t,n,r,i=this;null===this.state.slidingIndex&&(t=e.max,n=e.min,r=e.values,r=this.validateValues(r,e),this.setState({handlePos:r.map(function(e){return Go(e,n,t)}),values:r},function(){return i.fireChangeEvent()}))}},{key:"render",value:function(){var r=this,e=this.props,t=e.children,n=e.disabled,i=e.handle,a=e.max,s=e.min,o=e.orientation,c=e.pitComponent,u=e.pitPoints,l=e.progressBar,e=this.state,d=e.className,h=e.handlePos,f=e.values;return j("div",{className:d,ref:this.rheostat,onClick:n?void 0:this.handleClick,style:{position:"relative"}},ic,h.map(function(e,t){e="vertical"===o?{top:"".concat(e,"%"),position:"absolute"}:{left:"".concat(e,"%"),position:"absolute"};return j(i,{"aria-valuemax":r.getMaxValue(t),"aria-valuemin":r.getMinValue(t),"aria-valuenow":f[t],"aria-disabled":n,"data-handle-key":t,className:"rheostat-handle",key:"handle-".concat(t),onClick:rc,onKeyDown:n?void 0:r.handleKeydown,onMouseDown:n?void 0:r.startMouseSlide,onTouchStart:n?void 0:r.startTouchSlide,role:"slider",style:e,tabIndex:0})}),h.map(function(e,t,n){return 0===t&&1<n.length?null:j(l,{className:"rheostat-progress",key:"progress-bar-".concat(t),style:r.getProgressStyle(t)})}),c&&u.map(function(e){var t=Go(e,s,a),t="vertical"===o?{top:"".concat(t,"%"),position:"absolute"}:{left:"".concat(t,"%"),position:"absolute"};return j(c,{key:"pit-".concat(e),style:t},e)}),t)}}]),r}(),sc=(T(ac,"defaultProps",{className:"",children:null,disabled:!1,handle:function(e){return j("button",m({},e,{type:"button"}))},max:Xo,min:0,onClick:null,onChange:null,onKeyPress:null,onSliderDragEnd:null,onSliderDragMove:null,onSliderDragStart:null,onValuesUpdated:null,orientation:"horizontal",pitComponent:null,pitPoints:[],progressBar:"div",snap:!1,snapPoints:[],values:[0]}),function(){D(a,jt);var i=U(a);function a(){var t;A(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return T(b(t=i.call.apply(i,[this].concat(n))),"handleChange",function(e){e=e.values;t.isDisabled||t.props.refine(e)}),T(b(t),"createHandleComponent",function(n){return function(e){var t=Math.round(100*parseFloat(e["aria-valuenow"]))/100,t="object"===y(n)&&n.format?n.format(t):t;return j("div",m({},e,{className:I(e.className,0===e["data-handle-key"]&&"rheostat-handle-lower",1===e["data-handle-key"]&&"rheostat-handle-upper")}),n&&j("div",{className:"rheostat-tooltip"},t))}}),t}return W(a,[{key:"isDisabled",get:function(){return this.props.min>=this.props.max}},{key:"computeDefaultPitPoints",value:function(e){var t=e.min,e=e.max,n=(e-t)/34;return[t].concat(w(Je({end:33}).map(function(e){return t+n*(e+1)})),[e])}},{key:"computeSnapPoints",value:function(e){var t=e.min,n=e.max,e=e.step;if(e)return[].concat(w(Je({start:t,end:n,step:e})),[n])}},{key:"render",value:function(){var e=this.props,t=e.tooltips,n=e.step,r=e.pips,i=e.values,e=e.cssClasses,a=this.isDisabled?{min:this.props.min,max:this.props.max+.001}:this.props,s=a.min,a=a.max,n=this.computeSnapPoints({min:s,max:a,step:n}),r=!1===r?[]:this.computeDefaultPitPoints({min:s,max:a});return j("div",{className:I(e.root,this.isDisabled&&e.disabledRoot)},j(ac,{handle:this.createHandleComponent(t),onChange:this.handleChange,min:s,max:a,pitComponent:xo,pitPoints:r,snap:!0,snapPoints:n,values:this.isDisabled?[s,a]:i,disabled:this.isDisabled}))}}]),a}()),oc=l({name:"range-slider"}),cc=i("RangeSlider");function uc(e){var t=e.children,n=e.count,r=e.value,i=e.url,e=e.cssClasses;return n?j("a",{className:I(e.link),"aria-label":"".concat(r," & up"),href:i},t):j("div",{className:I(e.link),"aria-label":"".concat(r," & up"),disabled:!0},t)}var lc={item:function(e){var t=e.count,n=e.value,r=e.url,i=e.stars,a=e.cssClasses;return j(uc,{count:t,value:n,url:r,cssClasses:a},i.map(function(e,t){return j("svg",{key:t,className:I(a.starIcon,e?a.fullStarIcon:a.emptyStarIcon),"aria-hidden":"true",width:"24",height:"24"},j("use",{xlinkHref:e?"#ais-RatingMenu-starSymbol":"#ais-RatingMenu-starEmptySymbol"}))}),j("span",{className:I(a.label)},"& Up"),t&&j("span",{className:I(a.count)},na(t)))}},dc=l({name:"rating-menu"}),O=i("RatingMenu"),hc=j("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"}),fc=j("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"}),mc=j("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"}),pc=j("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"}),gc=j("g",{fill:"none",fillRule:"evenodd"},j("g",{transform:"translate(1 1)",strokeWidth:"2"},j("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),j("path",{d:"M36 18c0-9.94-8.06-18-18-18"},j("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))),vc={reset:function(e){return j("svg",{className:e.cssClasses.resetIcon,viewBox:"0 0 20 20",width:"10",height:"10","aria-hidden":"true"},mc)},submit:function(e){return j("svg",{className:e.cssClasses.submitIcon,width:"10",height:"10",viewBox:"0 0 40 40","aria-hidden":"true"},pc)},loadingIndicator:function(e){return j("svg",{className:e.cssClasses.loadingIcon,width:"16",height:"16",viewBox:"0 0 38 38",stroke:"#444","aria-hidden":"true"},gc)}},yc={item:function(e){var t=e.cssClasses,n=e.count,r=e.value,i=e.highlighted,a=e.isRefined,e=e.isFromSearch;return j("label",{className:I(t.label)},j("input",{type:"checkbox",className:I(t.checkbox),value:r,defaultChecked:a}),j("span",{className:I(t.labelText),dangerouslySetInnerHTML:e?{__html:i}:void 0},!e&&i),j("span",{className:I(t.count)},na(n)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"},searchableNoResults:function(){return"No results"}},bc=l({name:"refinement-list"}),H=i("RefinementList"),Rc=i("SearchBox"),Sc=function(e){var t=e.cssClasses,n=e.templates,r=e.isRelevantSorted,i=e.isVirtualReplica,a=e.refine;return i?j("div",{className:t.root},j(g,{templateKey:"text",templates:n,rootProps:{className:t.text},data:{isRelevantSorted:r}}),j("button",{type:"button",className:t.button,onClick:function(){a(r?0:void 0)}},j(g,{rootTagName:"span",templateKey:"button",templates:n,data:{isRelevantSorted:r}}))):null},_c={text:function(){return""},button:function(e){return e.isRelevantSorted?"See all results":"See relevant results"}},wc=l({name:"relevant-sort"}),Pc=i("RelevantSort"),Nc=l({name:"search-box"}),xc=i("SearchBox"),Ic=l({name:"sort-by"}),Fc=i("SortBy"),Tc=["nbHits","nbSortedHits","cssClasses","templateProps"],Cc=function(e){var t=e.nbHits,n=e.nbSortedHits,r=e.cssClasses,i=e.templateProps,e=E(e,Tc);return j("div",{className:I(r.root)},j(g,m({},i,{templateKey:"text",rootTagName:"span",rootProps:{className:r.text},data:C({hasManySortedResults:n&&1<n,hasNoSortedResults:0===n,hasOneSortedResults:1===n,hasManyResults:1<t,hasNoResults:0===t,hasOneResult:1===t,nbHits:t,nbSortedHits:n,cssClasses:r},e)})))},Ec=l({name:"stats"}),kc=i("Stats"),jc={text:function(e){return"".concat((e.areHitsSorted?function(e){var t=e.nbHits,n=e.hasNoSortedResults,r=e.hasOneSortedResults,i=e.hasManySortedResults,e=e.nbSortedHits,t="sorted out of ".concat(na(t));if(n)return"No relevant results ".concat(t);if(r)return"1 relevant result ".concat(t);if(i)return"".concat(na(e||0)," relevant results ").concat(t);return""}:function(e){var t=e.nbHits,n=e.hasNoResults,r=e.hasOneResult,e=e.hasManyResults;if(n)return"No results";if(r)return"1 result";if(e)return"".concat(na(t)," results");return""})(e)," found in ").concat(e.processingTimeMS,"ms")}};function Lc(e){var t=e.status,n=e.errorCode,e=e.isListening;return"error"===t&&"not-allowed"===n?Dc:j(kt,null,j("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",fill:e?"currentColor":"none"}),Bc,$c,Uc)}function a(e){return new aa(e)}var Mc=function(e){var t=e.currentRefinement,n=e.refine,r=e.cssClasses,e=e.templateProps;return j("div",{className:r.root},j("label",{className:r.label},j("input",{className:r.checkbox,type:"checkbox",checked:t.isRefined,onChange:function(e){return n({isRefined:!e.target.checked})}}),j(g,m({},e,{rootTagName:"span",rootProps:{className:r.labelText},templateKey:"labelText",data:t}))))},Oc={labelText:function(e){return e.name}},Hc=l({name:"toggle-refinement"}),Ac=i("ToggleRefinement"),Wc=function(e){var t=e.cssClasses,n=e.isBrowserSupported,r=e.isListening,i=e.toggleListening,a=e.voiceListeningState,e=e.templates,s=a.status,o=a.transcript,c=a.isSpeechFinal,a=a.errorCode;return j("div",{className:t.root},j(g,{templateKey:"buttonText",rootTagName:"button",rootProps:{className:t.button,type:"button",title:"Search by voice".concat(n?"":" (not supported on this browser)"),onClick:function(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.blur(),i()},disabled:!n},data:{status:s,errorCode:a,isListening:r,transcript:o,isSpeechFinal:c,isBrowserSupported:n},templates:e}),j(g,{templateKey:"status",rootProps:{className:t.status},data:{status:s,errorCode:a,isListening:r,transcript:o,isSpeechFinal:c,isBrowserSupported:n},templates:e}))},Dc=j(kt,null,j("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),j("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"}),j("path",{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"}),j("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),j("line",{x1:"8",y1:"23",x2:"16",y2:"23"})),Bc=j("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),$c=j("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),Uc=j("line",{x1:"8",y1:"23",x2:"16",y2:"23"}),qc={buttonText:function(e){var t=e.status,n=e.errorCode,e=e.isListening;return j("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},j(Lc,{status:t,errorCode:n,isListening:e}))},status:function(e){return j("p",null,e.transcript)}},Qc=l({name:"voice-search"}),Vc=i("VoiceSearch"),e=K(function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.attributesForPrediction,c=e.queryLanguages,u=e.nbHits,l=e.searchDebounceTime,d=e.renderDebounceTime,h=e.escapeHTML,f=e.extraParameters,m=e.templates,m=void 0===m?{}:m,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Va(),e.root),emptyRoot:I(Va({modifierName:"empty"}),e.emptyRoot),header:I(Va({descendantName:"header"}),e.header),loader:I(Va({descendantName:"loader"}),e.loader),list:I(Va({descendantName:"list"}),e.list),item:I(Va({descendantName:"item"}),e.item)},i=(e={containerNode:t,cssClasses:n,templates:m,renderState:{}}).containerNode,a=e.cssClasses,s=e.renderState,o=e.templates,C(C({},tt(function(e,t){var n=e.hits,r=e.isLoading,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:qa,templatesConfig:e.templatesConfig,templates:o}):L(j(Ua,{cssClasses:a,hits:n,isLoading:r,templateProps:s.templateProps}),i)},function(){return L(null,t)})({attributesForPrediction:r,queryLanguages:c,nbHits:u,searchDebounceTime:l,renderDebounceTime:d,escapeHTML:h,extraParameters:f})),{},{$$widgetType:"ais.answers"});throw new Error(Qa("The `container` option is required."))}),la=K(Ya),e=Object.freeze({__proto__:null,EXPERIMENTAL_answers:e,EXPERIMENTAL_dynamicWidgets:la,dynamicWidgets:Ya,analytics:function(e){var n,i,a,s,r,o,c,t,u,l=e||{},d=l.pushFunction,h=l.delay,f=void 0===h?3e3:h,h=l.triggerOnUIInteraction,m=void 0!==h&&h,h=l.pushInitialSearch,l=l.pushPagination,p=void 0!==l&&l;if(d)return n=null,i=function(e){var t,n,r=[];for(t in e)e.hasOwnProperty(t)&&(n=e[t].join("+"),r.push("".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(t),"_").concat(encodeURIComponent(n))));return r.join("&")},a=function(e){var t,n=[];for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(r.hasOwnProperty(">=")&&r.hasOwnProperty("<="))r[">="]&&r[">="][0]===r["<="]&&r["<="][0]?n.push("".concat(t,"=").concat(t,"_").concat(r[">="])):n.push("".concat(t,"=").concat(t,"_").concat(r[">="],"to").concat(r["<="]));else if(r.hasOwnProperty(">="))n.push("".concat(t,"=").concat(t,"_from").concat(r[">="]));else if(r.hasOwnProperty("<="))n.push("".concat(t,"=").concat(t,"_to").concat(r["<="]));else if(r.hasOwnProperty("=")){var i,a=[];for(i in r["="])r["="].hasOwnProperty(i)&&a.push(r["="][i]);n.push("".concat(t,"=").concat(t,"_").concat(a.join("-")))}}return n.join("&")},r=function(e){var t,n,r;null!==e&&(t=[],n=i(C(C(C({},e.state.disjunctiveFacetsRefinements),e.state.facetsRefinements),e.state.hierarchicalFacetsRefinements)),r=a(e.state.numericRefinements),""!==n&&t.push(n),""!==r&&t.push(r),n=t.join("&"),r="Query: ".concat(e.state.query||"",", ").concat(n),!0===p&&(r+=", Page: ".concat(e.state.page||0)),s!==r)&&(d(n,e.state,e.results),s=r)},c=!(s="")===(void 0===h||h)?!1:!0,t=function(){r(n)},u=function(){r(n)},{$$type:"ais.analytics",$$widgetType:"ais.analytics",init:function(){!0===m&&(document.addEventListener("click",t),window.addEventListener("beforeunload",u))},render:function(e){var t=e.results,e=e.state;!0===c?c=!1:(n={results:t,state:e},o&&clearTimeout(o),o=window.setTimeout(function(){return r(n)},f))},dispose:function(){!0===m&&(document.removeEventListener("click",t),window.removeEventListener("beforeunload",u))},getRenderState:function(e,t){return C(C({},e),{},{analytics:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}};throw new Error(ns("The `pushFunction` option is required."))},breadcrumb:function(e){var t,s,o,c,u,e=e||{},n=e.container,r=e.attributes,i=e.separator,a=e.rootPath,l=e.transformItems,d=e.templates,d=void 0===d?{}:d,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(ss(),e.root),noRefinementRoot:I(ss({modifierName:"noRefinement"}),e.noRefinementRoot),list:I(ss({descendantName:"list"}),e.list),item:I(ss({descendantName:"item"}),e.item),selectedItem:I(ss({descendantName:"item",modifierName:"selected"}),e.selectedItem),separator:I(ss({descendantName:"separator"}),e.separator),link:I(ss({descendantName:"link"}),e.link)},s=(e={containerNode:t,cssClasses:n,renderState:{},templates:d}).containerNode,o=e.cssClasses,c=e.renderState,u=e.templates,C(C({},Tn(function(e,t){var n=e.canRefine,r=e.createURL,i=e.instantSearchInstance,a=e.items,e=e.refine;t?c.templateProps=M({defaultTemplates:is,templatesConfig:i.templatesConfig,templates:u}):L(j(rs,{canRefine:n,cssClasses:o,createURL:r,items:a,refine:e,templateProps:c.templateProps}),s)},function(){return L(null,t)})({attributes:r,separator:i,rootPath:a,transformItems:l})),{},{$$widgetType:"ais.breadcrumb"});throw new Error(as("The `container` option is required."))},clearRefinements:function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.templates,r=void 0===r?{}:r,c=e.includedAttributes,u=e.excludedAttributes,l=e.transformItems,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(ls(),e.root),button:I(ls({descendantName:"button"}),e.button),disabledButton:I(ls({descendantName:"button",modifierName:"disabled"}),e.disabledButton)},i=(e={containerNode:t,cssClasses:n,renderState:{},templates:r}).containerNode,a=e.cssClasses,s=e.renderState,o=e.templates,C(C({},rt(function(e,t){var n=e.refine,r=e.canRefine,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:cs,templatesConfig:e.templatesConfig,templates:o}):L(j(os,{refine:n,cssClasses:a,hasRefinements:r,templateProps:s.templateProps}),i)},function(){return L(null,t)})({includedAttributes:c,excludedAttributes:u,transformItems:l})),{},{$$widgetType:"ais.clearRefinements"});throw new Error(us("The `container` option is required."))},configure:function(e){return C(C({},Dr(v)({searchParameters:e})),{},{$$widgetType:"ais.configure"})},currentRefinements:function(e){var t,e=e||{},n=e.container,r=e.includedAttributes,i=e.excludedAttributes,a=e.cssClasses,a=void 0===a?{}:a,e=e.transformItems;if(n)return t=P(n),n={root:I(fs(),a.root),noRefinementRoot:I(fs({modifierName:"noRefinement"}),a.noRefinementRoot),list:I(fs({descendantName:"list"}),a.list),item:I(fs({descendantName:"item"}),a.item),label:I(fs({descendantName:"label"}),a.label),category:I(fs({descendantName:"category"}),a.category),categoryLabel:I(fs({descendantName:"categoryLabel"}),a.categoryLabel),delete:I(fs({descendantName:"delete"}),a.delete)},C(C({},ot(Xa,function(){return L(null,t)})({container:t,cssClasses:n,includedAttributes:r,excludedAttributes:i,transformItems:e})),{},{$$widgetType:"ais.currentRefinements"});throw new Error(hs("The `container` option is required."))},EXPERIMENTAL_configureRelatedItems:function(e){return C(C({},Ur(v)(e)),{},{$$widgetType:"ais.configureRelatedItems"})},geoSearch:function(e){var t,n,r,i,a,u,e=e||{},s=e.initialZoom,s=void 0===s?1:s,o=e.initialPosition,o=void 0===o?{lat:0,lng:0}:o,c=e.templates,c=void 0===c?{}:c,l=e.cssClasses,l=void 0===l?{}:l,d=e.builtInMarker,d=void 0===d?{}:d,h=e.customHTMLMarker,f=e.enableRefine,f=void 0===f||f,m=e.enableClearMapRefinement,m=void 0===m||m,p=e.enableRefineControl,p=void 0===p||p,g=e.container,v=e.googleReference,e=E(e,Ss);if(!g)throw new Error(Ps("The `container` option is required."));if(v)return t=P(g),g={root:I(Ns(),l.root),tree:Ns({descendantName:"tree"}),map:I(Ns({descendantName:"map"}),l.map),control:I(Ns({descendantName:"control"}),l.control),label:I(Ns({descendantName:"label"}),l.label),selectedLabel:I(Ns({descendantName:"label",modifierName:"selected"}),l.selectedLabel),input:I(Ns({descendantName:"input"}),l.input),redo:I(Ns({descendantName:"redo"}),l.redo),disabledRedo:I(Ns({descendantName:"redo",modifierName:"disabled"}),l.disabledRedo),reset:I(Ns({descendantName:"reset"}),l.reset)},n=C(C({},ps),c),r=C(C({},{createOptions:function(){return{}},events:{}}),d),i=(Boolean(h)||Boolean(c.HTMLMarker))&&C(C({},{createOptions:function(){return{}},events:{}}),h),u=v,a=function(){D(c,u.maps.OverlayView);var o=U(c);function c(e){var t,n=e.__id,r=e.position,i=e.map,a=e.template,s=e.className,e=e.anchor,e=void 0===e?{x:0,y:0}:e;return A(this,c),T(b(t=o.call(this)),"__id",void 0),T(b(t),"anchor",void 0),T(b(t),"offset",void 0),T(b(t),"listeners",void 0),T(b(t),"latLng",void 0),T(b(t),"element",void 0),t.__id=n,t.anchor=e,t.listeners={},t.latLng=new u.maps.LatLng(r),t.element=document.createElement("div"),t.element.className=s,t.element.style.position="absolute","object"===y(a)?L(a,t.element):t.element.innerHTML=a,t.setMap(i),t}return W(c,[{key:"onAdd",value:function(){this.getPanes().overlayMouseTarget.appendChild(this.element);var e=this.element.getBoundingClientRect();this.offset={x:this.anchor.x+e.width/2,y:this.anchor.y+e.height},this.element.style.width="".concat(e.width,"px")}},{key:"draw",value:function(){var e=this.getProjection().fromLatLngToDivPixel(this.latLng);this.element.style.left="".concat(Math.round(e.x-this.offset.x),"px"),this.element.style.top="".concat(Math.round(e.y-this.offset.y),"px"),this.element.style.zIndex=String(parseInt(this.element.style.top,10))}},{key:"onRemove",value:function(){var t=this;this.element&&(this.element.parentNode.removeChild(this.element),Object.keys(this.listeners).forEach(function(e){t.element.removeEventListener(e,t.listeners[e])}),delete this.element,delete this.listeners)}},{key:"addListener",value:function(e,t){this.listeners[e]=t;var n=this.element;return n.addEventListener(e,t),{remove:function(){return n.removeEventListener(e,t)}}}},{key:"getPosition",value:function(){return this.latLng}}]),c}(),l=i?function(e){var t=e.item,e=E(e,ws);return new a(C(C(C({},i.createOptions(t)),e),{},{__id:t.objectID,position:t._geoloc,className:I(Ns({descendantName:"marker"})),template:$a({templateKey:"HTMLMarker",templates:n,data:t})}))}:function(e){var t=e.item,e=E(e,_s);return new v.maps.Marker(C(C(C({},r.createOptions(t)),e),{},{__id:t.objectID,position:t._geoloc}))},d=i||r,C(C({},Qn(ts,function(){return L(null,t)})(C(C({},e),{},{renderState:{},container:t,googleReference:v,initialZoom:s,initialPosition:o,templates:n,cssClasses:g,createMarker:l,markerOptions:d,enableRefine:f,enableClearMapRefinement:m,enableRefineControl:p}))),{},{$$widgetType:"ais.geoSearch"});throw new Error(Ps("The `googleReference` option is required."))},hierarchicalMenu:function(e){var t,c,u,l,d,h,e=e||{},n=e.container,r=e.attributes,i=e.separator,a=e.rootPath,s=e.showParentLevel,o=e.limit,f=e.showMore,f=void 0!==f&&f,m=e.showMoreLimit,p=e.sortBy,g=e.transformItems,v=e.templates,v=void 0===v?{}:v,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(S(),e.root),noRefinementRoot:I(S({modifierName:"noRefinement"}),e.noRefinementRoot),list:I(S({descendantName:"list"}),e.list),childList:I(S({descendantName:"list",modifierName:"child"}),e.childList),item:I(S({descendantName:"item"}),e.item),selectedItem:I(S({descendantName:"item",modifierName:"selected"}),e.selectedItem),parentItem:I(S({descendantName:"item",modifierName:"parent"}),e.parentItem),link:I(S({descendantName:"link"}),e.link),selectedItemLink:I(S({descendantName:"link",modifierName:"selected"}),e.selectedItemLink),label:I(S({descendantName:"label"}),e.label),count:I(S({descendantName:"count"}),e.count),showMore:I(S({descendantName:"showMore"}),e.showMore),disabledShowMore:I(S({descendantName:"showMore",modifierName:"disabled"}),e.disabledShowMore)},c=(e={cssClasses:n,containerNode:t,templates:v,showMore:f,renderState:{}}).cssClasses,u=e.containerNode,l=e.showMore,d=e.templates,h=e.renderState,C(C({},ft(function(e,t){var n=e.createURL,r=e.items,i=e.refine,a=e.instantSearchInstance,s=e.isShowingMore,o=e.toggleShowMore,e=e.canToggleShowMore;t?h.templateProps=M({defaultTemplates:Es,templatesConfig:a.templatesConfig,templates:d}):L(j(Cs,{createURL:n,cssClasses:c,facetValues:r,templateProps:h.templateProps,toggleRefinement:i,showMore:l,toggleShowMore:o,isShowingMore:s,canToggleShowMore:e}),u)},function(){return L(null,t)})({attributes:r,separator:i,rootPath:a,showParentLevel:s,limit:o,showMore:f,showMoreLimit:m,sortBy:p,transformItems:g})),{},{$$widgetType:"ais.hierarchicalMenu"});throw new Error(ks("The `container` option is required."))},hits:function(e){var t,o,c,u,l,e=e||{},n=e.container,r=e.escapeHTML,i=e.transformItems,a=e.templates,a=void 0===a?{}:a,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Os(),e.root),emptyRoot:I(Os({modifierName:"empty"}),e.emptyRoot),list:I(Os({descendantName:"list"}),e.list),item:I(Os({descendantName:"item"}),e.item)},o=(e={containerNode:t,cssClasses:n,renderState:{},templates:a}).renderState,c=e.cssClasses,u=e.containerNode,l=e.templates,C(C({},Rt(mt)(function(e,t){var n=e.hits,r=e.results,i=e.instantSearchInstance,a=e.insights,s=e.bindEvent,e=e.sendEvent;t?o.templateProps=M({defaultTemplates:Ls,templatesConfig:i.templatesConfig,templates:l}):L(j(js,{cssClasses:c,hits:n,results:r,templateProps:o.templateProps,insights:a,sendEvent:e,bindEvent:s}),u)},function(){return L(null,t)})({escapeHTML:r,transformItems:i})),{},{$$widgetType:"ais.hits"});throw new Error(Ms("The `container` option is required."))},hitsPerPage:function(e){var t,r,i,e=e||{},n=e.container,a=e.items,s=e.cssClasses,s=void 0===s?{}:s,e=e.transformItems;if(n)return t=P(n),n={root:I(Ws(),s.root),select:I(Ws({descendantName:"select"}),s.select),option:I(Ws({descendantName:"option"}),s.option)},r=(s={containerNode:t,cssClasses:n}).containerNode,i=s.cssClasses,C(C({},Zt(function(e,t){var n=e.items,e=e.refine;t||(t=(Re(n,function(e){return e.isRefined})||{}).value,L(j("div",{className:i.root},j(Hs,{cssClasses:i,currentValue:t,options:n,setValue:e})),r))},function(){return L(null,t)})({items:a,transformItems:e})),{},{$$widgetType:"ais.hitsPerPage"});throw new Error(As("The `container` option is required."))},index:ea,infiniteHits:function(e){var t,d,h,f,m,p,e=e||{},n=e.container,r=e.escapeHTML,i=e.transformItems,a=e.templates,a=void 0===a?{}:a,s=e.cssClasses,s=void 0===s?{}:s,o=e.showPrevious,e=e.cache;if(n)return t=P(n),n={root:I(Us(),s.root),emptyRoot:I(Us({modifierName:"empty"}),s.emptyRoot),item:I(Us({descendantName:"item"}),s.item),list:I(Us({descendantName:"list"}),s.list),loadPrevious:I(Us({descendantName:"loadPrevious"}),s.loadPrevious),disabledLoadPrevious:I(Us({descendantName:"loadPrevious",modifierName:"disabled"}),s.disabledLoadPrevious),loadMore:I(Us({descendantName:"loadMore"}),s.loadMore),disabledLoadMore:I(Us({descendantName:"loadMore",modifierName:"disabled"}),s.disabledLoadMore)},d=(s={containerNode:t,cssClasses:n,templates:a,showPrevious:o,renderState:{}}).containerNode,h=s.cssClasses,f=s.renderState,m=s.templates,p=s.showPrevious,C(C({},Rt(an)(function(e,t){var n=e.hits,r=e.results,i=e.showMore,a=e.showPrevious,s=e.isFirstPage,o=e.isLastPage,c=e.instantSearchInstance,u=e.insights,l=e.bindEvent,e=e.sendEvent;t?f.templateProps=M({defaultTemplates:Bs,templatesConfig:c.templatesConfig,templates:m}):L(j(Ds,{cssClasses:h,hits:n,results:r,hasShowPrevious:p,showPrevious:a,showMore:i,templateProps:f.templateProps,isFirstPage:s,isLastPage:o,insights:u,sendEvent:e,bindEvent:l}),d)},function(){return L(null,t)})({escapeHTML:r,transformItems:i,showPrevious:o,cache:e})),{},{$$widgetType:"ais.infiniteHits"});throw new Error($s("The `container` option is required."))},menu:function(e){var t,c,u,l,d,h,e=e||{},n=e.container,r=e.attribute,i=e.sortBy,a=e.limit,s=e.showMore,o=e.showMoreLimit,f=e.cssClasses,f=void 0===f?{}:f,m=e.templates,m=void 0===m?{}:m,e=e.transformItems;if(n)return t=P(n),n={root:I(Vs(),f.root),noRefinementRoot:I(Vs({modifierName:"noRefinement"}),f.noRefinementRoot),list:I(Vs({descendantName:"list"}),f.list),item:I(Vs({descendantName:"item"}),f.item),selectedItem:I(Vs({descendantName:"item",modifierName:"selected"}),f.selectedItem),link:I(Vs({descendantName:"link"}),f.link),label:I(Vs({descendantName:"label"}),f.label),count:I(Vs({descendantName:"count"}),f.count),showMore:I(Vs({descendantName:"showMore"}),f.showMore),disabledShowMore:I(Vs({descendantName:"showMore",modifierName:"disabled"}),f.disabledShowMore)},c=(f={containerNode:t,cssClasses:n,renderState:{},templates:m,showMore:s}).containerNode,u=f.cssClasses,l=f.renderState,d=f.templates,h=f.showMore,C(C({},sn(function(e,t){var n=e.refine,r=e.items,i=e.createURL,a=e.instantSearchInstance,s=e.isShowingMore,o=e.toggleShowMore,e=e.canToggleShowMore;t?l.templateProps=M({defaultTemplates:qs,templatesConfig:a.templatesConfig,templates:d}):(t=r.map(function(e){return C(C({},e),{},{url:i(e.value)})}),L(j(Cs,{createURL:i,cssClasses:u,facetValues:t,showMore:h,templateProps:l.templateProps,toggleRefinement:n,toggleShowMore:o,isShowingMore:s,canToggleShowMore:e}),c))},function(){return L(null,t)})({attribute:r,limit:a,showMore:s,showMoreLimit:o,sortBy:i,transformItems:e})),{},{$$widgetType:"ais.menu"});throw new Error(Qs("The `container` option is required."))},menuSelect:function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.attribute,c=e.sortBy,c=void 0===c?["name:asc"]:c,u=e.limit,u=void 0===u?10:u,l=e.cssClasses,l=void 0===l?{}:l,d=e.templates,d=void 0===d?{}:d,e=e.transformItems;if(n)return t=P(n),n={root:I(Zs(),l.root),noRefinementRoot:I(Zs({modifierName:"noRefinement"}),l.noRefinementRoot),select:I(Zs({descendantName:"select"}),l.select),option:I(Zs({descendantName:"option"}),l.option)},i=(l={containerNode:t,cssClasses:n,renderState:{},templates:d}).containerNode,a=l.cssClasses,s=l.renderState,o=l.templates,C(C({},sn(function(e,t){var n=e.refine,r=e.items,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:zs,templatesConfig:e.templatesConfig,templates:o}):L(j(Ks,{cssClasses:a,items:r,refine:n,templateProps:s.templateProps}),i)},function(){return L(null,t)})({attribute:r,limit:u,sortBy:c,transformItems:e})),{},{$$widgetType:"ais.menuSelect"});throw new Error(Js("The `container` option is required."))},numericMenu:function(e){var t,a,s,o,c,u,e=e||{},n=e.container,r=e.attribute,i=e.items,l=e.cssClasses,l=void 0===l?{}:l,d=e.templates,d=void 0===d?{}:d,e=e.transformItems;if(n)return t=P(n),n={root:I(Gs(),l.root),noRefinementRoot:I(Gs({modifierName:"noRefinement"}),l.noRefinementRoot),list:I(Gs({descendantName:"list"}),l.list),item:I(Gs({descendantName:"item"}),l.item),selectedItem:I(Gs({descendantName:"item",modifierName:"selected"}),l.selectedItem),label:I(Gs({descendantName:"label"}),l.label),radio:I(Gs({descendantName:"radio"}),l.radio),labelText:I(Gs({descendantName:"labelText"}),l.labelText)},a=(l={containerNode:t,attribute:r,cssClasses:n,renderState:{},templates:d}).containerNode,s=l.attribute,o=l.cssClasses,c=l.renderState,u=l.templates,C(C({},on(function(e,t){var n=e.createURL,r=e.instantSearchInstance,i=e.refine,e=e.items;t?c.templateProps=M({defaultTemplates:Ys,templatesConfig:r.templatesConfig,templates:u}):L(j(Cs,{createURL:n,cssClasses:o,facetValues:e,templateProps:c.templateProps,toggleRefinement:i,attribute:s}),a)},function(){return L(null,t)})({attribute:r,items:i,transformItems:e})),{},{$$widgetType:"ais.numericMenu"});throw new Error(Xs("The `container` option is required."))},pagination:function(e){var t,u,l,d,h,f,m,p,g,e=e||{},n=e.container,r=e.templates,r=void 0===r?{}:r,i=e.cssClasses,i=void 0===i?{}:i,a=e.totalPages,s=e.padding,o=e.showFirst,o=void 0===o||o,c=e.showLast,c=void 0===c||c,v=e.showPrevious,v=void 0===v||v,y=e.showNext,y=void 0===y||y,e=e.scrollTo,e=void 0===e?"body":e;if(n)return t=P(n),e=!1!==(n=!0===e?"body":e)&&P(n),n={root:I(F(),i.root),noRefinementRoot:I(F({modifierName:"noRefinement"}),i.noRefinementRoot),list:I(F({descendantName:"list"}),i.list),item:I(F({descendantName:"item"}),i.item),firstPageItem:I(F({descendantName:"item",modifierName:"firstPage"}),i.firstPageItem),lastPageItem:I(F({descendantName:"item",modifierName:"lastPage"}),i.lastPageItem),previousPageItem:I(F({descendantName:"item",modifierName:"previousPage"}),i.previousPageItem),nextPageItem:I(F({descendantName:"item",modifierName:"nextPage"}),i.nextPageItem),pageItem:I(F({descendantName:"item",modifierName:"page"}),i.pageItem),selectedItem:I(F({descendantName:"item",modifierName:"selected"}),i.selectedItem),disabledItem:I(F({descendantName:"item",modifierName:"disabled"}),i.disabledItem),link:I(F({descendantName:"link"}),i.link)},i=C(C({},so),r),u=(r={containerNode:t,cssClasses:n,templates:i,showFirst:o,showLast:c,showPrevious:v,showNext:y,scrollToNode:e}).containerNode,l=r.cssClasses,d=r.templates,h=r.showFirst,f=r.showLast,m=r.showPrevious,p=r.showNext,g=r.scrollToNode,C(C({},gn(function(e,t){var n=e.createURL,r=e.currentRefinement,i=e.nbPages,a=e.pages,s=e.isFirstPage,o=e.isLastPage,c=e.refine;t||L(j(eo,{createURL:n,cssClasses:l,currentPage:r,templates:d,nbPages:i,pages:a,isFirstPage:s,isLastPage:o,setCurrentPage:function(e){c(e),!1!==g&&g.scrollIntoView()},showFirst:h,showLast:f,showPrevious:m,showNext:p}),u)},function(){return L(null,t)})({totalPages:a,padding:s})),{},{$$widgetType:"ais.pagination"});throw new Error(ao("The `container` option is required."))},panel:function(e){var e=e||{},t=e.templates,r=void 0===t?{}:t,t=e.hidden,d=void 0===t?function(){return!1}:t,t=e.collapsed,e=e.cssClasses,e=void 0===e?{}:e,h=document.createElement("div"),f=Boolean(t),m="function"==typeof t?t:function(){return!1},p={root:I(Fo(),e.root),noRefinementRoot:I(Fo({modifierName:"noRefinement"}),e.noRefinementRoot),collapsibleRoot:I(Fo({modifierName:"collapsible"}),e.collapsibleRoot),collapsedRoot:I(Fo({modifierName:"collapsed"}),e.collapsedRoot),collapseButton:I(Fo({descendantName:"collapseButton"}),e.collapseButton),collapseIcon:I(Fo({descendantName:"collapseIcon"}),e.collapseIcon),body:I(Fo({descendantName:"body"}),e.body),header:I(Fo({descendantName:"header"}),e.header),footer:I(Fo({descendantName:"footer"}),e.footer)};return function(n){return function(e){var i,a,t,s,o,c,u,l;if(e&&e.container)return i=P(e.container),t={containerNode:i,bodyContainerNode:h,cssClasses:p,templates:C(C({},{collapseButtonText:function(e){e=e.collapsed;return'<svg\n class="'.concat(p.collapseIcon,'"\n style="width: 1em; height: 1em;"\n viewBox="0 0 500 500"\n >\n <path d="').concat(e?"M100 250l300-150v300z":"M250 400l150-300H100z",'" fill="currentColor" />\n </svg>')}}),r)},s=t.containerNode,o=t.bodyContainerNode,c=t.cssClasses,u=t.templates,a=function(e){var t=e.options,n=e.hidden,r=e.collapsible,e=e.collapsed;L(j(No,{cssClasses:c,hidden:n,collapsible:r,isCollapsed:e,templates:u,data:t,bodyElement:o}),s)},l=n(C(C({},e),{},{container:h})),C(C({},l),{},{init:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],r=C(C({},l.getWidgetRenderState?l.getWidgetRenderState(r):{}),r);a({options:r,hidden:!0,collapsible:f,collapsed:!1}),"function"==typeof l.init&&(r=l.init).call.apply(r,[this].concat(t))},render:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],r=C(C({},l.getWidgetRenderState?l.getWidgetRenderState(r):{}),r);a({options:r,hidden:Boolean(d(r)),collapsible:f,collapsed:Boolean(m(r))}),"function"==typeof l.render&&(r=l.render).call.apply(r,[this].concat(t))},dispose:function(){if(L(null,i),"function"==typeof l.dispose){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=l.dispose).call.apply(e,[this].concat(n))}}});throw new Error(Io("The `container` option is required in the widget within the panel."))}}},places:function(e){var t=e||{},n=t.placesReference,r=t.defaultPosition,i=void 0===r?[]:r,r=E(t,To);if("function"!=typeof n)throw new Error("The `placesReference` option requires a valid Places.js reference.");var a=n(r),s={query:"",initialLatLngViaIP:void 0,isInitialLatLngViaIPSet:!1};return{$$type:"ais.places",$$widgetType:"ais.places",init:function(e){var r=e.helper;a.on("change",function(e){var e=e.suggestion,t=e.value,e=e.latlng,n=e.lat,e=e.lng;s.query=t,r.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng","".concat(n,",").concat(e)).search()}),a.on("clear",function(){s.query="",r.setQueryParameter("insideBoundingBox",void 0),1<i.length?r.setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",i.join(",")):r.setQueryParameter("aroundLatLngViaIP",s.initialLatLngViaIP).setQueryParameter("aroundLatLng",void 0),r.search()})},getWidgetUiState:function(e,t){t=t.searchParameters.aroundLatLng||i.join(",");return t!==i.join(",")||s.query?C(C({},e),{},{places:{query:s.query,position:t}}):(e.places,E(e,Co))},getWidgetSearchParameters:function(e,t){var t=t.uiState.places||{},n=t.query,n=void 0===n?"":n,t=t.position,t=void 0===t?i.join(","):t;return s.query=n,s.isInitialLatLngViaIPSet||(s.isInitialLatLngViaIPSet=!0,s.initialLatLngViaIP=e.aroundLatLngViaIP),a.setVal(n),a.close(),e.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",t||void 0)},getRenderState:function(e,t){return C(C({},e),{},{places:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}}},poweredBy:function(e){var t,r,i,e=e||{},n=e.container,a=e.cssClasses,a=void 0===a?{}:a,e=e.theme,e=void 0===e?"light":e;if(n)return t=P(n),n={root:I(ko(),ko({modifierName:"dark"===e?"dark":"light"}),a.root),link:I(ko({descendantName:"link"}),a.link),logo:I(ko({descendantName:"logo"}),a.logo)},r=(a={containerNode:t,cssClasses:n}).containerNode,i=a.cssClasses,C(C({},Vn(function(e,t){var n=e.url,e=e.widgetParams;t&&(t=e.theme,L(j(Eo,{cssClasses:i,url:n,theme:void 0===t?"light":t}),r))},function(){return L(null,t)})({theme:e})),{},{$$widgetType:"ais.poweredBy"});throw new Error(jo("The `container` option is required."))},queryRuleContext:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(e.trackedFilters)return C(C({},Kr(v)(e)),{},{$$widgetType:"ais.queryRuleContext"});throw new Error(Lo("The `trackedFilters` option is required."))},queryRuleCustomData:function(e){var t,n,r,i,e=e||{},a=e.container,s=e.cssClasses,s=void 0===s?{}:s,o=e.templates,o=void 0===o?{}:o,e=e.transformItems,e=void 0===e?function(e){return e}:e;if(a)return s={root:I(Ao(),s.root)},t=P(a),a=C(C({},Oo),o),n=(o={containerNode:t,cssClasses:s,renderState:{},templates:a}).containerNode,r=o.cssClasses,i=o.templates,C(C({},Kr(function(e){e=e.items;L(j(Mo,{cssClasses:r,templates:i,items:e}),n)},function(){L(null,t)})({transformItems:e})),{},{$$widgetType:"ais.queryRuleCustomData"});throw new Error(Ho("The `container` option is required."))},rangeInput:function(e){var t,s,o,c,u,e=e||{},n=e.container,r=e.attribute,i=e.min,a=e.max,l=e.precision,l=void 0===l?0:l,d=e.cssClasses,d=void 0===d?{}:d,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Bo(),d.root),noRefinement:I(Bo({modifierName:"noRefinement"})),form:I(Bo({descendantName:"form"}),d.form),label:I(Bo({descendantName:"label"}),d.label),input:I(Bo({descendantName:"input"}),d.input),inputMin:I(Bo({descendantName:"input",modifierName:"min"}),d.inputMin),inputMax:I(Bo({descendantName:"input",modifierName:"max"}),d.inputMax),separator:I(Bo({descendantName:"separator"}),d.separator),submit:I(Bo({descendantName:"submit"}),d.submit)},s=(d={containerNode:t,cssClasses:n,templates:e,renderState:{}}).containerNode,o=d.cssClasses,c=d.renderState,u=d.templates,C(C({},Sn(function(e,t){var n=e.refine,r=e.range,i=e.start,a=e.widgetParams,e=e.instantSearchInstance;t?c.templateProps=M({defaultTemplates:$o,templatesConfig:e.templatesConfig,templates:u}):(t=r.min,e=r.max,i=(r=k(i,2))[0],r=r[1],a=1/Math.pow(10,a.precision||0),L(j(Wo,{min:t,max:e,step:a,values:{min:i!==-1/0&&i!==t?i:void 0,max:r!==1/0&&r!==e?r:void 0},cssClasses:o,refine:n,templateProps:c.templateProps}),s))},function(){return L(null,t)})({attribute:r,min:i,max:a,precision:l})),{},{$$type:"ais.rangeInput",$$widgetType:"ais.rangeInput"});throw new Error(Do("The `container` option is required."))},rangeSlider:function(e){var t,a,s,o,c,u,e=e||{},n=e.container,r=e.attribute,i=e.min,l=e.max,d=e.cssClasses,d=void 0===d?{}:d,h=e.step,f=e.pips,f=void 0===f||f,m=e.precision,m=void 0===m?0:m,e=e.tooltips,e=void 0===e||e;if(n)return t=P(n),n={root:I(cc(),d.root),disabledRoot:I(cc({modifierName:"disabled"}),d.disabledRoot)},a=(d={containerNode:t,step:h,pips:f,tooltips:e,cssClasses:n}).containerNode,s=d.cssClasses,o=d.pips,c=d.step,u=d.tooltips,C(C({},Sn(function(e,t){var n,r=e.refine,i=e.range,e=e.start;t||(t=i.min,i=i.max,n=(e=k(e,2))[0],e=e[1],L(j(sc,{cssClasses:s,refine:r,min:t,max:i,values:[i<(r=n===-1/0?t:n)?i:r,(n=e===1/0?i:e)<t?t:n],tooltips:u,step:c,pips:o}),a))},function(){return L(null,t)})({attribute:r,min:i,max:l,precision:m})),{},{$$type:"ais.rangeSlider",$$widgetType:"ais.rangeSlider"});throw new Error(oc("The `container` option is required."))},ratingMenu:function(e){var t,a,s,o,c,e=e||{},n=e.container,r=e.attribute,i=e.max,i=void 0===i?5:i,u=e.cssClasses,u=void 0===u?{}:u,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(O(),u.root),noRefinementRoot:I(O({modifierName:"noRefinement"}),u.noRefinementRoot),list:I(O({descendantName:"list"}),u.list),item:I(O({descendantName:"item"}),u.item),selectedItem:I(O({descendantName:"item",modifierName:"selected"}),u.selectedItem),disabledItem:I(O({descendantName:"item",modifierName:"disabled"}),u.disabledItem),link:I(O({descendantName:"link"}),u.link),starIcon:I(O({descendantName:"starIcon"}),u.starIcon),fullStarIcon:I(O({descendantName:"starIcon",modifierName:"full"}),u.fullStarIcon),emptyStarIcon:I(O({descendantName:"starIcon",modifierName:"empty"}),u.emptyStarIcon),label:I(O({descendantName:"label"}),u.label),count:I(O({descendantName:"count"}),u.count)},a=(u={containerNode:t,cssClasses:n,renderState:{},templates:e}).containerNode,s=u.cssClasses,o=u.templates,c=u.renderState,C(C({},xn(function(e,t){var n=e.refine,r=e.items,i=e.createURL,e=e.instantSearchInstance;t?c.templateProps=M({defaultTemplates:lc,templatesConfig:e.templatesConfig,templates:o}):L(j(Cs,{createURL:i,cssClasses:s,facetValues:r,templateProps:c.templateProps,toggleRefinement:n},j("svg",{style:"display:none;"},j("symbol",{id:O({descendantName:"starSymbol"}),viewBox:"0 0 24 24"},hc),j("symbol",{id:O({descendantName:"starEmptySymbol"}),viewBox:"0 0 24 24"},fc))),a)},function(){return L(null,t)})({attribute:r,max:i})),{},{$$widgetType:"ais.ratingMenu"});throw new Error(dc("The `container` option is required."))},refinementList:function(e){var t,d,h,f,m,p,g,v,y,b,e=e||{},n=e.container,r=e.attribute,i=e.operator,a=e.sortBy,s=e.limit,o=e.showMore,c=e.showMoreLimit,u=e.searchable,u=void 0!==u&&u,l=e.searchablePlaceholder,l=void 0===l?"Search...":l,R=e.searchableEscapeFacetValues,S=e.searchableIsAlwaysActive,S=void 0===S||S,_=e.cssClasses,_=void 0===_?{}:_,w=e.templates,w=void 0===w?{}:w,e=e.transformItems;if(n)return R=!!u&&Boolean(void 0===R||R),t=P(n),n={root:I(H(),_.root),noRefinementRoot:I(H({modifierName:"noRefinement"}),_.noRefinementRoot),list:I(H({descendantName:"list"}),_.list),item:I(H({descendantName:"item"}),_.item),selectedItem:I(H({descendantName:"item",modifierName:"selected"}),_.selectedItem),searchBox:I(H({descendantName:"searchBox"}),_.searchBox),label:I(H({descendantName:"label"}),_.label),checkbox:I(H({descendantName:"checkbox"}),_.checkbox),labelText:I(H({descendantName:"labelText"}),_.labelText),count:I(H({descendantName:"count"}),_.count),noResults:I(H({descendantName:"noResults"}),_.noResults),showMore:I(H({descendantName:"showMore"}),_.showMore),disabledShowMore:I(H({descendantName:"showMore",modifierName:"disabled"}),_.disabledShowMore),searchable:{root:I(Rc(),_.searchableRoot),form:I(Rc({descendantName:"form"}),_.searchableForm),input:I(Rc({descendantName:"input"}),_.searchableInput),submit:I(Rc({descendantName:"submit"}),_.searchableSubmit),submitIcon:I(Rc({descendantName:"submitIcon"}),_.searchableSubmitIcon),reset:I(Rc({descendantName:"reset"}),_.searchableReset),resetIcon:I(Rc({descendantName:"resetIcon"}),_.searchableResetIcon),loadingIndicator:I(Rc({descendantName:"loadingIndicator"}),_.searchableLoadingIndicator),loadingIcon:I(Rc({descendantName:"loadingIcon"}),_.searchableLoadingIcon)}},_={containerNode:t,cssClasses:n,templates:w,searchBoxTemplates:{submit:w.searchableSubmit,reset:w.searchableReset,loadingIndicator:w.searchableLoadingIndicator},renderState:{},searchable:u,searchablePlaceholder:l,searchableIsAlwaysActive:S,showMore:o},d=_.containerNode,h=_.cssClasses,f=_.templates,m=_.searchBoxTemplates,p=_.renderState,g=_.showMore,v=_.searchable,y=_.searchablePlaceholder,b=_.searchableIsAlwaysActive,C(C({},_n(function(e,t){var n=e.refine,r=e.items,i=e.createURL,a=e.searchForItems,s=e.isFromSearch,o=e.instantSearchInstance,c=e.toggleShowMore,u=e.isShowingMore,l=e.hasExhaustiveItems,e=e.canToggleShowMore;t?(p.templateProps=M({defaultTemplates:yc,templatesConfig:o.templatesConfig,templates:f}),p.searchBoxTemplateProps=M({defaultTemplates:vc,templatesConfig:o.templatesConfig,templates:m})):L(j(Cs,{createURL:i,cssClasses:h,facetValues:r,templateProps:p.templateProps,searchBoxTemplateProps:p.searchBoxTemplateProps,toggleRefinement:n,searchFacetValues:v?a:void 0,searchPlaceholder:y,searchIsAlwaysActive:b,isFromSearch:s,showMore:g&&!s&&0<r.length,toggleShowMore:c,isShowingMore:u,hasExhaustiveItems:l,canToggleShowMore:e}),d)},function(){return L(null,t)})({attribute:r,operator:i,limit:s,showMore:o,showMoreLimit:c,sortBy:a,escapeFacetValues:R,transformItems:e})),{},{$$widgetType:"ais.refinementList"});throw new Error(bc("The `container` option is required."))},relevantSort:function(e){var t,r,i,a,n=e.container,s=e.templates,s=void 0===s?{}:s,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(Pc(),e.root),text:I(Pc({descendantName:"text"}),e.text),button:I(Pc({descendantName:"button"}),e.button)},e=C(C({},_c),s),r=(s={containerNode:t,cssClasses:n,renderState:{},templates:e}).containerNode,i=s.cssClasses,a=s.templates,C(C({},Zr(function(e){var t=e.isRelevantSorted,n=e.isVirtualReplica,e=e.refine;L(j(Sc,{cssClasses:i,templates:a,isRelevantSorted:t,isVirtualReplica:n,refine:e}),r)},function(){L(null,t)})({})),{},{$$widgetType:"ais.relevantSort"});throw new Error(wc("The `container` option is required."))},searchBox:function(e){var t,r,i,a,s,o,c,u,l,d,e=e||{},n=e.container,h=e.placeholder,h=void 0===h?"":h,f=e.cssClasses,f=void 0===f?{}:f,m=e.autofocus,m=void 0!==m&&m,p=e.searchAsYouType,p=void 0===p||p,g=e.showReset,g=void 0===g||g,v=e.showSubmit,v=void 0===v||v,y=e.showLoadingIndicator,y=void 0===y||y,b=e.queryHook,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(xc(),f.root),form:I(xc({descendantName:"form"}),f.form),input:I(xc({descendantName:"input"}),f.input),submit:I(xc({descendantName:"submit"}),f.submit),submitIcon:I(xc({descendantName:"submitIcon"}),f.submitIcon),reset:I(xc({descendantName:"reset"}),f.reset),resetIcon:I(xc({descendantName:"resetIcon"}),f.resetIcon),loadingIndicator:I(xc({descendantName:"loadingIndicator"}),f.loadingIndicator),loadingIcon:I(xc({descendantName:"loadingIcon"}),f.loadingIcon)},f=C(C({},vc),e),r=(e={containerNode:t,cssClasses:n,placeholder:h,templates:f,autofocus:m,searchAsYouType:p,showReset:g,showSubmit:v,showLoadingIndicator:y}).containerNode,i=e.cssClasses,a=e.placeholder,s=e.templates,o=e.autofocus,c=e.searchAsYouType,u=e.showReset,l=e.showSubmit,d=e.showLoadingIndicator,C(C({},Pn(function(e){var t=e.refine,n=e.query,e=e.isSearchStalled;L(j(xs,{query:n,placeholder:a,autofocus:o,refine:t,searchAsYouType:c,templates:s,showSubmit:l,showReset:u,showLoadingIndicator:d,isSearchStalled:e,cssClasses:i}),r)},function(){return L(null,t)})({queryHook:b})),{},{$$widgetType:"ais.searchBox"});throw new Error(Nc("The `container` option is required."))},sortBy:function(e){var t,i,a,e=e||{},n=e.container,r=e.items,s=e.cssClasses,s=void 0===s?{}:s,e=e.transformItems;if(n)return t=P(n),n={root:I(Fc(),s.root),select:I(Fc({descendantName:"select"}),s.select),option:I(Fc({descendantName:"option"}),s.option)},i=(s={containerNode:t,cssClasses:n}).containerNode,a=s.cssClasses,C(C({},Nn(function(e,t){var n=e.currentRefinement,r=e.options,e=e.refine;t||L(j("div",{className:a.root},j(Hs,{cssClasses:a,currentValue:n,options:r,setValue:e})),i)},function(){return L(null,t)})({container:t,items:r,transformItems:e})),{},{$$widgetType:"ais.sortBy"});throw new Error(Ic("The `container` option is required."))},stats:function(e){var t,l,d,h,f,e=e||{},n=e.container,r=e.cssClasses,r=void 0===r?{}:r,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:I(kc(),r.root),text:I(kc({descendantName:"text"}),r.text)},l=(r={containerNode:t,cssClasses:n,templates:e,renderState:{}}).renderState,d=r.cssClasses,h=r.containerNode,f=r.templates,C(C({},In(function(e,t){var n=e.hitsPerPage,r=e.nbHits,i=e.nbSortedHits,a=e.areHitsSorted,s=e.nbPages,o=e.page,c=e.processingTimeMS,u=e.query,e=e.instantSearchInstance;t?l.templateProps=M({defaultTemplates:jc,templatesConfig:e.templatesConfig,templates:f}):L(j(Cc,{cssClasses:d,hitsPerPage:n,nbHits:r,nbSortedHits:i,areHitsSorted:a,nbPages:s,page:o,processingTimeMS:c,query:u,templateProps:l.templateProps}),h)},function(){return L(null,t)})({})),{},{$$widgetType:"ais.stats"});throw new Error(Ec("The `container` option is required."))},toggleRefinement:function(e){var t,i,a,s,o,e=e||{},n=e.container,r=e.attribute,c=e.cssClasses,c=void 0===c?{}:c,u=e.templates,u=void 0===u?{}:u,l=e.on,l=void 0===l||l,e=e.off;if(n)return t=P(n),n={root:I(Ac(),c.root),label:I(Ac({descendantName:"label"}),c.label),checkbox:I(Ac({descendantName:"checkbox"}),c.checkbox),labelText:I(Ac({descendantName:"labelText"}),c.labelText)},i=(c={containerNode:t,cssClasses:n,renderState:{},templates:u}).containerNode,a=c.cssClasses,s=c.renderState,o=c.templates,C(C({},Fn(function(e,t){var n=e.value,r=e.refine,e=e.instantSearchInstance;t?s.templateProps=M({defaultTemplates:Oc,templatesConfig:e.templatesConfig,templates:o}):L(j(Mc,{cssClasses:a,currentRefinement:n,templateProps:s.templateProps,refine:r}),i)},function(){return L(null,t)})({attribute:r,on:l,off:e})),{},{$$widgetType:"ais.toggleRefinement"});throw new Error(Hc("The `container` option is required."))},voiceSearch:function(e){var t,i,a,s,e=e||{},n=e.container,r=e.cssClasses,r=void 0===r?{}:r,o=e.templates,o=void 0===o?{}:o,c=e.searchAsYouSpeak,c=void 0!==c&&c,u=e.language,l=e.additionalQueryParameters,e=e.createVoiceSearchHelper;if(n)return t=P(n),n={root:I(Vc(),r.root),button:I(Vc({descendantName:"button"}),r.button),status:I(Vc({descendantName:"status"}),r.status)},r=C(C({},qc),o),i=(o={containerNode:t,cssClasses:n,templates:r}).containerNode,a=o.cssClasses,s=o.templates,C(C({},Jr(function(e){var t=e.isBrowserSupported,n=e.isListening,r=e.toggleListening,e=e.voiceListeningState;L(j(Wc,{cssClasses:a,templates:s,isBrowserSupported:t,isListening:n,toggleListening:r,voiceListeningState:e}),i)},function(){return L(null,t)})({container:t,cssClasses:n,templates:r,searchAsYouSpeak:c,language:u,additionalQueryParameters:l,createVoiceSearchHelper:e})),{},{$$widgetType:"ais.voiceSearch"});throw new Error(Qc("The `container` option is required."))}});return a.version="4.55.0",a.connectors=Er,a.widgets=e,a.middlewares=lr,a.routers=Yt,a.stateMappings=cn,a.createInfiniteHitsSessionStorageCache=function(){return{read:function(e){var e=e.state,t=Ge(function(e){return e.window.sessionStorage});if(!t)return null;try{var n=JSON.parse(t.getItem(li));return n&&ke(n.state,ui(e))?n.hits:null}catch(e){if(e instanceof SyntaxError)try{t.removeItem(li)}catch(e){}return null}},write:function(e){var t=e.state,e=e.hits,n=Ge(function(e){return e.window.sessionStorage});if(n)try{n.setItem(li,JSON.stringify({state:ui(t),hits:e}))}catch(e){}}}},a.highlight=Gr,a.reverseHighlight=ti,a.snippet=ri,a.reverseSnippet=ai,a.insights=Kt,a});
|
||
//# sourceMappingURL=instantsearch.production.min.js.map
|