henry-search 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HenrySearch.css +1 -1
- package/dist/HenrySearch.js +26924 -63
- package/dist/HenrySearch.umd.cjs +182 -1
- package/package.json +9 -5
- package/src/assets/main-icons-sprite.svg +101 -0
- package/src/components/Autocomplete.vue +141 -0
- package/src/components/PTabs.vue +98 -0
- package/src/components/Search.vue +152 -2000
- package/src/components/SearchDetail.vue +128 -0
- package/src/components/SearchTab.vue +331 -0
- package/src/components/constants.js +1 -0
- package/src/composables/FocusableElements.js +13 -0
- package/src/composables/UseDirectionalKeys.js +105 -0
- package/src/composables/focusWithArrows.js +52 -0
- package/src/composables/formatDate.js +15 -0
- package/src/composables/slugify.js +10 -0
- package/src/main.js +2 -1
- /package/src/{App.vue → App.vue-old} +0 -0
package/dist/HenrySearch.umd.cjs
CHANGED
|
@@ -1 +1,182 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Sr,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(Sr=typeof globalThis<"u"?globalThis:Sr||self,i(Sr.HenrySearch={},Sr.Vue))})(this,(function(Sr,i){"use strict";function Bv(e,t,r){if(!e)throw new Error("You need to provide `widgetName` in your data");var n=["ais-"+e];return t&&n.push("-"+t),r&&n.push("--"+r),n.join("")}var Le=function(e){var t=e.name;return{props:{classNames:{type:Object,default:void 0}},methods:{suit:function(r,n){var a=Bv(t,r,n),o=this.classNames&&this.classNames[a];return o?[a,o].join(" "):a}}}};function Vn(e){for(var t=arguments,r=1;r<arguments.length;r++){var n=t[r]!=null?t[r]:{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),a.forEach(function(o){Hv(e,o,n[o])})}return e}function Hv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wi(e){function t(r,n){for(var a=[],o=arguments.length-2;o-- >0;)a[o]=arguments[o+2];var s=a.length>0?a:void 0;if(typeof n=="object"&&(n.attrs||n.props||n.scopedSlots||n.on)){var u=Object.keys(n.on||{}),d=Object.assign({},n,n.attrs,n.props,u.reduce(function(p,m){return p["on"+m[0].toUpperCase()+m.slice(1)]=n.on[m],p},{}));return delete d.attrs,delete d.props,delete d.scopedSlots,u.forEach(function(p){return delete d.on[p]}),d.on&&Object.keys(d.on).length===0&&delete d.on,i.h(r,d,n.scopedSlots?Object.assign({default:function(){return s}},n.scopedSlots):s)}return i.h(r,n,s)}return function(){return e.call(this,t)}}function cs(e){var t=e.$slots||e.slots;return typeof t.default=="function"?t.default():t.default}function ds(e,t){return(e.$slots||e.slots||{})[t]}var pc=new Set;function fn(e){pc.has(e)||(pc.add(e),console.warn(e))}var We=function(e,t){var r;e===void 0&&(e={});var n=e.connector;return t===void 0&&(t={}),(r={inject:{instantSearchInstance:{from:"$_ais_instantSearchInstance",default:function(){var a=this.$options._componentTag;throw new TypeError('It looks like you forgot to wrap your Algolia search component "<'+a+'>" inside of an "<ais-instant-search>" component.')}},getParentIndex:{from:"$_ais_getParentIndex",default:function(){var a=this;return function(){return a.instantSearchInstance.mainIndex}}}},data:function(){return{state:null}},created:function(){if(typeof n=="function"){if(this.factory=n(this.updateState,function(){}),this.widget=Vn(this.factory(this.widgetParams),t),this.getParentIndex().addWidgets([this.widget]),this.instantSearchInstance._initialResults&&!this.instantSearchInstance.started){if(typeof this.instantSearchInstance.__forceRender!="function")throw new Error("You are using server side rendering with <ais-instant-search> instead of <ais-instant-search-ssr>.");this.instantSearchInstance.__forceRender(this.widget,this.getParentIndex())}}else n!==!0&&fn(`You are using the InstantSearch widget mixin, but didn't provide a connector.
|
|
2
|
+
While this is technically possible, and will give you access to the Helper,
|
|
3
|
+
it's not the recommended way of making custom components.
|
|
4
|
+
|
|
5
|
+
If you want to disable this message, pass { connector: true } to the mixin.
|
|
6
|
+
|
|
7
|
+
Read more on using connectors: https://alg.li/vue-custom`)}}).beforeUnmount=function(){this.widget&&this.getParentIndex().removeWidgets([this.widget])},r.watch={widgetParams:{handler:function(a){this.state=null,this.getParentIndex().removeWidgets([this.widget]),this.widget=Vn(this.factory(a),t),this.getParentIndex().addWidgets([this.widget])},deep:!0}},r.methods={updateState:function(a,o){a===void 0&&(a={}),o||(this.state=a)}},r},Vv=0;function qv(e){e.dependsOn==="recommend"&&(e.$$id=Vv++)}function mc(e){return e.toString().charAt(0).toUpperCase()+e.toString().slice(1)}function Fe(){}var Rr=function(t,r){return t},fs=Fe,ke=Fe;process.env.NODE_ENV==="development"&&(fs=function(t){console.warn("[InstantSearch.js]: ".concat(t.trim()))},Rr=function(t,r){var n=!1;return function(){return n||(n=!0,process.env.NODE_ENV==="development"&&fs(r)),t.apply(void 0,arguments)}},ke=function(t,r){if(!t){var n=ke.cache[r];n||(ke.cache[r]=!0,process.env.NODE_ENV==="development"&&fs(r))}},ke.cache={});var Uv=Object.keys;function Wv(e){return Qv(e)||Yv(e)||gc(e)||zv()}function zv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
8
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yv(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qv(e){if(Array.isArray(e))return hs(e)}function qn(e,t){return Jv(e)||Gv(e,t)||gc(e,t)||Kv()}function Kv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
9
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gc(e,t){if(e){if(typeof e=="string")return hs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hs(e,t)}}function hs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gv(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function Jv(e){if(Array.isArray(e))return e}function Xv(e){switch(e){case"range":return[];case"menu":return["menu","menuSelect"];default:return[e]}}var Zv={query:{connectors:["connectSearchBox"],widgets:["ais.searchBox","ais.autocomplete","ais.voiceSearch"]},refinementList:{connectors:["connectRefinementList"],widgets:["ais.refinementList"]},menu:{connectors:["connectMenu"],widgets:["ais.menu"]},hierarchicalMenu:{connectors:["connectHierarchicalMenu"],widgets:["ais.hierarchicalMenu"]},numericMenu:{connectors:["connectNumericMenu"],widgets:["ais.numericMenu"]},ratingMenu:{connectors:["connectRatingMenu"],widgets:["ais.ratingMenu"]},range:{connectors:["connectRange"],widgets:["ais.rangeInput","ais.rangeSlider","ais.range"]},toggle:{connectors:["connectToggleRefinement"],widgets:["ais.toggleRefinement"]},geoSearch:{connectors:["connectGeoSearch"],widgets:["ais.geoSearch"]},sortBy:{connectors:["connectSortBy"],widgets:["ais.sortBy"]},page:{connectors:["connectPagination"],widgets:["ais.pagination","ais.infiniteHits"]},hitsPerPage:{connectors:["connectHitsPerPage"],widgets:["ais.hitsPerPage"]},configure:{connectors:["connectConfigure"],widgets:["ais.configure"]},places:{connectors:[],widgets:["ais.places"]}};function yc(e){var t=e.index,r=e.indexUiState,n=t.getWidgets().map(function(o){return o.$$type}).filter(Boolean),a=Uv(r).reduce(function(o,s){var u=Zv[s];if(!u)return o;var d=u.widgets;return d&&!d.some(function(p){return n.includes(p)})&&o.push([s,{connectors:u.connectors,widgets:u.widgets.map(function(p){return p.split("ais.")[1]})}]),o},[]);process.env.NODE_ENV==="development"&&ke(a.length===0,'The UI state for the index "'.concat(t.getIndexId(),'" is not consistent with the widgets mounted.\n\nThis can happen when the UI state is specified via `initialUiState`, `routing` or `setUiState` but that the widgets responsible for this state were not added. This results in those query parameters not being sent to the API.\n\nTo fully reflect the state, some widgets need to be added to the index "').concat(t.getIndexId(),`":
|
|
10
|
+
|
|
11
|
+
`).concat(a.map(function(o){var s,u=qn(o,2),d=u[0],p=u[1].widgets;return"- `".concat(d,"` needs one of these widgets: ").concat((s=[]).concat.apply(s,Wv(p.map(function(m){return Xv(m)}))).map(function(m){return'"'.concat(m,'"')}).join(", "))}).join(`
|
|
12
|
+
`),`
|
|
13
|
+
|
|
14
|
+
If you do not wish to display widgets but still want to support their search parameters, you can mount "virtual widgets" that don't render anything:
|
|
15
|
+
|
|
16
|
+
\`\`\`
|
|
17
|
+
`).concat(a.filter(function(o){var s=qn(o,2);s[0];var u=s[1].connectors;return u.length>0}).map(function(o){var s=qn(o,2);s[0];var u=s[1],d=u.connectors,p=u.widgets,m=mc(p[0]),v=d[0];return"const virtual".concat(m," = ").concat(v,"(() => null);")}).join(`
|
|
18
|
+
`),`
|
|
19
|
+
|
|
20
|
+
search.addWidgets([
|
|
21
|
+
`).concat(a.filter(function(o){var s=qn(o,2);s[0];var u=s[1].connectors;return u.length>0}).map(function(o){var s=qn(o,2);s[0];var u=s[1].widgets,d=mc(u[0]);return"virtual".concat(d,"({ /* ... */ })")}).join(`,
|
|
22
|
+
`),`
|
|
23
|
+
]);
|
|
24
|
+
\`\`\`
|
|
25
|
+
|
|
26
|
+
If you're using custom widgets that do set these query parameters, we recommend using connectors instead.
|
|
27
|
+
|
|
28
|
+
See https://www.algolia.com/doc/guides/building-search-ui/widgets/customize-an-existing-widget/js/#customize-the-complete-ui-of-the-widgets`))}function vc(e){return Object.prototype.toString.call(e).slice(8,-1)}function it(e,t){if(e===void 0||typeof e!="function")throw new Error("The render function is not valid (received type ".concat(vc(e),`).
|
|
29
|
+
|
|
30
|
+
`).concat(t))}function bc(e){var t=e.helper,r=e.attributesToClear,n=r===void 0?[]:r,a=t.state.setPage(0);return a=n.reduce(function(o,s){return a.isNumericRefined(s)?o.removeNumericRefinement(s):a.isHierarchicalFacet(s)?o.removeHierarchicalFacetRefinement(s):a.isDisjunctiveFacet(s)?o.removeDisjunctiveFacetRefinement(s):a.isConjunctiveFacet(s)?o.removeFacetRefinement(s):o},a),n.indexOf("query")!==-1&&(a=a.setQuery("")),a}var e0={"&":"&","<":"<",">":">",'"':""","'":"'"},wc=/[&<>"']/g,t0=RegExp(wc.source);function r0(e){return e&&t0.test(e)?e.replace(wc,function(t){return e0[t]}):e}var n0={"&":"&","<":"<",">":">",""":'"',"'":"'"},_c=/&(amp|quot|lt|gt|#39);/g,a0=RegExp(_c.source);function Sc(e){return e&&a0.test(e)?e.replace(_c,function(t){return n0[t]}):e}function ps(e){"@babel/helpers - typeof";return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(e)}function i0(e){return e===null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function o0(e){return ps(e)==="object"&&e!==null}function Rc(e){if(!o0(e)||i0(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Un(e){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Un(e)}function s0(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ms.apply(this,arguments)}function Pc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pc(Object(r),!0).forEach(function(n){Oc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oc(e,t,r){return t=l0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l0(e){var t=u0(e,"string");return Un(t)=="symbol"?t:String(t)}function u0(e,t){if(Un(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sr={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},St={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function Ec(e){return r0(e).replace(new RegExp(sr.highlightPreTag,"g"),St.highlightPreTag).replace(new RegExp(sr.highlightPostTag,"g"),St.highlightPostTag)}function _i(e){return Rc(e)&&typeof e.value!="string"?Object.keys(e).reduce(function(t,r){return hn(hn({},t),{},Oc({},r,_i(e[r])))},{}):Array.isArray(e)?e.map(_i):hn(hn({},e),{},{value:Ec(e.value)})}function Si(e){return e.__escaped===void 0&&(e=e.map(function(t){var r=ms({},(s0(t),t));return r._highlightResult&&(r._highlightResult=_i(r._highlightResult)),r._snippetResult&&(r._snippetResult=_i(r._snippetResult)),r}),e.__escaped=!0),e}function c0(e){return e.map(function(t){return hn(hn({},t),{},{highlighted:Ec(t.highlighted)})})}function Cc(e){var t=St.highlightPreTag,r=St.highlightPostTag;return e.map(function(n){return n.isHighlighted?t+n.value+r:n.value}).join("")}function d0(){var e=-1,t=-1,r=void 0;return function(a){var o=++e;return Promise.resolve(a).then(function(s){return r&&o<t?r:(t=o,r=s,s)})}}function f0(e,t,r){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,r):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,r):e.state.isDisjunctiveFacetRefined(t,r)}function xc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function h0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xc(Object(r),!0).forEach(function(n){p0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p0(e,t,r){return t=m0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m0(e){var t=g0(e,"string");return pn(t)=="symbol"?t:String(t)}function g0(e,t){if(pn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pn(e){"@babel/helpers - typeof";return pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(e)}function y0(e,t){return _0(e)||w0(e,t)||b0(e,t)||v0()}function v0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
31
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b0(e,t){if(e){if(typeof e=="string")return Tc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tc(e,t)}}function Tc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function _0(e){if(Array.isArray(e))return e}function gs(e){var t=e.instantSearchInstance,r=e.helper,n=e.attribute,a=e.widgetType,o=function(){for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];var m=d[1],v=d[2],h=v===void 0?"Filter Applied":v,l=d[3],c=l===void 0?{}:l,g=d[0].split(":"),y=y0(g,2),f=y[0],b=y[1],w=typeof n=="string"?n:n(m);if(d.length===1&&pn(d[0])==="object")t.sendEventToInsights(d[0]);else if(f==="click"&&d.length>=2&&d.length<=4){if(!f0(r,w,m)){var _;t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:a,eventType:f,eventModifier:b,payload:h0({eventName:h,index:((_=r.lastResults)===null||_===void 0?void 0:_.index)||r.state.index,filters:["".concat(w,":").concat(m)]},c),attribute:w})}}else if(process.env.NODE_ENV==="development")throw new Error(`You need to pass between two and four arguments like:
|
|
32
|
+
sendEvent('click', facetValue, eventName?, additionalData?);
|
|
33
|
+
|
|
34
|
+
If you want to send a custom payload, you can pass one object: sendEvent(customPayload);
|
|
35
|
+
`)};return o}function kc(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function Ac(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ys(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ac(Object(r),!0).forEach(function(n){S0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ac(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S0(e,t,r){return t=R0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R0(e){var t=P0(e,"string");return mn(t)=="symbol"?t:String(t)}function P0(e,t){if(mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O0(e,t){return T0(e)||x0(e,t)||C0(e,t)||E0()}function E0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
36
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C0(e,t){if(e){if(typeof e=="string")return jc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jc(e,t)}}function jc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function x0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function T0(e){if(Array.isArray(e))return e}function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mn(e)}function k0(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<Math.ceil(e.length/t);n++)r.push(e.slice(n*t,(n+1)*t));return r}function $c(e){var t=e.helper,r=e.widgetType,n=e.methodName,a=e.args,o=e.instantSearchInstance;if(a.length===1&&mn(a[0])==="object")return[a[0]];var s=a[0].split(":"),u=O0(s,2),d=u[0],p=u[1],m=a[1],v=a[2],h=a[3]||{};if(!m){if(process.env.NODE_ENV==="development")throw new Error(`You need to pass hit or hits as the second argument like:
|
|
37
|
+
`.concat(n,`(eventType, hit);
|
|
38
|
+
`));return[]}if((d==="click"||d==="conversion")&&!v){if(process.env.NODE_ENV==="development")throw new Error(`You need to pass eventName as the third argument for 'click' or 'conversion' events like:
|
|
39
|
+
`.concat(n,`('click', hit, 'Product Purchased');
|
|
40
|
+
|
|
41
|
+
To learn more about event naming: https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/in-depth/clicks-conversions-best-practices/
|
|
42
|
+
`));return[]}var l=Array.isArray(m)?m:[m];if(l.length===0)return[];var c=l[0].__queryID,g=k0(l),y=g.map(function(b){return b.map(function(w){return w.objectID})}),f=g.map(function(b){return b.map(function(w){return w.__position})});if(d==="view")return o.status!=="idle"?[]:g.map(function(b,w){var _;return{insightsMethod:"viewedObjectIDs",widgetType:r,eventType:d,payload:ys({eventName:v||"Hits Viewed",index:((_=t.lastResults)===null||_===void 0?void 0:_.index)||t.state.index,objectIDs:y[w]},h),hits:b,eventModifier:p}});if(d==="click")return g.map(function(b,w){var _;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:r,eventType:d,payload:ys({eventName:v||"Hit Clicked",index:((_=t.lastResults)===null||_===void 0?void 0:_.index)||t.state.index,queryID:c,objectIDs:y[w],positions:f[w]},h),hits:b,eventModifier:p}});if(d==="conversion")return g.map(function(b,w){var _;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:r,eventType:d,payload:ys({eventName:v||"Hit Converted",index:((_=t.lastResults)===null||_===void 0?void 0:_.index)||t.state.index,queryID:c,objectIDs:y[w]},h),hits:b,eventModifier:p}});if(process.env.NODE_ENV==="development")throw new Error('eventType("'.concat(d,`") is not supported.
|
|
43
|
+
If you want to send a custom payload, you can pass one object: `).concat(n,`(customPayload);
|
|
44
|
+
`));return[]}function vs(e){var t=e.instantSearchInstance,r=e.helper,n=e.widgetType,a={},o=void 0,s=function(){for(var d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];var v=$c({widgetType:n,helper:r,methodName:"sendEvent",args:p,instantSearchInstance:t});v.forEach(function(h){h.eventType==="click"&&h.eventModifier==="internal"&&a[h.eventType]||(a[h.eventType]=!0,t.sendEventToInsights(h))}),clearTimeout(o),o=setTimeout(function(){a={}},0)};return s}function Dc(e){var t=e.helper,r=e.widgetType,n=e.instantSearchInstance,a=function(){for(var s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];var p=$c({widgetType:r,helper:t,methodName:"bindEvent",args:u,instantSearchInstance:n});return p.length?"data-insights-event=".concat(kc(p)):""};return a}function $t(e){return e.$$type==="ais.index"}function bs(e,t){var r=e[t.getIndexId()]||{};process.env.NODE_ENV==="development"&&yc({index:t,indexUiState:r}),t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:r})),t.getWidgets().filter($t).forEach(function(n){return bs(e,n)})}function Nc(e,t){var r=null;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return new Promise(function(s,u){r&&clearTimeout(r),r=setTimeout(function(){r=null,Promise.resolve(e.apply(void 0,a)).then(s).catch(u)},t)})}}var A0=Promise.resolve();function Wn(e){var t=null,r=!1,n=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];t===null&&(t=A0.then(function(){if(t=null,r){r=!1;return}e.apply(void 0,s)}))};return n.wait=function(){if(t===null)throw new Error("The deferred function should be called before calling `wait()`");return t},n.cancel=function(){t!==null&&(r=!0)},n}function zn(e){var t=e.name,r=e.connector,n=r===void 0?!1:r;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",n?"#connector":""].join("")}function Ge(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map(function(a){return zn(a)}).join(", ");return function(a){return[a,"See documentation: ".concat(n)].filter(Boolean).join(`
|
|
45
|
+
|
|
46
|
+
`)}}function j0(e){return typeof e=="string"?e.replace(/^\\-/,"-"):e}function Yn(e){return typeof e=="number"&&e<0||typeof e=="string"?String(e).replace(/^-/,"\\-"):e}function Pr(e,t){for(var r,n=0;n<e.length;n++)if(r=e[n],t(r,n,e))return r}function $0(e,t){if(!Array.isArray(e))return-1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}function Fc(e){if(e.appId&&e.apiKey)return[e.appId,e.apiKey];if(e.transporter){var t=e.transporter,r=t.headers||t.baseHeaders,n=t.queryParameters||t.baseQueryParameters,a="x-algolia-application-id",o="x-algolia-api-key",s=r[a]||n[a],u=r[o]||n[o];return[s,u]}else return[e.applicationID,e.apiKey]}function ws(e){var t=St.highlightPostTag,r=St.highlightPreTag,n=e.split(r),a=n.shift(),o=a?[{value:a,isHighlighted:!1}]:[];return n.forEach(function(s){var u=s.split(t);o.push({value:u[0],isHighlighted:!0}),u[1]!==""&&o.push({value:u[1],isHighlighted:!1})}),o}var D0=new RegExp(/\w/i);function N0(e,t){var r,n,a=e[t],o=((r=e[t+1])===null||r===void 0?void 0:r.isHighlighted)||!0,s=((n=e[t-1])===null||n===void 0?void 0:n.isHighlighted)||!0;return!D0.test(Sc(a.value))&&s===o?s:a.isHighlighted}function gn(e,t){var r=Array.isArray(t)?t:t.split(".");return r.reduce(function(n,a){return n&&n[a]},e)}function _s(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o={type:t,attribute:r,name:n,escapedValue:Yn(n)},s=Pr(a,function(l){return l.name===r}),u;if(t==="hierarchical"){for(var d=e.getHierarchicalFacetByName(r),p=n.split(d.separator),m=function(c){return function(g){return c[g]}},v=function(c){s=s&&s.data&&Pr(Object.keys(s.data).map(m(s.data)),function(g){return g.name===p[c]})},h=0;s!==void 0&&h<p.length;++h)v(h);u=s&&s.count}else u=s&&s.data&&s.data[o.name];return u!==void 0&&(o.count=u),s&&s.exhaustive!==void 0&&(o.exhaustive=s.exhaustive),o}function Ss(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=e||{},a=[],o=t.facetsRefinements,s=o===void 0?{}:o,u=t.facetsExcludes,d=u===void 0?{}:u,p=t.disjunctiveFacetsRefinements,m=p===void 0?{}:p,v=t.hierarchicalFacetsRefinements,h=v===void 0?{}:v,l=t.numericRefinements,c=l===void 0?{}:l,g=t.tagRefinements,y=g===void 0?[]:g;return Object.keys(s).forEach(function(f){var b=s[f];b.forEach(function(w){a.push(_s(t,"facet",f,w,n.facets))})}),Object.keys(d).forEach(function(f){var b=d[f];b.forEach(function(w){a.push({type:"exclude",attribute:f,name:w,exclude:!0})})}),Object.keys(m).forEach(function(f){var b=m[f];b.forEach(function(w){a.push(_s(t,"disjunctive",f,j0(w),n.disjunctiveFacets))})}),Object.keys(h).forEach(function(f){var b=h[f];b.forEach(function(w){a.push(_s(t,"hierarchical",f,w,n.hierarchicalFacets))})}),Object.keys(c).forEach(function(f){var b=c[f];Object.keys(b).forEach(function(w){var _=w,S=b[_],R=Array.isArray(S)?S:[S];R.forEach(function(O){a.push({type:"numeric",attribute:f,name:"".concat(O),numericValue:O,operator:_})})})}),y.forEach(function(f){a.push({type:"tag",attribute:"_tags",name:f})}),r&&t.query&&t.query.trim()&&a.push({attribute:"query",type:"query",name:t.query,query:t.query}),a}function F0(e,t){var r,n=(r=e.getWidgetRenderState)===null||r===void 0?void 0:r.call(e,t),a=null;if(n&&n.widgetParams){var o=n.widgetParams;o.attribute?a=o.attribute:Array.isArray(o.attributes)&&(a=o.attributes[0])}if(typeof a!="string")throw new Error(`Could not find the attribute of the widget:
|
|
47
|
+
|
|
48
|
+
`.concat(JSON.stringify(e),`
|
|
49
|
+
|
|
50
|
+
Please check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly.`));return a}function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function Ic(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ic(Object(r),!0).forEach(function(n){I0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ic(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I0(e,t,r){return t=M0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M0(e){var t=L0(e,"string");return Qn(t)=="symbol"?t:String(t)}function L0(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rs(e,t,r){return e.map(function(n,a){return Mc(Mc({},n),{},{__position:r*t+a+1})})}function Kn(e){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(e)}function Lc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lc(Object(r),!0).forEach(function(n){B0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B0(e,t,r){return t=H0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H0(e){var t=V0(e,"string");return Kn(t)=="symbol"?t:String(t)}function V0(e,t){if(Kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ps(e,t){return t?e.map(function(r){return Bc(Bc({},r),{},{__queryID:t})}):e}function Gn(e){"@babel/helpers - typeof";return Gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gn(e)}function Hc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hc(Object(r),!0).forEach(function(n){q0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q0(e,t,r){return t=U0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U0(e){var t=W0(e,"string");return Gn(t)=="symbol"?t:String(t)}function W0(e,t){if(Gn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z0(e,t){var r=Object.keys(t).reduce(function(n,a){var o=t[a];return o.recommendResults?Vc(Vc({},n),o.recommendResults.results):n},{});e._recommendCache=r}function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function Y0(e,t){return J0(e)||G0(e,t)||K0(e,t)||Q0()}function Q0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
51
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K0(e,t){if(e){if(typeof e=="string")return qc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qc(e,t)}}function qc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function J0(e){if(Array.isArray(e))return e}function Uc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(r),!0).forEach(function(n){Wc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wc(e,t,r){return t=X0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X0(e){var t=Z0(e,"string");return Jn(t)=="symbol"?t:String(t)}function Z0(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eb(e,t){if(t&&!((!("transporter"in e)||e._cacheHydrated)&&(!e._useCache||typeof e.addAlgoliaAgent!="function"))){var r=[Object.keys(t).reduce(function(s,u){var d=t[u],p=d.state,m=d.requestParams,v=d.results,h=v&&p?v.map(function(l,c){return Xn({indexName:p.index||l.index},m!=null&&m[c]||l.params?{params:Os(m?.[c]||tb(l.params))}:{})}):[];return s.concat(h)},[])],n=Object.keys(t).reduce(function(s,u){var d=t[u].results;return d?s.concat(d):s},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var a=e.search.bind(e);e.search=function(s){for(var u=arguments.length,d=new Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];var m=Array.isArray(s)?s.map(function(v){return Xn(Xn({},v),{},{params:Os(v.params)})}):Os(s.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[m].concat(d)},function(){return a.apply(void 0,[s].concat(d))})},e.transporter.responsesCache.set({method:"search",args:r},{results:n})}if(!("transporter"in e)){var o="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:r}));e.cache=Xn(Xn({},e.cache),{},Wc({},o,JSON.stringify({results:Object.keys(t).map(function(s){return t[s].results})})))}}}function tb(e){return e.split("&").reduce(function(t,r){var n=r.split("="),a=Y0(n,2),o=a[0],s=a[1];return t[o]=s?decodeURIComponent(s):"",t},{})}function Os(e){var t=function(a){return Object.prototype.toString.call(a)==="[object Object]"||Object.prototype.toString.call(a)==="[object Array]"},r=function(a){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];var d=0;return a.replace(/%s/g,function(){return encodeURIComponent(s[d++])})};return Object.keys(e).map(function(n){return r("%s=%s",n,t(e[n])?JSON.stringify(e[n]):e[n])}).join("&")}function zc(e){return e!==Object(e)}function Gr(e,t){if(e===t)return!0;if(zc(e)||zc(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var a=n[r];if(!(a in t)||!Gr(e[a],t[a]))return!1}return!0}function Qe(e){return typeof e=="number"&&isFinite(e)}function Yc(e,t){t(e),e.getWidgets().forEach(function(r){$t(r)&&Yc(r,t)})}function Es(e){return e.filter(function(t,r,n){return n.indexOf(t)===r})}function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}var rb=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function Qc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qc(Object(r),!0).forEach(function(n){nb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nb(e,t,r){return t=ab(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ab(e){var t=ib(e,"string");return Zn(t)=="symbol"?t:String(t)}function ib(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ob(e,t){if(e==null)return{};var r=sb(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sb(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var lb=function(t,r){r.facets,r.disjunctiveFacets,r.facetsRefinements,r.facetsExcludes,r.disjunctiveFacetsRefinements,r.numericRefinements,r.tagRefinements,r.hierarchicalFacets,r.hierarchicalFacetsRefinements,r.ruleContexts;var n=ob(r,rb);return t.setQueryParameters(n)},ub=function(t,r){return r.facets.reduce(function(n,a){return n.addFacet(a)},t)},cb=function(t,r){return r.disjunctiveFacets.reduce(function(n,a){return n.addDisjunctiveFacet(a)},t)},db=function(t,r){return t.setQueryParameters({hierarchicalFacets:r.hierarchicalFacets.reduce(function(n,a){var o=$0(n,function(u){return u.name===a.name});if(o===-1)return n.concat(a);var s=n.slice();return s.splice(o,1,a),s},t.hierarchicalFacets)})},fb=function(t,r){return r.tagRefinements.reduce(function(n,a){return n.addTagRefinement(a)},t)},hb=function(t,r){return t.setQueryParameters({facetsRefinements:lr(lr({},t.facetsRefinements),r.facetsRefinements)})},pb=function(t,r){return t.setQueryParameters({facetsExcludes:lr(lr({},t.facetsExcludes),r.facetsExcludes)})},mb=function(t,r){return t.setQueryParameters({disjunctiveFacetsRefinements:lr(lr({},t.disjunctiveFacetsRefinements),r.disjunctiveFacetsRefinements)})},gb=function(t,r){return t.setQueryParameters({numericRefinements:lr(lr({},t.numericRefinements),r.numericRefinements)})},yb=function(t,r){return t.setQueryParameters({hierarchicalFacetsRefinements:lr(lr({},t.hierarchicalFacetsRefinements),r.hierarchicalFacetsRefinements)})},vb=function(t,r){var n=Es([].concat(t.ruleContexts).concat(r.ruleContexts).filter(Boolean));return n.length>0?t.setQueryParameters({ruleContexts:n}):t},ea=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.reduce(function(a,o){var s=yb(a,o),u=db(s,o),d=fb(u,o),p=gb(d,o),m=mb(p,o),v=pb(m,o),h=hb(v,o),l=cb(h,o),c=vb(l,o),g=ub(c,o);return lb(g,o)})};function bb(e){return Rb(e)||Sb(e)||_b(e)||wb()}function wb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
52
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _b(e,t){if(e){if(typeof e=="string")return Cs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cs(e,t)}}function Sb(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rb(e){if(Array.isArray(e))return Cs(e)}function Cs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kc(e){var t=e.start,r=t===void 0?0:t,n=e.end,a=e.step,o=a===void 0?1:a,s=o===0?1:o,u=Math.round((n-r)/s);return bb(Array(u)).map(function(d,p){return r+p*s})}function ta(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function Gc(e,t,r){var n=t.getResultsForWidget(r),a=t.getHelper();return{helper:a,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:a.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function Pb(e){for(var t=e.getParent(),r=[e.getHelper().state];t!==null;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}function ra(e){"@babel/helpers - typeof";return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(e)}function Jc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ri(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jc(Object(r),!0).forEach(function(n){Ob(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ob(e,t,r){return t=Eb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eb(e){var t=Cb(e,"string");return ra(t)=="symbol"?t:String(t)}function Cb(e,t){if(ra(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ra(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xc(e){return e.some(function(t){return t.isHighlighted})?e.map(function(t,r){return Ri(Ri({},t),{},{isHighlighted:!N0(e,r)})}):e.map(function(t){return Ri(Ri({},t),{},{isHighlighted:!1})})}function ur(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{fallback:function(){}},r=t.fallback;return typeof window>"u"?r():e({window})}function xs(e){return Array.isArray(e)?e:[e]}function na(e){"@babel/helpers - typeof";return na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}function Zc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zc(Object(r),!0).forEach(function(n){xb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xb(e,t,r){return t=Tb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tb(e){var t=kb(e,"string");return na(t)=="symbol"?t:String(t)}function kb(e,t){if(na(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(na(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ab(e){return typeof e.findAnswers=="function"}var Pi=Ge({name:"answers",connector:!0}),jb=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,Pi()),function(n){var a=n||{},o=a.queryLanguages,s=a.attributesForPrediction,u=a.nbHits,d=u===void 0?1:u,p=a.renderDebounceTime,m=p===void 0?100:p,v=a.searchDebounceTime,h=v===void 0?100:v,l=a.escapeHTML,c=l===void 0?!0:l,g=a.extraParameters,y=g===void 0?{}:g;if(!o||o.length===0)throw new Error(Pi("The `queryLanguages` expects an array of strings."));var f=d0(),b=[],w=!1,_=Nc(t,m),S;return{$$type:"ais.answers",init:function(O){var P=O.state,C=O.instantSearchInstance;if(typeof C.client.initIndex!="function")throw new Error(Pi("`algoliasearch` <5 required."));var k=C.client.initIndex(P.index);if(!Ab(k))throw new Error(Pi("`algoliasearch` >= 4.8.0 required."));S=Nc(k.findAnswers,h),t(Ht(Ht({},this.getWidgetRenderState(O)),{},{instantSearchInstance:O.instantSearchInstance}),!0)},render:function(O){var P=this,C=O.state.query;if(!C){b=[],w=!1,t(Ht(Ht({},this.getWidgetRenderState(O)),{},{instantSearchInstance:O.instantSearchInstance}),!1);return}b=[],w=!0,t(Ht(Ht({},this.getWidgetRenderState(O)),{},{instantSearchInstance:O.instantSearchInstance}),!1),f(S(C,o,Ht(Ht({},y),{},{nbHits:d,attributesForPrediction:s}))).then(function(k){if(k){c&&k.hits.length>0&&(k.hits=Si(k.hits));var A=Rs(k.hits,0,d),H=Ps(A,k.queryID);b=H,w=!1,_(Ht(Ht({},P.getWidgetRenderState(O)),{},{instantSearchInstance:O.instantSearchInstance}),!1)}})},getRenderState:function(O,P){return Ht(Ht({},O),{},{answers:this.getWidgetRenderState(P)})},getWidgetRenderState:function(){return{hits:b,isLoading:w,widgetParams:n}},dispose:function(O){var P=O.state;return r(),P},getWidgetSearchParameters:function(O){return O}}}},$b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ed(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var Ts,td;function ks(){if(td)return Ts;td=1;function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Ts=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(o){if(!r(o)||o<0||isNaN(o))throw TypeError("n must be a positive number");return this._maxListeners=o,this},e.prototype.emit=function(o){var s,u,d,p,m,v;if(this._events||(this._events={}),o==="error"&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(s=arguments[1],s instanceof Error)throw s;var h=new Error('Uncaught, unspecified "error" event. ('+s+")");throw h.context=s,h}if(u=this._events[o],a(u))return!1;if(t(u))switch(arguments.length){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:p=Array.prototype.slice.call(arguments,1),u.apply(this,p)}else if(n(u))for(p=Array.prototype.slice.call(arguments,1),v=u.slice(),d=v.length,m=0;m<d;m++)v[m].apply(this,p);return!0},e.prototype.addListener=function(o,s){var u;if(!t(s))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",o,t(s.listener)?s.listener:s),this._events[o]?n(this._events[o])?this._events[o].push(s):this._events[o]=[this._events[o],s]:this._events[o]=s,n(this._events[o])&&!this._events[o].warned&&(a(this._maxListeners)?u=e.defaultMaxListeners:u=this._maxListeners,u&&u>0&&this._events[o].length>u&&(this._events[o].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[o].length),typeof console.trace=="function"&&console.trace())),this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(o,s){if(!t(s))throw TypeError("listener must be a function");var u=!1;function d(){this.removeListener(o,d),u||(u=!0,s.apply(this,arguments))}return d.listener=s,this.on(o,d),this},e.prototype.removeListener=function(o,s){var u,d,p,m;if(!t(s))throw TypeError("listener must be a function");if(!this._events||!this._events[o])return this;if(u=this._events[o],p=u.length,d=-1,u===s||t(u.listener)&&u.listener===s)delete this._events[o],this._events.removeListener&&this.emit("removeListener",o,s);else if(n(u)){for(m=p;m-- >0;)if(u[m]===s||u[m].listener&&u[m].listener===s){d=m;break}if(d<0)return this;u.length===1?(u.length=0,delete this._events[o]):u.splice(d,1),this._events.removeListener&&this.emit("removeListener",o,s)}return this},e.prototype.removeAllListeners=function(o){var s,u;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[o]&&delete this._events[o],this;if(arguments.length===0){for(s in this._events)s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events={},this}if(u=this._events[o],t(u))this.removeListener(o,u);else if(u)for(;u.length;)this.removeListener(o,u[u.length-1]);return delete this._events[o],this},e.prototype.listeners=function(o){var s;return!this._events||!this._events[o]?s=[]:t(this._events[o])?s=[this._events[o]]:s=this._events[o].slice(),s},e.prototype.listenerCount=function(o){if(this._events){var s=this._events[o];if(t(s))return 1;if(s)return s.length}return 0},e.listenerCount=function(o,s){return o.listenerCount(s)};function t(o){return typeof o=="function"}function r(o){return typeof o=="number"}function n(o){return typeof o=="object"&&o!==null}function a(o){return o===void 0}return Ts}var As,rd;function nd(){if(rd)return As;rd=1;function e(t,r){t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}return As=e,As}var js,ad;function Db(){if(ad)return js;ad=1;var e=ks(),t=nd();function r(n,a,o){this.main=n,this.fn=a,this.recommendFn=o,this.lastResults=null,this.lastRecommendResults=null}return t(r,e),r.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},r.prototype.getModifiedState=function(n){return this.fn(n)},r.prototype.getModifiedRecommendState=function(n){return this.recommendFn(n)},js=r,js}var $s,id;function Ds(){if(id)return $s;id=1;function e(r){return typeof r!="string"?r:String(r).replace(/^-/,"\\-")}function t(r){return typeof r!="string"?r:r.replace(/^\\-/,"-")}return $s={escapeFacetValue:e,unescapeFacetValue:t},$s}var Ns,od;function Fs(){if(od)return Ns;od=1;function e(a){return typeof a=="object"&&a!==null?r(Array.isArray(a)?[]:{},a):a}function t(a){return typeof a=="function"||Array.isArray(a)||Object.prototype.toString.call(a)==="[object Object]"}function r(a,o){if(a===o)return a;for(var s in o)if(!(!Object.prototype.hasOwnProperty.call(o,s)||s==="__proto__"||s==="constructor")){var u=o[s],d=a[s];typeof d<"u"&&typeof u>"u"||(t(d)&&t(u)?a[s]=r(d,u):a[s]=e(u))}return a}function n(a){t(a)||(a={});for(var o=1,s=arguments.length;o<s;o++){var u=arguments[o];t(u)&&r(a,u)}return a}return Ns=n,Ns}var Is,sd;function Ms(){if(sd)return Is;sd=1;function e(t){return t&&Object.keys(t).length>0}return Is=e,Is}var Ls,ld;function Bs(){if(ld)return Ls;ld=1;function e(t,r){if(t===null)return{};var n={},a=Object.keys(t),o,s;for(s=0;s<a.length;s++)o=a[s],!(r.indexOf(o)>=0)&&(n[o]=t[o]);return n}return Ls=e,Ls}var Hs,ud;function cd(){if(ud)return Hs;ud=1;function e(t){t=t||{},this.params=t.params||[]}return e.prototype={constructor:e,addParams:function(t){var r=this.params.slice();return r.push(t),new e({params:r})},removeParams:function(t){return new e({params:this.params.filter(function(r){return r.$$id!==t})})},addFrequentlyBoughtTogether:function(t){return this.addParams(Object.assign({},t,{model:"bought-together"}))},addRelatedProducts:function(t){return this.addParams(Object.assign({},t,{model:"related-products"}))},addTrendingItems:function(t){return this.addParams(Object.assign({},t,{model:"trending-items"}))},addTrendingFacets:function(t){return this.addParams(Object.assign({},t,{model:"trending-facets"}))},addLookingSimilar:function(t){return this.addParams(Object.assign({},t,{model:"looking-similar"}))},_buildQueries:function(t,r){return this.params.filter(function(n){return r[n.$$id]===void 0}).map(function(n){var a=Object.assign({},n,{indexName:t,threshold:n.threshold||0});return delete a.$$id,a})}},Hs=e,Hs}var Vs,dd;function fd(){if(dd)return Vs;dd=1;function e(t,r){this._state=t,this._rawResults={};var n=this;t.params.forEach(function(a){var o=a.$$id;n[o]=r[o],n._rawResults[o]=r[o]})}return e.prototype={constructor:e},Vs=e,Vs}var qs,hd;function Nb(){if(hd)return qs;hd=1;var e=Fs();function t(n){return Object.keys(n).sort().reduce(function(a,o){return a[o]=n[o],a},{})}var r={_getQueries:function(a,o){var s=[];return s.push({indexName:a,params:r._getHitsSearchParams(o)}),o.getRefinedDisjunctiveFacets().forEach(function(u){s.push({indexName:a,params:r._getDisjunctiveFacetSearchParams(o,u)})}),o.getRefinedHierarchicalFacets().forEach(function(u){var d=o.getHierarchicalFacetByName(u),p=o.getHierarchicalRefinement(u),m=o._getHierarchicalFacetSeparator(d);if(p.length>0&&p[0].split(m).length>1){var v=p[0].split(m).slice(0,-1).reduce(function(l,c,g){return l.concat({attribute:d.attributes[g],value:g===0?c:[l[l.length-1].value,c].join(m)})},[]);v.forEach(function(h,l){var c=r._getDisjunctiveFacetSearchParams(o,h.attribute,l===0);function g(b){return d.attributes.some(function(w){return w===b.split(":")[0]})}var y=(c.facetFilters||[]).reduce(function(b,w){if(Array.isArray(w)){var _=w.filter(function(S){return!g(S)});_.length>0&&b.push(_)}return typeof w=="string"&&!g(w)&&b.push(w),b},[]),f=v[l-1];l>0?c.facetFilters=y.concat(f.attribute+":"+f.value):y.length>0?c.facetFilters=y:delete c.facetFilters,s.push({indexName:a,params:c})})}}),s},_getCompositionQueries:function(a){return[{compositionID:a.index,requestBody:{params:r._getCompositionHitsSearchParams(a)}}]},_getHitsSearchParams:function(n){var a=n.facets.concat(n.disjunctiveFacets).concat(r._getHitsHierarchicalFacetsAttributes(n)).sort(),o=r._getFacetFilters(n),s=r._getNumericFilters(n),u=r._getTagFilters(n),d={};return a.length>0&&(d.facets=a.indexOf("*")>-1?["*"]:a),u.length>0&&(d.tagFilters=u),o.length>0&&(d.facetFilters=o),s.length>0&&(d.numericFilters=s),t(e({},n.getQueryParams(),d))},_getCompositionHitsSearchParams:function(n){var a=n.facets.concat(n.disjunctiveFacets.map(function(m){return n.disjunctiveFacetsRefinements&&n.disjunctiveFacetsRefinements[m]&&n.disjunctiveFacetsRefinements[m].length>0?"disjunctive("+m+")":m})).concat(r._getHitsHierarchicalFacetsAttributes(n)).sort(),o=r._getFacetFilters(n),s=r._getNumericFilters(n),u=r._getTagFilters(n),d={};a.length>0&&(d.facets=a.indexOf("*")>-1?["*"]:a),u.length>0&&(d.tagFilters=u),o.length>0&&(d.facetFilters=o),s.length>0&&(d.numericFilters=s);var p=n.getQueryParams();return delete p.highlightPreTag,delete p.highlightPostTag,delete p.index,t(e({},p,d))},_getDisjunctiveFacetSearchParams:function(n,a,o){var s=r._getFacetFilters(n,a,o),u=r._getNumericFilters(n,a),d=r._getTagFilters(n),p={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};d.length>0&&(p.tagFilters=d);var m=n.getHierarchicalFacetByName(a);return m?p.facets=r._getDisjunctiveHierarchicalFacetAttribute(n,m,o):p.facets=a,u.length>0&&(p.numericFilters=u),s.length>0&&(p.facetFilters=s),t(e({},n.getQueryParams(),p))},_getNumericFilters:function(n,a){if(n.numericFilters)return n.numericFilters;var o=[];return Object.keys(n.numericRefinements).forEach(function(s){var u=n.numericRefinements[s]||{};Object.keys(u).forEach(function(d){var p=u[d]||[];a!==s&&p.forEach(function(m){if(Array.isArray(m)){var v=m.map(function(h){return s+d+h});o.push(v)}else o.push(s+d+m)})})}),o},_getTagFilters:function(n){return n.tagFilters?n.tagFilters:n.tagRefinements.join(",")},_getFacetFilters:function(n,a,o){var s=[],u=n.facetsRefinements||{};Object.keys(u).sort().forEach(function(v){var h=u[v]||[];h.slice().sort().forEach(function(l){s.push(v+":"+l)})});var d=n.facetsExcludes||{};Object.keys(d).sort().forEach(function(v){var h=d[v]||[];h.sort().forEach(function(l){s.push(v+":-"+l)})});var p=n.disjunctiveFacetsRefinements||{};Object.keys(p).sort().forEach(function(v){var h=p[v]||[];if(!(v===a||!h||h.length===0)){var l=[];h.slice().sort().forEach(function(c){l.push(v+":"+c)}),s.push(l)}});var m=n.hierarchicalFacetsRefinements||{};return Object.keys(m).sort().forEach(function(v){var h=m[v]||[],l=h[0];if(l!==void 0){var c=n.getHierarchicalFacetByName(v),g=n._getHierarchicalFacetSeparator(c),y=n._getHierarchicalRootPath(c),f,b;if(a===v){if(l.indexOf(g)===-1||!y&&o===!0||y&&y.split(g).length===l.split(g).length)return;y?(b=y.split(g).length-1,l=y):(b=l.split(g).length-2,l=l.slice(0,l.lastIndexOf(g))),f=c.attributes[b]}else b=l.split(g).length-1,f=c.attributes[b];f&&s.push([f+":"+l])}}),s},_getHitsHierarchicalFacetsAttributes:function(n){var a=[];return n.hierarchicalFacets.reduce(function(s,u){var d=n.getHierarchicalRefinement(u.name)[0];if(!d)return s.push(u.attributes[0]),s;var p=n._getHierarchicalFacetSeparator(u),m=d.split(p).length,v=u.attributes.slice(0,m+1);return s.concat(v)},a)},_getDisjunctiveHierarchicalFacetAttribute:function(n,a,o){var s=n._getHierarchicalFacetSeparator(a);if(o===!0){var u=n._getHierarchicalRootPath(a),d=0;return u&&(d=u.split(s).length),[a.attributes[d]]}var p=n.getHierarchicalRefinement(a.name)[0]||"",m=p.split(s).length-1;return a.attributes.slice(0,m+1)},getSearchForFacetQuery:function(n,a,o,s){var u=s.isDisjunctiveFacet(n)?s.clearRefinements(n):s,d={facetQuery:a,facetName:n};return typeof o=="number"&&(d.maxFacetHits=o),t(e({},r._getHitsSearchParams(u),d))}};return qs=r,qs}var Us,pd;function Ws(){return pd||(pd=1,Us=function(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(r,n){return Object.keys(Object(n)).forEach(function(a){n[a]!==void 0&&(r[a]!==void 0&&delete r[a],r[a]=n[a])}),r},{})}),Us}var zs,md;function ia(){return md||(md=1,zs=function(t,r){if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(r(t[n]))return t[n]}}),zs}var Ys,gd;function Fb(){if(gd)return Ys;gd=1;function e(t,r){return t.filter(function(n,a){return r.indexOf(n)>-1&&t.indexOf(n)===a})}return Ys=e,Ys}var Qs,yd;function Ib(){if(yd)return Qs;yd=1;function e(t){if(typeof t=="number")return t;if(typeof t=="string")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.")}return Qs=e,Qs}var Ks,vd;function Mb(){return vd||(vd=1,Ks=function(t){return t===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(t)}),Ks}var Gs,bd;function Lb(){if(bd)return Gs;bd=1;var e=Ws(),t=Ms(),r=Bs(),n={addRefinement:function(o,s,u){if(n.isRefined(o,s,u))return o;var d=""+u,p=o[s]?o[s].concat(d):[d],m={};return m[s]=p,e(m,o)},removeRefinement:function(o,s,u){if(u===void 0)return n.clearRefinement(o,function(p,m){return s===m});var d=""+u;return n.clearRefinement(o,function(p,m){return s===m&&d===p})},toggleRefinement:function(o,s,u){if(u===void 0)throw new Error("toggleRefinement should be used with a value");return n.isRefined(o,s,u)?n.removeRefinement(o,s,u):n.addRefinement(o,s,u)},clearRefinement:function(o,s,u){if(s===void 0)return t(o)?{}:o;if(typeof s=="string")return r(o,[s]);if(typeof s=="function"){var d=!1,p=Object.keys(o).reduce(function(m,v){var h=o[v]||[],l=h.filter(function(c){return!s(c,v,u)});return l.length!==h.length&&(d=!0),m[v]=l,m},{});return d?p:o}},isRefined:function(o,s,u){var d=!!o[s]&&o[s].length>0;if(u===void 0||!d)return d;var p=""+u;return o[s].indexOf(p)!==-1}};return Gs=n,Gs}var Js,wd;function _d(){if(wd)return Js;wd=1;var e=Ws(),t=ia(),r=Fb(),n=Fs(),a=Ms(),o=Bs(),s=Ib(),u=Mb(),d=Lb();function p(h,l){return Array.isArray(h)&&Array.isArray(l)?h.length===l.length&&h.every(function(c,g){return p(l[g],c)}):h===l}function m(h,l){return t(h,function(c){return p(c,l)})}function v(h){var l=h?v._parseNumbers(h):{};l.userToken!==void 0&&!u(l.userToken)&&console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=l.facets||[],this.disjunctiveFacets=l.disjunctiveFacets||[],this.hierarchicalFacets=l.hierarchicalFacets||[],this.facetsRefinements=l.facetsRefinements||{},this.facetsExcludes=l.facetsExcludes||{},this.disjunctiveFacetsRefinements=l.disjunctiveFacetsRefinements||{},this.numericRefinements=l.numericRefinements||{},this.tagRefinements=l.tagRefinements||[],this.hierarchicalFacetsRefinements=l.hierarchicalFacetsRefinements||{};var c=this;Object.keys(l).forEach(function(g){var y=v.PARAMETERS.indexOf(g)!==-1,f=l[g]!==void 0;!y&&f&&(c[g]=l[g])})}return v.PARAMETERS=Object.keys(new v),v._parseNumbers=function(h){if(h instanceof v)return h;var l={},c=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(c.forEach(function(y){var f=h[y];if(typeof f=="string"){var b=parseFloat(f);l[y]=isNaN(b)?f:b}}),Array.isArray(h.insideBoundingBox)&&(l.insideBoundingBox=h.insideBoundingBox.map(function(y){return Array.isArray(y)?y.map(function(f){return parseFloat(f)}):y})),h.numericRefinements){var g={};Object.keys(h.numericRefinements).forEach(function(y){var f=h.numericRefinements[y]||{};g[y]={},Object.keys(f).forEach(function(b){var w=f[b],_=w.map(function(S){return Array.isArray(S)?S.map(function(R){return typeof R=="string"?parseFloat(R):R}):typeof S=="string"?parseFloat(S):S});g[y][b]=_})}),l.numericRefinements=g}return n(h,l)},v.make=function(l){var c=new v(l),g=l.hierarchicalFacets||[];return g.forEach(function(y){if(y.rootPath){var f=c.getHierarchicalRefinement(y.name);f.length>0&&f[0].indexOf(y.rootPath)!==0&&(c=c.clearRefinements(y.name)),f=c.getHierarchicalRefinement(y.name),f.length===0&&(c=c.toggleHierarchicalFacetRefinement(y.name,y.rootPath))}}),c},v.validate=function(h,l){var c=l||{};return h.tagFilters&&c.tagRefinements&&c.tagRefinements.length>0?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."):h.tagRefinements.length>0&&c.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."):h.numericFilters&&c.numericRefinements&&a(c.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."):a(h.numericRefinements)&&c.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},v.prototype={constructor:v,clearRefinements:function(l){var c={numericRefinements:this._clearNumericRefinements(l),facetsRefinements:d.clearRefinement(this.facetsRefinements,l,"conjunctiveFacet"),facetsExcludes:d.clearRefinement(this.facetsExcludes,l,"exclude"),disjunctiveFacetsRefinements:d.clearRefinement(this.disjunctiveFacetsRefinements,l,"disjunctiveFacet"),hierarchicalFacetsRefinements:d.clearRefinement(this.hierarchicalFacetsRefinements,l,"hierarchicalFacet")};return c.numericRefinements===this.numericRefinements&&c.facetsRefinements===this.facetsRefinements&&c.facetsExcludes===this.facetsExcludes&&c.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&c.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(c)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(l){return l===this.index?this:this.setQueryParameters({index:l})},setQuery:function(l){return l===this.query?this:this.setQueryParameters({query:l})},setPage:function(l){return l===this.page?this:this.setQueryParameters({page:l})},setFacets:function(l){return this.setQueryParameters({facets:l})},setDisjunctiveFacets:function(l){return this.setQueryParameters({disjunctiveFacets:l})},setHitsPerPage:function(l){return this.hitsPerPage===l?this:this.setQueryParameters({hitsPerPage:l})},setTypoTolerance:function(l){return this.typoTolerance===l?this:this.setQueryParameters({typoTolerance:l})},addNumericRefinement:function(h,l,c){var g=s(c);if(this.isNumericRefined(h,l,g))return this;var y=n({},this.numericRefinements);return y[h]=n({},y[h]),y[h][l]?(y[h][l]=y[h][l].slice(),y[h][l].push(g)):y[h][l]=[g],this.setQueryParameters({numericRefinements:y})},getConjunctiveRefinements:function(h){return this.isConjunctiveFacet(h)?this.facetsRefinements[h]||[]:[]},getDisjunctiveRefinements:function(h){return this.isDisjunctiveFacet(h)?this.disjunctiveFacetsRefinements[h]||[]:[]},getHierarchicalRefinement:function(h){return this.hierarchicalFacetsRefinements[h]||[]},getExcludeRefinements:function(h){return this.isConjunctiveFacet(h)?this.facetsExcludes[h]||[]:[]},removeNumericRefinement:function(h,l,c){var g=c;return g!==void 0?this.isNumericRefined(h,l,g)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(y,f){return f===h&&y.op===l&&p(y.val,s(g))})}):this:l!==void 0?this.isNumericRefined(h,l)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(y,f){return f===h&&y.op===l})}):this:this.isNumericRefined(h)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(y,f){return f===h})}):this},getNumericRefinements:function(h){return this.numericRefinements[h]||{}},getNumericRefinement:function(h,l){return this.numericRefinements[h]&&this.numericRefinements[h][l]},_clearNumericRefinements:function(l){if(l===void 0)return a(this.numericRefinements)?{}:this.numericRefinements;if(typeof l=="string")return o(this.numericRefinements,[l]);if(typeof l=="function"){var c=!1,g=this.numericRefinements,y=Object.keys(g).reduce(function(f,b){var w=g[b],_={};return w=w||{},Object.keys(w).forEach(function(S){var R=w[S]||[],O=[];R.forEach(function(P){var C=l({val:P,op:S},b,"numeric");C||O.push(P)}),O.length!==R.length&&(c=!0),_[S]=O}),f[b]=_,f},{});return c?y:this.numericRefinements}},addFacet:function(l){return this.isConjunctiveFacet(l)?this:this.setQueryParameters({facets:this.facets.concat([l])})},addDisjunctiveFacet:function(l){return this.isDisjunctiveFacet(l)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([l])})},addHierarchicalFacet:function(l){if(this.isHierarchicalFacet(l.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+l.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([l])})},addFacetRefinement:function(l,c){if(!this.isConjunctiveFacet(l))throw new Error(l+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsRefinements,l,c)?this:this.setQueryParameters({facetsRefinements:d.addRefinement(this.facetsRefinements,l,c)})},addExcludeRefinement:function(l,c){if(!this.isConjunctiveFacet(l))throw new Error(l+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,l,c)?this:this.setQueryParameters({facetsExcludes:d.addRefinement(this.facetsExcludes,l,c)})},addDisjunctiveFacetRefinement:function(l,c){if(!this.isDisjunctiveFacet(l))throw new Error(l+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,l,c)?this:this.setQueryParameters({disjunctiveFacetsRefinements:d.addRefinement(this.disjunctiveFacetsRefinements,l,c)})},addTagRefinement:function(l){if(this.isTagRefined(l))return this;var c={tagRefinements:this.tagRefinements.concat(l)};return this.setQueryParameters(c)},removeFacet:function(l){return this.isConjunctiveFacet(l)?this.clearRefinements(l).setQueryParameters({facets:this.facets.filter(function(c){return c!==l})}):this},removeDisjunctiveFacet:function(l){return this.isDisjunctiveFacet(l)?this.clearRefinements(l).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(c){return c!==l})}):this},removeHierarchicalFacet:function(l){return this.isHierarchicalFacet(l)?this.clearRefinements(l).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(c){return c.name!==l})}):this},removeFacetRefinement:function(l,c){if(!this.isConjunctiveFacet(l))throw new Error(l+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsRefinements,l,c)?this.setQueryParameters({facetsRefinements:d.removeRefinement(this.facetsRefinements,l,c)}):this},removeExcludeRefinement:function(l,c){if(!this.isConjunctiveFacet(l))throw new Error(l+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,l,c)?this.setQueryParameters({facetsExcludes:d.removeRefinement(this.facetsExcludes,l,c)}):this},removeDisjunctiveFacetRefinement:function(l,c){if(!this.isDisjunctiveFacet(l))throw new Error(l+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,l,c)?this.setQueryParameters({disjunctiveFacetsRefinements:d.removeRefinement(this.disjunctiveFacetsRefinements,l,c)}):this},removeTagRefinement:function(l){if(!this.isTagRefined(l))return this;var c={tagRefinements:this.tagRefinements.filter(function(g){return g!==l})};return this.setQueryParameters(c)},toggleRefinement:function(l,c){return this.toggleFacetRefinement(l,c)},toggleFacetRefinement:function(l,c){if(this.isHierarchicalFacet(l))return this.toggleHierarchicalFacetRefinement(l,c);if(this.isConjunctiveFacet(l))return this.toggleConjunctiveFacetRefinement(l,c);if(this.isDisjunctiveFacet(l))return this.toggleDisjunctiveFacetRefinement(l,c);throw new Error("Cannot refine the undeclared facet "+l+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(l,c){if(!this.isConjunctiveFacet(l))throw new Error(l+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:d.toggleRefinement(this.facetsRefinements,l,c)})},toggleExcludeFacetRefinement:function(l,c){if(!this.isConjunctiveFacet(l))throw new Error(l+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:d.toggleRefinement(this.facetsExcludes,l,c)})},toggleDisjunctiveFacetRefinement:function(l,c){if(!this.isDisjunctiveFacet(l))throw new Error(l+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:d.toggleRefinement(this.disjunctiveFacetsRefinements,l,c)})},toggleHierarchicalFacetRefinement:function(l,c){if(!this.isHierarchicalFacet(l))throw new Error(l+" is not defined in the hierarchicalFacets attribute of the helper configuration");var g=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(l)),y={},f=this.hierarchicalFacetsRefinements[l]!==void 0&&this.hierarchicalFacetsRefinements[l].length>0&&(this.hierarchicalFacetsRefinements[l][0]===c||this.hierarchicalFacetsRefinements[l][0].indexOf(c+g)===0);return f?c.indexOf(g)===-1?y[l]=[]:y[l]=[c.slice(0,c.lastIndexOf(g))]:y[l]=[c],this.setQueryParameters({hierarchicalFacetsRefinements:e(y,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(h,l){if(this.isHierarchicalFacetRefined(h))throw new Error(h+" is already refined.");if(!this.isHierarchicalFacet(h))throw new Error(h+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var c={};return c[h]=[l],this.setQueryParameters({hierarchicalFacetsRefinements:e(c,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(h){if(!this.isHierarchicalFacetRefined(h))return this;var l={};return l[h]=[],this.setQueryParameters({hierarchicalFacetsRefinements:e(l,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(l){return this.isTagRefined(l)?this.removeTagRefinement(l):this.addTagRefinement(l)},isDisjunctiveFacet:function(h){return this.disjunctiveFacets.indexOf(h)>-1},isHierarchicalFacet:function(h){return this.getHierarchicalFacetByName(h)!==void 0},isConjunctiveFacet:function(h){return this.facets.indexOf(h)>-1},isFacetRefined:function(l,c){return this.isConjunctiveFacet(l)?d.isRefined(this.facetsRefinements,l,c):!1},isExcludeRefined:function(l,c){return this.isConjunctiveFacet(l)?d.isRefined(this.facetsExcludes,l,c):!1},isDisjunctiveFacetRefined:function(l,c){return this.isDisjunctiveFacet(l)?d.isRefined(this.disjunctiveFacetsRefinements,l,c):!1},isHierarchicalFacetRefined:function(l,c){if(!this.isHierarchicalFacet(l))return!1;var g=this.getHierarchicalRefinement(l);return c?g.indexOf(c)!==-1:g.length>0},isNumericRefined:function(l,c,g){if(g===void 0&&c===void 0)return!!this.numericRefinements[l];var y=this.numericRefinements[l]&&this.numericRefinements[l][c]!==void 0;if(g===void 0||!y)return y;var f=s(g),b=m(this.numericRefinements[l][c],f)!==void 0;return y&&b},isTagRefined:function(l){return this.tagRefinements.indexOf(l)!==-1},getRefinedDisjunctiveFacets:function(){var l=this,c=r(Object.keys(this.numericRefinements).filter(function(g){return Object.keys(l.numericRefinements[g]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(g){return l.disjunctiveFacetsRefinements[g].length>0}).concat(c).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var l=this;return r(this.hierarchicalFacets.map(function(c){return c.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(c){return l.hierarchicalFacetsRefinements[c].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var h=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(l){return h.indexOf(l)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var l=this.managedParameters,c={},g=this;return Object.keys(this).forEach(function(y){var f=g[y];l.indexOf(y)===-1&&f!==void 0&&(c[y]=f)}),c},setQueryParameter:function(l,c){if(this[l]===c)return this;var g={};return g[l]=c,this.setQueryParameters(g)},setQueryParameters:function(l){if(!l)return this;var c=v.validate(this,l);if(c)throw c;var g=this,y=v._parseNumbers(l),f=Object.keys(this).reduce(function(w,_){return w[_]=g[_],w},{}),b=Object.keys(y).reduce(function(w,_){var S=w[_]!==void 0,R=y[_]!==void 0;return S&&!R?o(w,[_]):(R&&(w[_]=y[_]),w)},f);return new this.constructor(b)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(h){return h.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(h){return h.separator||" > "},_getHierarchicalRootPath:function(h){return h.rootPath||null},_getHierarchicalShowParentLevel:function(h){return typeof h.showParentLevel=="boolean"?h.showParentLevel:!0},getHierarchicalFacetByName:function(h){return t(this.hierarchicalFacets,function(l){return l.name===h})},getHierarchicalFacetBreadcrumb:function(h){if(!this.isHierarchicalFacet(h))return[];var l=this.getHierarchicalRefinement(h)[0];if(!l)return[];var c=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(h)),g=l.split(c);return g.map(function(y){return y.trim()})},toString:function(){return JSON.stringify(this,null,2)}},Js=v,Js}var Xs,Sd;function Bb(){return Sd||(Sd=1,Xs=function(t){return Array.isArray(t)?t.filter(Boolean):[]}),Xs}var Zs,Rd;function Hb(){return Rd||(Rd=1,Zs=function(t,r){if(!Array.isArray(t))return-1;for(var n=0;n<t.length;n++)if(r(t[n]))return n;return-1}),Zs}var el,Pd;function Od(){if(Pd)return el;Pd=1;var e=ia();return el=function(r,n){var a=(n||[]).map(function(o){return o.split(":")});return r.reduce(function(s,u){var d=u.split(":"),p=e(a,function(m){return m[0]===d[0]});return d.length>1||!p?(s[0].push(d[0]),s[1].push(d[1]),s):(s[0].push(p[0]),s[1].push(p[1]),s)},[[],[]])},el}var tl,Ed;function Vb(){if(Ed)return tl;Ed=1;function e(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(r,n){return Object.keys(Object(n)).forEach(function(a){var o=typeof r[a]=="number"?r[a]:0,s=n[a];s!==void 0&&s>=o&&(r[a]!==void 0&&delete r[a],r[a]=s)}),r},{})}return tl=e,tl}var rl,Cd;function xd(){if(Cd)return rl;Cd=1;function e(r,n){if(r!==n){var a=r!==void 0,o=r===null,s=n!==void 0,u=n===null;if(!u&&r>n||o&&s||!a)return 1;if(!o&&r<n||u&&a||!s)return-1}return 0}function t(r,n,a){if(!Array.isArray(r))return[];Array.isArray(a)||(a=[]);var o=r.map(function(s,u){return{criteria:n.map(function(d){return s[d]}),index:u,value:s}});return o.sort(function(u,d){for(var p=-1;++p<u.criteria.length;){var m=e(u.criteria[p],d.criteria[p]);if(m)return p>=a.length?m:a[p]==="desc"?-m:m}return u.index-d.index}),o.map(function(s){return s.value})}return rl=t,rl}var nl,Td;function qb(){if(Td)return nl;Td=1,nl=s;var e=Ds(),t=ia(),r=Od(),n=xd(),a=e.escapeFacetValue,o=e.unescapeFacetValue;function s(m){return function(h,l){var c=m.hierarchicalFacets[l],g=m.hierarchicalFacetsRefinements[c.name]&&m.hierarchicalFacetsRefinements[c.name][0]||"",y=m._getHierarchicalFacetSeparator(c),f=m._getHierarchicalRootPath(c),b=m._getHierarchicalShowParentLevel(c),w=r(m._getHierarchicalFacetSortBy(c)),_=h.every(function(O){return O.exhaustive}),S=u(w,y,f,b,g),R=h;return f&&(R=h.slice(f.split(y).length)),R.reduce(S,{name:m.hierarchicalFacets[l].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:_,data:null})}}function u(m,v,h,l,c){return function(y,f,b){var w=y;if(b>0){var _=0;for(w=y;_<b;){var S=w&&Array.isArray(w.data)?w.data:[];w=t(S,function(O){return O.isRefined}),_++}}if(w){var R=Object.keys(f.data).map(function(O){return[O,f.data[O]]}).filter(function(O){var P=O[0];return d(P,w.path||h,c,v,h,l)});w.data=n(R.map(function(O){var P=O[0],C=O[1];return p(C,P,v,o(c),f.exhaustive)}),m[0],m[1])}return y}}function d(m,v,h,l,c,g){return c&&(m.indexOf(c)!==0||c===m)?!1:!c&&m.indexOf(l)===-1||c&&m.split(l).length-c.split(l).length===1||m.indexOf(l)===-1&&h.indexOf(l)===-1||h.indexOf(m)===0||m.indexOf(v+l)===0&&(g||m.indexOf(h)===0)}function p(m,v,h,l,c){var g=v.split(h);return{name:g[g.length-1].trim(),path:v,escapedValue:a(v),count:m,isRefined:l===v||l.indexOf(v+h)===0,exhaustive:c,data:null}}return nl}var al,kd;function Ad(){if(kd)return al;kd=1;var e=Bb(),t=Ws(),r=Ds(),n=ia(),a=Hb(),o=Od(),s=Vb(),u=xd(),d=r.escapeFacetValue,p=r.unescapeFacetValue,m=qb();function v(P){var C={};return P.forEach(function(k,A){C[k]=A}),C}function h(P,C,k){C&&C[k]&&(P.stats=C[k])}function l(P,C){return n(P,function(A){var H=A.attributes||[];return H.indexOf(C)>-1})}function c(P,C,k){var A=C[0]||{};this._rawResults=C;var H=this;Object.keys(A).forEach(function(B){H[B]=A[B]});var Q=t(k,{persistHierarchicalRootCount:!1});Object.keys(Q).forEach(function(B){H[B]=Q[B]}),this.processingTimeMS=C.reduce(function(B,Y){return Y.processingTimeMS===void 0?B:B+Y.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=P.hierarchicalFacets.map(function(){return[]}),this.facets=[];var $=P.getRefinedDisjunctiveFacets(),M=v(P.facets),D=v(P.disjunctiveFacets),I=1,U=A.facets||{};Object.keys(U).forEach(function(B){var Y=U[B],q=l(P.hierarchicalFacets,B);if(q){var ne=q.attributes.indexOf(B),L=a(P.hierarchicalFacets,function(x){return x.name===q.name});H.hierarchicalFacets[L][ne]={attribute:B,data:Y,exhaustive:A.exhaustiveFacetsCount}}else{var K=P.disjunctiveFacets.indexOf(B)!==-1,W=P.facets.indexOf(B)!==-1,ee;K&&(ee=D[B],H.disjunctiveFacets[ee]={name:B,data:Y,exhaustive:A.exhaustiveFacetsCount},h(H.disjunctiveFacets[ee],A.facets_stats,B)),W&&(ee=M[B],H.facets[ee]={name:B,data:Y,exhaustive:A.exhaustiveFacetsCount},h(H.facets[ee],A.facets_stats,B))}}),this.hierarchicalFacets=e(this.hierarchicalFacets),$.forEach(function(B){var Y=C[I],q=Y&&Y.facets?Y.facets:{},ne=P.getHierarchicalFacetByName(B);Object.keys(q).forEach(function(L){var K=q[L],W;if(ne){W=a(P.hierarchicalFacets,function(z){return z.name===ne.name});var ee=a(H.hierarchicalFacets[W],function(z){return z.attribute===L});if(ee===-1)return;H.hierarchicalFacets[W][ee].data=H.persistHierarchicalRootCount?s(H.hierarchicalFacets[W][ee].data,K):t(K,H.hierarchicalFacets[W][ee].data)}else{W=D[L];var x=A.facets&&A.facets[L]||{};H.disjunctiveFacets[W]={name:L,data:s(x,K),exhaustive:Y.exhaustiveFacetsCount},h(H.disjunctiveFacets[W],Y.facets_stats,L),P.disjunctiveFacetsRefinements[L]&&P.disjunctiveFacetsRefinements[L].forEach(function(z){!H.disjunctiveFacets[W].data[z]&&P.disjunctiveFacetsRefinements[L].indexOf(p(z))>-1&&(H.disjunctiveFacets[W].data[z]=0)})}}),I++}),P.getRefinedHierarchicalFacets().forEach(function(B){var Y=P.getHierarchicalFacetByName(B),q=P._getHierarchicalFacetSeparator(Y),ne=P.getHierarchicalRefinement(B);ne.length===0||ne[0].split(q).length<2||C.slice(I).forEach(function(L){var K=L&&L.facets?L.facets:{};Object.keys(K).forEach(function(W){var ee=K[W],x=a(P.hierarchicalFacets,function(Z){return Z.name===Y.name}),z=a(H.hierarchicalFacets[x],function(Z){return Z.attribute===W});if(z!==-1){var ie={};if(ne.length>0&&!H.persistHierarchicalRootCount){var we=ne[0].split(q)[0];ie[we]=H.hierarchicalFacets[x][z].data[we]}H.hierarchicalFacets[x][z].data=t(ie,ee,H.hierarchicalFacets[x][z].data)}}),I++})}),Object.keys(P.facetsExcludes).forEach(function(B){var Y=P.facetsExcludes[B],q=M[B];H.facets[q]={name:B,data:U[B],exhaustive:A.exhaustiveFacetsCount},Y.forEach(function(ne){H.facets[q]=H.facets[q]||{name:B},H.facets[q].data=H.facets[q].data||{},H.facets[q].data[ne]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(m(P)),this.facets=e(this.facets),this.disjunctiveFacets=e(this.disjunctiveFacets),this._state=P}c.prototype.getFacetByName=function(P){function C(k){return k.name===P}return n(this.facets,C)||n(this.disjunctiveFacets,C)||n(this.hierarchicalFacets,C)};function g(P,C){function k(U){return U.name===C}if(P._state.isConjunctiveFacet(C)){var A=n(P.facets,k);return A?Object.keys(A.data).map(function(U){var B=d(U);return{name:U,escapedValue:B,count:A.data[U],isRefined:P._state.isFacetRefined(C,B),isExcluded:P._state.isExcludeRefined(C,U)}}):[]}else if(P._state.isDisjunctiveFacet(C)){var H=n(P.disjunctiveFacets,k);return H?Object.keys(H.data).map(function(U){var B=d(U);return{name:U,escapedValue:B,count:H.data[U],isRefined:P._state.isDisjunctiveFacetRefined(C,B)}}):[]}else if(P._state.isHierarchicalFacet(C)){var Q=n(P.hierarchicalFacets,k);if(!Q)return Q;var $=P._state.getHierarchicalFacetByName(C),M=P._state._getHierarchicalFacetSeparator($),D=p(P._state.getHierarchicalRefinement(C)[0]||"");D.indexOf($.rootPath)===0&&(D=D.replace($.rootPath+M,""));var I=D.split(M);return I.unshift(C),y(Q,I,0),Q}}function y(P,C,k){P.isRefined=P.name===(C[k]&&C[k].trim()),P.data&&P.data.forEach(function(A){y(A,C,k+1)})}function f(P,C,k,A){if(A=A||0,Array.isArray(C))return P(C,k[A]);if(!C.data||C.data.length===0)return C;var H=C.data.map(function(M){return f(P,M,k,A+1)}),Q=P(H,k[A]),$=t({data:Q},C);return $}c.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function b(P,C){return C.sort(P)}function w(P,C){var k=[],A=[],H=C.hide||[],Q=C.order||[],$=Q.reduce(function(I,U,B){return I[U]=B,I},{});P.forEach(function(I){var U=I.path||I.name,B=H.indexOf(U)>-1;!B&&$[U]!==void 0?k[$[U]]=I:B||A.push(I)}),k=k.filter(function(I){return I});var M=C.sortRemainingBy,D;return M==="hidden"?k:(M==="alpha"?D=[["path","name"],["asc","asc"]]:D=[["count"],["desc"]],k.concat(u(A,D[0],D[1])))}function _(P,C){return P.renderingContent&&P.renderingContent.facetOrdering&&P.renderingContent.facetOrdering.values&&P.renderingContent.facetOrdering.values[C]}c.prototype.getFacetValues=function(P,C){var k=g(this,P);if(k){var A=t(C,{sortBy:c.DEFAULT_SORT,facetOrdering:!(C&&C.sortBy)}),H=this,Q;if(Array.isArray(k))Q=[P];else{var $=H._state.getHierarchicalFacetByName(k.name);Q=$.attributes}return f(function(M,D){if(A.facetOrdering){var I=_(H,D);if(I)return w(M,I)}if(Array.isArray(A.sortBy)){var U=o(A.sortBy,c.DEFAULT_SORT);return u(M,U[0],U[1])}else if(typeof A.sortBy=="function")return b(A.sortBy,M);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},k,Q)}},c.prototype.getFacetStats=function(P){if(this._state.isConjunctiveFacet(P))return S(this.facets,P);if(this._state.isDisjunctiveFacet(P))return S(this.disjunctiveFacets,P)};function S(P,C){var k=n(P,function(A){return A.name===C});return k&&k.stats}c.prototype.getRefinements=function(){var P=this._state,C=this,k=[];return Object.keys(P.facetsRefinements).forEach(function(A){P.facetsRefinements[A].forEach(function(H){k.push(R(P,"facet",A,H,C.facets))})}),Object.keys(P.facetsExcludes).forEach(function(A){P.facetsExcludes[A].forEach(function(H){k.push(R(P,"exclude",A,H,C.facets))})}),Object.keys(P.disjunctiveFacetsRefinements).forEach(function(A){P.disjunctiveFacetsRefinements[A].forEach(function(H){k.push(R(P,"disjunctive",A,H,C.disjunctiveFacets))})}),Object.keys(P.hierarchicalFacetsRefinements).forEach(function(A){P.hierarchicalFacetsRefinements[A].forEach(function(H){k.push(O(P,A,H,C.hierarchicalFacets))})}),Object.keys(P.numericRefinements).forEach(function(A){var H=P.numericRefinements[A];Object.keys(H).forEach(function(Q){H[Q].forEach(function($){k.push({type:"numeric",attributeName:A,name:$,numericValue:$,operator:Q})})})}),P.tagRefinements.forEach(function(A){k.push({type:"tag",attributeName:"_tags",name:A})}),k};function R(P,C,k,A,H){var Q=n(H,function(D){return D.name===k}),$=Q&&Q.data&&Q.data[A]?Q.data[A]:0,M=Q&&Q.exhaustive||!1;return{type:C,attributeName:k,name:A,count:$,exhaustive:M}}function O(P,C,k,A){var H=P.getHierarchicalFacetByName(C),Q=P._getHierarchicalFacetSeparator(H),$=k.split(Q),M=n(A,function(Y){return Y.name===C}),D=$.reduce(function(Y,q){var ne=Y&&n(Y.data,function(L){return L.name===q});return ne!==void 0?ne:Y},M),I=D&&D.count||0,U=D&&D.exhaustive||!1,B=D&&D.path||"";return{type:"hierarchical",attributeName:C,name:B,count:I,exhaustive:U}}return al=c,al}var il,jd;function Ub(){return jd||(jd=1,il=function(t){return t.reduce(function(r,n){return r.concat(n)},[])}),il}var ol,$d;function Wb(){if($d)return ol;$d=1;var e=ia(),t=Ub();function r(a,o){var s=[];return Object.keys(a).forEach(function(u){a[u].count<2&&(a[u].indexSum+=100),s.push({objectID:u,avgOfIndices:a[u].indexSum/o})}),s.sort(function(u,d){return u.avgOfIndices>d.avgOfIndices?1:-1})}function n(a,o){var s={};o.forEach(function(p){p.forEach(function(m,v){a.includes(m.objectID)||(s[m.objectID]?s[m.objectID]={indexSum:s[m.objectID].indexSum+v,count:s[m.objectID].count+1}:s[m.objectID]={indexSum:v,count:1})})});var u=r(s,o.length),d=u.reduce(function(p,m){var v=e(t(o),function(h){return h.objectID===m.objectID});return v?p.concat(v):p},[]);return d}return ol=n,ol}var sl,Dd;function Nd(){return Dd||(Dd=1,sl="3.26.0"),sl}var ll,Fd;function zb(){if(Fd)return ll;Fd=1;var e=ks(),t=Db(),r=Ds().escapeFacetValue,n=nd(),a=Fs(),o=Ms(),s=Bs(),u=cd(),d=fd(),p=Nb(),m=_d(),v=Ad(),h=Wb(),l=Nd();function c(f,b,w,_){typeof f.addAlgoliaAgent=="function"&&f.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(f);var S=w||{};S.index=b,this.state=m.make(S),this.recommendState=new u({params:S.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=_,this._recommendCache={}}n(c,e),c.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},c.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},c.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this},c.prototype.recommend=function(){return this._recommend(),this},c.prototype.getQuery=function(){var f=this.state;return p._getHitsSearchParams(f)},c.prototype.searchOnce=function(f,b){var w=f?this.state.setQueryParameters(f):this.state,_=p._getQueries(w.index,w),S=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:w}),b){this.client.search(_).then(function(R){S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),b(null,new v(w,R.results),w)}).catch(function(R){S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),b(R,null,w)});return}return this.client.search(_).then(function(R){return S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),{content:new v(w,R.results),state:w,_originalResponse:R}},function(R){throw S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),R})},c.prototype.findAnswers=function(f){console.warn("[algoliasearch-helper] answers is no longer supported");var b=this.state,w=this.derivedHelpers[0];if(!w)return Promise.resolve([]);var _=w.getModifiedState(b),S=a({attributesForPrediction:f.attributesForPrediction,nbHits:f.nbHits},{params:s(p._getHitsSearchParams(_),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),R="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if(typeof this.client.initIndex!="function")throw new Error(R);var O=this.client.initIndex(_.index);if(typeof O.findAnswers!="function")throw new Error(R);return O.findAnswers(_.query,f.queryLanguages,S)},c.prototype.searchForFacetValues=function(f,b,w,_){var S=typeof this.client.searchForFacetValues=="function"&&typeof this.client.searchForFacets!="function",R=typeof this.client.initIndex=="function";if(!S&&!R&&typeof this.client.search!="function")throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var O=this.state.setQueryParameters(_||{}),P=O.isDisjunctiveFacet(f),C=p.getSearchForFacetQuery(f,b,w,O);this._currentNbQueries++;var k=this,A;S?A=this.client.searchForFacetValues([{indexName:O.index,params:C}]):R?A=this.client.initIndex(O.index).searchForFacetValues(C):(delete C.facetName,A=this.client.search([{type:"facet",facet:f,indexName:O.index,params:C}]).then(function($){return $.results[0]})),this.emit("searchForFacetValues",{state:O,facet:f,query:b});var H=this.lastResults&&this.lastResults.index===O.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[f]&&this.lastResults.renderingContent.facetOrdering.values[f].hide||[];return A.then(function($){return k._currentNbQueries--,k._currentNbQueries===0&&k.emit("searchQueueEmpty"),$=Array.isArray($)?$[0]:$,$.facetHits.forEach(function(M,D){if(H.indexOf(M.value)>-1){$.facetHits.splice(D,1);return}M.escapedValue=r(M.value),M.isRefined=P?O.isDisjunctiveFacetRefined(f,M.escapedValue):O.isFacetRefined(f,M.escapedValue)}),$},function(Q){throw k._currentNbQueries--,k._currentNbQueries===0&&k.emit("searchQueueEmpty"),Q})},c.prototype.searchForCompositionFacetValues=function(f,b,w,_){if(typeof this.client.searchForFacetValues!="function")throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues");var S=this.state.setQueryParameters(_||{}),R=S.isDisjunctiveFacet(f);this._currentNbQueries++;var O=this,P;return P=this.client.searchForFacetValues({compositionID:S.index,facetName:f,searchForFacetValuesRequest:{params:{query:b,maxFacetHits:w,searchQuery:p._getCompositionHitsSearchParams(S)}}}),this.emit("searchForFacetValues",{state:S,facet:f,query:b}),P.then(function(k){return O._currentNbQueries--,O._currentNbQueries===0&&O.emit("searchQueueEmpty"),k=k.results[0],k.facetHits.forEach(function(A){A.escapedValue=r(A.value),A.isRefined=R?S.isDisjunctiveFacetRefined(f,A.escapedValue):S.isFacetRefined(f,A.escapedValue)}),k},function(C){throw O._currentNbQueries--,O._currentNbQueries===0&&O.emit("searchQueueEmpty"),C})},c.prototype.setQuery=function(f){return this._change({state:this.state.resetPage().setQuery(f),isPageReset:!0}),this},c.prototype.clearRefinements=function(f){return this._change({state:this.state.resetPage().clearRefinements(f),isPageReset:!0}),this},c.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},c.prototype.addDisjunctiveFacetRefinement=function(f,b){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(f,b),isPageReset:!0}),this},c.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},c.prototype.addHierarchicalFacetRefinement=function(f,b){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(f,b),isPageReset:!0}),this},c.prototype.addNumericRefinement=function(f,b,w){return this._change({state:this.state.resetPage().addNumericRefinement(f,b,w),isPageReset:!0}),this},c.prototype.addFacetRefinement=function(f,b){return this._change({state:this.state.resetPage().addFacetRefinement(f,b),isPageReset:!0}),this},c.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},c.prototype.addFacetExclusion=function(f,b){return this._change({state:this.state.resetPage().addExcludeRefinement(f,b),isPageReset:!0}),this},c.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},c.prototype.addTag=function(f){return this._change({state:this.state.resetPage().addTagRefinement(f),isPageReset:!0}),this},c.prototype.addFrequentlyBoughtTogether=function(f){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(f)}),this},c.prototype.addRelatedProducts=function(f){return this._recommendChange({state:this.recommendState.addRelatedProducts(f)}),this},c.prototype.addTrendingItems=function(f){return this._recommendChange({state:this.recommendState.addTrendingItems(f)}),this},c.prototype.addTrendingFacets=function(f){return this._recommendChange({state:this.recommendState.addTrendingFacets(f)}),this},c.prototype.addLookingSimilar=function(f){return this._recommendChange({state:this.recommendState.addLookingSimilar(f)}),this},c.prototype.removeNumericRefinement=function(f,b,w){return this._change({state:this.state.resetPage().removeNumericRefinement(f,b,w),isPageReset:!0}),this},c.prototype.removeDisjunctiveFacetRefinement=function(f,b){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(f,b),isPageReset:!0}),this},c.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},c.prototype.removeHierarchicalFacetRefinement=function(f){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(f),isPageReset:!0}),this},c.prototype.removeFacetRefinement=function(f,b){return this._change({state:this.state.resetPage().removeFacetRefinement(f,b),isPageReset:!0}),this},c.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},c.prototype.removeFacetExclusion=function(f,b){return this._change({state:this.state.resetPage().removeExcludeRefinement(f,b),isPageReset:!0}),this},c.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},c.prototype.removeTag=function(f){return this._change({state:this.state.resetPage().removeTagRefinement(f),isPageReset:!0}),this},c.prototype.removeFrequentlyBoughtTogether=function(f){return this._recommendChange({state:this.recommendState.removeParams(f)}),this},c.prototype.removeRelatedProducts=function(f){return this._recommendChange({state:this.recommendState.removeParams(f)}),this},c.prototype.removeTrendingItems=function(f){return this._recommendChange({state:this.recommendState.removeParams(f)}),this},c.prototype.removeTrendingFacets=function(f){return this._recommendChange({state:this.recommendState.removeParams(f)}),this},c.prototype.removeLookingSimilar=function(f){return this._recommendChange({state:this.recommendState.removeParams(f)}),this},c.prototype.toggleFacetExclusion=function(f,b){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(f,b),isPageReset:!0}),this},c.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},c.prototype.toggleRefinement=function(f,b){return this.toggleFacetRefinement(f,b)},c.prototype.toggleFacetRefinement=function(f,b){return this._change({state:this.state.resetPage().toggleFacetRefinement(f,b),isPageReset:!0}),this},c.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},c.prototype.toggleTag=function(f){return this._change({state:this.state.resetPage().toggleTagRefinement(f),isPageReset:!0}),this},c.prototype.nextPage=function(){var f=this.state.page||0;return this.setPage(f+1)},c.prototype.previousPage=function(){var f=this.state.page||0;return this.setPage(f-1)};function g(f){if(f<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(f),isPageReset:!1}),this}c.prototype.setCurrentPage=g,c.prototype.setPage=g,c.prototype.setIndex=function(f){return this._change({state:this.state.resetPage().setIndex(f),isPageReset:!0}),this},c.prototype.setQueryParameter=function(f,b){return this._change({state:this.state.resetPage().setQueryParameter(f,b),isPageReset:!0}),this},c.prototype.setState=function(f){return this._change({state:m.make(f),isPageReset:!1}),this},c.prototype.overrideStateWithoutTriggeringChangeEvent=function(f){return this.state=new m(f),this},c.prototype.hasRefinements=function(f){return o(this.state.getNumericRefinements(f))?!0:this.state.isConjunctiveFacet(f)?this.state.isFacetRefined(f):this.state.isDisjunctiveFacet(f)?this.state.isDisjunctiveFacetRefined(f):this.state.isHierarchicalFacet(f)?this.state.isHierarchicalFacetRefined(f):!1},c.prototype.isExcluded=function(f,b){return this.state.isExcludeRefined(f,b)},c.prototype.isDisjunctiveRefined=function(f,b){return this.state.isDisjunctiveFacetRefined(f,b)},c.prototype.hasTag=function(f){return this.state.isTagRefined(f)},c.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},c.prototype.getIndex=function(){return this.state.index};function y(){return this.state.page}return c.prototype.getCurrentPage=y,c.prototype.getPage=y,c.prototype.getTags=function(){return this.state.tagRefinements},c.prototype.getRefinements=function(f){var b=[];if(this.state.isConjunctiveFacet(f)){var w=this.state.getConjunctiveRefinements(f);w.forEach(function(O){b.push({value:O,type:"conjunctive"})});var _=this.state.getExcludeRefinements(f);_.forEach(function(O){b.push({value:O,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(f)){var S=this.state.getDisjunctiveRefinements(f);S.forEach(function(O){b.push({value:O,type:"disjunctive"})})}var R=this.state.getNumericRefinements(f);return Object.keys(R).forEach(function(O){var P=R[O];b.push({value:P,operator:O,type:"numeric"})}),b},c.prototype.getNumericRefinement=function(f,b){return this.state.getNumericRefinement(f,b)},c.prototype.getHierarchicalFacetBreadcrumb=function(f){return this.state.getHierarchicalFacetBreadcrumb(f)},c.prototype._search=function(f){var b=this.state,w=[],_=[];f.onlyWithDerivedHelpers||(_=p._getQueries(b.index,b),w.push({state:b,queriesCount:_.length,helper:this}),this.emit("search",{state:b,results:this.lastResults}));var S=this.derivedHelpers.map(function(P){var C=P.getModifiedState(b),k=C.index?p._getQueries(C.index,C):[];return w.push({state:C,queriesCount:k.length,helper:P}),P.emit("search",{state:C,results:P.lastResults}),k}),R=Array.prototype.concat.apply(_,S),O=this._queryId++;if(this._currentNbQueries++,!R.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,w,O));try{this.client.search(R).then(this._dispatchAlgoliaResponse.bind(this,w,O)).catch(this._dispatchAlgoliaError.bind(this,O))}catch(P){this.emit("error",{error:P})}},c.prototype._runComposition=function(){var f=this.state,b=[],w=[],_=this.derivedHelpers.map(function(P){var C=P.getModifiedState(f),k=p._getCompositionQueries(C);return b.push({state:C,queriesCount:k.length,helper:P}),P.emit("search",{state:C,results:P.lastResults}),k}),S=Array.prototype.concat.apply(w,_),R=this._queryId++;if(this._currentNbQueries++,!S.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,b,R));if(S.length>1)throw new Error("Only one query is allowed when using a composition.");var O=S[0];try{this.client.search(O).then(this._dispatchAlgoliaResponse.bind(this,b,R)).catch(this._dispatchAlgoliaError.bind(this,R))}catch(P){this.emit("error",{error:P})}},c.prototype._recommend=function(){var f=this.state,b=this.recommendState,w=this.getIndex(),_=[{state:b,index:w,helper:this}],S=b.params.map(function(k){return k.$$id});this.emit("fetch",{recommend:{state:b,results:this.lastRecommendResults}});var R=this._recommendCache,O=this.derivedHelpers.map(function(k){var A=k.getModifiedState(f).index;if(!A)return[];var H=k.getModifiedRecommendState(new u);return _.push({state:H,index:A,helper:k}),S=Array.prototype.concat.apply(S,H.params.map(function(Q){return Q.$$id})),k.emit("fetch",{recommend:{state:H,results:k.lastRecommendResults}}),H._buildQueries(A,R)}),P=Array.prototype.concat.apply(this.recommendState._buildQueries(w,R),O);if(P.length!==0){if(P.length>0&&typeof this.client.getRecommendations>"u"){console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");return}var C=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(P).then(this._dispatchRecommendResponse.bind(this,C,_,S)).catch(this._dispatchRecommendError.bind(this,C))}catch(k){this.emit("error",{error:k})}}},c.prototype._dispatchAlgoliaResponse=function(f,b,w){var _=this;if(!(b<this._lastQueryIdReceived)){this._currentNbQueries-=b-this._lastQueryIdReceived,this._lastQueryIdReceived=b,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var S=w.results.slice(),R=Object.keys(w).reduce(function(O,P){return P!=="results"&&(O[P]=w[P]),O},{});Object.keys(R).length<=0&&(R=void 0),f.forEach(function(O){var P=O.state,C=O.queriesCount,k=O.helper,A=S.splice(0,C);if(!P.index){k.emit("result",{results:null,state:P});return}k.lastResults=new v(P,A,_._searchResultsOptions),R!==void 0&&(k.lastResults._rawContent=R),k.emit("result",{results:k.lastResults,state:P})})}},c.prototype._dispatchRecommendResponse=function(f,b,w,_){if(!(f<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=f-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=f,this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty");var S=this._recommendCache,R={};w.filter(function(P){return S[P]===void 0}).forEach(function(P,C){R[P]||(R[P]=[]),R[P].push(C)}),Object.keys(R).forEach(function(P){var C=R[P],k=_.results[C[0]];if(C.length===1){S[P]=k;return}S[P]=Object.assign({},k,{hits:h(w,C.map(function(A){return _.results[A].hits}))})});var O={};w.forEach(function(P){O[P]=S[P]}),b.forEach(function(P){var C=P.state,k=P.helper;if(!P.index){k.emit("recommend:result",{results:null,state:C});return}k.lastRecommendResults=new d(C,O),k.emit("recommend:result",{recommend:{results:k.lastRecommendResults,state:C}})})}},c.prototype._dispatchAlgoliaError=function(f,b){f<this._lastQueryIdReceived||(this._currentNbQueries-=f-this._lastQueryIdReceived,this._lastQueryIdReceived=f,this.emit("error",{error:b}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))},c.prototype._dispatchRecommendError=function(f,b){f<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=f-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=f,this.emit("error",{error:b}),this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty"))},c.prototype.containsRefinement=function(f,b,w,_){return f||b.length!==0||w.length!==0||_.length!==0},c.prototype._hasDisjunctiveRefinements=function(f){return this.state.disjunctiveRefinements[f]&&this.state.disjunctiveRefinements[f].length>0},c.prototype._change=function(f){var b=f.state,w=f.isPageReset;b!==this.state&&(this.state=b,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:w}))},c.prototype._recommendChange=function(f){var b=f.state;b!==this.recommendState&&(this.recommendState=b,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},c.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},c.prototype.setClient=function(f){return this.client===f?this:(typeof f.addAlgoliaAgent=="function"&&f.addAlgoliaAgent("JS Helper ("+l+")"),this.client=f,this)},c.prototype.getClient=function(){return this.client},c.prototype.derive=function(f,b){var w=new t(this,f,b);return this.derivedHelpers.push(w),w},c.prototype.detachDerivedHelper=function(f){var b=this.derivedHelpers.indexOf(f);if(b===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(b,1)},c.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},ll=c,ll}var ul,Id;function Yb(){if(Id)return ul;Id=1;var e=zb(),t=cd(),r=fd(),n=_d(),a=Ad();function o(s,u,d,p){return new e(s,u,d,p)}return o.version=Nd(),o.AlgoliaSearchHelper=e,o.SearchParameters=n,o.RecommendParameters=t,o.SearchResults=a,o.RecommendResults=r,ul=o,ul}var Qb=Yb();const _t=aa(Qb);function oa(e){"@babel/helpers - typeof";return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(e)}function Md(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Md(Object(r),!0).forEach(function(n){Ld(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ld(e,t,r){return t=Kb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kb(e){var t=Gb(e,"string");return oa(t)=="symbol"?t:String(t)}function Gb(e,t){if(oa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jb=Ge({name:"configure",connector:!0});function Bd(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(r,n){return gt(gt({},r),{},Ld({},n,void 0))},{}))}var Hd=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fe,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return function(n){if(!n||!Rc(n.searchParameters))throw new Error(Jb("The `searchParameters` option expects an object."));var a={};function o(s){return function(u){var d=Bd(s.state,n),p=ea(d,new _t.SearchParameters(u));n.searchParameters=u,s.setState(p).search()}}return{$$type:"ais.configure",init:function(u){var d=u.instantSearchInstance;t(gt(gt({},this.getWidgetRenderState(u)),{},{instantSearchInstance:d}),!0)},render:function(u){var d=u.instantSearchInstance;t(gt(gt({},this.getWidgetRenderState(u)),{},{instantSearchInstance:d}),!1)},dispose:function(u){var d=u.state;return r(),Bd(d,n)},getRenderState:function(u,d){var p,m=this.getWidgetRenderState(d);return gt(gt({},u),{},{configure:gt(gt({},m),{},{widgetParams:gt(gt({},m.widgetParams),{},{searchParameters:ea(new _t.SearchParameters((p=u.configure)===null||p===void 0?void 0:p.widgetParams.searchParameters),new _t.SearchParameters(m.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(u){var d=u.helper;return a.refine||(a.refine=o(d)),{refine:a.refine,widgetParams:n}},getWidgetSearchParameters:function(u,d){var p=d.uiState;return ea(u,new _t.SearchParameters(gt(gt({},p.configure),n.searchParameters)))},getWidgetUiState:function(u){return gt(gt({},u),{},{configure:gt(gt({},u.configure),n.searchParameters)})}}}};function sa(e){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sa(e)}function Vd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vd(Object(r),!0).forEach(function(n){Xb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xb(e,t,r){return t=Zb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zb(e){var t=ew(e,"string");return sa(t)=="symbol"?t:String(t)}function ew(e,t){if(sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qd(e){return aw(e)||nw(e)||rw(e)||tw()}function tw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
53
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rw(e,t){if(e){if(typeof e=="string")return dl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dl(e,t)}}function nw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aw(e){if(Array.isArray(e))return dl(e)}function dl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ud=Ge({name:"configure-related-items",connector:!0});function Wd(e){var t=e.attributeName,r=e.attributeValue,n=e.attributeScore;return"".concat(t,":").concat(r,"<score=").concat(n||1,">")}var iw=function(t,r){return function(n){var a=n||{},o=a.hit,s=a.matchingPatterns,u=a.transformSearchParameters,d=u===void 0?function(h){return h}:u;if(!o)throw new Error(Ud("The `hit` option is required."));if(!s)throw new Error(Ud("The `matchingPatterns` option is required."));var p=Object.keys(s).reduce(function(h,l){var c=s[l],g=gn(o,l),y=c.score;return Array.isArray(g)?[].concat(qd(h),[g.map(function(f){return Wd({attributeName:l,attributeValue:f,attributeScore:y})})]):typeof g=="string"?[].concat(qd(h),[Wd({attributeName:l,attributeValue:g,attributeScore:y})]):(process.env.NODE_ENV==="development"&&ke(!1,"\nThe `matchingPatterns` option returned a value of type ".concat(vc(g),' for the "').concat(l,'" key. This value was not sent to Algolia because `optionalFilters` only supports strings and array of strings.\n\nYou can remove the "').concat(l,`" key from the \`matchingPatterns\` option.
|
|
54
|
+
|
|
55
|
+
See https://www.algolia.com/doc/api-reference/api-parameters/optionalFilters/
|
|
56
|
+
`)),h)},[]),m=cl({},d(new _t.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(o.objectID)],optionalFilters:p}))),v=Hd(t,r);return cl(cl({},v({searchParameters:m})),{},{$$type:"ais.configureRelatedItems"})}};function zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zd(Object(r),!0).forEach(function(n){ow(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ow(e,t,r){return t=sw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sw(e){var t=lw(e,"string");return vn(t)=="symbol"?t:String(t)}function lw(e,t){if(vn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vn(e){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vn(e)}var Oi=Ge({name:"dynamic-widgets",connector:!0}),Yd=20,Qd=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,Oi()),function(n){var a=n.widgets,o=n.maxValuesPerFacet,s=o===void 0?20:o,u=n.facets,d=u===void 0?["*"]:u,p=n.transformItems,m=p===void 0?function(l){return l}:p,v=n.fallbackWidget;if(!(a&&Array.isArray(a)&&a.every(function(l){return vn(l)==="object"})))throw new Error(Oi("The `widgets` option expects an array of widgets."));if(!Array.isArray(d))throw new Error(Oi("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(d))));var h=new Map;return{$$type:"ais.dynamicWidgets",init:function(c){a.forEach(function(g){var y=F0(g,c);h.set(y,{widget:g,isMounted:!1})}),t(yn(yn({},this.getWidgetRenderState(c)),{},{instantSearchInstance:c.instantSearchInstance}),!0)},render:function(c){var g=c.parent,y=this.getWidgetRenderState(c),f=[],b=[];v&&y.attributesToRender.forEach(function(w){if(!h.has(w)){var _=v({attribute:w});h.set(w,{widget:_,isMounted:!1})}}),h.forEach(function(w,_){var S=w.widget,R=w.isMounted,O=y.attributesToRender.indexOf(_)>-1;!R&&O?(b.push(S),h.set(_,{widget:S,isMounted:!0})):R&&!O&&(f.push(S),h.set(_,{widget:S,isMounted:!1}))}),g.addWidgets(b),setTimeout(function(){return g.removeWidgets(f)},0),t(yn(yn({},y),{},{instantSearchInstance:c.instantSearchInstance}),!1)},dispose:function(c){var g=c.parent,y=[];h.forEach(function(f){var b=f.widget,w=f.isMounted;w&&y.push(b)}),g.removeWidgets(y),r()},getWidgetSearchParameters:function(c){return d.reduce(function(g,y){return g.addFacet(y)},c.setQueryParameters({maxValuesPerFacet:Math.max(s||0,c.maxValuesPerFacet||0)}))},getRenderState:function(c,g){return yn(yn({},c),{},{dynamicWidgets:this.getWidgetRenderState(g)})},getWidgetRenderState:function(c){var g,y,f,b,w=c.results,_=c.state;if(!w)return{attributesToRender:[],widgetParams:n};var S=m((g=(y=w.renderingContent)===null||y===void 0||(f=y.facetOrdering)===null||f===void 0||(b=f.facets)===null||b===void 0?void 0:b.order)!==null&&g!==void 0?g:[],{results:w});if(!Array.isArray(S))throw new Error(Oi("The `transformItems` option expects a function that returns an Array."));return process.env.NODE_ENV==="development"&&ke(s>=(_.maxValuesPerFacet||0),"The maxValuesPerFacet set by dynamic widgets (".concat(s,") is smaller than one of the limits set by a widget (").concat(_.maxValuesPerFacet,"). This causes a mismatch in query parameters and thus an extra network request when that widget is mounted.")),process.env.NODE_ENV==="development"&&ke(S.length<=Yd||n.facets!==void 0,"More than ".concat(Yd,` facets are requested to be displayed without explicitly setting which facets to retrieve. This could have a performance impact. Set "facets" to [] to do two smaller network requests, or explicitly to ['*'] to avoid this warning.`)),{attributesToRender:S,widgetParams:n}}}}};function la(e){"@babel/helpers - typeof";return la=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(e)}function uw(e){return hw(e)||fw(e)||dw(e)||cw()}function cw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dw(e,t){if(e){if(typeof e=="string")return fl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fl(e,t)}}function fw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hw(e){if(Array.isArray(e))return fl(e)}function fl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kd(Object(r),!0).forEach(function(n){pw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pw(e,t,r){return t=mw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mw(e){var t=gw(e,"string");return la(t)=="symbol"?t:String(t)}function gw(e,t){if(la(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(la(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gd=Ge({name:"clear-refinements",connector:!0}),yw=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,Gd()),function(n){var a=n||{},o=a.includedAttributes,s=o===void 0?[]:o,u=a.excludedAttributes,d=u===void 0?["query"]:u,p=a.transformItems,m=p===void 0?function(c){return c}:p;if(n&&n.includedAttributes&&n.excludedAttributes)throw new Error(Gd("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var v={refine:Fe,createURL:function(){return""},attributesToClear:[]},h=function(){return v.refine()},l=function(){return v.createURL()};return{$$type:"ais.clearRefinements",init:function(g){var y=g.instantSearchInstance;t(bn(bn({},this.getWidgetRenderState(g)),{},{instantSearchInstance:y}),!0)},render:function(g){var y=g.instantSearchInstance;t(bn(bn({},this.getWidgetRenderState(g)),{},{instantSearchInstance:y}),!1)},dispose:function(){r()},getRenderState:function(g,y){return bn(bn({},g),{},{clearRefinements:this.getWidgetRenderState(y)})},getWidgetRenderState:function(g){var y=g.createURL,f=g.scopedResults,b=g.results;v.attributesToClear=f.reduce(function(_,S){return _.concat(vw({scopedResult:S,includedAttributes:s,excludedAttributes:d,transformItems:m,results:b}))},[]),v.refine=function(){v.attributesToClear.forEach(function(_){var S=_.helper,R=_.items;S.setState(bc({helper:S,attributesToClear:R})).search()})},v.createURL=function(){return y(ea.apply(void 0,uw(v.attributesToClear.map(function(_){var S=_.helper,R=_.items;return bc({helper:S,attributesToClear:R})}))))};var w=v.attributesToClear.some(function(_){return _.items.length>0});return{canRefine:w,hasRefinements:w,refine:h,createURL:l,widgetParams:n}}}}};function vw(e){var t=e.scopedResult,r=e.includedAttributes,n=e.excludedAttributes,a=e.transformItems,o=e.results,s=r.indexOf("query")!==-1||n.indexOf("query")===-1;return{helper:t.helper,items:a(Es(Ss(t.results,t.helper.state,s).map(function(u){return u.attribute}).filter(function(u){return r.length===0||r.indexOf(u)!==-1}).filter(function(u){return u==="query"&&s||n.indexOf(u)===-1})),{results:o})}}function ua(e){"@babel/helpers - typeof";return ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ua(e)}function bw(e){return Rw(e)||Sw(e)||_w(e)||ww()}function ww(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _w(e,t){if(e){if(typeof e=="string")return hl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hl(e,t)}}function Sw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rw(e){if(Array.isArray(e))return hl(e)}function hl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(r),!0).forEach(function(n){Pw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pw(e,t,r){return t=Ow(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ow(e){var t=Ew(e,"string");return ua(t)=="symbol"?t:String(t)}function Ew(e,t){if(ua(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ua(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xd=Ge({name:"current-refinements",connector:!0}),Cw=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,Xd()),function(n){if((n||{}).includedAttributes&&(n||{}).excludedAttributes)throw new Error(Xd("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var a=n||{},o=a.includedAttributes,s=a.excludedAttributes,u=s===void 0?["query"]:s,d=a.transformItems,p=d===void 0?function(m){return m}:d;return{$$type:"ais.currentRefinements",init:function(v){var h=v.instantSearchInstance;t(wn(wn({},this.getWidgetRenderState(v)),{},{instantSearchInstance:h}),!0)},render:function(v){var h=v.instantSearchInstance;t(wn(wn({},this.getWidgetRenderState(v)),{},{instantSearchInstance:h}),!1)},dispose:function(){r()},getRenderState:function(v,h){return wn(wn({},v),{},{currentRefinements:this.getWidgetRenderState(h)})},getWidgetRenderState:function(v){var h=v.results,l=v.scopedResults,c=v.createURL,g=v.helper;function y(){return h?l.reduce(function(b,w){return b.concat(p(Zd({results:w.results,helper:w.helper,indexId:w.indexId,includedAttributes:o,excludedAttributes:u}),{results:h}))},[]):p(Zd({results:null,helper:g,indexId:g.state.index,includedAttributes:o,excludedAttributes:u}),{results:h})}var f=y();return{items:f,canRefine:f.length>0,refine:function(w){return tf(g,w)},createURL:function(w){return c(ef(g.state,w))},widgetParams:n}}}}};function Zd(e){var t=e.results,r=e.helper,n=e.indexId,a=e.includedAttributes,o=e.excludedAttributes,s=(a||[]).indexOf("query")!==-1||(o||[]).indexOf("query")===-1,u=a?function(p){return a.indexOf(p.attribute)!==-1}:function(p){return o.indexOf(p.attribute)===-1},d=Ss(t,r.state,s).map(Tw).filter(u);return d.reduce(function(p,m){return[].concat(bw(p.filter(function(v){return v.attribute!==m.attribute})),[{indexName:r.state.index,indexId:n,attribute:m.attribute,label:m.attribute,refinements:d.filter(function(v){return v.attribute===m.attribute}).sort(function(v,h){return v.type==="numeric"?v.value-h.value:0}),refine:function(h){return tf(r,h)}}])},[])}function ef(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 process.env.NODE_ENV==="development"&&ke(!1,'The refinement type "'.concat(t.type,'" does not exist and cannot be cleared from the current refinements.')),e}}function tf(e,t){e.setState(ef(e.state,t)).search()}function xw(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}function Tw(e){var t=kw(e),r=e.operator?"".concat(xw(e.operator)," ").concat(e.name):e.name,n={attribute:e.attribute,type:e.type,value:t,label:r};return e.operator!==void 0&&(n.operator=e.operator),e.count!==void 0&&(n.count=e.count),e.exhaustive!==void 0&&(n.exhaustive=e.exhaustive),n}function kw(e){return e.type==="numeric"?Number(e.name):"escapedValue"in e?e.escapedValue:e.name}function ca(e){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(e)}var Aw=["name","escapedValue","data","path"];function rf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rf(Object(r),!0).forEach(function(n){Ei(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ei(e,t,r){return t=jw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jw(e){var t=$w(e,"string");return ca(t)=="symbol"?t:String(t)}function $w(e,t){if(ca(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ca(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dw(e,t){if(e==null)return{};var r=Nw(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Nw(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Fw(e,t){return Bw(e)||Lw(e,t)||Mw(e,t)||Iw()}function Iw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mw(e,t){if(e){if(typeof e=="string")return nf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nf(e,t)}}function nf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lw(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function Bw(e){if(Array.isArray(e))return e}var pl=Ge({name:"hierarchical-menu",connector:!0}),af=["name:asc"],Hw=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,pl()),function(n){var a=n||{},o=a.attributes,s=a.separator,u=s===void 0?" > ":s,d=a.rootPath,p=d===void 0?null:d,m=a.showParentLevel,v=m===void 0?!0:m,h=a.limit,l=h===void 0?10:h,c=a.showMore,g=c===void 0?!1:c,y=a.showMoreLimit,f=y===void 0?20:y,b=a.sortBy,w=b===void 0?af:b,_=a.transformItems,S=_===void 0?function(D){return D}:_;if(!o||!Array.isArray(o)||o.length===0)throw new Error(pl("The `attributes` option expects an array of strings."));if(g===!0&&f<=l)throw new Error(pl("The `showMoreLimit` option must be greater than `limit`."));var R=Fw(o,1),O=R[0],P,C=function(){};function k(){C()}var A,H=!1;function Q(D,I){return function(){H=!H,I.render(D)}}function $(){return H?f:l}function M(D){return D.slice(0,$()).map(function(I){var U=I.name,B=I.escapedValue,Y=I.data;I.path;var q=Dw(I,Aw),ne=Rt(Rt({},q),{},{value:B,label:U,data:null});return Array.isArray(Y)&&(ne.data=M(Y)),ne})}return{$$type:"ais.hierarchicalMenu",init:function(I){var U=I.instantSearchInstance;t(Rt(Rt({},this.getWidgetRenderState(I)),{},{instantSearchInstance:U}),!0)},render:function(I){var U=I.instantSearchInstance;C=Q(I,this),t(Rt(Rt({},this.getWidgetRenderState(I)),{},{instantSearchInstance:U}),!1)},dispose:function(I){var U=I.state;return r(),U.removeHierarchicalFacet(O).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(I,U){return Rt(Rt({},I),{},{hierarchicalMenu:Rt(Rt({},I.hierarchicalMenu),{},Ei({},O,this.getWidgetRenderState(U)))})},getWidgetRenderState:function(I){var U=this,B=I.results,Y=I.state,q=I.createURL,ne=I.instantSearchInstance,L=I.helper,K=[],W=!1,ee=function(Z){return q(function(be){return U.getWidgetUiState(be,{searchParameters:Y.resetPage().toggleFacetRefinement(O,Z),helper:L})})};if(P||(P=gs({instantSearchInstance:ne,helper:L,attribute:function(Z){var be=Z.split(u).length-1;return o[be]},widgetType:this.$$type})),A||(A=function(Z){P("click:internal",Z),L.toggleFacetRefinement(O,Z).search()}),B){var x=B.getFacetValues(O,{sortBy:w,facetOrdering:w===af}),z=x&&!Array.isArray(x)&&x.data?x.data:[],ie=(Y.maxValuesPerFacet||0)>$()?z.length<=$():z.length<$();W=g&&(H||!ie),K=S(M(z),{results:B})}return{items:K,refine:A,canRefine:K.length>0,createURL:ee,sendEvent:P,widgetParams:n,isShowingMore:H,toggleShowMore:k,canToggleShowMore:W}},getWidgetUiState:function(I,U){var B=U.searchParameters,Y=B.getHierarchicalFacetBreadcrumb(O);return Vw(Rt(Rt({},I),{},{hierarchicalMenu:Rt(Rt({},I.hierarchicalMenu),{},Ei({},O,Y))}),O)},getWidgetSearchParameters:function(I,U){var B=U.uiState,Y=B.hierarchicalMenu&&B.hierarchicalMenu[O];if(I.isConjunctiveFacet(O)||I.isDisjunctiveFacet(O))return process.env.NODE_ENV==="development"&&ke(!1,'HierarchicalMenu: Attribute "'.concat(O,`" is already used by another widget applying conjunctive or disjunctive faceting.
|
|
60
|
+
As this is not supported, please make sure to remove this other widget or this HierarchicalMenu widget will not work at all.`)),I;if(I.isHierarchicalFacet(O)){var q=I.getHierarchicalFacetByName(O);process.env.NODE_ENV==="development"&&ke(Gr(q.attributes,o)&&q.separator===u&&q.rootPath===p,"Using Breadcrumb and HierarchicalMenu on the same facet with different options overrides the configuration of the HierarchicalMenu.")}var ne=I.removeHierarchicalFacet(O).addHierarchicalFacet({name:O,attributes:o,separator:u,rootPath:p,showParentLevel:v}),L=ne.maxValuesPerFacet||0,K=Math.max(L,g?f:l),W=ne.setQueryParameter("maxValuesPerFacet",K);return Y?W.addHierarchicalFacetRefinement(O,Y.join(u)):W.setQueryParameters({hierarchicalFacetsRefinements:Rt(Rt({},W.hierarchicalFacetsRefinements),{},Ei({},O,[]))})}}}};function Vw(e,t){return e.hierarchicalMenu&&((!e.hierarchicalMenu[t]||e.hierarchicalMenu[t].length===0)&&delete e.hierarchicalMenu[t],Object.keys(e.hierarchicalMenu).length===0&&delete e.hierarchicalMenu),e}function da(e){"@babel/helpers - typeof";return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},da(e)}function of(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?of(Object(r),!0).forEach(function(n){sf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):of(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sf(e,t,r){return t=qw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qw(e){var t=Uw(e,"string");return da(t)=="symbol"?t:String(t)}function Uw(e,t){if(da(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(da(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ww=Ge({name:"hits",connector:!0});const zw=(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,Ww()),function(n){var a=n||{},o=a.escapeHTML,s=o===void 0?!0:o,u=a.transformItems,d=u===void 0?function(v){return v}:u,p,m;return{$$type:"ais.hits",init:function(h){t(jr(jr({},this.getWidgetRenderState(h)),{},{instantSearchInstance:h.instantSearchInstance}),!0)},render:function(h){var l=this.getWidgetRenderState(h);t(jr(jr({},l),{},{instantSearchInstance:h.instantSearchInstance}),!1),l.sendEvent("view:internal",l.items)},getRenderState:function(h,l){return jr(jr({},h),{},{hits:this.getWidgetRenderState(l)})},getWidgetRenderState:function(h){var l,c,g,y=h.results,f=h.helper,b=h.instantSearchInstance;if(p||(p=vs({instantSearchInstance:b,helper:f,widgetType:this.$$type})),m||(m=Dc({helper:f,widgetType:this.$$type,instantSearchInstance:b})),!y)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:p,bindEvent:m,widgetParams:n};s&&y.hits.length>0&&(y.hits=Si(y.hits));var w=Rs(y.hits,y.page,y.hitsPerPage),_=Ps(w,y.queryID),S=d(_,{results:y}),R=(l=y.renderingContent)===null||l===void 0||(c=l.widgets)===null||c===void 0||(g=c.banners)===null||g===void 0?void 0:g[0];return{hits:S,items:S,results:y,banner:R,sendEvent:p,bindEvent:m,widgetParams:n}},dispose:function(h){var l=h.state;return r(),s?l.setQueryParameters(Object.keys(sr).reduce(function(c,g){return jr(jr({},c),{},sf({},g,void 0))},{})):l},getWidgetSearchParameters:function(h,l){return s?h.setQueryParameters(sr):h}}}});function fa(e){"@babel/helpers - typeof";return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fa(e)}function lf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lf(Object(r),!0).forEach(function(n){Yw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yw(e,t,r){return t=Qw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qw(e){var t=Kw(e,"string");return fa(t)=="symbol"?t:String(t)}function Kw(e,t){if(fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gw=function(t,r){return r.map(function(n){var a=Pr(t,function(o){return o.objectID===n});if(typeof a>"u")throw new Error('Could not find objectID "'.concat(n,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return a})},Jw=function(t){var r=Es(t.map(function(a){return a.__queryID}));if(r.length>1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var n=r[0];if(typeof n!="string")throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return n},Xw=function(t){return t.map(function(r){return r.__position})},Zw=function(t){var r=t.method,n=t.results,a=t.hits,o=t.objectIDs,s=n.index,u=Gw(a,o),d=Jw(u);switch(r){case"clickedObjectIDsAfterSearch":{var p=Xw(u);return{index:s,queryID:d,objectIDs:o,positions:p}}case"convertedObjectIDsAfterSearch":return{index:s,queryID:d,objectIDs:o};default:throw new Error('Unsupported method passed to insights: "'.concat(r,'".'))}},e_=function(t,r,n){return function(a){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];var d=s[0];if(process.env.NODE_ENV==="development"&&ke(!1,"`insights` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/"),!t){var p=Ge({name:"instantsearch"});throw new Error(p("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(d.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var m=Zw({method:a,results:r,hits:n,objectIDs:d.objectIDs});t(a,Ci(Ci({},m),d))}};function uf(e){return function(t,r){return e(function(n,a){var o=n.results,s=n.hits,u=n.instantSearchInstance;if(o&&s&&u){var d=e_(u.insightsClient,o,s);return t(Ci(Ci({},n),{},{insights:d}),a)}return t(n,a)},r)}}function ml(e){"@babel/helpers - typeof";return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}function t_(e){var t=e.method,r=e.payload;if(ml(r)!=="object")throw new Error("The insights helper expects the payload to be an object.");var n;try{n=kc(r)}catch{throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(n,'"')}function cf(e,t){return process.env.NODE_ENV==="development"&&ke(!1,"`insights` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/"),t_({method:e,payload:t})}var r_=uf(zw);function ha(e){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(e)}function n_(e){return s_(e)||o_(e)||i_(e)||a_()}function a_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
61
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i_(e,t){if(e){if(typeof e=="string")return gl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gl(e,t)}}function o_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s_(e){if(Array.isArray(e))return gl(e)}function gl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?df(Object(r),!0).forEach(function(n){l_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l_(e,t,r){return t=u_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u_(e){var t=c_(e,"string");return ha(t)=="symbol"?t:String(t)}function c_(e,t){if(ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xi=Ge({name:"hits-per-page",connector:!0}),d_=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,xi()),function(n){var a=n||{},o=a.items,s=a.transformItems,u=s===void 0?function(l){return l}:s;if(!Array.isArray(o))throw new Error(xi("The `items` option expects an array of objects."));var d=o,p=d.filter(function(l){return l.default===!0});if(p.length===0)throw new Error(xi("A default value must be specified in `items`."));if(p.length>1)throw new Error(xi("More than one default value is specified in `items`."));var m=p[0],v=function(c){var g=c.hitsPerPage;return d.map(function(y){return cr(cr({},y),{},{isRefined:Number(y.value)===Number(g)})})},h={getRefine:function(c){return function(g){return!g&&g!==0?c.setQueryParameter("hitsPerPage",void 0).search():c.setQueryParameter("hitsPerPage",g).search()}},createURLFactory:function(c){var g=c.state,y=c.createURL,f=c.getWidgetUiState,b=c.helper;return function(w){return y(function(_){return f(_,{searchParameters:g.resetPage().setQueryParameter("hitsPerPage",!w&&w!==0?void 0:w),helper:b})})}}};return{$$type:"ais.hitsPerPage",init:function(c){var g=c.state,y=c.instantSearchInstance,f=d.some(function(b){return Number(g.hitsPerPage)===Number(b.value)});f||(process.env.NODE_ENV==="development"&&ke(g.hitsPerPage!==void 0,"\n`hitsPerPage` is not defined.\nThe option `hitsPerPage` needs to be set using the `configure` widget.\n\nLearn more: https://www.algolia.com/doc/api-reference/widgets/hits-per-page/js/\n "),process.env.NODE_ENV==="development"&&ke(!1,'\nThe `items` option of `hitsPerPage` does not contain the "hits per page" value coming from the state: '.concat(g.hitsPerPage,".\n\nYou may want to add another entry to the `items` option with this value.")),d=[{value:"",label:""}].concat(n_(d))),t(cr(cr({},this.getWidgetRenderState(c)),{},{instantSearchInstance:y}),!0)},render:function(c){var g=c.instantSearchInstance;t(cr(cr({},this.getWidgetRenderState(c)),{},{instantSearchInstance:g}),!1)},dispose:function(c){var g=c.state;return r(),g.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(c,g){return cr(cr({},c),{},{hitsPerPage:this.getWidgetRenderState(g)})},getWidgetRenderState:function(c){var g=c.state,y=c.results,f=c.createURL,b=c.helper,w=y?y.nbHits>0:!1;return{items:u(v(g),{results:y}),refine:h.getRefine(b),createURL:h.createURLFactory({state:g,createURL:f,getWidgetUiState:this.getWidgetUiState,helper:b}),hasNoResults:!w,canRefine:w,widgetParams:n}},getWidgetUiState:function(c,g){var y=g.searchParameters,f=y.hitsPerPage;return f===void 0||f===m.value?c:cr(cr({},c),{},{hitsPerPage:f})},getWidgetSearchParameters:function(c,g){var y=g.uiState;return c.setQueryParameters({hitsPerPage:y.hitsPerPage||m.value})}}}};function pa(e){"@babel/helpers - typeof";return pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(e)}var f_=["page"],h_=["clickAnalytics","userToken"];function ff(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ff(Object(r),!0).forEach(function(n){hf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ff(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hf(e,t,r){return t=p_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p_(e){var t=m_(e,"string");return pa(t)=="symbol"?t:String(t)}function m_(e,t){if(pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pf(e){return b_(e)||v_(e)||y_(e)||g_()}function g_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y_(e,t){if(e){if(typeof e=="string")return yl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yl(e,t)}}function v_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b_(e){if(Array.isArray(e))return yl(e)}function yl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mf(e,t){if(e==null)return{};var r=w_(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w_(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var __=Ge({name:"infinite-hits",connector:!0});function gf(e){var t=e||{};t.page;var r=mf(t,f_);return r}function yf(e){var t=e||{};t.clickAnalytics,t.userToken;var r=mf(t,h_);return r}function S_(){var e=null,t=null;return{read:function(n){var a=n.state;return Gr(t,gf(a))?e:null},write:function(n){var a=n.state,o=n.hits;t=gf(a),e=o}}}function R_(e){return Object.keys(e).map(Number).sort(function(t,r){return t-r}).reduce(function(t,r){return t.concat(e[r])},[])}var P_=uf((function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,__()),function(n){var a=n||{},o=a.escapeHTML,s=o===void 0?!0:o,u=a.transformItems,d=u===void 0?function(w){return w}:u,p=a.cache,m=p===void 0?S_():p,v,h,l,c,g=function(_,S){var R=_.page,O=R===void 0?0:R,P=Object.keys(S).map(Number);return P.length===0?O:Math.min.apply(Math,[O].concat(pf(P)))},y=function(_,S){var R=_.page,O=R===void 0?0:R,P=Object.keys(S).map(Number);return P.length===0?O:Math.max.apply(Math,[O].concat(pf(P)))},f=function(_,S){return function(){var R=S();_.overrideStateWithoutTriggeringChangeEvent(Vt(Vt({},_.state),{},{page:g(_.state,R)-1})).searchWithoutTriggeringOnStateChange()}},b=function(_,S){return function(){var R=S();_.setPage(y(_.state,R)+1).search()}};return{$$type:"ais.infiniteHits",init:function(_){t(Vt(Vt({},this.getWidgetRenderState(_)),{},{instantSearchInstance:_.instantSearchInstance}),!0)},render:function(_){var S=_.instantSearchInstance,R=this.getWidgetRenderState(_);t(Vt(Vt({},R),{},{instantSearchInstance:S}),!1),l("view:internal",R.currentPageHits)},getRenderState:function(_,S){return Vt(Vt({},_),{},{infiniteHits:this.getWidgetRenderState(S)})},getWidgetRenderState:function(_){var S,R,O,P=_.results,C=_.helper,k=_.parent,A=_.state,H=_.instantSearchInstance,Q=function(){var Z=k.getPreviousState()||A;return m.read({state:yf(Z)})||{}},$,M=[],D=k.getPreviousState()||A,I=Q(),U=P==null||(S=P.renderingContent)===null||S===void 0||(R=S.widgets)===null||R===void 0||(O=R.banners)===null||O===void 0?void 0:O[0];if(v||(v=function(){return f(C,Q)()},h=function(){return b(C,Q)()}),l||(l=vs({instantSearchInstance:H,helper:C,widgetType:this.$$type}),c=Dc({helper:C,widgetType:this.$$type,instantSearchInstance:H})),!P)$=D.page===void 0||g(D,I)===0;else{var B,Y,q=D.page,ne=q===void 0?0:q;s&&P.hits.length>0&&(P.hits=Si(P.hits));var L=Rs(P.hits,P.page,P.hitsPerPage),K=Ps(L,P.queryID),W=d(K,{results:P}),ee=!1;Yc(H.mainIndex,function(we){!ee&&we.getWidgets().some(function(Z){var be=Z.$$type;return be==="ais.dynamicWidgets"})&&(ee=!0)});var x=!((B=D.disjunctiveFacets)!==null&&B!==void 0&&B.length)&&!(D.facets||[]).filter(function(we){return we!=="*"}).length&&!((Y=D.hierarchicalFacets)!==null&&Y!==void 0&&Y.length);I[ne]===void 0&&!P.__isArtificial&&H.status==="idle"&&!(ee&&x)&&(I[ne]=W,m.write({state:yf(D),hits:I})),M=W,$=g(D,I)===0}var z=R_(I),ie=P?P.nbPages<=y(D,I)+1:!0;return{hits:z,items:z,currentPageHits:M,sendEvent:l,bindEvent:c,banner:U,results:P||void 0,showPrevious:v,showMore:h,isFirstPage:$,isLastPage:ie,widgetParams:n}},dispose:function(_){var S=_.state;r();var R=S.setQueryParameter("page",void 0);return s?R.setQueryParameters(Object.keys(sr).reduce(function(O,P){return Vt(Vt({},O),{},hf({},P,void 0))},{})):R},getWidgetUiState:function(_,S){var R=S.searchParameters,O=R.page||0;return O?Vt(Vt({},_),{},{page:O+1}):_},getWidgetSearchParameters:function(_,S){var R=S.uiState,O=_;s&&(O=_.setQueryParameters(sr));var P=R.page?R.page-1:0;return O.setQueryParameter("page",P)}}}})),O_=["name","escapedValue","path"];function ma(e){"@babel/helpers - typeof";return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(e)}function E_(e,t){if(e==null)return{};var r=C_(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function C_(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function vf(e,t){return A_(e)||k_(e,t)||T_(e,t)||x_()}function x_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T_(e,t){if(e){if(typeof e=="string")return bf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bf(e,t)}}function bf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function k_(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function A_(e){if(Array.isArray(e))return e}function wf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wf(Object(r),!0).forEach(function(n){Ti(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ti(e,t,r){return t=j_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j_(e){var t=$_(e,"string");return ma(t)=="symbol"?t:String(t)}function $_(e,t){if(ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vl=Ge({name:"menu",connector:!0}),_f=["isRefined","name:asc"],Sf=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,vl()),function(n){var a=n||{},o=a.attribute,s=a.limit,u=s===void 0?10:s,d=a.showMore,p=d===void 0?!1:d,m=a.showMoreLimit,v=m===void 0?20:m,h=a.sortBy,l=h===void 0?_f:h,c=a.transformItems,g=c===void 0?function(P){return P}:c;if(!o)throw new Error(vl("The `attribute` option is required."));if(p===!0&&v<=u)throw new Error(vl("The `showMoreLimit` option must be greater than `limit`."));var y,f,b,w=!1,_=function(){};function S(P,C){return function(){w=!w,C.render(P)}}function R(){_()}function O(){return w?v:u}return{$$type:"ais.menu",init:function(C){var k=C.instantSearchInstance;t(Pt(Pt({},this.getWidgetRenderState(C)),{},{instantSearchInstance:k}),!0)},render:function(C){var k=C.instantSearchInstance;t(Pt(Pt({},this.getWidgetRenderState(C)),{},{instantSearchInstance:k}),!1)},dispose:function(C){var k=C.state;return r(),k.removeHierarchicalFacet(o).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(C,k){return Pt(Pt({},C),{},{menu:Pt(Pt({},C.menu),{},Ti({},o,this.getWidgetRenderState(k)))})},getWidgetRenderState:function(C){var k=this,A=C.results,H=C.createURL,Q=C.instantSearchInstance,$=C.helper,M=[],D=!1;if(y||(y=gs({instantSearchInstance:Q,helper:$,attribute:o,widgetType:this.$$type})),f||(f=function(Y){return H(function(q){return k.getWidgetUiState(q,{searchParameters:$.state.resetPage().toggleFacetRefinement(o,Y),helper:$})})}),b||(b=function(Y){var q=$.getHierarchicalFacetBreadcrumb(o),ne=vf(q,1),L=ne[0];y("click:internal",Y||L),$.toggleFacetRefinement(o,Y||L).search()}),C.results&&(_=S(C,this)),A){var I=A.getFacetValues(o,{sortBy:l,facetOrdering:l===_f}),U=I&&!Array.isArray(I)&&I.data?I.data:[];D=p&&(w||U.length>O()),M=g(U.slice(0,O()).map(function(B){var Y=B.name,q=B.escapedValue;B.path;var ne=E_(B,O_);return Pt(Pt({},ne),{},{label:Y,value:q})}),{results:A})}return{items:M,createURL:f,refine:b,sendEvent:y,canRefine:M.length>0,widgetParams:n,isShowingMore:w,toggleShowMore:R,canToggleShowMore:D}},getWidgetUiState:function(C,k){var A=k.searchParameters,H=A.getHierarchicalFacetBreadcrumb(o),Q=vf(H,1),$=Q[0];return D_(Pt(Pt({},C),{},{menu:Pt(Pt({},C.menu),{},Ti({},o,$))}),o)},getWidgetSearchParameters:function(C,k){var A=k.uiState,H=A.menu&&A.menu[o];if(C.isConjunctiveFacet(o)||C.isDisjunctiveFacet(o))return process.env.NODE_ENV==="development"&&ke(!1,'Menu: Attribute "'.concat(o,`" is already used by another widget applying conjunctive or disjunctive faceting.
|
|
64
|
+
As this is not supported, please make sure to remove this other widget or this Menu widget will not work at all.`)),C;var Q=C.removeHierarchicalFacet(o).addHierarchicalFacet({name:o,attributes:[o]}),$=Q.maxValuesPerFacet||0,M=Math.max($,p?v:u),D=Q.setQueryParameter("maxValuesPerFacet",M);return H?D.addHierarchicalFacetRefinement(o,H):D.setQueryParameters({hierarchicalFacetsRefinements:Pt(Pt({},D.hierarchicalFacetsRefinements),{},Ti({},o,[]))})}}}};function D_(e,t){return e.menu&&(e.menu[t]===void 0&&delete e.menu[t],Object.keys(e.menu).length===0&&delete e.menu),e}function ga(e){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function N_(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Rf(e))||t){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
65
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,u;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return o=p.done,p},e:function(p){s=!0,u=p},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw u}}}}function F_(e,t){return L_(e)||M_(e,t)||Rf(e,t)||I_()}function I_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rf(e,t){if(e){if(typeof e=="string")return Pf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pf(e,t)}}function Pf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M_(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function L_(e){if(Array.isArray(e))return e}function Of(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Of(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Of(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ya(e,t,r){return t=B_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B_(e){var t=H_(e,"string");return ga(t)=="symbol"?t:String(t)}function H_(e,t){if(ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bl=Ge({name:"numeric-menu",connector:!0}),V_="ais.numericMenu",q_=function(t){var r=t.instantSearchInstance;return function(){if(arguments.length===1){r.sendEventToInsights(arguments.length<=0?void 0:arguments[0]);return}}},U_=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,bl()),function(n){var a=n||{},o=a.attribute,s=o===void 0?"":o,u=a.items,d=u===void 0?[]:u,p=a.transformItems,m=p===void 0?function(l){return l}:p;if(s==="")throw new Error(bl("The `attribute` option is required."));if(!d||d.length===0)throw new Error(bl("The `items` option expects an array of objects."));var v=function(c){return d.map(function(g){var y=g.start,f=g.end,b=g.label;return{label:b,value:encodeURI(JSON.stringify({start:y,end:f})),isRefined:Ef(c,s,{start:y,end:f})}})},h={};return{$$type:V_,init:function(c){var g=c.instantSearchInstance;t(yt(yt({},this.getWidgetRenderState(c)),{},{instantSearchInstance:g}),!0)},render:function(c){var g=c.instantSearchInstance;t(yt(yt({},this.getWidgetRenderState(c)),{},{instantSearchInstance:g}),!1)},dispose:function(c){var g=c.state;return r(),g.removeNumericRefinement(s)},getWidgetUiState:function(c,g){var y=g.searchParameters,f=y.getNumericRefinements(s),b=f["="]&&f["="][0];if(b||b===0)return yt(yt({},c),{},{numericMenu:yt(yt({},c.numericMenu),{},ya({},s,"".concat(f["="])))});var w=f[">="]&&f[">="][0]||"",_=f["<="]&&f["<="][0]||"";return W_(yt(yt({},c),{},{numericMenu:yt(yt({},c.numericMenu),{},ya({},s,"".concat(w,":").concat(_)))}),s)},getWidgetSearchParameters:function(c,g){var y=g.uiState,f=y.numericMenu&&y.numericMenu[s],b=c.setQueryParameters({numericRefinements:yt(yt({},c.numericRefinements),{},ya({},s,{}))});if(!f)return b;var w=f.indexOf(":")===-1;if(w)return b.addNumericRefinement(s,"=",Number(f));var _=f.split(":").map(parseFloat),S=F_(_,2),R=S[0],O=S[1],P=Qe(R)?b.addNumericRefinement(s,">=",R):b,C=Qe(O)?P.addNumericRefinement(s,"<=",O):P;return C},getRenderState:function(c,g){return yt(yt({},c),{},{numericMenu:yt(yt({},c.numericMenu),{},ya({},s,this.getWidgetRenderState(g)))})},getWidgetRenderState:function(c){var g=this,y=c.results,f=c.state,b=c.instantSearchInstance,w=c.helper,_=c.createURL;h.refine||(h.refine=function(A){var H=Cf(w.state,s,A);h.sendEvent("click:internal",A),w.setState(H).search()}),h.createURL||(h.createURL=function(A){return function(H){return _(function(Q){return g.getWidgetUiState(Q,{searchParameters:Cf(A,s,H),helper:w})})}}),h.sendEvent||(h.sendEvent=q_({instantSearchInstance:b}));var S=y?y.nbHits===0:!0,R=v(f),O=!0,P=N_(R),C;try{for(P.s();!(C=P.n()).done;){var k=C.value;if(k.isRefined&&decodeURI(k.value)!=="{}"){O=!1;break}}}catch(A){P.e(A)}finally{P.f()}return{createURL:h.createURL(f),items:m(R,{results:y}),hasNoResults:S,canRefine:!(S&&O),refine:h.refine,sendEvent:h.sendEvent,widgetParams:n}}}}};function Ef(e,t,r){var n=e.getNumericRefinements(t);return r.start!==void 0&&r.end!==void 0?r.start===r.end?$r(n,"=",r.start):$r(n,">=",r.start)&&$r(n,"<=",r.end):r.start!==void 0?$r(n,">=",r.start):r.end!==void 0?$r(n,"<=",r.end):r.start===void 0&&r.end===void 0?Object.keys(n).every(function(a){return(n[a]||[]).length===0}):!1}function Cf(e,t,r){var n=e,a=JSON.parse(decodeURI(r)),o=n.getNumericRefinements(t);if(a.start===void 0&&a.end===void 0)return n.removeNumericRefinement(t);if(Ef(n,t,a)||(n=n.removeNumericRefinement(t)),a.start!==void 0&&a.end!==void 0){if(a.start>a.end)throw new Error("option.start should be > to option.end");if(a.start===a.end)return $r(o,"=",a.start)?n=n.removeNumericRefinement(t,"=",a.start):n=n.addNumericRefinement(t,"=",a.start),n}return a.start!==void 0&&($r(o,">=",a.start)&&(n=n.removeNumericRefinement(t,">=",a.start)),n=n.addNumericRefinement(t,">=",a.start)),a.end!==void 0&&($r(o,"<=",a.end)&&(n=n.removeNumericRefinement(t,"<=",a.end)),n=n.addNumericRefinement(t,"<=",a.end)),typeof n.page=="number"&&(n.page=0),n}function $r(e,t,r){return e[t]!==void 0&&e[t].includes(r)}function W_(e,t){return e.numericMenu&&(e.numericMenu[t]===":"&&delete e.numericMenu[t],Object.keys(e.numericMenu).length===0&&delete e.numericMenu),e}function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}function z_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xf(n.key),n)}}function Q_(e,t,r){return t&&Y_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wl(e,t,r){return t=xf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xf(e){var t=K_(e,"string");return va(t)=="symbol"?t:String(t)}function K_(e,t){if(va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var G_=(function(){function e(t){z_(this,e),wl(this,"currentPage",void 0),wl(this,"total",void 0),wl(this,"padding",void 0),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return Q_(e,[{key:"pages",value:function(){var r=this.total,n=this.currentPage,a=this.padding;if(r===0)return[0];var o=this.nbPagesDisplayed(a,r);if(o===r)return Kc({end:r});var s=this.calculatePaddingLeft(n,a,r,o),u=o-s,d=n-s,p=n+u;return Kc({start:d,end:p})}},{key:"nbPagesDisplayed",value:function(r,n){return Math.min(2*r+1,n)}},{key:"calculatePaddingLeft",value:function(r,n,a,o){return r<=n?r:r>=a-n?o-(a-r):n}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),e})();function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function Tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tf(Object(r),!0).forEach(function(n){J_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J_(e,t,r){return t=X_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X_(e){var t=Z_(e,"string");return ba(t)=="symbol"?t:String(t)}function Z_(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e1=Ge({name:"pagination",connector:!0}),t1=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,e1()),function(n){var a=n||{},o=a.totalPages,s=a.padding,u=s===void 0?3:s,d=new G_({currentPage:0,total:0,padding:u}),p={};function m(v){var h=v.nbPages;return o!==void 0?Math.min(o,h):h}return{$$type:"ais.pagination",init:function(h){var l=h.instantSearchInstance;t(dr(dr({},this.getWidgetRenderState(h)),{},{instantSearchInstance:l}),!0)},render:function(h){var l=h.instantSearchInstance;t(dr(dr({},this.getWidgetRenderState(h)),{},{instantSearchInstance:l}),!1)},dispose:function(h){var l=h.state;return r(),l.setQueryParameter("page",void 0)},getWidgetUiState:function(h,l){var c=l.searchParameters,g=c.page||0;return g?dr(dr({},h),{},{page:g+1}):h},getWidgetSearchParameters:function(h,l){var c=l.uiState,g=c.page?c.page-1:0;return h.setQueryParameter("page",g)},getWidgetRenderState:function(h){var l=h.results,c=h.helper,g=h.state,y=h.createURL;p.refine||(p.refine=function(w){c.setPage(w),c.search()}),p.createURL||(p.createURL=function(w){return y(function(_){return dr(dr({},_),{},{page:w+1})})});var f=g.page||0,b=m(l||{nbPages:0});return d.currentPage=f,d.total=b,{createURL:p.createURL,refine:p.refine,canRefine:b>1,currentRefinement:f,nbHits:l?.nbHits||0,nbPages:b,pages:l?d.pages():[],isFirstPage:d.isFirstPage(),isLastPage:d.isLastPage(),widgetParams:n}},getRenderState:function(h,l){return dr(dr({},h),{},{pagination:this.getWidgetRenderState(l)})}}}};function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function kf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kf(Object(r),!0).forEach(function(n){ki(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ki(e,t,r){return t=r1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r1(e){var t=n1(e,"string");return wa(t)=="symbol"?t:String(t)}function n1(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _n(e,t){return s1(e)||o1(e,t)||i1(e,t)||a1()}function a1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
67
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i1(e,t){if(e){if(typeof e=="string")return Af(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Af(e,t)}}function Af(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o1(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function s1(e){if(Array.isArray(e))return e}var _l=Ge({name:"range-input",connector:!0},{name:"range-slider",connector:!0}),l1="ais.range";function jf(e){var t=e.min,r=e.max,n=e.precision,a=Math.pow(10,n);return{min:t&&Math.floor(t*a)/a,max:r&&Math.ceil(r*a)/a}}var u1=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,_l()),function(n){var a=n||{},o=a.attribute,s=o===void 0?"":o,u=a.min,d=a.max,p=a.precision,m=p===void 0?0:p;if(!s)throw new Error(_l("The `attribute` option is required."));if(Qe(u)&&Qe(d)&&u>d)throw new Error(_l("The `max` option can't be lower than `min`."));var v=function(w){return Number(Number(w).toFixed(m))},h={from:function(w){return w.toLocaleString()},to:function(w){return v(w).toLocaleString()}},l=function(w,_,S,R){var O=w.state,P=_.min,C=_.max,k=O.getNumericRefinement(s,">=")||[],A=_n(k,1),H=A[0],Q=O.getNumericRefinement(s,"<=")||[],$=_n(Q,1),M=$[0],D=S===void 0||S==="",I=R===void 0||R==="",U=jf({min:D?void 0:parseFloat(S),max:I?void 0:parseFloat(R),precision:m}),B=U.min,Y=U.max,q;!Qe(u)&&P===B?q=void 0:Qe(u)&&D?q=u:q=B;var ne;!Qe(d)&&C===Y?ne=void 0:Qe(d)&&I?ne=d:ne=Y;var L=q===void 0,K=Qe(P)&&P<=q,W=L||Qe(q)&&(!Qe(P)||K),ee=ne===void 0,x=Qe(ne)&&C>=ne,z=ee||Qe(ne)&&(!Qe(C)||x),ie=H!==q,we=M!==ne;return(ie||we)&&W&&z?(O=O.removeNumericRefinement(s),Qe(q)&&(O=O.addNumericRefinement(s,">=",q)),Qe(ne)&&(O=O.addNumericRefinement(s,"<=",ne)),O.resetPage()):null},c=function(w){return function(){if(arguments.length===1){w.sendEventToInsights(arguments.length<=0?void 0:arguments[0]);return}}};function g(b){var w;Qe(u)?w=u:Qe(b.min)?w=b.min:w=0;var _;return Qe(d)?_=d:Qe(b.max)?_=b.max:_=0,jf({min:w,max:_,precision:m})}function y(b){var w=b.getNumericRefinement(s,">=")||[],_=_n(w,1),S=_[0],R=b.getNumericRefinement(s,"<=")||[],O=_n(R,1),P=O[0],C=Qe(S)?S:-1/0,k=Qe(P)?P:1/0;return[C,k]}function f(b,w){return function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[void 0,void 0],S=_n(_,2),R=S[0],O=S[1],P=l(b,w,R,O);P&&b.setState(P).search()}}return{$$type:l1,init:function(w){t(Ot(Ot({},this.getWidgetRenderState(w)),{},{instantSearchInstance:w.instantSearchInstance}),!0)},render:function(w){t(Ot(Ot({},this.getWidgetRenderState(w)),{},{instantSearchInstance:w.instantSearchInstance}),!1)},getRenderState:function(w,_){return Ot(Ot({},w),{},{range:Ot(Ot({},w.range),{},ki({},s,this.getWidgetRenderState(_)))})},getWidgetRenderState:function(w){var _=w.results,S=w.helper,R=w.instantSearchInstance,O=_&&_.disjunctiveFacets||[],P=Pr(O,function(Q){return Q.name===s}),C=P&&P.stats||{min:void 0,max:void 0},k=g(C),A=y(S),H;return _?H=f(S,k):H=f(S,{min:void 0,max:void 0}),{refine:H,canRefine:k.min!==k.max,format:h,range:k,sendEvent:c(R),widgetParams:Ot(Ot({},n),{},{precision:m}),start:A}},dispose:function(w){var _=w.state;return r(),_.removeDisjunctiveFacet(s).removeNumericRefinement(s)},getWidgetUiState:function(w,_){var S=_.searchParameters,R=S.getNumericRefinements(s),O=R[">="],P=O===void 0?[]:O,C=R["<="],k=C===void 0?[]:C;return P.length===0&&k.length===0?w:Ot(Ot({},w),{},{range:Ot(Ot({},w.range),{},ki({},s,"".concat(P,":").concat(k)))})},getWidgetSearchParameters:function(w,_){var S=_.uiState,R=w.addDisjunctiveFacet(s).setQueryParameters({numericRefinements:Ot(Ot({},w.numericRefinements),{},ki({},s,{}))});Qe(u)&&(R=R.addNumericRefinement(s,">=",u)),Qe(d)&&(R=R.addNumericRefinement(s,"<=",d));var O=S.range&&S.range[s];if(!O||O.indexOf(":")===-1)return R;var P=O.split(":").map(parseFloat),C=_n(P,2),k=C[0],A=C[1];return Qe(k)&&(!Qe(u)||u<k)&&(R=R.removeNumericRefinement(s,">="),R=R.addNumericRefinement(s,">=",k)),Qe(A)&&(!Qe(d)||A<d)&&(R=R.removeNumericRefinement(s,"<="),R=R.addNumericRefinement(s,"<=",A)),R}}}};function _a(e){"@babel/helpers - typeof";return _a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(e)}var c1=["name","escapedValue"],d1=["escapedValue","value"];function $f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$f(Object(r),!0).forEach(function(n){Sa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$f(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sa(e,t,r){return t=f1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f1(e){var t=h1(e,"string");return _a(t)=="symbol"?t:String(t)}function h1(e,t){if(_a(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_a(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Df(e,t){if(e==null)return{};var r=p1(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function p1(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var Ai=Ge({name:"refinement-list",connector:!0}),Nf=["isRefined","count:desc","name:asc"],m1=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,Ai()),function(n){var a=n||{},o=a.attribute,s=a.operator,u=s===void 0?"or":s,d=a.limit,p=d===void 0?10:d,m=a.showMore,v=m===void 0?!1:m,h=a.showMoreLimit,l=h===void 0?20:h,c=a.sortBy,g=c===void 0?Nf:c,y=a.escapeFacetValues,f=y===void 0?!0:y,b=a.transformItems,w=b===void 0?function(I){return I}:b;if(!o)throw new Error(Ai("The `attribute` option is required."));if(!/^(and|or)$/.test(u))throw new Error(Ai('The `operator` must one of: `"and"`, `"or"` (got "'.concat(u,'").')));if(v===!0&&l<=p)throw new Error(Ai("`showMoreLimit` should be greater than `limit`."));var _=function(U){var B=U.name,Y=U.escapedValue,q=Df(U,c1);return Je(Je({},q),{},{value:Y,label:B,highlighted:B})},S,R=[],O=!0,P,C,k=!1,A=function(){};function H(){A()}function Q(I,U){return function(){k=!k,U.render(I)}}function $(){return k?l:p}var M=function(){return function(){}},D=function(U,B){return function(Y){return function(q){var ne=Y.instantSearchInstance,L=Y.results;if(q===""&&R)t(Je(Je({},B.getWidgetRenderState(Je(Je({},Y),{},{results:S}))),{},{instantSearchInstance:ne}),!1);else{var K={highlightPreTag:f?sr.highlightPreTag:St.highlightPreTag,highlightPostTag:f?sr.highlightPostTag:St.highlightPostTag};U.searchForFacetValues(o,q,Math.min($(),100),K).then(function(W){var ee=f?c0(W.facetHits):W.facetHits,x=w(ee.map(function(z){var ie=z.escapedValue,we=z.value,Z=Df(z,d1);return Je(Je({},Z),{},{value:ie,label:we})}),{results:L});t(Je(Je({},B.getWidgetRenderState(Je(Je({},Y),{},{results:S}))),{},{items:x,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:ne}),!1)})}}}};return{$$type:"ais.refinementList",init:function(U){t(Je(Je({},this.getWidgetRenderState(U)),{},{instantSearchInstance:U.instantSearchInstance}),!0)},render:function(U){t(Je(Je({},this.getWidgetRenderState(U)),{},{instantSearchInstance:U.instantSearchInstance}),!1)},getRenderState:function(U,B){return Je(Je({},U),{},{refinementList:Je(Je({},U.refinementList),{},Sa({},o,this.getWidgetRenderState(B)))})},getWidgetRenderState:function(U){var B=this,Y=U.results,q=U.state,ne=U.createURL,L=U.instantSearchInstance,K=U.helper,W=[],ee=[];if((!C||!P||!M)&&(C=gs({instantSearchInstance:L,helper:K,attribute:o,widgetType:this.$$type}),P=function(N){C("click:internal",N),K.toggleFacetRefinement(o,N).search()},M=D(K,this)),Y){var x=Y.getFacetValues(o,{sortBy:g,facetOrdering:g===Nf});ee=x&&Array.isArray(x)?x:[],W=w(ee.slice(0,$()).map(_),{results:Y});var z=q.maxValuesPerFacet,ie=$();O=z>ie?ee.length<=ie:ee.length<ie,S=Y,R=W,U.results&&(A=Q(U,this))}var we=M&&M(U),Z=k&&R.length>p,be=v&&!O,se=Z||be;return{createURL:function(N){return ne(function(ue){return B.getWidgetUiState(ue,{searchParameters:q.resetPage().toggleFacetRefinement(o,N),helper:K})})},items:W,refine:P,searchForItems:we,isFromSearch:!1,canRefine:W.length>0,widgetParams:n,isShowingMore:k,canToggleShowMore:se,toggleShowMore:H,sendEvent:C,hasExhaustiveItems:O}},dispose:function(U){var B=U.state;r();var Y=B.setQueryParameter("maxValuesPerFacet",void 0);return u==="and"?Y.removeFacet(o):Y.removeDisjunctiveFacet(o)},getWidgetUiState:function(U,B){var Y=B.searchParameters,q=u==="or"?Y.getDisjunctiveRefinements(o):Y.getConjunctiveRefinements(o);return g1(Je(Je({},U),{},{refinementList:Je(Je({},U.refinementList),{},Sa({},o,q))}),o)},getWidgetSearchParameters:function(U,B){var Y=B.uiState,q=u==="or";if(U.isHierarchicalFacet(o))return process.env.NODE_ENV==="development"&&ke(!1,'RefinementList: Attribute "'.concat(o,`" is already used by another widget applying hierarchical faceting.
|
|
68
|
+
As this is not supported, please make sure to remove this other widget or this RefinementList widget will not work at all.`)),U;if(q&&U.isConjunctiveFacet(o)||!q&&U.isDisjunctiveFacet(o))return process.env.NODE_ENV==="development"&&ke(!1,'RefinementList: Attribute "'.concat(o,`" is used by another refinement list with a different operator.
|
|
69
|
+
As this is not supported, please make sure to only use this attribute with one of the two operators.`)),U;var ne=Y.refinementList&&Y.refinementList[o],L=q?U.addDisjunctiveFacet(o).removeDisjunctiveFacetRefinement(o):U.addFacet(o).removeFacetRefinement(o),K=L.maxValuesPerFacet||0,W=Math.max(K,v?l:p),ee=L.setQueryParameter("maxValuesPerFacet",W);if(!ne){var x=q?"disjunctiveFacetsRefinements":"facetsRefinements";return ee.setQueryParameters(Sa({},x,Je(Je({},ee[x]),{},Sa({},o,[]))))}return ne.reduce(function(z,ie){return q?z.addDisjunctiveFacetRefinement(o,ie):z.addFacetRefinement(o,ie)},ee)}}}};function g1(e,t){return e.refinementList&&((!e.refinementList[t]||e.refinementList[t].length===0)&&delete e.refinementList[t],Object.keys(e.refinementList).length===0&&delete e.refinementList),e}function Ra(e){"@babel/helpers - typeof";return Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(e)}function Ff(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ff(Object(r),!0).forEach(function(n){y1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ff(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y1(e,t,r){return t=v1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v1(e){var t=b1(e,"string");return Ra(t)=="symbol"?t:String(t)}function b1(e,t){if(Ra(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ra(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var w1=Ge({name:"search-box",connector:!0}),_1=function(t,r){return r(t)},If=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,w1()),function(n){var a=n||{},o=a.queryHook,s=o===void 0?_1:o,u,d;return{$$type:"ais.searchBox",init:function(m){var v=m.instantSearchInstance;t(Dr(Dr({},this.getWidgetRenderState(m)),{},{instantSearchInstance:v}),!0)},render:function(m){var v=m.instantSearchInstance;t(Dr(Dr({},this.getWidgetRenderState(m)),{},{instantSearchInstance:v}),!1)},dispose:function(m){var v=m.state;return r(),v.setQueryParameter("query",void 0)},getRenderState:function(m,v){return Dr(Dr({},m),{},{searchBox:this.getWidgetRenderState(v)})},getWidgetRenderState:function(m){var v=m.helper,h=m.instantSearchInstance,l=m.state;return u||(u=function(g){s(g,function(y){return v.setQuery(y).search()})},d=function(){v.setQuery("").search()}),{query:l.query||"",refine:u,clear:d,widgetParams:n,isSearchStalled:h.status==="stalled"}},getWidgetUiState:function(m,v){var h=v.searchParameters,l=h.query||"";return l===""||m&&m.query===l?m:Dr(Dr({},m),{},{query:l})},getWidgetSearchParameters:function(m,v){var h=v.uiState;return m.setQueryParameter("query",h.query||"")}}}};function Pa(e){"@babel/helpers - typeof";return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(e)}function Mf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mf(Object(r),!0).forEach(function(n){S1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S1(e,t,r){return t=R1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R1(e){var t=P1(e,"string");return Pa(t)=="symbol"?t:String(t)}function P1(e,t){if(Pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lf=Ge({name:"sort-by",connector:!0}),O1=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;it(t,Lf());var n={};return function(a){var o=a||{},s=o.items,u=o.transformItems,d=u===void 0?function(p){return p}:u;if(!Array.isArray(s))throw new Error(Lf("The `items` option expects an array of objects."));return{$$type:"ais.sortBy",init:function(m){var v=m.instantSearchInstance,h=this.getWidgetRenderState(m),l=h.currentRefinement,c=Pr(s,function(g){return g.value===l});process.env.NODE_ENV==="development"&&ke(c!==void 0,'The index named "'.concat(l,'" is not listed in the `items` of `sortBy`.')),t(Nr(Nr({},h),{},{instantSearchInstance:v}),!0)},render:function(m){var v=m.instantSearchInstance;t(Nr(Nr({},this.getWidgetRenderState(m)),{},{instantSearchInstance:v}),!1)},dispose:function(m){var v=m.state;return r(),n.initialIndex?v.setIndex(n.initialIndex):v},getRenderState:function(m,v){return Nr(Nr({},m),{},{sortBy:this.getWidgetRenderState(v)})},getWidgetRenderState:function(m){var v=m.results,h=m.helper,l=m.state,c=m.parent;!n.initialIndex&&c&&(n.initialIndex=c.getIndexName()),n.setIndex||(n.setIndex=function(y){h.setIndex(y).search()});var g=v?v.nbHits===0:!0;return{currentRefinement:l.index,options:d(s,{results:v}),refine:n.setIndex,hasNoResults:g,canRefine:!g&&s.length>0,widgetParams:a}},getWidgetUiState:function(m,v){var h=v.searchParameters,l=h.index;return Nr(Nr({},m),{},{sortBy:l!==n.initialIndex?l:void 0})},getWidgetSearchParameters:function(m,v){var h=v.uiState;return m.setQueryParameter("index",h.sortBy||n.initialIndex||m.index)}}}};function Oa(e){"@babel/helpers - typeof";return Oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oa(e)}function E1(e){return T1(e)||x1(e)||Vf(e)||C1()}function C1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
70
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function T1(e){if(Array.isArray(e))return Sl(e)}function Bf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bf(Object(r),!0).forEach(function(n){ji(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ji(e,t,r){return t=k1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k1(e){var t=A1(e,"string");return Oa(t)=="symbol"?t:String(t)}function A1(e,t){if(Oa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hf(e,t){return D1(e)||$1(e,t)||Vf(e,t)||j1()}function j1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
71
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vf(e,t){if(e){if(typeof e=="string")return Sl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sl(e,t)}}function Sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $1(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function D1(e){if(Array.isArray(e))return e}var qf=Ge({name:"rating-menu",connector:!0}),Uf="ais.ratingMenu",Rl=1e3,$i=1,N1=function(t){var r=t.instantSearchInstance,n=t.helper,a=t.getRefinedStar,o=t.attribute;return function(){for(var s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];if(u.length===1){r.sendEventToInsights(u[0]);return}var p=u[1],m=u[2],v=m===void 0?"Filter Applied":m,h=u[0].split(":"),l=Hf(h,2),c=l[0],g=l[1];if(c==="click"){var y=a()===Number(p);if(!y){var f;r.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Uf,eventType:c,eventModifier:g,payload:{eventName:v,index:((f=n.lastResults)===null||f===void 0?void 0:f.index)||n.state.index,filters:["".concat(o,">=").concat(p)]},attribute:o})}}}},F1=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,qf()),function(n){var a=n||{},o=a.attribute,s=a.max,u=s===void 0?5:s,d;if(!o)throw new Error(qf("The `attribute` option is required."));var p=function(y){var f,b=y.getNumericRefinements(o);if((f=b[">="])!==null&&f!==void 0&&f.length)return b[">="][0]},m=function(y){var f=0;return y.forEach(function(b){var w=b.name.split("."),_=Hf(w,2),S=_[1],R=S===void 0?"":S;f=Math.max(f,R.length)}),f},v=function(y){var f=y.maxDecimalPlaces,b=y.maxFacets,w=y.maxValuesPerFacet,_=Math.max(0,Math.floor(Math.log10(Rl/u))),S=Math.min(Rl,Math.pow(10,_)*u),R=[];return b>Rl&&R.push('- Update your records to lower the precision of the values in the "'.concat(o,'" attribute (for example: ').concat(5.123456789.toPrecision(f+1)," to ").concat(5.123456789.toPrecision(_+1),")")),w<S&&R.push("- Increase the maximum number of facet values to ".concat(S,' using the "configure" widget ').concat(zn({name:"configure"}),' and the "maxValuesPerFacet" parameter https://www.algolia.com/doc/api-reference/api-parameters/maxValuesPerFacet/')),"The ".concat(o," attribute can have ").concat(b," different values (0 to ").concat(u," with a maximum of ").concat(f," decimals = ").concat(b,") but you retrieved only ").concat(w,` facet values. Therefore the number of results that match the refinements can be incorrect.
|
|
72
|
+
`).concat(R.length?`To resolve this problem you can:
|
|
73
|
+
`.concat(R.join(`
|
|
74
|
+
`)):"")};function h(g,y){var f=p(g)===Number(y),b=g.resetPage().removeNumericRefinement(o);return f?b:b.addNumericRefinement(o,"<=",u).addNumericRefinement(o,">=",Number(y))}var l=function(y,f){d("click:internal",f),y.setState(h(y.state,f)).search()},c={toggleRefinementFactory:function(y){return l.bind(null,y)},createURLFactory:function(y){var f=y.state,b=y.createURL,w=y.getWidgetUiState,_=y.helper;return function(S){return b(function(R){return w(R,{searchParameters:h(f,S),helper:_})})}}};return{$$type:Uf,init:function(y){var f=y.instantSearchInstance;t(Dt(Dt({},this.getWidgetRenderState(y)),{},{instantSearchInstance:f}),!0)},render:function(y){var f=y.instantSearchInstance;t(Dt(Dt({},this.getWidgetRenderState(y)),{},{instantSearchInstance:f}),!1)},getRenderState:function(y,f){return Dt(Dt({},y),{},{ratingMenu:Dt(Dt({},y.ratingMenu),{},ji({},o,this.getWidgetRenderState(f)))})},getWidgetRenderState:function(y){var f=y.helper,b=y.results,w=y.state,_=y.instantSearchInstance,S=y.createURL,R=[];d||(d=N1({instantSearchInstance:_,helper:f,getRefinedStar:function(){return p(f.state)},attribute:o}));var O=!1,P=0,C=b?.getFacetValues(o,{});if(b&&C){var k=C.length,A=m(C),H=Math.pow(10,A)*u;process.env.NODE_ENV==="development"&&ke(H<=k||!!b.__isArtificial,v({maxDecimalPlaces:A,maxFacets:H,maxValuesPerFacet:k}));for(var Q=p(w),$=function(B){var Y=Q===B;O=O||Y;var q=C.filter(function(L){return Number(L.name)>=B&&Number(L.name)<=u}).map(function(L){return L.count}).reduce(function(L,K){return L+K},0);if(P+=q,Q&&!Y&&q===0)return"continue";var ne=E1(new Array(Math.floor(u/$i))).map(function(L,K){return K*$i<B});R.push({stars:ne,name:String(B),label:String(B),value:String(B),count:q,isRefined:Y})},M=$i;M<u;M+=$i)var D=$(M)}R=R.reverse();var I=b?b.nbHits===0:!0;return{items:R,hasNoResults:I,canRefine:(!I||O)&&P>0,refine:c.toggleRefinementFactory(f),sendEvent:d,createURL:c.createURLFactory({state:w,createURL:S,helper:f,getWidgetUiState:this.getWidgetUiState}),widgetParams:n}},dispose:function(y){var f=y.state;return r(),f.removeNumericRefinement(o)},getWidgetUiState:function(y,f){var b=f.searchParameters,w=p(b);return I1(Dt(Dt({},y),{},{ratingMenu:Dt(Dt({},y.ratingMenu),{},ji({},o,typeof w=="number"?w:void 0))}),o)},getWidgetSearchParameters:function(y,f){var b=f.uiState,w=b.ratingMenu&&b.ratingMenu[o],_=y.addDisjunctiveFacet(o).removeNumericRefinement(o).removeDisjunctiveFacetRefinement(o);return w?_.addNumericRefinement(o,"<=",u).addNumericRefinement(o,">=",w):_.setQueryParameters({numericRefinements:Dt(Dt({},_.numericRefinements),{},ji({},o,{}))})}}}};function I1(e,t){return e.ratingMenu&&(typeof e.ratingMenu[t]!="number"&&delete e.ratingMenu[t],Object.keys(e.ratingMenu).length===0&&delete e.ratingMenu),e}function Ea(e){"@babel/helpers - typeof";return Ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(e)}function Wf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Sn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wf(Object(r),!0).forEach(function(n){M1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M1(e,t,r){return t=L1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L1(e){var t=B1(e,"string");return Ea(t)=="symbol"?t:String(t)}function B1(e,t){if(Ea(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ea(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H1=Ge({name:"stats",connector:!0}),V1=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,H1()),function(n){return{$$type:"ais.stats",init:function(o){var s=o.instantSearchInstance;t(Sn(Sn({},this.getWidgetRenderState(o)),{},{instantSearchInstance:s}),!0)},render:function(o){var s=o.instantSearchInstance;t(Sn(Sn({},this.getWidgetRenderState(o)),{},{instantSearchInstance:s}),!1)},dispose:function(){r()},getRenderState:function(o,s){return Sn(Sn({},o),{},{stats:this.getWidgetRenderState(s)})},getWidgetRenderState:function(o){var s=o.results,u=o.state;return s?{hitsPerPage:s.hitsPerPage,nbHits:s.nbHits,nbSortedHits:s.nbSortedHits,areHitsSorted:typeof s.appliedRelevancyStrictness<"u"&&s.appliedRelevancyStrictness>0&&s.nbSortedHits!==s.nbHits,nbPages:s.nbPages,page:s.page,processingTimeMS:s.processingTimeMS,query:s.query,widgetParams:n}:{hitsPerPage:u.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:u.page||0,processingTimeMS:-1,query:u.query||"",widgetParams:n}}}}};function Ca(e){"@babel/helpers - typeof";return Ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ca(e)}function zf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zf(Object(r),!0).forEach(function(n){Di(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Di(e,t,r){return t=q1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q1(e){var t=U1(e,"string");return Ca(t)=="symbol"?t:String(t)}function U1(e,t){if(Ca(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ca(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W1(e,t){return K1(e)||Q1(e,t)||Y1(e,t)||z1()}function z1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
75
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y1(e,t){if(e){if(typeof e=="string")return Yf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yf(e,t)}}function Yf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q1(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function K1(e){if(Array.isArray(e))return e}var Qf=Ge({name:"toggle-refinement",connector:!0}),Kf="ais.toggleRefinement",G1=function(t){var r=t.instantSearchInstance,n=t.helper,a=t.attribute,o=t.on,s=function(){for(var d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];if(p.length===1){r.sendEventToInsights(p[0]);return}var v=p[1],h=p[2],l=h===void 0?"Filter Applied":h,c=p[0].split(":"),g=W1(c,2),y=g[0],f=g[1];if(!(y!=="click"||o===void 0)&&!v){var b;r.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Kf,eventType:y,eventModifier:f,payload:{eventName:l,index:((b=n.lastResults)===null||b===void 0?void 0:b.index)||n.state.index,filters:o.map(function(w){return"".concat(a,":").concat(w)})},attribute:a})}};return s},J1=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,Qf()),function(n){var a=n||{},o=a.attribute,s=a.on,u=s===void 0?!0:s,d=a.off;if(!o)throw new Error(Qf("The `attribute` option is required."));var p=d!==void 0,m=xs(u).map(Yn),v=p?xs(d).map(Yn):void 0,h,l=function(y){return function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{isRefined:!1},b=f.isRefined;b?(m.forEach(function(w){return y.removeDisjunctiveFacetRefinement(o,w)}),p&&v.forEach(function(w){return y.addDisjunctiveFacetRefinement(o,w)})):(h("click:internal",b),p&&v.forEach(function(w){return y.removeDisjunctiveFacetRefinement(o,w)}),m.forEach(function(w){return y.addDisjunctiveFacetRefinement(o,w)})),y.search()}},c={createURLFactory:function(y,f){var b=f.state,w=f.createURL,_=f.getWidgetUiState,S=f.helper;return function(){b=b.resetPage();var R=y?m:v;R&&R.forEach(function(P){b=b.removeDisjunctiveFacetRefinement(o,P)});var O=y?v:m;return O&&O.forEach(function(P){b=b.addDisjunctiveFacetRefinement(o,P)}),w(function(P){return _(P,{searchParameters:b,helper:S})})}}};return{$$type:Kf,init:function(y){var f=y.instantSearchInstance;t(Nt(Nt({},this.getWidgetRenderState(y)),{},{instantSearchInstance:f}),!0)},render:function(y){var f=y.instantSearchInstance;t(Nt(Nt({},this.getWidgetRenderState(y)),{},{instantSearchInstance:f}),!1)},dispose:function(y){var f=y.state;return r(),f.removeDisjunctiveFacet(o)},getRenderState:function(y,f){return Nt(Nt({},y),{},{toggleRefinement:Nt(Nt({},y.toggleRefinement),{},Di({},o,this.getWidgetRenderState(f)))})},getWidgetRenderState:function(y){var f=y.state,b=y.helper,w=y.results,_=y.createURL,S=y.instantSearchInstance,R=w?m.every(function($){return f.isDisjunctiveFacetRefined(o,$)}):m.every(function($){return f.isDisjunctiveFacetRefined(o,$)}),O={isRefined:R,count:0},P={isRefined:p&&!R,count:0};if(w){var C=xs(v||!1),k=w.getFacetValues(o,{})||[],A=m.map(function($){return Pr(k,function(M){var D=M.escapedValue;return D===Yn(String($))})}).filter(function($){return $!==void 0}),H=p?C.map(function($){return Pr(k,function(M){var D=M.escapedValue;return D===Yn(String($))})}).filter(function($){return $!==void 0}):[];O={isRefined:A.length?A.every(function($){return $.isRefined}):!1,count:A.reduce(function($,M){return $+M.count},0)||null},P={isRefined:H.length?H.every(function($){return $.isRefined}):!1,count:H.reduce(function($,M){return $+M.count},0)||k.reduce(function($,M){var D=M.count;return $+D},0)}}h||(h=G1({instantSearchInstance:S,attribute:o,on:m,helper:b}));var Q=R?P:O;return{value:{name:o,isRefined:R,count:w?Q.count:null,onFacetValue:O,offFacetValue:P},createURL:c.createURLFactory(R,{state:f,createURL:_,helper:b,getWidgetUiState:this.getWidgetUiState}),sendEvent:h,canRefine:!!(w&&Q.count),refine:l(b),widgetParams:n}},getWidgetUiState:function(y,f){var b=f.searchParameters,w=m&&m.every(function(S){return b.isDisjunctiveFacetRefined(o,S)});if(!w){var _;return(_=y.toggle)===null||_===void 0||delete _[o],y}return Nt(Nt({},y),{},{toggle:Nt(Nt({},y.toggle),{},Di({},o,w))})},getWidgetSearchParameters:function(y,f){var b=f.uiState;if(y.isHierarchicalFacet(o)||y.isConjunctiveFacet(o))return process.env.NODE_ENV==="development"&&ke(!1,'ToggleRefinement: Attribute "'.concat(o,`" is already used by another widget of a different type.
|
|
76
|
+
As this is not supported, please make sure to remove this other widget or this ToggleRefinement widget will not work at all.`)),y;var w=y.addDisjunctiveFacet(o).removeDisjunctiveFacetRefinement(o),_=!!(b.toggle&&b.toggle[o]);return _?(m&&m.forEach(function(S){w=w.addDisjunctiveFacetRefinement(o,S)}),w):p?(v&&v.forEach(function(S){w=w.addDisjunctiveFacetRefinement(o,S)}),w):w.setQueryParameters({disjunctiveFacetsRefinements:Nt(Nt({},y.disjunctiveFacetsRefinements),{},Di({},o,[]))})}}}};function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function Gf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ft(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gf(Object(r),!0).forEach(function(n){Ni(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ni(e,t,r){return t=X1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X1(e){var t=Z1(e,"string");return xa(t)=="symbol"?t:String(t)}function Z1(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e2(e,t){return a2(e)||n2(e,t)||r2(e,t)||t2()}function t2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
77
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r2(e,t){if(e){if(typeof e=="string")return Jf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jf(e,t)}}function Jf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function a2(e){if(Array.isArray(e))return e}var Xf=Ge({name:"breadcrumb",connector:!0}),i2=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;it(t,Xf());var n={};return function(a){var o=a||{},s=o.attributes,u=o.separator,d=u===void 0?" > ":u,p=o.rootPath,m=p===void 0?null:p,v=o.transformItems,h=v===void 0?function(y){return y}:v;if(!s||!Array.isArray(s)||s.length===0)throw new Error(Xf("The `attributes` option expects an array of strings."));var l=e2(s,1),c=l[0];function g(y,f){if(!f){var b=y.getHierarchicalFacetBreadcrumb(c);return b.length===0?y:y.resetPage().toggleFacetRefinement(c,b[0])}return y.resetPage().toggleFacetRefinement(c,f)}return{$$type:"ais.breadcrumb",init:function(f){t(Ft(Ft({},this.getWidgetRenderState(f)),{},{instantSearchInstance:f.instantSearchInstance}),!0)},render:function(f){t(Ft(Ft({},this.getWidgetRenderState(f)),{},{instantSearchInstance:f.instantSearchInstance}),!1)},dispose:function(){r()},getRenderState:function(f,b){return Ft(Ft({},f),{},{breadcrumb:Ft(Ft({},f.breadcrumb),{},Ni({},c,this.getWidgetRenderState(b)))})},getWidgetRenderState:function(f){var b=this,w=f.helper,_=f.createURL,S=f.results,R=f.state;function O(){if(!S||R.hierarchicalFacets.length===0)return[];var C=S.getFacetValues(c,{}),k=C&&!Array.isArray(C)&&C.data?C.data:[],A=h(o2(Zf(k)),{results:S});return A}var P=O();return n.createURL||(n.createURL=function(C){return _(function(k){return b.getWidgetUiState(k,{searchParameters:g(w.state,C),helper:w})})}),n.refine||(n.refine=function(C){w.setState(g(w.state,C)).search()}),{canRefine:P.length>0,createURL:n.createURL,items:P,refine:n.refine,widgetParams:a}},getWidgetUiState:function(f,b){var w=b.searchParameters,_=w.getHierarchicalFacetBreadcrumb(c);return s2(Ft(Ft({},f),{},{hierarchicalMenu:Ft(Ft({},f.hierarchicalMenu),{},Ni({},c,_))}),c)},getWidgetSearchParameters:function(f,b){var w=b.uiState,_=w.hierarchicalMenu&&w.hierarchicalMenu[c];if(f.isConjunctiveFacet(c)||f.isDisjunctiveFacet(c))return process.env.NODE_ENV==="development"&&ke(!1,'HierarchicalMenu: Attribute "'.concat(c,`" is already used by another widget applying conjunctive or disjunctive faceting.
|
|
78
|
+
As this is not supported, please make sure to remove this other widget or this HierarchicalMenu widget will not work at all.`)),f;if(f.isHierarchicalFacet(c)){var S=f.getHierarchicalFacetByName(c);process.env.NODE_ENV==="development"&&ke(Gr(S.attributes,s)&&S.separator===d&&S.rootPath===m,"Using Breadcrumb and HierarchicalMenu on the same facet with different options overrides the configuration of the HierarchicalMenu.")}var R=f.removeHierarchicalFacet(c).addHierarchicalFacet({name:c,attributes:s,separator:d,rootPath:m});return _?R.addHierarchicalFacetRefinement(c,_.join(d)):R.setQueryParameters({hierarchicalFacetsRefinements:Ft(Ft({},R.hierarchicalFacetsRefinements),{},Ni({},c,[]))})}}}};function Zf(e){return e.reduce(function(t,r){return r.isRefined&&(t.push({label:r.name,value:r.escapedValue}),Array.isArray(r.data)&&(t=t.concat(Zf(r.data)))),t},[])}function o2(e){return e.map(function(t,r){return{label:t.label,value:r+1===e.length?null:e[r+1].value}})}function s2(e,t){return e.hierarchicalMenu&&((!e.hierarchicalMenu[t]||!e.hierarchicalMenu[t].length)&&delete e.hierarchicalMenu[t],Object.keys(e.hierarchicalMenu).length===0&&delete e.hierarchicalMenu),e}function Ta(e){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ta(e)}function eh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(r),!0).forEach(function(n){th(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function th(e,t,r){return t=l2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l2(e){var t=u2(e,"string");return Ta(t)=="symbol"?t:String(t)}function u2(e,t){if(Ta(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ta(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var c2=Ge({name:"autocomplete",connector:!0}),d2=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,c2()),function(n){var a=n||{},o=a.escapeHTML,s=o===void 0?!0:o;process.env.NODE_ENV==="development"&&ke(!n.indices,`
|
|
79
|
+
The option \`indices\` has been removed from the Autocomplete connector.
|
|
80
|
+
|
|
81
|
+
The indices to target are now inferred from the widgets tree.
|
|
82
|
+
`.concat(Array.isArray(n.indices)?`
|
|
83
|
+
An alternative would be:
|
|
84
|
+
|
|
85
|
+
const autocomplete = connectAutocomplete(renderer);
|
|
86
|
+
|
|
87
|
+
search.addWidgets([
|
|
88
|
+
`.concat(n.indices.map(function(d){var p=d.value;return"index({ indexName: '".concat(p,"' }),")}).join(`
|
|
89
|
+
`),`
|
|
90
|
+
autocomplete()
|
|
91
|
+
]);
|
|
92
|
+
`):"",`
|
|
93
|
+
`));var u={};return{$$type:"ais.autocomplete",init:function(p){var m=p.instantSearchInstance;t(qt(qt({},this.getWidgetRenderState(p)),{},{instantSearchInstance:m}),!0)},render:function(p){var m=p.instantSearchInstance,v=this.getWidgetRenderState(p);v.indices.forEach(function(h){var l=h.sendEvent,c=h.hits;l("view:internal",c)}),t(qt(qt({},v),{},{instantSearchInstance:m}),!1)},getRenderState:function(p,m){return qt(qt({},p),{},{autocomplete:this.getWidgetRenderState(m)})},getWidgetRenderState:function(p){var m=this,v=p.helper,h=p.state,l=p.scopedResults,c=p.instantSearchInstance;u.refine||(u.refine=function(y){v.setQuery(y).search()});var g=l.map(function(y){var f,b;y.results&&(y.results.hits=s?Si(y.results.hits):y.results.hits);var w=vs({instantSearchInstance:c,helper:y.helper,widgetType:m.$$type});return{indexId:y.indexId,indexName:((f=y.results)===null||f===void 0?void 0:f.index)||"",hits:((b=y.results)===null||b===void 0?void 0:b.hits)||[],results:y.results||{},sendEvent:w}});return{currentRefinement:h.query||"",indices:g,refine:u.refine,widgetParams:n}},getWidgetUiState:function(p,m){var v=m.searchParameters,h=v.query||"";return h===""||p&&p.query===h?p:qt(qt({},p),{},{query:h})},getWidgetSearchParameters:function(p,m){var v=m.uiState,h={query:v.query||""};return s?p.setQueryParameters(qt(qt({},h),sr)):p.setQueryParameters(h)},dispose:function(p){var m=p.state;r();var v=m.setQueryParameter("query",void 0);return s?v.setQueryParameters(Object.keys(sr).reduce(function(h,l){return qt(qt({},h),{},th({},l,void 0))},{})):v}}}};function ka(e){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ka(e)}function rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){f2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f2(e,t,r){return t=h2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h2(e){var t=p2(e,"string");return ka(t)=="symbol"?t:String(t)}function p2(e,t){if(ka(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fi(e){return v2(e)||y2(e)||g2(e)||m2()}function m2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g2(e,t){if(e){if(typeof e=="string")return Pl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pl(e,t)}}function y2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function v2(e){if(Array.isArray(e))return Pl(e)}function Pl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var nh=Ge({name:"query-rules",connector:!0});function b2(e){return[e.disjunctiveFacetsRefinements,e.facetsRefinements,e.hierarchicalFacetsRefinements,e.numericRefinements].some(function(t){return!!(t&&Object.keys(t).length>0)})}function w2(e){return e.replace(/[^a-z0-9-_]+/gi,"_")}function _2(e){var t=e.helper,r=e.sharedHelperState,n=e.trackedFilters,a=Object.keys(n).reduce(function(o,s){var u=Ss(t.lastResults||{},r,!0).filter(function(m){return m.attribute===s}).map(function(m){return m.numericValue||m.name}),d=n[s],p=d(u);return[].concat(Fi(o),Fi(u.filter(function(m){return p.includes(m)}).map(function(m){return w2("ais-".concat(s,"-").concat(m))})))},[]);return a}function S2(e){var t=this.helper,r=this.initialRuleContexts,n=this.trackedFilters,a=this.transformRuleContexts,o=e.state,s=o.ruleContexts||[],u=_2({helper:t,sharedHelperState:o,trackedFilters:n}),d=[].concat(Fi(r),Fi(u));process.env.NODE_ENV==="development"&&ke(d.length<=10,"\nThe maximum number of `ruleContexts` is 10. They have been sliced to that limit.\nConsider using `transformRuleContexts` to minimize the number of rules sent to Algolia.\n");var p=a(d).slice(0,10);Gr(s,p)||t.overrideStateWithoutTriggeringChangeEvent(Fr(Fr({},o),{},{ruleContexts:p}))}var ah=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,nh()),function(n){var a=n||{},o=a.trackedFilters,s=o===void 0?{}:o,u=a.transformRuleContexts,d=u===void 0?function(c){return c}:u,p=a.transformItems,m=p===void 0?function(c){return c}:p;Object.keys(s).forEach(function(c){if(typeof s[c]!="function")throw new Error(nh(`'The "`.concat(c,'" filter value in the `trackedFilters` option expects a function.')))});var v=Object.keys(s).length>0,h=[],l;return{$$type:"ais.queryRules",init:function(g){var y=g.helper,f=g.state,b=g.instantSearchInstance;h=f.ruleContexts||[],l=S2.bind({helper:y,initialRuleContexts:h,trackedFilters:s,transformRuleContexts:d}),v&&((b2(f)||n.transformRuleContexts)&&l({state:f}),y.on("change",l)),t(Fr(Fr({},this.getWidgetRenderState(g)),{},{instantSearchInstance:b}),!0)},render:function(g){var y=g.instantSearchInstance;t(Fr(Fr({},this.getWidgetRenderState(g)),{},{instantSearchInstance:y}),!1)},getWidgetRenderState:function(g){var y=g.results,f=y||{},b=f.userData,w=b===void 0?[]:b,_=m(w,{results:y});return{items:_,widgetParams:n}},getRenderState:function(g,y){return Fr(Fr({},g),{},{queryRules:this.getWidgetRenderState(y)})},dispose:function(g){var y=g.helper,f=g.state;return r(),v?(y.removeListener("change",l),f.setQueryParameter("ruleContexts",h)):f}}}};function Aa(e){"@babel/helpers - typeof";return Aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Aa(e)}function ih(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function oh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ih(Object(r),!0).forEach(function(n){R2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ih(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R2(e,t,r){return t=P2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P2(e){var t=O2(e,"string");return Aa(t)=="symbol"?t:String(t)}function O2(e,t){if(Aa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E2=function(t){var r=t.searchAsYouSpeak,n=t.language,a=t.onQueryChange,o=t.onStateChange,s=window.webkitSpeechRecognition||window.SpeechRecognition,u=function(O){return{status:O,transcript:"",isSpeechFinal:!1,errorCode:void 0}},d=u("initial"),p,m=function(){return!!s},v=function(){return d.status==="askingPermission"||d.status==="waiting"||d.status==="recognizing"},h=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};d=oh(oh({},d),O),o()},l=function(){return d},c=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";h(u(O))},g=function(){h({status:"waiting"})},y=function(O){h({status:"error",errorCode:O.error})},f=function(O){h({status:"recognizing",transcript:O.results[0]&&O.results[0][0]&&O.results[0][0].transcript||"",isSpeechFinal:O.results[0]&&O.results[0].isFinal}),r&&d.transcript&&a(d.transcript)},b=function(){!d.errorCode&&d.transcript&&!r&&a(d.transcript),d.status!=="error"&&h({status:"finished"})},w=function(){p=new s,p&&(c("askingPermission"),p.interimResults=!0,n&&(p.lang=n),p.addEventListener("start",g),p.addEventListener("error",y),p.addEventListener("result",f),p.addEventListener("end",b),p.start())},_=function(){p&&(p.stop(),p.removeEventListener("start",g),p.removeEventListener("error",y),p.removeEventListener("result",f),p.removeEventListener("end",b),p=void 0)},S=function(){_(),c("finished")};return{getState:l,isBrowserSupported:m,isListening:v,startListening:w,stopListening:S,dispose:_}};function ja(e){"@babel/helpers - typeof";return ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ja(e)}function sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){C2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C2(e,t,r){return t=x2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x2(e){var t=T2(e,"string");return ja(t)=="symbol"?t:String(t)}function T2(e,t){if(ja(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ja(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k2=Ge({name:"voice-search",connector:!0}),A2=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return it(t,k2()),function(n){var a=n.searchAsYouSpeak,o=a===void 0?!1:a,s=n.language,u=n.additionalQueryParameters,d=n.createVoiceSearchHelper,p=d===void 0?E2:d;return{$$type:"ais.voiceSearch",init:function(v){var h=v.instantSearchInstance;t(Ut(Ut({},this.getWidgetRenderState(v)),{},{instantSearchInstance:h}),!0)},render:function(v){var h=v.instantSearchInstance;t(Ut(Ut({},this.getWidgetRenderState(v)),{},{instantSearchInstance:h}),!1)},getRenderState:function(v,h){return Ut(Ut({},v),{},{voiceSearch:this.getWidgetRenderState(h)})},getWidgetRenderState:function(v){var h=this,l=v.helper,c=v.instantSearchInstance;this._refine||(this._refine=function(S){if(S!==l.state.query){var R=s?[s.split("-")[0]]:void 0;l.setQueryParameter("queryLanguages",R),typeof u=="function"&&l.setState(l.state.setQueryParameters(Ut({ignorePlurals:!0,removeStopWords:!0,optionalWords:S},u({query:S})))),l.setQuery(S).search()}}),this._voiceSearchHelper||(this._voiceSearchHelper=p({searchAsYouSpeak:o,language:s,onQueryChange:function(R){return h._refine(R)},onStateChange:function(){t(Ut(Ut({},h.getWidgetRenderState(v)),{},{instantSearchInstance:c}),!1)}}));var g=this._voiceSearchHelper,y=g.isBrowserSupported,f=g.isListening,b=g.startListening,w=g.stopListening,_=g.getState;return{isBrowserSupported:y(),isListening:f(),toggleListening:function(){y()&&(f()?w():b())},voiceListeningState:_(),widgetParams:n}},dispose:function(v){var h=v.state;this._voiceSearchHelper.dispose(),r();var l=h;if(typeof u=="function"){var c=u({query:""}),g=c?Object.keys(c).reduce(function(y,f){return y[f]=void 0,y},{}):{};l=h.setQueryParameters(Ut({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},g))}return l.setQueryParameter("query",void 0)},getWidgetUiState:function(v,h){var l=h.searchParameters,c=l.query||"";return c?Ut(Ut({},v),{},{query:c}):v},getWidgetSearchParameters:function(v,h){var l=h.uiState;return v.setQueryParameter("query",l.query||"")}}}};function $a(e){"@babel/helpers - typeof";return $a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$a(e)}function lh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(r),!0).forEach(function(n){j2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j2(e,t,r){return t=$2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $2(e){var t=D2(e,"string");return $a(t)=="symbol"?t:String(t)}function D2(e,t){if($a(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($a(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N2=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fe,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe;return function(n){var a={};return{$$type:"ais.relevantSort",init:function(s){var u=s.instantSearchInstance;t(Ir(Ir({},this.getWidgetRenderState(s)),{},{instantSearchInstance:u}),!0)},render:function(s){var u=s.instantSearchInstance;t(Ir(Ir({},this.getWidgetRenderState(s)),{},{instantSearchInstance:u}),!1)},dispose:function(s){var u=s.state;return r(),u.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(s,u){return Ir(Ir({},s),{},{relevantSort:this.getWidgetRenderState(u)})},getWidgetRenderState:function(s){var u=s.results,d=s.helper;a.refine||(a.refine=function(h){d.setQueryParameter("relevancyStrictness",h).search()});var p=u||{},m=p.appliedRelevancyStrictness,v=m!==void 0;return{isRelevantSorted:typeof m<"u"&&m>0,isVirtualReplica:v,canRefine:v,refine:a.refine,widgetParams:n}},getWidgetSearchParameters:function(s,u){var d,p=u.uiState;return s.setQueryParameter("relevancyStrictness",(d=p.relevantSort)!==null&&d!==void 0?d:s.relevancyStrictness)},getWidgetUiState:function(s,u){var d=u.searchParameters;return Ir(Ir({},s),{},{relevantSort:d.relevancyStrictness||s.relevantSort})}}}};Rr(jb,"answers is no longer supported");var F2=Rr(iw,"EXPERIMENTAL_connectConfigureRelatedItems is deprecated and will be removed in a next minor version of InstantSearch. Please use connectRelatedItems instead.");Rr(Qd,"use connectDynamicWidgets");const uh={name:"AisAutocomplete",mixins:[We({connector:d2},{$$widgetType:"ais.autocomplete"}),Le({name:"Autocomplete"})],props:{escapeHTML:{type:Boolean,required:!1,default:!0}},computed:{widgetParams:function(){return{escapeHTML:this.escapeHTML}}}};var I2=i.createElementVNode("p",null," This widget doesn't render anything without a filled in default slot. ",-1),M2=i.createElementVNode("p",null,"query, function to refine and results are provided.",-1),L2=i.createElementVNode("pre",null,"refine: Function",-1),B2=i.createElementVNode("summary",null,[i.createElementVNode("code",null,"indices"),i.createTextVNode(":")],-1);function H2(e,t,r,n,a,o){return e.state?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(e.suit())},[i.renderSlot(e.$slots,"default",{refine:e.state.refine,currentRefinement:e.state.currentRefinement,indices:e.state.indices},function(){return[I2,M2,L2,i.createElementVNode("pre",null,'currentRefinement: "'+i.toDisplayString(e.state.currentRefinement)+'"',1),i.createElementVNode("details",null,[B2,i.createElementVNode("pre",null,i.toDisplayString(e.state.indices),1)])]})],2)):i.createCommentVNode("",!0)}uh.render=H2;function V2(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n&&n.push(r)||e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&n.splice(n.indexOf(r)>>>0,1)},emit:function(t,r){(e.get(t)||[]).slice().map(function(n){n(r)}),(e.get("*")||[]).slice().map(function(n){n(t,r)})}}}var q2=function(){var e;return(e={props:{emitter:{type:Object,required:!1,default:function(){return V2()}}},provide:function(){var t;return(t={}).instantSearchPanelEmitter=this.emitter,t},data:function(){return{canRefine:!0}},created:function(){var t=this;this.emitter.on("PANEL_CHANGE_EVENT",function(r){t.updateCanRefine(r)})}}).beforeUnmount=function(){this.emitter.all.clear()},e.methods={updateCanRefine:function(t){this.canRefine=t}},e},It=function(e){e===void 0&&(e={});var t=e.mapStateToCanRefine;return t===void 0&&(t=function(r){return!!r.canRefine}),{inject:{emitter:{from:"instantSearchPanelEmitter",default:function(){return{emit:function(){}}}}},data:function(){return{state:null,hasAlreadyEmitted:!1}},watch:{state:{immediate:!0,handler:function(r,n){if(r){var a=t(n||{}),o=t(r);this.hasAlreadyEmitted&&a===o||(this.emitter.emit("PANEL_CHANGE_EVENT",o),this.hasAlreadyEmitted=!0)}}}}}};We({connector:i2},{$$widgetType:"ais.breadcrumb"}),It(),Le({name:"Breadcrumb"});const ch={name:"AisClearRefinements",mixins:[We({connector:yw},{$$widgetType:"ais.clearRefinements"}),It(),Le({name:"ClearRefinements"})],props:{excludedAttributes:{type:Array,default:void 0},includedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}},canRefine:function(){return this.state.hasRefinements}}};var U2=["disabled"];function W2(e,t,r,n,a,o){return e.state?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(e.suit())},[i.renderSlot(e.$slots,"default",{canRefine:o.canRefine,refine:e.state.refine,createURL:e.state.createURL},function(){return[i.createElementVNode("button",{type:"reset",class:i.normalizeClass([e.suit("button"),!o.canRefine&&e.suit("button","disabled")]),disabled:!o.canRefine,onClick:t[0]||(t[0]=i.withModifiers(function(){for(var s,u=[],d=arguments.length;d--;)u[d]=arguments[d];return e.state.refine&&(s=e.state).refine.apply(s,u)},["prevent"]))},[i.renderSlot(e.$slots,"resetLabel",{},function(){return[i.createTextVNode(" Clear refinements ")]})],10,U2)]})],2)):i.createCommentVNode("",!0)}ch.render=W2,Le({name:"Configure"}),We({connector:Hd},{$$widgetType:"ais.configure"}),We({connector:F2},{$$widgetType:"ais.configureRelatedItems"});const dh={name:"AisCurrentRefinements",mixins:[Le({name:"CurrentRefinements"}),We({connector:Cw},{$$widgetType:"ais.currentRefinements"}),It()],props:{includedAttributes:{type:Array,default:void 0},excludedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{noRefinement:function(){return this.state&&this.state.items.length===0},widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}}},methods:{createItemKey:function(e){var t=e.attribute,r=e.value;return[t,e.type,r,e.operator].join(":")},capitalize:function(e){return e?e.toString().charAt(0).toLocaleUpperCase()+e.toString().slice(1):""}}};var z2={key:0},Y2=["onClick"];function Q2(e,t,r,n,a,o){return e.state?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass([e.suit(),o.noRefinement&&e.suit("","noRefinement")])},[i.renderSlot(e.$slots,"default",{refine:e.state.refine,items:e.state.items,createURL:e.state.createURL},function(){return[i.createElementVNode("ul",{class:i.normalizeClass(e.suit("list"))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.state.items,function(s){return i.openBlock(),i.createElementBlock("li",{key:s.attribute,class:i.normalizeClass(e.suit("item"))},[i.renderSlot(e.$slots,"item",{refine:s.refine,item:s,createURL:e.state.createURL},function(){return[i.createElementVNode("span",{class:i.normalizeClass(e.suit("label"))},i.toDisplayString(o.capitalize(s.label))+": ",3),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.refinements,function(u){return i.openBlock(),i.createElementBlock("span",{key:o.createItemKey(u),class:i.normalizeClass(e.suit("category"))},[i.renderSlot(e.$slots,"refinement",{refine:s.refine,refinement:u,createURL:e.state.createURL},function(){return[i.createElementVNode("span",{class:i.normalizeClass(e.suit("categoryLabel"))},[u.attribute==="query"?(i.openBlock(),i.createElementBlock("q",z2,i.toDisplayString(u.label),1)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(u.label),1)],64))],2),i.createElementVNode("button",{class:i.normalizeClass(e.suit("delete")),type:"button",onClick:i.withModifiers(function(d){return s.refine(u)},["left","exact"])}," ✕ ",10,Y2)]})],2)}),128))]})],2)}),128))],2)]})],2)):i.createCommentVNode("",!0)}dh.render=Q2,Le({name:"HierarchicalMenu"}),We({connector:Hw},{$$widgetType:"ais.hierarchicalMenu"}),It();function Ii(){return Ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ii.apply(null,arguments)}function K2(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fh(e,t){if(e==null)return{};var r,n,a=K2(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function fr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(n,a){return Array.isArray(a)?n.concat(a):n.concat([a])},[]).filter(Boolean).join(" ")}var G2=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];function J2(e){var t=e.createElement;return function(n){var a=n.classNames,o=n.children,s=n.highlightedTagName,u=n.isHighlighted,d=n.nonHighlightedTagName,p=u?s:d;return t(p,{className:u?a.highlighted:a.nonHighlighted},o)}}function X2(e){var t=e.createElement,r=e.Fragment,n=J2({createElement:t});return function(o){var s=o.parts,u=o.highlightedTagName,d=u===void 0?"mark":u,p=o.nonHighlightedTagName,m=p===void 0?"span":p,v=o.separator,h=v===void 0?", ":v,l=o.className,c=o.classNames,g=c===void 0?{}:c,y=fh(o,G2);return t("span",Ii({},y,{className:fr(g.root,l)}),s.map(function(f,b){var w=b===s.length-1;return t(r,{key:b},f.map(function(_,S){return t(n,{key:S,classNames:g,highlightedTagName:d,nonHighlightedTagName:m,isHighlighted:_.isHighlighted},_.value)}),!w&&t("span",{className:g.separator},h))}))}}var Z2=["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"];function eS(e){var t=e.createElement;return function(n){var a=n.classNames,o=n.banner;return o.image.urls[0].url?t("aside",{className:fr("ais-Hits-banner",a.bannerRoot)},o.link?t("a",{className:fr("ais-Hits-banner-link",a.bannerLink),href:o.link.url,target:o.link.target},t("img",{className:fr("ais-Hits-banner-image",a.bannerImage),src:o.image.urls[0].url,alt:o.image.title})):t("img",{className:fr("ais-Hits-banner-image",a.bannerImage),src:o.image.urls[0].url,alt:o.image.title})):null}}function tS(e){var t=e.createElement,r=eS({createElement:t});return function(a){var o=a.classNames,s=o===void 0?{}:o,u=a.hits,d=a.itemComponent,p=a.sendEvent,m=a.emptyComponent,v=a.banner,h=a.bannerComponent,l=fh(a,Z2);return t("div",Ii({},l,{className:fr("ais-Hits",s.root,u.length===0&&fr("ais-Hits--empty",s.emptyRoot),l.className)}),v&&(h?t(h,{className:fr("ais-Hits-banner",s.bannerRoot),banner:v}):t(r,{classNames:s,banner:v})),u.length===0&&m?t(m,null):t("ol",{className:fr("ais-Hits-list",s.list)},u.map(function(c,g){return t(d,{key:c.objectID,hit:c,index:g,className:fr("ais-Hits-item",s.item),onClick:function(){p("click:internal",c,"Hit Clicked")},onAuxClick:function(){p("click:internal",c,"Hit Clicked")}})})))}}var hh=function(e,t,r){if(!r)return i.h(e,t);if(e===i.Fragment)return i.h(e,Array.isArray(r)?r:[r]);var n=typeof r=="string"?{default:function(){return r}}:r,a=typeof e=="string"?t:Object.assign(t,{children:r});return i.h(e,a,n)},rS=X2({createElement:hh,Fragment:i.Fragment});const nS={name:"AisHighlighter",props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"},suit:{type:Function,required:!0},highlightProperty:{type:String,required:!0},preTag:{type:String,required:!0},postTag:{type:String,required:!0}},render:function(){var e=gn(this.hit[this.highlightProperty],this.attribute)||[],t=(Array.isArray(e)?e:[e]).map(function(r){return ws(Sc(r.value||"")).map(function(n){var a=n.value;return{value:a===" "?" ":a,isHighlighted:n.isHighlighted}})});return hh(rS,{classNames:{root:this.suit(),highlighted:this.suit("highlighted")},highlightedTagName:this.highlightedTagName,nonHighlightedTagName:i.Fragment,parts:t})}},Ol={name:"AisHighlight",mixins:[Le({name:"Highlight"})],components:{AisHighlighter:nS},props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"}}};function aS(e,t,r,n,a,o){var s=i.resolveComponent("ais-highlighter");return i.openBlock(),i.createBlock(s,{hit:r.hit,attribute:r.attribute,"highlighted-tag-name":r.highlightedTagName,suit:e.suit,"highlight-property":"_highlightResult","pre-tag":"<mark>","post-tag":"</mark>"},null,8,["hit","attribute","highlighted-tag-name","suit"])}Ol.render=aS;const iS={name:"AisHits",mixins:[We({connector:r_},{$$widgetType:"ais.hits"}),Le({name:"Hits"})],props:{showBanner:{type:Boolean,default:!0},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{showBanner:this.showBanner,escapeHTML:this.escapeHTML,transformItems:this.transformItems}}},render:wi(function(e){var t=this;if(!this.state)return null;var r=ds(this,"default"),n=ds(this,"item"),a=ds(this,"banner");return n||a||!r?e(tS({createElement:e}),{hits:this.state.items,itemComponent:function(o){var s=o.hit,u=o.index,d=o.onClick,p=o.onAuxClick,m=(o.key,(function(v,h){var l={};for(var c in v)Object.prototype.hasOwnProperty.call(v,c)&&h.indexOf(c)===-1&&(l[c]=v[c]);return l})(o,["hit","index","onClick","onAuxClick","key"]));return e("li",{key:s.objectID,attrs:m,on:{click:d,auxclick:p}},[n&&n({item:s,index:u,insights:t.state.insights,sendEvent:t.state.sendEvent})||"objectID: "+s.objectID+", index: "+u])},banner:this.showBanner?this.state.banner:void 0,bannerComponent:a,sendEvent:this.state.sendEvent,classNames:this.classNames&&{root:this.classNames["ais-Hits"],list:this.classNames["ais-Hits-list"],item:this.classNames["ais-Hits-item"],bannerRoot:this.classNames["ais-Hits-banner"],bannerImage:this.classNames["ais-Hits-banner-image"],bannerLink:this.classNames["ais-Hits-banner-link"]}}):e("div",{attrs:{class:this.suit()}},[r({banner:this.state.banner,items:this.state.items,insights:this.state.insights,sendEvent:this.state.sendEvent})])})};Le({name:"HitsPerPage"}),We({connector:d_},{$$widgetType:"ais.hitsPerPage"}),It();function Da(e){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(e)}var oS=["initialSearchParameters"],sS=["initialRecommendParameters"];function ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(r),!0).forEach(function(n){Rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rn(e,t,r){return t=lS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lS(e){var t=uS(e,"string");return Da(t)=="symbol"?t:String(t)}function uS(e,t){if(Da(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Da(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mh(e){return hS(e)||fS(e)||dS(e)||cS()}function cS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dS(e,t){if(e){if(typeof e=="string")return El(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return El(e,t)}}function fS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hS(e){if(Array.isArray(e))return El(e)}function El(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gh(e,t){if(e==null)return{};var r=pS(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pS(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var Na=Ge({name:"index-widget"});function yh(e,t){var r=t.state,n=t.recommendState,a=t.isPageReset,o=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:a,_uiState:o})),n!==e.recommendState&&(e.recommendState=n)}function Fa(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.reduce(function(n,a){return $t(a)||!a.getWidgetUiState&&!a.getWidgetState?n:a.getWidgetUiState?a.getWidgetUiState(n,t):a.getWidgetState(n,t)},r)}function Ia(e,t){var r=t.initialSearchParameters,n=gh(t,oS);return e.reduce(function(a,o){return!o.getWidgetSearchParameters||$t(o)?a:o.dependsOn==="search"&&o.getWidgetParameters?o.getWidgetParameters(a,n):o.getWidgetSearchParameters(a,n)},r)}function vh(e,t){var r=t.initialRecommendParameters,n=gh(t,sS);return e.reduce(function(a,o){return!$t(o)&&o.dependsOn==="recommend"&&o.getWidgetParameters?o.getWidgetParameters(a,n):a},r)}function bh(e){var t=e.filter($t);t.length!==0&&t.forEach(function(r){var n=r.getHelper();yh(n,{state:n.state.resetPage(),recommendState:n.recommendState,isPageReset:!0}),bh(r.getWidgets())})}function wh(e){var t=e.filter($t);return t.reduce(function(r,n){return r.concat.apply(r,[{indexId:n.getIndexId(),results:n.getResults(),helper:n.getHelper()}].concat(mh(wh(n.getWidgets()))))},[])}var _h=function(t){if(t===void 0||t.indexName===void 0&&!t.EXPERIMENTAL_isolated)throw new Error(Na("The `indexName` option is required."));var r=t.indexName,n=r===void 0?"":r,a=t.indexId,o=a===void 0?n:a,s=t.EXPERIMENTAL_isolated,u=s===void 0?!1:s,d=[],p={},m=null,v=null,h=null,l=null,c=null,g=!1,y=!1;return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:u,getIndexName:function(){return n},getIndexId:function(){return o},getHelper:function(){return h},getResults:function(){var b;return(b=l)!==null&&b!==void 0&&b.lastResults?(l.lastResults._state=h.state,l.lastResults):null},getResultsForWidget:function(b){var w;return b.dependsOn!=="recommend"||$t(b)||b.$$id===void 0?this.getResults():(w=h)!==null&&w!==void 0&&w.lastRecommendResults?h.lastRecommendResults[b.$$id]:null},getPreviousState:function(){return c},getScopedResults:function(){var b=this.getParent(),w;return b?w=b.getWidgets():n.length===0?w=this.getWidgets():w=[this],wh(w)},getParent:function(){return u?null:v},createURL:function(b){return typeof b=="function"?m._createURL(Rn({},o,b(p))):m._createURL(Rn({},o,Fa(d,{searchParameters:b,helper:h})))},getWidgets:function(){return d},addWidgets:function(b){var w=this;if(!Array.isArray(b))throw new Error(Na("The `addWidgets` method expects an array of widgets."));var _=b.reduce(function(R,O){return R.concat(Array.isArray(O)?O:[O])},[]);if(_.some(function(R){return typeof R.init!="function"&&typeof R.render!="function"}))throw new Error(Na("The widget definition expects a `render` and/or an `init` method."));if(_.forEach(function(R){$t(R)||(m&&R.dependsOn==="recommend"?m._hasRecommendWidget=!0:m?m._hasSearchWidget=!0:R.dependsOn==="recommend"?g=!0:y=!0,qv(R))}),d=d.concat(_),m&&_.length)if(yh(h,{state:Ia(d,{uiState:p,initialSearchParameters:h.state}),recommendState:vh(d,{uiState:p,initialRecommendParameters:h.recommendState}),_uiState:p}),_.forEach(function(R){if(R.getRenderState){var O=R.getRenderState(m.renderState[w.getIndexId()]||{},ta(m,w,m._initialUiState));Cl({renderState:O,instantSearchInstance:m,parent:w})}}),_.forEach(function(R){R.init&&R.init(ta(m,w,m._initialUiState))}),u){var S;(S=h)===null||S===void 0||S.search()}else m.scheduleSearch();return this},removeWidgets:function(b){var w=this;if(!Array.isArray(b))throw new Error(Na("The `removeWidgets` method expects an array of widgets."));var _=b.reduce(function(k,A){return k.concat(Array.isArray(A)?A:[A])},[]);if(_.some(function(k){return typeof k.dispose!="function"}))throw new Error(Na("The widget definition expects a `dispose` method."));if(d=d.filter(function(k){return _.indexOf(k)===-1}),d.forEach(function(k){$t(k)||(m&&k.dependsOn==="recommend"?m._hasRecommendWidget=!0:m?m._hasSearchWidget=!0:k.dependsOn==="recommend"?g=!0:y=!0)}),m&&_.length){var S=_.reduce(function(k,A){var H=A.dispose({helper:h,state:k.cleanedSearchState,recommendState:k.cleanedRecommendState,parent:w});return H instanceof _t.RecommendParameters?k.cleanedRecommendState=H:H&&(k.cleanedSearchState=H),k},{cleanedSearchState:h.state,cleanedRecommendState:h.recommendState}),R=S.cleanedSearchState,O=S.cleanedRecommendState,P=m.future.preserveSharedStateOnUnmount?Ia(d,{uiState:p,initialSearchParameters:new _t.SearchParameters({index:this.getIndexName()})}):Ia(d,{uiState:Fa(d,{searchParameters:R,helper:h}),initialSearchParameters:R});if(p=Fa(d,{searchParameters:P,helper:h}),h.setState(P),h.recommendState=O,d.length)if(u){var C;(C=h)===null||C===void 0||C.search()}else m.scheduleSearch()}return this},init:function(b){var w=this,_,S=b.instantSearchInstance,R=b.parent,O=b.uiState;if(h===null){m=S,v=R,p=O[o]||{};var P=S.mainHelper,C=Ia(d,{uiState:p,initialSearchParameters:new _t.SearchParameters({index:n})}),k=vh(d,{uiState:p,initialRecommendParameters:new _t.RecommendParameters});h=_t(P.getClient(),C.index,C),h.recommendState=k,h.search=function(){return u?(S.status="loading",w.render({instantSearchInstance:S}),S.compositionID?h.searchWithComposition():h.searchOnlyWithDerivedHelpers()):S.onStateChange?(S.onStateChange({uiState:S.mainIndex.getWidgetUiState({}),setUiState:function(I){return S.setUiState(I,!1)}}),P):P.search()},h.searchWithoutTriggeringOnStateChange=function(){return P.search()},h.searchForFacetValues=function(D,I,U,B){var Y=h.state.setQueryParameters(B);return P.searchForFacetValues(D,I,U,Y)};var A=n?h:_t({},"__empty_index__",{}),H=u?A:mS(R,P);l=H.derive(function(){return ea.apply(void 0,[P.state].concat(mh(Pb(w))))},function(){return w.getHelper().recommendState});var Q=(_=S._initialResults)===null||_===void 0?void 0:_[this.getIndexId()];if(Q!=null&&Q.results){var $=new _t.SearchResults(new _t.SearchParameters(Q.state),Q.results);l.lastResults=$,h.lastResults=$}if(Q!=null&&Q.recommendResults){var M=new _t.RecommendResults(new _t.RecommendParameters({params:Q.recommendResults.params}),Q.recommendResults.results);l.lastRecommendResults=M,h.lastRecommendResults=M}h.on("change",function(D){var I=D.isPageReset;I&&bh(d)}),l.on("search",function(){S.scheduleStalledRender(),process.env.NODE_ENV==="development"&&yc({index:w,indexUiState:p})}),l.on("result",function(D){var I=D.results;S.scheduleRender(),h.lastResults=I,c=I?._state}),l.on("recommend:result",function(D){var I=D.recommend;S.scheduleRender(),h.lastRecommendResults=I.results}),d.forEach(function(D){if(D.getRenderState){var I=D.getRenderState(S.renderState[w.getIndexId()]||{},ta(S,w,O));Cl({renderState:I,instantSearchInstance:S,parent:w})}}),d.forEach(function(D){process.env.NODE_ENV==="development"&&ke(!D.getWidgetState||!!D.getWidgetUiState,"The `getWidgetState` method is renamed `getWidgetUiState` and will no longer exist under that name in InstantSearch.js 5.x. Please use `getWidgetUiState` instead."),D.init&&D.init(ta(S,w,O))}),h.on("change",function(D){var I=D.state,U=D._uiState;p=Fa(d,{searchParameters:I,helper:h},U||{}),S.onStateChange||S.onInternalStateChange()}),Q&&S.scheduleRender(),g&&(S._hasRecommendWidget=!0),y&&(S._hasSearchWidget=!0)}},render:function(b){var w,_=this,S=b.instantSearchInstance;S.status==="error"&&!S.mainHelper.hasPendingRequests()&&c&&h.setState(c);var R=this.getResults()||(w=l)!==null&&w!==void 0&&w.lastRecommendResults||u&&!n?d:d.filter($t);R=R.filter(function(O){return O.shouldRender?O.shouldRender({instantSearchInstance:S}):!0}),R.forEach(function(O){if(O.getRenderState){var P=O.getRenderState(S.renderState[_.getIndexId()]||{},Gc(S,_,O));Cl({renderState:P,instantSearchInstance:S,parent:_})}}),R.forEach(function(O){O.render&&O.render(Gc(S,_,O))})},dispose:function(){var b=this,w,_;d.forEach(function(S){S.dispose&&h&&S.dispose({helper:h,state:h.state,recommendState:h.recommendState,parent:b})}),m=null,v=null,(w=h)===null||w===void 0||w.removeAllListeners(),h=null,(_=l)===null||_===void 0||_.detach(),l=null},getWidgetUiState:function(b){return d.filter($t).filter(function(w){return!w._isolated}).reduce(function(w,_){return _.getWidgetUiState(w)},hr(hr({},b),{},Rn({},o,hr(hr({},b[o]),p))))},getWidgetState:function(b){return process.env.NODE_ENV==="development"&&ke(!1,"The `getWidgetState` method is renamed `getWidgetUiState` and will no longer exist under that name in InstantSearch.js 5.x. Please use `getWidgetUiState` instead."),this.getWidgetUiState(b)},getWidgetSearchParameters:function(b,w){var _=w.uiState;return Ia(d,{uiState:_,initialSearchParameters:b})},refreshUiState:function(){p=Fa(d,{searchParameters:this.getHelper().state,helper:this.getHelper()},p)},setIndexUiState:function(b){var w=typeof b=="function"?b(p):b;m.setUiState(function(_){return hr(hr({},_),{},Rn({},o,w))})}}};function Cl(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,a=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=hr(hr({},r.renderState),{},Rn({},a,hr(hr({},r.renderState[a]),t)))}function mS(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}Le({name:"Index"}),We({connector:function(){return _h}},{$$widgetType:"ais.index"});var gS="ais",Mi=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=r.descendantName,a=r.modifierName,o=n?"-".concat(n):"",s=a?"--".concat(a):"";return"".concat(gS,"-").concat(t).concat(o).concat(s)}},yS=Mi("Highlight");function Sh(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,a=e.hit,o=e.cssClasses,s=o===void 0?{}:o;process.env.NODE_ENV==="development"&&ke(!1,"`instantsearch.highlight` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `Highlight` component.\n\nFor more information, visit https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/?client=html+tagged+templates#upgrade-templates");var u=gn(a._highlightResult,t);process.env.NODE_ENV==="development"&&ke(u,'Could not enable highlight for "'.concat(t,`", will display an empty string.
|
|
96
|
+
Please check whether this attribute exists and is either searchable or specified in \`attributesToHighlight\`.
|
|
97
|
+
|
|
98
|
+
See: https://alg.li/highlighting
|
|
99
|
+
`));var d=u||{},p=d.value,m=p===void 0?"":p,v=yS({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return m.replace(new RegExp(St.highlightPreTag,"g"),"<".concat(n,' class="').concat(v,'">')).replace(new RegExp(St.highlightPostTag,"g"),"</".concat(n,">"))}var vS=Mi("ReverseHighlight");function Rh(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,a=e.hit,o=e.cssClasses,s=o===void 0?{}:o;process.env.NODE_ENV==="development"&&ke(!1,"`instantsearch.reverseHighlight` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `ReverseHighlight` component.\n\nFor more information, visit https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/?client=html+tagged+templates#upgrade-templates");var u=gn(a._highlightResult,t);process.env.NODE_ENV==="development"&&ke(u,'Could not enable reverse highlight for "'.concat(t,`", will display an empty string.
|
|
100
|
+
Please check whether this attribute exists and is either searchable or specified in \`attributesToHighlight\`.
|
|
101
|
+
|
|
102
|
+
See: https://alg.li/highlighting
|
|
103
|
+
`));var d=u||{},p=d.value,m=p===void 0?"":p,v=vS({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=Cc(Xc(ws(m)));return h.replace(new RegExp(St.highlightPreTag,"g"),"<".concat(n,' class="').concat(v,'">')).replace(new RegExp(St.highlightPostTag,"g"),"</".concat(n,">"))}var bS=Mi("Snippet");function Ph(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,a=e.hit,o=e.cssClasses,s=o===void 0?{}:o;process.env.NODE_ENV==="development"&&ke(!1,"`instantsearch.snippet` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `Snippet` component.\n\nFor more information, visit https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/?client=html+tagged+templates#upgrade-templates");var u=gn(a._snippetResult,t);process.env.NODE_ENV==="development"&&ke(u,'Could not enable snippet for "'.concat(t,`", will display an empty string.
|
|
104
|
+
Please check whether this attribute exists and is specified in \`attributesToSnippet\`.
|
|
105
|
+
|
|
106
|
+
See: https://alg.li/highlighting
|
|
107
|
+
`));var d=u||{},p=d.value,m=p===void 0?"":p,v=bS({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return m.replace(new RegExp(St.highlightPreTag,"g"),"<".concat(n,' class="').concat(v,'">')).replace(new RegExp(St.highlightPostTag,"g"),"</".concat(n,">"))}var wS=Mi("ReverseSnippet");function Oh(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,a=e.hit,o=e.cssClasses,s=o===void 0?{}:o;process.env.NODE_ENV==="development"&&ke(!1,"`instantsearch.reverseSnippet` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `ReverseSnippet` component.\n\nFor more information, visit https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/?client=html+tagged+templates#upgrade-templates");var u=gn(a._snippetResult,t);process.env.NODE_ENV==="development"&&ke(u,'Could not enable reverse snippet for "'.concat(t,`", will display an empty string.
|
|
108
|
+
Please check whether this attribute exists and is specified in \`attributesToSnippet\`.
|
|
109
|
+
|
|
110
|
+
See: https://alg.li/highlighting
|
|
111
|
+
`));var d=u||{},p=d.value,m=p===void 0?"":p,v=wS({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=Cc(Xc(ws(m)));return h.replace(new RegExp(St.highlightPreTag,"g"),"<".concat(n,' class="').concat(v,'">')).replace(new RegExp(St.highlightPostTag,"g"),"</".concat(n,">"))}function xl(e){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}var _S="_ALGOLIA";function SS(e){if(!((typeof document>"u"?"undefined":xl(document))!=="object"||typeof document.cookie!="string"))for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}}function Eh(){return SS(_S)}function RS(){return process.env.NODE_ENV==="development"&&ke(!1,"`getInsightsAnonymousUserToken` function has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/"),Eh()}var PS=["page"];function OS(e,t){if(e==null)return{};var r=ES(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ES(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Ch(e){var t=e||{};t.page;var r=OS(t,PS);return r}function CS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.key,r=["ais.infiniteHits",t].filter(Boolean).join(":");return{read:function(a){var o=a.state,s=ur(function(d){var p=d.window;return p.sessionStorage});if(!s)return null;try{var u=JSON.parse(s.getItem(r));return u&&Gr(u.state,Ch(o))?u.hits:null}catch(d){if(d instanceof SyntaxError)try{s.removeItem(r)}catch{}return null}},write:function(a){var o=a.state,s=a.hits,u=ur(function(d){var p=d.window;return p.sessionStorage});if(u)try{u.setItem(r,JSON.stringify({state:Ch(o),hits:s}))}catch{}}}}var xS=ks();const TS=aa(xS);function kS(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,r=e==="x"?t:t&3|8;return r.toString(16)})}function Ma(e){"@babel/helpers - typeof";return Ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(e)}function xh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xh(Object(r),!0).forEach(function(n){AS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AS(e,t,r){return t=jS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jS(e){var t=$S(e,"string");return Ma(t)=="symbol"?t:String(t)}function $S(e,t){if(Ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Or(e,t){return FS(e)||NS(e,t)||Th(e,t)||DS()}function DS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
112
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NS(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,s,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(p)throw a}}return u}}function FS(e){if(Array.isArray(e))return e}function IS(e){return BS(e)||LS(e)||Th(e)||MS()}function MS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
113
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Th(e,t){if(e){if(typeof e=="string")return Tl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tl(e,t)}}function LS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BS(e){if(Array.isArray(e))return Tl(e)}function Tl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var kh="2.17.2",HS="https://cdn.jsdelivr.net/npm/search-insights@".concat(kh,"/dist/search-insights.min.js");function Ah(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,a=e.$$internal,o=a===void 0?!1:a,s=e.$$automatic,u=s===void 0?!1:s,d=t;!t&&t!==null&&ur(function(m){var v=m.window,h=v.AlgoliaAnalyticsObject||"aa";typeof h=="string"&&(d=v[h]),d||(v.AlgoliaAnalyticsObject=h,v[h]||(v[h]=function(){v[h].queue||(v[h].queue=[]);for(var l=arguments.length,c=new Array(l),g=0;g<l;g++)c[g]=arguments[g];v[h].queue.push(c)},v[h].version=kh,v[h].shouldAddScript=!0),d=v[h])});var p=d||Fe;return function(m){var v=m.instantSearchInstance,h=v.middleware.filter(function(C){return C.instance.$$type==="ais.insights"&&C.instance.$$internal}).map(function(C){return C.creator});v.unuse.apply(v,IS(h));var l=Fc(v.client),c=Or(l,2),g=c[0],y=c[1];process.env.NODE_ENV==="development"&&ke(!!(g&&y),"could not extract Algolia credentials from searchClient in insights middleware.");var f=void 0,b=void 0,w=void 0,_=p.queue;if(Array.isArray(_)){var S=["setUserToken","init"].map(function(C){var k=Pr(_.slice().reverse(),function(Q){var $=Or(Q,1),M=$[0];return M===C})||[],A=Or(k,2),H=A[1];return H}),R=Or(S,2);b=R[0],f=R[1]}p("getUserToken",null,function(C,k){w=$h(k)}),(r||!jh(p))&&p("init",Jr({appId:g,apiKey:y,partial:!0},r));var O,P;return{$$type:"ais.insights",$$internal:o,$$automatic:u,onStateChange:function(){},subscribe:function(){if(p.shouldAddScript){var k="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var A=document.createElement("script");A.async=!0,A.src=HS,A.onerror=function(){v.emit("error",new Error(k))},document.body.appendChild(A),p.shouldAddScript=!1}catch{p.shouldAddScript=!1,v.emit("error",new Error(k))}}},started:function(){p("addAlgoliaAgent","insights-middleware"),P=v.mainHelper;var k=p.queue;if(Array.isArray(k)){var A=["setUserToken","init"].map(function(W){var ee=Pr(k.slice().reverse(),function(ie){var we=Or(ie,1),Z=we[0];return Z===W})||[],x=Or(ee,2),z=x[1];return z}),H=Or(A,2);b=H[0],f=H[1]}O=VS(v),u||P.overrideStateWithoutTriggeringChangeEvent(Jr(Jr({},P.state),{},{clickAnalytics:!0})),o||v.scheduleSearch();var Q=function(ee){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,z=$h(ee);if(!z)return;var ie=P.state.userToken;function we(){P.overrideStateWithoutTriggeringChangeEvent(Jr(Jr({},P.state),{},{userToken:z})),ie&&ie!==ee&&v.scheduleSearch()}x?we():setTimeout(we,0)};function $(W){Q(W,!0),p("setUserToken",W)}var M=void 0,D=Eh();if(D)M=D;else{var I="anonymous-".concat(kS());M=I}var U,B=O.userToken;if(r!=null&&r.userToken&&(U=r.userToken),U)$(U);else if(B)$(B);else if(w)$(w);else if(b)$(b);else if(M){var Y;if($(M),r!=null&&r.useCookie||(Y=f)!==null&&Y!==void 0&&Y.useCookie){var q;qS(M,r?.cookieDuration||((q=f)===null||q===void 0?void 0:q.cookieDuration))}}p("onUserTokenChange",function(W){return Q(W,!0)},{immediate:!0});var ne=p;jh(p)&&(ne=function(ee,x){var z=Fc(v.client),ie=Or(z,2),we=ie[0],Z=ie[1],be={headers:{"X-Algolia-Application-Id":we,"X-Algolia-API-Key":Z}};return p(ee,x,be)});var L=new Set,K;v.mainHelper.derivedHelpers[0].on("result",function(W){var ee=W.results;ee&&(!ee.queryID||ee.queryID!==K)&&(K=ee.queryID,L.clear())}),v.sendEventToInsights=function(W){if(n)n(W,ne);else if(W.insightsMethod){if(W.insightsMethod==="viewedObjectIDs"){var ee=W.payload,x=ee.objectIDs.filter(function(z){return!L.has(z)});if(x.length===0)return;x.forEach(function(z){return L.add(z)}),ee.objectIDs=x}W.payload.algoliaSource=["instantsearch"],u&&W.payload.algoliaSource.push("instantsearch-automatic"),W.eventModifier==="internal"&&W.payload.algoliaSource.push("instantsearch-internal"),ne(W.insightsMethod,W.payload),process.env.NODE_ENV==="development"&&ke(!!P.state.userToken,`
|
|
114
|
+
Cannot send event to Algolia Insights because \`userToken\` is not set.
|
|
115
|
+
|
|
116
|
+
See documentation: https://www.algolia.com/doc/guides/building-search-ui/going-further/send-insights-events/js/#setting-the-usertoken
|
|
117
|
+
`)}else process.env.NODE_ENV==="development"&&ke(!1,"Cannot send event to Algolia Insights because `insightsMethod` option is missing.")}},unsubscribe:function(){p("onUserTokenChange",void 0),v.sendEventToInsights=Fe,P&&O&&(P.overrideStateWithoutTriggeringChangeEvent(Jr(Jr({},P.state),O)),v.scheduleSearch())}}}}function VS(e){var t,r,n=((t=e._initialResults)===null||t===void 0||(r=t[e.indexName])===null||r===void 0?void 0:r.state)||{},a=e.mainHelper.state;return{userToken:n.userToken||a.userToken,clickAnalytics:n.clickAnalytics||a.clickAnalytics}}function qS(e,t){var r=2592e6,n=new Date;n.setTime(n.getTime()+(t||r*6));var a="expires=".concat(n.toUTCString());document.cookie="_ALGOLIA=".concat(e,";").concat(a,";path=/")}function jh(e){var t=(e.version||"").split(".").map(Number),r=Or(t,2),n=r[0],a=r[1],o=n>=3,s=n===2&&a>=6,u=n===1&&a>=10;return o||s||u}function $h(e){if(e)return typeof e=="number"?e.toString():e}function Dh(e,t,r){var n=ta(t,t.mainIndex,t._initialUiState);e.forEach(function(a){var o={};if(a.getWidgetRenderState){var s=a.getWidgetRenderState(n);s&&s.widgetParams&&(o=s.widgetParams)}var u=Object.keys(o).filter(function(d){return o[d]!==void 0});r.widgets.push({type:a.$$type,widgetType:a.$$widgetType,params:u}),a.$$type==="ais.index"&&Dh(a.getWidgets(),t,r)})}function US(){return ur(function(e){var t,r,n=e.window;return((t=n.navigator)===null||t===void 0||(r=t.userAgent)===null||r===void 0?void 0:r.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})}function WS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.$$internal,r=t===void 0?!1:t;return function(n){var a=n.instantSearchInstance,o={widgets:[]},s=document.createElement("meta"),u=document.querySelector("head");return s.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){var p=a.client;o.ua=p.transporter&&p.transporter.userAgent?p.transporter.userAgent.value:p._ua,Dh(a.mainIndex.getWidgets(),a,o),a.middleware.forEach(function(m){return o.widgets.push({middleware:!0,type:m.instance.$$type,internal:m.instance.$$internal})}),s.content=JSON.stringify(o),u.appendChild(s)},0)},started:function(){},unsubscribe:function(){s.remove()}}}}var kl,Nh;function Al(){if(Nh)return kl;Nh=1;var e=String.prototype.replace,t=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return kl={default:r.RFC3986,formatters:{RFC1738:function(n){return e.call(n,t,"+")},RFC3986:function(n){return String(n)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},kl}var jl,Fh;function Ih(){if(Fh)return jl;Fh=1;var e=Al(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=(function(){for(var g=[],y=0;y<256;++y)g.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return g})(),a=function(y){for(;y.length>1;){var f=y.pop(),b=f.obj[f.prop];if(r(b)){for(var w=[],_=0;_<b.length;++_)typeof b[_]<"u"&&w.push(b[_]);f.obj[f.prop]=w}}},o=function(y,f){for(var b=f&&f.plainObjects?Object.create(null):{},w=0;w<y.length;++w)typeof y[w]<"u"&&(b[w]=y[w]);return b},s=function g(y,f,b){if(!f)return y;if(typeof f!="object"){if(r(y))y.push(f);else if(y&&typeof y=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,f))&&(y[f]=!0);else return[y,f];return y}if(!y||typeof y!="object")return[y].concat(f);var w=y;return r(y)&&!r(f)&&(w=o(y,b)),r(y)&&r(f)?(f.forEach(function(_,S){if(t.call(y,S)){var R=y[S];R&&typeof R=="object"&&_&&typeof _=="object"?y[S]=g(R,_,b):y.push(_)}else y[S]=_}),y):Object.keys(f).reduce(function(_,S){var R=f[S];return t.call(_,S)?_[S]=g(_[S],R,b):_[S]=R,_},w)},u=function(y,f){return Object.keys(f).reduce(function(b,w){return b[w]=f[w],b},y)},d=function(g,y,f){var b=g.replace(/\+/g," ");if(f==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},p=function(y,f,b,w,_){if(y.length===0)return y;var S=y;if(typeof y=="symbol"?S=Symbol.prototype.toString.call(y):typeof y!="string"&&(S=String(y)),b==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function(C){return"%26%23"+parseInt(C.slice(2),16)+"%3B"});for(var R="",O=0;O<S.length;++O){var P=S.charCodeAt(O);if(P===45||P===46||P===95||P===126||P>=48&&P<=57||P>=65&&P<=90||P>=97&&P<=122||_===e.RFC1738&&(P===40||P===41)){R+=S.charAt(O);continue}if(P<128){R=R+n[P];continue}if(P<2048){R=R+(n[192|P>>6]+n[128|P&63]);continue}if(P<55296||P>=57344){R=R+(n[224|P>>12]+n[128|P>>6&63]+n[128|P&63]);continue}O+=1,P=65536+((P&1023)<<10|S.charCodeAt(O)&1023),R+=n[240|P>>18]+n[128|P>>12&63]+n[128|P>>6&63]+n[128|P&63]}return R},m=function(y){for(var f=[{obj:{o:y},prop:"o"}],b=[],w=0;w<f.length;++w)for(var _=f[w],S=_.obj[_.prop],R=Object.keys(S),O=0;O<R.length;++O){var P=R[O],C=S[P];typeof C=="object"&&C!==null&&b.indexOf(C)===-1&&(f.push({obj:S,prop:P}),b.push(C))}return a(f),y},v=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},h=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},l=function(y,f){return[].concat(y,f)},c=function(y,f){if(r(y)){for(var b=[],w=0;w<y.length;w+=1)b.push(f(y[w]));return b}return f(y)};return jl={arrayToObject:o,assign:u,combine:l,compact:m,decode:d,encode:p,isBuffer:h,isRegExp:v,maybeMap:c,merge:s},jl}var $l,Mh;function zS(){if(Mh)return $l;Mh=1;var e=Ih(),t=Al(),r=Object.prototype.hasOwnProperty,n={brackets:function(g){return g+"[]"},comma:"comma",indices:function(g,y){return g+"["+y+"]"},repeat:function(g){return g}},a=Array.isArray,o=String.prototype.split,s=Array.prototype.push,u=function(c,g){s.apply(c,a(g)?g:[g])},d=Date.prototype.toISOString,p=t.default,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:e.encode,encodeValuesOnly:!1,format:p,formatter:t.formatters[p],indices:!1,serializeDate:function(g){return d.call(g)},skipNulls:!1,strictNullHandling:!1},v=function(g){return typeof g=="string"||typeof g=="number"||typeof g=="boolean"||typeof g=="symbol"||typeof g=="bigint"},h=function c(g,y,f,b,w,_,S,R,O,P,C,k,A,H){var Q=g;if(typeof S=="function"?Q=S(y,Q):Q instanceof Date?Q=P(Q):f==="comma"&&a(Q)&&(Q=e.maybeMap(Q,function(W){return W instanceof Date?P(W):W})),Q===null){if(b)return _&&!A?_(y,m.encoder,H,"key",C):y;Q=""}if(v(Q)||e.isBuffer(Q)){if(_){var $=A?y:_(y,m.encoder,H,"key",C);if(f==="comma"&&A){for(var M=o.call(String(Q),","),D="",I=0;I<M.length;++I)D+=(I===0?"":",")+k(_(M[I],m.encoder,H,"value",C));return[k($)+"="+D]}return[k($)+"="+k(_(Q,m.encoder,H,"value",C))]}return[k(y)+"="+k(String(Q))]}var U=[];if(typeof Q>"u")return U;var B;if(f==="comma"&&a(Q))B=[{value:Q.length>0?Q.join(",")||null:void 0}];else if(a(S))B=S;else{var Y=Object.keys(Q);B=R?Y.sort(R):Y}for(var q=0;q<B.length;++q){var ne=B[q],L=typeof ne=="object"&&typeof ne.value<"u"?ne.value:Q[ne];if(!(w&&L===null)){var K=a(Q)?typeof f=="function"?f(y,ne):y:y+(O?"."+ne:"["+ne+"]");u(U,c(L,K,f,b,w,_,S,R,O,P,C,k,A,H))}}return U},l=function(g){if(!g)return m;if(g.encoder!==null&&typeof g.encoder<"u"&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=g.charset||m.charset;if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var f=t.default;if(typeof g.format<"u"){if(!r.call(t.formatters,g.format))throw new TypeError("Unknown format option provided.");f=g.format}var b=t.formatters[f],w=m.filter;return(typeof g.filter=="function"||a(g.filter))&&(w=g.filter),{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:m.addQueryPrefix,allowDots:typeof g.allowDots>"u"?m.allowDots:!!g.allowDots,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:m.charsetSentinel,delimiter:typeof g.delimiter>"u"?m.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:m.encode,encoder:typeof g.encoder=="function"?g.encoder:m.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:m.encodeValuesOnly,filter:w,format:f,formatter:b,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:m.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:m.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:m.strictNullHandling}};return $l=function(c,g){var y=c,f=l(g),b,w;typeof f.filter=="function"?(w=f.filter,y=w("",y)):a(f.filter)&&(w=f.filter,b=w);var _=[];if(typeof y!="object"||y===null)return"";var S;g&&g.arrayFormat in n?S=g.arrayFormat:g&&"indices"in g?S=g.indices?"indices":"repeat":S="indices";var R=n[S];b||(b=Object.keys(y)),f.sort&&b.sort(f.sort);for(var O=0;O<b.length;++O){var P=b[O];f.skipNulls&&y[P]===null||u(_,h(y[P],P,R,f.strictNullHandling,f.skipNulls,f.encode?f.encoder:null,f.filter,f.sort,f.allowDots,f.serializeDate,f.format,f.formatter,f.encodeValuesOnly,f.charset))}var C=_.join(f.delimiter),k=f.addQueryPrefix===!0?"?":"";return f.charsetSentinel&&(f.charset==="iso-8859-1"?k+="utf8=%26%2310003%3B&":k+="utf8=%E2%9C%93&"),C.length>0?k+C:""},$l}var Dl,Lh;function YS(){if(Lh)return Dl;Lh=1;var e=Ih(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:e.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(h){return h.replace(/&#(\d+);/g,function(l,c){return String.fromCharCode(parseInt(c,10))})},o=function(h,l){return h&&typeof h=="string"&&l.comma&&h.indexOf(",")>-1?h.split(","):h},s="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",d=function(l,c){var g={},y=c.ignoreQueryPrefix?l.replace(/^\?/,""):l,f=c.parameterLimit===1/0?void 0:c.parameterLimit,b=y.split(c.delimiter,f),w=-1,_,S=c.charset;if(c.charsetSentinel)for(_=0;_<b.length;++_)b[_].indexOf("utf8=")===0&&(b[_]===u?S="utf-8":b[_]===s&&(S="iso-8859-1"),w=_,_=b.length);for(_=0;_<b.length;++_)if(_!==w){var R=b[_],O=R.indexOf("]="),P=O===-1?R.indexOf("="):O+1,C,k;P===-1?(C=c.decoder(R,n.decoder,S,"key"),k=c.strictNullHandling?null:""):(C=c.decoder(R.slice(0,P),n.decoder,S,"key"),k=e.maybeMap(o(R.slice(P+1),c),function(A){return c.decoder(A,n.decoder,S,"value")})),k&&c.interpretNumericEntities&&S==="iso-8859-1"&&(k=a(k)),R.indexOf("[]=")>-1&&(k=r(k)?[k]:k),t.call(g,C)?g[C]=e.combine(g[C],k):g[C]=k}return g},p=function(h,l,c,g){for(var y=g?l:o(l,c),f=h.length-1;f>=0;--f){var b,w=h[f];if(w==="[]"&&c.parseArrays)b=[].concat(y);else{b=c.plainObjects?Object.create(null):{};var _=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,S=parseInt(_,10);!c.parseArrays&&_===""?b={0:y}:!isNaN(S)&&w!==_&&String(S)===_&&S>=0&&c.parseArrays&&S<=c.arrayLimit?(b=[],b[S]=y):_!=="__proto__"&&(b[_]=y)}y=b}return y},m=function(l,c,g,y){if(l){var f=g.allowDots?l.replace(/\.([^.[]+)/g,"[$1]"):l,b=/(\[[^[\]]*])/,w=/(\[[^[\]]*])/g,_=g.depth>0&&b.exec(f),S=_?f.slice(0,_.index):f,R=[];if(S){if(!g.plainObjects&&t.call(Object.prototype,S)&&!g.allowPrototypes)return;R.push(S)}for(var O=0;g.depth>0&&(_=w.exec(f))!==null&&O<g.depth;){if(O+=1,!g.plainObjects&&t.call(Object.prototype,_[1].slice(1,-1))&&!g.allowPrototypes)return;R.push(_[1])}return _&&R.push("["+f.slice(_.index)+"]"),p(R,c,g,y)}},v=function(l){if(!l)return n;if(l.decoder!==null&&l.decoder!==void 0&&typeof l.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof l.charset<"u"&&l.charset!=="utf-8"&&l.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var c=typeof l.charset>"u"?n.charset:l.charset;return{allowDots:typeof l.allowDots>"u"?n.allowDots:!!l.allowDots,allowPrototypes:typeof l.allowPrototypes=="boolean"?l.allowPrototypes:n.allowPrototypes,arrayLimit:typeof l.arrayLimit=="number"?l.arrayLimit:n.arrayLimit,charset:c,charsetSentinel:typeof l.charsetSentinel=="boolean"?l.charsetSentinel:n.charsetSentinel,comma:typeof l.comma=="boolean"?l.comma:n.comma,decoder:typeof l.decoder=="function"?l.decoder:n.decoder,delimiter:typeof l.delimiter=="string"||e.isRegExp(l.delimiter)?l.delimiter:n.delimiter,depth:typeof l.depth=="number"||l.depth===!1?+l.depth:n.depth,ignoreQueryPrefix:l.ignoreQueryPrefix===!0,interpretNumericEntities:typeof l.interpretNumericEntities=="boolean"?l.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof l.parameterLimit=="number"?l.parameterLimit:n.parameterLimit,parseArrays:l.parseArrays!==!1,plainObjects:typeof l.plainObjects=="boolean"?l.plainObjects:n.plainObjects,strictNullHandling:typeof l.strictNullHandling=="boolean"?l.strictNullHandling:n.strictNullHandling}};return Dl=function(h,l){var c=v(l);if(h===""||h===null||typeof h>"u")return c.plainObjects?Object.create(null):{};for(var g=typeof h=="string"?d(h,c):h,y=c.plainObjects?Object.create(null):{},f=Object.keys(g),b=0;b<f.length;++b){var w=f[b],_=m(w,g[w],c,typeof h=="string");y=e.merge(y,_,c)}return e.compact(y)},Dl}var Nl,Bh;function QS(){if(Bh)return Nl;Bh=1;var e=zS(),t=YS(),r=Al();return Nl={formats:r,parse:t,stringify:e},Nl}var KS=QS();const Hh=aa(KS);function La(e){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function GS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vh(n.key),n)}}function XS(e,t,r){return t&&JS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kt(e,t,r){return t=Vh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vh(e){var t=ZS(e,"string");return La(t)=="symbol"?t:String(t)}function ZS(e,t){if(La(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(La(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qh=function(t){t&&(window.document.title=t)},eR=(function(){function e(t){var r=this,n=t.windowTitle,a=t.writeDelay,o=a===void 0?400:a,s=t.createURL,u=t.parseURL,d=t.getLocation,p=t.start,m=t.dispose,v=t.push,h=t.cleanUrlOnDispose;GS(this,e),kt(this,"$$type","ais.browser"),kt(this,"windowTitle",void 0),kt(this,"writeDelay",void 0),kt(this,"_createURL",void 0),kt(this,"parseURL",void 0),kt(this,"getLocation",void 0),kt(this,"writeTimer",void 0),kt(this,"_onPopState",void 0),kt(this,"inPopState",!1),kt(this,"isDisposed",!1),kt(this,"latestAcknowledgedHistory",0),kt(this,"_start",void 0),kt(this,"_dispose",void 0),kt(this,"_push",void 0),kt(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=o,this._createURL=s,this.parseURL=u,this.getLocation=d,this._start=p,this._dispose=m,this._push=v,this._cleanUrlOnDispose=typeof h>"u"?!0:h,process.env.NODE_ENV==="development"&&typeof h>"u"&&console.info(`Starting from the next major version, InstantSearch will not clean up the URL from active refinements when it is disposed.
|
|
118
|
+
|
|
119
|
+
We recommend setting \`cleanUrlOnDispose\` to false to adopt this change today.
|
|
120
|
+
To stay with the current behaviour and remove this warning, set the option to true.
|
|
121
|
+
|
|
122
|
+
See documentation: `.concat(zn({name:"history-router"}),"#widget-param-cleanurlondispose")),ur(function(l){var c=l.window,g=r.windowTitle&&r.windowTitle(r.read());qh(g),r.latestAcknowledgedHistory=c.history.length})}return XS(e,[{key:"read",value:function(){return this.parseURL({qsModule:Hh,location:this.getLocation()})}},{key:"write",value:function(r){var n=this;ur(function(a){var o=a.window,s=n.createURL(r),u=n.windowTitle&&n.windowTitle(r);n.writeTimer&&clearTimeout(n.writeTimer),n.writeTimer=setTimeout(function(){qh(u),n.shouldWrite(s)&&(n._push?n._push(s):o.history.pushState(r,u||"",s),n.latestAcknowledgedHistory=o.history.length),n.inPopState=!1,n.writeTimer=void 0},n.writeDelay)})}},{key:"onUpdate",value:function(r){var n=this;this._start&&this._start(function(){r(n.read())}),this._onPopState=function(){n.writeTimer&&(clearTimeout(n.writeTimer),n.writeTimer=void 0),n.inPopState=!0,r(n.read())},ur(function(a){var o=a.window;o.addEventListener("popstate",n._onPopState)})}},{key:"createURL",value:function(r){var n=this._createURL({qsModule:Hh,routeState:r,location:this.getLocation()});if(process.env.NODE_ENV==="development")try{new URL(n)}catch{process.env.NODE_ENV==="development"&&ke(!1,"The URL returned by the `createURL` function is invalid.\nPlease make sure it returns an absolute URL to avoid issues, e.g: `https://algolia.com/search?query=iphone`.")}return n}},{key:"dispose",value:function(){var r=this;this._dispose&&this._dispose(),this.isDisposed=!0,ur(function(n){var a=n.window;r._onPopState&&a.removeEventListener("popstate",r._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(r){var n=this;return ur(function(a){var o=a.window;if(n.isDisposed&&!n._cleanUrlOnDispose)return!1;var s=!(n.isDisposed&&n.latestAcknowledgedHistory!==o.history.length);return!n.inPopState&&s&&r!==o.location.href})}}]),e})();function Uh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.createURL,r=t===void 0?function(c){var g=c.qsModule,y=c.routeState,f=c.location,b=f.protocol,w=f.hostname,_=f.port,S=_===void 0?"":_,R=f.pathname,O=f.hash,P=g.stringify(y),C=S===""?"":":".concat(S);return P?"".concat(b,"//").concat(w).concat(C).concat(R,"?").concat(P).concat(O):"".concat(b,"//").concat(w).concat(C).concat(R).concat(O)}:t,n=e.parseURL,a=n===void 0?function(c){var g=c.qsModule,y=c.location;return g.parse(y.search.slice(1),{arrayLimit:99})}:n,o=e.writeDelay,s=o===void 0?400:o,u=e.windowTitle,d=e.getLocation,p=d===void 0?function(){return ur(function(c){var g=c.window;return g.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:d,m=e.start,v=e.dispose,h=e.push,l=e.cleanUrlOnDispose;return new eR({createURL:r,parseURL:a,writeDelay:s,windowTitle:u,getLocation:p,start:m,dispose:v,push:h,cleanUrlOnDispose:l})}function Ba(e){"@babel/helpers - typeof";return Ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ba(e)}var tR=["configure"];function Wh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Li(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wh(Object(r),!0).forEach(function(n){Fl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fl(e,t,r){return t=rR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rR(e){var t=nR(e,"string");return Ba(t)=="symbol"?t:String(t)}function nR(e,t){if(Ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aR(e,t){if(e==null)return{};var r=iR(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iR(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function zh(e){e.configure;var t=aR(e,tR);return t}function Yh(){return{$$type:"ais.simple",stateToRoute:function(t){return Object.keys(t).reduce(function(r,n){return Li(Li({},r),{},Fl({},n,zh(t[n])))},{})},routeToState:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(r,n){return Li(Li({},r),{},Fl({},n,zh(t[n])))},{})}}}function Ha(e){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}function Qh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qh(Object(r),!0).forEach(function(n){Kh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kh(e,t,r){return t=oR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oR(e){var t=sR(e,"string");return Ha(t)=="symbol"?t:String(t)}function sR(e,t){if(Ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.router,n=r===void 0?Uh():r,a=t.stateMapping,o=a===void 0?Yh():a,s=t.$$internal,u=s===void 0?!1:s;return function(d){var p=d.instantSearchInstance;function m(l){var c=p.mainIndex.getWidgets().length===0?p._initialUiState:p.mainIndex.getWidgetUiState({}),g=Object.keys(l).reduce(function(f,b){return Bi(Bi({},f),{},Kh({},b,l[b]))},c),y=o.stateToRoute(g);return n.createURL(y)}p._createURL=m;var v=void 0,h=p._initialUiState;return{$$type:"ais.router({router:".concat(n.$$type||"__unknown__",", stateMapping:").concat(o.$$type||"__unknown__","})"),$$internal:u,onStateChange:function(c){var g=c.uiState,y=o.stateToRoute(g);(v===void 0||!Gr(v,y))&&(n.write(y),v=y)},subscribe:function(){process.env.NODE_ENV==="development"&&ke(Object.keys(h).length===0,"Using `initialUiState` together with routing is not recommended. The `initialUiState` will be overwritten by the URL parameters."),p._initialUiState=Bi(Bi({},h),o.routeToState(n.read())),n.onUpdate(function(c){p.mainIndex.getWidgets().length>0&&p.setUiState(o.routeToState(c))})},started:function(){var c;(c=n.start)===null||c===void 0||c.call(n)},unsubscribe:function(){n.dispose()}}}};function uR(e,t){return e.toLocaleString(t)}function Va(e){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Va(e)}function Gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gh(Object(r),!0).forEach(function(n){cR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cR(e,t,r){return t=dR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dR(e){var t=fR(e,"string");return Va(t)=="symbol"?t:String(t)}function fR(e,t){if(Va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hR(e){var t=e.numberLocale;return{formatNumber:function(n,a){return uR(Number(a(n)),t)},highlight:function(n,a){try{var o=JSON.parse(n);return a(Sh(Er(Er({},o),{},{hit:this})))}catch{throw new Error(`
|
|
123
|
+
The highlight helper expects a JSON object of the format:
|
|
124
|
+
{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseHighlight:function(n,a){try{var o=JSON.parse(n);return a(Rh(Er(Er({},o),{},{hit:this})))}catch{throw new Error(`
|
|
125
|
+
The reverseHighlight helper expects a JSON object of the format:
|
|
126
|
+
{ "attribute": "name", "highlightedTagName": "mark" }`)}},snippet:function(n,a){try{var o=JSON.parse(n);return a(Ph(Er(Er({},o),{},{hit:this})))}catch{throw new Error(`
|
|
127
|
+
The snippet helper expects a JSON object of the format:
|
|
128
|
+
{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseSnippet:function(n,a){try{var o=JSON.parse(n);return a(Oh(Er(Er({},o),{},{hit:this})))}catch{throw new Error(`
|
|
129
|
+
The reverseSnippet helper expects a JSON object of the format:
|
|
130
|
+
{ "attribute": "name", "highlightedTagName": "mark" }`)}},insights:function(n,a){try{var o=JSON.parse(n),s=o.method,u=o.payload;return a(cf(s,Er({objectIDs:[this.objectID]},u)))}catch{throw new Error(`
|
|
131
|
+
The insights helper expects a JSON object of the format:
|
|
132
|
+
{ "method": "method-name", "payload": { "eventName": "name of the event" } }`)}}}}const Jh="4.80.0";function Pn(e){"@babel/helpers - typeof";return Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pn(e)}function Xh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Il(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xh(Object(r),!0).forEach(function(n){Ve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Zh(n.key),n)}}function gR(e,t,r){return t&&mR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yR(e,t){if(typeof t!="function"&&t!==null)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&&Ml(e,t)}function Ml(e,t){return Ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ml(e,t)}function vR(e){var t=wR();return function(){var n=Hi(e),a;if(t){var o=Hi(this).constructor;a=Reflect.construct(n,arguments,o)}else a=n.apply(this,arguments);return bR(this,a)}}function bR(e,t){if(t&&(Pn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Be(e)}function Be(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hi(e){return Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hi(e)}function Ve(e,t,r){return t=Zh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zh(e){var t=_R(e,"string");return Pn(t)=="symbol"?t:String(t)}function _R(e,t){if(Pn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cr=Ge({name:"instantsearch"});function SR(){return"#"}var ep={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},RR=(function(e){yR(r,e);var t=vR(r);function r(n){var a,o;pR(this,r),o=t.call(this),Ve(Be(o),"client",void 0),Ve(Be(o),"indexName",void 0),Ve(Be(o),"compositionID",void 0),Ve(Be(o),"insightsClient",void 0),Ve(Be(o),"onStateChange",null),Ve(Be(o),"future",void 0),Ve(Be(o),"helper",void 0),Ve(Be(o),"mainHelper",void 0),Ve(Be(o),"mainIndex",void 0),Ve(Be(o),"started",void 0),Ve(Be(o),"templatesConfig",void 0),Ve(Be(o),"renderState",{}),Ve(Be(o),"_stalledSearchDelay",void 0),Ve(Be(o),"_searchStalledTimer",void 0),Ve(Be(o),"_initialUiState",void 0),Ve(Be(o),"_initialResults",void 0),Ve(Be(o),"_manuallyResetScheduleSearch",!1),Ve(Be(o),"_resetScheduleSearch",void 0),Ve(Be(o),"_createURL",void 0),Ve(Be(o),"_searchFunction",void 0),Ve(Be(o),"_mainHelperSearch",void 0),Ve(Be(o),"_hasSearchWidget",!1),Ve(Be(o),"_hasRecommendWidget",!1),Ve(Be(o),"_insights",void 0),Ve(Be(o),"middleware",[]),Ve(Be(o),"sendEventToInsights",void 0),Ve(Be(o),"status","idle"),Ve(Be(o),"error",void 0),Ve(Be(o),"scheduleSearch",Wn(function(){o.started&&o.mainHelper.search()})),Ve(Be(o),"scheduleRender",Wn(function(){var Q,$=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;(Q=o.mainHelper)!==null&&Q!==void 0&&Q.hasPendingRequests()||(clearTimeout(o._searchStalledTimer),o._searchStalledTimer=null,$&&(o.status="idle",o.error=void 0)),o.mainIndex.render({instantSearchInstance:Be(o)}),o.emit("render")})),Ve(Be(o),"onInternalStateChange",Wn(function(){var Q=o.mainIndex.getWidgetUiState({});o.middleware.forEach(function($){var M=$.instance;M.onStateChange({uiState:Q})})})),o.setMaxListeners(100);var s=n.indexName,u=s===void 0?"":s,d=n.compositionID,p=n.numberLocale,m=n.initialUiState,v=m===void 0?{}:m,h=n.routing,l=h===void 0?null:h,c=n.insights,g=c===void 0?void 0:c,y=n.searchFunction,f=n.stalledSearchDelay,b=f===void 0?200:f,w=n.searchClient,_=w===void 0?null:w,S=n.insightsClient,R=S===void 0?null:S,O=n.onStateChange,P=O===void 0?null:O,C=n.future,k=C===void 0?Il(Il({},ep),n.future||{}):C;if(_===null)throw new Error(Cr("The `searchClient` option is required."));if(typeof _.search!="function")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(typeof _.addAlgoliaAgent=="function"&&_.addAlgoliaAgent("instantsearch.js (".concat(Jh,")")),process.env.NODE_ENV==="development"&&ke(R===null,"`insightsClient` property has been deprecated. It is still supported in 4.x releases, but not further. It is replaced by the `insights` middleware.\n\nFor more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/"),R&&typeof R!="function")throw new Error(Cr("The `insightsClient` option should be a function."));if(process.env.NODE_ENV==="development"&&ke(!n.searchParameters,"The `searchParameters` option is deprecated and will not be supported in InstantSearch.js 4.x.\n\nYou can replace it with the `configure` widget:\n\n```\nsearch.addWidgets([\n configure(".concat(JSON.stringify(n.searchParameters,null,2),`)
|
|
133
|
+
]);
|
|
134
|
+
\`\`\`
|
|
135
|
+
|
|
136
|
+
See `).concat(zn({name:"configure"}))),process.env.NODE_ENV==="development"&&((a=n.future)===null||a===void 0?void 0:a.preserveSharedStateOnUnmount)===void 0&&console.info(`Starting from the next major version, InstantSearch will change how widgets state is preserved when they are removed. InstantSearch will keep the state of unmounted widgets to be usable by other widgets with the same attribute.
|
|
137
|
+
|
|
138
|
+
We recommend setting \`future.preserveSharedStateOnUnmount\` to true to adopt this change today.
|
|
139
|
+
To stay with the current behaviour and remove this warning, set the option to false.
|
|
140
|
+
|
|
141
|
+
See documentation: `.concat(zn({name:"instantsearch"}),`#widget-param-future
|
|
142
|
+
`)),o.client=_,o.future=k,o.insightsClient=R,o.indexName=u,o.compositionID=d,o.helper=null,o.mainHelper=null,o.mainIndex=_h({indexName:o.compositionID||o.indexName}),o.onStateChange=P,o.started=!1,o.templatesConfig={helpers:hR({numberLocale:p}),compileOptions:{}},o._stalledSearchDelay=b,o._searchStalledTimer=null,o._createURL=SR,o._initialUiState=v,o._initialResults=null,o._insights=g,y&&(process.env.NODE_ENV==="development"&&ke(!1,"The `searchFunction` option is deprecated. Use `onStateChange` instead."),o._searchFunction=y),o.sendEventToInsights=Fe,l){var A=typeof l=="boolean"?{}:l;A.$$internal=!0,o.use(lR(A))}if(g){var H=typeof g=="boolean"?{}:g;H.$$internal=!0,o.use(Ah(H))}return US()&&o.use(WS({$$internal:!0})),o}return gR(r,[{key:"_isSearchStalled",get:function(){return process.env.NODE_ENV==="development"&&ke(!1,'`InstantSearch._isSearchStalled` is deprecated and will be removed in InstantSearch.js 5.0.\n\nUse `InstantSearch.status === "stalled"` instead.'),this.status==="stalled"}},{key:"use",value:function(){for(var a=this,o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];var d=s.map(function(p){var m=Il({$$type:"__unknown__",$$internal:!1,subscribe:Fe,started:Fe,unsubscribe:Fe,onStateChange:Fe},p({instantSearchInstance:a}));return a.middleware.push({creator:p,instance:m}),m});return this.started&&d.forEach(function(p){p.subscribe(),p.started()}),this}},{key:"unuse",value:function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return this.middleware.filter(function(u){return o.includes(u.creator)}).forEach(function(u){return u.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(u){return!o.includes(u.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return process.env.NODE_ENV==="development"&&ke(!1,"The middleware API is now considered stable, so we recommend replacing `EXPERIMENTAL_use` with `use` before upgrading to the next major version."),this.use.apply(this,arguments)}},{key:"addWidget",value:function(a){return process.env.NODE_ENV==="development"&&ke(!1,"addWidget will still be supported in 4.x releases, but not further. It is replaced by `addWidgets([widget])`"),this.addWidgets([a])}},{key:"addWidgets",value:function(a){if(!Array.isArray(a))throw new Error(Cr("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&a.some(function(o){return!Array.isArray(o)&&$t(o)&&!o._isolated}))throw new Error(Cr("The `index` widget cannot be used with a composition-based InstantSearch implementation."));return this.mainIndex.addWidgets(a),this}},{key:"removeWidget",value:function(a){return process.env.NODE_ENV==="development"&&ke(!1,"removeWidget will still be supported in 4.x releases, but not further. It is replaced by `removeWidgets([widget])`"),this.removeWidgets([a])}},{key:"removeWidgets",value:function(a){if(!Array.isArray(a))throw new Error(Cr("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));return this.mainIndex.removeWidgets(a),this}},{key:"start",value:function(){var a=this;if(this.started)throw new Error(Cr("The `start` method has already been called once."));var o=this.mainHelper||_t(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(o.searchForFacetValues=o.searchForCompositionFacetValues.bind(o)),o.search=function(){return a.status="loading",a.scheduleRender(!1),process.env.NODE_ENV==="development"&&ke(!!a.indexName||!!a.compositionID||a.mainIndex.getWidgets().some($t),"No indexName provided, nor an explicit index widget in the widgets tree. This is required to be able to display results."),a._hasSearchWidget&&(a.compositionID?o.searchWithComposition():o.searchOnlyWithDerivedHelpers()),a._hasRecommendWidget&&o.recommend(),o},this._searchFunction){var s={search:function(){return new Promise(Fe)}};this._mainHelperSearch=o.search.bind(o),o.search=function(){var d=a.mainIndex.getHelper(),p=_t(s,d.state.index,d.state);return p.once("search",function(m){var v=m.state;d.overrideStateWithoutTriggeringChangeEvent(v),a._mainHelperSearch()}),p.on("change",function(m){var v=m.state;d.setState(v)}),a._searchFunction(p),o}}if(o.on("error",function(d){var p=d.error;if(!(p instanceof Error)){var m=p;p=Object.keys(m).reduce(function(v,h){return v[h]=m[h],v},new Error(m.message))}p.error=p,a.error=p,a.status="error",a.scheduleRender(!1),a.emit("error",p)}),this.mainHelper=o,this.middleware.forEach(function(d){var p=d.instance;p.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){eb(this.client,this._initialResults),z0(this.mainHelper,this._initialResults);var u=this.scheduleSearch;this.scheduleSearch=Wn(Fe),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){a.scheduleSearch=u}:Wn(function(){a.scheduleSearch=u})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(d){var p=d.instance;p.started()}),typeof this._insights>"u"&&o.derivedHelpers[0].once("result",function(){var d=a.mainIndex.getScopedResults().some(function(p){var m=p.results;return m?._automaticInsights});d&&a.use(Ah({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var a;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),(a=this.mainHelper)===null||a===void 0||a.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(o){var s=o.instance;s.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var a=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){a.status="stalled",a.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(a){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!this.mainHelper)throw new Error(Cr("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var u=typeof a=="function"?a(this.mainIndex.getWidgetUiState({})):a;this.onStateChange&&s?this.onStateChange({uiState:u,setUiState:function(p){bs(typeof p=="function"?p(u):p,o.mainIndex),o.scheduleSearch(),o.onInternalStateChange()}}):(bs(u,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.started)throw new Error(Cr("The `start` method needs to be called before `createURL`."));return this._createURL(a)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Cr("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),r})(TS),Wt=function(t){return new RR(t)};Wt.version=Jh,Wt.createInfiniteHitsSessionStorageCache=Rr(CS,"import { createInfiniteHitsSessionStorageCache } from 'instantsearch.js/es/lib/infiniteHitsCache'"),Wt.highlight=Rr(Sh,"import { highlight } from 'instantsearch.js/es/helpers'"),Wt.reverseHighlight=Rr(Rh,"import { reverseHighlight } from 'instantsearch.js/es/helpers'"),Wt.snippet=Rr(Ph,"import { snippet } from 'instantsearch.js/es/helpers'"),Wt.reverseSnippet=Rr(Oh,"import { reverseSnippet } from 'instantsearch.js/es/helpers'"),Wt.insights=cf,Wt.getInsightsAnonymousUserToken=RS,Object.defineProperty(Wt,"widgets",{get:function(){throw new ReferenceError(`"instantsearch.widgets" are not available from the ES build.
|
|
143
|
+
|
|
144
|
+
To import the widgets:
|
|
145
|
+
|
|
146
|
+
import { searchBox } from 'instantsearch.js/es/widgets'`)}}),Object.defineProperty(Wt,"connectors",{get:function(){throw new ReferenceError(`"instantsearch.connectors" are not available from the ES build.
|
|
147
|
+
|
|
148
|
+
To import the connectors:
|
|
149
|
+
|
|
150
|
+
import { connectSearchBox } from 'instantsearch.js/es/connectors'`)}}),Object.defineProperty(Wt,"templates",{get:function(){throw new ReferenceError(`"instantsearch.templates" are not available from the ES build.
|
|
151
|
+
|
|
152
|
+
To import the templates:
|
|
153
|
+
|
|
154
|
+
import { carousel } from 'instantsearch.js/es/templates'`)}});var PR="4.21.3",tp=function(e){var t;return Vn(((t={mixins:[Le({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(r){fn(!1),this.instantSearchInstance.helper.setClient(r).search()},indexName:function(r){this.instantSearchInstance.helper.setIndex(r||"").search()},compositionID:function(r){this.instantSearchInstance.helper.setIndex(r||"").search()},stalledSearchDelay:function(r){this.instantSearchInstance._stalledSearchDelay=r},routing:function(){throw new Error(`routing configuration can not be changed dynamically at this point.
|
|
155
|
+
|
|
156
|
+
Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props`)},onStateChange:function(){throw new Error(`onStateChange configuration can not be changed dynamically at this point.
|
|
157
|
+
|
|
158
|
+
Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props`)},searchFunction:function(r){this.instantSearchInstance._searchFunction=r},middlewares:{immediate:!0,handler:function(r,n){var a=this;(n||[]).filter(function(o){return(r||[]).indexOf(o)===-1}).forEach(function(o){a.instantSearchInstance.unuse(o)}),(r||[]).filter(function(o){return(n||[]).indexOf(o)===-1}).forEach(function(o){a.instantSearchInstance.use(o)})}},future:function(r){this.instantSearchInstance.future=Object.assign(ep,r)}},created:function(){var r=this.instantSearchInstance.client;typeof r.addAlgoliaAgent=="function"&&(r.addAlgoliaAgent("Vue ("+i.version+")"),r.addAlgoliaAgent("Vue InstantSearch ("+PR+")"))},mounted:function(){var r=this;this.$nextTick(function(){r.instantSearchInstance.started||r.instantSearchInstance.start()})}}).beforeUnmount=function(){this.instantSearchInstance.started&&this.instantSearchInstance.dispose(),this.instantSearchInstance.__initialSearchResults=void 0},t),e)},rp=`Vue InstantSearch: You used the prop api-key or app-id.
|
|
159
|
+
These have been replaced by search-client.
|
|
160
|
+
|
|
161
|
+
See more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client`;const OR=tp({name:"AisInstantSearch",props:{searchClient:{type:Object,required:!0},insightsClient:{type:Function,default:void 0},indexName:{type:String,required:!1},compositionID:{type:String,required:!1},routing:{default:void 0,validator:function(e){return!(typeof e=="boolean"||!e.router&&!e.stateMapping)||(fn("The `routing` option expects an object with `router` and/or `stateMapping`.\n\nSee https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-routing"),!1)}},insights:{default:void 0,validator:function(e){return e===void 0||typeof e=="boolean"||typeof e=="object"}},stalledSearchDelay:{type:Number,default:void 0},searchFunction:{type:Function,default:void 0},onStateChange:{type:Function,default:void 0},initialUiState:{type:Object,default:void 0},apiKey:{type:String,default:void 0,validator:function(e){return e&&fn(rp),!1}},appId:{type:String,default:void 0,validator:function(e){return e&&fn(rp),!1}},middlewares:{type:Array,default:null},future:{type:Object,default:void 0}},data:function(){return{instantSearchInstance:Wt({searchClient:this.searchClient,insightsClient:this.insightsClient,insights:this.insights,indexName:this.indexName,compositionID:this.compositionID,routing:this.routing,stalledSearchDelay:this.stalledSearchDelay,searchFunction:this.searchFunction,onStateChange:this.onStateChange,initialUiState:this.initialUiState,future:this.future})}},render:wi(function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!1,t)},cs(this))})});tp({name:"AisInstantSearchSsr",inject:{$_ais_ssrInstantSearchInstance:{default:function(){throw new Error("`createServerRootMixin` is required when using SSR.")}}},data:function(){return{instantSearchInstance:this.$_ais_ssrInstantSearchInstance}},render:wi(function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!0,t)},cs(this))})}),We({connector:P_},{$$widgetType:"ais.infiniteHits"}),Le({name:"InfiniteHits"}),Le({name:"Menu"}),We({connector:Sf},{$$widgetType:"ais.menu"}),It(),Le({name:"MenuSelect"}),We({connector:Sf},{$$widgetType:"ais.menuSelect"}),It(),We({connector:U_},{$$widgetType:"ais.numericMenu"}),Le({name:"NumericMenu"}),It();const np={name:"AisPagination",mixins:[Le({name:"Pagination"}),We({connector:t1},{$$widgetType:"ais.pagination"}),It()],props:{padding:{type:Number,default:void 0,validator:function(e){return e>0}},totalPages:{type:Number,default:void 0,validator:function(e){return e>0}},showFirst:{type:Boolean,default:!0},showLast:{type:Boolean,default:!0},showNext:{type:Boolean,default:!0},showPrevious:{type:Boolean,default:!0}},computed:{widgetParams:function(){return{padding:this.padding,totalPages:this.totalPages}}},emits:["page-change"],methods:{refine:function(e){var t=Math.min(Math.max(e,0),this.state.nbPages-1);this.state.refine(t),this.$emit("page-change",t)}}};var ER=["href"],CR=["href"],xR=["href","aria-label","onClick"],TR=["href"],kR=["aria-label","href"],AR=["aria-label"];function jR(e,t,r,n,a,o){var s;return e.state?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass((s={},s[e.suit()]=!0,s[e.suit("","noRefinement")]=e.state.nbPages<=1,s))},[i.renderSlot(e.$slots,"default",{refine:o.refine,createURL:e.state.createURL,currentRefinement:e.state.currentRefinement,nbHits:e.state.nbHits,nbPages:e.state.nbPages,pages:e.state.pages,isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage},function(){var u,d,p,m;return[i.createElementVNode("ul",{class:i.normalizeClass(e.suit("list"))},[r.showFirst?(i.openBlock(),i.createElementBlock("li",{key:0,class:i.normalizeClass((u={},u[e.suit("item")]=!0,u[e.suit("item","disabled")]=e.state.isFirstPage,u[e.suit("item","firstPage")]=!0,u))},[i.renderSlot(e.$slots,"first",{createURL:function(){return e.state.createURL(0)},isFirstPage:e.state.isFirstPage,refine:function(){return o.refine(0)}},function(){return[e.state.isFirstPage?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(e.suit("link")),"aria-label":"First Page"},"‹‹",2)):(i.openBlock(),i.createElementBlock("a",{key:0,class:i.normalizeClass(e.suit("link")),"aria-label":"First Page",href:e.state.createURL(0),onClick:t[0]||(t[0]=i.withModifiers(function(v){return o.refine(0)},["exact","left","prevent"]))},"‹‹",10,ER))]})],2)):i.createCommentVNode("",!0),r.showPrevious?(i.openBlock(),i.createElementBlock("li",{key:1,class:i.normalizeClass((d={},d[e.suit("item")]=!0,d[e.suit("item","disabled")]=e.state.isFirstPage,d[e.suit("item","previousPage")]=!0,d))},[i.renderSlot(e.$slots,"previous",{createURL:function(){return e.state.createURL(e.state.currentRefinement-1)},isFirstPage:e.state.isFirstPage,refine:function(){return o.refine(e.state.currentRefinement-1)}},function(){return[e.state.isFirstPage?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(e.suit("link")),"aria-label":"Previous Page"},"‹",2)):(i.openBlock(),i.createElementBlock("a",{key:0,class:i.normalizeClass(e.suit("link")),"aria-label":"Previous Page",href:e.state.createURL(e.state.currentRefinement-1),onClick:t[1]||(t[1]=i.withModifiers(function(v){return o.refine(e.state.currentRefinement-1)},["exact","left","prevent"]))},"‹",10,CR))]})],2)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.state.pages,function(v){var h;return i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass((h={},h[e.suit("item")]=!0,h[e.suit("item","page")]=!0,h[e.suit("item","selected")]=e.state.currentRefinement===v,h)),key:v},[i.renderSlot(e.$slots,"item",{page:v,createURL:function(){return e.state.createURL(v)},isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage,refine:function(){return o.refine(v)}},function(){return[i.createElementVNode("a",{class:i.normalizeClass(e.suit("link")),href:e.state.createURL(v),"aria-label":"Page "+(v+1),onClick:i.withModifiers(function(l){return o.refine(v)},["exact","left","prevent"])},i.toDisplayString(v+1),11,xR)]})],2)}),128)),r.showNext?(i.openBlock(),i.createElementBlock("li",{key:2,class:i.normalizeClass((p={},p[e.suit("item")]=!0,p[e.suit("item","disabled")]=e.state.isLastPage,p[e.suit("item","nextPage")]=!0,p))},[i.renderSlot(e.$slots,"next",{createURL:function(){return e.state.createURL(e.state.currentRefinement+1)},isLastPage:e.state.isLastPage,refine:function(){return o.refine(e.state.currentRefinement+1)}},function(){return[e.state.isLastPage?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(e.suit("link")),"aria-label":"Next Page"},"›",2)):(i.openBlock(),i.createElementBlock("a",{key:0,class:i.normalizeClass(e.suit("link")),"aria-label":"Next Page",href:e.state.createURL(e.state.currentRefinement+1),onClick:t[2]||(t[2]=i.withModifiers(function(v){return o.refine(e.state.currentRefinement+1)},["exact","left","prevent"]))},"›",10,TR))]})],2)):i.createCommentVNode("",!0),r.showLast?(i.openBlock(),i.createElementBlock("li",{key:3,class:i.normalizeClass((m={},m[e.suit("item")]=!0,m[e.suit("item","disabled")]=e.state.isLastPage,m[e.suit("item","lastPage")]=!0,m))},[i.renderSlot(e.$slots,"last",{createURL:function(){return e.state.createURL(e.state.nbPages-1)},isLastPage:e.state.isLastPage,refine:function(){return o.refine(e.state.nbPages-1)}},function(){return[e.state.isLastPage?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages}," ›› ",10,AR)):(i.openBlock(),i.createElementBlock("a",{key:0,class:i.normalizeClass(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages,href:e.state.createURL(e.state.nbPages-1),onClick:t[3]||(t[3]=i.withModifiers(function(v){return o.refine(e.state.nbPages-1)},["exact","left","prevent"]))},"››",10,kR))]})],2)):i.createCommentVNode("",!0)],2)]})],2)):i.createCommentVNode("",!0)}np.render=jR,Le({name:"Panel"}),q2(),Le({name:"PoweredBy"}),Le({name:"QueryRuleContext"}),We({connector:ah},{$$widgetType:"ais.queryRuleContext"}),Le({name:"QueryRuleCustomData"}),We({connector:ah},{$$widgetType:"ais.queryRuleCustomData"}),Le({name:"RangeInput"}),We({connector:u1},{$$widgetType:"ais.rangeInput"}),It(),Le({name:"RatingMenu"}),We({connector:F1},{$$widgetType:"ais.ratingMenu"}),It(),i.createElementVNode("symbol",{id:"ais-RatingMenu-starSymbol",viewBox:"0 0 24 24"},[i.createElementVNode("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"})],-1),i.createElementVNode("symbol",{id:"ais-RatingMenu-starEmptySymbol",viewBox:"0 0 24 24"},[i.createElementVNode("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"})],-1),i.createElementVNode("use",{"xlink:href":"#ais-RatingMenu-starSymbol"},null,-1),i.createElementVNode("use",{"xlink:href":"#ais-RatingMenu-starEmptySymbol"},null,-1);const ap={name:"SearchInput",mixins:[Le({name:"SearchBox"})],props:{placeholder:{type:String,default:"Search here…"},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!1},shouldShowLoadingIndicator:{type:Boolean,default:!1},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Search"},resetTitle:{type:String,default:"Clear"},value:{type:String,required:!1,default:void 0},modelValue:{type:String,required:!1,default:void 0}},emits:["input","update:modelValue","blur","focus","reset"],data:function(){return{query:""}},methods:{isFocused:function(){return document.activeElement===this.$refs.input},onInput:function(e){this.ignoreCompositionEvents&&e.isComposing||(this.$emit("input",e.target.value),this.$emit("update:modelValue",e.target.value))},onFormSubmit:function(){this.$refs.input.blur()},onFormReset:function(){this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("reset")}}};var $R=["placeholder","autofocus","value"],DR=["title","hidden"],NR=[i.createElementVNode("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"},null,-1)],FR=["title","hidden"],IR=[i.createElementVNode("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"},null,-1)],MR=["hidden"],LR=["aria-hidden"],BR=[i.createStaticVNode('<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"></circle><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"></animateTransform></path></g></g>',1)];function HR(e,t,r,n,a,o){return i.openBlock(),i.createElementBlock("form",{action:"",role:"search",novalidate:"",class:i.normalizeClass(e.suit("form")),onSubmit:t[4]||(t[4]=i.withModifiers(function(){for(var s=[],u=arguments.length;u--;)s[u]=arguments[u];return o.onFormSubmit&&o.onFormSubmit.apply(o,s)},["prevent"])),onReset:t[5]||(t[5]=i.withModifiers(function(){for(var s=[],u=arguments.length;u--;)s[u]=arguments[u];return o.onFormReset&&o.onFormReset.apply(o,s)},["prevent"]))},[i.createElementVNode("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:r.placeholder,autofocus:r.autofocus,class:i.normalizeClass(e.suit("input")),value:r.value||r.modelValue,onFocus:t[0]||(t[0]=function(s){return e.$emit("focus",s)}),onBlur:t[1]||(t[1]=function(s){return e.$emit("blur",s)}),onInput:t[2]||(t[2]=function(s){return o.onInput(s)}),onCompositionend:t[3]||(t[3]=function(s){return o.onInput(s)}),ref:"input"},null,42,$R),i.createElementVNode("button",{type:"submit",title:r.submitTitle,class:i.normalizeClass(e.suit("submit")),hidden:r.showLoadingIndicator&&r.shouldShowLoadingIndicator},[i.renderSlot(e.$slots,"submit-icon",{},function(){return[(i.openBlock(),i.createElementBlock("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:i.normalizeClass(e.suit("submitIcon"))},NR,2))]})],10,DR),i.createElementVNode("button",{type:"reset",title:r.resetTitle,class:i.normalizeClass(e.suit("reset")),hidden:!r.value&&!r.modelValue||r.showLoadingIndicator&&r.shouldShowLoadingIndicator},[i.renderSlot(e.$slots,"reset-icon",{},function(){return[(i.openBlock(),i.createElementBlock("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:i.normalizeClass(e.suit("resetIcon")),width:"10"},IR,2))]})],10,FR),r.showLoadingIndicator?(i.openBlock(),i.createElementBlock("span",{key:0,hidden:!r.shouldShowLoadingIndicator,class:i.normalizeClass(e.suit("loadingIndicator"))},[i.renderSlot(e.$slots,"loading-indicator",{},function(){return[(i.openBlock(),i.createElementBlock("svg",{"aria-hidden":!r.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:i.normalizeClass(e.suit("loadingIcon"))},BR,10,LR))]})],10,MR)):i.createCommentVNode("",!0)],34)}ap.render=HR;var VR=function(){};const ip={name:"AisRefinementList",components:{SearchInput:ap,AisHighlight:Ol},mixins:[Le({name:"RefinementList"}),We({connector:m1},{$$widgetType:"ais.refinementList"}),It()],props:{attribute:{type:String,required:!0},searchable:{type:Boolean,default:void 0},searchablePlaceholder:{type:String,required:!1,default:"Search here…"},operator:{default:"or",validator:function(e){return e==="and"||e==="or"},required:!1},limit:{type:Number,required:!1,default:void 0},showMoreLimit:{type:Number,required:!1,default:void 0},showMore:{type:Boolean,required:!1,default:!1},sortBy:{type:[Array,Function],required:!1,default:void 0},transformItems:{type:Function,required:!1,default:void 0}},data:function(){return{searchForFacetValuesQuery:""}},computed:{searchForFacetValues:{get:function(){return this.searchForFacetValuesQuery},set:function(e){this.state.searchForItems(e),this.searchForFacetValuesQuery=e}},toggleShowMore:function(){return this.state.toggleShowMore||VR},items:function(){return this.state.items.map(function(e){return Object.assign({},e,{_highlightResult:{item:{value:e.highlighted}}})})},widgetParams:function(){return{attribute:this.attribute,operator:this.operator,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,escapeFacetValues:!0,transformItems:this.transformItems}}},methods:{refine:function(e){this.state.refine(e),this.searchForFacetValuesQuery=""}}};var qR=["value","checked","onChange"],UR=["disabled"];function WR(e,t,r,n,a,o){var s=i.resolveComponent("search-input"),u=i.resolveComponent("ais-highlight");return e.state?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass([e.suit(),o.items.length===0&&e.suit("","noRefinement")])},[i.renderSlot(e.$slots,"default",{items:o.items,refine:o.refine,searchForItems:e.state.searchForItems,searchForItemsQuery:a.searchForFacetValuesQuery,toggleShowMore:o.toggleShowMore,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,createURL:e.state.createURL,isFromSearch:e.state.isFromSearch,canRefine:e.state.canRefine,sendEvent:e.state.sendEvent},function(){var d;return[r.searchable?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(e.suit("searchBox"))},[i.createVNode(s,{modelValue:o.searchForFacetValues,"onUpdate:modelValue":t[0]||(t[0]=function(p){return o.searchForFacetValues=p}),"show-loading-indicator":!0,placeholder:r.searchablePlaceholder,"class-names":e.classNames},null,8,["modelValue","placeholder","class-names"])],2)):i.createCommentVNode("",!0),e.state.isFromSearch&&o.items.length===0?i.renderSlot(e.$slots,"noResults",{key:1,query:o.searchForFacetValues},function(){return[i.createElementVNode("div",{class:i.normalizeClass(e.suit("noResults"))},"No results.",2)]}):i.createCommentVNode("",!0),o.items.length>0?(i.openBlock(),i.createElementBlock("ul",{key:2,class:i.normalizeClass(e.suit("list"))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.items,function(p){return i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass([e.suit("item"),p.isRefined&&e.suit("item","selected")]),key:p.value},[i.renderSlot(e.$slots,"item",{item:p,refine:o.refine,createURL:e.state.createURL},function(){return[i.createElementVNode("label",{class:i.normalizeClass(e.suit("label"))},[i.createElementVNode("input",{class:i.normalizeClass(e.suit("checkbox")),type:"checkbox",value:p.value,checked:p.isRefined,onChange:function(m){return o.refine(p.value)}},null,42,qR),r.searchable?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(e.suit("labelText"))},[i.createVNode(u,{attribute:"item",hit:p},null,8,["hit"])],2)):(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(e.suit("labelText"))},i.toDisplayString(p.label),3)),i.createElementVNode("span",{class:i.normalizeClass(e.suit("count"))},i.toDisplayString(p.count),3)],2)]})],2)}),128))],2)):i.createCommentVNode("",!0),r.showMore?(i.openBlock(),i.createElementBlock("button",{key:3,class:i.normalizeClass([e.suit("showMore"),(d={},d[e.suit("showMore","disabled")]=!e.state.canToggleShowMore,d)]),onClick:t[1]||(t[1]=function(){for(var p=[],m=arguments.length;m--;)p[m]=arguments[m];return o.toggleShowMore&&o.toggleShowMore.apply(o,p)}),disabled:!e.state.canToggleShowMore},[i.renderSlot(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},function(){return[i.createTextVNode(" Show "+i.toDisplayString(e.state.isShowingMore?"less":"more"),1)]})],10,UR)):i.createCommentVNode("",!0)]})],2)):i.createCommentVNode("",!0)}ip.render=WR;var Vi;const zR=((Vi={name:"AisStateResults",mixins:[We({connector:!0}),Le({name:"StateResults"})],props:{catchError:{type:Boolean,default:!1}},data:function(){var e=this;return{renderFn:function(){var t=e.instantSearchInstance,r=t.status,n=t.error,a=e.getParentIndex().getResults(),o=e.getParentIndex().getHelper(),s=o?o.state:null;e.state={results:a,state:s,status:r,error:n}}}},created:function(){this.instantSearchInstance.addListener("render",this.renderFn),this.renderFn()}}).beforeUnmount=function(){this.widget&&(this.instantSearchInstance.removeListener("render",this.renderFn),this.errorFn&&this.instantSearchInstance.removeListener("error",this.errorFn))},Vi.watch={catchError:{immediate:!0,handler:function(e){e?(this.errorFn=function(){},this.instantSearchInstance.addListener("error",this.errorFn)):this.errorFn&&(this.instantSearchInstance.removeListener("error",this.errorFn),this.errorFn=void 0)}}},Vi.computed={stateResults:function(){var e=this.state,t=e.results,r=e.state,n=e.status,a=e.error;return Vn({},t,{results:t,state:r,status:n,error:a})}},Vi);var YR=i.createElementVNode("p",null," Use this component to have a different layout based on a certain state. ",-1),QR=i.createElementVNode("p",null,"Fill in the slot, and get access to the following things:",-1);function KR(e,t,r,n,a,o){return e.state&&e.state.state&&e.state.results?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(e.suit())},[i.renderSlot(e.$slots,"default",i.normalizeProps(i.guardReactiveProps(o.stateResults)),function(){return[YR,QR,i.createElementVNode("pre",null,"results: "+i.toDisplayString(Object.keys(e.state.results)),1),i.createElementVNode("pre",null,"state: "+i.toDisplayString(Object.keys(e.state.state)),1),i.createElementVNode("pre",null,"status: "+i.toDisplayString(e.state.status),1),i.createElementVNode("pre",null,"error: "+i.toDisplayString(e.state.error),1)]})],2)):i.createCommentVNode("",!0)}zR.render=KR,We({connector:If},{$$widgetType:"ais.searchBox"}),Le({name:"SearchBox"}),Le({name:"Snippet"}),Le({name:"SortBy"}),We({connector:O1},{$$widgetType:"ais.sortBy"}),It(),We({connector:V1},{$$widgetType:"ais.stats"}),Le({name:"Stats"}),Le({name:"ToggleRefinement"}),We({connector:J1},{$$widgetType:"ais.toggleRefinement"}),It(),We({connector:A2},{$$widgetType:"ais.voiceSearch"}),Le({name:"VoiceSearch"}),i.createStaticVNode('<line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',5),i.createElementVNode("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),i.createElementVNode("line",{x1:"12",y1:"19",x2:"12",y2:"23"},null,-1),i.createElementVNode("line",{x1:"8",y1:"23",x2:"16",y2:"23"},null,-1),Le({name:"RelevantSort"}),We({connector:N2},{$$widgetType:"ais.relevantSort"});const GR={name:"AisDynamicWidgets",mixins:[We({connector:Qd},{$$widgetType:"ais.dynamicWidgets"}),Le({name:"DynamicWidgets"})],props:{transformItems:{type:Function,default:void 0},facets:{type:Array,default:void 0},maxValuesPerFacet:{type:Number,default:void 0}},render:wi(function(e){var t=this,r=new Map;if((cs(this)||[]).forEach(function(a){var o=(function s(u){var d,p=u.props;if(p){if(p.attribute)return p.attribute;if(Array.isArray(p.attributes))return p.attributes[0]}if(d=u.children&&u.children.default&&u.children.default(),Array.isArray(d))return d.reduce(function(m,v){return m||s(v)},void 0)})(a);o&&r.set(o,e("div",{key:o,class:[t.suit("widget")]},[a]))}),!this.state){var n=[];return r.forEach(function(a){return n.push(a)}),e("div",Vn({class:[this.suit()]},{attrs:{hidden:!0}}),n)}return e("div",{class:[this.suit()]},this.state.attributesToRender.map(function(a){return r.get(a)}))}),computed:{widgetParams:function(){return{transformItems:this.transformItems,facets:this.facets,maxValuesPerFacet:this.maxValuesPerFacet,widgets:[]}}}};Object.assign({},GR,{name:"AisExperimentalDynamicWidgets",mounted:function(){fn("Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.")}});const op=6048e5,JR=864e5,XR=6e4,sp=36e5,ZR=1e3,lp=Symbol.for("constructDateFrom");function ze(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&lp in e?e[lp](t):e instanceof Date?new e.constructor(t):new Date(t)}function Te(e,t){return ze(t||e,e)}function zt(e,t,r){const n=Te(e,r?.in);return isNaN(t)?ze(r?.in||e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Jt(e,t,r){const n=Te(e,r?.in);if(isNaN(t))return ze(e,NaN);if(!t)return n;const a=n.getDate(),o=ze(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return a>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}function up(e,t,r){const{years:n=0,months:a=0,weeks:o=0,days:s=0,hours:u=0,minutes:d=0,seconds:p=0}=t,m=Te(e,r?.in),v=a||n?Jt(m,a+n*12):m,h=s||o?zt(v,s+o*7):v,l=d+u*60,g=(p+l*60)*1e3;return ze(e,+h+g)}function eP(e,t,r){return ze(e,+Te(e)+t)}function tP(e,t,r){return eP(e,t*sp)}let rP={};function Xr(){return rP}function Xt(e,t){const r=Xr(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Te(e,t?.in),o=a.getDay(),s=(o<n?7:0)+o-n;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function On(e,t){return Xt(e,{...t,weekStartsOn:1})}function cp(e,t){const r=Te(e,t?.in),n=r.getFullYear(),a=ze(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=On(a),s=ze(r,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const u=On(s);return r.getTime()>=o.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function qi(e){const t=Te(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function qa(e,...t){const r=ze.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function dp(e,t){const r=Te(e,t?.in);return r.setHours(0,0,0,0),r}function fp(e,t,r){const[n,a]=qa(r?.in,e,t),o=dp(n),s=dp(a),u=+o-qi(o),d=+s-qi(s);return Math.round((u-d)/JR)}function nP(e,t){const r=cp(e,t),n=ze(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),On(n)}function aP(e,t,r){return Jt(e,t*3,r)}function Ll(e,t,r){return Jt(e,t*12,r)}function hp(e,t){const r=+Te(e)-+Te(t);return r<0?-1:r>0?1:r}function pp(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ua(e){return!(!pp(e)&&typeof e!="number"||isNaN(+Te(e)))}function mp(e,t){const r=Te(e,t?.in);return Math.trunc(r.getMonth()/3)+1}function iP(e,t,r){const[n,a]=qa(r?.in,e,t);return n.getFullYear()-a.getFullYear()}function oP(e,t,r){const[n,a]=qa(r?.in,e,t),o=hp(n,a),s=Math.abs(iP(n,a));n.setFullYear(1584),a.setFullYear(1584);const u=hp(n,a)===-o,d=o*(s-+u);return d===0?0:d}function gp(e,t){const[r,n]=qa(e,t.start,t.end);return{start:r,end:n}}function yp(e,t){const{start:r,end:n}=gp(t?.in,e);let a=+r>+n;const o=a?+r:+n,s=a?n:r;s.setHours(0,0,0,0);let u=1;const d=[];for(;+s<=o;)d.push(ze(r,s)),s.setDate(s.getDate()+u),s.setHours(0,0,0,0);return a?d.reverse():d}function Zr(e,t){const r=Te(e,t?.in),n=r.getMonth(),a=n-n%3;return r.setMonth(a,1),r.setHours(0,0,0,0),r}function sP(e,t){const{start:r,end:n}=gp(t?.in,e);let a=+r>+n;const o=a?+Zr(r):+Zr(n);let s=Zr(a?n:r),u=1;const d=[];for(;+s<=o;)d.push(ze(r,s)),s=aP(s,u);return a?d.reverse():d}function lP(e,t){const r=Te(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function vp(e,t){const r=Te(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function Wa(e,t){const r=Te(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function bp(e,t){const r=Xr(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Te(e,t?.in),o=a.getDay(),s=(o<n?-7:0)+6-(o-n);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}function wp(e,t){const r=Te(e,t?.in),n=r.getMonth(),a=n-n%3+3;return r.setMonth(a,0),r.setHours(23,59,59,999),r}const uP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},cP=(e,t,r)=>{let n;const a=uP[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Bl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const dP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},fP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pP={date:Bl({formats:dP,defaultWidth:"full"}),time:Bl({formats:fP,defaultWidth:"full"}),dateTime:Bl({formats:hP,defaultWidth:"full"})},mP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gP=(e,t,r,n)=>mP[e];function za(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,u=r?.width?String(r.width):s;a=e.formattingValues[u]||e.formattingValues[s]}else{const s=e.defaultWidth,u=r?.width?String(r.width):e.defaultWidth;a=e.values[u]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const yP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},vP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},bP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},_P={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},SP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},RP={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:za({values:yP,defaultWidth:"wide"}),quarter:za({values:vP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:za({values:bP,defaultWidth:"wide"}),day:za({values:wP,defaultWidth:"wide"}),dayPeriod:za({values:_P,defaultWidth:"wide",formattingValues:SP,defaultFormattingWidth:"wide"})};function Ya(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const s=o[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?OP(u,v=>v.test(s)):PP(u,v=>v.test(s));let p;p=e.valueCallback?e.valueCallback(d):d,p=r.valueCallback?r.valueCallback(p):p;const m=t.slice(s.length);return{value:p,rest:m}}}function PP(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function OP(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function EP(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=r.valueCallback?r.valueCallback(s):s;const u=t.slice(a.length);return{value:s,rest:u}}}const CP=/^(\d+)(th|st|nd|rd)?/i,xP=/\d+/i,TP={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kP={any:[/^b/i,/^(a|c)/i]},AP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jP={any:[/1/i,/2/i,/3/i,/4/i]},$P={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},DP={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},NP={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},FP={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},IP={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},MP={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},LP={ordinalNumber:EP({matchPattern:CP,parsePattern:xP,valueCallback:e=>parseInt(e,10)}),era:Ya({matchPatterns:TP,defaultMatchWidth:"wide",parsePatterns:kP,defaultParseWidth:"any"}),quarter:Ya({matchPatterns:AP,defaultMatchWidth:"wide",parsePatterns:jP,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ya({matchPatterns:$P,defaultMatchWidth:"wide",parsePatterns:DP,defaultParseWidth:"any"}),day:Ya({matchPatterns:NP,defaultMatchWidth:"wide",parsePatterns:FP,defaultParseWidth:"any"}),dayPeriod:Ya({matchPatterns:IP,defaultMatchWidth:"any",parsePatterns:MP,defaultParseWidth:"any"})},_p={code:"en-US",formatDistance:cP,formatLong:pP,formatRelative:gP,localize:RP,match:LP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function BP(e,t){const r=Te(e,t?.in);return fp(r,Wa(r))+1}function Hl(e,t){const r=Te(e,t?.in),n=+On(r)-+nP(r);return Math.round(n/op)+1}function Vl(e,t){const r=Te(e,t?.in),n=r.getFullYear(),a=Xr(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=ze(t?.in||e,0);s.setFullYear(n+1,0,o),s.setHours(0,0,0,0);const u=Xt(s,t),d=ze(t?.in||e,0);d.setFullYear(n,0,o),d.setHours(0,0,0,0);const p=Xt(d,t);return+r>=+u?n+1:+r>=+p?n:n-1}function HP(e,t){const r=Xr(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=Vl(e,t),o=ze(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),Xt(o,t)}function ql(e,t){const r=Te(e,t?.in),n=+Xt(r,t)-+HP(r,t);return Math.round(n/op)+1}function Ye(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Mr={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Ye(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Ye(r+1,2)},d(e,t){return Ye(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ye(e.getHours()%12||12,t.length)},H(e,t){return Ye(e.getHours(),t.length)},m(e,t){return Ye(e.getMinutes(),t.length)},s(e,t){return Ye(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return Ye(a,t.length)}},En={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Sp={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return Mr.y(e,t)},Y:function(e,t,r,n){const a=Vl(e,n),o=a>0?a:1-a;if(t==="YY"){const s=o%100;return Ye(s,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):Ye(o,t.length)},R:function(e,t){const r=cp(e);return Ye(r,t.length)},u:function(e,t){const r=e.getFullYear();return Ye(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ye(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ye(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Mr.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Ye(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=ql(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):Ye(a,t.length)},I:function(e,t,r){const n=Hl(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Ye(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Mr.d(e,t)},D:function(e,t,r){const n=BP(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Ye(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ye(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ye(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return Ye(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=En.noon:n===0?a=En.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=En.evening:n>=12?a=En.afternoon:n>=4?a=En.morning:a=En.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Mr.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Mr.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Ye(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Ye(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Mr.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Mr.s(e,t)},S:function(e,t){return Mr.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Pp(n);case"XXXX":case"XX":return en(n);case"XXXXX":case"XXX":default:return en(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Pp(n);case"xxxx":case"xx":return en(n);case"xxxxx":case"xxx":default:return en(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Rp(n,":");case"OOOO":default:return"GMT"+en(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Rp(n,":");case"zzzz":default:return"GMT"+en(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return Ye(n,t.length)},T:function(e,t,r){return Ye(+e,t.length)}};function Rp(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?r+String(a):r+String(a)+t+Ye(o,2)}function Pp(e,t){return e%60===0?(e>0?"-":"+")+Ye(Math.abs(e)/60,2):en(e,t)}function en(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Ye(Math.trunc(n/60),2),o=Ye(n%60,2);return r+a+t+o}const Op=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ep=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ul={p:Ep,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Op(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Op(n,t)).replace("{{time}}",Ep(a,t))}},VP=/^D+$/,qP=/^Y+$/,UP=["D","DD","YY","YYYY"];function Cp(e){return VP.test(e)}function xp(e){return qP.test(e)}function Wl(e,t,r){const n=WP(e,t,r);if(console.warn(n),UP.includes(e))throw new RangeError(n)}function WP(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const zP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,YP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,QP=/^'([^]*?)'?$/,KP=/''/g,GP=/[a-zA-Z]/;function pr(e,t,r){const n=Xr(),a=r?.locale??n.locale??_p,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,u=Te(e,r?.in);if(!Ua(u))throw new RangeError("Invalid time value");let d=t.match(YP).map(m=>{const v=m[0];if(v==="p"||v==="P"){const h=Ul[v];return h(m,a.formatLong)}return m}).join("").match(zP).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const v=m[0];if(v==="'")return{isToken:!1,value:JP(m)};if(Sp[v])return{isToken:!0,value:m};if(v.match(GP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(d=a.localize.preprocessor(u,d));const p={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return d.map(m=>{if(!m.isToken)return m.value;const v=m.value;(!r?.useAdditionalWeekYearTokens&&xp(v)||!r?.useAdditionalDayOfYearTokens&&Cp(v))&&Wl(v,t,String(e));const h=Sp[v[0]];return h(u,v,a.localize,p)}).join("")}function JP(e){const t=e.match(QP);return t?t[1].replace(KP,"'"):e}function XP(e,t){return Te(e,t?.in).getDay()}function ZP(e,t){const r=Te(e,t?.in),n=r.getFullYear(),a=r.getMonth(),o=ze(r,0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}function eO(){return Object.assign({},Xr())}function xr(e,t){return Te(e,t?.in).getHours()}function tO(e,t){const r=Te(e,t?.in).getDay();return r===0?7:r}function Lr(e,t){return Te(e,t?.in).getMinutes()}function Ie(e,t){return Te(e,t?.in).getMonth()}function Cn(e){return Te(e).getSeconds()}function je(e,t){return Te(e,t?.in).getFullYear()}function tn(e,t){return+Te(e)>+Te(t)}function xn(e,t){return+Te(e)<+Te(t)}function Tn(e,t){return+Te(e)==+Te(t)}function rO(e,t){const r=nO(t)?new t(0):ze(t,0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}function nO(e){return typeof e=="function"&&e.prototype?.constructor===e}const aO=10;class Tp{subPriority=0;validate(t,r){return!0}}class iO extends Tp{constructor(t,r,n,a,o){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=a,o&&(this.subPriority=o)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class oO extends Tp{priority=aO;subPriority=-1;constructor(t,r){super(),this.context=t||(n=>ze(r,n))}set(t,r){return r.timestampIsSet?t:ze(t,rO(t,this.context))}}class qe{run(t,r,n,a){const o=this.parse(t,r,n,a);return o?{setter:new iO(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,r,n){return!0}}class sO extends qe{priority=140;parse(t,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}set(t,r,n){return r.era=n,t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},mr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ut(e,t){return e&&{value:t(e.value),rest:e.rest}}function rt(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function gr(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,a=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,s=r[5]?parseInt(r[5],10):0;return{value:n*(a*sp+o*XR+s*ZR),rest:t.slice(r[0].length)}}function kp(e){return rt(lt.anyDigitsSigned,e)}function ot(e,t){switch(e){case 1:return rt(lt.singleDigit,t);case 2:return rt(lt.twoDigits,t);case 3:return rt(lt.threeDigits,t);case 4:return rt(lt.fourDigits,t);default:return rt(new RegExp("^\\d{1,"+e+"}"),t)}}function Ui(e,t){switch(e){case 1:return rt(lt.singleDigitSigned,t);case 2:return rt(lt.twoDigitsSigned,t);case 3:return rt(lt.threeDigitsSigned,t);case 4:return rt(lt.fourDigitsSigned,t);default:return rt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function zl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ap(e,t){const r=t>0,n=r?t:1-t;let a;if(n<=50)a=e||100;else{const o=n+50,s=Math.trunc(o/100)*100,u=e>=o%100;a=e+s-(u?100:0)}return r?a:1-a}function jp(e){return e%400===0||e%4===0&&e%100!==0}class lO extends qe{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,r,n){const a=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return ut(ot(4,t),a);case"yo":return ut(n.ordinalNumber(t,{unit:"year"}),a);default:return ut(ot(r.length,t),a)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,n){const a=t.getFullYear();if(n.isTwoDigitYear){const s=Ap(n.year,a);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const o=!("era"in r)||r.era===1?n.year:1-n.year;return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class uO extends qe{priority=130;parse(t,r,n){const a=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ut(ot(4,t),a);case"Yo":return ut(n.ordinalNumber(t,{unit:"year"}),a);default:return ut(ot(r.length,t),a)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,n,a){const o=Vl(t,a);if(n.isTwoDigitYear){const u=Ap(n.year,o);return t.setFullYear(u,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),Xt(t,a)}const s=!("era"in r)||r.era===1?n.year:1-n.year;return t.setFullYear(s,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),Xt(t,a)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class cO extends qe{priority=130;parse(t,r){return Ui(r==="R"?4:r.length,t)}set(t,r,n){const a=ze(t,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),On(a)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class dO extends qe{priority=130;parse(t,r){return Ui(r==="u"?4:r.length,t)}set(t,r,n){return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class fO extends qe{priority=120;parse(t,r,n){switch(r){case"Q":case"QQ":return ot(r.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=1&&r<=4}set(t,r,n){return t.setMonth((n-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class hO extends qe{priority=120;parse(t,r,n){switch(r){case"q":case"qq":return ot(r.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=1&&r<=4}set(t,r,n){return t.setMonth((n-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class pO extends qe{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,r,n){const a=o=>o-1;switch(r){case"M":return ut(rt(lt.month,t),a);case"MM":return ut(ot(2,t),a);case"Mo":return ut(n.ordinalNumber(t,{unit:"month"}),a);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=11}set(t,r,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}}class mO extends qe{priority=110;parse(t,r,n){const a=o=>o-1;switch(r){case"L":return ut(rt(lt.month,t),a);case"LL":return ut(ot(2,t),a);case"Lo":return ut(n.ordinalNumber(t,{unit:"month"}),a);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=11}set(t,r,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function gO(e,t,r){const n=Te(e,r?.in),a=ql(n,r)-t;return n.setDate(n.getDate()-a*7),Te(n,r?.in)}class yO extends qe{priority=100;parse(t,r,n){switch(r){case"w":return rt(lt.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return ot(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,n,a){return Xt(gO(t,n,a),a)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function vO(e,t,r){const n=Te(e,r?.in),a=Hl(n,r)-t;return n.setDate(n.getDate()-a*7),n}class bO extends qe{priority=100;parse(t,r,n){switch(r){case"I":return rt(lt.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return ot(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,n){return On(vO(t,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const wO=[31,28,31,30,31,30,31,31,30,31,30,31],_O=[31,29,31,30,31,30,31,31,30,31,30,31];class SO extends qe{priority=90;subPriority=1;parse(t,r,n){switch(r){case"d":return rt(lt.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return ot(r.length,t)}}validate(t,r){const n=t.getFullYear(),a=jp(n),o=t.getMonth();return a?r>=1&&r<=_O[o]:r>=1&&r<=wO[o]}set(t,r,n){return t.setDate(n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class RO extends qe{priority=90;subpriority=1;parse(t,r,n){switch(r){case"D":case"DD":return rt(lt.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return ot(r.length,t)}}validate(t,r){const n=t.getFullYear();return jp(n)?r>=1&&r<=366:r>=1&&r<=365}set(t,r,n){return t.setMonth(0,n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Yl(e,t,r){const n=Xr(),a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Te(e,r?.in),s=o.getDay(),d=(t%7+7)%7,p=7-a,m=t<0||t>6?t-(s+p)%7:(d+p)%7-(s+p)%7;return zt(o,m,r)}class PO extends qe{priority=90;parse(t,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,n,a){return t=Yl(t,n,a),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class OO extends qe{priority=90;parse(t,r,n,a){const o=s=>{const u=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+u};switch(r){case"e":case"ee":return ut(ot(r.length,t),o);case"eo":return ut(n.ordinalNumber(t,{unit:"day"}),o);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,n,a){return t=Yl(t,n,a),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class EO extends qe{priority=90;parse(t,r,n,a){const o=s=>{const u=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+u};switch(r){case"c":case"cc":return ut(ot(r.length,t),o);case"co":return ut(n.ordinalNumber(t,{unit:"day"}),o);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=6}set(t,r,n,a){return t=Yl(t,n,a),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function CO(e,t,r){const n=Te(e,r?.in),a=tO(n,r),o=t-a;return zt(n,o,r)}class xO extends qe{priority=90;parse(t,r,n){const a=o=>o===0?7:o;switch(r){case"i":case"ii":return ot(r.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return ut(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),a);case"iiiii":return ut(n.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return ut(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),a);case"iiii":default:return ut(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),a)}}validate(t,r){return r>=1&&r<=7}set(t,r,n){return t=CO(t,n),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class TO extends qe{priority=80;parse(t,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,n){return t.setHours(zl(n),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class kO extends qe{priority=80;parse(t,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,n){return t.setHours(zl(n),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class AO extends qe{priority=80;parse(t,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,n){return t.setHours(zl(n),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class jO extends qe{priority=70;parse(t,r,n){switch(r){case"h":return rt(lt.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return ot(r.length,t)}}validate(t,r){return r>=1&&r<=12}set(t,r,n){const a=t.getHours()>=12;return a&&n<12?t.setHours(n+12,0,0,0):!a&&n===12?t.setHours(0,0,0,0):t.setHours(n,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class $O extends qe{priority=70;parse(t,r,n){switch(r){case"H":return rt(lt.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return ot(r.length,t)}}validate(t,r){return r>=0&&r<=23}set(t,r,n){return t.setHours(n,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class DO extends qe{priority=70;parse(t,r,n){switch(r){case"K":return rt(lt.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return ot(r.length,t)}}validate(t,r){return r>=0&&r<=11}set(t,r,n){return t.getHours()>=12&&n<12?t.setHours(n+12,0,0,0):t.setHours(n,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class NO extends qe{priority=70;parse(t,r,n){switch(r){case"k":return rt(lt.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return ot(r.length,t)}}validate(t,r){return r>=1&&r<=24}set(t,r,n){const a=n<=24?n%24:n;return t.setHours(a,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class FO extends qe{priority=60;parse(t,r,n){switch(r){case"m":return rt(lt.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return ot(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,n){return t.setMinutes(n,0,0),t}incompatibleTokens=["t","T"]}class IO extends qe{priority=50;parse(t,r,n){switch(r){case"s":return rt(lt.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return ot(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,n){return t.setSeconds(n,0),t}incompatibleTokens=["t","T"]}class MO extends qe{priority=30;parse(t,r){const n=a=>Math.trunc(a*Math.pow(10,-r.length+3));return ut(ot(r.length,t),n)}set(t,r,n){return t.setMilliseconds(n),t}incompatibleTokens=["t","T"]}class LO extends qe{priority=10;parse(t,r){switch(r){case"X":return gr(mr.basicOptionalMinutes,t);case"XX":return gr(mr.basic,t);case"XXXX":return gr(mr.basicOptionalSeconds,t);case"XXXXX":return gr(mr.extendedOptionalSeconds,t);case"XXX":default:return gr(mr.extended,t)}}set(t,r,n){return r.timestampIsSet?t:ze(t,t.getTime()-qi(t)-n)}incompatibleTokens=["t","T","x"]}class BO extends qe{priority=10;parse(t,r){switch(r){case"x":return gr(mr.basicOptionalMinutes,t);case"xx":return gr(mr.basic,t);case"xxxx":return gr(mr.basicOptionalSeconds,t);case"xxxxx":return gr(mr.extendedOptionalSeconds,t);case"xxx":default:return gr(mr.extended,t)}}set(t,r,n){return r.timestampIsSet?t:ze(t,t.getTime()-qi(t)-n)}incompatibleTokens=["t","T","X"]}class HO extends qe{priority=40;parse(t){return kp(t)}set(t,r,n){return[ze(t,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class VO extends qe{priority=20;parse(t){return kp(t)}set(t,r,n){return[ze(t,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const qO={G:new sO,y:new lO,Y:new uO,R:new cO,u:new dO,Q:new fO,q:new hO,M:new pO,L:new mO,w:new yO,I:new bO,d:new SO,D:new RO,E:new PO,e:new OO,c:new EO,i:new xO,a:new TO,b:new kO,B:new AO,h:new jO,H:new $O,K:new DO,k:new NO,m:new FO,s:new IO,S:new MO,X:new LO,x:new BO,t:new HO,T:new VO},UO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zO=/^'([^]*?)'?$/,YO=/''/g,QO=/\S/,KO=/[a-zA-Z]/;function Ql(e,t,r,n){const a=()=>ze(n?.in||r,NaN),o=eO(),s=n?.locale??o.locale??_p,u=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,d=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!t)return e?a():Te(r,n?.in);const p={firstWeekContainsDate:u,weekStartsOn:d,locale:s},m=[new oO(n?.in,r)],v=t.match(WO).map(y=>{const f=y[0];if(f in Ul){const b=Ul[f];return b(y,s.formatLong)}return y}).join("").match(UO),h=[];for(let y of v){!n?.useAdditionalWeekYearTokens&&xp(y)&&Wl(y,t,e),!n?.useAdditionalDayOfYearTokens&&Cp(y)&&Wl(y,t,e);const f=y[0],b=qO[f];if(b){const{incompatibleTokens:w}=b;if(Array.isArray(w)){const S=h.find(R=>w.includes(R.token)||R.token===f);if(S)throw new RangeError(`The format string mustn't contain \`${S.fullToken}\` and \`${y}\` at the same time`)}else if(b.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);h.push({token:f,fullToken:y});const _=b.run(e,y,s.match,p);if(!_)return a();m.push(_.setter),e=_.rest}else{if(f.match(KO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if(y==="''"?y="'":f==="'"&&(y=GO(y)),e.indexOf(y)===0)e=e.slice(y.length);else return a()}}if(e.length>0&&QO.test(e))return a();const l=m.map(y=>y.priority).sort((y,f)=>f-y).filter((y,f,b)=>b.indexOf(y)===f).map(y=>m.filter(f=>f.priority===y).sort((f,b)=>b.subPriority-f.subPriority)).map(y=>y[0]);let c=Te(r,n?.in);if(isNaN(+c))return a();const g={};for(const y of l){if(!y.validate(c,p))return a();const f=y.set(c,g,p);Array.isArray(f)?(c=f[0],Object.assign(g,f[1])):c=f}return c}function GO(e){return e.match(zO)[1].replace(YO,"'")}function $p(e,t,r){const[n,a]=qa(r?.in,e,t);return+Zr(n)==+Zr(a)}function Dp(e,t,r){return zt(e,-t,r)}function Np(e,t,r){const n=Te(e,r?.in),a=n.getFullYear(),o=n.getDate(),s=ze(e,0);s.setFullYear(a,t,15),s.setHours(0,0,0,0);const u=ZP(s);return n.setMonth(t,Math.min(o,u)),n}function Ke(e,t,r){let n=Te(e,r?.in);return isNaN(+n)?ze(e,NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=Np(n,t.month)),t.date!=null&&n.setDate(t.date),t.hours!=null&&n.setHours(t.hours),t.minutes!=null&&n.setMinutes(t.minutes),t.seconds!=null&&n.setSeconds(t.seconds),t.milliseconds!=null&&n.setMilliseconds(t.milliseconds),n)}function JO(e,t,r){const n=Te(e,r?.in);return n.setHours(t),n}function Fp(e,t,r){const n=Te(e,r?.in);return n.setMilliseconds(t),n}function XO(e,t,r){const n=Te(e,r?.in);return n.setMinutes(t),n}function Ip(e,t,r){const n=Te(e,r?.in);return n.setSeconds(t),n}function yr(e,t,r){const n=Te(e,r?.in);return isNaN(+n)?ze(e,NaN):(n.setFullYear(t),n)}function kn(e,t,r){return Jt(e,-t,r)}function ZO(e,t,r){const{years:n=0,months:a=0,weeks:o=0,days:s=0,hours:u=0,minutes:d=0,seconds:p=0}=t,m=kn(e,a+n*12,r),v=Dp(m,s+o*7,r),h=d+u*60,c=(p+h*60)*1e3;return ze(e,+v-c)}function Mp(e,t,r){return Ll(e,-t,r)}function An(){const e=i.useAttrs();return i.openBlock(),i.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...e},[i.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),i.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),i.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),i.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}An.compatConfig={MODE:3};function Lp(){return i.openBlock(),i.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[i.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),i.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Lp.compatConfig={MODE:3};function Kl(){return i.openBlock(),i.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[i.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Kl.compatConfig={MODE:3};function Gl(){return i.openBlock(),i.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[i.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}Gl.compatConfig={MODE:3};function Jl(){return i.openBlock(),i.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[i.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),i.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Jl.compatConfig={MODE:3};function Xl(){return i.openBlock(),i.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[i.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Xl.compatConfig={MODE:3};function Zl(){return i.openBlock(),i.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[i.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Zl.compatConfig={MODE:3};const Mt=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),eu=(e,t,r)=>tu(e,t,r)||le(),eE=(e,t,r)=>{const n=t.dateInTz?Mt(new Date(e),t.dateInTz):le(e);return r?bt(n,!0):n},tu=(e,t,r)=>{if(!e)return null;const n=r?bt(le(e),!0):le(e);return t?t.exactMatch?eE(e,t,r):Mt(n,t.timezone):n},tE=e=>{const t=new Date(e.getFullYear(),0,1).getTimezoneOffset();return e.getTimezoneOffset()<t},rE=(e,t)=>{if(!e)return 0;const r=new Date,n=new Date(r.toLocaleString("en-US",{timeZone:"UTC"})),a=new Date(r.toLocaleString("en-US",{timeZone:e})),o=(tE(t??a)?a:t??a).getTimezoneOffset()/60;return(+n-+a)/(1e3*60*60)-o};var Zt=(e=>(e.month="month",e.year="year",e))(Zt||{}),er=(e=>(e.top="top",e.bottom="bottom",e))(er||{}),rn=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(rn||{}),Et=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Et||{});const nE=["timestamp","date","iso"];var At=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(At||{}),Ze=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(Ze||{}),jn=(e=>(e.MONTH_AND_YEAR="MM-yyyy",e.YEAR="yyyy",e.DATE="dd-MM-yyyy",e))(jn||{});function Bp(e){return t=>{const r=new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`));return e==="ar"?r.slice(2,5):r.slice(0,2)}}function aE(e){return t=>pr(Mt(new Date(`2017-01-0${t}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:e})}const iE=(e,t,r)=>{const n=[1,2,3,4,5,6,7];let a;if(e!==null)try{a=n.map(aE(e))}catch{a=n.map(Bp(t))}else a=n.map(Bp(t));const o=a.slice(0,r),s=a.slice(r+1,a.length);return[a[r]].concat(...s).concat(...o)},ru=(e,t,r)=>{const n=[];for(let a=+e[0];a<=+e[1];a++)n.push({value:+a,text:zp(a,t)});return r?n.reverse():n},Hp=(e,t,r)=>{const n=[1,2,3,4,5,6,7,8,9,10,11,12].map(o=>{const s=o<10?`0${o}`:o;return new Date(`2017-${s}-01T00:00:00+00:00`)});if(e!==null)try{const o=r==="long"?"LLLL":"LLL";return n.map((s,u)=>{const d=pr(Mt(s,"UTC"),o,{locale:e});return{text:d.charAt(0).toUpperCase()+d.substring(1),value:u}})}catch{}const a=new Intl.DateTimeFormat(t,{month:r,timeZone:"UTC"});return n.map((o,s)=>{const u=a.format(o);return{text:u.charAt(0).toUpperCase()+u.substring(1),value:s}})},oE=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],ht=e=>{const t=i.unref(e);return t!=null&&t.$el?t?.$el:t},sE=e=>({type:"dot",...e??{}}),Vp=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,nu={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},vt=e=>e,qp=e=>e===0?e:!e||isNaN(+e)?null:+e,Up=e=>e===null,Wp=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},lE=e=>{const t=[],r=n=>n.filter(a=>a);for(let n=0;n<e.length;n+=3){const a=[e[n],e[n+1],e[n+2]];t.push(r(a))}return t},Qa=(e,t,r)=>{const n=r!=null,a=t!=null;if(!n&&!a)return!1;const o=+r,s=+t;return n&&a?+e>o||+e<s:n?+e>o:a?+e<s:!1},$n=(e,t)=>lE(e).map(r=>r.map(n=>{const{active:a,disabled:o,isBetween:s,highlighted:u}=t(n);return{...n,active:a,disabled:o,className:{dp__overlay_cell_active:a,dp__overlay_cell:!a,dp__overlay_cell_disabled:o,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:o&&a,dp__cell_in_between:s,"dp--highlighted":u}}})),Br=(e,t,r=!1)=>{e&&t.allowStopPropagation&&(r&&e.stopImmediatePropagation(),e.stopPropagation())},uE=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function cE(e,t){let r=[...document.querySelectorAll(uE())];r=r.filter(a=>!e.contains(a)||a.hasAttribute("data-datepicker-instance"));const n=r.indexOf(e);if(n>=0&&(t?n-1>=0:n+1<=r.length))return r[n+(t?-1:1)]}const au=(e,t)=>e?.querySelector(`[data-dp-element="${t}"]`),zp=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),iu=(e,t)=>pr(e,t??jn.DATE),ou=e=>Array.isArray(e),Wi=(e,t,r)=>t.get(iu(e,r)),dE=(e,t)=>e?t?t instanceof Map?!!Wi(e,t):t(le(e)):!1:!0,jt=(e,t,r=!1,n)=>{if(e.key===Ze.enter||e.key===Ze.space)return r&&e.preventDefault(),t();if(n)return n(e)},fE=()=>"ontouchstart"in window||navigator.maxTouchPoints>0,Yp=(e,t)=>e?jn.MONTH_AND_YEAR:t?jn.YEAR:jn.DATE,Qp=e=>e<10?`0${e}`:e,Kp=(e,t,r,n,a,o)=>{const s=Ql(e,t.slice(0,e.length),new Date,{locale:o});return Ua(s)&&pp(s)?n||a?s:Ke(s,{hours:+r.hours,minutes:+r?.minutes,seconds:+r?.seconds,milliseconds:0}):null},hE=(e,t,r,n,a,o)=>{const s=Array.isArray(r)?r[0]:r;if(typeof t=="string")return Kp(e,t,s,n,a,o);if(Array.isArray(t)){let u=null;for(const d of t)if(u=Kp(e,d,s,n,a,o),u)break;return u}return typeof t=="function"?t(e):null},le=e=>e?new Date(e):new Date,pE=(e,t,r)=>{if(t){const a=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),s=e.getHours().toString().padStart(2,"0"),u=e.getMinutes().toString().padStart(2,"0"),d=r?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${a}-${o}T${s}:${u}:${d}.000Z`}const n=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(n).toISOString()},bt=(e,t)=>{const r=le(JSON.parse(JSON.stringify(e))),n=Ke(r,{hours:0,minutes:0,seconds:0,milliseconds:0});return t?lP(n):n},Hr=(e,t,r,n)=>{let a=e?le(e):le();return(t||t===0)&&(a=JO(a,+t)),(r||r===0)&&(a=XO(a,+r)),(n||n===0)&&(a=Ip(a,+n)),Fp(a,0)},st=(e,t)=>!e||!t?!1:xn(bt(e),bt(t)),Me=(e,t)=>!e||!t?!1:Tn(bt(e),bt(t)),ct=(e,t)=>!e||!t?!1:tn(bt(e),bt(t)),Ka=(e,t,r)=>e!=null&&e[0]&&e!=null&&e[1]?ct(r,e[0])&&st(r,e[1]):e!=null&&e[0]&&t?ct(r,e[0])&&st(r,t)||st(r,e[0])&&ct(r,t):!1,tr=e=>{const t=Ke(new Date(e),{date:1});return bt(t)},su=(e,t,r)=>t&&(r||r===0)?Object.fromEntries(["hours","minutes","seconds"].map(n=>n===t?[n,r]:[n,isNaN(+e[n])?void 0:+e[n]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},nn=e=>({hours:xr(e),minutes:Lr(e),seconds:Cn(e)}),Gp=(e,t)=>{if(t){const r=je(le(t));if(r>e)return 12;if(r===e)return Ie(le(t))}},Jp=(e,t)=>{if(t){const r=je(le(t));return r<e?-1:r===e?Ie(le(t)):void 0}},Dn=e=>{if(e)return je(le(e))},Xp=(e,t)=>{const r=ct(e,t)?t:e,n=ct(t,e)?t:e;return yp({start:r,end:n})},mE=e=>{const t=Jt(e,1);return{month:Ie(t),year:je(t)}},Tr=(e,t)=>{const r=Xt(e,{weekStartsOn:+t}),n=bp(e,{weekStartsOn:+t});return[r,n]},Zp=(e,t)=>{const r={hours:xr(le()),minutes:Lr(le()),seconds:t?Cn(le()):0};return Object.assign(r,e)},Vr=(e,t,r)=>[Ke(le(e),{date:1}),Ke(le(),{month:t,year:r,date:1})],kr=(e,t,r)=>{let n=e?le(e):le();return(t||t===0)&&(n=Np(n,t)),r&&(n=yr(n,r)),n},em=(e,t,r,n,a)=>{if(!n||a&&!t||!a&&!r)return!1;const o=a?Jt(e,1):kn(e,1),s=[Ie(o),je(o)];return a?!yE(...s,t):!gE(...s,r)},gE=(e,t,r)=>st(...Vr(r,e,t))||Me(...Vr(r,e,t)),yE=(e,t,r)=>ct(...Vr(r,e,t))||Me(...Vr(r,e,t)),tm=(e,t,r,n,a,o,s)=>{if(typeof t=="function"&&!s)return t(e);const u=r?{locale:r}:void 0;return Array.isArray(e)?`${pr(e[0],o,u)}${a&&!e[1]?"":n}${e[1]?pr(e[1],o,u):""}`:pr(e,o,u)},Nn=e=>{if(e)return null;throw new Error(nu.prop("partial-range"))},zi=(e,t)=>{if(t)return e();throw new Error(nu.prop("range"))},lu=e=>Array.isArray(e)?Ua(e[0])&&(e[1]?Ua(e[1]):!0):e?Ua(e):!1,vE=(e,t)=>Ke(t??le(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),uu=(e,t,r,n)=>{if(!e)return!0;if(n){const a=r==="max"?xn(e,t):tn(e,t),o={seconds:0,milliseconds:0};return a||Tn(Ke(e,o),Ke(t,o))}return r==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},cu=(e,t,r)=>e?vE(e,t):le(r??t),rm=(e,t,r,n,a)=>{if(Array.isArray(n)){const s=cu(e,n[0],t),u=cu(e,n[1],t);return uu(n[0],s,r,!!t)&&uu(n[1],u,r,!!t)&&a}const o=cu(e,n,t);return uu(n,o,r,!!t)&&a},du=e=>Ke(le(),nn(e)),bE=(e,t,r)=>{if(e instanceof Map){const n=`${Qp(r+1)}-${t}`;return e.size?e.has(n):!1}return typeof e=="function"?e(bt(Ke(le(),{month:r,year:t}),!0)):!1},wE=(e,t,r)=>{if(e instanceof Map){const n=`${Qp(r+1)}-${t}`;return e.size?e.has(n):!0}return!0},nm=(e,t,r)=>typeof e=="function"?e({month:t,year:r}):!!e.months.find(n=>n.month===t&&n.year===r),fu=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),hu=e=>`dp-${pr(e,"yyyy-MM-dd")}`,am=(e,t)=>{const r=Dp(bt(t),e),n=zt(bt(t),e);return{before:r,after:n}},Ga=i.reactive({menuFocused:!1,shiftKeyInMenu:!1}),im=()=>{const e=r=>{Ga.menuFocused=r},t=r=>{Ga.shiftKeyInMenu!==r&&(Ga.shiftKeyInMenu=r)};return{control:i.computed(()=>({shiftKeyInMenu:Ga.shiftKeyInMenu,menuFocused:Ga.menuFocused})),setMenuFocused:e,setShiftKey:t}},et=i.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),pu=i.ref(null),Yi=i.ref(!1),mu=i.ref(!1),gu=i.ref(!1),yu=i.ref(!1),Ct=i.ref(0),dt=i.ref(0),qr=()=>{const e=i.computed(()=>Yi.value?[...et.selectionGrid,et.actionRow].filter(v=>v.length):mu.value?[...et.timePicker[0],...et.timePicker[1],yu.value?[]:[pu.value],et.actionRow].filter(v=>v.length):gu.value?[...et.monthPicker,et.actionRow]:[et.monthYear,...et.calendar,et.time,et.actionRow].filter(v=>v.length)),t=v=>{Ct.value=v?Ct.value+1:Ct.value-1;let h=null;e.value[dt.value]&&(h=e.value[dt.value][Ct.value]),!h&&e.value[dt.value+(v?1:-1)]?(dt.value=dt.value+(v?1:-1),Ct.value=v?0:e.value[dt.value].length-1):h||(Ct.value=v?Ct.value-1:Ct.value+1)},r=v=>{dt.value===0&&!v||dt.value===e.value.length&&v||(dt.value=v?dt.value+1:dt.value-1,e.value[dt.value]?e.value[dt.value]&&!e.value[dt.value][Ct.value]&&Ct.value!==0&&(Ct.value=e.value[dt.value].length-1):dt.value=v?dt.value-1:dt.value+1)},n=v=>{let h=null;e.value[dt.value]&&(h=e.value[dt.value][Ct.value]),h?h.focus({preventScroll:!Yi.value}):Ct.value=v?Ct.value-1:Ct.value+1},a=()=>{t(!0),n(!0)},o=()=>{t(!1),n(!1)},s=()=>{r(!1),n(!0)},u=()=>{r(!0),n(!0)},d=(v,h)=>{et[h]=v},p=(v,h)=>{et[h]=v},m=()=>{Ct.value=0,dt.value=0};return{buildMatrix:d,buildMultiLevelMatrix:p,setTimePickerBackRef:v=>{pu.value=v},setSelectionGrid:v=>{Yi.value=v,m(),v||(et.selectionGrid=[])},setTimePicker:(v,h=!1)=>{mu.value=v,yu.value=h,m(),v||(et.timePicker[0]=[],et.timePicker[1]=[])},setTimePickerElements:(v,h=0)=>{et.timePicker[h]=v},arrowRight:a,arrowLeft:o,arrowUp:s,arrowDown:u,clearArrowNav:()=>{et.monthYear=[],et.calendar=[],et.time=[],et.actionRow=[],et.selectionGrid=[],et.timePicker[0]=[],et.timePicker[1]=[],Yi.value=!1,mu.value=!1,yu.value=!1,gu.value=!1,m(),pu.value=null},setMonthPicker:v=>{gu.value=v,m()},refSets:et}},om=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),_E=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:t=>`Month picker${t?" overlay":""}`,yearPicker:t=>`Year picker${t?" overlay":""}`,timeOverlay:t=>`${t} overlay`,...e??{}}),sm=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,SE=e=>{const t=typeof e=="object"&&e,r={static:!0,solo:!1};if(!e)return{...r,count:sm(!1)};const n=t?e:{},a=t?n.count??!0:e,o=sm(a);return Object.assign(r,n,{count:o})},RE=(e,t,r)=>e||(typeof r=="string"?r:t),PE=e=>typeof e=="boolean"?e?om({}):!1:om(e),OE=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - ",escClose:!0};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},EE=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),CE=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),xE=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},TE=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,mobileBreakpoint:600,setDateOnMenuClose:!1,...e??{}}),kE=e=>{const t={dates:Array.isArray(e)?e.map(r=>le(r)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},AE=e=>typeof e=="object"?{type:e?.type??"local",hideOnOffsetDates:e?.hideOnOffsetDates??!1}:{type:e,hideOnOffsetDates:!1},jE=e=>{const t={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof e=="object"?{enabled:!0,...t,...e}:{enabled:e,...t}},$E=e=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:e.emitTimezone??void 0,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},vu=(e,t,r,n)=>new Map(e.map(a=>{const o=eu(a,t,n);return[iu(o,r),o]})),DE=(e,t)=>e.length?new Map(e.map(r=>{const n=eu(r.date,t);return[iu(n,jn.DATE),r]})):null,NE=e=>{var t;const r=Yp(e.isMonthPicker,e.isYearPicker);return{minDate:tu(e.minDate,e.timezone,e.isSpecific),maxDate:tu(e.maxDate,e.timezone,e.isSpecific),disabledDates:ou(e.disabledDates)?vu(e.disabledDates,e.timezone,r,e.isSpecific):e.disabledDates,allowedDates:ou(e.allowedDates)?vu(e.allowedDates,e.timezone,r,e.isSpecific):null,highlight:typeof e.highlight=="object"&&ou((t=e.highlight)==null?void 0:t.dates)?vu(e.highlight.dates,e.timezone,r):e.highlight,markers:DE(e.markers,e.timezone)}},FE=e=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:null}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},IE=e=>({...Object.fromEntries(Object.keys(e).map(t=>{const r=t,n=e[r],a=typeof e[r]=="string"?{[n]:!0}:Object.fromEntries(n.map(o=>[o,!0]));return[t,a]}))}),tt=e=>{const t=()=>{const R=e.enableSeconds?":ss":"",O=e.enableMinutes?":mm":"";return e.is24?`HH${O}${R}`:`hh${O}${R} aa`},r=()=>{var R;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((R=y.value)==null?void 0:R.type)==="iso"?"II":"ww"}-RR`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},n=R=>Zp(R,e.enableSeconds),a=()=>_.value.enabled?e.startTime&&Array.isArray(e.startTime)?[n(e.startTime[0]),n(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?n(e.startTime):null,o=i.computed(()=>SE(e.multiCalendars)),s=i.computed(()=>a()),u=i.computed(()=>_E(e.ariaLabels)),d=i.computed(()=>EE(e.filters)),p=i.computed(()=>PE(e.transitions)),m=i.computed(()=>CE(e.actionRow)),v=i.computed(()=>RE(e.previewFormat,e.format,r())),h=i.computed(()=>OE(e.textInput)),l=i.computed(()=>xE(e.inline)),c=i.computed(()=>TE(e.config)),g=i.computed(()=>kE(e.highlight)),y=i.computed(()=>AE(e.weekNumbers)),f=i.computed(()=>$E(e.timezone)),b=i.computed(()=>FE(e.multiDates)),w=i.computed(()=>NE({minDate:e.minDate,maxDate:e.maxDate,disabledDates:e.disabledDates,allowedDates:e.allowedDates,highlight:g.value,markers:e.markers,timezone:f.value,isSpecific:e.monthPicker||e.yearPicker||e.quarterPicker,isMonthPicker:e.monthPicker,isYearPicker:e.yearPicker})),_=i.computed(()=>jE(e.range)),S=i.computed(()=>IE(e.ui));return{defaultedTransitions:p,defaultedMultiCalendars:o,defaultedStartTime:s,defaultedAriaLabels:u,defaultedFilters:d,defaultedActionRow:m,defaultedPreviewFormat:v,defaultedTextInput:h,defaultedInline:l,defaultedConfig:c,defaultedHighlight:g,defaultedWeekNumbers:y,defaultedRange:_,propDates:w,defaultedTz:f,defaultedMultiDates:b,defaultedUI:S,getDefaultPattern:r,getDefaultStartTime:a,handleEventPropagation:R=>{c.value.allowStopPropagation&&R.stopPropagation(),c.value.allowPreventDefault&&R.preventDefault()}}},ME=(e,t,r)=>{const n=i.ref(),{defaultedTextInput:a,defaultedRange:o,defaultedTz:s,defaultedMultiDates:u,getDefaultPattern:d}=tt(t),p=i.ref(""),m=i.toRef(t,"format"),v=i.toRef(t,"formatLocale");i.watch(n,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",n.value,ee(!0))},{deep:!0}),i.watch(o,(x,z)=>{x.enabled!==z.enabled&&(n.value=null)}),i.watch(m,()=>{U()});const h=x=>s.value.timezone&&s.value.convertModel?Mt(x,s.value.timezone):x,l=x=>{if(s.value.timezone&&s.value.convertModel){const z=rE(s.value.timezone,x);return tP(x,z)}return x},c=(x,z,ie=!1)=>tm(x,t.format,t.formatLocale,a.value.rangeSeparator,t.modelAuto,z??d(),ie),g=x=>x?t.modelType?Y(x):{hours:xr(x),minutes:Lr(x),seconds:t.enableSeconds?Cn(x):0}:null,y=x=>t.modelType?Y(x):{month:Ie(x),year:je(x)},f=x=>Array.isArray(x)?u.value.enabled?x.map(z=>b(z,yr(le(),z))):zi(()=>[yr(le(),x[0]),x[1]?yr(le(),x[1]):Nn(o.value.partialRange)],o.value.enabled):yr(le(),+x),b=(x,z)=>(typeof x=="string"||typeof x=="number")&&t.modelType?B(x):z,w=x=>Array.isArray(x)?[b(x[0],Hr(null,+x[0].hours,+x[0].minutes,x[0].seconds)),b(x[1],Hr(null,+x[1].hours,+x[1].minutes,x[1].seconds))]:b(x,Hr(null,x.hours,x.minutes,x.seconds)),_=x=>{const z=Ke(le(),{date:1});return Array.isArray(x)?u.value.enabled?x.map(ie=>b(ie,kr(z,+ie.month,+ie.year))):zi(()=>[b(x[0],kr(z,+x[0].month,+x[0].year)),b(x[1],x[1]?kr(z,+x[1].month,+x[1].year):Nn(o.value.partialRange))],o.value.enabled):b(x,kr(z,+x.month,+x.year))},S=x=>{if(Array.isArray(x))return x.map(z=>B(z));throw new Error(nu.dateArr("multi-dates"))},R=x=>{if(Array.isArray(x)&&o.value.enabled){const z=x[0],ie=x[1];return[le(Array.isArray(z)?z[0]:null),Array.isArray(ie)&&ie.length?le(ie[0]):null]}return le(x[0])},O=x=>t.modelAuto?Array.isArray(x)?[B(x[0]),B(x[1])]:t.autoApply?[B(x)]:[B(x),null]:Array.isArray(x)?zi(()=>x[1]?[B(x[0]),x[1]?B(x[1]):Nn(o.value.partialRange)]:[B(x[0])],o.value.enabled):B(x),P=()=>{Array.isArray(n.value)&&o.value.enabled&&n.value.length===1&&n.value.push(Nn(o.value.partialRange))},C=()=>{const x=n.value;return[Y(x[0]),x[1]?Y(x[1]):Nn(o.value.partialRange)]},k=()=>Array.isArray(n.value)?n.value[1]?C():Y(vt(n.value[0])):[],A=()=>(n.value||[]).map(x=>Y(x)),H=(x=!1)=>(x||P(),t.modelAuto?k():u.value.enabled?A():Array.isArray(n.value)?zi(()=>C(),o.value.enabled):Y(vt(n.value))),Q=x=>!x||Array.isArray(x)&&!x.length?null:t.timePicker?w(vt(x)):t.monthPicker?_(vt(x)):t.yearPicker?f(vt(x)):u.value.enabled?S(vt(x)):t.weekPicker?R(vt(x)):O(vt(x)),$=x=>{const z=Q(x);lu(vt(z))?(n.value=vt(z),U()):(n.value=null,p.value="")},M=()=>{const x=z=>pr(z,a.value.format);return`${x(n.value[0])} ${a.value.rangeSeparator} ${n.value[1]?x(n.value[1]):""}`},D=()=>r.value&&n.value?Array.isArray(n.value)?M():pr(n.value,a.value.format):c(n.value),I=()=>n.value?u.value.enabled?n.value.map(x=>c(x)).join("; "):a.value.enabled&&typeof a.value.format=="string"?D():c(n.value):"",U=()=>{!t.format||typeof t.format=="string"||a.value.enabled&&typeof a.value.format=="string"?p.value=I():p.value=t.format(n.value)},B=x=>{if(t.utc){const z=new Date(x);return t.utc==="preserve"?new Date(z.getTime()+z.getTimezoneOffset()*6e4):z}return t.modelType?nE.includes(t.modelType)?h(new Date(x)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(Ql(x,d(),new Date,{locale:v.value})):h(Ql(x,t.modelType,new Date,{locale:v.value})):h(new Date(x))},Y=x=>x?t.utc?pE(x,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+l(x):t.modelType==="iso"?l(x).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?c(l(x)):c(l(x),t.modelType,!0):l(x):"",q=(x,z=!1,ie=!1)=>{if(ie)return x;if(e("update:model-value",x),s.value.emitTimezone&&z){const we=Array.isArray(x)?x.map(Z=>Mt(vt(Z),s.value.emitTimezone)):Mt(vt(x),s.value.emitTimezone);e("update:model-timezone-value",we)}},ne=x=>Array.isArray(n.value)?u.value.enabled?n.value.map(z=>x(z)):[x(n.value[0]),n.value[1]?x(n.value[1]):Nn(o.value.partialRange)]:x(vt(n.value)),L=()=>{if(Array.isArray(n.value)){const x=Tr(n.value[0],t.weekStart),z=n.value[1]?Tr(n.value[1],t.weekStart):[];return[x.map(ie=>le(ie)),z.map(ie=>le(ie))]}return Tr(n.value,t.weekStart).map(x=>le(x))},K=(x,z)=>q(vt(ne(x)),!1,z),W=x=>{const z=L();return x?z:e("update:model-value",L())},ee=(x=!1)=>(x||U(),t.monthPicker?K(y,x):t.timePicker?K(g,x):t.yearPicker?K(je,x):t.weekPicker?W(x):q(H(x),!0,x));return{inputValue:p,internalModelValue:n,checkBeforeEmit:()=>n.value?o.value.enabled?o.value.partialRange?n.value.length>=1:n.value.length===2:!!n.value:!1,parseExternalModelValue:$,formatInputValue:U,emitModelValue:ee}},LE=(e,t)=>{const{defaultedFilters:r,propDates:n}=tt(e),{validateMonthYearInRange:a}=Wr(e),o=(m,v)=>{let h=m;return r.value.months.includes(Ie(h))?(h=v?Jt(m,1):kn(m,1),o(h,v)):h},s=(m,v)=>{let h=m;return r.value.years.includes(je(h))?(h=v?Ll(m,1):Mp(m,1),s(h,v)):h},u=(m,v=!1)=>{const h=Ke(le(),{month:e.month,year:e.year});let l=m?Jt(h,1):kn(h,1);e.disableYearSelect&&(l=yr(l,e.year));let c=Ie(l),g=je(l);r.value.months.includes(c)&&(l=o(l,m),c=Ie(l),g=je(l)),r.value.years.includes(g)&&(l=s(l,m),g=je(l)),a(c,g,m,e.preventMinMaxNavigation)&&d(c,g,v)},d=(m,v,h)=>{t("update-month-year",{month:m,year:v,fromNav:h})},p=i.computed(()=>m=>em(Ke(le(),{month:e.month,year:e.year}),n.value.maxDate,n.value.minDate,e.preventMinMaxNavigation,m));return{handleMonthYearChange:u,isDisabled:p,updateMonthYear:d}},Qi={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:[Boolean,String],default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},alwaysClearable:{type:Boolean,default:!1},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},rr={...Qi,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1},isMobile:{type:Boolean,default:void 0}},BE=["title"],HE=["disabled"],VE=i.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...rr},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const r=t,n=e,{defaultedActionRow:a,defaultedPreviewFormat:o,defaultedMultiCalendars:s,defaultedTextInput:u,defaultedInline:d,defaultedRange:p,defaultedMultiDates:m}=tt(n),{isTimeValid:v,isMonthValid:h}=Wr(n),{buildMatrix:l}=qr(),c=i.ref(null),g=i.ref(null),y=i.ref(!1),f=i.ref({}),b=i.ref(null),w=i.ref(null);i.onMounted(()=>{n.arrowNavigation&&l([ht(c),ht(g)],"actionRow"),_(),window.addEventListener("resize",_)}),i.onUnmounted(()=>{window.removeEventListener("resize",_)});const _=()=>{y.value=!1,setTimeout(()=>{var $,M;const D=($=b.value)==null?void 0:$.getBoundingClientRect(),I=(M=w.value)==null?void 0:M.getBoundingClientRect();D&&I&&(f.value.maxWidth=`${I.width-D.width-20}px`),y.value=!0},0)},S=i.computed(()=>p.value.enabled&&!p.value.partialRange&&n.internalModelValue?n.internalModelValue.length===2:!0),R=i.computed(()=>!v.value(n.internalModelValue)||!h.value(n.internalModelValue)||!S.value),O=()=>{const $=o.value;return n.timePicker||n.monthPicker,$(vt(n.internalModelValue))},P=()=>{const $=n.internalModelValue;return s.value.count>0?`${C($[0])} - ${C($[1])}`:[C($[0]),C($[1])]},C=$=>tm($,o.value,n.formatLocale,u.value.rangeSeparator,n.modelAuto,o.value),k=i.computed(()=>!n.internalModelValue||!n.menuMount?"":typeof o.value=="string"?Array.isArray(n.internalModelValue)?n.internalModelValue.length===2&&n.internalModelValue[1]?P():m.value.enabled?n.internalModelValue.map($=>`${C($)}`):n.modelAuto?`${C(n.internalModelValue[0])}`:`${C(n.internalModelValue[0])} -`:C(n.internalModelValue):O()),A=()=>m.value.enabled?"; ":" - ",H=i.computed(()=>Array.isArray(k.value)?k.value.join(A()):k.value),Q=()=>{v.value(n.internalModelValue)&&h.value(n.internalModelValue)&&S.value?r("select-date"):r("invalid-select")};return($,M)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"actionRowRef",ref:w,class:"dp__action_row"},[$.$slots["action-row"]?i.renderSlot($.$slots,"action-row",i.normalizeProps(i.mergeProps({key:0},{internalModelValue:$.internalModelValue,disabled:R.value,selectDate:()=>$.$emit("select-date"),closePicker:()=>$.$emit("close-picker")}))):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.unref(a).showPreview?(i.openBlock(),i.createElementBlock("div",{key:0,class:"dp__selection_preview",title:H.value,style:i.normalizeStyle(f.value)},[$.$slots["action-preview"]&&y.value?i.renderSlot($.$slots,"action-preview",{key:0,value:$.internalModelValue}):i.createCommentVNode("",!0),!$.$slots["action-preview"]&&y.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(H.value),1)],64)):i.createCommentVNode("",!0)],12,BE)):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"actionBtnContainer",ref:b,class:"dp__action_buttons","data-dp-element":"action-row"},[$.$slots["action-buttons"]?i.renderSlot($.$slots,"action-buttons",{key:0,value:$.internalModelValue}):i.createCommentVNode("",!0),$.$slots["action-buttons"]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[!i.unref(d).enabled&&i.unref(a).showCancel?(i.openBlock(),i.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:c,type:"button",class:"dp__action_button dp__action_cancel",onClick:M[0]||(M[0]=D=>$.$emit("close-picker")),onKeydown:M[1]||(M[1]=D=>i.unref(jt)(D,()=>$.$emit("close-picker")))},i.toDisplayString($.cancelText),545)):i.createCommentVNode("",!0),i.unref(a).showNow?(i.openBlock(),i.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:M[2]||(M[2]=D=>$.$emit("select-now")),onKeydown:M[3]||(M[3]=D=>i.unref(jt)(D,()=>$.$emit("select-now")))},i.toDisplayString($.nowButtonLabel),33)):i.createCommentVNode("",!0),i.unref(a).showSelect?(i.openBlock(),i.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:R.value,"data-test-id":"select-button",onKeydown:M[4]||(M[4]=D=>i.unref(jt)(D,()=>Q())),onClick:Q},i.toDisplayString($.selectText),41,HE)):i.createCommentVNode("",!0)],64))],512)],64))],512))}}),qE=["role","aria-label","tabindex"],UE={class:"dp__selection_grid_header"},WE=["aria-selected","aria-disabled","data-test-id","onClick","onKeydown","onMouseover"],zE=["aria-label"],Ja=i.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:r}){const{setSelectionGrid:n,buildMultiLevelMatrix:a,setMonthPicker:o}=qr(),s=r,u=e,{defaultedAriaLabels:d,defaultedTextInput:p,defaultedConfig:m,handleEventPropagation:v}=tt(u),{hideNavigationButtons:h}=Ji(),l=i.ref(!1),c=i.ref(null),g=i.ref(null),y=i.ref([]),f=i.ref(),b=i.ref(null),w=i.ref(0),_=i.ref(null);i.onBeforeUpdate(()=>{c.value=null}),i.onMounted(()=>{i.nextTick().then(()=>H()),u.noOverlayFocus||R(),S(!0)}),i.onUnmounted(()=>S(!1));const S=L=>{var K;u.arrowNavigation&&((K=u.headerRefs)!=null&&K.length?o(L):n(L))},R=()=>{var L;const K=ht(g);K&&(p.value.enabled||(c.value?(L=c.value)==null||L.focus({preventScroll:!0}):K.focus({preventScroll:!0})),l.value=K.clientHeight<K.scrollHeight)},O=i.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!u.useRelative,"dp--overlay-relative":u.useRelative})),P=i.computed(()=>u.useRelative?{height:`${u.height}px`,width:"var(--dp-menu-min-width)"}:void 0),C=i.computed(()=>({dp__overlay_col:!0})),k=i.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:l.value,dp__button_bottom:u.isLast})),A=i.computed(()=>{var L,K;return{dp__overlay_container:!0,dp__container_flex:((L=u.items)==null?void 0:L.length)<=6,dp__container_block:((K=u.items)==null?void 0:K.length)>6}});i.watch(()=>u.items,()=>H(!1),{deep:!0});const H=(L=!0)=>{i.nextTick().then(()=>{const K=ht(c),W=ht(g),ee=ht(b),x=ht(_),z=ee?ee.getBoundingClientRect().height:0;W&&(W.getBoundingClientRect().height?w.value=W.getBoundingClientRect().height-z:w.value=m.value.modeHeight-z),K&&x&&L&&(x.scrollTop=K.offsetTop-x.offsetTop-(w.value/2-K.getBoundingClientRect().height)-z)})},Q=L=>{L.disabled||s("selected",L.value)},$=()=>{s("toggle"),s("reset-flow")},M=L=>{u.escClose&&($(),v(L))},D=(L,K,W,ee)=>{L&&((K.active||K.value===u.focusValue)&&(c.value=L),u.arrowNavigation&&(Array.isArray(y.value[W])?y.value[W][ee]=L:y.value[W]=[L],I()))},I=()=>{var L,K;const W=(L=u.headerRefs)!=null&&L.length?[u.headerRefs].concat(y.value):y.value.concat([u.skipButtonRef?[]:[b.value]]);a(vt(W),(K=u.headerRefs)!=null&&K.length?"monthPicker":"selectionGrid")},U=L=>{u.arrowNavigation||Br(L,m.value,!0)},B=L=>{f.value=L,s("hover-value",L)},Y=()=>{if($(),!u.isLast){const L=au(u.menuWrapRef??null,"action-row");if(L){const K=Wp(L);K?.focus()}}},q=L=>{switch(L.key){case Ze.esc:return M(L);case Ze.arrowLeft:return U(L);case Ze.arrowRight:return U(L);case Ze.arrowUp:return U(L);case Ze.arrowDown:return U(L);default:return}},ne=L=>{if(L.key===Ze.enter)return $();if(L.key===Ze.tab)return Y()};return t({focusGrid:R}),(L,K)=>{var W;return i.openBlock(),i.createElementBlock("div",{ref_key:"gridWrapRef",ref:g,class:i.normalizeClass(O.value),style:i.normalizeStyle(P.value),role:L.useRelative?void 0:"dialog","aria-label":L.overlayLabel,tabindex:L.useRelative?void 0:"0",onKeydown:q,onClick:K[0]||(K[0]=i.withModifiers(()=>{},["prevent"]))},[i.createElementVNode("div",{ref_key:"containerRef",ref:_,class:i.normalizeClass(A.value),style:i.normalizeStyle({"--dp-overlay-height":`${w.value}px`}),role:"grid"},[i.createElementVNode("div",UE,[i.renderSlot(L.$slots,"header")]),L.$slots.overlay?i.renderSlot(L.$slots,"overlay",{key:0}):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(L.items,(ee,x)=>(i.openBlock(),i.createElementBlock("div",{key:x,class:i.normalizeClass(["dp__overlay_row",{dp__flex_row:L.items.length>=3}]),role:"row"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(ee,(z,ie)=>(i.openBlock(),i.createElementBlock("div",{key:z.value,ref_for:!0,ref:we=>D(we,z,x,ie),role:"gridcell",class:i.normalizeClass(C.value),"aria-selected":z.active||void 0,"aria-disabled":z.disabled||void 0,tabindex:"0","data-test-id":z.text,onClick:i.withModifiers(we=>Q(z),["prevent"]),onKeydown:we=>i.unref(jt)(we,()=>Q(z),!0),onMouseover:we=>B(z.value)},[i.createElementVNode("div",{class:i.normalizeClass(z.className)},[L.$slots.item?i.renderSlot(L.$slots,"item",{key:0,item:z}):i.createCommentVNode("",!0),L.$slots.item?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(z.text),1)],64))],2)],42,WE))),128))],2))),128))],6),L.$slots["button-icon"]?i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:b,type:"button","aria-label":(W=i.unref(d))==null?void 0:W.toggleOverlay,class:i.normalizeClass(k.value),tabindex:"0",onClick:$,onKeydown:ne},[i.renderSlot(L.$slots,"button-icon")],42,zE)),[[i.vShow,!i.unref(h)(L.hideNavigation,L.type)]]):i.createCommentVNode("",!0)],46,qE)}}}),YE=["data-dp-mobile"],Ki=i.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean},isMobile:{type:Boolean}},setup(e){const t=e,r=i.computed(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),n=i.computed(()=>({dp__instance_calendar:t.multiCalendars>0}));return(a,o)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass({dp__menu_inner:!a.stretch,"dp--menu--inner-stretched":a.stretch,dp__flex_display:a.multiCalendars>0,"dp--flex-display-collapsed":a.collapse}),"data-dp-mobile":a.isMobile},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(s,u)=>(i.openBlock(),i.createElementBlock("div",{key:s,class:i.normalizeClass(n.value)},[i.renderSlot(a.$slots,"default",{instance:s,index:u})],2))),128))],10,YE))}}),QE=["data-dp-element","aria-label","aria-disabled"],Xa=i.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const r=t,n=i.ref(null);return i.onMounted(()=>r("set-ref",n)),(a,o)=>(i.openBlock(),i.createElementBlock("button",{ref_key:"elRef",ref:n,type:"button","data-dp-element":a.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":a.ariaLabel,"aria-disabled":a.disabled||void 0,onClick:o[0]||(o[0]=s=>a.$emit("activate")),onKeydown:o[1]||(o[1]=s=>i.unref(jt)(s,()=>a.$emit("activate"),!0))},[i.createElementVNode("span",{class:i.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:a.disabled}])},[i.renderSlot(a.$slots,"default")],2)],40,QE))}}),KE=["aria-label","data-test-id"],lm=i.defineComponent({__name:"YearModePicker",props:{...rr,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const r=t,n=e,{showRightIcon:a,showLeftIcon:o}=Ji(),{defaultedConfig:s,defaultedMultiCalendars:u,defaultedAriaLabels:d,defaultedTransitions:p,defaultedUI:m}=tt(n),{showTransition:v,transitionName:h}=Za(p),l=i.ref(!1),c=(f=!1,b)=>{l.value=!l.value,r("toggle-year-picker",{flow:f,show:b})},g=f=>{l.value=!1,r("year-select",f)},y=(f=!1)=>{r("handle-year",f)};return(f,b)=>{var w,_,S,R,O;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:i.normalizeClass(["dp--year-mode-picker",{"dp--hidden-el":l.value}])},[i.unref(o)(i.unref(u),e.instance)?(i.openBlock(),i.createBlock(Xa,{key:0,ref:"mpPrevIconRef","aria-label":(w=i.unref(d))==null?void 0:w.prevYear,disabled:e.isDisabled(!1),class:i.normalizeClass((_=i.unref(m))==null?void 0:_.navBtnPrev),onActivate:b[0]||(b[0]=P=>y(!1))},{default:i.withCtx(()=>[f.$slots["arrow-left"]?i.renderSlot(f.$slots,"arrow-left",{key:0}):i.createCommentVNode("",!0),f.$slots["arrow-left"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Kl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):i.createCommentVNode("",!0),i.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${e.year}-${(S=i.unref(d))==null?void 0:S.openYearsOverlay}`,"data-test-id":`year-mode-btn-${e.instance}`,onClick:b[1]||(b[1]=()=>c(!1)),onKeydown:b[2]||(b[2]=i.withKeys(()=>c(!1),["enter"]))},[f.$slots.year?i.renderSlot(f.$slots,"year",{key:0,year:e.year}):i.createCommentVNode("",!0),f.$slots.year?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(e.year),1)],64))],40,KE),i.unref(a)(i.unref(u),e.instance)?(i.openBlock(),i.createBlock(Xa,{key:1,ref:"mpNextIconRef","aria-label":(R=i.unref(d))==null?void 0:R.nextYear,disabled:e.isDisabled(!0),class:i.normalizeClass((O=i.unref(m))==null?void 0:O.navBtnNext),onActivate:b[3]||(b[3]=P=>y(!0))},{default:i.withCtx(()=>[f.$slots["arrow-right"]?i.renderSlot(f.$slots,"arrow-right",{key:0}):i.createCommentVNode("",!0),f.$slots["arrow-right"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Gl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):i.createCommentVNode("",!0)],2),i.createVNode(i.Transition,{name:i.unref(h)(e.showYearPicker),css:i.unref(v)},{default:i.withCtx(()=>{var P,C;return[e.showYearPicker?(i.openBlock(),i.createBlock(Ja,{key:0,items:e.items,"text-input":f.textInput,"esc-close":f.escClose,config:f.config,"is-last":f.autoApply&&!i.unref(s).keepActionRow,"hide-navigation":f.hideNavigation,"aria-labels":f.ariaLabels,"overlay-label":(C=(P=i.unref(d))==null?void 0:P.yearPicker)==null?void 0:C.call(P,!0),type:"year",onToggle:c,onSelected:b[4]||(b[4]=k=>g(k))},i.createSlots({"button-icon":i.withCtx(()=>[f.$slots["calendar-icon"]?i.renderSlot(f.$slots,"calendar-icon",{key:0}):i.createCommentVNode("",!0),f.$slots["calendar-icon"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(An),{key:1}))]),_:2},[f.$slots["year-overlay-value"]?{name:"item",fn:i.withCtx(({item:k})=>[i.renderSlot(f.$slots,"year-overlay-value",{text:k.text,value:k.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):i.createCommentVNode("",!0)]}),_:3},8,["name","css"])],64)}}}),bu=(e,t,r)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(n=>Me(e,n))){const n=t.value.filter(a=>!Me(a,e));t.value=n.length?n:null}else(r&&+r>t.value.length||!r)&&t.value.push(e);else t.value=[e]},wu=(e,t,r)=>{let n=e.value?e.value.slice():[];return n.length===2&&n[1]!==null&&(n=[]),n.length?(st(t,n[0])?n.unshift(t):n[1]=t,r("range-end",t)):(n=[t],r("range-start",t)),n},Gi=(e,t,r,n)=>{e&&(e[0]&&e[1]&&r&&t("auto-apply"),e[0]&&!e[1]&&n&&r&&t("auto-apply"))},um=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>Mt(le(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=Mt(le(e.value),e.timezone))},cm=(e,t,r,n)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&n.value.partialRange)?n.value.fixedStart&&(ct(e,t.value[0])||Me(e,t.value[0]))?[t.value[0],e]:n.value.fixedEnd&&(st(e,t.value[1])||Me(e,t.value[1]))?[e,t.value[1]]:(r("invalid-fixed-range",e),t.value):[],dm=({multiCalendars:e,range:t,highlight:r,propDates:n,calendars:a,modelValue:o,props:s,filters:u,year:d,month:p,emit:m})=>{const v=i.computed(()=>ru(s.yearRange,s.locale,s.reverseYears)),h=i.ref([!1]),l=i.computed(()=>(k,A)=>{const H=Ke(tr(new Date),{month:p.value(k),year:d.value(k)}),Q=A?vp(H):Wa(H);return em(Q,n.value.maxDate,n.value.minDate,s.preventMinMaxNavigation,A)}),c=()=>Array.isArray(o.value)&&e.value.solo&&o.value[1],g=()=>{for(let k=0;k<e.value.count;k++)if(k===0)a.value[k]=a.value[0];else if(k===e.value.count-1&&c())a.value[k]={month:Ie(o.value[1]),year:je(o.value[1])};else{const A=Ke(le(),a.value[k-1]);a.value[k]={month:Ie(A),year:je(Ll(A,1))}}},y=k=>{if(!k)return g();const A=Ke(le(),a.value[k]);return a.value[0].year=je(Mp(A,e.value.count-1)),g()},f=(k,A)=>{const H=oP(A,k);return t.value.showLastInRange&&H>1?A:k},b=k=>s.focusStartDate||e.value.solo?k[0]:k[1]?f(k[0],k[1]):k[0],w=()=>{if(o.value){const k=Array.isArray(o.value)?b(o.value):o.value;a.value[0]={month:Ie(k),year:je(k)}}},_=()=>{w(),e.value.count&&g()};i.watch(o,(k,A)=>{s.isTextInputDate&&JSON.stringify(k??{})!==JSON.stringify(A??{})&&_()}),i.onMounted(()=>{_()});const S=(k,A)=>{a.value[A].year=k,m("update-month-year",{instance:A,year:k,month:a.value[A].month}),e.value.count&&!e.value.solo&&y(A)},R=i.computed(()=>k=>$n(v.value,A=>{var H;const Q=d.value(k)===A.value,$=Qa(A.value,Dn(n.value.minDate),Dn(n.value.maxDate))||((H=u.value.years)==null?void 0:H.includes(d.value(k))),M=fu(r.value,A.value);return{active:Q,disabled:$,highlighted:M}})),O=(k,A)=>{S(k,A),C(A)},P=(k,A=!1)=>{if(!l.value(k,A)){const H=A?d.value(k)+1:d.value(k)-1;S(H,k)}},C=(k,A=!1,H)=>{A||m("reset-flow"),H!==void 0?h.value[k]=H:h.value[k]=!h.value[k],h.value[k]?m("overlay-toggle",{open:!0,overlay:Et.year}):(m("overlay-closed"),m("overlay-toggle",{open:!1,overlay:Et.year}))};return{isDisabled:l,groupedYears:R,showYearPicker:h,selectYear:S,toggleYearPicker:C,handleYearSelect:O,handleYear:P}},GE=(e,t)=>{const{defaultedMultiCalendars:r,defaultedAriaLabels:n,defaultedTransitions:a,defaultedConfig:o,defaultedRange:s,defaultedHighlight:u,propDates:d,defaultedTz:p,defaultedFilters:m,defaultedMultiDates:v}=tt(e),h=()=>{e.isTextInputDate&&_(je(le(e.startDate)),0)},{modelValue:l,year:c,month:g,calendars:y}=ei(e,t,h),f=i.computed(()=>Hp(e.formatLocale,e.locale,e.monthNameFormat)),b=i.ref(null),{checkMinMaxRange:w}=Wr(e),{selectYear:_,groupedYears:S,showYearPicker:R,toggleYearPicker:O,handleYearSelect:P,handleYear:C,isDisabled:k}=dm({modelValue:l,multiCalendars:r,range:s,highlight:u,calendars:y,year:c,propDates:d,month:g,filters:m,props:e,emit:t});i.onMounted(()=>{e.startDate&&(l.value&&e.focusStartDate||!l.value)&&_(je(le(e.startDate)),0)});const A=K=>K?{month:Ie(K),year:je(K)}:{month:null,year:null},H=()=>l.value?Array.isArray(l.value)?l.value.map(K=>A(K)):A(l.value):A(),Q=(K,W)=>{const ee=y.value[K],x=H();return Array.isArray(x)?x.some(z=>z.year===ee?.year&&z.month===W):ee?.year===x.year&&W===x.month},$=(K,W,ee)=>{var x,z;const ie=H();return Array.isArray(ie)?c.value(W)===((x=ie[ee])==null?void 0:x.year)&&K===((z=ie[ee])==null?void 0:z.month):!1},M=(K,W)=>{if(s.value.enabled){const ee=H();if(Array.isArray(l.value)&&Array.isArray(ee)){const x=$(K,W,0)||$(K,W,1),z=kr(tr(le()),K,c.value(W));return Ka(l.value,b.value,z)&&!x}return!1}return!1},D=i.computed(()=>K=>$n(f.value,W=>{var ee;const x=Q(K,W.value),z=Qa(W.value,Gp(c.value(K),d.value.minDate),Jp(c.value(K),d.value.maxDate))||bE(d.value.disabledDates,c.value(K),W.value)||((ee=m.value.months)==null?void 0:ee.includes(W.value))||!wE(d.value.allowedDates,c.value(K),W.value),ie=M(W.value,K),we=nm(u.value,W.value,c.value(K));return{active:x,disabled:z,isBetween:ie,highlighted:we}})),I=(K,W)=>kr(tr(le()),K,c.value(W)),U=(K,W)=>{const ee=l.value?l.value:tr(new Date);l.value=kr(ee,K,c.value(W)),t("auto-apply"),t("update-flow-step")},B=(K,W)=>{const ee=I(K,W);s.value.fixedEnd||s.value.fixedStart?l.value=cm(ee,l,t,s):l.value?w(ee,l.value)&&(l.value=wu(l,I(K,W),t)):l.value=[I(K,W)],i.nextTick().then(()=>{Gi(l.value,t,e.autoApply,e.modelAuto)})},Y=(K,W)=>{bu(I(K,W),l,v.value.limit),t("auto-apply",!0)},q=(K,W)=>(y.value[W].month=K,L(W,y.value[W].year,K),v.value.enabled?Y(K,W):s.value.enabled?B(K,W):U(K,W)),ne=(K,W)=>{_(K,W),L(W,K,null)},L=(K,W,ee)=>{let x=ee;if(!x&&x!==0){const z=H();x=Array.isArray(z)?z[K].month:z.month}t("update-month-year",{instance:K,year:W,month:x})};return{groupedMonths:D,groupedYears:S,year:c,isDisabled:k,defaultedMultiCalendars:r,defaultedAriaLabels:n,defaultedTransitions:a,defaultedConfig:o,showYearPicker:R,modelValue:l,presetDate:(K,W)=>{um({value:K,modelValue:l,range:s.value.enabled,timezone:W?void 0:p.value.timezone}),t("auto-apply")},setHoverDate:(K,W)=>{b.value=I(K,W)},selectMonth:q,selectYear:ne,toggleYearPicker:O,handleYearSelect:P,handleYear:C,getModelMonthYear:H}},JE=i.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...rr},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:r}){const n=r,a=i.useSlots(),o=Bt(a,"yearMode"),s=e;i.onMounted(()=>{s.shadow||n("mount",null)});const{groupedMonths:u,groupedYears:d,year:p,isDisabled:m,defaultedMultiCalendars:v,defaultedConfig:h,showYearPicker:l,modelValue:c,presetDate:g,setHoverDate:y,selectMonth:f,selectYear:b,toggleYearPicker:w,handleYearSelect:_,handleYear:S,getModelMonthYear:R}=GE(s,n);return t({getSidebarProps:()=>({modelValue:c,year:p,getModelMonthYear:R,selectMonth:f,selectYear:b,handleYear:S}),presetDate:g,toggleYearPicker:O=>w(0,O)}),(O,P)=>(i.openBlock(),i.createBlock(Ki,{"multi-calendars":i.unref(v).count,collapse:O.collapse,stretch:"","is-mobile":O.isMobile},{default:i.withCtx(({instance:C})=>[O.$slots["top-extra"]?i.renderSlot(O.$slots,"top-extra",{key:0,value:O.internalModelValue}):i.createCommentVNode("",!0),O.$slots["month-year"]?i.renderSlot(O.$slots,"month-year",i.normalizeProps(i.mergeProps({key:1},{year:i.unref(p),months:i.unref(u)(C),years:i.unref(d)(C),selectMonth:i.unref(f),selectYear:i.unref(b),instance:C}))):(i.openBlock(),i.createBlock(Ja,{key:2,items:i.unref(u)(C),"arrow-navigation":O.arrowNavigation,"is-last":O.autoApply&&!i.unref(h).keepActionRow,"esc-close":O.escClose,height:i.unref(h).modeHeight,config:O.config,"no-overlay-focus":!!(O.noOverlayFocus||O.textInput),"use-relative":"",type:"month",onSelected:k=>i.unref(f)(k,C),onHoverValue:k=>i.unref(y)(k,C)},i.createSlots({header:i.withCtx(()=>[i.createVNode(lm,i.mergeProps(O.$props,{items:i.unref(d)(C),instance:C,"show-year-picker":i.unref(l)[C],year:i.unref(p)(C),"is-disabled":k=>i.unref(m)(C,k),onHandleYear:k=>i.unref(S)(C,k),onYearSelect:k=>i.unref(_)(k,C),onToggleYearPicker:k=>i.unref(w)(C,k?.flow,k?.show)}),i.createSlots({_:2},[i.renderList(i.unref(o),(k,A)=>({name:k,fn:i.withCtx(H=>[i.renderSlot(O.$slots,k,i.normalizeProps(i.guardReactiveProps(H)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[O.$slots["month-overlay-value"]?{name:"item",fn:i.withCtx(({item:k})=>[i.renderSlot(O.$slots,"month-overlay-value",{text:k.text,value:k.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),XE=(e,t)=>{const r=()=>{e.isTextInputDate&&(m.value=je(le(e.startDate)))},{modelValue:n}=ei(e,t,r),a=i.ref(null),{defaultedHighlight:o,defaultedMultiDates:s,defaultedFilters:u,defaultedRange:d,propDates:p}=tt(e),m=i.ref();i.onMounted(()=>{e.startDate&&(n.value&&e.focusStartDate||!n.value)&&(m.value=je(le(e.startDate)))});const v=f=>Array.isArray(n.value)?n.value.some(b=>je(b)===f):n.value?je(n.value)===f:!1,h=f=>d.value.enabled&&Array.isArray(n.value)?Ka(n.value,a.value,y(f)):!1,l=f=>p.value.allowedDates instanceof Map?p.value.allowedDates.size?p.value.allowedDates.has(`${f}`):!1:!0,c=f=>p.value.disabledDates instanceof Map?p.value.disabledDates.size?p.value.disabledDates.has(`${f}`):!1:!0,g=i.computed(()=>$n(ru(e.yearRange,e.locale,e.reverseYears),f=>{const b=v(f.value),w=Qa(f.value,Dn(p.value.minDate),Dn(p.value.maxDate))||u.value.years.includes(f.value)||!l(f.value)||c(f.value),_=h(f.value)&&!b,S=fu(o.value,f.value);return{active:b,disabled:w,isBetween:_,highlighted:S}})),y=f=>yr(tr(Wa(new Date)),f);return{groupedYears:g,modelValue:n,focusYear:m,setHoverValue:f=>{a.value=yr(tr(new Date),f)},selectYear:f=>{var b;if(t("update-month-year",{instance:0,year:f}),s.value.enabled)return n.value?Array.isArray(n.value)&&(((b=n.value)==null?void 0:b.map(w=>je(w))).includes(f)?n.value=n.value.filter(w=>je(w)!==f):n.value.push(yr(bt(le()),f))):n.value=[yr(bt(Wa(le())),f)],t("auto-apply",!0);d.value.enabled?(n.value=wu(n,y(f),t),i.nextTick().then(()=>{Gi(n.value,t,e.autoApply,e.modelAuto)})):(n.value=y(f),t("auto-apply"))}}},ZE=i.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...rr},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:r}){const n=r,a=e,{groupedYears:o,modelValue:s,focusYear:u,selectYear:d,setHoverValue:p}=XE(a,n),{defaultedConfig:m}=tt(a);return t({getSidebarProps:()=>({modelValue:s,selectYear:d})}),(v,h)=>(i.openBlock(),i.createElementBlock("div",null,[v.$slots["top-extra"]?i.renderSlot(v.$slots,"top-extra",{key:0,value:v.internalModelValue}):i.createCommentVNode("",!0),v.$slots["month-year"]?i.renderSlot(v.$slots,"month-year",i.normalizeProps(i.mergeProps({key:1},{years:i.unref(o),selectYear:i.unref(d)}))):(i.openBlock(),i.createBlock(Ja,{key:2,items:i.unref(o),"is-last":v.autoApply&&!i.unref(m).keepActionRow,height:i.unref(m).modeHeight,config:v.config,"no-overlay-focus":!!(v.noOverlayFocus||v.textInput),"focus-value":i.unref(u),type:"year","use-relative":"",onSelected:i.unref(d),onHoverValue:i.unref(p)},i.createSlots({_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:i.withCtx(({item:l})=>[i.renderSlot(v.$slots,"year-overlay-value",{text:l.text,value:l.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),eC={key:0,class:"dp__time_input"},tC=["data-compact","data-collapsed"],rC=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],nC=["aria-label","disabled","data-test-id","onKeydown","onClick"],aC=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],iC={key:0},oC=["aria-label","data-compact"],sC=i.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...rr},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:r}){const n=r,a=e,{setTimePickerElements:o,setTimePickerBackRef:s}=qr(),{defaultedAriaLabels:u,defaultedTransitions:d,defaultedFilters:p,defaultedConfig:m,defaultedRange:v,defaultedMultiCalendars:h}=tt(a),{transitionName:l,showTransition:c}=Za(d),g=i.reactive({hours:!1,minutes:!1,seconds:!1}),y=i.ref("AM"),f=i.ref(null),b=i.ref([]),w=i.ref(),_=i.ref(!1);i.onMounted(()=>{n("mounted")});const S=N=>Ke(new Date,{hours:N.hours,minutes:N.minutes,seconds:a.enableSeconds?N.seconds:0,milliseconds:0}),R=i.computed(()=>N=>B(N,a[N])||P(N,a[N])),O=i.computed(()=>({hours:a.hours,minutes:a.minutes,seconds:a.seconds})),P=(N,ue)=>v.value.enabled&&!v.value.disableTimeRangeValidation?!a.validateTime(N,ue):!1,C=(N,ue)=>{if(v.value.enabled&&!v.value.disableTimeRangeValidation){const de=ue?+a[`${N}Increment`]:-+a[`${N}Increment`],he=a[N]+de;return!a.validateTime(N,he)}return!1},k=i.computed(()=>N=>!K(+a[N]+ +a[`${N}Increment`],N)||C(N,!0)),A=i.computed(()=>N=>!K(+a[N]-+a[`${N}Increment`],N)||C(N,!1)),H=(N,ue)=>up(Ke(le(),N),ue),Q=(N,ue)=>ZO(Ke(le(),N),ue),$=i.computed(()=>({dp__time_col:!0,dp__time_col_block:!a.timePickerInline,dp__time_col_reg_block:!a.enableSeconds&&a.is24&&!a.timePickerInline,dp__time_col_reg_inline:!a.enableSeconds&&a.is24&&a.timePickerInline,dp__time_col_reg_with_button:!a.enableSeconds&&!a.is24,dp__time_col_sec:a.enableSeconds&&a.is24,dp__time_col_sec_with_button:a.enableSeconds&&!a.is24})),M=i.computed(()=>a.timePickerInline&&v.value.enabled&&!h.value.count),D=i.computed(()=>{const N=[{type:"hours"}];return a.enableMinutes&&N.push({type:"",separator:!0},{type:"minutes"}),a.enableSeconds&&N.push({type:"",separator:!0},{type:"seconds"}),N}),I=i.computed(()=>D.value.filter(N=>!N.separator)),U=i.computed(()=>N=>{if(N==="hours"){const ue=we(+a.hours);return{text:ue<10?`0${ue}`:`${ue}`,value:ue}}return{text:a[N]<10?`0${a[N]}`:`${a[N]}`,value:a[N]}}),B=(N,ue)=>{var de;if(!a.disabledTimesConfig)return!1;const he=a.disabledTimesConfig(a.order,N==="hours"?ue:void 0);return he[N]?!!((de=he[N])!=null&&de.includes(ue)):!0},Y=(N,ue)=>ue!=="hours"||y.value==="AM"?N:N+12,q=N=>{const ue=a.is24?24:12,de=N==="hours"?ue:60,he=+a[`${N}GridIncrement`],De=N==="hours"&&!a.is24?he:0,$e=[];for(let Ue=De;Ue<de;Ue+=he)$e.push({value:a.is24?Ue:Y(Ue,N),text:Ue<10?`0${Ue}`:`${Ue}`});return N==="hours"&&!a.is24&&$e.unshift({value:y.value==="PM"?12:0,text:"12"}),$n($e,Ue=>({active:!1,disabled:p.value.times[N].includes(Ue.value)||!K(Ue.value,N)||B(N,Ue.value)||P(N,Ue.value)}))},ne=N=>N>=0?N:59,L=N=>N>=0?N:23,K=(N,ue)=>{const de=a.minTime?S(su(a.minTime)):null,he=a.maxTime?S(su(a.maxTime)):null,De=S(su(O.value,ue,ue==="minutes"||ue==="seconds"?ne(N):L(N)));return de&&he?(xn(De,he)||Tn(De,he))&&(tn(De,de)||Tn(De,de)):de?tn(De,de)||Tn(De,de):he?xn(De,he)||Tn(De,he):!0},W=N=>a[`no${N[0].toUpperCase()+N.slice(1)}Overlay`],ee=N=>{W(N)||(g[N]=!g[N],g[N]?(_.value=!0,n("overlay-opened",N)):(_.value=!1,n("overlay-closed",N)))},x=N=>N==="hours"?xr:N==="minutes"?Lr:Cn,z=()=>{w.value&&clearTimeout(w.value)},ie=(N,ue=!0,de)=>{const he=ue?H:Q,De=ue?+a[`${N}Increment`]:-+a[`${N}Increment`];K(+a[N]+De,N)&&n(`update:${N}`,x(N)(he({[N]:+a[N]},{[N]:+a[`${N}Increment`]}))),!(de!=null&&de.keyboard)&&m.value.timeArrowHoldThreshold&&(w.value=setTimeout(()=>{ie(N,ue)},m.value.timeArrowHoldThreshold))},we=N=>a.is24?N:(N>=12?y.value="PM":y.value="AM",oE(N)),Z=()=>{y.value==="PM"?(y.value="AM",n("update:hours",a.hours-12)):(y.value="PM",n("update:hours",a.hours+12)),n("am-pm-change",y.value)},be=N=>{g[N]=!0},se=(N,ue,de)=>{if(N&&a.arrowNavigation){Array.isArray(b.value[ue])?b.value[ue][de]=N:b.value[ue]=[N];const he=b.value.reduce((De,$e)=>$e.map((Ue,at)=>[...De[at]||[],$e[at]]),[]);s(a.closeTimePickerBtn),f.value&&(he[1]=he[1].concat(f.value)),o(he,a.order)}},ce=(N,ue)=>(ee(N),n(`update:${N}`,ue));return t({openChildCmp:be}),(N,ue)=>{var de;return N.disabled?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",eC,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(D.value,(he,De)=>{var $e,Ue,at;return i.openBlock(),i.createElementBlock("div",{key:De,class:i.normalizeClass($.value),"data-compact":M.value&&!N.enableSeconds,"data-collapsed":M.value&&N.enableSeconds},[he.separator?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[_.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(":")],64))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("button",{ref_for:!0,ref:te=>se(te,De,0),type:"button",class:i.normalizeClass({dp__btn:!0,dp__inc_dec_button:!N.timePickerInline,dp__inc_dec_button_inline:N.timePickerInline,dp__tp_inline_btn_top:N.timePickerInline,dp__inc_dec_button_disabled:k.value(he.type),"dp--hidden-el":_.value}),"data-test-id":`${he.type}-time-inc-btn-${a.order}`,"aria-label":($e=i.unref(u))==null?void 0:$e.incrementValue(he.type),tabindex:"0",onKeydown:te=>i.unref(jt)(te,()=>ie(he.type,!0,{keyboard:!0}),!0),onClick:te=>i.unref(m).timeArrowHoldThreshold?void 0:ie(he.type,!0),onMousedown:te=>i.unref(m).timeArrowHoldThreshold?ie(he.type,!0):void 0,onMouseup:z},[a.timePickerInline?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[N.$slots["tp-inline-arrow-up"]?i.renderSlot(N.$slots,"tp-inline-arrow-up",{key:0}):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[ue[2]||(ue[2]=i.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ue[3]||(ue[3]=i.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[N.$slots["arrow-up"]?i.renderSlot(N.$slots,"arrow-up",{key:0}):i.createCommentVNode("",!0),N.$slots["arrow-up"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xl),{key:1}))],64))],42,rC),i.createElementVNode("button",{ref_for:!0,ref:te=>se(te,De,1),type:"button","aria-label":`${U.value(he.type).text}-${(Ue=i.unref(u))==null?void 0:Ue.openTpOverlay(he.type)}`,class:i.normalizeClass({dp__time_display:!0,dp__time_display_block:!N.timePickerInline,dp__time_display_inline:N.timePickerInline,"dp--time-invalid":R.value(he.type),"dp--time-overlay-btn":!R.value(he.type),"dp--hidden-el":_.value}),disabled:W(he.type),tabindex:"0","data-test-id":`${he.type}-toggle-overlay-btn-${a.order}`,onKeydown:te=>i.unref(jt)(te,()=>ee(he.type),!0),onClick:te=>ee(he.type)},[N.$slots[he.type]?i.renderSlot(N.$slots,he.type,{key:0,text:U.value(he.type).text,value:U.value(he.type).value}):i.createCommentVNode("",!0),N.$slots[he.type]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(U.value(he.type).text),1)],64))],42,nC),i.createElementVNode("button",{ref_for:!0,ref:te=>se(te,De,2),type:"button",class:i.normalizeClass({dp__btn:!0,dp__inc_dec_button:!N.timePickerInline,dp__inc_dec_button_inline:N.timePickerInline,dp__tp_inline_btn_bottom:N.timePickerInline,dp__inc_dec_button_disabled:A.value(he.type),"dp--hidden-el":_.value}),"data-test-id":`${he.type}-time-dec-btn-${a.order}`,"aria-label":(at=i.unref(u))==null?void 0:at.decrementValue(he.type),tabindex:"0",onKeydown:te=>i.unref(jt)(te,()=>ie(he.type,!1,{keyboard:!0}),!0),onClick:te=>i.unref(m).timeArrowHoldThreshold?void 0:ie(he.type,!1),onMousedown:te=>i.unref(m).timeArrowHoldThreshold?ie(he.type,!1):void 0,onMouseup:z},[a.timePickerInline?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[N.$slots["tp-inline-arrow-down"]?i.renderSlot(N.$slots,"tp-inline-arrow-down",{key:0}):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[ue[4]||(ue[4]=i.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ue[5]||(ue[5]=i.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[N.$slots["arrow-down"]?i.renderSlot(N.$slots,"arrow-down",{key:0}):i.createCommentVNode("",!0),N.$slots["arrow-down"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Zl),{key:1}))],64))],42,aC)],64))],10,tC)}),128)),N.is24?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",iC,[N.$slots["am-pm-button"]?i.renderSlot(N.$slots,"am-pm-button",{key:0,toggle:Z,value:y.value}):i.createCommentVNode("",!0),N.$slots["am-pm-button"]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:f,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(de=i.unref(u))==null?void 0:de.amPmButton,tabindex:"0","data-compact":M.value,onClick:Z,onKeydown:ue[0]||(ue[0]=he=>i.unref(jt)(he,()=>Z(),!0))},i.toDisplayString(y.value),41,oC))])),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,(he,De)=>(i.openBlock(),i.createBlock(i.Transition,{key:De,name:i.unref(l)(g[he.type]),css:i.unref(c)},{default:i.withCtx(()=>{var $e,Ue;return[g[he.type]?(i.openBlock(),i.createBlock(Ja,{key:0,items:q(he.type),"is-last":N.autoApply&&!i.unref(m).keepActionRow,"esc-close":N.escClose,type:he.type,"text-input":N.textInput,config:N.config,"arrow-navigation":N.arrowNavigation,"aria-labels":N.ariaLabels,"overlay-label":(Ue=($e=i.unref(u)).timeOverlay)==null?void 0:Ue.call($e,he.type),onSelected:at=>ce(he.type,at),onToggle:at=>ee(he.type),onResetFlow:ue[1]||(ue[1]=at=>N.$emit("reset-flow"))},i.createSlots({"button-icon":i.withCtx(()=>[N.$slots["clock-icon"]?i.renderSlot(N.$slots,"clock-icon",{key:0}):i.createCommentVNode("",!0),N.$slots["clock-icon"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(N.timePickerInline?i.unref(An):i.unref(Jl)),{key:1}))]),_:2},[N.$slots[`${he.type}-overlay-value`]?{name:"item",fn:i.withCtx(({item:at})=>[i.renderSlot(N.$slots,`${he.type}-overlay-value`,{text:at.text,value:at.value})]),key:"0"}:void 0,N.$slots[`${he.type}-overlay-header`]?{name:"header",fn:i.withCtx(()=>[i.renderSlot(N.$slots,`${he.type}-overlay-header`,{toggle:()=>ee(he.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):i.createCommentVNode("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),lC=["data-dp-mobile"],uC=["aria-label","tabindex"],cC=["role","aria-label","tabindex"],dC=["aria-label"],fm=i.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...rr},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:r}){const n=r,a=e,{buildMatrix:o,setTimePicker:s}=qr(),u=i.useSlots(),{defaultedTransitions:d,defaultedAriaLabels:p,defaultedTextInput:m,defaultedConfig:v,defaultedRange:h}=tt(a),{transitionName:l,showTransition:c}=Za(d),{hideNavigationButtons:g}=Ji(),y=i.ref(null),f=i.ref(null),b=i.ref([]),w=i.ref(null),_=i.ref(!1);i.onMounted(()=>{n("mount"),!a.timePicker&&a.arrowNavigation?o([ht(y.value)],"time"):s(!0,a.timePicker)});const S=i.computed(()=>h.value.enabled&&a.modelAuto?Vp(a.internalModelValue):!0),R=i.ref(!1),O=B=>({hours:Array.isArray(a.hours)?a.hours[B]:a.hours,minutes:Array.isArray(a.minutes)?a.minutes[B]:a.minutes,seconds:Array.isArray(a.seconds)?a.seconds[B]:a.seconds}),P=i.computed(()=>{const B=[];if(h.value.enabled)for(let Y=0;Y<2;Y++)B.push(O(Y));else B.push(O(0));return B}),C=(B,Y=!1,q="")=>{Y||n("reset-flow"),R.value=B,n(B?"overlay-opened":"overlay-closed",Et.time),a.arrowNavigation&&s(B),i.nextTick(()=>{q!==""&&b.value[0]&&b.value[0].openChildCmp(q)})},k=i.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:a.autoApply&&!v.value.keepActionRow})),A=Bt(u,"timePicker"),H=(B,Y,q)=>h.value.enabled?Y===0?[B,P.value[1][q]]:[P.value[0][q],B]:B,Q=B=>{n("update:hours",B)},$=B=>{n("update:minutes",B)},M=B=>{n("update:seconds",B)},D=()=>{if(w.value&&!m.value.enabled&&!a.noOverlayFocus){const B=Wp(w.value);B&&B.focus({preventScroll:!0})}},I=B=>{_.value=!1,n("overlay-closed",B)},U=B=>{_.value=!0,n("overlay-opened",B)};return t({toggleTimePicker:C}),(B,Y)=>{var q;return i.openBlock(),i.createElementBlock("div",{class:"dp--tp-wrap","data-dp-mobile":B.isMobile},[!B.timePicker&&!B.timePickerInline?i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:y,type:"button",class:i.normalizeClass({...k.value,"dp--hidden-el":R.value}),"aria-label":(q=i.unref(p))==null?void 0:q.openTimePicker,tabindex:B.noOverlayFocus?void 0:0,"data-test-id":"open-time-picker-btn",onKeydown:Y[0]||(Y[0]=ne=>i.unref(jt)(ne,()=>C(!0))),onClick:Y[1]||(Y[1]=ne=>C(!0))},[B.$slots["clock-icon"]?i.renderSlot(B.$slots,"clock-icon",{key:0}):i.createCommentVNode("",!0),B.$slots["clock-icon"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Jl),{key:1}))],42,uC)),[[i.vShow,!i.unref(g)(B.hideNavigation,"time")]]):i.createCommentVNode("",!0),i.createVNode(i.Transition,{name:i.unref(l)(R.value),css:i.unref(c)&&!B.timePickerInline},{default:i.withCtx(()=>{var ne,L;return[R.value||B.timePicker||B.timePickerInline?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:w,role:B.timePickerInline?void 0:"dialog",class:i.normalizeClass({dp__overlay:!B.timePickerInline,"dp--overlay-absolute":!a.timePicker&&!B.timePickerInline,"dp--overlay-relative":a.timePicker}),style:i.normalizeStyle(B.timePicker?{height:`${i.unref(v).modeHeight}px`}:void 0),"aria-label":(ne=i.unref(p))==null?void 0:ne.timePicker,tabindex:B.timePickerInline?void 0:0},[i.createElementVNode("div",{class:i.normalizeClass(B.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[B.$slots["time-picker-overlay"]?i.renderSlot(B.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:Q,setMinutes:$,setSeconds:M}):i.createCommentVNode("",!0),B.$slots["time-picker-overlay"]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(B.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(P.value,(K,W)=>i.withDirectives((i.openBlock(),i.createBlock(sC,i.mergeProps({key:W,ref_for:!0},{...B.$props,order:W,hours:K.hours,minutes:K.minutes,seconds:K.seconds,closeTimePickerBtn:f.value,disabledTimesConfig:e.disabledTimesConfig,disabled:W===0?i.unref(h).fixedStart:i.unref(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:b,"validate-time":(ee,x)=>e.validateTime(ee,H(x,W,ee)),"onUpdate:hours":ee=>Q(H(ee,W,"hours")),"onUpdate:minutes":ee=>$(H(ee,W,"minutes")),"onUpdate:seconds":ee=>M(H(ee,W,"seconds")),onMounted:D,onOverlayClosed:I,onOverlayOpened:U,onAmPmChange:Y[2]||(Y[2]=ee=>B.$emit("am-pm-change",ee))}),i.createSlots({_:2},[i.renderList(i.unref(A),(ee,x)=>({name:ee,fn:i.withCtx(z=>[i.renderSlot(B.$slots,ee,i.mergeProps({ref_for:!0},z))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[i.vShow,W===0?!0:S.value]])),128))],2)),!B.timePicker&&!B.timePickerInline?i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:f,type:"button",class:i.normalizeClass({...k.value,"dp--hidden-el":_.value}),"aria-label":(L=i.unref(p))==null?void 0:L.closeTimePicker,tabindex:"0",onKeydown:Y[3]||(Y[3]=K=>i.unref(jt)(K,()=>C(!1))),onClick:Y[4]||(Y[4]=K=>C(!1))},[B.$slots["calendar-icon"]?i.renderSlot(B.$slots,"calendar-icon",{key:0}):i.createCommentVNode("",!0),B.$slots["calendar-icon"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(An),{key:1}))],42,dC)),[[i.vShow,!i.unref(g)(B.hideNavigation,"time")]]):i.createCommentVNode("",!0)],2)],14,cC)):i.createCommentVNode("",!0)]}),_:3},8,["name","css"])],8,lC)}}}),hm=(e,t,r,n)=>{const{defaultedRange:a}=tt(e),o=(w,_)=>Array.isArray(t[w])?t[w][_]:t[w],s=w=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[w]:t.seconds:0,u=(w,_)=>w?_!==void 0?Hr(w,o("hours",_),o("minutes",_),s(_)):Hr(w,t.hours,t.minutes,s()):Ip(le(),s(_)),d=(w,_)=>{t[w]=_},p=i.computed(()=>e.modelAuto&&a.value.enabled?Array.isArray(r.value)?r.value.length>1:!1:a.value.enabled),m=(w,_)=>{const S=Object.fromEntries(Object.keys(t).map(R=>R===w?[R,_]:[R,t[R]].slice()));if(p.value&&!a.value.disableTimeRangeValidation){const R=P=>r.value?Hr(r.value[P],S.hours[P],S.minutes[P],S.seconds[P]):null,O=P=>Fp(r.value[P],0);return!(Me(R(0),R(1))&&(tn(R(0),O(1))||xn(R(1),O(0))))}return!0},v=(w,_)=>{m(w,_)&&(d(w,_),n&&n())},h=w=>{v("hours",w)},l=w=>{v("minutes",w)},c=w=>{v("seconds",w)},g=(w,_,S,R)=>{_&&h(w),!_&&!S&&l(w),S&&c(w),r.value&&R(r.value)},y=w=>{if(w){const _=Array.isArray(w),S=_?[+w[0].hours,+w[1].hours]:+w.hours,R=_?[+w[0].minutes,+w[1].minutes]:+w.minutes,O=_?[+w[0].seconds,+w[1].seconds]:+w.seconds;d("hours",S),d("minutes",R),e.enableSeconds&&d("seconds",O)}},f=(w,_)=>{const S={hours:Array.isArray(t.hours)?t.hours[w]:t.hours,disabledArr:[]};return(_||_===0)&&(S.hours=_),Array.isArray(e.disabledTimes)&&(S.disabledArr=a.value.enabled&&Array.isArray(e.disabledTimes[w])?e.disabledTimes[w]:e.disabledTimes),S},b=i.computed(()=>(w,_)=>{var S;if(Array.isArray(e.disabledTimes)){const{disabledArr:R,hours:O}=f(w,_),P=R.filter(C=>+C.hours===O);return((S=P[0])==null?void 0:S.minutes)==="*"?{hours:[O],minutes:void 0,seconds:void 0}:{hours:[],minutes:P?.map(C=>+C.minutes)??[],seconds:P?.map(C=>C.seconds?+C.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:d,updateHours:h,updateMinutes:l,updateSeconds:c,getSetDateTime:u,updateTimeValues:g,getSecondsValue:s,assignStartTime:y,validateTime:m,disabledTimesConfig:b}},fC=(e,t)=>{const r=()=>{e.isTextInputDate&&_()},{modelValue:n,time:a}=ei(e,t,r),{defaultedStartTime:o,defaultedRange:s,defaultedTz:u}=tt(e),{updateTimeValues:d,getSetDateTime:p,setTime:m,assignStartTime:v,disabledTimesConfig:h,validateTime:l}=hm(e,a,n,c);function c(){t("update-flow-step")}const g=R=>{const{hours:O,minutes:P,seconds:C}=R;return{hours:+O,minutes:+P,seconds:C?+C:0}},y=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const O=g(e.startTime[0]),P=g(e.startTime[1]);return[Ke(le(),O),Ke(le(),P)]}const R=g(e.startTime);return Ke(le(),R)}return s.value.enabled?[null,null]:null},f=()=>{if(s.value.enabled){const[R,O]=y();n.value=[Mt(p(R,0),u.value.timezone),Mt(p(O,1),u.value.timezone)]}else n.value=Mt(p(y()),u.value.timezone)},b=R=>Array.isArray(R)?[nn(le(R[0])),nn(le(R[1]))]:[nn(R??le())],w=(R,O,P)=>{m("hours",R),m("minutes",O),m("seconds",e.enableSeconds?P:0)},_=()=>{const[R,O]=b(n.value);return s.value.enabled?w([R.hours,O.hours],[R.minutes,O.minutes],[R.seconds,O.seconds]):w(R.hours,R.minutes,R.seconds)};i.onMounted(()=>{if(!e.shadow)return v(o.value),n.value?_():f()});const S=()=>{Array.isArray(n.value)?n.value=n.value.map((R,O)=>R&&p(R,O)):n.value=p(n.value),t("time-update")};return{modelValue:n,time:a,disabledTimesConfig:h,updateTime:(R,O=!0,P=!1)=>{d(R,O,P,S)},validateTime:l}},hC=i.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...rr},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:r}){const n=r,a=e,o=i.useSlots(),s=Bt(o,"timePicker"),u=i.ref(null),{time:d,modelValue:p,disabledTimesConfig:m,updateTime:v,validateTime:h}=fC(a,n);return i.onMounted(()=>{a.shadow||n("mount",null)}),t({getSidebarProps:()=>({modelValue:p,time:d,updateTime:v}),toggleTimePicker:(l,c=!1,g="")=>{var y;(y=u.value)==null||y.toggleTimePicker(l,c,g)}}),(l,c)=>(i.openBlock(),i.createBlock(Ki,{"multi-calendars":0,stretch:"","is-mobile":l.isMobile},{default:i.withCtx(()=>[i.createVNode(fm,i.mergeProps({ref_key:"tpRef",ref:u},l.$props,{hours:i.unref(d).hours,minutes:i.unref(d).minutes,seconds:i.unref(d).seconds,"internal-model-value":l.internalModelValue,"disabled-times-config":i.unref(m),"validate-time":i.unref(h),"onUpdate:hours":c[0]||(c[0]=g=>i.unref(v)(g)),"onUpdate:minutes":c[1]||(c[1]=g=>i.unref(v)(g,!1)),"onUpdate:seconds":c[2]||(c[2]=g=>i.unref(v)(g,!1,!0)),onAmPmChange:c[3]||(c[3]=g=>l.$emit("am-pm-change",g)),onResetFlow:c[4]||(c[4]=g=>l.$emit("reset-flow")),onOverlayClosed:c[5]||(c[5]=g=>l.$emit("overlay-toggle",{open:!1,overlay:g})),onOverlayOpened:c[6]||(c[6]=g=>l.$emit("overlay-toggle",{open:!0,overlay:g}))}),i.createSlots({_:2},[i.renderList(i.unref(s),(g,y)=>({name:g,fn:i.withCtx(f=>[i.renderSlot(l.$slots,g,i.normalizeProps(i.guardReactiveProps(f)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3},8,["is-mobile"]))}}),pC={class:"dp--header-wrap"},mC={key:0,class:"dp__month_year_wrap"},gC={key:0},yC={class:"dp__month_year_wrap"},vC=["data-dp-element","aria-label","data-test-id","onClick","onKeydown"],bC=i.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...rr},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:r}){const n=r,a=e,{defaultedTransitions:o,defaultedAriaLabels:s,defaultedMultiCalendars:u,defaultedFilters:d,defaultedConfig:p,defaultedHighlight:m,propDates:v,defaultedUI:h}=tt(a),{transitionName:l,showTransition:c}=Za(o),{buildMatrix:g}=qr(),{handleMonthYearChange:y,isDisabled:f,updateMonthYear:b}=LE(a,n),{showLeftIcon:w,showRightIcon:_}=Ji(),S=i.ref(!1),R=i.ref(!1),O=i.ref(!1),P=i.ref([null,null,null,null]);i.onMounted(()=>{n("mount")});const C=L=>({get:()=>a[L],set:K=>{const W=L===Zt.month?Zt.year:Zt.month;n("update-month-year",{[L]:K,[W]:a[W]}),L===Zt.month?I(!0):U(!0)}}),k=i.computed(C(Zt.month)),A=i.computed(C(Zt.year)),H=i.computed(()=>L=>({month:a.month,year:a.year,items:L===Zt.month?a.months:a.years,instance:a.instance,updateMonthYear:b,toggle:L===Zt.month?I:U})),Q=i.computed(()=>a.months.find(K=>K.value===a.month)||{text:"",value:0}),$=i.computed(()=>$n(a.months,L=>{const K=a.month===L.value,W=Qa(L.value,Gp(a.year,v.value.minDate),Jp(a.year,v.value.maxDate))||d.value.months.includes(L.value),ee=nm(m.value,L.value,a.year);return{active:K,disabled:W,highlighted:ee}})),M=i.computed(()=>$n(a.years,L=>{const K=a.year===L.value,W=Qa(L.value,Dn(v.value.minDate),Dn(v.value.maxDate))||d.value.years.includes(L.value),ee=fu(m.value,L.value);return{active:K,disabled:W,highlighted:ee}})),D=(L,K,W)=>{W!==void 0?L.value=W:L.value=!L.value,L.value?(O.value=!0,n("overlay-opened",K)):(O.value=!1,n("overlay-closed",K))},I=(L=!1,K)=>{B(L),D(S,Et.month,K)},U=(L=!1,K)=>{B(L),D(R,Et.year,K)},B=L=>{L||n("reset-flow")},Y=(L,K)=>{a.arrowNavigation&&(P.value[K]=ht(L),g(P.value,"monthYear"))},q=i.computed(()=>{var L,K,W,ee,x,z;return[{type:Zt.month,index:1,toggle:I,modelValue:k.value,updateModelValue:ie=>k.value=ie,text:Q.value.text,showSelectionGrid:S.value,items:$.value,ariaLabel:(L=s.value)==null?void 0:L.openMonthsOverlay,overlayLabel:((W=(K=s.value).monthPicker)==null?void 0:W.call(K,!0))??void 0},{type:Zt.year,index:2,toggle:U,modelValue:A.value,updateModelValue:ie=>A.value=ie,text:zp(a.year,a.locale),showSelectionGrid:R.value,items:M.value,ariaLabel:(ee=s.value)==null?void 0:ee.openYearsOverlay,overlayLabel:((z=(x=s.value).yearPicker)==null?void 0:z.call(x,!0))??void 0}]}),ne=i.computed(()=>a.disableYearSelect?[q.value[0]]:a.yearFirst?[...q.value].reverse():q.value);return t({toggleMonthPicker:I,toggleYearPicker:U,handleMonthYearChange:y}),(L,K)=>{var W,ee,x,z,ie,we;return i.openBlock(),i.createElementBlock("div",pC,[L.$slots["month-year"]?(i.openBlock(),i.createElementBlock("div",mC,[i.renderSlot(L.$slots,"month-year",i.normalizeProps(i.guardReactiveProps({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:i.unref(b),handleMonthYearChange:i.unref(y),instance:e.instance,isDisabled:i.unref(f)})))])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[L.$slots["top-extra"]?(i.openBlock(),i.createElementBlock("div",gC,[i.renderSlot(L.$slots,"top-extra",{value:L.internalModelValue})])):i.createCommentVNode("",!0),i.createElementVNode("div",yC,[i.unref(w)(i.unref(u),e.instance)&&!L.vertical?(i.openBlock(),i.createBlock(Xa,{key:0,"aria-label":(W=i.unref(s))==null?void 0:W.prevMonth,disabled:i.unref(f)(!1),class:i.normalizeClass((ee=i.unref(h))==null?void 0:ee.navBtnPrev),"el-name":"action-prev",onActivate:K[0]||(K[0]=Z=>i.unref(y)(!1,!0)),onSetRef:K[1]||(K[1]=Z=>Y(Z,0))},{default:i.withCtx(()=>[L.$slots["arrow-left"]?i.renderSlot(L.$slots,"arrow-left",{key:0}):i.createCommentVNode("",!0),L.$slots["arrow-left"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Kl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:L.disableYearSelect}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(ne.value,(Z,be)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:Z.type},[i.createElementVNode("button",{ref_for:!0,ref:se=>Y(se,be+1),type:"button","data-dp-element":`overlay-${Z.type}`,class:i.normalizeClass(["dp__btn dp__month_year_select",{"dp--hidden-el":O.value}]),"aria-label":`${Z.text}-${Z.ariaLabel}`,"data-test-id":`${Z.type}-toggle-overlay-${e.instance}`,onClick:Z.toggle,onKeydown:se=>i.unref(jt)(se,()=>Z.toggle(),!0)},[L.$slots[Z.type]?i.renderSlot(L.$slots,Z.type,{key:0,text:Z.text,value:a[Z.type]}):i.createCommentVNode("",!0),L.$slots[Z.type]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(Z.text),1)],64))],42,vC),i.createVNode(i.Transition,{name:i.unref(l)(Z.showSelectionGrid),css:i.unref(c)},{default:i.withCtx(()=>[Z.showSelectionGrid?(i.openBlock(),i.createBlock(Ja,{key:0,items:Z.items,"arrow-navigation":L.arrowNavigation,"hide-navigation":L.hideNavigation,"is-last":L.autoApply&&!i.unref(p).keepActionRow,"skip-button-ref":!1,config:L.config,type:Z.type,"header-refs":[],"esc-close":L.escClose,"menu-wrap-ref":L.menuWrapRef,"text-input":L.textInput,"aria-labels":L.ariaLabels,"overlay-label":Z.overlayLabel,onSelected:Z.updateModelValue,onToggle:Z.toggle},i.createSlots({"button-icon":i.withCtx(()=>[L.$slots["calendar-icon"]?i.renderSlot(L.$slots,"calendar-icon",{key:0}):i.createCommentVNode("",!0),L.$slots["calendar-icon"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(An),{key:1}))]),_:2},[L.$slots[`${Z.type}-overlay-value`]?{name:"item",fn:i.withCtx(({item:se})=>[i.renderSlot(L.$slots,`${Z.type}-overlay-value`,{text:se.text,value:se.value})]),key:"0"}:void 0,L.$slots[`${Z.type}-overlay`]?{name:"overlay",fn:i.withCtx(()=>[i.renderSlot(L.$slots,`${Z.type}-overlay`,i.mergeProps({ref_for:!0},H.value(Z.type)))]),key:"1"}:void 0,L.$slots[`${Z.type}-overlay-header`]?{name:"header",fn:i.withCtx(()=>[i.renderSlot(L.$slots,`${Z.type}-overlay-header`,{toggle:Z.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):i.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),i.unref(w)(i.unref(u),e.instance)&&L.vertical?(i.openBlock(),i.createBlock(Xa,{key:1,"aria-label":(x=i.unref(s))==null?void 0:x.prevMonth,"el-name":"action-prev",disabled:i.unref(f)(!1),class:i.normalizeClass((z=i.unref(h))==null?void 0:z.navBtnPrev),onActivate:K[2]||(K[2]=Z=>i.unref(y)(!1,!0))},{default:i.withCtx(()=>[L.$slots["arrow-up"]?i.renderSlot(L.$slots,"arrow-up",{key:0}):i.createCommentVNode("",!0),L.$slots["arrow-up"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xl),{key:1}))]),_:3},8,["aria-label","disabled","class"])):i.createCommentVNode("",!0),i.unref(_)(i.unref(u),e.instance)?(i.openBlock(),i.createBlock(Xa,{key:2,ref:"rightIcon","el-name":"action-next",disabled:i.unref(f)(!0),"aria-label":(ie=i.unref(s))==null?void 0:ie.nextMonth,class:i.normalizeClass((we=i.unref(h))==null?void 0:we.navBtnNext),onActivate:K[3]||(K[3]=Z=>i.unref(y)(!0,!0)),onSetRef:K[4]||(K[4]=Z=>Y(Z,L.disableYearSelect?2:3))},{default:i.withCtx(()=>[L.$slots[L.vertical?"arrow-down":"arrow-right"]?i.renderSlot(L.$slots,L.vertical?"arrow-down":"arrow-right",{key:0}):i.createCommentVNode("",!0),L.$slots[L.vertical?"arrow-down":"arrow-right"]?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(L.vertical?i.unref(Zl):i.unref(Gl)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):i.createCommentVNode("",!0)])],64))])}}}),wC={class:"dp__calendar_header",role:"row"},_C={key:0,class:"dp__calendar_header_item",role:"gridcell"},SC=["aria-label"],RC={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},PC={class:"dp__cell_inner"},OC=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test-id","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],EC=i.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...rr},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:r}){const n=r,a=e,{buildMultiLevelMatrix:o}=qr(),{defaultedTransitions:s,defaultedConfig:u,defaultedAriaLabels:d,defaultedMultiCalendars:p,defaultedWeekNumbers:m,defaultedMultiDates:v,defaultedUI:h}=tt(a),l=i.ref(null),c=i.ref({bottom:"",left:"",transform:""}),g=i.ref([]),y=i.ref(null),f=i.ref(!0),b=i.ref(""),w=i.ref({startX:0,endX:0,startY:0,endY:0}),_=i.ref([]),S=i.ref({left:"50%"}),R=i.ref(!1),O=i.computed(()=>a.calendar?a.calendar(a.mappedDates):a.mappedDates),P=i.computed(()=>a.dayNames?Array.isArray(a.dayNames)?a.dayNames:a.dayNames(a.locale,+a.weekStart):iE(a.formatLocale,a.locale,+a.weekStart));i.onMounted(()=>{n("mount",{cmp:"calendar",refs:g}),u.value.noSwipe||y.value&&(y.value.addEventListener("touchstart",Y,{passive:!1}),y.value.addEventListener("touchend",q,{passive:!1}),y.value.addEventListener("touchmove",ne,{passive:!1})),a.monthChangeOnScroll&&y.value&&y.value.addEventListener("wheel",W,{passive:!1})}),i.onUnmounted(()=>{u.value.noSwipe||y.value&&(y.value.removeEventListener("touchstart",Y),y.value.removeEventListener("touchend",q),y.value.removeEventListener("touchmove",ne)),a.monthChangeOnScroll&&y.value&&y.value.removeEventListener("wheel",W)});const C=Z=>Z?a.vertical?"vNext":"next":a.vertical?"vPrevious":"previous",k=(Z,be)=>{if(a.transitions){const se=bt(kr(le(),a.month,a.year));b.value=ct(bt(kr(le(),Z,be)),se)?s.value[C(!0)]:s.value[C(!1)],f.value=!1,i.nextTick(()=>{f.value=!0})}},A=i.computed(()=>({...h.value.calendar??{}})),H=i.computed(()=>Z=>{const be=sE(Z);return{dp__marker_dot:be.type==="dot",dp__marker_line:be.type==="line"}}),Q=i.computed(()=>Z=>Me(Z,l.value)),$=i.computed(()=>({dp__calendar:!0,dp__calendar_next:p.value.count>0&&a.instance!==0})),M=i.computed(()=>Z=>a.hideOffsetDates?Z.current:!0),D=async(Z,be)=>{const{width:se,height:ce}=Z.getBoundingClientRect();l.value=be.value;let N={left:`${se/2}px`},ue=-50;if(await i.nextTick(),_.value[0]){const{left:de,width:he}=_.value[0].getBoundingClientRect();de<0&&(N={left:"0"},ue=0,S.value.left=`${se/2}px`),window.innerWidth<de+he&&(N={right:"0"},ue=0,S.value.left=`${he-se/2}px`)}c.value={bottom:`${ce}px`,...N,transform:`translateX(${ue}%)`}},I=async(Z,be,se)=>{var ce,N,ue;const de=ht(g.value[be][se]);de&&((ce=Z.marker)!=null&&ce.customPosition&&(ue=(N=Z.marker)==null?void 0:N.tooltip)!=null&&ue.length?c.value=Z.marker.customPosition(de):await D(de,Z),n("tooltip-open",Z.marker))},U=async(Z,be,se)=>{var ce,N;if(R.value&&v.value.enabled&&v.value.dragSelect)return n("select-date",Z);if(n("set-hover-date",Z),(N=(ce=Z.marker)==null?void 0:ce.tooltip)!=null&&N.length){if(a.hideOffsetDates&&!Z.current)return;await I(Z,be,se)}},B=Z=>{l.value&&(l.value=null,c.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),n("tooltip-close",Z.marker))},Y=Z=>{w.value.startX=Z.changedTouches[0].screenX,w.value.startY=Z.changedTouches[0].screenY},q=Z=>{w.value.endX=Z.changedTouches[0].screenX,w.value.endY=Z.changedTouches[0].screenY,L()},ne=Z=>{a.vertical&&!a.inline&&Z.preventDefault()},L=()=>{const Z=a.vertical?"Y":"X";Math.abs(w.value[`start${Z}`]-w.value[`end${Z}`])>10&&n("handle-swipe",w.value[`start${Z}`]>w.value[`end${Z}`]?"right":"left")},K=(Z,be,se)=>{Z&&(Array.isArray(g.value[be])?g.value[be][se]=Z:g.value[be]=[Z]),a.arrowNavigation&&o(g.value,"calendar")},W=Z=>{a.monthChangeOnScroll&&(Z.preventDefault(),n("handle-scroll",Z))},ee=Z=>m.value.type==="local"?ql(Z.value,{weekStartsOn:+a.weekStart}):m.value.type==="iso"?Hl(Z.value):typeof m.value.type=="function"?m.value.type(Z.value):"",x=Z=>{const be=Z[0];return m.value.hideOnOffsetDates?Z.some(se=>se.current)?ee(be):"":ee(be)},z=(Z,be,se=!0)=>{!se&&fE()||(!v.value.enabled||u.value.allowPreventDefault)&&(Br(Z,u.value),n("select-date",be))},ie=Z=>{Br(Z,u.value)},we=Z=>{v.value.enabled&&v.value.dragSelect?(R.value=!0,n("select-date",Z)):v.value.enabled&&n("select-date",Z)};return t({triggerTransition:k}),(Z,be)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass($.value)},[i.createElementVNode("div",{ref_key:"calendarWrapRef",ref:y,class:i.normalizeClass(A.value),role:"grid"},[i.createElementVNode("div",wC,[Z.weekNumbers?(i.openBlock(),i.createElementBlock("div",_C,i.toDisplayString(Z.weekNumName),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(P.value,(se,ce)=>{var N,ue;return i.openBlock(),i.createElementBlock("div",{key:ce,class:"dp__calendar_header_item",role:"gridcell","data-test-id":"calendar-header","aria-label":(ue=(N=i.unref(d))==null?void 0:N.weekDay)==null?void 0:ue.call(N,ce)},[Z.$slots["calendar-header"]?i.renderSlot(Z.$slots,"calendar-header",{key:0,day:se,index:ce}):i.createCommentVNode("",!0),Z.$slots["calendar-header"]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(se),1)],64))],8,SC)}),128))]),be[2]||(be[2]=i.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1)),i.createVNode(i.Transition,{name:b.value,css:!!Z.transitions},{default:i.withCtx(()=>[f.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:be[1]||(be[1]=se=>R.value=!1)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(se,ce)=>(i.openBlock(),i.createElementBlock("div",{key:ce,class:"dp__calendar_row",role:"row"},[Z.weekNumbers?(i.openBlock(),i.createElementBlock("div",RC,[i.createElementVNode("div",PC,i.toDisplayString(x(se.days)),1)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.days,(N,ue)=>{var de,he,De;return i.openBlock(),i.createElementBlock("div",{id:i.unref(hu)(N.value),ref_for:!0,ref:$e=>K($e,ce,ue),key:ue+ce,role:"gridcell",class:"dp__calendar_item","aria-pressed":(N.classData.dp__active_date||N.classData.dp__range_start||N.classData.dp__range_start)??void 0,"aria-disabled":N.classData.dp__cell_disabled||void 0,"aria-label":(he=(de=i.unref(d))==null?void 0:de.day)==null?void 0:he.call(de,N),tabindex:!N.current&&Z.hideOffsetDates?void 0:0,"data-test-id":i.unref(hu)(N.value),onClick:i.withModifiers($e=>z($e,N),["prevent"]),onTouchend:$e=>z($e,N,!1),onKeydown:$e=>i.unref(jt)($e,()=>Z.$emit("select-date",N)),onMouseenter:$e=>U(N,ce,ue),onMouseleave:$e=>B(N),onMousedown:$e=>we(N),onMouseup:be[0]||(be[0]=$e=>R.value=!1)},[i.createElementVNode("div",{class:i.normalizeClass(["dp__cell_inner",N.classData])},[Z.$slots.day&&M.value(N)?i.renderSlot(Z.$slots,"day",{key:0,day:+N.text,date:N.value}):i.createCommentVNode("",!0),Z.$slots.day?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(N.text),1)],64)),N.marker&&M.value(N)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[Z.$slots.marker?i.renderSlot(Z.$slots,"marker",{key:0,marker:N.marker,day:+N.text,date:N.value}):(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(H.value(N.marker)),style:i.normalizeStyle(N.marker.color?{backgroundColor:N.marker.color}:{})},null,6))],64)):i.createCommentVNode("",!0),Q.value(N.value)?(i.openBlock(),i.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:_,class:"dp__marker_tooltip",style:i.normalizeStyle(c.value)},[(De=N.marker)!=null&&De.tooltip?(i.openBlock(),i.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:ie},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(N.marker.tooltip,($e,Ue)=>(i.openBlock(),i.createElementBlock("div",{key:Ue,class:"dp__tooltip_text"},[Z.$slots["marker-tooltip"]?i.renderSlot(Z.$slots,"marker-tooltip",{key:0,tooltip:$e,day:N.value}):i.createCommentVNode("",!0),Z.$slots["marker-tooltip"]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",{class:"dp__tooltip_mark",style:i.normalizeStyle($e.color?{backgroundColor:$e.color}:{})},null,4),i.createElementVNode("div",null,i.toDisplayString($e.text),1)],64))]))),128)),i.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:i.normalizeStyle(S.value)},null,4)])):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0)],2)],40,OC)}),128))]))),128))],32)):i.createCommentVNode("",!0)]),_:3},8,["name","css"])],2)],2))}}),pm=e=>Array.isArray(e),CC=(e,t,r,n)=>{const a=i.ref([]),o=i.ref(new Date),s=i.ref(),u=()=>q(e.isTextInputDate),{modelValue:d,calendars:p,time:m,today:v}=ei(e,t,u),{defaultedMultiCalendars:h,defaultedStartTime:l,defaultedRange:c,defaultedConfig:g,defaultedTz:y,propDates:f,defaultedMultiDates:b}=tt(e),{validateMonthYearInRange:w,isDisabled:_,isDateRangeAllowed:S,checkMinMaxRange:R}=Wr(e),{updateTimeValues:O,getSetDateTime:P,setTime:C,assignStartTime:k,validateTime:A,disabledTimesConfig:H}=hm(e,m,d,n),Q=i.computed(()=>re=>p.value[re]?p.value[re].month:0),$=i.computed(()=>re=>p.value[re]?p.value[re].year:0),M=re=>!g.value.keepViewOnOffsetClick||re?!0:!s.value,D=(re,fe,Ee,Ne=!1)=>{var ae,ve;M(Ne)&&(p.value[re]||(p.value[re]={month:0,year:0}),p.value[re].month=Up(fe)?(ae=p.value[re])==null?void 0:ae.month:fe,p.value[re].year=Up(Ee)?(ve=p.value[re])==null?void 0:ve.year:Ee)},I=()=>{e.autoApply&&t("select-date")},U=()=>{l.value&&k(l.value)};i.onMounted(()=>{e.shadow||(d.value||(be(),U()),q(!0),e.focusStartDate&&e.startDate&&be())});const B=i.computed(()=>{var re;return(re=e.flow)!=null&&re.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),Y=()=>{e.autoApply&&B.value&&t("auto-apply",e.partialFlow?e.flowStep!==e.flow.length:!1)},q=(re=!1)=>{if(d.value)return Array.isArray(d.value)?(a.value=d.value,z(re)):K(d.value,re);if(h.value.count&&re&&!e.startDate)return L(le(),re)},ne=()=>Array.isArray(d.value)&&c.value.enabled?Ie(d.value[0])===Ie(d.value[1]??d.value[0]):!1,L=(re=new Date,fe=!1)=>{if((!h.value.count||!h.value.static||fe)&&D(0,Ie(re),je(re)),h.value.count&&(!d.value||ne()||!h.value.solo)&&(!h.value.solo||fe))for(let Ee=1;Ee<h.value.count;Ee++){const Ne=Ke(le(),{month:Q.value(Ee-1),year:$.value(Ee-1)}),ae=up(Ne,{months:1});p.value[Ee]={month:Ie(ae),year:je(ae)}}},K=(re,fe)=>{L(re),C("hours",xr(re)),C("minutes",Lr(re)),C("seconds",Cn(re)),h.value.count&&fe&&Z()},W=re=>{if(h.value.count){if(h.value.solo)return 0;const fe=Ie(re[0]),Ee=Ie(re[1]);return Math.abs(Ee-fe)<h.value.count?0:1}return 1},ee=(re,fe)=>{re[1]&&c.value.showLastInRange?L(re[W(re)],fe):L(re[0],fe);const Ee=(Ne,ae)=>[Ne(re[0]),re[1]?Ne(re[1]):m[ae][1]];C("hours",Ee(xr,"hours")),C("minutes",Ee(Lr,"minutes")),C("seconds",Ee(Cn,"seconds"))},x=(re,fe)=>{if((c.value.enabled||e.weekPicker)&&!b.value.enabled)return ee(re,fe);if(b.value.enabled&&fe){const Ee=re[re.length-1];return K(Ee,fe)}},z=re=>{const fe=d.value;x(fe,re),h.value.count&&h.value.solo&&Z()},ie=(re,fe)=>{const Ee=Ke(le(),{month:Q.value(fe),year:$.value(fe)}),Ne=re<0?Jt(Ee,1):kn(Ee,1);w(Ie(Ne),je(Ne),re<0,e.preventMinMaxNavigation)&&(D(fe,Ie(Ne),je(Ne)),t("update-month-year",{instance:fe,month:Ie(Ne),year:je(Ne)}),h.value.count&&!h.value.solo&&we(fe),r())},we=re=>{for(let fe=re-1;fe>=0;fe--){const Ee=kn(Ke(le(),{month:Q.value(fe+1),year:$.value(fe+1)}),1);D(fe,Ie(Ee),je(Ee))}for(let fe=re+1;fe<=h.value.count-1;fe++){const Ee=Jt(Ke(le(),{month:Q.value(fe-1),year:$.value(fe-1)}),1);D(fe,Ie(Ee),je(Ee))}},Z=()=>{if(Array.isArray(d.value)&&d.value.length===2){const re=le(le(d.value[1]?d.value[1]:Jt(d.value[0],1))),[fe,Ee]=[Ie(d.value[0]),je(d.value[0])],[Ne,ae]=[Ie(d.value[1]),je(d.value[1])];(fe!==Ne||fe===Ne&&Ee!==ae)&&h.value.solo&&D(1,Ie(re),je(re))}else d.value&&!Array.isArray(d.value)&&(D(0,Ie(d.value),je(d.value)),L(le()))},be=()=>{e.startDate&&(D(0,Ie(le(e.startDate)),je(le(e.startDate))),h.value.count&&we(0))},se=(re,fe)=>{if(e.monthChangeOnScroll){const Ee=new Date().getTime()-o.value.getTime(),Ne=Math.abs(re.deltaY);let ae=500;Ne>1&&(ae=100),Ne>100&&(ae=0),Ee>ae&&(o.value=new Date,ie(e.monthChangeOnScroll!=="inverse"?-re.deltaY:re.deltaY,fe))}},ce=(re,fe,Ee=!1)=>{e.monthChangeOnArrows&&e.vertical===Ee&&N(re,fe)},N=(re,fe)=>{ie(re==="right"?-1:1,fe)},ue=re=>{if(f.value.markers)return Wi(re.value,f.value.markers)},de=(re,fe)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[re==0,!0];case"fair":return[re==0||fe>re,!0];case"append":return[!1,!1];default:return[!1,!1]}},he=(re,fe,Ee,Ne)=>{if(e.sixWeeks&&re.length<6){const ae=6-re.length,ve=(fe.getDay()+7-Ne)%7,Re=6-(Ee.getDay()+7-Ne)%7,[ar,Qt]=de(ve,Re);for(let Ar=1;Ar<=ae;Ar++)if(Qt?!!(Ar%2)==ar:ar){const br=re[0].days[0],ln=De(zt(br.value,-7),Ie(fe));re.unshift({days:ln})}else{const br=re[re.length-1],ln=br.days[br.days.length-1],yi=De(zt(ln.value,1),Ie(fe));re.push({days:yi})}}return re},De=(re,fe)=>{const Ee=le(re),Ne=[];for(let ae=0;ae<7;ae++){const ve=zt(Ee,ae),Re=Ie(ve)!==fe;Ne.push({text:e.hideOffsetDates&&Re?"":ve.getDate(),value:ve,current:!Re,classData:{}})}return Ne},$e=(re,fe)=>{const Ee=[],Ne=new Date(fe,re),ae=new Date(fe,re+1,0),ve=e.weekStart,Re=Xt(Ne,{weekStartsOn:ve}),ar=Qt=>{const Ar=De(Qt,re);if(Ee.push({days:Ar}),!Ee[Ee.length-1].days.some(br=>Me(bt(br.value),bt(ae)))){const br=zt(Qt,7);ar(br)}};return ar(Re),he(Ee,Ne,ae,ve)},Ue=re=>{const fe=Hr(le(re.value),m.hours,m.minutes,Se());t("date-update",fe),b.value.enabled?bu(fe,d,b.value.limit):d.value=fe,n(),i.nextTick().then(()=>{Y()})},at=re=>c.value.noDisabledRange?Xp(a.value[0],re).some(fe=>_(fe)):!1,te=()=>{a.value=d.value?d.value.slice():[],a.value.length===2&&!(c.value.fixedStart||c.value.fixedEnd)&&(a.value=[])},ye=(re,fe)=>{const Ee=[le(re.value),zt(le(re.value),+c.value.autoRange)];S(Ee)?(fe&&He(re.value),a.value=Ee):t("invalid-date",re.value)},He=re=>{const fe=Ie(le(re)),Ee=je(le(re));if(D(0,fe,Ee),h.value.count>0)for(let Ne=1;Ne<h.value.count;Ne++){const ae=mE(Ke(le(re),{year:$.value(Ne-1),month:Q.value(Ne-1)}));D(Ne,ae.month,ae.year)}},X=re=>{if(at(re.value)||!R(re.value,d.value,c.value.fixedStart?0:1))return t("invalid-date",re.value);a.value=cm(le(re.value),d,t,c)},Ce=(re,fe)=>{if(te(),c.value.autoRange)return ye(re,fe);if(c.value.fixedStart||c.value.fixedEnd)return X(re);a.value[0]?R(le(re.value),d.value)&&!at(re.value)?st(le(re.value),le(a.value[0]))?(a.value.unshift(le(re.value)),t("range-end",a.value[0])):(a.value[1]=le(re.value),t("range-end",a.value[1])):(e.autoApply&&t("auto-apply-invalid",re.value),t("invalid-date",re.value)):(a.value[0]=le(re.value),t("range-start",a.value[0]))},Se=(re=!0)=>e.enableSeconds?Array.isArray(m.seconds)?re?m.seconds[0]:m.seconds[1]:m.seconds:0,ft=re=>{a.value[re]=Hr(a.value[re],m.hours[re],m.minutes[re],Se(re!==1))},Yt=()=>{var re,fe;a.value[0]&&a.value[1]&&+((re=a.value)==null?void 0:re[0])>+((fe=a.value)==null?void 0:fe[1])&&(a.value.reverse(),t("range-start",a.value[0]),t("range-end",a.value[1]))},on=()=>{a.value.length&&(a.value[0]&&!a.value[1]?ft(0):(ft(0),ft(1),n()),Yt(),d.value=a.value.slice(),Gi(a.value,t,e.autoApply,e.modelAuto))},sn=(re,fe=!1)=>{if(_(re.value)||!re.current&&e.hideOffsetDates)return t("invalid-date",re.value);if(s.value=JSON.parse(JSON.stringify(re)),!c.value.enabled)return Ue(re);pm(m.hours)&&pm(m.minutes)&&!b.value.enabled&&(Ce(re,fe),on())},Mn=(re,fe)=>{var Ee;D(re,fe.month,fe.year,!0),h.value.count&&!h.value.solo&&we(re),t("update-month-year",{instance:re,month:fe.month,year:fe.year}),r(h.value.solo?re:void 0);const Ne=(Ee=e.flow)!=null&&Ee.length?e.flow[e.flowStep]:void 0;!fe.fromNav&&(Ne===Et.month||Ne===Et.year)&&n()},mi=(re,fe)=>{um({value:re,modelValue:d,range:c.value.enabled,timezone:fe?void 0:y.value.timezone}),I(),e.multiCalendars&&i.nextTick().then(()=>q(!0))},gi=()=>{const re=eu(le(),y.value);!c.value.enabled&&!b.value.enabled?d.value=re:d.value&&Array.isArray(d.value)&&d.value[0]?b.value.enabled?d.value=[...d.value,re]:d.value=st(re,d.value[0])?[re,d.value[0]]:[d.value[0],re]:d.value=[re],I()},Yr=()=>{if(Array.isArray(d.value))if(b.value.enabled){const re=Ln();d.value[d.value.length-1]=P(re)}else d.value=d.value.map((re,fe)=>re&&P(re,fe));else d.value=P(d.value);t("time-update")},Ln=()=>Array.isArray(d.value)&&d.value.length?d.value[d.value.length-1]:null;return{calendars:p,modelValue:d,month:Q,year:$,time:m,disabledTimesConfig:H,today:v,validateTime:A,getCalendarDays:$e,getMarker:ue,handleScroll:se,handleSwipe:N,handleArrow:ce,selectDate:sn,updateMonthYear:Mn,presetDate:mi,selectCurrentDate:gi,updateTime:(re,fe=!0,Ee=!1)=>{O(re,fe,Ee,Yr)},assignMonthAndYear:L,setStartTime:U}},xC={key:0},TC=i.defineComponent({__name:"DatePicker",props:{...rr},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:r}){const n=r,a=e,{calendars:o,month:s,year:u,modelValue:d,time:p,disabledTimesConfig:m,today:v,validateTime:h,getCalendarDays:l,getMarker:c,handleArrow:g,handleScroll:y,handleSwipe:f,selectDate:b,updateMonthYear:w,presetDate:_,selectCurrentDate:S,updateTime:R,assignMonthAndYear:O,setStartTime:P}=CC(a,n,ne,L),C=i.useSlots(),{setHoverDate:k,getDayClassData:A,clearHoverDate:H}=zC(d,a),{defaultedMultiCalendars:Q}=tt(a),$=i.ref([]),M=i.ref([]),D=i.ref(null),I=Bt(C,"calendar"),U=Bt(C,"monthYear"),B=Bt(C,"timePicker"),Y=se=>{a.shadow||n("mount",se)};i.watch(o,()=>{a.shadow||setTimeout(()=>{n("recalculate-position")},0)},{deep:!0}),i.watch(Q,(se,ce)=>{se.count-ce.count>0&&O()},{deep:!0});const q=i.computed(()=>se=>l(s.value(se),u.value(se)).map(ce=>({...ce,days:ce.days.map(N=>(N.marker=c(N),N.classData=A(N),N))})));function ne(se){var ce;se||se===0?(ce=M.value[se])==null||ce.triggerTransition(s.value(se),u.value(se)):M.value.forEach((N,ue)=>N.triggerTransition(s.value(ue),u.value(ue)))}function L(){n("update-flow-step")}const K=(se,ce=!1)=>{b(se,ce),a.spaceConfirm&&n("select-date")},W=(se,ce,N=0)=>{var ue;(ue=$.value[N])==null||ue.toggleMonthPicker(se,ce)},ee=(se,ce,N=0)=>{var ue;(ue=$.value[N])==null||ue.toggleYearPicker(se,ce)},x=(se,ce,N)=>{var ue;(ue=D.value)==null||ue.toggleTimePicker(se,ce,N)},z=(se,ce)=>{var N;if(!a.range){const ue=d.value?d.value:v,de=ce?new Date(ce):ue,he=se?Xt(de,{weekStartsOn:1}):bp(de,{weekStartsOn:1});b({value:he,current:Ie(de)===s.value(0),text:"",classData:{}}),(N=document.getElementById(hu(he)))==null||N.focus()}},ie=se=>{var ce;(ce=$.value[0])==null||ce.handleMonthYearChange(se,!0)},we=se=>{w(0,{month:s.value(0),year:u.value(0)+(se?1:-1),fromNav:!0})},Z=(se,ce)=>{se===Et.time&&n(`time-picker-${ce?"open":"close"}`),n("overlay-toggle",{open:ce,overlay:se})},be=se=>{n("overlay-toggle",{open:!1,overlay:se}),n("focus-menu")};return t({clearHoverDate:H,presetDate:_,selectCurrentDate:S,toggleMonthPicker:W,toggleYearPicker:ee,toggleTimePicker:x,handleArrow:g,updateMonthYear:w,getSidebarProps:()=>({modelValue:d,month:s,year:u,time:p,updateTime:R,updateMonthYear:w,selectDate:b,presetDate:_}),changeMonth:ie,changeYear:we,selectWeekDate:z,setStartTime:P}),(se,ce)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(Ki,{"multi-calendars":i.unref(Q).count,collapse:se.collapse,"is-mobile":se.isMobile},{default:i.withCtx(({instance:N,index:ue})=>[se.disableMonthYearSelect?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(bC,i.mergeProps({key:0,ref:de=>{de&&($.value[ue]=de)},months:i.unref(Hp)(se.formatLocale,se.locale,se.monthNameFormat),years:i.unref(ru)(se.yearRange,se.locale,se.reverseYears),month:i.unref(s)(N),year:i.unref(u)(N),instance:N},se.$props,{onMount:ce[0]||(ce[0]=de=>Y(i.unref(rn).header)),onResetFlow:ce[1]||(ce[1]=de=>se.$emit("reset-flow")),onUpdateMonthYear:de=>i.unref(w)(N,de),onOverlayClosed:be,onOverlayOpened:ce[2]||(ce[2]=de=>se.$emit("overlay-toggle",{open:!0,overlay:de}))}),i.createSlots({_:2},[i.renderList(i.unref(U),(de,he)=>({name:de,fn:i.withCtx(De=>[i.renderSlot(se.$slots,de,i.normalizeProps(i.guardReactiveProps(De)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),i.createVNode(EC,i.mergeProps({ref:de=>{de&&(M.value[ue]=de)},"mapped-dates":q.value(N),month:i.unref(s)(N),year:i.unref(u)(N),instance:N},se.$props,{onSelectDate:de=>i.unref(b)(de,N!==1),onHandleSpace:de=>K(de,N!==1),onSetHoverDate:ce[3]||(ce[3]=de=>i.unref(k)(de)),onHandleScroll:de=>i.unref(y)(de,N),onHandleSwipe:de=>i.unref(f)(de,N),onMount:ce[4]||(ce[4]=de=>Y(i.unref(rn).calendar)),onResetFlow:ce[5]||(ce[5]=de=>se.$emit("reset-flow")),onTooltipOpen:ce[6]||(ce[6]=de=>se.$emit("tooltip-open",de)),onTooltipClose:ce[7]||(ce[7]=de=>se.$emit("tooltip-close",de))}),i.createSlots({_:2},[i.renderList(i.unref(I),(de,he)=>({name:de,fn:i.withCtx(De=>[i.renderSlot(se.$slots,de,i.normalizeProps(i.guardReactiveProps({...De})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse","is-mobile"]),se.enableTimePicker?(i.openBlock(),i.createElementBlock("div",xC,[se.$slots["time-picker"]?i.renderSlot(se.$slots,"time-picker",i.normalizeProps(i.mergeProps({key:0},{time:i.unref(p),updateTime:i.unref(R)}))):(i.openBlock(),i.createBlock(fm,i.mergeProps({key:1,ref_key:"timePickerRef",ref:D},se.$props,{hours:i.unref(p).hours,minutes:i.unref(p).minutes,seconds:i.unref(p).seconds,"internal-model-value":se.internalModelValue,"disabled-times-config":i.unref(m),"validate-time":i.unref(h),onMount:ce[8]||(ce[8]=N=>Y(i.unref(rn).timePicker)),"onUpdate:hours":ce[9]||(ce[9]=N=>i.unref(R)(N)),"onUpdate:minutes":ce[10]||(ce[10]=N=>i.unref(R)(N,!1)),"onUpdate:seconds":ce[11]||(ce[11]=N=>i.unref(R)(N,!1,!0)),onResetFlow:ce[12]||(ce[12]=N=>se.$emit("reset-flow")),onOverlayClosed:ce[13]||(ce[13]=N=>Z(N,!1)),onOverlayOpened:ce[14]||(ce[14]=N=>Z(N,!0)),onAmPmChange:ce[15]||(ce[15]=N=>se.$emit("am-pm-change",N))}),i.createSlots({_:2},[i.renderList(i.unref(B),(N,ue)=>({name:N,fn:i.withCtx(de=>[i.renderSlot(se.$slots,N,i.normalizeProps(i.guardReactiveProps(de)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):i.createCommentVNode("",!0)],64))}}),kC=(e,t)=>{const r=i.ref(),{defaultedMultiCalendars:n,defaultedConfig:a,defaultedHighlight:o,defaultedRange:s,propDates:u,defaultedFilters:d,defaultedMultiDates:p}=tt(e),{modelValue:m,year:v,month:h,calendars:l}=ei(e,t),{isDisabled:c}=Wr(e),{selectYear:g,groupedYears:y,showYearPicker:f,isDisabled:b,toggleYearPicker:w,handleYearSelect:_,handleYear:S}=dm({modelValue:m,multiCalendars:n,range:s,highlight:o,calendars:l,propDates:u,month:h,year:v,filters:d,props:e,emit:t}),R=(M,D)=>[M,D].map(I=>pr(I,"MMMM",{locale:e.formatLocale})).join("-"),O=i.computed(()=>M=>m.value?Array.isArray(m.value)?m.value.some(D=>$p(M,D)):$p(m.value,M):!1),P=M=>{if(s.value.enabled){if(Array.isArray(m.value)){const D=Me(M,m.value[0])||Me(M,m.value[1]);return Ka(m.value,r.value,M)&&!D}return!1}return!1},C=(M,D)=>M.quarter===mp(D)&&M.year===je(D),k=M=>typeof o.value=="function"?o.value({quarter:mp(M),year:je(M)}):!!o.value.quarters.find(D=>C(D,M)),A=i.computed(()=>M=>{const D=Ke(new Date,{year:v.value(M)});return sP({start:Wa(D),end:vp(D)}).map(I=>{const U=Zr(I),B=wp(I),Y=c(I),q=P(U),ne=k(U);return{text:R(U,B),value:U,active:O.value(U),highlighted:ne,disabled:Y,isBetween:q}})}),H=M=>{bu(M,m,p.value.limit),t("auto-apply",!0)},Q=M=>{m.value=wu(m,M,t),Gi(m.value,t,e.autoApply,e.modelAuto)},$=M=>{m.value=M,t("auto-apply")};return{defaultedConfig:a,defaultedMultiCalendars:n,groupedYears:y,year:v,isDisabled:b,quarters:A,showYearPicker:f,modelValue:m,setHoverDate:M=>{r.value=M},selectYear:g,selectQuarter:(M,D,I)=>{if(!I)return l.value[D].month=Ie(wp(M)),p.value.enabled?H(M):s.value.enabled?Q(M):$(M)},toggleYearPicker:w,handleYearSelect:_,handleYear:S}},AC={class:"dp--quarter-items"},jC=["data-test-id","disabled","onClick","onMouseover"],$C=i.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...rr},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:r}){const n=r,a=e,o=i.useSlots(),s=Bt(o,"yearMode"),{defaultedMultiCalendars:u,defaultedConfig:d,groupedYears:p,year:m,isDisabled:v,quarters:h,modelValue:l,showYearPicker:c,setHoverDate:g,selectQuarter:y,toggleYearPicker:f,handleYearSelect:b,handleYear:w}=kC(a,n);return t({getSidebarProps:()=>({modelValue:l,year:m,selectQuarter:y,handleYearSelect:b,handleYear:w})}),(_,S)=>(i.openBlock(),i.createBlock(Ki,{"multi-calendars":i.unref(u).count,collapse:_.collapse,stretch:"","is-mobile":_.isMobile},{default:i.withCtx(({instance:R})=>[i.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:i.normalizeStyle({minHeight:`${i.unref(d).modeHeight}px`})},[_.$slots["top-extra"]?i.renderSlot(_.$slots,"top-extra",{key:0,value:_.internalModelValue}):i.createCommentVNode("",!0),i.createElementVNode("div",null,[i.createVNode(lm,i.mergeProps(_.$props,{items:i.unref(p)(R),instance:R,"show-year-picker":i.unref(c)[R],year:i.unref(m)(R),"is-disabled":O=>i.unref(v)(R,O),onHandleYear:O=>i.unref(w)(R,O),onYearSelect:O=>i.unref(b)(O,R),onToggleYearPicker:O=>i.unref(f)(R,O?.flow,O?.show)}),i.createSlots({_:2},[i.renderList(i.unref(s),(O,P)=>({name:O,fn:i.withCtx(C=>[i.renderSlot(_.$slots,O,i.normalizeProps(i.guardReactiveProps(C)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),i.createElementVNode("div",AC,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(h)(R),(O,P)=>(i.openBlock(),i.createElementBlock("div",{key:P},[i.createElementVNode("button",{type:"button",class:i.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":O.active,"dp--qr-btn-between":O.isBetween,"dp--qr-btn-disabled":O.disabled,"dp--highlighted":O.highlighted}]),"data-test-id":O.value,disabled:O.disabled,onClick:C=>i.unref(y)(O.value,R,O.disabled),onMouseover:C=>i.unref(g)(O.value)},[_.$slots.quarter?i.renderSlot(_.$slots,"quarter",{key:0,value:O.value,text:O.text}):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(O.text),1)],64))],42,jC)]))),128))])],4)]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),mm=(e,t)=>{const r=i.ref(0);i.onMounted(()=>{n(),window.addEventListener("resize",n,{passive:!0})}),i.onUnmounted(()=>{window.removeEventListener("resize",n)});const n=()=>{r.value=window.document.documentElement.clientWidth};return{isMobile:i.computed(()=>r.value<=e.value.mobileBreakpoint&&!t?!0:void 0)}},DC=["id","tabindex","role","aria-label"],NC={key:0,class:"dp--menu-load-container"},FC={key:1,class:"dp--menu-header"},IC=["data-dp-mobile"],MC={key:0,class:"dp__sidebar_left"},LC=["data-dp-mobile"],BC=["data-test-id","data-dp-mobile","onClick","onKeydown"],HC={key:2,class:"dp__sidebar_right"},VC={key:3,class:"dp__action_extra"},gm=i.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Qi,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle","menu-blur"],setup(e,{expose:t,emit:r}){const n=r,a=e,o=i.ref(null),s=i.computed(()=>{const{openOnTop:te,...ye}=a;return{...ye,isMobile:y.value,flowStep:Q.value,menuWrapRef:o.value}}),{setMenuFocused:u,setShiftKey:d,control:p}=im(),m=i.useSlots(),{defaultedTextInput:v,defaultedInline:h,defaultedConfig:l,defaultedUI:c,handleEventPropagation:g}=tt(a),{isMobile:y}=mm(l,a.shadow),f=i.ref(null),b=i.ref(0),w=i.ref(null),_=i.ref(!1),S=i.ref(null),R=i.ref(!1),O=te=>{R.value=!0,l.value.allowPreventDefault&&te.preventDefault(),Br(te,l.value,!0)};i.onMounted(()=>{if(!a.shadow){_.value=!0,P(),window.addEventListener("resize",P);const te=ht(o);te&&!v.value.enabled&&!h.value.enabled&&(u(!0),Y()),te&&(te.addEventListener("pointerdown",O),te.addEventListener("mousedown",O))}document.addEventListener("mousedown",at)}),i.onUnmounted(()=>{window.removeEventListener("resize",P),document.removeEventListener("mousedown",at);const te=ht(o);te&&(te.removeEventListener("pointerdown",O),te.removeEventListener("mousedown",O))});const P=()=>{const te=ht(w);te&&(b.value=te.getBoundingClientRect().width)},{arrowRight:C,arrowLeft:k,arrowDown:A,arrowUp:H}=qr(),{flowStep:Q,updateFlowStep:$,childMount:M,resetFlow:D,handleFlow:I}=YC(a,n,S),U=i.computed(()=>a.monthPicker?JE:a.yearPicker?ZE:a.timePicker?hC:a.quarterPicker?$C:TC),B=i.computed(()=>{var te;if(l.value.arrowLeft)return l.value.arrowLeft;const ye=(te=o.value)==null?void 0:te.getBoundingClientRect(),He=a.getInputRect();return He?.width<b?.value&&He?.left<=(ye?.left??0)?`${He?.width/2}px`:He?.right>=(ye?.right??0)&&He?.width<b?.value?`${b?.value-He?.width/2}px`:"50%"}),Y=()=>{const te=ht(o);te&&te.focus({preventScroll:!0})},q=i.computed(()=>{var te;return((te=S.value)==null?void 0:te.getSidebarProps())||{}}),ne=()=>{a.openOnTop&&n("recalculate-position")},L=Bt(m,"action"),K=i.computed(()=>a.monthPicker||a.yearPicker?Bt(m,"monthYear"):a.timePicker?Bt(m,"timePicker"):Bt(m,"shared")),W=i.computed(()=>a.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),ee=i.computed(()=>({dp__menu_disabled:a.disabled,dp__menu_readonly:a.readonly,"dp-menu-loading":a.loading})),x=i.computed(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...c.value.menu??{}})),z=te=>{Br(te,l.value,!0)},ie=te=>{a.escClose&&(n("close-picker"),g(te))},we=te=>{if(a.arrowNavigation){if(te===At.up)return H();if(te===At.down)return A();if(te===At.left)return k();if(te===At.right)return C()}else te===At.left||te===At.up?N("handleArrow",At.left,0,te===At.up):N("handleArrow",At.right,0,te===At.down)},Z=te=>{d(te.shiftKey),!a.disableMonthYearSelect&&te.code===Ze.tab&&te.target.classList.contains("dp__menu")&&p.value.shiftKeyInMenu&&(te.preventDefault(),Br(te,l.value,!0),n("close-picker"))},be=()=>{Y(),n("time-picker-close")},se=te=>{var ye,He,X;(ye=S.value)==null||ye.toggleTimePicker(!1,!1),(He=S.value)==null||He.toggleMonthPicker(!1,!1,te),(X=S.value)==null||X.toggleYearPicker(!1,!1,te)},ce=(te,ye=0)=>{var He,X,Ce;return te==="month"?(He=S.value)==null?void 0:He.toggleMonthPicker(!1,!0,ye):te==="year"?(X=S.value)==null?void 0:X.toggleYearPicker(!1,!0,ye):te==="time"?(Ce=S.value)==null?void 0:Ce.toggleTimePicker(!0,!1):se(ye)},N=(te,...ye)=>{var He,X;(He=S.value)!=null&&He[te]&&((X=S.value)==null||X[te](...ye))},ue=()=>{N("selectCurrentDate")},de=(te,ye)=>{N("presetDate",i.toValue(te),ye)},he=()=>{N("clearHoverDate")},De=(te,ye)=>{N("updateMonthYear",te,ye)},$e=(te,ye)=>{te.preventDefault(),we(ye)},Ue=te=>{var ye,He,X;if(Z(te),te.key===Ze.home||te.key===Ze.end)return N("selectWeekDate",te.key===Ze.home,te.target.getAttribute("id"));switch((te.key===Ze.pageUp||te.key===Ze.pageDown)&&(te.shiftKey?(N("changeYear",te.key===Ze.pageUp),(ye=au(o.value,"overlay-year"))==null||ye.focus()):(N("changeMonth",te.key===Ze.pageUp),(He=au(o.value,te.key===Ze.pageUp?"action-prev":"action-next"))==null||He.focus()),te.target.getAttribute("id")&&((X=o.value)==null||X.focus({preventScroll:!0}))),te.key){case Ze.esc:return ie(te);case Ze.arrowLeft:return $e(te,At.left);case Ze.arrowRight:return $e(te,At.right);case Ze.arrowUp:return $e(te,At.up);case Ze.arrowDown:return $e(te,At.down);default:return}},at=te=>{var ye;h.value.enabled&&!h.value.input&&!((ye=o.value)!=null&&ye.contains(te.target))&&R.value&&(R.value=!1,n("menu-blur"))};return t({updateMonthYear:De,switchView:ce,handleFlow:I,onValueCleared:()=>{var te,ye;(ye=(te=S.value)==null?void 0:te.setStartTime)==null||ye.call(te)}}),(te,ye)=>{var He,X,Ce;return i.openBlock(),i.createElementBlock("div",{id:te.uid?`dp-menu-${te.uid}`:void 0,ref_key:"dpMenuRef",ref:o,tabindex:i.unref(h).enabled?void 0:"0",role:i.unref(h).enabled?void 0:"dialog","aria-label":(He=te.ariaLabels)==null?void 0:He.menu,class:i.normalizeClass(x.value),style:i.normalizeStyle({"--dp-arrow-left":B.value}),onMouseleave:he,onClick:z,onKeydown:Ue},[(te.disabled||te.readonly)&&i.unref(h).enabled||te.loading?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(ee.value)},[te.loading?(i.openBlock(),i.createElementBlock("div",NC,ye[19]||(ye[19]=[i.createElementVNode("span",{class:"dp--menu-loader"},null,-1)]))):i.createCommentVNode("",!0)],2)):i.createCommentVNode("",!0),te.$slots["menu-header"]?(i.openBlock(),i.createElementBlock("div",FC,[i.renderSlot(te.$slots,"menu-header")])):i.createCommentVNode("",!0),!i.unref(h).enabled&&!te.teleportCenter?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(W.value)},null,2)):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"innerMenuRef",ref:w,class:i.normalizeClass({dp__menu_content_wrapper:((X=te.presetDates)==null?void 0:X.length)||!!te.$slots["left-sidebar"]||!!te.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((Ce=te.presetDates)==null?void 0:Ce.length)||!!te.$slots["left-sidebar"]||!!te.$slots["right-sidebar"])}),"data-dp-mobile":i.unref(y),style:i.normalizeStyle({"--dp-menu-width":`${b.value}px`})},[te.$slots["left-sidebar"]?(i.openBlock(),i.createElementBlock("div",MC,[i.renderSlot(te.$slots,"left-sidebar",i.normalizeProps(i.guardReactiveProps(q.value)))])):i.createCommentVNode("",!0),te.presetDates.length?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0}),"data-dp-mobile":i.unref(y)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(te.presetDates,(Se,ft)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:ft},[Se.slot?i.renderSlot(te.$slots,Se.slot,{key:0,presetDate:de,label:Se.label,value:Se.value}):(i.openBlock(),i.createElementBlock("button",{key:1,type:"button",style:i.normalizeStyle(Se.style||{}),class:i.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test-id":Se.testId??void 0,"data-dp-mobile":i.unref(y),onClick:i.withModifiers(Yt=>de(Se.value,Se.noTz),["prevent"]),onKeydown:Yt=>i.unref(jt)(Yt,()=>de(Se.value,Se.noTz),!0)},i.toDisplayString(Se.label),47,BC))],64))),128))],10,LC)):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:f,class:"dp__instance_calendar",role:"document"},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(U.value),i.mergeProps({ref_key:"dynCmpRef",ref:S},s.value,{"flow-step":i.unref(Q),onMount:i.unref(M),onUpdateFlowStep:i.unref($),onResetFlow:i.unref(D),onFocusMenu:Y,onSelectDate:ye[0]||(ye[0]=Se=>te.$emit("select-date")),onDateUpdate:ye[1]||(ye[1]=Se=>te.$emit("date-update",Se)),onTooltipOpen:ye[2]||(ye[2]=Se=>te.$emit("tooltip-open",Se)),onTooltipClose:ye[3]||(ye[3]=Se=>te.$emit("tooltip-close",Se)),onAutoApply:ye[4]||(ye[4]=Se=>te.$emit("auto-apply",Se)),onRangeStart:ye[5]||(ye[5]=Se=>te.$emit("range-start",Se)),onRangeEnd:ye[6]||(ye[6]=Se=>te.$emit("range-end",Se)),onInvalidFixedRange:ye[7]||(ye[7]=Se=>te.$emit("invalid-fixed-range",Se)),onTimeUpdate:ye[8]||(ye[8]=Se=>te.$emit("time-update")),onAmPmChange:ye[9]||(ye[9]=Se=>te.$emit("am-pm-change",Se)),onTimePickerOpen:ye[10]||(ye[10]=Se=>te.$emit("time-picker-open",Se)),onTimePickerClose:be,onRecalculatePosition:ne,onUpdateMonthYear:ye[11]||(ye[11]=Se=>te.$emit("update-month-year",Se)),onAutoApplyInvalid:ye[12]||(ye[12]=Se=>te.$emit("auto-apply-invalid",Se)),onInvalidDate:ye[13]||(ye[13]=Se=>te.$emit("invalid-date",Se)),onOverlayToggle:ye[14]||(ye[14]=Se=>te.$emit("overlay-toggle",Se)),"onUpdate:internalModelValue":ye[15]||(ye[15]=Se=>te.$emit("update:internal-model-value",Se))}),i.createSlots({_:2},[i.renderList(K.value,(Se,ft)=>({name:Se,fn:i.withCtx(Yt=>[i.renderSlot(te.$slots,Se,i.normalizeProps(i.guardReactiveProps({...Yt})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),te.$slots["right-sidebar"]?(i.openBlock(),i.createElementBlock("div",HC,[i.renderSlot(te.$slots,"right-sidebar",i.normalizeProps(i.guardReactiveProps(q.value)))])):i.createCommentVNode("",!0),te.$slots["action-extra"]?(i.openBlock(),i.createElementBlock("div",VC,[te.$slots["action-extra"]?i.renderSlot(te.$slots,"action-extra",{key:0,selectCurrentDate:ue}):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],14,IC),!te.autoApply||i.unref(l).keepActionRow?(i.openBlock(),i.createBlock(VE,i.mergeProps({key:3,"menu-mount":_.value},s.value,{"calendar-width":b.value,onClosePicker:ye[16]||(ye[16]=Se=>te.$emit("close-picker")),onSelectDate:ye[17]||(ye[17]=Se=>te.$emit("select-date")),onInvalidSelect:ye[18]||(ye[18]=Se=>te.$emit("invalid-select")),onSelectNow:ue}),i.createSlots({_:2},[i.renderList(i.unref(L),(Se,ft)=>({name:Se,fn:i.withCtx(Yt=>[i.renderSlot(te.$slots,Se,i.normalizeProps(i.guardReactiveProps({...Yt})))])}))]),1040,["menu-mount","calendar-width"])):i.createCommentVNode("",!0)],46,DC)}}});var Fn=(e=>(e.center="center",e.left="left",e.right="right",e))(Fn||{});const qC=({menuRef:e,menuRefInner:t,inputRef:r,pickerWrapperRef:n,inline:a,emit:o,props:s,slots:u})=>{const{defaultedConfig:d}=tt(s),p=i.ref({}),m=i.ref(!1),v=i.ref({top:"0",left:"0"}),h=i.ref(!1),l=i.toRef(s,"teleportCenter");i.watch(l,()=>{v.value=JSON.parse(JSON.stringify({})),S()});const c=D=>{if(s.teleport){const I=D.getBoundingClientRect();return{left:I.left+window.scrollX,top:I.top+window.scrollY}}return{top:0,left:0}},g=(D,I)=>{v.value.left=`${D+I-p.value.width}px`},y=D=>{v.value.left=`${D}px`},f=(D,I)=>{s.position===Fn.left&&y(D),s.position===Fn.right&&g(D,I),s.position===Fn.center&&(v.value.left=`${D+I/2-p.value.width/2}px`)},b=D=>{const{width:I,height:U}=D.getBoundingClientRect(),{top:B,left:Y}=c(D);return{top:+B,left:+Y,width:I,height:U}},w=()=>{v.value.left="50%",v.value.top="50%",v.value.transform="translate(-50%, -50%)",v.value.position="fixed",delete v.value.opacity},_=()=>{const D=ht(r);v.value=s.altPosition(D)},S=(D=!0)=>{var I;if(!a.value.enabled){if(l.value)return w();if(s.altPosition!==null)return _();if(D){const U=s.teleport?(I=t.value)==null?void 0:I.$el:e.value;U&&(p.value=U.getBoundingClientRect()),o("recalculate-position")}return H()}},R=({inputEl:D,left:I,width:U})=>{window.screen.width>768&&!m.value&&f(I,U),C(D)},O=D=>{const{top:I,left:U,height:B,width:Y}=b(D);v.value.top=`${B+I+ +s.offset}px`,h.value=!1,m.value||(v.value.left=`${U+Y/2-p.value.width/2}px`),R({inputEl:D,left:U,width:Y})},P=D=>{const{top:I,left:U,width:B}=b(D);v.value.top=`${I-+s.offset-p.value.height}px`,h.value=!0,R({inputEl:D,left:U,width:B})},C=D=>{if(s.autoPosition){const{left:I,width:U}=b(D),{left:B,right:Y}=p.value;if(!m.value){if(Math.abs(B)!==Math.abs(Y)){if(B<=0)return m.value=!0,y(I);if(Y>=document.documentElement.clientWidth)return m.value=!0,g(I,U)}return f(I,U)}}},k=()=>{const D=ht(r);if(D){if(s.autoPosition===er.top)return er.top;if(s.autoPosition===er.bottom)return er.bottom;const{height:I}=p.value,{top:U,height:B}=D.getBoundingClientRect(),Y=window.innerHeight-U-B,q=U;return I<=Y?er.bottom:I>Y&&I<=q?er.top:Y>=q?er.bottom:er.top}return er.bottom},A=D=>k()===er.bottom?O(D):P(D),H=()=>{const D=ht(r);if(D)return s.autoPosition?A(D):O(D)},Q=function(D){if(D){const I=D.scrollHeight>D.clientHeight,U=window.getComputedStyle(D).overflowY.indexOf("hidden")!==-1;return I&&!U}return!0},$=function(D){return!D||D===document.body||D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:Q(D)?D:$(D.assignedSlot&&d.value.shadowDom?D.assignedSlot.parentNode:D.parentNode)},M=D=>{if(D)switch(s.position){case Fn.left:return{left:0,transform:"translateX(0)"};case Fn.right:return{left:`${D.width}px`,transform:"translateX(-100%)"};default:return{left:`${D.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:v,xCorrect:m,setMenuPosition:S,getScrollableParent:$,shadowRender:(D,I,U)=>{var B,Y,q;const ne=document.createElement("div"),L=(B=ht(r))==null?void 0:B.getBoundingClientRect();ne.setAttribute("id","dp--temp-container");const K=(Y=n.value)!=null&&Y.clientWidth?n.value:document.body;K.append(ne);const W=M(L),ee=d.value.shadowDom?Object.keys(u).filter(z=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(z)):Object.keys(u),x=i.h(I,{...U,shadow:!0,style:{opacity:0,position:"absolute",...W}},Object.fromEntries(ee.map(z=>[z,u[z]])));D!=null&&(x.appContext=D.appContext),i.render(x,ne),p.value=(q=x.el)==null?void 0:q.getBoundingClientRect(),i.render(null,ne),K.removeChild(ne)}}},Ur=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],UC=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],WC={all:()=>Ur,monthYear:()=>Ur.filter(e=>e.use.includes("month-year")),input:()=>UC,timePicker:()=>Ur.filter(e=>e.use.includes("time")),action:()=>Ur.filter(e=>e.use.includes("action")),calendar:()=>Ur.filter(e=>e.use.includes("calendar")),menu:()=>Ur.filter(e=>e.use.includes("menu")),shared:()=>Ur.filter(e=>e.use.includes("shared")),yearMode:()=>Ur.filter(e=>e.use.includes("year-mode"))},Bt=(e,t,r)=>{const n=[];return WC[t]().forEach(a=>{e[a.name]&&n.push(a.name)}),r!=null&&r.length&&r.forEach(a=>{a.slot&&n.push(a.slot)}),n},Za=e=>{const t=i.computed(()=>n=>e.value?n?e.value.open:e.value.close:""),r=i.computed(()=>n=>e.value?n?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:r}},ei=(e,t,r)=>{const{defaultedRange:n,defaultedTz:a}=tt(e),o=le(Mt(le(),a.value.timezone)),s=i.ref([{month:Ie(o),year:je(o)}]),u=h=>{const l={hours:xr(o),minutes:Lr(o),seconds:0};return n.value.enabled?[l[h],l[h]]:l[h]},d=i.reactive({hours:u("hours"),minutes:u("minutes"),seconds:u("seconds")});i.watch(n,(h,l)=>{h.enabled!==l.enabled&&(d.hours=u("hours"),d.minutes=u("minutes"),d.seconds=u("seconds"))},{deep:!0});const p=i.computed({get:()=>e.internalModelValue,set:h=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",h)}}),m=i.computed(()=>h=>s.value[h]?s.value[h].month:0),v=i.computed(()=>h=>s.value[h]?s.value[h].year:0);return i.watch(p,(h,l)=>{r&&JSON.stringify(h??{})!==JSON.stringify(l??{})&&r()},{deep:!0}),{calendars:s,time:d,modelValue:p,month:m,year:v,today:o}},zC=(e,t)=>{const{defaultedMultiCalendars:r,defaultedMultiDates:n,defaultedUI:a,defaultedHighlight:o,defaultedTz:s,propDates:u,defaultedRange:d}=tt(t),{isDisabled:p}=Wr(t),m=i.ref(null),v=i.ref(Mt(new Date,s.value.timezone)),h=x=>{!x.current&&t.hideOffsetDates||(m.value=x.value)},l=()=>{m.value=null},c=x=>Array.isArray(e.value)&&d.value.enabled&&e.value[0]&&m.value?x?ct(m.value,e.value[0]):st(m.value,e.value[0]):!0,g=(x,z)=>{const ie=()=>e.value?z?e.value[0]||null:e.value[1]:null,we=e.value&&Array.isArray(e.value)?ie():null;return Me(le(x.value),we)},y=x=>{const z=Array.isArray(e.value)?e.value[0]:null;return x?!st(m.value??null,z):!0},f=(x,z=!0)=>(d.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!x.current?!1:Me(le(x.value),e.value[z?0:1]):d.value.enabled?g(x,z)&&y(z)||Me(x.value,Array.isArray(e.value)?e.value[0]:null)&&c(z):!1,b=(x,z)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const ie=Me(x.value,m.value);return z?ct(e.value[0],x.value)&&ie:st(e.value[0],x.value)&&ie}return!1},w=x=>!e.value||t.hideOffsetDates&&!x.current?!1:d.value.enabled?t.modelAuto&&Array.isArray(e.value)?Me(x.value,e.value[0]?e.value[0]:v.value):!1:n.value.enabled&&Array.isArray(e.value)?e.value.some(z=>Me(z,x.value)):Me(x.value,e.value?e.value:v.value),_=x=>{if(d.value.autoRange||t.weekPicker){if(m.value){if(t.hideOffsetDates&&!x.current)return!1;const z=zt(m.value,+d.value.autoRange),ie=Tr(le(m.value),t.weekStart);return t.weekPicker?Me(ie[1],le(x.value)):Me(z,le(x.value))}return!1}return!1},S=x=>{if(d.value.autoRange||t.weekPicker){if(m.value){const z=zt(m.value,+d.value.autoRange);if(t.hideOffsetDates&&!x.current)return!1;const ie=Tr(le(m.value),t.weekStart);return t.weekPicker?ct(x.value,ie[0])&&st(x.value,ie[1]):ct(x.value,m.value)&&st(x.value,z)}return!1}return!1},R=x=>{if(d.value.autoRange||t.weekPicker){if(m.value){if(t.hideOffsetDates&&!x.current)return!1;const z=Tr(le(m.value),t.weekStart);return t.weekPicker?Me(z[0],x.value):Me(m.value,x.value)}return!1}return!1},O=x=>Ka(e.value,m.value,x.value),P=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,C=()=>t.modelAuto?Vp(t.internalModelValue):!0,k=x=>{if(t.weekPicker)return!1;const z=d.value.enabled?!f(x)&&!f(x,!1):!0;return!p(x.value)&&!w(x)&&!(!x.current&&t.hideOffsetDates)&&z},A=x=>d.value.enabled?t.modelAuto?P()&&w(x):!1:w(x),H=x=>o.value?dE(x.value,u.value.highlight):!1,Q=x=>{const z=p(x.value);return z&&(typeof o.value=="function"?!o.value(x.value,z):!o.value.options.highlightDisabled)},$=x=>{var z;return typeof o.value=="function"?o.value(x.value):(z=o.value.weekdays)==null?void 0:z.includes(x.value.getDay())},M=x=>(d.value.enabled||t.weekPicker)&&(!(r.value.count>0)||x.current)&&C()&&!(!x.current&&t.hideOffsetDates)&&!w(x)?O(x):!1,D=x=>{if(Array.isArray(e.value)&&e.value.length===1){const{before:z,after:ie}=am(+d.value.maxRange,e.value[0]);return xn(x.value,z)||tn(x.value,ie)}return!1},I=x=>{if(Array.isArray(e.value)&&e.value.length===1){const{before:z,after:ie}=am(+d.value.minRange,e.value[0]);return Ka([z,ie],e.value[0],x.value)}return!1},U=x=>d.value.enabled&&(d.value.maxRange||d.value.minRange)?d.value.maxRange&&d.value.minRange?D(x)||I(x):d.value.maxRange?D(x):I(x):!1,B=x=>{const{isRangeStart:z,isRangeEnd:ie}=L(x),we=d.value.enabled?z||ie:!1;return{dp__cell_offset:!x.current,dp__pointer:!t.disabled&&!(!x.current&&t.hideOffsetDates)&&!p(x.value)&&!U(x),dp__cell_disabled:p(x.value)||U(x),dp__cell_highlight:!Q(x)&&(H(x)||$(x))&&!A(x)&&!we&&!R(x)&&!(M(x)&&t.weekPicker)&&!ie,dp__cell_highlight_active:!Q(x)&&(H(x)||$(x))&&A(x),dp__today:!t.noToday&&Me(x.value,v.value)&&x.current,"dp--past":st(x.value,v.value),"dp--future":ct(x.value,v.value)}},Y=x=>({dp__active_date:A(x),dp__date_hover:k(x)}),q=x=>{if(e.value&&!Array.isArray(e.value)){const z=Tr(e.value,t.weekStart);return{...W(x),dp__range_start:Me(z[0],x.value),dp__range_end:Me(z[1],x.value),dp__range_between_week:ct(x.value,z[0])&&st(x.value,z[1])}}return{...W(x)}},ne=x=>{if(e.value&&Array.isArray(e.value)){const z=Tr(e.value[0],t.weekStart),ie=e.value[1]?Tr(e.value[1],t.weekStart):[];return{...W(x),dp__range_start:Me(z[0],x.value)||Me(ie[0],x.value),dp__range_end:Me(z[1],x.value)||Me(ie[1],x.value),dp__range_between_week:ct(x.value,z[0])&&st(x.value,z[1])||ct(x.value,ie[0])&&st(x.value,ie[1]),dp__range_between:ct(x.value,z[1])&&st(x.value,ie[0])}}return{...W(x)}},L=x=>{const z=r.value.count>0?x.current&&f(x)&&C():f(x)&&C(),ie=r.value.count>0?x.current&&f(x,!1)&&C():f(x,!1)&&C();return{isRangeStart:z,isRangeEnd:ie}},K=x=>{const{isRangeStart:z,isRangeEnd:ie}=L(x);return{dp__range_start:z,dp__range_end:ie,dp__range_between:M(x),dp__date_hover:Me(x.value,m.value)&&!z&&!ie&&!t.weekPicker,dp__date_hover_start:b(x,!0),dp__date_hover_end:b(x,!1)}},W=x=>({...K(x),dp__cell_auto_range:S(x),dp__cell_auto_range_start:R(x),dp__cell_auto_range_end:_(x)}),ee=x=>d.value.enabled?d.value.autoRange?W(x):t.modelAuto?{...Y(x),...K(x)}:t.weekPicker?ne(x):K(x):t.weekPicker?q(x):Y(x);return{setHoverDate:h,clearHoverDate:l,getDayClassData:x=>t.hideOffsetDates&&!x.current?{}:{...B(x),...ee(x),[t.dayClass?t.dayClass(x.value,t.internalModelValue):""]:!0,...a.value.calendarCell??{}}}},Wr=e=>{const{defaultedFilters:t,defaultedRange:r,propDates:n,defaultedMultiDates:a}=tt(e),o=$=>n.value.disabledDates?typeof n.value.disabledDates=="function"?n.value.disabledDates(le($)):!!Wi($,n.value.disabledDates):!1,s=$=>n.value.maxDate?e.yearPicker?je($)>je(n.value.maxDate):ct($,n.value.maxDate):!1,u=$=>n.value.minDate?e.yearPicker?je($)<je(n.value.minDate):st($,n.value.minDate):!1,d=$=>{const M=s($),D=u($),I=o($),U=t.value.months.map(L=>+L).includes(Ie($)),B=e.disabledWeekDays.length?e.disabledWeekDays.some(L=>+L===XP($)):!1,Y=l($),q=je($),ne=q<+e.yearRange[0]||q>+e.yearRange[1];return!(M||D||I||U||ne||B||Y)},p=($,M)=>st(...Vr(n.value.minDate,$,M))||Me(...Vr(n.value.minDate,$,M)),m=($,M)=>ct(...Vr(n.value.maxDate,$,M))||Me(...Vr(n.value.maxDate,$,M)),v=($,M,D)=>{let I=!1;return n.value.maxDate&&D&&m($,M)&&(I=!0),n.value.minDate&&!D&&p($,M)&&(I=!0),I},h=($,M,D,I)=>{let U=!1;return I&&(n.value.minDate||n.value.maxDate)?n.value.minDate&&n.value.maxDate?U=v($,M,D):(n.value.minDate&&p($,M)||n.value.maxDate&&m($,M))&&(U=!0):U=!0,U},l=$=>Array.isArray(n.value.allowedDates)&&!n.value.allowedDates.length?!0:n.value.allowedDates?!Wi($,n.value.allowedDates,Yp(e.monthPicker,e.yearPicker)):!1,c=$=>!d($),g=$=>r.value.noDisabledRange?!yp({start:$[0],end:$[1]}).some(M=>c(M)):!0,y=$=>{if($){const M=je($);return M>=+e.yearRange[0]&&M<=e.yearRange[1]}return!0},f=($,M)=>!!(Array.isArray($)&&$[M]&&(r.value.maxRange||r.value.minRange)&&y($[M])),b=($,M,D=0)=>{if(f(M,D)&&y($)){const I=fp($,M[D]),U=Xp(M[D],$),B=U.length===1?0:U.filter(q=>c(q)).length,Y=Math.abs(I)-(r.value.minMaxRawRange?0:B);if(r.value.minRange&&r.value.maxRange)return Y>=+r.value.minRange&&Y<=+r.value.maxRange;if(r.value.minRange)return Y>=+r.value.minRange;if(r.value.maxRange)return Y<=+r.value.maxRange}return!0},w=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,_=$=>Array.isArray($)?[$[0]?du($[0]):null,$[1]?du($[1]):null]:du($),S=($,M,D)=>$.find(I=>+I.hours===xr(M)&&I.minutes==="*"?!0:+I.minutes===Lr(M)&&+I.hours===xr(M))&&D,R=($,M,D)=>{const[I,U]=$,[B,Y]=M;return!S(I,B,D)&&!S(U,Y,D)&&D},O=($,M)=>{const D=Array.isArray(M)?M:[M];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?R(e.disabledTimes,D,$):!D.some(I=>S(e.disabledTimes,I,$)):$},P=($,M)=>{const D=Array.isArray(M)?[nn(M[0]),M[1]?nn(M[1]):void 0]:nn(M),I=!e.disabledTimes(D);return $&&I},C=($,M)=>e.disabledTimes?Array.isArray(e.disabledTimes)?O(M,$):P(M,$):M,k=$=>{let M=!0;if(!$||w())return!0;const D=!n.value.minDate&&!n.value.maxDate?_($):$;return(e.maxTime||n.value.maxDate)&&(M=rm(e.maxTime,n.value.maxDate,"max",vt(D),M)),(e.minTime||n.value.minDate)&&(M=rm(e.minTime,n.value.minDate,"min",vt(D),M)),C($,M)},A=$=>{if(!e.monthPicker)return!0;let M=!0;const D=le(tr($));if(n.value.minDate&&n.value.maxDate){const I=le(tr(n.value.minDate)),U=le(tr(n.value.maxDate));return ct(D,I)&&st(D,U)||Me(D,I)||Me(D,U)}if(n.value.minDate){const I=le(tr(n.value.minDate));M=ct(D,I)||Me(D,I)}if(n.value.maxDate){const I=le(tr(n.value.maxDate));M=st(D,I)||Me(D,I)}return M},H=i.computed(()=>$=>!e.enableTimePicker||e.ignoreTimeValidation?!0:k($)),Q=i.computed(()=>$=>e.monthPicker?Array.isArray($)&&(r.value.enabled||a.value.enabled)?!$.filter(M=>!A(M)).length:A($):!0);return{isDisabled:c,validateDate:d,validateMonthYearInRange:h,isDateRangeAllowed:g,checkMinMaxRange:b,isValidTime:k,isTimeValid:H,isMonthValid:Q}},Ji=()=>{const e=i.computed(()=>(n,a)=>n?.includes(a)),t=i.computed(()=>(n,a)=>n.count?n.solo?!0:a===0:!0),r=i.computed(()=>(n,a)=>n.count?n.solo?!0:a===n.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:r}},YC=(e,t,r)=>{const n=i.ref(0),a=i.reactive({[rn.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[rn.calendar]:!1,[rn.header]:!1}),o=i.computed(()=>e.monthPicker||e.timePicker),s=v=>{var h;if((h=e.flow)!=null&&h.length){if(!v&&o.value)return m();a[v]=!0,Object.keys(a).filter(l=>!a[l]).length||m()}},u=()=>{var v,h;(v=e.flow)!=null&&v.length&&n.value!==-1&&(n.value+=1,t("flow-step",n.value),m()),((h=e.flow)==null?void 0:h.length)===n.value&&i.nextTick().then(()=>d())},d=()=>{n.value=-1},p=(v,h,...l)=>{var c,g;e.flow[n.value]===v&&r.value&&((g=(c=r.value)[h])==null||g.call(c,...l))},m=(v=0)=>{v&&(n.value+=v),p(Et.month,"toggleMonthPicker",!0),p(Et.year,"toggleYearPicker",!0),p(Et.calendar,"toggleTimePicker",!1,!0),p(Et.time,"toggleTimePicker",!0,!0);const h=e.flow[n.value];(h===Et.hours||h===Et.minutes||h===Et.seconds)&&p(h,"toggleTimePicker",!0,!0,h)};return{childMount:s,updateFlowStep:u,resetFlow:d,handleFlow:m,flowStep:n}},QC={key:1,class:"dp__input_wrap"},KC=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],GC={key:2,class:"dp--clear-btn"},JC=["aria-label"],XC=i.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Qi},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(e,{expose:t,emit:r}){const n=r,a=e,{defaultedTextInput:o,defaultedAriaLabels:s,defaultedInline:u,defaultedConfig:d,defaultedRange:p,defaultedMultiDates:m,defaultedUI:v,getDefaultPattern:h,getDefaultStartTime:l}=tt(a),{checkMinMaxRange:c}=Wr(a),g=i.ref(),y=i.ref(null),f=i.ref(!1),b=i.ref(!1),w=i.computed(()=>({dp__pointer:!a.disabled&&!a.readonly&&!o.value.enabled,dp__disabled:a.disabled,dp__input_readonly:!o.value.enabled,dp__input:!0,dp__input_icon_pad:!a.hideInputIcon,dp__input_valid:typeof a.state=="boolean"?a.state:!1,dp__input_invalid:typeof a.state=="boolean"?!a.state:!1,dp__input_focus:f.value||a.isMenuOpen,dp__input_reg:!o.value.enabled,...v.value.input??{}})),_=()=>{n("set-input-date",null),a.clearable&&a.autoApply&&(n("set-empty-date"),g.value=null)},S=q=>{const ne=l();return hE(q,o.value.format??h(),ne??Zp({},a.enableSeconds),a.inputValue,b.value,a.formatLocale)},R=q=>{const{rangeSeparator:ne}=o.value,[L,K]=q.split(`${ne}`);if(L){const W=S(L.trim()),ee=K?S(K.trim()):void 0;if(tn(W,ee))return;const x=W&&ee?[W,ee]:[W];c(ee,x,0)&&(g.value=W?x:null)}},O=()=>{b.value=!0},P=q=>{if(p.value.enabled)R(q);else if(m.value.enabled){const ne=q.split(";");g.value=ne.map(L=>S(L.trim())).filter(L=>L)}else g.value=S(q)},C=q=>{var ne;const L=typeof q=="string"?q:(ne=q.target)==null?void 0:ne.value;L!==""?(o.value.openMenu&&!a.isMenuOpen&&n("open"),P(L),n("set-input-date",g.value)):_(),b.value=!1,n("update:input-value",L),n("text-input",q,g.value)},k=q=>{o.value.enabled?(P(q.target.value),o.value.enterSubmit&&lu(g.value)&&a.inputValue!==""?(n("set-input-date",g.value,!0),g.value=null):o.value.enterSubmit&&a.inputValue===""&&(g.value=null,n("clear"))):Q(q)},A=(q,ne)=>{o.value.enabled&&o.value.tabSubmit&&!ne&&P(q.target.value),o.value.tabSubmit&&lu(g.value)&&a.inputValue!==""?(n("set-input-date",g.value,!0,!0),g.value=null):o.value.tabSubmit&&a.inputValue===""&&(g.value=null,n("clear",!0))},H=()=>{f.value=!0,n("focus"),i.nextTick().then(()=>{var q;o.value.enabled&&o.value.selectOnFocus&&((q=y.value)==null||q.select())})},Q=q=>{if(Br(q,d.value,!0),o.value.enabled&&o.value.openMenu&&!u.value.input){if(o.value.openMenu==="open"&&!a.isMenuOpen)return n("open");if(o.value.openMenu==="toggle")return n("toggle")}else o.value.enabled||n("toggle")},$=()=>{n("real-blur"),f.value=!1,(!a.isMenuOpen||u.value.enabled&&u.value.input)&&n("blur"),a.autoApply&&o.value.enabled&&g.value&&!a.isMenuOpen&&(n("set-input-date",g.value),n("select-date"),g.value=null)},M=q=>{Br(q,d.value,!0),n("clear")},D=()=>{n("close")},I=q=>{if(q.key==="Tab"&&A(q),q.key==="Enter"&&k(q),q.key==="Escape"&&o.value.escClose&&D(),!o.value.enabled){if(q.code==="Tab")return;q.preventDefault()}},U=()=>{var q;(q=y.value)==null||q.focus({preventScroll:!0})},B=q=>{g.value=q},Y=q=>{q.key===Ze.tab&&A(q,!0)};return t({focusInput:U,setParsedDate:B}),(q,ne)=>{var L,K,W;return i.openBlock(),i.createElementBlock("div",{onClick:Q},[q.$slots.trigger&&!q.$slots["dp-input"]&&!i.unref(u).enabled?i.renderSlot(q.$slots,"trigger",{key:0}):i.createCommentVNode("",!0),!q.$slots.trigger&&(!i.unref(u).enabled||i.unref(u).input)?(i.openBlock(),i.createElementBlock("div",QC,[q.$slots["dp-input"]&&!q.$slots.trigger&&(!i.unref(u).enabled||i.unref(u).enabled&&i.unref(u).input)?i.renderSlot(q.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:C,onEnter:k,onTab:A,onClear:M,onBlur:$,onKeypress:I,onPaste:O,onFocus:H,openMenu:()=>q.$emit("open"),closeMenu:()=>q.$emit("close"),toggleMenu:()=>q.$emit("toggle")}):i.createCommentVNode("",!0),q.$slots["dp-input"]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("input",{key:1,id:q.uid?`dp-input-${q.uid}`:void 0,ref_key:"inputRef",ref:y,"data-test-id":"dp-input",name:q.name,class:i.normalizeClass(w.value),inputmode:i.unref(o).enabled?"text":"none",placeholder:q.placeholder,disabled:q.disabled,readonly:q.readonly,required:q.required,value:e.inputValue,autocomplete:q.autocomplete,"aria-label":(L=i.unref(s))==null?void 0:L.input,"aria-disabled":q.disabled||void 0,"aria-invalid":q.state===!1?!0:void 0,onInput:C,onBlur:$,onFocus:H,onKeypress:I,onKeydown:ne[0]||(ne[0]=ee=>I(ee)),onPaste:O},null,42,KC)),i.createElementVNode("div",{onClick:ne[3]||(ne[3]=ee=>n("toggle"))},[q.$slots["input-icon"]&&!q.hideInputIcon?(i.openBlock(),i.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:ne[1]||(ne[1]=ee=>n("toggle"))},[i.renderSlot(q.$slots,"input-icon")])):i.createCommentVNode("",!0),!q.$slots["input-icon"]&&!q.hideInputIcon&&!q.$slots["dp-input"]?(i.openBlock(),i.createBlock(i.unref(An),{key:1,"aria-label":(K=i.unref(s))==null?void 0:K.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:ne[2]||(ne[2]=ee=>n("toggle"))},null,8,["aria-label"])):i.createCommentVNode("",!0)]),q.$slots["clear-icon"]&&(q.alwaysClearable||e.inputValue&&q.clearable&&!q.disabled&&!q.readonly)?(i.openBlock(),i.createElementBlock("span",GC,[i.renderSlot(q.$slots,"clear-icon",{clear:M})])):i.createCommentVNode("",!0),!q.$slots["clear-icon"]&&(q.alwaysClearable||q.clearable&&e.inputValue&&!q.disabled&&!q.readonly)?(i.openBlock(),i.createElementBlock("button",{key:3,"aria-label":(W=i.unref(s))==null?void 0:W.clearInput,class:"dp--clear-btn",type:"button",onKeydown:ne[4]||(ne[4]=ee=>i.unref(jt)(ee,()=>M(ee),!0,Y)),onClick:ne[5]||(ne[5]=i.withModifiers(ee=>M(ee),["prevent"]))},[i.createVNode(i.unref(Lp),{class:"dp__input_icons","data-test-id":"clear-icon"})],40,JC)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])}}}),ZC=typeof window<"u"?window:void 0,_u=()=>{},ex=e=>i.getCurrentScope()?(i.onScopeDispose(e),!0):!1,tx=(e,t,r,n)=>{if(!e)return _u;let a=_u;const o=i.watch(()=>i.unref(e),u=>{a(),u&&(u.removeEventListener(t,r),u.addEventListener(t,r,n),a=()=>{u.removeEventListener(t,r,n),a=_u})},{immediate:!0,flush:"post"}),s=()=>{o(),a()};return ex(s),s},rx=(e,t,r,n={})=>{const{window:a=ZC,event:o="pointerdown"}=n;return a?tx(a,o,s=>{const u=ht(e),d=ht(t);!u||!d||u===s.target||s.composedPath().includes(u)||s.composedPath().includes(d)||r(s)},{passive:!0}):void 0},nx=["data-dp-mobile"],ax=i.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Qi},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(e,{expose:t,emit:r}){const n=r,a=e,o=i.useSlots(),s=i.ref(!1),u=i.toRef(a,"modelValue"),d=i.toRef(a,"timezone"),p=i.ref(null),m=i.ref(null),v=i.ref(null),h=i.ref(!1),l=i.ref(null),c=i.ref(!1),g=i.ref(!1),y=i.ref(!1),f=i.ref(!1),{setMenuFocused:b,setShiftKey:w}=im(),{clearArrowNav:_}=qr(),{validateDate:S,isValidTime:R}=Wr(a),{defaultedTransitions:O,defaultedTextInput:P,defaultedInline:C,defaultedConfig:k,defaultedRange:A,defaultedMultiDates:H}=tt(a),{menuTransition:Q,showTransition:$}=Za(O),{isMobile:M}=mm(k),D=i.getCurrentInstance();i.onMounted(()=>{x(a.modelValue),i.nextTick().then(()=>{if(!C.value.enabled){const ae=L(l.value);ae?.addEventListener("scroll",de),window?.addEventListener("resize",he)}}),C.value.enabled&&(s.value=!0),window?.addEventListener("keyup",De),window?.addEventListener("keydown",$e)}),i.onUnmounted(()=>{if(!C.value.enabled){const ae=L(l.value);ae?.removeEventListener("scroll",de),window?.removeEventListener("resize",he)}window?.removeEventListener("keyup",De),window?.removeEventListener("keydown",$e)});const I=Bt(o,"all",a.presetDates),U=Bt(o,"input");i.watch([u,d],()=>{x(u.value)},{deep:!0});const{openOnTop:B,menuStyle:Y,xCorrect:q,setMenuPosition:ne,getScrollableParent:L,shadowRender:K}=qC({menuRef:p,menuRefInner:m,inputRef:v,pickerWrapperRef:l,inline:C,emit:n,props:a,slots:o}),{inputValue:W,internalModelValue:ee,parseExternalModelValue:x,emitModelValue:z,formatInputValue:ie,checkBeforeEmit:we}=ME(n,a,h),Z=i.computed(()=>({dp__main:!0,dp__theme_dark:a.dark,dp__theme_light:!a.dark,dp__flex_display:C.value.enabled,"dp--flex-display-collapsed":y.value,dp__flex_display_with_input:C.value.input})),be=i.computed(()=>a.dark?"dp__theme_dark":"dp__theme_light"),se=i.computed(()=>a.teleport?{to:typeof a.teleport=="boolean"?"body":a.teleport,disabled:!a.teleport||C.value.enabled}:{}),ce=i.computed(()=>({class:"dp__outer_menu_wrap"})),N=i.computed(()=>C.value.enabled&&(a.timePicker||a.monthPicker||a.yearPicker||a.quarterPicker)),ue=()=>{var ae,ve;return((ve=(ae=v.value)==null?void 0:ae.$el)==null?void 0:ve.getBoundingClientRect())??{width:0,left:0,right:0}},de=()=>{s.value&&(k.value.closeOnScroll?ft():ne())},he=()=>{var ae;s.value&&ne();const ve=((ae=m.value)==null?void 0:ae.$el.getBoundingClientRect().width)??0;y.value=document.body.offsetWidth<=ve},De=ae=>{ae.key==="Tab"&&!C.value.enabled&&!a.teleport&&k.value.tabOutClosesMenu&&(l.value.contains(document.activeElement)||ft()),g.value=ae.shiftKey},$e=ae=>{g.value=ae.shiftKey},Ue=()=>{!a.disabled&&!a.readonly&&(K(D,gm,a),ne(!1),s.value=!0,s.value&&n("open"),s.value||Se(),x(a.modelValue))},at=()=>{var ae,ve;W.value="",Se(),(ae=m.value)==null||ae.onValueCleared(),(ve=v.value)==null||ve.setParsedDate(null),n("update:model-value",null),n("update:model-timezone-value",null),n("cleared"),k.value.closeOnClearValue&&ft()},te=()=>{const ae=ee.value;return!ae||!Array.isArray(ae)&&S(ae)?!0:Array.isArray(ae)?H.value.enabled||ae.length===2&&S(ae[0])&&S(ae[1])?!0:A.value.partialRange&&!a.timePicker?S(ae[0]):!1:!1},ye=()=>{we()&&te()?(z(),ft()):n("invalid-select",ee.value)},He=ae=>{X(),z(),k.value.closeOnAutoApply&&!ae&&ft()},X=()=>{v.value&&P.value.enabled&&v.value.setParsedDate(ee.value)},Ce=(ae=!1)=>{a.autoApply&&R(ee.value)&&te()&&(A.value.enabled&&Array.isArray(ee.value)?(A.value.partialRange||ee.value.length===2)&&He(ae):He(ae))},Se=()=>{P.value.enabled||(ee.value=null)},ft=(ae=!1)=>{var ve,Re;ae&&ee.value&&k.value.setDateOnMenuClose&&ye(),C.value.enabled||(s.value&&(s.value=!1,q.value=!1,b(!1),w(!1),_(),n("closed"),W.value&&x(u.value)),Se(),n("blur"),(Re=(ve=m.value)==null?void 0:ve.$el)==null||Re.remove())},Yt=(ae,ve,Re=!1)=>{if(!ae){ee.value=null;return}const ar=Array.isArray(ae)?!ae.some(Ar=>!S(Ar)):S(ae),Qt=R(ae);ar&&Qt?(f.value=!0,ee.value=ae,ve?(c.value=Re,ye(),n("text-submit")):a.autoApply&&Ce(),i.nextTick().then(()=>{f.value=!1})):n("invalid-date",ae)},on=()=>{a.autoApply&&R(ee.value)&&z(),X()},sn=()=>s.value?ft():Ue(),Mn=ae=>{ee.value=ae},mi=()=>{P.value.enabled&&(h.value=!0,ie()),n("focus")},gi=()=>{if(P.value.enabled&&(h.value=!1,x(a.modelValue),c.value)){const ae=cE(l.value,g.value);ae?.focus()}n("blur")},Yr=ae=>{m.value&&m.value.updateMonthYear(0,{month:qp(ae.month),year:qp(ae.year)})},Ln=ae=>{x(ae??a.modelValue)},re=(ae,ve)=>{var Re;(Re=m.value)==null||Re.switchView(ae,ve)},fe=(ae,ve)=>k.value.onClickOutside?k.value.onClickOutside(ae,ve):ft(!0),Ee=(ae=0)=>{var ve;(ve=m.value)==null||ve.handleFlow(ae)},Ne=()=>p;return rx(p,v,ae=>fe(te,ae)),t({closeMenu:ft,selectDate:ye,clearValue:at,openMenu:Ue,onScroll:de,formatInputValue:ie,updateInternalModelValue:Mn,setMonthYear:Yr,parseModel:Ln,switchView:re,toggleMenu:sn,handleFlow:Ee,getDpWrapMenuRef:Ne}),(ae,ve)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:l,class:i.normalizeClass(Z.value),"data-datepicker-instance":"","data-dp-mobile":i.unref(M)},[i.createVNode(XC,i.mergeProps({ref_key:"inputRef",ref:v,"input-value":i.unref(W),"onUpdate:inputValue":ve[0]||(ve[0]=Re=>i.isRef(W)?W.value=Re:null),"is-menu-open":s.value},ae.$props,{onClear:at,onOpen:Ue,onSetInputDate:Yt,onSetEmptyDate:i.unref(z),onSelectDate:ye,onToggle:sn,onClose:ft,onFocus:mi,onBlur:gi,onRealBlur:ve[1]||(ve[1]=Re=>h.value=!1),onTextInput:ve[2]||(ve[2]=Re=>ae.$emit("text-input",Re))}),i.createSlots({_:2},[i.renderList(i.unref(U),(Re,ar)=>({name:Re,fn:i.withCtx(Qt=>[i.renderSlot(ae.$slots,Re,i.normalizeProps(i.guardReactiveProps(Qt)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(ae.teleport?i.Teleport:"div"),i.normalizeProps(i.guardReactiveProps(se.value)),{default:i.withCtx(()=>[i.createVNode(i.Transition,{name:i.unref(Q)(i.unref(B)),css:i.unref($)&&!i.unref(C).enabled},{default:i.withCtx(()=>[s.value?(i.openBlock(),i.createElementBlock("div",i.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:p},ce.value,{class:{"dp--menu-wrapper":!i.unref(C).enabled},style:i.unref(C).enabled?void 0:i.unref(Y)}),[i.createVNode(gm,i.mergeProps({ref_key:"dpMenuRef",ref:m},ae.$props,{"internal-model-value":i.unref(ee),"onUpdate:internalModelValue":ve[3]||(ve[3]=Re=>i.isRef(ee)?ee.value=Re:null),class:{[be.value]:!0,"dp--menu-wrapper":ae.teleport},"open-on-top":i.unref(B),"no-overlay-focus":N.value,collapse:y.value,"get-input-rect":ue,"is-text-input-date":f.value,onClosePicker:ft,onSelectDate:ye,onAutoApply:Ce,onTimeUpdate:on,onFlowStep:ve[4]||(ve[4]=Re=>ae.$emit("flow-step",Re)),onUpdateMonthYear:ve[5]||(ve[5]=Re=>ae.$emit("update-month-year",Re)),onInvalidSelect:ve[6]||(ve[6]=Re=>ae.$emit("invalid-select",i.unref(ee))),onAutoApplyInvalid:ve[7]||(ve[7]=Re=>ae.$emit("invalid-select",Re)),onInvalidFixedRange:ve[8]||(ve[8]=Re=>ae.$emit("invalid-fixed-range",Re)),onRecalculatePosition:i.unref(ne),onTooltipOpen:ve[9]||(ve[9]=Re=>ae.$emit("tooltip-open",Re)),onTooltipClose:ve[10]||(ve[10]=Re=>ae.$emit("tooltip-close",Re)),onTimePickerOpen:ve[11]||(ve[11]=Re=>ae.$emit("time-picker-open",Re)),onTimePickerClose:ve[12]||(ve[12]=Re=>ae.$emit("time-picker-close",Re)),onAmPmChange:ve[13]||(ve[13]=Re=>ae.$emit("am-pm-change",Re)),onRangeStart:ve[14]||(ve[14]=Re=>ae.$emit("range-start",Re)),onRangeEnd:ve[15]||(ve[15]=Re=>ae.$emit("range-end",Re)),onDateUpdate:ve[16]||(ve[16]=Re=>ae.$emit("date-update",Re)),onInvalidDate:ve[17]||(ve[17]=Re=>ae.$emit("invalid-date",Re)),onOverlayToggle:ve[18]||(ve[18]=Re=>ae.$emit("overlay-toggle",Re)),onMenuBlur:ve[19]||(ve[19]=Re=>ae.$emit("blur"))}),i.createSlots({_:2},[i.renderList(i.unref(I),(Re,ar)=>({name:Re,fn:i.withCtx(Qt=>[i.renderSlot(ae.$slots,Re,i.normalizeProps(i.guardReactiveProps({...Qt})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):i.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],10,nx))}}),ym=(()=>{const e=ax;return e.install=t=>{t.component("Vue3DatePicker",e)},e})();Object.entries(Object.freeze(Object.defineProperty({__proto__:null,default:ym},Symbol.toStringTag,{value:"Module"}))).forEach(([e,t])=>{e!=="default"&&(ym[e]=t)});var ix=Object.defineProperty,vm=Object.getOwnPropertySymbols,ox=Object.prototype.hasOwnProperty,sx=Object.prototype.propertyIsEnumerable,bm=(e,t,r)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lx=(e,t)=>{for(var r in t||(t={}))ox.call(t,r)&&bm(e,r,t[r]);if(vm)for(var r of vm(t))sx.call(t,r)&&bm(e,r,t[r]);return e};const wm=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},ux={},cx={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},dx=i.createElementVNode("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),fx=[dx];function hx(e,t){return i.openBlock(),i.createElementBlock("svg",cx,fx)}const px=wm(ux,[["render",hx]]),mx={},gx={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},yx=i.createElementVNode("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),vx=[yx];function bx(e,t){return i.openBlock(),i.createElementBlock("svg",gx,vx)}lx({},{Deselect:px,OpenIndicator:wm(mx,[["render",bx]])});var vr={},Su=function(e,t){return Su=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Su(e,t)};function _m(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Su(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Xi=function(){return Xi=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Xi.apply(this,arguments)};function Sm(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Rm(e,t,r,n){var a=arguments.length,o=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(o=(a<3?s(o):a>3?s(t,r,o):s(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o}function Pm(e,t){return function(r,n){t(r,n,e)}}function Om(e,t,r,n,a,o){function s(f){if(f!==void 0&&typeof f!="function")throw new TypeError("Function expected");return f}for(var u=n.kind,d=u==="getter"?"get":u==="setter"?"set":"value",p=!t&&e?n.static?e:e.prototype:null,m=t||(p?Object.getOwnPropertyDescriptor(p,n.name):{}),v,h=!1,l=r.length-1;l>=0;l--){var c={};for(var g in n)c[g]=g==="access"?{}:n[g];for(var g in n.access)c.access[g]=n.access[g];c.addInitializer=function(f){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(f||null))};var y=(0,r[l])(u==="accessor"?{get:m.get,set:m.set}:m[d],c);if(u==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(v=s(y.get))&&(m.get=v),(v=s(y.set))&&(m.set=v),(v=s(y.init))&&a.unshift(v)}else(v=s(y))&&(u==="field"?a.unshift(v):m[d]=v)}p&&Object.defineProperty(p,n.name,m),h=!0}function Em(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0}function Cm(e){return typeof e=="symbol"?e:"".concat(e)}function xm(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Tm(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function km(e,t,r,n){function a(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(m){try{p(n.next(m))}catch(v){s(v)}}function d(m){try{p(n.throw(m))}catch(v){s(v)}}function p(m){m.done?o(m.value):a(m.value).then(u,d)}p((n=n.apply(e,t||[])).next())})}function Am(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(p){return function(m){return d([p,m])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(r=0)),r;)try{if(n=1,a&&(o=p[0]&2?a.return:p[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,p[1])).done)return o;switch(a=0,o&&(p=[p[0]&2,o.value]),p[0]){case 0:case 1:o=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,a=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){r.label=p[1];break}if(p[0]===6&&r.label<o[1]){r.label=o[1],o=p;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(p);break}o[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(m){p=[6,m],a=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}var Zi=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});function jm(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Zi(t,e,r)}function eo(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ru(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,o=[],s;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){s={error:u}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function $m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ru(arguments[t]));return e}function Dm(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,a++)n[a]=o[s];return n}function Nm(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function In(e){return this instanceof In?(this.v=e,this):new In(e)}function Fm(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),a,o=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),a[Symbol.asyncIterator]=function(){return this},a;function s(l){return function(c){return Promise.resolve(c).then(l,v)}}function u(l,c){n[l]&&(a[l]=function(g){return new Promise(function(y,f){o.push([l,g,y,f])>1||d(l,g)})},c&&(a[l]=c(a[l])))}function d(l,c){try{p(n[l](c))}catch(g){h(o[0][3],g)}}function p(l){l.value instanceof In?Promise.resolve(l.value.v).then(m,v):h(o[0][2],l)}function m(l){d("next",l)}function v(l){d("throw",l)}function h(l,c){l(c),o.shift(),o.length&&d(o[0][0],o[0][1])}}function Im(e){var t,r;return t={},n("next"),n("throw",function(a){throw a}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(a,o){t[a]=e[a]?function(s){return(r=!r)?{value:In(e[a](s)),done:!1}:o?o(s):s}:o}}function Mm(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof eo=="function"?eo(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(u,d){s=e[o](s),a(u,d,s.done,s.value)})}}function a(o,s,u,d){Promise.resolve(d).then(function(p){o({value:p,done:u})},s)}}function Lm(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var wx=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Pu=function(e){return Pu=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Pu(e)};function Bm(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Pu(e),n=0;n<r.length;n++)r[n]!=="default"&&Zi(t,e,r[n]);return wx(t,e),t}function Hm(e){return e&&e.__esModule?e:{default:e}}function Vm(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function qm(e,t,r,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r}function Um(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Wm(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,a;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(a=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");a&&(n=function(){try{a.call(this)}catch(o){return Promise.reject(o)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var _x=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function zm(e){function t(o){e.error=e.hasError?new _x(o,e.error,"An error was suppressed during disposal."):o,e.hasError=!0}var r,n=0;function a(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(a);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(a,function(s){return t(s),a()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a()}function Ym(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,a,o,s){return n?t?".jsx":".js":a&&(!o||!s)?r:a+o+"."+s.toLowerCase()+"js"}):e}const Oe=ed(Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Wm,get __assign(){return Xi},__asyncDelegator:Im,__asyncGenerator:Fm,__asyncValues:Mm,__await:In,__awaiter:km,__classPrivateFieldGet:Vm,__classPrivateFieldIn:Um,__classPrivateFieldSet:qm,__createBinding:Zi,__decorate:Rm,__disposeResources:zm,__esDecorate:Om,__exportStar:jm,__extends:_m,__generator:Am,__importDefault:Hm,__importStar:Bm,__makeTemplateObject:Lm,__metadata:Tm,__param:Pm,__propKey:Cm,__read:Ru,__rest:Sm,__rewriteRelativeImportExtension:Ym,__runInitializers:Em,__setFunctionName:xm,__spread:$m,__spreadArray:Nm,__spreadArrays:Dm,__values:eo,default:{__extends:_m,__assign:Xi,__rest:Sm,__decorate:Rm,__param:Pm,__esDecorate:Om,__runInitializers:Em,__propKey:Cm,__setFunctionName:xm,__metadata:Tm,__awaiter:km,__generator:Am,__createBinding:Zi,__exportStar:jm,__values:eo,__read:Ru,__spread:$m,__spreadArrays:Dm,__spreadArray:Nm,__await:In,__asyncGenerator:Fm,__asyncDelegator:Im,__asyncValues:Mm,__makeTemplateObject:Lm,__importStar:Bm,__importDefault:Hm,__classPrivateFieldGet:Vm,__classPrivateFieldSet:qm,__classPrivateFieldIn:Um,__addDisposableResource:Wm,__disposeResources:zm,__rewriteRelativeImportExtension:Ym}},Symbol.toStringTag,{value:"Module"})));var to={},ro={},no={exports:{}},Sx=no.exports,Qm;function Rx(){return Qm||(Qm=1,(function(e){(function(t,r){e.exports?e.exports=r():t.log=r()})(Sx,function(){var t=function(){},r="undefined",n=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"],o={},s=null;function u(g,y){var f=g[y];if(typeof f.bind=="function")return f.bind(g);try{return Function.prototype.bind.call(f,g)}catch{return function(){return Function.prototype.apply.apply(f,[g,arguments])}}}function d(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function p(g){return g==="debug"&&(g="log"),typeof console===r?!1:g==="trace"&&n?d:console[g]!==void 0?u(console,g):console.log!==void 0?u(console,"log"):t}function m(){for(var g=this.getLevel(),y=0;y<a.length;y++){var f=a[y];this[f]=y<g?t:this.methodFactory(f,g,this.name)}if(this.log=this.debug,typeof console===r&&g<this.levels.SILENT)return"No console available for logging"}function v(g){return function(){typeof console!==r&&(m.call(this),this[g].apply(this,arguments))}}function h(g,y,f){return p(g)||v.apply(this,arguments)}function l(g,y){var f=this,b,w,_,S="loglevel";typeof g=="string"?S+=":"+g:typeof g=="symbol"&&(S=void 0);function R(A){var H=(a[A]||"silent").toUpperCase();if(!(typeof window===r||!S)){try{window.localStorage[S]=H;return}catch{}try{window.document.cookie=encodeURIComponent(S)+"="+H+";"}catch{}}}function O(){var A;if(!(typeof window===r||!S)){try{A=window.localStorage[S]}catch{}if(typeof A===r)try{var H=window.document.cookie,Q=encodeURIComponent(S),$=H.indexOf(Q+"=");$!==-1&&(A=/^([^;]+)/.exec(H.slice($+Q.length+1))[1])}catch{}return f.levels[A]===void 0&&(A=void 0),A}}function P(){if(!(typeof window===r||!S)){try{window.localStorage.removeItem(S)}catch{}try{window.document.cookie=encodeURIComponent(S)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function C(A){var H=A;if(typeof H=="string"&&f.levels[H.toUpperCase()]!==void 0&&(H=f.levels[H.toUpperCase()]),typeof H=="number"&&H>=0&&H<=f.levels.SILENT)return H;throw new TypeError("log.setLevel() called with invalid level: "+A)}f.name=g,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=y||h,f.getLevel=function(){return _??w??b},f.setLevel=function(A,H){return _=C(A),H!==!1&&R(_),m.call(f)},f.setDefaultLevel=function(A){w=C(A),O()||f.setLevel(A,!1)},f.resetLevel=function(){_=null,P(),m.call(f)},f.enableAll=function(A){f.setLevel(f.levels.TRACE,A)},f.disableAll=function(A){f.setLevel(f.levels.SILENT,A)},f.rebuild=function(){if(s!==f&&(b=C(s.getLevel())),m.call(f),s===f)for(var A in o)o[A].rebuild()},b=C(s?s.getLevel():"WARN");var k=O();k!=null&&(_=C(k)),m.call(f)}s=new l,s.getLogger=function(y){if(typeof y!="symbol"&&typeof y!="string"||y==="")throw new TypeError("You must supply a name when creating a logger.");var f=o[y];return f||(f=o[y]=new l(y,s.methodFactory)),f};var c=typeof window!==r?window.log:void 0;return s.noConflict=function(){return typeof window!==r&&window.log===s&&(window.log=c),s},s.getLoggers=function(){return o},s.default=s,s})})(no)),no.exports}var nt={},ao={},io={},Km;function nr(){if(Km)return io;Km=1,Object.defineProperty(io,"__esModule",{value:!0});var e=Oe,t=(function(r){e.__extends(n,r);function n(a,o,s){var u=this.constructor,d=r.call(this,a)||this;return d.name=u.name,d.httpBody=o,d.httpStatus=s,Object.setPrototypeOf(d,u.prototype),d}return n})(Error);return io.default=t,io}var Gm;function Px(){if(Gm)return ao;Gm=1,Object.defineProperty(ao,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return ao.default=r,ao}var oo={},Jm;function Ox(){if(Jm)return oo;Jm=1,Object.defineProperty(oo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return oo.default=r,oo}var so={},Xm;function Ex(){if(Xm)return so;Xm=1,Object.defineProperty(so,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return so.default=r,so}var lo={},Zm;function Cx(){if(Zm)return lo;Zm=1,Object.defineProperty(lo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return lo.default=r,lo}var uo={},eg;function xx(){if(eg)return uo;eg=1,Object.defineProperty(uo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return uo.default=r,uo}var co={},tg;function Tx(){if(tg)return co;tg=1,Object.defineProperty(co,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return co.default=r,co}var fo={},rg;function kx(){if(rg)return fo;rg=1,Object.defineProperty(fo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return fo.default=r,fo}var ho={},ng;function Ax(){if(ng)return ho;ng=1,Object.defineProperty(ho,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return a})(t.default);return ho.default=r,ho}var po={},ag;function jx(){if(ag)return po;ag=1,Object.defineProperty(po,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(nr()),r=(function(n){e.__extends(a,n);function a(o,s,u){var d=n.call(this,o)||this;return d.importResults=s,d.payload=u,d}return a})(t.default);return po.default=r,po}var ig;function ti(){if(ig)return nt;ig=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.ImportError=nt.TypesenseError=nt.ServerError=nt.RequestUnauthorized=nt.RequestMalformed=nt.ObjectUnprocessable=nt.ObjectNotFound=nt.ObjectAlreadyExists=nt.MissingConfigurationError=nt.HTTPError=void 0;var e=Oe,t=e.__importDefault(Px());nt.HTTPError=t.default;var r=e.__importDefault(Ox());nt.MissingConfigurationError=r.default;var n=e.__importDefault(Ex());nt.ObjectAlreadyExists=n.default;var a=e.__importDefault(Cx());nt.ObjectNotFound=a.default;var o=e.__importDefault(xx());nt.ObjectUnprocessable=o.default;var s=e.__importDefault(Tx());nt.RequestMalformed=s.default;var u=e.__importDefault(kx());nt.RequestUnauthorized=u.default;var d=e.__importDefault(Ax());nt.ServerError=d.default;var p=e.__importDefault(jx());nt.ImportError=p.default;var m=e.__importDefault(nr());return nt.TypesenseError=m.default,nt}var og;function sg(){if(og)return ro;og=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=Oe,t=e.__importStar(Rx()),r=ti(),n=(function(){function a(o){var s=this;this.nodes=o.nodes||[],this.nodes=this.nodes.map(function(u){return s.setDefaultPathInNode(u)}).map(function(u){return s.setDefaultPortInNode(u)}).map(function(u){return e.__assign({},u)}),o.randomizeNodes==null&&(o.randomizeNodes=!0),o.randomizeNodes===!0&&this.shuffleArray(this.nodes),this.nearestNode=o.nearestNode,this.nearestNode=this.setDefaultPathInNode(this.nearestNode),this.nearestNode=this.setDefaultPortInNode(this.nearestNode),this.connectionTimeoutSeconds=o.connectionTimeoutSeconds||o.timeoutSeconds||5,this.healthcheckIntervalSeconds=o.healthcheckIntervalSeconds||60,this.numRetries=(o.numRetries!==void 0&&o.numRetries>=0?o.numRetries:this.nodes.length+(this.nearestNode==null?0:1))||3,this.retryIntervalSeconds=o.retryIntervalSeconds||.1,this.apiKey=o.apiKey,this.sendApiKeyAsQueryParam=o.sendApiKeyAsQueryParam,this.cacheSearchResultsForSeconds=o.cacheSearchResultsForSeconds||0,this.useServerSideSearchCache=o.useServerSideSearchCache||!1,this.axiosAdapter=o.axiosAdapter,this.logger=o.logger||t,this.logLevel=o.logLevel||"warn",this.logger.setLevel(this.logLevel),this.additionalHeaders=o.additionalHeaders,this.httpAgent=o.httpAgent,this.httpsAgent=o.httpsAgent,this.paramsSerializer=o.paramsSerializer,this.showDeprecationWarnings(o),this.validate()}return a.prototype.validate=function(){if(this.nodes==null||this.nodes.length===0||this.validateNodes())throw new r.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(this.nearestNode!=null&&this.isNodeMissingAnyParameters(this.nearestNode))throw new r.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(this.apiKey==null)throw new r.MissingConfigurationError("Ensure that apiKey is set");return!0},a.prototype.validateNodes=function(){var o=this;return this.nodes.some(function(s){return o.isNodeMissingAnyParameters(s)})},a.prototype.isNodeMissingAnyParameters=function(o){return!["protocol","host","port","path"].every(function(s){return o.hasOwnProperty(s)})&&o.url==null},a.prototype.setDefaultPathInNode=function(o){return o!=null&&!o.hasOwnProperty("path")&&(o.path=""),o},a.prototype.setDefaultPortInNode=function(o){if(o!=null&&!o.hasOwnProperty("port")&&o.hasOwnProperty("protocol"))switch(o.protocol){case"https":o.port=443;break;case"http":o.port=80;break}return o},a.prototype.showDeprecationWarnings=function(o){o.timeoutSeconds&&this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"),o.masterNode&&this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"),o.readReplicaNodes&&this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12")},a.prototype.shuffleArray=function(o){for(var s,u=o.length-1;u>0;u--){var d=Math.floor(Math.random()*(u+1));s=[o[d],o[u]],o[u]=s[0],o[d]=s[1]}},a})();return ro.default=n,ro}var mo={};/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */var Ou,lg;function $x(){if(lg)return Ou;lg=1;function e(E,T){return function(){return E.apply(T,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:n,toStringTag:a}=Symbol,o=(E=>T=>{const j=t.call(T);return E[j]||(E[j]=j.slice(8,-1).toLowerCase())})(Object.create(null)),s=E=>(E=E.toLowerCase(),T=>o(T)===E),u=E=>T=>typeof T===E,{isArray:d}=Array,p=u("undefined");function m(E){return E!==null&&!p(E)&&E.constructor!==null&&!p(E.constructor)&&c(E.constructor.isBuffer)&&E.constructor.isBuffer(E)}const v=s("ArrayBuffer");function h(E){let T;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?T=ArrayBuffer.isView(E):T=E&&E.buffer&&v(E.buffer),T}const l=u("string"),c=u("function"),g=u("number"),y=E=>E!==null&&typeof E=="object",f=E=>E===!0||E===!1,b=E=>{if(o(E)!=="object")return!1;const T=r(E);return(T===null||T===Object.prototype||Object.getPrototypeOf(T)===null)&&!(a in E)&&!(n in E)},w=E=>{if(!y(E)||m(E))return!1;try{return Object.keys(E).length===0&&Object.getPrototypeOf(E)===Object.prototype}catch{return!1}},_=s("Date"),S=s("File"),R=s("Blob"),O=s("FileList"),P=E=>y(E)&&c(E.pipe),C=E=>{let T;return E&&(typeof FormData=="function"&&E instanceof FormData||c(E.append)&&((T=o(E))==="formdata"||T==="object"&&c(E.toString)&&E.toString()==="[object FormData]"))},k=s("URLSearchParams"),[A,H,Q,$]=["ReadableStream","Request","Response","Headers"].map(s),M=E=>E.trim?E.trim():E.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function D(E,T,{allOwnKeys:j=!1}={}){if(E===null||typeof E>"u")return;let F,V;if(typeof E!="object"&&(E=[E]),d(E))for(F=0,V=E.length;F<V;F++)T.call(null,E[F],F,E);else{if(m(E))return;const J=j?Object.getOwnPropertyNames(E):Object.keys(E),G=J.length;let oe;for(F=0;F<G;F++)oe=J[F],T.call(null,E[oe],oe,E)}}function I(E,T){if(m(E))return null;T=T.toLowerCase();const j=Object.keys(E);let F=j.length,V;for(;F-- >0;)if(V=j[F],T===V.toLowerCase())return V;return null}const U=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:$b,B=E=>!p(E)&&E!==U;function Y(){const{caseless:E,skipUndefined:T}=B(this)&&this||{},j={},F=(V,J)=>{const G=E&&I(j,J)||J;b(j[G])&&b(V)?j[G]=Y(j[G],V):b(V)?j[G]=Y({},V):d(V)?j[G]=V.slice():(!T||!p(V))&&(j[G]=V)};for(let V=0,J=arguments.length;V<J;V++)arguments[V]&&D(arguments[V],F);return j}const q=(E,T,j,{allOwnKeys:F}={})=>(D(T,(V,J)=>{j&&c(V)?E[J]=e(V,j):E[J]=V},{allOwnKeys:F}),E),ne=E=>(E.charCodeAt(0)===65279&&(E=E.slice(1)),E),L=(E,T,j,F)=>{E.prototype=Object.create(T.prototype,F),E.prototype.constructor=E,Object.defineProperty(E,"super",{value:T.prototype}),j&&Object.assign(E.prototype,j)},K=(E,T,j,F)=>{let V,J,G;const oe={};if(T=T||{},E==null)return T;do{for(V=Object.getOwnPropertyNames(E),J=V.length;J-- >0;)G=V[J],(!F||F(G,E,T))&&!oe[G]&&(T[G]=E[G],oe[G]=!0);E=j!==!1&&r(E)}while(E&&(!j||j(E,T))&&E!==Object.prototype);return T},W=(E,T,j)=>{E=String(E),(j===void 0||j>E.length)&&(j=E.length),j-=T.length;const F=E.indexOf(T,j);return F!==-1&&F===j},ee=E=>{if(!E)return null;if(d(E))return E;let T=E.length;if(!g(T))return null;const j=new Array(T);for(;T-- >0;)j[T]=E[T];return j},x=(E=>T=>E&&T instanceof E)(typeof Uint8Array<"u"&&r(Uint8Array)),z=(E,T)=>{const F=(E&&E[n]).call(E);let V;for(;(V=F.next())&&!V.done;){const J=V.value;T.call(E,J[0],J[1])}},ie=(E,T)=>{let j;const F=[];for(;(j=E.exec(T))!==null;)F.push(j);return F},we=s("HTMLFormElement"),Z=E=>E.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(j,F,V){return F.toUpperCase()+V}),be=(({hasOwnProperty:E})=>(T,j)=>E.call(T,j))(Object.prototype),se=s("RegExp"),ce=(E,T)=>{const j=Object.getOwnPropertyDescriptors(E),F={};D(j,(V,J)=>{let G;(G=T(V,J,E))!==!1&&(F[J]=G||V)}),Object.defineProperties(E,F)},N=E=>{ce(E,(T,j)=>{if(c(E)&&["arguments","caller","callee"].indexOf(j)!==-1)return!1;const F=E[j];if(c(F)){if(T.enumerable=!1,"writable"in T){T.writable=!1;return}T.set||(T.set=()=>{throw Error("Can not rewrite read-only method '"+j+"'")})}})},ue=(E,T)=>{const j={},F=V=>{V.forEach(J=>{j[J]=!0})};return d(E)?F(E):F(String(E).split(T)),j},de=()=>{},he=(E,T)=>E!=null&&Number.isFinite(E=+E)?E:T;function De(E){return!!(E&&c(E.append)&&E[a]==="FormData"&&E[n])}const $e=E=>{const T=new Array(10),j=(F,V)=>{if(y(F)){if(T.indexOf(F)>=0)return;if(m(F))return F;if(!("toJSON"in F)){T[V]=F;const J=d(F)?[]:{};return D(F,(G,oe)=>{const _e=j(G,V+1);!p(_e)&&(J[oe]=_e)}),T[V]=void 0,J}}return F};return j(E,0)},Ue=s("AsyncFunction"),at=E=>E&&(y(E)||c(E))&&c(E.then)&&c(E.catch),te=((E,T)=>E?setImmediate:T?((j,F)=>(U.addEventListener("message",({source:V,data:J})=>{V===U&&J===j&&F.length&&F.shift()()},!1),V=>{F.push(V),U.postMessage(j,"*")}))(`axios@${Math.random()}`,[]):j=>setTimeout(j))(typeof setImmediate=="function",c(U.postMessage)),ye=typeof queueMicrotask<"u"?queueMicrotask.bind(U):typeof process<"u"&&process.nextTick||te;var X={isArray:d,isArrayBuffer:v,isBuffer:m,isFormData:C,isArrayBufferView:h,isString:l,isNumber:g,isBoolean:f,isObject:y,isPlainObject:b,isEmptyObject:w,isReadableStream:A,isRequest:H,isResponse:Q,isHeaders:$,isUndefined:p,isDate:_,isFile:S,isBlob:R,isRegExp:se,isFunction:c,isStream:P,isURLSearchParams:k,isTypedArray:x,isFileList:O,forEach:D,merge:Y,extend:q,trim:M,stripBOM:ne,inherits:L,toFlatObject:K,kindOf:o,kindOfTest:s,endsWith:W,toArray:ee,forEachEntry:z,matchAll:ie,isHTMLForm:we,hasOwnProperty:be,hasOwnProp:be,reduceDescriptors:ce,freezeMethods:N,toObjectSet:ue,toCamelCase:Z,noop:de,toFiniteNumber:he,findKey:I,global:U,isContextDefined:B,isSpecCompliantForm:De,toJSONObject:$e,isAsyncFn:Ue,isThenable:at,setImmediate:te,asap:ye,isIterable:E=>E!=null&&c(E[n])};function Ce(E,T,j,F,V){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=E,this.name="AxiosError",T&&(this.code=T),j&&(this.config=j),F&&(this.request=F),V&&(this.response=V,this.status=V.status?V.status:null)}X.inherits(Ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.status}}});const Se=Ce.prototype,ft={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(E=>{ft[E]={value:E}}),Object.defineProperties(Ce,ft),Object.defineProperty(Se,"isAxiosError",{value:!0}),Ce.from=(E,T,j,F,V,J)=>{const G=Object.create(Se);X.toFlatObject(E,G,function(pe){return pe!==Error.prototype},ge=>ge!=="isAxiosError");const oe=E&&E.message?E.message:"Error",_e=T==null&&E?E.code:T;return Ce.call(G,oe,_e,j,F,V),E&&G.cause==null&&Object.defineProperty(G,"cause",{value:E,configurable:!0}),G.name=E&&E.name||"Error",J&&Object.assign(G,J),G};var Yt=null;function on(E){return X.isPlainObject(E)||X.isArray(E)}function sn(E){return X.endsWith(E,"[]")?E.slice(0,-2):E}function Mn(E,T,j){return E?E.concat(T).map(function(V,J){return V=sn(V),!j&&J?"["+V+"]":V}).join(j?".":""):T}function mi(E){return X.isArray(E)&&!E.some(on)}const gi=X.toFlatObject(X,{},null,function(T){return/^is[A-Z]/.test(T)});function Yr(E,T,j){if(!X.isObject(E))throw new TypeError("target must be an object");T=T||new FormData,j=X.toFlatObject(j,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Ae,Pe){return!X.isUndefined(Pe[Ae])});const F=j.metaTokens,V=j.visitor||pe,J=j.dots,G=j.indexes,_e=(j.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(T);if(!X.isFunction(V))throw new TypeError("visitor must be a function");function ge(me){if(me===null)return"";if(X.isDate(me))return me.toISOString();if(X.isBoolean(me))return me.toString();if(!_e&&X.isBlob(me))throw new Ce("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(me)||X.isTypedArray(me)?_e&&typeof Blob=="function"?new Blob([me]):Buffer.from(me):me}function pe(me,Ae,Pe){let mt=me;if(me&&!Pe&&typeof me=="object"){if(X.endsWith(Ae,"{}"))Ae=F?Ae:Ae.slice(0,-2),me=JSON.stringify(me);else if(X.isArray(me)&&mi(me)||(X.isFileList(me)||X.endsWith(Ae,"[]"))&&(mt=X.toArray(me)))return Ae=sn(Ae),mt.forEach(function(wt,Lt){!(X.isUndefined(wt)||wt===null)&&T.append(G===!0?Mn([Ae],Lt,J):G===null?Ae:Ae+"[]",ge(wt))}),!1}return on(me)?!0:(T.append(Mn(Pe,Ae,J),ge(me)),!1)}const xe=[],Xe=Object.assign(gi,{defaultVisitor:pe,convertValue:ge,isVisitable:on});function Tt(me,Ae){if(!X.isUndefined(me)){if(xe.indexOf(me)!==-1)throw Error("Circular reference detected in "+Ae.join("."));xe.push(me),X.forEach(me,function(mt,Kt){(!(X.isUndefined(mt)||mt===null)&&V.call(T,mt,X.isString(Kt)?Kt.trim():Kt,Ae,Xe))===!0&&Tt(mt,Ae?Ae.concat(Kt):[Kt])}),xe.pop()}}if(!X.isObject(E))throw new TypeError("data must be an object");return Tt(E),T}function Ln(E){const T={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(E).replace(/[!'()~]|%20|%00/g,function(F){return T[F]})}function re(E,T){this._pairs=[],E&&Yr(E,this,T)}const fe=re.prototype;fe.append=function(T,j){this._pairs.push([T,j])},fe.toString=function(T){const j=T?function(F){return T.call(this,F,Ln)}:Ln;return this._pairs.map(function(V){return j(V[0])+"="+j(V[1])},"").join("&")};function Ee(E){return encodeURIComponent(E).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ne(E,T,j){if(!T)return E;const F=j&&j.encode||Ee;X.isFunction(j)&&(j={serialize:j});const V=j&&j.serialize;let J;if(V?J=V(T,j):J=X.isURLSearchParams(T)?T.toString():new re(T,j).toString(F),J){const G=E.indexOf("#");G!==-1&&(E=E.slice(0,G)),E+=(E.indexOf("?")===-1?"?":"&")+J}return E}class ae{constructor(){this.handlers=[]}use(T,j,F){return this.handlers.push({fulfilled:T,rejected:j,synchronous:F?F.synchronous:!1,runWhen:F?F.runWhen:null}),this.handlers.length-1}eject(T){this.handlers[T]&&(this.handlers[T]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(T){X.forEach(this.handlers,function(F){F!==null&&T(F)})}}var ve=ae,Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ar=typeof URLSearchParams<"u"?URLSearchParams:re,Qt=typeof FormData<"u"?FormData:null,Ar=typeof Blob<"u"?Blob:null,br={isBrowser:!0,classes:{URLSearchParams:ar,FormData:Qt,Blob:Ar},protocols:["http","https","file","blob","url","data"]};const ln=typeof window<"u"&&typeof document<"u",yi=typeof navigator=="object"&&navigator||void 0,qk=ln&&(!yi||["ReactNative","NativeScript","NS"].indexOf(yi.product)<0),Uk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wk=ln&&window.location.href||"http://localhost";var zk=Object.freeze({__proto__:null,hasBrowserEnv:ln,hasStandardBrowserWebWorkerEnv:Uk,hasStandardBrowserEnv:qk,navigator:yi,origin:Wk}),xt={...zk,...br};function Yk(E,T){return Yr(E,new xt.classes.URLSearchParams,{visitor:function(j,F,V,J){return xt.isNode&&X.isBuffer(j)?(this.append(F,j.toString("base64")),!1):J.defaultVisitor.apply(this,arguments)},...T})}function Qk(E){return X.matchAll(/\w+|\[(\w*)]/g,E).map(T=>T[0]==="[]"?"":T[1]||T[0])}function Kk(E){const T={},j=Object.keys(E);let F;const V=j.length;let J;for(F=0;F<V;F++)J=j[F],T[J]=E[J];return T}function hv(E){function T(j,F,V,J){let G=j[J++];if(G==="__proto__")return!0;const oe=Number.isFinite(+G),_e=J>=j.length;return G=!G&&X.isArray(V)?V.length:G,_e?(X.hasOwnProp(V,G)?V[G]=[V[G],F]:V[G]=F,!oe):((!V[G]||!X.isObject(V[G]))&&(V[G]=[]),T(j,F,V[G],J)&&X.isArray(V[G])&&(V[G]=Kk(V[G])),!oe)}if(X.isFormData(E)&&X.isFunction(E.entries)){const j={};return X.forEachEntry(E,(F,V)=>{T(Qk(F),V,j,0)}),j}return null}function Gk(E,T,j){if(X.isString(E))try{return(T||JSON.parse)(E),X.trim(E)}catch(F){if(F.name!=="SyntaxError")throw F}return(j||JSON.stringify)(E)}const ac={transitional:Re,adapter:["xhr","http","fetch"],transformRequest:[function(T,j){const F=j.getContentType()||"",V=F.indexOf("application/json")>-1,J=X.isObject(T);if(J&&X.isHTMLForm(T)&&(T=new FormData(T)),X.isFormData(T))return V?JSON.stringify(hv(T)):T;if(X.isArrayBuffer(T)||X.isBuffer(T)||X.isStream(T)||X.isFile(T)||X.isBlob(T)||X.isReadableStream(T))return T;if(X.isArrayBufferView(T))return T.buffer;if(X.isURLSearchParams(T))return j.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),T.toString();let oe;if(J){if(F.indexOf("application/x-www-form-urlencoded")>-1)return Yk(T,this.formSerializer).toString();if((oe=X.isFileList(T))||F.indexOf("multipart/form-data")>-1){const _e=this.env&&this.env.FormData;return Yr(oe?{"files[]":T}:T,_e&&new _e,this.formSerializer)}}return J||V?(j.setContentType("application/json",!1),Gk(T)):T}],transformResponse:[function(T){const j=this.transitional||ac.transitional,F=j&&j.forcedJSONParsing,V=this.responseType==="json";if(X.isResponse(T)||X.isReadableStream(T))return T;if(T&&X.isString(T)&&(F&&!this.responseType||V)){const G=!(j&&j.silentJSONParsing)&&V;try{return JSON.parse(T,this.parseReviver)}catch(oe){if(G)throw oe.name==="SyntaxError"?Ce.from(oe,Ce.ERR_BAD_RESPONSE,this,null,this.response):oe}}return T}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(T){return T>=200&&T<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],E=>{ac.headers[E]={}});var ic=ac;const Jk=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Xk=E=>{const T={};let j,F,V;return E&&E.split(`
|
|
162
|
+
`).forEach(function(G){V=G.indexOf(":"),j=G.substring(0,V).trim().toLowerCase(),F=G.substring(V+1).trim(),!(!j||T[j]&&Jk[j])&&(j==="set-cookie"?T[j]?T[j].push(F):T[j]=[F]:T[j]=T[j]?T[j]+", "+F:F)}),T};const pv=Symbol("internals");function vi(E){return E&&String(E).trim().toLowerCase()}function Zo(E){return E===!1||E==null?E:X.isArray(E)?E.map(Zo):String(E)}function Zk(E){const T=Object.create(null),j=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let F;for(;F=j.exec(E);)T[F[1]]=F[2];return T}const eA=E=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(E.trim());function oc(E,T,j,F,V){if(X.isFunction(F))return F.call(this,T,j);if(V&&(T=j),!!X.isString(T)){if(X.isString(F))return T.indexOf(F)!==-1;if(X.isRegExp(F))return F.test(T)}}function tA(E){return E.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(T,j,F)=>j.toUpperCase()+F)}function rA(E,T){const j=X.toCamelCase(" "+T);["get","set","has"].forEach(F=>{Object.defineProperty(E,F+j,{value:function(V,J,G){return this[F].call(this,T,V,J,G)},configurable:!0})})}class es{constructor(T){T&&this.set(T)}set(T,j,F){const V=this;function J(oe,_e,ge){const pe=vi(_e);if(!pe)throw new Error("header name must be a non-empty string");const xe=X.findKey(V,pe);(!xe||V[xe]===void 0||ge===!0||ge===void 0&&V[xe]!==!1)&&(V[xe||_e]=Zo(oe))}const G=(oe,_e)=>X.forEach(oe,(ge,pe)=>J(ge,pe,_e));if(X.isPlainObject(T)||T instanceof this.constructor)G(T,j);else if(X.isString(T)&&(T=T.trim())&&!eA(T))G(Xk(T),j);else if(X.isObject(T)&&X.isIterable(T)){let oe={},_e,ge;for(const pe of T){if(!X.isArray(pe))throw TypeError("Object iterator must return a key-value pair");oe[ge=pe[0]]=(_e=oe[ge])?X.isArray(_e)?[..._e,pe[1]]:[_e,pe[1]]:pe[1]}G(oe,j)}else T!=null&&J(j,T,F);return this}get(T,j){if(T=vi(T),T){const F=X.findKey(this,T);if(F){const V=this[F];if(!j)return V;if(j===!0)return Zk(V);if(X.isFunction(j))return j.call(this,V,F);if(X.isRegExp(j))return j.exec(V);throw new TypeError("parser must be boolean|regexp|function")}}}has(T,j){if(T=vi(T),T){const F=X.findKey(this,T);return!!(F&&this[F]!==void 0&&(!j||oc(this,this[F],F,j)))}return!1}delete(T,j){const F=this;let V=!1;function J(G){if(G=vi(G),G){const oe=X.findKey(F,G);oe&&(!j||oc(F,F[oe],oe,j))&&(delete F[oe],V=!0)}}return X.isArray(T)?T.forEach(J):J(T),V}clear(T){const j=Object.keys(this);let F=j.length,V=!1;for(;F--;){const J=j[F];(!T||oc(this,this[J],J,T,!0))&&(delete this[J],V=!0)}return V}normalize(T){const j=this,F={};return X.forEach(this,(V,J)=>{const G=X.findKey(F,J);if(G){j[G]=Zo(V),delete j[J];return}const oe=T?tA(J):String(J).trim();oe!==J&&delete j[J],j[oe]=Zo(V),F[oe]=!0}),this}concat(...T){return this.constructor.concat(this,...T)}toJSON(T){const j=Object.create(null);return X.forEach(this,(F,V)=>{F!=null&&F!==!1&&(j[V]=T&&X.isArray(F)?F.join(", "):F)}),j}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([T,j])=>T+": "+j).join(`
|
|
163
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(T){return T instanceof this?T:new this(T)}static concat(T,...j){const F=new this(T);return j.forEach(V=>F.set(V)),F}static accessor(T){const F=(this[pv]=this[pv]={accessors:{}}).accessors,V=this.prototype;function J(G){const oe=vi(G);F[oe]||(rA(V,G),F[oe]=!0)}return X.isArray(T)?T.forEach(J):J(T),this}}es.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(es.prototype,({value:E},T)=>{let j=T[0].toUpperCase()+T.slice(1);return{get:()=>E,set(F){this[j]=F}}}),X.freezeMethods(es);var ir=es;function sc(E,T){const j=this||ic,F=T||j,V=ir.from(F.headers);let J=F.data;return X.forEach(E,function(oe){J=oe.call(j,J,V.normalize(),T?T.status:void 0)}),V.normalize(),J}function mv(E){return!!(E&&E.__CANCEL__)}function Bn(E,T,j){Ce.call(this,E??"canceled",Ce.ERR_CANCELED,T,j),this.name="CanceledError"}X.inherits(Bn,Ce,{__CANCEL__:!0});function gv(E,T,j){const F=j.config.validateStatus;!j.status||!F||F(j.status)?E(j):T(new Ce("Request failed with status code "+j.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(j.status/100)-4],j.config,j.request,j))}function nA(E){const T=/^([-+\w]{1,25})(:?\/\/|:)/.exec(E);return T&&T[1]||""}function aA(E,T){E=E||10;const j=new Array(E),F=new Array(E);let V=0,J=0,G;return T=T!==void 0?T:1e3,function(_e){const ge=Date.now(),pe=F[J];G||(G=ge),j[V]=_e,F[V]=ge;let xe=J,Xe=0;for(;xe!==V;)Xe+=j[xe++],xe=xe%E;if(V=(V+1)%E,V===J&&(J=(J+1)%E),ge-G<T)return;const Tt=pe&&ge-pe;return Tt?Math.round(Xe*1e3/Tt):void 0}}function iA(E,T){let j=0,F=1e3/T,V,J;const G=(ge,pe=Date.now())=>{j=pe,V=null,J&&(clearTimeout(J),J=null),E(...ge)};return[(...ge)=>{const pe=Date.now(),xe=pe-j;xe>=F?G(ge,pe):(V=ge,J||(J=setTimeout(()=>{J=null,G(V)},F-xe)))},()=>V&&G(V)]}const ts=(E,T,j=3)=>{let F=0;const V=aA(50,250);return iA(J=>{const G=J.loaded,oe=J.lengthComputable?J.total:void 0,_e=G-F,ge=V(_e),pe=G<=oe;F=G;const xe={loaded:G,total:oe,progress:oe?G/oe:void 0,bytes:_e,rate:ge||void 0,estimated:ge&&oe&&pe?(oe-G)/ge:void 0,event:J,lengthComputable:oe!=null,[T?"download":"upload"]:!0};E(xe)},j)},yv=(E,T)=>{const j=E!=null;return[F=>T[0]({lengthComputable:j,total:E,loaded:F}),T[1]]},vv=E=>(...T)=>X.asap(()=>E(...T));var oA=xt.hasStandardBrowserEnv?((E,T)=>j=>(j=new URL(j,xt.origin),E.protocol===j.protocol&&E.host===j.host&&(T||E.port===j.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,sA=xt.hasStandardBrowserEnv?{write(E,T,j,F,V,J){const G=[E+"="+encodeURIComponent(T)];X.isNumber(j)&&G.push("expires="+new Date(j).toGMTString()),X.isString(F)&&G.push("path="+F),X.isString(V)&&G.push("domain="+V),J===!0&&G.push("secure"),document.cookie=G.join("; ")},read(E){const T=document.cookie.match(new RegExp("(^|;\\s*)("+E+")=([^;]*)"));return T?decodeURIComponent(T[3]):null},remove(E){this.write(E,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function lA(E){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(E)}function uA(E,T){return T?E.replace(/\/?\/$/,"")+"/"+T.replace(/^\/+/,""):E}function bv(E,T,j){let F=!lA(T);return E&&(F||j==!1)?uA(E,T):T}const wv=E=>E instanceof ir?{...E}:E;function un(E,T){T=T||{};const j={};function F(ge,pe,xe,Xe){return X.isPlainObject(ge)&&X.isPlainObject(pe)?X.merge.call({caseless:Xe},ge,pe):X.isPlainObject(pe)?X.merge({},pe):X.isArray(pe)?pe.slice():pe}function V(ge,pe,xe,Xe){if(X.isUndefined(pe)){if(!X.isUndefined(ge))return F(void 0,ge,xe,Xe)}else return F(ge,pe,xe,Xe)}function J(ge,pe){if(!X.isUndefined(pe))return F(void 0,pe)}function G(ge,pe){if(X.isUndefined(pe)){if(!X.isUndefined(ge))return F(void 0,ge)}else return F(void 0,pe)}function oe(ge,pe,xe){if(xe in T)return F(ge,pe);if(xe in E)return F(void 0,ge)}const _e={url:J,method:J,data:J,baseURL:G,transformRequest:G,transformResponse:G,paramsSerializer:G,timeout:G,timeoutMessage:G,withCredentials:G,withXSRFToken:G,adapter:G,responseType:G,xsrfCookieName:G,xsrfHeaderName:G,onUploadProgress:G,onDownloadProgress:G,decompress:G,maxContentLength:G,maxBodyLength:G,beforeRedirect:G,transport:G,httpAgent:G,httpsAgent:G,cancelToken:G,socketPath:G,responseEncoding:G,validateStatus:oe,headers:(ge,pe,xe)=>V(wv(ge),wv(pe),xe,!0)};return X.forEach(Object.keys({...E,...T}),function(pe){const xe=_e[pe]||V,Xe=xe(E[pe],T[pe],pe);X.isUndefined(Xe)&&xe!==oe||(j[pe]=Xe)}),j}var _v=E=>{const T=un({},E);let{data:j,withXSRFToken:F,xsrfHeaderName:V,xsrfCookieName:J,headers:G,auth:oe}=T;if(T.headers=G=ir.from(G),T.url=Ne(bv(T.baseURL,T.url,T.allowAbsoluteUrls),E.params,E.paramsSerializer),oe&&G.set("Authorization","Basic "+btoa((oe.username||"")+":"+(oe.password?unescape(encodeURIComponent(oe.password)):""))),X.isFormData(j)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)G.setContentType(void 0);else if(X.isFunction(j.getHeaders)){const _e=j.getHeaders(),ge=["content-type","content-length"];Object.entries(_e).forEach(([pe,xe])=>{ge.includes(pe.toLowerCase())&&G.set(pe,xe)})}}if(xt.hasStandardBrowserEnv&&(F&&X.isFunction(F)&&(F=F(T)),F||F!==!1&&oA(T.url))){const _e=V&&J&&sA.read(J);_e&&G.set(V,_e)}return T},cA=typeof XMLHttpRequest<"u"&&function(E){return new Promise(function(j,F){const V=_v(E);let J=V.data;const G=ir.from(V.headers).normalize();let{responseType:oe,onUploadProgress:_e,onDownloadProgress:ge}=V,pe,xe,Xe,Tt,me;function Ae(){Tt&&Tt(),me&&me(),V.cancelToken&&V.cancelToken.unsubscribe(pe),V.signal&&V.signal.removeEventListener("abort",pe)}let Pe=new XMLHttpRequest;Pe.open(V.method.toUpperCase(),V.url,!0),Pe.timeout=V.timeout;function mt(){if(!Pe)return;const wt=ir.from("getAllResponseHeaders"in Pe&&Pe.getAllResponseHeaders()),or={data:!oe||oe==="text"||oe==="json"?Pe.responseText:Pe.response,status:Pe.status,statusText:Pe.statusText,headers:wt,config:E,request:Pe};gv(function(Gt){j(Gt),Ae()},function(Gt){F(Gt),Ae()},or),Pe=null}"onloadend"in Pe?Pe.onloadend=mt:Pe.onreadystatechange=function(){!Pe||Pe.readyState!==4||Pe.status===0&&!(Pe.responseURL&&Pe.responseURL.indexOf("file:")===0)||setTimeout(mt)},Pe.onabort=function(){Pe&&(F(new Ce("Request aborted",Ce.ECONNABORTED,E,Pe)),Pe=null)},Pe.onerror=function(Lt){const or=Lt&&Lt.message?Lt.message:"Network Error",cn=new Ce(or,Ce.ERR_NETWORK,E,Pe);cn.event=Lt||null,F(cn),Pe=null},Pe.ontimeout=function(){let Lt=V.timeout?"timeout of "+V.timeout+"ms exceeded":"timeout exceeded";const or=V.transitional||Re;V.timeoutErrorMessage&&(Lt=V.timeoutErrorMessage),F(new Ce(Lt,or.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,E,Pe)),Pe=null},J===void 0&&G.setContentType(null),"setRequestHeader"in Pe&&X.forEach(G.toJSON(),function(Lt,or){Pe.setRequestHeader(or,Lt)}),X.isUndefined(V.withCredentials)||(Pe.withCredentials=!!V.withCredentials),oe&&oe!=="json"&&(Pe.responseType=V.responseType),ge&&([Xe,me]=ts(ge,!0),Pe.addEventListener("progress",Xe)),_e&&Pe.upload&&([xe,Tt]=ts(_e),Pe.upload.addEventListener("progress",xe),Pe.upload.addEventListener("loadend",Tt)),(V.cancelToken||V.signal)&&(pe=wt=>{Pe&&(F(!wt||wt.type?new Bn(null,E,Pe):wt),Pe.abort(),Pe=null)},V.cancelToken&&V.cancelToken.subscribe(pe),V.signal&&(V.signal.aborted?pe():V.signal.addEventListener("abort",pe)));const Kt=nA(V.url);if(Kt&&xt.protocols.indexOf(Kt)===-1){F(new Ce("Unsupported protocol "+Kt+":",Ce.ERR_BAD_REQUEST,E));return}Pe.send(J||null)})},dA=(E,T)=>{const{length:j}=E=E?E.filter(Boolean):[];if(T||j){let F=new AbortController,V;const J=function(ge){if(!V){V=!0,oe();const pe=ge instanceof Error?ge:this.reason;F.abort(pe instanceof Ce?pe:new Bn(pe instanceof Error?pe.message:pe))}};let G=T&&setTimeout(()=>{G=null,J(new Ce(`timeout ${T} of ms exceeded`,Ce.ETIMEDOUT))},T);const oe=()=>{E&&(G&&clearTimeout(G),G=null,E.forEach(ge=>{ge.unsubscribe?ge.unsubscribe(J):ge.removeEventListener("abort",J)}),E=null)};E.forEach(ge=>ge.addEventListener("abort",J));const{signal:_e}=F;return _e.unsubscribe=()=>X.asap(oe),_e}};const fA=function*(E,T){let j=E.byteLength;if(j<T){yield E;return}let F=0,V;for(;F<j;)V=F+T,yield E.slice(F,V),F=V},hA=async function*(E,T){for await(const j of pA(E))yield*fA(j,T)},pA=async function*(E){if(E[Symbol.asyncIterator]){yield*E;return}const T=E.getReader();try{for(;;){const{done:j,value:F}=await T.read();if(j)break;yield F}}finally{await T.cancel()}},Sv=(E,T,j,F)=>{const V=hA(E,T);let J=0,G,oe=_e=>{G||(G=!0,F&&F(_e))};return new ReadableStream({async pull(_e){try{const{done:ge,value:pe}=await V.next();if(ge){oe(),_e.close();return}let xe=pe.byteLength;if(j){let Xe=J+=xe;j(Xe)}_e.enqueue(new Uint8Array(pe))}catch(ge){throw oe(ge),ge}},cancel(_e){return oe(_e),V.return()}},{highWaterMark:2})},Rv=64*1024,{isFunction:rs}=X,mA=(({Request:E,Response:T})=>({Request:E,Response:T}))(X.global),{ReadableStream:Pv,TextEncoder:Ov}=X.global,Ev=(E,...T)=>{try{return!!E(...T)}catch{return!1}},gA=E=>{E=X.merge.call({skipUndefined:!0},mA,E);const{fetch:T,Request:j,Response:F}=E,V=T?rs(T):typeof fetch=="function",J=rs(j),G=rs(F);if(!V)return!1;const oe=V&&rs(Pv),_e=V&&(typeof Ov=="function"?(me=>Ae=>me.encode(Ae))(new Ov):async me=>new Uint8Array(await new j(me).arrayBuffer())),ge=J&&oe&&Ev(()=>{let me=!1;const Ae=new j(xt.origin,{body:new Pv,method:"POST",get duplex(){return me=!0,"half"}}).headers.has("Content-Type");return me&&!Ae}),pe=G&&oe&&Ev(()=>X.isReadableStream(new F("").body)),xe={stream:pe&&(me=>me.body)};V&&["text","arrayBuffer","blob","formData","stream"].forEach(me=>{!xe[me]&&(xe[me]=(Ae,Pe)=>{let mt=Ae&&Ae[me];if(mt)return mt.call(Ae);throw new Ce(`Response type '${me}' is not supported`,Ce.ERR_NOT_SUPPORT,Pe)})});const Xe=async me=>{if(me==null)return 0;if(X.isBlob(me))return me.size;if(X.isSpecCompliantForm(me))return(await new j(xt.origin,{method:"POST",body:me}).arrayBuffer()).byteLength;if(X.isArrayBufferView(me)||X.isArrayBuffer(me))return me.byteLength;if(X.isURLSearchParams(me)&&(me=me+""),X.isString(me))return(await _e(me)).byteLength},Tt=async(me,Ae)=>{const Pe=X.toFiniteNumber(me.getContentLength());return Pe??Xe(Ae)};return async me=>{let{url:Ae,method:Pe,data:mt,signal:Kt,cancelToken:wt,timeout:Lt,onDownloadProgress:or,onUploadProgress:cn,responseType:Gt,headers:fc,withCredentials:ss="same-origin",fetchOptions:Dv}=_v(me),Nv=T||fetch;Gt=Gt?(Gt+"").toLowerCase():"text";let ls=dA([Kt,wt&&wt.toAbortSignal()],Lt),bi=null;const dn=ls&&ls.unsubscribe&&(()=>{ls.unsubscribe()});let Fv;try{if(cn&&ge&&Pe!=="get"&&Pe!=="head"&&(Fv=await Tt(fc,mt))!==0){let Kr=new j(Ae,{method:"POST",body:mt,duplex:"half"}),Hn;if(X.isFormData(mt)&&(Hn=Kr.headers.get("content-type"))&&fc.setContentType(Hn),Kr.body){const[hc,us]=yv(Fv,ts(vv(cn)));mt=Sv(Kr.body,Rv,hc,us)}}X.isString(ss)||(ss=ss?"include":"omit");const _r=J&&"credentials"in j.prototype,Iv={...Dv,signal:ls,method:Pe.toUpperCase(),headers:fc.normalize().toJSON(),body:mt,duplex:"half",credentials:_r?ss:void 0};bi=J&&new j(Ae,Iv);let Qr=await(J?Nv(bi,Dv):Nv(Ae,Iv));const Mv=pe&&(Gt==="stream"||Gt==="response");if(pe&&(or||Mv&&dn)){const Kr={};["status","statusText","headers"].forEach(Lv=>{Kr[Lv]=Qr[Lv]});const Hn=X.toFiniteNumber(Qr.headers.get("content-length")),[hc,us]=or&&yv(Hn,ts(vv(or),!0))||[];Qr=new F(Sv(Qr.body,Rv,hc,()=>{us&&us(),dn&&dn()}),Kr)}Gt=Gt||"text";let PA=await xe[X.findKey(xe,Gt)||"text"](Qr,me);return!Mv&&dn&&dn(),await new Promise((Kr,Hn)=>{gv(Kr,Hn,{data:PA,headers:ir.from(Qr.headers),status:Qr.status,statusText:Qr.statusText,config:me,request:bi})})}catch(_r){throw dn&&dn(),_r&&_r.name==="TypeError"&&/Load failed|fetch/i.test(_r.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,me,bi),{cause:_r.cause||_r}):Ce.from(_r,_r&&_r.code,me,bi)}}},yA=new Map,Cv=E=>{let T=E?E.env:{};const{fetch:j,Request:F,Response:V}=T,J=[F,V,j];let G=J.length,oe=G,_e,ge,pe=yA;for(;oe--;)_e=J[oe],ge=pe.get(_e),ge===void 0&&pe.set(_e,ge=oe?new Map:gA(T)),pe=ge;return ge};Cv();const lc={http:Yt,xhr:cA,fetch:{get:Cv}};X.forEach(lc,(E,T)=>{if(E){try{Object.defineProperty(E,"name",{value:T})}catch{}Object.defineProperty(E,"adapterName",{value:T})}});const xv=E=>`- ${E}`,vA=E=>X.isFunction(E)||E===null||E===!1;var Tv={getAdapter:(E,T)=>{E=X.isArray(E)?E:[E];const{length:j}=E;let F,V;const J={};for(let G=0;G<j;G++){F=E[G];let oe;if(V=F,!vA(F)&&(V=lc[(oe=String(F)).toLowerCase()],V===void 0))throw new Ce(`Unknown adapter '${oe}'`);if(V&&(X.isFunction(V)||(V=V.get(T))))break;J[oe||"#"+G]=V}if(!V){const G=Object.entries(J).map(([_e,ge])=>`adapter ${_e} `+(ge===!1?"is not supported by the environment":"is not available in the build"));let oe=j?G.length>1?`since :
|
|
164
|
+
`+G.map(xv).join(`
|
|
165
|
+
`):" "+xv(G[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+oe,"ERR_NOT_SUPPORT")}return V},adapters:lc};function uc(E){if(E.cancelToken&&E.cancelToken.throwIfRequested(),E.signal&&E.signal.aborted)throw new Bn(null,E)}function kv(E){return uc(E),E.headers=ir.from(E.headers),E.data=sc.call(E,E.transformRequest),["post","put","patch"].indexOf(E.method)!==-1&&E.headers.setContentType("application/x-www-form-urlencoded",!1),Tv.getAdapter(E.adapter||ic.adapter,E)(E).then(function(F){return uc(E),F.data=sc.call(E,E.transformResponse,F),F.headers=ir.from(F.headers),F},function(F){return mv(F)||(uc(E),F&&F.response&&(F.response.data=sc.call(E,E.transformResponse,F.response),F.response.headers=ir.from(F.response.headers))),Promise.reject(F)})}const Av="1.12.2",ns={};["object","boolean","number","function","string","symbol"].forEach((E,T)=>{ns[E]=function(F){return typeof F===E||"a"+(T<1?"n ":" ")+E}});const jv={};ns.transitional=function(T,j,F){function V(J,G){return"[Axios v"+Av+"] Transitional option '"+J+"'"+G+(F?". "+F:"")}return(J,G,oe)=>{if(T===!1)throw new Ce(V(G," has been removed"+(j?" in "+j:"")),Ce.ERR_DEPRECATED);return j&&!jv[G]&&(jv[G]=!0,console.warn(V(G," has been deprecated since v"+j+" and will be removed in the near future"))),T?T(J,G,oe):!0}},ns.spelling=function(T){return(j,F)=>(console.warn(`${F} is likely a misspelling of ${T}`),!0)};function bA(E,T,j){if(typeof E!="object")throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const F=Object.keys(E);let V=F.length;for(;V-- >0;){const J=F[V],G=T[J];if(G){const oe=E[J],_e=oe===void 0||G(oe,J,E);if(_e!==!0)throw new Ce("option "+J+" must be "+_e,Ce.ERR_BAD_OPTION_VALUE);continue}if(j!==!0)throw new Ce("Unknown option "+J,Ce.ERR_BAD_OPTION)}}var as={assertOptions:bA,validators:ns};const wr=as.validators;class is{constructor(T){this.defaults=T||{},this.interceptors={request:new ve,response:new ve}}async request(T,j){try{return await this._request(T,j)}catch(F){if(F instanceof Error){let V={};Error.captureStackTrace?Error.captureStackTrace(V):V=new Error;const J=V.stack?V.stack.replace(/^.+\n/,""):"";try{F.stack?J&&!String(F.stack).endsWith(J.replace(/^.+\n.+\n/,""))&&(F.stack+=`
|
|
166
|
+
`+J):F.stack=J}catch{}}throw F}}_request(T,j){typeof T=="string"?(j=j||{},j.url=T):j=T||{},j=un(this.defaults,j);const{transitional:F,paramsSerializer:V,headers:J}=j;F!==void 0&&as.assertOptions(F,{silentJSONParsing:wr.transitional(wr.boolean),forcedJSONParsing:wr.transitional(wr.boolean),clarifyTimeoutError:wr.transitional(wr.boolean)},!1),V!=null&&(X.isFunction(V)?j.paramsSerializer={serialize:V}:as.assertOptions(V,{encode:wr.function,serialize:wr.function},!0)),j.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?j.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:j.allowAbsoluteUrls=!0),as.assertOptions(j,{baseUrl:wr.spelling("baseURL"),withXsrfToken:wr.spelling("withXSRFToken")},!0),j.method=(j.method||this.defaults.method||"get").toLowerCase();let G=J&&X.merge(J.common,J[j.method]);J&&X.forEach(["delete","get","head","post","put","patch","common"],me=>{delete J[me]}),j.headers=ir.concat(G,J);const oe=[];let _e=!0;this.interceptors.request.forEach(function(Ae){typeof Ae.runWhen=="function"&&Ae.runWhen(j)===!1||(_e=_e&&Ae.synchronous,oe.unshift(Ae.fulfilled,Ae.rejected))});const ge=[];this.interceptors.response.forEach(function(Ae){ge.push(Ae.fulfilled,Ae.rejected)});let pe,xe=0,Xe;if(!_e){const me=[kv.bind(this),void 0];for(me.unshift(...oe),me.push(...ge),Xe=me.length,pe=Promise.resolve(j);xe<Xe;)pe=pe.then(me[xe++],me[xe++]);return pe}Xe=oe.length;let Tt=j;for(;xe<Xe;){const me=oe[xe++],Ae=oe[xe++];try{Tt=me(Tt)}catch(Pe){Ae.call(this,Pe);break}}try{pe=kv.call(this,Tt)}catch(me){return Promise.reject(me)}for(xe=0,Xe=ge.length;xe<Xe;)pe=pe.then(ge[xe++],ge[xe++]);return pe}getUri(T){T=un(this.defaults,T);const j=bv(T.baseURL,T.url,T.allowAbsoluteUrls);return Ne(j,T.params,T.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(T){is.prototype[T]=function(j,F){return this.request(un(F||{},{method:T,url:j,data:(F||{}).data}))}}),X.forEach(["post","put","patch"],function(T){function j(F){return function(J,G,oe){return this.request(un(oe||{},{method:T,headers:F?{"Content-Type":"multipart/form-data"}:{},url:J,data:G}))}}is.prototype[T]=j(),is.prototype[T+"Form"]=j(!0)});var os=is;class cc{constructor(T){if(typeof T!="function")throw new TypeError("executor must be a function.");let j;this.promise=new Promise(function(J){j=J});const F=this;this.promise.then(V=>{if(!F._listeners)return;let J=F._listeners.length;for(;J-- >0;)F._listeners[J](V);F._listeners=null}),this.promise.then=V=>{let J;const G=new Promise(oe=>{F.subscribe(oe),J=oe}).then(V);return G.cancel=function(){F.unsubscribe(J)},G},T(function(J,G,oe){F.reason||(F.reason=new Bn(J,G,oe),j(F.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(T){if(this.reason){T(this.reason);return}this._listeners?this._listeners.push(T):this._listeners=[T]}unsubscribe(T){if(!this._listeners)return;const j=this._listeners.indexOf(T);j!==-1&&this._listeners.splice(j,1)}toAbortSignal(){const T=new AbortController,j=F=>{T.abort(F)};return this.subscribe(j),T.signal.unsubscribe=()=>this.unsubscribe(j),T.signal}static source(){let T;return{token:new cc(function(V){T=V}),cancel:T}}}var wA=cc;function _A(E){return function(j){return E.apply(null,j)}}function SA(E){return X.isObject(E)&&E.isAxiosError===!0}const dc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(dc).forEach(([E,T])=>{dc[T]=E});var RA=dc;function $v(E){const T=new os(E),j=e(os.prototype.request,T);return X.extend(j,os.prototype,T,{allOwnKeys:!0}),X.extend(j,T,null,{allOwnKeys:!0}),j.create=function(V){return $v(un(E,V))},j}const pt=$v(ic);return pt.Axios=os,pt.CanceledError=Bn,pt.CancelToken=wA,pt.isCancel=mv,pt.VERSION=Av,pt.toFormData=Yr,pt.AxiosError=Ce,pt.Cancel=pt.CanceledError,pt.all=function(T){return Promise.all(T)},pt.spread=_A,pt.isAxiosError=SA,pt.mergeConfig=un,pt.AxiosHeaders=ir,pt.formToJSON=E=>hv(X.isHTMLForm(E)?new FormData(E):E),pt.getAdapter=Tv.getAdapter,pt.HttpStatusCode=RA,pt.default=pt,Ou=pt,Ou}const Eu=ed(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var an={},ri={},ug;function Dx(){return ug||(ug=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.arrayableParams=void 0,ri.arrayableParams={query_by:"query_by",query_by_weights:"query_by_weights",facet_by:"facet_by",group_by:"group_by",include_fields:"include_fields",exclude_fields:"exclude_fields",highlight_fields:"highlight_fields",highlight_full_fields:"highlight_full_fields",pinned_hits:"pinned_hits",hidden_hits:"hidden_hits",infix:"infix",override_tags:"override_tags",num_typos:"num_typos",prefix:"prefix",sort_by:"sort_by"}),ri}var cg;function ni(){if(cg)return an;cg=1,Object.defineProperty(an,"__esModule",{value:!0}),an.toErrorWithMessage=an.normalizeArrayableParams=void 0;var e=Oe,t=Dx();function r(u){return Object.keys(t.arrayableParams).filter(function(d){return u[d]!==void 0}).every(function(d){return a(u[d])})}function n(u){var d=e.__assign({},u),p=Object.keys(t.arrayableParams).filter(function(m){return Array.isArray(d[m])}).map(function(m){return d[m]=d[m].join(","),m});if(!p.length&&r(d))return d;if(!r(d))throw new Error("Failed to normalize arrayable params: ".concat(JSON.stringify(d)));return d}an.normalizeArrayableParams=n;function a(u){return!Array.isArray(u)}function o(u){return typeof u=="object"&&u!==null&&"message"in u&&typeof u.message=="string"}function s(u){if(o(u))return u;try{return typeof u=="string"?new Error(u):new Error(JSON.stringify(u))}catch{return new Error(String(u))}}return an.toErrorWithMessage=s,an}var dg;function fg(){if(dg)return mo;dg=1,Object.defineProperty(mo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault($x()),r=Eu,n=Eu,a=ti(),o=e.__importDefault(nr()),s=ni(),u="X-TYPESENSE-API-KEY",d=!0,p=!1,m=typeof process<"u"&&process.versions!=null&&process.versions.node!=null&&typeof window>"u",v=(function(){function h(l){this.configuration=l,this.apiKey=this.configuration.apiKey,this.nodes=this.configuration.nodes==null?this.configuration.nodes:JSON.parse(JSON.stringify(this.configuration.nodes)),this.nearestNode=this.configuration.nearestNode==null?this.configuration.nearestNode:JSON.parse(JSON.stringify(this.configuration.nearestNode)),this.connectionTimeoutSeconds=this.configuration.connectionTimeoutSeconds,this.healthcheckIntervalSeconds=this.configuration.healthcheckIntervalSeconds,this.numRetriesPerRequest=this.configuration.numRetries,this.retryIntervalSeconds=this.configuration.retryIntervalSeconds,this.sendApiKeyAsQueryParam=this.configuration.sendApiKeyAsQueryParam,this.additionalUserHeaders=this.configuration.additionalHeaders,this.logger=this.configuration.logger,this.initializeMetadataForNodes(),this.currentNodeIndex=-1}return h.prototype.get=function(l,c,g){c===void 0&&(c={});var y=g===void 0?{}:g,f=y.abortSignal,b=f===void 0?null:f,w=y.responseType,_=w===void 0?void 0:w,S=y.streamConfig,R=S===void 0?void 0:S,O=y.isStreamingRequest;return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(P){return[2,this.performRequest("get",l,{queryParameters:c,abortSignal:b,responseType:_,streamConfig:R,isStreamingRequest:O})]})})},h.prototype.delete=function(l,c){return c===void 0&&(c={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(g){return[2,this.performRequest("delete",l,{queryParameters:c,isStreamingRequest:!1})]})})},h.prototype.post=function(l,c,g,y,f){c===void 0&&(c={}),g===void 0&&(g={}),y===void 0&&(y={});var b=f===void 0?{}:f,w=b.abortSignal,_=w===void 0?null:w,S=b.responseType,R=S===void 0?void 0:S,O=b.streamConfig,P=O===void 0?void 0:O,C=b.isStreamingRequest;return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(k){return[2,this.performRequest("post",l,{queryParameters:g,bodyParameters:c,additionalHeaders:y,abortSignal:_,responseType:R,streamConfig:P,isStreamingRequest:C})]})})},h.prototype.put=function(l,c,g){return c===void 0&&(c={}),g===void 0&&(g={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(y){return[2,this.performRequest("put",l,{queryParameters:g,bodyParameters:c,isStreamingRequest:!1})]})})},h.prototype.patch=function(l,c,g){return c===void 0&&(c={}),g===void 0&&(g={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(y){return[2,this.performRequest("patch",l,{queryParameters:g,bodyParameters:c,isStreamingRequest:!1})]})})},h.prototype.getAdapter=function(){if(this.configuration.axiosAdapter){if(typeof this.configuration.axiosAdapter=="function")return this.configuration.axiosAdapter;var l=typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers";return l?t.default.getAdapter(this.configuration.axiosAdapter).bind(globalThis):t.default.getAdapter(this.configuration.axiosAdapter)}},h.prototype.performRequest=function(l,c,g){var y,f,b,w,_=g.queryParameters,S=_===void 0?null:_,R=g.bodyParameters,O=R===void 0?null:R,P=g.additionalHeaders,C=P===void 0?{}:P,k=g.abortSignal,A=k===void 0?null:k,H=g.responseType,Q=H===void 0?void 0:H,$=g.skipConnectionTimeout,M=$===void 0?!1:$,D=g.enableKeepAlive,I=D===void 0?void 0:D,U=g.streamConfig,B=U===void 0?void 0:U,Y=g.isStreamingRequest;return e.__awaiter(this,void 0,void 0,function(){var q,ne,L,K,W,ee,x;return e.__generator(this,function(z){switch(z.label){case 0:this.configuration.validate(),Y&&(this.logger.debug("Request: Performing streaming request to ".concat(c)),!m&&typeof fetch<"u"&&(this.logger.debug("Using fetch adapter for browser streaming"),Q="stream")),q=Date.now(),L=!1,this.logger.debug("Request #".concat(q,": Performing ").concat(l.toUpperCase()," request: ").concat(c)),K=function(ie){var we,Z,be,se,ce,N,ue;return e.__generator(this,function(de){switch(de.label){case 0:if(we=W.getNextNode(q),W.logger.debug("Request #".concat(q,": Attempting ").concat(l.toUpperCase()," request Try #").concat(ie," to Node ").concat(we.index)),A&&A.aborted)return[2,{value:Promise.reject(new Error("Request aborted by caller."))}];Z=void 0,de.label=1;case 1:return de.trys.push([1,3,5,6]),be={method:l,url:W.uriFor(c,we),headers:Object.assign({},W.defaultHeaders(),C,W.additionalUserHeaders),maxContentLength:1/0,maxBodyLength:1/0,validateStatus:function(he){return he>0},transformResponse:[function(he,De){var $e=he;return De!==void 0&&typeof he=="string"&&De["content-type"]&&De["content-type"].startsWith("application/json")&&($e=JSON.parse(he)),$e}]},be.adapter=Y&&!m?"fetch":W.getAdapter(),M!==!0&&(be.timeout=W.connectionTimeoutSeconds*1e3),S&&Object.keys(S).length!==0&&(be.params=S),W.sendApiKeyAsQueryParam&&(be.params=be.params||{},be.params["x-typesense-api-key"]=W.apiKey),W.configuration.httpAgent?(W.logger.debug("Request #".concat(q,": Using custom httpAgent")),be.httpAgent=W.configuration.httpAgent):I===!0&&(m?(W.logger.debug("Request #".concat(q,": Enabling KeepAlive")),be.httpAgent=new r.Agent({keepAlive:!0})):W.logger.warn("Request #".concat(q,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),W.configuration.httpsAgent?(W.logger.debug("Request #".concat(q,": Using custom httpsAgent")),be.httpsAgent=W.configuration.httpsAgent):I===!0&&(m?(W.logger.debug("Request #".concat(q,": Enabling keepAlive")),be.httpsAgent=new n.Agent({keepAlive:!0})):W.logger.warn("Request #".concat(q,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),W.configuration.paramsSerializer&&(W.logger.debug("Request #".concat(q,": Using custom paramsSerializer")),be.paramsSerializer=W.configuration.paramsSerializer),O&&(typeof O=="string"&&O.length!==0||typeof O=="object"&&Object.keys(O).length!==0)&&(be.data=O),A&&(se=t.default.CancelToken,ce=se.source(),Z=function(){L=!0,ce.cancel()},A.addEventListener("abort",Z),be.cancelToken=ce.token),Y?(be.responseType="stream",m||(be.headers=e.__assign(e.__assign({},be.headers),{Accept:"text/event-stream"}))):Q&&(be.responseType=Q),[4,(0,t.default)(be)];case 2:if(N=de.sent(),N.status>=1&&N.status<=499&&W.setNodeHealthcheck(we,d),W.logger.debug("Request #".concat(q,": Request to Node ").concat(we.index," was made. Response Code was ").concat(N.status,".")),N.status>=200&&N.status<300)return Y?[2,{value:W.handleStreamingResponse(N,B)}]:[2,{value:Promise.resolve(N.data)}];if(N.status<500)return[2,{value:Promise.reject(W.customErrorForResponse(N,(y=N.data)===null||y===void 0?void 0:y.message,be.data))}];throw W.customErrorForResponse(N,(f=N.data)===null||f===void 0?void 0:f.message,be.data);case 3:if(ue=de.sent(),L||W.setNodeHealthcheck(we,p),ne=ue,W.logger.warn("Request #".concat(q,": Request to Node ").concat(we.index,' failed due to "').concat((b=ue?.code)!==null&&b!==void 0?b:""," ").concat(ue.message).concat(ue.response==null?"":" - "+JSON.stringify((w=ue.response)===null||w===void 0?void 0:w.data),'"')),L)return[2,{value:Promise.reject(new Error("Request aborted by caller."))}];if(Y&&W.invokeOnErrorCallback(ue,B),ie<W.numRetriesPerRequest+1)W.logger.warn("Request #".concat(q,": Sleeping for ").concat(W.retryIntervalSeconds,"s and then retrying request..."));else return W.logger.debug("Request #".concat(q,": No retries left. Raising last error")),[2,{value:Promise.reject(ne)}];return[4,W.timer(W.retryIntervalSeconds)];case 4:return de.sent(),[3,6];case 5:return A&&Z&&A.removeEventListener("abort",Z),[7];case 6:return[2]}})},W=this,ee=1,z.label=1;case 1:return ee<=this.numRetriesPerRequest+1?[5,K(ee)]:[3,4];case 2:if(x=z.sent(),typeof x=="object")return[2,x.value];z.label=3;case 3:return ee++,[3,1];case 4:return this.logger.debug("Request #".concat(q,": No retries left. Raising last error")),[2,Promise.reject(ne)]}})})},h.prototype.processStreamingLine=function(l){if(!l.trim()||l==="data: [DONE]")return null;if(l.startsWith("data: "))return this.processDataLine(l.slice(6).trim());if(l.trim().startsWith("{"))try{var c=JSON.parse(l.trim());return c&&typeof c=="object"?(c.conversation_id||(c.conversation_id="unknown"),!c.message&&c.message!==""&&(c.message=""),c):{conversation_id:"unknown",message:JSON.stringify(c)}}catch{return{conversation_id:"unknown",message:l.trim()}}return{conversation_id:"unknown",message:l.trim()}},h.prototype.processDataLine=function(l){if(!l)return null;if(l.startsWith("{"))try{var c=JSON.parse(l);return c&&typeof c=="object"?(c.conversation_id||(c.conversation_id="unknown"),!c.message&&c.message!==""&&(c.message=""),c):{conversation_id:"unknown",message:JSON.stringify(c)}}catch{return{conversation_id:"unknown",message:l}}return{conversation_id:"unknown",message:l}},h.prototype.handleStreamingResponse=function(l,c){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(g){return this.logger.debug("Handling streaming response. Environment: ".concat(m?"Node.js":"Browser")),m&&l.data?[2,this.handleNodeStreaming(l,c)]:m?(this.logger.debug("Processing non-streaming response"),this.invokeOnCompleteCallback(l.data,c),[2,Promise.resolve(l.data)]):[2,this.handleBrowserStreaming(l,c)]})})},h.prototype.handleNodeStreaming=function(l,c){var g=this;return this.logger.debug("Processing Node.js stream"),new Promise(function(y,f){var b=l.data,w=[],_="";b.on("data",function(S){var R;try{var O=S.toString();_+=O;var P=_.split(`
|
|
167
|
+
`);_=(R=P.pop())!==null&&R!==void 0?R:"",g.processStreamLines(P,w,c)}catch(C){f(C)}}),b.on("end",function(){if(_.trim().length>0){var S=_.split(`
|
|
168
|
+
`);g.processStreamLines(S,w,c)}g.finalizeStreamResult(w,y,l,c)}),b.on("error",function(S){g.logger.error("Stream error: ".concat(S)),g.invokeOnErrorCallback(S,c),f(S)})})},h.prototype.handleBrowserStreaming=function(l,c){var g=this;return this.logger.debug("Processing browser stream"),new Promise(function(y,f){return e.__awaiter(g,void 0,void 0,function(){return e.__generator(this,function(b){try{return l.data&&typeof l.data.getReader=="function"?[2,this.handleBrowserReadableStream(l.data,y,f,l,c)]:typeof l.data=="string"?[2,this.handleBrowserStringResponse(l.data,y,l,c)]:typeof l.data=="object"&&l.data!==null?(this.logger.debug("No stream found, but data object is available"),this.invokeOnCompleteCallback(l.data,c),[2,y(l.data)]):(this.logger.error("No usable data found in response"),[2,f(new Error("No usable data found in response"))])}catch(w){this.logger.error("Error processing streaming response: ".concat(w)),this.invokeOnErrorCallback(w,c),f(w)}return[2]})})})},h.prototype.handleBrowserReadableStream=function(l,c,g,y,f){return e.__awaiter(this,void 0,void 0,function(){var b,w,_,S,R,O,P,C,k,A;return e.__generator(this,function(H){switch(H.label){case 0:this.logger.debug("Found ReadableStream in response.data"),b=l.getReader(),w=[],_="",H.label=1;case 1:H.trys.push([1,5,,6]),H.label=2;case 2:return[4,b.read()];case 3:return S=H.sent(),R=S.done,O=S.value,R?(this.logger.debug("Stream reading complete"),_.trim()&&(P=_.split(`
|
|
169
|
+
`),this.processStreamLines(P,w,f)),[3,4]):(C=new TextDecoder().decode(O),this.logger.debug("Received chunk: ".concat(C.length," bytes")),_+=C,k=_.split(`
|
|
170
|
+
`),_=k.pop()||"",this.processStreamLines(k,w,f),[3,2]);case 4:return this.finalizeStreamResult(w,c,y,f),[3,6];case 5:return A=H.sent(),this.logger.error("Stream error: ".concat(A)),this.invokeOnErrorCallback(A,f),g(A),[3,6];case 6:return[2]}})})},h.prototype.handleBrowserStringResponse=function(l,c,g,y){this.logger.debug("Processing text response as stream data");var f=[],b=l.split(`
|
|
171
|
+
`);if(this.processStreamLines(b,f,y),f.length>0){var w=this.combineStreamingChunks(f);this.invokeOnCompleteCallback(w,y),c(w)}else this.logger.debug("No chunks processed, returning original API response"),this.invokeOnCompleteCallback(g.data,y),c(g.data)},h.prototype.processStreamLines=function(l,c,g){for(var y=0,f=l;y<f.length;y++){var b=f[y];if(b.trim()&&b!=="data: [DONE]"){var w=this.processStreamingLine(b);w!==null&&(this.invokeOnChunkCallback(w,g),c.push(w))}}},h.prototype.finalizeStreamResult=function(l,c,g,y){if(l.length>0){var f=this.combineStreamingChunks(l);this.logger.debug("Stream processing complete"),this.invokeOnCompleteCallback(f,y),c(f)}else this.logger.debug("No chunks processed, returning original API response"),this.invokeOnCompleteCallback(g.data,y),c(g.data)},h.prototype.combineStreamingChunks=function(l){if(l.length===0)return{};if(l.length===1)return l[0];var c=this.getMessageChunks(l);if(c.length>0)return this.combineMessageChunks(l,c);var g=l[l.length-1];if(!this.isCompleteSearchResponse(g))throw new Error("Last chunk is not a complete search response");return g},h.prototype.getMessageChunks=function(l){return l.filter(this.isChunkMessage)},h.prototype.isChunkMessage=function(l){return typeof l=="object"&&l!==null&&"message"in l&&"conversation_id"in l},h.prototype.combineMessageChunks=function(l,c){this.logger.debug("Found ".concat(c.length," message chunks to combine"));var g=l[l.length-1];if(this.isCompleteSearchResponse(g))return g;var y=l.find(this.isCompleteSearchResponse);if(!y)throw new Error("No metadata chunk found");return y},h.prototype.isCompleteSearchResponse=function(l){return typeof l=="object"&&l!==null&&Object.keys(l).length>0?"results"in l||"found"in l||"hits"in l||"page"in l||"search_time_ms"in l:!1},h.prototype.getNextNode=function(l){if(l===void 0&&(l=0),this.nearestNode!=null){if(this.logger.debug("Request #".concat(l,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(this.nearestNode.isHealthy===!0?"Healthy":"Unhealthy")),this.nearestNode.isHealthy===!0||this.nodeDueForHealthcheck(this.nearestNode,l))return this.logger.debug("Request #".concat(l,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(l,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(l,": Nodes Health: ").concat(this.nodes.map(function(y){return"Node ".concat(y.index," is ").concat(y.isHealthy===!0?"Healthy":"Unhealthy")}).join(" || ")));for(var c=this.nodes[0],g=0;g<=this.nodes.length;g++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,c=this.nodes[this.currentNodeIndex],c.isHealthy===!0||this.nodeDueForHealthcheck(c,l))return this.logger.debug("Request #".concat(l,": Updated current node to Node ").concat(c.index)),c;return this.logger.debug("Request #".concat(l,": No healthy nodes were found. Returning the next node, Node ").concat(c.index)),c},h.prototype.nodeDueForHealthcheck=function(l,c){c===void 0&&(c=0);var g=Date.now()-l.lastAccessTimestamp>this.healthcheckIntervalSeconds*1e3;return g&&this.logger.debug("Request #".concat(c,": Node ").concat(l.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),g},h.prototype.initializeMetadataForNodes=function(){var l=this;this.nearestNode!=null&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,d)),this.nodes.forEach(function(c,g){c.index=g,l.setNodeHealthcheck(c,d)})},h.prototype.setNodeHealthcheck=function(l,c){l.isHealthy=c,l.lastAccessTimestamp=Date.now()},h.prototype.uriFor=function(l,c){return c.url!=null?"".concat(c.url).concat(l):"".concat(c.protocol,"://").concat(c.host,":").concat(c.port).concat(c.path).concat(l)},h.prototype.defaultHeaders=function(){var l={};return this.sendApiKeyAsQueryParam||(l[u]=this.apiKey),l["Content-Type"]="application/json",l},h.prototype.timer=function(l){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(c){return[2,new Promise(function(g){return setTimeout(g,l*1e3)})]})})},h.prototype.customErrorForResponse=function(l,c,g){var y="Request failed with HTTP code ".concat(l.status);typeof c=="string"&&c.trim()!==""&&(y+=" | Server said: ".concat(c));var f=new o.default(y,g,l.status);return l.status===400?f=new a.RequestMalformed(y,g,l.status):l.status===401?f=new a.RequestUnauthorized(y,g,l.status):l.status===404?f=new a.ObjectNotFound(y,g,l.status):l.status===409?f=new a.ObjectAlreadyExists(y,g,l.status):l.status===422?f=new a.ObjectUnprocessable(y,g,l.status):l.status>=500&&l.status<=599?f=new a.ServerError(y,g,l.status):f=new a.HTTPError(y,g,l.status),f},h.prototype.invokeOnChunkCallback=function(l,c){if(c?.onChunk)try{c.onChunk(l)}catch(g){this.logger.warn("Error in onChunk callback: ".concat(g))}},h.prototype.invokeOnCompleteCallback=function(l,c){if(c?.onComplete)try{c.onComplete(l)}catch(g){this.logger.warn("Error in onComplete callback: ".concat(g))}},h.prototype.invokeOnErrorCallback=function(l,c){if(c?.onError){var g=(0,s.toErrorWithMessage)(l);try{c.onError(g)}catch(y){this.logger.warn("Error in onError callback: ".concat(y))}}},h})();return mo.default=v,mo}var go={},hg;function zr(){if(hg)return go;hg=1,Object.defineProperty(go,"__esModule",{value:!0});var e=Oe,t="/collections",r=(function(){function n(a){this.apiCall=a}return n.prototype.create=function(a,o){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.post(t,a,o)]})})},n.prototype.retrieve=function(a){return a===void 0&&(a={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.get(t,a)]})})},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return go.default=r,go}var yo={},vo={},ai={},bo={},pg;function mg(){if(pg)return bo;pg=1,Object.defineProperty(bo,"__esModule",{value:!0});var e=Oe,t=120,r=100,n=(function(){function a(){this.responseCache=new Map,this.responsePromiseCache=new Map}return a.prototype.clearCache=function(){this.responseCache=new Map,this.responsePromiseCache=new Map},a.prototype.perform=function(o,s,u,d){return e.__awaiter(this,void 0,void 0,function(){var p,m,v,h,l,c,g,y,f,b,w,_,S,R,O,P,C,A,k,A,H,Q,$,D,M,D;return e.__generator(this,function(I){switch(I.label){case 0:if(p=d||{},m=p.cacheResponseForSeconds,v=m===void 0?t:m,h=p.maxSize,l=h===void 0?r:h,c=d===void 0||v<=0||l<=0,g=u.path,y=u.queryParams,f=u.body,b=u.headers,w=u.streamConfig,_=u.abortSignal,S=u.responseType,R=u.isStreamingRequest,c)return[2,this.executeRequest(o,s,g,y,f,b,{abortSignal:_,responseType:S,streamConfig:w,isStreamingRequest:R})];if(O=JSON.stringify(u),P=this.responseCache.get(O),C=Date.now(),P){if(A=C-P.requestTimestamp<v*1e3,A)return this.responseCache.delete(O),this.responseCache.set(O,P),[2,P.response];this.responseCache.delete(O)}if(k=this.responsePromiseCache.get(O),k){if(A=C-k.requestTimestamp<v*1e3,A)return this.responsePromiseCache.delete(O),this.responsePromiseCache.set(O,k),[2,k.responsePromise];this.responsePromiseCache.delete(O)}return H=this.executeRequest(o,s,g,y,f,b,{abortSignal:_,responseType:S,streamConfig:w,isStreamingRequest:R}),this.responsePromiseCache.set(O,{requestTimestamp:C,responsePromise:H}),[4,H];case 1:return Q=I.sent(),this.responseCache.set(O,{requestTimestamp:C,response:Q}),$=this.responseCache.size>l,$&&(D=this.responseCache.keys().next().value,D&&this.responseCache.delete(D)),M=this.responsePromiseCache.size>l,M&&(D=this.responsePromiseCache.keys().next().value,D&&this.responsePromiseCache.delete(D)),[2,Q]}})})},a.prototype.executeRequest=function(o,s,u,d,p,m,v){d===void 0&&(d={});var h=o[s];switch(s){case"get":return h.call(o,u,d,{abortSignal:v?.abortSignal,responseType:v?.responseType,streamConfig:v?.streamConfig,isStreamingRequest:v?.isStreamingRequest});case"delete":return h.call(o,u,d);case"post":return h.call(o,u,p,d,m||{},{abortSignal:v?.abortSignal,responseType:v?.responseType,streamConfig:v?.streamConfig,isStreamingRequest:v?.isStreamingRequest});case"put":case"patch":return h.call(o,u,p,d);default:throw new Error("Unsupported method: ".concat(String(s)))}},a})();return bo.default=n,bo}var gg;function yg(){if(gg)return ai;gg=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.SearchOnlyDocuments=void 0;var e=Oe,t=e.__importDefault(mg()),r=e.__importDefault(zr()),n=ni(),a="/documents",o=(function(){function s(u,d,p){this.collectionName=u,this.apiCall=d,this.configuration=p,this.requestWithCache=new t.default}return s.prototype.clearCache=function(){this.requestWithCache.clearCache()},s.prototype.search=function(u,d){var p=d===void 0?{}:d,m=p.cacheSearchResultsForSeconds,v=m===void 0?this.configuration.cacheSearchResultsForSeconds:m,h=p.abortSignal,l=h===void 0?null:h;return e.__awaiter(this,void 0,void 0,function(){var c,g,y,f,b,w;return e.__generator(this,function(_){return c={},this.configuration.useServerSideSearchCache===!0&&(c.use_cache=!0),g=(0,n.normalizeArrayableParams)(u),y=g.streamConfig,f=e.__rest(g,["streamConfig"]),b=e.__assign(e.__assign({},c),f),w=b.conversation_stream===!0,[2,this.requestWithCache.perform(this.apiCall,"get",{path:this.endpointPath("search"),queryParams:b,streamConfig:y,abortSignal:l,isStreamingRequest:w},{cacheResponseForSeconds:v})]})})},s.prototype.endpointPath=function(u){return"".concat(r.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(a).concat(u===void 0?"":"/"+u)},Object.defineProperty(s,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),s})();return ai.SearchOnlyDocuments=o,ai}var vg;function bg(){if(vg)return vo;vg=1,Object.defineProperty(vo,"__esModule",{value:!0});var e=Oe,t=ti(),r=yg(),n=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,a=(function(s){e.__extends(u,s);function u(d,p,m){return s.call(this,d,p,m)||this}return u.prototype.create=function(d,p){return p===void 0&&(p={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(m){if(!d)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),d,p)]})})},u.prototype.upsert=function(d,p){return p===void 0&&(p={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(m){if(!d)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),d,Object.assign({},p,{action:"upsert"}))]})})},u.prototype.update=function(d,p){return p===void 0&&(p={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(m){if(!d)throw new Error("No document provided");return p.filter_by!=null?[2,this.apiCall.patch(this.endpointPath(),d,Object.assign({},p))]:[2,this.apiCall.post(this.endpointPath(),d,Object.assign({},p,{action:"update"}))]})})},u.prototype.delete=function(d){return d===void 0&&(d={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(p){return[2,this.apiCall.delete(this.endpointPath(),d)]})})},u.prototype.createMany=function(d,p){return p===void 0&&(p={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(m){return this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"),[2,this.import(d,p)]})})},u.prototype.import=function(d,p){return p===void 0&&(p={}),e.__awaiter(this,void 0,void 0,function(){var m,v,h,l,c;return e.__generator(this,function(g){switch(g.label){case 0:if(m=e.__assign({throwOnFail:!0},p),Array.isArray(d)){if(d.length===0)throw new t.RequestMalformed("No documents provided");try{v=d.map(function(y){return JSON.stringify(y)}).join(`
|
|
172
|
+
`)}catch(y){throw y instanceof RangeError&&y.message.includes("Too many properties to enumerate")?new Error("".concat(y,`
|
|
173
|
+
It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object
|
|
174
|
+
|
|
175
|
+
Please try reducing the number of keys in your document, or using CURL to import your data.
|
|
176
|
+
`)):new Error(y)}}else if(v=d,o(v))throw new t.RequestMalformed("No documents provided");return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:m,bodyParameters:v,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!n})];case 1:if(h=g.sent(),Array.isArray(d)){if(l=h.split(`
|
|
177
|
+
`).map(function(y){return JSON.parse(y)}),c=l.filter(function(y){return y.success===!1}),c.length>0&&m.throwOnFail)throw new t.ImportError("".concat(l.length-c.length," documents imported successfully, ").concat(c.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),l,{documentsInJSONLFormat:v,options:m,failedItems:c,successCount:l.length-c.length});return[2,l]}else return[2,h]}})})},u.prototype.importStream=function(d,p){return p===void 0&&(p={}),e.__awaiter(this,void 0,void 0,function(){var m,v,h,l;return e.__generator(this,function(c){switch(c.label){case 0:return m=e.__assign({throwOnFail:!0},p),[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:m,bodyParameters:d,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!n})];case 1:if(v=c.sent(),h=v.split(`
|
|
178
|
+
`).map(function(g){return JSON.parse(g)}),l=h.filter(function(g){return g.success===!1}),l.length>0&&m.throwOnFail)throw new t.ImportError("".concat(h.length-l.length," documents imported successfully, ").concat(l.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),h,{documentsInJSONLFormat:d,options:m,failedItems:l,successCount:h.length-l.length});return[2,h]}})})},u.prototype.export=function(d){return d===void 0&&(d={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(p){return[2,this.apiCall.get(this.endpointPath("export"),d)]})})},u.prototype.exportStream=function(d){return d===void 0&&(d={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(p){return[2,this.apiCall.get(this.endpointPath("export"),d,{responseType:"stream"})]})})},u})(r.SearchOnlyDocuments);vo.default=a;function o(s){return s==null||s===""||s.length===0}return vo}var wo={},wg;function _g(){if(wg)return wo;wg=1,Object.defineProperty(wo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(zr()),r="/overrides",n=(function(){function a(o,s){this.collectionName=o,this.apiCall=s}return a.prototype.upsert=function(o,s){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(u){return[2,this.apiCall.put(this.endpointPath(o),s)]})})},a.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.get(this.endpointPath())]})})},a.prototype.endpointPath=function(o){return"".concat(t.default.RESOURCEPATH,"/").concat(this.collectionName).concat(a.RESOURCEPATH).concat(o===void 0?"":"/"+encodeURIComponent(o))},Object.defineProperty(a,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),a})();return wo.default=n,wo}var _o={},Sg;function Nx(){if(Sg)return _o;Sg=1,Object.defineProperty(_o,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(zr()),r=e.__importDefault(_g()),n=(function(){function a(o,s,u){this.collectionName=o,this.overrideId=s,this.apiCall=u}return a.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.get(this.endpointPath())]})})},a.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.delete(this.endpointPath())]})})},a.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(r.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.overrideId))},a})();return _o.default=n,_o}var So={},Rg;function Pg(){if(Rg)return So;Rg=1,Object.defineProperty(So,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(zr()),r="/synonyms",n=(function(){function a(o,s){this.collectionName=o,this.apiCall=s}return a.prototype.upsert=function(o,s){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(u){return[2,this.apiCall.put(this.endpointPath(o),s)]})})},a.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.get(this.endpointPath())]})})},a.prototype.endpointPath=function(o){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(a.RESOURCEPATH).concat(o===void 0?"":"/"+encodeURIComponent(o))},Object.defineProperty(a,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),a})();return So.default=n,So}var Ro={},Og;function Fx(){if(Og)return Ro;Og=1,Object.defineProperty(Ro,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(zr()),r=e.__importDefault(Pg()),n=(function(){function a(o,s,u){this.collectionName=o,this.synonymId=s,this.apiCall=u}return a.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.get(this.endpointPath())]})})},a.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.delete(this.endpointPath())]})})},a.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(r.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymId))},a})();return Ro.default=n,Ro}var ii={},Eg;function Ix(){if(Eg)return ii;Eg=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.Document=void 0;var e=Oe,t=e.__importDefault(zr()),r=e.__importDefault(bg()),n=(function(){function a(o,s,u){this.collectionName=o,this.documentId=s,this.apiCall=u}return a.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.get(this.endpointPath())]})})},a.prototype.delete=function(o){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.delete(this.endpointPath(),o)]})})},a.prototype.update=function(o,s){return s===void 0&&(s={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(u){return[2,this.apiCall.patch(this.endpointPath(),o,s)]})})},a.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(r.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.documentId))},a})();return ii.Document=n,ii}var Cg;function Mx(){if(Cg)return yo;Cg=1,Object.defineProperty(yo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(zr()),r=e.__importDefault(bg()),n=ti(),a=e.__importDefault(_g()),o=e.__importDefault(Nx()),s=e.__importDefault(Pg()),u=e.__importDefault(Fx()),d=Ix(),p=(function(){function m(v,h,l){this.name=v,this.apiCall=h,this.configuration=l,this.individualDocuments={},this.individualOverrides={},this.individualSynonyms={},this.name=v,this.apiCall=h,this.configuration=l,this._documents=new r.default(this.name,this.apiCall,this.configuration),this._overrides=new a.default(this.name,this.apiCall),this._synonyms=new s.default(this.name,this.apiCall)}return m.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(v){return[2,this.apiCall.get(this.endpointPath())]})})},m.prototype.update=function(v){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(h){return[2,this.apiCall.patch(this.endpointPath(),v)]})})},m.prototype.delete=function(v){return v===void 0&&(v={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(h){return[2,this.apiCall.delete(this.endpointPath(),v)]})})},m.prototype.exists=function(){return e.__awaiter(this,void 0,void 0,function(){var v;return e.__generator(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),[4,this.retrieve()];case 1:return h.sent(),[2,!0];case 2:if(v=h.sent(),v instanceof n.ObjectNotFound)return[2,!1];throw v;case 3:return[2]}})})},m.prototype.documents=function(v){return v?(this.individualDocuments[v]===void 0&&(this.individualDocuments[v]=new d.Document(this.name,v,this.apiCall)),this.individualDocuments[v]):this._documents},m.prototype.overrides=function(v){return v===void 0?this._overrides:(this.individualOverrides[v]===void 0&&(this.individualOverrides[v]=new o.default(this.name,v,this.apiCall)),this.individualOverrides[v])},m.prototype.synonyms=function(v){return v===void 0?this._synonyms:(this.individualSynonyms[v]===void 0&&(this.individualSynonyms[v]=new u.default(this.name,v,this.apiCall)),this.individualSynonyms[v])},m.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},m})();return yo.default=p,yo}var Po={},xg;function Tg(){if(xg)return Po;xg=1,Object.defineProperty(Po,"__esModule",{value:!0});var e=Oe,t="/aliases",r=(function(){function n(a){this.apiCall=a}return n.prototype.upsert=function(a,o){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.put(this.endpointPath(a),o)]})})},n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(t)]})})},n.prototype.endpointPath=function(a){return"".concat(n.RESOURCEPATH,"/").concat(encodeURIComponent(a))},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return Po.default=r,Po}var Oo={},kg;function Lx(){if(kg)return Oo;kg=1,Object.defineProperty(Oo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(Tg()),r=(function(){function n(a,o){this.name=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},n})();return Oo.default=r,Oo}var Eo={},Ag;function jg(){if(Ag)return Eo;Ag=1,Object.defineProperty(Eo,"__esModule",{value:!0});var e=Oe,t=Eu,r=ni(),n="/keys",a=(function(){function o(s){this.apiCall=s,this.apiCall=s}return o.prototype.create=function(s){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(u){return[2,this.apiCall.post(o.RESOURCEPATH,s)]})})},o.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.get(n)]})})},o.prototype.generateScopedSearchKey=function(s,u){var d=(0,r.normalizeArrayableParams)(u),p=JSON.stringify(d),m=Buffer.from((0,t.createHmac)("sha256",s).update(p).digest("base64")),v=s.substr(0,4),h="".concat(m).concat(v).concat(p);return Buffer.from(h).toString("base64")},Object.defineProperty(o,"RESOURCEPATH",{get:function(){return n},enumerable:!1,configurable:!0}),o})();return Eo.default=a,Eo}var Co={},$g;function Bx(){if($g)return Co;$g=1,Object.defineProperty(Co,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(jg()),r=(function(){function n(a,o){this.id=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},n})();return Co.default=r,Co}var xo={},Dg;function Hx(){if(Dg)return xo;Dg=1,Object.defineProperty(xo,"__esModule",{value:!0});var e=Oe,t="/debug",r=(function(){function n(a){this.apiCall=a}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(t)]})})},n})();return xo.default=r,xo}var To={},Ng;function Vx(){if(Ng)return To;Ng=1,Object.defineProperty(To,"__esModule",{value:!0});var e=Oe,t="/metrics.json",r=(function(){function n(a){this.apiCall=a}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(t)]})})},n})();return To.default=r,To}var ko={},Fg;function qx(){if(Fg)return ko;Fg=1,Object.defineProperty(ko,"__esModule",{value:!0});var e=Oe,t="/stats.json",r=(function(){function n(a){this.apiCall=a}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(t)]})})},n})();return ko.default=r,ko}var Ao={},Ig;function Ux(){if(Ig)return Ao;Ig=1,Object.defineProperty(Ao,"__esModule",{value:!0});var e=Oe,t="/health",r=(function(){function n(a){this.apiCall=a}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(t)]})})},n})();return Ao.default=r,Ao}var jo={},Mg;function Wx(){if(Mg)return jo;Mg=1,Object.defineProperty(jo,"__esModule",{value:!0});var e=Oe,t="/operations",r=(function(){function n(a){this.apiCall=a}return n.prototype.perform=function(a,o){return o===void 0&&(o={}),e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.post("".concat(t,"/").concat(a),{},o)]})})},n})();return jo.default=r,jo}var $o={},Lg;function Bg(){if(Lg)return $o;Lg=1,Object.defineProperty($o,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(mg()),r=ni(),n="/multi_search",a=(function(){function o(s,u,d){d===void 0&&(d=!1),this.apiCall=s,this.configuration=u,this.useTextContentType=d,this.requestWithCache=new t.default}return o.prototype.clearCache=function(){this.requestWithCache.clearCache()},o.prototype.perform=function(s,u,d){return e.__awaiter(this,void 0,void 0,function(){var p,m,v,h,l;return e.__generator(this,function(c){return p=u?e.__assign({},u):{},this.configuration.useServerSideSearchCache===!0&&(p.use_cache=!0),m={union:s.union,searches:s.searches.map(r.normalizeArrayableParams)},v=p.streamConfig,h=e.__rest(p,["streamConfig"]),l=(0,r.normalizeArrayableParams)(h),[2,this.requestWithCache.perform(this.apiCall,"post",{path:n,body:m,queryParams:l,headers:this.useTextContentType?{"content-type":"text/plain"}:{},streamConfig:v,abortSignal:d?.abortSignal,isStreamingRequest:this.isStreamingRequest(p)},d?.cacheSearchResultsForSeconds!==void 0?{cacheResponseForSeconds:d.cacheSearchResultsForSeconds}:void 0)]})})},o.prototype.isStreamingRequest=function(s){return s.streamConfig!==void 0},o})();return $o.default=a,$o}var Do={},Hg;function Vg(){if(Hg)return Do;Hg=1,Object.defineProperty(Do,"__esModule",{value:!0});var e=Oe,t=ni(),r="/presets",n=(function(){function a(o){this.apiCall=o}return a.prototype.upsert=function(o,s){return e.__awaiter(this,void 0,void 0,function(){var u,d;return e.__generator(this,function(p){return typeof s.value=="object"&&"searches"in s.value?(u=s.value.searches.map(function(m){return(0,t.normalizeArrayableParams)(m)}),[2,this.apiCall.put(this.endpointPath(o),{value:{searches:u}})]):(d=(0,t.normalizeArrayableParams)(s.value),[2,this.apiCall.put(this.endpointPath(o),{value:d})])})})},a.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.get(this.endpointPath())]})})},a.prototype.endpointPath=function(o){return"".concat(a.RESOURCEPATH).concat(o===void 0?"":"/"+encodeURIComponent(o))},Object.defineProperty(a,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),a})();return Do.default=n,Do}var No={},qg;function zx(){if(qg)return No;qg=1,Object.defineProperty(No,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(Vg()),r=(function(){function n(a,o){this.presetId=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.presetId))},n})();return No.default=r,No}var Fo={},Io={},Ug;function Wg(){if(Ug)return Io;Ug=1,Object.defineProperty(Io,"__esModule",{value:!0});var e=Oe,t="/analytics/rules",r=(function(){function n(a){this.apiCall=a,this.apiCall=a}return n.prototype.upsert=function(a,o){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.put(this.endpointPath(a),o)]})})},n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.endpointPath=function(a){return"".concat(n.RESOURCEPATH).concat(a===void 0?"":"/"+encodeURIComponent(a))},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return Io.default=r,Io}var Mo={},zg;function Yx(){if(zg)return Mo;zg=1,Object.defineProperty(Mo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(Wg()),r=(function(){function n(a,o){this.name=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},n})();return Mo.default=r,Mo}var Lo={},Yg;function Qx(){if(Yg)return Lo;Yg=1,Object.defineProperty(Lo,"__esModule",{value:!0});var e=Oe,t="/analytics/events",r=(function(){function n(a){this.apiCall=a,this.apiCall=a}return n.prototype.create=function(a){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.post(this.endpointPath(),a)]})})},n.prototype.endpointPath=function(a){return"".concat(n.RESOURCEPATH).concat(a===void 0?"":"/"+encodeURIComponent(a))},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return Lo.default=r,Lo}var Qg;function Kx(){if(Qg)return Fo;Qg=1,Object.defineProperty(Fo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(Wg()),r=e.__importDefault(Yx()),n=e.__importDefault(Qx()),a="/analytics",o=(function(){function s(u){this.apiCall=u,this.individualAnalyticsRules={},this.apiCall=u,this._analyticsRules=new t.default(this.apiCall),this._analyticsEvents=new n.default(this.apiCall)}return s.prototype.rules=function(u){return u===void 0?this._analyticsRules:(this.individualAnalyticsRules[u]===void 0&&(this.individualAnalyticsRules[u]=new r.default(u,this.apiCall)),this.individualAnalyticsRules[u])},s.prototype.events=function(){return this._analyticsEvents},Object.defineProperty(s,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),s})();return Fo.default=o,Fo}var Bo={},Kg;function Gg(){if(Kg)return Bo;Kg=1,Object.defineProperty(Bo,"__esModule",{value:!0});var e=Oe,t="/stopwords",r=(function(){function n(a){this.apiCall=a}return n.prototype.upsert=function(a,o){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.put(this.endpointPath(a),o)]})})},n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.endpointPath=function(a){return"".concat(n.RESOURCEPATH).concat(a===void 0?"":"/"+encodeURIComponent(a))},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return Bo.default=r,Bo}var Ho={},Jg;function Gx(){if(Jg)return Ho;Jg=1,Object.defineProperty(Ho,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(Gg()),r=(function(){function n(a,o){this.stopwordId=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.stopwordId))},n})();return Ho.default=r,Ho}var Vo={},qo={},Xg;function Zg(){if(Xg)return qo;Xg=1,Object.defineProperty(qo,"__esModule",{value:!0});var e=Oe,t="/conversations/models",r=(function(){function n(a){this.apiCall=a,this.apiCall=a}return n.prototype.create=function(a){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.post(this.endpointPath(),a)]})})},n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.endpointPath=function(a){return"".concat(n.RESOURCEPATH).concat(a===void 0?"":"/"+encodeURIComponent(a))},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return qo.default=r,qo}var Uo={},ey;function Jx(){if(ey)return Uo;ey=1,Object.defineProperty(Uo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(Zg()),r=(function(){function n(a,o){this.id=a,this.apiCall=o}return n.prototype.update=function(a){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.put(this.endpointPath(),a)]})})},n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},n})();return Uo.default=r,Uo}var ty;function ry(){if(ty)return Vo;ty=1,Object.defineProperty(Vo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(Zg()),r=e.__importDefault(Jx()),n="/conversations",a=(function(){function o(s){this.apiCall=s,this.individualConversationModels={},this.apiCall=s,this._conversationsModels=new t.default(this.apiCall)}return o.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(s){return[2,this.apiCall.get(n)]})})},o.prototype.models=function(s){return s===void 0?this._conversationsModels:(this.individualConversationModels[s]===void 0&&(this.individualConversationModels[s]=new r.default(s,this.apiCall)),this.individualConversationModels[s])},Object.defineProperty(o,"RESOURCEPATH",{get:function(){return n},enumerable:!1,configurable:!0}),o})();return Vo.default=a,Vo}var Wo={},ny;function Xx(){if(ny)return Wo;ny=1,Object.defineProperty(Wo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(ry()),r=(function(){function n(a,o){this.id=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.update=function(a){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.put(this.endpointPath(),a)]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},n})();return Wo.default=r,Wo}var zo={},Yo={},ay;function iy(){if(ay)return Yo;ay=1,Object.defineProperty(Yo,"__esModule",{value:!0});var e=Oe,t="/stemming/dictionaries",r=(function(){function n(a){this.apiCall=a,this.apiCall=a}return n.prototype.upsert=function(a,o){return e.__awaiter(this,void 0,void 0,function(){var s,u;return e.__generator(this,function(d){switch(d.label){case 0:return s=Array.isArray(o)?o.map(function(p){return JSON.stringify(p)}).join(`
|
|
179
|
+
`):o,[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:{id:a},bodyParameters:s,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0})];case 1:return u=d.sent(),[2,Array.isArray(o)?u.split(`
|
|
180
|
+
`).map(function(p){return JSON.parse(p)}):u]}})})},n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.endpointPath=function(a){return a===void 0?"".concat(n.RESOURCEPATH):"".concat(n.RESOURCEPATH,"/").concat(encodeURIComponent(a))},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return Yo.default=r,Yo}var Qo={},oy;function Zx(){if(oy)return Qo;oy=1,Object.defineProperty(Qo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(iy()),r=(function(){function n(a,o){this.id=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},n})();return Qo.default=r,Qo}var sy;function eT(){if(sy)return zo;sy=1,Object.defineProperty(zo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(iy()),r=e.__importDefault(Zx()),n="/stemming",a=(function(){function o(s){this.apiCall=s,this.individualStemmingDictionaries={},this.apiCall=s,this._stemmingDictionaries=new t.default(this.apiCall)}return o.prototype.dictionaries=function(s){return s===void 0?this._stemmingDictionaries:(this.individualStemmingDictionaries[s]===void 0&&(this.individualStemmingDictionaries[s]=new r.default(s,this.apiCall)),this.individualStemmingDictionaries[s])},Object.defineProperty(o,"RESOURCEPATH",{get:function(){return n},enumerable:!1,configurable:!0}),o})();return zo.default=a,zo}var Ko={},ly;function uy(){if(ly)return Ko;ly=1,Object.defineProperty(Ko,"__esModule",{value:!0});var e=Oe,t="/nl_search_models",r=(function(){function n(a){this.apiCall=a}return n.prototype.create=function(a){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.post(this.endpointPath(),a)]})})},n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.endpointPath=function(){return n.RESOURCEPATH},Object.defineProperty(n,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),n})();return Ko.default=r,Ko}var Go={},cy;function tT(){if(cy)return Go;cy=1,Object.defineProperty(Go,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(uy()),r=(function(){function n(a,o){this.id=a,this.apiCall=o}return n.prototype.retrieve=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.get(this.endpointPath())]})})},n.prototype.update=function(a){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(o){return[2,this.apiCall.put(this.endpointPath(),a)]})})},n.prototype.delete=function(){return e.__awaiter(this,void 0,void 0,function(){return e.__generator(this,function(a){return[2,this.apiCall.delete(this.endpointPath())]})})},n.prototype.endpointPath=function(){return"".concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},n})();return Go.default=r,Go}var dy;function rT(){if(dy)return to;dy=1,Object.defineProperty(to,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(sg()),r=e.__importDefault(fg()),n=e.__importDefault(zr()),a=e.__importDefault(Mx()),o=e.__importDefault(Tg()),s=e.__importDefault(Lx()),u=e.__importDefault(jg()),d=e.__importDefault(Bx()),p=e.__importDefault(Hx()),m=e.__importDefault(Vx()),v=e.__importDefault(qx()),h=e.__importDefault(Ux()),l=e.__importDefault(Wx()),c=e.__importDefault(Bg()),g=e.__importDefault(Vg()),y=e.__importDefault(zx()),f=e.__importDefault(Kx()),b=e.__importDefault(Gg()),w=e.__importDefault(Gx()),_=e.__importDefault(ry()),S=e.__importDefault(Xx()),R=e.__importDefault(eT()),O=e.__importDefault(uy()),P=e.__importDefault(tT()),C=(function(){function k(A){var H;A.sendApiKeyAsQueryParam=(H=A.sendApiKeyAsQueryParam)!==null&&H!==void 0?H:!1,this.configuration=new t.default(A),this.apiCall=new r.default(this.configuration),this.debug=new p.default(this.apiCall),this.metrics=new m.default(this.apiCall),this.stats=new v.default(this.apiCall),this.health=new h.default(this.apiCall),this.operations=new l.default(this.apiCall),this.multiSearch=new c.default(this.apiCall,this.configuration),this._collections=new n.default(this.apiCall),this.individualCollections={},this._aliases=new o.default(this.apiCall),this.individualAliases={},this._keys=new u.default(this.apiCall),this.individualKeys={},this._presets=new g.default(this.apiCall),this.individualPresets={},this._stopwords=new b.default(this.apiCall),this.individualStopwords={},this.analytics=new f.default(this.apiCall),this.stemming=new R.default(this.apiCall),this._conversations=new _.default(this.apiCall),this.individualConversations={},this._nlSearchModels=new O.default(this.apiCall),this.individualNLSearchModels={}}return k.prototype.collections=function(A){return A===void 0?this._collections:(this.individualCollections[A]===void 0&&(this.individualCollections[A]=new a.default(A,this.apiCall,this.configuration)),this.individualCollections[A])},k.prototype.aliases=function(A){return A===void 0?this._aliases:(this.individualAliases[A]===void 0&&(this.individualAliases[A]=new s.default(A,this.apiCall)),this.individualAliases[A])},k.prototype.keys=function(A){return A===void 0?this._keys:(this.individualKeys[A]===void 0&&(this.individualKeys[A]=new d.default(A,this.apiCall)),this.individualKeys[A])},k.prototype.presets=function(A){return A===void 0?this._presets:(this.individualPresets[A]===void 0&&(this.individualPresets[A]=new y.default(A,this.apiCall)),this.individualPresets[A])},k.prototype.stopwords=function(A){return A===void 0?this._stopwords:(this.individualStopwords[A]===void 0&&(this.individualStopwords[A]=new w.default(A,this.apiCall)),this.individualStopwords[A])},k.prototype.conversations=function(A){return A===void 0?this._conversations:(this.individualConversations[A]===void 0&&(this.individualConversations[A]=new S.default(A,this.apiCall)),this.individualConversations[A])},k.prototype.nlSearchModels=function(A){return A===void 0?this._nlSearchModels:(this.individualNLSearchModels[A]===void 0&&(this.individualNLSearchModels[A]=new P.default(A,this.apiCall)),this.individualNLSearchModels[A])},k})();return to.default=C,to}var Jo={},oi={},fy;function nT(){if(fy)return oi;fy=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.SearchOnlyCollection=void 0;var e=yg(),t=(function(){function r(n,a,o){this.name=n,this.apiCall=a,this.configuration=o,this._documents=new e.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return r.prototype.documents=function(){return this._documents},r})();return oi.SearchOnlyCollection=t,oi}var hy;function aT(){if(hy)return Jo;hy=1,Object.defineProperty(Jo,"__esModule",{value:!0});var e=Oe,t=e.__importDefault(sg()),r=e.__importDefault(fg()),n=e.__importDefault(Bg()),a=nT(),o=(function(){function s(u){var d;u.sendApiKeyAsQueryParam=(d=u.sendApiKeyAsQueryParam)!==null&&d!==void 0?d:!0,u.sendApiKeyAsQueryParam===!0&&(u.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),u.sendApiKeyAsQueryParam=!1),this.configuration=new t.default(u),this.apiCall=new r.default(this.configuration),this.multiSearch=new n.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return s.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach(function(u){u[0];var d=u[1];d.documents().clearCache()})},s.prototype.collections=function(u){if(u)return this.individualCollections[u]===void 0&&(this.individualCollections[u]=new a.SearchOnlyCollection(u,this.apiCall,this.configuration)),this.individualCollections[u];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},s})();return Jo.default=o,Jo}var py;function my(){if(py)return vr;py=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.Errors=vr.SearchClient=vr.Client=void 0;var e=Oe,t=e.__importDefault(rT());vr.Client=t.default;var r=e.__importDefault(aT());vr.SearchClient=r.default;var n=e.__importStar(ti());return vr.Errors=n,vr.default={Client:t.default,SearchClient:r.default,Errors:n},vr}var iT=my();const oT=aa(iT);function sT(e,{includeHomeEnd:t=!0}={}){const r={ArrowLeft:s=>Math.max(0,s-1),ArrowRight:s=>Math.min(o.length-1,s+1)};t&&(r.Home=()=>0,r.End=()=>o.length-1);const n=i.ref(null),a=s=>{if(s.key in r){s.preventDefault();const u=o.indexOf(s.target);n.value=o[r[s.key](u)],n.value.focus()}},o=[];return i.watchEffect(()=>{(i.toValue(e)||[]).filter(s=>!o.includes(s)).forEach(s=>{s.addEventListener("keydown",a),s.addEventListener("focus",u=>{n.value=u.target,u.target.addEventListener("blur",()=>n.value=null,{once:!0})}),o.push(s),document.activeElement===s&&(n.value=s)})}),n}const lT={class:"tabs"},uT={class:"tabs__tablist",role:"tablist","aria-label":"Sample Tabs"},cT=["aria-selected","aria-controls","id","tabindex","textContent"],dT=["tabindex","id","aria-labelledby","hidden"],fT={__name:"PTabs",props:{titles:{type:Array,required:!0}},setup(e){const t=e,r=i.useTemplateRef("tablist"),n=i.ref(0),a=i.ref(!0),o=sT(r);i.watchEffect(()=>{o.value&&(n.value=r.value.indexOf(o.value),a.value||history.replaceState(void 0,void 0,`${window.location.pathname}#${s.value[n.value].title}`))});const s=i.computed(()=>t.titles.map((d,p)=>({title:d,selected:p===n.value,tabindex:p===n.value?0:-1,buttonId:`tab-${p+1}`,panelId:`tabpanel-${p+1}`})));i.onMounted(()=>{u(),addEventListener("hashchange",d=>{d.preventDefault(),u()}),a.value=!1});function u(){location.hash?s.value.every((d,p)=>(console.log("el, index",d,p),location.hash.substring(1)==d.title&&(n.value=p),!0)):(n.value=0,a.value||history.replaceState(void 0,void 0,`#${s.value[n.value].title}`))}return(d,p)=>(i.openBlock(),i.createElementBlock("div",lT,[i.createElementVNode("div",uT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,m=>(i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["tabs__button",{"-selected":m.selected}]),role:"tab","aria-selected":m.selected,"aria-controls":m.panelId,id:m.buttonId,ref_for:!0,ref_key:"tablist",ref:r,tabindex:m.tabindex,textContent:i.toDisplayString(m.title)},null,10,cT))),256))]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,m=>(i.openBlock(),i.createElementBlock("div",{class:"tabs__panel",role:"tabpanel",tabindex:m.tabindex,id:m.panelId,"aria-labelledby":m.buttonId,hidden:!m.selected},[i.renderSlot(d.$slots,m.panelId)],8,dT))),256))]))}};We({connector:If});const hT="data:image/svg+xml,%3csvg%20id='main-icons-sprite'%20xmlns='http://www.w3.org/2000/svg'%20focusable='false'%20style='display:none;'%3e%3csymbol%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20id='chevron-up'%3e%3cpath%20d='M1%2011L9%203L17%2011'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20id='clock'%3e%3cpath%20d='M10.002%2018.7581C8.27137%2018.7581%206.57965%2018.2449%205.14072%2017.2834C3.70179%2016.322%202.58028%2014.9554%201.91801%2013.3565C1.25574%2011.7577%201.08247%209.99835%201.42009%208.30102C1.75771%206.60369%202.59106%205.04459%203.81477%203.82088C5.03848%202.59717%206.59758%201.76381%208.29492%201.42619C9.99225%201.08857%2011.7516%201.26185%2013.3504%201.92411C14.9493%202.58638%2016.3159%203.70789%2017.2773%205.14682C18.2388%206.58575%2018.752%208.27747%2018.752%2010.0081C18.752%2012.3287%2017.8301%2014.5543%2016.1891%2016.1952C14.5482%2017.8362%2012.3226%2018.7581%2010.002%2018.7581ZM10.002%202.50806C8.5186%202.50806%207.06855%202.94793%205.83518%203.77204C4.60181%204.59615%203.64052%205.76749%203.07286%207.13794C2.5052%208.50838%202.35668%2010.0164%202.64607%2011.4712C2.93546%2012.9261%203.64976%2014.2625%204.69866%2015.3114C5.74755%2016.3603%207.08392%2017.0746%208.53878%2017.3639C9.99364%2017.6533%2011.5016%2017.5048%2012.8721%2016.9372C14.2425%2016.3695%2015.4139%2015.4082%2016.238%2014.1748C17.0621%2012.9415%2017.502%2011.4914%2017.502%2010.0081C17.502%208.01894%2016.7118%206.11128%2015.3053%204.70476C13.8987%203.29824%2011.9911%202.50806%2010.002%202.50806Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3cpath%20d='M12.8707%2013.7581L9.37695%2010.2643V4.38306H10.627V9.74556L13.752%2012.8768L12.8707%2013.7581Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2065%2060'%20id='quote'%3e%3cpath%20d='M24.125%2033.875V60H0V39.375C0%2028.2083%201.33333%2020.125%204%2015.125C7.5%208.45833%2013.0417%203.41667%2020.625%200L26.125%208.75C21.5417%2010.6667%2018.1667%2013.5417%2016%2017.375C13.8333%2021.125%2012.625%2026.625%2012.375%2033.875H24.125ZM62.875%2033.875V60H38.75V39.375C38.75%2028.2083%2040.0833%2020.125%2042.75%2015.125C46.25%208.45833%2051.7917%203.41667%2059.375%200L64.875%208.75C60.2917%2010.6667%2056.9167%2013.5417%2054.75%2017.375C52.5833%2021.125%2051.375%2026.625%2051.125%2033.875H62.875Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%202%2018'%20id='info'%3e%3cpath%20d='M1%2018C1.55228%2018%202%2017.5523%202%2017L2%207C2%206.44772%201.55229%206%201%206C0.447716%206%201.09736e-06%206.44772%201.04907e-06%207L0%2017C-4.82823e-08%2017.5523%200.447715%2018%201%2018Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3cpath%20d='M1%203C1.55229%203%202%202.55228%202%202L2%201C2%200.447716%201.55229%204.82823e-08%201%200C0.447717%20-4.82823e-08%201.62189e-06%200.447716%201.57361e-06%201L1.48619e-06%202C1.4379e-06%202.55228%200.447717%203%201%203Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%202%2020'%20id='error'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%200C0.447715%200%200%200.447716%200%201V13C0%2013.5523%200.447715%2014%201%2014C1.55228%2014%202%2013.5523%202%2013V1C2%200.447715%201.55228%200%201%200ZM1%2017C0.447715%2017%200%2017.4477%200%2018V19C0%2019.5523%200.447715%2020%201%2020C1.55228%2020%202%2019.5523%202%2019V18C2%2017.4477%201.55228%2017%201%2017Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2014'%20id='download'%3e%3cpath%20d='M11.25%2014H0.75C0.3125%2014%200%2013.6875%200%2013.25C0%2012.8438%200.3125%2012.5%200.75%2012.5H11.25C11.6562%2012.5%2012%2012.8438%2012%2013.25C12%2013.6875%2011.6562%2014%2011.25%2014ZM5.4375%209.78125L1.4375%205.53125C1.15625%205.21875%201.1875%204.75%201.46875%204.46875C1.78125%204.1875%202.25%204.1875%202.53125%204.5L5.25%207.375V4.75V0.75C5.25%200.34375%205.5625%200%206%200C6.40625%200%206.75%200.34375%206.75%200.75V4.75V7.375L9.4375%204.5C9.71875%204.1875%2010.1875%204.1875%2010.5%204.46875C10.8125%204.75%2010.8125%205.21875%2010.5312%205.53125L6.53125%209.78125C6.375%209.9375%206.1875%2010%206%2010C5.78125%2010%205.59375%209.9375%205.4375%209.78125Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%202'%20id='minus'%3e%3cpath%20d='M1%201H13'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%20stroke-linecap='round'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2011'%20id='check'%3e%3cpath%20d='M1%205L5%209L13%201'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%20stroke-linecap='round'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%204'%20id='bullet-thin'%3e%3crect%20width='16'%20height='4'%20rx='2'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%208'%20id='bullet'%3e%3crect%20width='16'%20height='8'%20rx='4'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2036%2024'%20id='youtube'%3e%3cpath%20d='M34.3125%203.8125C35.0625%206.4375%2035.0625%2012.0625%2035.0625%2012.0625C35.0625%2012.0625%2035.0625%2017.625%2034.3125%2020.3125C33.9375%2021.8125%2032.75%2022.9375%2031.3125%2023.3125C28.625%2024%2018%2024%2018%2024C18%2024%207.3125%2024%204.625%2023.3125C3.1875%2022.9375%202%2021.8125%201.625%2020.3125C0.875%2017.625%200.875%2012.0625%200.875%2012.0625C0.875%2012.0625%200.875%206.4375%201.625%203.8125C2%202.3125%203.1875%201.125%204.625%200.75C7.3125%200%2018%200%2018%200C18%200%2028.625%200%2031.3125%200.75C32.75%201.125%2033.9375%202.3125%2034.3125%203.8125ZM14.5%2017.125L23.375%2012.0625L14.5%207V17.125Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2030%2026'%20id='x'%3e%3cpath%20d='M23.3125%200H27.6875L18.0625%2011.0625L29.4375%2026H20.5625L13.5625%2016.9375L5.625%2026H1.1875L11.5%2014.25L0.625%200H9.75L16%208.3125L23.3125%200ZM21.75%2023.375H24.1875L8.4375%202.5H5.8125L21.75%2023.375Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2028%2029'%20id='linkedin'%3e%3cpath%20d='M6.25%2029H0.4375V10.3125H6.25V29ZM3.3125%207.8125C1.5%207.8125%200%206.25%200%204.375C0%201.8125%202.75%200.1875%205%201.5C6.0625%202.0625%206.6875%203.1875%206.6875%204.375C6.6875%206.25%205.1875%207.8125%203.3125%207.8125ZM27.9375%2029H22.1875V19.9375C22.1875%2017.75%2022.125%2015%2019.125%2015C16.125%2015%2015.6875%2017.3125%2015.6875%2019.75V29H9.875V10.3125H15.4375V12.875H15.5C16.3125%2011.4375%2018.1875%209.875%2021%209.875C26.875%209.875%2028%2013.75%2028%2018.75V29H27.9375Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2029%2029'%20id='instagram'%3e%3cpath%20d='M15%206.8125C18.9375%206.8125%2022.1875%2010.0625%2022.1875%2014C22.1875%2018%2018.9375%2021.1875%2015%2021.1875C11%2021.1875%207.8125%2018%207.8125%2014C7.8125%2010.0625%2011%206.8125%2015%206.8125ZM15%2018.6875C17.5625%2018.6875%2019.625%2016.625%2019.625%2014C19.625%2011.4375%2017.5625%209.375%2015%209.375C12.375%209.375%2010.3125%2011.4375%2010.3125%2014C10.3125%2016.625%2012.4375%2018.6875%2015%2018.6875ZM24.125%206.5625C24.125%205.625%2023.375%204.875%2022.4375%204.875C21.5%204.875%2020.75%205.625%2020.75%206.5625C20.75%207.5%2021.5%208.25%2022.4375%208.25C23.375%208.25%2024.125%207.5%2024.125%206.5625ZM28.875%208.25C29%2010.5625%2029%2017.5%2028.875%2019.8125C28.75%2022.0625%2028.25%2024%2026.625%2025.6875C25%2027.3125%2023%2027.8125%2020.75%2027.9375C18.4375%2028.0625%2011.5%2028.0625%209.1875%2027.9375C6.9375%2027.8125%205%2027.3125%203.3125%2025.6875C1.6875%2024%201.1875%2022.0625%201.0625%2019.8125C0.9375%2017.5%200.9375%2010.5625%201.0625%208.25C1.1875%206%201.6875%204%203.3125%202.375C5%200.75%206.9375%200.25%209.1875%200.125C11.5%200%2018.4375%200%2020.75%200.125C23%200.25%2025%200.75%2026.625%202.375C28.25%204%2028.75%206%2028.875%208.25ZM25.875%2022.25C26.625%2020.4375%2026.4375%2016.0625%2026.4375%2014C26.4375%2012%2026.625%207.625%2025.875%205.75C25.375%204.5625%2024.4375%203.5625%2023.25%203.125C21.375%202.375%2017%202.5625%2015%202.5625C12.9375%202.5625%208.5625%202.375%206.75%203.125C5.5%203.625%204.5625%204.5625%204.0625%205.75C3.3125%207.625%203.5%2012%203.5%2014C3.5%2016.0625%203.3125%2020.4375%204.0625%2022.25C4.5625%2023.5%205.5%2024.4375%206.75%2024.9375C8.5625%2025.6875%2012.9375%2025.5%2015%2025.5C17%2025.5%2021.375%2025.6875%2023.25%2024.9375C24.4375%2024.4375%2025.4375%2023.5%2025.875%2022.25Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2018%2032'%20id='facebook'%3e%3cpath%20d='M16.4375%2018H11.75V32H5.5V18H0.375V12.25H5.5V7.8125C5.5%202.8125%208.5%200%2013.0625%200C15.25%200%2017.5625%200.4375%2017.5625%200.4375V5.375H15C12.5%205.375%2011.75%206.875%2011.75%208.5V12.25H17.3125L16.4375%2018Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20viewBox='0%200%2018%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20id='play'%3e%3cpath%20d='M15.5%208.16228C16.1667%208.54718%2016.1667%209.50943%2015.5%209.89433L6.5%2015.0905C5.83333%2015.4754%205%2014.9943%205%2014.2245L5%203.83215C5%203.06235%205.83333%202.58122%206.5%202.96612L15.5%208.16228Z'%20fill='var(--icon-color,%20currentColor)'/%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2013%2012'%20id='tag'%3e%3cpath%20d='M0.5%205.90902V1.125C0.5%200.503672%201.00367%200%201.625%200H6.40902C6.70739%201.56018e-06%206.99353%200.118529%207.20451%200.329508L12.1705%205.29549C12.6098%205.73483%2012.6098%206.44714%2012.1705%206.88648L7.38648%2011.6705C6.94714%2012.1098%206.23483%2012.1098%205.79549%2011.6705L0.829508%206.70451C0.618529%206.49353%200.500002%206.20739%200.5%205.90902H0.5ZM3.125%201.5C2.50367%201.5%202%202.00367%202%202.625C2%203.24633%202.50367%203.75%203.125%203.75C3.74633%203.75%204.25%203.24633%204.25%202.625C4.25%202.00367%203.74633%201.5%203.125%201.5Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2037%2037'%20id='close'%3e%3crect%20x='3'%20width='48'%20height='4'%20rx='2'%20transform='rotate(45%203%200)'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3crect%20x='16'%20y='17'%20width='4'%20height='4'%20rx='2'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3crect%20y='34'%20width='48'%20height='4'%20rx='2'%20transform='rotate(-45%200%2034)'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%20id='menu'%3e%3crect%20y='8'%20width='48'%20height='4'%20rx='2'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3crect%20y='22'%20width='48'%20height='4'%20rx='2'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3crect%20y='36'%20width='48'%20height='4'%20rx='2'%20fill='var(--icon-color,%20currentColor)'%3e%3c/rect%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2024'%20id='layers'%3e%3cpath%20d='M8%204C8.25%204%208.53125%204.0625%208.75%204.1875L15.3125%206.96875C15.7188%207.15625%2016%207.5625%2016%208C16%208.46875%2015.7188%208.875%2015.3125%209.0625L8.75%2011.8438C8.53125%2011.9688%208.25%2012%208%2012C7.71875%2012%207.46875%2011.9688%207.21875%2011.8438L0.65625%209.0625C0.25%208.875%200%208.46875%200%208C0%207.5625%200.25%207.15625%200.65625%206.96875L7.21875%204.1875C7.46875%204.0625%207.71875%204%208%204ZM7.8125%205.5625L2.0625%208L7.8125%2010.4688C7.875%2010.5%207.9375%2010.5%208%2010.5C8.0625%2010.5%208.125%2010.5%208.15625%2010.4688L13.9062%208L8.15625%205.5625C8.125%205.53125%208.0625%205.5%208%205.5C7.9375%205.5%207.875%205.53125%207.8125%205.5625ZM0.65625%2010.9688L1.65625%2010.5625L3.5625%2011.375L2.0625%2012L7.8125%2014.4688C7.875%2014.5%207.9375%2014.5%208%2014.5C8.0625%2014.5%208.125%2014.5%208.15625%2014.4688L13.9062%2012L12.4375%2011.375L14.3125%2010.5625L15.3125%2010.9688C15.7188%2011.1562%2016%2011.5625%2016%2012C16%2012.4688%2015.7188%2012.875%2015.3125%2013.0625L8.75%2015.8438C8.53125%2015.9688%208.25%2016%208%2016C7.71875%2016%207.46875%2015.9688%207.21875%2015.8438L0.65625%2013.0625C0.25%2012.875%200%2012.4688%200%2012C0%2011.5625%200.25%2011.1562%200.65625%2010.9688ZM0.65625%2014.9688L1.65625%2014.5625L3.5625%2015.375L2.0625%2016L7.8125%2018.4688C7.875%2018.5%207.9375%2018.5%208%2018.5C8.0625%2018.5%208.125%2018.5%208.15625%2018.4688L13.9062%2016L12.4375%2015.375L14.3125%2014.5625L15.3125%2014.9688C15.7188%2015.1562%2016%2015.5625%2016%2016C16%2016.4688%2015.7188%2016.875%2015.3125%2017.0625L8.75%2019.8438C8.53125%2019.9688%208.25%2020%208%2020C7.71875%2020%207.46875%2019.9688%207.21875%2019.8438L0.65625%2017.0625C0.25%2016.875%200%2016.4688%200%2016C0%2015.5625%200.25%2015.1562%200.65625%2014.9688Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2018%2012'%20id='arrow-left'%3e%3cpath%20d='M6.4159%200.219884C6.13047%20-0.0732943%205.66769%20-0.0732944%205.38226%200.219884L0.214074%205.52834C0.136565%205.60795%200.0801047%205.701%200.0446908%205.80018C0.00752214%205.90427%20-0.00646207%206.01513%200.00273921%206.12431C0.00828171%206.19056%200.0222006%206.25435%200.0434024%206.31456C0.0698971%206.38996%200.108521%206.46189%200.159276%206.52713C0.176194%206.54888%200.19446%206.56989%200.214073%206.59003L0.216578%206.59259L5.26702%2011.7801C5.55246%2012.0733%206.01523%2012.0733%206.30066%2011.7801C6.58609%2011.4869%206.58609%2011.0116%206.30066%2010.7184L2.49543%206.80991L17.2691%206.80991C17.6728%206.80991%2018%206.4738%2018%206.05918C18%205.64457%2017.6728%205.30846%2017.2691%205.30846L2.49542%205.30845L6.4159%201.28158C6.70133%200.988398%206.70133%200.513062%206.4159%200.219884Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2018%2012'%20id='arrow-right'%3e%3cpath%20d='M11.5841%2011.7801C11.8695%2012.0733%2012.3323%2012.0733%2012.6177%2011.7801L17.7859%206.47166C17.8634%206.39205%2017.9199%206.299%2017.9553%206.19982C17.9925%206.09573%2018.0065%205.98487%2017.9973%205.87569C17.9917%205.80944%2017.9778%205.74565%2017.9566%205.68544C17.9301%205.61004%2017.8915%205.53811%2017.8407%205.47287C17.8238%205.45112%2017.8055%205.43011%2017.7859%205.40997L17.7834%205.40741L12.733%200.219883C12.4475%20-0.0732947%2011.9848%20-0.0732942%2011.6993%200.219883C11.4139%200.513061%2011.4139%200.988397%2011.6993%201.28157L15.5046%205.19009H0.730891C0.327232%205.19009%20-8.34465e-07%205.5262%20-8.34465e-07%205.94082C-8.34465e-07%206.35543%200.32723%206.69155%200.730889%206.69155L15.5046%206.69155L11.5841%2010.7184C11.2987%2011.0116%2011.2987%2011.4869%2011.5841%2011.7801Z'%20fill='var(--icon-color,%20currentColor)'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20id='chevron-left'%3e%3cpath%20d='M11%2017L3%209L11%201'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/symbol%3e%3csymbol%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20id='chevron-down'%3e%3cpath%20d='M1%207L9%2015L17%207'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/symbol%3e%3csymbol%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20id='chevron-right'%3e%3cpath%20d='M7%2017L15%209L7%201'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2014%2014'%20id='home'%3e%3cpath%20d='M13%208L7%202L1%208'%20stroke='var(--icon-color,%20currentColor)'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c/path%3e%3cpath%20d='M3%208V13H11V8'%20stroke='var(--icon-color,%20currentColor)'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2021%2021'%20id='search'%3e%3cpath%20d='M12.75%2012.75L19.75%2019.75'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%20stroke-linecap='round'%3e%3c/path%3e%3ccircle%20cx='7.75'%20cy='7.75'%20r='6.5'%20stroke='var(--icon-color,%20currentColor)'%20stroke-width='2'%3e%3c/circle%3e%3c/symbol%3e%3csymbol%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20448%20512'%20id='date'%3e%3cpath%20fill='var(--icon-color,%20currentColor)'%20d='M152%2024c0-13.3-10.7-24-24-24s-24%2010.7-24%2024l0%2040L64%2064C28.7%2064%200%2092.7%200%20128l0%2016%200%2048L0%20448c0%2035.3%2028.7%2064%2064%2064l320%200c35.3%200%2064-28.7%2064-64l0-256%200-48%200-16c0-35.3-28.7-64-64-64l-40%200%200-40c0-13.3-10.7-24-24-24s-24%2010.7-24%2024l0%2040L152%2064l0-40zM48%20192l352%200%200%20256c0%208.8-7.2%2016-16%2016L64%20464c-8.8%200-16-7.2-16-16l0-256z'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20384%20512'%20id='location'%3e%3cpath%20fill='var(--icon-color,%20currentColor)'%20d='M192%20512s192-208%20192-320C384%2086%20298%200%20192%200S0%2086%200%20192C0%20304%20192%20512%20192%20512zm0-384a64%2064%200%201%201%200%20128%2064%2064%200%201%201%200-128z'%3e%3c/path%3e%3c/symbol%3e%3csymbol%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20448%20512'%20id='bars'%3e%3cpath%20fill='var(--icon-color,%20currentColor)'%20d='M0%2096C0%2078.3%2014.3%2064%2032%2064l384%200c17.7%200%2032%2014.3%2032%2032s-14.3%2032-32%2032L32%20128C14.3%20128%200%20113.7%200%2096zM0%20256c0-17.7%2014.3-32%2032-32l384%200c17.7%200%2032%2014.3%2032%2032s-14.3%2032-32%2032L32%20288c-17.7%200-32-14.3-32-32zM448%20416c0%2017.7-14.3%2032-32%2032L32%20448c-17.7%200-32-14.3-32-32s14.3-32%2032-32l384%200c17.7%200%2032%2014.3%2032%2032z'/%3e%3c/symbol%3e%3c/svg%3e";var Cu={},xu={exports:{}},gy;function si(){return gy||(gy=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(xu)),xu.exports}var Tu={exports:{}},ku={exports:{}},yy;function vy(){return yy||(yy=1,(function(e){function t(r,n){this.v=r,this.k=n}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ku)),ku.exports}var Au={exports:{}},ju={exports:{}},by;function wy(){return by||(by=1,(function(e){function t(r,n,a,o){var s=Object.defineProperty;try{s({},"",{})}catch{s=0}e.exports=t=function(d,p,m,v){function h(l,c){t(d,l,function(g){return this._invoke(l,c,g)})}p?s?s(d,p,{value:m,enumerable:!v,configurable:!v,writable:!v}):d[p]=m:(h("next",0),h("throw",1),h("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,a,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ju)),ju.exports}var _y;function Sy(){return _y||(_y=1,(function(e){var t=wy();function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,a,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function d(y,f,b,w){var _=f&&f.prototype instanceof m?f:m,S=Object.create(_.prototype);return t(S,"_invoke",(function(R,O,P){var C,k,A,H=0,Q=P||[],$=!1,M={p:0,n:0,v:n,a:D,f:D.bind(n,4),d:function(U,B){return C=U,k=0,A=n,M.n=B,p}};function D(I,U){for(k=I,A=U,a=0;!$&&H&&!B&&a<Q.length;a++){var B,Y=Q[a],q=M.p,ne=Y[2];I>3?(B=ne===U)&&(A=Y[(k=Y[4])?5:(k=3,3)],Y[4]=Y[5]=n):Y[0]<=q&&((B=I<2&&q<Y[1])?(k=0,M.v=U,M.n=Y[1]):q<ne&&(B=I<3||Y[0]>U||U>ne)&&(Y[4]=I,Y[5]=U,M.n=ne,k=0))}if(B||I>1)return p;throw $=!0,U}return function(I,U,B){if(H>1)throw TypeError("Generator is already running");for($&&U===1&&D(U,B),k=U,A=B;(a=k<2?n:A)||!$;){C||(k?k<3?(k>1&&(M.n=-1),D(k,A)):M.n=A:M.v=A);try{if(H=2,C){if(k||(I="next"),a=C[I]){if(!(a=a.call(C,A)))throw TypeError("iterator result is not an object");if(!a.done)return a;A=a.value,k<2&&(k=0)}else k===1&&(a=C.return)&&a.call(C),k<2&&(A=TypeError("The iterator does not provide a '"+I+"' method"),k=1);C=n}else if((a=($=M.n<0)?A:R.call(O,M))!==p)break}catch(Y){C=n,k=1,A=Y}finally{H=1}}return{value:a,done:$}}})(y,b,w),!0),S}var p={};function m(){}function v(){}function h(){}a=Object.getPrototypeOf;var l=[][s]?a(a([][s]())):(t(a={},s,function(){return this}),a),c=h.prototype=m.prototype=Object.create(l);function g(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,h):(y.__proto__=h,t(y,u,"GeneratorFunction")),y.prototype=Object.create(c),y}return v.prototype=h,t(c,"constructor",h),t(h,"constructor",v),v.displayName="GeneratorFunction",t(h,u,"GeneratorFunction"),t(c),t(c,u,"Generator"),t(c,s,function(){return this}),t(c,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:d,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Au)),Au.exports}var $u={exports:{}},Du={exports:{}},Nu={exports:{}},Ry;function Py(){return Ry||(Ry=1,(function(e){var t=vy(),r=wy();function n(a,o){function s(d,p,m,v){try{var h=a[d](p),l=h.value;return l instanceof t?o.resolve(l.v).then(function(c){s("next",c,m,v)},function(c){s("throw",c,m,v)}):o.resolve(l).then(function(c){h.value=c,m(h)},function(c){return s("throw",c,m,v)})}catch(c){v(c)}}var u;this.next||(r(n.prototype),r(n.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(d,p,m){function v(){return new o(function(h,l){s(d,m,h,l)})}return u=u?u.then(v,v):v()},!0)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Nu)),Nu.exports}var Oy;function Ey(){return Oy||(Oy=1,(function(e){var t=Sy(),r=Py();function n(a,o,s,u,d){return new r(t().w(a,o,s,u),d||Promise)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Du)),Du.exports}var Cy;function pT(){return Cy||(Cy=1,(function(e){var t=Ey();function r(n,a,o,s,u){var d=t(n,a,o,s,u);return d.next().then(function(p){return p.done?p.value:d.next()})}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})($u)),$u.exports}var Fu={exports:{}},xy;function mT(){return xy||(xy=1,(function(e){function t(r){var n=Object(r),a=[];for(var o in n)a.unshift(o);return function s(){for(;a.length;)if((o=a.pop())in n)return s.value=o,s.done=!1,s;return s.done=!0,s}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Fu)),Fu.exports}var Iu={exports:{}},Mu={exports:{}},Ty;function Xo(){return Ty||(Ty=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Mu)),Mu.exports}var ky;function gT(){return ky||(ky=1,(function(e){var t=Xo().default;function r(n){if(n!=null){var a=n[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],o=0;if(a)return a.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length))return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}}}throw new TypeError(t(n)+" is not iterable")}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Iu)),Iu.exports}var Ay;function yT(){return Ay||(Ay=1,(function(e){var t=vy(),r=Sy(),n=pT(),a=Ey(),o=Py(),s=mT(),u=gT();function d(){var p=r(),m=p.m(d),v=(Object.getPrototypeOf?Object.getPrototypeOf(m):m.__proto__).constructor;function h(g){var y=typeof g=="function"&&g.constructor;return!!y&&(y===v||(y.displayName||y.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function c(g){var y,f;return function(b){y||(y={stop:function(){return f(b.a,2)},catch:function(){return b.v},abrupt:function(_,S){return f(b.a,l[_],S)},delegateYield:function(_,S,R){return y.resultName=S,f(b.d,u(_),R)},finish:function(_){return f(b.f,_)}},f=function(_,S,R){b.p=y.prev,b.n=y.next;try{return _(S,R)}finally{y.next=b.n}}),y.resultName&&(y[y.resultName]=b.v,y.resultName=void 0),y.sent=b.v,y.next=b.n;try{return g.call(this,y)}finally{b.p=y.prev,b.n=y.next}}}return(e.exports=d=function(){return{wrap:function(f,b,w,_){return p.w(c(f),b,w,_&&_.reverse())},isGeneratorFunction:h,mark:p.m,awrap:function(f,b){return new t(f,b)},AsyncIterator:o,async:function(f,b,w,_,S){return(h(b)?a:n)(c(f),b,w,_,S)},keys:s,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports})(Tu)),Tu.exports}var Lu,jy;function $y(){if(jy)return Lu;jy=1;var e=yT()();Lu=e;try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}return Lu}var Bu={exports:{}},Dy;function Ny(){return Dy||(Dy=1,(function(e){function t(n,a,o,s,u,d,p){try{var m=n[d](p),v=m.value}catch(h){return void o(h)}m.done?a(v):Promise.resolve(v).then(s,u)}function r(n){return function(){var a=this,o=arguments;return new Promise(function(s,u){var d=n.apply(a,o);function p(v){t(d,s,u,p,m,"next",v)}function m(v){t(d,s,u,p,m,"throw",v)}p(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Bu)),Bu.exports}var Hu={exports:{}},Fy;function li(){return Fy||(Fy=1,(function(e){function t(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Hu)),Hu.exports}var Vu={exports:{}},qu={exports:{}},Uu={exports:{}},Iy;function vT(){return Iy||(Iy=1,(function(e){var t=Xo().default;function r(n,a){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var s=o.call(n,a||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Uu)),Uu.exports}var My;function Ly(){return My||(My=1,(function(e){var t=Xo().default,r=vT();function n(a){var o=r(a,"string");return t(o)=="symbol"?o:o+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(qu)),qu.exports}var By;function ui(){return By||(By=1,(function(e){var t=Ly();function r(a,o){for(var s=0;s<o.length;s++){var u=o[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(a,t(u.key),u)}}function n(a,o,s){return o&&r(a.prototype,o),s&&r(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Vu)),Vu.exports}var ci={},Hy;function bT(){if(Hy)return ci;Hy=1;var e=si();Object.defineProperty(ci,"__esModule",{value:!0}),ci.Configuration=void 0;var t=e(li()),r=e(ui());return ci.Configuration=(function(){function n(){var a,o,s,u,d,p,m,v,h,l,c,g,y,f=this,b,w,_,S,R,O,P,C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,t.default)(this,n),this.server=C.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=(a=this.server.cacheSearchResultsForSeconds)!==null&&a!==void 0?a:120,this.additionalSearchParameters=(o=C.additionalSearchParameters)!==null&&o!==void 0?o:{},this.additionalSearchParameters.query_by=(s=(u=this.additionalSearchParameters.queryBy)!==null&&u!==void 0?u:this.additionalSearchParameters.query_by)!==null&&s!==void 0?s:"",this.additionalSearchParameters.preset=(d=(p=this.additionalSearchParameters.preset)!==null&&p!==void 0?p:this.additionalSearchParameters.preset)!==null&&d!==void 0?d:"",this.additionalSearchParameters.sort_by=(m=(v=this.additionalSearchParameters.sortBy)!==null&&v!==void 0?v:this.additionalSearchParameters.sort_by)!==null&&m!==void 0?m:"",this.additionalSearchParameters.highlight_full_fields=(h=(l=this.additionalSearchParameters.highlightFullFields)!==null&&l!==void 0?l:this.additionalSearchParameters.highlight_full_fields)!==null&&h!==void 0?h:this.additionalSearchParameters.query_by,this.geoLocationField=(c=C.geoLocationField)!==null&&c!==void 0?c:"_geoloc",this.facetableFieldsWithSpecialCharacters=(g=C.facetableFieldsWithSpecialCharacters)!==null&&g!==void 0?g:[],this.collectionSpecificSearchParameters=(y=C.collectionSpecificSearchParameters)!==null&&y!==void 0?y:{},Object.keys(this.collectionSpecificSearchParameters).forEach(function(k){var A,H,Q,$,M,D,I=f.collectionSpecificSearchParameters[k];I.query_by=(A=I.queryBy)!==null&&A!==void 0?A:I.query_by,I.preset=(H=I.preset)!==null&&H!==void 0?H:I.preset,I.sort_by=(Q=I.sortBy)!==null&&Q!==void 0?Q:I.sort_by,I.highlight_full_fields=($=(M=(D=I.highlightFullFields)!==null&&D!==void 0?D:I.highlight_full_fields)!==null&&M!==void 0?M:f.additionalSearchParameters.highlight_full_fields)!==null&&$!==void 0?$:I.query_by,Object.keys(I).forEach(function(U){return I[U]===void 0?delete I[U]:{}})}),this.renderingContent=C.renderingContent,this.flattenGroupedHits=(b=C.flattenGroupedHits)!==null&&b!==void 0?b:!0,this.facetByOptions=(w=C.facetByOptions)!==null&&w!==void 0?w:{},this.filterByOptions=(_=C.filterByOptions)!==null&&_!==void 0?_:{},this.sortByOptions=(S=C.sortByOptions)!==null&&S!==void 0?S:{},this.collectionSpecificFacetByOptions=(R=C.collectionSpecificFacetByOptions)!==null&&R!==void 0?R:{},this.collectionSpecificFilterByOptions=(O=C.collectionSpecificFilterByOptions)!==null&&O!==void 0?O:{},this.collectionSpecificSortByOptions=(P=C.collectionSpecificSortByOptions)!==null&&P!==void 0?P:{}}return(0,r.default)(n,[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some(function(o){return o.queryBy}))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),this.additionalSearchParameters.query_by.length===0&&this.additionalSearchParameters.preset.length===0&&(Object.keys(this.collectionSpecificSearchParameters).length===0||Object.values(this.collectionSpecificSearchParameters).some(function(o){return(o.query_by||"").length===0&&(o.preset||"").length===0})))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])})(),ci}var di={},Wu={exports:{}},zu={exports:{}},Vy;function wT(){return Vy||(Vy=1,(function(e){function t(r,n){if(r==null)return{};var a={};for(var o in r)if({}.hasOwnProperty.call(r,o)){if(n.indexOf(o)!==-1)continue;a[o]=r[o]}return a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(zu)),zu.exports}var qy;function _T(){return qy||(qy=1,(function(e){var t=wT();function r(n,a){if(n==null)return{};var o,s,u=t(n,a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(s=0;s<d.length;s++)o=d[s],a.indexOf(o)===-1&&{}.propertyIsEnumerable.call(n,o)&&(u[o]=n[o])}return u}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Wu)),Wu.exports}var Yu={exports:{}},Qu={exports:{}},Uy;function ST(){return Uy||(Uy=1,(function(e){function t(r){if(Array.isArray(r))return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Qu)),Qu.exports}var Ku={exports:{}},Wy;function RT(){return Wy||(Wy=1,(function(e){function t(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,s,u,d,p=[],m=!0,v=!1;try{if(u=(a=a.call(r)).next,n===0){if(Object(a)!==a)return;m=!1}else for(;!(m=(o=u.call(a)).done)&&(p.push(o.value),p.length!==n);m=!0);}catch(h){v=!0,s=h}finally{try{if(!m&&a.return!=null&&(d=a.return(),Object(d)!==d))return}finally{if(v)throw s}}return p}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ku)),Ku.exports}var Gu={exports:{}},Ju={exports:{}},zy;function Yy(){return zy||(zy=1,(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var a=0,o=Array(n);a<n;a++)o[a]=r[a];return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ju)),Ju.exports}var Qy;function Ky(){return Qy||(Qy=1,(function(e){var t=Yy();function r(n,a){if(n){if(typeof n=="string")return t(n,a);var o={}.toString.call(n).slice(8,-1);return o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set"?Array.from(n):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(n,a):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Gu)),Gu.exports}var Xu={exports:{}},Gy;function PT(){return Gy||(Gy=1,(function(e){function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
181
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Xu)),Xu.exports}var Jy;function Xy(){return Jy||(Jy=1,(function(e){var t=ST(),r=RT(),n=Ky(),a=PT();function o(s,u){return t(s)||r(s,u)||n(s,u)||a()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(Yu)),Yu.exports}var Zy;function OT(){if(Zy)return di;Zy=1;var e=si();Object.defineProperty(di,"__esModule",{value:!0}),di.SearchRequestAdapter=void 0;var t=e($y()),r=e(_T()),n=e(Ny()),a=e(Xy()),o=e(li()),s=e(ui()),u=["q","conversation","conversation_id","conversation_model_id"];return di.SearchRequestAdapter=(function(){function d(p,m,v){(0,o.default)(this,d),this.instantsearchRequests=p,this.typesenseClient=m,this.configuration=v,this.additionalSearchParameters=v.additionalSearchParameters,this.collectionSpecificSearchParameters=v.collectionSpecificSearchParameters}return(0,s.default)(d,[{key:"_shouldUseExactMatchForField",value:function(m,v){var h,l;return!(((h=this.configuration.collectionSpecificFilterByOptions)===null||h===void 0||(h=h[v])===null||h===void 0||(h=h[m])===null||h===void 0?void 0:h.exactMatch)===!1||((l=this.configuration.filterByOptions)===null||l===void 0||(l=l[m])===null||l===void 0?void 0:l.exactMatch)===!1)}},{key:"_adaptFacetFilters",value:function(m,v){var h=this,l="";if(!m)return l;var c=m.map(function(g){if(Array.isArray(g)){var y={};g.forEach(function(I){var U=h._parseFacetFilter(I),B=U.fieldName,Y=U.fieldValue;y[B]=y[B]||[],y[B].push(Y)}),Object.keys(y).length>1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(y).join(",")));var f=Object.keys(y)[0],b=y[f],w=b.reduce(function(I,U){return U.startsWith("-")&&!h._isNumber(U)?I[0].push(U.substring(1)):I[1].push(U),I},[[],[]]),_=(0,a.default)(w,2),S=_[0],R=_[1],O=[];if(R.length>0){var P=h._shouldUseExactMatchForField(f,v)?":=":":";O.push("".concat(f).concat(P,"[").concat(R.map(function(I){return h._escapeFacetValue(I)}).join(","),"]"))}if(S.length>0){var C=h._shouldUseExactMatchForField(f,v)?":!=":":!";O.push("".concat(f).concat(C,"[").concat(S.map(function(I){return h._escapeFacetValue(I)}).join(","),"]"))}var k=O.filter(function(I){return I}).join(" && ");return k}else{var A=h._parseFacetFilter(g),H=A.fieldName,Q=A.fieldValue,$;if(Q.startsWith("-")&&!h._isNumber(Q)){var M=h._shouldUseExactMatchForField(H,v)?":!=":":!";$="".concat(H).concat(M,"[").concat(h._escapeFacetValue(Q.substring(1)),"]")}else{var D=h._shouldUseExactMatchForField(H,v)?":=":":";$="".concat(H).concat(D,"[").concat(h._escapeFacetValue(Q),"]")}return $}});return l=c.join(" && "),l}},{key:"_parseFacetFilter",value:function(m){var v,h,l,c,g;if(((v=this.configuration.facetableFieldsWithSpecialCharacters)===null||v===void 0?void 0:v.length)>0){var y=this.configuration.facetableFieldsWithSpecialCharacters.flat().map(function(f){return f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(h=new RegExp("^(".concat(y.join("|"),"):(.*)$")),l=m.match(h),l!=null)return c="".concat(l[1]),g="".concat(l[2]),{fieldName:c,fieldValue:g}}return h=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,l=m.match(h),l==null?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(m,"` with the Regex `").concat(h,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(c="".concat(l[1]).concat(l[2]),g="".concat(l[3])),{fieldName:c,fieldValue:g}}},{key:"_escapeFacetValue",value:function(m){return typeof m=="boolean"||m==="true"||m==="false"||this._isNumber(m)?m:"`".concat(m,"`")}},{key:"_isNumber",value:function(m){return Number.isInteger(m%1)||!!(m%1)}},{key:"_adaptNumericFilters",value:function(m){var v=this,h="";if(!m)return h;var l={};m.forEach(function(g){var y=v._parseNumericFilter(g),f=y.fieldName,b=y.operator,w=y.fieldValue;l[f]=l[f]||{},l[f][b]=w});var c=[];return Object.keys(l).forEach(function(g){l[g]["<="]!=null&&l[g][">="]!=null?c.push("".concat(g,":=[").concat(l[g][">="],"..").concat(l[g]["<="],"]")):l[g]["<="]!=null?c.push("".concat(g,":<=").concat(l[g]["<="])):l[g][">="]!=null?c.push("".concat(g,":>=").concat(l[g][">="])):l[g]["="]!=null?c.push("".concat(g,":=").concat(l[g]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(l[g])))}),h=c.join(" && "),h}},{key:"_parseNumericFilter",value:function(m){var v,h,l,c,g,y;if(((v=this.configuration.facetableFieldsWithSpecialCharacters)===null||v===void 0?void 0:v.length)>0){var f=this.configuration.facetableFieldsWithSpecialCharacters.map(function(R){return R.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(h=new RegExp("^(".concat(f.join("|"),")(<=|>=|>|<|=)(.*)$")),l=m.match(h),l!=null){var b=l,w=(0,a.default)(b,4);return c=w[1],g=w[2],y=w[3],{fieldName:c,operator:g,fieldValue:y}}}if(h=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,l=m.match(h),l==null)console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(m,"` with the Regex `").concat(h,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var _=l,S=(0,a.default)(_,4);c=S[1],g=S[2],y=S[3]}return{fieldName:c,operator:g,fieldValue:y}}},{key:"_adaptGeoFilter",value:function(m){var v=m.insideBoundingBox,h=m.aroundRadius,l=m.aroundLatLng,c=m.insidePolygon;if(v){var g,y,f,b;if(Array.isArray(v)){var w=v.flat(),_=(0,a.default)(w,4);g=_[0],y=_[1],f=_[2],b=_[3]}else{var S=v.split(","),R=(0,a.default)(S,4);g=R[0],y=R[1],f=R[2],b=R[3]}return"".concat(this.configuration.geoLocationField,":(").concat(g,", ").concat(y,", ").concat(g,", ").concat(b,", ").concat(f,", ").concat(b,", ").concat(f,", ").concat(y,")")}if(l||h){if(!h||h==="all")throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var O="".concat(parseFloat(h)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(l,", ").concat(O,")")}if(c){var P=c;return Array.isArray(c)&&(P=c.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(P,")")}}},{key:"_adaptFilters",value:function(m,v){var h=[];return m.filters&&h.push(m.filters),h.push(this._adaptFacetFilters(m.facetFilters,v)),h.push(this._adaptNumericFilters(m.numericFilters)),h.push(this._adaptGeoFilter(m)),h.filter(function(l){return l&&l!==""}).join(" && ")}},{key:"_adaptIndexName",value:function(m){return m.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(m){return m.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(m,v){var h=this;return[m].flat().map(function(l){var c;return(c=h.configuration.collectionSpecificFacetByOptions)!==null&&c!==void 0&&(c=c[v])!==null&&c!==void 0&&c[l]?"".concat(l).concat(h.configuration.collectionSpecificFacetByOptions[v][l]):h.configuration.facetByOptions[l]?"".concat(l).concat(h.configuration.facetByOptions[l]):l}).join(",")}},{key:"_adaptRulesContextsToOverrideTags",value:function(m){return m.join(",")}},{key:"_buildSearchParameters",value:function(m){for(var v,h,l=m.params,c=m.indexName,g=this._adaptIndexName(c),y={},f=0,b=Object.entries(this.additionalSearchParameters);f<b.length;f++){var w=(0,a.default)(b[f],2),_=w[0],S=w[1];y[this._camelToSnakeCase(_)]=S}if(this.collectionSpecificSearchParameters[g])for(var R=0,O=Object.entries(this.collectionSpecificSearchParameters[g]);R<O.length;R++){var P=(0,a.default)(O[R],2),C=P[0],k=P[1];y[this._camelToSnakeCase(C)]=k}var A=Object.assign({},y),H=this._adaptSortBy(c);Object.assign(A,{collection:g,q:l.query===""||l.query===void 0?"*":l.query,facet_by:y.facet_by||this._adaptFacetBy(l.facets,g),filter_by:this._adaptFilters(l,g)||y.filter_by,sort_by:H||y.sort_by,max_facet_values:l.maxValuesPerFacet,page:(l.page||0)+1}),l.hitsPerPage!=null&&(A.per_page=l.hitsPerPage),l.facetQuery&&(A.facet_query="".concat(l.facetName,":").concat(l.facetQuery),A.per_page=0),l.ruleContexts&&l.ruleContexts.length>0&&(A.override_tags=this._adaptRulesContextsToOverrideTags(l.ruleContexts)),l.typesenseVectorQuery&&(A.vector_query=l.typesenseVectorQuery);var Q=((v=this.configuration.collectionSpecificSortByOptions)===null||v===void 0||(v=v[g])===null||v===void 0?void 0:v[A.sort_by])||((h=this.configuration.sortByOptions)===null||h===void 0?void 0:h[A.sort_by]);return Q?.enable_overrides!=null&&(A.enable_overrides=Q.enable_overrides),Object.fromEntries(Object.entries(A).filter(function($){var M=(0,a.default)($,2);M[0];var D=M[1];return D!=null&&D!==""}))}},{key:"_camelToSnakeCase",value:function(m){return m.split(/(?=[A-Z])/).join("_").toLowerCase()}},{key:"request",value:(function(){var p=(0,n.default)(t.default.mark(function v(){var h=this,l,c,g,y,f,b,w,_,S;return t.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return g=this.instantsearchRequests.map(function(P){return h._buildSearchParameters(P)}),y={},(((l=g[0])===null||l===void 0?void 0:l.conversation)===!0||((c=g[0])===null||c===void 0?void 0:c.conversation)==="true")&&(f=g[0],b=f.q,w=f.conversation,_=f.conversation_id,S=f.conversation_model_id,y={q:b,conversation:w,conversation_id:_,conversation_model_id:S},g=g.map(function(P){P.q,P.conversation,P.conversation_id,P.conversation_model_id;var C=(0,r.default)(P,u);return C})),O.abrupt("return",this.typesenseClient.multiSearch.perform({searches:g},y));case 4:case"end":return O.stop()}},v,this)}));function m(){return p.apply(this,arguments)}return m})()}],[{key:"INDEX_NAME_MATCHING_REGEX",get:function(){return new RegExp("^(.+?)(?=(/sort/(.*))|$)")}},{key:"DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX",get:function(){return new RegExp("(.*)((?!:).):(?!:)(.*)")}},{key:"DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX",get:function(){return new RegExp("(.*?)(<=|>=|>|<|=)(.*)")}}])})(),di}var fi={},Zu={exports:{}},ec={exports:{}},ev;function ET(){return ev||(ev=1,(function(e){var t=Yy();function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ec)),ec.exports}var tc={exports:{}},tv;function CT(){return tv||(tv=1,(function(e){function t(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(tc)),tc.exports}var rc={exports:{}},rv;function xT(){return rv||(rv=1,(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
182
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(rc)),rc.exports}var nv;function TT(){return nv||(nv=1,(function(e){var t=ET(),r=CT(),n=Ky(),a=xT();function o(s){return t(s)||r(s)||n(s)||a()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(Zu)),Zu.exports}var nc={exports:{}},av;function kT(){return av||(av=1,(function(e){var t=Ly();function r(n,a,o){return(a=t(a))in n?Object.defineProperty(n,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[a]=o,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(nc)),nc.exports}var hi={},iv;function ov(){return iv||(iv=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.utils=void 0,hi.utils={_adaptHighlightTag:function(t,r,n){return t.replace(new RegExp("<mark>","g"),r||"<mark>").replace(new RegExp("</mark>","g"),n||"</mark>")},_adaptNumberOfPages:function(){var t=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(t)?Math.ceil(t):1}}),hi}var sv;function AT(){if(sv)return fi;sv=1;var e=si();Object.defineProperty(fi,"__esModule",{value:!0}),fi.SearchResponseAdapter=void 0;var t=e(Xo()),r=e(Xy()),n=e(TT()),a=e(kT()),o=e(li()),s=e(ui()),u=ov();function d(v,h){var l=Object.keys(v);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(v);h&&(c=c.filter(function(g){return Object.getOwnPropertyDescriptor(v,g).enumerable})),l.push.apply(l,c)}return l}function p(v){for(var h=1;h<arguments.length;h++){var l=arguments[h]!=null?arguments[h]:{};h%2?d(Object(l),!0).forEach(function(c){(0,a.default)(v,c,l[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(l)):d(Object(l)).forEach(function(c){Object.defineProperty(v,c,Object.getOwnPropertyDescriptor(l,c))})}return v}var m=fi.SearchResponseAdapter=(function(){function v(h,l,c){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],y=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};(0,o.default)(this,v),this.typesenseResponse=h,this.instantsearchRequest=l,this.configuration=c,this.allTypesenseResults=g,this.fullTypesenseResponse=y}return(0,s.default)(v,[{key:"_adaptGroupedHits",value:function(l){var c=this,g=[];return g=l.map(function(y){var f=c._adaptHits(y.hits);return f.forEach(function(b){b.group_key=b._group_key=y.group_key,y.found&&(b._group_found=y.found)}),f}),this.configuration.flattenGroupedHits?g=g.flat():g=g.map(function(y){return p(p({},y[0]),{},{_grouped_hits:y})}),g}},{key:"_adaptHits",value:function(l){var c=this,g=[];return g=l.map(function(y){var f=p({},y.document);f.objectID=y.document.id,f._snippetResult=c._adaptHighlightResult(y,"snippet"),f._highlightResult=c._adaptHighlightResult(y,"value"),f._rawTypesenseHit=y,c.fullTypesenseResponse.conversation&&(f._rawTypesenseConversation=c.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach(function(w){Object.keys(y).includes(w)&&!Object.keys(f).includes(w)&&(f[w]=y[w])});var b=f[c.configuration.geoLocationField];return b&&(f._geoloc={lat:b[0],lng:b[1]}),f}),g}},{key:"_adaptHighlightResult",value:function(l,c){var g={};return l.highlight!=null&&this.isHighlightPost0240RCN32Format(l.highlight)?this.adaptHighlightObject(l,g,c):this.adaptHighlightsArray(l,g,c),g}},{key:"isHighlightPost0240RCN32Format",value:function(l){return l.full==null&&l.snippet==null}},{key:"adaptHighlightsArray",value:function(l,c,g){var y=this;Object.assign.apply(Object,[c].concat((0,n.default)(Object.entries(l.document).map(function(f){var b=(0,r.default)(f,2),w=b[0],_=b[1];return(0,a.default)({},w,{value:_,matchLevel:"none",matchedWords:[]})})))),l.highlights.forEach(function(f){c[f.field]={value:f[g]||f["".concat(g,"s")],matchLevel:"full",matchedWords:f.matched_tokens},f.indices&&(c[f.field].matchedIndices=f.indices)}),Object.entries(c).forEach(function(f){var b=(0,r.default)(f,2),w=b[0],_=b[1],S=w,R=_.value,O=_.matchLevel,P=_.matchedWords,C=_.matchedIndices;R==null?c[S]=y._adaptHighlightNullValue():Array.isArray(R)?(c[S]=[],l.document[S].forEach(function(k,A){C&&C.includes(A)?c[S].push({value:y._adaptHighlightTag("".concat(R[C.indexOf(A)]),y.instantsearchRequest.params.highlightPreTag,y.instantsearchRequest.params.highlightPostTag),matchLevel:O,matchedWords:P[A]}):(0,t.default)(k)==="object"?c[S].push(y._adaptHighlightInObjectValue(k,{},g)):c[S].push({value:"".concat(k),matchLevel:"none",matchedWords:[]})})):(0,t.default)(R)==="object"?c[S]=y._adaptHighlightInObjectValue(R,{},g):c[S].value=y._adaptHighlightTag("".concat(R),y.instantsearchRequest.params.highlightPreTag,y.instantsearchRequest.params.highlightPostTag)})}},{key:"adaptHighlightObject",value:function(l,c,g){Object.assign(c,this._adaptHighlightInObjectValue(l.document,l.highlight,g))}},{key:"_adaptHighlightInObjectValue",value:function(l,c,g){var y=this;return Object.assign.apply(Object,[{}].concat((0,n.default)(Object.entries(l).map(function(f){var b=(0,r.default)(f,2),w=b[0],_=b[1],S;if(_==null)S=y._adaptHighlightNullValue();else if(Array.isArray(_)){var R;S=y._adaptHighlightInArrayValue(_,(R=c?.[w])!==null&&R!==void 0?R:[],g)}else if((0,t.default)(_)==="object"){var O;S=y._adaptHighlightInObjectValue(_,(O=c?.[w])!==null&&O!==void 0?O:{},g)}else S=y._adaptHighlightInPrimitiveValue(_,c?.[w],g);return(0,a.default)({},w,S)}))))}},{key:"_adaptHighlightInArrayValue",value:function(l,c,g){var y=this;return l.map(function(f,b){var w;if(f==null)w=y._adaptHighlightNullValue();else if(Array.isArray(f)){var _;w=y._adaptHighlightInArrayValue(f,(_=c?.[b])!==null&&_!==void 0?_:[],g)}else if((0,t.default)(f)==="object"){var S;w=y._adaptHighlightInObjectValue(f,(S=c?.[b])!==null&&S!==void 0?S:{},g)}else w=y._adaptHighlightInPrimitiveValue(f,c?.[b],g);return w})}},{key:"_adaptHighlightInPrimitiveValue",value:function(l,c,g){if(c!=null){var y,f;return{value:this._adaptHighlightTag("".concat((y=(f=c[g])!==null&&f!==void 0?f:c.highlight)!==null&&y!==void 0?y:c.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(c.matched_tokens||[]).length>0?"full":"none",matchedWords:c.matched_tokens||[]}}else return{value:this._adaptHighlightTag("".concat(l),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(l){var c={};return l.forEach(function(g){Object.assign(c,(0,a.default)({},g.field_name,Object.assign.apply(Object,[{}].concat((0,n.default)(g.counts.map(function(y){return(0,a.default)({},y.value,y.count)}))))))}),c}},{key:"_adaptFacetStats",value:function(l){var c={};return l.forEach(function(g){Object.keys(g.stats).length>0&&Object.assign(c,(0,a.default)({},g.field_name,g.stats))}),c}},{key:"_adaptRenderingContent",value:function(l){var c,g=Object.assign({},this.configuration.renderingContent);return((c=g.facetOrdering)===null||c===void 0||(c=c.facets)===null||c===void 0?void 0:c.order)==null&&(g.facetOrdering=g.facetOrdering||{},g.facetOrdering.facets=g.facetOrdering.facets||{},g.facetOrdering.facets.order=(0,n.default)(new Set(l.map(function(y){return y.field_name}).concat(this.allTypesenseResults.map(function(y){return y.facet_counts||[]}).flat().map(function(y){return y.field_name}).filter(function(y){return y}))))),g}},{key:"_adaptUserData",value:function(l){return l?Array.isArray(l)?l:[l]:[]}},{key:"adapt",value:function(){var l=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),c=p({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(l).length>0?{renderingContent:l}:null);return this.typesenseResponse.metadata&&(c.appliedRules=["typesense-override"],c.userData=this._adaptUserData(this.typesenseResponse.metadata)),this.fullTypesenseResponse.conversation&&c.hits.length===0&&(c.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),c}}])})();return Object.assign(m.prototype,u.utils),fi}var pi={},lv;function jT(){if(lv)return pi;lv=1;var e=si();Object.defineProperty(pi,"__esModule",{value:!0}),pi.FacetSearchResponseAdapter=void 0;var t=e(li()),r=e(ui()),n=ov(),a=pi.FacetSearchResponseAdapter=(function(){function o(s,u){(0,t.default)(this,o),this.typesenseResponse=s,this.instantsearchRequest=u}return(0,r.default)(o,[{key:"_adaptFacetHits",value:function(u){var d=this,p={},m=u.find(function(v){return v.field_name===d.instantsearchRequest.params.facetName});return p=m.counts.map(function(v){return{value:v.value,highlighted:d._adaptHighlightTag(v.highlighted,d.instantsearchRequest.params.highlightPreTag,d.instantsearchRequest.params.highlightPostTag),count:v.count}}),p}},{key:"adapt",value:function(){var u={facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms};return u}}])})();return Object.assign(a.prototype,n.utils),pi}var uv;function $T(){return uv||(uv=1,(function(e){var t=si();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t($y()),n=t(Ny()),a=t(li()),o=t(ui()),s=bT(),u=my(),d=OT(),p=AT(),m=jT();e.default=(function(){function v(h){var l=this;(0,a.default)(this,v),this.updateConfiguration(h),this.searchClient={clearCache:function(){return l.clearCache()},search:function(g){return l.searchTypesenseAndAdapt(g)},searchForFacetValues:function(g){return l.searchTypesenseForFacetValuesAndAdapt(g)}}}return(0,o.default)(v,[{key:"searchTypesenseAndAdapt",value:(function(){var h=(0,n.default)(r.default.mark(function c(g){var y=this,f,b;return r.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.prev=0,_.next=3,this._adaptAndPerformTypesenseRequest(g);case 3:return f=_.sent,b=f.results.map(function(S,R){y._validateTypesenseResult(S);var O=new p.SearchResponseAdapter(S,g[R],y.configuration,f.results,f),P=O.adapt();return P}),_.abrupt("return",{results:b});case 8:throw _.prev=8,_.t0=_.catch(0),console.error(_.t0),_.t0;case 12:case"end":return _.stop()}},c,this,[[0,8]])}));function l(c){return h.apply(this,arguments)}return l})()},{key:"searchTypesenseForFacetValuesAndAdapt",value:(function(){var h=(0,n.default)(r.default.mark(function c(g){var y=this,f,b;return r.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.prev=0,_.next=3,this._adaptAndPerformTypesenseRequest(g);case 3:return f=_.sent,b=f.results.map(function(S,R){y._validateTypesenseResult(S);var O=new m.FacetSearchResponseAdapter(S,g[R],y.configuration);return O.adapt()}),_.abrupt("return",b);case 8:throw _.prev=8,_.t0=_.catch(0),console.error(_.t0),_.t0;case 12:case"end":return _.stop()}},c,this,[[0,8]])}));function l(c){return h.apply(this,arguments)}return l})()},{key:"_adaptAndPerformTypesenseRequest",value:(function(){var h=(0,n.default)(r.default.mark(function c(g){var y,f;return r.default.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return y=new d.SearchRequestAdapter(g,this.typesenseClient,this.configuration),w.next=3,y.request();case 3:return f=w.sent,w.abrupt("return",f);case 5:case"end":return w.stop()}},c,this)}));function l(c){return h.apply(this,arguments)}return l})()},{key:"clearCache",value:function(){return this.typesenseClient=new u.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(l){return this.configuration=new s.Configuration(l),this.configuration.validate(),this.typesenseClient=new u.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(l){if(l.error)throw new Error("".concat(l.code," - ").concat(l.error));if(!l.hits&&!l.grouped_hits)throw new Error("Did not find any hits. ".concat(l.code," - ").concat(l.error))}}])})()})(Cu)),Cu}var DT=$T();const NT=aa(DT),FT={__name:"PAccordion",props:{duration:{type:Number},summary:{type:String,default:"summary:first-of-type"}},setup(e){const t=e,r=i.useTemplateRef("details");i.onMounted(()=>{r.value.style.setProperty("--accordion-height-closed","auto")});const n=a=>{const o=a.currentTarget,s=t.duration||parseFloat(getComputedStyle(o).transitionDuration)*1e3||0,u=o.querySelector(t.summary);if(!u)return;const d=u?.clientHeight;u.contains(a.target)&&(a.preventDefault(),o.open?(o.classList.add("-closing"),o.style.setProperty("--accordion-height-closed",`${d}px`),setTimeout(()=>{o.open=!1,o.classList.remove("-closing"),o.style.setProperty("--accordion-height-closed","auto")},s)):(o.style.transitionDuration="0s",o.style.setProperty("--accordion-height-closed",`${d}px`),requestAnimationFrame(()=>{o.style.transitionDuration="",o.open=!0})))};return(a,o)=>(i.openBlock(),i.createElementBlock("details",{ref_key:"details",ref:r,class:"accordion",onClick:n},[i.renderSlot(a.$slots,"default")],512))}};function cv(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const IT=hT+"#chevron-right",MT={class:"tabs__content"},LT={class:"eventsSearch__topSection"},BT={class:"eventsSearch__filters"},HT={class:"eventsSearch__filtersRow"},VT={class:"eventsSearch__filterGroup eventsSearch__filterGroup--search"},qT={class:"eventsSearch__searchBox"},UT=["value","placeholder","onInput"],WT={class:"eventsSearch__filterRail"},zT={style:{display:"grid"}},YT={class:"accordion__summary"},QT={class:"accordion__heading"},KT={class:"accordion__content"},GT={class:"ais-SearchBox eventsSearch__searchBox -filter"},JT=["onInput","placeholder"],XT={class:"eventsSearch__checkBoxes"},ZT=["for"],ek=["id","value","checked","onClick"],tk={class:"eventsSearch__results"},rk={class:"eventsSearch__resultsHeader"},nk={key:0},ak={key:1},ik={class:"eventsSearch__resultsSort"},ok={class:"eventsSearch__activeFilters"},sk={class:"eventsSearch__activeFiltersList"},lk={class:"eventsSearch__activeFiltersItems"},uk=["href","onClick","innerHTML"],ck=["href","onClick"],dk={key:1},fk={class:"eventsSearch__pagination"},dv={__name:"SearchTab",props:{indexName:{type:String,default:"archived_performances"},mainRefinements:{type:Object,require:!0},queryByFields:{type:String,default:"work, season, orchestra, venue, event_types, notes, event_title"},sortField:{type:String,default:"performance_date"},searchPlaceholder:{type:String,default:"Search for performances..."},resultsTitle:{type:String,default:"Performances"}},setup(e){const t=e,r=i.ref("Most Recent"),n=i.ref(null),a=i.ref(!1),o=i.ref({router:Uh({writeDelay:0,parseURL({qsModule:h,location:l}){const c=h.parse(l.search.slice(1));return p(c),c}}),stateMapping:Yh()}),s={connectionTimeoutSeconds:20,apiKey:"qoWHCTjesGfIaxdXbw9vOgod1VToEXNI",nodes:[{host:"go8f04wi19tuvlyrp-1.a1.typesense.net",path:"",port:"443",protocol:"https"}],cacheSearchResultsForSeconds:0},u=new NT({server:s,additionalSearchParameters:{query_by:t.queryByFields,sort_by:`${t.sortField}:desc`}}),d=u.searchClient;function p(h){h&&h[t.indexName]&&(n.value=h[t.indexName].query,n.value?r.value="Most Relevant":r.value="Most Recent",n.value||h[t.indexName].refinementList?a.value=!0:a.value=!1)}function m({uiState:h,setUiState:l}){console.log("uiState",h),p(h),l(h)}function v(){console.log(r.value),r.value=="Oldest First"?(console.log("changeing to oldest first"),u.updateConfiguration({...t.adapter.configuration,additionalSearchParameters:{query_by:t.queryByFields,sort_by:`${t.sortField}:asc`}}),console.log(t.adapter.configuration)):r.value=="Most Relevant"?t.adapter.updateConfiguration({...t.adapter.configuration,additionalSearchParameters:{query_by:t.queryByFields,sort_by:`_text_match:desc,${t.sortField}:desc`}}):t.adapter.updateConfiguration({...t.adapter.configuration,additionalSearchParameters:{query_by:t.queryByFields,sort_by:`${t.sortField}:desc`}})}return(h,l)=>(i.openBlock(),i.createBlock(i.unref(OR),{"search-client":i.unref(d),"index-name":t.indexName,routing:o.value,"on-state-change":m,key:r.value},{default:i.withCtx(()=>[i.createElementVNode("div",MT,[i.createElementVNode("div",LT,[i.createElementVNode("section",BT,[l[2]||(l[2]=i.createElementVNode("header",{class:"eventsSearch__header"},[i.createElementVNode("h1",{class:"eventsSearch__title"},"Find Concerts & Events")],-1)),i.createElementVNode("div",HT,[i.createElementVNode("div",VT,[i.createVNode(i.unref(uh),null,{default:i.withCtx(({currentRefinement:c,indices:g,refine:y})=>[i.createElementVNode("div",qT,[i.createElementVNode("input",{type:"search",value:c,placeholder:t.searchPlaceholder,onInput:f=>y(f.currentTarget.value)},null,40,UT),c?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(g,f=>(i.openBlock(),i.createElementBlock("ul",{key:f.indexId},[i.createElementVNode("li",null,[i.createElementVNode("h3",null,i.toDisplayString(f.indexName),1),i.createElementVNode("ul",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.hits,b=>(i.openBlock(),i.createElementBlock("li",{key:b.objectID},[i.createVNode(i.unref(Ol),{attribute:"conductor",hit:b},null,8,["hit"])]))),128))])])]))),128)):i.createCommentVNode("",!0)])]),_:1})]),l[1]||(l[1]=i.createElementVNode("div",{class:"eventsSearch__filterGroup eventsSearch__filterGroup--date"},null,-1))])])]),i.createElementVNode("section",WT,[i.createElementVNode("div",zT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.mainRefinements,c=>(i.openBlock(),i.createBlock(i.unref(ip),{attribute:c.attribute,operator:"and"},{default:i.withCtx(({items:g,refine:y,searchForItems:f})=>[i.createVNode(FT,{name:"example",class:"accordion"},{default:i.withCtx(()=>[i.createElementVNode("summary",YT,[i.createElementVNode("h6",QT,i.toDisplayString(c.title),1),l[3]||(l[3]=i.createElementVNode("div",{class:"accordion__iconWrapper"},[i.createElementVNode("svg",{class:"accordion__icon icon icon--chevron-right","aria-hidden":"true",role:"presentation"},[i.createElementVNode("use",{href:IT})])],-1))]),i.createElementVNode("div",KT,[i.createElementVNode("div",GT,[i.createElementVNode("input",{onInput:b=>f(b.currentTarget.value),placeholder:c.placeholder,class:"ais-SearchBox-input -filter"},null,40,JT)]),i.createElementVNode("div",XT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g,b=>(i.openBlock(),i.createElementBlock("label",{class:"eventsSearch__boxLabel",for:i.unref(cv)(c.title+" "+b.value)},[i.createElementVNode("input",{class:"checkbox",type:"checkbox",id:i.unref(cv)(c.title+" "+b.value),value:b.value,checked:b.isRefined,onClick:w=>y(b.value)},null,8,ek),i.createElementVNode("span",null,i.toDisplayString(b.value),1),i.createElementVNode("span",null,i.toDisplayString(b.count),1)],8,ZT))),256))])])]),_:2},1024)]),_:2},1032,["attribute"]))),256))])]),i.createElementVNode("section",tk,[i.createVNode(i.unref(iS),{class:"eventsSearch__hits"},{default:i.withCtx(({items:c})=>[i.createElementVNode("div",rk,[a.value?(i.openBlock(),i.createElementBlock("h2",nk,i.toDisplayString(c.length)+" Results",1)):(i.openBlock(),i.createElementBlock("h2",ak,i.toDisplayString(t.resultsTitle),1)),i.createElementVNode("div",ik,[l[5]||(l[5]=i.createTextVNode("Sort By ",-1)),i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=g=>r.value=g),onChange:v},[...l[4]||(l[4]=[i.createElementVNode("option",{value:"Most Recent"},"Most Recent",-1),i.createElementVNode("option",{value:"Most Relevant"},"Most Relevant",-1),i.createElementVNode("option",{value:"Oldest First"},"Oldest First",-1)])],544),[[i.vModelSelect,r.value]])])]),i.createVNode(i.unref(dh),null,{default:i.withCtx(({items:g,createURL:y})=>[i.createElementVNode("div",ok,[i.createElementVNode("ul",sk,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g,f=>(i.openBlock(),i.createElementBlock("li",{key:f.attribute,class:"eventsSearch__activeFiltersGroup"},[i.createElementVNode("ul",lk,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.refinements,b=>(i.openBlock(),i.createElementBlock("li",{key:[b.attribute,b.type,b.value,b.operator].join(":"),class:"eventsSearch__activeFilterItem"},[i.createElementVNode("a",{href:y(b),onClick:i.withModifiers(w=>f.refine(b),["prevent"]),innerHTML:b.label+" ×",class:"eventsSearch__activeFilterRemove"},null,8,uk)]))),128))])]))),128))]),i.createVNode(i.unref(ch),null,{default:i.withCtx(({canRefine:f,refine:b,createURL:w})=>[f?(i.openBlock(),i.createElementBlock("a",{key:0,href:w(),onClick:i.withModifiers(b,["prevent"]),class:"eventsSearch__clearFilters"}," Clear all filters ",8,ck)):(i.openBlock(),i.createElementBlock("span",dk))]),_:2},1024)])]),_:2},1024),i.renderSlot(h.$slots,"default",{items:c},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c,g=>(i.openBlock(),i.createElementBlock("div",null,[i.createTextVNode(i.toDisplayString(JSON.stringify(g)),1),l[6]||(l[6]=i.createElementVNode("br",null,null,-1)),l[7]||(l[7]=i.createElementVNode("br",null,null,-1))]))),256))])]),_:3}),i.createElementVNode("nav",fk,[i.createVNode(i.unref(np),{"show-first":!0,"show-previous":!0,"show-next":!0,"show-last":!0,class:"eventsSearch__paginationComponent"})])])])]),_:3},8,["search-client","index-name","routing"]))}};function hk(e,t=!1){const r=new Date(e*1e3),n=["Sun","Mon","Tues","Weds","Thurs","Fri","Sat"],a=["January","February","March","April","May","June","July","August","September","October","November","December"],o=r.getHours()+1>12?r.getHours()-11:r.getHours()+1,s=r.getHours()+1>12?"pm":"am",u="0"+r.getMinutes();return t?`${n[r.getDay()]}, ${a[r.getMonth()].substring(0,3)} ${r.getDate()}, ${o}:${u.substr(-2)}${s} EDT`:`${r.getMonth()+1}-${r.getDay()+1}-${r.getFullYear()}`}const pk={class:"eventsSearch"},mk={key:0,class:"eventsSearch__resultsGrid"},gk=["href"],yk={key:0},vk={key:1},bk=["href"],wk=["href"],fv={__name:"Search",props:{indexName:{type:String,default:"archived_performances"}},setup(e){i.ref(null),i.ref(null),i.ref(null),i.ref([]),i.ref([]);const t=Date.now();i.ref([t,t]);const r=[{attribute:"work.composer",title:"Composer",placeholder:"Search Composers"},{attribute:"work.title",title:"Work",placeholder:"Search Works"},{attribute:"conductor",title:"Conductor",placeholder:"Search Conductors"},{attribute:"orchestra",title:"Orchestra/Ensemble",placeholder:"Search Orchestras/Ensembles"},{attribute:"work.artist.artist_name",title:"Artist",placeholder:"Search Artists"}],n=[{attribute:"artist_name",title:"Artist/Ensemble",placeholder:"Search Artists/Ensembles"},{attribute:"artist_role",title:"Instrument/Role",placeholder:"Instruments/Roles"}],a=i.ref(!1);function o(){typeof window<"u"&&(a.value=window.innerWidth<=767)}i.onMounted(()=>{"scrollRestoration"in history&&(history.scrollRestoration="manual"),s(),o(),typeof window<"u"&&window.addEventListener("resize",o),new MutationObserver(p=>{p.forEach(m=>{m.addedNodes.forEach(v=>{v.nodeType===1&&v.classList&&v.classList.contains("dp__menu")&&!v.classList.contains("dp__mobile_modal")&&typeof window<"u"&&window.innerWidth<=767&&onDatePickerOpened()})})}).observe(document.body,{childList:!0,subtree:!0})}),i.onUnmounted(()=>{"scrollRestoration"in history&&(history.scrollRestoration="auto"),typeof window<"u"&&window.removeEventListener("resize",o)});function s(){document.addEventListener("click",d=>{d.target.closest(".ais-Pagination-link")&&setTimeout(()=>{u()},200)})}function u(){const d=document.querySelector(".eventsSearch__results");if(d){const p=d.getBoundingClientRect(),m=window.pageYOffset+p.top-20;window.scrollTo({top:m,behavior:"smooth"})}}return(d,p)=>(i.openBlock(),i.createElementBlock("div",pk,[i.createVNode(fT,{titles:["Performances","Artists","Works"]},{"tabpanel-1":i.withCtx(()=>[i.createVNode(dv,{"index-name":"archived_performances","main-refinements":r,"sort-field":"performance_date","query-by-fields":"work, season, orchestra, venue, event_types, notes, event_title","search-placeholder":"Search by composer, work, conductor, orchestra, and more","results-title":"Performances"},{default:i.withCtx(({items:m})=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m,(v,h)=>(i.openBlock(),i.createElementBlock("div",null,[h==0?(i.openBlock(),i.createElementBlock("div",mk,[...p[0]||(p[0]=[i.createElementVNode("div",null,"Date/Season/Title",-1),i.createElementVNode("div",null,"Venue",-1),i.createElementVNode("div",null,"Orchestra",-1),i.createElementVNode("div",null,"Conductor",-1),i.createElementVNode("div",null,"Composer/Work",-1),i.createElementVNode("div",null,"Artist/Role",-1),i.createElementVNode("div",null,"View",-1)])])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(v.work.slice(0,6),(l,c)=>(i.openBlock(),i.createElementBlock("div",null,[c==0?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(`eventsSearch__resultsGrid ${h%2==0?"-even":"-odd"}`)},[i.createElementVNode("div",null,i.toDisplayString(i.unref(hk)(v.performance_date))+" / "+i.toDisplayString(v.season),1),i.createElementVNode("div",null,i.toDisplayString(v.venue)+" "+i.toDisplayString(v.location.city)+", "+i.toDisplayString(v.location.state)+", "+i.toDisplayString(v.location.country),1),i.createElementVNode("div",null,i.toDisplayString(v.orchestra.join("; ")),1),i.createElementVNode("div",null,i.toDisplayString(l.artist.filter(g=>g.artist_role=="Conductor").map(g=>g.artist_name).join("; ")),1),i.createElementVNode("div",null,i.toDisplayString(l.composer)+" / "+i.toDisplayString(l.title),1),i.createElementVNode("div",null,i.toDisplayString(l.artist.filter(g=>g.artist_role!="Conductor").map(g=>g.artist_name+"/"+g.artist_role).join("; ")),1),i.createElementVNode("div",null,[i.createElementVNode("a",{href:`/details?performanceId=${v.id}`},"Details",8,gk)])],2)):c>0&&c<=4?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(`eventsSearch__resultsGrid ${h%2==0?"-even":"-odd"}`)},[p[2]||(p[2]=i.createElementVNode("div",null,null,-1)),p[3]||(p[3]=i.createElementVNode("div",null,null,-1)),p[4]||(p[4]=i.createElementVNode("div",null,null,-1)),i.createElementVNode("div",null,i.toDisplayString(l.artist.filter(g=>g.artist_role=="Conductor").map(g=>g.artist_name).join("; ")),1),i.createElementVNode("div",null,i.toDisplayString(l.composer)+" / "+i.toDisplayString(l.title),1),l.artist.filter(g=>g.artist_role!="Conductor").length<3?(i.openBlock(),i.createElementBlock("div",yk,i.toDisplayString(l.artist.filter(g=>g.artist_role!="Conductor").map(g=>g.artist_name+"/"+g.artist_role).join("; ")),1)):(i.openBlock(),i.createElementBlock("div",vk,[i.createTextVNode(i.toDisplayString(l.artist.filter(g=>g.artist_role!="Conductor").map(g=>g.artist_name+"/"+g.artist_role).slice(0,2).join("; ")),1),p[1]||(p[1]=i.createElementVNode("br",null,null,-1)),i.createElementVNode("a",{href:`/details?performanceId=${v.id}`},"More...",8,bk)])),p[5]||(p[5]=i.createElementVNode("div",null,null,-1))],2)):c>4?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(`eventsSearch__resultsGrid ${h%2==0?"-even":"-odd"}`)},[p[6]||(p[6]=i.createElementVNode("div",null,null,-1)),p[7]||(p[7]=i.createElementVNode("div",null,null,-1)),p[8]||(p[8]=i.createElementVNode("div",null,null,-1)),p[9]||(p[9]=i.createElementVNode("div",null,null,-1)),i.createElementVNode("div",null,[i.createElementVNode("a",{href:`/details?performanceId=${v.id}`},"More...",8,wk)]),p[10]||(p[10]=i.createElementVNode("div",null,null,-1)),p[11]||(p[11]=i.createElementVNode("div",null,null,-1))],2)):i.createCommentVNode("",!0)]))),256))]))),256))]),_:1})]),"tabpanel-2":i.withCtx(()=>[i.createVNode(dv,{"index-name":"archived_artists","main-refinements":n,"sort-field":"last_performance_date","query-by-fields":"artist_name, artist_role, work_title","search-placeholder":"Search by conductor, soloist, ensemble, instruument, or role","results-title":"Artists"},{default:i.withCtx(({items:m})=>[p[12]||(p[12]=i.createElementVNode("div",{class:"eventsSearch__artistGrid"},[i.createElementVNode("div",null,"Artist"),i.createElementVNode("div",null,"Instrument/Role"),i.createElementVNode("div",null,"Composer/Work"),i.createElementVNode("div",null,"# of Performances")],-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m,(v,h)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",{class:i.normalizeClass(`eventsSearch__artistGrid ${h%2==0?"-even":"-odd"}`)},[i.createElementVNode("div",null,i.toDisplayString(v.artist_name),1),i.createElementVNode("div",null,i.toDisplayString(v.artist_role),1),i.createElementVNode("div",null,i.toDisplayString(v.work_title),1),i.createElementVNode("div",null,i.toDisplayString(v.num_performances),1)],2)]))),256))]),_:1})]),"tabpanel-3":i.withCtx(()=>[...p[13]||(p[13]=[i.createElementVNode("h3",null,"Consectetur odit distinctio beatae!",-1),i.createElementVNode("p",null,"Ipsum eaque ipsam asperiores consequatur est libero. Incidunt distinctio non quae veniam illum Laborum est harum sapiente vel suscipit maiores? Dicta quo velit eos ab distinctio, delectus! Autem sunt aperiam!",-1)])]),_:1})]))}},_k={key:0},Sk={class:"performance__header"},Rk={class:"performance__headerLinks"},Pk={class:"peformance__mediaLinks"},Ok={key:0},Ek=["href"],Ck={key:1},xk=["href"],Tk={class:"performance__headerData"},kk={class:"composer"},Ak={class:"workInfo"},jk={key:0,class:"infoItem"},$k={key:1,class:"infoItem"},Dk={key:2,class:"infoItem"},Nk={class:"workInfo"},Fk={class:"infoItem"},Ik={class:"workInfo"},Mk={class:"infoItem"},Lk={class:"workInfo"},Bk={class:"infoItem"},Hk={__name:"SearchDetail",props:{performanceId:{type:Number,required:!0},indexName:{type:String,default:"archived_performances"}},setup(e){const t=e,r=i.ref(null);i.onMounted(()=>{new oT.Client({nodes:[{host:"go8f04wi19tuvlyrp-1.a1.typesense.net",port:"443",protocol:"https"}],apiKey:"YcX337xoj8b2col5BakYHqh1BIZrIsJH",connectionTimeoutSeconds:2}).collections("archived_performances").documents(t.performanceId).retrieve().then(function(u){r.value=u,console.log("searchResults",r.value)}).catch(()=>{document.location="/404"})});function n(s){const u=new Date(s*1e3);return`${["January","February","March","April","May","June","July","August","September","October","November","December"][u.getMonth()].substring(0,3)} ${u.getDay()+1}, ${u.getFullYear()}`}function a(s){const u=new Date(s*1e3),d=u.getHours()+1>12?u.getHours()-11:u.getHours()+1,p=u.getHours()+1>12?"pm":"am",m="0"+u.getMinutes();return`${d}:${m.substr(-2)}${p}`}function o(s,u){const d=[s];return u.city&&d.push(u.city),u.state&&d.push(u.state),u.country&&d.push(u.country),d.join(", ")}return(s,u)=>r.value?(i.openBlock(),i.createElementBlock("div",_k,[i.createElementVNode("div",Sk,[i.createElementVNode("h2",null,i.toDisplayString(n(r.value.performance_date))+" Performance Detail",1),i.createElementVNode("h3",null,i.toDisplayString(a(r.value.performance_date))+" | "+i.toDisplayString(o(r.value.venue,r.value.location)),1)]),i.createElementVNode("div",Rk,[i.createElementVNode("div",Pk,[r.value.program_link?(i.openBlock(),i.createElementBlock("div",Ok,[i.createElementVNode("a",{href:r.value.program_link},"View Program Book",8,Ek)])):i.createCommentVNode("",!0),r.value.bso_audio_id?(i.openBlock(),i.createElementBlock("div",Ck,[i.createElementVNode("a",{href:`/request-audio?audioId=${r.value.bso_audio_id}`},"Access Audio",8,xk)])):i.createCommentVNode("",!0)]),u[0]||(u[0]=i.createElementVNode("a",{onclick:"navigator.clipboard.writeText(window.location.href);"},"Copy URL",-1))]),i.createElementVNode("div",Tk,[i.createElementVNode("div",null,[u[1]||(u[1]=i.createElementVNode("span",{class:"performance__dataTitle"},"Season:",-1)),u[2]||(u[2]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(r.value.season),1)]),i.createElementVNode("div",null,[u[3]||(u[3]=i.createElementVNode("span",{class:"performance__dataTitle"},"Orchestra/Ensemble:",-1)),u[4]||(u[4]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(r.value.orchestra.join("; ")),1)]),i.createElementVNode("div",null,[u[5]||(u[5]=i.createElementVNode("span",{class:"performance__dataTitle"},"Conductor:",-1)),u[6]||(u[6]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(r.value.conductor.join(", ")),1)]),i.createElementVNode("div",null,[u[7]||(u[7]=i.createElementVNode("span",{class:"performance__dataTitle"},"Event Title:",-1)),u[8]||(u[8]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(r.value.event_title??"---"),1)]),i.createElementVNode("div",null,[u[9]||(u[9]=i.createElementVNode("span",{class:"performance__dataTitle"},"Event Type:",-1)),u[10]||(u[10]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(r.value.event_type?r.value.event_type.join(", "):"---"),1)]),i.createElementVNode("div",null,[u[11]||(u[11]=i.createElementVNode("span",{class:"performance__dataTitle"},"Notes:",-1)),u[12]||(u[12]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(r.value.notes??"---"),1)])]),u[20]||(u[20]=i.createStaticVNode('<h4>Program</h4><div class="performance__program"><div class="performance__dataTitle header">Composer</div><div class="performance__dataTitle header">Works</div><div class="performance__dataTitle header">Additional Creator</div><div class="performance__dataTitle header">Artist</div><div class="performance__dataTitle header">Role</div></div>',2)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value.work,(d,p)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",{class:i.normalizeClass(`performance__program ${p%2==0?"-even":"-odd"}`)},[i.createElementVNode("div",kk,i.toDisplayString(d.composer),1),i.createElementVNode("div",Ak,[i.createTextVNode(i.toDisplayString(d.title),1),u[17]||(u[17]=i.createElementVNode("br",null,null,-1)),d.premier?(i.openBlock(),i.createElementBlock("span",jk,[u[13]||(u[13]=i.createTextVNode("Work Premiere:",-1)),u[14]||(u[14]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(d.premiere),1)])):i.createCommentVNode("",!0),u[18]||(u[18]=i.createElementVNode("br",null,null,-1)),d.commission?(i.openBlock(),i.createElementBlock("span",$k,[u[15]||(u[15]=i.createTextVNode("Commission:",-1)),u[16]||(u[16]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(i.toDisplayString(d.commission),1)])):i.createCommentVNode("",!0),u[19]||(u[19]=i.createElementVNode("br",null,null,-1)),d.encore?(i.openBlock(),i.createElementBlock("span",Dk,"Encore")):i.createCommentVNode("",!0)]),i.createElementVNode("div",Nk,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.creator,m=>(i.openBlock(),i.createElementBlock("span",Fk,i.toDisplayString(m.creator_name)+", "+i.toDisplayString(m.creator_role),1))),256))]),i.createElementVNode("div",Ik,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.artist,m=>(i.openBlock(),i.createElementBlock("span",Mk,i.toDisplayString(m.artist_name),1))),256))]),i.createElementVNode("div",Lk,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.artist,m=>(i.openBlock(),i.createElementBlock("span",Bk,i.toDisplayString(m.artist_role),1))),256))])],2)]))),256))])):i.createCommentVNode("",!0)}},Vk={install:e=>{e.component("henry-search",fv)}};Sr.Search=fv,Sr.SearchDetail=Hk,Sr.default=Vk,Object.defineProperties(Sr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|