4 lines
322 KiB
JavaScript
4 lines
322 KiB
JavaScript
/*! InstantSearch.js 4.75.3 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
|
||
!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";var a=0;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 F(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){E(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 W(e){return(W="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 D(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,J(r.key),r)}}function $(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e,t,n){return(t=J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(){return(g=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 B(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&&q(e,t)}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function j(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 y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(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=U(n),t=(e=r?(e=U(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 y(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)||K(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 I(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||K(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 K(e,t){var n;if(e)return"string"==typeof e?z(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)?z(e,t):void 0}function z(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 J(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 C(){}function Z(e,t){return e}function Y(e){return Object.prototype.toString.call(e).slice(8,-1)}function f(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat(Y(e),").\n\n").concat(t))}function X(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 G={"&":"&","<":"<",">":">",'"':""","'":"'"},ee=/[&<>"']/g,te=RegExp(ee.source);var ne={"&":"&","<":"<",">":">",""":'"',"'":"'"},re=/&(amp|quot|lt|gt|#39);/g,ie=RegExp(re.source);function ae(e){return e&&ie.test(e)?e.replace(re,function(e){return ne[e]}):e}function se(e){if("object"===W(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 O={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},u={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function oe(e){return((e=e)&&te.test(e)?e.replace(ee,function(e){return G[e]}):e).replace(new RegExp(O.highlightPreTag,"g"),u.highlightPreTag).replace(new RegExp(O.highlightPostTag,"g"),u.highlightPostTag)}function ce(n){return se(n)&&"string"!=typeof n.value?Object.keys(n).reduce(function(e,t){return F(F({},e),{},E({},t,ce(n[t])))},{}):Array.isArray(n)?n.map(ce):F(F({},n),{},{value:oe(n.value)})}function ue(e){return void 0===e.__escaped&&((e=e.map(function(e){e=g({},(Q(e),e));return e._highlightResult&&(e._highlightResult=ce(e._highlightResult)),e._snippetResult&&(e._snippetResult=ce(e._snippetResult)),e})).__escaped=!0),e}function le(e){var t=u.highlightPreTag,n=u.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+n:e.value}).join("")}function de(e){var h=e.instantSearchInstance,f=e.helper,m=e.attribute,p=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=t[3],c=void 0===c?{}:c,u=k(t[0].split(":"),2),l=u[0],u=u[1],d="string"==typeof m?m:m(s);1===t.length&&"object"===W(t[0])?h.sendEventToInsights(t[0]):"click"===l&&2<=t.length&&t.length<=4&&(i=d,a=s,((r=f).state.isHierarchicalFacet(i)?r.state.isHierarchicalFacetRefined(i,a):r.state.isConjunctiveFacet(i)?r.state.isFacetRefined(i,a):r.state.isDisjunctiveFacetRefined(i,a))||h.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:p,eventType:l,eventModifier:u,payload:F({eventName:o,index:f.getIndex(),filters:["".concat(d,":").concat(s)]},c),attribute:d}))}}function he(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function fe(e){return JSON.parse(decodeURIComponent(atob(e)))}function me(e){var n,r,i,a,s,t,o,c,u=e.getIndex,l=e.widgetType,d=(e.methodName,e.args),e=e.instantSearchInstance;return 1===d.length&&"object"===W(d[0])?[d[0]]:(t=k(d[0].split(":"),2),n=t[0],r=t[1],t=d[1],i=d[2],a=d[3]||{},!t||!("click"!==n&&"conversion"!==n||i)||0===(d=Array.isArray(t)?t:[t]).length?[]:(s=d[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}(d),o=t.map(function(e){return e.map(function(e){return e.objectID})}),c=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:l,eventType:n,payload:F({eventName:i||"Hits Viewed",index:u(),objectIDs:o[t]},a),hits:e,eventModifier:r}}):"click"===n?t.map(function(e,t){return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:l,eventType:n,payload:F({eventName:i||"Hit Clicked",index:u(),queryID:s,objectIDs:o[t],positions:c[t]},a),hits:e,eventModifier:r}}):"conversion"===n?t.map(function(e,t){return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:l,eventType:n,payload:F({eventName:i||"Hit Converted",index:u(),queryID:s,objectIDs:o[t]},a),hits:e,eventModifier:r}}):[]))}function pe(e){var r=e.instantSearchInstance,i=e.getIndex,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];me({widgetType:a,getIndex: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 ge(e){var i=e.getIndex,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=me({widgetType:a,getIndex:i,methodName:"bindEvent",args:t,instantSearchInstance:s});return r.length?"data-insights-event=".concat(he(r)):""}}function ve(e){return"ais.index"===e.$$type}function ye(t,e){var n=t[e.getIndexId()]||{};e.getHelper().setState(e.getWidgetSearchParameters(e.getHelper().state,{uiState:n})),e.getWidgets().filter(ve).forEach(function(e){return ye(t,e)})}function be(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 Re=Promise.resolve();function Se(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null===i&&(i=Re.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 _e(e){return"number"==typeof e&&e<0||"string"==typeof e?String(e).replace(/^-/,"\\-"):e}function we(e,t){for(var n,r=0;r<e.length;r++)if(t(n=e[r],r,e))return n}var Pe=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/;function Ne(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 xe(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 Ie=new RegExp(/\w/i);function Ce(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}function Te(e,t,n,r,i){var a,i=4<arguments.length&&void 0!==i?i:[],s={type:t,attribute:n,name:r,escapedValue:_e(r)},o=we(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&&we(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 Fe(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(Te(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(Te(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(Te(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 Ee(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 je(e,n,r){return e.map(function(e,t){return F(F({},e),{},{__position:r*n+t+1})})}function ke(e,t){return t?e.map(function(e){return F(F({},e),{},{__queryID:t})}):e}function Oe(a,i){var e,s,t;i&&("transporter"in a&&!a._cacheHydrated||a._useCache&&"function"==typeof a.addAlgoliaAgent)&&(e=[Object.keys(i).reduce(function(e,t){var t=i[t],n=t.state,r=t.requestParams,t=t.results,t=t&&n?t.map(function(e,t){return F({indexName:n.index||e.index},null!=r&&r[t]||e.params?{params:Le((null==r?void 0:r[t])||e.params.split("&").reduce(function(e,t){var t=k(t.split("="),2),n=t[0],t=t[1];return e[n]=t?decodeURIComponent(t):"",e},{}))}:{})}):[];return e.concat(t)},[])],t=Object.keys(i).reduce(function(e,t){t=i[t].results;return t?e.concat(t):e},[]),"transporter"in a&&!a._cacheHydrated&&(a._cacheHydrated=!0,s=a.search.bind(a),a.search=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=e.map(function(e){return F(F({},e),{},{params:Le(e.params)})});return a.transporter.responsesCache.get({method:"search",args:[i].concat(n)},function(){return s.apply(void 0,[e].concat(n))})},a.transporter.responsesCache.set({method:"search",args:e},{results:t})),"transporter"in a||(t="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:e})),a.cache=F(F({},a.cache),{},E({},t,JSON.stringify({results:Object.keys(i).map(function(e){return i[e].results})})))))}function Le(n){return Object.keys(n).map(function(e){return 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=0;return e.replace(/%s/g,function(){return encodeURIComponent(n[i++])})}("%s=%s",e,(t=n[e],"[object Object]"===Object.prototype.toString.call(t)||"[object Array]"===Object.prototype.toString.call(t)?JSON.stringify(n[e]):n[e]));var t}).join("&")}function Me(e){return e!==Object(e)}function He(e,t){if(e===t)return 1;if(Me(e)||Me(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(!He(e[i],t[i]))return}return 1}}function b(e){return"number"==typeof e&&isFinite(e)}function Ae(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function We(e){return e.filter(function(e,t,n){return n.indexOf(e)===t})}var De=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"],$e=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;t=j(t,De);return e.setQueryParameters(t)},Be=function(e,t){return t.facets.reduce(function(e,t){return e.addFacet(t)},e)},Ue=function(e,t){return t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},e)},qe=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)})},Qe=function(e,t){return t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},e)},Ve=function(e,t){return e.setQueryParameters({facetsRefinements:F(F({},e.facetsRefinements),t.facetsRefinements)})},Ke=function(e,t){return e.setQueryParameters({facetsExcludes:F(F({},e.facetsExcludes),t.facetsExcludes)})},ze=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:F(F({},e.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)})},Je=function(e,t){return e.setQueryParameters({numericRefinements:F(F({},e.numericRefinements),t.numericRefinements)})},Ze=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:F(F({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)})},Ye=function(e,t){t=We([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return 0<t.length?e.setQueryParameters({ruleContexts:t}):e},Xe=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=Ze(e,t),e=qe(e,t),e=Qe(e,t),e=Je(e,t),e=ze(e,t),e=Ke(e,t),e=Ve(e,t),e=Ue(e,t),e=Ye(e,t),e=Be(e,t);return $e(e,t)})};function Ge(n,r){return null==n?n:Object.keys(n).reduce(function(e,t){return 0<=r.indexOf(t)||(e[t]=n[t]),e},{})}function et(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 I(Array(e)).map(function(e,t){return n+t*r})}function tt(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 nt(e,t,n){var n=t.getResultsForWidget(n),r=t.getHelper();return{helper:r,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:r.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function rt(i){return i.some(function(e){return e.isHighlighted})?i.map(function(e,t){return F(F({},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,!(Ie.test(ae(n.value))||t!==r?n.isHighlighted:t))});var n,r}):i.map(function(e){return F(F({},e),{},{isHighlighted:!1})})}function it(e,t){t=(1<arguments.length&&void 0!==t?t:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window:window})}function at(e){return Array.isArray(e)?e:[e]}function st(y){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(y,ot()),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=be(y,(a=void 0)===h?100:h),{$$type:"ais.answers",init:function(e){var t=e.state,n=e.instantSearchInstance;if("function"!=typeof n.client.initIndex)throw new Error(ot("`algoliasearch` <5 required."));n=n.client.initIndex(t.index);if("function"!=typeof n.findAnswers)throw new Error(ot("`algoliasearch` >= 4.8.0 required."));u=be(n.findAnswers,p),y(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(t){var n=this,e=t.state.query;e?(s=[],o=!0,y(F(F({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1),r(u(e,l,F(F({},v),{},{nbHits:f,attributesForPrediction:d}))).then(function(e){e&&(g&&0<e.hits.length&&(e.hits=ue(e.hits)),e=ke(je(e.hits,0,f),e.queryID),s=e,o=!1,c(F(F({},n.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1))})):(o=!(s=[]),y(F(F({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1))},getRenderState:function(e,t){return F(F({},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(ot("The `queryLanguages` expects an array of strings."))}}var ot=l({name:"answers",connector:!0});function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var ct=n;function ut(e){return"function"==typeof e}function lt(e){return"object"==typeof e&&null!==e}function dt(e){return void 0===e}n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.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},n.prototype.emit=function(e){var t,n,r,i,a,s,o;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||lt(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(dt(t=this._events[e]))return!1;if(ut(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(lt(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},n.prototype.on=n.prototype.addListener=function(e,t){if(ut(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,ut(t.listener)?t.listener:t),this._events[e]?lt(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,lt(this._events[e])&&!this._events[e].warned&&(t=dt(this._maxListeners)?n.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")},n.prototype.once=function(e,t){var n;if(ut(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))}},n.prototype.removeListener=function(e,t){var n,r,i,a;if(!ut(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||ut(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(lt(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},n.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(ut(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},n.prototype.listeners=function(e){e=this._events&&this._events[e]?ut(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},n.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(ut(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)};var ht=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function ft(e,t,n){this.main=e,this.fn=t,this.recommendFn=n,this.lastResults=null,this.lastRecommendResults=null}ht(ft,ct),ft.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},ft.prototype.getModifiedState=function(e){return this.fn(e)},ft.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)};var mt=ft;var pt=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},gt=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")};function vt(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function yt(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||(vt(r)&&vt(n)?e[i]=yt(r,n):e[i]="object"==typeof(r=n)&&null!==r?yt(Array.isArray(r)?[]:{},r):r));return e}var bt=function(e){vt(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];vt(r)&&yt(e,r)}return e};var Rt=function(e){return e&&0<Object.keys(e).length};var St=function(e,t){if(null===e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r};function _t(e){this.params=(e=e||{}).params||[]}_t.prototype={constructor:_t,addParams:function(e){var t=this.params.slice();return t.push(e),new _t({params:t})},removeParams:function(t){return new _t({params:this.params.filter(function(e){return e.$$id!==t})})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(t,n){return this.params.filter(function(e){return void 0===n[e.$$id]}).map(function(e){e=Object.assign({},e,{indexName:t,threshold:e.threshold||0});return delete e.$$id,e})}};var wt=_t;function Pt(e,t){this._state=e,this._rawResults={};var n=this;e.params.forEach(function(e){e=e.$$id;n[e]=t[e],n._rawResults[e]=t[e]})}Pt.prototype={constructor:Pt};var Nt=Pt;function xt(n){return Object.keys(n).sort().reduce(function(e,t){return e[t]=n[t],e},{})}function It(){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 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];0<t?e.facetFilters=n.concat(i.attribute+":"+i.value):0<n.length?e.facetFilters=n:delete e.facetFilters,u.push({indexName:o,params:e})})}),u},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(d._getHitsHierarchicalFacetsAttributes(e)).sort(),n=d._getFacetFilters(e),r=d._getNumericFilters(e),i=d._getTagFilters(e),a={};return 0<t.length&&(a.facets=-1<t.indexOf("*")?["*"]:t),0<i.length&&(a.tagFilters=i),0<n.length&&(a.facetFilters=n),0<r.length&&(a.numericFilters=r),xt(bt({},e.getQueryParams(),a))},_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),xt(bt({},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).sort().forEach(function(t){(e[t]||[]).slice().sort().forEach(function(e){u.push(t+":"+e)})}),s.facetsExcludes||{}),r=(Object.keys(n).sort().forEach(function(t){(n[t]||[]).sort().forEach(function(e){u.push(t+":-"+e)})}),s.disjunctiveFacetsRefinements||{}),l=(Object.keys(r).sort().forEach(function(t){var n,e=r[t]||[];t!==o&&e&&0!==e.length&&(n=[],e.slice().sort().forEach(function(e){n.push(t+":"+e)}),u.push(n))}),s.hierarchicalFacetsRefinements||{});return Object.keys(l).sort().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),xt(bt({},d._getHitsSearchParams(r),t))}},Ct=d,p=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var Tt=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})};var Ft=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.")},Et={addRefinement:function(e,t,n){var r;return Et.isRefined(e,t,n)?e:(n=""+n,n=e[t]?e[t].concat(n):[n],(r={})[t]=n,It({},r,e))},removeRefinement:function(e,n,t){var r;return void 0===t?Et.clearRefinement(e,function(e,t){return n===t}):(r=""+t,Et.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 Et.isRefined(e,t,n)?Et.removeRefinement(e,t,n):Et.addRefinement(e,t,n)},clearRefinement:function(i,a,s){var o,e;return void 0===a?Rt(i)?{}:i:"string"==typeof a?St(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=Boolean(e[t])&&0<e[t].length;return void 0!==n&&r?-1!==e[t].indexOf(""+n):r}},r=Et;function jt(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return jt(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),bt(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&&Rt(t.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):Rt(e.numericRefinements)&&t.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},s.prototype={constructor:s,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:r.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:r.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:r.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:r.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return e.numericRefinements===this.numericRefinements&&e.facetsRefinements===this.facetsRefinements&&e.facetsExcludes===this.facetsExcludes&&e.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&e.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(e)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,n){var r,n=Ft(n);return this.isNumericRefined(e,t,n)?this:((r=bt({},this.numericRefinements))[e]=bt({},r[e]),r[e][t]?(r[e][t]=r[e][t].slice(),r[e][t].push(n)):r[e][t]=[n],this.setQueryParameters({numericRefinements:r}))},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(n,r,e){var i=e;return void 0!==i?this.isNumericRefined(n,r,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r&&jt(e.val,Ft(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?Rt(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof s?St(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 r.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:r.addRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return r.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:r.addRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return r.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:r.addRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},addTagRefinement:function(e){return this.isTagRefined(e)?this:(e={tagRefinements:this.tagRefinements.concat(e)},this.setQueryParameters(e))},removeFacet:function(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(e){return e!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(e){return e!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(e){return e.name!==t})}):this},removeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return r.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:r.removeRefinement(this.facetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return r.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:r.removeRefinement(this.facetsExcludes,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return r.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:r.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},removeTagRefinement:function(t){var e;return this.isTagRefined(t)?(e={tagRefinements:this.tagRefinements.filter(function(e){return e!==t})},this.setQueryParameters(e)):this},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsRefinements:r.toggleRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleExcludeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsExcludes:r.toggleRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return this.setQueryParameters({disjunctiveFacetsRefinements:r.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},toggleHierarchicalFacetRefinement:function(e,t){var n,r;if(this.isHierarchicalFacet(e))return n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={},void 0!==this.hierarchicalFacetsRefinements[e]&&0<this.hierarchicalFacetsRefinements[e].length&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:It({},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:It({},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:It({},t,this.hierarchicalFacetsRefinements)})):this},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return-1<this.disjunctiveFacets.indexOf(e)},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return-1<this.facets.indexOf(e)},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&r.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&r.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&r.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){return!!this.isHierarchicalFacet(e)&&(e=this.getHierarchicalRefinement(e),t?-1!==e.indexOf(t):0<e.length)},isNumericRefined:function(e,t,n){var r,i;return void 0===n&&void 0===t?Boolean(this.numericRefinements[e]):(r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==n&&r?(n=Ft(n),t=void 0!==(e=this.numericRefinements[e][t],i=n,p(e,function(e){return jt(e,i)})),r&&t):r)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=Tt(Object.keys(this.numericRefinements).filter(function(e){return 0<Object.keys(t.numericRefinements[e]).length}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(e){return 0<t.disjunctiveFacetsRefinements[e].length}).concat(e).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var t=this;return Tt(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(e){return 0<t.hierarchicalFacetsRefinements[e].length})).sort()},getUnrefinedDisjunctiveFacets:function(){var t=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return-1===t.indexOf(e)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var n=this.managedParameters,r={},i=this;return Object.keys(this).forEach(function(e){var t=i[e];-1===n.indexOf(e)&&void 0!==t&&(r[e]=t)}),r},setQueryParameter:function(e,t){var n;return this[e]===t?this:((n={})[e]=t,this.setQueryParameters(n))},setQueryParameters:function(e){if(!e)return this;var t=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?St(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)}};function kt(e){return Array.isArray(e)?e.filter(Boolean):[]}function Ot(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Lt(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 Mt=s;var Ht=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})):[]},At=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=Ht(n.map(function(e){var t,n,r,i,a=e[0],e=e[1];return e=e,a=a,t=c,n=Dt(d),r=s.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:Wt(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=Lt(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})}},Wt=pt,Dt=gt;var $t=pt,Bt=gt;function Ut(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function qt(e,t,n){t&&t[n]&&(e.stats=t[n])}function Qt(l,t,e){var o=t[0]||{},d=(this._rawResults=t,this),n=(Object.keys(o).forEach(function(e){d[e]=o[e]}),bt({persistHierarchicalRootCount:!1},e)),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=Ut(l.facets),u=Ut(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=Ot(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},qt(d.disjunctiveFacets[i],o.facets_stats,e)),r&&(i=c[e],d.facets[i]={name:e,data:a,exhaustive:o.exhaustiveFacetsCount},qt(d.facets[i],o.facets_stats,e)))}),this.hierarchicalFacets=kt(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=Ot(l.hierarchicalFacets,function(e){return e.name===s.name}),-1!==(e=Ot(d.hierarchicalFacets[n],function(e){return e.attribute===t}))&&(d.hierarchicalFacets[n][e].data=bt({},d.hierarchicalFacets[n][e].data,r))):(n=u[t],e=o.facets&&o.facets[t]||{},d.disjunctiveFacets[n]={name:t,data:It({},r,e),exhaustive:i.exhaustiveFacetsCount},qt(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(Bt(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=Ot(l.hierarchicalFacets,function(e){return e.name===o.name}),a=Ot(d.hierarchicalFacets[i],function(e){return e.attribute===t});-1!==a&&(e={},0<u.length&&!d.persistHierarchicalRootCount&&(e[n=u[0].split(c)[0]]=d.hierarchicalFacets[i][a].data[n]),d.hierarchicalFacets[i][a].data=It(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:h[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(At(l)),this.facets=kt(this.facets),this.disjunctiveFacets=kt(this.disjunctiveFacets),this._state=l}function Vt(n,r){function e(e){return e.name===r}var i,a,t,s,o,c;return n._state.isConjunctiveFacet(r)?(i=p(n.facets,e))?Object.keys(i.data).map(function(e){var t=$t(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=$t(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))&&(c=n._state.getHierarchicalFacetByName(r),s=n._state._getHierarchicalFacetSeparator(c),(c=(o=0===(o=Bt(n._state.getHierarchicalRefinement(r)[0]||"")).indexOf(c.rootPath)?o.replace(c.rootPath+s,""):o).split(s)).unshift(r),function t(e,n,r){e.isRefined=e.name===(n[r]&&n[r].trim());e.data&&e.data.forEach(function(e){t(e,n,r+1)})}(t,c,0)),t):void 0}function Kt(e,t){e=p(e,function(e){return e.name===t});return e&&e.stats}function zt(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}}Qt.prototype.getFacetByName=function(t){function e(e){return e.name===t}return p(this.facets,e)||p(this.disjunctiveFacets,e)||p(this.hierarchicalFacets,e)},Qt.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],Qt.prototype.getFacetValues=function(e,t){var o,c,n=Vt(this,e);if(n)return o=It({},t,{sortBy:Qt.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),c=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]),It({data:a},e)):e}(function(e,t){if(o.facetOrdering){t=t;n=(n=c).renderingContent&&n.renderingContent.facetOrdering&&n.renderingContent.facetOrdering.values&&n.renderingContent.facetOrdering.values[t];if(n)return t=e,r=[],i=[],a=(n=n).hide||[],s=(n.order||[]).reduce(function(e,t,n){return e[t]=n,e},{}),t.forEach(function(e){var t=e.path||e.name,n=-1<a.indexOf(t);n||void 0===s[t]?n||i.push(e):r[s[t]]=e}),r=r.filter(function(e){return e}),"hidden"===(t=n.sortRemainingBy)?r:r.concat(Ht(i,(n="alpha"===t?[["path","name"],["asc","asc"]]:[["count"],["desc"]])[0],n[1]))}var r,i,a,s,n;if(Array.isArray(o.sortBy))return t=Lt(o.sortBy,Qt.DEFAULT_SORT),Ht(e,t[0],t[1]);if("function"==typeof o.sortBy)return n=o.sortBy,e.sort(n);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]:c._state.getHierarchicalFacetByName(n.name).attributes)},Qt.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?Kt(this.facets,e):this._state.isDisjunctiveFacet(e)?Kt(this.disjunctiveFacets,e):void 0},Qt.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(zt(0,"facet",t,e,o.facets))})}),Object.keys(s.facetsExcludes).forEach(function(t){s.facetsExcludes[t].forEach(function(e){c.push(zt(0,"exclude",t,e,o.facets))})}),Object.keys(s.disjunctiveFacetsRefinements).forEach(function(t){s.disjunctiveFacetsRefinements[t].forEach(function(e){c.push(zt(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 Jt=Qt;var Zt=function(r){var t,n,i,a={};return r.forEach(function(e){e.forEach(function(e,t){a[e.objectID]?a[e.objectID]={indexSum:a[e.objectID].indexSum+t,count:a[e.objectID].count+1}:a[e.objectID]={indexSum:t,count:1}})}),t=a,n=r.length,i=[],Object.keys(t).forEach(function(e){t[e].count<2&&(t[e].indexSum+=100),i.push({objectID:e,avgOfIndices:t[e].indexSum/n})}),i.sort(function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}).reduce(function(e,t){var n=p(r.reduce(function(e,t){return e.concat(t)},[]),function(e){return e.objectID===t.objectID});return n?e.concat(n):e},[])},gt="3.22.5",Yt=pt;function e(e,t,n,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.22.5)"),this.setClient(e);e=n||{};e.index=t,this.state=Mt.make(e),this.recommendState=new wt({params:e.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=r,this._recommendCache={}}function Xt(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function Gt(){return this.state.page}ht(e,ct),e.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},e.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},e.prototype.recommend=function(){return this._recommend(),this},e.prototype.getQuery=function(){var e=this.state;return Ct._getHitsSearchParams(e)},e.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,e=Ct._getQueries(n.index,n),r=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(e).then(function(e){return r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),{content:new Jt(n,e.results),state:n,_originalResponse:e}},function(e){throw r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),e});this.client.search(e).then(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(null,new Jt(n,e.results),n)}).catch(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(e,null,n)})},e.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=bt({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:St(Ct._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)},e.prototype.searchForFacetValues=function(t,e,n,r){var i,a,s,o="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,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=Ct.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=Yt(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")},e.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},e.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},e.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},e.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},e.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},e.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},e.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},e.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},e.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},e.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},e.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},e.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},e.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},e.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},e.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},e.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},e.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},e.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},e.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},e.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},e.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},e.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},e.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},e.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},e.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},e.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},e.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},e.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},e.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},e.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},e.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},e.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},e.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},e.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},e.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},e.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},e.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},e.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},e.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},e.prototype.setCurrentPage=Xt,e.prototype.setPage=Xt,e.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},e.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},e.prototype.setState=function(e){return this._change({state:Mt.make(e),isPageReset:!1}),this},e.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new Mt(e),this},e.prototype.hasRefinements=function(e){return!!Rt(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},e.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},e.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},e.prototype.hasTag=function(e){return this.state.isTagRefined(e)},e.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},e.prototype.getIndex=function(){return this.state.index},e.prototype.getCurrentPage=Gt,e.prototype.getPage=Gt,e.prototype.getTags=function(){return this.state.tagRefinements},e.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},e.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},e.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},e.prototype._search=function(e){var r=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=Ct._getQueries(r.index,r),i.push({state:r,queriesCount:t.length,helper:this}),this.emit("search",{state:r,results:this.lastResults})),this.derivedHelpers.map(function(e){var t=e.getModifiedState(r),n=t.index?Ct._getQueries(t.index,t):[];return i.push({state:t,queriesCount:n.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),n})),t=Array.prototype.concat.apply(t,e),e=this._queryId++;if(this._currentNbQueries++,!t.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,i,e));try{this.client.search(t).then(this._dispatchAlgoliaResponse.bind(this,i,e)).catch(this._dispatchAlgoliaError.bind(this,e))}catch(e){this.emit("error",{error:e})}},e.prototype._recommend=function(){var r=this.state,e=this.recommendState,t=this.getIndex(),i=[{state:e,index:t,helper:this}],a=e.params.map(function(e){return e.$$id}),s=(this.emit("fetch",{recommend:{state:e,results:this.lastRecommendResults}}),this._recommendCache),e=this.derivedHelpers.map(function(e){var t,n=e.getModifiedState(r).index;return n?(t=e.getModifiedRecommendState(new wt),i.push({state:t,index:n,helper:e}),a=Array.prototype.concat.apply(a,t.params.map(function(e){return e.$$id})),e.emit("fetch",{recommend:{state:t,results:e.lastRecommendResults}}),t._buildQueries(n,s)):[]}),t=Array.prototype.concat.apply(this.recommendState._buildQueries(t,s),e);if(0!==t.length)if(0<t.length&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{e=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(t).then(this._dispatchRecommendResponse.bind(this,e,i,a)).catch(this._dispatchRecommendError.bind(this,e))}catch(e){this.emit("error",{error:e})}}},e.prototype._dispatchAlgoliaResponse=function(e,t,n){var r,i=this;t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty"),r=n.results.slice(),e.forEach(function(e){var t=e.state,n=e.queriesCount,e=e.helper,n=r.splice(0,n);t.index?(e.lastResults=new Jt(t,n,i._searchResultsOptions),e.emit("result",{results:e.lastResults,state:t})):e.emit("result",{results:null,state:t})}))},e.prototype._dispatchRecommendResponse=function(e,t,n,r){var i,a,s;e<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,0===this._currentNbRecommendQueries&&this.emit("recommendQueueEmpty"),i=this._recommendCache,a={},n.filter(function(e){return void 0===i[e]}).forEach(function(e,t){a[e]||(a[e]=[]),a[e].push(t)}),Object.keys(a).forEach(function(e){var t=a[e],n=r.results[t[0]];1===t.length?i[e]=n:i[e]=Object.assign({},n,{hits:Zt(t.map(function(e){return r.results[e].hits}))})}),s={},n.forEach(function(e){s[e]=i[e]}),t.forEach(function(e){var t=e.state,n=e.helper;e.index?(n.lastRecommendResults=new Nt(t,s),n.emit("recommend:result",{recommend:{results:n.lastRecommendResults,state:t}})):n.emit("recommend:result",{results:null,state:t})}))},e.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"))},e.prototype._dispatchRecommendError=function(e,t){e<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbRecommendQueries&&this.emit("recommendQueueEmpty"))},e.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},e.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},e.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}))},e.prototype._recommendChange=function(e){e=e.state;e!==this.recommendState&&(this.recommendState=e,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},e.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},e.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.22.5)"),this.client=e),this},e.prototype.getClient=function(){return this.client},e.prototype.derive=function(e,t){e=new mt(this,e,t);return this.derivedHelpers.push(e),e},e.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},e.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var en=e;function tn(e,t,n,r){return new en(e,t,n,r)}tn.version=gt,tn.AlgoliaSearchHelper=en,tn.SearchParameters=Mt,tn.RecommendParameters=wt,tn.SearchResults=Jt,tn.RecommendResults=Nt;var v=tn,nn=l({name:"configure",connector:!0});function rn(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return F(F({},e),{},E({},t,void 0))},{}))}function an(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:C,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return function(r){var t;if(r&&se(r.searchParameters))return t={},{$$type:"ais.configure",init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),rn(e,r)},getRenderState:function(e,t){t=this.getWidgetRenderState(t);return F(F({},e),{},{configure:F(F({},t),{},{widgetParams:F(F({},t.widgetParams),{},{searchParameters:Xe(new v.SearchParameters(null==(e=e.configure)?void 0:e.widgetParams.searchParameters),new v.SearchParameters(t.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var n,e=e.helper;return t.refine||(t.refine=(n=e,function(e){var t=rn(n.state,r),t=Xe(t,new v.SearchParameters(e));r.searchParameters=e,n.setState(t).search()})),{refine:t.refine,widgetParams:r}},getWidgetSearchParameters:function(e,t){t=t.uiState;return Xe(e,new v.SearchParameters(F(F({},t.configure),r.searchParameters)))},getWidgetUiState:function(e){return F(F({},e),{},{configure:F(F({},e.configure),r.searchParameters)})}};throw new Error(nn("The `searchParameters` option expects an object."))}}var sn=l({name:"configure-related-items",connector:!0});function on(e){var t=e.attributeName,n=e.attributeValue,e=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(e||1,">")}function cn(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(sn("The `hit` option is required."));if(s)return t=Object.keys(s).reduce(function(e,t){var n=s[t],r=Ce(a,t),i=n.score;return Array.isArray(r)?[].concat(I(e),[r.map(function(e){return on({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(I(e),[on({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]),e=F({},e(new v.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.objectID)],optionalFilters:t}))),F(F({},an(n,r)({searchParameters:e})),{},{$$type:"ais.configureRelatedItems"});throw new Error(sn("The `matchingPatterns` option is required."))}}function un(u){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(u,dn()),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"===W(e)})))throw new Error(dn("The `widgets` option expects an array of widgets."));if(Array.isArray(i))return o=new Map,{$$type:"ais.dynamicWidgets",init:function(n){e.forEach(function(e){var t=Ee(e,n);o.set(t,{widget:e,isMounted:!1})}),u(F(F({},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(F(F({},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 F(F({},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(dn("The `transformItems` option expects a function that returns an Array."))}};throw new Error(dn("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(i))))}}function ln(n){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,hn()),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(hn("The options `includedAttributes` and `excludedAttributes` cannot be used together."));function i(){return l.refine()}function a(){return l.createURL()}var l={refine:C,createURL:function(){return""},attributesToClear:[]};return{$$type:"ais.clearRefinements",init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){s()},getRenderState:function(e,t){return F(F({},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(We(Fe(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(X({helper:t,attributesToClear:e})).search()})},l.createURL=function(){return t(Xe.apply(void 0,I(l.attributesToClear.map(function(e){return X({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 dn=l({name:"dynamic-widgets",connector:!0}),hn=l({name:"clear-refinements",connector:!0});function fn(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,mn()),function(a){if((a||{}).includedAttributes&&(a||{}).excludedAttributes)throw new Error(mn("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(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){r()},getRenderState:function(e,t){return F(F({},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(pn({results:t.results,helper:t.helper,indexId:t.indexId,includedAttributes:s,excludedAttributes:o}),{results:n}))},[]):c(pn({results:{},helper:i,indexId:i.state.index,includedAttributes:s,excludedAttributes:o}),{results:n});return{items:e,canRefine:0<e.length,refine:function(e){return vn(i,e)},createURL:function(e){return r(gn(i.state,e))},widgetParams:a}}}}}var mn=l({name:"current-refinements",connector:!0});function pn(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=Fe(t,n.state,e).map(yn).filter(s);return o.reduce(function(e,t){return[].concat(I(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 vn(n,e)}}])},[])}function gn(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 vn(e,t){e.setState(gn(e.state,t)).search()}function yn(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 bn(c){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(c,Sn()),function(u){var e=u||{},l=e.attributes,t=e.separator,d=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,h=void 0!==t&&t,t=e.showMoreLimit,s=void 0===t?20:t,t=e.sortBy,f=void 0===t?_n:t,t=e.transformItems,m=void 0===t?function(e){return e}:t;if(!l||!Array.isArray(l)||0===l.length)throw new Error(Sn("The `attributes` option expects an array of strings."));if(!0===h&&s<=a)throw new Error(Sn("The `showMoreLimit` option must be greater than `limit`."));var p,g,v=k(l,1)[0],o=function(){};function y(){o()}var b=!1;function R(){return b?s:a}return{$$type:"ais.hierarchicalMenu",init:function(e){var t=e.instantSearchInstance;c(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t,n,r=e.instantSearchInstance;t=e,o=function(){b=!b,n.render(t)},c(F(F({},(n=this).getWidgetRenderState(e)),{},{instantSearchInstance:r}),!1)},dispose:function(e){e=e.state;return n(),e.removeHierarchicalFacet(v).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return F(F({},e),{},{hierarchicalMenu:F(F({},e.hierarchicalMenu),{},E({},v,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=this,r=e.results,i=e.state,a=e.createURL,s=e.instantSearchInstance,o=e.helper,e=[],c=!1;return p=p||de({instantSearchInstance:s,helper:o,attribute:function(e){e=e.split(d).length-1;return l[e]},widgetType:this.$$type}),g=g||function(e){p("click:internal",e),o.toggleFacetRefinement(v,e).search()},r&&(s=(s=r.getFacetValues(v,{sortBy:f,facetOrdering:f===_n}))&&!Array.isArray(s)&&s.data?s.data:[],t=(i.maxValuesPerFacet||0)>R()?s.length<=R():s.length<R(),c=h&&(b||!t),e=m(function i(e){return e.slice(0,R()).map(function(e){var t=e.name,n=e.escapedValue,r=e.data,e=(e.path,F(F({},j(e,Rn)),{},{value:n,label:t,data:null}));return Array.isArray(r)&&(e.data=i(r)),e})}(s),{results:r})),{items:e,refine:g,canRefine:0<e.length,createURL:function(t){return a(function(e){return n.getWidgetUiState(e,{searchParameters:i.resetPage().toggleFacetRefinement(v,t),helper:o})})},sendEvent:p,widgetParams:u,isShowingMore:b,toggleShowMore:y,canToggleShowMore:c}},getWidgetUiState:function(e,t){var t=t.searchParameters.getHierarchicalFacetBreadcrumb(v);return e=F(F({},e),{},{hierarchicalMenu:F(F({},e.hierarchicalMenu),{},E({},v,t))}),t=v,e.hierarchicalMenu&&(e.hierarchicalMenu[t]&&0!==e.hierarchicalMenu[t].length||delete e.hierarchicalMenu[t],0===Object.keys(e.hierarchicalMenu).length)&&delete e.hierarchicalMenu,e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.hierarchicalMenu&&t.hierarchicalMenu[v];if(e.isConjunctiveFacet(v)||e.isDisjunctiveFacet(v))return e;e.isHierarchicalFacet(v)&&e.getHierarchicalFacetByName(v);var e=e.removeHierarchicalFacet(v).addHierarchicalFacet({name:v,attributes:l,separator:d,rootPath:r,showParentLevel:i}),n=e.maxValuesPerFacet||0,n=Math.max(n,h?s:a),e=e.setQueryParameter("maxValuesPerFacet",n);return t?e.addHierarchicalFacetRefinement(v,t.join(d)):e.setQueryParameters({hierarchicalFacetsRefinements:F(F({},e.hierarchicalFacetsRefinements),{},E({},v,[]))})}}}}var Rn=["name","escapedValue","data","path"],Sn=l({name:"hierarchical-menu",connector:!0}),_n=["name:asc"];function wn(n){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,Pn()),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(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);n(F(F({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1),t.sendEvent("view:internal",t.items)},getRenderState:function(e,t){return F(F({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,e=e.instantSearchInstance;if(i=i||pe({instantSearchInstance:e,getIndex:function(){return n.getIndex()},widgetType:this.$$type}),a=a||ge({getIndex:function(){return n.getIndex()},widgetType:this.$$type,instantSearchInstance:e}),!t)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:i,bindEvent:a,widgetParams:r};s&&0<t.hits.length&&(t.hits=ue(t.hits));var e=ke(je(t.hits,t.page,t.hitsPerPage),t.queryID),e=o(e,{results:t});return{hits:e,items:e,results:t,banner:null==(e=t.renderingContent)||null==(t=e.widgets)||null==(e=t.banners)?void 0:e[0],sendEvent:i,bindEvent:a,widgetParams:r}},dispose:function(e){e=e.state;return c(),s?e.setQueryParameters(Object.keys(O).reduce(function(e,t){return F(F({},e),{},E({},t,void 0))},{})):e},getWidgetSearchParameters:function(e,t){return s?e.setQueryParameters(O):e}}}}var Pn=l({name:"hits",connector:!0}),Nn=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=we(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=We(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 xn(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=Nn({method:e,results:o,hits:c,objectIDs:i.objectIDs});s(e,F(F({},a),i))},a(F(F({},e),{},{insights:i}),t)):a(e,t)},e)}}var In,w,Cn,Tn,Fn,En={},jn=[],kn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function On(e,t){for(var n in t)e[n]=t[n];return e}function Ln(e){var t=e.parentNode;t&&t.removeChild(e)}function L(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?In.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 Mn(e,s,r,i,null)}function Mn(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?++Cn:i};return null==i&&null!=w.vnode&&w.vnode(e),e}function Hn(){return{current:null}}function N(e){return e.children}function An(e,t){this.props=e,this.context=t}function Wn(e,t){if(null==t)return e.__?Wn(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?Wn(e):null}function Dn(e){(e.__d||(e.__d=!0,!Tn.push(e))||$n.__r++)&&Fn===w.debounceRendering||((Fn=w.debounceRendering)||setTimeout)($n)}function $n(){for(var e;$n.__r=Tn.length;)e=Tn.sort(function(e,t){return e.__v.__b-t.__v.__b}),Tn=[],e.some(function(e){var t,n,r,i,a;e.__d&&(i=(r=(e=e).__v).__e,a=e.__P)&&(t=[],(n=On({},r)).__v=r.__v+1,zn(a,r,n,e.__n,void 0!==a.ownerSVGElement,null!=r.__h?[i]:null,t,null==i?Wn(r):i,r.__h),Jn(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 Bn(e,t,n,r,i,a,s,o,c,u){var l,d,h,f,m,p,g,v=r&&r.__k||jn,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?Mn(null,f,null,null,f):Array.isArray(f)?Mn(N,{children:f},null,null,null):0<f.__b?Mn(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}zn(e,f,h=h||En,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):Un(r,i,i,a,i.__e,n));return n}(f,c,e):c=Un(e,f,h,v,m,c),"function"==typeof n.type&&(n.__d=c)):c&&h.__e==c&&c.parentNode!=e&&(c=Wn(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=Wn(r,l+1)),function e(t,n,r){var i,a;if(w.unmount&&w.unmount(t),!(i=t.ref)||i.current&&i.current!==t.__e||Zn(i,null,n),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){w.__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||Ln(t.__e),t.__=t.__e=t.__d=void 0}(v[l],v[l]));if(g)for(l=0;l<g.length;l++)Zn(g[l],g[++l],g[++l])}function Un(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 qn(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||kn.test(t)?n:n+"px"}function Qn(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||qn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||qn(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?Kn:Vn,a):e.removeEventListener(t,a?Kn:Vn,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 Vn(e){this.l[e.type+!1](w.event?w.event(e):e)}function Kn(e){this.l[e.type+!0](w.event?w.event(e):e)}function zn(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=w.__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 An(g,y),l.constructor=_,l.render=Yn),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=On({},l.__s)),On(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=w.__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=On(On({},r),l.getChildContext())),d||null==l.getSnapshotBeforeUpdate||(m=l.getSnapshotBeforeUpdate(h,f)),S=null!=u&&u.type===N&&null==u.key?u.props.children:u,Bn(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&&In.call(e.childNodes),u=(d=n.props||En).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||Qn(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]||Qn(e,a,t[a],n[a],r)}(e,h,d,i,o),l)t.__k=[];else if(m=t.props.children,Bn(e,Array.isArray(m)?m:[m],t,n,r,i&&"foreignObject"!==f,a,s,a?a[0]:n.__k&&Wn(n,0),o),null!=a)for(m=a.length;m--;)null!=a[m]&&Ln(a[m]);o||("value"in h&&void 0!==(m=h.value)&&(m!==e.value||"progress"===f&&!m||"option"===f&&m!==d.value)&&Qn(e,"value",m,d.value,!1),"checked"in h&&void 0!==(m=h.checked)&&m!==e.checked&&Qn(e,"checked",m,d.checked,!1))}return e}(n.__e,t,n,r,i,a,s,c);(u=w.diffed)&&u(t)}catch(e){t.__v=null,!c&&null==a||(t.__e=o,t.__h=!!c,a[a.indexOf(o)]=null),w.__e(e,t,n)}}}function Jn(e,t){w.__c&&w.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){w.__e(e,t.__v)}})}function Zn(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){w.__e(e,n)}}function Yn(e,t,n){return this.constructor(e,n)}function M(e,t,n){var r,i,a;w.__&&w.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],zn(t,e=(!r&&n||t).__k=L(N,null,[e]),i||En,En,void 0!==t.ownerSVGElement,!r&&n?[n]:!i&&t.firstChild?In.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),Jn(a,e)}function Xn(e,t){var n,e={method:e,payload:t},t=e.method;if("object"!==W(e=e.payload))throw new Error("The insights helper expects the payload to be an object.");try{n=he(e)}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(n,'"')}In=jn.slice,w={__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}},Cn=0,An.prototype.setState=function(e,t){var n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=On({},this.state);(e="function"==typeof e?e(On({},n),this.props):e)&&On(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),Dn(this))},An.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Dn(this))},An.prototype.render=N,Tn=[],$n.__r=0;var Gn=function(e){var n=e.insights,r=e.sendEvent;return function(e){var t=er(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 fe(e)}catch(e){throw new Error("The insights middleware was unable to parse `data-insights-event`.")}}(t).forEach(function(e){return r(e)}),er(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:fe(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 er(e,t,n){for(var r=e;r&&!n(r);){if(r===t)return null;r=r.parentElement}return r}function tr(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(r,nr()),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(nr("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(nr("A default value must be specified in `items`."));if(1<e.length)throw new Error(nr("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 n=e.state,r=e.createURL,i=e.getWidgetUiState,a=e.helper;return function(t){return r(function(e){return i(e,{searchParameters:n.resetPage().setQueryParameter("hitsPerPage",t||0===t?t:void 0),helper:a})})}};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(I(c))),r(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:n}),!0)},render:function(e){var t=e.instantSearchInstance;r(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),e.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return F(F({},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 F(F({},e),{},{isRefined:Number(e.value)===Number(t)})})),{results:r}),refine:u(e),createURL:l({state:n,createURL:i,getWidgetUiState:this.getWidgetUiState,helper:e}),hasNoResults:!a,canRefine:a,widgetParams:s}},getWidgetUiState:function(e,t){t=t.searchParameters.hitsPerPage;return void 0===t||t===n.value?e:F(F({},e),{},{hitsPerPage:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameters({hitsPerPage:t.hitsPerPage||n.value})}}}}var pt=xn(wn),nr=l({name:"hits-per-page",connector:!0}),rr=["page"],ir=["clickAnalytics","userToken"],ar=l({name:"infinite-hits",connector:!0});function sr(e){e=e||{};e.page;return j(e,rr)}function or(e){e=e||{};e.clickAnalytics,e.userToken;return j(e,ir)}function cr(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(i,ar()),function(m){var n,r,p,g,v,y,e=m||{},t=e.escapeHTML,b=void 0===t||t,t=e.transformItems,R=void 0===t?function(e){return e}:t,t=e.cache,S=void 0===t?(r=n=null,{read:function(e){e=e.state;return He(r,sr(e))?n:null},write:function(e){var t=e.state,e=e.hits;r=sr(t),n=e}}):t,_=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(I(t)))},w=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(I(t)))};return{$$type:"ais.infiniteHits",init:function(e){i(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e);i(F(F({},e),{},{instantSearchInstance:t}),!1),v("view:internal",e.currentPageHits)},getRenderState:function(e,t){return F(F({},e),{},{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n,r,i,a=e.results,s=e.helper,o=e.parent,c=e.state,e=e.instantSearchInstance,u=[],o=o.getPreviousState()||c,c=S.read({state:or(o)})||{},l=null==a||null==(l=a.renderingContent)||null==(l=l.widgets)||null==(l=l.banners)?void 0:l[0],d=a?(h=void 0===(h=o.page)?0:h,b&&0<a.hits.length&&(a.hits=ue(a.hits)),f=ke(je(a.hits,a.page,a.hitsPerPage),a.queryID),f=R(f,{results:a}),t=!1,function t(e,n){n(e),e.getWidgets().forEach(function(e){ve(e)&&t(e,n)})}(e.mainIndex,function(e){!t&&e.getWidgets().some(function(e){return"ais.dynamicWidgets"===e.$$type})&&(t=!0)}),d=!(null!=(d=o.disjunctiveFacets)&&d.length||(o.facets||[]).filter(function(e){return"*"!==e}).length||null!=(d=o.hierarchicalFacets)&&d.length),void 0!==c[h]||a.__isArtificial||"idle"!==e.status||t&&d||(c[h]=f,S.write({state:or(o),hits:c})),u=f,0===_(o,c)):(p=function(){r.overrideStateWithoutTriggeringChangeEvent(F(F({},r.state),{},{page:_(r.state,S.read({state:or(r.state)})||{})-1})).searchWithoutTriggeringOnStateChange()},n=r=s,g=function(){n.setPage(w(n.state,S.read({state:or(n.state)})||{})+1).search()},v=pe({instantSearchInstance:e,getIndex:function(){return s.getIndex()},widgetType:this.$$type}),y=ge({getIndex:function(){return s.getIndex()},widgetType:this.$$type,instantSearchInstance:e}),void 0===o.page||0===_(o,c)),h=(i=c,Object.keys(i).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(i[t])},[])),f=!a||a.nbPages<=w(o,c)+1;return{hits:h,items:h,currentPageHits:u,sendEvent:v,bindEvent:y,banner:l,results:a,showPrevious:p,showMore:g,isFirstPage:d,isLastPage:f,widgetParams:m}},dispose:function(e){e=e.state,a(),e=e.setQueryParameter("page",void 0);return b?e.setQueryParameters(Object.keys(O).reduce(function(e,t){return F(F({},e),{},E({},t,void 0))},{})):e},getWidgetUiState:function(e,t){t=t.searchParameters.page||0;return t?F(F({},e),{},{page:t+1}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,n=e,e=(b&&(n=e.setQueryParameters(O)),t.page?t.page-1:0);return n.setQueryParameter("page",e)}}}}function ur(n){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,dr()),function(l){var d,h,f,e=l||{},m=e.attribute,t=e.limit,r=void 0===t?10:t,t=e.showMore,p=void 0!==t&&t,t=e.showMoreLimit,i=void 0===t?20:t,t=e.sortBy,g=void 0===t?hr:t,t=e.transformItems,v=void 0===t?function(e){return e}:t;if(!m)throw new Error(dr("The `attribute` option is required."));if(!0===p&&i<=r)throw new Error(dr("The `showMoreLimit` option must be greater than `limit`."));var y=!1,b=function(){};function R(){b()}function S(){return y?i:r}return{$$type:"ais.menu",init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return a(),e.removeHierarchicalFacet(m).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return F(F({},e),{},{menu:F(F({},e.menu),{},E({},m,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n,r=this,i=e.results,a=e.createURL,s=e.instantSearchInstance,o=e.helper,c=[],u=!1;return d=d||de({instantSearchInstance:s,helper:o,attribute:m,widgetType:this.$$type}),h=h||function(t){return a(function(e){return r.getWidgetUiState(e,{searchParameters:o.state.resetPage().toggleFacetRefinement(m,t),helper:o})})},f=f||function(e){var t=k(o.getHierarchicalFacetBreadcrumb(m),1)[0];d("click:internal",e||t),o.toggleFacetRefinement(m,e||t).search()},e.results&&(t=e,n=this,b=function(){y=!y,n.render(t)}),i&&(e=(s=i.getFacetValues(m,{sortBy:g,facetOrdering:g===hr}))&&!Array.isArray(s)&&s.data?s.data:[],u=p&&(y||e.length>S()),c=v(e.slice(0,S()).map(function(e){var t=e.name,n=e.escapedValue;e.path;return F(F({},j(e,lr)),{},{label:t,value:n})}),{results:i})),{items:c,createURL:h,refine:f,sendEvent:d,canRefine:0<c.length,widgetParams:l,isShowingMore:y,toggleShowMore:R,canToggleShowMore:u}},getWidgetUiState:function(e,t){var t=k(t.searchParameters.getHierarchicalFacetBreadcrumb(m),1)[0];return e=F(F({},e),{},{menu:F(F({},e.menu),{},E({},m,t))}),t=m,e.menu&&(void 0===e.menu[t]&&delete e.menu[t],0===Object.keys(e.menu).length)&&delete e.menu,e},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,t=t.menu&&t.menu[m];return e.isConjunctiveFacet(m)||e.isDisjunctiveFacet(m)?e:(n=(e=e.removeHierarchicalFacet(m).addHierarchicalFacet({name:m,attributes:[m]})).maxValuesPerFacet||0,n=Math.max(n,p?i:r),e=e.setQueryParameter("maxValuesPerFacet",n),t?e.addHierarchicalFacetRefinement(m,t):e.setQueryParameters({hierarchicalFacetsRefinements:F(F({},e.hierarchicalFacetsRefinements),{},E({},m,[]))}))}}}}var ht=xn(cr),lr=["name","escapedValue","path"],dr=l({name:"menu",connector:!0}),hr=["isRefined","name:asc"];function fr(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,mr()),function(f){var m,e=f||{},t=e.attribute,p=void 0===t?"":t,t=e.items,g=void 0===t?[]:t,t=e.transformItems,v=void 0===t?function(e){return e}:t;if(""===p)throw new Error(mr("The `attribute` option is required."));if(g&&0!==g.length)return m={},{$$type:"ais.numericMenu",init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return r(),e.removeNumericRefinement(p)},getWidgetUiState:function(e,t){var t=t.searchParameters.getNumericRefinements(p),n=t["="]&&t["="][0];return n||0===n?F(F({},e),{},{numericMenu:F(F({},e.numericMenu),{},E({},p,"".concat(t["="])))}):(n=t[">="]&&t[">="][0]||"",t=t["<="]&&t["<="][0]||"",e=F(F({},e),{},{numericMenu:F(F({},e.numericMenu),{},E({},p,"".concat(n,":").concat(t)))}),n=p,e.numericMenu&&(":"===e.numericMenu[n]&&delete e.numericMenu[n],0===Object.keys(e.numericMenu).length)&&delete e.numericMenu,e)},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,t=t.numericMenu&&t.numericMenu[p],e=e.setQueryParameters({numericRefinements:F(F({},e.numericRefinements),{},E({},p,{}))});return t?-1===t.indexOf(":")?e.addNumericRefinement(p,"=",Number(t)):(n=(t=k(t.split(":").map(parseFloat),2))[0],t=t[1],n=b(n)?e.addNumericRefinement(p,">=",n):e,b(t)?n.addNumericRefinement(p,"<=",t):n):e},getRenderState:function(e,t){return F(F({},e),{},{numericMenu:F(F({},e.numericMenu),{},E({},p,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,r,n,i=this,a=e.results,s=e.state,o=e.instantSearchInstance,c=e.helper,u=e.createURL,e=(m.refine||(m.refine=function(e){var t=gr(c.state,p,e);m.sendEvent("click:internal",e),c.setState(t).search()}),m.createURL||(m.createURL=function(n){return function(t){return u(function(e){return i.getWidgetUiState(e,{searchParameters:gr(n,p,t),helper:c})})}}),m.sendEvent||(m.sendEvent=(t={instantSearchInstance:o}.instantSearchInstance,function(){1===arguments.length&&t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])})),!a||0===a.nbHits),o=(r=s,g.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:pr(r,p,{start:t,end:n,label:e})}})),l=!0,d=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=K(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.")}(o);try{for(d.s();!(n=d.n()).done;){var h=n.value;if(h.isRefined&&"{}"!==decodeURI(h.value)){l=!1;break}}}catch(e){d.e(e)}finally{d.f()}return{createURL:m.createURL(s),items:v(o,{results:a}),hasNoResults:e,canRefine:!(e&&l),refine:m.refine,sendEvent:m.sendEvent,widgetParams:f}}};throw new Error(mr("The `items` option expects an array of objects."))}}var mr=l({name:"numeric-menu",connector:!0});function pr(e,t,n){var r=e.getNumericRefinements(t);return void 0!==n.start&&void 0!==n.end?n.start===n.end?vr(r,"=",n.start):vr(r,">=",n.start)&&vr(r,"<=",n.end):void 0!==n.start?vr(r,">=",n.start):void 0!==n.end?vr(r,"<=",n.end):void 0===n.start&&void 0===n.end&&Object.keys(r).every(function(e){return 0===(r[e]||[]).length})}function gr(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(pr(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=vr(r,"=",n.start)?e.removeNumericRefinement(t,"=",n.start):e.addNumericRefinement(t,"=",n.start)}return void 0!==n.start&&(e=(e=vr(r,">=",n.start)?e.removeNumericRefinement(t,">=",n.start):e).addNumericRefinement(t,">=",n.start)),"number"==typeof(e=void 0!==n.end?(e=vr(r,"<=",n.end)?e.removeNumericRefinement(t,"<=",n.end):e).addNumericRefinement(t,"<=",n.end):e).page&&(e.page=0),e}function vr(e,t,n){return void 0!==e[t]&&e[t].includes(n)}function yr(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,Rr()),function(a){var e=a||{},s=e.totalPages,e=e.padding,o=new br({currentPage:0,total:0,padding:void 0===e?3:e}),c={};return{$$type:"ais.pagination",init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},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?F(F({},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=(c.refine||(c.refine=function(e){n.setPage(e),n.search()}),c.createURL||(c.createURL=function(t){return i(function(e){return F(F({},e),{},{page:t+1})})}),r.page||0),r=(r=(r=t||{nbPages:0}).nbPages,void 0!==s?Math.min(s,r):r);return o.currentPage=e,o.total=r,{createURL:c.createURL,refine:c.refine,canRefine:1<r,currentRefinement:e,nbHits:(null==t?void 0:t.nbHits)||0,nbPages:r,pages:t?o.pages():[],isFirstPage:o.isFirstPage(),isLastPage:o.isLastPage(),widgetParams:a}},getRenderState:function(e,t){return F(F({},e),{},{pagination:this.getWidgetRenderState(t)})}}}}var br=function(){function t(e){D(this,t),E(this,"currentPage",void 0),E(this,"total",void 0),E(this,"padding",void 0),this.currentPage=e.currentPage,this.total=e.total,this.padding=e.padding}return $(t,[{key:"pages",value:function(){var e,t=this.total,n=this.currentPage,r=this.padding;return 0===t?[0]:et((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}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),t}(),Rr=l({name:"pagination",connector:!0}),Sr=l({name:"range-input",connector:!0},{name:"range-slider",connector:!0});function _r(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 wr(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,Sr()),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(Sr("The `attribute` option is required."));if(b(l)&&b(d)&&d<l)throw new Error(Sr("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=_r({min:o?void 0:parseFloat(n),max:c?void 0:parseFloat(r),precision:h}),r=n.min,n=n.max,o=b(l)||i!==r?b(l)&&o?l:r:void 0,r=b(d)||t!==n?b(d)&&c?d:n:void 0,c=void 0===o,n=b(i)&&i<=o,c=c||b(o)&&(!b(i)||n),i=void 0===r,n=b(r)&&r<=t,i=i||b(r)&&(!b(t)||n);return(a!==o||s!==r)&&c&&i?(e=e.removeNumericRefinement(u),b(o)&&(e=e.addNumericRefinement(u,">=",o)),(e=b(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(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return F(F({},e),{},{range:F(F({},e.range),{},E({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,r=e.helper,e=e.instantSearchInstance,i=we(n&&n.disjunctiveFacets||[],function(e){return e.name===u}),i=i&&i.stats||{min:void 0,max:void 0},a=(i=i,a=b(l)?l:b(i.min)?i.min:0,i=b(d)?d:b(i.max)?i.max:0,_r({min:a,max:i,precision:h})),s=(s=k((i=r).getNumericRefinement(u,">=")||[],1)[0],i=k(i.getNumericRefinement(u,"<=")||[],1)[0],[b(s)?s:-1/0,b(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:F(F({},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:F(F({},e),{},{range:F(F({},e.range),{},E({},u,"".concat(n,":").concat(t)))})},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,e=e.addDisjunctiveFacet(u).setQueryParameters({numericRefinements:F(F({},e.numericRefinements),{},E({},u,{}))}),t=(b(l)&&(e=e.addNumericRefinement(u,">=",l)),b(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],b(n)&&(!b(l)||l<n)&&(e=(e=e.removeNumericRefinement(u,">=")).addNumericRefinement(u,">=",n)),b(t))&&(!b(d)||t<d)?(e=e.removeNumericRefinement(u,"<=")).addNumericRefinement(u,"<=",t):e}}}}function Pr(c){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(c,Ir()),function(h){var e=h||{},f=e.attribute,t=e.operator,i=void 0===t?"or":t,t=e.limit,m=void 0===t?10:t,t=e.showMore,p=void 0!==t&&t,t=e.showMoreLimit,a=void 0===t?20:t,t=e.sortBy,g=void 0===t?Cr:t,t=e.escapeFacetValues,o=void 0===t||t,t=e.transformItems,v=void 0===t?function(e){return e}:t;if(!f)throw new Error(Ir("The `attribute` option is required."));if(!/^(and|or)$/.test(i))throw new Error(Ir('The `operator` must one of: `"and"`, `"or"` (got "'.concat(i,'").')));if(!0===p&&a<=m)throw new Error(Ir("`showMoreLimit` should be greater than `limit`."));function y(e){var t=e.name,n=e.escapedValue;return F(F({},j(e,Nr)),{},{value:n,label:t,highlighted:t})}var b,R,S,_=[],w=!0,P=!1,N=function(){};function x(){N()}function I(){return P?a:m}function C(a,s){return function(i){return function(e){var t,n=i.instantSearchInstance,r=i.results;""===e&&_?c(F(F({},s.getWidgetRenderState(F(F({},i),{},{results:b}))),{},{instantSearchInstance:n}),!1):(t={highlightPreTag:(o?O:u).highlightPreTag,highlightPostTag:(o?O:u).highlightPostTag},a.searchForFacetValues(f,e,Math.min(I(),100),t).then(function(e){e=o?e.facetHits.map(function(e){return F(F({},e),{},{highlighted:oe(e.highlighted)})}):e.facetHits,e=v(e.map(function(e){var t=e.escapedValue,n=e.value;return F(F({},j(e,xr)),{},{value:t,label:n})}),{results:r});c(F(F({},s.getWidgetRenderState(F(F({},i),{},{results:b}))),{},{items:e,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:n}),!1)}))}}}var T=function(){return function(){}};return{$$type:"ais.refinementList",init:function(e){c(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){c(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return F(F({},e),{},{refinementList:F(F({},e.refinementList),{},E({},f,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n,r=this,i=e.results,a=e.state,s=e.createURL,o=e.instantSearchInstance,c=e.helper,u=[],l=[],o=(S&&R&&T||(S=de({instantSearchInstance:o,helper:c,attribute:f,widgetType:this.$$type}),R=function(e){S("click:internal",e),c.toggleFacetRefinement(f,e).search()},T=C(c,this)),i&&(l=(o=i.getFacetValues(f,{sortBy:g,facetOrdering:g===Cr}))&&Array.isArray(o)?o:[],u=v(l.slice(0,I()).map(y),{results:i}),o=a.maxValuesPerFacet,d=I(),w=d<o?l.length<=d:l.length<d,b=i,_=u,e.results)&&(t=e,n=this,N=function(){P=!P,n.render(t)}),T&&T(e)),l=P&&_.length>m,d=p&&!w;return{createURL:function(t){return s(function(e){return r.getWidgetUiState(e,{searchParameters:a.resetPage().toggleFacetRefinement(f,t),helper:c})})},items:u,refine:R,searchForItems:o,isFromSearch:!1,canRefine:0<u.length,widgetParams:h,isShowingMore:P,canToggleShowMore:l||d,toggleShowMore:x,sendEvent:S,hasExhaustiveItems:w}},dispose:function(e){e=e.state,n(),e=e.setQueryParameter("maxValuesPerFacet",void 0);return"and"===i?e.removeFacet(f):e.removeDisjunctiveFacet(f)},getWidgetUiState:function(e,t){var t=t.searchParameters,t="or"===i?t.getDisjunctiveRefinements(f):t.getConjunctiveRefinements(f);return e=F(F({},e),{},{refinementList:F(F({},e.refinementList),{},E({},f,t))}),t=f,e.refinementList&&(e.refinementList[t]&&0!==e.refinementList[t].length||delete e.refinementList[t],0===Object.keys(e.refinementList).length)&&delete e.refinementList,e},getWidgetSearchParameters:function(e,t){var n,t=t.uiState,r="or"===i;return e.isHierarchicalFacet(f)||r&&e.isConjunctiveFacet(f)||!r&&e.isDisjunctiveFacet(f)?e:(t=t.refinementList&&t.refinementList[f],n=(e=r?e.addDisjunctiveFacet(f).removeDisjunctiveFacetRefinement(f):e.addFacet(f).removeFacetRefinement(f)).maxValuesPerFacet||0,n=Math.max(n,p?a:m),e=e.setQueryParameter("maxValuesPerFacet",n),t?t.reduce(function(e,t){return r?e.addDisjunctiveFacetRefinement(f,t):e.addFacetRefinement(f,t)},e):e.setQueryParameters(E({},n=r?"disjunctiveFacetsRefinements":"facetsRefinements",F(F({},e[n]),{},E({},f,[])))))}}}}var Nr=["name","escapedValue"],xr=["escapedValue","value"],Ir=l({name:"refinement-list",connector:!0}),Cr=["isRefined","count:desc","name:asc"];function Tr(l){var d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(l,Or()),function(t){var e=t||{},n=e.escapeHTML,r=void 0===n||n,i=e.objectIDs,a=e.limit,s=e.threshold,o=e.fallbackParameters,c=e.queryParameters,n=e.transformItems,u=void 0===n?function(e){return e}:n;if(i&&0!==i.length)return{dependsOn:"recommend",$$type:"ais.relatedProducts",init:function(e){l(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);l(F(F({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e){return e},getWidgetRenderState:function(e){e=e.results;return null==e?{items:[],widgetParams:t}:(r&&0<e.hits.length&&(e.hits=ue(e.hits)),{items:u(e.hits,{results:e}),widgetParams:t})},dispose:function(e){e=e.recommendState;return d(),e.removeParams(this.$$id)},getWidgetParameters:function(e){var n=this;return i.reduce(function(e,t){return e.addRelatedProducts({objectID:t,maxRecommendations:a,threshold:s,fallbackParameters:F(F({},o),r?O:{}),queryParameters:F(F({},c),r?O:{}),$$id:n.$$id})},e.removeParams(this.$$id))}};throw new Error(Or("The `objectIDs` option is required."))}}function Fr(e,t){return t(e)}function Er(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,Lr()),function(r){var i,a,e=(r||{}).queryHook,s=void 0===e?Fr:e;return{$$type:"ais.searchBox",init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("query",void 0)},getRenderState:function(e,t){return F(F({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,n=e.instantSearchInstance,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:"stalled"===n.status}},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return""===t||e&&e.query===t?e:F(F({},e),{},{query:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("query",t.query||"")}}}}function jr(r){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C,o=(f(r,Mr()),{});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;we(a,function(e){return e.value===n});r(F(F({},e),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(F(F({},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 F(F({},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 F(F({},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(Mr("The `items` option expects an array of objects."))}}function kr(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,Hr()),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(s(e.state,t)).search()}.bind(null,e)},R=function(e){var n=e.state,r=e.createURL,i=e.getWidgetUiState,a=e.helper;return function(t){return r(function(e){return i(e,{searchParameters:s(n,t),helper:a})})}},{$$type:Ar,init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return F(F({},e),{},{ratingMenu:F(F({},e.ratingMenu),{},E({},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:Ar,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=I(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,helper:n,getWidgetUiState:this.getWidgetUiState}),widgetParams:g}},dispose:function(e){e=e.state;return t(),e.removeNumericRefinement(S)},getWidgetUiState:function(e,t){var t=t.searchParameters,t=y(t);return e=F(F({},e),{},{ratingMenu:F(F({},e.ratingMenu),{},E({},S,"number"==typeof t?t:void 0))}),t=S,e.ratingMenu&&("number"!=typeof e.ratingMenu[t]&&delete e.ratingMenu[t],0===Object.keys(e.ratingMenu).length)&&delete e.ratingMenu,e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.ratingMenu&&t.ratingMenu[S],e=e.addDisjunctiveFacet(S).removeNumericRefinement(S).removeDisjunctiveFacetRefinement(S);return t?e.addNumericRefinement(S,"<=",_).addNumericRefinement(S,">=",t):e.setQueryParameters({numericRefinements:F(F({},e.numericRefinements),{},E({},S,{}))})}};throw new Error(Hr("The `attribute` option is required."));function s(e,t){var n=y(e)===Number(t),e=e.resetPage().removeNumericRefinement(S);return n?e:e.addNumericRefinement(S,"<=",_).addNumericRefinement(S,">=",Number(t))}}}var Or=l({name:"related-products",connector:!0}),Lr=l({name:"search-box",connector:!0}),Mr=l({name:"sort-by",connector:!0}),Hr=l({name:"rating-menu",connector:!0}),Ar="ais.ratingMenu";function Wr(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(r,Ur()),function(n){return{$$type:"ais.stats",init:function(e){var t=e.instantSearchInstance;r(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){e()},getRenderState:function(e,t){return F(F({},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 Dr(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,qr()),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=at(void 0===t||t).map(_e),b=v?at(e).map(_e):void 0,S=function(t,e){var n=e.state,r=e.createURL,i=e.getWidgetUiState,a=e.helper;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(function(e){return i(e,{searchParameters:n,helper:a})})}},{$$type:Qr,init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return r(),e.removeDisjunctiveFacet(_)},getRenderState:function(e,t){return F(F({},e),{},{toggleRefinement:F(F({},e.toggleRefinement),{},E({},_,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=at(b||!1),n=s.getFacetValues(_,{})||[],t=y.map(function(t){return we(n,function(e){return e.escapedValue===_e(String(t))})}).filter(function(e){return void 0!==e}),p=v?p.map(function(t){return we(n,function(e){return e.escapedValue===_e(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:Qr,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,helper:a,getWidgetUiState:this.getWidgetUiState}),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?F(F({},e),{},{toggle:F(F({},e.toggle),{},E({},_,t))}):(null!=(t=e.toggle)&&delete t[_],e)},getWidgetSearchParameters:function(e,t){var n,t=t.uiState;return e.isHierarchicalFacet(_)||e.isConjunctiveFacet(_)?e:(n=e.addDisjunctiveFacet(_).removeDisjunctiveFacetRefinement(_),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:F(F({},e.disjunctiveFacetsRefinements),{},E({},_,[]))}))}};throw new Error(qr("The `attribute` option is required."))}}function $r(d){var h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(d,Vr()),function(t){var e=t||{},n=e.facetName,r=e.facetValue,i=e.limit,a=e.threshold,s=e.fallbackParameters,o=e.queryParameters,c=e.escapeHTML,u=void 0===c||c,c=e.transformItems,l=void 0===c?function(e){return e}:c;if(n&&!r||!n&&r)throw new Error(Vr("When you provide facetName (received type ".concat(Y(n),"), you must also provide facetValue (received type ").concat(Y(r),").")));return{dependsOn:"recommend",$$type:"ais.trendingItems",init:function(e){d(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);d(F(F({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e){return e},getWidgetRenderState:function(e){e=e.results;return null==e?{items:[],widgetParams:t}:(u&&0<e.hits.length&&(e.hits=ue(e.hits)),{items:l(e.hits,{results:e}),widgetParams:t})},dispose:function(e){e=e.recommendState;return h(),e.removeParams(this.$$id)},getWidgetParameters:function(e){return e.removeParams(this.$$id).addTrendingItems({facetName:n,facetValue:r,maxRecommendations:i,threshold:a,fallbackParameters:F(F({},s),u?O:{}),queryParameters:F(F({},o),u?O:{}),$$id:this.$$id})}}}}function Br(u){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C,d=(f(u,Kr()),{});return function(s){var n,e=s||{},r=e.attributes,t=e.separator,i=void 0===t?" > ":t,t=e.rootPath,a=void 0===t?null:t,t=e.transformItems,o=void 0===t?function(e){return e}:t;if(r&&Array.isArray(r)&&0!==r.length)return n=k(r,1)[0],{$$type:"ais.breadcrumb",init:function(e){u(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){u(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(){l()},getRenderState:function(e,t){return F(F({},e),{},{breadcrumb:F(F({},e.breadcrumb),{},E({},n,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var n=this,r=e.helper,i=e.createURL,t=e.results,e=e.state;var a,e=t&&0!==e.hierarchicalFacets.length?(e=k(e.hierarchicalFacets,1)[0].name,e=(e=t.getFacetValues(e,{}))&&!Array.isArray(e)&&e.data?e.data:[],o((a=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===a.length?null:a[t+1].value}}),{results:t})):[];return d.createURL||(d.createURL=function(t){return i(function(e){return n.getWidgetUiState(e,{searchParameters:c(r.state,t),helper:r})})}),d.refine||(d.refine=function(e){r.setState(c(r.state,e)).search()}),{canRefine:0<e.length,createURL:d.createURL,items:e,refine:d.refine,widgetParams:s}},getWidgetUiState:function(e,t){var t=t.searchParameters.getHierarchicalFacetBreadcrumb(n);return e=F(F({},e),{},{hierarchicalMenu:F(F({},e.hierarchicalMenu),{},E({},n,t))}),t=n,e.hierarchicalMenu&&(e.hierarchicalMenu[t]&&e.hierarchicalMenu[t].length||delete e.hierarchicalMenu[t],0===Object.keys(e.hierarchicalMenu).length)&&delete e.hierarchicalMenu,e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.hierarchicalMenu&&t.hierarchicalMenu[n];if(e.isConjunctiveFacet(n)||e.isDisjunctiveFacet(n))return e;e.isHierarchicalFacet(n)&&e.getHierarchicalFacetByName(n);e=e.removeHierarchicalFacet(n).addHierarchicalFacet({name:n,attributes:r,separator:i,rootPath:a});return t?e.addHierarchicalFacetRefinement(n,t.join(i)):e.setQueryParameters({hierarchicalFacetsRefinements:F(F({},e.hierarchicalFacetsRefinements),{},E({},n,[]))})}};throw new Error(Kr("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 Ur=l({name:"stats",connector:!0}),qr=l({name:"toggle-refinement",connector:!0}),Qr="ais.toggleRefinement",Vr=l({name:"trending-items",connector:!0}),Kr=l({name:"breadcrumb",connector:!0});var zr=l({name:"geo-search",connector:!0});function Jr(e){return e.insideBoundingBox||""}function Zr(e,t){return e.setQueryParameter("insideBoundingBox",t)}function Yr(g){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(g,zr()),function(o){function c(e){if(e.aroundLatLng){var e=e.aroundLatLng,t=e.match(Pe);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:C,internalSetMapMoveSinceLastRefine:C};return{$$type:Gr,init:function(e){var t=e.instantSearchInstance;p.internalToggleRefineOnMapMove=a(e,C),p.internalSetMapMoveSinceLastRefine=s(e,C),g(F(F({},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=Jr(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(F(F({},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||pe({instantSearchInstance:e,getIndex:function(){return i.getIndex()},widgetType:Gr}),{items:a,position:c(s),currentRefinement:(e=s).insideBoundingBox&&Ne(e.insideBoundingBox),refine:function(e){var t=e.northEast,e=e.southWest,t=[t.lat,t.lng,e.lat,e.lng].join();r.setState(Zr(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 F(F({},e),{},{geoSearch:this.getWidgetRenderState(t)})},dispose:function(e){e=e.state;return n(),e.setQueryParameter("insideBoundingBox",void 0)},getWidgetUiState:function(e,t){t=Jr(t.searchParameters);return!t||e&&e.geoSearch&&e.geoSearch.boundingBox===t?e:F(F({},e),{},{geoSearch:{boundingBox:t}})},getWidgetSearchParameters:function(e,t){t=t.uiState;return t&&t.geoSearch?Zr(e,t.geoSearch.boundingBox):e.setQueryParameter("insideBoundingBox",void 0)}}}}function Xr(r){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C,a=(f(r,ei()),"https://www.algolia.com/?utm_source=instantsearch.js&utm_medium=website&"+"utm_content=".concat(it(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(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return F(F({},e),{},{poweredBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{url:n,widgetParams:e}},dispose:function(){i()}}}}var Gr="ais.geoSearch",ei=l({name:"powered-by",connector:!0}),ti=l({name:"autocomplete",connector:!0}),ni=l({name:"query-rules",connector:!0});function ri(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=Fe(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(I(e),I(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(I(n),I(r))).slice(0,10);He(c,o)||t.overrideStateWithoutTriggeringChangeEvent(F(F({},e),{},{ruleContexts:o}))}function ii(l){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(l,ni()),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(ni("'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=ri.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(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!0)},render:function(e){var t=e.instantSearchInstance;l(F(F({},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 F(F({},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 ai(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=F(F({},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 si(m){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(m,li()),function(u){var e=u.searchAsYouSpeak,l=void 0!==e&&e,d=u.language,h=u.additionalQueryParameters,e=u.createVoiceSearchHelper,f=void 0===e?ai:e;return{$$type:"ais.voiceSearch",init:function(e){var t=e.instantSearchInstance;m(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;m(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return F(F({},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(F({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(F(F({},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(F({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?F(F({},e),{},{query:t}):e},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("query",t.query||"")}}}}function oi(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:C,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return function(r){var i={};return{$$type:"ais.relevantSort",init:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(e,t){return F(F({},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 F(F({},e),{},{relevantSort:t.relevancyStrictness||e.relevantSort})}}}}function ci(u){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(u,di()),function(t){var e=t||{},n=e.escapeHTML,r=void 0===n||n,n=e.transformItems,i=void 0===n?function(e){return e}:n,a=e.objectIDs,s=e.limit,o=e.threshold,c=e.queryParameters;if(a&&0!==a.length)return{dependsOn:"recommend",$$type:"ais.frequentlyBoughtTogether",init:function(e){u(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);u(F(F({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e){return e},getWidgetRenderState:function(e){e=e.results;return null==e?{items:[],widgetParams:t}:(r&&0<e.hits.length&&(e.hits=ue(e.hits)),{items:i(e.hits,{results:e}),widgetParams:t})},dispose:function(e){e=e.recommendState;return l(),e.removeParams(this.$$id)},getWidgetParameters:function(e){var n=this;return a.reduce(function(e,t){return e.addFrequentlyBoughtTogether({objectID:t,threshold:o,maxRecommendations:s,queryParameters:F(F({},c),r?O:{}),$$id:n.$$id})},e.removeParams(this.$$id))}};throw new Error(di("The `objectIDs` option is required."))}}function ui(l){var d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(l,hi()),function(t){var e=t||{},n=e.escapeHTML,r=void 0===n||n,i=e.objectIDs,a=e.limit,s=e.threshold,o=e.fallbackParameters,c=e.queryParameters,n=e.transformItems,u=void 0===n?function(e){return e}:n;if(i&&0!==i.length)return{dependsOn:"recommend",$$type:"ais.lookingSimilar",init:function(e){l(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);l(F(F({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e){return e},getWidgetRenderState:function(e){e=e.results;return null==e?{items:[],widgetParams:t}:(r&&0<e.hits.length&&(e.hits=ue(e.hits)),{items:u(e.hits,{results:e}),widgetParams:t})},dispose:function(e){e=e.recommendState;return d(),e.removeParams(this.$$id)},getWidgetParameters:function(e){var n=this;return i.reduce(function(e,t){return e.addLookingSimilar({objectID:t,maxRecommendations:a,threshold:s,fallbackParameters:F(F({},o),r?O:{}),queryParameters:F(F({},c),r?O:{}),$$id:n.$$id})},e.removeParams(this.$$id))}};throw new Error(hi("The `objectIDs` option is required."))}}function t(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 li=l({name:"voice-search",connector:!0}),di=l({name:"frequently-bought-together",connector:!0}),hi=l({name:"looking-similar",connector:!0}),gt=Z(st),fi=Z(cn),mi=Z(un),gt=Object.freeze({__proto__:null,EXPERIMENTAL_connectAnswers:gt,EXPERIMENTAL_connectConfigureRelatedItems:fi,EXPERIMENTAL_connectDynamicWidgets:mi,connectDynamicWidgets:un,connectClearRefinements:ln,connectCurrentRefinements:fn,connectHierarchicalMenu:bn,connectHits:wn,connectHitsWithInsights:pt,connectHitsPerPage:tr,connectInfiniteHits:cr,connectInfiniteHitsWithInsights:ht,connectMenu:ur,connectNumericMenu:fr,connectPagination:yr,connectRange:wr,connectRefinementList:Pr,connectRelatedProducts:Tr,connectSearchBox:Er,connectSortBy:jr,connectRatingMenu:kr,connectStats:Wr,connectToggleRefinement:Dr,connectTrendingItems:$r,connectBreadcrumb:Br,connectGeoSearch:Yr,connectPoweredBy:Xr,connectConfigure:an,connectAutocomplete:function(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:C;return f(n,ti()),function(s){var e=(s||{}).escapeHTML,o=void 0===e||e,c={};return{$$type:"ais.autocomplete",init:function(e){var t=e.instantSearchInstance;n(F(F({},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(F(F({},e),{},{instantSearchInstance:t}),!1)},getRenderState:function(e,t){return F(F({},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?ue(e.results.hits):e.results.hits;var t=pe({instantSearchInstance:a,getIndex:function(){return 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:F(F({},e),{},{query:t})},getWidgetSearchParameters:function(e,t){t={query:t.uiState.query||""};return o?e.setQueryParameters(F(F({},t),O)):e.setQueryParameters(t)},dispose:function(e){e=e.state,t(),e=e.setQueryParameter("query",void 0);return o?e.setQueryParameters(Object.keys(O).reduce(function(e,t){return F(F({},e),{},E({},t,void 0))},{})):e}}}},connectQueryRules:ii,connectVoiceSearch:si,connectRelevantSort:oi,connectFrequentlyBoughtTogether:ci,connectLookingSimilar:ui}),pi=t("Highlight");function gi(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=(Ce(r._highlightResult,t)||{}).value,t=void 0===r?"":r,r=pi({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 vi=t("ReverseHighlight");function yi(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=(Ce(r._highlightResult,t)||{}).value,t=void 0===r?"":r,r=vi({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return le(rt(xe(t))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var bi=t("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=(Ce(r._snippetResult,t)||{}).value,t=void 0===r?"":r,r=bi({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 Si=t("ReverseSnippet");function _i(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=(Ce(r._snippetResult,t)||{}).value,t=void 0===r?"":r,r=Si({descendantName:"highlighted"})+(e.highlighted?" ".concat(e.highlighted):"");return le(rt(xe(t))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(n,' class="').concat(r,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(n,">"))}var wi="_ALGOLIA";function Pi(){var e=wi;if("object"===("undefined"==typeof document?"undefined":W(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 Ni=["page"];function xi(e){e=e||{};e.page;return j(e,Ni)}var Ii="2.15.0",Ci="https://cdn.jsdelivr.net/npm/search-insights@".concat(Ii,"/dist/search-insights.min.js");function Ti(){var S,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,_=e.insightsInitParams,w=e.onEvent,n=e.$$internal,P=void 0!==n&&n,n=e.$$automatic,N=void 0!==n&&n,a=t,x=(t||null===t||it(function(e){var r=e.window,i=r.AlgoliaAnalyticsObject||"aa";(a="string"==typeof i?r[i]:a)||(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=Ii,r[i].shouldAddScript=!0),a=r[i])}),a||C);return function(e){var d=e.instantSearchInstance,e=d.middleware.filter(function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal}).map(function(e){return e.creator});d.unuse.apply(d,I(e));var t,n,h,f,r=k((e=d.client).transporter?(r=(t=e.transporter).headers||t.baseHeaders,t=t.queryParameters||t.baseQueryParameters,[r[n="x-algolia-application-id"]||t[n],r[n="x-algolia-api-key"]||t[n]]):[e.applicationID,e.apiKey],2),m=r[0],p=r[1],g=void 0,v=void 0,y=void 0,b=void 0,R=void 0,i=x.queue;return Array.isArray(i)&&(t=["setUserToken","setAuthenticatedUserToken","init"].map(function(t){var e=we(i.slice().reverse(),function(e){return k(e,1)[0]===t})||[];return k(e,2)[1]}),n=k(t,3),v=n[0],y=n[1],g=n[2]),x("getUserToken",null,function(e,t){b=Ei(t)}),x("getAuthenticatedUserToken",null,function(e,t){R=Ei(t)}),!_&&Fi(x)||x("init",F({appId:m,apiKey:p,partial:!0},_)),{$$type:"ais.insights",$$internal:P,$$automatic:N,onStateChange:function(){},subscribe:function(){if(x.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=Ci,e.onerror=function(){d.emit("error",new Error(t))},document.body.appendChild(e),x.shouldAddScript=!1}catch(e){x.shouldAddScript=!1,d.emit("error",new Error(t))}}},started:function(){x("addAlgoliaAgent","insights-middleware"),f=d.mainHelper;var n=x.queue,r=(Array.isArray(n)&&(a=["setUserToken","setAuthenticatedUserToken","init"].map(function(t){var e=we(n.slice().reverse(),function(e){return k(e,1)[0]===t})||[];return k(e,2)[1]}),a=k(a,3),v=a[0],y=a[1],g=a[2]),h={userToken:f.state.userToken,clickAnalytics:f.state.clickAnalytics},N||f.overrideStateWithoutTriggeringChangeEvent(F(F({},f.state),{},{clickAnalytics:!0})),P||d.scheduleSearch(),function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]&&arguments[3],a=Ei(e);function s(){f.overrideStateWithoutTriggeringChangeEvent(F(F({},f.state),{},{userToken:a})),n&&n!==e&&d.scheduleSearch(),S=t}a&&(n=f.state.userToken,S&&"authenticated"===S&&"default"===t&&!i||(r?s():setTimeout(s,0)))});function e(e,t,n){r(e,n?"authenticated":"default",!0),t&&x("setUserToken",t),n&&x("setAuthenticatedUserToken",n)}var t,i,a=void 0,s=Pi(),s=(a=s||"anonymous-".concat("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),h.userToken),o=(_&&(_.authenticatedUserToken?t=_.authenticatedUserToken:_.userToken&&(i=_.userToken)),t||i),c=R||b,u=y||v,l=(o?e(o,i,t):s?e(s,s,void 0):c?e(c,b,R):u?e(u,v,y):a&&(e(a,a,void 0),null!=_&&_.useCookie||null!=(o=g)&&o.useCookie)&&(i=a,s=(null==_?void 0:_.cookieDuration)||(null==(t=g)?void 0:t.cookieDuration),(c=new Date).setTime(c.getTime()+(s||15552e6)),s="expires=".concat(c.toUTCString()),document.cookie="_ALGOLIA=".concat(i,";").concat(s,";path=/")),x("onUserTokenChange",function(e){return r(e,"default",!0)},{immediate:!0}),x("onAuthenticatedUserTokenChange",function(e){e||x("getUserToken",null,function(e,t){r(t,"default",!0,!0)}),r(e,"authenticated",!0)},{immediate:!0}),x);Fi(x)&&(l=function(e,t){return x(e,t,{headers:{"X-Algolia-Application-Id":m,"X-Algolia-API-Key":p}})}),d.sendEventToInsights=function(e){w?w(e,l):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],N&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),l(e.insightsMethod,e.payload))}},unsubscribe:function(){x("onUserTokenChange",void 0),x("onAuthenticatedUserTokenChange",void 0),d.sendEventToInsights=C,f&&h&&(f.overrideStateWithoutTriggeringChangeEvent(F(F({},f.state),h)),d.scheduleSearch())}}}}function Fi(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 Ei(e){if(e)return"number"==typeof e?e.toString():e}function ji(){return it(function(e){return-1<(null==(e=e.window.navigator)||null==(e=e.userAgent)?void 0:e.indexOf("Algolia Crawler"))},{fallback:function(){return!1}})}function ki(){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=tt(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 Oi(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 Li(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&&Vi(m)&&(m=Ui.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(Yi(m)||Ui.isBuffer(m)){if(a){e=h?t:a(t,x.encoder,f,"key",l);if("comma"===n&&h){for(var p=Ki.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&&Vi(m)?[{value:0<m.length?m.join(",")||null:void 0}]:Vi(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=Vi(m)?"function"==typeof n?n(t,S):t:t+(c?"."+S:"["+S+"]"),Ji(b,Li(_,S,n,r,i,a,s,o,c,u,l,d,h,f)))}}return b}function Mi(e){e&&(window.document.title=e)}var Hi=String.prototype.replace,Ai=/%20/g,fi="RFC3986",Wi={default:fi,formatters:{RFC1738:function(e){return Hi.call(e,Ai,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:fi},Di=Object.prototype.hasOwnProperty,$i=Array.isArray,Bi=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ui={arrayToObject:Oi,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($i(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===Wi.RFC1738&&(40===c||41===c)?s+=a.charAt(o):c<128?s+=Bi[c]:c<2048?s+=Bi[192|c>>6]+Bi[128|63&c]:c<55296||57344<=c?s+=Bi[224|c>>12]+Bi[128|c>>6&63]+Bi[128|63&c]:(o+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(o)),s+=Bi[240|c>>18]+Bi[128|c>>12&63]+Bi[128|c>>6&63]+Bi[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($i(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($i(i))i.push(a);else{if(!i||"object"!=typeof i)return[i,a];(s&&(s.plainObjects||s.allowPrototypes)||!Di.call(Object.prototype,a))&&(i[a]=!0)}return i}var e;return i&&"object"==typeof i?($i(e=i)&&!$i(a)&&(e=Oi(i,s)),$i(i)&&$i(a)?(a.forEach(function(e,t){var n;Di.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 Di.call(e,t)?e[t]=r(e[t],n,s):e[t]=n,e},e)):[i].concat(a)}},qi=Object.prototype.hasOwnProperty,Qi={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Vi=Array.isArray,Ki=String.prototype.split,zi=Array.prototype.push,Ji=function(e,t){zi.apply(e,Vi(t)?t:[t])},Zi=Date.prototype.toISOString,mi=Wi.default,x={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ui.encode,encodeValuesOnly:!1,format:mi,formatter:Wi.formatters[mi],indices:!1,serializeDate:function(e){return Zi.call(e)},skipNulls:!1,strictNullHandling:!1},Yi=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},Xi=Object.prototype.hasOwnProperty,Gi=Array.isArray,h={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ui.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ea=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},ta=function(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e},na="utf8=%26%2310003%3B",ra="utf8=%E2%9C%93",ia=function(e,t,n,r){for(var i=r?t:ta(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},aa={formats:Wi,parse:function(e,t){var n=function(e){if(!e)return h;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?h:e).charset;return{allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,allowPrototypes:("boolean"==typeof e.allowPrototypes?e:h).allowPrototypes,arrayLimit:("number"==typeof e.arrayLimit?e:h).arrayLimit,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:h).charsetSentinel,comma:("boolean"==typeof e.comma?e:h).comma,decoder:("function"==typeof e.decoder?e:h).decoder,delimiter:("string"==typeof e.delimiter||Ui.isRegExp(e.delimiter)?e:h).delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:h.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:("boolean"==typeof e.interpretNumericEntities?e:h).interpretNumericEntities,parameterLimit:("number"==typeof e.parameterLimit?e:h).parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:("boolean"==typeof e.plainObjects?e:h).plainObjects,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:h).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]===ra?l="utf-8":c[n]===na&&(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,h.decoder,l,"key"),t.strictNullHandling?null:""):(i=t.decoder(r.slice(0,a),h.decoder,l,"key"),Ui.maybeMap(ta(r.slice(a+1),t),function(e){return t.decoder(e,h.decoder,l,"value")})))&&t.interpretNumericEntities&&"iso-8859-1"===l&&(a=ea(a)),-1<r.indexOf("[]=")&&(a=Gi(a)?[a]:a),Xi.call(s,i)?s[i]=Ui.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&&Xi.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&&Xi.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;o.push(s[1])}return s&&o.push("["+i.slice(s.index)+"]"),ia(o,t,n,r)}}(o,r[o],n,"string"==typeof e),i=Ui.merge(i,o,n);return Ui.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=Wi.default;if(void 0!==e.format){if(!qi.call(Wi.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=Wi.formatters[n],i=x.filter;return"function"!=typeof e.filter&&!Vi(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):Vi(r.filter)&&(s=r.filter),[]);if("object"!=typeof n||null===n)return"";var e=t&&t.arrayFormat in Qi?t.arrayFormat:!(t&&"indices"in t)||t.indices?"indices":"repeat",a=Qi[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]||Ji(i,Li(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:""}},sa=function(){function l(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,u=e.push,e=e.cleanUrlOnDispose;D(this,l),E(this,"$$type","ais.browser"),E(this,"windowTitle",void 0),E(this,"writeDelay",void 0),E(this,"_createURL",void 0),E(this,"parseURL",void 0),E(this,"getLocation",void 0),E(this,"writeTimer",void 0),E(this,"_onPopState",void 0),E(this,"inPopState",!1),E(this,"isDisposed",!1),E(this,"latestAcknowledgedHistory",0),E(this,"_start",void 0),E(this,"_dispose",void 0),E(this,"_push",void 0),E(this,"_cleanUrlOnDispose",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=u,this._cleanUrlOnDispose=void 0===e||e,it(function(e){var e=e.window,t=n.windowTitle&&n.windowTitle(n.read());Mi(t),n.latestAcknowledgedHistory=e.history.length})}return $(l,[{key:"read",value:function(){return this.parseURL({qsModule:aa,location:this.getLocation()})}},{key:"write",value:function(i){var a=this;it(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(){Mi(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())},it(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:aa,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var t=this;this._dispose&&this._dispose(),this.isDisposed=!0,it(function(e){e=e.window;t._onPopState&&e.removeEventListener("popstate",t._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(n){var r=this;return it(function(e){var t,e=e.window;return!(r.isDisposed&&!r._cleanUrlOnDispose)&&(t=!(r.isDisposed&&r.latestAcknowledgedHistory!==e.history.length),!r.inPopState)&&t&&n!==e.location.href})}}]),l}();function oa(){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,c=e.push,e=e.cleanUrlOnDispose;return new sa({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 it(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:c,cleanUrlOnDispose:e})}var ca=["configure"];function ua(e){e.configure;return j(e,ca)}function la(){return{$$type:"ais.simple",stateToRoute:function(n){return Object.keys(n).reduce(function(e,t){return F(F({},e),{},E({},t,ua(n[t])))},{})},routeToState:function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(n).reduce(function(e,t){return F(F({},e),{},E({},t,ua(n[t])))},{})}}}function da(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.router,i=void 0===t?oa():t,a=void 0===(t=e.stateMapping)?la():t,s=void 0!==(t=e.$$internal)&&t;return function(e){var t=e.instantSearchInstance;t._createURL=function(n){var e=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),e=Object.keys(n).reduce(function(e,t){return F(F({},e),{},E({},t,n[t]))},e),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&&He(n,e)||(i.write(e),n=e)},subscribe:function(){t._initialUiState=F(F({},r),a.routeToState(i.read())),i.onUpdate(function(e){0<t.mainIndex.getWidgets().length&&t.setUiState(a.routeToState(e))})},started:function(){var e;null!=(e=i.start)&&e.call(i)},unsubscribe:function(){i.dispose()}}}}var ha=["initialSearchParameters"],fa=["initialRecommendParameters"],ma=l({name:"index-widget"});function pa(e,t){var n=t.state,r=t.recommendState,i=t.isPageReset,t=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:t})),r!==e.recommendState&&(e.recommendState=r)}function ga(e,n,t){return e.reduce(function(e,t){return!ve(t)&&(t.getWidgetUiState||t.getWidgetState)?t.getWidgetUiState?t.getWidgetUiState(e,n):t.getWidgetState(e,n):e},2<arguments.length&&void 0!==t?t:{})}function va(e,t){var n=t.initialSearchParameters,r=j(t,ha);return e.reduce(function(e,t){return!t.getWidgetSearchParameters||ve(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,r):t.getWidgetSearchParameters(e,r)},n)}function ya(e,t){var n=t.initialRecommendParameters,r=j(t,fa);return e.reduce(function(e,t){return!ve(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,r):e},n)}function ba(e){if(void 0===e||void 0===e.indexName)throw new Error(ma("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,p=!1,g=!1;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},getResultsForWidget:function(e){var t;return"recommend"!==e.dependsOn||ve(e)||void 0===e.$$id?this.getResults():null!=(t=h)&&t.lastRecommendResults?h.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return m},getScopedResults:function(){var e=this.getParent(),e=e?e.getWidgets():0===s.length?this.getWidgets():[this];return function n(e){return e.filter(ve).reduce(function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(I(n(t.getWidgets()))))},[])}(e)},getParent:function(){return d},createURL:function(e){return"function"==typeof e?l._createURL(E({},o,e(u))):l._createURL(E({},o,ga(c,{searchParameters:e,helper:h})))},getWidgets:function(){return c},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(ma("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(ma("The widget definition expects a `render` and/or an `init` method."));return e.forEach(function(e){ve(e)||(l&&"recommend"===e.dependsOn?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:"recommend"===e.dependsOn?p=!0:g=!0,"recommend"===(e=e).dependsOn&&(e.$$id=a++))}),c=c.concat(e),l&&Boolean(e.length)&&(pa(h,{state:va(c,{uiState:u,initialSearchParameters:h.state}),recommendState:ya(c,{uiState:u,initialRecommendParameters:h.recommendState}),_uiState:u}),e.forEach(function(e){e.getRenderState&&Ra({renderState:e.getRenderState(l.renderState[t.getIndexId()]||{},tt(l,t,l._initialUiState)),instantSearchInstance:l,parent:t})}),e.forEach(function(e){e.init&&e.init(tt(l,t,l._initialUiState))}),l.scheduleSearch()),this},removeWidgets:function(t){var e,n,r=this;if(!Array.isArray(t))throw new Error(ma("The `removeWidgets` method expects an array of widgets."));if(t.some(function(e){return"function"!=typeof e.dispose}))throw new Error(ma("The widget definition expects a `dispose` method."));return(c=c.filter(function(e){return-1===t.indexOf(e)})).forEach(function(e){ve(e)||(l&&"recommend"===e.dependsOn?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:"recommend"===e.dependsOn?p=!0:g=!0)}),l&&Boolean(t.length)&&(n=(e=t.reduce(function(e,t){t=t.dispose({helper:h,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:r});return t instanceof v.RecommendParameters?e.cleanedRecommendState=t:t&&(e.cleanedSearchState=t),e},{cleanedSearchState:h.state,cleanedRecommendState:h.recommendState})).cleanedSearchState,e=e.cleanedRecommendState,n=l.future.preserveSharedStateOnUnmount?va(c,{uiState:u,initialSearchParameters:new v.SearchParameters({index:this.getIndexName()})}):va(c,{uiState:ga(c,{searchParameters:n,helper:h}),initialSearchParameters:n}),u=ga(c,{searchParameters:n,helper:h}),h.setState(n),h.recommendState=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=va(c,{uiState:u,initialSearchParameters:new v.SearchParameters({index:s})}),r=ya(c,{uiState:u,initialRecommendParameters:new v.RecommendParameters}),(h=v({},e.index,e)).recommendState=r,h.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 Xe.apply(void 0,[i.state].concat(I(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))))},function(){return t.getHelper().recommendState}),null!=(r=null==(e=n._initialResults)?void 0:e[this.getIndexId()])&&r.results&&(e=new v.SearchResults(new v.SearchParameters(r.state),r.results),f.lastResults=e,h.lastResults=e),null!=r&&r.recommendResults&&(e=new v.RecommendResults(new v.RecommendParameters({params:r.recommendResults.params}),r.recommendResults.results),f.lastRecommendResults=e,h.lastRecommendResults=e),h.on("change",function(e){e.isPageReset&&!function n(e){e=e.filter(ve);0!==e.length&&e.forEach(function(e){var t=e.getHelper();pa(t,{state:t.state.resetPage(),recommendState:t.recommendState,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=null==e?void 0:e._state}),f.on("recommend:result",function(e){e=e.recommend;n.scheduleRender(),h.lastRecommendResults=e.results}),c.forEach(function(e){e.getRenderState&&Ra({renderState:e.getRenderState(n.renderState[t.getIndexId()]||{},tt(n,t,a)),instantSearchInstance:n,parent:t})}),c.forEach(function(e){e.init&&e.init(tt(n,t,a))}),h.on("change",function(e){var t=e.state,e=e._uiState;u=ga(c,{searchParameters:t,helper:h},e||{}),n.onStateChange||n.onInternalStateChange()}),r&&n.scheduleRender(),p&&(n._hasRecommendWidget=!0),g)&&(n._hasSearchWidget=!0)},render:function(e){var t=this,n=e.instantSearchInstance,e=("error"===n.status&&!n.mainHelper.hasPendingRequests()&&m&&h.setState(m),this.getResults()||null!=(e=f)&&e.lastRecommendResults?c:c.filter(ve));(e=e.filter(function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:n})})).forEach(function(e){e.getRenderState&&Ra({renderState:e.getRenderState(n.renderState[t.getIndexId()]||{},nt(n,t,e)),instantSearchInstance:n,parent:t})}),e.forEach(function(e){e.render&&e.render(nt(n,t,e))})},dispose:function(){var e,t=this;c.forEach(function(e){e.dispose&&h&&e.dispose({helper:h,state:h.state,recommendState:h.recommendState,parent:t})}),(d=l=null)!=(e=h)&&e.removeAllListeners(),(h=null)!=(e=f)&&e.detach(),f=null},getWidgetUiState:function(e){return c.filter(ve).reduce(function(e,t){return t.getWidgetUiState(e)},F(F({},e),{},E({},o,F(F({},e[o]),u))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){t=t.uiState;return va(c,{uiState:t,initialSearchParameters:e})},refreshUiState:function(){u=ga(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 F(F({},e),{},E({},o,t))})}}}function Ra(e){var t=e.renderState,n=e.instantSearchInstance,e=e.parent,e=(e||n.mainIndex).getIndexId();n.renderState=F(F({},n.renderState),{},E({},e,F(F({},n.renderState[e]),t)))}function Sa(e,t){return e.toLocaleString(t)}var _a=l({name:"instantsearch"});function wa(){return"#"}var Pa={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},Na=function(){B(p,ct);var m=V(p);function p(e){D(this,p),E(y(n=m.call(this)),"client",void 0),E(y(n),"indexName",void 0),E(y(n),"insightsClient",void 0),E(y(n),"onStateChange",null),E(y(n),"future",void 0),E(y(n),"helper",void 0),E(y(n),"mainHelper",void 0),E(y(n),"mainIndex",void 0),E(y(n),"started",void 0),E(y(n),"templatesConfig",void 0),E(y(n),"renderState",{}),E(y(n),"_stalledSearchDelay",void 0),E(y(n),"_searchStalledTimer",void 0),E(y(n),"_initialUiState",void 0),E(y(n),"_initialResults",void 0),E(y(n),"_createURL",void 0),E(y(n),"_searchFunction",void 0),E(y(n),"_mainHelperSearch",void 0),E(y(n),"_hasSearchWidget",!1),E(y(n),"_hasRecommendWidget",!1),E(y(n),"_insights",void 0),E(y(n),"middleware",[]),E(y(n),"sendEventToInsights",void 0),E(y(n),"status","idle"),E(y(n),"error",void 0),E(y(n),"scheduleSearch",Se(function(){n.started&&n.mainHelper.search()})),E(y(n),"scheduleRender",Se(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:y(n)}),n.emit("render")})),E(y(n),"onInternalStateChange",Se(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?"":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?void 0: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,h=e.onStateChange,h=void 0===h?null:h,f=e.future,e=void 0===f?F(F({},Pa),e.future||{}):f;if(null===l)throw new Error(_a("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.75.3",")")),d&&"function"!=typeof d)throw new Error(_a("The `insightsClient` option should be a function."));return n.client=l,n.future=e,n.insightsClient=d,n.indexName=t,n.helper=null,n.mainHelper=null,n.mainIndex=ba({indexName:t}),n.onStateChange=h,n.started=!1,n.templatesConfig={helpers:(r={numberLocale:i}.numberLocale,{formatNumber:function(e,t){return Sa(Number(t(e)),r)},highlight:function(e,t){try{return t(gi(F(F({},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(yi(F(F({},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(F(F({},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(_i(F(F({},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(Xn(r,F({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=wa,n._initialUiState=a,n._initialResults=null,n._insights=o,c&&(n._searchFunction=c),n.sendEventToInsights=C,s&&((f="boolean"==typeof s?{}:s).$$internal=!0,n.use(da(f))),o&&((l="boolean"==typeof o?{}:o).$$internal=!0,n.use(Ti(l))),ji()&&n.use(ki({$$internal:!0})),n}return $(p,[{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=F({$$type:"__unknown__",$$internal:!1,subscribe:C,started:C,unsubscribe:C,onStateChange:C},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(_a("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(_a("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(_a("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(e.some(function(e){return"function"!=typeof e.dispose}))throw new Error(_a("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(_a("The `start` method has already been called once."));var n,e,t,i,a,s=this.mainHelper||v(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});s.search=function(){return r.status="loading",r.scheduleRender(!1),r._hasSearchWidget&&s.searchOnlyWithDerivedHelpers(),r._hasRecommendWidget&&s.recommend(),s},this._searchFunction&&(n={search:function(){return new Promise(C)}},this._mainHelperSearch=s.search.bind(s),s.search=function(){var t=r.mainIndex.getHelper(),e=v(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),s}),s.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=s,this.middleware.forEach(function(e){e.instance.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults?(Oe(this.client,this._initialResults),t=this.mainHelper,i=this._initialResults,a=Object.keys(i).reduce(function(e,t){t=i[t];return t.recommendResults?F(F({},e),t.recommendResults.results):e},{}),t._recommendCache=a,e=this.scheduleSearch,this.scheduleSearch=Se(C),Se(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()}),void 0===this._insights&&s.derivedHelpers[0].once("result",function(){r.mainIndex.getScopedResults().some(function(e){e=e.results;return null==e?void 0:e._automaticInsights})&&r.use(Ti({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null!=(e=this.mainHelper)&&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(_a("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){ye("function"==typeof e?e(r):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(ye(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(_a("The `start` method needs to be called before `createURL`."))}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(_a("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),p}(),pt=Object.freeze({__proto__:null,history:oa}),xa=["configure"];function Ia(e){e.configure;return j(e,xa)}var ht=Object.freeze({__proto__:null,simple:la,singleIndex:function(t){return{$$type:"ais.singleIndex",stateToRoute:function(e){return Ia(e[t]||{})},routeToState:function(){return E({},t,Ia(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}))}}}}),fi=Object.freeze({__proto__:null,createInsightsMiddleware:Ti,createRouterMiddleware:da,isMetadataEnabled:ji,createMetadataMiddleware:ki}),Ca=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,Ca(e,s,n,["",null])),r.push(a),s[0]?t[0]|=2:(t[i-2]=0,t[i]=a)):r.push(s)}return r},Ta=new Map;var Fa=function(e){var t=Ta.get(this);return t||(t=new Map,Ta.set(this,t)),1<(t=Ca(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(L);function Ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ja(e,t){return e(t={exports:{}},t.exports),t.exports}var ka=Ea(ja(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})),Oa=ja(function(t){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),La=(Ea(Oa),ja(function(e){var r=Oa.default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if(n=n.call(e,t||"default"),"object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")},e.exports.__esModule=!0,e.exports.default=e.exports})),Ma=(Ea(La),ja(function(e){var t=Oa.default;e.exports=function(e){return e=La(e,"string"),"symbol"===t(e)?e:String(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),mi=(Ea(Ma),ja(function(e){e.exports=function(e,t,n){return(t=Ma(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports})),Ha=Ea(mi),Aa=ja(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}),mi=(Ea(Aa),ja(function(e){e.exports=function(e,t){if(null==e)return{};var n,r=Aa(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})),Wa=Ea(mi);function T(){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 Da(e){var t=e.createElement,n=e.Fragment;return function(){return t(n,null,"No results")}}function $a(e){var r=e.createElement;return function(e){var t=e.classNames,n=e.items,e=e.translations;return n&&!(n.length<1)&&e.title?r("h3",{className:(void 0===t?{}:t).title},e.title):null}}function Ba(e){var t=e.createElement,n=e.Fragment;return function(e){return t(n,null,JSON.stringify(e.item,null,2))}}function Ua(e){var a=e.createElement;return function(e){var t=e.classNames,n=void 0===t?{}:t,r=e.itemComponent,t=e.items,i=e.sendEvent;return a("div",{className:n.container},a("ol",{className:n.list},t.map(function(e){return a("li",{key:e.objectID,className:n.item,onClick:i,onAuxClick:i},a(r,{item:e}))})))}}var qa=["listRef","nextButtonRef","previousButtonRef","carouselIdRef","classNames","itemComponent","previousIconComponent","nextIconComponent","items","translations"];function Qa(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}var Va=0;function Ka(e){e=e.createElement;return e("svg",{width:"8",height:"16",viewBox:"0 0 8 16",fill:"none"},e("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M7.13809 0.744078C7.39844 1.06951 7.39844 1.59715 7.13809 1.92259L2.27616 8L7.13809 14.0774C7.39844 14.4028 7.39844 14.9305 7.13809 15.2559C6.87774 15.5814 6.45563 15.5814 6.19528 15.2559L0.861949 8.58926C0.6016 8.26382 0.6016 7.73618 0.861949 7.41074L6.19528 0.744078C6.45563 0.418641 6.87774 0.418641 7.13809 0.744078Z"}))}function za(e){e=e.createElement;return e("svg",{width:"8",height:"16",viewBox:"0 0 8 16",fill:"none"},e("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M0.861908 15.2559C0.601559 14.9305 0.601559 14.4028 0.861908 14.0774L5.72384 8L0.861908 1.92259C0.601559 1.59715 0.601559 1.06952 0.861908 0.744079C1.12226 0.418642 1.54437 0.418642 1.80472 0.744079L7.13805 7.41074C7.3984 7.73618 7.3984 8.26382 7.13805 8.58926L1.80472 15.2559C1.54437 15.5814 1.12226 15.5814 0.861908 15.2559Z"}))}var Ja=["classNames","emptyComponent","headerComponent","itemComponent","layout","items","status","translations","sendEvent"];function Za(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}var Ya=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];var Xa=["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"];var Ga=["classNames","emptyComponent","headerComponent","itemComponent","layout","items","status","translations","sendEvent"];function es(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}var ts=["classNames","emptyComponent","headerComponent","itemComponent","layout","items","status","translations","sendEvent"];function ns(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}var rs=["classNames","emptyComponent","headerComponent","itemComponent","layout","items","status","translations","sendEvent"];function is(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}var as,m,ss,os,cs=0,us=[],ls=[],ds=w.__b,hs=w.__r,fs=w.diffed,ms=w.__c,ps=w.unmount;function gs(e,t){w.__h&&w.__h(m,e,cs||t),cs=0;t=m.__H||(m.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:ls}),t.__[e]}function vs(e){cs=1;var a,t=Ps,n=void 0,s=gs(as++,2);return s.t=t,s.__c||(s.__=[n?n(e):Ps(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=m).u)||(m.u=!0,a=m.shouldComponentUpdate,m.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 ys(e){return cs=5,t=function(){return{current:e}},n=[],ws((r=gs(as++,7)).__H,n)?(r.__V=t(),r.i=n,r.__h=t,r.__V):r.__;var t,n,r}function bs(){for(var t;t=us.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ss),t.__H.__h.forEach(_s),t.__H.__h=[]}catch(e){t.__H.__h=[],w.__e(e,t.__v)}}w.__b=function(e){"function"!=typeof e.type||e.o||e.type===N?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),m=null,ds&&ds(e)},w.__r=function(e){hs&&hs(e),as=0;e=(m=e.__c).__H;e&&(ss===m?(e.__h=[],m.__h=[],e.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=ls,e.__N=e.i=void 0})):(e.__h.forEach(Ss),e.__h.forEach(_s),e.__h=[])),ss=m},w.diffed=function(e){fs&&fs(e);e=e.__c;e&&e.__H&&(!e.__H.__h.length||1!==us.push(e)&&os===w.requestAnimationFrame||((os=w.requestAnimationFrame)||function(e){function t(){clearTimeout(r),Rs&&cancelAnimationFrame(n),setTimeout(e)}var n,r=setTimeout(t,100);Rs&&(n=requestAnimationFrame(t))})(bs),e.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==ls&&(e.__=e.__V),e.i=void 0,e.__V=ls})),ss=m=null},w.__c=function(e,n){n.some(function(t){try{t.__h.forEach(Ss),t.__h=t.__h.filter(function(e){return!e.__||_s(e)})}catch(e){n.some(function(e){e.__h&&(e.__h=[])}),n=[],w.__e(e,t.__v)}}),ms&&ms(e,n)},w.unmount=function(e){ps&&ps(e);var t,e=e.__c;e&&e.__H&&(e.__H.__.forEach(function(e){try{Ss(e)}catch(e){t=e}}),e.__H=void 0,t)&&w.__e(t,e.__v)};var Rs="function"==typeof requestAnimationFrame;function Ss(e){var t=m,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),m=t}function _s(e){var t=m;e.__c=e.__(),m=t}function ws(n,e){return!n||n.length!==e.length||e.some(function(e,t){return e!==n[t]})}function Ps(e,t){return"function"==typeof t?t(e):t}Ns=(mi={createElement:L,Fragment:N}).createElement,xs=mi.Fragment;var Ns,xs,Is=function(e){var t=e.listRef,n=e.nextButtonRef,r=e.previousButtonRef,i=e.carouselIdRef,a=e.classNames,a=void 0===a?{}:a,s=e.itemComponent,o=void 0===s?Ba({createElement:Ns,Fragment:xs}):s,s=e.previousIconComponent,s=void 0===s?Ka:s,c=e.nextIconComponent,c=void 0===c?za:c,u=e.items,l=e.translations,e=Wa(e,qa),l=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qa(Object(n),!0).forEach(function(e){Ha(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qa(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({listLabel:"Items",nextButtonLabel:"Next",nextButtonTitle:"Next",previousButtonLabel:"Previous",previousButtonTitle:"Previous"},l),d={root:T("ais-Carousel",a.root),list:T("ais-Carousel-list",a.list),item:T("ais-Carousel-item",a.item),navigation:T("ais-Carousel-navigation",a.navigation),navigationNext:T("ais-Carousel-navigation--next",a.navigationNext),navigationPrevious:T("ais-Carousel-navigation--previous",a.navigationPrevious)};function h(){t.current&&(t.current.scrollLeft-=.75*t.current.offsetWidth)}function f(){t.current&&(t.current.scrollLeft+=.75*t.current.offsetWidth)}return 0===u.length?null:Ns("div",ka({},e,{className:T(d.root)}),Ns("button",{ref:r,title:l.previousButtonTitle,"aria-label":l.previousButtonLabel,hidden:!0,"aria-controls":i.current,className:T(d.navigation,d.navigationPrevious),onClick:function(e){e.preventDefault(),h()}},Ns(s,{createElement:Ns})),Ns("ol",{className:T(d.list),ref:t,tabIndex:0,id:i.current,"aria-roledescription":"carousel","aria-label":l.listLabel,"aria-live":"polite",onScroll:function(){t.current&&r.current&&n.current&&(r.current.hidden=t.current.scrollLeft<=0,n.current.hidden=t.current.scrollLeft+t.current.clientWidth>=t.current.scrollWidth)},onKeyDown:function(e){"ArrowLeft"===e.key?(e.preventDefault(),h()):"ArrowRight"===e.key&&(e.preventDefault(),f())}},u.map(function(e,t){return Ns("li",{key:e.objectID,className:T(d.item),"aria-roledescription":"slide","aria-label":"".concat(t+1," of ").concat(u.length)},Ns(o,{item:e}))})),Ns("button",{ref:n,title:l.nextButtonTitle,"aria-label":l.nextButtonLabel,"aria-controls":i.current,className:T(d.navigation,d.navigationNext),onClick:function(e){e.preventDefault(),f()}},Ns(c,{createElement:Ns})))};function Cs(e){var t={listRef:ys(null),nextButtonRef:ys(null),previousButtonRef:ys(null),carouselIdRef:ys("ais-Carousel-".concat(Va++))};return L(Is,g({},t,e))}mi=Object.freeze({__proto__:null,carousel:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=e.cssClasses,s=void 0===(e=e.templates)?{}:e;return function(e){var t=e.items,n=e.templates,e=e.cssClasses,e=void 0===e?{}:e,r=s.previous,i=s.next;return L(Cs,{items:t,itemComponent:n.item,previousIconComponent:r?function(){return r({html:Fa})}:void 0,nextIconComponent:i?function(){return i({html:Fa})}:void 0,classNames:F(F({},a),{list:T(null==a?void 0:a.list,null==e?void 0:e.list),item:T(null==a?void 0:a.item,null==e?void 0:e.item)})})}}});function H(e){var t=e.defaultTemplates,n=e.templates;return F({templatesConfig:e.templatesConfig},function(a,e){var s=1<arguments.length&&void 0!==e?e:{};return We([].concat(I(Object.keys(a||{})),I(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))}var Ts,Fs,Es,js=ja(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}}),ks=ja(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)}}),Os=(js.Template=ks.Template,js.template=js.Template,js),Ls=(Fs=(ks={createElement:L,Fragment:N}).createElement,Es=ks.Fragment,Ts={createElement:Fs,Fragment:Es}.createElement,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=Wa(e,Ya);return Fs("span",ka({},n,{className:T(o.root,t)}),r.map(function(e,t){var n=t===r.length-1;return Fs(Es,{key:t},e.map(function(e,t){return Fs(Ms,{key:t,classNames:o,highlightedTagName:i,nonHighlightedTagName:a,isHighlighted:e.isHighlighted},e.value)}),!n&&Fs("span",{className:o.separator},s))}))});function Ms(e){var t=e.classNames,n=e.children,r=e.highlightedTagName,i=e.isHighlighted,e=e.nonHighlightedTagName;return Ts(i?r:e,{className:i?t.highlighted:t.nonHighlighted},n)}var Hs=["classNames"];function As(e){var t=e.classNames,t=void 0===t?{}:t,e=j(e,Hs);return L(Ls,g({classNames:{root:T("ais-Highlight",t.root),highlighted:T("ais-Highlight-highlighted",t.highlighted),nonHighlighted:T("ais-Highlight-nonHighlighted",t.nonHighlighted),separator:T("ais-Highlight-separator",t.separator)}},e))}var Ws=["hit","attribute","cssClasses"];function Ds(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return L(As,g({},j(e,Ws),{parts:at(Ce(t._highlightResult,n)||[]).map(function(e){return xe(ae(e.value||""))}),classNames:r}))}var $s=["classNames"];function Bs(e){var t=e.classNames,t=void 0===t?{}:t,e=j(e,$s);return L(Ls,g({classNames:{root:T("ais-ReverseHighlight",t.root),highlighted:T("ais-ReverseHighlight-highlighted",t.highlighted),nonHighlighted:T("ais-ReverseHighlight-nonHighlighted",t.nonHighlighted),separator:T("ais-ReverseHighlight-separator",t.separator)}},e))}var Us=["hit","attribute","cssClasses"],qs=["isHighlighted"];function Qs(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return L(Bs,g({},j(e,Us),{parts:at(Ce(t._highlightResult,n)||[]).map(function(e){return xe(ae(e.value||"")).map(function(e){var t=e.isHighlighted;return F(F({},j(e,qs)),{},{isHighlighted:!t})})}),classNames:r}))}var Vs=["classNames"];function Ks(e){var t=e.classNames,t=void 0===t?{}:t,e=j(e,Vs);return L(Ls,g({classNames:{root:T("ais-ReverseSnippet",t.root),highlighted:T("ais-ReverseSnippet-highlighted",t.highlighted),nonHighlighted:T("ais-ReverseSnippet-nonHighlighted",t.nonHighlighted),separator:T("ais-ReverseSnippet-separator",t.separator)}},e))}var zs=["hit","attribute","cssClasses"],Js=["isHighlighted"];function Zs(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return L(Ks,g({},j(e,zs),{parts:at(Ce(t._snippetResult,n)||[]).map(function(e){return xe(ae(e.value||"")).map(function(e){var t=e.isHighlighted;return F(F({},j(e,Js)),{},{isHighlighted:!t})})}),classNames:r}))}var Ys=["classNames"];function Xs(e){var t=e.classNames,t=void 0===t?{}:t,e=j(e,Ys);return L(Ls,g({classNames:{root:T("ais-Snippet",t.root),highlighted:T("ais-Snippet-highlighted",t.highlighted),nonHighlighted:T("ais-Snippet-nonHighlighted",t.nonHighlighted),separator:T("ais-Snippet-separator",t.separator)}},e))}var Gs=["hit","attribute","cssClasses"];function eo(e){var t=e.hit,n=e.attribute,r=e.cssClasses;return L(Xs,g({},j(e,Gs),{parts:at(Ce(t._snippetResult,n)||[]).map(function(e){return xe(ae(e.value||""))}),classNames:r}))}function to(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(W(t),"' (key: ").concat(n,")"));return"function"==typeof t?((n=s||{}).html=Fa,n.sendEvent=e,n.components={Highlight:Ds,ReverseHighlight:Qs,Snippet:eo,ReverseSnippet:Zs},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 F(F({},e),{},E({},n,function(){var t=this;return function(e){return r[n].call(a,e,function(e){return Os.compile(e,i).render(t)})}}))},{})}(i,r,a),Os.compile(t,r).render(F(F({},a),{},{helpers:s})).replace(/[ \n\r\t\f\xA0]+/g,function(e){return e.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")}).trim())}var no=function(){B(a,An);var i=V(a);function a(){var e;D(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(y(e=i.call.apply(i,[this].concat(n))),"ref",Hn()),E(y(e),"nodes",[]),e}return $(a,[{key:"componentDidMount",value:function(){var t=new DocumentFragment,e=document.createElement("div");e.innerHTML=this.props.content,this.nodes=I(e.childNodes),this.nodes.forEach(function(e){return t.appendChild(e)}),this.ref.current.replaceWith(t)}},{key:"componentWillUnmount",value:function(){this.nodes.forEach(function(e){e instanceof Element?e.outerHTML="":e.nodeValue=""}),this.nodes[0].nodeValue&&(this.nodes[0].nodeValue="")}},{key:"render",value:function(){return L("div",{ref:this.ref})}}]),a}(),R=function(){B(t,An);var e=V(t);function t(){return D(this,t),e.apply(this,arguments)}return $(t,[{key:"shouldComponentUpdate",value:function(e){return!He(this.props.data,e.data)||this.props.templateKey!==e.templateKey||!He(this.props.rootProps,e.rootProps)}},{key:"render",value:function(){var e="fragment"===this.props.rootTagName?N:this.props.rootTagName,t=this.props.useCustomCompileOptions[this.props.templateKey]?this.props.templatesConfig.compileOptions:{},t=to({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"===W(t)?L(e,this.props.rootProps,t):e===N?L(no,{content:t,key:Math.random()}):L(e,g({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:t}}))}}]),t}(),ro=(E(R,"defaultProps",{data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}}),function(e){var t=e.hits,n=e.isLoading,r=e.cssClasses,i=e.templateProps;return L("div",{className:T(r.root,0===t.length&&r.emptyRoot)},L(R,g({},i,{templateKey:"header",rootProps:{className:r.header},data:{hits:t,isLoading:n}})),n?L(R,g({},i,{templateKey:"loader",rootProps:{className:r.loader}})):L("ul",{className:r.list},t.map(function(e,t){return L(R,g({},i,{templateKey:"item",rootTagName:"li",rootProps:{className:r.item},key:e.objectID,data:F(F({},e),{},{get __hitIndex(){return t}})}))})))}),io={header:function(){return""},loader:function(){return""},item:function(e){return JSON.stringify(e)}},ao=l({name:"answers"}),so=t("Answers"),js=Z(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:T(so(),e.root),emptyRoot:T(so({modifierName:"empty"}),e.emptyRoot),header:T(so({descendantName:"header"}),e.header),loader:T(so({descendantName:"loader"}),e.loader),list:T(so({descendantName:"list"}),e.list),item:T(so({descendantName:"item"}),e.item)},i=(e={containerNode:t,cssClasses:n,templates:m,renderState:{}}).containerNode,a=e.cssClasses,s=e.renderState,o=e.templates,F(F({},st(function(e,t){var n=e.hits,r=e.isLoading,e=e.instantSearchInstance;t?s.templateProps=H({defaultTemplates:io,templatesConfig:e.templatesConfig,templates:o}):M(L(ro,{cssClasses:a,hits:n,isLoading:r,templateProps:s.templateProps}),i)},function(){return M(null,t)})({attributesForPrediction:r,queryLanguages:c,nbHits:u,searchDebounceTime:l,renderDebounceTime:d,escapeHTML:h,extraParameters:f})),{},{$$widgetType:"ais.answers"});throw new Error(ao("The `container` option is required."))}),oo=["container","widgets","fallbackWidget"],co=l({name:"dynamic-widgets"}),uo=t("DynamicWidgets");function lo(e){var t=document.createElement("div");return t.className=uo({descendantName:"widget"}),e.appendChild(t),t}function ho(e){var n,i,a,s,t,r=(e=e||{}).container,o=e.widgets,c=e.fallbackWidget,e=j(e,oo);if(!r)throw new Error(co("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=uo(),a=new Map,s=[],t=un(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)})(F(F({},e),{},{widgets:s,fallbackWidget:"function"==typeof c?function(e){var e=e.attribute,t=lo(i);return a.set(e,t),c({attribute:e,container:t})}:void 0})),F(F({},t),{},{init:function(r){o.forEach(function(e){var t=lo(i),e=e(t),n=Ee(e,r);a.set(n,t),s.push(e)}),t.init(r)},$$widgetType:"ais.dynamicWidgets"});throw new Error(co("The `widgets` option expects an array of callbacks."))}function fo(e,t){var n=e.items,r=e.widgetParams,e=e.canRefine;t||(t=r.container,r=r.cssClasses,M(L(xo,{cssClasses:r,items:n,canRefine:e}),t))}function mo(e){var t=e.className,n=e.disabled;return L("button",{className:t,onClick:e.onClick,disabled:void 0!==n&&n},e.children)}function po(e){var t=e.classNameLabel,n=e.classNameInput,r=e.checked,i=e.onToggle,e=e.children;return L("label",{className:t},L("input",{className:n,type:"checkbox",checked:r,onChange:i}),e)}function go(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,C=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,F({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,jo({mapInstance:T.mapInstance,refine:u}))})}),T.templateProps=H({templatesConfig:e.templatesConfig,templates:R})):(g=s.map(function(e){return e.objectID}),t=(n=k(ko(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(C.events).forEach(function(t){r.addListener(t,function(e){C.events[t]({map:T.mapInstance,event:e,item:n,marker:r})})}),r})),R=!m(),i=c?0:null,(a=!c&&Boolean(T.markers.length)?Oo(y,T.markers):c)&&R?Lo(T,function(){T.mapInstance.fitBounds(new y.maps.LatLngBounds(a.southWest,a.northEast),i)}):R&&Lo(T,function(){T.mapInstance.setCenter(o||_),T.mapInstance.setZoom(S)}),M(L(Eo,{cssClasses:b,enableRefine:w,enableRefineControl:N,enableClearMapRefinement:P,isRefineOnMapMove:h(),isRefinedWithMap:p(),hasMapMoveSinceLastRefine:m(),onRefineToggle:d,onRefineClick:function(){return jo({mapInstance:T.mapInstance,refine:u})},onClearClick:l,templateProps:T.templateProps}),v.querySelector(".".concat(b.tree))))}var vo=l({name:"analytics"}),yo=function(e){var r=e.items,i=e.cssClasses,a=e.templateProps,s=e.createURL,o=e.refine;return L("div",{className:T(i.root,0===r.length&&i.noRefinementRoot)},L("ul",{className:i.list},L("li",{className:T(i.item,0===r.length&&i.selectedItem)},L(R,g({},a,{templateKey:"home",rootTagName:"a",rootProps:{className:i.link,href:s(null),onClick:function(e){Ae(e)||(e.preventDefault(),o(null))}}}))),r.map(function(t,e){var n=e===r.length-1;return L("li",{key:t.label+e,className:T(i.item,n&&i.selectedItem)},L(R,g({},a,{templateKey:"separator",rootTagName:"span",rootProps:{className:i.separator,"aria-hidden":!0}})),n?t.label:L("a",{className:i.link,href:s(t.value),onClick:function(e){Ae(e)||(e.preventDefault(),o(t.value))}},t.label))})))},bo={home:function(){return"Home"},separator:function(){return">"}},Ro=l({name:"breadcrumb"}),So=t("Breadcrumb"),_o=function(e){var t=e.hasRefinements,n=e.refine,r=e.cssClasses,e=e.templateProps;return L("div",{className:r.root},L(R,g({},e,{templateKey:"resetLabel",rootTagName:"button",rootProps:{className:T(r.button,!t&&r.disabledButton),onClick:n,disabled:!t},data:{hasRefinements:t}})))},wo={resetLabel:function(){return"Clear refinements"}},Po=l({name:"clear-refinements"}),No=t("ClearRefinements"),xo=function(e){var t=e.items,a=e.cssClasses,e=e.canRefine;return L("div",{className:T(a.root,!e&&a.noRefinementRoot)},L("ul",{className:a.list},t.map(function(i,e){return L("li",{key:"".concat(i.indexName,"-").concat(i.attribute,"-").concat(e),className:a.item},L("span",{className:a.label},(e=i.label).toString().charAt(0).toUpperCase()+e.toString().slice(1),": "),i.refinements.map(function(e){return L("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},L("span",{className:a.categoryLabel},"query"===e.attribute?L("q",null,e.label):e.label),L("button",{className:a.delete,type:"button",onClick:(t=i.refine.bind(null,e),function(e){Ae(e)||(e.preventDefault(),t())})},"✕"));var t,n,r}))})))},Io=l({name:"current-refinements"}),Co=t("CurrentRefinements"),To=L("p",null,"Your custom HTML Marker"),Fo={HTMLMarker:function(){return To},reset:function(){return"Clear the map refinement"},toggle:function(){return"Search as I move the map"},redo:function(){return"Redo search here"}},Eo=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 L(N,null,n&&L("div",null,r&&L("div",{className:t.control},a||!o?L(po,{classNameLabel:T(t.label,a&&t.selectedLabel),classNameInput:t.input,checked:a,onToggle:c},L(R,g({},e,{templateKey:"toggle",rootTagName:"span"}))):L(mo,{className:t.redo,disabled:!o,onClick:u},L(R,g({},e,{templateKey:"redo",rootTagName:"span"})))),!r&&!a&&L("div",{className:t.control},L(mo,{className:T(t.redo,!o&&t.disabledRedo),disabled:!o,onClick:u},L(R,g({},e,{templateKey:"redo",rootTagName:"span"})))),i&&s&&L(mo,{className:t.reset,onClick:l},L(R,g({},e,{templateKey:"reset",rootTagName:"span"})))))},jo=function(e){var t=e.refine,e=e.mapInstance;return t({northEast:e.getBounds().getNorthEast().toJSON(),southWest:e.getBounds().getSouthWest().toJSON()})},ko=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)]},[[],[]])},Oo=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()}},Lo=function(e,t){e.isUserInteraction=!1,t(),e.isUserInteraction=!0},Mo=["initialZoom","initialPosition","templates","cssClasses","builtInMarker","customHTMLMarker","enableRefine","enableClearMapRefinement","enableRefineControl","container","googleReference"],Ho=["item"],Ao=["item"],Wo=l({name:"geo-search"}),Do=t("GeoSearch"),ks={query:"",showSubmit:!0,showReset:!0,showLoadingIndicator:!0,autofocus:!1,searchAsYouType:!0,ignoreCompositionEvents:!1,isSearchStalled:!1,disabled:!1,ariaLabel:"Search",onChange:C,onSubmit:C,onReset:C,refine:C},$o=function(){B(i,An);var r=V(i);function i(){var a;D(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return E(y(a=r.call.apply(r,[this].concat(t))),"state",{query:a.props.query,focused:!1}),E(y(a),"input",Hn()),E(y(a),"onInput",function(e){var t=a.props,n=t.searchAsYouType,r=t.refine,t=t.onChange,i=e.target.value;a.props.ignoreCompositionEvents&&e.isComposing||(n&&r(i),a.setState({query:i}),t(e))}),E(y(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}),E(y(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)}),E(y(a),"onBlur",function(){a.setState({focused:!1})}),E(y(a),"onFocus",function(){a.setState({focused:!0})}),a}return $(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,c=e.isSearchStalled,e=e.ariaLabel;return L("div",{className:t.root},L("form",{action:"",role:"search",className:t.form,noValidate:!0,onSubmit:this.onSubmit,onReset:this.onReset},L("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,oncompositionend:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":e}),L(R,{templateKey:"submit",rootTagName:"button",rootProps:{className:t.submit,type:"submit",title:"Submit the search query",hidden:!i},templates:o,data:{cssClasses:t}}),L(R,{templateKey:"reset",rootTagName:"button",rootProps:{className:t.reset,type:"reset",title:"Clear the search query",hidden:!(a&&this.state.query.trim()&&!c)},templates:o,data:{cssClasses:t}}),s&&L(R,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:t.loadingIndicator,hidden:!c},templates:o,data:{cssClasses:t}})))}}]),i}();function Bo(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 L("li",{className:t,onClick:function(e){n({facetValueToRefine:r,isRefined:i,originalEvent:e})}},L(R,g({},a,{templateKey:s,data:o})),e)}E($o,"defaultProps",ks);var Uo=["root"];function qo(e){return void 0!==e.data}var Qo,Vo,Ko=function(){B(s,An);var r=V(s);function s(){var a;D(this,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return E(y(a=r.call.apply(r,[this].concat(t))),"listRef",Hn()),E(y(a),"searchBox",Hn()),E(y(a),"lastRefinedValue",void 0),E(y(a),"_generateFacetItem",function(e){qo(e)&&Array.isArray(e.data)&&0<e.data.length&&((t=a.props.cssClasses).root,t=j(t,Uo),t=L(s,g({},a.props,{cssClasses:t,depth:a.props.depth+1,facetValues:e.data,showMore:!1,className:a.props.cssClasses.childList})));var t,n=a.props.createURL(e.value),n=F(F({},e),{},{url:n,attribute:a.props.attribute,cssClasses:a.props.cssClasses,isFromSearch:a.props.isFromSearch}),r=e.value,i=(void 0!==e.isRefined&&(r+="/".concat(e.isRefined)),void 0!==e.count&&(r+="/".concat(e.count)),T(a.props.cssClasses.item,e.isRefined&&a.props.cssClasses.selectedItem,!e.count&&a.props.cssClasses.disabledItem,Boolean(qo(e)&&Array.isArray(e.data)&&0<e.data.length)&&a.props.cssClasses.parentItem));return L(Bo,{templateKey:"item",key:r,facetValueToRefine:e.value,handleClick:a.handleItemClick,isRefined:e.isRefined,className:i,subItems:t,templateData:n,templateProps:a.props.templateProps})}),E(y(a),"handleItemClick",function(e){var t=e.facetValueToRefine,n=e.isRefined,r=e.originalEvent;if(!Ae(r)){var i=r.target;if(!(null===i||null===i.parentNode||n&&i.parentNode.querySelector('input[type="radio"]:checked'))){if("INPUT"!==i.tagName){for(;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()}a.refine(t)}}}),a}return $(s,[{key:"shouldComponentUpdate",value:function(e){return!He(this.props.facetValues,e.facetValues)}},{key:"refine",value:function(e){this.lastRefinedValue=e,this.props.toggleRefinement(e)}},{key:"componentWillReceiveProps",value:function(e){this.searchBox.current&&!e.isFromSearch&&this.searchBox.current.resetInput()}},{key:"componentDidUpdate",value:function(){var e;null!=(e=this.listRef.current)&&null!=(e=e.querySelector('input[value="'.concat(this.lastRefinedValue,'"]')))&&e.focus(),this.lastRefinedValue=void 0}},{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=T(this.props.cssClasses.showMore,!(!0===this.props.showMore&&this.props.canToggleShowMore)&&this.props.cssClasses.disabledShowMore),e=!0===this.props.showMore&&L(R,g({},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&&L("div",{className:this.props.cssClasses.searchBox},L($o,{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,ariaLabel:"Search for filters"})),r=this.props.facetValues&&0<this.props.facetValues.length&&L("ul",{ref:this.listRef,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)&&L(R,g({},this.props.templateProps,{templateKey:"searchableNoResults",rootProps:{className:this.props.cssClasses.noResults}}));return L("div",{className:T(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)}}]),s}(),zo=(E(Ko,"defaultProps",{cssClasses:{},depth:0}),{item:function(e){var t=e.url,n=e.label,r=e.count,i=e.cssClasses,e=e.isRefined;return L("a",{className:T(T(i.link),T(e?i.selectedItemLink:void 0)),href:t},L("span",{className:T(i.label)},n),L("span",{className:T(i.count)},Sa(r)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"}}),Jo=l({name:"hierarchical-menu"}),S=t("HierarchicalMenu"),Zo={empty:function(){return"No results"},item:function(e){return JSON.stringify(Ge(e,["__hitIndex"]),null,2)}},Yo=["hit","index"],Xo=l({name:"hits"}),Go=(Vo=(ks={createElement:L,Fragment:N}).createElement,ks=ks.Fragment,Qo={createElement:Vo,Fragment:ks}.createElement,function(e){var t=e.classNames,n=void 0===t?{}:t,t=e.hits,r=e.itemComponent,i=e.sendEvent,a=e.emptyComponent,s=e.banner,o=e.bannerComponent,e=Wa(e,Xa);return Vo("div",ka({},e,{className:T("ais-Hits",n.root,0===t.length&&T("ais-Hits--empty",n.emptyRoot),e.className)}),s&&(o?Vo(o,{className:T("ais-Hits-banner",n.bannerRoot),banner:s}):Vo(ec,{classNames:n,banner:s})),0===t.length&&a?Vo(a,null):Vo("ol",{className:T("ais-Hits-list",n.list)},t.map(function(e,t){return Vo(r,{key:e.objectID,hit:e,index:t,className:T("ais-Hits-item",n.item),onClick:function(){i("click:internal",e,"Hit Clicked")},onAuxClick:function(){i("click:internal",e,"Hit Clicked")}})})))});function ec(e){var t=e.classNames;return(e=e.banner).image.urls[0].url?Qo("aside",{className:T("ais-Hits-banner",t.bannerRoot)},e.link?Qo("a",{className:T("ais-Hits-banner-link",t.bannerLink),href:e.link.url,target:e.link.target},Qo("img",{className:T("ais-Hits-banner-image",t.bannerImage),src:e.image.urls[0].url,alt:e.image.title})):Qo("img",{className:T("ais-Hits-banner-image",t.bannerImage),src:e.image.urls[0].url,alt:e.image.title})):null}function tc(e){var t=e.currentValue,n=e.options,r=e.cssClasses,i=e.setValue,e=e.ariaLabel;return L("select",{className:T(r.select),onChange:function(e){return i(e.target.value)},value:"".concat(t),"aria-label":e},n.map(function(e){return L("option",{className:T(r.option),key:e.label+e.value,value:"".concat(e.value)},e.label)}))}function nc(e){var t=e.banner,e=e.classNames;return t.image.urls[0].url?L("aside",{className:T(e.bannerRoot)},t.link?L("a",{className:T(e.bannerLink),href:t.link.url,target:t.link.target},L("img",{className:T(e.bannerImage),src:t.image.urls[0].url,alt:t.image.title})):L("img",{className:T(e.bannerImage),src:t.image.urls[0].url,alt:t.image.title})):null}var rc=l({name:"hits-per-page"}),ic=t("HitsPerPage"),ac=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,e=e.banner,f=Gn({insights:r,sendEvent:a});return 0===t.hits.length?L("div",{className:T(d.root,d.emptyRoot),onClick:f},e&&(h.templates.banner?L(R,g({},h,{templateKey:"banner",rootTagName:"fragment",data:{banner:e,className:d.bannerRoot}})):L(nc,{banner:e,classNames:d})),L(R,g({},h,{templateKey:"empty",rootTagName:"fragment",data:t}))):L("div",{className:d.root},s&&L(R,g({},h,{templateKey:"showPreviousText",rootTagName:"button",rootProps:{className:T(d.loadPrevious,u&&d.disabledLoadPrevious),disabled:u,onClick:o}})),e&&(h.templates.banner?L(R,g({},h,{templateKey:"banner",rootTagName:"fragment",data:{banner:e,className:d.bannerRoot}})):L(nc,{banner:e,classNames:d})),L("ol",{className:d.list},n.map(function(t,e){return L(R,g({},h,{templateKey:"item",rootTagName:"li",rootProps:{className:d.item,onClick:function(e){f(e),a("click:internal",t,"Hit Clicked")},onAuxClick:function(e){f(e),a("click:internal",t,"Hit Clicked")}},key:t.objectID,data:F(F({},t),{},{get __hitIndex(){return e}}),bindEvent:i,sendEvent:a}))})),L(R,g({},h,{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:T(d.loadMore,l&&d.disabledLoadMore),disabled:l,onClick:c}})))},sc={empty:function(){return"No results"},showPreviousText:function(){return"Show previous results"},showMoreText:function(){return"Show more results"},item:function(e){return JSON.stringify(Ge(e,["__hitIndex"]),null,2)}},oc=l({name:"infinite-hits"}),cc=t("InfiniteHits"),uc={item:function(e){var t=e.cssClasses,n=e.url,r=e.label,e=e.count;return L("a",{className:T(t.link),href:n},L("span",{className:T(t.label)},r),L("span",{className:T(t.count)},Sa(e)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"}},lc=l({name:"menu"}),dc=t("Menu");function hc(e){var t=e.cssClasses,n=e.templateProps,r=e.items,i=e.refine,e=(we(r,function(e){return e.isRefined})||{value:""}).value;return L("div",{className:T(t.root,0===r.length&&t.noRefinementRoot)},L("select",{className:t.select,value:e,onChange:function(e){i(e.target.value)}},L(R,g({},n,{templateKey:"defaultOption",rootTagName:"option",rootProps:{value:"",className:t.option}})),r.map(function(e){return L(R,g({},n,{templateKey:"item",rootTagName:"option",rootProps:{value:e.value,className:t.option},key:e.value,data:e}))})))}var fc={item:function(e){var t=e.label,e=e.count;return"".concat(t," (").concat(Sa(e),")")},defaultOption:function(){return"See all"}},mc=l({name:"menu-select"}),pc=t("MenuSelect"),gc={item:function(e){var t=e.cssClasses,n=e.attribute,r=e.label,e=e.isRefined;return L("label",{className:t.label},L("input",{type:"radio",className:t.radio,name:n,defaultChecked:e}),L("span",{className:t.labelText},r))}},vc=l({name:"numeric-menu"}),yc=t("NumericMenu");function bc(n){function t(t){return function(e){Ae(e)||(e.preventDefault(),n.setCurrentPage(t))}}return L("div",{className:T(n.cssClasses.root,n.nbPages<=1&&n.cssClasses.noRefinementRoot)},L("ul",{className:n.cssClasses.list},n.showFirst&&L(Rc,{ariaLabel:"First Page",className:n.cssClasses.firstPageItem,isDisabled:n.isFirstPage,templates:n.templates,templateKey:"first",pageNumber:0,createURL:n.createURL,cssClasses:n.cssClasses,createClickHandler:t}),n.showPrevious&&L(Rc,{ariaLabel:"Previous Page",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 L(Rc,{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&&L(Rc,{ariaLabel:"Next Page",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&&L(Rc,{ariaLabel:"Last Page, Page ".concat(n.nbPages),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 Rc(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 L("li",{className:T(c.item,s&&c.disabledItem,a,void 0!==o&&o&&c.selectedItem)},L(R,s?{rootTagName:"span",rootProps:{className:c.link,"aria-label":r},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 Sc=t("Pagination"),_c=l({name:"pagination"}),wc={previous:function(){return"‹"},next:function(){return"›"},page:function(e){e=e.page;return"".concat(e)},first:function(){return"«"},last:function(){return"»"}};function Pc(t){var e,n,r=k(vs(t.isCollapsed),2),i=r[0],a=r[1],r=k(vs(!1),2),s=r[0],o=r[1],c=ys(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=gs(as++,3),!w.__s&&ws(n.__H,e)&&(n.__=r,n.i=e,m.__H.__h.push(n)),s||t.isCollapsed===i||a(t.isCollapsed),L("div",{className:T(t.cssClasses.root,t.hidden&&t.cssClasses.noRefinementRoot,t.collapsible&&t.cssClasses.collapsibleRoot,i&&t.cssClasses.collapsedRoot),hidden:t.hidden},t.templates.header&&L("div",{className:t.cssClasses.header},L(R,{templates:t.templates,templateKey:"header",rootTagName:"span",data:t.data}),t.collapsible&&L("button",{className:t.cssClasses.collapseButton,"aria-expanded":!i,onClick:function(e){e.preventDefault(),o(!0),a(function(e){return!e})}},L(R,{templates:t.templates,templateKey:"collapseButtonText",rootTagName:"span",data:{collapsed:i}}))),L("div",{className:t.cssClasses.body,ref:c}),t.templates.footer&&L(R,{templates:t.templates,templateKey:"footer",rootProps:{className:t.cssClasses.footer},data:t.data}))}var Nc,xc,Ic=l({name:"panel"}),Cc=t("Panel"),Tc=["placesReference","defaultPosition"],Fc=["places"],ks=Z(function(e){var t=e||{},n=t.placesReference,r=t.defaultPosition,i=void 0===r?[]:r,r=j(t,Tc);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?F(F({},e),{},{places:{query:s.query,position:t}}):(e.places,j(e,Fc))},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 F(F({},e),{},{places:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}}}),Ec=function(e){var t=e.url,n=e.theme,e=e.cssClasses;return L("div",{className:e.root},L("a",{href:t,target:"_blank",className:e.link,"aria-label":"Search by Algolia",rel:"noopener noreferrer"},L("svg",{height:"1.2em",className:e.logo,viewBox:"0 0 572 64",style:{width:"auto"}},L("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"}),L("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"}))))},jc=t("PoweredBy"),kc=l({name:"powered-by"}),Oc=l({name:"query-rule-context"}),Lc=function(e){var t=e.cssClasses,n=e.templates,e=e.items;return L(R,{templateKey:"default",templates:n,rootProps:{className:t.root},data:{items:e}})},Mc={default:function(e){e=e.items;return JSON.stringify(e,null,2)}},Hc=l({name:"query-rule-custom-data"}),Ac=t("QueryRuleCustomData"),Wc=l({name:"related-products"}),Dc=(Nc=(ul={createElement:L,Fragment:N}).createElement,xc=ul.Fragment,function(e){var t=e.classNames,t=void 0===t?{}:t,n=e.emptyComponent,n=void 0===n?Da({createElement:Nc,Fragment:xc}):n,r=e.headerComponent,r=void 0===r?$a({createElement:Nc,Fragment:xc}):r,i=e.itemComponent,i=void 0===i?Ba({createElement:Nc,Fragment:xc}):i,a=e.layout,a=void 0===a?Ua({createElement:Nc,Fragment:xc}):a,s=e.items,o=e.status,c=e.translations,u=e.sendEvent,e=Wa(e,ts),c=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ns(Object(n),!0).forEach(function(e){Ha(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ns(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({title:"Related products",sliderLabel:"Related products"},c),t={root:T("ais-RelatedProducts",t.root),emptyRoot:T("ais-RelatedProducts",t.root,"ais-RelatedProducts--empty",t.emptyRoot,e.className),title:T("ais-RelatedProducts-title",t.title),container:T("ais-RelatedProducts-container",t.container),list:T("ais-RelatedProducts-list",t.list),item:T("ais-RelatedProducts-item",t.item)};return 0===s.length&&"idle"===o?Nc("section",ka({},e,{className:t.emptyRoot}),Nc(n,null)):Nc("section",ka({},e,{className:t.root}),Nc(r,{classNames:t,items:s,translations:c}),Nc(a,{classNames:t,itemComponent:i,items:s,sendEvent:u}))});function $c(e){return e.replace(/^(0+)\d/,function(e){return Number(e).toString()})}function Bc(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 L("div",{style:F(F({},t),{},{marginLeft:100===n?"-2px":0}),className:T("rheostat-marker","rheostat-marker-horizontal",r&&"rheostat-marker-large")},r&&L("div",{className:"rheostat-value"},e))}var Uc=function(){B(s,An);var a=V(s);function s(){var e,n;D(this,s);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return E(y(n=a.call.apply(a,[this].concat(r))),"state",{min:null==(e=n.props.values.min)?void 0:e.toString(),max:null==(e=n.props.values.max)?void 0:e.toString()}),E(y(n),"onInput",function(t){return function(e){e=e.currentTarget.value;n.setState(E({},t,e))}}),E(y(n),"onSubmit",function(e){e.preventDefault();var e=n.state,t=e.min,e=e.max;n.props.refine([t?Number(t):void 0,e?Number(e):void 0])}),n}return $(s,[{key:"componentWillReceiveProps",value:function(e){var t;this.setState({min:null==(t=e.values.min)?void 0:t.toString(),max:null==(t=e.values.max)?void 0:t.toString()})}},{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 L("div",{className:T(s.root,!c&&s.noRefinement)},L("form",{className:s.form,onSubmit:this.onSubmit},L("label",{className:s.label},L("input",{className:T(s.input,s.inputMin),type:"number",min:r,max:i,step:a,value:$c(null!=t?t:""),onInput:this.onInput("min"),placeholder:null==r?void 0:r.toString(),disabled:o})),L(R,g({},n,{templateKey:"separatorText",rootTagName:"span",rootProps:{className:s.separator}})),L("label",{className:s.label},L("input",{className:T(s.input,s.inputMax),type:"number",min:r,max:i,step:a,value:$c(null!=e?e:""),onInput:this.onInput("max"),placeholder:null==i?void 0:i.toString(),disabled:o})),L(R,g({},n,{templateKey:"submitText",rootTagName:"button",rootProps:{type:"submit",className:s.submit,disabled:o}}))))}}]),s}(),qc=l({name:"range-input"}),Qc=t("RangeInput"),Vc={separatorText:function(){return"to"},submitText:function(){return"Go"}},Kc=40,zc=35,Jc=27,Zc=36,Yc=37,Xc=34,Gc=33,eu=39,tu=38,nu=100;function ru(e,t,n){return(e-t)/(n-t)*100}function iu(e,t,n){return 0===e?t:100===e?n:Math.round((n-t)*(e/100)+t)}function au(e){return["rheostat","vertical"===e.orientation?"rheostat-vertical":"rheostat-horizontal"].concat(e.className.split(" ")).join(" ")}function su(e){return Number(e.currentTarget.getAttribute("data-handle-key"))}function ou(e){e.stopPropagation(),e.preventDefault()}var cu=L("div",{className:"rheostat-background"}),uu=function(){B(i,An);var r=V(i);function i(){var f;D(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return E(y(f=r.call.apply(r,[this].concat(t))),"x",[0,0].map(function(e){return e})),E(y(f),"state",{className:au(f.props),handlePos:f.props.values.map(function(e){return ru(e,f.props.min,f.props.max)}),handleDimensions:0,mousePos:null,sliderBox:{},slidingIndex:null,values:f.props.values}),E(y(f),"rheostat",Hn()),E(y(f),"componentWillReceiveProps",function(n){var e=f.props,t=e.className,r=e.disabled,i=e.min,a=e.max,e=e.orientation,s=f.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&&f.setState({className:au(n)}),(i||a)&&f.updateNewValues(n),t&&null!==s&&f.endSlide()}),E(y(f),"getPublicState",function(){var e=f.props,t=e.min;return{max:e.max,min:t,values:f.state.values}}),E(y(f),"getSliderBoundingBox",function(){var e=f.rheostat.current,t=e.getBoundingClientRect();return{height:t.height||e.clientHeight,left:t.left,top:t.top,width:t.width||e.clientWidth}}),E(y(f),"getProgressStyle",function(e){var t=f.state.handlePos,n=t[e];return 0===e?"vertical"===f.props.orientation?{height:"".concat(n,"%"),top:0}:{left:0,width:"".concat(n,"%")}:(t=n-(n=t[e-1]),"vertical"===f.props.orientation?{height:"".concat(t,"%"),top:"".concat(n,"%")}:{left:"".concat(n,"%"),width:"".concat(t,"%")})}),E(y(f),"getMinValue",function(e){return f.state.values[e-1]?Math.max(f.props.min,f.state.values[e-1]):f.props.min}),E(y(f),"getMaxValue",function(e){return f.state.values[e+1]?Math.min(f.props.max,f.state.values[e+1]):f.props.max}),E(y(f),"getHandleDimensions",function(e,t){e=e.currentTarget||null;return e?"vertical"===f.props.orientation?e.clientHeight/t.height*nu/2:e.clientWidth/t.width*nu/2:0}),E(y(f),"getClosestSnapPoint",function(n){return f.props.snapPoints.length?f.props.snapPoints.reduce(function(e,t){return Math.abs(e-n)<Math.abs(t-n)?e:t}):n}),E(y(f),"getSnapPosition",function(e){var t,n,r;return f.props.snap?(t=(n=f.props).max,r=iu(e,n=n.min,t),ru(f.getClosestSnapPoint(r),n,t)):e}),E(y(f),"getNextPositionForKey",function(e,t){var n=f.state,r=n.handlePos,n=n.values,i=f.props,a=i.max,s=i.min,i=i.snapPoints,o=f.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(f.getClosestSnapPoint(n[e]))),E(n={},Yc,function(e){return-1*e}),E(n,eu,function(e){return e}),E(n,tu,function(e){return e}),E(n,Kc,function(e){return-1*e}),E(n,Xc,function(e){return 1<e?-e:-10*e}),E(n,Gc,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===Zc)r=0,o&&(c=i[0]);else{if(t!==zc)return null;r=nu,o&&(c=i[i.length-1])}return o?ru(c,s,a):r}),E(y(f),"getNextState",function(n,e){var t=f.state.handlePos,r=f.props,i=r.max,a=r.min,s=f.validatePosition(n,e),r=t.map(function(e,t){return t===n?s:e});return{handlePos:r,values:r.map(function(e){return iu(e,a,i)})}}),E(y(f),"getClosestHandle",function(r){var i=f.state.handlePos;return i.reduce(function(e,t,n){return Math.abs(i[n]-r)<Math.abs(i[e]-r)?n:e},0)}),E(y(f),"setStartSlide",function(e,t,n){var r=f.getSliderBoundingBox();f.setState({handleDimensions:f.getHandleDimensions(e,r),mousePos:{x:t,y:n},sliderBox:r,slidingIndex:su(e)})}),E(y(f),"startMouseSlide",function(e){f.setStartSlide(e,e.clientX,e.clientY),document.addEventListener("mousemove",f.handleMouseSlide,!1),document.addEventListener("mouseup",f.endSlide,!1),ou(e)}),E(y(f),"startTouchSlide",function(e){var t;1<e.changedTouches.length||(t=e.changedTouches[0],f.setStartSlide(e,t.clientX,t.clientY),document.addEventListener("touchmove",f.handleTouchSlide,!1),document.addEventListener("touchend",f.endSlide,!1),f.props.onSliderDragStart&&f.props.onSliderDragStart(),ou(e))}),E(y(f),"handleMouseSlide",function(e){null!==f.state.slidingIndex&&(f.handleSlide(e.clientX,e.clientY),ou(e))}),E(y(f),"handleTouchSlide",function(e){var t;null!==f.state.slidingIndex&&(1<e.changedTouches.length?f.endSlide():(t=e.changedTouches[0],f.handleSlide(t.clientX,t.clientY),ou(e)))}),E(y(f),"handleSlide",function(e,t){var n=f.state,r=n.slidingIndex,n=n.sliderBox,n="vertical"===f.props.orientation?(t-n.top)/n.height*nu:(e-n.left)/n.width*nu;f.slideTo(r,n),f.canMove(r,n)&&(f.setState({mousePos:{x:e,y:t}}),f.props.onSliderDragMove)&&f.props.onSliderDragMove()}),E(y(f),"endSlide",function(){var e,t=f.state.slidingIndex;f.setState({slidingIndex:null}),document.removeEventListener("mouseup",f.endSlide,!1),document.removeEventListener("touchend",f.endSlide,!1),document.removeEventListener("touchmove",f.handleTouchSlide,!1),document.removeEventListener("mousemove",f.handleMouseSlide,!1),f.props.onSliderDragEnd&&f.props.onSliderDragEnd(),f.props.snap?(e=f.getSnapPosition(f.state.handlePos[t]),f.slideTo(t,e,function(){return f.fireChangeEvent()})):f.fireChangeEvent()}),E(y(f),"handleClick",function(e){var t;e.target.getAttribute("data-handle-key")||(t=f.getSliderBoundingBox(),e=("vertical"===f.props.orientation?(e.clientY-t.top)/t.height:(e.clientX-t.left)/t.width)*nu,t=f.getClosestHandle(e),e=f.getSnapPosition(e),f.slideTo(t,e,function(){return f.fireChangeEvent()}),f.props.onClick&&f.props.onClick())}),E(y(f),"handleKeydown",function(e){var t,n=su(e);e.keyCode===Jc?e.currentTarget.blur():null!==(t=f.getNextPositionForKey(n,e.keyCode))&&(f.canMove(n,t)&&(f.slideTo(n,t,function(){return f.fireChangeEvent()}),f.props.onKeyPress)&&f.props.onKeyPress(),ou(e))}),E(y(f),"validatePosition",function(e,t){var n=f.state,r=n.handlePos,n=n.handleDimensions;return Math.max(Math.min(t,void 0!==r[e+1]?r[e+1]-n:nu),void 0!==r[e-1]?r[e-1]+n:0)}),E(y(f),"validateValues",function(e,t){var t=t||f.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})}),E(y(f),"canMove",function(e,t){var n=f.state,r=n.handlePos,n=n.handleDimensions;return!(t<0||nu<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))}),E(y(f),"fireChangeEvent",function(){var e=f.props.onChange;e&&e(f.getPublicState())}),E(y(f),"slideTo",function(e,t,n){e=f.getNextState(e,t);f.setState(e,function(){var e=f.props.onValuesUpdated;e&&e(f.getPublicState()),n&&n()})}),E(y(f),"updateNewValues",function(e){var t,n,r;null===f.state.slidingIndex&&(t=e.max,n=e.min,r=e.values,r=f.validateValues(r,e),f.setState({handlePos:r.map(function(e){return ru(e,n,t)}),values:r},function(){return f.fireChangeEvent()}))}),E(y(f),"render",function(){var e=f.props,t=e.children,n=e.disabled,r=e.handle,i=e.max,a=e.min,s=e.orientation,o=e.pitComponent,c=e.pitPoints,u=e.progressBar,e=f.state,l=e.className,d=e.handlePos,h=e.values;return L("div",{className:l,ref:f.rheostat,onClick:n?void 0:f.handleClick,style:{position:"relative"}},cu,d.map(function(e,t){e="vertical"===s?{top:"".concat(e,"%"),position:"absolute"}:{left:"".concat(e,"%"),position:"absolute"};return L(r,{"aria-valuemax":f.getMaxValue(t),"aria-valuemin":f.getMinValue(t),"aria-valuenow":h[t],"aria-disabled":n,"data-handle-key":t,className:"rheostat-handle",key:"handle-".concat(t),onClick:ou,onKeyDown:n?void 0:f.handleKeydown,onMouseDown:n?void 0:f.startMouseSlide,onTouchStart:n?void 0:f.startTouchSlide,role:"slider",style:e,tabIndex:0})}),d.map(function(e,t,n){return 0===t&&1<n.length?null:L(u,{className:"rheostat-progress",key:"progress-bar-".concat(t),style:f.getProgressStyle(t)})}),o&&c.map(function(e){var t=ru(e,a,i),t="vertical"===s?{top:"".concat(t,"%"),position:"absolute"}:{left:"".concat(t,"%"),position:"absolute"};return L(o,{key:"pit-".concat(e),style:t},e)}),t)}),f}return $(i)}(),lu=(E(uu,"defaultProps",{className:"",children:null,disabled:!1,handle:function(e){return L("button",g({},e,{type:"button"}))},max:nu,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(){B(a,An);var i=V(a);function a(){var t;D(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return E(y(t=i.call.apply(i,[this].concat(n))),"handleChange",function(e){e=e.values;t.isDisabled||t.props.refine(e)}),E(y(t),"createHandleComponent",function(n){return function(e){var t=Math.round(100*parseFloat(e["aria-valuenow"]))/100,t="object"===W(n)&&n.format?n.format(t):t;return L("div",g({},e,{className:T(e.className,0===e["data-handle-key"]&&"rheostat-handle-lower",1===e["data-handle-key"]&&"rheostat-handle-upper"),"aria-label":0===e["data-handle-key"]?"Minimum Filter Handle":"Maximum Filter Handle"}),n&&L("div",{className:"rheostat-tooltip"},t))}}),t}return $(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(I(et({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(I(et({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 L("div",{className:T(e.root,this.isDisabled&&e.disabledRoot)},L(uu,{handle:this.createHandleComponent(t),onChange:this.handleChange,min:s,max:a,pitComponent:Bc,pitPoints:r,snap:!0,snapPoints:n,values:this.isDisabled?[s,a]:i,disabled:this.isDisabled}))}}]),a}()),du=l({name:"range-slider"}),hu=t("RangeSlider");function fu(e){var t=e.children,n=e.count,r=e.value,i=e.url,e=e.cssClasses;return n?L("a",{className:T(e.link),"aria-label":"".concat(r," & up"),href:i},t):L("div",{className:T(e.link),"aria-label":"".concat(r," & up"),disabled:!0},t)}var mu={item:function(e){var t=e.count,n=e.value,r=e.url,i=e.stars,a=e.cssClasses;return L(fu,{count:t,value:n,url:r,cssClasses:a},i.map(function(e,t){return L("svg",{key:t,className:T(a.starIcon,e?a.fullStarIcon:a.emptyStarIcon),"aria-hidden":"true",width:"24",height:"24"},L("use",{xlinkHref:e?"#ais-RatingMenu-starSymbol":"#ais-RatingMenu-starEmptySymbol"}))}),L("span",{"aria-hidden":"true",className:T(a.label)},"& Up"),t&&L("span",{className:T(a.count)},Sa(t)))}},pu=l({name:"rating-menu"}),_=t("RatingMenu"),gu=L("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"}),vu=L("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"}),yu=L("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"}),bu=L("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"}),Ru=L("g",{fill:"none","fill-rule":"evenodd"},L("g",{transform:"translate(1 1)","stroke-width":"2"},L("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),L("path",{d:"M36 18c0-9.94-8.06-18-18-18"},L("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))),Su={reset:function(e){return L("svg",{className:e.cssClasses.resetIcon,viewBox:"0 0 20 20",width:"10",height:"10","aria-hidden":"true"},yu)},submit:function(e){return L("svg",{className:e.cssClasses.submitIcon,width:"10",height:"10",viewBox:"0 0 40 40","aria-hidden":"true"},bu)},loadingIndicator:function(e){return L("svg",{"aria-label":"Results are loading",className:e.cssClasses.loadingIcon,width:"16",height:"16",viewBox:"0 0 38 38",stroke:"#444","aria-hidden":"true"},Ru)}},_u={item:function(e){var t=e.cssClasses,n=e.count,r=e.value,i=e.highlighted,a=e.isRefined,e=e.isFromSearch;return L("label",{className:T(t.label)},L("input",{type:"checkbox",className:T(t.checkbox),value:r,defaultChecked:a}),L("span",{className:T(t.labelText),dangerouslySetInnerHTML:e?{__html:i}:void 0},!e&&i),L("span",{className:T(t.count)},Sa(n)))},showMoreText:function(e){return e.isShowingMore?"Show less":"Show more"},searchableNoResults:function(){return"No results"}},wu=l({name:"refinement-list"}),A=t("RefinementList"),Pu=t("SearchBox"),Nu=function(e){var t=e.cssClasses,n=e.templates,r=e.isRelevantSorted,i=e.isVirtualReplica,a=e.refine;return i?L("div",{className:t.root},L(R,{templateKey:"text",templates:n,rootProps:{className:t.text},data:{isRelevantSorted:r}}),L("button",{type:"button",className:t.button,onClick:function(){a(r?0:void 0)}},L(R,{rootTagName:"span",templateKey:"button",templates:n,data:{isRelevantSorted:r}}))):null},xu={text:function(){return""},button:function(e){return e.isRelevantSorted?"See all results":"See relevant results"}},Iu=l({name:"relevant-sort"}),Cu=t("RelevantSort"),Tu=l({name:"search-box"}),Fu=t("SearchBox"),Eu=l({name:"sort-by"}),ju=t("SortBy"),ku=["nbHits","nbSortedHits","cssClasses","templateProps"],Ou=function(e){var t=e.nbHits,n=e.nbSortedHits,r=e.cssClasses,i=e.templateProps,e=j(e,ku);return L("div",{className:T(r.root)},L(R,g({},i,{templateKey:"text",rootTagName:"span",rootProps:{className:r.text},data:F({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)})))},Lu=l({name:"stats"}),Mu=t("Stats"),Hu={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(Sa(t));if(n)return"No relevant results ".concat(t);if(r)return"1 relevant result ".concat(t);if(i)return"".concat(Sa(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(Sa(t)," results");return""})(e)," found in ").concat(e.processingTimeMS,"ms")}};var Au,Wu,Du=function(e){var t=e.currentRefinement,n=e.refine,r=e.cssClasses,e=e.templateProps;return L("div",{className:r.root},L("label",{className:r.label},L("input",{className:r.checkbox,type:"checkbox",checked:t.isRefined,onChange:function(e){return n({isRefined:!e.target.checked})}}),L(R,g({},e,{rootTagName:"span",rootProps:{className:r.labelText},templateKey:"labelText",data:t}))))},$u={labelText:function(e){return e.name}},Bu=l({name:"toggle-refinement"}),Uu=t("ToggleRefinement"),qu=l({name:"trending-items"}),Qu=(Au=(ul={createElement:L,Fragment:N}).createElement,Wu=ul.Fragment,function(e){var t=e.classNames,t=void 0===t?{}:t,n=e.emptyComponent,n=void 0===n?Da({createElement:Au,Fragment:Wu}):n,r=e.headerComponent,r=void 0===r?$a({createElement:Au,Fragment:Wu}):r,i=e.itemComponent,i=void 0===i?Ba({createElement:Au,Fragment:Wu}):i,a=e.layout,a=void 0===a?Ua({createElement:Au,Fragment:Wu}):a,s=e.items,o=e.status,c=e.translations,u=e.sendEvent,e=Wa(e,rs),c=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?is(Object(n),!0).forEach(function(e){Ha(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):is(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({title:"Trending items",sliderLabel:"Trending items"},c),t={root:T("ais-TrendingItems",t.root),emptyRoot:T("ais-TrendingItems",t.root,"ais-TrendingItems--empty",t.emptyRoot,e.className),title:T("ais-TrendingItems-title",t.title),container:T("ais-TrendingItems-container",t.container),list:T("ais-TrendingItems-list",t.list),item:T("ais-TrendingItems-item",t.item)};return 0===s.length&&"idle"===o?Au("section",ka({},e,{className:t.emptyRoot}),Au(n,null)):Au("section",ka({},e,{className:t.root}),Au(r,{classNames:t,items:s,translations:c}),Au(a,{classNames:t,itemComponent:i,items:s,sendEvent:u}))});function Vu(e){var t=e.status,n=e.errorCode,e=e.isListening;return"error"===t&&"not-allowed"===n?Xu:L(N,null,L("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"}),Gu,el,tl)}var Ku,zu,Ju,Zu,Yu=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 L("div",{className:t.root},L(R,{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}),L(R,{templateKey:"status",rootProps:{className:t.status},data:{status:s,errorCode:a,isListening:r,transcript:o,isSpeechFinal:c,isBrowserSupported:n},templates:e}))},Xu=L(N,null,L("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),L("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"}),L("path",{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"}),L("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),L("line",{x1:"8",y1:"23",x2:"16",y2:"23"})),Gu=L("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),el=L("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),tl=L("line",{x1:"8",y1:"23",x2:"16",y2:"23"}),nl={buttonText:function(e){var t=e.status,n=e.errorCode,e=e.isListening;return L("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},L(Vu,{status:t,errorCode:n,isListening:e}))},status:function(e){return L("p",null,e.transcript)}},rl=l({name:"voice-search"}),il=t("VoiceSearch"),al=l({name:"frequently-bought-together"}),sl=(Ku=(ul={createElement:L,Fragment:N}).createElement,zu=ul.Fragment,function(e){var t=e.classNames,t=void 0===t?{}:t,n=e.emptyComponent,n=void 0===n?Da({createElement:Ku,Fragment:zu}):n,r=e.headerComponent,r=void 0===r?$a({createElement:Ku,Fragment:zu}):r,i=e.itemComponent,i=void 0===i?Ba({createElement:Ku,Fragment:zu}):i,a=e.layout,a=void 0===a?Ua({createElement:Ku,Fragment:zu}):a,s=e.items,o=e.status,c=e.translations,u=e.sendEvent,e=Wa(e,Ja),c=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Za(Object(n),!0).forEach(function(e){Ha(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Za(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({title:"Frequently bought together",sliderLabel:"Frequently bought together products"},c),t={root:T("ais-FrequentlyBoughtTogether",t.root),emptyRoot:T("ais-FrequentlyBoughtTogether",t.root,"ais-FrequentlyBoughtTogether--empty",t.emptyRoot,e.className),title:T("ais-FrequentlyBoughtTogether-title",t.title),container:T("ais-FrequentlyBoughtTogether-container",t.container),list:T("ais-FrequentlyBoughtTogether-list",t.list),item:T("ais-FrequentlyBoughtTogether-item",t.item)};return 0===s.length&&"idle"===o?Ku("section",ka({},e,{className:t.emptyRoot}),Ku(n,null)):Ku("section",ka({},e,{className:t.root}),Ku(r,{classNames:t,items:s,translations:c}),Ku(a,{classNames:t,itemComponent:i,items:s,sendEvent:u}))}),ol=l({name:"looking-similar"}),cl=(Ju=(ul={createElement:L,Fragment:N}).createElement,Zu=ul.Fragment,function(e){var t=e.classNames,t=void 0===t?{}:t,n=e.emptyComponent,n=void 0===n?Da({createElement:Ju,Fragment:Zu}):n,r=e.headerComponent,r=void 0===r?$a({createElement:Ju,Fragment:Zu}):r,i=e.itemComponent,i=void 0===i?Ba({createElement:Ju,Fragment:Zu}):i,a=e.layout,a=void 0===a?Ua({createElement:Ju,Fragment:Zu}):a,s=e.items,o=e.status,c=e.translations,u=e.sendEvent,e=Wa(e,Ga),c=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?es(Object(n),!0).forEach(function(e){Ha(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):es(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({title:"Looking similar",sliderLabel:"Looking similar"},c),t={root:T("ais-LookingSimilar",t.root),emptyRoot:T("ais-LookingSimilar",t.root,"ais-LookingSimilar--empty",t.emptyRoot,e.className),title:T("ais-LookingSimilar-title",t.title),container:T("ais-LookingSimilar-container",t.container),list:T("ais-LookingSimilar-list",t.list),item:T("ais-LookingSimilar-item",t.item)};return 0===s.length&&"idle"===o?Ju("section",ka({},e,{className:t.emptyRoot}),Ju(n,null)):Ju("section",ka({},e,{className:t.root}),Ju(r,{classNames:t,items:s,translations:c}),Ju(a,{classNames:t,itemComponent:i,items:s,sendEvent:u}))});function i(e){return new Na(e)}var ul=Z(js),js=Z(function(e){return F(F({},cn(C)(e)),{},{$$widgetType:"ais.configureRelatedItems"})}),ll=Z(ho),ul=Object.freeze({__proto__:null,EXPERIMENTAL_answers:ul,EXPERIMENTAL_configureRelatedItems:js,EXPERIMENTAL_dynamicWidgets:ll,dynamicWidgets:ho,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(F(F(F({},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 F(F({},e),{},{analytics:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}};throw new Error(vo("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:T(So(),e.root),noRefinementRoot:T(So({modifierName:"noRefinement"}),e.noRefinementRoot),list:T(So({descendantName:"list"}),e.list),item:T(So({descendantName:"item"}),e.item),selectedItem:T(So({descendantName:"item",modifierName:"selected"}),e.selectedItem),separator:T(So({descendantName:"separator"}),e.separator),link:T(So({descendantName:"link"}),e.link)},s=(e={containerNode:t,cssClasses:n,renderState:{},templates:d}).containerNode,o=e.cssClasses,c=e.renderState,u=e.templates,F(F({},Br(function(e,t){var n=e.canRefine,r=e.createURL,i=e.instantSearchInstance,a=e.items,e=e.refine;t?c.templateProps=H({defaultTemplates:bo,templatesConfig:i.templatesConfig,templates:u}):M(L(yo,{canRefine:n,cssClasses:o,createURL:r,items:a,refine:e,templateProps:c.templateProps}),s)},function(){return M(null,t)})({attributes:r,separator:i,rootPath:a,transformItems:l})),{},{$$widgetType:"ais.breadcrumb"});throw new Error(Ro("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:T(No(),e.root),button:T(No({descendantName:"button"}),e.button),disabledButton:T(No({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,F(F({},ln(function(e,t){var n=e.refine,r=e.canRefine,e=e.instantSearchInstance;t?s.templateProps=H({defaultTemplates:wo,templatesConfig:e.templatesConfig,templates:o}):M(L(_o,{refine:n,cssClasses:a,hasRefinements:r,templateProps:s.templateProps}),i)},function(){return M(null,t)})({includedAttributes:c,excludedAttributes:u,transformItems:l})),{},{$$widgetType:"ais.clearRefinements"});throw new Error(Po("The `container` option is required."))},configure:function(e){return F(F({},an(C)({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:T(Co(),a.root),noRefinementRoot:T(Co({modifierName:"noRefinement"}),a.noRefinementRoot),list:T(Co({descendantName:"list"}),a.list),item:T(Co({descendantName:"item"}),a.item),label:T(Co({descendantName:"label"}),a.label),category:T(Co({descendantName:"category"}),a.category),categoryLabel:T(Co({descendantName:"categoryLabel"}),a.categoryLabel),delete:T(Co({descendantName:"delete"}),a.delete)},F(F({},fn(fo,function(){return M(null,t)})({container:t,cssClasses:n,includedAttributes:r,excludedAttributes:i,transformItems:e})),{},{$$widgetType:"ais.currentRefinements"});throw new Error(Io("The `container` option is required."))},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=j(e,Mo);if(!g)throw new Error(Wo("The `container` option is required."));if(v)return t=P(g),g={root:T(Do(),l.root),tree:Do({descendantName:"tree"}),map:T(Do({descendantName:"map"}),l.map),control:T(Do({descendantName:"control"}),l.control),label:T(Do({descendantName:"label"}),l.label),selectedLabel:T(Do({descendantName:"label",modifierName:"selected"}),l.selectedLabel),input:T(Do({descendantName:"input"}),l.input),redo:T(Do({descendantName:"redo"}),l.redo),disabledRedo:T(Do({descendantName:"redo",modifierName:"disabled"}),l.disabledRedo),reset:T(Do({descendantName:"reset"}),l.reset)},n=F(F({},Fo),c),r=F(F({},{createOptions:function(){return{}},events:{}}),d),i=(Boolean(h)||Boolean(c.HTMLMarker))&&F(F({},{createOptions:function(){return{}},events:{}}),h),u=v,a=function(){B(c,u.maps.OverlayView);var o=V(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 D(this,c),E(y(t=o.call(this)),"__id",void 0),E(y(t),"anchor",void 0),E(y(t),"offset",void 0),E(y(t),"listeners",void 0),E(y(t),"latLng",void 0),E(y(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"===W(a)?M(a,t.element):t.element.innerHTML=a,t.setMap(i),t}return $(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=j(e,Ao);return new a(F(F(F({},i.createOptions(t)),e),{},{__id:t.objectID,position:t._geoloc,className:T(Do({descendantName:"marker"})),template:to({templateKey:"HTMLMarker",templates:n,data:t})}))}:function(e){var t=e.item,e=j(e,Ho);return new v.maps.Marker(F(F(F({},r.createOptions(t)),e),{},{__id:t.objectID,position:t._geoloc}))},d=i||r,F(F({},Yr(go,function(){return M(null,t)})(F(F({},e),{},{templates:n,renderState:{},container:t,googleReference:v,initialZoom:s,initialPosition:o,cssClasses:g,createMarker:l,markerOptions:d,enableRefine:f,enableClearMapRefinement:m,enableRefineControl:p}))),{},{$$widgetType:"ais.geoSearch"});throw new Error(Wo("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:T(S(),e.root),noRefinementRoot:T(S({modifierName:"noRefinement"}),e.noRefinementRoot),list:T(S({descendantName:"list"}),e.list),childList:T(S({descendantName:"list",modifierName:"child"}),e.childList),item:T(S({descendantName:"item"}),e.item),selectedItem:T(S({descendantName:"item",modifierName:"selected"}),e.selectedItem),parentItem:T(S({descendantName:"item",modifierName:"parent"}),e.parentItem),link:T(S({descendantName:"link"}),e.link),selectedItemLink:T(S({descendantName:"link",modifierName:"selected"}),e.selectedItemLink),label:T(S({descendantName:"label"}),e.label),count:T(S({descendantName:"count"}),e.count),showMore:T(S({descendantName:"showMore"}),e.showMore),disabledShowMore:T(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,F(F({},bn(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=H({defaultTemplates:zo,templatesConfig:a.templatesConfig,templates:d}):M(L(Ko,{createURL:n,cssClasses:c,facetValues:r,templateProps:h.templateProps,toggleRefinement:i,showMore:l,toggleShowMore:o,isShowingMore:s,canToggleShowMore:e}),u)},function(){return M(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(Jo("The `container` option is required."))},hits:function(e){var t,u,l,d,h,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),u=(n={containerNode:t,cssClasses:e,renderState:{},templates:a}).renderState,l=n.cssClasses,d=n.containerNode,h=n.templates,F(F({},xn(wn)(function(e,t){var i,n=e.items,r=e.results,a=e.instantSearchInstance,s=e.insights,o=e.bindEvent,c=e.sendEvent,e=e.banner;t?u.templateProps=H({defaultTemplates:Zo,templatesConfig:a.templatesConfig,templates:h}):(i=Gn({insights:s,sendEvent:c}),M(L(Go,{hits:n,itemComponent:function(e){var t=e.hit,n=e.index,r=j(e,Yo);return L(R,g({},u.templateProps,{templateKey:"item",rootTagName:"li",rootProps:F(F({},r),{},{onClick:function(e){i(e),r.onClick()},onAuxClick:function(e){i(e),r.onAuxClick()}}),data:F(F({},t),{},{get __hitIndex(){return n}}),bindEvent:o,sendEvent:c}))},sendEvent:c,classNames:l,emptyComponent:function(e){e=g({},(Q(e),e));return L(R,g({},u.templateProps,{rootProps:e,templateKey:"empty",data:r,rootTagName:"fragment"}))},banner:e,bannerComponent:h.banner?function(e){return L(R,g({},u.templateProps,{templateKey:"banner",data:e,rootTagName:"fragment"}))}:void 0}),d))},function(){return M(null,t)})({escapeHTML:r,transformItems:i})),{},{$$widgetType:"ais.hits"});throw new Error(Xo("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:T(ic(),s.root),select:T(ic({descendantName:"select"}),s.select),option:T(ic({descendantName:"option"}),s.option)},r=(s={containerNode:t,cssClasses:n}).containerNode,i=s.cssClasses,F(F({},tr(function(e,t){var n=e.items,e=e.refine;t||(t=(we(n,function(e){return e.isRefined})||{}).value,M(L("div",{className:i.root},L(tc,{cssClasses:i,currentValue:t,options:n,setValue:e})),r))},function(){return M(null,t)})({items:a,transformItems:e})),{},{$$widgetType:"ais.hitsPerPage"});throw new Error(rc("The `container` option is required."))},index:ba,infiniteHits:function(e){var t,h,f,m,p,g,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:T(cc(),s.root),emptyRoot:T(cc({modifierName:"empty"}),s.emptyRoot),item:T(cc({descendantName:"item"}),s.item),list:T(cc({descendantName:"list"}),s.list),loadPrevious:T(cc({descendantName:"loadPrevious"}),s.loadPrevious),disabledLoadPrevious:T(cc({descendantName:"loadPrevious",modifierName:"disabled"}),s.disabledLoadPrevious),loadMore:T(cc({descendantName:"loadMore"}),s.loadMore),disabledLoadMore:T(cc({descendantName:"loadMore",modifierName:"disabled"}),s.disabledLoadMore),bannerRoot:T(cc({descendantName:"banner"}),s.bannerRoot),bannerImage:T(cc({descendantName:"banner-image"}),s.bannerImage),bannerLink:T(cc({descendantName:"banner-link"}),s.bannerLink)},h=(s={containerNode:t,cssClasses:n,templates:a,showPrevious:o,renderState:{}}).containerNode,f=s.cssClasses,m=s.renderState,p=s.templates,g=s.showPrevious,F(F({},xn(cr)(function(e,t){var n=e.items,r=e.results,i=e.showMore,a=e.showPrevious,s=e.isFirstPage,o=e.isLastPage,c=e.instantSearchInstance,u=e.insights,l=e.bindEvent,d=e.sendEvent,e=e.banner;t?m.templateProps=H({defaultTemplates:sc,templatesConfig:c.templatesConfig,templates:p}):M(L(ac,{cssClasses:f,hits:n,results:r,hasShowPrevious:g,showPrevious:a,showMore:i,templateProps:m.templateProps,isFirstPage:s,isLastPage:o,insights:u,sendEvent:d,bindEvent:l,banner:e}),h)},function(){return M(null,t)})({escapeHTML:r,transformItems:i,showPrevious:o,cache:e})),{},{$$widgetType:"ais.infiniteHits"});throw new Error(oc("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:T(dc(),f.root),noRefinementRoot:T(dc({modifierName:"noRefinement"}),f.noRefinementRoot),list:T(dc({descendantName:"list"}),f.list),item:T(dc({descendantName:"item"}),f.item),selectedItem:T(dc({descendantName:"item",modifierName:"selected"}),f.selectedItem),link:T(dc({descendantName:"link"}),f.link),label:T(dc({descendantName:"label"}),f.label),count:T(dc({descendantName:"count"}),f.count),showMore:T(dc({descendantName:"showMore"}),f.showMore),disabledShowMore:T(dc({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,F(F({},ur(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=H({defaultTemplates:uc,templatesConfig:a.templatesConfig,templates:d}):(t=r.map(function(e){return F(F({},e),{},{url:i(e.value)})}),M(L(Ko,{createURL:i,cssClasses:u,facetValues:t,showMore:h,templateProps:l.templateProps,toggleRefinement:n,toggleShowMore:o,isShowingMore:s,canToggleShowMore:e}),c))},function(){return M(null,t)})({attribute:r,limit:a,showMore:s,showMoreLimit:o,sortBy:i,transformItems:e})),{},{$$widgetType:"ais.menu"});throw new Error(lc("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:T(pc(),l.root),noRefinementRoot:T(pc({modifierName:"noRefinement"}),l.noRefinementRoot),select:T(pc({descendantName:"select"}),l.select),option:T(pc({descendantName:"option"}),l.option)},i=(l={containerNode:t,cssClasses:n,renderState:{},templates:d}).containerNode,a=l.cssClasses,s=l.renderState,o=l.templates,F(F({},ur(function(e,t){var n=e.refine,r=e.items,e=e.instantSearchInstance;t?s.templateProps=H({defaultTemplates:fc,templatesConfig:e.templatesConfig,templates:o}):M(L(hc,{cssClasses:a,items:r,refine:n,templateProps:s.templateProps}),i)},function(){return M(null,t)})({attribute:r,limit:u,sortBy:c,transformItems:e})),{},{$$widgetType:"ais.menuSelect"});throw new Error(mc("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:T(yc(),l.root),noRefinementRoot:T(yc({modifierName:"noRefinement"}),l.noRefinementRoot),list:T(yc({descendantName:"list"}),l.list),item:T(yc({descendantName:"item"}),l.item),selectedItem:T(yc({descendantName:"item",modifierName:"selected"}),l.selectedItem),label:T(yc({descendantName:"label"}),l.label),radio:T(yc({descendantName:"radio"}),l.radio),labelText:T(yc({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,F(F({},fr(function(e,t){var n=e.createURL,r=e.instantSearchInstance,i=e.refine,e=e.items;t?c.templateProps=H({defaultTemplates:gc,templatesConfig:r.templatesConfig,templates:u}):M(L(Ko,{createURL:n,cssClasses:o,facetValues:e,templateProps:c.templateProps,toggleRefinement:i,attribute:s}),a)},function(){return M(null,t)})({attribute:r,items:i,transformItems:e})),{},{$$widgetType:"ais.numericMenu"});throw new Error(vc("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:T(Sc(),i.root),noRefinementRoot:T(Sc({modifierName:"noRefinement"}),i.noRefinementRoot),list:T(Sc({descendantName:"list"}),i.list),item:T(Sc({descendantName:"item"}),i.item),firstPageItem:T(Sc({descendantName:"item",modifierName:"firstPage"}),i.firstPageItem),lastPageItem:T(Sc({descendantName:"item",modifierName:"lastPage"}),i.lastPageItem),previousPageItem:T(Sc({descendantName:"item",modifierName:"previousPage"}),i.previousPageItem),nextPageItem:T(Sc({descendantName:"item",modifierName:"nextPage"}),i.nextPageItem),pageItem:T(Sc({descendantName:"item",modifierName:"page"}),i.pageItem),selectedItem:T(Sc({descendantName:"item",modifierName:"selected"}),i.selectedItem),disabledItem:T(Sc({descendantName:"item",modifierName:"disabled"}),i.disabledItem),link:T(Sc({descendantName:"link"}),i.link)},i=F(F({},wc),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,F(F({},yr(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||M(L(bc,{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 M(null,t)})({totalPages:a,padding:s})),{},{$$widgetType:"ais.pagination"});throw new Error(_c("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:T(Cc(),e.root),noRefinementRoot:T(Cc({modifierName:"noRefinement"}),e.noRefinementRoot),collapsibleRoot:T(Cc({modifierName:"collapsible"}),e.collapsibleRoot),collapsedRoot:T(Cc({modifierName:"collapsed"}),e.collapsedRoot),collapseButton:T(Cc({descendantName:"collapseButton"}),e.collapseButton),collapseIcon:T(Cc({descendantName:"collapseIcon"}),e.collapseIcon),body:T(Cc({descendantName:"body"}),e.body),header:T(Cc({descendantName:"header"}),e.header),footer:T(Cc({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:F(F({},{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;M(L(Pc,{cssClasses:c,hidden:n,collapsible:r,isCollapsed:e,templates:u,data:t,bodyElement:o}),s)},l=n(F(F({},e),{},{container:h})),F(F({},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=F(F({},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=F(F({},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(M(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(Ic("The `container` option is required in the widget within the panel."))}}},places:ks,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:T(jc(),jc({modifierName:"dark"===e?"dark":"light"}),a.root),link:T(jc({descendantName:"link"}),a.link),logo:T(jc({descendantName:"logo"}),a.logo)},r=(a={containerNode:t,cssClasses:n}).containerNode,i=a.cssClasses,F(F({},Xr(function(e,t){var n=e.url,e=e.widgetParams;t&&(t=e.theme,M(L(Ec,{cssClasses:i,url:n,theme:void 0===t?"light":t}),r))},function(){return M(null,t)})({theme:e})),{},{$$widgetType:"ais.poweredBy"});throw new Error(kc("The `container` option is required."))},queryRuleContext:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(e.trackedFilters)return F(F({},ii(C)(e)),{},{$$widgetType:"ais.queryRuleContext"});throw new Error(Oc("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:T(Ac(),s.root)},t=P(a),a=F(F({},Mc),o),n=(o={containerNode:t,cssClasses:s,renderState:{},templates:a}).containerNode,r=o.cssClasses,i=o.templates,F(F({},ii(function(e){e=e.items;M(L(Lc,{cssClasses:r,templates:i,items:e}),n)},function(){M(null,t)})({transformItems:e})),{},{$$widgetType:"ais.queryRuleCustomData"});throw new Error(Hc("The `container` option is required."))},relatedProducts:function(e){var t,o,c,u,l,e=e||{},n=e.container,r=e.objectIDs,i=e.limit,a=e.queryParameters,s=e.fallbackParameters,d=e.threshold,h=e.escapeHTML,f=e.transformItems,m=e.templates,m=void 0===m?{}:m,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),o=(n={containerNode:t,cssClasses:e,renderState:{},templates:m}).renderState,c=n.cssClasses,u=n.containerNode,l=n.templates,F(F({},Tr(function(e,t){var n,r,i,a=e.items,s=e.results,e=e.instantSearchInstance;t?o.templateProps=H({defaultTemplates:{},templatesConfig:e.templatesConfig,templates:l}):(t=l.header?function(e){return L(R,g({},o.templateProps,{templateKey:"header",rootTagName:"fragment",data:{cssClasses:e.classNames,items:e.items}}))}:void 0,n=l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0,r=l.empty?function(){return L(R,g({},o.templateProps,{templateKey:"empty",rootTagName:"fragment",data:s}))}:void 0,i=l.layout?function(e){return L(R,g({},o.templateProps,{templateKey:"layout",rootTagName:"fragment",data:{items:e.items,templates:{item:l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0},cssClasses:{list:e.classNames.list,item:e.classNames.item}}}))}:void 0,M(L(Dc,{items:a,sendEvent:function(){},classNames:c,headerComponent:t,itemComponent:n,emptyComponent:r,layout:i,status:e.status}),u))},function(){return M(null,t)})({objectIDs:r,limit:i,queryParameters:a,fallbackParameters:s,threshold:d,escapeHTML:h,transformItems:f})),{},{$$widgetType:"ais.relatedProducts"});throw new Error(Wc("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:T(Qc(),d.root),noRefinement:T(Qc({modifierName:"noRefinement"})),form:T(Qc({descendantName:"form"}),d.form),label:T(Qc({descendantName:"label"}),d.label),input:T(Qc({descendantName:"input"}),d.input),inputMin:T(Qc({descendantName:"input",modifierName:"min"}),d.inputMin),inputMax:T(Qc({descendantName:"input",modifierName:"max"}),d.inputMax),separator:T(Qc({descendantName:"separator"}),d.separator),submit:T(Qc({descendantName:"submit"}),d.submit)},s=(d={containerNode:t,cssClasses:n,templates:e,renderState:{}}).containerNode,o=d.cssClasses,c=d.renderState,u=d.templates,F(F({},wr(function(e,t){var n=e.refine,r=e.range,i=e.start,a=e.widgetParams,e=e.instantSearchInstance;t?c.templateProps=H({defaultTemplates:Vc,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),M(L(Uc,{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 M(null,t)})({attribute:r,min:i,max:a,precision:l})),{},{$$type:"ais.rangeInput",$$widgetType:"ais.rangeInput"});throw new Error(qc("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:T(hu(),d.root),disabledRoot:T(hu({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,F(F({},wr(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],M(L(lu,{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 M(null,t)})({attribute:r,min:i,max:l,precision:m})),{},{$$type:"ais.rangeSlider",$$widgetType:"ais.rangeSlider"});throw new Error(du("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:T(_(),u.root),noRefinementRoot:T(_({modifierName:"noRefinement"}),u.noRefinementRoot),list:T(_({descendantName:"list"}),u.list),item:T(_({descendantName:"item"}),u.item),selectedItem:T(_({descendantName:"item",modifierName:"selected"}),u.selectedItem),disabledItem:T(_({descendantName:"item",modifierName:"disabled"}),u.disabledItem),link:T(_({descendantName:"link"}),u.link),starIcon:T(_({descendantName:"starIcon"}),u.starIcon),fullStarIcon:T(_({descendantName:"starIcon",modifierName:"full"}),u.fullStarIcon),emptyStarIcon:T(_({descendantName:"starIcon",modifierName:"empty"}),u.emptyStarIcon),label:T(_({descendantName:"label"}),u.label),count:T(_({descendantName:"count"}),u.count)},a=(u={containerNode:t,cssClasses:n,renderState:{},templates:e}).containerNode,s=u.cssClasses,o=u.templates,c=u.renderState,F(F({},kr(function(e,t){var n=e.refine,r=e.items,i=e.createURL,e=e.instantSearchInstance;t?c.templateProps=H({defaultTemplates:mu,templatesConfig:e.templatesConfig,templates:o}):M(L(Ko,{createURL:i,cssClasses:s,facetValues:r,templateProps:c.templateProps,toggleRefinement:n},L("svg",{style:"display:none;"},L("symbol",{id:_({descendantName:"starSymbol"}),viewBox:"0 0 24 24"},gu),L("symbol",{id:_({descendantName:"starEmptySymbol"}),viewBox:"0 0 24 24"},vu))),a)},function(){return M(null,t)})({attribute:r,max:i})),{},{$$widgetType:"ais.ratingMenu"});throw new Error(pu("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:T(A(),_.root),noRefinementRoot:T(A({modifierName:"noRefinement"}),_.noRefinementRoot),list:T(A({descendantName:"list"}),_.list),item:T(A({descendantName:"item"}),_.item),selectedItem:T(A({descendantName:"item",modifierName:"selected"}),_.selectedItem),searchBox:T(A({descendantName:"searchBox"}),_.searchBox),label:T(A({descendantName:"label"}),_.label),checkbox:T(A({descendantName:"checkbox"}),_.checkbox),labelText:T(A({descendantName:"labelText"}),_.labelText),count:T(A({descendantName:"count"}),_.count),noResults:T(A({descendantName:"noResults"}),_.noResults),showMore:T(A({descendantName:"showMore"}),_.showMore),disabledShowMore:T(A({descendantName:"showMore",modifierName:"disabled"}),_.disabledShowMore),searchable:{root:T(Pu(),_.searchableRoot),form:T(Pu({descendantName:"form"}),_.searchableForm),input:T(Pu({descendantName:"input"}),_.searchableInput),submit:T(Pu({descendantName:"submit"}),_.searchableSubmit),submitIcon:T(Pu({descendantName:"submitIcon"}),_.searchableSubmitIcon),reset:T(Pu({descendantName:"reset"}),_.searchableReset),resetIcon:T(Pu({descendantName:"resetIcon"}),_.searchableResetIcon),loadingIndicator:T(Pu({descendantName:"loadingIndicator"}),_.searchableLoadingIndicator),loadingIcon:T(Pu({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,F(F({},Pr(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=H({defaultTemplates:_u,templatesConfig:o.templatesConfig,templates:f}),p.searchBoxTemplateProps=H({defaultTemplates:Su,templatesConfig:o.templatesConfig,templates:m})):M(L(Ko,{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 M(null,t)})({attribute:r,operator:i,limit:s,showMore:o,showMoreLimit:c,sortBy:a,escapeFacetValues:R,transformItems:e})),{},{$$widgetType:"ais.refinementList"});throw new Error(wu("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:T(Cu(),e.root),text:T(Cu({descendantName:"text"}),e.text),button:T(Cu({descendantName:"button"}),e.button)},e=F(F({},xu),s),r=(s={containerNode:t,cssClasses:n,renderState:{},templates:e}).containerNode,i=s.cssClasses,a=s.templates,F(F({},oi(function(e){var t=e.isRelevantSorted,n=e.isVirtualReplica,e=e.refine;M(L(Nu,{cssClasses:i,templates:a,isRelevantSorted:t,isVirtualReplica:n,refine:e}),r)},function(){M(null,t)})({})),{},{$$widgetType:"ais.relevantSort"});throw new Error(Iu("The `container` option is required."))},searchBox:function(e){var t,r,i,a,s,o,c,u,l,d,h,e=e||{},n=e.container,f=e.placeholder,f=void 0===f?"":f,m=e.cssClasses,m=void 0===m?{}:m,p=e.autofocus,p=void 0!==p&&p,g=e.searchAsYouType,g=void 0===g||g,v=e.ignoreCompositionEvents,v=void 0!==v&&v,y=e.showReset,y=void 0===y||y,b=e.showSubmit,b=void 0===b||b,R=e.showLoadingIndicator,R=void 0===R||R,S=e.queryHook,e=e.templates,e=void 0===e?{}:e;if(n)return t=P(n),n={root:T(Fu(),m.root),form:T(Fu({descendantName:"form"}),m.form),input:T(Fu({descendantName:"input"}),m.input),submit:T(Fu({descendantName:"submit"}),m.submit),submitIcon:T(Fu({descendantName:"submitIcon"}),m.submitIcon),reset:T(Fu({descendantName:"reset"}),m.reset),resetIcon:T(Fu({descendantName:"resetIcon"}),m.resetIcon),loadingIndicator:T(Fu({descendantName:"loadingIndicator"}),m.loadingIndicator),loadingIcon:T(Fu({descendantName:"loadingIcon"}),m.loadingIcon)},m=F(F({},Su),e),r=(e={containerNode:t,cssClasses:n,placeholder:f,templates:m,autofocus:p,searchAsYouType:g,ignoreCompositionEvents:v,showReset:y,showSubmit:b,showLoadingIndicator:R}).containerNode,i=e.cssClasses,a=e.placeholder,s=e.templates,o=e.autofocus,c=e.searchAsYouType,u=e.ignoreCompositionEvents,l=e.showReset,d=e.showSubmit,h=e.showLoadingIndicator,F(F({},Er(function(e){var t=e.refine,n=e.query,e=e.isSearchStalled;M(L($o,{query:n,placeholder:a,autofocus:o,refine:t,searchAsYouType:c,ignoreCompositionEvents:u,templates:s,showSubmit:d,showReset:l,showLoadingIndicator:h,isSearchStalled:e,cssClasses:i}),r)},function(){return M(null,t)})({queryHook:S})),{},{$$widgetType:"ais.searchBox"});throw new Error(Tu("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:T(ju(),s.root),select:T(ju({descendantName:"select"}),s.select),option:T(ju({descendantName:"option"}),s.option)},i=(s={containerNode:t,cssClasses:n}).containerNode,a=s.cssClasses,F(F({},jr(function(e,t){var n=e.currentRefinement,r=e.options,e=e.refine;t||M(L("div",{className:a.root},L(tc,{cssClasses:a,currentValue:n,options:r,setValue:e,ariaLabel:"Sort results by"})),i)},function(){return M(null,t)})({container:t,items:r,transformItems:e})),{},{$$widgetType:"ais.sortBy"});throw new Error(Eu("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:T(Mu(),r.root),text:T(Mu({descendantName:"text"}),r.text)},l=(r={containerNode:t,cssClasses:n,templates:e,renderState:{}}).renderState,d=r.cssClasses,h=r.containerNode,f=r.templates,F(F({},Wr(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=H({defaultTemplates:Hu,templatesConfig:e.templatesConfig,templates:f}):M(L(Ou,{cssClasses:d,hitsPerPage:n,nbHits:r,nbSortedHits:i,areHitsSorted:a,nbPages:s,page:o,processingTimeMS:c,query:u,templateProps:l.templateProps}),h)},function(){return M(null,t)})({})),{},{$$widgetType:"ais.stats"});throw new Error(Lu("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:T(Uu(),c.root),label:T(Uu({descendantName:"label"}),c.label),checkbox:T(Uu({descendantName:"checkbox"}),c.checkbox),labelText:T(Uu({descendantName:"labelText"}),c.labelText)},i=(c={containerNode:t,cssClasses:n,renderState:{},templates:u}).containerNode,a=c.cssClasses,s=c.renderState,o=c.templates,F(F({},Dr(function(e,t){var n=e.value,r=e.refine,e=e.instantSearchInstance;t?s.templateProps=H({defaultTemplates:$u,templatesConfig:e.templatesConfig,templates:o}):M(L(Du,{cssClasses:a,currentRefinement:n,templateProps:s.templateProps,refine:r}),i)},function(){return M(null,t)})({attribute:r,on:l,off:e})),{},{$$widgetType:"ais.toggleRefinement"});throw new Error(Bu("The `container` option is required."))},trendingItems:function(e){var t,o,c,u,l,e=e||{},n=e.container,r=e.facetName,i=e.facetValue,a=e.limit,s=e.queryParameters,d=e.fallbackParameters,h=e.threshold,f=e.escapeHTML,m=e.transformItems,p=e.templates,p=void 0===p?{}:p,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),o=(n={containerNode:t,cssClasses:e,renderState:{},templates:p}).renderState,c=n.cssClasses,u=n.containerNode,l=n.templates,F(F({},$r(function(e,t){var n,r,i,a=e.items,s=e.results,e=e.instantSearchInstance;t?o.templateProps=H({defaultTemplates:{},templatesConfig:e.templatesConfig,templates:l}):(t=l.header?function(e){return L(R,g({},o.templateProps,{templateKey:"header",rootTagName:"fragment",data:{cssClasses:e.classNames,items:e.items}}))}:void 0,n=l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0,r=l.empty?function(){return L(R,g({},o.templateProps,{templateKey:"empty",rootTagName:"fragment",data:s}))}:void 0,i=l.layout?function(e){return L(R,g({},o.templateProps,{templateKey:"layout",rootTagName:"fragment",data:{items:e.items,templates:{item:l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0},cssClasses:{list:e.classNames.list,item:e.classNames.item}}}))}:void 0,M(L(Qu,{items:a,sendEvent:function(){},classNames:c,headerComponent:t,itemComponent:n,emptyComponent:r,layout:i,status:e.status}),u))},function(){return M(null,t)})(F(F({},r&&i?{facetName:r,facetValue:i}:{}),{},{limit:a,queryParameters:s,fallbackParameters:d,threshold:h,escapeHTML:f,transformItems:m}))),{},{$$widgetType:"ais.trendingItems"});throw new Error(qu("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:T(il(),r.root),button:T(il({descendantName:"button"}),r.button),status:T(il({descendantName:"status"}),r.status)},r=F(F({},nl),o),i=(o={containerNode:t,cssClasses:n,templates:r}).containerNode,a=o.cssClasses,s=o.templates,F(F({},si(function(e){var t=e.isBrowserSupported,n=e.isListening,r=e.toggleListening,e=e.voiceListeningState;M(L(Yu,{cssClasses:a,templates:s,isBrowserSupported:t,isListening:n,toggleListening:r,voiceListeningState:e}),i)},function(){return M(null,t)})({container:t,cssClasses:n,templates:r,searchAsYouSpeak:c,language:u,additionalQueryParameters:l,createVoiceSearchHelper:e})),{},{$$widgetType:"ais.voiceSearch"});throw new Error(rl("The `container` option is required."))},frequentlyBoughtTogether:function(e){var t,o,c,u,l,e=e||{},n=e.container,r=e.objectIDs,i=e.limit,a=e.queryParameters,s=e.threshold,d=e.escapeHTML,h=e.transformItems,f=e.templates,f=void 0===f?{}:f,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),o=(n={containerNode:t,cssClasses:e,renderState:{},templates:f}).renderState,c=n.cssClasses,u=n.containerNode,l=n.templates,F(F({},ci(function(e,t){var n,r,i,a=e.items,s=e.results,e=e.instantSearchInstance;t?o.templateProps=H({defaultTemplates:{},templatesConfig:e.templatesConfig,templates:l}):(t=l.header?function(e){return L(R,g({},o.templateProps,{templateKey:"header",rootTagName:"fragment",data:{cssClasses:e.classNames,items:e.items}}))}:void 0,n=l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0,r=l.empty?function(){return L(R,g({},o.templateProps,{templateKey:"empty",rootTagName:"fragment",data:s}))}:void 0,i=l.layout?function(e){return L(R,g({},o.templateProps,{templateKey:"layout",rootTagName:"fragment",data:{items:e.items,templates:{item:l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0},cssClasses:{list:e.classNames.list,item:e.classNames.item}}}))}:void 0,M(L(sl,{items:a,headerComponent:t,itemComponent:n,sendEvent:function(){},classNames:c,emptyComponent:r,layout:i,status:e.status}),u))},function(){return M(null,t)})({objectIDs:r,limit:i,queryParameters:a,threshold:s,escapeHTML:d,transformItems:h})),{},{$$widgetType:"ais.frequentlyBoughtTogether"});throw new Error(al("The `container` option is required."))},lookingSimilar:function(e){var t,o,c,u,l,e=e||{},n=e.container,r=e.objectIDs,i=e.limit,a=e.queryParameters,s=e.fallbackParameters,d=e.threshold,h=e.escapeHTML,f=e.transformItems,m=e.templates,m=void 0===m?{}:m,e=e.cssClasses,e=void 0===e?{}:e;if(n)return t=P(n),o=(n={containerNode:t,cssClasses:e,renderState:{},templates:m}).renderState,c=n.cssClasses,u=n.containerNode,l=n.templates,F(F({},ui(function(e,t){var n,r,i,a=e.items,s=e.results,e=e.instantSearchInstance;t?o.templateProps=H({defaultTemplates:{},templatesConfig:e.templatesConfig,templates:l}):(t=l.header?function(e){return L(R,g({},o.templateProps,{templateKey:"header",rootTagName:"fragment",data:{cssClasses:e.classNames,items:e.items}}))}:void 0,n=l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0,r=l.empty?function(){return L(R,g({},o.templateProps,{templateKey:"empty",rootTagName:"fragment",data:s}))}:void 0,i=l.layout?function(e){return L(R,g({},o.templateProps,{templateKey:"layout",rootTagName:"fragment",data:{items:e.items,templates:{item:l.item?function(e){e=e.item;return L(R,g({},o.templateProps,{templateKey:"item",rootTagName:"fragment",data:e}))}:void 0},cssClasses:{list:e.classNames.list,item:e.classNames.item}}}))}:void 0,M(L(cl,{items:a,headerComponent:t,itemComponent:n,sendEvent:function(){},classNames:c,emptyComponent:r,layout:i,status:e.status}),u))},function(){return M(null,t)})({objectIDs:r,limit:i,queryParameters:a,fallbackParameters:s,threshold:d,escapeHTML:h,transformItems:f})),{},{$$widgetType:"ais.lookingSimilar"});throw new Error(ol("The `container` option is required."))}});return i.version="4.75.3",i.connectors=gt,i.widgets=ul,i.middlewares=fi,i.routers=pt,i.stateMappings=ht,i.templates=mi,i.createInfiniteHitsSessionStorageCache=function(){var r=["ais.infiniteHits",(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).key].filter(Boolean).join(":");return{read:function(e){var e=e.state,t=it(function(e){return e.window.sessionStorage});if(!t)return null;try{var n=JSON.parse(t.getItem(r));return n&&He(n.state,xi(e))?n.hits:null}catch(e){if(e instanceof SyntaxError)try{t.removeItem(r)}catch(e){}return null}},write:function(e){var t=e.state,e=e.hits,n=it(function(e){return e.window.sessionStorage});if(n)try{n.setItem(r,JSON.stringify({state:xi(t),hits:e}))}catch(e){}}}},i.highlight=gi,i.reverseHighlight=yi,i.snippet=Ri,i.reverseSnippet=_i,i.insights=Xn,i});
|
||
//# sourceMappingURL=instantsearch.production.min.js.map
|