@eox/itemfilter 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-itemfilter.js +2403 -1193
- package/dist/eox-itemfilter.umd.cjs +71 -53
- package/package.json +3 -2
- package/test/general.cy.ts +7 -2
- package/test/testItems.json +120 -20
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(le,fe){typeof exports=="object"&&typeof module<"u"?fe(exports):typeof define=="function"&&define.amd?define(["exports"],fe):(le=typeof globalThis<"u"?globalThis:le||self,fe(le["eox-itemfilter"]={}))})(this,function(le){"use strict";var ro=Object.defineProperty;var no=(le,fe,Ie)=>fe in le?ro(le,fe,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):le[fe]=Ie;var te=(le,fe,Ie)=>(no(le,typeof fe!="symbol"?fe+"":fe,Ie),Ie);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const fe=window,Ie=fe.ShadowRoot&&(fe.ShadyCSS===void 0||fe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ks=Symbol(),Os=new WeakMap;let Ri=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==ks)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ie&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Os.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Os.set(t,e))}return e}toString(){return this.cssText}};const Pi=i=>new Ri(typeof i=="string"?i:i+"",void 0,ks),Ii=(i,e)=>{Ie?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const s=document.createElement("style"),r=fe.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)})},Ls=Ie?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return Pi(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var Pt;const vt=window,Cs=vt.trustedTypes,Ni=Cs?Cs.emptyScript:"",Ds=vt.reactiveElementPolyfillSupport,It={toAttribute(i,e){switch(e){case Boolean:i=i?Ni:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Ts=(i,e)=>e!==i&&(e==e||i==i),Nt={attribute:!0,type:String,converter:It,reflect:!1,hasChanged:Ts},jt="finalized";let Xe=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,s)=>{const r=this._$Ep(s,t);r!==void 0&&(this._$Ev.set(r,s),e.push(r))}),e}static createProperty(e,t=Nt){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const s=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,s,t);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){return{get(){return this[t]},set(r){const o=this[e];this[t]=r,this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Nt}static finalize(){if(this.hasOwnProperty(jt))return!1;this[jt]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,s=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of s)this.createProperty(r,t[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(Ls(r))}else e!==void 0&&t.push(Ls(e));return t}static _$Ep(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,s;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((s=e.hostConnected)===null||s===void 0||s.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Ii(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostConnected)===null||s===void 0?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostDisconnected)===null||s===void 0?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$EO(e,t,s=Nt){var r;const o=this.constructor._$Ep(e,s);if(o!==void 0&&s.reflect===!0){const c=(((r=s.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?s.converter:It).toAttribute(t,s.type);this._$El=e,c==null?this.removeAttribute(o):this.setAttribute(o,c),this._$El=null}}_$AK(e,t){var s;const r=this.constructor,o=r._$Ev.get(e);if(o!==void 0&&this._$El!==o){const c=r.getPropertyOptions(o),h=typeof c.converter=="function"?{fromAttribute:c.converter}:((s=c.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?c.converter:It;this._$El=o,this[o]=h.fromAttribute(t,c.type),this._$El=null}}requestUpdate(e,t,s){let r=!0;e!==void 0&&(((s=s||this.constructor.getPropertyOptions(e)).hasChanged||Ts)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),s.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,s))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(s)):this._$Ek()}catch(r){throw t=!1,this._$Ek(),r}t&&this._$AE(s)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(s=>{var r;return(r=s.hostUpdated)===null||r===void 0?void 0:r.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,s)=>this._$EO(s,this[s],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Xe[jt]=!0,Xe.elementProperties=new Map,Xe.elementStyles=[],Xe.shadowRootOptions={mode:"open"},Ds==null||Ds({ReactiveElement:Xe}),((Pt=vt.reactiveElementVersions)!==null&&Pt!==void 0?Pt:vt.reactiveElementVersions=[]).push("1.6.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var Ht;const mt=window,Ge=mt.trustedTypes,Rs=Ge?Ge.createPolicy("lit-html",{createHTML:i=>i}):void 0,Ft="$lit$",je=`lit$${(Math.random()+"").slice(9)}$`,Ps="?"+je,ji=`<${Ps}>`,Ue=document,rt=()=>Ue.createComment(""),nt=i=>i===null||typeof i!="object"&&typeof i!="function",Is=Array.isArray,Hi=i=>Is(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Ut=`[
|
|
14
|
+
\f\r]`,ot=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ns=/-->/g,js=/>/g,Be=RegExp(`>|${Ut}(?:([^\\s"'>=/]+)(${Ut}*=${Ut}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Hs=/'/g,Fs=/"/g,Us=/^(?:script|style|textarea|title)$/i,Fi=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),ye=Fi(1),ze=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),Bs=new WeakMap,We=Ue.createTreeWalker(Ue,129,null,!1),Ui=(i,e)=>{const t=i.length-1,s=[];let r,o=e===2?"<svg>":"",c=ot;for(let u=0;u<t;u++){const d=i[u];let m,v,$=-1,M=0;for(;M<d.length&&(c.lastIndex=M,v=c.exec(d),v!==null);)M=c.lastIndex,c===ot?v[1]==="!--"?c=Ns:v[1]!==void 0?c=js:v[2]!==void 0?(Us.test(v[2])&&(r=RegExp("</"+v[2],"g")),c=Be):v[3]!==void 0&&(c=Be):c===Be?v[0]===">"?(c=r??ot,$=-1):v[1]===void 0?$=-2:($=c.lastIndex-v[2].length,m=v[1],c=v[3]===void 0?Be:v[3]==='"'?Fs:Hs):c===Fs||c===Hs?c=Be:c===Ns||c===js?c=ot:(c=Be,r=void 0);const P=c===Be&&i[u+1].startsWith("/>")?" ":"";o+=c===ot?d+ji:$>=0?(s.push(m),d.slice(0,$)+Ft+d.slice($)+je+P):d+je+($===-2?(s.push(void 0),u):P)}const h=o+(i[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Rs!==void 0?Rs.createHTML(h):h,s]};class lt{constructor({strings:e,_$litType$:t},s){let r;this.parts=[];let o=0,c=0;const h=e.length-1,u=this.parts,[d,m]=Ui(e,t);if(this.el=lt.createElement(d,s),We.currentNode=this.el.content,t===2){const v=this.el.content,$=v.firstChild;$.remove(),v.append(...$.childNodes)}for(;(r=We.nextNode())!==null&&u.length<h;){if(r.nodeType===1){if(r.hasAttributes()){const v=[];for(const $ of r.getAttributeNames())if($.endsWith(Ft)||$.startsWith(je)){const M=m[c++];if(v.push($),M!==void 0){const P=r.getAttribute(M.toLowerCase()+Ft).split(je),J=/([.?@])?(.*)/.exec(M);u.push({type:1,index:o,name:J[2],strings:P,ctor:J[1]==="."?zi:J[1]==="?"?Vi:J[1]==="@"?Yi:yt})}else u.push({type:6,index:o})}for(const $ of v)r.removeAttribute($)}if(Us.test(r.tagName)){const v=r.textContent.split(je),$=v.length-1;if($>0){r.textContent=Ge?Ge.emptyScript:"";for(let M=0;M<$;M++)r.append(v[M],rt()),We.nextNode(),u.push({type:2,index:++o});r.append(v[$],rt())}}}else if(r.nodeType===8)if(r.data===Ps)u.push({type:2,index:o});else{let v=-1;for(;(v=r.data.indexOf(je,v+1))!==-1;)u.push({type:7,index:o}),v+=je.length-1}o++}}static createElement(e,t){const s=Ue.createElement("template");return s.innerHTML=e,s}}function Je(i,e,t=i,s){var r,o,c,h;if(e===ze)return e;let u=s!==void 0?(r=t._$Co)===null||r===void 0?void 0:r[s]:t._$Cl;const d=nt(e)?void 0:e._$litDirective$;return(u==null?void 0:u.constructor)!==d&&((o=u==null?void 0:u._$AO)===null||o===void 0||o.call(u,!1),d===void 0?u=void 0:(u=new d(i),u._$AT(i,t,s)),s!==void 0?((c=(h=t)._$Co)!==null&&c!==void 0?c:h._$Co=[])[s]=u:t._$Cl=u),u!==void 0&&(e=Je(i,u._$AS(i,e.values),u,s)),e}class Bi{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:s},parts:r}=this._$AD,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ue).importNode(s,!0);We.currentNode=o;let c=We.nextNode(),h=0,u=0,d=r[0];for(;d!==void 0;){if(h===d.index){let m;d.type===2?m=new at(c,c.nextSibling,this,e):d.type===1?m=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(m=new Ki(c,this,e)),this._$AV.push(m),d=r[++u]}h!==(d==null?void 0:d.index)&&(c=We.nextNode(),h++)}return We.currentNode=Ue,o}v(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class at{constructor(e,t,s,r){var o;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=r,this._$Cp=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Je(this,e,t),nt(e)?e===Z||e==null||e===""?(this._$AH!==Z&&this._$AR(),this._$AH=Z):e!==this._$AH&&e!==ze&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Hi(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Z&&nt(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ue.createTextNode(e)),this._$AH=e}g(e){var t;const{values:s,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=lt.createElement(r.h,this.options)),r);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===o)this._$AH.v(s);else{const c=new Bi(o,this),h=c.u(this.options);c.v(s),this.$(h),this._$AH=c}}_$AC(e){let t=Bs.get(e.strings);return t===void 0&&Bs.set(e.strings,t=new lt(e)),t}T(e){Is(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,r=0;for(const o of e)r===t.length?t.push(s=new at(this.k(rt()),this.k(rt()),this,this.options)):s=t[r],s._$AI(o),r++;r<t.length&&(this._$AR(s&&s._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,t);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class yt{constructor(e,t,s,r,o){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,r){const o=this.strings;let c=!1;if(o===void 0)e=Je(this,e,t,0),c=!nt(e)||e!==this._$AH&&e!==ze,c&&(this._$AH=e);else{const h=e;let u,d;for(e=o[0],u=0;u<o.length-1;u++)d=Je(this,h[s+u],t,u),d===ze&&(d=this._$AH[u]),c||(c=!nt(d)||d!==this._$AH[u]),d===Z?e=Z:e!==Z&&(e+=(d??"")+o[u+1]),this._$AH[u]=d}c&&!r&&this.j(e)}j(e){e===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class zi extends yt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Z?void 0:e}}const Wi=Ge?Ge.emptyScript:"";class Vi extends yt{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Z?this.element.setAttribute(this.name,Wi):this.element.removeAttribute(this.name)}}class Yi extends yt{constructor(e,t,s,r,o){super(e,t,s,r,o),this.type=5}_$AI(e,t=this){var s;if((e=(s=Je(this,e,t,0))!==null&&s!==void 0?s:Z)===ze)return;const r=this._$AH,o=e===Z&&r!==Z||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,c=e!==Z&&(r===Z||o);o&&this.element.removeEventListener(this.name,this,r),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;typeof this._$AH=="function"?this._$AH.call((s=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&s!==void 0?s:this.element,e):this._$AH.handleEvent(e)}}class Ki{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){Je(this,e)}}const zs=mt.litHtmlPolyfillSupport;zs==null||zs(lt,at),((Ht=mt.litHtmlVersions)!==null&&Ht!==void 0?Ht:mt.litHtmlVersions=[]).push("2.7.4");const qi=(i,e,t)=>{var s,r;const o=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:e;let c=o._$litPart$;if(c===void 0){const h=(r=t==null?void 0:t.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=c=new at(e.insertBefore(rt(),h),h,void 0,t??{})}return c._$AI(i),c};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
19
|
+
*/var Bt,zt;class ct extends Xe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const s=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=s.firstChild),s}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=qi(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return ze}}ct.finalized=!0,ct._$litElement$=!0,(Bt=globalThis.litElementHydrateSupport)===null||Bt===void 0||Bt.call(globalThis,{LitElement:ct});const Ws=globalThis.litElementPolyfillSupport;Ws==null||Ws({LitElement:ct}),((zt=globalThis.litElementVersions)!==null&&zt!==void 0?zt:globalThis.litElementVersions=[]).push("3.3.2");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const Xi=i=>e=>typeof e=="function"?((t,s)=>(customElements.define(t,s),s))(i,e):((t,s)=>{const{kind:r,elements:o}=s;return{kind:r,elements:o,finisher(c){customElements.define(t,c)}}})(i,e);/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const Gi=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},Ji=(i,e,t)=>{e.constructor.createProperty(t,i)};function Wt(i){return(e,t)=>t!==void 0?Ji(i,e,t):Gi(i,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function
|
|
31
|
+
*/function bt(i){return Wt({...i,state:!0})}/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/var
|
|
35
|
+
*/var Vt;((Vt=window.HTMLSlotElement)===null||Vt===void 0?void 0:Vt.prototype.assignedElements)!=null;/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2021 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function
|
|
39
|
+
*/function ht(i,e,t){return i?e():t==null?void 0:t()}/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2021 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/function*
|
|
43
|
+
*/function*ut(i,e){if(i!==void 0){let t=0;for(const s of i)yield e(s,t++)}}/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const
|
|
47
|
+
*/const Zi={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Qi=i=>(...e)=>({_$litDirective$:i,values:e});class er{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/class Et extends Pe{constructor(t){if(super(t),this.et=m,t.type!==Le.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===m||t==null)return this.ft=void 0,this.et=t;if(t===U)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Et.directiveName="unsafeHTML",Et.resultType=1;const Qt=Ne(Et);function k(i){return Array.isArray?Array.isArray(i):te(i)==="[object Array]"}const je=1/0;function He(i){if(typeof i=="string")return i;let t=i+"";return t=="0"&&1/i==-je?"-0":t}function Ue(i){return i==null?"":He(i)}function O(i){return typeof i=="string"}function Zt(i){return typeof i=="number"}function Fe(i){return i===!0||i===!1||De(i)&&te(i)=="[object Boolean]"}function qt(i){return typeof i=="object"}function De(i){return qt(i)&&i!==null}function S(i){return i!=null}function bt(i){return!i.trim().length}function te(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Vs="Extended search is not available",ze="Incorrect 'index' type",Be=i=>`Invalid value for key ${i}`,We=i=>`Pattern length exceeds max of ${i}.`,Ve=i=>`Missing ${i} property in key`,Ke=i=>`Property 'weight' in key '${i}' must be a positive integer`,ee=Object.prototype.hasOwnProperty;class Ge{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(s=>{let n=se(s);e+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(s=>{s.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function se(i){let t=null,e=null,s=null,n=1,r=null;if(O(i)||k(i))s=i,t=ie(i),e=xt(i);else{if(!ee.call(i,"name"))throw new Error(Ve("name"));const o=i.name;if(s=o,ee.call(i,"weight")&&(n=i.weight,n<=0))throw new Error(Ke(o));t=ie(o),e=xt(o),r=i.getFn}return{path:t,id:e,weight:n,src:s,getFn:r}}function ie(i){return k(i)?i:i.split(".")}function xt(i){return k(i)?i.join("."):i}function Ye(i,t){let e=[],s=!1;const n=(r,o,c)=>{if(S(r))if(!o[c])e.push(r);else{let l=o[c];const a=r[l];if(!S(a))return;if(c===o.length-1&&(O(a)||Zt(a)||Fe(a)))e.push(Ue(a));else if(k(a)){s=!0;for(let u=0,h=a.length;u<h;u+=1)n(a[u],o,c+1)}else o.length&&n(a,o,c+1)}};return n(i,O(t)?t.split("."):t,0),s?e:e[0]}var f={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(i,t)=>i.score===t.score?i.idx<t.idx?-1:1:i.score<t.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Ye,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Je=/[^ ]+/g;function Xe(i=1,t=3){const e=new Map,s=Math.pow(10,t);return{get(n){const r=n.match(Je).length;if(e.has(r))return e.get(r);const o=1/Math.pow(r,.5*i),c=parseFloat(Math.round(o*s)/s);return e.set(r,c),c},clear(){e.clear()}}}class St{constructor({getFn:t=f.getFn,fieldNormWeight:e=f.fieldNormWeight}={}){this.norm=Xe(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((e,s)=>{this._keysMap[e.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,O(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();O(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,s=this.size();e<s;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!S(t)||bt(t))return;let s={v:t,i:e,n:this.norm.get(t)};this.records.push(s)}_addObject(t,e){let s={i:e,$:{}};this.keys.forEach((n,r)=>{let o=n.getFn?n.getFn(t):this.getFn(t,n.path);if(S(o)){if(k(o)){let c=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:a,value:u}=l.pop();if(S(u))if(O(u)&&!bt(u)){let h={v:u,i:a,n:this.norm.get(u)};c.push(h)}else k(u)&&u.forEach((h,d)=>{l.push({nestedArrIndex:d,value:h})})}s.$[r]=c}else if(O(o)&&!bt(o)){let c={v:o,n:this.norm.get(o)};s.$[r]=c}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function ne(i,t,{getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const n=new St({getFn:e,fieldNormWeight:s});return n.setKeys(i.map(se)),n.setSources(t),n.create(),n}function Qe(i,{getFn:t=f.getFn,fieldNormWeight:e=f.fieldNormWeight}={}){const{keys:s,records:n}=i,r=new St({getFn:t,fieldNormWeight:e});return r.setKeys(s),r.setIndexRecords(n),r}function ct(i,{errors:t=0,currentLocation:e=0,expectedLocation:s=0,distance:n=f.distance,ignoreLocation:r=f.ignoreLocation}={}){const o=t/i.length;if(r)return o;const c=Math.abs(s-e);return n?o+c/n:c?1:o}function Ze(i=[],t=f.minMatchCharLength){let e=[],s=-1,n=-1,r=0;for(let o=i.length;r<o;r+=1){let c=i[r];c&&s===-1?s=r:!c&&s!==-1&&(n=r-1,n-s+1>=t&&e.push([s,n]),s=-1)}return i[r-1]&&r-s>=t&&e.push([s,r-1]),e}const D=32;function qe(i,t,e,{location:s=f.location,distance:n=f.distance,threshold:r=f.threshold,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,includeMatches:l=f.includeMatches,ignoreLocation:a=f.ignoreLocation}={}){if(t.length>D)throw new Error(We(D));const u=t.length,h=i.length,d=Math.max(0,Math.min(s,h));let p=r,g=d;const A=c>1||l,C=A?Array(h):[];let b;for(;(b=i.indexOf(t,g))>-1;){let $=ct(t,{currentLocation:b,expectedLocation:d,distance:n,ignoreLocation:a});if(p=Math.min($,p),g=b+u,A){let x=0;for(;x<u;)C[b+x]=1,x+=1}}g=-1;let T=[],L=1,G=u+h;const it=1<<u-1;for(let $=0;$<u;$+=1){let x=0,M=G;for(;x<M;)ct(t,{errors:$,currentLocation:d+M,expectedLocation:d,distance:n,ignoreLocation:a})<=p?x=M:G=M,M=Math.floor((G-x)/2+x);G=M;let ge=Math.max(1,d-M+1),Tt=o?h:Math.min(d+M,h)+u,Y=Array(Tt+2);Y[Tt+1]=(1<<$)-1;for(let I=Tt;I>=ge;I-=1){let ut=I-1,me=e[i.charAt(ut)];if(A&&(C[ut]=+!!me),Y[I]=(Y[I+1]<<1|1)&me,$&&(Y[I]|=(T[I+1]|T[I])<<1|1|T[I+1]),Y[I]&it&&(L=ct(t,{errors:$,currentLocation:ut,expectedLocation:d,distance:n,ignoreLocation:a}),L<=p)){if(p=L,g=ut,g<=d)break;ge=Math.max(1,2*d-g)}}if(ct(t,{errors:$+1,currentLocation:d,expectedLocation:d,distance:n,ignoreLocation:a})>p)break;T=Y}const y={isMatch:g>=0,score:Math.max(.001,L)};if(A){const $=Ze(C,c);$.length?l&&(y.indices=$):y.isMatch=!1}return y}function ts(i){let t={};for(let e=0,s=i.length;e<s;e+=1){const n=i.charAt(e);t[n]=(t[n]||0)|1<<s-e-1}return t}class re{constructor(t,{location:e=f.location,threshold:s=f.threshold,distance:n=f.distance,includeMatches:r=f.includeMatches,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:l=f.isCaseSensitive,ignoreLocation:a=f.ignoreLocation}={}){if(this.options={location:e,threshold:s,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:a},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(d,p)=>{this.chunks.push({pattern:d,alphabet:ts(d),startIndex:p})},h=this.pattern.length;if(h>D){let d=0;const p=h%D,g=h-p;for(;d<g;)u(this.pattern.substr(d,D),d),d+=D;if(p){const A=h-D;u(this.pattern.substr(A),A)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let g={isMatch:!0,score:0};return s&&(g.indices=[[0,t.length-1]]),g}const{location:n,distance:r,threshold:o,findAllMatches:c,minMatchCharLength:l,ignoreLocation:a}=this.options;let u=[],h=0,d=!1;this.chunks.forEach(({pattern:g,alphabet:A,startIndex:C})=>{const{isMatch:b,score:T,indices:L}=qe(t,g,A,{location:n+C,distance:r,threshold:o,findAllMatches:c,minMatchCharLength:l,includeMatches:s,ignoreLocation:a});b&&(d=!0),h+=T,b&&L&&(u=[...u,...L])});let p={isMatch:d,score:d?h/this.chunks.length:1};return d&&s&&(p.indices=u),p}}class P{constructor(t){this.pattern=t}static isMultiMatch(t){return oe(t,this.multiRegex)}static isSingleMatch(t){return oe(t,this.singleRegex)}search(){}}function oe(i,t){const e=i.match(t);return e?e[1]:null}class es extends P{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class ss extends P{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class is extends P{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class ns extends P{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class rs extends P{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class os extends P{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class le extends P{constructor(t,{location:e=f.location,threshold:s=f.threshold,distance:n=f.distance,includeMatches:r=f.includeMatches,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:l=f.isCaseSensitive,ignoreLocation:a=f.ignoreLocation}={}){super(t),this._bitapSearch=new re(t,{location:e,threshold:s,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ce extends P{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,s;const n=[],r=this.pattern.length;for(;(s=t.indexOf(this.pattern,e))>-1;)e=s+r,n.push([s,e-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const wt=[es,ce,is,ns,os,rs,ss,le],ae=wt.length,ls=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,cs="|";function as(i,t={}){return i.split(cs).map(e=>{let s=e.trim().split(ls).filter(r=>r&&!!r.trim()),n=[];for(let r=0,o=s.length;r<o;r+=1){const c=s[r];let l=!1,a=-1;for(;!l&&++a<ae;){const u=wt[a];let h=u.isMultiMatch(c);h&&(n.push(new u(h,t)),l=!0)}if(!l)for(a=-1;++a<ae;){const u=wt[a];let h=u.isSingleMatch(c);if(h){n.push(new u(h,t));break}}}return n})}const hs=new Set([le.type,ce.type]);class us{constructor(t,{isCaseSensitive:e=f.isCaseSensitive,includeMatches:s=f.includeMatches,minMatchCharLength:n=f.minMatchCharLength,ignoreLocation:r=f.ignoreLocation,findAllMatches:o=f.findAllMatches,location:c=f.location,threshold:l=f.threshold,distance:a=f.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:s,minMatchCharLength:n,findAllMatches:o,ignoreLocation:r,location:c,threshold:l,distance:a},this.pattern=e?t:t.toLowerCase(),this.query=as(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n}=this.options;t=n?t:t.toLowerCase();let r=0,o=[],c=0;for(let l=0,a=e.length;l<a;l+=1){const u=e[l];o.length=0,r=0;for(let h=0,d=u.length;h<d;h+=1){const p=u[h],{isMatch:g,indices:A,score:C}=p.search(t);if(g){if(r+=1,c+=C,s){const b=p.constructor.type;hs.has(b)?o=[...o,...A]:o.push(A)}}else{c=0,r=0,o.length=0;break}}if(r){let h={isMatch:!0,score:c/r};return s&&(h.indices=o),h}}return{isMatch:!1,score:1}}}const Mt=[];function ds(...i){Mt.push(...i)}function It(i,t){for(let e=0,s=Mt.length;e<s;e+=1){let n=Mt[e];if(n.condition(i,t))return new n(i,t)}return new re(i,t)}const at={AND:"$and",OR:"$or"},Ot={PATH:"$path",PATTERN:"$val"},Ct=i=>!!(i[at.AND]||i[at.OR]),fs=i=>!!i[Ot.PATH],ps=i=>!k(i)&&qt(i)&&!Ct(i),he=i=>({[at.AND]:Object.keys(i).map(t=>({[t]:i[t]}))});function ue(i,t,{auto:e=!0}={}){const s=n=>{let r=Object.keys(n);const o=fs(n);if(!o&&r.length>1&&!Ct(n))return s(he(n));if(ps(n)){const l=o?n[Ot.PATH]:r[0],a=o?n[Ot.PATTERN]:n[l];if(!O(a))throw new Error(Be(l));const u={keyId:xt(l),pattern:a};return e&&(u.searcher=It(a,t)),u}let c={children:[],operator:r[0]};return r.forEach(l=>{const a=n[l];k(a)&&a.forEach(u=>{c.children.push(s(u))})}),c};return Ct(i)||(i=he(i)),s(i)}function gs(i,{ignoreFieldNorm:t=f.ignoreFieldNorm}){i.forEach(e=>{let s=1;e.matches.forEach(({key:n,norm:r,score:o})=>{const c=n?n.weight:null;s*=Math.pow(o===0&&c?Number.EPSILON:o,(c||1)*(t?1:r))}),e.score=s})}function ms(i,t){const e=i.matches;t.matches=[],S(e)&&e.forEach(s=>{if(!S(s.indices)||!s.indices.length)return;const{indices:n,value:r}=s;let o={indices:n,value:r};s.key&&(o.key=s.key.src),s.idx>-1&&(o.refIndex=s.idx),t.matches.push(o)})}function _s(i,t){t.score=i.score}function ys(i,t,{includeMatches:e=f.includeMatches,includeScore:s=f.includeScore}={}){const n=[];return e&&n.push(ms),s&&n.push(_s),i.map(r=>{const{idx:o}=r,c={item:t[o],refIndex:o};return n.length&&n.forEach(l=>{l(r,c)}),c})}class K{constructor(t,e={},s){this.options={...f,...e},this.options.useExtendedSearch,this._keyStore=new Ge(this.options.keys),this.setCollection(t,s)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof St))throw new Error(ze);this._myIndex=e||ne(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){S(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let s=0,n=this._docs.length;s<n;s+=1){const r=this._docs[s];t(r,s)&&(this.removeAt(s),s-=1,n-=1,e.push(r))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:s,includeScore:n,shouldSort:r,sortFn:o,ignoreFieldNorm:c}=this.options;let l=O(t)?O(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return gs(l,{ignoreFieldNorm:c}),r&&l.sort(o),Zt(e)&&e>-1&&(l=l.slice(0,e)),ys(l,this._docs,{includeMatches:s,includeScore:n})}_searchStringList(t){const e=It(t,this.options),{records:s}=this._myIndex,n=[];return s.forEach(({v:r,i:o,n:c})=>{if(!S(r))return;const{isMatch:l,score:a,indices:u}=e.searchIn(r);l&&n.push({item:r,idx:o,matches:[{score:a,value:r,norm:c,indices:u}]})}),n}_searchLogical(t){const e=ue(t,this.options),s=(c,l,a)=>{if(!c.children){const{keyId:h,searcher:d}=c,p=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:d});return p&&p.length?[{idx:a,item:l,matches:p}]:[]}const u=[];for(let h=0,d=c.children.length;h<d;h+=1){const p=c.children[h],g=s(p,l,a);if(g.length)u.push(...g);else if(c.operator===at.AND)return[]}return u},n=this._myIndex.records,r={},o=[];return n.forEach(({$:c,i:l})=>{if(S(c)){let a=s(e,c,l);a.length&&(r[l]||(r[l]={idx:l,item:c,matches:[]},o.push(r[l])),a.forEach(({matches:u})=>{r[l].matches.push(...u)}))}}),o}_searchObjectList(t){const e=It(t,this.options),{keys:s,records:n}=this._myIndex,r=[];return n.forEach(({$:o,i:c})=>{if(!S(o))return;let l=[];s.forEach((a,u)=>{l.push(...this._findMatches({key:a,value:o[u],searcher:e}))}),l.length&&r.push({idx:c,item:o,matches:l})}),r}_findMatches({key:t,value:e,searcher:s}){if(!S(e))return[];let n=[];if(k(e))e.forEach(({v:r,i:o,n:c})=>{if(!S(r))return;const{isMatch:l,score:a,indices:u}=s.searchIn(r);l&&n.push({score:a,key:t,value:r,idx:o,norm:c,indices:u})});else{const{v:r,n:o}=e,{isMatch:c,score:l,indices:a}=s.searchIn(r);c&&n.push({score:l,key:t,value:r,norm:o,indices:a})}return n}}K.version="6.6.2",K.createIndex=ne,K.parseIndex=Qe,K.config=f,K.parseQuery=ue,ds(us);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $s(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var vs="Expected a function",de=0/0,As="[object Symbol]",Es=/^\s+|\s+$/g,bs=/^[-+]0x[0-9a-f]+$/i,xs=/^0b[01]+$/i,Ss=/^0o[0-7]+$/i,ws=parseInt,Ms=typeof ht=="object"&&ht&&ht.Object===Object&&ht,Is=typeof self=="object"&&self&&self.Object===Object&&self,Os=Ms||Is||Function("return this")(),Cs=Object.prototype,Rs=Cs.toString,ks=Math.max,Ts=Math.min,Rt=function(){return Os.Date.now()};function Ls(i,t,e){var s,n,r,o,c,l,a=0,u=!1,h=!1,d=!0;if(typeof i!="function")throw new TypeError(vs);t=fe(t)||0,kt(e)&&(u=!!e.leading,h="maxWait"in e,r=h?ks(fe(e.maxWait)||0,t):r,d="trailing"in e?!!e.trailing:d);function p(y){var $=s,x=n;return s=n=void 0,a=y,o=i.apply(x,$),o}function g(y){return a=y,c=setTimeout(b,t),u?p(y):o}function A(y){var $=y-l,x=y-a,M=t-$;return h?Ts(M,r-x):M}function C(y){var $=y-l,x=y-a;return l===void 0||$>=t||$<0||h&&x>=r}function b(){var y=Rt();if(C(y))return T(y);c=setTimeout(b,A(y))}function T(y){return c=void 0,d&&s?p(y):(s=n=void 0,o)}function L(){c!==void 0&&clearTimeout(c),a=0,s=l=n=c=void 0}function G(){return c===void 0?o:T(Rt())}function it(){var y=Rt(),$=C(y);if(s=arguments,n=this,l=y,$){if(c===void 0)return g(l);if(h)return c=setTimeout(b,t),p(l)}return c===void 0&&(c=setTimeout(b,t)),o}return it.cancel=L,it.flush=G,it}function kt(i){var t=typeof i;return!!i&&(t=="object"||t=="function")}function Ns(i){return!!i&&typeof i=="object"}function Ps(i){return typeof i=="symbol"||Ns(i)&&Rs.call(i)==As}function fe(i){if(typeof i=="number")return i;if(Ps(i))return de;if(kt(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=kt(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=i.replace(Es,"");var e=xs.test(i);return e||Ss.test(i)?ws(i.slice(2),e?2:8):bs.test(i)?de:+i}var js=Ls;const Hs=$s(js),Us=(i,t="highlight",e="title")=>{const s=(r,o,c)=>{const l=o.split(".");let a;for(a=0;a<l.length-1;a++)r=r[l[a]];r[l[a]]=c},n=(r,o=[])=>{let c="",l=0;return o.forEach(a=>{const u=a[1]+1;c+=[r.substring(l,a[0]),`<mark class="${t}">`,r.substring(a[0],u),"</mark>"].join(""),l=u}),c+=r.substring(l),c};return i.filter(({matches:r})=>r&&r.length).map(({item:r,matches:o})=>{const c={...r};return o.forEach(l=>{l.key===e&&s(c,l.key,n(l.value,l.indices))}),c})},Fs=`
|
|
51
|
+
*/class Yt extends er{constructor(e){if(super(e),this.et=Z,e.type!==Zi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Z||e==null)return this.ft=void 0,this.et=e;if(e===ze)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Yt.directiveName="unsafeHTML",Yt.resultType=1;const Vs=Qi(Yt);function Ne(i){return Array.isArray?Array.isArray(i):qs(i)==="[object Array]"}const tr=1/0;function sr(i){if(typeof i=="string")return i;let e=i+"";return e=="0"&&1/i==-tr?"-0":e}function ir(i){return i==null?"":sr(i)}function De(i){return typeof i=="string"}function Ys(i){return typeof i=="number"}function rr(i){return i===!0||i===!1||nr(i)&&qs(i)=="[object Boolean]"}function Ks(i){return typeof i=="object"}function nr(i){return Ks(i)&&i!==null}function Ae(i){return i!=null}function Kt(i){return!i.trim().length}function qs(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const oo="Extended search is not available",or="Incorrect 'index' type",lr=i=>`Invalid value for key ${i}`,ar=i=>`Pattern length exceeds max of ${i}.`,cr=i=>`Missing ${i} property in key`,hr=i=>`Property 'weight' in key '${i}' must be a positive integer`,Xs=Object.prototype.hasOwnProperty;class ur{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{let r=Gs(s);t+=r.weight,this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Gs(i){let e=null,t=null,s=null,r=1,o=null;if(De(i)||Ne(i))s=i,e=Js(i),t=qt(i);else{if(!Xs.call(i,"name"))throw new Error(cr("name"));const c=i.name;if(s=c,Xs.call(i,"weight")&&(r=i.weight,r<=0))throw new Error(hr(c));e=Js(c),t=qt(c),o=i.getFn}return{path:e,id:t,weight:r,src:s,getFn:o}}function Js(i){return Ne(i)?i:i.split(".")}function qt(i){return Ne(i)?i.join("."):i}function dr(i,e){let t=[],s=!1;const r=(o,c,h)=>{if(Ae(o))if(!c[h])t.push(o);else{let u=c[h];const d=o[u];if(!Ae(d))return;if(h===c.length-1&&(De(d)||Ys(d)||rr(d)))t.push(ir(d));else if(Ne(d)){s=!0;for(let m=0,v=d.length;m<v;m+=1)r(d[m],c,h+1)}else c.length&&r(d,c,h+1)}};return r(i,De(e)?e.split("."):e,0),s?t:t[0]}var D={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(i,e)=>i.score===e.score?i.idx<e.idx?-1:1:i.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:dr,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const pr=/[^ ]+/g;function fr(i=1,e=3){const t=new Map,s=Math.pow(10,e);return{get(r){const o=r.match(pr).length;if(t.has(o))return t.get(o);const c=1/Math.pow(o,.5*i),h=parseFloat(Math.round(c*s)/s);return t.set(o,h),h},clear(){t.clear()}}}class Xt{constructor({getFn:e=D.getFn,fieldNormWeight:t=D.fieldNormWeight}={}){this.norm=fr(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,s)=>{this._keysMap[t.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,De(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();De(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t<s;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Ae(e)||Kt(e))return;let s={v:e,i:t,n:this.norm.get(e)};this.records.push(s)}_addObject(e,t){let s={i:t,$:{}};this.keys.forEach((r,o)=>{let c=r.getFn?r.getFn(e):this.getFn(e,r.path);if(Ae(c)){if(Ne(c)){let h=[];const u=[{nestedArrIndex:-1,value:c}];for(;u.length;){const{nestedArrIndex:d,value:m}=u.pop();if(Ae(m))if(De(m)&&!Kt(m)){let v={v:m,i:d,n:this.norm.get(m)};h.push(v)}else Ne(m)&&m.forEach((v,$)=>{u.push({nestedArrIndex:$,value:v})})}s.$[o]=h}else if(De(c)&&!Kt(c)){let h={v:c,n:this.norm.get(c)};s.$[o]=h}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function Zs(i,e,{getFn:t=D.getFn,fieldNormWeight:s=D.fieldNormWeight}={}){const r=new Xt({getFn:t,fieldNormWeight:s});return r.setKeys(i.map(Gs)),r.setSources(e),r.create(),r}function gr(i,{getFn:e=D.getFn,fieldNormWeight:t=D.fieldNormWeight}={}){const{keys:s,records:r}=i,o=new Xt({getFn:e,fieldNormWeight:t});return o.setKeys(s),o.setIndexRecords(r),o}function $t(i,{errors:e=0,currentLocation:t=0,expectedLocation:s=0,distance:r=D.distance,ignoreLocation:o=D.ignoreLocation}={}){const c=e/i.length;if(o)return c;const h=Math.abs(s-t);return r?c+h/r:h?1:c}function vr(i=[],e=D.minMatchCharLength){let t=[],s=-1,r=-1,o=0;for(let c=i.length;o<c;o+=1){let h=i[o];h&&s===-1?s=o:!h&&s!==-1&&(r=o-1,r-s+1>=e&&t.push([s,r]),s=-1)}return i[o-1]&&o-s>=e&&t.push([s,o-1]),t}const Ve=32;function mr(i,e,t,{location:s=D.location,distance:r=D.distance,threshold:o=D.threshold,findAllMatches:c=D.findAllMatches,minMatchCharLength:h=D.minMatchCharLength,includeMatches:u=D.includeMatches,ignoreLocation:d=D.ignoreLocation}={}){if(e.length>Ve)throw new Error(ar(Ve));const m=e.length,v=i.length,$=Math.max(0,Math.min(s,v));let M=o,P=$;const J=h>1||u,me=J?Array(v):[];let ae;for(;(ae=i.indexOf(e,P))>-1;){let X=$t(e,{currentLocation:ae,expectedLocation:$,distance:r,ignoreLocation:d});if(M=Math.min(X,M),P=ae+m,J){let ie=0;for(;ie<m;)me[ae+ie]=1,ie+=1}}P=-1;let be=[],ge=1,Ee=m+v;const $e=1<<m-1;for(let X=0;X<m;X+=1){let ie=0,z=Ee;for(;ie<z;)$t(e,{errors:X,currentLocation:$+z,expectedLocation:$,distance:r,ignoreLocation:d})<=M?ie=z:Ee=z,z=Math.floor((Ee-ie)/2+ie);Ee=z;let B=Math.max(1,$-z+1),Te=c?v:Math.min($+z,v)+m,ke=Array(Te+2);ke[Te+1]=(1<<X)-1;for(let y=Te;y>=B;y-=1){let b=y-1,k=t[i.charAt(b)];if(J&&(me[b]=+!!k),ke[y]=(ke[y+1]<<1|1)&k,X&&(ke[y]|=(be[y+1]|be[y])<<1|1|be[y+1]),ke[y]&$e&&(ge=$t(e,{errors:X,currentLocation:b,expectedLocation:$,distance:r,ignoreLocation:d}),ge<=M)){if(M=ge,P=b,P<=$)break;B=Math.max(1,2*$-P)}}if($t(e,{errors:X+1,currentLocation:$,expectedLocation:$,distance:r,ignoreLocation:d})>M)break;be=ke}const U={isMatch:P>=0,score:Math.max(.001,ge)};if(J){const X=vr(me,h);X.length?u&&(U.indices=X):U.isMatch=!1}return U}function yr(i){let e={};for(let t=0,s=i.length;t<s;t+=1){const r=i.charAt(t);e[r]=(e[r]||0)|1<<s-t-1}return e}class Qs{constructor(e,{location:t=D.location,threshold:s=D.threshold,distance:r=D.distance,includeMatches:o=D.includeMatches,findAllMatches:c=D.findAllMatches,minMatchCharLength:h=D.minMatchCharLength,isCaseSensitive:u=D.isCaseSensitive,ignoreLocation:d=D.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:r,includeMatches:o,findAllMatches:c,minMatchCharLength:h,isCaseSensitive:u,ignoreLocation:d},this.pattern=u?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const m=($,M)=>{this.chunks.push({pattern:$,alphabet:yr($),startIndex:M})},v=this.pattern.length;if(v>Ve){let $=0;const M=v%Ve,P=v-M;for(;$<P;)m(this.pattern.substr($,Ve),$),$+=Ve;if(M){const J=v-Ve;m(this.pattern.substr(J),J)}}else m(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:s}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let P={isMatch:!0,score:0};return s&&(P.indices=[[0,e.length-1]]),P}const{location:r,distance:o,threshold:c,findAllMatches:h,minMatchCharLength:u,ignoreLocation:d}=this.options;let m=[],v=0,$=!1;this.chunks.forEach(({pattern:P,alphabet:J,startIndex:me})=>{const{isMatch:ae,score:be,indices:ge}=mr(e,P,J,{location:r+me,distance:o,threshold:c,findAllMatches:h,minMatchCharLength:u,includeMatches:s,ignoreLocation:d});ae&&($=!0),v+=be,ae&&ge&&(m=[...m,...ge])});let M={isMatch:$,score:$?v/this.chunks.length:1};return $&&s&&(M.indices=m),M}}class He{constructor(e){this.pattern=e}static isMultiMatch(e){return ei(e,this.multiRegex)}static isSingleMatch(e){return ei(e,this.singleRegex)}search(){}}function ei(i,e){const t=i.match(e);return t?t[1]:null}class br extends He{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class $r extends He{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const s=e.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class _r extends He{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class xr extends He{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class wr extends He{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Ar extends He{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class ti extends He{constructor(e,{location:t=D.location,threshold:s=D.threshold,distance:r=D.distance,includeMatches:o=D.includeMatches,findAllMatches:c=D.findAllMatches,minMatchCharLength:h=D.minMatchCharLength,isCaseSensitive:u=D.isCaseSensitive,ignoreLocation:d=D.ignoreLocation}={}){super(e),this._bitapSearch=new Qs(e,{location:t,threshold:s,distance:r,includeMatches:o,findAllMatches:c,minMatchCharLength:h,isCaseSensitive:u,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class si extends He{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,s;const r=[],o=this.pattern.length;for(;(s=e.indexOf(this.pattern,t))>-1;)t=s+o,r.push([s,t-1]);const c=!!r.length;return{isMatch:c,score:c?0:1,indices:r}}}const Gt=[br,si,_r,xr,Ar,wr,$r,ti],ii=Gt.length,Mr=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Sr="|";function Er(i,e={}){return i.split(Sr).map(t=>{let s=t.trim().split(Mr).filter(o=>o&&!!o.trim()),r=[];for(let o=0,c=s.length;o<c;o+=1){const h=s[o];let u=!1,d=-1;for(;!u&&++d<ii;){const m=Gt[d];let v=m.isMultiMatch(h);v&&(r.push(new m(v,e)),u=!0)}if(!u)for(d=-1;++d<ii;){const m=Gt[d];let v=m.isSingleMatch(h);if(v){r.push(new m(v,e));break}}}return r})}const kr=new Set([ti.type,si.type]);class Or{constructor(e,{isCaseSensitive:t=D.isCaseSensitive,includeMatches:s=D.includeMatches,minMatchCharLength:r=D.minMatchCharLength,ignoreLocation:o=D.ignoreLocation,findAllMatches:c=D.findAllMatches,location:h=D.location,threshold:u=D.threshold,distance:d=D.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:s,minMatchCharLength:r,findAllMatches:c,ignoreLocation:o,location:h,threshold:u,distance:d},this.pattern=t?e:e.toLowerCase(),this.query=Er(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let o=0,c=[],h=0;for(let u=0,d=t.length;u<d;u+=1){const m=t[u];c.length=0,o=0;for(let v=0,$=m.length;v<$;v+=1){const M=m[v],{isMatch:P,indices:J,score:me}=M.search(e);if(P){if(o+=1,h+=me,s){const ae=M.constructor.type;kr.has(ae)?c=[...c,...J]:c.push(J)}}else{h=0,o=0,c.length=0;break}}if(o){let v={isMatch:!0,score:h/o};return s&&(v.indices=c),v}}return{isMatch:!1,score:1}}}const Jt=[];function Lr(...i){Jt.push(...i)}function Zt(i,e){for(let t=0,s=Jt.length;t<s;t+=1){let r=Jt[t];if(r.condition(i,e))return new r(i,e)}return new Qs(i,e)}const _t={AND:"$and",OR:"$or"},Qt={PATH:"$path",PATTERN:"$val"},es=i=>!!(i[_t.AND]||i[_t.OR]),Cr=i=>!!i[Qt.PATH],Dr=i=>!Ne(i)&&Ks(i)&&!es(i),ri=i=>({[_t.AND]:Object.keys(i).map(e=>({[e]:i[e]}))});function ni(i,e,{auto:t=!0}={}){const s=r=>{let o=Object.keys(r);const c=Cr(r);if(!c&&o.length>1&&!es(r))return s(ri(r));if(Dr(r)){const u=c?r[Qt.PATH]:o[0],d=c?r[Qt.PATTERN]:r[u];if(!De(d))throw new Error(lr(u));const m={keyId:qt(u),pattern:d};return t&&(m.searcher=Zt(d,e)),m}let h={children:[],operator:o[0]};return o.forEach(u=>{const d=r[u];Ne(d)&&d.forEach(m=>{h.children.push(s(m))})}),h};return es(i)||(i=ri(i)),s(i)}function Tr(i,{ignoreFieldNorm:e=D.ignoreFieldNorm}){i.forEach(t=>{let s=1;t.matches.forEach(({key:r,norm:o,score:c})=>{const h=r?r.weight:null;s*=Math.pow(c===0&&h?Number.EPSILON:c,(h||1)*(e?1:o))}),t.score=s})}function Rr(i,e){const t=i.matches;e.matches=[],Ae(t)&&t.forEach(s=>{if(!Ae(s.indices)||!s.indices.length)return;const{indices:r,value:o}=s;let c={indices:r,value:o};s.key&&(c.key=s.key.src),s.idx>-1&&(c.refIndex=s.idx),e.matches.push(c)})}function Pr(i,e){e.score=i.score}function Ir(i,e,{includeMatches:t=D.includeMatches,includeScore:s=D.includeScore}={}){const r=[];return t&&r.push(Rr),s&&r.push(Pr),i.map(o=>{const{idx:c}=o,h={item:e[c],refIndex:c};return r.length&&r.forEach(u=>{u(o,h)}),h})}class Ze{constructor(e,t={},s){this.options={...D,...t},this.options.useExtendedSearch,this._keyStore=new ur(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Xt))throw new Error(or);this._myIndex=t||Zs(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ae(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let s=0,r=this._docs.length;s<r;s+=1){const o=this._docs[s];e(o,s)&&(this.removeAt(s),s-=1,r-=1,t.push(o))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:s,includeScore:r,shouldSort:o,sortFn:c,ignoreFieldNorm:h}=this.options;let u=De(e)?De(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Tr(u,{ignoreFieldNorm:h}),o&&u.sort(c),Ys(t)&&t>-1&&(u=u.slice(0,t)),Ir(u,this._docs,{includeMatches:s,includeScore:r})}_searchStringList(e){const t=Zt(e,this.options),{records:s}=this._myIndex,r=[];return s.forEach(({v:o,i:c,n:h})=>{if(!Ae(o))return;const{isMatch:u,score:d,indices:m}=t.searchIn(o);u&&r.push({item:o,idx:c,matches:[{score:d,value:o,norm:h,indices:m}]})}),r}_searchLogical(e){const t=ni(e,this.options),s=(h,u,d)=>{if(!h.children){const{keyId:v,searcher:$}=h,M=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(u,v),searcher:$});return M&&M.length?[{idx:d,item:u,matches:M}]:[]}const m=[];for(let v=0,$=h.children.length;v<$;v+=1){const M=h.children[v],P=s(M,u,d);if(P.length)m.push(...P);else if(h.operator===_t.AND)return[]}return m},r=this._myIndex.records,o={},c=[];return r.forEach(({$:h,i:u})=>{if(Ae(h)){let d=s(t,h,u);d.length&&(o[u]||(o[u]={idx:u,item:h,matches:[]},c.push(o[u])),d.forEach(({matches:m})=>{o[u].matches.push(...m)}))}}),c}_searchObjectList(e){const t=Zt(e,this.options),{keys:s,records:r}=this._myIndex,o=[];return r.forEach(({$:c,i:h})=>{if(!Ae(c))return;let u=[];s.forEach((d,m)=>{u.push(...this._findMatches({key:d,value:c[m],searcher:t}))}),u.length&&o.push({idx:h,item:c,matches:u})}),o}_findMatches({key:e,value:t,searcher:s}){if(!Ae(t))return[];let r=[];if(Ne(t))t.forEach(({v:o,i:c,n:h})=>{if(!Ae(o))return;const{isMatch:u,score:d,indices:m}=s.searchIn(o);u&&r.push({score:d,key:e,value:o,idx:c,norm:h,indices:m})});else{const{v:o,n:c}=t,{isMatch:h,score:u,indices:d}=s.searchIn(o);h&&r.push({score:u,key:e,value:o,norm:c,indices:d})}return r}}Ze.version="6.6.2",Ze.createIndex=Zs,Ze.parseIndex=gr,Ze.config=D,Ze.parseQuery=ni,Lr(Or);var dt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oi(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Nr="Expected a function",li=0/0,jr="[object Symbol]",Hr=/^\s+|\s+$/g,Fr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Br=/^0o[0-7]+$/i,zr=parseInt,Wr=typeof dt=="object"&&dt&&dt.Object===Object&&dt,Vr=typeof self=="object"&&self&&self.Object===Object&&self,Yr=Wr||Vr||Function("return this")(),Kr=Object.prototype,qr=Kr.toString,Xr=Math.max,Gr=Math.min,ts=function(){return Yr.Date.now()};function Jr(i,e,t){var s,r,o,c,h,u,d=0,m=!1,v=!1,$=!0;if(typeof i!="function")throw new TypeError(Nr);e=ai(e)||0,ss(t)&&(m=!!t.leading,v="maxWait"in t,o=v?Xr(ai(t.maxWait)||0,e):o,$="trailing"in t?!!t.trailing:$);function M(U){var X=s,ie=r;return s=r=void 0,d=U,c=i.apply(ie,X),c}function P(U){return d=U,h=setTimeout(ae,e),m?M(U):c}function J(U){var X=U-u,ie=U-d,z=e-X;return v?Gr(z,o-ie):z}function me(U){var X=U-u,ie=U-d;return u===void 0||X>=e||X<0||v&&ie>=o}function ae(){var U=ts();if(me(U))return be(U);h=setTimeout(ae,J(U))}function be(U){return h=void 0,$&&s?M(U):(s=r=void 0,c)}function ge(){h!==void 0&&clearTimeout(h),d=0,s=u=r=h=void 0}function Ee(){return h===void 0?c:be(ts())}function $e(){var U=ts(),X=me(U);if(s=arguments,r=this,u=U,X){if(h===void 0)return P(u);if(v)return h=setTimeout(ae,e),M(u)}return h===void 0&&(h=setTimeout(ae,e)),c}return $e.cancel=ge,$e.flush=Ee,$e}function ss(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Zr(i){return!!i&&typeof i=="object"}function Qr(i){return typeof i=="symbol"||Zr(i)&&qr.call(i)==jr}function ai(i){if(typeof i=="number")return i;if(Qr(i))return li;if(ss(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=ss(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(Hr,"");var t=Ur.test(i);return t||Br.test(i)?zr(i.slice(2),t?2:8):Fr.test(i)?li:+i}var en=Jr;const tn=oi(en);(()=>{var i=Object.defineProperty,e=Math.pow,t=(n,a,f)=>a in n?i(n,a,{enumerable:!0,configurable:!0,writable:!0,value:f}):n[a]=f,s=(n,a,f)=>(t(n,typeof a!="symbol"?a+"":a,f),f),r=(n,a)=>` ${a&&a.length>0?a.map(f=>`<link rel="stylesheet" href="${f}" />`).join(""):""} <style> ${n} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,o=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",c="pointers-overlap",h="pointers-min-distance",u="pointers-max-distance",d="range-dragging",m="data",v="min",$="max",M="step",P="round",J="type",me="theme",ae="rtl",be="btt",ge="disabled",Ee="keyboard-disabled",$e="mousewheel-disabled",U="slider-width",X="slider-height",ie="slider-radius",z="slider-bg",B="slider-bg-hover",Te="slider-bg-fill",ke="pointer-width",T="pointer-height",y="pointer-radius",b="pointer-bg",k="pointer-bg-hover",_="pointer-bg-focus",I="pointer-shadow",R="pointer-shadow-hover",V="pointer-shadow-focus",se="pointer-border",Q="pointer-border-hover",he="pointer-border-focus",Oe="animate-onclick",Le="css-links",de="vertical",Me="horizontal",Re=(n,a,f,p,x)=>{let O=a-n;return O===0?f:(p-f)*(x-n)/O+f},ee=n=>!isNaN(parseFloat(n))&&isFinite(n),K=(n,a)=>ee(n)?Number(n):a,Qe=(n,a)=>a===0?0:Math.round(n/a)*a,et=(n,a=1/0)=>{if(a===1/0)return n;let f=e(10,a);return Math.round(n*f)/f},pe=n=>n==null?!1:typeof n=="boolean"?n:n.trim().toLowerCase()==="true",an=(n,a)=>{n.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:a}}))},cn=(n,a)=>{n.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:a}}))},hn=(n,a)=>{n.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:a}}))},un=(n,a)=>{n.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:a}}))},dn=(n,a)=>{if(!a||a.length<=0)return;let f=a.map(x=>ee(x)?K(x,x):x),p={values:f||[]};p.value=f[0],p.value0=f[0],p.value1=f[0];for(let x=1;x<f.length;x++)p[`value${x+1}`]=f[x];n.dispatchEvent(new CustomEvent("change",{detail:p}))},is=(n,a,f)=>{let p=0,x,O,N,w,A=!1,j=(C,G,ue,ce,re,ne)=>{let _e=p;ue!==void 0&&C>ue&&(C=ue),G!==void 0&&C<G&&(C=G),p=C;let xe=p;return(ce===de&&ne||ce===Me&&re)&&(xe=100-xe),ce===de?a.style.top=`${xe}%`:a.style.left=`${xe}%`,_e!==p},F=C=>C===a||a.contains(C),E=(C,G,ue,ce)=>{x=C,O=G,N=ue,w=ce},Y=C=>{A=C,a.classList.toggle("disabled",A),A?a.setAttribute("aria-disabled","true"):a.hasAttribute("aria-disabled")&&a.removeAttribute("aria-disabled")},Se=(C,G)=>{G==null?a.removeAttribute(C):a.setAttribute(C,G)},ve=C=>a.getAttribute(C),L=C=>{if(!A){switch(C.key){case"ArrowLeft":{C.preventDefault(),typeof x=="function"&&x(f);break}case"ArrowRight":{C.preventDefault(),typeof O=="function"&&O(f);break}case"ArrowUp":{C.preventDefault(),typeof N=="function"&&N(f);break}case"ArrowDown":{C.preventDefault(),typeof w=="function"&&w(f);break}}un(n,C)}},H=()=>{A||an(n,a)};return a.className=`pointer pointer-${f}`,a.addEventListener("keydown",L),a.addEventListener("click",H),{$pointer:a,get percent(){return p},get disabled(){return A},set disabled(C){Y(C)},updatePosition:j,isClicked:F,setCallbacks:E,setAttr:Se,getAttr:ve,destroy:()=>{a.removeEventListener("keydown",L),a.removeEventListener("click",H),a.remove()}}},pn=n=>{if(n==null)return;if(Array.isArray(n))return n;if(n.trim()==="")return;let a=n.split(","),f=[],p=!0;for(let x=0;x<a.length;x++){let O=a[x].trim();O!==""&&(f.push(O),ee(O)||(p=!1))}return p?f.map(x=>Number(x)):f},fn=(n,a)=>a?a.findIndex(f=>f===n||f.toString().trim()===n.toString().trim()):-1,gn=n=>({updatePosition:(a,f,p,x)=>{if(f.length<=0)return;let O=f.length===1,N=f[0],w=f[f.length-1];a===de?(n.style.removeProperty("width"),n.style.removeProperty("right"),n.style.removeProperty("left"),O?n.style.height=`${N}%`:n.style.height=`${Math.abs(N-w)}%`,x?(n.style.bottom="0%",O?n.style.top="auto":n.style.top=`${Math.min(100-w,100-N)}%`):(n.style.bottom="auto",O?n.style.top="0%":n.style.top=`${Math.min(N,w)}%`)):(n.style.removeProperty("height"),n.style.removeProperty("top"),n.style.removeProperty("bottom"),O?n.style.width=`${N}%`:n.style.width=`${Math.abs(N-w)}%`,p?(n.style.right="0%",O?n.style.left="auto":n.style.left=`${Math.min(100-w,100-N)}%`):(n.style.right="auto",O?n.style.left="0%":n.style.left=`${Math.min(N,w)}%`))}}),ui="--animate-onclick",vn="--width",mn="--height",yn="--panel-bg-border-radius",bn="--panel-bg",$n="--panel-bg-hover",_n="--panel-bg-fill",xn="--pointer-width",wn="--pointer-height",An="--pointer-border-radius",Mn="--pointer-bg",Sn="--pointer-bg-hover",En="--pointer-bg-focus",kn="--pointer-shadow",On="--pointer-shadow-hover",Ln="--pointer-shadow-focus",Cn="--pointer-border",Dn="--pointer-border-hover",Tn="--pointer-border-focus",wt=(n,a,f)=>{let p=new Map;for(let x of n.attributes){let O=x.nodeName.trim().toLowerCase();if(!a.test(O))continue;let N=O.replace(/\D/g,"").trim(),w=N===""||N==="0"||N==="1"?0:K(N,0)-1,A=f&&typeof f=="function"?f(x.value):x.value;p.set(w,A)}return p},Rn=n=>{if(!n)return null;let a=n.getAttribute(Le);if(!a)return null;let f=a.split(";"),p=[];for(let x of f)x.trim()!==""&&p.push(x.trim());return p},di=[[vn,U,"sliderWidth",null],[mn,X,"sliderHeight",null],[yn,ie,"sliderRadius",null],[bn,z,"sliderBg",null],[$n,B,"sliderBgHover",null],[_n,Te,"sliderBgFill",null],[xn,ke,"pointer#Width",/^pointer([0-9]*)-width$/],[wn,T,"pointer#Height",/^pointer([0-9]*)-height$/],[An,y,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Mn,b,"pointer#Bg",/^pointer([0-9]*)-bg$/],[Sn,k,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[En,_,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[kn,I,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[On,R,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Ln,V,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Cn,se,"pointer#Border",/^pointer([0-9]*)-border$/],[Dn,Q,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Tn,he,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Pn=(n,a,f)=>{let p=null,x=[],O=new Map,N=(L,H=a)=>{let C=[...H.classList];for(let G of C)G.startsWith(L)&&a.classList.remove(G)},w=()=>{N("shape");let L=a.querySelectorAll(".pointer");for(let H of L)N("shape",H)},A=L=>{p=L,N("theme-"),typeof L=="string"&&a.classList.add(`theme-${L}`)},j=()=>{if(w(),!(x.length<=0)){a.classList.add("shape",`shape-${x[0]}`);for(let L=1;L<x.length;L++){let H=x[L];if(!H)continue;let C=a.querySelector(`.pointer-${L}`);!C||C.classList.add("shape",`shape-${H}`)}}},F=(L,H)=>{x[L]=H,j()},E=()=>{w();let L=wt(n,/^pointer([0-9]*)-shape$/);if(!(L.size<=0)){for(let H of L){let C=H[0];x[C]=H[1]}j()}},Y=(L,H)=>`${L}-${H}`,Se=(L,H,C)=>{let G=f[C];if(!G)return;let ue=C===0?a:G.$pointer;if(H==null){O.has(Y(L,C))&&O.delete(Y(L,C)),ue.style.removeProperty(L);return}O.set(Y(L,C),H),ue.style.setProperty(L,H)},ve=(L,H)=>O.get(Y(L,H));return(()=>{for(let L of di){let[H,C,G,ue]=L;if(ue){let re=wt(n,ue);for(let ne of re){let _e=ne[0],xe=ne[1];Se(H,xe,_e)}}else{let re=n.getAttribute(C);Se(H,re,0)}let ce=[];if(G.indexOf("#")===-1)ce.push([G,0]);else{ce.push([G.replace("#",""),0]),ce.push([G.replace("#","0"),0]),ce.push([G.replace("#","1"),0]);for(let re=1;re<f.length;re++)ce.push([G.replace("#",(re+1).toString()),re])}for(let re of ce)try{let ne=re[0],_e=re[1];Object.prototype.hasOwnProperty.call(n,ne)||Object.defineProperty(n,ne,{get(){return ve(H,_e)},set:xe=>{Se(H,xe,_e)}})}catch(ne){console.error(ne)}}A(n.getAttribute(me)),E()})(),{setStyle:Se,getStyle:ve,get theme(){return p},set theme(L){A(L)},get pointerShapes(){return x},setPointerShape:F}},tt="animate-on-click",pi="range-dragging",In=(n,a,f,p)=>{let x=[],O=F=>{for(let E of x)E.update&&typeof E.update=="function"&&E.update(F)},N=()=>{for(let F of x)F.destroy&&typeof F.destroy=="function"&&F.destroy()},w=(F,E)=>{for(let Y of x)Y.onAttrChange&&typeof Y.onAttrChange=="function"&&Y.onAttrChange(F,E)},A=F=>{if(F.gettersAndSetters){for(let E of F.gettersAndSetters)if(!(!E.name||!E.attributes))try{Object.prototype.hasOwnProperty.call(n,E.name)||Object.defineProperty(n,E.name,E.attributes)}catch(Y){console.error("defineSettersGetters error:",Y)}}},j=F=>{var E;if(!F.css)return;let Y=(E=n.shadowRoot)==null?void 0:E.querySelector("style");!Y||(Y.innerHTML+=F.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let F of window.tcRangeSliderPlugins){let E=F();x.push(E),E.init&&typeof E.init=="function"&&(E.init(n,a,f,p),A(E),j(E))}},update:O,onAttrChange:w,destroy:N}},Nn=10,jn=(n,a)=>{let f=new Map,p=/^value([0-9]*)$/;for(let w of n.attributes){let A=w.nodeName.trim().toLowerCase();if(!p.test(A))continue;let j=A.replace("value","").trim(),F=j===""||j==="0"||j==="1"?0:K(j,0)-1,E=ee(w.value)?K(w.value,0):w.value;f.set(F,E)}let x=Math.max(...Array.from(f.keys())),O=[];O.push([is(n,a,0),f.get(0)]);let N=a;for(let w=1;w<=x;w++){let A=a.cloneNode(!0);N.after(A),N=A,O.push([is(n,A,w),f.get(w)])}return O},fi=(n,a,f,p,x,O,N)=>{try{Object.defineProperty(n,p,{configurable:!0,get(){if(!a)return;let w=a.pointers[f];if(!w)return;let A=a.getTextValue(w.percent);return ee(A)?K(A,A):A},set:w=>{a.pointers[f]?a==null||a.setValue(w,f):a==null||a.addPointer(w)}}),Object.defineProperty(n,x,{configurable:!0,get(){var w,A;return(A=(w=a==null?void 0:a.pointers[f])==null?void 0:w.getAttr("aria-label"))!=null?A:void 0},set:w=>{!a||a.setAriaLabel(f,w)}}),Object.defineProperty(n,O,{configurable:!0,get(){var w,A;return(A=(w=a==null?void 0:a.styles)==null?void 0:w.pointerShapes[f])!=null?A:null},set:w=>{!a||!a.styles||a.styles.setPointerShape(f,w)}}),Object.defineProperty(n,N,{configurable:!0,get(){var w;return(w=a==null?void 0:a.pointers[f].disabled)!=null?w:!1},set:w=>{if(!a)return;let A=a==null?void 0:a.pointers[f];!A||(A.disabled=w)}})}catch(w){console.error(w)}},Hn=(n,a)=>{let f=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let p=2;p<Nn;p++)f.push([`value${p}`,`ariaLabel${p}`,`pointer${p}Shape`,`pointer${p}Disabled`,p-1]);for(let p of f)fi(n,a,p[4],p[0],p[1],p[2],p[3])},gi=(n,a,f)=>{var p;let x=(p=f.shadowRoot)==null?void 0:p.querySelector(".container");if(x)for(let O of n)a?x.prepend(O.$pointer):x.append(O.$pointer)},rs=0,pt=100,st=2,vi="0.3s",Fn=(n,a,f)=>{let p=f.map(l=>l[0]),x=null,O=null,N=null,w=null,A=rs,j=pt,F,E,Y=Me,Se=st,ve=!1,L=!1,H=!1,C=0,G=1/0,ue=!1,ce,re,ne=!1,_e=!1,xe=!1,Fe=vi,mi=[],yi=l=>{ne||(l.preventDefault&&l.preventDefault(),Ke(l),window.addEventListener("mousemove",Ke),window.addEventListener("mouseup",At),cn(n,l))},At=l=>{ne||(ce=void 0,re=void 0,window.removeEventListener("mousemove",Ke),window.removeEventListener("mouseup",At),Fe&&a.classList.add(tt),hn(n,l))},zn=(l,g)=>{if(p.length<=0)return;if(p.length===1)return p[0].isClicked(l)&&Fe&&a.classList.remove(tt),p[0];let S=Vn(l);if(ue){let W=g,Ce=St(W);Ce!==void 0&&(W=Qe(W,Ce)),S?(ce=W,re=0,Fe&&a.classList.remove(tt)):ce!==void 0&&(re=W-ce,ce=W)}if(!Wn(l)&&!S){for(let W of p)if(!(!W.isClicked(l)||W.disabled))return Fe&&a.classList.remove(tt),W;for(let W of p)if(x===W)return W}let q=1/0,oe=null;for(let W of p){if(W.disabled)continue;let Ce=Math.abs(g-W.percent);Ce<q&&(q=Ce,oe=W)}return oe},bi=()=>p.findIndex(l=>x===l&&!l.disabled),Ke=l=>{let g;if(Y===de){let{height:q,top:oe}=a.getBoundingClientRect(),W=l.type.indexOf("mouse")!==-1?l.clientY:l.touches[0].clientY;g=Math.min(Math.max(0,W-oe),q)*100/q}else{let{width:q,left:oe}=a.getBoundingClientRect(),W=l.type.indexOf("mouse")!==-1?l.clientX:l.touches[0].clientX;g=Math.min(Math.max(0,W-oe),q)*100/q}if((ve||L)&&(g=100-g),x=zn(l.target,g),ue&&p.length>1&&re!==void 0){let q=p[0],oe=p[p.length-1],W=q.percent+re<0,Ce=oe.percent+re>100;if(W||Ce)return;for(let Rt=0;Rt<p.length;Rt++)we(Rt,p[Rt].percent+re);return}let S=bi();S!==-1&&(we(S,g),x==null||x.$pointer.focus())},Mt=l=>{if(ne||document.activeElement!==n||x!=null&&x.disabled)return;l.stopPropagation(),l.preventDefault();let g=l.deltaY<0,S=ve||L,q=g?!S:S,oe=bi();oe!==-1&&(q?ft(oe,p[oe].percent):gt(oe,p[oe].percent))},$i=l=>{ne||_e||(Y===de?L?we(l,100):we(l,0):ve?gt(l,p[l].percent):ft(l,p[l].percent))},_i=l=>{ne||_e||(Y===de?L?we(l,0):we(l,100):ve?ft(l,p[l].percent):gt(l,p[l].percent))},xi=l=>{ne||_e||(Y===de?L?gt(l,p[l].percent):ft(l,p[l].percent):ve?we(l,100):we(l,0))},wi=l=>{ne||_e||(Y===de?L?ft(l,p[l].percent):gt(l,p[l].percent):ve?we(l,0):we(l,100))},Wn=l=>l.classList.contains("panel"),Vn=l=>l.classList.contains("panel-fill"),ft=(l,g)=>{if(g===void 0)return;let S=St(g);S==null&&(S=1),g-=S,g<0&&(g=0),we(l,g)},gt=(l,g)=>{if(g===void 0)return;let S=St(g);S==null&&(S=1),g+=S,g>100&&(g=100),we(l,g)},qe=()=>{!w||w.update({percents:Ai(),values:Mi(),$pointers:Si(),min:Ei(),max:ki(),data:ls(),step:os(),round:cs(),type:as(),textMin:Et(),textMax:kt(),rightToLeft:ds(),bottomToTop:ps(),pointersOverlap:ms(),pointersMinDistance:hs(),pointersMaxDistance:us(),rangeDragging:ys(),disabled:fs(),keyboardDisabled:gs(),mousewheelDisabled:vs()})},Yn=()=>{qe()},Kn=l=>{if(!(H||p.length<=1||j===A))if(l===0){let g=G*100/(j-A);return Math.max(0,p[l+1].percent-g)}else{let g=C*100/(j-A);return Math.min(p[l-1].percent+g,100)}},qn=l=>{if(!(H||p.length<=1||j===A))if(l===p.length-1){let g=G*100/(j-A);return Math.min(p[l-1].percent+g,100)}else{let g=C*100/(j-A);return Math.max(0,p[l+1].percent-g)}},St=l=>{let g;if(typeof F=="function"){let S=Re(0,100,A,j,l);g=F(S,l)}else g=F;if(ee(g)){let S=j-A;return g=S===0?0:g*100/S,g}},it=l=>{if(l===void 0)return;let g=Re(0,100,A,j,l);return E!==void 0?E[Math.round(g)]:et(g,Se)},Et=()=>E!==void 0?E[A]:A,kt=()=>E!==void 0?E[j]:j,os=()=>F,Xn=l=>{var g;return l<=0||H?Et():(g=it(p[l-1].percent))!=null?g:""},Gn=l=>{var g;return p.length<=1||l>=p.length-1||H?kt():(g=it(p[l+1].percent))!=null?g:""},Ai=()=>p.map(l=>l.percent),Mi=()=>p.map(l=>it(l.percent)),Si=()=>p.map(l=>l.$pointer),Ei=()=>A,ki=()=>j,ls=()=>E,as=()=>Y,cs=()=>Se,hs=()=>C,us=()=>G,Jn=l=>mi[l],ds=()=>ve,ps=()=>L,fs=()=>ne,gs=()=>_e,vs=()=>xe,ms=()=>H,ys=()=>ue,we=(l,g)=>{if(g===void 0)return;let S=St(g);S!==void 0&&(g=Qe(g,S));let q=p[l];if(!q)return;let oe=q.updatePosition(g,Kn(l),qn(l),Y,ve,L);O==null||O.updatePosition(Y,p.map(W=>W.percent),ve,L),qe();for(let W of p){let Ce=it(W.percent);Ce!==void 0&&(W.setAttr("aria-valuenow",Ce.toString()),W.setAttr("aria-valuetext",Ce.toString()))}Qn(),oe&&dn(n,p.map(W=>it(W.percent)))},Pe=()=>{for(let l=0;l<p.length;l++)we(l,p[l].percent)},Zn=(l,g)=>{A=E!==void 0?0:K(l,rs),j=E!==void 0?E.length-1:K(g,pt),Ot(A),Lt(j)},Qn=()=>{var l,g;for(let S=0;S<p.length;S++){let q=p[S];q.setAttr("aria-valuemin",((l=Xn(S))!=null?l:"").toString()),q.setAttr("aria-valuemax",((g=Gn(S))!=null?g:"").toString())}},Ot=l=>{A=K(l,rs),A>j&&(j=A+pt),Pe()},Lt=l=>{j=K(l,pt),j<A&&(j=A+pt),Pe()},Oi=l=>{H=!0;for(let g=0;g<l.length;g++)Ct(l[g],g);H=!1;for(let g=0;g<l.length;g++)Ct(l[g],g)},Ct=(l,g)=>{let S;E!==void 0?(S=l==null?0:fn(l,E),S===-1&&(S=0)):(S=K(l,A),S<A&&(S=A),S>j&&(S=j));let q=Re(A,j,0,100,S);we(g,q)},Dt=l=>{if(l==null){F=void 0;return}if(typeof l=="function"){F=l,Pe();return}if(ee(l)){F=K(l,1);let g=Math.abs(j-A);F>g&&(F=void 0),Pe();return}F=void 0},bs=l=>{H=l,Pe()},$s=l=>{(!ee(l)||l<0)&&(l=0),C=l},_s=l=>{(!ee(l)||l<0)&&(l=1/0),G=l},xs=l=>{ne=l,a.classList.toggle("disabled",ne),ne?a.setAttribute("aria-disabled","true"):a.hasAttribute("aria-disabled")&&a.removeAttribute("aria-disabled")},Li=l=>{_e=l},Ci=l=>{xe=l,xe?document.removeEventListener("wheel",Mt):document.addEventListener("wheel",Mt,{passive:!1})},ws=l=>{if(l==null){E=void 0;return}if(E=pn(l),E===void 0||E.length<=0){E=void 0;return}Ot(0),Lt(E.length-1),F===void 0&&Dt(1)},As=l=>{var g;typeof l=="string"?Y=l.trim().toLowerCase()===de?de:Me:Y=Me;let S=(g=n.shadowRoot)==null?void 0:g.querySelector(".range-slider-box");if(!S)return;S.className=`range-slider-box type-${Y}`,Pe();let q=Y===de?"vertical":"horizontal";for(let oe of p)oe.setAttr("aria-orientation",q)},Ms=l=>{ve=l,p.length>1&&gi(p,ve,n),Pe(),qe()},Ss=l=>{L=l,p.length>1&&gi(p,L,n),Pe(),qe()},Es=l=>{Se=K(l,st),Se<0&&(Se=st),qe()},Di=l=>{l==null||l.toString().trim().toLowerCase()==="false"?(Fe=void 0,a.style.removeProperty(ui),a.classList.remove(tt)):(Fe=l.toString(),a.style.setProperty(ui,Fe),a.classList.add(tt))},Ti=(l,g)=>{let S=p[l];!S||(S.setAttr("aria-label",g),mi[l]=g)},Tt=l=>{if(ce=void 0,p.length<=1){ue=!1,a.classList.remove(pi);return}ue=l,a.classList.toggle(pi,ue)},eo=()=>{xs(pe(n.getAttribute(ge))),_e=pe(n.getAttribute(Ee)),xe=pe(n.getAttribute($e));let l=wt(n,/^pointer([0-9]*)-disabled$/,g=>pe(g));for(let g of l){let S=g[0];!p[S]||(p[S].disabled=g[1])}},to=()=>{let l=wt(n,/^aria-label([0-9]*)$/);for(let g of l){let S=g[0];Ti(S,g[1])}},so=l=>{let g=p.length,S=p[g-1].$pointer,q=S.cloneNode(!0);S.after(q);let oe=is(n,q,g);return oe.setCallbacks($i,_i,xi,wi),p.push(oe),Ct(l,g),Pe(),qe(),g},io=()=>{let l=p.length,g=p[l-1];return g?(g.destroy(),p.pop(),p.length<=1&&Tt(!1),Pe(),qe(),l-1):-1};return(()=>{var l,g;for(let q of p)q.setCallbacks($i,_i,xi,wi);let S=(l=n.shadowRoot)==null?void 0:l.querySelector(".panel-fill");S&&(O=gn(S)),As(n.getAttribute(J)),Ms(pe(n.getAttribute(ae))),Ss(pe(n.getAttribute(be))),Zn(n.getAttribute(v),n.getAttribute($)),Dt(n.getAttribute(M)),ws(n.getAttribute(m)),Oi(f.map(q=>q[1])),bs(pe(n.getAttribute(c))),$s(K(n.getAttribute(h),0)),_s(K(n.getAttribute(u),1/0)),Tt(pe(n.getAttribute(d))),Es(K(n.getAttribute(P),st)),eo(),to(),N=Pn(n,a,p),Di((g=n.getAttribute(Oe))!=null?g:vi),a.addEventListener("mousedown",yi),a.addEventListener("mouseup",At),a.addEventListener("touchmove",Ke),a.addEventListener("touchstart",Ke),xe||document.addEventListener("wheel",Mt,{passive:!1}),w=In(n,Yn,{setValues:Oi,setMin:Ot,setMax:Lt,setStep:Dt,setPointersOverlap:bs,setPointersMinDistance:$s,setPointersMaxDistance:_s,setDisabled:xs,setType:As,setRightToLeft:Ms,setBottomToTop:Ss,setRound:Es,setKeyboardDisabled:Li,setMousewheelDisabled:Ci,setRangeDragging:Tt,setData:ws},{getPercents:Ai,getValues:Mi,getPointerElements:Si,getMin:Ei,getMax:ki,getStep:os,getData:ls,getType:as,getRound:cs,getTextMin:Et,getTextMax:kt,isRightToLeft:ds,isBottomToTop:ps,isDisabled:fs,isKeyboardDisabled:gs,isMousewheelDisabled:vs,isPointersOverlap:ms,isRangeDraggingEnabled:ys,getPointersMinDistance:hs,getPointersMaxDistance:us}),w.init()})(),{get pointers(){return p},get styles(){return N},get pluginsManager(){return w},get min(){return Et()},get max(){return kt()},get step(){return os()},get pointersOverlap(){return ms()},set pointersOverlap(l){bs(l)},get pointersMinDistance(){return hs()},set pointersMinDistance(l){$s(l)},get pointersMaxDistance(){return us()},set pointersMaxDistance(l){_s(l)},get disabled(){return fs()},set disabled(l){xs(l)},get data(){return ls()},get type(){return as()},set type(l){As(l)},get rightToLeft(){return ds()},set rightToLeft(l){Ms(l)},get bottomToTop(){return ps()},set bottomToTop(l){Ss(l)},get round(){return cs()},set round(l){Es(l)},get animateOnClick(){return Fe},set animateOnClick(l){Di(l)},get keyboardDisabled(){return gs()},set keyboardDisabled(l){Li(l)},get mousewheelDisabled(){return vs()},set mousewheelDisabled(l){Ci(l)},get rangeDragging(){return ys()},set rangeDragging(l){Tt(l)},setMin:Ot,setMax:Lt,setValue:Ct,setStep:Dt,setData:ws,getTextValue:it,setAriaLabel:Ti,getAriaLabel:Jn,addPointer:so,removePointer:io,destroy:()=>{a.removeEventListener("mousedown",yi),a.removeEventListener("mouseup",At),a.removeEventListener("touchmove",Ke),a.removeEventListener("touchstart",Ke),document.removeEventListener("wheel",Mt);for(let l of p)l.destroy();w==null||w.destroy()}}},Un=(n,a,f)=>{let p=di.find(([w,A,j,F])=>A.replace("#","")===a.replace(/\d+/g,""));if(p&&n.styles){let[w,A,j,F]=p,E=a.replace(/\D/g,"").trim(),Y=E===""||E==="0"||E==="1"?0:K(E,0)-1;n.styles.setStyle(w,f,Y);return}switch(n&&n.pluginsManager&&n.pluginsManager.onAttrChange(a,f),a){case v:{n.setMin(f);break}case $:{n.setMax(f);break}case M:{n.setStep(f);break}case c:{n.pointersOverlap=pe(f);break}case h:{n.pointersMinDistance=K(f,0);break}case d:{n.rangeDragging=pe(f);break}case u:{n.pointersMaxDistance=K(f,1/0);break}case ge:{n.disabled=pe(f);break}case Ee:{n.keyboardDisabled=pe(f);break}case $e:{n.mousewheelDisabled=pe(f);break}case m:{n.setData(f);break}case J:{n.type=f;break}case ae:{n.rightToLeft=pe(f);break}case be:{n.bottomToTop=pe(f);break}case P:{n.round=K(f,st);break}case me:{n.styles&&(n.styles.theme=f);break}case Oe:{n.animateOnClick=f;break}}let x=null;if(/^value([0-9]*)$/.test(a)&&(x="value"),/^pointer([0-9]*)-disabled$/.test(a)&&(x="pointer-disabled"),/^aria-label([0-9]*)$/.test(a)&&(x="aria-label"),/^pointer([0-9]*)-shape$/.test(a)&&(x="pointer-shape"),!x)return;let O=a.replace(/\D/g,"").trim(),N=O===""||O==="0"||O==="1"?0:K(O,0)-1;switch(x){case"value":{n.setValue(f,N);break}case"pointer-disabled":{let w=n==null?void 0:n.pointers[N];if(!w)return;w.disabled=pe(f);break}case"aria-label":{n.setAriaLabel(N,f);break}case"pointer-shape":{n.styles&&n.styles.setPointerShape(N,f);break}}},Bn=class extends HTMLElement{constructor(){super(),s(this,"slider"),s(this,"_externalCSSList",[]),s(this,"_observer",null),this.attachShadow({mode:"open"})}set step(n){this.slider&&this.slider.setStep(n)}get step(){var n;return(n=this.slider)==null?void 0:n.step}set disabled(n){this.slider&&(this.slider.disabled=n)}get disabled(){var n,a;return(a=(n=this.slider)==null?void 0:n.disabled)!=null?a:!1}set data(n){var a;(a=this.slider)==null||a.setData(n)}get data(){var n;return(n=this.slider)==null?void 0:n.data}set min(n){var a;(a=this.slider)==null||a.setMin(n)}get min(){var n;return(n=this.slider)==null?void 0:n.min}set max(n){var a;(a=this.slider)==null||a.setMax(n)}get max(){var n;return(n=this.slider)==null?void 0:n.max}set round(n){!this.slider||(this.slider.round=n)}get round(){var n,a;return(a=(n=this.slider)==null?void 0:n.round)!=null?a:st}set type(n){!this.slider||(this.slider.type=n??Me)}get type(){var n;return((n=this.slider)==null?void 0:n.type)||Me}set pointersOverlap(n){!this.slider||(this.slider.pointersOverlap=n)}get pointersOverlap(){var n,a;return(a=(n=this.slider)==null?void 0:n.pointersOverlap)!=null?a:!1}set pointersMinDistance(n){!this.slider||(this.slider.pointersMinDistance=n)}get pointersMinDistance(){var n,a;return(a=(n=this.slider)==null?void 0:n.pointersMinDistance)!=null?a:0}set pointersMaxDistance(n){!this.slider||(this.slider.pointersMaxDistance=n)}get pointersMaxDistance(){var n,a;return(a=(n=this.slider)==null?void 0:n.pointersMaxDistance)!=null?a:1/0}set theme(n){!this.slider||!this.slider.styles||(this.slider.styles.theme=n)}get theme(){var n,a,f;return(f=(a=(n=this.slider)==null?void 0:n.styles)==null?void 0:a.theme)!=null?f:null}set rtl(n){!this.slider||(this.slider.rightToLeft=n)}get rtl(){var n,a;return(a=(n=this.slider)==null?void 0:n.rightToLeft)!=null?a:!1}set btt(n){!this.slider||(this.slider.bottomToTop=n)}get btt(){var n,a;return(a=(n=this.slider)==null?void 0:n.bottomToTop)!=null?a:!1}set keyboardDisabled(n){!this.slider||(this.slider.keyboardDisabled=n)}get keyboardDisabled(){var n,a;return(a=(n=this.slider)==null?void 0:n.keyboardDisabled)!=null?a:!1}set mousewheelDisabled(n){!this.slider||(this.slider.mousewheelDisabled=n)}get mousewheelDisabled(){var n,a;return(a=(n=this.slider)==null?void 0:n.mousewheelDisabled)!=null?a:!1}set animateOnClick(n){!this.slider||(this.slider.animateOnClick=n)}get animateOnClick(){var n;return(n=this.slider)==null?void 0:n.animateOnClick}get rangeDragging(){var n,a;return(a=(n=this.slider)==null?void 0:n.rangeDragging)!=null?a:!1}set rangeDragging(n){this.slider&&(this.slider.rangeDragging=pe(n))}get externalCSSList(){return this._externalCSSList}addPointer(n){var a;if(!this.slider)return;let f=(a=this.slider)==null?void 0:a.addPointer(n);fi(this,this.slider,f,`value${f+1}`,`ariaLabel${f+1}`,`pointerShape${f+1}`,`pointer${f+1}Disabled`)}removePointer(){var n;!this.slider||(n=this.slider)==null||n.removePointer()}addCSS(n){if(!this.shadowRoot)return;let a=document.createElement("style");a.textContent=n,this.shadowRoot.appendChild(a)}connectedCallback(){var n,a;if(!this.shadowRoot)return;this._externalCSSList=Rn(this),this.shadowRoot.innerHTML=r(o,this._externalCSSList);let f=(n=this.shadowRoot)==null?void 0:n.querySelector(".pointer");if(!f)return;let p=(a=this.shadowRoot)==null?void 0:a.getElementById("range-slider");if(!p)return;let x=jn(this,f);this.slider=Fn(this,p,x),Hn(this,this.slider),this._observer=new MutationObserver(O=>{O.forEach(N=>{var w;if(!this.slider||N.type!=="attributes")return;let A=N.attributeName;!A||Un(this.slider,A,(w=this.getAttribute(A))!=null?w:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},ns=Bn;window.tcRangeSlider=ns,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",ns),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends ns{})})();var ci={exports:{}};(function(i,e){(function(t,s){i.exports=s()})(dt,function(){var t=1e3,s=6e4,r=36e5,o="millisecond",c="second",h="minute",u="hour",d="day",m="week",v="month",$="quarter",M="year",P="date",J="Invalid Date",me=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ae=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,be={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var y=["th","st","nd","rd"],b=T%100;return"["+T+(y[(b-20)%10]||y[b]||y[0])+"]"}},ge=function(T,y,b){var k=String(T);return!k||k.length>=y?T:""+Array(y+1-k.length).join(b)+T},Ee={s:ge,z:function(T){var y=-T.utcOffset(),b=Math.abs(y),k=Math.floor(b/60),_=b%60;return(y<=0?"+":"-")+ge(k,2,"0")+":"+ge(_,2,"0")},m:function T(y,b){if(y.date()<b.date())return-T(b,y);var k=12*(b.year()-y.year())+(b.month()-y.month()),_=y.clone().add(k,v),I=b-_<0,R=y.clone().add(k+(I?-1:1),v);return+(-(k+(b-_)/(I?_-R:R-_))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:v,y:M,w:m,d,D:P,h:u,m:h,s:c,ms:o,Q:$}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},$e="en",U={};U[$e]=be;var X=function(T){return T instanceof Te},ie=function T(y,b,k){var _;if(!y)return $e;if(typeof y=="string"){var I=y.toLowerCase();U[I]&&(_=I),b&&(U[I]=b,_=I);var R=y.split("-");if(!_&&R.length>1)return T(R[0])}else{var V=y.name;U[V]=y,_=V}return!k&&_&&($e=_),_||!k&&$e},z=function(T,y){if(X(T))return T.clone();var b=typeof y=="object"?y:{};return b.date=T,b.args=arguments,new Te(b)},B=Ee;B.l=ie,B.i=X,B.w=function(T,y){return z(T,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var Te=function(){function T(b){this.$L=ie(b.locale,null,!0),this.parse(b)}var y=T.prototype;return y.parse=function(b){this.$d=function(k){var _=k.date,I=k.utc;if(_===null)return new Date(NaN);if(B.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(me);if(R){var V=R[2]-1||0,se=(R[7]||"0").substring(0,3);return I?new Date(Date.UTC(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,se)):new Date(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,se)}}return new Date(_)}(b),this.$x=b.x||{},this.init()},y.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},y.$utils=function(){return B},y.isValid=function(){return this.$d.toString()!==J},y.isSame=function(b,k){var _=z(b);return this.startOf(k)<=_&&_<=this.endOf(k)},y.isAfter=function(b,k){return z(b)<this.startOf(k)},y.isBefore=function(b,k){return this.endOf(k)<z(b)},y.$g=function(b,k,_){return B.u(b)?this[k]:this.set(_,b)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(b,k){var _=this,I=!!B.u(k)||k,R=B.p(b),V=function(Re,ee){var K=B.w(_.$u?Date.UTC(_.$y,ee,Re):new Date(_.$y,ee,Re),_);return I?K:K.endOf(d)},se=function(Re,ee){return B.w(_.toDate()[Re].apply(_.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(ee)),_)},Q=this.$W,he=this.$M,Oe=this.$D,Le="set"+(this.$u?"UTC":"");switch(R){case M:return I?V(1,0):V(31,11);case v:return I?V(1,he):V(0,he+1);case m:var de=this.$locale().weekStart||0,Me=(Q<de?Q+7:Q)-de;return V(I?Oe-Me:Oe+(6-Me),he);case d:case P:return se(Le+"Hours",0);case u:return se(Le+"Minutes",1);case h:return se(Le+"Seconds",2);case c:return se(Le+"Milliseconds",3);default:return this.clone()}},y.endOf=function(b){return this.startOf(b,!1)},y.$set=function(b,k){var _,I=B.p(b),R="set"+(this.$u?"UTC":""),V=(_={},_[d]=R+"Date",_[P]=R+"Date",_[v]=R+"Month",_[M]=R+"FullYear",_[u]=R+"Hours",_[h]=R+"Minutes",_[c]=R+"Seconds",_[o]=R+"Milliseconds",_)[I],se=I===d?this.$D+(k-this.$W):k;if(I===v||I===M){var Q=this.clone().set(P,1);Q.$d[V](se),Q.init(),this.$d=Q.set(P,Math.min(this.$D,Q.daysInMonth())).$d}else V&&this.$d[V](se);return this.init(),this},y.set=function(b,k){return this.clone().$set(b,k)},y.get=function(b){return this[B.p(b)]()},y.add=function(b,k){var _,I=this;b=Number(b);var R=B.p(k),V=function(he){var Oe=z(I);return B.w(Oe.date(Oe.date()+Math.round(he*b)),I)};if(R===v)return this.set(v,this.$M+b);if(R===M)return this.set(M,this.$y+b);if(R===d)return V(1);if(R===m)return V(7);var se=(_={},_[h]=s,_[u]=r,_[c]=t,_)[R]||1,Q=this.$d.getTime()+b*se;return B.w(Q,this)},y.subtract=function(b,k){return this.add(-1*b,k)},y.format=function(b){var k=this,_=this.$locale();if(!this.isValid())return _.invalidDate||J;var I=b||"YYYY-MM-DDTHH:mm:ssZ",R=B.z(this),V=this.$H,se=this.$m,Q=this.$M,he=_.weekdays,Oe=_.months,Le=function(ee,K,Qe,et){return ee&&(ee[K]||ee(k,I))||Qe[K].slice(0,et)},de=function(ee){return B.s(V%12||12,ee,"0")},Me=_.meridiem||function(ee,K,Qe){var et=ee<12?"AM":"PM";return Qe?et.toLowerCase():et},Re={YY:String(this.$y).slice(-2),YYYY:B.s(this.$y,4,"0"),M:Q+1,MM:B.s(Q+1,2,"0"),MMM:Le(_.monthsShort,Q,Oe,3),MMMM:Le(Oe,Q),D:this.$D,DD:B.s(this.$D,2,"0"),d:String(this.$W),dd:Le(_.weekdaysMin,this.$W,he,2),ddd:Le(_.weekdaysShort,this.$W,he,3),dddd:he[this.$W],H:String(V),HH:B.s(V,2,"0"),h:de(1),hh:de(2),a:Me(V,se,!0),A:Me(V,se,!1),m:String(se),mm:B.s(se,2,"0"),s:String(this.$s),ss:B.s(this.$s,2,"0"),SSS:B.s(this.$ms,3,"0"),Z:R};return I.replace(ae,function(ee,K){return K||Re[ee]||R.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(b,k,_){var I,R=B.p(k),V=z(b),se=(V.utcOffset()-this.utcOffset())*s,Q=this-V,he=B.m(this,V);return he=(I={},I[M]=he/12,I[v]=he,I[$]=he/3,I[m]=(Q-se)/6048e5,I[d]=(Q-se)/864e5,I[u]=Q/r,I[h]=Q/s,I[c]=Q/t,I)[R]||Q,_?he:B.a(he)},y.daysInMonth=function(){return this.endOf(v).$D},y.$locale=function(){return U[this.$L]},y.locale=function(b,k){if(!b)return this.$L;var _=this.clone(),I=ie(b,k,!0);return I&&(_.$L=I),_},y.clone=function(){return B.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},T}(),ke=Te.prototype;return z.prototype=ke,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",v],["$y",M],["$D",P]].forEach(function(T){ke[T[1]]=function(y){return this.$g(y,T[0],T[1])}}),z.extend=function(T,y){return T.$i||(T(y,Te,z),T.$i=!0),z},z.locale=ie,z.isDayjs=X,z.unix=function(T){return z(1e3*T)},z.en=U[$e],z.Ls=U,z.p={},z})})(ci);var sn=ci.exports;const xt=oi(sn),rn=(i,e="highlight",t="title")=>{const s=(o,c,h)=>{const u=c.split(".");let d;for(d=0;d<u.length-1;d++)o=o[u[d]];o[u[d]]=h},r=(o,c=[])=>{let h="",u=0;return c.forEach(d=>{const m=d[1]+1;h+=[o.substring(u,d[0]),`<mark class="${e}">`,o.substring(d[0],m),"</mark>"].join(""),u=m}),h+=o.substring(u),h};return i.filter(({matches:o})=>o&&o.length).map(({item:o,matches:c})=>{const h={...o};return c.forEach(u=>{u.key===t&&s(h,u.key,r(u.value,u.indices))}),h})},nn=`
|
|
52
52
|
:host {
|
|
53
53
|
display: flex;
|
|
54
54
|
box-sizing: border-box;
|
|
@@ -192,12 +192,12 @@ section.inline details.details-filter summary {
|
|
|
192
192
|
overflow-x: hidden;
|
|
193
193
|
overflow-y: auto;
|
|
194
194
|
}
|
|
195
|
-
`;var
|
|
195
|
+
`;var on=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,Ye=(i,e,t,s)=>{for(var r=s>1?void 0:s?ln(e,t):e,o=i.length-1,c;o>=0;o--)(c=i[o])&&(r=(s?c(e,t,r):c(r))||r);return s&&r&&on(e,t,r),r};class hi{constructor(){te(this,"aggregateResults");te(this,"enableHighlighting",!1);te(this,"enableSearch",!1);te(this,"exclusiveFilters",!1);te(this,"externalSearch");te(this,"filterProperties",[]);te(this,"fuseConfig",{keys:["title"]});te(this,"inlineMode",!1);te(this,"matchAllWhenEmpty",!0);te(this,"onSearch",()=>{});te(this,"onSelect",()=>{});te(this,"showResults",!0);te(this,"titleProperty","title")}}le.EOxItemFilter=class extends ct{constructor(){super(...arguments);te(this,"_fuse");te(this,"_resultAggregation",[]);te(this,"_items",[]);te(this,"_results");te(this,"_filters",{});te(this,"_selectedResult");te(this,"_config",new hi);te(this,"apply",t=>{this._items=t.map((s,r)=>({id:`item-${r}`,...s})),this._fuse=new Ze(this._items,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...this._config.fuseConfig}),this._config.filterProperties.length&&this._config.filterProperties.forEach(s=>{const r={},o=c=>s.format==="date"?xt(c).unix():parseInt(c);this._items.forEach(c=>{if(s.type==="range"){if(Array.isArray(c[s.key])){const h=[o(c[s.key][0]),o(c[s.key][1])];r.min=r.min!==void 0?Math.min(r.min,h[0]):h[0],r.max=r.max!==void 0?Math.max(r.max,h[1]):h[1]}else{const h=o(c[s.key]);r.min=r.min!==void 0?Math.min(r.min,h):h,r.max=r.max!==void 0?Math.max(r.max,h):h}return}Array.isArray(c[s.key])?c[s.key].forEach(h=>{r[h]=void 0}):r[c[s.key]]=void 0}),this._filters[s.key]={type:s.type||"string",keys:r,...s.type==="range"&&{min:r.min,max:r.max,format:s.format}}}),this._config.matchAllWhenEmpty!==!1&&(this._results=this.sortResults(this._items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((s,r)=>s.concat(r[this._config.aggregateResults]),[]))].sort((s,r)=>s.localeCompare(r)))});te(this,"inputHandler",()=>{this.search(this.renderRoot.querySelector("input[type='text']").value)});te(this,"debouncedInputHandler",tn(this.inputHandler,500,{leading:!0}))}set config(t){const s=this._config;this._config={...new hi,...t},this.requestUpdate("config",s)}get config(){return this._config}async search(t="",s=this._filters){const r=Object.entries(s).filter(([h,u])=>u.type==="string").reduce((h,[u,d])=>{const m="$or",v=[],$=M=>{const P={};P[u]=`="${M}"`,v.push(P)};return Object.entries(d.keys).filter(([M,P])=>P).forEach(([M,P])=>$(M)),v.length>0&&h.push({[m]:v}),h},[]);let o;if(!(t.length>0)&&!r.length&&this._config.matchAllWhenEmpty!==!1)o=this._items;else if(this.config.externalSearch)o=(await(await fetch(`${this.config.externalSearch(t,s)}`)).json()).features;else{const h={$and:[...t.length>0?[{$or:[...this._config.fuseConfig.keys.map(d=>({[d]:t}))]}]:[],...r]},u=this._fuse.search(h);o=this._config.enableHighlighting?rn(u,"highlight",this._config.titleProperty):u.map(d=>d.item)}const c=Object.entries(this._filters).filter(([h,u])=>u.type==="range").reduce((h,[u,d])=>(h[u]={min:d.keys.min,max:d.keys.max,format:d.format},h),{});if(Object.keys(c).length>0){const h=[];for(let u=0;u<o.length;u++){const d={};for(let[m,v]of Object.entries(c)){const $=M=>v.format==="date"?xt(M).unix():M;o[u].hasOwnProperty(m)?Array.isArray(o[u][m])?d[m]=c[m].min<=$(o[u][m][1])&&$(o[u][m][0])<=c[m].max:$(o[u][m])>=c[m].min&&$(o[u][m])<=c[m].max?d[m]=!0:d[m]=!1:d[m]=!0}Object.values(d).every(m=>!!m)&&h.push(o[u])}o=[...h]}this._results=this.sortResults(o),this._config.onSearch(o),this.requestUpdate()}aggregateResults(t,s){return t.filter(r=>{const o=r[this._config.aggregateResults],c=Object.keys(this._filters[this._config.aggregateResults]).filter(u=>this._filters[this._config.aggregateResults].keys[u]);return(c.length?c.includes(s):!0)&&Array.isArray(o)?o.includes(s):o===s})}sortResults(t){return[...t].sort((s,r)=>s[this._config.titleProperty].localeCompare(r[this._config.titleProperty]))}toggleFilter(t,s,r){r&&Object.keys(this._filters).filter(h=>this._filters[h].type==="string").forEach(h=>{this._config.filterProperties.find(u=>u.key===h).exclusive&&Object.keys(this._filters[h].keys).forEach(u=>{this._filters[h].keys[u]=!1})}),this._filters[t].keys[s]=!this._filters[t].keys[s];const o=this.renderRoot.querySelector('input[type="text"]');o?this.search(o.value):this.search();const c=this.renderRoot.querySelectorAll("ul#results input[type='radio']");for(let h=0;h<c.length;h++)c[h].checked=!1;this._selectedResult&&setTimeout(()=>{const h=this.renderRoot.querySelector(`#${this._selectedResult.id}`);h&&(h.checked=!0,this.requestUpdate())})}resetFilters(){this.renderRoot.querySelectorAll(".details-filter input").forEach(s=>{s.checked=!1});const t=this.renderRoot.querySelector('input[type="text"]');t&&(t.value=""),Object.keys(this._filters).forEach(s=>{if(this._filters[s].type==="range"){this._filters[s].keys.min=this._filters[s].min,this._filters[s].keys.max=this._filters[s].max;return}Object.keys(this._filters[s].keys).forEach(r=>{this._filters[s].keys[r]=!1})}),this.search(),this.requestUpdate()}render(){return ye`
|
|
196
196
|
<style>
|
|
197
|
-
${
|
|
197
|
+
${nn}
|
|
198
198
|
</style>
|
|
199
|
-
<form @submit="${
|
|
200
|
-
${
|
|
199
|
+
<form @submit="${t=>t.preventDefault()}">
|
|
200
|
+
${ht(this._config.enableSearch,()=>ye`
|
|
201
201
|
<section>
|
|
202
202
|
<input
|
|
203
203
|
type="text"
|
|
@@ -208,24 +208,24 @@ section.inline details.details-filter summary {
|
|
|
208
208
|
/>
|
|
209
209
|
</section>
|
|
210
210
|
`)}
|
|
211
|
-
${
|
|
212
|
-
<section class="${this.config.inlineMode?"inline":
|
|
213
|
-
${
|
|
211
|
+
${ht(this._config.filterProperties.length,()=>ye`
|
|
212
|
+
<section class="${this.config.inlineMode?"inline":Z}">
|
|
213
|
+
${ht(!this.config.inlineMode,()=>ye` <slot name="filterstitle"></slot> `)}
|
|
214
214
|
<ul id="filters">
|
|
215
|
-
${
|
|
215
|
+
${ut(this._config.filterProperties,t=>ye`
|
|
216
216
|
<details
|
|
217
217
|
class="details-filter"
|
|
218
218
|
part="details-filter"
|
|
219
|
-
data-filter="${
|
|
219
|
+
data-filter="${t.key}"
|
|
220
220
|
>
|
|
221
221
|
<summary>
|
|
222
222
|
<small>
|
|
223
223
|
<strong
|
|
224
224
|
class="title"
|
|
225
|
-
style="${!
|
|
225
|
+
style="${!t.title&&"text-transform: capitalize"}"
|
|
226
226
|
>
|
|
227
|
-
${
|
|
228
|
-
${Object.values(this._filters[
|
|
227
|
+
${t.title||t.key}
|
|
228
|
+
${t.type==="string"&&Object.values(this._filters[t.key].keys).filter(s=>s).length?`(${Object.values(this._filters[t.key].keys).filter(s=>s).length})`:Z}
|
|
229
229
|
</strong>
|
|
230
230
|
</small>
|
|
231
231
|
<div
|
|
@@ -244,26 +244,44 @@ section.inline details.details-filter summary {
|
|
|
244
244
|
</div>
|
|
245
245
|
</summary>
|
|
246
246
|
<div class="scroll" style="max-height: 150px">
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
247
|
+
${t.type==="range"?ye`
|
|
248
|
+
<div>
|
|
249
|
+
${t.format==="date"?xt.unix(this._filters[t.key].keys.min):this._filters[t.key].keys.min}
|
|
250
|
+
</div>
|
|
251
|
+
<tc-range-slider
|
|
252
|
+
min="${this._filters[t.key].min}"
|
|
253
|
+
max="${this._filters[t.key].max}"
|
|
254
|
+
value1="${this._filters[t.key].keys.min}"
|
|
255
|
+
value2="${this._filters[t.key].keys.max}"
|
|
256
|
+
step="1"
|
|
257
|
+
style="margin: 5px"
|
|
258
|
+
@change="${s=>{[this._filters[t.key].keys.min,this._filters[t.key].keys.max]=s.detail.values,this.search(this.renderRoot.querySelector("input[type='text']").value)}}"
|
|
259
|
+
></tc-range-slider>
|
|
260
|
+
<div>
|
|
261
|
+
${t.format==="date"?xt.unix(this._filters[t.key].keys.max):this._filters[t.key].keys.max}
|
|
262
|
+
</div>
|
|
263
|
+
`:ye`
|
|
264
|
+
<ul>
|
|
265
|
+
${this._filters[t.key]?ut(Object.keys(this._filters[t.key].keys).sort((s,r)=>s.localeCompare(r)),s=>ye`
|
|
266
|
+
<li>
|
|
267
|
+
<label>
|
|
268
|
+
<input
|
|
269
|
+
name="selection"
|
|
270
|
+
type="${t.exclusive?"radio":"checkbox"}"
|
|
271
|
+
checked="${this._filters[t.key].keys[s]||Z}"
|
|
272
|
+
@click=${()=>this.toggleFilter(t.key,s,t.exclusive)}
|
|
273
|
+
/>
|
|
274
|
+
<span class="title">${s}</span>
|
|
275
|
+
</label>
|
|
276
|
+
</li>
|
|
277
|
+
`):null}
|
|
278
|
+
</ul>
|
|
279
|
+
`}
|
|
262
280
|
</div>
|
|
263
281
|
</details>
|
|
264
282
|
`)}
|
|
265
283
|
</ul>
|
|
266
|
-
${
|
|
284
|
+
${ht(this._config.filterProperties,()=>ye`
|
|
267
285
|
<a
|
|
268
286
|
id="filter-reset"
|
|
269
287
|
data-cy="filter-reset"
|
|
@@ -273,15 +291,15 @@ section.inline details.details-filter summary {
|
|
|
273
291
|
`)}
|
|
274
292
|
</section>
|
|
275
293
|
`)}
|
|
276
|
-
${
|
|
294
|
+
${ht(this.config.showResults&&this._results,()=>ye`
|
|
277
295
|
<section id="section-results">
|
|
278
296
|
<div>
|
|
279
297
|
<slot name="resultstitle"></slot>
|
|
280
298
|
</div>
|
|
281
299
|
<div id="container-results" class="scroll">
|
|
282
|
-
${this._results.length<1?
|
|
300
|
+
${this._results.length<1?ye` <small class="no-results">No matching items</small> `:Z}
|
|
283
301
|
<ul id="results" part="results">
|
|
284
|
-
${this._config.aggregateResults?
|
|
302
|
+
${this._config.aggregateResults?ut(this._resultAggregation.filter(t=>this.aggregateResults(this._results,t).length),t=>ye`<details
|
|
285
303
|
id="details-results"
|
|
286
304
|
open
|
|
287
305
|
>
|
|
@@ -296,14 +314,14 @@ section.inline details.details-filter summary {
|
|
|
296
314
|
/>
|
|
297
315
|
</svg>
|
|
298
316
|
<strong class="title">
|
|
299
|
-
${
|
|
317
|
+
${t}
|
|
300
318
|
</strong>
|
|
301
319
|
<span style="margin-left: 0.25rem"
|
|
302
|
-
>(${this.aggregateResults(this._results,
|
|
320
|
+
>(${this.aggregateResults(this._results,t).length})</span
|
|
303
321
|
>
|
|
304
322
|
</summary>
|
|
305
323
|
<ul>
|
|
306
|
-
${
|
|
324
|
+
${ut(this.aggregateResults(this._results,t),s=>ye`
|
|
307
325
|
<li>
|
|
308
326
|
<label>
|
|
309
327
|
<input
|
|
@@ -313,18 +331,18 @@ section.inline details.details-filter summary {
|
|
|
313
331
|
@click=${()=>{this._selectedResult=s,this._config.onSelect(s)}}
|
|
314
332
|
/>
|
|
315
333
|
<span class="title"
|
|
316
|
-
>${
|
|
334
|
+
>${Vs(s[this._config.titleProperty])}</span
|
|
317
335
|
>
|
|
318
336
|
</label>
|
|
319
337
|
</li>
|
|
320
338
|
`)}
|
|
321
339
|
</ul>
|
|
322
|
-
</details>`):
|
|
323
|
-
${
|
|
340
|
+
</details>`):ut(this._results,t=>ye`<li part="result">
|
|
341
|
+
${Vs(t[this._config.titleProperty])}
|
|
324
342
|
</li>`)}
|
|
325
343
|
</ul>
|
|
326
344
|
</div>
|
|
327
345
|
</section>
|
|
328
346
|
`)}
|
|
329
347
|
</form>
|
|
330
|
-
`}},
|
|
348
|
+
`}},Ye([bt()],le.EOxItemFilter.prototype,"_items",2),Ye([bt()],le.EOxItemFilter.prototype,"_results",2),Ye([bt()],le.EOxItemFilter.prototype,"_filters",2),Ye([bt()],le.EOxItemFilter.prototype,"_selectedResult",2),Ye([Wt({attribute:!1})],le.EOxItemFilter.prototype,"config",1),Ye([Wt()],le.EOxItemFilter.prototype,"apply",2),le.EOxItemFilter=Ye([Xi("eox-itemfilter")],le.EOxItemFilter),Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|