@eox/itemfilter 0.8.3 → 0.8.4

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.
@@ -1,22 +1,22 @@
1
- (function(ye,Ve){typeof exports=="object"&&typeof module<"u"?Ve(exports):typeof define=="function"&&define.amd?define(["exports"],Ve):(ye=typeof globalThis<"u"?globalThis:ye||self,Ve(ye["eox-itemfilter"]={}))})(this,function(ye){"use strict";/**
1
+ (function(ye,We){typeof exports=="object"&&typeof module<"u"?We(exports):typeof define=="function"&&define.amd?define(["exports"],We):(ye=typeof globalThis<"u"?globalThis:ye||self,We(ye["eox-itemfilter"]={}))})(this,function(ye){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const Ve=window,rr=Ve.ShadowRoot&&(Ve.ShadyCSS===void 0||Ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gi=Symbol(),vi=new WeakMap;let Qn=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==gi)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(rr&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=vi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&vi.set(t,e))}return e}toString(){return this.cssText}};const es=r=>new Qn(typeof r=="string"?r:r+"",void 0,gi),ts=(r,e)=>{rr?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style"),n=Ve.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=t.cssText,r.appendChild(i)})},mi=rr?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return es(t)})(r):r;/**
5
+ */const We=window,sr=We.ShadowRoot&&(We.ShadyCSS===void 0||We.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$i=Symbol(),wi=new WeakMap;let ds=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==$i)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(sr&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=wi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&wi.set(t,e))}return e}toString(){return this.cssText}};const fs=r=>new ds(typeof r=="string"?r:r+"",void 0,$i),ps=(r,e)=>{sr?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style"),n=We.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=t.cssText,r.appendChild(i)})},_i=sr?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return fs(t)})(r):r;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var ir;const Lt=window,yi=Lt.trustedTypes,rs=yi?yi.emptyScript:"",bi=Lt.reactiveElementPolyfillSupport,nr={toAttribute(r,e){switch(e){case Boolean:r=r?rs:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},xi=(r,e)=>e!==r&&(e==e||r==r),sr={attribute:!0,type:String,converter:nr,reflect:!1,hasChanged:xi},or="finalized";let at=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,i)=>{const n=this._$Ep(i,t);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,t=sr){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(n){const s=this[e];this[t]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||sr}static finalize(){if(this.hasOwnProperty(or))return!1;this[or]=!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,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of i)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)t.unshift(mi(n))}else e!==void 0&&t.push(mi(e));return t}static _$Ep(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i: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,i;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.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 ts(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 i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=sr){var n;const s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){const o=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:nr).toAttribute(t,i.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,t){var i;const n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=n.getPropertyOptions(s),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:nr;this._$El=s,this[s]=c.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||xi)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(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((n,s)=>this[s]=n),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),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,i)=>this._$EO(i,this[i],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};at[or]=!0,at.elementProperties=new Map,at.elementStyles=[],at.shadowRootOptions={mode:"open"},bi==null||bi({ReactiveElement:at}),((ir=Lt.reactiveElementVersions)!==null&&ir!==void 0?ir:Lt.reactiveElementVersions=[]).push("1.6.2");/**
9
+ */var or;const Dt=window,Ei=Dt.trustedTypes,gs=Ei?Ei.emptyScript:"",Mi=Dt.reactiveElementPolyfillSupport,ar={toAttribute(r,e){switch(e){case Boolean:r=r?gs:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},Ai=(r,e)=>e!==r&&(e==e||r==r),lr={attribute:!0,type:String,converter:ar,reflect:!1,hasChanged:Ai},cr="finalized";let lt=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,i)=>{const n=this._$Ep(i,t);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,t=lr){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(n){const s=this[e];this[t]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||lr}static finalize(){if(this.hasOwnProperty(cr))return!1;this[cr]=!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,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of i)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)t.unshift(_i(n))}else e!==void 0&&t.push(_i(e));return t}static _$Ep(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i: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,i;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.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 ps(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 i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=lr){var n;const s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){const o=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:ar).toAttribute(t,i.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,t){var i;const n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=n.getPropertyOptions(s),l=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:ar;this._$El=s,this[s]=l.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||Ai)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(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((n,s)=>this[s]=n),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),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,i)=>this._$EO(i,this[i],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};lt[cr]=!0,lt.elementProperties=new Map,lt.elementStyles=[],lt.shadowRootOptions={mode:"open"},Mi==null||Mi({ReactiveElement:lt}),((or=Dt.reactiveElementVersions)!==null&&or!==void 0?or:Dt.reactiveElementVersions=[]).push("1.6.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var ar;const Tt=window,lt=Tt.trustedTypes,$i=lt?lt.createPolicy("lit-html",{createHTML:r=>r}):void 0,lr="$lit$",We=`lit$${(Math.random()+"").slice(9)}$`,wi="?"+We,is=`<${wi}>`,Ze=document,wt=()=>Ze.createComment(""),_t=r=>r===null||typeof r!="object"&&typeof r!="function",_i=Array.isArray,ns=r=>_i(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",cr=`[
14
- \f\r]`,Et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ei=/-->/g,Mi=/>/g,Qe=RegExp(`>|${cr}(?:([^\\s"'>=/]+)(${cr}*=${cr}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ai=/'/g,Oi=/"/g,Si=/^(?:script|style|textarea|title)$/i,ss=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),he=ss(1),Te=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),Pi=new WeakMap,et=Ze.createTreeWalker(Ze,129,null,!1),os=(r,e)=>{const t=r.length-1,i=[];let n,s=e===2?"<svg>":"",o=Et;for(let a=0;a<t;a++){const u=r[a];let g,v,_=-1,E=0;for(;E<u.length&&(o.lastIndex=E,v=o.exec(u),v!==null);)E=o.lastIndex,o===Et?v[1]==="!--"?o=Ei:v[1]!==void 0?o=Mi:v[2]!==void 0?(Si.test(v[2])&&(n=RegExp("</"+v[2],"g")),o=Qe):v[3]!==void 0&&(o=Qe):o===Qe?v[0]===">"?(o=n??Et,_=-1):v[1]===void 0?_=-2:(_=o.lastIndex-v[2].length,g=v[1],o=v[3]===void 0?Qe:v[3]==='"'?Oi:Ai):o===Oi||o===Ai?o=Qe:o===Ei||o===Mi?o=Et:(o=Qe,n=void 0);const k=o===Qe&&r[a+1].startsWith("/>")?" ":"";s+=o===Et?u+is:_>=0?(i.push(g),u.slice(0,_)+lr+u.slice(_)+We+k):u+We+(_===-2?(i.push(void 0),a):k)}const c=s+(r[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[$i!==void 0?$i.createHTML(c):c,i]};class Mt{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let s=0,o=0;const c=e.length-1,a=this.parts,[u,g]=os(e,t);if(this.el=Mt.createElement(u,i),et.currentNode=this.el.content,t===2){const v=this.el.content,_=v.firstChild;_.remove(),v.append(..._.childNodes)}for(;(n=et.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes()){const v=[];for(const _ of n.getAttributeNames())if(_.endsWith(lr)||_.startsWith(We)){const E=g[o++];if(v.push(_),E!==void 0){const k=n.getAttribute(E.toLowerCase()+lr).split(We),F=/([.?@])?(.*)/.exec(E);a.push({type:1,index:s,name:F[2],strings:k,ctor:F[1]==="."?ls:F[1]==="?"?us:F[1]==="@"?hs:Rt})}else a.push({type:6,index:s})}for(const _ of v)n.removeAttribute(_)}if(Si.test(n.tagName)){const v=n.textContent.split(We),_=v.length-1;if(_>0){n.textContent=lt?lt.emptyScript:"";for(let E=0;E<_;E++)n.append(v[E],wt()),et.nextNode(),a.push({type:2,index:++s});n.append(v[_],wt())}}}else if(n.nodeType===8)if(n.data===wi)a.push({type:2,index:s});else{let v=-1;for(;(v=n.data.indexOf(We,v+1))!==-1;)a.push({type:7,index:s}),v+=We.length-1}s++}}static createElement(e,t){const i=Ze.createElement("template");return i.innerHTML=e,i}}function ct(r,e,t=r,i){var n,s,o,c;if(e===Te)return e;let a=i!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[i]:t._$Cl;const u=_t(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==u&&((s=a==null?void 0:a._$AO)===null||s===void 0||s.call(a,!1),u===void 0?a=void 0:(a=new u(r),a._$AT(r,t,i)),i!==void 0?((o=(c=t)._$Co)!==null&&o!==void 0?o:c._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=ct(r,a._$AS(r,e.values),a,i)),e}class as{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:i},parts:n}=this._$AD,s=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ze).importNode(i,!0);et.currentNode=s;let o=et.nextNode(),c=0,a=0,u=n[0];for(;u!==void 0;){if(c===u.index){let g;u.type===2?g=new At(o,o.nextSibling,this,e):u.type===1?g=new u.ctor(o,u.name,u.strings,this,e):u.type===6&&(g=new ds(o,this,e)),this._$AV.push(g),u=n[++a]}c!==(u==null?void 0:u.index)&&(o=et.nextNode(),c++)}return et.currentNode=Ze,s}v(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class At{constructor(e,t,i,n){var s;this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=n,this._$Cp=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}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=ct(this,e,t),_t(e)?e===ie||e==null||e===""?(this._$AH!==ie&&this._$AR(),this._$AH=ie):e!==this._$AH&&e!==Te&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):ns(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!==ie&&_t(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ze.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Mt.createElement(n.h,this.options)),n);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===s)this._$AH.v(i);else{const o=new as(s,this),c=o.u(this.options);o.v(i),this.$(c),this._$AH=o}}_$AC(e){let t=Pi.get(e.strings);return t===void 0&&Pi.set(e.strings,t=new Mt(e)),t}T(e){_i(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const s of e)n===t.length?t.push(i=new At(this.k(wt()),this.k(wt()),this,this.options)):i=t[n],i._$AI(s),n++;n<t.length&&(this._$AR(i&&i._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class Rt{constructor(e,t,i,n,s){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ie}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,n){const s=this.strings;let o=!1;if(s===void 0)e=ct(this,e,t,0),o=!_t(e)||e!==this._$AH&&e!==Te,o&&(this._$AH=e);else{const c=e;let a,u;for(e=s[0],a=0;a<s.length-1;a++)u=ct(this,c[i+a],t,a),u===Te&&(u=this._$AH[a]),o||(o=!_t(u)||u!==this._$AH[a]),u===ie?e=ie:e!==ie&&(e+=(u??"")+s[a+1]),this._$AH[a]=u}o&&!n&&this.j(e)}j(e){e===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ls extends Rt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ie?void 0:e}}const cs=lt?lt.emptyScript:"";class us extends Rt{constructor(){super(...arguments),this.type=4}j(e){e&&e!==ie?this.element.setAttribute(this.name,cs):this.element.removeAttribute(this.name)}}class hs extends Rt{constructor(e,t,i,n,s){super(e,t,i,n,s),this.type=5}_$AI(e,t=this){var i;if((e=(i=ct(this,e,t,0))!==null&&i!==void 0?i:ie)===Te)return;const n=this._$AH,s=e===ie&&n!==ie||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==ie&&(n===ie||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class ds{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ct(this,e)}}const Ci=Tt.litHtmlPolyfillSupport;Ci==null||Ci(Mt,At),((ar=Tt.litHtmlVersions)!==null&&ar!==void 0?ar:Tt.litHtmlVersions=[]).push("2.7.4");const fs=(r,e,t)=>{var i,n;const s=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let o=s._$litPart$;if(o===void 0){const c=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new At(e.insertBefore(wt(),c),c,void 0,t??{})}return o._$AI(r),o};/**
13
+ */var ur;const It=window,ct=It.trustedTypes,Oi=ct?ct.createPolicy("lit-html",{createHTML:r=>r}):void 0,jt="$lit$",Ye=`lit$${(Math.random()+"").slice(9)}$`,hr="?"+Ye,vs=`<${hr}>`,Qe=document,Et=()=>Qe.createComment(""),Mt=r=>r===null||typeof r!="object"&&typeof r!="function",Si=Array.isArray,Pi=r=>Si(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",dr=`[
14
+ \f\r]`,At=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ci=/-->/g,ki=/>/g,et=RegExp(`>|${dr}(?:([^\\s"'>=/]+)(${dr}*=${dr}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,Ti=/"/g,Ri=/^(?:script|style|textarea|title)$/i,ms=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),he=ms(1),Se=Symbol.for("lit-noChange"),ne=Symbol.for("lit-nothing"),Di=new WeakMap,tt=Qe.createTreeWalker(Qe,129,null,!1),Ii=(r,e)=>{const t=r.length-1,i=[];let n,s=e===2?"<svg>":"",o=At;for(let a=0;a<t;a++){const u=r[a];let p,v,y=-1,x=0;for(;x<u.length&&(o.lastIndex=x,v=o.exec(u),v!==null);)x=o.lastIndex,o===At?v[1]==="!--"?o=Ci:v[1]!==void 0?o=ki:v[2]!==void 0?(Ri.test(v[2])&&(n=RegExp("</"+v[2],"g")),o=et):v[3]!==void 0&&(o=et):o===et?v[0]===">"?(o=n??At,y=-1):v[1]===void 0?y=-2:(y=o.lastIndex-v[2].length,p=v[1],o=v[3]===void 0?et:v[3]==='"'?Ti:Li):o===Ti||o===Li?o=et:o===Ci||o===ki?o=At:(o=et,n=void 0);const M=o===et&&r[a+1].startsWith("/>")?" ":"";s+=o===At?u+vs:y>=0?(i.push(p),u.slice(0,y)+jt+u.slice(y)+Ye+M):u+Ye+(y===-2?(i.push(void 0),a):M)}const l=s+(r[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Oi!==void 0?Oi.createHTML(l):l,i]};class Ot{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let s=0,o=0;const l=e.length-1,a=this.parts,[u,p]=Ii(e,t);if(this.el=Ot.createElement(u,i),tt.currentNode=this.el.content,t===2){const v=this.el.content,y=v.firstChild;y.remove(),v.append(...y.childNodes)}for(;(n=tt.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes()){const v=[];for(const y of n.getAttributeNames())if(y.endsWith(jt)||y.startsWith(Ye)){const x=p[o++];if(v.push(y),x!==void 0){const M=n.getAttribute(x.toLowerCase()+jt).split(Ye),j=/([.?@])?(.*)/.exec(x);a.push({type:1,index:s,name:j[2],strings:M,ctor:j[1]==="."?Ni:j[1]==="?"?Bi:j[1]==="@"?Fi:St})}else a.push({type:6,index:s})}for(const y of v)n.removeAttribute(y)}if(Ri.test(n.tagName)){const v=n.textContent.split(Ye),y=v.length-1;if(y>0){n.textContent=ct?ct.emptyScript:"";for(let x=0;x<y;x++)n.append(v[x],Et()),tt.nextNode(),a.push({type:2,index:++s});n.append(v[y],Et())}}}else if(n.nodeType===8)if(n.data===hr)a.push({type:2,index:s});else{let v=-1;for(;(v=n.data.indexOf(Ye,v+1))!==-1;)a.push({type:7,index:s}),v+=Ye.length-1}s++}}static createElement(e,t){const i=Qe.createElement("template");return i.innerHTML=e,i}}function rt(r,e,t=r,i){var n,s,o,l;if(e===Se)return e;let a=i!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[i]:t._$Cl;const u=Mt(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==u&&((s=a==null?void 0:a._$AO)===null||s===void 0||s.call(a,!1),u===void 0?a=void 0:(a=new u(r),a._$AT(r,t,i)),i!==void 0?((o=(l=t)._$Co)!==null&&o!==void 0?o:l._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=rt(r,a._$AS(r,e.values),a,i)),e}class ji{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:i},parts:n}=this._$AD,s=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Qe).importNode(i,!0);tt.currentNode=s;let o=tt.nextNode(),l=0,a=0,u=n[0];for(;u!==void 0;){if(l===u.index){let p;u.type===2?p=new ut(o,o.nextSibling,this,e):u.type===1?p=new u.ctor(o,u.name,u.strings,this,e):u.type===6&&(p=new Hi(o,this,e)),this._$AV.push(p),u=n[++a]}l!==(u==null?void 0:u.index)&&(o=tt.nextNode(),l++)}return tt.currentNode=Qe,s}v(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class ut{constructor(e,t,i,n){var s;this.type=2,this._$AH=ne,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=n,this._$Cp=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}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=rt(this,e,t),Mt(e)?e===ne||e==null||e===""?(this._$AH!==ne&&this._$AR(),this._$AH=ne):e!==this._$AH&&e!==Se&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Pi(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!==ne&&Mt(this._$AH)?this._$AA.nextSibling.data=e:this.$(Qe.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Ot.createElement(n.h,this.options)),n);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===s)this._$AH.v(i);else{const o=new ji(s,this),l=o.u(this.options);o.v(i),this.$(l),this._$AH=o}}_$AC(e){let t=Di.get(e.strings);return t===void 0&&Di.set(e.strings,t=new Ot(e)),t}T(e){Si(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const s of e)n===t.length?t.push(i=new ut(this.k(Et()),this.k(Et()),this,this.options)):i=t[n],i._$AI(s),n++;n<t.length&&(this._$AR(i&&i._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class St{constructor(e,t,i,n,s){this.type=1,this._$AH=ne,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ne}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,n){const s=this.strings;let o=!1;if(s===void 0)e=rt(this,e,t,0),o=!Mt(e)||e!==this._$AH&&e!==Se,o&&(this._$AH=e);else{const l=e;let a,u;for(e=s[0],a=0;a<s.length-1;a++)u=rt(this,l[i+a],t,a),u===Se&&(u=this._$AH[a]),o||(o=!Mt(u)||u!==this._$AH[a]),u===ne?e=ne:e!==ne&&(e+=(u??"")+s[a+1]),this._$AH[a]=u}o&&!n&&this.j(e)}j(e){e===ne?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Ni extends St{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ne?void 0:e}}const ys=ct?ct.emptyScript:"";class Bi extends St{constructor(){super(...arguments),this.type=4}j(e){e&&e!==ne?this.element.setAttribute(this.name,ys):this.element.removeAttribute(this.name)}}class Fi extends St{constructor(e,t,i,n,s){super(e,t,i,n,s),this.type=5}_$AI(e,t=this){var i;if((e=(i=rt(this,e,t,0))!==null&&i!==void 0?i:ne)===Se)return;const n=this._$AH,s=e===ne&&n!==ne||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==ne&&(n===ne||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class Hi{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){rt(this,e)}}const bs={O:jt,P:Ye,A:hr,C:1,M:Ii,L:ji,D:Pi,R:rt,I:ut,V:St,H:Bi,N:Fi,U:Ni,F:Hi},Ui=It.litHtmlPolyfillSupport;Ui==null||Ui(Ot,ut),((ur=It.litHtmlVersions)!==null&&ur!==void 0?ur:It.litHtmlVersions=[]).push("2.7.4");const xs=(r,e,t)=>{var i,n;const s=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let o=s._$litPart$;if(o===void 0){const l=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new ut(e.insertBefore(Et(),l),l,void 0,t??{})}return o._$AI(r),o};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */var ur,hr;let Se=class extends at{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=fs(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 Te}};Se.finalized=!0,Se._$litElement$=!0,(ur=globalThis.litElementHydrateSupport)===null||ur===void 0||ur.call(globalThis,{LitElement:Se});const ki=globalThis.litElementPolyfillSupport;ki==null||ki({LitElement:Se}),((hr=globalThis.litElementVersions)!==null&&hr!==void 0?hr:globalThis.litElementVersions=[]).push("3.3.2");/**
19
+ */var fr,pr;let Pe=class extends lt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=xs(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 Se}};Pe.finalized=!0,Pe._$litElement$=!0,(fr=globalThis.litElementHydrateSupport)===null||fr===void 0||fr.call(globalThis,{LitElement:Pe});const Yi=globalThis.litElementPolyfillSupport;Yi==null||Yi({LitElement:Pe}),((pr=globalThis.litElementVersions)!==null&&pr!==void 0?pr:globalThis.litElementVersions=[]).push("3.3.2");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
@@ -24,35 +24,43 @@
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const ps=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{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,r)}},gs=(r,e,t)=>{e.constructor.createProperty(t,r)};function Ae(r){return(e,t)=>t!==void 0?gs(r,e,t):ps(r,e)}/**
27
+ */const $s=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{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,r)}},ws=(r,e,t)=>{e.constructor.createProperty(t,r)};function Ae(r){return(e,t)=>t!==void 0?ws(r,e,t):$s(r,e)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function Ot(r){return Ae({...r,state:!0})}/**
31
+ */function Pt(r){return Ae({...r,state:!0})}/**
32
32
  * @license
33
33
  * Copyright 2021 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */var dr;((dr=window.HTMLSlotElement)===null||dr===void 0?void 0:dr.prototype.assignedElements)!=null;/**
35
+ */var gr;((gr=window.HTMLSlotElement)===null||gr===void 0?void 0:gr.prototype.assignedElements)!=null;/**
36
36
  * @license
37
37
  * Copyright 2021 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */function ut(r,e,t){return r?e():t==null?void 0:t()}/**
39
+ */function ht(r,e,t){return r?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*tt(r,e){if(r!==void 0){let t=0;for(const i of r)yield e(i,t++)}}/**
43
+ */function*dt(r,e){if(r!==void 0){let t=0;for(const i of r)yield e(i,t++)}}/**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */const rt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Li=r=>(...e)=>({_$litDirective$:r,values:e});class Ti{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
47
+ */const Ge={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},vr=r=>(...e)=>({_$litDirective$:r,values:e});class mr{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
48
+ * @license
49
+ * Copyright 2020 Google LLC
50
+ * SPDX-License-Identifier: BSD-3-Clause
51
+ */const{I:_s}=bs,Es=r=>r.strings===void 0,zi=()=>document.createComment(""),Ct=(r,e,t)=>{var i;const n=r._$AA.parentNode,s=e===void 0?r._$AB:e._$AA;if(t===void 0){const o=n.insertBefore(zi(),s),l=n.insertBefore(zi(),s);t=new _s(o,l,r,r.options)}else{const o=t._$AB.nextSibling,l=t._$AM,a=l!==r;if(a){let u;(i=t._$AQ)===null||i===void 0||i.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==l._$AU&&t._$AP(u)}if(o!==s||a){let u=t._$AA;for(;u!==o;){const p=u.nextSibling;n.insertBefore(u,s),u=p}}}return t},it=(r,e,t=r)=>(r._$AI(e,t),r),Ms={},Xi=(r,e=Ms)=>r._$AH=e,As=r=>r._$AH,yr=r=>{var e;(e=r._$AP)===null||e===void 0||e.call(r,!1,!0);let t=r._$AA;const i=r._$AB.nextSibling;for(;t!==i;){const n=t.nextSibling;t.remove(),t=n}};/**
48
52
  * @license
49
53
  * Copyright 2017 Google LLC
50
54
  * SPDX-License-Identifier: BSD-3-Clause
51
- */let fr=class extends Ti{constructor(e){if(super(e),this.et=ie,e.type!==rt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ie||e==null)return this.ft=void 0,this.et=e;if(e===Te)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:[]}}};fr.directiveName="unsafeHTML",fr.resultType=1;const Ri=Li(fr);/**
55
+ */const Vi=(r,e,t)=>{const i=new Map;for(let n=e;n<=t;n++)i.set(r[n],n);return i},Os=vr(class extends mr{constructor(r){if(super(r),r.type!==Ge.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);const n=[],s=[];let o=0;for(const l of r)n[o]=i?i(l,o):o,s[o]=t(l,o),o++;return{values:s,keys:n}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,i]){var n;const s=As(r),{values:o,keys:l}=this.dt(e,t,i);if(!Array.isArray(s))return this.ht=l,o;const a=(n=this.ht)!==null&&n!==void 0?n:this.ht=[],u=[];let p,v,y=0,x=s.length-1,M=0,j=o.length-1;for(;y<=x&&M<=j;)if(s[y]===null)y++;else if(s[x]===null)x--;else if(a[y]===l[M])u[M]=it(s[y],o[M]),y++,M++;else if(a[x]===l[j])u[j]=it(s[x],o[j]),x--,j--;else if(a[y]===l[j])u[j]=it(s[y],o[j]),Ct(r,u[j+1],s[y]),y++,j--;else if(a[x]===l[M])u[M]=it(s[x],o[M]),Ct(r,s[y],s[x]),x--,M++;else if(p===void 0&&(p=Vi(l,M,j),v=Vi(a,y,x)),p.has(a[y]))if(p.has(a[x])){const q=v.get(l[M]),J=q!==void 0?s[q]:null;if(J===null){const f=Ct(r,s[y]);it(f,o[M]),u[M]=f}else u[M]=it(J,o[M]),Ct(r,s[y],J),s[q]=null;M++}else yr(s[x]),x--;else yr(s[y]),y++;for(;M<=j;){const q=Ct(r,u[j+1]);it(q,o[M]),u[M++]=q}for(;y<=x;){const q=s[y++];q!==null&&yr(q)}return this.ht=l,Xi(r,u),Se}});/**
56
+ * @license
57
+ * Copyright 2017 Google LLC
58
+ * SPDX-License-Identifier: BSD-3-Clause
59
+ */let br=class extends mr{constructor(e){if(super(e),this.et=ne,e.type!==Ge.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ne||e==null)return this.ft=void 0,this.et=e;if(e===Se)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:[]}}};br.directiveName="unsafeHTML",br.resultType=1;const Wi=vr(br);/**
52
60
  * @license
53
61
  * Copyright 2020 Google LLC
54
62
  * SPDX-License-Identifier: BSD-3-Clause
55
- */const Di=Symbol.for(""),vs=r=>{if((r==null?void 0:r.r)===Di)return r==null?void 0:r._$litStatic$},Dt=r=>({_$litStatic$:r,r:Di}),Ii=new Map,ms=r=>(e,...t)=>{const i=t.length;let n,s;const o=[],c=[];let a,u=0,g=!1;for(;u<i;){for(a=e[u];u<i&&(s=t[u],(n=vs(s))!==void 0);)a+=n+e[++u],g=!0;u!==i&&c.push(s),o.push(a),u++}if(u===i&&o.push(e[i]),g){const v=o.join("$$lit$$");(e=Ii.get(v))===void 0&&(o.raw=o,Ii.set(v,e=o)),t=c}return r(e,...t)},pr=ms(he);(()=>{var r=Object.defineProperty,e=Math.pow,t=(l,d,y)=>d in l?r(l,d,{enumerable:!0,configurable:!0,writable:!0,value:y}):l[d]=y,i=(l,d,y)=>(t(l,typeof d!="symbol"?d+"":d,y),y),n=(l,d)=>` ${d&&d.length>0?d.map(y=>`<link rel="stylesheet" href="${y}" />`).join(""):""} <style> ${l} </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>`,s=":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}",o="pointers-overlap",c="pointers-min-distance",a="pointers-max-distance",u="range-dragging",g="data",v="min",_="max",E="step",k="round",F="type",se="theme",te="rtl",f="btt",p="disabled",b="keyboard-disabled",O="mousewheel-disabled",w="slider-width",M="slider-height",P="slider-radius",L="slider-bg",I="slider-bg-hover",W="slider-bg-fill",ee="pointer-width",C="pointer-height",$="pointer-radius",A="pointer-bg",N="pointer-bg-hover",S="pointer-bg-focus",H="pointer-shadow",V="pointer-shadow-hover",Z="pointer-shadow-focus",le="pointer-border",K="pointer-border-hover",ve="pointer-border-focus",De="animate-onclick",Ie="css-links",be="vertical",ke="horizontal",He=(l,d,y,m,T)=>{let U=d-l;return U===0?y:(m-y)*(T-l)/U+y},ue=l=>!isNaN(parseFloat(l))&&isFinite(l),oe=(l,d)=>ue(l)?Number(l):d,mt=(l,d)=>d===0?0:Math.round(l/d)*d,yt=(l,d=1/0)=>{if(d===1/0)return l;let y=e(10,d);return Math.round(l*y)/y},xe=l=>l==null?!1:typeof l=="boolean"?l:l.trim().toLowerCase()==="true",Wa=(l,d)=>{l.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},qa=(l,d)=>{l.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},Ga=(l,d)=>{l.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},Ka=(l,d)=>{l.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},Ja=(l,d)=>{if(!d||d.length<=0)return;let y=d.map(T=>ue(T)?oe(T,T):T),m={values:y||[]};m.value=y[0],m.value0=y[0],m.value1=y[0];for(let T=1;T<y.length;T++)m[`value${T+1}`]=y[T];l.dispatchEvent(new CustomEvent("change",{detail:m}))},zr=(l,d,y)=>{let m=0,T,U,q,R,D=!1,G=(z,ce,me,ge,de,fe)=>{let _e=m;me!==void 0&&z>me&&(z=me),ce!==void 0&&z<ce&&(z=ce),m=z;let Ee=m;return(ge===be&&fe||ge===ke&&de)&&(Ee=100-Ee),ge===be?d.style.top=`${Ee}%`:d.style.left=`${Ee}%`,_e!==m},Q=z=>z===d||d.contains(z),B=(z,ce,me,ge)=>{T=z,U=ce,q=me,R=ge},ne=z=>{D=z,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Le=(z,ce)=>{ce==null?d.removeAttribute(z):d.setAttribute(z,ce)},we=z=>d.getAttribute(z),Y=z=>{if(!D){switch(z.key){case"ArrowLeft":{z.preventDefault(),typeof T=="function"&&T(y);break}case"ArrowRight":{z.preventDefault(),typeof U=="function"&&U(y);break}case"ArrowUp":{z.preventDefault(),typeof q=="function"&&q(y);break}case"ArrowDown":{z.preventDefault(),typeof R=="function"&&R(y);break}}Ka(l,z)}},J=()=>{D||Wa(l,d)};return d.className=`pointer pointer-${y}`,d.addEventListener("keydown",Y),d.addEventListener("click",J),{$pointer:d,get percent(){return m},get disabled(){return D},set disabled(z){ne(z)},updatePosition:G,isClicked:Q,setCallbacks:B,setAttr:Le,getAttr:we,destroy:()=>{d.removeEventListener("keydown",Y),d.removeEventListener("click",J),d.remove()}}},Za=l=>{if(l==null)return;if(Array.isArray(l))return l;if(l.trim()==="")return;let d=l.split(","),y=[],m=!0;for(let T=0;T<d.length;T++){let U=d[T].trim();U!==""&&(y.push(U),ue(U)||(m=!1))}return m?y.map(T=>Number(T)):y},Qa=(l,d)=>d?d.findIndex(y=>y===l||y.toString().trim()===l.toString().trim()):-1,el=l=>({updatePosition:(d,y,m,T)=>{if(y.length<=0)return;let U=y.length===1,q=y[0],R=y[y.length-1];d===be?(l.style.removeProperty("width"),l.style.removeProperty("right"),l.style.removeProperty("left"),U?l.style.height=`${q}%`:l.style.height=`${Math.abs(q-R)}%`,T?(l.style.bottom="0%",U?l.style.top="auto":l.style.top=`${Math.min(100-R,100-q)}%`):(l.style.bottom="auto",U?l.style.top="0%":l.style.top=`${Math.min(q,R)}%`)):(l.style.removeProperty("height"),l.style.removeProperty("top"),l.style.removeProperty("bottom"),U?l.style.width=`${q}%`:l.style.width=`${Math.abs(q-R)}%`,m?(l.style.right="0%",U?l.style.left="auto":l.style.left=`${Math.min(100-R,100-q)}%`):(l.style.right="auto",U?l.style.left="0%":l.style.left=`${Math.min(q,R)}%`))}}),Cn="--animate-onclick",tl="--width",rl="--height",il="--panel-bg-border-radius",nl="--panel-bg",sl="--panel-bg-hover",ol="--panel-bg-fill",al="--pointer-width",ll="--pointer-height",cl="--pointer-border-radius",ul="--pointer-bg",hl="--pointer-bg-hover",dl="--pointer-bg-focus",fl="--pointer-shadow",pl="--pointer-shadow-hover",gl="--pointer-shadow-focus",vl="--pointer-border",ml="--pointer-border-hover",yl="--pointer-border-focus",zt=(l,d,y)=>{let m=new Map;for(let T of l.attributes){let U=T.nodeName.trim().toLowerCase();if(!d.test(U))continue;let q=U.replace(/\D/g,"").trim(),R=q===""||q==="0"||q==="1"?0:oe(q,0)-1,D=y&&typeof y=="function"?y(T.value):T.value;m.set(R,D)}return m},bl=l=>{if(!l)return null;let d=l.getAttribute(Ie);if(!d)return null;let y=d.split(";"),m=[];for(let T of y)T.trim()!==""&&m.push(T.trim());return m},kn=[[tl,w,"sliderWidth",null],[rl,M,"sliderHeight",null],[il,P,"sliderRadius",null],[nl,L,"sliderBg",null],[sl,I,"sliderBgHover",null],[ol,W,"sliderBgFill",null],[al,ee,"pointer#Width",/^pointer([0-9]*)-width$/],[ll,C,"pointer#Height",/^pointer([0-9]*)-height$/],[cl,$,"pointer#Radius",/^pointer([0-9]*)-radius$/],[ul,A,"pointer#Bg",/^pointer([0-9]*)-bg$/],[hl,N,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[dl,S,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[fl,H,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[pl,V,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[gl,Z,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[vl,le,"pointer#Border",/^pointer([0-9]*)-border$/],[ml,K,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[yl,ve,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],xl=(l,d,y)=>{let m=null,T=[],U=new Map,q=(Y,J=d)=>{let z=[...J.classList];for(let ce of z)ce.startsWith(Y)&&d.classList.remove(ce)},R=()=>{q("shape");let Y=d.querySelectorAll(".pointer");for(let J of Y)q("shape",J)},D=Y=>{m=Y,q("theme-"),typeof Y=="string"&&d.classList.add(`theme-${Y}`)},G=()=>{if(R(),!(T.length<=0)){d.classList.add("shape",`shape-${T[0]}`);for(let Y=1;Y<T.length;Y++){let J=T[Y];if(!J)continue;let z=d.querySelector(`.pointer-${Y}`);!z||z.classList.add("shape",`shape-${J}`)}}},Q=(Y,J)=>{T[Y]=J,G()},B=()=>{R();let Y=zt(l,/^pointer([0-9]*)-shape$/);if(!(Y.size<=0)){for(let J of Y){let z=J[0];T[z]=J[1]}G()}},ne=(Y,J)=>`${Y}-${J}`,Le=(Y,J,z)=>{let ce=y[z];if(!ce)return;let me=z===0?d:ce.$pointer;if(J==null){U.has(ne(Y,z))&&U.delete(ne(Y,z)),me.style.removeProperty(Y);return}U.set(ne(Y,z),J),me.style.setProperty(Y,J)},we=(Y,J)=>U.get(ne(Y,J));return(()=>{for(let Y of kn){let[J,z,ce,me]=Y;if(me){let de=zt(l,me);for(let fe of de){let _e=fe[0],Ee=fe[1];Le(J,Ee,_e)}}else{let de=l.getAttribute(z);Le(J,de,0)}let ge=[];if(ce.indexOf("#")===-1)ge.push([ce,0]);else{ge.push([ce.replace("#",""),0]),ge.push([ce.replace("#","0"),0]),ge.push([ce.replace("#","1"),0]);for(let de=1;de<y.length;de++)ge.push([ce.replace("#",(de+1).toString()),de])}for(let de of ge)try{let fe=de[0],_e=de[1];Object.prototype.hasOwnProperty.call(l,fe)||Object.defineProperty(l,fe,{get(){return we(J,_e)},set:Ee=>{Le(J,Ee,_e)}})}catch(fe){console.error(fe)}}D(l.getAttribute(se)),B()})(),{setStyle:Le,getStyle:we,get theme(){return m},set theme(Y){D(Y)},get pointerShapes(){return T},setPointerShape:Q}},bt="animate-on-click",Ln="range-dragging",$l=(l,d,y,m)=>{let T=[],U=Q=>{for(let B of T)B.update&&typeof B.update=="function"&&B.update(Q)},q=()=>{for(let Q of T)Q.destroy&&typeof Q.destroy=="function"&&Q.destroy()},R=(Q,B)=>{for(let ne of T)ne.onAttrChange&&typeof ne.onAttrChange=="function"&&ne.onAttrChange(Q,B)},D=Q=>{if(Q.gettersAndSetters){for(let B of Q.gettersAndSetters)if(!(!B.name||!B.attributes))try{Object.prototype.hasOwnProperty.call(l,B.name)||Object.defineProperty(l,B.name,B.attributes)}catch(ne){console.error("defineSettersGetters error:",ne)}}},G=Q=>{var B;if(!Q.css)return;let ne=(B=l.shadowRoot)==null?void 0:B.querySelector("style");!ne||(ne.innerHTML+=Q.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let Q of window.tcRangeSliderPlugins){let B=Q();T.push(B),B.init&&typeof B.init=="function"&&(B.init(l,d,y,m),D(B),G(B))}},update:U,onAttrChange:R,destroy:q}},wl=10,_l=(l,d)=>{let y=new Map,m=/^value([0-9]*)$/;for(let R of l.attributes){let D=R.nodeName.trim().toLowerCase();if(!m.test(D))continue;let G=D.replace("value","").trim(),Q=G===""||G==="0"||G==="1"?0:oe(G,0)-1,B=ue(R.value)?oe(R.value,0):R.value;y.set(Q,B)}let T=Math.max(...Array.from(y.keys())),U=[];U.push([zr(l,d,0),y.get(0)]);let q=d;for(let R=1;R<=T;R++){let D=d.cloneNode(!0);q.after(D),q=D,U.push([zr(l,D,R),y.get(R)])}return U},Tn=(l,d,y,m,T,U,q)=>{try{Object.defineProperty(l,m,{configurable:!0,get(){if(!d)return;let R=d.pointers[y];if(!R)return;let D=d.getTextValue(R.percent);return ue(D)?oe(D,D):D},set:R=>{d.pointers[y]?d==null||d.setValue(R,y):d==null||d.addPointer(R)}}),Object.defineProperty(l,T,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.pointers[y])==null?void 0:R.getAttr("aria-label"))!=null?D:void 0},set:R=>{!d||d.setAriaLabel(y,R)}}),Object.defineProperty(l,U,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.styles)==null?void 0:R.pointerShapes[y])!=null?D:null},set:R=>{!d||!d.styles||d.styles.setPointerShape(y,R)}}),Object.defineProperty(l,q,{configurable:!0,get(){var R;return(R=d==null?void 0:d.pointers[y].disabled)!=null?R:!1},set:R=>{if(!d)return;let D=d==null?void 0:d.pointers[y];!D||(D.disabled=R)}})}catch(R){console.error(R)}},El=(l,d)=>{let y=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let m=2;m<wl;m++)y.push([`value${m}`,`ariaLabel${m}`,`pointer${m}Shape`,`pointer${m}Disabled`,m-1]);for(let m of y)Tn(l,d,m[4],m[0],m[1],m[2],m[3])},Rn=(l,d,y)=>{var m;let T=(m=y.shadowRoot)==null?void 0:m.querySelector(".container");if(T)for(let U of l)d?T.prepend(U.$pointer):T.append(U.$pointer)},Xr=0,Pt=100,xt=2,Dn="0.3s",Ml=(l,d,y)=>{let m=y.map(h=>h[0]),T=null,U=null,q=null,R=null,D=Xr,G=Pt,Q,B,ne=ke,Le=xt,we=!1,Y=!1,J=!1,z=0,ce=1/0,me=!1,ge,de,fe=!1,_e=!1,Ee=!1,Je=Dn,In=[],jn=h=>{fe||(h.preventDefault&&h.preventDefault(),st(h),window.addEventListener("mousemove",st),window.addEventListener("mouseup",Xt),qa(l,h))},Xt=h=>{fe||(ge=void 0,de=void 0,window.removeEventListener("mousemove",st),window.removeEventListener("mouseup",Xt),Je&&d.classList.add(bt),Ga(l,h))},Sl=(h,x)=>{if(m.length<=0)return;if(m.length===1)return m[0].isClicked(h)&&Je&&d.classList.remove(bt),m[0];let j=Cl(h);if(me){let re=x,je=Wt(re);je!==void 0&&(re=mt(re,je)),j?(ge=re,de=0,Je&&d.classList.remove(bt)):ge!==void 0&&(de=re-ge,ge=re)}if(!Pl(h)&&!j){for(let re of m)if(!(!re.isClicked(h)||re.disabled))return Je&&d.classList.remove(bt),re;for(let re of m)if(T===re)return re}let ae=1/0,pe=null;for(let re of m){if(re.disabled)continue;let je=Math.abs(x-re.percent);je<ae&&(ae=je,pe=re)}return pe},Nn=()=>m.findIndex(h=>T===h&&!h.disabled),st=h=>{let x;if(ne===be){let{height:ae,top:pe}=d.getBoundingClientRect(),re=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;x=Math.min(Math.max(0,re-pe),ae)*100/ae}else{let{width:ae,left:pe}=d.getBoundingClientRect(),re=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;x=Math.min(Math.max(0,re-pe),ae)*100/ae}if((we||Y)&&(x=100-x),T=Sl(h.target,x),me&&m.length>1&&de!==void 0){let ae=m[0],pe=m[m.length-1],re=ae.percent+de<0,je=pe.percent+de>100;if(re||je)return;for(let tr=0;tr<m.length;tr++)Me(tr,m[tr].percent+de);return}let j=Nn();j!==-1&&(Me(j,x),T==null||T.$pointer.focus())},Vt=h=>{if(fe||document.activeElement!==l||T!=null&&T.disabled)return;h.stopPropagation(),h.preventDefault();let x=h.deltaY<0,j=we||Y,ae=x?!j:j,pe=Nn();pe!==-1&&(ae?Ct(pe,m[pe].percent):kt(pe,m[pe].percent))},Bn=h=>{fe||_e||(ne===be?Y?Me(h,100):Me(h,0):we?kt(h,m[h].percent):Ct(h,m[h].percent))},Fn=h=>{fe||_e||(ne===be?Y?Me(h,0):Me(h,100):we?Ct(h,m[h].percent):kt(h,m[h].percent))},Hn=h=>{fe||_e||(ne===be?Y?kt(h,m[h].percent):Ct(h,m[h].percent):we?Me(h,100):Me(h,0))},Un=h=>{fe||_e||(ne===be?Y?Ct(h,m[h].percent):kt(h,m[h].percent):we?Me(h,0):Me(h,100))},Pl=h=>h.classList.contains("panel"),Cl=h=>h.classList.contains("panel-fill"),Ct=(h,x)=>{if(x===void 0)return;let j=Wt(x);j==null&&(j=1),x-=j,x<0&&(x=0),Me(h,x)},kt=(h,x)=>{if(x===void 0)return;let j=Wt(x);j==null&&(j=1),x+=j,x>100&&(x=100),Me(h,x)},ot=()=>{!R||R.update({percents:Yn(),values:zn(),$pointers:Xn(),min:Vn(),max:Wn(),data:qr(),step:Wr(),round:Kr(),type:Gr(),textMin:qt(),textMax:Gt(),rightToLeft:Qr(),bottomToTop:ei(),pointersOverlap:ni(),pointersMinDistance:Jr(),pointersMaxDistance:Zr(),rangeDragging:si(),disabled:ti(),keyboardDisabled:ri(),mousewheelDisabled:ii()})},kl=()=>{ot()},Ll=h=>{if(!(J||m.length<=1||G===D))if(h===0){let x=ce*100/(G-D);return Math.max(0,m[h+1].percent-x)}else{let x=z*100/(G-D);return Math.min(m[h-1].percent+x,100)}},Tl=h=>{if(!(J||m.length<=1||G===D))if(h===m.length-1){let x=ce*100/(G-D);return Math.min(m[h-1].percent+x,100)}else{let x=z*100/(G-D);return Math.max(0,m[h+1].percent-x)}},Wt=h=>{let x;if(typeof Q=="function"){let j=He(0,100,D,G,h);x=Q(j,h)}else x=Q;if(ue(x)){let j=G-D;return x=j===0?0:x*100/j,x}},$t=h=>{if(h===void 0)return;let x=He(0,100,D,G,h);return B!==void 0?B[Math.round(x)]:yt(x,Le)},qt=()=>B!==void 0?B[D]:D,Gt=()=>B!==void 0?B[G]:G,Wr=()=>Q,Rl=h=>{var x;return h<=0||J?qt():(x=$t(m[h-1].percent))!=null?x:""},Dl=h=>{var x;return m.length<=1||h>=m.length-1||J?Gt():(x=$t(m[h+1].percent))!=null?x:""},Yn=()=>m.map(h=>h.percent),zn=()=>m.map(h=>$t(h.percent)),Xn=()=>m.map(h=>h.$pointer),Vn=()=>D,Wn=()=>G,qr=()=>B,Gr=()=>ne,Kr=()=>Le,Jr=()=>z,Zr=()=>ce,Il=h=>In[h],Qr=()=>we,ei=()=>Y,ti=()=>fe,ri=()=>_e,ii=()=>Ee,ni=()=>J,si=()=>me,Me=(h,x)=>{if(x===void 0)return;let j=Wt(x);j!==void 0&&(x=mt(x,j));let ae=m[h];if(!ae)return;let pe=ae.updatePosition(x,Ll(h),Tl(h),ne,we,Y);U==null||U.updatePosition(ne,m.map(re=>re.percent),we,Y),ot();for(let re of m){let je=$t(re.percent);je!==void 0&&(re.setAttr("aria-valuenow",je.toString()),re.setAttr("aria-valuetext",je.toString()))}Nl(),pe&&Ja(l,m.map(re=>$t(re.percent)))},Ue=()=>{for(let h=0;h<m.length;h++)Me(h,m[h].percent)},jl=(h,x)=>{D=B!==void 0?0:oe(h,Xr),G=B!==void 0?B.length-1:oe(x,Pt),Kt(D),Jt(G)},Nl=()=>{var h,x;for(let j=0;j<m.length;j++){let ae=m[j];ae.setAttr("aria-valuemin",((h=Rl(j))!=null?h:"").toString()),ae.setAttr("aria-valuemax",((x=Dl(j))!=null?x:"").toString())}},Kt=h=>{D=oe(h,Xr),D>G&&(G=D+Pt),Ue()},Jt=h=>{G=oe(h,Pt),G<D&&(G=D+Pt),Ue()},qn=h=>{J=!0;for(let x=0;x<h.length;x++)Zt(h[x],x);J=!1;for(let x=0;x<h.length;x++)Zt(h[x],x)},Zt=(h,x)=>{let j;B!==void 0?(j=h==null?0:Qa(h,B),j===-1&&(j=0)):(j=oe(h,D),j<D&&(j=D),j>G&&(j=G));let ae=He(D,G,0,100,j);Me(x,ae)},Qt=h=>{if(h==null){Q=void 0;return}if(typeof h=="function"){Q=h,Ue();return}if(ue(h)){Q=oe(h,1);let x=Math.abs(G-D);Q>x&&(Q=void 0),Ue();return}Q=void 0},oi=h=>{J=h,Ue()},ai=h=>{(!ue(h)||h<0)&&(h=0),z=h},li=h=>{(!ue(h)||h<0)&&(h=1/0),ce=h},ci=h=>{fe=h,d.classList.toggle("disabled",fe),fe?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Gn=h=>{_e=h},Kn=h=>{Ee=h,Ee?document.removeEventListener("wheel",Vt):document.addEventListener("wheel",Vt,{passive:!1})},ui=h=>{if(h==null){B=void 0;return}if(B=Za(h),B===void 0||B.length<=0){B=void 0;return}Kt(0),Jt(B.length-1),Q===void 0&&Qt(1)},hi=h=>{var x;typeof h=="string"?ne=h.trim().toLowerCase()===be?be:ke:ne=ke;let j=(x=l.shadowRoot)==null?void 0:x.querySelector(".range-slider-box");if(!j)return;j.className=`range-slider-box type-${ne}`,Ue();let ae=ne===be?"vertical":"horizontal";for(let pe of m)pe.setAttr("aria-orientation",ae)},di=h=>{we=h,m.length>1&&Rn(m,we,l),Ue(),ot()},fi=h=>{Y=h,m.length>1&&Rn(m,Y,l),Ue(),ot()},pi=h=>{Le=oe(h,xt),Le<0&&(Le=xt),ot()},Jn=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(Je=void 0,d.style.removeProperty(Cn),d.classList.remove(bt)):(Je=h.toString(),d.style.setProperty(Cn,Je),d.classList.add(bt))},Zn=(h,x)=>{let j=m[h];!j||(j.setAttr("aria-label",x),In[h]=x)},er=h=>{if(ge=void 0,m.length<=1){me=!1,d.classList.remove(Ln);return}me=h,d.classList.toggle(Ln,me)},Bl=()=>{ci(xe(l.getAttribute(p))),_e=xe(l.getAttribute(b)),Ee=xe(l.getAttribute(O));let h=zt(l,/^pointer([0-9]*)-disabled$/,x=>xe(x));for(let x of h){let j=x[0];!m[j]||(m[j].disabled=x[1])}},Fl=()=>{let h=zt(l,/^aria-label([0-9]*)$/);for(let x of h){let j=x[0];Zn(j,x[1])}},Hl=h=>{let x=m.length,j=m[x-1].$pointer,ae=j.cloneNode(!0);j.after(ae);let pe=zr(l,ae,x);return pe.setCallbacks(Bn,Fn,Hn,Un),m.push(pe),Zt(h,x),Ue(),ot(),x},Ul=()=>{let h=m.length,x=m[h-1];return x?(x.destroy(),m.pop(),m.length<=1&&er(!1),Ue(),ot(),h-1):-1};return(()=>{var h,x;for(let ae of m)ae.setCallbacks(Bn,Fn,Hn,Un);let j=(h=l.shadowRoot)==null?void 0:h.querySelector(".panel-fill");j&&(U=el(j)),hi(l.getAttribute(F)),di(xe(l.getAttribute(te))),fi(xe(l.getAttribute(f))),jl(l.getAttribute(v),l.getAttribute(_)),Qt(l.getAttribute(E)),ui(l.getAttribute(g)),qn(y.map(ae=>ae[1])),oi(xe(l.getAttribute(o))),ai(oe(l.getAttribute(c),0)),li(oe(l.getAttribute(a),1/0)),er(xe(l.getAttribute(u))),pi(oe(l.getAttribute(k),xt)),Bl(),Fl(),q=xl(l,d,m),Jn((x=l.getAttribute(De))!=null?x:Dn),d.addEventListener("mousedown",jn),d.addEventListener("mouseup",Xt),d.addEventListener("touchmove",st),d.addEventListener("touchstart",st),Ee||document.addEventListener("wheel",Vt,{passive:!1}),R=$l(l,kl,{setValues:qn,setMin:Kt,setMax:Jt,setStep:Qt,setPointersOverlap:oi,setPointersMinDistance:ai,setPointersMaxDistance:li,setDisabled:ci,setType:hi,setRightToLeft:di,setBottomToTop:fi,setRound:pi,setKeyboardDisabled:Gn,setMousewheelDisabled:Kn,setRangeDragging:er,setData:ui},{getPercents:Yn,getValues:zn,getPointerElements:Xn,getMin:Vn,getMax:Wn,getStep:Wr,getData:qr,getType:Gr,getRound:Kr,getTextMin:qt,getTextMax:Gt,isRightToLeft:Qr,isBottomToTop:ei,isDisabled:ti,isKeyboardDisabled:ri,isMousewheelDisabled:ii,isPointersOverlap:ni,isRangeDraggingEnabled:si,getPointersMinDistance:Jr,getPointersMaxDistance:Zr}),R.init()})(),{get pointers(){return m},get styles(){return q},get pluginsManager(){return R},get min(){return qt()},get max(){return Gt()},get step(){return Wr()},get pointersOverlap(){return ni()},set pointersOverlap(h){oi(h)},get pointersMinDistance(){return Jr()},set pointersMinDistance(h){ai(h)},get pointersMaxDistance(){return Zr()},set pointersMaxDistance(h){li(h)},get disabled(){return ti()},set disabled(h){ci(h)},get data(){return qr()},get type(){return Gr()},set type(h){hi(h)},get rightToLeft(){return Qr()},set rightToLeft(h){di(h)},get bottomToTop(){return ei()},set bottomToTop(h){fi(h)},get round(){return Kr()},set round(h){pi(h)},get animateOnClick(){return Je},set animateOnClick(h){Jn(h)},get keyboardDisabled(){return ri()},set keyboardDisabled(h){Gn(h)},get mousewheelDisabled(){return ii()},set mousewheelDisabled(h){Kn(h)},get rangeDragging(){return si()},set rangeDragging(h){er(h)},setMin:Kt,setMax:Jt,setValue:Zt,setStep:Qt,setData:ui,getTextValue:$t,setAriaLabel:Zn,getAriaLabel:Il,addPointer:Hl,removePointer:Ul,destroy:()=>{d.removeEventListener("mousedown",jn),d.removeEventListener("mouseup",Xt),d.removeEventListener("touchmove",st),d.removeEventListener("touchstart",st),document.removeEventListener("wheel",Vt);for(let h of m)h.destroy();R==null||R.destroy()}}},Al=(l,d,y)=>{let m=kn.find(([R,D,G,Q])=>D.replace("#","")===d.replace(/\d+/g,""));if(m&&l.styles){let[R,D,G,Q]=m,B=d.replace(/\D/g,"").trim(),ne=B===""||B==="0"||B==="1"?0:oe(B,0)-1;l.styles.setStyle(R,y,ne);return}switch(l&&l.pluginsManager&&l.pluginsManager.onAttrChange(d,y),d){case v:{l.setMin(y);break}case _:{l.setMax(y);break}case E:{l.setStep(y);break}case o:{l.pointersOverlap=xe(y);break}case c:{l.pointersMinDistance=oe(y,0);break}case u:{l.rangeDragging=xe(y);break}case a:{l.pointersMaxDistance=oe(y,1/0);break}case p:{l.disabled=xe(y);break}case b:{l.keyboardDisabled=xe(y);break}case O:{l.mousewheelDisabled=xe(y);break}case g:{l.setData(y);break}case F:{l.type=y;break}case te:{l.rightToLeft=xe(y);break}case f:{l.bottomToTop=xe(y);break}case k:{l.round=oe(y,xt);break}case se:{l.styles&&(l.styles.theme=y);break}case De:{l.animateOnClick=y;break}}let T=null;if(/^value([0-9]*)$/.test(d)&&(T="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(T="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(T="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(T="pointer-shape"),!T)return;let U=d.replace(/\D/g,"").trim(),q=U===""||U==="0"||U==="1"?0:oe(U,0)-1;switch(T){case"value":{l.setValue(y,q);break}case"pointer-disabled":{let R=l==null?void 0:l.pointers[q];if(!R)return;R.disabled=xe(y);break}case"aria-label":{l.setAriaLabel(q,y);break}case"pointer-shape":{l.styles&&l.styles.setPointerShape(q,y);break}}},Ol=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(l){this.slider&&this.slider.setStep(l)}get step(){var l;return(l=this.slider)==null?void 0:l.step}set disabled(l){this.slider&&(this.slider.disabled=l)}get disabled(){var l,d;return(d=(l=this.slider)==null?void 0:l.disabled)!=null?d:!1}set data(l){var d;(d=this.slider)==null||d.setData(l)}get data(){var l;return(l=this.slider)==null?void 0:l.data}set min(l){var d;(d=this.slider)==null||d.setMin(l)}get min(){var l;return(l=this.slider)==null?void 0:l.min}set max(l){var d;(d=this.slider)==null||d.setMax(l)}get max(){var l;return(l=this.slider)==null?void 0:l.max}set round(l){!this.slider||(this.slider.round=l)}get round(){var l,d;return(d=(l=this.slider)==null?void 0:l.round)!=null?d:xt}set type(l){!this.slider||(this.slider.type=l??ke)}get type(){var l;return((l=this.slider)==null?void 0:l.type)||ke}set pointersOverlap(l){!this.slider||(this.slider.pointersOverlap=l)}get pointersOverlap(){var l,d;return(d=(l=this.slider)==null?void 0:l.pointersOverlap)!=null?d:!1}set pointersMinDistance(l){!this.slider||(this.slider.pointersMinDistance=l)}get pointersMinDistance(){var l,d;return(d=(l=this.slider)==null?void 0:l.pointersMinDistance)!=null?d:0}set pointersMaxDistance(l){!this.slider||(this.slider.pointersMaxDistance=l)}get pointersMaxDistance(){var l,d;return(d=(l=this.slider)==null?void 0:l.pointersMaxDistance)!=null?d:1/0}set theme(l){!this.slider||!this.slider.styles||(this.slider.styles.theme=l)}get theme(){var l,d,y;return(y=(d=(l=this.slider)==null?void 0:l.styles)==null?void 0:d.theme)!=null?y:null}set rtl(l){!this.slider||(this.slider.rightToLeft=l)}get rtl(){var l,d;return(d=(l=this.slider)==null?void 0:l.rightToLeft)!=null?d:!1}set btt(l){!this.slider||(this.slider.bottomToTop=l)}get btt(){var l,d;return(d=(l=this.slider)==null?void 0:l.bottomToTop)!=null?d:!1}set keyboardDisabled(l){!this.slider||(this.slider.keyboardDisabled=l)}get keyboardDisabled(){var l,d;return(d=(l=this.slider)==null?void 0:l.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(l){!this.slider||(this.slider.mousewheelDisabled=l)}get mousewheelDisabled(){var l,d;return(d=(l=this.slider)==null?void 0:l.mousewheelDisabled)!=null?d:!1}set animateOnClick(l){!this.slider||(this.slider.animateOnClick=l)}get animateOnClick(){var l;return(l=this.slider)==null?void 0:l.animateOnClick}get rangeDragging(){var l,d;return(d=(l=this.slider)==null?void 0:l.rangeDragging)!=null?d:!1}set rangeDragging(l){this.slider&&(this.slider.rangeDragging=xe(l))}get externalCSSList(){return this._externalCSSList}addPointer(l){var d;if(!this.slider)return;let y=(d=this.slider)==null?void 0:d.addPointer(l);Tn(this,this.slider,y,`value${y+1}`,`ariaLabel${y+1}`,`pointerShape${y+1}`,`pointer${y+1}Disabled`)}removePointer(){var l;!this.slider||(l=this.slider)==null||l.removePointer()}addCSS(l){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=l,this.shadowRoot.appendChild(d)}connectedCallback(){var l,d;if(!this.shadowRoot)return;this._externalCSSList=bl(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let y=(l=this.shadowRoot)==null?void 0:l.querySelector(".pointer");if(!y)return;let m=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!m)return;let T=_l(this,y);this.slider=Ml(this,m,T),El(this,this.slider),this._observer=new MutationObserver(U=>{U.forEach(q=>{var R;if(!this.slider||q.type!=="attributes")return;let D=q.attributeName;!D||Al(this.slider,D,(R=this.getAttribute(D))!=null?R:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Vr=Ol;window.tcRangeSlider=Vr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Vr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Vr{})})();var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function vr(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var n=[null];n.push.apply(n,arguments);var s=Function.bind.apply(e,n);return new s}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var ji={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ht,function(){var t=1e3,i=6e4,n=36e5,s="millisecond",o="second",c="minute",a="hour",u="day",g="week",v="month",_="quarter",E="year",k="date",F="Invalid Date",se=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,te=/\[([^\]]+)]|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,f={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(C){var $=["th","st","nd","rd"],A=C%100;return"["+C+($[(A-20)%10]||$[A]||$[0])+"]"}},p=function(C,$,A){var N=String(C);return!N||N.length>=$?C:""+Array($+1-N.length).join(A)+C},b={s:p,z:function(C){var $=-C.utcOffset(),A=Math.abs($),N=Math.floor(A/60),S=A%60;return($<=0?"+":"-")+p(N,2,"0")+":"+p(S,2,"0")},m:function C($,A){if($.date()<A.date())return-C(A,$);var N=12*(A.year()-$.year())+(A.month()-$.month()),S=$.clone().add(N,v),H=A-S<0,V=$.clone().add(N+(H?-1:1),v);return+(-(N+(A-S)/(H?S-V:V-S))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:v,y:E,w:g,d:u,D:k,h:a,m:c,s:o,ms:s,Q:_}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},O="en",w={};w[O]=f;var M=function(C){return C instanceof W},P=function C($,A,N){var S;if(!$)return O;if(typeof $=="string"){var H=$.toLowerCase();w[H]&&(S=H),A&&(w[H]=A,S=H);var V=$.split("-");if(!S&&V.length>1)return C(V[0])}else{var Z=$.name;w[Z]=$,S=Z}return!N&&S&&(O=S),S||!N&&O},L=function(C,$){if(M(C))return C.clone();var A=typeof $=="object"?$:{};return A.date=C,A.args=arguments,new W(A)},I=b;I.l=P,I.i=M,I.w=function(C,$){return L(C,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var W=function(){function C(A){this.$L=P(A.locale,null,!0),this.parse(A)}var $=C.prototype;return $.parse=function(A){this.$d=function(N){var S=N.date,H=N.utc;if(S===null)return new Date(NaN);if(I.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var V=S.match(se);if(V){var Z=V[2]-1||0,le=(V[7]||"0").substring(0,3);return H?new Date(Date.UTC(V[1],Z,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)):new Date(V[1],Z,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)}}return new Date(S)}(A),this.$x=A.x||{},this.init()},$.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},$.$utils=function(){return I},$.isValid=function(){return this.$d.toString()!==F},$.isSame=function(A,N){var S=L(A);return this.startOf(N)<=S&&S<=this.endOf(N)},$.isAfter=function(A,N){return L(A)<this.startOf(N)},$.isBefore=function(A,N){return this.endOf(N)<L(A)},$.$g=function(A,N,S){return I.u(A)?this[N]:this.set(S,A)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(A,N){var S=this,H=!!I.u(N)||N,V=I.p(A),Z=function(He,ue){var oe=I.w(S.$u?Date.UTC(S.$y,ue,He):new Date(S.$y,ue,He),S);return H?oe:oe.endOf(u)},le=function(He,ue){return I.w(S.toDate()[He].apply(S.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(ue)),S)},K=this.$W,ve=this.$M,De=this.$D,Ie="set"+(this.$u?"UTC":"");switch(V){case E:return H?Z(1,0):Z(31,11);case v:return H?Z(1,ve):Z(0,ve+1);case g:var be=this.$locale().weekStart||0,ke=(K<be?K+7:K)-be;return Z(H?De-ke:De+(6-ke),ve);case u:case k:return le(Ie+"Hours",0);case a:return le(Ie+"Minutes",1);case c:return le(Ie+"Seconds",2);case o:return le(Ie+"Milliseconds",3);default:return this.clone()}},$.endOf=function(A){return this.startOf(A,!1)},$.$set=function(A,N){var S,H=I.p(A),V="set"+(this.$u?"UTC":""),Z=(S={},S[u]=V+"Date",S[k]=V+"Date",S[v]=V+"Month",S[E]=V+"FullYear",S[a]=V+"Hours",S[c]=V+"Minutes",S[o]=V+"Seconds",S[s]=V+"Milliseconds",S)[H],le=H===u?this.$D+(N-this.$W):N;if(H===v||H===E){var K=this.clone().set(k,1);K.$d[Z](le),K.init(),this.$d=K.set(k,Math.min(this.$D,K.daysInMonth())).$d}else Z&&this.$d[Z](le);return this.init(),this},$.set=function(A,N){return this.clone().$set(A,N)},$.get=function(A){return this[I.p(A)]()},$.add=function(A,N){var S,H=this;A=Number(A);var V=I.p(N),Z=function(ve){var De=L(H);return I.w(De.date(De.date()+Math.round(ve*A)),H)};if(V===v)return this.set(v,this.$M+A);if(V===E)return this.set(E,this.$y+A);if(V===u)return Z(1);if(V===g)return Z(7);var le=(S={},S[c]=i,S[a]=n,S[o]=t,S)[V]||1,K=this.$d.getTime()+A*le;return I.w(K,this)},$.subtract=function(A,N){return this.add(-1*A,N)},$.format=function(A){var N=this,S=this.$locale();if(!this.isValid())return S.invalidDate||F;var H=A||"YYYY-MM-DDTHH:mm:ssZ",V=I.z(this),Z=this.$H,le=this.$m,K=this.$M,ve=S.weekdays,De=S.months,Ie=function(ue,oe,mt,yt){return ue&&(ue[oe]||ue(N,H))||mt[oe].slice(0,yt)},be=function(ue){return I.s(Z%12||12,ue,"0")},ke=S.meridiem||function(ue,oe,mt){var yt=ue<12?"AM":"PM";return mt?yt.toLowerCase():yt},He={YY:String(this.$y).slice(-2),YYYY:I.s(this.$y,4,"0"),M:K+1,MM:I.s(K+1,2,"0"),MMM:Ie(S.monthsShort,K,De,3),MMMM:Ie(De,K),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:Ie(S.weekdaysMin,this.$W,ve,2),ddd:Ie(S.weekdaysShort,this.$W,ve,3),dddd:ve[this.$W],H:String(Z),HH:I.s(Z,2,"0"),h:be(1),hh:be(2),a:ke(Z,le,!0),A:ke(Z,le,!1),m:String(le),mm:I.s(le,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:V};return H.replace(te,function(ue,oe){return oe||He[ue]||V.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(A,N,S){var H,V=I.p(N),Z=L(A),le=(Z.utcOffset()-this.utcOffset())*i,K=this-Z,ve=I.m(this,Z);return ve=(H={},H[E]=ve/12,H[v]=ve,H[_]=ve/3,H[g]=(K-le)/6048e5,H[u]=(K-le)/864e5,H[a]=K/n,H[c]=K/i,H[o]=K/t,H)[V]||K,S?ve:I.a(ve)},$.daysInMonth=function(){return this.endOf(v).$D},$.$locale=function(){return w[this.$L]},$.locale=function(A,N){if(!A)return this.$L;var S=this.clone(),H=P(A,N,!0);return H&&(S.$L=H),S},$.clone=function(){return I.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},C}(),ee=W.prototype;return L.prototype=ee,[["$ms",s],["$s",o],["$m",c],["$H",a],["$W",u],["$M",v],["$y",E],["$D",k]].forEach(function(C){ee[C[1]]=function($){return this.$g($,C[0],C[1])}}),L.extend=function(C,$){return C.$i||(C($,W,L),C.$i=!0),L},L.locale=P,L.isDayjs=M,L.unix=function(C){return L(1e3*C)},L.en=w[O],L.Ls=w,L.p={},L})})(ji);var ys=ji.exports;const It=gr(ys);class bs extends Se{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,t){this._startExpression=e,this._endExpression=t;const i=this.escapeRegex(this._startExpression),n=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${i}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${n}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,t,i){if(!this.hasTemplate(e))return null;i=i||e;const n=he` <slot name=${i}></slot> `,s={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:c}=this._renderedTemplates[i];this.contains(c)&&this.removeChild(c)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let t=0;t<this.children.length;t++){const i=this.children[t];if(i.nodeName==="TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=t}}return e}_renderTemplate(e,t,i){let n;if(t.content&&t.content.childNodes.length){const s=t.content.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,t){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),t);return s?typeof s=="object"?JSON.stringify(s):s.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,t){t={...t};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(t)}catch{}return n}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,t,i){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,i),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=i,e;for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n];this.renderNode(s,t,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const Ni=`
63
+ */const qi=Symbol.for(""),Ss=r=>{if((r==null?void 0:r.r)===qi)return r==null?void 0:r._$litStatic$},Nt=r=>({_$litStatic$:r,r:qi}),Gi=new Map,Ps=r=>(e,...t)=>{const i=t.length;let n,s;const o=[],l=[];let a,u=0,p=!1;for(;u<i;){for(a=e[u];u<i&&(s=t[u],(n=Ss(s))!==void 0);)a+=n+e[++u],p=!0;u!==i&&l.push(s),o.push(a),u++}if(u===i&&o.push(e[i]),p){const v=o.join("$$lit$$");(e=Gi.get(v))===void 0&&(o.raw=o,Gi.set(v,e=o)),t=l}return r(e,...t)},xr=Ps(he);(()=>{var r=Object.defineProperty,e=Math.pow,t=(c,d,b)=>d in c?r(c,d,{enumerable:!0,configurable:!0,writable:!0,value:b}):c[d]=b,i=(c,d,b)=>(t(c,typeof d!="symbol"?d+"":d,b),b),n=(c,d)=>` ${d&&d.length>0?d.map(b=>`<link rel="stylesheet" href="${b}" />`).join(""):""} <style> ${c} </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>`,s=":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}",o="pointers-overlap",l="pointers-min-distance",a="pointers-max-distance",u="range-dragging",p="data",v="min",y="max",x="step",M="round",j="type",q="theme",J="rtl",f="btt",g="disabled",$="keyboard-disabled",S="mousewheel-disabled",E="slider-width",A="slider-height",C="slider-radius",L="slider-bg",I="slider-bg-hover",W="slider-bg-fill",re="pointer-width",k="pointer-height",_="pointer-radius",O="pointer-bg",B="pointer-bg-hover",P="pointer-bg-focus",H="pointer-shadow",V="pointer-shadow-hover",ee="pointer-shadow-focus",le="pointer-border",Z="pointer-border-hover",ve="pointer-border-focus",De="animate-onclick",Ie="css-links",be="vertical",Le="horizontal",He=(c,d,b,m,T)=>{let U=d-c;return U===0?b:(m-b)*(T-c)/U+b},ue=c=>!isNaN(parseFloat(c))&&isFinite(c),oe=(c,d)=>ue(c)?Number(c):d,bt=(c,d)=>d===0?0:Math.round(c/d)*d,xt=(c,d=1/0)=>{if(d===1/0)return c;let b=e(10,d);return Math.round(c*b)/b},xe=c=>c==null?!1:typeof c=="boolean"?c:c.trim().toLowerCase()==="true",rl=(c,d)=>{c.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},il=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},nl=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},sl=(c,d)=>{c.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},ol=(c,d)=>{if(!d||d.length<=0)return;let b=d.map(T=>ue(T)?oe(T,T):T),m={values:b||[]};m.value=b[0],m.value0=b[0],m.value1=b[0];for(let T=1;T<b.length;T++)m[`value${T+1}`]=b[T];c.dispatchEvent(new CustomEvent("change",{detail:m}))},Kr=(c,d,b)=>{let m=0,T,U,G,R,D=!1,K=(z,ce,me,ge,de,fe)=>{let _e=m;me!==void 0&&z>me&&(z=me),ce!==void 0&&z<ce&&(z=ce),m=z;let Ee=m;return(ge===be&&fe||ge===Le&&de)&&(Ee=100-Ee),ge===be?d.style.top=`${Ee}%`:d.style.left=`${Ee}%`,_e!==m},te=z=>z===d||d.contains(z),F=(z,ce,me,ge)=>{T=z,U=ce,G=me,R=ge},se=z=>{D=z,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Te=(z,ce)=>{ce==null?d.removeAttribute(z):d.setAttribute(z,ce)},we=z=>d.getAttribute(z),Y=z=>{if(!D){switch(z.key){case"ArrowLeft":{z.preventDefault(),typeof T=="function"&&T(b);break}case"ArrowRight":{z.preventDefault(),typeof U=="function"&&U(b);break}case"ArrowUp":{z.preventDefault(),typeof G=="function"&&G(b);break}case"ArrowDown":{z.preventDefault(),typeof R=="function"&&R(b);break}}sl(c,z)}},Q=()=>{D||rl(c,d)};return d.className=`pointer pointer-${b}`,d.addEventListener("keydown",Y),d.addEventListener("click",Q),{$pointer:d,get percent(){return m},get disabled(){return D},set disabled(z){se(z)},updatePosition:K,isClicked:te,setCallbacks:F,setAttr:Te,getAttr:we,destroy:()=>{d.removeEventListener("keydown",Y),d.removeEventListener("click",Q),d.remove()}}},al=c=>{if(c==null)return;if(Array.isArray(c))return c;if(c.trim()==="")return;let d=c.split(","),b=[],m=!0;for(let T=0;T<d.length;T++){let U=d[T].trim();U!==""&&(b.push(U),ue(U)||(m=!1))}return m?b.map(T=>Number(T)):b},ll=(c,d)=>d?d.findIndex(b=>b===c||b.toString().trim()===c.toString().trim()):-1,cl=c=>({updatePosition:(d,b,m,T)=>{if(b.length<=0)return;let U=b.length===1,G=b[0],R=b[b.length-1];d===be?(c.style.removeProperty("width"),c.style.removeProperty("right"),c.style.removeProperty("left"),U?c.style.height=`${G}%`:c.style.height=`${Math.abs(G-R)}%`,T?(c.style.bottom="0%",U?c.style.top="auto":c.style.top=`${Math.min(100-R,100-G)}%`):(c.style.bottom="auto",U?c.style.top="0%":c.style.top=`${Math.min(G,R)}%`)):(c.style.removeProperty("height"),c.style.removeProperty("top"),c.style.removeProperty("bottom"),U?c.style.width=`${G}%`:c.style.width=`${Math.abs(G-R)}%`,m?(c.style.right="0%",U?c.style.left="auto":c.style.left=`${Math.min(100-R,100-G)}%`):(c.style.right="auto",U?c.style.left="0%":c.style.left=`${Math.min(G,R)}%`))}}),Yn="--animate-onclick",ul="--width",hl="--height",dl="--panel-bg-border-radius",fl="--panel-bg",pl="--panel-bg-hover",gl="--panel-bg-fill",vl="--pointer-width",ml="--pointer-height",yl="--pointer-border-radius",bl="--pointer-bg",xl="--pointer-bg-hover",$l="--pointer-bg-focus",wl="--pointer-shadow",_l="--pointer-shadow-hover",El="--pointer-shadow-focus",Ml="--pointer-border",Al="--pointer-border-hover",Ol="--pointer-border-focus",Wt=(c,d,b)=>{let m=new Map;for(let T of c.attributes){let U=T.nodeName.trim().toLowerCase();if(!d.test(U))continue;let G=U.replace(/\D/g,"").trim(),R=G===""||G==="0"||G==="1"?0:oe(G,0)-1,D=b&&typeof b=="function"?b(T.value):T.value;m.set(R,D)}return m},Sl=c=>{if(!c)return null;let d=c.getAttribute(Ie);if(!d)return null;let b=d.split(";"),m=[];for(let T of b)T.trim()!==""&&m.push(T.trim());return m},zn=[[ul,E,"sliderWidth",null],[hl,A,"sliderHeight",null],[dl,C,"sliderRadius",null],[fl,L,"sliderBg",null],[pl,I,"sliderBgHover",null],[gl,W,"sliderBgFill",null],[vl,re,"pointer#Width",/^pointer([0-9]*)-width$/],[ml,k,"pointer#Height",/^pointer([0-9]*)-height$/],[yl,_,"pointer#Radius",/^pointer([0-9]*)-radius$/],[bl,O,"pointer#Bg",/^pointer([0-9]*)-bg$/],[xl,B,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[$l,P,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[wl,H,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[_l,V,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[El,ee,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Ml,le,"pointer#Border",/^pointer([0-9]*)-border$/],[Al,Z,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Ol,ve,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Pl=(c,d,b)=>{let m=null,T=[],U=new Map,G=(Y,Q=d)=>{let z=[...Q.classList];for(let ce of z)ce.startsWith(Y)&&d.classList.remove(ce)},R=()=>{G("shape");let Y=d.querySelectorAll(".pointer");for(let Q of Y)G("shape",Q)},D=Y=>{m=Y,G("theme-"),typeof Y=="string"&&d.classList.add(`theme-${Y}`)},K=()=>{if(R(),!(T.length<=0)){d.classList.add("shape",`shape-${T[0]}`);for(let Y=1;Y<T.length;Y++){let Q=T[Y];if(!Q)continue;let z=d.querySelector(`.pointer-${Y}`);!z||z.classList.add("shape",`shape-${Q}`)}}},te=(Y,Q)=>{T[Y]=Q,K()},F=()=>{R();let Y=Wt(c,/^pointer([0-9]*)-shape$/);if(!(Y.size<=0)){for(let Q of Y){let z=Q[0];T[z]=Q[1]}K()}},se=(Y,Q)=>`${Y}-${Q}`,Te=(Y,Q,z)=>{let ce=b[z];if(!ce)return;let me=z===0?d:ce.$pointer;if(Q==null){U.has(se(Y,z))&&U.delete(se(Y,z)),me.style.removeProperty(Y);return}U.set(se(Y,z),Q),me.style.setProperty(Y,Q)},we=(Y,Q)=>U.get(se(Y,Q));return(()=>{for(let Y of zn){let[Q,z,ce,me]=Y;if(me){let de=Wt(c,me);for(let fe of de){let _e=fe[0],Ee=fe[1];Te(Q,Ee,_e)}}else{let de=c.getAttribute(z);Te(Q,de,0)}let ge=[];if(ce.indexOf("#")===-1)ge.push([ce,0]);else{ge.push([ce.replace("#",""),0]),ge.push([ce.replace("#","0"),0]),ge.push([ce.replace("#","1"),0]);for(let de=1;de<b.length;de++)ge.push([ce.replace("#",(de+1).toString()),de])}for(let de of ge)try{let fe=de[0],_e=de[1];Object.prototype.hasOwnProperty.call(c,fe)||Object.defineProperty(c,fe,{get(){return we(Q,_e)},set:Ee=>{Te(Q,Ee,_e)}})}catch(fe){console.error(fe)}}D(c.getAttribute(q)),F()})(),{setStyle:Te,getStyle:we,get theme(){return m},set theme(Y){D(Y)},get pointerShapes(){return T},setPointerShape:te}},$t="animate-on-click",Xn="range-dragging",Cl=(c,d,b,m)=>{let T=[],U=te=>{for(let F of T)F.update&&typeof F.update=="function"&&F.update(te)},G=()=>{for(let te of T)te.destroy&&typeof te.destroy=="function"&&te.destroy()},R=(te,F)=>{for(let se of T)se.onAttrChange&&typeof se.onAttrChange=="function"&&se.onAttrChange(te,F)},D=te=>{if(te.gettersAndSetters){for(let F of te.gettersAndSetters)if(!(!F.name||!F.attributes))try{Object.prototype.hasOwnProperty.call(c,F.name)||Object.defineProperty(c,F.name,F.attributes)}catch(se){console.error("defineSettersGetters error:",se)}}},K=te=>{var F;if(!te.css)return;let se=(F=c.shadowRoot)==null?void 0:F.querySelector("style");!se||(se.innerHTML+=te.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let te of window.tcRangeSliderPlugins){let F=te();T.push(F),F.init&&typeof F.init=="function"&&(F.init(c,d,b,m),D(F),K(F))}},update:U,onAttrChange:R,destroy:G}},kl=10,Ll=(c,d)=>{let b=new Map,m=/^value([0-9]*)$/;for(let R of c.attributes){let D=R.nodeName.trim().toLowerCase();if(!m.test(D))continue;let K=D.replace("value","").trim(),te=K===""||K==="0"||K==="1"?0:oe(K,0)-1,F=ue(R.value)?oe(R.value,0):R.value;b.set(te,F)}let T=Math.max(...Array.from(b.keys())),U=[];U.push([Kr(c,d,0),b.get(0)]);let G=d;for(let R=1;R<=T;R++){let D=d.cloneNode(!0);G.after(D),G=D,U.push([Kr(c,D,R),b.get(R)])}return U},Vn=(c,d,b,m,T,U,G)=>{try{Object.defineProperty(c,m,{configurable:!0,get(){if(!d)return;let R=d.pointers[b];if(!R)return;let D=d.getTextValue(R.percent);return ue(D)?oe(D,D):D},set:R=>{d.pointers[b]?d==null||d.setValue(R,b):d==null||d.addPointer(R)}}),Object.defineProperty(c,T,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.pointers[b])==null?void 0:R.getAttr("aria-label"))!=null?D:void 0},set:R=>{!d||d.setAriaLabel(b,R)}}),Object.defineProperty(c,U,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.styles)==null?void 0:R.pointerShapes[b])!=null?D:null},set:R=>{!d||!d.styles||d.styles.setPointerShape(b,R)}}),Object.defineProperty(c,G,{configurable:!0,get(){var R;return(R=d==null?void 0:d.pointers[b].disabled)!=null?R:!1},set:R=>{if(!d)return;let D=d==null?void 0:d.pointers[b];!D||(D.disabled=R)}})}catch(R){console.error(R)}},Tl=(c,d)=>{let b=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let m=2;m<kl;m++)b.push([`value${m}`,`ariaLabel${m}`,`pointer${m}Shape`,`pointer${m}Disabled`,m-1]);for(let m of b)Vn(c,d,m[4],m[0],m[1],m[2],m[3])},Wn=(c,d,b)=>{var m;let T=(m=b.shadowRoot)==null?void 0:m.querySelector(".container");if(T)for(let U of c)d?T.prepend(U.$pointer):T.append(U.$pointer)},Jr=0,Lt=100,wt=2,qn="0.3s",Rl=(c,d,b)=>{let m=b.map(h=>h[0]),T=null,U=null,G=null,R=null,D=Jr,K=Lt,te,F,se=Le,Te=wt,we=!1,Y=!1,Q=!1,z=0,ce=1/0,me=!1,ge,de,fe=!1,_e=!1,Ee=!1,Ze=qn,Gn=[],Kn=h=>{fe||(h.preventDefault&&h.preventDefault(),ot(h),window.addEventListener("mousemove",ot),window.addEventListener("mouseup",qt),il(c,h))},qt=h=>{fe||(ge=void 0,de=void 0,window.removeEventListener("mousemove",ot),window.removeEventListener("mouseup",qt),Ze&&d.classList.add($t),nl(c,h))},jl=(h,w)=>{if(m.length<=0)return;if(m.length===1)return m[0].isClicked(h)&&Ze&&d.classList.remove($t),m[0];let N=Bl(h);if(me){let ie=w,je=Kt(ie);je!==void 0&&(ie=bt(ie,je)),N?(ge=ie,de=0,Ze&&d.classList.remove($t)):ge!==void 0&&(de=ie-ge,ge=ie)}if(!Nl(h)&&!N){for(let ie of m)if(!(!ie.isClicked(h)||ie.disabled))return Ze&&d.classList.remove($t),ie;for(let ie of m)if(T===ie)return ie}let ae=1/0,pe=null;for(let ie of m){if(ie.disabled)continue;let je=Math.abs(w-ie.percent);je<ae&&(ae=je,pe=ie)}return pe},Jn=()=>m.findIndex(h=>T===h&&!h.disabled),ot=h=>{let w;if(se===be){let{height:ae,top:pe}=d.getBoundingClientRect(),ie=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;w=Math.min(Math.max(0,ie-pe),ae)*100/ae}else{let{width:ae,left:pe}=d.getBoundingClientRect(),ie=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;w=Math.min(Math.max(0,ie-pe),ae)*100/ae}if((we||Y)&&(w=100-w),T=jl(h.target,w),me&&m.length>1&&de!==void 0){let ae=m[0],pe=m[m.length-1],ie=ae.percent+de<0,je=pe.percent+de>100;if(ie||je)return;for(let nr=0;nr<m.length;nr++)Me(nr,m[nr].percent+de);return}let N=Jn();N!==-1&&(Me(N,w),T==null||T.$pointer.focus())},Gt=h=>{if(fe||document.activeElement!==c||T!=null&&T.disabled)return;h.stopPropagation(),h.preventDefault();let w=h.deltaY<0,N=we||Y,ae=w?!N:N,pe=Jn();pe!==-1&&(ae?Tt(pe,m[pe].percent):Rt(pe,m[pe].percent))},Zn=h=>{fe||_e||(se===be?Y?Me(h,100):Me(h,0):we?Rt(h,m[h].percent):Tt(h,m[h].percent))},Qn=h=>{fe||_e||(se===be?Y?Me(h,0):Me(h,100):we?Tt(h,m[h].percent):Rt(h,m[h].percent))},es=h=>{fe||_e||(se===be?Y?Rt(h,m[h].percent):Tt(h,m[h].percent):we?Me(h,100):Me(h,0))},ts=h=>{fe||_e||(se===be?Y?Tt(h,m[h].percent):Rt(h,m[h].percent):we?Me(h,0):Me(h,100))},Nl=h=>h.classList.contains("panel"),Bl=h=>h.classList.contains("panel-fill"),Tt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w-=N,w<0&&(w=0),Me(h,w)},Rt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w+=N,w>100&&(w=100),Me(h,w)},at=()=>{!R||R.update({percents:rs(),values:is(),$pointers:ns(),min:ss(),max:os(),data:ei(),step:Qr(),round:ri(),type:ti(),textMin:Jt(),textMax:Zt(),rightToLeft:si(),bottomToTop:oi(),pointersOverlap:ui(),pointersMinDistance:ii(),pointersMaxDistance:ni(),rangeDragging:hi(),disabled:ai(),keyboardDisabled:li(),mousewheelDisabled:ci()})},Fl=()=>{at()},Hl=h=>{if(!(Q||m.length<=1||K===D))if(h===0){let w=ce*100/(K-D);return Math.max(0,m[h+1].percent-w)}else{let w=z*100/(K-D);return Math.min(m[h-1].percent+w,100)}},Ul=h=>{if(!(Q||m.length<=1||K===D))if(h===m.length-1){let w=ce*100/(K-D);return Math.min(m[h-1].percent+w,100)}else{let w=z*100/(K-D);return Math.max(0,m[h+1].percent-w)}},Kt=h=>{let w;if(typeof te=="function"){let N=He(0,100,D,K,h);w=te(N,h)}else w=te;if(ue(w)){let N=K-D;return w=N===0?0:w*100/N,w}},_t=h=>{if(h===void 0)return;let w=He(0,100,D,K,h);return F!==void 0?F[Math.round(w)]:xt(w,Te)},Jt=()=>F!==void 0?F[D]:D,Zt=()=>F!==void 0?F[K]:K,Qr=()=>te,Yl=h=>{var w;return h<=0||Q?Jt():(w=_t(m[h-1].percent))!=null?w:""},zl=h=>{var w;return m.length<=1||h>=m.length-1||Q?Zt():(w=_t(m[h+1].percent))!=null?w:""},rs=()=>m.map(h=>h.percent),is=()=>m.map(h=>_t(h.percent)),ns=()=>m.map(h=>h.$pointer),ss=()=>D,os=()=>K,ei=()=>F,ti=()=>se,ri=()=>Te,ii=()=>z,ni=()=>ce,Xl=h=>Gn[h],si=()=>we,oi=()=>Y,ai=()=>fe,li=()=>_e,ci=()=>Ee,ui=()=>Q,hi=()=>me,Me=(h,w)=>{if(w===void 0)return;let N=Kt(w);N!==void 0&&(w=bt(w,N));let ae=m[h];if(!ae)return;let pe=ae.updatePosition(w,Hl(h),Ul(h),se,we,Y);U==null||U.updatePosition(se,m.map(ie=>ie.percent),we,Y),at();for(let ie of m){let je=_t(ie.percent);je!==void 0&&(ie.setAttr("aria-valuenow",je.toString()),ie.setAttr("aria-valuetext",je.toString()))}Wl(),pe&&ol(c,m.map(ie=>_t(ie.percent)))},Ue=()=>{for(let h=0;h<m.length;h++)Me(h,m[h].percent)},Vl=(h,w)=>{D=F!==void 0?0:oe(h,Jr),K=F!==void 0?F.length-1:oe(w,Lt),Qt(D),er(K)},Wl=()=>{var h,w;for(let N=0;N<m.length;N++){let ae=m[N];ae.setAttr("aria-valuemin",((h=Yl(N))!=null?h:"").toString()),ae.setAttr("aria-valuemax",((w=zl(N))!=null?w:"").toString())}},Qt=h=>{D=oe(h,Jr),D>K&&(K=D+Lt),Ue()},er=h=>{K=oe(h,Lt),K<D&&(K=D+Lt),Ue()},as=h=>{Q=!0;for(let w=0;w<h.length;w++)tr(h[w],w);Q=!1;for(let w=0;w<h.length;w++)tr(h[w],w)},tr=(h,w)=>{let N;F!==void 0?(N=h==null?0:ll(h,F),N===-1&&(N=0)):(N=oe(h,D),N<D&&(N=D),N>K&&(N=K));let ae=He(D,K,0,100,N);Me(w,ae)},rr=h=>{if(h==null){te=void 0;return}if(typeof h=="function"){te=h,Ue();return}if(ue(h)){te=oe(h,1);let w=Math.abs(K-D);te>w&&(te=void 0),Ue();return}te=void 0},di=h=>{Q=h,Ue()},fi=h=>{(!ue(h)||h<0)&&(h=0),z=h},pi=h=>{(!ue(h)||h<0)&&(h=1/0),ce=h},gi=h=>{fe=h,d.classList.toggle("disabled",fe),fe?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},ls=h=>{_e=h},cs=h=>{Ee=h,Ee?document.removeEventListener("wheel",Gt):document.addEventListener("wheel",Gt,{passive:!1})},vi=h=>{if(h==null){F=void 0;return}if(F=al(h),F===void 0||F.length<=0){F=void 0;return}Qt(0),er(F.length-1),te===void 0&&rr(1)},mi=h=>{var w;typeof h=="string"?se=h.trim().toLowerCase()===be?be:Le:se=Le;let N=(w=c.shadowRoot)==null?void 0:w.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${se}`,Ue();let ae=se===be?"vertical":"horizontal";for(let pe of m)pe.setAttr("aria-orientation",ae)},yi=h=>{we=h,m.length>1&&Wn(m,we,c),Ue(),at()},bi=h=>{Y=h,m.length>1&&Wn(m,Y,c),Ue(),at()},xi=h=>{Te=oe(h,wt),Te<0&&(Te=wt),at()},us=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(Ze=void 0,d.style.removeProperty(Yn),d.classList.remove($t)):(Ze=h.toString(),d.style.setProperty(Yn,Ze),d.classList.add($t))},hs=(h,w)=>{let N=m[h];!N||(N.setAttr("aria-label",w),Gn[h]=w)},ir=h=>{if(ge=void 0,m.length<=1){me=!1,d.classList.remove(Xn);return}me=h,d.classList.toggle(Xn,me)},ql=()=>{gi(xe(c.getAttribute(g))),_e=xe(c.getAttribute($)),Ee=xe(c.getAttribute(S));let h=Wt(c,/^pointer([0-9]*)-disabled$/,w=>xe(w));for(let w of h){let N=w[0];!m[N]||(m[N].disabled=w[1])}},Gl=()=>{let h=Wt(c,/^aria-label([0-9]*)$/);for(let w of h){let N=w[0];hs(N,w[1])}},Kl=h=>{let w=m.length,N=m[w-1].$pointer,ae=N.cloneNode(!0);N.after(ae);let pe=Kr(c,ae,w);return pe.setCallbacks(Zn,Qn,es,ts),m.push(pe),tr(h,w),Ue(),at(),w},Jl=()=>{let h=m.length,w=m[h-1];return w?(w.destroy(),m.pop(),m.length<=1&&ir(!1),Ue(),at(),h-1):-1};return(()=>{var h,w;for(let ae of m)ae.setCallbacks(Zn,Qn,es,ts);let N=(h=c.shadowRoot)==null?void 0:h.querySelector(".panel-fill");N&&(U=cl(N)),mi(c.getAttribute(j)),yi(xe(c.getAttribute(J))),bi(xe(c.getAttribute(f))),Vl(c.getAttribute(v),c.getAttribute(y)),rr(c.getAttribute(x)),vi(c.getAttribute(p)),as(b.map(ae=>ae[1])),di(xe(c.getAttribute(o))),fi(oe(c.getAttribute(l),0)),pi(oe(c.getAttribute(a),1/0)),ir(xe(c.getAttribute(u))),xi(oe(c.getAttribute(M),wt)),ql(),Gl(),G=Pl(c,d,m),us((w=c.getAttribute(De))!=null?w:qn),d.addEventListener("mousedown",Kn),d.addEventListener("mouseup",qt),d.addEventListener("touchmove",ot),d.addEventListener("touchstart",ot),Ee||document.addEventListener("wheel",Gt,{passive:!1}),R=Cl(c,Fl,{setValues:as,setMin:Qt,setMax:er,setStep:rr,setPointersOverlap:di,setPointersMinDistance:fi,setPointersMaxDistance:pi,setDisabled:gi,setType:mi,setRightToLeft:yi,setBottomToTop:bi,setRound:xi,setKeyboardDisabled:ls,setMousewheelDisabled:cs,setRangeDragging:ir,setData:vi},{getPercents:rs,getValues:is,getPointerElements:ns,getMin:ss,getMax:os,getStep:Qr,getData:ei,getType:ti,getRound:ri,getTextMin:Jt,getTextMax:Zt,isRightToLeft:si,isBottomToTop:oi,isDisabled:ai,isKeyboardDisabled:li,isMousewheelDisabled:ci,isPointersOverlap:ui,isRangeDraggingEnabled:hi,getPointersMinDistance:ii,getPointersMaxDistance:ni}),R.init()})(),{get pointers(){return m},get styles(){return G},get pluginsManager(){return R},get min(){return Jt()},get max(){return Zt()},get step(){return Qr()},get pointersOverlap(){return ui()},set pointersOverlap(h){di(h)},get pointersMinDistance(){return ii()},set pointersMinDistance(h){fi(h)},get pointersMaxDistance(){return ni()},set pointersMaxDistance(h){pi(h)},get disabled(){return ai()},set disabled(h){gi(h)},get data(){return ei()},get type(){return ti()},set type(h){mi(h)},get rightToLeft(){return si()},set rightToLeft(h){yi(h)},get bottomToTop(){return oi()},set bottomToTop(h){bi(h)},get round(){return ri()},set round(h){xi(h)},get animateOnClick(){return Ze},set animateOnClick(h){us(h)},get keyboardDisabled(){return li()},set keyboardDisabled(h){ls(h)},get mousewheelDisabled(){return ci()},set mousewheelDisabled(h){cs(h)},get rangeDragging(){return hi()},set rangeDragging(h){ir(h)},setMin:Qt,setMax:er,setValue:tr,setStep:rr,setData:vi,getTextValue:_t,setAriaLabel:hs,getAriaLabel:Xl,addPointer:Kl,removePointer:Jl,destroy:()=>{d.removeEventListener("mousedown",Kn),d.removeEventListener("mouseup",qt),d.removeEventListener("touchmove",ot),d.removeEventListener("touchstart",ot),document.removeEventListener("wheel",Gt);for(let h of m)h.destroy();R==null||R.destroy()}}},Dl=(c,d,b)=>{let m=zn.find(([R,D,K,te])=>D.replace("#","")===d.replace(/\d+/g,""));if(m&&c.styles){let[R,D,K,te]=m,F=d.replace(/\D/g,"").trim(),se=F===""||F==="0"||F==="1"?0:oe(F,0)-1;c.styles.setStyle(R,b,se);return}switch(c&&c.pluginsManager&&c.pluginsManager.onAttrChange(d,b),d){case v:{c.setMin(b);break}case y:{c.setMax(b);break}case x:{c.setStep(b);break}case o:{c.pointersOverlap=xe(b);break}case l:{c.pointersMinDistance=oe(b,0);break}case u:{c.rangeDragging=xe(b);break}case a:{c.pointersMaxDistance=oe(b,1/0);break}case g:{c.disabled=xe(b);break}case $:{c.keyboardDisabled=xe(b);break}case S:{c.mousewheelDisabled=xe(b);break}case p:{c.setData(b);break}case j:{c.type=b;break}case J:{c.rightToLeft=xe(b);break}case f:{c.bottomToTop=xe(b);break}case M:{c.round=oe(b,wt);break}case q:{c.styles&&(c.styles.theme=b);break}case De:{c.animateOnClick=b;break}}let T=null;if(/^value([0-9]*)$/.test(d)&&(T="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(T="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(T="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(T="pointer-shape"),!T)return;let U=d.replace(/\D/g,"").trim(),G=U===""||U==="0"||U==="1"?0:oe(U,0)-1;switch(T){case"value":{c.setValue(b,G);break}case"pointer-disabled":{let R=c==null?void 0:c.pointers[G];if(!R)return;R.disabled=xe(b);break}case"aria-label":{c.setAriaLabel(G,b);break}case"pointer-shape":{c.styles&&c.styles.setPointerShape(G,b);break}}},Il=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(c){this.slider&&this.slider.setStep(c)}get step(){var c;return(c=this.slider)==null?void 0:c.step}set disabled(c){this.slider&&(this.slider.disabled=c)}get disabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.disabled)!=null?d:!1}set data(c){var d;(d=this.slider)==null||d.setData(c)}get data(){var c;return(c=this.slider)==null?void 0:c.data}set min(c){var d;(d=this.slider)==null||d.setMin(c)}get min(){var c;return(c=this.slider)==null?void 0:c.min}set max(c){var d;(d=this.slider)==null||d.setMax(c)}get max(){var c;return(c=this.slider)==null?void 0:c.max}set round(c){!this.slider||(this.slider.round=c)}get round(){var c,d;return(d=(c=this.slider)==null?void 0:c.round)!=null?d:wt}set type(c){!this.slider||(this.slider.type=c??Le)}get type(){var c;return((c=this.slider)==null?void 0:c.type)||Le}set pointersOverlap(c){!this.slider||(this.slider.pointersOverlap=c)}get pointersOverlap(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersOverlap)!=null?d:!1}set pointersMinDistance(c){!this.slider||(this.slider.pointersMinDistance=c)}get pointersMinDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMinDistance)!=null?d:0}set pointersMaxDistance(c){!this.slider||(this.slider.pointersMaxDistance=c)}get pointersMaxDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMaxDistance)!=null?d:1/0}set theme(c){!this.slider||!this.slider.styles||(this.slider.styles.theme=c)}get theme(){var c,d,b;return(b=(d=(c=this.slider)==null?void 0:c.styles)==null?void 0:d.theme)!=null?b:null}set rtl(c){!this.slider||(this.slider.rightToLeft=c)}get rtl(){var c,d;return(d=(c=this.slider)==null?void 0:c.rightToLeft)!=null?d:!1}set btt(c){!this.slider||(this.slider.bottomToTop=c)}get btt(){var c,d;return(d=(c=this.slider)==null?void 0:c.bottomToTop)!=null?d:!1}set keyboardDisabled(c){!this.slider||(this.slider.keyboardDisabled=c)}get keyboardDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(c){!this.slider||(this.slider.mousewheelDisabled=c)}get mousewheelDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.mousewheelDisabled)!=null?d:!1}set animateOnClick(c){!this.slider||(this.slider.animateOnClick=c)}get animateOnClick(){var c;return(c=this.slider)==null?void 0:c.animateOnClick}get rangeDragging(){var c,d;return(d=(c=this.slider)==null?void 0:c.rangeDragging)!=null?d:!1}set rangeDragging(c){this.slider&&(this.slider.rangeDragging=xe(c))}get externalCSSList(){return this._externalCSSList}addPointer(c){var d;if(!this.slider)return;let b=(d=this.slider)==null?void 0:d.addPointer(c);Vn(this,this.slider,b,`value${b+1}`,`ariaLabel${b+1}`,`pointerShape${b+1}`,`pointer${b+1}Disabled`)}removePointer(){var c;!this.slider||(c=this.slider)==null||c.removePointer()}addCSS(c){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=c,this.shadowRoot.appendChild(d)}connectedCallback(){var c,d;if(!this.shadowRoot)return;this._externalCSSList=Sl(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let b=(c=this.shadowRoot)==null?void 0:c.querySelector(".pointer");if(!b)return;let m=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!m)return;let T=Ll(this,b);this.slider=Rl(this,m,T),Tl(this,this.slider),this._observer=new MutationObserver(U=>{U.forEach(G=>{var R;if(!this.slider||G.type!=="attributes")return;let D=G.attributeName;!D||Dl(this.slider,D,(R=this.getAttribute(D))!=null?R:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Zr=Il;window.tcRangeSlider=Zr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Zr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Zr{})})();var ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $r(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function wr(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var n=[null];n.push.apply(n,arguments);var s=Function.bind.apply(e,n);return new s}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var Ki={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ft,function(){var t=1e3,i=6e4,n=36e5,s="millisecond",o="second",l="minute",a="hour",u="day",p="week",v="month",y="quarter",x="year",M="date",j="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|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,f={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(k){var _=["th","st","nd","rd"],O=k%100;return"["+k+(_[(O-20)%10]||_[O]||_[0])+"]"}},g=function(k,_,O){var B=String(k);return!B||B.length>=_?k:""+Array(_+1-B.length).join(O)+k},$={s:g,z:function(k){var _=-k.utcOffset(),O=Math.abs(_),B=Math.floor(O/60),P=O%60;return(_<=0?"+":"-")+g(B,2,"0")+":"+g(P,2,"0")},m:function k(_,O){if(_.date()<O.date())return-k(O,_);var B=12*(O.year()-_.year())+(O.month()-_.month()),P=_.clone().add(B,v),H=O-P<0,V=_.clone().add(B+(H?-1:1),v);return+(-(B+(O-P)/(H?P-V:V-P))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:v,y:x,w:p,d:u,D:M,h:a,m:l,s:o,ms:s,Q:y}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},S="en",E={};E[S]=f;var A=function(k){return k instanceof W},C=function k(_,O,B){var P;if(!_)return S;if(typeof _=="string"){var H=_.toLowerCase();E[H]&&(P=H),O&&(E[H]=O,P=H);var V=_.split("-");if(!P&&V.length>1)return k(V[0])}else{var ee=_.name;E[ee]=_,P=ee}return!B&&P&&(S=P),P||!B&&S},L=function(k,_){if(A(k))return k.clone();var O=typeof _=="object"?_:{};return O.date=k,O.args=arguments,new W(O)},I=$;I.l=C,I.i=A,I.w=function(k,_){return L(k,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var W=function(){function k(O){this.$L=C(O.locale,null,!0),this.parse(O)}var _=k.prototype;return _.parse=function(O){this.$d=function(B){var P=B.date,H=B.utc;if(P===null)return new Date(NaN);if(I.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var V=P.match(q);if(V){var ee=V[2]-1||0,le=(V[7]||"0").substring(0,3);return H?new Date(Date.UTC(V[1],ee,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)):new Date(V[1],ee,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)}}return new Date(P)}(O),this.$x=O.x||{},this.init()},_.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},_.$utils=function(){return I},_.isValid=function(){return this.$d.toString()!==j},_.isSame=function(O,B){var P=L(O);return this.startOf(B)<=P&&P<=this.endOf(B)},_.isAfter=function(O,B){return L(O)<this.startOf(B)},_.isBefore=function(O,B){return this.endOf(B)<L(O)},_.$g=function(O,B,P){return I.u(O)?this[B]:this.set(P,O)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(O,B){var P=this,H=!!I.u(B)||B,V=I.p(O),ee=function(He,ue){var oe=I.w(P.$u?Date.UTC(P.$y,ue,He):new Date(P.$y,ue,He),P);return H?oe:oe.endOf(u)},le=function(He,ue){return I.w(P.toDate()[He].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(ue)),P)},Z=this.$W,ve=this.$M,De=this.$D,Ie="set"+(this.$u?"UTC":"");switch(V){case x:return H?ee(1,0):ee(31,11);case v:return H?ee(1,ve):ee(0,ve+1);case p:var be=this.$locale().weekStart||0,Le=(Z<be?Z+7:Z)-be;return ee(H?De-Le:De+(6-Le),ve);case u:case M:return le(Ie+"Hours",0);case a:return le(Ie+"Minutes",1);case l:return le(Ie+"Seconds",2);case o:return le(Ie+"Milliseconds",3);default:return this.clone()}},_.endOf=function(O){return this.startOf(O,!1)},_.$set=function(O,B){var P,H=I.p(O),V="set"+(this.$u?"UTC":""),ee=(P={},P[u]=V+"Date",P[M]=V+"Date",P[v]=V+"Month",P[x]=V+"FullYear",P[a]=V+"Hours",P[l]=V+"Minutes",P[o]=V+"Seconds",P[s]=V+"Milliseconds",P)[H],le=H===u?this.$D+(B-this.$W):B;if(H===v||H===x){var Z=this.clone().set(M,1);Z.$d[ee](le),Z.init(),this.$d=Z.set(M,Math.min(this.$D,Z.daysInMonth())).$d}else ee&&this.$d[ee](le);return this.init(),this},_.set=function(O,B){return this.clone().$set(O,B)},_.get=function(O){return this[I.p(O)]()},_.add=function(O,B){var P,H=this;O=Number(O);var V=I.p(B),ee=function(ve){var De=L(H);return I.w(De.date(De.date()+Math.round(ve*O)),H)};if(V===v)return this.set(v,this.$M+O);if(V===x)return this.set(x,this.$y+O);if(V===u)return ee(1);if(V===p)return ee(7);var le=(P={},P[l]=i,P[a]=n,P[o]=t,P)[V]||1,Z=this.$d.getTime()+O*le;return I.w(Z,this)},_.subtract=function(O,B){return this.add(-1*O,B)},_.format=function(O){var B=this,P=this.$locale();if(!this.isValid())return P.invalidDate||j;var H=O||"YYYY-MM-DDTHH:mm:ssZ",V=I.z(this),ee=this.$H,le=this.$m,Z=this.$M,ve=P.weekdays,De=P.months,Ie=function(ue,oe,bt,xt){return ue&&(ue[oe]||ue(B,H))||bt[oe].slice(0,xt)},be=function(ue){return I.s(ee%12||12,ue,"0")},Le=P.meridiem||function(ue,oe,bt){var xt=ue<12?"AM":"PM";return bt?xt.toLowerCase():xt},He={YY:String(this.$y).slice(-2),YYYY:I.s(this.$y,4,"0"),M:Z+1,MM:I.s(Z+1,2,"0"),MMM:Ie(P.monthsShort,Z,De,3),MMMM:Ie(De,Z),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:Ie(P.weekdaysMin,this.$W,ve,2),ddd:Ie(P.weekdaysShort,this.$W,ve,3),dddd:ve[this.$W],H:String(ee),HH:I.s(ee,2,"0"),h:be(1),hh:be(2),a:Le(ee,le,!0),A:Le(ee,le,!1),m:String(le),mm:I.s(le,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:V};return H.replace(J,function(ue,oe){return oe||He[ue]||V.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(O,B,P){var H,V=I.p(B),ee=L(O),le=(ee.utcOffset()-this.utcOffset())*i,Z=this-ee,ve=I.m(this,ee);return ve=(H={},H[x]=ve/12,H[v]=ve,H[y]=ve/3,H[p]=(Z-le)/6048e5,H[u]=(Z-le)/864e5,H[a]=Z/n,H[l]=Z/i,H[o]=Z/t,H)[V]||Z,P?ve:I.a(ve)},_.daysInMonth=function(){return this.endOf(v).$D},_.$locale=function(){return E[this.$L]},_.locale=function(O,B){if(!O)return this.$L;var P=this.clone(),H=C(O,B,!0);return H&&(P.$L=H),P},_.clone=function(){return I.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},k}(),re=W.prototype;return L.prototype=re,[["$ms",s],["$s",o],["$m",l],["$H",a],["$W",u],["$M",v],["$y",x],["$D",M]].forEach(function(k){re[k[1]]=function(_){return this.$g(_,k[0],k[1])}}),L.extend=function(k,_){return k.$i||(k(_,W,L),k.$i=!0),L},L.locale=C,L.isDayjs=A,L.unix=function(k){return L(1e3*k)},L.en=E[S],L.Ls=E,L.p={},L})})(Ki);var Cs=Ki.exports;const Bt=$r(Cs);class ks extends Pe{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,t){this._startExpression=e,this._endExpression=t;const i=this.escapeRegex(this._startExpression),n=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${i}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${n}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,t,i){if(!this.hasTemplate(e))return null;i=i||e;const n=he` <slot name=${i}></slot> `,s={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:l}=this._renderedTemplates[i];this.contains(l)&&this.removeChild(l)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let t=0;t<this.children.length;t++){const i=this.children[t];if(i.nodeName==="TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=t}}return e}_renderTemplate(e,t,i){let n;if(t.content&&t.content.childNodes.length){const s=t.content.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,t){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),t);return s?typeof s=="object"?JSON.stringify(s):s.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,t){t={...t};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(t)}catch{}return n}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,t,i){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,i),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=i,e;for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n];this.renderNode(s,t,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const Ji=`
56
64
  :host {
57
65
  display: flex;
58
66
  box-sizing: border-box;
@@ -73,7 +81,7 @@ form#itemfilter {
73
81
  details {
74
82
  width: 100%;
75
83
  }
76
- `,Bi=`
84
+ `,Zi=`
77
85
  * {
78
86
  font-family: Roboto, sans-serif;
79
87
  }
@@ -332,7 +340,15 @@ details[open] summary::before {
332
340
  details[open] summary::after {
333
341
  transform: rotate(270deg);
334
342
  }
335
- eox-itemfilter-expandcontainer .title,
343
+ eox-itemfilter-expandcontainer {
344
+ max-height: 200px;
345
+ }
346
+ eox-itemfilter-expandcontainer > [data-type=filter] {
347
+ display: block;
348
+ height: calc(100% - 32px);
349
+ overflow-y: auto;
350
+ }
351
+ [data-type=filter] .title,
336
352
  details summary {
337
353
  text-transform: capitalize;
338
354
  }
@@ -380,7 +396,7 @@ section {
380
396
  }
381
397
  button#filter-reset {
382
398
  position: absolute;
383
- top: 20px;
399
+ top: 4px;
384
400
  right: 0;
385
401
  text-indent: -9999px;
386
402
  line-height: 0;
@@ -422,16 +438,15 @@ eox-itemfilter-range {
422
438
  .range-after {
423
439
  margin-left: .5rem;
424
440
  }
425
- `;var xs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,mr=(r,e,t,i)=>{for(var n=i>1?void 0:i?$s(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&xs(e,t,n),n};let jt=class extends Se{render(){return he`
441
+ `;var Ls=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,_r=(r,e,t,i)=>{for(var n=i>1?void 0:i?Ts(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Ls(e,t,n),n};let Ft=class extends Pe{render(){return he`
426
442
  <style>
427
- ${Ni}
428
- ${!this.unstyled&&Bi}
443
+ ${Ji}
444
+ ${!this.unstyled&&Zi}
429
445
  </style>
430
446
  <details
431
447
  class="details-filter"
432
448
  part="details-filter"
433
- data-filter="${this.filterObject.key}"
434
- open=${this.filterObject.expanded||ie}
449
+ open=${this.filterObject.expanded||ne}
435
450
  >
436
451
  <summary>
437
452
  <span
@@ -445,10 +460,10 @@ eox-itemfilter-range {
445
460
  <slot name="filter"></slot>
446
461
  </div>
447
462
  </details>
448
- `}};mr([Ae({attribute:!1})],jt.prototype,"filterObject",2),mr([Ae()],jt.prototype,"unstyled",2),jt=mr([qe("eox-itemfilter-expandcontainer")],jt);var ws=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,Fi=(r,e,t,i)=>{for(var n=i>1?void 0:i?_s(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&ws(e,t,n),n};let yr=class extends Se{reset(){this.renderRoot.querySelectorAll("input[type='checkbox']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty}createRenderRoot(){return this}render(){return he`
463
+ `}};_r([Ae({attribute:!1})],Ft.prototype,"filterObject",2),_r([Ae()],Ft.prototype,"unstyled",2),Ft=_r([qe("eox-itemfilter-expandcontainer")],Ft);var Rs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Qi=(r,e,t,i)=>{for(var n=i>1?void 0:i?Ds(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Rs(e,t,n),n};let Er=class extends Pe{reset(){this.renderRoot.querySelectorAll("input[type='checkbox']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
449
464
  <ul>
450
- ${tt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>he`
451
- <li class=${this.filterObject.state[r]?"highlighted":ie}>
465
+ ${dt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>he`
466
+ <li class=${this.filterObject.state[r]?"highlighted":ne}>
452
467
  <label>
453
468
  <input
454
469
  data-cy="multiselect-checkbox"
@@ -456,7 +471,7 @@ eox-itemfilter-range {
456
471
  type="checkbox"
457
472
  class="multiselect-checkbox"
458
473
  id=${r}
459
- checked="${this.filterObject.state[r]||ie}"
474
+ checked="${this.filterObject.state[r]||ne}"
460
475
  @click=${()=>{this.filterObject.state[r]=!this.filterObject.state[r],this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()}}
461
476
  />
462
477
  <span class="title">${r}</span>
@@ -464,9 +479,9 @@ eox-itemfilter-range {
464
479
  </li>
465
480
  `)}
466
481
  </ul>
467
- `}};Fi([Ae()],yr.prototype,"filterObject",2),yr=Fi([qe("eox-itemfilter-multiselect")],yr);var Es="Expected a function",Hi=0/0,Ms="[object Symbol]",As=/^\s+|\s+$/g,Os=/^[-+]0x[0-9a-f]+$/i,Ss=/^0b[01]+$/i,Ps=/^0o[0-7]+$/i,Cs=parseInt,ks=typeof ht=="object"&&ht&&ht.Object===Object&&ht,Ls=typeof self=="object"&&self&&self.Object===Object&&self,Ts=ks||Ls||Function("return this")(),Rs=Object.prototype,Ds=Rs.toString,Is=Math.max,js=Math.min,br=function(){return Ts.Date.now()};function Ns(r,e,t){var i,n,s,o,c,a,u=0,g=!1,v=!1,_=!0;if(typeof r!="function")throw new TypeError(Es);e=Ui(e)||0,xr(t)&&(g=!!t.leading,v="maxWait"in t,s=v?Is(Ui(t.maxWait)||0,e):s,_="trailing"in t?!!t.trailing:_);function E(w){var M=i,P=n;return i=n=void 0,u=w,o=r.apply(P,M),o}function k(w){return u=w,c=setTimeout(te,e),g?E(w):o}function F(w){var M=w-a,P=w-u,L=e-M;return v?js(L,s-P):L}function se(w){var M=w-a,P=w-u;return a===void 0||M>=e||M<0||v&&P>=s}function te(){var w=br();if(se(w))return f(w);c=setTimeout(te,F(w))}function f(w){return c=void 0,_&&i?E(w):(i=n=void 0,o)}function p(){c!==void 0&&clearTimeout(c),u=0,i=a=n=c=void 0}function b(){return c===void 0?o:f(br())}function O(){var w=br(),M=se(w);if(i=arguments,n=this,a=w,M){if(c===void 0)return k(a);if(v)return c=setTimeout(te,e),E(a)}return c===void 0&&(c=setTimeout(te,e)),o}return O.cancel=p,O.flush=b,O}function xr(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function Bs(r){return!!r&&typeof r=="object"}function Fs(r){return typeof r=="symbol"||Bs(r)&&Ds.call(r)==Ms}function Ui(r){if(typeof r=="number")return r;if(Fs(r))return Hi;if(xr(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=xr(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(As,"");var t=Ss.test(r);return t||Ps.test(r)?Cs(r.slice(2),t?2:8):Os.test(r)?Hi:+r}var Hs=Ns;const Yi=gr(Hs);var Us=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,zi=(r,e,t,i)=>{for(var n=i>1?void 0:i?Ys(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Us(e,t,n),n};let $r=class extends Se{constructor(){super(...arguments),this.inputHandler=r=>{let e,t;[e,t]=r.detail.values,(e!==this.filterObject.state.min||t!=this.filterObject.state.max)&&([this.filterObject.state.min,this.filterObject.state.max]=[e,t],this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()},this.debouncedInputHandler=Yi(this.inputHandler,0,{leading:!0})}reset(){this.filterObject.state.min=this.filterObject.min,this.filterObject.state.max=this.filterObject.max,delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
482
+ `}};Qi([Ae()],Er.prototype,"filterObject",2),Er=Qi([qe("eox-itemfilter-multiselect")],Er);var Is="Expected a function",en=0/0,js="[object Symbol]",Ns=/^\s+|\s+$/g,Bs=/^[-+]0x[0-9a-f]+$/i,Fs=/^0b[01]+$/i,Hs=/^0o[0-7]+$/i,Us=parseInt,Ys=typeof ft=="object"&&ft&&ft.Object===Object&&ft,zs=typeof self=="object"&&self&&self.Object===Object&&self,Xs=Ys||zs||Function("return this")(),Vs=Object.prototype,Ws=Vs.toString,qs=Math.max,Gs=Math.min,Mr=function(){return Xs.Date.now()};function Ks(r,e,t){var i,n,s,o,l,a,u=0,p=!1,v=!1,y=!0;if(typeof r!="function")throw new TypeError(Is);e=tn(e)||0,Ar(t)&&(p=!!t.leading,v="maxWait"in t,s=v?qs(tn(t.maxWait)||0,e):s,y="trailing"in t?!!t.trailing:y);function x(E){var A=i,C=n;return i=n=void 0,u=E,o=r.apply(C,A),o}function M(E){return u=E,l=setTimeout(J,e),p?x(E):o}function j(E){var A=E-a,C=E-u,L=e-A;return v?Gs(L,s-C):L}function q(E){var A=E-a,C=E-u;return a===void 0||A>=e||A<0||v&&C>=s}function J(){var E=Mr();if(q(E))return f(E);l=setTimeout(J,j(E))}function f(E){return l=void 0,y&&i?x(E):(i=n=void 0,o)}function g(){l!==void 0&&clearTimeout(l),u=0,i=a=n=l=void 0}function $(){return l===void 0?o:f(Mr())}function S(){var E=Mr(),A=q(E);if(i=arguments,n=this,a=E,A){if(l===void 0)return M(a);if(v)return l=setTimeout(J,e),x(a)}return l===void 0&&(l=setTimeout(J,e)),o}return S.cancel=g,S.flush=$,S}function Ar(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function Js(r){return!!r&&typeof r=="object"}function Zs(r){return typeof r=="symbol"||Js(r)&&Ws.call(r)==js}function tn(r){if(typeof r=="number")return r;if(Zs(r))return en;if(Ar(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Ar(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(Ns,"");var t=Fs.test(r);return t||Hs.test(r)?Us(r.slice(2),t?2:8):Bs.test(r)?en:+r}var Qs=Ks;const rn=$r(Qs);var eo=Object.defineProperty,to=Object.getOwnPropertyDescriptor,nn=(r,e,t,i)=>{for(var n=i>1?void 0:i?to(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&eo(e,t,n),n};let Or=class extends Pe{constructor(){super(...arguments),this.inputHandler=r=>{let e,t;[e,t]=r.detail.values,(e!==this.filterObject.state.min||t!=this.filterObject.state.max)&&([this.filterObject.state.min,this.filterObject.state.max]=[e,t],this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()},this.debouncedInputHandler=rn(this.inputHandler,0,{leading:!0})}reset(){this.filterObject.state.min=this.filterObject.min,this.filterObject.state.max=this.filterObject.max,delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
468
483
  <div class="range-before">
469
- ${this.filterObject.format==="date"?It.unix(this.filterObject.state.min):this.filterObject.state.min}
484
+ ${this.filterObject.format==="date"?Bt.unix(this.filterObject.state.min):this.filterObject.state.min}
470
485
  </div>
471
486
  <tc-range-slider
472
487
  min="${this.filterObject.min}"
@@ -477,19 +492,19 @@ eox-itemfilter-range {
477
492
  @change="${this.debouncedInputHandler}"
478
493
  ></tc-range-slider>
479
494
  <div class="range-after">
480
- ${this.filterObject.format==="date"?It.unix(this.filterObject.state.max):this.filterObject.state.max}
495
+ ${this.filterObject.format==="date"?Bt.unix(this.filterObject.state.max):this.filterObject.state.max}
481
496
  </div>
482
- `}};zi([Ae()],$r.prototype,"filterObject",2),$r=zi([qe("eox-itemfilter-range")],$r);var zs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Xi=(r,e,t,i)=>{for(var n=i>1?void 0:i?Xs(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&zs(e,t,n),n};let wr=class extends Se{reset(){this.renderRoot.querySelectorAll("input[type='radio']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty}createRenderRoot(){return this}render(){return he`
497
+ `}};nn([Ae()],Or.prototype,"filterObject",2),Or=nn([qe("eox-itemfilter-range")],Or);var ro=Object.defineProperty,io=Object.getOwnPropertyDescriptor,sn=(r,e,t,i)=>{for(var n=i>1?void 0:i?io(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&ro(e,t,n),n};let Sr=class extends Pe{reset(){this.renderRoot.querySelectorAll("input[type='radio']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
483
498
  <ul>
484
- ${tt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>he`
485
- <li class=${this.filterObject.state[r]?"highlighted":ie}>
499
+ ${dt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>he`
500
+ <li class=${this.filterObject.state[r]?"highlighted":ne}>
486
501
  <label>
487
502
  <input
488
503
  name="selection"
489
504
  type="radio"
490
505
  class="select-radio"
491
506
  id=${r}
492
- checked="${this.filterObject.state[r]||ie}"
507
+ checked="${this.filterObject.state[r]||ne}"
493
508
  @click=${()=>{for(const e in this.filterObject.state)this.filterObject.state[e]=e===r;this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()}}
494
509
  />
495
510
  <span class="title">${r}</span>
@@ -497,22 +512,18 @@ eox-itemfilter-range {
497
512
  </li>
498
513
  `)}
499
514
  </ul>
500
- `}};Xi([Ae()],wr.prototype,"filterObject",2),wr=Xi([qe("eox-itemfilter-select")],wr);/**
501
- * @license
502
- * Copyright 2020 Google LLC
503
- * SPDX-License-Identifier: BSD-3-Clause
504
- */const Vs=r=>r.strings===void 0,Ws={},qs=(r,e=Ws)=>r._$AH=e;/**
515
+ `}};sn([Ae()],Sr.prototype,"filterObject",2),Sr=sn([qe("eox-itemfilter-select")],Sr);/**
505
516
  * @license
506
517
  * Copyright 2020 Google LLC
507
518
  * SPDX-License-Identifier: BSD-3-Clause
508
- */const Gs=Li(class extends Ti{constructor(r){if(super(r),r.type!==rt.PROPERTY&&r.type!==rt.ATTRIBUTE&&r.type!==rt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Vs(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===Te||e===ie)return e;const t=r.element,i=r.name;if(r.type===rt.PROPERTY){if(e===t[i])return Te}else if(r.type===rt.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return Te}else if(r.type===rt.ATTRIBUTE&&t.getAttribute(i)===e+"")return Te;return qs(r),e}});var $e=63710088e-1,_r={centimeters:$e*100,centimetres:$e*100,degrees:$e/111325,feet:$e*3.28084,inches:$e*39.37,kilometers:$e/1e3,kilometres:$e/1e3,meters:$e,metres:$e,miles:$e/1609.344,millimeters:$e*1e3,millimetres:$e*1e3,nauticalmiles:$e/1852,radians:1,yards:$e*1.0936},Ks={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/$e,yards:1.0936133},Er={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Pe(r,e,t){t===void 0&&(t={});var i={type:"Feature"};return(t.id===0||t.id)&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.properties=e||{},i.geometry=r,i}function Js(r,e,t){switch(r){case"Point":return Ne(e).geometry;case"LineString":return Re(e).geometry;case"Polygon":return Mr(e).geometry;case"MultiPoint":return Vi(e).geometry;case"MultiLineString":return Ar(e).geometry;case"MultiPolygon":return Wi(e).geometry;default:throw new Error(r+" is invalid")}}function Ne(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Nt(r[0])||!Nt(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Pe(i,e,t)}function Zs(r,e,t){return t===void 0&&(t={}),Ge(r.map(function(i){return Ne(i,e)}),t)}function Mr(r,e,t){t===void 0&&(t={});for(var i=0,n=r;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var c={type:"Polygon",coordinates:r};return Pe(c,e,t)}function Qs(r,e,t){return t===void 0&&(t={}),Ge(r.map(function(i){return Mr(i,e)}),t)}function Re(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:r};return Pe(i,e,t)}function eo(r,e,t){return t===void 0&&(t={}),Ge(r.map(function(i){return Re(i,e)}),t)}function Ge(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function Ar(r,e,t){t===void 0&&(t={});var i={type:"MultiLineString",coordinates:r};return Pe(i,e,t)}function Vi(r,e,t){t===void 0&&(t={});var i={type:"MultiPoint",coordinates:r};return Pe(i,e,t)}function Wi(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return Pe(i,e,t)}function to(r,e,t){t===void 0&&(t={});var i={type:"GeometryCollection",geometries:r};return Pe(i,e,t)}function ro(r,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var t=Math.pow(10,e||0);return Math.round(r*t)/t}function qi(r,e){e===void 0&&(e="kilometers");var t=_r[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Or(r,e){e===void 0&&(e="kilometers");var t=_r[e];if(!t)throw new Error(e+" units is invalid");return r/t}function io(r,e){return Gi(Or(r,e))}function no(r){var e=r%360;return e<0&&(e+=360),e}function Gi(r){var e=r%(2*Math.PI);return e*180/Math.PI}function so(r){var e=r%360;return e*Math.PI/180}function oo(r,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("length must be a positive number");return qi(Or(r,e),t)}function ao(r,e,t){if(e===void 0&&(e="meters"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("area must be a positive number");var i=Er[e];if(!i)throw new Error("invalid original units");var n=Er[t];if(!n)throw new Error("invalid final units");return r/i*n}function Nt(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Sr(r){return!!r&&r.constructor===Object}function lo(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(e){if(!Nt(e))throw new Error("bbox must only contain numbers")})}function co(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}const uo=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:Er,bearingToAzimuth:no,convertArea:ao,convertLength:oo,degreesToRadians:so,earthRadius:$e,factors:_r,feature:Pe,featureCollection:Ge,geometry:Js,geometryCollection:to,isNumber:Nt,isObject:Sr,lengthToDegrees:io,lengthToRadians:Or,lineString:Re,lineStrings:eo,multiLineString:Ar,multiPoint:Vi,multiPolygon:Wi,point:Ne,points:Zs,polygon:Mr,polygons:Qs,radiansToDegrees:Gi,radiansToLength:qi,round:ro,unitsFactors:Ks,validateBBox:lo,validateId:co},Symbol.toStringTag,{value:"Module"}));function Ki(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function dt(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ft(r){return r.type==="Feature"?r.geometry:r}function Ce(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=Ki(r),n=ft(e),s=n.type,o=e.bbox,c=n.coordinates;if(o&&ho(i,o)===!1)return!1;s==="Polygon"&&(c=[c]);for(var a=!1,u=0;u<c.length&&!a;u++)if(Ji(i,c[u][0],t.ignoreBoundary)){for(var g=!1,v=1;v<c[u].length&&!g;)Ji(i,c[u][v],!t.ignoreBoundary)&&(g=!0),v++;g||(a=!0)}return a}function Ji(r,e,t){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],c=e[n][1],a=e[s][0],u=e[s][1],g=r[1]*(o-a)+c*(a-r[0])+u*(r[0]-o)===0&&(o-r[0])*(a-r[0])<=0&&(c-r[1])*(u-r[1])<=0;if(g)return!t;var v=c>r[1]!=u>r[1]&&r[0]<(a-o)*(r[1]-c)/(u-c)+o;v&&(i=!i)}return i}function ho(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function pt(r,e,t){if(r!==null)for(var i,n,s,o,c,a,u,g=0,v=0,_,E=r.type,k=E==="FeatureCollection",F=E==="Feature",se=k?r.features.length:1,te=0;te<se;te++){u=k?r.features[te].geometry:F?r.geometry:r,_=u?u.type==="GeometryCollection":!1,c=_?u.geometries.length:1;for(var f=0;f<c;f++){var p=0,b=0;if(o=_?u.geometries[f]:u,o!==null){a=o.coordinates;var O=o.type;switch(g=t&&(O==="Polygon"||O==="MultiPolygon")?1:0,O){case null:break;case"Point":if(e(a,v,te,p,b)===!1)return!1;v++,p++;break;case"LineString":case"MultiPoint":for(i=0;i<a.length;i++){if(e(a[i],v,te,p,b)===!1)return!1;v++,O==="MultiPoint"&&p++}O==="LineString"&&p++;break;case"Polygon":case"MultiLineString":for(i=0;i<a.length;i++){for(n=0;n<a[i].length-g;n++){if(e(a[i][n],v,te,p,b)===!1)return!1;v++}O==="MultiLineString"&&p++,O==="Polygon"&&b++}O==="Polygon"&&p++;break;case"MultiPolygon":for(i=0;i<a.length;i++){for(b=0,n=0;n<a[i].length;n++){for(s=0;s<a[i][n].length-g;s++){if(e(a[i][n][s],v,te,p,b)===!1)return!1;v++}b++}p++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(pt(o.geometries[i],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function fo(r,e,t,i){var n=t;return pt(r,function(s,o,c,a,u){o===0&&t===void 0?n=s:n=e(n,s,o,c,a,u)},i),n}function Zi(r,e){var t;switch(r.type){case"FeatureCollection":for(t=0;t<r.features.length&&e(r.features[t].properties,t)!==!1;t++);break;case"Feature":e(r.properties,0);break}}function po(r,e,t){var i=t;return Zi(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Bt(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function go(r,e,t){var i=t;return Bt(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function vo(r){var e=[];return pt(r,function(t){e.push(t)}),e}function Pr(r,e){var t,i,n,s,o,c,a,u,g,v,_=0,E=r.type==="FeatureCollection",k=r.type==="Feature",F=E?r.features.length:1;for(t=0;t<F;t++){for(c=E?r.features[t].geometry:k?r.geometry:r,u=E?r.features[t].properties:k?r.properties:{},g=E?r.features[t].bbox:k?r.bbox:void 0,v=E?r.features[t].id:k?r.id:void 0,a=c?c.type==="GeometryCollection":!1,o=a?c.geometries.length:1,n=0;n<o;n++){if(s=a?c.geometries[n]:c,s===null){if(e(null,_,u,g,v)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,_,u,g,v)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],_,u,g,v)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}_++}}function mo(r,e,t){var i=t;return Pr(r,function(n,s,o,c,a){s===0&&t===void 0?i=n:i=e(i,n,s,o,c,a)}),i}function Ye(r,e){Pr(r,function(t,i,n,s,o){var c=t===null?null:t.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return e(Pe(t,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(c){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var g=t.coordinates[u],v={type:a,coordinates:g};if(e(Pe(v,n),i,u)===!1)return!1}})}function yo(r,e,t){var i=t;return Ye(r,function(n,s,o){s===0&&o===0&&t===void 0?i=n:i=e(i,n,s,o)}),i}function Qi(r,e){Ye(r,function(t,i,n){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var c,a=0,u=0,g=0;if(pt(t,function(v,_,E,k,F){if(c===void 0||i>a||k>u||F>g){c=v,a=i,u=k,g=F,s=0;return}var se=Re([c,v],t.properties);if(e(se,i,n,F,s)===!1)return!1;s++,c=v})===!1)return!1}}})}function bo(r,e,t){var i=t,n=!1;return Qi(r,function(s,o,c,a,u){n===!1&&t===void 0?i=s:i=e(i,s,o,c,a,u),n=!0}),i}function en(r,e){if(!r)throw new Error("geojson is required");Ye(r,function(t,i,n){if(t.geometry!==null){var s=t.geometry.type,o=t.geometry.coordinates;switch(s){case"LineString":if(e(t,i,n,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c<o.length;c++)if(e(Re(o[c],t.properties),i,n,c)===!1)return!1;break}}})}function xo(r,e,t){var i=t;return en(r,function(n,s,o,c){s===0&&t===void 0?i=n:i=e(i,n,s,o,c)}),i}function $o(r,e){if(e=e||{},!Sr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,c;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,c=r.features[t].geometry;break;case"Feature":o=o||r.properties,c=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=r;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var a=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),Re([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),Re([a[n][s],a[n][s+1]],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s-1),Re([a[i][s],a[i][s+1]],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s-1),Re([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function wo(r,e){if(e=e||{},!Sr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,c;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,c=r.features[t].geometry;break;case"Feature":o=o||r.properties,c=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=r;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var a=c.coordinates;switch(c.type){case"Point":return Ne(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Ne(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Ne(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Ne(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Ne(a[i][s],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s),Ne(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const _o=Object.freeze(Object.defineProperty({__proto__:null,coordAll:vo,coordEach:pt,coordReduce:fo,featureEach:Bt,featureReduce:go,findPoint:wo,findSegment:$o,flattenEach:Ye,flattenReduce:yo,geomEach:Pr,geomReduce:mo,lineEach:en,lineReduce:xo,propEach:Zi,propReduce:po,segmentEach:Qi,segmentReduce:bo},Symbol.toStringTag,{value:"Module"}));function tn(r){if(!r)throw new Error("geojson is required");var e=[];return Ye(r,function(t){Eo(t,e)}),Ge(e)}function Eo(r,e){var t=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":t=dt(i);break;case"LineString":t=[dt(i)]}t.forEach(function(n){var s=Mo(n,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function Mo(r,e){var t=[];return r.reduce(function(i,n){var s=Re([i,n],e);return s.bbox=Ao(i,n),t.push(s),n}),t}function Ao(r,e){var t=r[0],i=r[1],n=e[0],s=e[1],o=t<n?t:n,c=i<s?i:s,a=t>n?t:n,u=i>s?i:s;return[o,c,a,u]}var Cr={exports:{}},rn={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ht,function(){function t(f,p,b,O,w){(function M(P,L,I,W,ee){for(;W>I;){if(W-I>600){var C=W-I+1,$=L-I+1,A=Math.log(C),N=.5*Math.exp(2*A/3),S=.5*Math.sqrt(A*N*(C-N)/C)*($-C/2<0?-1:1),H=Math.max(I,Math.floor(L-$*N/C+S)),V=Math.min(W,Math.floor(L+(C-$)*N/C+S));M(P,L,H,V,ee)}var Z=P[L],le=I,K=W;for(i(P,I,L),ee(P[W],Z)>0&&i(P,I,W);le<K;){for(i(P,le,K),le++,K--;ee(P[le],Z)<0;)le++;for(;ee(P[K],Z)>0;)K--}ee(P[I],Z)===0?i(P,I,K):i(P,++K,W),K<=L&&(I=K+1),L<=K&&(W=K-1)}})(f,p,b||0,O||f.length-1,w||n)}function i(f,p,b){var O=f[p];f[p]=f[b],f[b]=O}function n(f,p){return f<p?-1:f>p?1:0}var s=function(f){f===void 0&&(f=9),this._maxEntries=Math.max(4,f),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(f,p,b){if(!b)return p.indexOf(f);for(var O=0;O<p.length;O++)if(b(f,p[O]))return O;return-1}function c(f,p){a(f,0,f.children.length,p,f)}function a(f,p,b,O,w){w||(w=se(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var M=p;M<b;M++){var P=f.children[M];u(w,f.leaf?O(P):P)}return w}function u(f,p){return f.minX=Math.min(f.minX,p.minX),f.minY=Math.min(f.minY,p.minY),f.maxX=Math.max(f.maxX,p.maxX),f.maxY=Math.max(f.maxY,p.maxY),f}function g(f,p){return f.minX-p.minX}function v(f,p){return f.minY-p.minY}function _(f){return(f.maxX-f.minX)*(f.maxY-f.minY)}function E(f){return f.maxX-f.minX+(f.maxY-f.minY)}function k(f,p){return f.minX<=p.minX&&f.minY<=p.minY&&p.maxX<=f.maxX&&p.maxY<=f.maxY}function F(f,p){return p.minX<=f.maxX&&p.minY<=f.maxY&&p.maxX>=f.minX&&p.maxY>=f.minY}function se(f){return{children:f,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function te(f,p,b,O,w){for(var M=[p,b];M.length;)if(!((b=M.pop())-(p=M.pop())<=O)){var P=p+Math.ceil((b-p)/O/2)*O;t(f,P,p,b,w),M.push(p,P,P,b)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(f){var p=this.data,b=[];if(!F(f,p))return b;for(var O=this.toBBox,w=[];p;){for(var M=0;M<p.children.length;M++){var P=p.children[M],L=p.leaf?O(P):P;F(f,L)&&(p.leaf?b.push(P):k(f,L)?this._all(P,b):w.push(P))}p=w.pop()}return b},s.prototype.collides=function(f){var p=this.data;if(!F(f,p))return!1;for(var b=[];p;){for(var O=0;O<p.children.length;O++){var w=p.children[O],M=p.leaf?this.toBBox(w):w;if(F(f,M)){if(p.leaf||k(f,M))return!0;b.push(w)}}p=b.pop()}return!1},s.prototype.load=function(f){if(!f||!f.length)return this;if(f.length<this._minEntries){for(var p=0;p<f.length;p++)this.insert(f[p]);return this}var b=this._build(f.slice(),0,f.length-1,0);if(this.data.children.length)if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var O=this.data;this.data=b,b=O}this._insert(b,this.data.height-b.height-1,!0)}else this.data=b;return this},s.prototype.insert=function(f){return f&&this._insert(f,this.data.height-1),this},s.prototype.clear=function(){return this.data=se([]),this},s.prototype.remove=function(f,p){if(!f)return this;for(var b,O,w,M=this.data,P=this.toBBox(f),L=[],I=[];M||L.length;){if(M||(M=L.pop(),O=L[L.length-1],b=I.pop(),w=!0),M.leaf){var W=o(f,M.children,p);if(W!==-1)return M.children.splice(W,1),L.push(M),this._condense(L),this}w||M.leaf||!k(M,P)?O?(b++,M=O.children[b],w=!1):M=null:(L.push(M),I.push(b),b=0,O=M,M=M.children[0])}return this},s.prototype.toBBox=function(f){return f},s.prototype.compareMinX=function(f,p){return f.minX-p.minX},s.prototype.compareMinY=function(f,p){return f.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(f){return this.data=f,this},s.prototype._all=function(f,p){for(var b=[];f;)f.leaf?p.push.apply(p,f.children):b.push.apply(b,f.children),f=b.pop();return p},s.prototype._build=function(f,p,b,O){var w,M=b-p+1,P=this._maxEntries;if(M<=P)return c(w=se(f.slice(p,b+1)),this.toBBox),w;O||(O=Math.ceil(Math.log(M)/Math.log(P)),P=Math.ceil(M/Math.pow(P,O-1))),(w=se([])).leaf=!1,w.height=O;var L=Math.ceil(M/P),I=L*Math.ceil(Math.sqrt(P));te(f,p,b,I,this.compareMinX);for(var W=p;W<=b;W+=I){var ee=Math.min(W+I-1,b);te(f,W,ee,L,this.compareMinY);for(var C=W;C<=ee;C+=L){var $=Math.min(C+L-1,ee);w.children.push(this._build(f,C,$,O-1))}}return c(w,this.toBBox),w},s.prototype._chooseSubtree=function(f,p,b,O){for(;O.push(p),!p.leaf&&O.length-1!==b;){for(var w=1/0,M=1/0,P=void 0,L=0;L<p.children.length;L++){var I=p.children[L],W=_(I),ee=(C=f,$=I,(Math.max($.maxX,C.maxX)-Math.min($.minX,C.minX))*(Math.max($.maxY,C.maxY)-Math.min($.minY,C.minY))-W);ee<M?(M=ee,w=W<w?W:w,P=I):ee===M&&W<w&&(w=W,P=I)}p=P||p.children[0]}var C,$;return p},s.prototype._insert=function(f,p,b){var O=b?f:this.toBBox(f),w=[],M=this._chooseSubtree(O,this.data,p,w);for(M.children.push(f),u(M,O);p>=0&&w[p].children.length>this._maxEntries;)this._split(w,p),p--;this._adjustParentBBoxes(O,w,p)},s.prototype._split=function(f,p){var b=f[p],O=b.children.length,w=this._minEntries;this._chooseSplitAxis(b,w,O);var M=this._chooseSplitIndex(b,w,O),P=se(b.children.splice(M,b.children.length-M));P.height=b.height,P.leaf=b.leaf,c(b,this.toBBox),c(P,this.toBBox),p?f[p-1].children.push(P):this._splitRoot(b,P)},s.prototype._splitRoot=function(f,p){this.data=se([f,p]),this.data.height=f.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(f,p,b){for(var O,w,M,P,L,I,W,ee=1/0,C=1/0,$=p;$<=b-p;$++){var A=a(f,0,$,this.toBBox),N=a(f,$,b,this.toBBox),S=(w=A,M=N,P=void 0,L=void 0,I=void 0,W=void 0,P=Math.max(w.minX,M.minX),L=Math.max(w.minY,M.minY),I=Math.min(w.maxX,M.maxX),W=Math.min(w.maxY,M.maxY),Math.max(0,I-P)*Math.max(0,W-L)),H=_(A)+_(N);S<ee?(ee=S,O=$,C=H<C?H:C):S===ee&&H<C&&(C=H,O=$)}return O||b-p},s.prototype._chooseSplitAxis=function(f,p,b){var O=f.leaf?this.compareMinX:g,w=f.leaf?this.compareMinY:v;this._allDistMargin(f,p,b,O)<this._allDistMargin(f,p,b,w)&&f.children.sort(O)},s.prototype._allDistMargin=function(f,p,b,O){f.children.sort(O);for(var w=this.toBBox,M=a(f,0,p,w),P=a(f,b-p,b,w),L=E(M)+E(P),I=p;I<b-p;I++){var W=f.children[I];u(M,f.leaf?w(W):W),L+=E(M)}for(var ee=b-p-1;ee>=p;ee--){var C=f.children[ee];u(P,f.leaf?w(C):C),L+=E(P)}return L},s.prototype._adjustParentBBoxes=function(f,p,b){for(var O=b;O>=0;O--)u(p[O],f)},s.prototype._condense=function(f){for(var p=f.length-1,b=void 0;p>=0;p--)f[p].children.length===0?p>0?(b=f[p-1].children).splice(b.indexOf(f[p]),1):this.clear():c(f[p],this.toBBox)},s})})(rn);var Oo=rn.exports;const So=vr(uo),Po=vr(_o);function it(r){var e=[1/0,1/0,-1/0,-1/0];return pt(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}it.default=it;const Co=vr(Object.freeze(Object.defineProperty({__proto__:null,default:it},Symbol.toStringTag,{value:"Module"})));var Be=Oo,nn=So,sn=Po,gt=Co.default,ko=sn.featureEach;sn.coordEach,nn.polygon;var on=nn.featureCollection;function an(r){var e=new Be(r);return e.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:gt(t),Be.prototype.insert.call(this,t)},e.load=function(t){var i=[];return Array.isArray(t)?t.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:gt(n),i.push(n)}):ko(t,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:gt(n),i.push(n)}),Be.prototype.load.call(this,i)},e.remove=function(t,i){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:gt(t),Be.prototype.remove.call(this,t,i)},e.clear=function(){return Be.prototype.clear.call(this)},e.search=function(t){var i=Be.prototype.search.call(this,this.toBBox(t));return on(i)},e.collides=function(t){return Be.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=Be.prototype.all.call(this);return on(t)},e.toJSON=function(){return Be.prototype.toJSON.call(this)},e.fromJSON=function(t){return Be.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var i;if(t.bbox)i=t.bbox;else if(Array.isArray(t)&&t.length===4)i=t;else if(Array.isArray(t)&&t.length===6)i=[t[0],t[1],t[3],t[4]];else if(t.type==="Feature")i=gt(t);else if(t.type==="FeatureCollection")i=gt(t);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}Cr.exports=an,Cr.exports.default=an;var Lo=Cr.exports;const To=gr(Lo);function kr(r,e){var t={},i=[];if(r.type==="LineString"&&(r=Pe(r)),e.type==="LineString"&&(e=Pe(e)),r.type==="Feature"&&e.type==="Feature"&&r.geometry!==null&&e.geometry!==null&&r.geometry.type==="LineString"&&e.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=ln(r,e);return n&&i.push(n),Ge(i)}var s=To();return s.load(tn(e)),Bt(tn(r),function(o){Bt(s.search(o),function(c){var a=ln(o,c);if(a){var u=dt(a).join(",");t[u]||(t[u]=!0,i.push(a))}})}),Ge(i)}function ln(r,e){var t=dt(r),i=dt(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=t[0][0],s=t[0][1],o=t[1][0],c=t[1][1],a=i[0][0],u=i[0][1],g=i[1][0],v=i[1][1],_=(v-u)*(o-n)-(g-a)*(c-s),E=(g-a)*(s-u)-(v-u)*(n-a),k=(o-n)*(s-u)-(c-s)*(n-a);if(_===0)return null;var F=E/_,se=k/_;if(F>=0&&F<=1&&se>=0&&se<=1){var te=n+F*(o-n),f=s+F*(c-s);return Ne([te,f])}return null}function Lr(r,e){e===void 0&&(e={});var t=ft(r);switch(!e.properties&&r.type==="Feature"&&(e.properties=r.properties),t.type){case"Polygon":return Ro(t,e);case"MultiPolygon":return Do(t,e);default:throw new Error("invalid poly")}}function Ro(r,e){e===void 0&&(e={});var t=ft(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{};return cn(i,n)}function Do(r,e){e===void 0&&(e={});var t=ft(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{},s=[];return i.forEach(function(o){s.push(cn(o,n))}),Ge(s)}function cn(r,e){return r.length>1?Ar(r,e):Re(r[0],e)}function Io(r,e){var t=!0;return Ye(r,function(i){Ye(e,function(n){if(t===!1)return!1;t=jo(i.geometry,n.geometry)})}),t}function jo(r,e){switch(r.type){case"Point":switch(e.type){case"Point":return!Ho(r.coordinates,e.coordinates);case"LineString":return!un(e,r);case"Polygon":return!Ce(r,e)}break;case"LineString":switch(e.type){case"Point":return!un(r,e);case"LineString":return!No(r,e);case"Polygon":return!hn(e,r)}break;case"Polygon":switch(e.type){case"Point":return!Ce(e,r);case"LineString":return!hn(r,e);case"Polygon":return!Bo(e,r)}}return!1}function un(r,e){for(var t=0;t<r.coordinates.length-1;t++)if(Fo(r.coordinates[t],r.coordinates[t+1],e.coordinates))return!0;return!1}function No(r,e){var t=kr(r,e);return t.features.length>0}function hn(r,e){for(var t=0,i=e.coordinates;t<i.length;t++){var n=i[t];if(Ce(n,r))return!0}var s=kr(e,Lr(r));return s.features.length>0}function Bo(r,e){for(var t=0,i=r.coordinates[0];t<i.length;t++){var n=i[t];if(Ce(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var c=o[s];if(Ce(c,r))return!0}var a=kr(Lr(r),Lr(e));return a.features.length>0}function Fo(r,e,t){var i=t[0]-r[0],n=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],c=i*o-n*s;return c!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?r[0]<=t[0]&&t[0]<=e[0]:e[0]<=t[0]&&t[0]<=r[0]:o>0?r[1]<=t[1]&&t[1]<=e[1]:e[1]<=t[1]&&t[1]<=r[1]}function Ho(r,e){return r[0]===e[0]&&r[1]===e[1]}function Uo(r,e){var t=!1;return Ye(r,function(i){Ye(e,function(n){if(t===!0)return!0;t=!Io(i.geometry,n.geometry)})}),t}function Ft(r,e,t){t===void 0&&(t={});for(var i=Ki(r),n=dt(e),s=0;s<n.length-1;s++){var o=!1;if(t.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),Yo(n[s],n[s+1],i,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function Yo(r,e,t,i,n){var s=t[0],o=t[1],c=r[0],a=r[1],u=e[0],g=e[1],v=t[0]-c,_=t[1]-a,E=u-c,k=g-a,F=v*k-_*E;if(n!==null){if(Math.abs(F)>n)return!1}else if(F!==0)return!1;if(i){if(i==="start")return Math.abs(E)>=Math.abs(k)?E>0?c<s&&s<=u:u<=s&&s<c:k>0?a<o&&o<=g:g<=o&&o<a;if(i==="end")return Math.abs(E)>=Math.abs(k)?E>0?c<=s&&s<u:u<s&&s<=c:k>0?a<=o&&o<g:g<o&&o<=a;if(i==="both")return Math.abs(E)>=Math.abs(k)?E>0?c<s&&s<u:u<s&&s<c:k>0?a<o&&o<g:g<o&&o<a}else return Math.abs(E)>=Math.abs(k)?E>0?c<=s&&s<=u:u<=s&&s<=c:k>0?a<=o&&o<=g:g<=o&&o<=a;return!1}function zo(r,e){var t=ft(r),i=ft(e),n=t.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return Xo(t,i);case"LineString":return Ft(t,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Ce(t,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return Vo(t,i);case"LineString":return Wo(t,i);case"Polygon":case"MultiPolygon":return qo(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return Go(t,i);case"Polygon":case"MultiPolygon":return Ko(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return Jo(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function Xo(r,e){var t,i=!1;for(t=0;t<e.coordinates.length;t++)if(fn(e.coordinates[t],r.coordinates)){i=!0;break}return i}function Vo(r,e){for(var t=0;t<r.coordinates.length;t++){for(var i=!1,n=0;n<e.coordinates.length;n++)fn(r.coordinates[t],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function Wo(r,e){for(var t=!1,i=0;i<r.coordinates.length;i++){if(!Ft(r.coordinates[i],e))return!1;t||(t=Ft(r.coordinates[i],e,{ignoreEndVertices:!0}))}return t}function qo(r,e){for(var t=!0,i=!1,n=0;n<r.coordinates.length;n++){if(i=Ce(r.coordinates[1],e),!i){t=!1;break}i=Ce(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&i}function Go(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Ft(r.coordinates[t],e))return!1;return!0}function Ko(r,e){var t=it(e),i=it(r);if(!dn(t,i))return!1;for(var n=!1,s=0;s<r.coordinates.length-1;s++){if(!Ce(r.coordinates[s],e))return!1;if(n||(n=Ce(r.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=Zo(r.coordinates[s],r.coordinates[s+1]);n=Ce(o,e,{ignoreBoundary:!0})}}return n}function Jo(r,e){var t=it(r),i=it(e);if(!dn(i,t))return!1;for(var n=0;n<r.coordinates[0].length;n++)if(!Ce(r.coordinates[0][n],e))return!1;return!0}function dn(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function fn(r,e){return r[0]===e[0]&&r[1]===e[1]}function Zo(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}var Qo=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,St=(r,e,t,i)=>{for(var n=i>1?void 0:i?ea(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Qo(e,t,n),n};const ta=(r,e)=>e?Uo(r,e):!0,ra=(r,e)=>e?zo(r,e):!0;let Tr=class extends Se{reset(){this.filterObject.state.geometry=void 0;const r=this.renderRoot.querySelector("eox-itemfilter-spatial-filter");delete this.filterObject.dirty,r.reset()}createRenderRoot(){return this}render(){var r;return he`
519
+ */const no=vr(class extends mr{constructor(r){if(super(r),r.type!==Ge.PROPERTY&&r.type!==Ge.ATTRIBUTE&&r.type!==Ge.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Es(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===Se||e===ne)return e;const t=r.element,i=r.name;if(r.type===Ge.PROPERTY){if(e===t[i])return Se}else if(r.type===Ge.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return Se}else if(r.type===Ge.ATTRIBUTE&&t.getAttribute(i)===e+"")return Se;return Xi(r),e}});var $e=63710088e-1,Pr={centimeters:$e*100,centimetres:$e*100,degrees:$e/111325,feet:$e*3.28084,inches:$e*39.37,kilometers:$e/1e3,kilometres:$e/1e3,meters:$e,metres:$e,miles:$e/1609.344,millimeters:$e*1e3,millimetres:$e*1e3,nauticalmiles:$e/1852,radians:1,yards:$e*1.0936},so={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/$e,yards:1.0936133},Cr={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Ce(r,e,t){t===void 0&&(t={});var i={type:"Feature"};return(t.id===0||t.id)&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.properties=e||{},i.geometry=r,i}function oo(r,e,t){switch(r){case"Point":return Ne(e).geometry;case"LineString":return Re(e).geometry;case"Polygon":return kr(e).geometry;case"MultiPoint":return on(e).geometry;case"MultiLineString":return Lr(e).geometry;case"MultiPolygon":return an(e).geometry;default:throw new Error(r+" is invalid")}}function Ne(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ht(r[0])||!Ht(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Ce(i,e,t)}function ao(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return Ne(i,e)}),t)}function kr(r,e,t){t===void 0&&(t={});for(var i=0,n=r;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:r};return Ce(l,e,t)}function lo(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return kr(i,e)}),t)}function Re(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:r};return Ce(i,e,t)}function co(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return Re(i,e)}),t)}function Ke(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function Lr(r,e,t){t===void 0&&(t={});var i={type:"MultiLineString",coordinates:r};return Ce(i,e,t)}function on(r,e,t){t===void 0&&(t={});var i={type:"MultiPoint",coordinates:r};return Ce(i,e,t)}function an(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return Ce(i,e,t)}function uo(r,e,t){t===void 0&&(t={});var i={type:"GeometryCollection",geometries:r};return Ce(i,e,t)}function ho(r,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var t=Math.pow(10,e||0);return Math.round(r*t)/t}function ln(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Tr(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r/t}function fo(r,e){return cn(Tr(r,e))}function po(r){var e=r%360;return e<0&&(e+=360),e}function cn(r){var e=r%(2*Math.PI);return e*180/Math.PI}function go(r){var e=r%360;return e*Math.PI/180}function vo(r,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("length must be a positive number");return ln(Tr(r,e),t)}function mo(r,e,t){if(e===void 0&&(e="meters"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("area must be a positive number");var i=Cr[e];if(!i)throw new Error("invalid original units");var n=Cr[t];if(!n)throw new Error("invalid final units");return r/i*n}function Ht(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Rr(r){return!!r&&r.constructor===Object}function yo(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(e){if(!Ht(e))throw new Error("bbox must only contain numbers")})}function bo(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}const xo=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:Cr,bearingToAzimuth:po,convertArea:mo,convertLength:vo,degreesToRadians:go,earthRadius:$e,factors:Pr,feature:Ce,featureCollection:Ke,geometry:oo,geometryCollection:uo,isNumber:Ht,isObject:Rr,lengthToDegrees:fo,lengthToRadians:Tr,lineString:Re,lineStrings:co,multiLineString:Lr,multiPoint:on,multiPolygon:an,point:Ne,points:ao,polygon:kr,polygons:lo,radiansToDegrees:cn,radiansToLength:ln,round:ho,unitsFactors:so,validateBBox:yo,validateId:bo},Symbol.toStringTag,{value:"Module"}));function un(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function pt(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function gt(r){return r.type==="Feature"?r.geometry:r}function ke(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=un(r),n=gt(e),s=n.type,o=e.bbox,l=n.coordinates;if(o&&$o(i,o)===!1)return!1;s==="Polygon"&&(l=[l]);for(var a=!1,u=0;u<l.length&&!a;u++)if(hn(i,l[u][0],t.ignoreBoundary)){for(var p=!1,v=1;v<l[u].length&&!p;)hn(i,l[u][v],!t.ignoreBoundary)&&(p=!0),v++;p||(a=!0)}return a}function hn(r,e,t){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],l=e[n][1],a=e[s][0],u=e[s][1],p=r[1]*(o-a)+l*(a-r[0])+u*(r[0]-o)===0&&(o-r[0])*(a-r[0])<=0&&(l-r[1])*(u-r[1])<=0;if(p)return!t;var v=l>r[1]!=u>r[1]&&r[0]<(a-o)*(r[1]-l)/(u-l)+o;v&&(i=!i)}return i}function $o(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function vt(r,e,t){if(r!==null)for(var i,n,s,o,l,a,u,p=0,v=0,y,x=r.type,M=x==="FeatureCollection",j=x==="Feature",q=M?r.features.length:1,J=0;J<q;J++){u=M?r.features[J].geometry:j?r.geometry:r,y=u?u.type==="GeometryCollection":!1,l=y?u.geometries.length:1;for(var f=0;f<l;f++){var g=0,$=0;if(o=y?u.geometries[f]:u,o!==null){a=o.coordinates;var S=o.type;switch(p=t&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(e(a,v,J,g,$)===!1)return!1;v++,g++;break;case"LineString":case"MultiPoint":for(i=0;i<a.length;i++){if(e(a[i],v,J,g,$)===!1)return!1;v++,S==="MultiPoint"&&g++}S==="LineString"&&g++;break;case"Polygon":case"MultiLineString":for(i=0;i<a.length;i++){for(n=0;n<a[i].length-p;n++){if(e(a[i][n],v,J,g,$)===!1)return!1;v++}S==="MultiLineString"&&g++,S==="Polygon"&&$++}S==="Polygon"&&g++;break;case"MultiPolygon":for(i=0;i<a.length;i++){for($=0,n=0;n<a[i].length;n++){for(s=0;s<a[i][n].length-p;s++){if(e(a[i][n][s],v,J,g,$)===!1)return!1;v++}$++}g++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(vt(o.geometries[i],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function wo(r,e,t,i){var n=t;return vt(r,function(s,o,l,a,u){o===0&&t===void 0?n=s:n=e(n,s,o,l,a,u)},i),n}function dn(r,e){var t;switch(r.type){case"FeatureCollection":for(t=0;t<r.features.length&&e(r.features[t].properties,t)!==!1;t++);break;case"Feature":e(r.properties,0);break}}function _o(r,e,t){var i=t;return dn(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Ut(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function Eo(r,e,t){var i=t;return Ut(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Mo(r){var e=[];return vt(r,function(t){e.push(t)}),e}function Dr(r,e){var t,i,n,s,o,l,a,u,p,v,y=0,x=r.type==="FeatureCollection",M=r.type==="Feature",j=x?r.features.length:1;for(t=0;t<j;t++){for(l=x?r.features[t].geometry:M?r.geometry:r,u=x?r.features[t].properties:M?r.properties:{},p=x?r.features[t].bbox:M?r.bbox:void 0,v=x?r.features[t].id:M?r.id:void 0,a=l?l.type==="GeometryCollection":!1,o=a?l.geometries.length:1,n=0;n<o;n++){if(s=a?l.geometries[n]:l,s===null){if(e(null,y,u,p,v)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,y,u,p,v)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],y,u,p,v)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}function Ao(r,e,t){var i=t;return Dr(r,function(n,s,o,l,a){s===0&&t===void 0?i=n:i=e(i,n,s,o,l,a)}),i}function ze(r,e){Dr(r,function(t,i,n,s,o){var l=t===null?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return e(Ce(t,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var p=t.coordinates[u],v={type:a,coordinates:p};if(e(Ce(v,n),i,u)===!1)return!1}})}function Oo(r,e,t){var i=t;return ze(r,function(n,s,o){s===0&&o===0&&t===void 0?i=n:i=e(i,n,s,o)}),i}function fn(r,e){ze(r,function(t,i,n){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var l,a=0,u=0,p=0;if(vt(t,function(v,y,x,M,j){if(l===void 0||i>a||M>u||j>p){l=v,a=i,u=M,p=j,s=0;return}var q=Re([l,v],t.properties);if(e(q,i,n,j,s)===!1)return!1;s++,l=v})===!1)return!1}}})}function So(r,e,t){var i=t,n=!1;return fn(r,function(s,o,l,a,u){n===!1&&t===void 0?i=s:i=e(i,s,o,l,a,u),n=!0}),i}function pn(r,e){if(!r)throw new Error("geojson is required");ze(r,function(t,i,n){if(t.geometry!==null){var s=t.geometry.type,o=t.geometry.coordinates;switch(s){case"LineString":if(e(t,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<o.length;l++)if(e(Re(o[l],t.properties),i,n,l)===!1)return!1;break}}})}function Po(r,e,t){var i=t;return pn(r,function(n,s,o,l){s===0&&t===void 0?i=n:i=e(i,n,s,o,l)}),i}function Co(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,l;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,l=r.features[t].geometry;break;case"Feature":o=o||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),Re([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),Re([a[n][s],a[n][s+1]],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s-1),Re([a[i][s],a[i][s+1]],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s-1),Re([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function ko(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,l;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,l=r.features[t].geometry;break;case"Feature":o=o||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":return Ne(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Ne(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Ne(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Ne(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Ne(a[i][s],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s),Ne(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const Lo=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Mo,coordEach:vt,coordReduce:wo,featureEach:Ut,featureReduce:Eo,findPoint:ko,findSegment:Co,flattenEach:ze,flattenReduce:Oo,geomEach:Dr,geomReduce:Ao,lineEach:pn,lineReduce:Po,propEach:dn,propReduce:_o,segmentEach:fn,segmentReduce:So},Symbol.toStringTag,{value:"Module"}));function gn(r){if(!r)throw new Error("geojson is required");var e=[];return ze(r,function(t){To(t,e)}),Ke(e)}function To(r,e){var t=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":t=pt(i);break;case"LineString":t=[pt(i)]}t.forEach(function(n){var s=Ro(n,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function Ro(r,e){var t=[];return r.reduce(function(i,n){var s=Re([i,n],e);return s.bbox=Do(i,n),t.push(s),n}),t}function Do(r,e){var t=r[0],i=r[1],n=e[0],s=e[1],o=t<n?t:n,l=i<s?i:s,a=t>n?t:n,u=i>s?i:s;return[o,l,a,u]}var Ir={exports:{}},vn={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ft,function(){function t(f,g,$,S,E){(function A(C,L,I,W,re){for(;W>I;){if(W-I>600){var k=W-I+1,_=L-I+1,O=Math.log(k),B=.5*Math.exp(2*O/3),P=.5*Math.sqrt(O*B*(k-B)/k)*(_-k/2<0?-1:1),H=Math.max(I,Math.floor(L-_*B/k+P)),V=Math.min(W,Math.floor(L+(k-_)*B/k+P));A(C,L,H,V,re)}var ee=C[L],le=I,Z=W;for(i(C,I,L),re(C[W],ee)>0&&i(C,I,W);le<Z;){for(i(C,le,Z),le++,Z--;re(C[le],ee)<0;)le++;for(;re(C[Z],ee)>0;)Z--}re(C[I],ee)===0?i(C,I,Z):i(C,++Z,W),Z<=L&&(I=Z+1),L<=Z&&(W=Z-1)}})(f,g,$||0,S||f.length-1,E||n)}function i(f,g,$){var S=f[g];f[g]=f[$],f[$]=S}function n(f,g){return f<g?-1:f>g?1:0}var s=function(f){f===void 0&&(f=9),this._maxEntries=Math.max(4,f),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(f,g,$){if(!$)return g.indexOf(f);for(var S=0;S<g.length;S++)if($(f,g[S]))return S;return-1}function l(f,g){a(f,0,f.children.length,g,f)}function a(f,g,$,S,E){E||(E=q(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var A=g;A<$;A++){var C=f.children[A];u(E,f.leaf?S(C):C)}return E}function u(f,g){return f.minX=Math.min(f.minX,g.minX),f.minY=Math.min(f.minY,g.minY),f.maxX=Math.max(f.maxX,g.maxX),f.maxY=Math.max(f.maxY,g.maxY),f}function p(f,g){return f.minX-g.minX}function v(f,g){return f.minY-g.minY}function y(f){return(f.maxX-f.minX)*(f.maxY-f.minY)}function x(f){return f.maxX-f.minX+(f.maxY-f.minY)}function M(f,g){return f.minX<=g.minX&&f.minY<=g.minY&&g.maxX<=f.maxX&&g.maxY<=f.maxY}function j(f,g){return g.minX<=f.maxX&&g.minY<=f.maxY&&g.maxX>=f.minX&&g.maxY>=f.minY}function q(f){return{children:f,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function J(f,g,$,S,E){for(var A=[g,$];A.length;)if(!(($=A.pop())-(g=A.pop())<=S)){var C=g+Math.ceil(($-g)/S/2)*S;t(f,C,g,$,E),A.push(g,C,C,$)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(f){var g=this.data,$=[];if(!j(f,g))return $;for(var S=this.toBBox,E=[];g;){for(var A=0;A<g.children.length;A++){var C=g.children[A],L=g.leaf?S(C):C;j(f,L)&&(g.leaf?$.push(C):M(f,L)?this._all(C,$):E.push(C))}g=E.pop()}return $},s.prototype.collides=function(f){var g=this.data;if(!j(f,g))return!1;for(var $=[];g;){for(var S=0;S<g.children.length;S++){var E=g.children[S],A=g.leaf?this.toBBox(E):E;if(j(f,A)){if(g.leaf||M(f,A))return!0;$.push(E)}}g=$.pop()}return!1},s.prototype.load=function(f){if(!f||!f.length)return this;if(f.length<this._minEntries){for(var g=0;g<f.length;g++)this.insert(f[g]);return this}var $=this._build(f.slice(),0,f.length-1,0);if(this.data.children.length)if(this.data.height===$.height)this._splitRoot(this.data,$);else{if(this.data.height<$.height){var S=this.data;this.data=$,$=S}this._insert($,this.data.height-$.height-1,!0)}else this.data=$;return this},s.prototype.insert=function(f){return f&&this._insert(f,this.data.height-1),this},s.prototype.clear=function(){return this.data=q([]),this},s.prototype.remove=function(f,g){if(!f)return this;for(var $,S,E,A=this.data,C=this.toBBox(f),L=[],I=[];A||L.length;){if(A||(A=L.pop(),S=L[L.length-1],$=I.pop(),E=!0),A.leaf){var W=o(f,A.children,g);if(W!==-1)return A.children.splice(W,1),L.push(A),this._condense(L),this}E||A.leaf||!M(A,C)?S?($++,A=S.children[$],E=!1):A=null:(L.push(A),I.push($),$=0,S=A,A=A.children[0])}return this},s.prototype.toBBox=function(f){return f},s.prototype.compareMinX=function(f,g){return f.minX-g.minX},s.prototype.compareMinY=function(f,g){return f.minY-g.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(f){return this.data=f,this},s.prototype._all=function(f,g){for(var $=[];f;)f.leaf?g.push.apply(g,f.children):$.push.apply($,f.children),f=$.pop();return g},s.prototype._build=function(f,g,$,S){var E,A=$-g+1,C=this._maxEntries;if(A<=C)return l(E=q(f.slice(g,$+1)),this.toBBox),E;S||(S=Math.ceil(Math.log(A)/Math.log(C)),C=Math.ceil(A/Math.pow(C,S-1))),(E=q([])).leaf=!1,E.height=S;var L=Math.ceil(A/C),I=L*Math.ceil(Math.sqrt(C));J(f,g,$,I,this.compareMinX);for(var W=g;W<=$;W+=I){var re=Math.min(W+I-1,$);J(f,W,re,L,this.compareMinY);for(var k=W;k<=re;k+=L){var _=Math.min(k+L-1,re);E.children.push(this._build(f,k,_,S-1))}}return l(E,this.toBBox),E},s.prototype._chooseSubtree=function(f,g,$,S){for(;S.push(g),!g.leaf&&S.length-1!==$;){for(var E=1/0,A=1/0,C=void 0,L=0;L<g.children.length;L++){var I=g.children[L],W=y(I),re=(k=f,_=I,(Math.max(_.maxX,k.maxX)-Math.min(_.minX,k.minX))*(Math.max(_.maxY,k.maxY)-Math.min(_.minY,k.minY))-W);re<A?(A=re,E=W<E?W:E,C=I):re===A&&W<E&&(E=W,C=I)}g=C||g.children[0]}var k,_;return g},s.prototype._insert=function(f,g,$){var S=$?f:this.toBBox(f),E=[],A=this._chooseSubtree(S,this.data,g,E);for(A.children.push(f),u(A,S);g>=0&&E[g].children.length>this._maxEntries;)this._split(E,g),g--;this._adjustParentBBoxes(S,E,g)},s.prototype._split=function(f,g){var $=f[g],S=$.children.length,E=this._minEntries;this._chooseSplitAxis($,E,S);var A=this._chooseSplitIndex($,E,S),C=q($.children.splice(A,$.children.length-A));C.height=$.height,C.leaf=$.leaf,l($,this.toBBox),l(C,this.toBBox),g?f[g-1].children.push(C):this._splitRoot($,C)},s.prototype._splitRoot=function(f,g){this.data=q([f,g]),this.data.height=f.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(f,g,$){for(var S,E,A,C,L,I,W,re=1/0,k=1/0,_=g;_<=$-g;_++){var O=a(f,0,_,this.toBBox),B=a(f,_,$,this.toBBox),P=(E=O,A=B,C=void 0,L=void 0,I=void 0,W=void 0,C=Math.max(E.minX,A.minX),L=Math.max(E.minY,A.minY),I=Math.min(E.maxX,A.maxX),W=Math.min(E.maxY,A.maxY),Math.max(0,I-C)*Math.max(0,W-L)),H=y(O)+y(B);P<re?(re=P,S=_,k=H<k?H:k):P===re&&H<k&&(k=H,S=_)}return S||$-g},s.prototype._chooseSplitAxis=function(f,g,$){var S=f.leaf?this.compareMinX:p,E=f.leaf?this.compareMinY:v;this._allDistMargin(f,g,$,S)<this._allDistMargin(f,g,$,E)&&f.children.sort(S)},s.prototype._allDistMargin=function(f,g,$,S){f.children.sort(S);for(var E=this.toBBox,A=a(f,0,g,E),C=a(f,$-g,$,E),L=x(A)+x(C),I=g;I<$-g;I++){var W=f.children[I];u(A,f.leaf?E(W):W),L+=x(A)}for(var re=$-g-1;re>=g;re--){var k=f.children[re];u(C,f.leaf?E(k):k),L+=x(C)}return L},s.prototype._adjustParentBBoxes=function(f,g,$){for(var S=$;S>=0;S--)u(g[S],f)},s.prototype._condense=function(f){for(var g=f.length-1,$=void 0;g>=0;g--)f[g].children.length===0?g>0?($=f[g-1].children).splice($.indexOf(f[g]),1):this.clear():l(f[g],this.toBBox)},s})})(vn);var Io=vn.exports;const jo=wr(xo),No=wr(Lo);function nt(r){var e=[1/0,1/0,-1/0,-1/0];return vt(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}nt.default=nt;const Bo=wr(Object.freeze(Object.defineProperty({__proto__:null,default:nt},Symbol.toStringTag,{value:"Module"})));var Be=Io,mn=jo,yn=No,mt=Bo.default,Fo=yn.featureEach;yn.coordEach,mn.polygon;var bn=mn.featureCollection;function xn(r){var e=new Be(r);return e.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:mt(t),Be.prototype.insert.call(this,t)},e.load=function(t){var i=[];return Array.isArray(t)?t.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:mt(n),i.push(n)}):Fo(t,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:mt(n),i.push(n)}),Be.prototype.load.call(this,i)},e.remove=function(t,i){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:mt(t),Be.prototype.remove.call(this,t,i)},e.clear=function(){return Be.prototype.clear.call(this)},e.search=function(t){var i=Be.prototype.search.call(this,this.toBBox(t));return bn(i)},e.collides=function(t){return Be.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=Be.prototype.all.call(this);return bn(t)},e.toJSON=function(){return Be.prototype.toJSON.call(this)},e.fromJSON=function(t){return Be.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var i;if(t.bbox)i=t.bbox;else if(Array.isArray(t)&&t.length===4)i=t;else if(Array.isArray(t)&&t.length===6)i=[t[0],t[1],t[3],t[4]];else if(t.type==="Feature")i=mt(t);else if(t.type==="FeatureCollection")i=mt(t);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}Ir.exports=xn,Ir.exports.default=xn;var Ho=Ir.exports;const Uo=$r(Ho);function jr(r,e){var t={},i=[];if(r.type==="LineString"&&(r=Ce(r)),e.type==="LineString"&&(e=Ce(e)),r.type==="Feature"&&e.type==="Feature"&&r.geometry!==null&&e.geometry!==null&&r.geometry.type==="LineString"&&e.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=$n(r,e);return n&&i.push(n),Ke(i)}var s=Uo();return s.load(gn(e)),Ut(gn(r),function(o){Ut(s.search(o),function(l){var a=$n(o,l);if(a){var u=pt(a).join(",");t[u]||(t[u]=!0,i.push(a))}})}),Ke(i)}function $n(r,e){var t=pt(r),i=pt(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=t[0][0],s=t[0][1],o=t[1][0],l=t[1][1],a=i[0][0],u=i[0][1],p=i[1][0],v=i[1][1],y=(v-u)*(o-n)-(p-a)*(l-s),x=(p-a)*(s-u)-(v-u)*(n-a),M=(o-n)*(s-u)-(l-s)*(n-a);if(y===0)return null;var j=x/y,q=M/y;if(j>=0&&j<=1&&q>=0&&q<=1){var J=n+j*(o-n),f=s+j*(l-s);return Ne([J,f])}return null}function Nr(r,e){e===void 0&&(e={});var t=gt(r);switch(!e.properties&&r.type==="Feature"&&(e.properties=r.properties),t.type){case"Polygon":return Yo(t,e);case"MultiPolygon":return zo(t,e);default:throw new Error("invalid poly")}}function Yo(r,e){e===void 0&&(e={});var t=gt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{};return wn(i,n)}function zo(r,e){e===void 0&&(e={});var t=gt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{},s=[];return i.forEach(function(o){s.push(wn(o,n))}),Ke(s)}function wn(r,e){return r.length>1?Lr(r,e):Re(r[0],e)}function Xo(r,e){var t=!0;return ze(r,function(i){ze(e,function(n){if(t===!1)return!1;t=Vo(i.geometry,n.geometry)})}),t}function Vo(r,e){switch(r.type){case"Point":switch(e.type){case"Point":return!Ko(r.coordinates,e.coordinates);case"LineString":return!_n(e,r);case"Polygon":return!ke(r,e)}break;case"LineString":switch(e.type){case"Point":return!_n(r,e);case"LineString":return!Wo(r,e);case"Polygon":return!En(e,r)}break;case"Polygon":switch(e.type){case"Point":return!ke(e,r);case"LineString":return!En(r,e);case"Polygon":return!qo(e,r)}}return!1}function _n(r,e){for(var t=0;t<r.coordinates.length-1;t++)if(Go(r.coordinates[t],r.coordinates[t+1],e.coordinates))return!0;return!1}function Wo(r,e){var t=jr(r,e);return t.features.length>0}function En(r,e){for(var t=0,i=e.coordinates;t<i.length;t++){var n=i[t];if(ke(n,r))return!0}var s=jr(e,Nr(r));return s.features.length>0}function qo(r,e){for(var t=0,i=r.coordinates[0];t<i.length;t++){var n=i[t];if(ke(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var l=o[s];if(ke(l,r))return!0}var a=jr(Nr(r),Nr(e));return a.features.length>0}function Go(r,e,t){var i=t[0]-r[0],n=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],l=i*o-n*s;return l!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?r[0]<=t[0]&&t[0]<=e[0]:e[0]<=t[0]&&t[0]<=r[0]:o>0?r[1]<=t[1]&&t[1]<=e[1]:e[1]<=t[1]&&t[1]<=r[1]}function Ko(r,e){return r[0]===e[0]&&r[1]===e[1]}function Jo(r,e){var t=!1;return ze(r,function(i){ze(e,function(n){if(t===!0)return!0;t=!Xo(i.geometry,n.geometry)})}),t}function Yt(r,e,t){t===void 0&&(t={});for(var i=un(r),n=pt(e),s=0;s<n.length-1;s++){var o=!1;if(t.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),Zo(n[s],n[s+1],i,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function Zo(r,e,t,i,n){var s=t[0],o=t[1],l=r[0],a=r[1],u=e[0],p=e[1],v=t[0]-l,y=t[1]-a,x=u-l,M=p-a,j=v*M-y*x;if(n!==null){if(Math.abs(j)>n)return!1}else if(j!==0)return!1;if(i){if(i==="start")return Math.abs(x)>=Math.abs(M)?x>0?l<s&&s<=u:u<=s&&s<l:M>0?a<o&&o<=p:p<=o&&o<a;if(i==="end")return Math.abs(x)>=Math.abs(M)?x>0?l<=s&&s<u:u<s&&s<=l:M>0?a<=o&&o<p:p<o&&o<=a;if(i==="both")return Math.abs(x)>=Math.abs(M)?x>0?l<s&&s<u:u<s&&s<l:M>0?a<o&&o<p:p<o&&o<a}else return Math.abs(x)>=Math.abs(M)?x>0?l<=s&&s<=u:u<=s&&s<=l:M>0?a<=o&&o<=p:p<=o&&o<=a;return!1}function Qo(r,e){var t=gt(r),i=gt(e),n=t.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return ea(t,i);case"LineString":return Yt(t,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return ke(t,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return ta(t,i);case"LineString":return ra(t,i);case"Polygon":case"MultiPolygon":return ia(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return na(t,i);case"Polygon":case"MultiPolygon":return sa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return oa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function ea(r,e){var t,i=!1;for(t=0;t<e.coordinates.length;t++)if(An(e.coordinates[t],r.coordinates)){i=!0;break}return i}function ta(r,e){for(var t=0;t<r.coordinates.length;t++){for(var i=!1,n=0;n<e.coordinates.length;n++)An(r.coordinates[t],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function ra(r,e){for(var t=!1,i=0;i<r.coordinates.length;i++){if(!Yt(r.coordinates[i],e))return!1;t||(t=Yt(r.coordinates[i],e,{ignoreEndVertices:!0}))}return t}function ia(r,e){for(var t=!0,i=!1,n=0;n<r.coordinates.length;n++){if(i=ke(r.coordinates[1],e),!i){t=!1;break}i=ke(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&i}function na(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Yt(r.coordinates[t],e))return!1;return!0}function sa(r,e){var t=nt(e),i=nt(r);if(!Mn(t,i))return!1;for(var n=!1,s=0;s<r.coordinates.length-1;s++){if(!ke(r.coordinates[s],e))return!1;if(n||(n=ke(r.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=aa(r.coordinates[s],r.coordinates[s+1]);n=ke(o,e,{ignoreBoundary:!0})}}return n}function oa(r,e){var t=nt(r),i=nt(e);if(!Mn(i,t))return!1;for(var n=0;n<r.coordinates[0].length;n++)if(!ke(r.coordinates[0][n],e))return!1;return!0}function Mn(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function An(r,e){return r[0]===e[0]&&r[1]===e[1]}function aa(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}var la=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,kt=(r,e,t,i)=>{for(var n=i>1?void 0:i?ca(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&la(e,t,n),n};const ua=(r,e)=>e?Jo(r,e):!0,ha=(r,e)=>e?Qo(r,e):!0;let Br=class extends Pe{reset(){this.filterObject.state.geometry=void 0;const r=this.renderRoot.querySelector("eox-itemfilter-spatial-filter");delete this.filterObject.dirty,r.reset(),this.requestUpdate()}createRenderRoot(){return this}render(){var r;return he`
509
520
  <form style="display: inline">
510
- ${tt(["intersects","within"],e=>he`
521
+ ${dt(["intersects","within"],e=>he`
511
522
  <label>
512
523
  <input
513
524
  type="radio"
514
525
  name="mode"
515
- .checked="${Gs(this.filterObject.state.mode===e)}"
526
+ .checked="${no(this.filterObject.state.mode===e)}"
516
527
  value="${e}"
517
528
  @click="${()=>{this.filterObject.state.mode=e;const t=new CustomEvent("filter",{detail:{[this.filterObject.key]:{}}});this.dispatchEvent(t)}}"
518
529
  />
@@ -525,7 +536,7 @@ eox-itemfilter-range {
525
536
  .geometry=${(r=this.filterObject.state)==null?void 0:r.geometry}
526
537
  @filter="${e=>{this.filterObject.state.geometry=e.detail.geometry,this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))}}"
527
538
  ></eox-itemfilter-spatial>
528
- `}};St([Ae()],Tr.prototype,"filterObject",2),Tr=St([qe("eox-itemfilter-spatial")],Tr);let Ht=class extends Se{render(){return he`<eox-map part="map" style="height: 400px"></eox-map>`}firstUpdated(){this.setup()}setup(){const r=[{type:"Vector",id:"draw",source:{type:"Vector",...this.geometry&&{format:"GeoJSON"},...this.geometry&&{url:this.createFeatureUrl(this.geometry)}},zIndex:1},{type:"Tile",source:{type:"XYZ",url:"https://s2maps-tiles.eu/wmts/1.0.0/osm_3857/default/g/{z}/{y}/{x}.jpg",attribution:"{ OSM: Data &copy; OpenStreetMap contributors and others, Rendering &copy; EOX }"}}];this.eoxMap=this.renderRoot.querySelector("eox-map"),setTimeout(()=>{this.eoxMap.setLayers(r),this.eoxMap.addDraw("draw",{id:"drawInteraction",type:"Polygon"});const e=t=>{const i=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:t.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(i)};this.eoxMap.interactions.drawInteraction.on("drawend",t=>{e(t.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",t=>{e(t.features.getArray()[0])})})}createFeatureUrl(r){return`data:text/json,${encodeURIComponent(JSON.stringify({type:"FeatureCollection",features:[{type:"Feature",properties:null,geometry:r}]}))}`}reset(){var e;const r=this.eoxMap.getLayerById("draw").getSource();((e=r.getFeatures())==null?void 0:e.length)>0&&(r.clear(),this.eoxMap.removeInteraction("drawInteraction_modify"),this.setup())}};St([Ae()],Ht.prototype,"geometry",2),St([Ot()],Ht.prototype,"eoxMap",2),Ht=St([qe("eox-itemfilter-spatial-filter")],Ht);var ia=Object.defineProperty,na=Object.getOwnPropertyDescriptor,pn=(r,e,t,i)=>{for(var n=i>1?void 0:i?na(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&ia(e,t,n),n};let Rr=class extends Se{constructor(){super(...arguments),this.inputHandler=()=>{const r=this.renderRoot.querySelector("input[type='text']");this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=r.value}),this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))},this.debouncedInputHandler=Yi(this.inputHandler,500,{leading:!0})}reset(){const r=this.renderRoot.querySelector("input[type='text']");r.value="",this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=void 0}),delete this.filterObject.dirty}createRenderRoot(){return this}render(){return he`
539
+ `}};kt([Ae()],Br.prototype,"filterObject",2),Br=kt([qe("eox-itemfilter-spatial")],Br);let zt=class extends Pe{render(){return he`<eox-map part="map" style="height: 400px"></eox-map>`}firstUpdated(){this.setup()}setup(){const r=[{type:"Vector",id:"draw",source:{type:"Vector",...this.geometry&&{format:"GeoJSON"},...this.geometry&&{url:this.createFeatureUrl(this.geometry)}},zIndex:1},{type:"Tile",source:{type:"XYZ",url:"https://s2maps-tiles.eu/wmts/1.0.0/osm_3857/default/g/{z}/{y}/{x}.jpg",attribution:"{ OSM: Data &copy; OpenStreetMap contributors and others, Rendering &copy; EOX }"}}];this.eoxMap=this.renderRoot.querySelector("eox-map"),setTimeout(()=>{this.eoxMap.setLayers(r),this.eoxMap.addDraw("draw",{id:"drawInteraction",type:"Polygon"});const e=t=>{const i=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:t.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(i)};this.eoxMap.interactions.drawInteraction.on("drawend",t=>{e(t.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",t=>{e(t.features.getArray()[0])})})}createFeatureUrl(r){return`data:text/json,${encodeURIComponent(JSON.stringify({type:"FeatureCollection",features:[{type:"Feature",properties:null,geometry:r}]}))}`}reset(){var e;const r=this.eoxMap.getLayerById("draw").getSource();((e=r.getFeatures())==null?void 0:e.length)>0&&(r.clear(),this.eoxMap.removeInteraction("drawInteraction_modify"),this.setup())}};kt([Ae()],zt.prototype,"geometry",2),kt([Pt()],zt.prototype,"eoxMap",2),zt=kt([qe("eox-itemfilter-spatial-filter")],zt);var da=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,On=(r,e,t,i)=>{for(var n=i>1?void 0:i?fa(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&da(e,t,n),n};let Fr=class extends Pe{constructor(){super(...arguments),this.inputHandler=()=>{const r=this.renderRoot.querySelector("input[type='text']");this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=r.value}),this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))},this.debouncedInputHandler=rn(this.inputHandler,500,{leading:!0})}reset(){const r=this.renderRoot.querySelector("input[type='text']");r.value="",this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=void 0}),delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
529
540
  <input
530
541
  type="text"
531
542
  placeholder="Type something..."
@@ -534,50 +545,51 @@ eox-itemfilter-range {
534
545
  value="${Object.values(this.filterObject.state)[0]}"
535
546
  @input="${this.debouncedInputHandler}"
536
547
  />
537
- `}};pn([Ae()],Rr.prototype,"filterObject",2),Rr=pn([qe("eox-itemfilter-text")],Rr);function ze(r){return Array.isArray?Array.isArray(r):mn(r)==="[object Array]"}const sa=1/0;function oa(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-sa?"-0":e}function aa(r){return r==null?"":oa(r)}function Fe(r){return typeof r=="string"}function gn(r){return typeof r=="number"}function la(r){return r===!0||r===!1||ca(r)&&mn(r)=="[object Boolean]"}function vn(r){return typeof r=="object"}function ca(r){return vn(r)&&r!==null}function Oe(r){return r!=null}function Dr(r){return!r.trim().length}function mn(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ql="Extended search is not available",ua="Incorrect 'index' type",ha=r=>`Invalid value for key ${r}`,da=r=>`Pattern length exceeds max of ${r}.`,fa=r=>`Missing ${r} property in key`,pa=r=>`Property 'weight' in key '${r}' must be a positive integer`,yn=Object.prototype.hasOwnProperty;class ga{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=bn(i);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function bn(r){let e=null,t=null,i=null,n=1,s=null;if(Fe(r)||ze(r))i=r,e=xn(r),t=Ir(r);else{if(!yn.call(r,"name"))throw new Error(fa("name"));const o=r.name;if(i=o,yn.call(r,"weight")&&(n=r.weight,n<=0))throw new Error(pa(o));e=xn(o),t=Ir(o),s=r.getFn}return{path:e,id:t,weight:n,src:i,getFn:s}}function xn(r){return ze(r)?r:r.split(".")}function Ir(r){return ze(r)?r.join("."):r}function va(r,e){let t=[],i=!1;const n=(s,o,c)=>{if(Oe(s))if(!o[c])t.push(s);else{let a=o[c];const u=s[a];if(!Oe(u))return;if(c===o.length-1&&(Fe(u)||gn(u)||la(u)))t.push(aa(u));else if(ze(u)){i=!0;for(let g=0,v=u.length;g<v;g+=1)n(u[g],o,c+1)}else o.length&&n(u,o,c+1)}};return n(r,Fe(e)?e.split("."):e,0),i?t:t[0]}var X={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:va,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const ma=/[^ ]+/g;function ya(r=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(ma).length;if(t.has(s))return t.get(s);const o=1/Math.pow(s,.5*r),c=parseFloat(Math.round(o*i)/i);return t.set(s,c),c},clear(){t.clear()}}}class jr{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=ya(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,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Fe(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();Fe(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Oe(e)||Dr(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(Oe(o)){if(ze(o)){let c=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:u,value:g}=a.pop();if(Oe(g))if(Fe(g)&&!Dr(g)){let v={v:g,i:u,n:this.norm.get(g)};c.push(v)}else ze(g)&&g.forEach((v,_)=>{a.push({nestedArrIndex:_,value:v})})}i.$[s]=c}else if(Fe(o)&&!Dr(o)){let c={v:o,n:this.norm.get(o)};i.$[s]=c}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function $n(r,e,{getFn:t=X.getFn,fieldNormWeight:i=X.fieldNormWeight}={}){const n=new jr({getFn:t,fieldNormWeight:i});return n.setKeys(r.map(bn)),n.setSources(e),n.create(),n}function ba(r,{getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){const{keys:i,records:n}=r,s=new jr({getFn:e,fieldNormWeight:t});return s.setKeys(i),s.setIndexRecords(n),s}function Ut(r,{errors:e=0,currentLocation:t=0,expectedLocation:i=0,distance:n=X.distance,ignoreLocation:s=X.ignoreLocation}={}){const o=e/r.length;if(s)return o;const c=Math.abs(i-t);return n?o+c/n:c?1:o}function xa(r=[],e=X.minMatchCharLength){let t=[],i=-1,n=-1,s=0;for(let o=r.length;s<o;s+=1){let c=r[s];c&&i===-1?i=s:!c&&i!==-1&&(n=s-1,n-i+1>=e&&t.push([i,n]),i=-1)}return r[s-1]&&s-i>=e&&t.push([i,s-1]),t}const nt=32;function $a(r,e,t,{location:i=X.location,distance:n=X.distance,threshold:s=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:c=X.minMatchCharLength,includeMatches:a=X.includeMatches,ignoreLocation:u=X.ignoreLocation}={}){if(e.length>nt)throw new Error(da(nt));const g=e.length,v=r.length,_=Math.max(0,Math.min(i,v));let E=s,k=_;const F=c>1||a,se=F?Array(v):[];let te;for(;(te=r.indexOf(e,k))>-1;){let M=Ut(e,{currentLocation:te,expectedLocation:_,distance:n,ignoreLocation:u});if(E=Math.min(M,E),k=te+g,F){let P=0;for(;P<g;)se[te+P]=1,P+=1}}k=-1;let f=[],p=1,b=g+v;const O=1<<g-1;for(let M=0;M<g;M+=1){let P=0,L=b;for(;P<L;)Ut(e,{errors:M,currentLocation:_+L,expectedLocation:_,distance:n,ignoreLocation:u})<=E?P=L:b=L,L=Math.floor((b-P)/2+P);b=L;let I=Math.max(1,_-L+1),W=o?v:Math.min(_+L,v)+g,ee=Array(W+2);ee[W+1]=(1<<M)-1;for(let $=W;$>=I;$-=1){let A=$-1,N=t[r.charAt(A)];if(F&&(se[A]=+!!N),ee[$]=(ee[$+1]<<1|1)&N,M&&(ee[$]|=(f[$+1]|f[$])<<1|1|f[$+1]),ee[$]&O&&(p=Ut(e,{errors:M,currentLocation:A,expectedLocation:_,distance:n,ignoreLocation:u}),p<=E)){if(E=p,k=A,k<=_)break;I=Math.max(1,2*_-k)}}if(Ut(e,{errors:M+1,currentLocation:_,expectedLocation:_,distance:n,ignoreLocation:u})>E)break;f=ee}const w={isMatch:k>=0,score:Math.max(.001,p)};if(F){const M=xa(se,c);M.length?a&&(w.indices=M):w.isMatch=!1}return w}function wa(r){let e={};for(let t=0,i=r.length;t<i;t+=1){const n=r.charAt(t);e[n]=(e[n]||0)|1<<i-t-1}return e}class wn{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:c=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:a,ignoreLocation:u},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const g=(_,E)=>{this.chunks.push({pattern:_,alphabet:wa(_),startIndex:E})},v=this.pattern.length;if(v>nt){let _=0;const E=v%nt,k=v-E;for(;_<k;)g(this.pattern.substr(_,nt),_),_+=nt;if(E){const F=v-nt;g(this.pattern.substr(F),F)}}else g(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:i}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let k={isMatch:!0,score:0};return i&&(k.indices=[[0,e.length-1]]),k}const{location:n,distance:s,threshold:o,findAllMatches:c,minMatchCharLength:a,ignoreLocation:u}=this.options;let g=[],v=0,_=!1;this.chunks.forEach(({pattern:k,alphabet:F,startIndex:se})=>{const{isMatch:te,score:f,indices:p}=$a(e,k,F,{location:n+se,distance:s,threshold:o,findAllMatches:c,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});te&&(_=!0),v+=f,te&&p&&(g=[...g,...p])});let E={isMatch:_,score:_?v/this.chunks.length:1};return _&&i&&(E.indices=g),E}}class Ke{constructor(e){this.pattern=e}static isMultiMatch(e){return _n(e,this.multiRegex)}static isSingleMatch(e){return _n(e,this.singleRegex)}search(){}}function _n(r,e){const t=r.match(e);return t?t[1]:null}class _a extends Ke{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 Ea extends Ke{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class Ma extends Ke{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 Aa extends Ke{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 Oa extends Ke{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 Sa extends Ke{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 En extends Ke{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:c=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){super(e),this._bitapSearch=new wn(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:a,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Mn extends Ke{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+s,n.push([i,t-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const Nr=[_a,Mn,Ma,Aa,Sa,Oa,Ea,En],An=Nr.length,Pa=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ca="|";function ka(r,e={}){return r.split(Ca).map(t=>{let i=t.trim().split(Pa).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const c=i[s];let a=!1,u=-1;for(;!a&&++u<An;){const g=Nr[u];let v=g.isMultiMatch(c);v&&(n.push(new g(v,e)),a=!0)}if(!a)for(u=-1;++u<An;){const g=Nr[u];let v=g.isSingleMatch(c);if(v){n.push(new g(v,e));break}}}return n})}const La=new Set([En.type,Mn.type]);class Ta{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,includeMatches:i=X.includeMatches,minMatchCharLength:n=X.minMatchCharLength,ignoreLocation:s=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:c=X.location,threshold:a=X.threshold,distance:u=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:c,threshold:a,distance:u},this.pattern=t?e:e.toLowerCase(),this.query=ka(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:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],c=0;for(let a=0,u=t.length;a<u;a+=1){const g=t[a];o.length=0,s=0;for(let v=0,_=g.length;v<_;v+=1){const E=g[v],{isMatch:k,indices:F,score:se}=E.search(e);if(k){if(s+=1,c+=se,i){const te=E.constructor.type;La.has(te)?o=[...o,...F]:o.push(F)}}else{c=0,s=0,o.length=0;break}}if(s){let v={isMatch:!0,score:c/s};return i&&(v.indices=o),v}}return{isMatch:!1,score:1}}}const Br=[];function Ra(...r){Br.push(...r)}function Fr(r,e){for(let t=0,i=Br.length;t<i;t+=1){let n=Br[t];if(n.condition(r,e))return new n(r,e)}return new wn(r,e)}const Yt={AND:"$and",OR:"$or"},Hr={PATH:"$path",PATTERN:"$val"},Ur=r=>!!(r[Yt.AND]||r[Yt.OR]),Da=r=>!!r[Hr.PATH],Ia=r=>!ze(r)&&vn(r)&&!Ur(r),On=r=>({[Yt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function Sn(r,e,{auto:t=!0}={}){const i=n=>{let s=Object.keys(n);const o=Da(n);if(!o&&s.length>1&&!Ur(n))return i(On(n));if(Ia(n)){const a=o?n[Hr.PATH]:s[0],u=o?n[Hr.PATTERN]:n[a];if(!Fe(u))throw new Error(ha(a));const g={keyId:Ir(a),pattern:u};return t&&(g.searcher=Fr(u,e)),g}let c={children:[],operator:s[0]};return s.forEach(a=>{const u=n[a];ze(u)&&u.forEach(g=>{c.children.push(i(g))})}),c};return Ur(r)||(r=On(r)),i(r)}function ja(r,{ignoreFieldNorm:e=X.ignoreFieldNorm}){r.forEach(t=>{let i=1;t.matches.forEach(({key:n,norm:s,score:o})=>{const c=n?n.weight:null;i*=Math.pow(o===0&&c?Number.EPSILON:o,(c||1)*(e?1:s))}),t.score=i})}function Na(r,e){const t=r.matches;e.matches=[],Oe(t)&&t.forEach(i=>{if(!Oe(i.indices)||!i.indices.length)return;const{indices:n,value:s}=i;let o={indices:n,value:s};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function Ba(r,e){e.score=r.score}function Fa(r,e,{includeMatches:t=X.includeMatches,includeScore:i=X.includeScore}={}){const n=[];return t&&n.push(Na),i&&n.push(Ba),r.map(s=>{const{idx:o}=s,c={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,c)}),c})}class vt{constructor(e,t={},i){this.options={...X,...t},this.options.useExtendedSearch,this._keyStore=new ga(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof jr))throw new Error(ua);this._myIndex=t||$n(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Oe(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,n=this._docs.length;i<n;i+=1){const s=this._docs[i];e(s,i)&&(this.removeAt(i),i-=1,n-=1,t.push(s))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:c}=this.options;let a=Fe(e)?Fe(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return ja(a,{ignoreFieldNorm:c}),s&&a.sort(o),gn(t)&&t>-1&&(a=a.slice(0,t)),Fa(a,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const t=Fr(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:c})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:g}=t.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:u,value:s,norm:c,indices:g}]})}),n}_searchLogical(e){const t=Sn(e,this.options),i=(c,a,u)=>{if(!c.children){const{keyId:v,searcher:_}=c,E=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(a,v),searcher:_});return E&&E.length?[{idx:u,item:a,matches:E}]:[]}const g=[];for(let v=0,_=c.children.length;v<_;v+=1){const E=c.children[v],k=i(E,a,u);if(k.length)g.push(...k);else if(c.operator===Yt.AND)return[]}return g},n=this._myIndex.records,s={},o=[];return n.forEach(({$:c,i:a})=>{if(Oe(c)){let u=i(t,c,a);u.length&&(s[a]||(s[a]={idx:a,item:c,matches:[]},o.push(s[a])),u.forEach(({matches:g})=>{s[a].matches.push(...g)}))}}),o}_searchObjectList(e){const t=Fr(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:c})=>{if(!Oe(o))return;let a=[];i.forEach((u,g)=>{a.push(...this._findMatches({key:u,value:o[g],searcher:t}))}),a.length&&s.push({idx:c,item:o,matches:a})}),s}_findMatches({key:e,value:t,searcher:i}){if(!Oe(t))return[];let n=[];if(ze(t))t.forEach(({v:s,i:o,n:c})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:g}=i.searchIn(s);a&&n.push({score:u,key:e,value:s,idx:o,norm:c,indices:g})});else{const{v:s,n:o}=t,{isMatch:c,score:a,indices:u}=i.searchIn(s);c&&n.push({score:a,key:e,value:s,norm:o,indices:u})}return n}}vt.version="6.6.2",vt.createIndex=$n,vt.parseIndex=ba,vt.config=X,vt.parseQuery=Sn,Ra(Ta);const Ha=(r,e="highlight",t="title")=>{const i=(s,o,c)=>{const a=o.split(".");let u;for(u=0;u<a.length-1;u++)s=s[a[u]];s[a[u]]=c},n=(s,o=[])=>{let c="",a=0;return o.forEach(u=>{const g=u[1]+1;c+=[s.substring(a,u[0]),`<mark class="${e}">`,s.substring(u[0],g),"</mark>"].join(""),a=g}),c+=s.substring(a),c};return r.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const c={...s};return o.forEach(a=>{a.key===t&&i(c,a.key,n(a.value,a.indices))}),c})};let Pn;const Ua=(r,e)=>{Pn=new vt(r,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},Ya=async(r,e,t)=>{const i=Object.entries(e).filter(([c,a])=>a.type==="text"||a.type==="select"||a.type==="multiselect").reduce((c,[a,u])=>{const g="$or",v=[],_=(E,k)=>{const F={};u.type==="text"?F[E]=`${k}`:F[a]=`="${E}"`,v.push(F)};return Object.entries(u.state).filter(([E,k])=>k).forEach(([E,k])=>_(E,k)),v.length>0&&c.push({[g]:v}),c},[]);let n;if(!(i.length>0)&&t.matchAllWhenEmpty!==!1)n=r;else{const c={$and:[...i]},a=Pn.search(c);n=t.enableHighlighting?Ha(a,"highlight",t.titleProperty):a.map(u=>u.item)}const s=Object.entries(e).filter(([c,a])=>a.type==="range").reduce((c,[a,u])=>(c[a]={min:u.state.min,max:u.state.max,format:u.format},c),{});if(Object.keys(s).length>0){const c=[];for(let a=0;a<n.length;a++){const u={};for(const[g,v]of Object.entries(s)){const _=E=>v.format==="date"?It(E).unix():E;n[a].hasOwnProperty(g)?Array.isArray(n[a][g])?u[g]=s[g].min<=_(n[a][g][1])&&_(n[a][g][0])<=s[g].max:_(n[a][g])>=s[g].min&&_(n[a][g])<=s[g].max?u[g]=!0:u[g]=!1:u[g]=!0}Object.values(u).every(g=>!!g)&&c.push(n[a])}n=[...c]}const o=Object.entries(e).filter(([c,a])=>a.type==="spatial").reduce((c,[a,u])=>(c[a]={geometry:u.state.geometry,mode:u.state.mode},c),{});if(Object.values(o).map(c=>c.geometry).filter(c=>!!c).length>0){const c=[];for(let a=0;a<n.length;a++){const u={};for(const g of Object.keys(o)){const v=o[g].mode||"within";n[a].hasOwnProperty(g)&&(v==="within"?ra(n[a][g],o[g].geometry):ta(n[a][g],o[g].geometry))?u[g]=!0:u[g]=!1}Object.values(u).every(g=>!!g)&&c.push(n[a])}n=[...c]}return n},za=async(r,e,t)=>(await(await fetch(`${t.externalFilter(r,e)}`)).json()).features;var Xa=Object.defineProperty,Va=Object.getOwnPropertyDescriptor,Xe=(r,e,t,i)=>{for(var n=i>1?void 0:i?Va(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Xa(e,t,n),n};class Yr{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title"}}ye.EOxItemFilter=class extends bs{constructor(){super(...arguments),this._resultAggregation=[],this.filters={},this.items=[],this._config=new Yr,this.apply=e=>{this.items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?It(o).unix():parseInt(o);this.items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const c=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,c[0]):c[0],n.max=n.max!==void 0?Math.max(n.max,c[1]):c[1]}else{const c=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,c):c,n.max=n.max!==void 0?Math.max(n.max,c):c}return}Array.isArray(o[i.key])?o[i.key].forEach(c=>{n[c]=void 0}):i.type==="spatial"&&(n.geometry=void 0,n.mode=i.mode||"intersects")}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!0},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this.items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this.items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const t=[];this._config.filterProperties.forEach(i=>{i.type==="text"?i.keys.forEach(n=>{t.includes(n)||t.push(n)}):(i.type==="select"||i.type==="multiselect")&&(t.includes(i.key)||t.push(i.key))}),Ua(this.items,{keys:t,...this._config.fuseConfig}),this.search()}}set config(e){const t=this._config;this._config={...new Yr,...e},this.requestUpdate("config",t)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await za(this.items,this.filters,this._config):e=await Ya(this.items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,t){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(c=>this.filters[this._config.aggregateResults].state[c])),(s!=null&&s.length?s.includes(t):!0)&&Array.isArray(n)?n.includes(t):n===t})}sortResults(e){return[...e].sort((t,i)=>t[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}render(){return he`
548
+ `}};On([Ae()],Fr.prototype,"filterObject",2),Fr=On([qe("eox-itemfilter-text")],Fr);function Xe(r){return Array.isArray?Array.isArray(r):Cn(r)==="[object Array]"}const pa=1/0;function ga(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-pa?"-0":e}function va(r){return r==null?"":ga(r)}function Fe(r){return typeof r=="string"}function Sn(r){return typeof r=="number"}function ma(r){return r===!0||r===!1||ya(r)&&Cn(r)=="[object Boolean]"}function Pn(r){return typeof r=="object"}function ya(r){return Pn(r)&&r!==null}function Oe(r){return r!=null}function Hr(r){return!r.trim().length}function Cn(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ic="Extended search is not available",ba="Incorrect 'index' type",xa=r=>`Invalid value for key ${r}`,$a=r=>`Pattern length exceeds max of ${r}.`,wa=r=>`Missing ${r} property in key`,_a=r=>`Property 'weight' in key '${r}' must be a positive integer`,kn=Object.prototype.hasOwnProperty;class Ea{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Ln(i);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ln(r){let e=null,t=null,i=null,n=1,s=null;if(Fe(r)||Xe(r))i=r,e=Tn(r),t=Ur(r);else{if(!kn.call(r,"name"))throw new Error(wa("name"));const o=r.name;if(i=o,kn.call(r,"weight")&&(n=r.weight,n<=0))throw new Error(_a(o));e=Tn(o),t=Ur(o),s=r.getFn}return{path:e,id:t,weight:n,src:i,getFn:s}}function Tn(r){return Xe(r)?r:r.split(".")}function Ur(r){return Xe(r)?r.join("."):r}function Ma(r,e){let t=[],i=!1;const n=(s,o,l)=>{if(Oe(s))if(!o[l])t.push(s);else{let a=o[l];const u=s[a];if(!Oe(u))return;if(l===o.length-1&&(Fe(u)||Sn(u)||ma(u)))t.push(va(u));else if(Xe(u)){i=!0;for(let p=0,v=u.length;p<v;p+=1)n(u[p],o,l+1)}else o.length&&n(u,o,l+1)}};return n(r,Fe(e)?e.split("."):e,0),i?t:t[0]}var X={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Ma,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Aa=/[^ ]+/g;function Oa(r=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(Aa).length;if(t.has(s))return t.get(s);const o=1/Math.pow(s,.5*r),l=parseFloat(Math.round(o*i)/i);return t.set(s,l),l},clear(){t.clear()}}}class Yr{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=Oa(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,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Fe(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();Fe(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Oe(e)||Hr(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(Oe(o)){if(Xe(o)){let l=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:u,value:p}=a.pop();if(Oe(p))if(Fe(p)&&!Hr(p)){let v={v:p,i:u,n:this.norm.get(p)};l.push(v)}else Xe(p)&&p.forEach((v,y)=>{a.push({nestedArrIndex:y,value:v})})}i.$[s]=l}else if(Fe(o)&&!Hr(o)){let l={v:o,n:this.norm.get(o)};i.$[s]=l}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Rn(r,e,{getFn:t=X.getFn,fieldNormWeight:i=X.fieldNormWeight}={}){const n=new Yr({getFn:t,fieldNormWeight:i});return n.setKeys(r.map(Ln)),n.setSources(e),n.create(),n}function Sa(r,{getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){const{keys:i,records:n}=r,s=new Yr({getFn:e,fieldNormWeight:t});return s.setKeys(i),s.setIndexRecords(n),s}function Xt(r,{errors:e=0,currentLocation:t=0,expectedLocation:i=0,distance:n=X.distance,ignoreLocation:s=X.ignoreLocation}={}){const o=e/r.length;if(s)return o;const l=Math.abs(i-t);return n?o+l/n:l?1:o}function Pa(r=[],e=X.minMatchCharLength){let t=[],i=-1,n=-1,s=0;for(let o=r.length;s<o;s+=1){let l=r[s];l&&i===-1?i=s:!l&&i!==-1&&(n=s-1,n-i+1>=e&&t.push([i,n]),i=-1)}return r[s-1]&&s-i>=e&&t.push([i,s-1]),t}const st=32;function Ca(r,e,t,{location:i=X.location,distance:n=X.distance,threshold:s=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,includeMatches:a=X.includeMatches,ignoreLocation:u=X.ignoreLocation}={}){if(e.length>st)throw new Error($a(st));const p=e.length,v=r.length,y=Math.max(0,Math.min(i,v));let x=s,M=y;const j=l>1||a,q=j?Array(v):[];let J;for(;(J=r.indexOf(e,M))>-1;){let A=Xt(e,{currentLocation:J,expectedLocation:y,distance:n,ignoreLocation:u});if(x=Math.min(A,x),M=J+p,j){let C=0;for(;C<p;)q[J+C]=1,C+=1}}M=-1;let f=[],g=1,$=p+v;const S=1<<p-1;for(let A=0;A<p;A+=1){let C=0,L=$;for(;C<L;)Xt(e,{errors:A,currentLocation:y+L,expectedLocation:y,distance:n,ignoreLocation:u})<=x?C=L:$=L,L=Math.floor(($-C)/2+C);$=L;let I=Math.max(1,y-L+1),W=o?v:Math.min(y+L,v)+p,re=Array(W+2);re[W+1]=(1<<A)-1;for(let _=W;_>=I;_-=1){let O=_-1,B=t[r.charAt(O)];if(j&&(q[O]=+!!B),re[_]=(re[_+1]<<1|1)&B,A&&(re[_]|=(f[_+1]|f[_])<<1|1|f[_+1]),re[_]&S&&(g=Xt(e,{errors:A,currentLocation:O,expectedLocation:y,distance:n,ignoreLocation:u}),g<=x)){if(x=g,M=O,M<=y)break;I=Math.max(1,2*y-M)}}if(Xt(e,{errors:A+1,currentLocation:y,expectedLocation:y,distance:n,ignoreLocation:u})>x)break;f=re}const E={isMatch:M>=0,score:Math.max(.001,g)};if(j){const A=Pa(q,l);A.length?a&&(E.indices=A):E.isMatch=!1}return E}function ka(r){let e={};for(let t=0,i=r.length;t<i;t+=1){const n=r.charAt(t);e[n]=(e[n]||0)|1<<i-t-1}return e}class Dn{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:u},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const p=(y,x)=>{this.chunks.push({pattern:y,alphabet:ka(y),startIndex:x})},v=this.pattern.length;if(v>st){let y=0;const x=v%st,M=v-x;for(;y<M;)p(this.pattern.substr(y,st),y),y+=st;if(x){const j=v-st;p(this.pattern.substr(j),j)}}else p(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:i}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let M={isMatch:!0,score:0};return i&&(M.indices=[[0,e.length-1]]),M}const{location:n,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,ignoreLocation:u}=this.options;let p=[],v=0,y=!1;this.chunks.forEach(({pattern:M,alphabet:j,startIndex:q})=>{const{isMatch:J,score:f,indices:g}=Ca(e,M,j,{location:n+q,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});J&&(y=!0),v+=f,J&&g&&(p=[...p,...g])});let x={isMatch:y,score:y?v/this.chunks.length:1};return y&&i&&(x.indices=p),x}}class Je{constructor(e){this.pattern=e}static isMultiMatch(e){return In(e,this.multiRegex)}static isSingleMatch(e){return In(e,this.singleRegex)}search(){}}function In(r,e){const t=r.match(e);return t?t[1]:null}class La extends Je{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 Ta extends Je{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class Ra extends Je{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 Da extends Je{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 Ia extends Je{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 ja extends Je{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 jn extends Je{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){super(e),this._bitapSearch=new Dn(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Nn extends Je{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+s,n.push([i,t-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const zr=[La,Nn,Ra,Da,ja,Ia,Ta,jn],Bn=zr.length,Na=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ba="|";function Fa(r,e={}){return r.split(Ba).map(t=>{let i=t.trim().split(Na).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const l=i[s];let a=!1,u=-1;for(;!a&&++u<Bn;){const p=zr[u];let v=p.isMultiMatch(l);v&&(n.push(new p(v,e)),a=!0)}if(!a)for(u=-1;++u<Bn;){const p=zr[u];let v=p.isSingleMatch(l);if(v){n.push(new p(v,e));break}}}return n})}const Ha=new Set([jn.type,Nn.type]);class Ua{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,includeMatches:i=X.includeMatches,minMatchCharLength:n=X.minMatchCharLength,ignoreLocation:s=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:l=X.location,threshold:a=X.threshold,distance:u=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:l,threshold:a,distance:u},this.pattern=t?e:e.toLowerCase(),this.query=Fa(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:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],l=0;for(let a=0,u=t.length;a<u;a+=1){const p=t[a];o.length=0,s=0;for(let v=0,y=p.length;v<y;v+=1){const x=p[v],{isMatch:M,indices:j,score:q}=x.search(e);if(M){if(s+=1,l+=q,i){const J=x.constructor.type;Ha.has(J)?o=[...o,...j]:o.push(j)}}else{l=0,s=0,o.length=0;break}}if(s){let v={isMatch:!0,score:l/s};return i&&(v.indices=o),v}}return{isMatch:!1,score:1}}}const Xr=[];function Ya(...r){Xr.push(...r)}function Vr(r,e){for(let t=0,i=Xr.length;t<i;t+=1){let n=Xr[t];if(n.condition(r,e))return new n(r,e)}return new Dn(r,e)}const Vt={AND:"$and",OR:"$or"},Wr={PATH:"$path",PATTERN:"$val"},qr=r=>!!(r[Vt.AND]||r[Vt.OR]),za=r=>!!r[Wr.PATH],Xa=r=>!Xe(r)&&Pn(r)&&!qr(r),Fn=r=>({[Vt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function Hn(r,e,{auto:t=!0}={}){const i=n=>{let s=Object.keys(n);const o=za(n);if(!o&&s.length>1&&!qr(n))return i(Fn(n));if(Xa(n)){const a=o?n[Wr.PATH]:s[0],u=o?n[Wr.PATTERN]:n[a];if(!Fe(u))throw new Error(xa(a));const p={keyId:Ur(a),pattern:u};return t&&(p.searcher=Vr(u,e)),p}let l={children:[],operator:s[0]};return s.forEach(a=>{const u=n[a];Xe(u)&&u.forEach(p=>{l.children.push(i(p))})}),l};return qr(r)||(r=Fn(r)),i(r)}function Va(r,{ignoreFieldNorm:e=X.ignoreFieldNorm}){r.forEach(t=>{let i=1;t.matches.forEach(({key:n,norm:s,score:o})=>{const l=n?n.weight:null;i*=Math.pow(o===0&&l?Number.EPSILON:o,(l||1)*(e?1:s))}),t.score=i})}function Wa(r,e){const t=r.matches;e.matches=[],Oe(t)&&t.forEach(i=>{if(!Oe(i.indices)||!i.indices.length)return;const{indices:n,value:s}=i;let o={indices:n,value:s};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function qa(r,e){e.score=r.score}function Ga(r,e,{includeMatches:t=X.includeMatches,includeScore:i=X.includeScore}={}){const n=[];return t&&n.push(Wa),i&&n.push(qa),r.map(s=>{const{idx:o}=s,l={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,l)}),l})}class yt{constructor(e,t={},i){this.options={...X,...t},this.options.useExtendedSearch,this._keyStore=new Ea(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Yr))throw new Error(ba);this._myIndex=t||Rn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Oe(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,n=this._docs.length;i<n;i+=1){const s=this._docs[i];e(s,i)&&(this.removeAt(i),i-=1,n-=1,t.push(s))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;let a=Fe(e)?Fe(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Va(a,{ignoreFieldNorm:l}),s&&a.sort(o),Sn(t)&&t>-1&&(a=a.slice(0,t)),Ga(a,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const t=Vr(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:l})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:p}=t.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:u,value:s,norm:l,indices:p}]})}),n}_searchLogical(e){const t=Hn(e,this.options),i=(l,a,u)=>{if(!l.children){const{keyId:v,searcher:y}=l,x=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(a,v),searcher:y});return x&&x.length?[{idx:u,item:a,matches:x}]:[]}const p=[];for(let v=0,y=l.children.length;v<y;v+=1){const x=l.children[v],M=i(x,a,u);if(M.length)p.push(...M);else if(l.operator===Vt.AND)return[]}return p},n=this._myIndex.records,s={},o=[];return n.forEach(({$:l,i:a})=>{if(Oe(l)){let u=i(t,l,a);u.length&&(s[a]||(s[a]={idx:a,item:l,matches:[]},o.push(s[a])),u.forEach(({matches:p})=>{s[a].matches.push(...p)}))}}),o}_searchObjectList(e){const t=Vr(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:l})=>{if(!Oe(o))return;let a=[];i.forEach((u,p)=>{a.push(...this._findMatches({key:u,value:o[p],searcher:t}))}),a.length&&s.push({idx:l,item:o,matches:a})}),s}_findMatches({key:e,value:t,searcher:i}){if(!Oe(t))return[];let n=[];if(Xe(t))t.forEach(({v:s,i:o,n:l})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:p}=i.searchIn(s);a&&n.push({score:u,key:e,value:s,idx:o,norm:l,indices:p})});else{const{v:s,n:o}=t,{isMatch:l,score:a,indices:u}=i.searchIn(s);l&&n.push({score:a,key:e,value:s,norm:o,indices:u})}return n}}yt.version="6.6.2",yt.createIndex=Rn,yt.parseIndex=Sa,yt.config=X,yt.parseQuery=Hn,Ya(Ua);const Ka=(r,e="highlight",t="title")=>{const i=(s,o,l)=>{const a=o.split(".");let u;for(u=0;u<a.length-1;u++)s=s[a[u]];s[a[u]]=l},n=(s,o=[])=>{let l="",a=0;return o.forEach(u=>{const p=u[1]+1;l+=[s.substring(a,u[0]),`<mark class="${e}">`,s.substring(u[0],p),"</mark>"].join(""),a=p}),l+=s.substring(a),l};return r.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const l={...s};return o.forEach(a=>{a.key===t&&i(l,a.key,n(a.value,a.indices))}),l})};let Un;const Ja=(r,e)=>{Un=new yt(r,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},Za=async(r,e,t)=>{const i=Object.entries(e).filter(([l,a])=>a.type==="text"||a.type==="select"||a.type==="multiselect").reduce((l,[a,u])=>{const p="$or",v=[],y=(x,M)=>{const j={};u.type==="text"?j[x]=`${M}`:j[a]=`="${x}"`,v.push(j)};return Object.entries(u.state).filter(([x,M])=>M).forEach(([x,M])=>y(x,M)),v.length>0&&l.push({[p]:v}),l},[]);let n;if(!(i.length>0)&&t.matchAllWhenEmpty!==!1)n=r;else{const l={$and:[...i]},a=Un.search(l);n=t.enableHighlighting?Ka(a,"highlight",t.titleProperty):a.map(u=>u.item)}const s=Object.entries(e).filter(([l,a])=>a.type==="range").reduce((l,[a,u])=>(l[a]={min:u.state.min,max:u.state.max,format:u.format},l),{});if(Object.keys(s).length>0){const l=[];for(let a=0;a<n.length;a++){const u={};for(const[p,v]of Object.entries(s)){const y=x=>v.format==="date"?Bt(x).unix():x;n[a].hasOwnProperty(p)?Array.isArray(n[a][p])?u[p]=s[p].min<=y(n[a][p][1])&&y(n[a][p][0])<=s[p].max:y(n[a][p])>=s[p].min&&y(n[a][p])<=s[p].max?u[p]=!0:u[p]=!1:u[p]=!0}Object.values(u).every(p=>!!p)&&l.push(n[a])}n=[...l]}const o=Object.entries(e).filter(([l,a])=>a.type==="spatial").reduce((l,[a,u])=>(l[a]={geometry:u.state.geometry,mode:u.state.mode},l),{});if(Object.values(o).map(l=>l.geometry).filter(l=>!!l).length>0){const l=[];for(let a=0;a<n.length;a++){const u={};for(const p of Object.keys(o)){const v=o[p].mode||"within";n[a].hasOwnProperty(p)&&(v==="within"?ha(n[a][p],o[p].geometry):ua(n[a][p],o[p].geometry))?u[p]=!0:u[p]=!1}Object.values(u).every(p=>!!p)&&l.push(n[a])}n=[...l]}return n},Qa=async(r,e,t)=>(await(await fetch(`${t.externalFilter(r,e)}`)).json()).features;var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Ve=(r,e,t,i)=>{for(var n=i>1?void 0:i?tl(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&el(e,t,n),n};class Gr{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title"}}ye.EOxItemFilter=class extends ks{constructor(){super(...arguments),this._resultAggregation=[],this.filters={},this.items=[],this._config=new Gr,this.apply=e=>{this.items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?Bt(o).unix():parseInt(o);this.items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const l=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,l[0]):l[0],n.max=n.max!==void 0?Math.max(n.max,l[1]):l[1]}else{const l=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,l):l,n.max=n.max!==void 0?Math.max(n.max,l):l}return}Array.isArray(o[i.key])?o[i.key].forEach(l=>{n[l]=void 0}):i.type==="spatial"?(n.geometry=void 0,n.mode=i.mode||"intersects"):n[o[i.key]]=void 0}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!0},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this.items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this.items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const t=[];Object.values(this.filters).forEach(i=>{i.type==="text"?i.keys.forEach(n=>{t.includes(n)||t.push(n)}):(i.type==="select"||i.type==="multiselect")&&(t.includes(i.key)||t.push(i.key))}),Ja(this.items,{keys:t,...this._config.fuseConfig}),this.search()}}set config(e){const t=this._config;this._config={...new Gr,...e},this.requestUpdate("config",t)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await Qa(this.items,this.filters,this._config):e=await Za(this.items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,t){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(l=>this.filters[this._config.aggregateResults].state[l])),(s!=null&&s.length?s.includes(t):!0)&&Array.isArray(n)?n.includes(t):n===t})}sortResults(e){return[...e].sort((t,i)=>t[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}render(){return he`
538
549
  <style>
539
- ${Ni}
540
- ${!this.unstyled&&Bi}
550
+ ${Ji}
551
+ ${!this.unstyled&&Zi}
541
552
  ${this.styleOverride}
542
553
  </style>
543
554
  <form
544
555
  id="itemfilter"
545
556
  @submit="${e=>e.preventDefault()}"
546
557
  >
547
- ${ut(this._config.filterProperties.length,()=>he`
548
- <section class="${this.config.inlineMode?"inline":ie}">
549
- ${ut(!this.config.inlineMode,()=>he`
558
+ ${ht(this._config.filterProperties.length,()=>he`
559
+ <section class="${this.config.inlineMode?"inline":ne}">
560
+ ${ht(!this.config.inlineMode,()=>he`
550
561
  <slot name="filterstitle"
551
562
  ><h4 style="margin-top: 8px">Filters</h4></slot
552
563
  >
553
564
  `)}
554
565
  <ul id="filters">
555
- ${tt(Object.values(this.filters),e=>pr`
566
+ ${dt(Object.values(this.filters),e=>xr`
556
567
  <li>
557
- ${e.featured?pr`
558
- <eox-itemfilter-${Dt(e.type)}
568
+ ${e.featured?xr`
569
+ <eox-itemfilter-${Nt(e.type)}
559
570
  slot="filter"
560
571
  data-type="filter"
561
572
  .filterObject=${e}
562
573
  @filter="${()=>this.search()}"
563
- ></eox-itemfilter-${Dt(e.type)}>
564
- `:pr`
574
+ ></eox-itemfilter-${Nt(e.type)}>
575
+ `:xr`
565
576
  <eox-itemfilter-expandcontainer
566
577
  .filterObject=${e}
567
578
  .unstyled=${this.unstyled}
568
579
  >
569
- <eox-itemfilter-${Dt(e.type)}
580
+ <eox-itemfilter-${Nt(e.type)}
570
581
  slot="filter"
571
582
  data-type="filter"
583
+ data-filter="${e.key}"
572
584
  .filterObject=${e}
573
585
  @filter="${()=>this.search()}"
574
- ></eox-itemfilter-${Dt(e.type)}>
586
+ ></eox-itemfilter-${Nt(e.type)}>
575
587
  </eox-itemfilter-expandcontainer>
576
588
  `}
577
589
  </li>
578
590
  `)}
579
591
  </ul>
580
- ${ut(this._config.filterProperties&&Object.values(this.filters).map(e=>e.dirty).filter(e=>e).length>0,()=>he`
592
+ ${ht(this._config.filterProperties&&Object.values(this.filters).map(e=>e.dirty).filter(e=>e).length>0,()=>he`
581
593
  <button
582
594
  id="filter-reset"
583
595
  class="outline small"
@@ -589,7 +601,7 @@ eox-itemfilter-range {
589
601
  `)}
590
602
  </section>
591
603
  `)}
592
- ${ut(this.config.showResults&&this.results,()=>he`
604
+ ${ht(this.config.showResults&&this.results,()=>he`
593
605
  <section id="section-results">
594
606
  <div>
595
607
  <slot name="resultstitle"
@@ -597,9 +609,9 @@ eox-itemfilter-range {
597
609
  >
598
610
  </div>
599
611
  <div id="container-results" class="scroll">
600
- ${this.results.length<1?he` <small class="no-results">No matching items</small> `:ie}
612
+ ${this.results.length<1?he` <small class="no-results">No matching items</small> `:ne}
601
613
  <ul id="results" part="results">
602
- ${this._config.aggregateResults?tt(this._resultAggregation.filter(e=>this.aggregateResults(this.results,e).length),e=>he`<details
614
+ ${this._config.aggregateResults?dt(this._resultAggregation.filter(e=>this.aggregateResults(this.results,e).length),e=>he`<details
603
615
  class="details-results"
604
616
  open
605
617
  >
@@ -612,9 +624,9 @@ eox-itemfilter-range {
612
624
  </span>
613
625
  </summary>
614
626
  <ul>
615
- ${tt(this.aggregateResults(this.results,e),t=>{var i,n;return he`
627
+ ${Os(this.aggregateResults(this.results,e),t=>t.id,t=>{var i,n;return he`
616
628
  <li
617
- class=${((i=this.selectedResult)==null?void 0:i[this._config.titleProperty])===t[this._config.titleProperty]?"highlighted":ie}
629
+ class=${((i=this.selectedResult)==null?void 0:i[this._config.titleProperty])===t[this._config.titleProperty]?"highlighted":ne}
618
630
  >
619
631
  <label>
620
632
  <input
@@ -623,19 +635,19 @@ eox-itemfilter-range {
623
635
  class="result-radio"
624
636
  name="result"
625
637
  id="${t.id}"
626
- checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===t[this._config.titleProperty]||ie}
638
+ checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===t[this._config.titleProperty]||ne}
627
639
  @click=${()=>{this.selectedResult=t,this._config.onSelect(t)}}
628
640
  />
629
- ${ut(this.hasTemplate("result"),()=>this.renderTemplate("result",t,`result-${t.id}`),()=>he`
641
+ ${ht(this.hasTemplate("result"),()=>this.renderTemplate("result",t,`result-${t.id}`),()=>he`
630
642
  <span class="title"
631
- >${Ri(t[this._config.titleProperty])}</span
643
+ >${Wi(t[this._config.titleProperty])}</span
632
644
  >
633
645
  `)}
634
646
  </label>
635
647
  </li>
636
648
  `})}
637
649
  </ul>
638
- </details>`):tt(this.results,e=>he`<li part="result">
650
+ </details>`):dt(this.results,e=>he`<li part="result">
639
651
  <label>
640
652
  <input
641
653
  type="radio"
@@ -643,9 +655,9 @@ eox-itemfilter-range {
643
655
  id="${e.id}"
644
656
  @click=${()=>{this.selectedResult=e,this._config.onSelect(e)}}
645
657
  />
646
- ${ut(this.hasTemplate("result"),()=>this.renderTemplate("result",e,`result-${e.id}`),()=>he`
658
+ ${ht(this.hasTemplate("result"),()=>this.renderTemplate("result",e,`result-${e.id}`),()=>he`
647
659
  <span class="title"
648
- >${Ri(e[this._config.titleProperty])}</span
660
+ >${Wi(e[this._config.titleProperty])}</span
649
661
  >
650
662
  `)}
651
663
  </label>
@@ -655,4 +667,4 @@ eox-itemfilter-range {
655
667
  </section>
656
668
  `)}
657
669
  </form>
658
- `}},Xe([Ot()],ye.EOxItemFilter.prototype,"filters",2),Xe([Ot()],ye.EOxItemFilter.prototype,"items",2),Xe([Ot()],ye.EOxItemFilter.prototype,"results",2),Xe([Ot()],ye.EOxItemFilter.prototype,"selectedResult",2),Xe([Ae({attribute:!1})],ye.EOxItemFilter.prototype,"config",1),Xe([Ae()],ye.EOxItemFilter.prototype,"apply",2),Xe([Ae({attribute:!1})],ye.EOxItemFilter.prototype,"styleOverride",2),Xe([Ae({type:Boolean})],ye.EOxItemFilter.prototype,"unstyled",2),ye.EOxItemFilter=Xe([qe("eox-itemfilter")],ye.EOxItemFilter),ye.ElementConfig=Yr,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});
670
+ `}},Ve([Pt()],ye.EOxItemFilter.prototype,"filters",2),Ve([Pt()],ye.EOxItemFilter.prototype,"items",2),Ve([Pt()],ye.EOxItemFilter.prototype,"results",2),Ve([Pt()],ye.EOxItemFilter.prototype,"selectedResult",2),Ve([Ae({attribute:!1})],ye.EOxItemFilter.prototype,"config",1),Ve([Ae()],ye.EOxItemFilter.prototype,"apply",2),Ve([Ae({attribute:!1})],ye.EOxItemFilter.prototype,"styleOverride",2),Ve([Ae({type:Boolean})],ye.EOxItemFilter.prototype,"unstyled",2),ye.EOxItemFilter=Ve([qe("eox-itemfilter")],ye.EOxItemFilter),ye.ElementConfig=Gr,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});