@eox/itemfilter 0.6.0 → 0.6.2

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.
@@ -10,9 +10,9 @@
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var tr;const Pt=window,it=Pt.trustedTypes,li=it?it.createPolicy("lit-html",{createHTML:r=>r}):void 0,rr="$lit$",Ue=`lit$${(Math.random()+"").slice(9)}$`,ui="?"+Ue,Dn=`<${ui}>`,qe=document,yt=()=>qe.createComment(""),bt=r=>r===null||typeof r!="object"&&typeof r!="function",ci=Array.isArray,In=r=>ci(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ir=`[
14
- \f\r]`,$t=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hi=/-->/g,di=/>/g,Ge=RegExp(`>|${ir}(?:([^\\s"'>=/]+)(${ir}*=${ir}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),fi=/'/g,pi=/"/g,gi=/^(?:script|style|textarea|title)$/i,Nn=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ge=Nn(1),Ke=Symbol.for("lit-noChange"),ue=Symbol.for("lit-nothing"),vi=new WeakMap,Je=qe.createTreeWalker(qe,129,null,!1),Bn=(r,e)=>{const t=r.length-1,i=[];let n,s=e===2?"<svg>":"",o=$t;for(let a=0;a<t;a++){const h=r[a];let g,v,_=-1,M=0;for(;M<h.length&&(o.lastIndex=M,v=o.exec(h),v!==null);)M=o.lastIndex,o===$t?v[1]==="!--"?o=hi:v[1]!==void 0?o=di:v[2]!==void 0?(gi.test(v[2])&&(n=RegExp("</"+v[2],"g")),o=Ge):v[3]!==void 0&&(o=Ge):o===Ge?v[0]===">"?(o=n??$t,_=-1):v[1]===void 0?_=-2:(_=o.lastIndex-v[2].length,g=v[1],o=v[3]===void 0?Ge:v[3]==='"'?pi:fi):o===pi||o===fi?o=Ge:o===hi||o===di?o=$t:(o=Ge,n=void 0);const L=o===Ge&&r[a+1].startsWith("/>")?" ":"";s+=o===$t?h+Dn:_>=0?(i.push(g),h.slice(0,_)+rr+h.slice(_)+Ue+L):h+Ue+(_===-2?(i.push(void 0),a):L)}const u=s+(r[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[li!==void 0?li.createHTML(u):u,i]};class xt{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let s=0,o=0;const u=e.length-1,a=this.parts,[h,g]=Bn(e,t);if(this.el=xt.createElement(h,i),Je.currentNode=this.el.content,t===2){const v=this.el.content,_=v.firstChild;_.remove(),v.append(..._.childNodes)}for(;(n=Je.nextNode())!==null&&a.length<u;){if(n.nodeType===1){if(n.hasAttributes()){const v=[];for(const _ of n.getAttributeNames())if(_.endsWith(rr)||_.startsWith(Ue)){const M=g[o++];if(v.push(_),M!==void 0){const L=n.getAttribute(M.toLowerCase()+rr).split(Ue),j=/([.?@])?(.*)/.exec(M);a.push({type:1,index:s,name:j[2],strings:L,ctor:j[1]==="."?Hn:j[1]==="?"?jn:j[1]==="@"?Un:Ot})}else a.push({type:6,index:s})}for(const _ of v)n.removeAttribute(_)}if(gi.test(n.tagName)){const v=n.textContent.split(Ue),_=v.length-1;if(_>0){n.textContent=it?it.emptyScript:"";for(let M=0;M<_;M++)n.append(v[M],yt()),Je.nextNode(),a.push({type:2,index:++s});n.append(v[_],yt())}}}else if(n.nodeType===8)if(n.data===ui)a.push({type:2,index:s});else{let v=-1;for(;(v=n.data.indexOf(Ue,v+1))!==-1;)a.push({type:7,index:s}),v+=Ue.length-1}s++}}static createElement(e,t){const i=qe.createElement("template");return i.innerHTML=e,i}}function nt(r,e,t=r,i){var n,s,o,u;if(e===Ke)return e;let a=i!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[i]:t._$Cl;const h=bt(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==h&&((s=a==null?void 0:a._$AO)===null||s===void 0||s.call(a,!1),h===void 0?a=void 0:(a=new h(r),a._$AT(r,t,i)),i!==void 0?((o=(u=t)._$Co)!==null&&o!==void 0?o:u._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=nt(r,a._$AS(r,e.values),a,i)),e}class Fn{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);Je.currentNode=s;let o=Je.nextNode(),u=0,a=0,h=n[0];for(;h!==void 0;){if(u===h.index){let g;h.type===2?g=new wt(o,o.nextSibling,this,e):h.type===1?g=new h.ctor(o,h.name,h.strings,this,e):h.type===6&&(g=new zn(o,this,e)),this._$AV.push(g),h=n[++a]}u!==(h==null?void 0:h.index)&&(o=Je.nextNode(),u++)}return Je.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 wt{constructor(e,t,i,n){var s;this.type=2,this._$AH=ue,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=nt(this,e,t),bt(e)?e===ue||e==null||e===""?(this._$AH!==ue&&this._$AR(),this._$AH=ue):e!==this._$AH&&e!==Ke&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):In(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!==ue&&bt(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=xt.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 Fn(s,this),u=o.u(this.options);o.v(i),this.$(u),this._$AH=o}}_$AC(e){let t=vi.get(e.strings);return t===void 0&&vi.set(e.strings,t=new xt(e)),t}T(e){ci(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 wt(this.k(yt()),this.k(yt()),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 Ot{constructor(e,t,i,n,s){this.type=1,this._$AH=ue,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=ue}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=nt(this,e,t,0),o=!bt(e)||e!==this._$AH&&e!==Ke,o&&(this._$AH=e);else{const u=e;let a,h;for(e=s[0],a=0;a<s.length-1;a++)h=nt(this,u[i+a],t,a),h===Ke&&(h=this._$AH[a]),o||(o=!bt(h)||h!==this._$AH[a]),h===ue?e=ue:e!==ue&&(e+=(h??"")+s[a+1]),this._$AH[a]=h}o&&!n&&this.j(e)}j(e){e===ue?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Hn extends Ot{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ue?void 0:e}}const Yn=it?it.emptyScript:"";class jn extends Ot{constructor(){super(...arguments),this.type=4}j(e){e&&e!==ue?this.element.setAttribute(this.name,Yn):this.element.removeAttribute(this.name)}}class Un extends Ot{constructor(e,t,i,n,s){super(e,t,i,n,s),this.type=5}_$AI(e,t=this){var i;if((e=(i=nt(this,e,t,0))!==null&&i!==void 0?i:ue)===Ke)return;const n=this._$AH,s=e===ue&&n!==ue||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==ue&&(n===ue||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 zn{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){nt(this,e)}}const mi=Pt.litHtmlPolyfillSupport;mi==null||mi(xt,wt),((tr=Pt.litHtmlVersions)!==null&&tr!==void 0?tr:Pt.litHtmlVersions=[]).push("2.7.4");const Xn=(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 u=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new wt(e.insertBefore(yt(),u),u,void 0,t??{})}return o._$AI(r),o};/**
13
+ */var tr;const Pt=window,it=Pt.trustedTypes,li=it?it.createPolicy("lit-html",{createHTML:r=>r}):void 0,rr="$lit$",Ue=`lit$${(Math.random()+"").slice(9)}$`,ui="?"+Ue,Dn=`<${ui}>`,qe=document,bt=()=>qe.createComment(""),$t=r=>r===null||typeof r!="object"&&typeof r!="function",ci=Array.isArray,In=r=>ci(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ir=`[
14
+ \f\r]`,xt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hi=/-->/g,di=/>/g,Ge=RegExp(`>|${ir}(?:([^\\s"'>=/]+)(${ir}*=${ir}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),fi=/'/g,pi=/"/g,gi=/^(?:script|style|textarea|title)$/i,Nn=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),pe=Nn(1),Ke=Symbol.for("lit-noChange"),ue=Symbol.for("lit-nothing"),vi=new WeakMap,Je=qe.createTreeWalker(qe,129,null,!1),Bn=(r,e)=>{const t=r.length-1,i=[];let n,s=e===2?"<svg>":"",o=xt;for(let a=0;a<t;a++){const h=r[a];let g,v,_=-1,M=0;for(;M<h.length&&(o.lastIndex=M,v=o.exec(h),v!==null);)M=o.lastIndex,o===xt?v[1]==="!--"?o=hi:v[1]!==void 0?o=di:v[2]!==void 0?(gi.test(v[2])&&(n=RegExp("</"+v[2],"g")),o=Ge):v[3]!==void 0&&(o=Ge):o===Ge?v[0]===">"?(o=n??xt,_=-1):v[1]===void 0?_=-2:(_=o.lastIndex-v[2].length,g=v[1],o=v[3]===void 0?Ge:v[3]==='"'?pi:fi):o===pi||o===fi?o=Ge:o===hi||o===di?o=xt:(o=Ge,n=void 0);const L=o===Ge&&r[a+1].startsWith("/>")?" ":"";s+=o===xt?h+Dn:_>=0?(i.push(g),h.slice(0,_)+rr+h.slice(_)+Ue+L):h+Ue+(_===-2?(i.push(void 0),a):L)}const u=s+(r[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[li!==void 0?li.createHTML(u):u,i]};class wt{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let s=0,o=0;const u=e.length-1,a=this.parts,[h,g]=Bn(e,t);if(this.el=wt.createElement(h,i),Je.currentNode=this.el.content,t===2){const v=this.el.content,_=v.firstChild;_.remove(),v.append(..._.childNodes)}for(;(n=Je.nextNode())!==null&&a.length<u;){if(n.nodeType===1){if(n.hasAttributes()){const v=[];for(const _ of n.getAttributeNames())if(_.endsWith(rr)||_.startsWith(Ue)){const M=g[o++];if(v.push(_),M!==void 0){const L=n.getAttribute(M.toLowerCase()+rr).split(Ue),j=/([.?@])?(.*)/.exec(M);a.push({type:1,index:s,name:j[2],strings:L,ctor:j[1]==="."?Hn:j[1]==="?"?jn:j[1]==="@"?Un:Ot})}else a.push({type:6,index:s})}for(const _ of v)n.removeAttribute(_)}if(gi.test(n.tagName)){const v=n.textContent.split(Ue),_=v.length-1;if(_>0){n.textContent=it?it.emptyScript:"";for(let M=0;M<_;M++)n.append(v[M],bt()),Je.nextNode(),a.push({type:2,index:++s});n.append(v[_],bt())}}}else if(n.nodeType===8)if(n.data===ui)a.push({type:2,index:s});else{let v=-1;for(;(v=n.data.indexOf(Ue,v+1))!==-1;)a.push({type:7,index:s}),v+=Ue.length-1}s++}}static createElement(e,t){const i=qe.createElement("template");return i.innerHTML=e,i}}function nt(r,e,t=r,i){var n,s,o,u;if(e===Ke)return e;let a=i!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[i]:t._$Cl;const h=$t(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==h&&((s=a==null?void 0:a._$AO)===null||s===void 0||s.call(a,!1),h===void 0?a=void 0:(a=new h(r),a._$AT(r,t,i)),i!==void 0?((o=(u=t)._$Co)!==null&&o!==void 0?o:u._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=nt(r,a._$AS(r,e.values),a,i)),e}class Fn{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);Je.currentNode=s;let o=Je.nextNode(),u=0,a=0,h=n[0];for(;h!==void 0;){if(u===h.index){let g;h.type===2?g=new _t(o,o.nextSibling,this,e):h.type===1?g=new h.ctor(o,h.name,h.strings,this,e):h.type===6&&(g=new zn(o,this,e)),this._$AV.push(g),h=n[++a]}u!==(h==null?void 0:h.index)&&(o=Je.nextNode(),u++)}return Je.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 _t{constructor(e,t,i,n){var s;this.type=2,this._$AH=ue,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=nt(this,e,t),$t(e)?e===ue||e==null||e===""?(this._$AH!==ue&&this._$AR(),this._$AH=ue):e!==this._$AH&&e!==Ke&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):In(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!==ue&&$t(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=wt.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 Fn(s,this),u=o.u(this.options);o.v(i),this.$(u),this._$AH=o}}_$AC(e){let t=vi.get(e.strings);return t===void 0&&vi.set(e.strings,t=new wt(e)),t}T(e){ci(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 _t(this.k(bt()),this.k(bt()),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 Ot{constructor(e,t,i,n,s){this.type=1,this._$AH=ue,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=ue}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=nt(this,e,t,0),o=!$t(e)||e!==this._$AH&&e!==Ke,o&&(this._$AH=e);else{const u=e;let a,h;for(e=s[0],a=0;a<s.length-1;a++)h=nt(this,u[i+a],t,a),h===Ke&&(h=this._$AH[a]),o||(o=!$t(h)||h!==this._$AH[a]),h===ue?e=ue:e!==ue&&(e+=(h??"")+s[a+1]),this._$AH[a]=h}o&&!n&&this.j(e)}j(e){e===ue?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Hn extends Ot{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ue?void 0:e}}const Yn=it?it.emptyScript:"";class jn extends Ot{constructor(){super(...arguments),this.type=4}j(e){e&&e!==ue?this.element.setAttribute(this.name,Yn):this.element.removeAttribute(this.name)}}class Un extends Ot{constructor(e,t,i,n,s){super(e,t,i,n,s),this.type=5}_$AI(e,t=this){var i;if((e=(i=nt(this,e,t,0))!==null&&i!==void 0?i:ue)===Ke)return;const n=this._$AH,s=e===ue&&n!==ue||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==ue&&(n===ue||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 zn{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){nt(this,e)}}const mi=Pt.litHtmlPolyfillSupport;mi==null||mi(wt,_t),((tr=Pt.litHtmlVersions)!==null&&tr!==void 0?tr:Pt.litHtmlVersions=[]).push("2.7.4");const Xn=(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 u=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new _t(e.insertBefore(bt(),u),u,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
@@ -28,7 +28,7 @@
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function _t(r){return Lt({...r,state:!0})}/**
31
+ */function Mt(r){return Lt({...r,state:!0})}/**
32
32
  * @license
33
33
  * Copyright 2021 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
@@ -40,7 +40,7 @@
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */function*Mt(r,e){if(r!==void 0){let t=0;for(const i of r)yield e(i,t++)}}/**
43
+ */function*at(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
@@ -48,7 +48,7 @@
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
- */class ar extends Kn{constructor(e){if(super(e),this.et=ue,e.type!==qn.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ue||e==null)return this.ft=void 0,this.et=e;if(e===Ke)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:[]}}}ar.directiveName="unsafeHTML",ar.resultType=1;const $i=Gn(ar);function He(r){return Array.isArray?Array.isArray(r):_i(r)==="[object Array]"}const Jn=1/0;function Zn(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-Jn?"-0":e}function Qn(r){return r==null?"":Zn(r)}function De(r){return typeof r=="string"}function xi(r){return typeof r=="number"}function es(r){return r===!0||r===!1||ts(r)&&_i(r)=="[object Boolean]"}function wi(r){return typeof r=="object"}function ts(r){return wi(r)&&r!==null}function Ae(r){return r!=null}function lr(r){return!r.trim().length}function _i(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ll="Extended search is not available",rs="Incorrect 'index' type",is=r=>`Invalid value for key ${r}`,ns=r=>`Pattern length exceeds max of ${r}.`,ss=r=>`Missing ${r} property in key`,os=r=>`Property 'weight' in key '${r}' must be a positive integer`,Mi=Object.prototype.hasOwnProperty;class as{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Ei(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 Ei(r){let e=null,t=null,i=null,n=1,s=null;if(De(r)||He(r))i=r,e=Ai(r),t=ur(r);else{if(!Mi.call(r,"name"))throw new Error(ss("name"));const o=r.name;if(i=o,Mi.call(r,"weight")&&(n=r.weight,n<=0))throw new Error(os(o));e=Ai(o),t=ur(o),s=r.getFn}return{path:e,id:t,weight:n,src:i,getFn:s}}function Ai(r){return He(r)?r:r.split(".")}function ur(r){return He(r)?r.join("."):r}function ls(r,e){let t=[],i=!1;const n=(s,o,u)=>{if(Ae(s))if(!o[u])t.push(s);else{let a=o[u];const h=s[a];if(!Ae(h))return;if(u===o.length-1&&(De(h)||xi(h)||es(h)))t.push(Qn(h));else if(He(h)){i=!0;for(let g=0,v=h.length;g<v;g+=1)n(h[g],o,u+1)}else o.length&&n(h,o,u+1)}};return n(r,De(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:ls,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const us=/[^ ]+/g;function cs(r=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(us).length;if(t.has(s))return t.get(s);const o=1/Math.pow(s,.5*r),u=parseFloat(Math.round(o*i)/i);return t.set(s,u),u},clear(){t.clear()}}}class cr{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=cs(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,De(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();De(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,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(!Ae(e)||lr(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(Ae(o)){if(He(o)){let u=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:h,value:g}=a.pop();if(Ae(g))if(De(g)&&!lr(g)){let v={v:g,i:h,n:this.norm.get(g)};u.push(v)}else He(g)&&g.forEach((v,_)=>{a.push({nestedArrIndex:_,value:v})})}i.$[s]=u}else if(De(o)&&!lr(o)){let u={v:o,n:this.norm.get(o)};i.$[s]=u}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Si(r,e,{getFn:t=X.getFn,fieldNormWeight:i=X.fieldNormWeight}={}){const n=new cr({getFn:t,fieldNormWeight:i});return n.setKeys(r.map(Ei)),n.setSources(e),n.create(),n}function hs(r,{getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){const{keys:i,records:n}=r,s=new cr({getFn:e,fieldNormWeight:t});return s.setKeys(i),s.setIndexRecords(n),s}function Ct(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 u=Math.abs(i-t);return n?o+u/n:u?1:o}function ds(r=[],e=X.minMatchCharLength){let t=[],i=-1,n=-1,s=0;for(let o=r.length;s<o;s+=1){let u=r[s];u&&i===-1?i=s:!u&&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 Ze=32;function fs(r,e,t,{location:i=X.location,distance:n=X.distance,threshold:s=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:u=X.minMatchCharLength,includeMatches:a=X.includeMatches,ignoreLocation:h=X.ignoreLocation}={}){if(e.length>Ze)throw new Error(ns(Ze));const g=e.length,v=r.length,_=Math.max(0,Math.min(i,v));let M=s,L=_;const j=u>1||a,ne=j?Array(v):[];let te;for(;(te=r.indexOf(e,L))>-1;){let E=Ct(e,{currentLocation:te,expectedLocation:_,distance:n,ignoreLocation:h});if(M=Math.min(E,M),L=te+g,j){let P=0;for(;P<g;)ne[te+P]=1,P+=1}}L=-1;let f=[],p=1,b=g+v;const S=1<<g-1;for(let E=0;E<g;E+=1){let P=0,C=b;for(;P<C;)Ct(e,{errors:E,currentLocation:_+C,expectedLocation:_,distance:n,ignoreLocation:h})<=M?P=C:b=C,C=Math.floor((b-P)/2+P);b=C;let I=Math.max(1,_-C+1),V=o?v:Math.min(_+C,v)+g,ee=Array(V+2);ee[V+1]=(1<<E)-1;for(let x=V;x>=I;x-=1){let A=x-1,B=t[r.charAt(A)];if(j&&(ne[A]=+!!B),ee[x]=(ee[x+1]<<1|1)&B,E&&(ee[x]|=(f[x+1]|f[x])<<1|1|f[x+1]),ee[x]&S&&(p=Ct(e,{errors:E,currentLocation:A,expectedLocation:_,distance:n,ignoreLocation:h}),p<=M)){if(M=p,L=A,L<=_)break;I=Math.max(1,2*_-L)}}if(Ct(e,{errors:E+1,currentLocation:_,expectedLocation:_,distance:n,ignoreLocation:h})>M)break;f=ee}const w={isMatch:L>=0,score:Math.max(.001,p)};if(j){const E=ds(ne,u);E.length?a&&(w.indices=E):w.isMatch=!1}return w}function ps(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 ki{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:u=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:h=X.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:u,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const g=(_,M)=>{this.chunks.push({pattern:_,alphabet:ps(_),startIndex:M})},v=this.pattern.length;if(v>Ze){let _=0;const M=v%Ze,L=v-M;for(;_<L;)g(this.pattern.substr(_,Ze),_),_+=Ze;if(M){const j=v-Ze;g(this.pattern.substr(j),j)}}else g(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:i}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let L={isMatch:!0,score:0};return i&&(L.indices=[[0,e.length-1]]),L}const{location:n,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:a,ignoreLocation:h}=this.options;let g=[],v=0,_=!1;this.chunks.forEach(({pattern:L,alphabet:j,startIndex:ne})=>{const{isMatch:te,score:f,indices:p}=fs(e,L,j,{location:n+ne,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:a,includeMatches:i,ignoreLocation:h});te&&(_=!0),v+=f,te&&p&&(g=[...g,...p])});let M={isMatch:_,score:_?v/this.chunks.length:1};return _&&i&&(M.indices=g),M}}class ze{constructor(e){this.pattern=e}static isMultiMatch(e){return Pi(e,this.multiRegex)}static isSingleMatch(e){return Pi(e,this.singleRegex)}search(){}}function Pi(r,e){const t=r.match(e);return t?t[1]:null}class gs extends ze{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 vs extends ze{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 ms extends ze{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 ys extends ze{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 bs extends ze{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 $s extends ze{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 Oi extends ze{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:u=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:h=X.ignoreLocation}={}){super(e),this._bitapSearch=new ki(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:u,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Li extends ze{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 hr=[gs,Li,ms,ys,$s,bs,vs,Oi],Ci=hr.length,xs=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,ws="|";function _s(r,e={}){return r.split(ws).map(t=>{let i=t.trim().split(xs).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const u=i[s];let a=!1,h=-1;for(;!a&&++h<Ci;){const g=hr[h];let v=g.isMultiMatch(u);v&&(n.push(new g(v,e)),a=!0)}if(!a)for(h=-1;++h<Ci;){const g=hr[h];let v=g.isSingleMatch(u);if(v){n.push(new g(v,e));break}}}return n})}const Ms=new Set([Oi.type,Li.type]);class Es{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,includeMatches:i=X.includeMatches,minMatchCharLength:n=X.minMatchCharLength,ignoreLocation:s=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:u=X.location,threshold:a=X.threshold,distance:h=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:u,threshold:a,distance:h},this.pattern=t?e:e.toLowerCase(),this.query=_s(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=[],u=0;for(let a=0,h=t.length;a<h;a+=1){const g=t[a];o.length=0,s=0;for(let v=0,_=g.length;v<_;v+=1){const M=g[v],{isMatch:L,indices:j,score:ne}=M.search(e);if(L){if(s+=1,u+=ne,i){const te=M.constructor.type;Ms.has(te)?o=[...o,...j]:o.push(j)}}else{u=0,s=0,o.length=0;break}}if(s){let v={isMatch:!0,score:u/s};return i&&(v.indices=o),v}}return{isMatch:!1,score:1}}}const dr=[];function As(...r){dr.push(...r)}function fr(r,e){for(let t=0,i=dr.length;t<i;t+=1){let n=dr[t];if(n.condition(r,e))return new n(r,e)}return new ki(r,e)}const Tt={AND:"$and",OR:"$or"},pr={PATH:"$path",PATTERN:"$val"},gr=r=>!!(r[Tt.AND]||r[Tt.OR]),Ss=r=>!!r[pr.PATH],ks=r=>!He(r)&&wi(r)&&!gr(r),Ti=r=>({[Tt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function Ri(r,e,{auto:t=!0}={}){const i=n=>{let s=Object.keys(n);const o=Ss(n);if(!o&&s.length>1&&!gr(n))return i(Ti(n));if(ks(n)){const a=o?n[pr.PATH]:s[0],h=o?n[pr.PATTERN]:n[a];if(!De(h))throw new Error(is(a));const g={keyId:ur(a),pattern:h};return t&&(g.searcher=fr(h,e)),g}let u={children:[],operator:s[0]};return s.forEach(a=>{const h=n[a];He(h)&&h.forEach(g=>{u.children.push(i(g))})}),u};return gr(r)||(r=Ti(r)),i(r)}function Ps(r,{ignoreFieldNorm:e=X.ignoreFieldNorm}){r.forEach(t=>{let i=1;t.matches.forEach(({key:n,norm:s,score:o})=>{const u=n?n.weight:null;i*=Math.pow(o===0&&u?Number.EPSILON:o,(u||1)*(e?1:s))}),t.score=i})}function Os(r,e){const t=r.matches;e.matches=[],Ae(t)&&t.forEach(i=>{if(!Ae(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 Ls(r,e){e.score=r.score}function Cs(r,e,{includeMatches:t=X.includeMatches,includeScore:i=X.includeScore}={}){const n=[];return t&&n.push(Os),i&&n.push(Ls),r.map(s=>{const{idx:o}=s,u={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,u)}),u})}class at{constructor(e,t={},i){this.options={...X,...t},this.options.useExtendedSearch,this._keyStore=new as(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof cr))throw new Error(rs);this._myIndex=t||Si(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ae(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let 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:u}=this.options;let a=De(e)?De(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Ps(a,{ignoreFieldNorm:u}),s&&a.sort(o),xi(t)&&t>-1&&(a=a.slice(0,t)),Cs(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:u})=>{if(!Ae(s))return;const{isMatch:a,score:h,indices:g}=t.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:h,value:s,norm:u,indices:g}]})}),n}_searchLogical(e){const t=Ri(e,this.options),i=(u,a,h)=>{if(!u.children){const{keyId:v,searcher:_}=u,M=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(a,v),searcher:_});return M&&M.length?[{idx:h,item:a,matches:M}]:[]}const g=[];for(let v=0,_=u.children.length;v<_;v+=1){const M=u.children[v],L=i(M,a,h);if(L.length)g.push(...L);else if(u.operator===Tt.AND)return[]}return g},n=this._myIndex.records,s={},o=[];return n.forEach(({$:u,i:a})=>{if(Ae(u)){let h=i(t,u,a);h.length&&(s[a]||(s[a]={idx:a,item:u,matches:[]},o.push(s[a])),h.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:u})=>{if(!Ae(o))return;let a=[];i.forEach((h,g)=>{a.push(...this._findMatches({key:h,value:o[g],searcher:t}))}),a.length&&s.push({idx:u,item:o,matches:a})}),s}_findMatches({key:e,value:t,searcher:i}){if(!Ae(t))return[];let n=[];if(He(t))t.forEach(({v:s,i:o,n:u})=>{if(!Ae(s))return;const{isMatch:a,score:h,indices:g}=i.searchIn(s);a&&n.push({score:h,key:e,value:s,idx:o,norm:u,indices:g})});else{const{v:s,n:o}=t,{isMatch:u,score:a,indices:h}=i.searchIn(s);u&&n.push({score:a,key:e,value:s,norm:o,indices:h})}return n}}at.version="6.6.2",at.createIndex=Si,at.parseIndex=hs,at.config=X,at.parseQuery=Ri,As(Es);var lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function mr(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 Ts="Expected a function",Di=0/0,Rs="[object Symbol]",Ds=/^\s+|\s+$/g,Is=/^[-+]0x[0-9a-f]+$/i,Ns=/^0b[01]+$/i,Bs=/^0o[0-7]+$/i,Fs=parseInt,Hs=typeof lt=="object"&&lt&&lt.Object===Object&&lt,Ys=typeof self=="object"&&self&&self.Object===Object&&self,js=Hs||Ys||Function("return this")(),Us=Object.prototype,zs=Us.toString,Xs=Math.max,Ws=Math.min,yr=function(){return js.Date.now()};function Vs(r,e,t){var i,n,s,o,u,a,h=0,g=!1,v=!1,_=!0;if(typeof r!="function")throw new TypeError(Ts);e=Ii(e)||0,br(t)&&(g=!!t.leading,v="maxWait"in t,s=v?Xs(Ii(t.maxWait)||0,e):s,_="trailing"in t?!!t.trailing:_);function M(w){var E=i,P=n;return i=n=void 0,h=w,o=r.apply(P,E),o}function L(w){return h=w,u=setTimeout(te,e),g?M(w):o}function j(w){var E=w-a,P=w-h,C=e-E;return v?Ws(C,s-P):C}function ne(w){var E=w-a,P=w-h;return a===void 0||E>=e||E<0||v&&P>=s}function te(){var w=yr();if(ne(w))return f(w);u=setTimeout(te,j(w))}function f(w){return u=void 0,_&&i?M(w):(i=n=void 0,o)}function p(){u!==void 0&&clearTimeout(u),h=0,i=a=n=u=void 0}function b(){return u===void 0?o:f(yr())}function S(){var w=yr(),E=ne(w);if(i=arguments,n=this,a=w,E){if(u===void 0)return L(a);if(v)return u=setTimeout(te,e),M(a)}return u===void 0&&(u=setTimeout(te,e)),o}return S.cancel=p,S.flush=b,S}function br(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function qs(r){return!!r&&typeof r=="object"}function Gs(r){return typeof r=="symbol"||qs(r)&&zs.call(r)==Rs}function Ii(r){if(typeof r=="number")return r;if(Gs(r))return Di;if(br(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=br(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(Ds,"");var t=Ns.test(r);return t||Bs.test(r)?Fs(r.slice(2),t?2:8):Is.test(r)?Di:+r}var Ks=Vs;const Js=vr(Ks);(()=>{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",u="pointers-min-distance",a="pointers-max-distance",h="range-dragging",g="data",v="min",_="max",M="step",L="round",j="type",ne="theme",te="rtl",f="btt",p="disabled",b="keyboard-disabled",S="mousewheel-disabled",w="slider-width",E="slider-height",P="slider-radius",C="slider-bg",I="slider-bg-hover",V="slider-bg-fill",ee="pointer-width",O="pointer-height",x="pointer-radius",A="pointer-bg",B="pointer-bg-hover",k="pointer-bg-focus",H="pointer-shadow",W="pointer-shadow-hover",Z="pointer-shadow-focus",ae="pointer-border",K="pointer-border-hover",ve="pointer-border-focus",Ce="animate-onclick",Te="css-links",ye="vertical",Pe="horizontal",Be=(l,d,y,m,T)=>{let Y=d-l;return Y===0?y:(m-y)*(T-l)/Y+y},ce=l=>!isNaN(parseFloat(l))&&isFinite(l),se=(l,d)=>ce(l)?Number(l):d,ft=(l,d)=>d===0?0:Math.round(l/d)*d,pt=(l,d=1/0)=>{if(d===1/0)return l;let y=e(10,d);return Math.round(l*y)/y},be=l=>l==null?!1:typeof l=="boolean"?l:l.trim().toLowerCase()==="true",da=(l,d)=>{l.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},fa=(l,d)=>{l.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},pa=(l,d)=>{l.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},ga=(l,d)=>{l.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},va=(l,d)=>{if(!d||d.length<=0)return;let y=d.map(T=>ce(T)?se(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}))},Lr=(l,d,y)=>{let m=0,T,Y,q,R,D=!1,G=(z,le,me,pe,he,de)=>{let _e=m;me!==void 0&&z>me&&(z=me),le!==void 0&&z<le&&(z=le),m=z;let Me=m;return(pe===ye&&de||pe===Pe&&he)&&(Me=100-Me),pe===ye?d.style.top=`${Me}%`:d.style.left=`${Me}%`,_e!==m},Q=z=>z===d||d.contains(z),F=(z,le,me,pe)=>{T=z,Y=le,q=me,R=pe},ie=z=>{D=z,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Oe=(z,le)=>{le==null?d.removeAttribute(z):d.setAttribute(z,le)},xe=z=>d.getAttribute(z),U=z=>{if(!D){switch(z.key){case"ArrowLeft":{z.preventDefault(),typeof T=="function"&&T(y);break}case"ArrowRight":{z.preventDefault(),typeof Y=="function"&&Y(y);break}case"ArrowUp":{z.preventDefault(),typeof q=="function"&&q(y);break}case"ArrowDown":{z.preventDefault(),typeof R=="function"&&R(y);break}}ga(l,z)}},J=()=>{D||da(l,d)};return d.className=`pointer pointer-${y}`,d.addEventListener("keydown",U),d.addEventListener("click",J),{$pointer:d,get percent(){return m},get disabled(){return D},set disabled(z){ie(z)},updatePosition:G,isClicked:Q,setCallbacks:F,setAttr:Oe,getAttr:xe,destroy:()=>{d.removeEventListener("keydown",U),d.removeEventListener("click",J),d.remove()}}},ma=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 Y=d[T].trim();Y!==""&&(y.push(Y),ce(Y)||(m=!1))}return m?y.map(T=>Number(T)):y},ya=(l,d)=>d?d.findIndex(y=>y===l||y.toString().trim()===l.toString().trim()):-1,ba=l=>({updatePosition:(d,y,m,T)=>{if(y.length<=0)return;let Y=y.length===1,q=y[0],R=y[y.length-1];d===ye?(l.style.removeProperty("width"),l.style.removeProperty("right"),l.style.removeProperty("left"),Y?l.style.height=`${q}%`:l.style.height=`${Math.abs(q-R)}%`,T?(l.style.bottom="0%",Y?l.style.top="auto":l.style.top=`${Math.min(100-R,100-q)}%`):(l.style.bottom="auto",Y?l.style.top="0%":l.style.top=`${Math.min(q,R)}%`)):(l.style.removeProperty("height"),l.style.removeProperty("top"),l.style.removeProperty("bottom"),Y?l.style.width=`${q}%`:l.style.width=`${Math.abs(q-R)}%`,m?(l.style.right="0%",Y?l.style.left="auto":l.style.left=`${Math.min(100-R,100-q)}%`):(l.style.right="auto",Y?l.style.left="0%":l.style.left=`${Math.min(q,R)}%`))}}),ln="--animate-onclick",$a="--width",xa="--height",wa="--panel-bg-border-radius",_a="--panel-bg",Ma="--panel-bg-hover",Ea="--panel-bg-fill",Aa="--pointer-width",Sa="--pointer-height",ka="--pointer-border-radius",Pa="--pointer-bg",Oa="--pointer-bg-hover",La="--pointer-bg-focus",Ca="--pointer-shadow",Ta="--pointer-shadow-hover",Ra="--pointer-shadow-focus",Da="--pointer-border",Ia="--pointer-border-hover",Na="--pointer-border-focus",Bt=(l,d,y)=>{let m=new Map;for(let T of l.attributes){let Y=T.nodeName.trim().toLowerCase();if(!d.test(Y))continue;let q=Y.replace(/\D/g,"").trim(),R=q===""||q==="0"||q==="1"?0:se(q,0)-1,D=y&&typeof y=="function"?y(T.value):T.value;m.set(R,D)}return m},Ba=l=>{if(!l)return null;let d=l.getAttribute(Te);if(!d)return null;let y=d.split(";"),m=[];for(let T of y)T.trim()!==""&&m.push(T.trim());return m},un=[[$a,w,"sliderWidth",null],[xa,E,"sliderHeight",null],[wa,P,"sliderRadius",null],[_a,C,"sliderBg",null],[Ma,I,"sliderBgHover",null],[Ea,V,"sliderBgFill",null],[Aa,ee,"pointer#Width",/^pointer([0-9]*)-width$/],[Sa,O,"pointer#Height",/^pointer([0-9]*)-height$/],[ka,x,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Pa,A,"pointer#Bg",/^pointer([0-9]*)-bg$/],[Oa,B,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[La,k,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Ca,H,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Ta,W,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Ra,Z,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Da,ae,"pointer#Border",/^pointer([0-9]*)-border$/],[Ia,K,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Na,ve,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Fa=(l,d,y)=>{let m=null,T=[],Y=new Map,q=(U,J=d)=>{let z=[...J.classList];for(let le of z)le.startsWith(U)&&d.classList.remove(le)},R=()=>{q("shape");let U=d.querySelectorAll(".pointer");for(let J of U)q("shape",J)},D=U=>{m=U,q("theme-"),typeof U=="string"&&d.classList.add(`theme-${U}`)},G=()=>{if(R(),!(T.length<=0)){d.classList.add("shape",`shape-${T[0]}`);for(let U=1;U<T.length;U++){let J=T[U];if(!J)continue;let z=d.querySelector(`.pointer-${U}`);!z||z.classList.add("shape",`shape-${J}`)}}},Q=(U,J)=>{T[U]=J,G()},F=()=>{R();let U=Bt(l,/^pointer([0-9]*)-shape$/);if(!(U.size<=0)){for(let J of U){let z=J[0];T[z]=J[1]}G()}},ie=(U,J)=>`${U}-${J}`,Oe=(U,J,z)=>{let le=y[z];if(!le)return;let me=z===0?d:le.$pointer;if(J==null){Y.has(ie(U,z))&&Y.delete(ie(U,z)),me.style.removeProperty(U);return}Y.set(ie(U,z),J),me.style.setProperty(U,J)},xe=(U,J)=>Y.get(ie(U,J));return(()=>{for(let U of un){let[J,z,le,me]=U;if(me){let he=Bt(l,me);for(let de of he){let _e=de[0],Me=de[1];Oe(J,Me,_e)}}else{let he=l.getAttribute(z);Oe(J,he,0)}let pe=[];if(le.indexOf("#")===-1)pe.push([le,0]);else{pe.push([le.replace("#",""),0]),pe.push([le.replace("#","0"),0]),pe.push([le.replace("#","1"),0]);for(let he=1;he<y.length;he++)pe.push([le.replace("#",(he+1).toString()),he])}for(let he of pe)try{let de=he[0],_e=he[1];Object.prototype.hasOwnProperty.call(l,de)||Object.defineProperty(l,de,{get(){return xe(J,_e)},set:Me=>{Oe(J,Me,_e)}})}catch(de){console.error(de)}}D(l.getAttribute(ne)),F()})(),{setStyle:Oe,getStyle:xe,get theme(){return m},set theme(U){D(U)},get pointerShapes(){return T},setPointerShape:Q}},gt="animate-on-click",cn="range-dragging",Ha=(l,d,y,m)=>{let T=[],Y=Q=>{for(let F of T)F.update&&typeof F.update=="function"&&F.update(Q)},q=()=>{for(let Q of T)Q.destroy&&typeof Q.destroy=="function"&&Q.destroy()},R=(Q,F)=>{for(let ie of T)ie.onAttrChange&&typeof ie.onAttrChange=="function"&&ie.onAttrChange(Q,F)},D=Q=>{if(Q.gettersAndSetters){for(let F of Q.gettersAndSetters)if(!(!F.name||!F.attributes))try{Object.prototype.hasOwnProperty.call(l,F.name)||Object.defineProperty(l,F.name,F.attributes)}catch(ie){console.error("defineSettersGetters error:",ie)}}},G=Q=>{var F;if(!Q.css)return;let ie=(F=l.shadowRoot)==null?void 0:F.querySelector("style");!ie||(ie.innerHTML+=Q.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let Q of window.tcRangeSliderPlugins){let F=Q();T.push(F),F.init&&typeof F.init=="function"&&(F.init(l,d,y,m),D(F),G(F))}},update:Y,onAttrChange:R,destroy:q}},Ya=10,ja=(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:se(G,0)-1,F=ce(R.value)?se(R.value,0):R.value;y.set(Q,F)}let T=Math.max(...Array.from(y.keys())),Y=[];Y.push([Lr(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,Y.push([Lr(l,D,R),y.get(R)])}return Y},hn=(l,d,y,m,T,Y,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 ce(D)?se(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,Y,{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)}},Ua=(l,d)=>{let y=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let m=2;m<Ya;m++)y.push([`value${m}`,`ariaLabel${m}`,`pointer${m}Shape`,`pointer${m}Disabled`,m-1]);for(let m of y)hn(l,d,m[4],m[0],m[1],m[2],m[3])},dn=(l,d,y)=>{var m;let T=(m=y.shadowRoot)==null?void 0:m.querySelector(".container");if(T)for(let Y of l)d?T.prepend(Y.$pointer):T.append(Y.$pointer)},Cr=0,Et=100,vt=2,fn="0.3s",za=(l,d,y)=>{let m=y.map(c=>c[0]),T=null,Y=null,q=null,R=null,D=Cr,G=Et,Q,F,ie=Pe,Oe=vt,xe=!1,U=!1,J=!1,z=0,le=1/0,me=!1,pe,he,de=!1,_e=!1,Me=!1,Ve=fn,pn=[],gn=c=>{de||(c.preventDefault&&c.preventDefault(),et(c),window.addEventListener("mousemove",et),window.addEventListener("mouseup",Ft),fa(l,c))},Ft=c=>{de||(pe=void 0,he=void 0,window.removeEventListener("mousemove",et),window.removeEventListener("mouseup",Ft),Ve&&d.classList.add(gt),pa(l,c))},Va=(c,$)=>{if(m.length<=0)return;if(m.length===1)return m[0].isClicked(c)&&Ve&&d.classList.remove(gt),m[0];let N=Ga(c);if(me){let re=$,Re=Yt(re);Re!==void 0&&(re=ft(re,Re)),N?(pe=re,he=0,Ve&&d.classList.remove(gt)):pe!==void 0&&(he=re-pe,pe=re)}if(!qa(c)&&!N){for(let re of m)if(!(!re.isClicked(c)||re.disabled))return Ve&&d.classList.remove(gt),re;for(let re of m)if(T===re)return re}let oe=1/0,fe=null;for(let re of m){if(re.disabled)continue;let Re=Math.abs($-re.percent);Re<oe&&(oe=Re,fe=re)}return fe},vn=()=>m.findIndex(c=>T===c&&!c.disabled),et=c=>{let $;if(ie===ye){let{height:oe,top:fe}=d.getBoundingClientRect(),re=c.type.indexOf("mouse")!==-1?c.clientY:c.touches[0].clientY;$=Math.min(Math.max(0,re-fe),oe)*100/oe}else{let{width:oe,left:fe}=d.getBoundingClientRect(),re=c.type.indexOf("mouse")!==-1?c.clientX:c.touches[0].clientX;$=Math.min(Math.max(0,re-fe),oe)*100/oe}if((xe||U)&&($=100-$),T=Va(c.target,$),me&&m.length>1&&he!==void 0){let oe=m[0],fe=m[m.length-1],re=oe.percent+he<0,Re=fe.percent+he>100;if(re||Re)return;for(let Gt=0;Gt<m.length;Gt++)Ee(Gt,m[Gt].percent+he);return}let N=vn();N!==-1&&(Ee(N,$),T==null||T.$pointer.focus())},Ht=c=>{if(de||document.activeElement!==l||T!=null&&T.disabled)return;c.stopPropagation(),c.preventDefault();let $=c.deltaY<0,N=xe||U,oe=$?!N:N,fe=vn();fe!==-1&&(oe?At(fe,m[fe].percent):St(fe,m[fe].percent))},mn=c=>{de||_e||(ie===ye?U?Ee(c,100):Ee(c,0):xe?St(c,m[c].percent):At(c,m[c].percent))},yn=c=>{de||_e||(ie===ye?U?Ee(c,0):Ee(c,100):xe?At(c,m[c].percent):St(c,m[c].percent))},bn=c=>{de||_e||(ie===ye?U?St(c,m[c].percent):At(c,m[c].percent):xe?Ee(c,100):Ee(c,0))},$n=c=>{de||_e||(ie===ye?U?At(c,m[c].percent):St(c,m[c].percent):xe?Ee(c,0):Ee(c,100))},qa=c=>c.classList.contains("panel"),Ga=c=>c.classList.contains("panel-fill"),At=(c,$)=>{if($===void 0)return;let N=Yt($);N==null&&(N=1),$-=N,$<0&&($=0),Ee(c,$)},St=(c,$)=>{if($===void 0)return;let N=Yt($);N==null&&(N=1),$+=N,$>100&&($=100),Ee(c,$)},tt=()=>{!R||R.update({percents:xn(),values:wn(),$pointers:_n(),min:Mn(),max:En(),data:Dr(),step:Rr(),round:Nr(),type:Ir(),textMin:jt(),textMax:Ut(),rightToLeft:Hr(),bottomToTop:Yr(),pointersOverlap:Xr(),pointersMinDistance:Br(),pointersMaxDistance:Fr(),rangeDragging:Wr(),disabled:jr(),keyboardDisabled:Ur(),mousewheelDisabled:zr()})},Ka=()=>{tt()},Ja=c=>{if(!(J||m.length<=1||G===D))if(c===0){let $=le*100/(G-D);return Math.max(0,m[c+1].percent-$)}else{let $=z*100/(G-D);return Math.min(m[c-1].percent+$,100)}},Za=c=>{if(!(J||m.length<=1||G===D))if(c===m.length-1){let $=le*100/(G-D);return Math.min(m[c-1].percent+$,100)}else{let $=z*100/(G-D);return Math.max(0,m[c+1].percent-$)}},Yt=c=>{let $;if(typeof Q=="function"){let N=Be(0,100,D,G,c);$=Q(N,c)}else $=Q;if(ce($)){let N=G-D;return $=N===0?0:$*100/N,$}},mt=c=>{if(c===void 0)return;let $=Be(0,100,D,G,c);return F!==void 0?F[Math.round($)]:pt($,Oe)},jt=()=>F!==void 0?F[D]:D,Ut=()=>F!==void 0?F[G]:G,Rr=()=>Q,Qa=c=>{var $;return c<=0||J?jt():($=mt(m[c-1].percent))!=null?$:""},el=c=>{var $;return m.length<=1||c>=m.length-1||J?Ut():($=mt(m[c+1].percent))!=null?$:""},xn=()=>m.map(c=>c.percent),wn=()=>m.map(c=>mt(c.percent)),_n=()=>m.map(c=>c.$pointer),Mn=()=>D,En=()=>G,Dr=()=>F,Ir=()=>ie,Nr=()=>Oe,Br=()=>z,Fr=()=>le,tl=c=>pn[c],Hr=()=>xe,Yr=()=>U,jr=()=>de,Ur=()=>_e,zr=()=>Me,Xr=()=>J,Wr=()=>me,Ee=(c,$)=>{if($===void 0)return;let N=Yt($);N!==void 0&&($=ft($,N));let oe=m[c];if(!oe)return;let fe=oe.updatePosition($,Ja(c),Za(c),ie,xe,U);Y==null||Y.updatePosition(ie,m.map(re=>re.percent),xe,U),tt();for(let re of m){let Re=mt(re.percent);Re!==void 0&&(re.setAttr("aria-valuenow",Re.toString()),re.setAttr("aria-valuetext",Re.toString()))}il(),fe&&va(l,m.map(re=>mt(re.percent)))},Fe=()=>{for(let c=0;c<m.length;c++)Ee(c,m[c].percent)},rl=(c,$)=>{D=F!==void 0?0:se(c,Cr),G=F!==void 0?F.length-1:se($,Et),zt(D),Xt(G)},il=()=>{var c,$;for(let N=0;N<m.length;N++){let oe=m[N];oe.setAttr("aria-valuemin",((c=Qa(N))!=null?c:"").toString()),oe.setAttr("aria-valuemax",(($=el(N))!=null?$:"").toString())}},zt=c=>{D=se(c,Cr),D>G&&(G=D+Et),Fe()},Xt=c=>{G=se(c,Et),G<D&&(G=D+Et),Fe()},An=c=>{J=!0;for(let $=0;$<c.length;$++)Wt(c[$],$);J=!1;for(let $=0;$<c.length;$++)Wt(c[$],$)},Wt=(c,$)=>{let N;F!==void 0?(N=c==null?0:ya(c,F),N===-1&&(N=0)):(N=se(c,D),N<D&&(N=D),N>G&&(N=G));let oe=Be(D,G,0,100,N);Ee($,oe)},Vt=c=>{if(c==null){Q=void 0;return}if(typeof c=="function"){Q=c,Fe();return}if(ce(c)){Q=se(c,1);let $=Math.abs(G-D);Q>$&&(Q=void 0),Fe();return}Q=void 0},Vr=c=>{J=c,Fe()},qr=c=>{(!ce(c)||c<0)&&(c=0),z=c},Gr=c=>{(!ce(c)||c<0)&&(c=1/0),le=c},Kr=c=>{de=c,d.classList.toggle("disabled",de),de?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Sn=c=>{_e=c},kn=c=>{Me=c,Me?document.removeEventListener("wheel",Ht):document.addEventListener("wheel",Ht,{passive:!1})},Jr=c=>{if(c==null){F=void 0;return}if(F=ma(c),F===void 0||F.length<=0){F=void 0;return}zt(0),Xt(F.length-1),Q===void 0&&Vt(1)},Zr=c=>{var $;typeof c=="string"?ie=c.trim().toLowerCase()===ye?ye:Pe:ie=Pe;let N=($=l.shadowRoot)==null?void 0:$.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${ie}`,Fe();let oe=ie===ye?"vertical":"horizontal";for(let fe of m)fe.setAttr("aria-orientation",oe)},Qr=c=>{xe=c,m.length>1&&dn(m,xe,l),Fe(),tt()},ei=c=>{U=c,m.length>1&&dn(m,U,l),Fe(),tt()},ti=c=>{Oe=se(c,vt),Oe<0&&(Oe=vt),tt()},Pn=c=>{c==null||c.toString().trim().toLowerCase()==="false"?(Ve=void 0,d.style.removeProperty(ln),d.classList.remove(gt)):(Ve=c.toString(),d.style.setProperty(ln,Ve),d.classList.add(gt))},On=(c,$)=>{let N=m[c];!N||(N.setAttr("aria-label",$),pn[c]=$)},qt=c=>{if(pe=void 0,m.length<=1){me=!1,d.classList.remove(cn);return}me=c,d.classList.toggle(cn,me)},nl=()=>{Kr(be(l.getAttribute(p))),_e=be(l.getAttribute(b)),Me=be(l.getAttribute(S));let c=Bt(l,/^pointer([0-9]*)-disabled$/,$=>be($));for(let $ of c){let N=$[0];!m[N]||(m[N].disabled=$[1])}},sl=()=>{let c=Bt(l,/^aria-label([0-9]*)$/);for(let $ of c){let N=$[0];On(N,$[1])}},ol=c=>{let $=m.length,N=m[$-1].$pointer,oe=N.cloneNode(!0);N.after(oe);let fe=Lr(l,oe,$);return fe.setCallbacks(mn,yn,bn,$n),m.push(fe),Wt(c,$),Fe(),tt(),$},al=()=>{let c=m.length,$=m[c-1];return $?($.destroy(),m.pop(),m.length<=1&&qt(!1),Fe(),tt(),c-1):-1};return(()=>{var c,$;for(let oe of m)oe.setCallbacks(mn,yn,bn,$n);let N=(c=l.shadowRoot)==null?void 0:c.querySelector(".panel-fill");N&&(Y=ba(N)),Zr(l.getAttribute(j)),Qr(be(l.getAttribute(te))),ei(be(l.getAttribute(f))),rl(l.getAttribute(v),l.getAttribute(_)),Vt(l.getAttribute(M)),Jr(l.getAttribute(g)),An(y.map(oe=>oe[1])),Vr(be(l.getAttribute(o))),qr(se(l.getAttribute(u),0)),Gr(se(l.getAttribute(a),1/0)),qt(be(l.getAttribute(h))),ti(se(l.getAttribute(L),vt)),nl(),sl(),q=Fa(l,d,m),Pn(($=l.getAttribute(Ce))!=null?$:fn),d.addEventListener("mousedown",gn),d.addEventListener("mouseup",Ft),d.addEventListener("touchmove",et),d.addEventListener("touchstart",et),Me||document.addEventListener("wheel",Ht,{passive:!1}),R=Ha(l,Ka,{setValues:An,setMin:zt,setMax:Xt,setStep:Vt,setPointersOverlap:Vr,setPointersMinDistance:qr,setPointersMaxDistance:Gr,setDisabled:Kr,setType:Zr,setRightToLeft:Qr,setBottomToTop:ei,setRound:ti,setKeyboardDisabled:Sn,setMousewheelDisabled:kn,setRangeDragging:qt,setData:Jr},{getPercents:xn,getValues:wn,getPointerElements:_n,getMin:Mn,getMax:En,getStep:Rr,getData:Dr,getType:Ir,getRound:Nr,getTextMin:jt,getTextMax:Ut,isRightToLeft:Hr,isBottomToTop:Yr,isDisabled:jr,isKeyboardDisabled:Ur,isMousewheelDisabled:zr,isPointersOverlap:Xr,isRangeDraggingEnabled:Wr,getPointersMinDistance:Br,getPointersMaxDistance:Fr}),R.init()})(),{get pointers(){return m},get styles(){return q},get pluginsManager(){return R},get min(){return jt()},get max(){return Ut()},get step(){return Rr()},get pointersOverlap(){return Xr()},set pointersOverlap(c){Vr(c)},get pointersMinDistance(){return Br()},set pointersMinDistance(c){qr(c)},get pointersMaxDistance(){return Fr()},set pointersMaxDistance(c){Gr(c)},get disabled(){return jr()},set disabled(c){Kr(c)},get data(){return Dr()},get type(){return Ir()},set type(c){Zr(c)},get rightToLeft(){return Hr()},set rightToLeft(c){Qr(c)},get bottomToTop(){return Yr()},set bottomToTop(c){ei(c)},get round(){return Nr()},set round(c){ti(c)},get animateOnClick(){return Ve},set animateOnClick(c){Pn(c)},get keyboardDisabled(){return Ur()},set keyboardDisabled(c){Sn(c)},get mousewheelDisabled(){return zr()},set mousewheelDisabled(c){kn(c)},get rangeDragging(){return Wr()},set rangeDragging(c){qt(c)},setMin:zt,setMax:Xt,setValue:Wt,setStep:Vt,setData:Jr,getTextValue:mt,setAriaLabel:On,getAriaLabel:tl,addPointer:ol,removePointer:al,destroy:()=>{d.removeEventListener("mousedown",gn),d.removeEventListener("mouseup",Ft),d.removeEventListener("touchmove",et),d.removeEventListener("touchstart",et),document.removeEventListener("wheel",Ht);for(let c of m)c.destroy();R==null||R.destroy()}}},Xa=(l,d,y)=>{let m=un.find(([R,D,G,Q])=>D.replace("#","")===d.replace(/\d+/g,""));if(m&&l.styles){let[R,D,G,Q]=m,F=d.replace(/\D/g,"").trim(),ie=F===""||F==="0"||F==="1"?0:se(F,0)-1;l.styles.setStyle(R,y,ie);return}switch(l&&l.pluginsManager&&l.pluginsManager.onAttrChange(d,y),d){case v:{l.setMin(y);break}case _:{l.setMax(y);break}case M:{l.setStep(y);break}case o:{l.pointersOverlap=be(y);break}case u:{l.pointersMinDistance=se(y,0);break}case h:{l.rangeDragging=be(y);break}case a:{l.pointersMaxDistance=se(y,1/0);break}case p:{l.disabled=be(y);break}case b:{l.keyboardDisabled=be(y);break}case S:{l.mousewheelDisabled=be(y);break}case g:{l.setData(y);break}case j:{l.type=y;break}case te:{l.rightToLeft=be(y);break}case f:{l.bottomToTop=be(y);break}case L:{l.round=se(y,vt);break}case ne:{l.styles&&(l.styles.theme=y);break}case Ce:{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 Y=d.replace(/\D/g,"").trim(),q=Y===""||Y==="0"||Y==="1"?0:se(Y,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=be(y);break}case"aria-label":{l.setAriaLabel(q,y);break}case"pointer-shape":{l.styles&&l.styles.setPointerShape(q,y);break}}},Wa=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:vt}set type(l){!this.slider||(this.slider.type=l??Pe)}get type(){var l;return((l=this.slider)==null?void 0:l.type)||Pe}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=be(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);hn(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=Ba(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=ja(this,y);this.slider=za(this,m,T),Ua(this,this.slider),this._observer=new MutationObserver(Y=>{Y.forEach(q=>{var R;if(!this.slider||q.type!=="attributes")return;let D=q.attributeName;!D||Xa(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()}},Tr=Wa;window.tcRangeSlider=Tr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Tr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Tr{})})();var Ni={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(lt,function(){var t=1e3,i=6e4,n=36e5,s="millisecond",o="second",u="minute",a="hour",h="day",g="week",v="month",_="quarter",M="year",L="date",j="Invalid Date",ne=/^(\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(O){var x=["th","st","nd","rd"],A=O%100;return"["+O+(x[(A-20)%10]||x[A]||x[0])+"]"}},p=function(O,x,A){var B=String(O);return!B||B.length>=x?O:""+Array(x+1-B.length).join(A)+O},b={s:p,z:function(O){var x=-O.utcOffset(),A=Math.abs(x),B=Math.floor(A/60),k=A%60;return(x<=0?"+":"-")+p(B,2,"0")+":"+p(k,2,"0")},m:function O(x,A){if(x.date()<A.date())return-O(A,x);var B=12*(A.year()-x.year())+(A.month()-x.month()),k=x.clone().add(B,v),H=A-k<0,W=x.clone().add(B+(H?-1:1),v);return+(-(B+(A-k)/(H?k-W:W-k))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:v,y:M,w:g,d:h,D:L,h:a,m:u,s:o,ms:s,Q:_}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},S="en",w={};w[S]=f;var E=function(O){return O instanceof V},P=function O(x,A,B){var k;if(!x)return S;if(typeof x=="string"){var H=x.toLowerCase();w[H]&&(k=H),A&&(w[H]=A,k=H);var W=x.split("-");if(!k&&W.length>1)return O(W[0])}else{var Z=x.name;w[Z]=x,k=Z}return!B&&k&&(S=k),k||!B&&S},C=function(O,x){if(E(O))return O.clone();var A=typeof x=="object"?x:{};return A.date=O,A.args=arguments,new V(A)},I=b;I.l=P,I.i=E,I.w=function(O,x){return C(O,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var V=function(){function O(A){this.$L=P(A.locale,null,!0),this.parse(A)}var x=O.prototype;return x.parse=function(A){this.$d=function(B){var k=B.date,H=B.utc;if(k===null)return new Date(NaN);if(I.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var W=k.match(ne);if(W){var Z=W[2]-1||0,ae=(W[7]||"0").substring(0,3);return H?new Date(Date.UTC(W[1],Z,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ae)):new Date(W[1],Z,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ae)}}return new Date(k)}(A),this.$x=A.x||{},this.init()},x.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()},x.$utils=function(){return I},x.isValid=function(){return this.$d.toString()!==j},x.isSame=function(A,B){var k=C(A);return this.startOf(B)<=k&&k<=this.endOf(B)},x.isAfter=function(A,B){return C(A)<this.startOf(B)},x.isBefore=function(A,B){return this.endOf(B)<C(A)},x.$g=function(A,B,k){return I.u(A)?this[B]:this.set(k,A)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(A,B){var k=this,H=!!I.u(B)||B,W=I.p(A),Z=function(Be,ce){var se=I.w(k.$u?Date.UTC(k.$y,ce,Be):new Date(k.$y,ce,Be),k);return H?se:se.endOf(h)},ae=function(Be,ce){return I.w(k.toDate()[Be].apply(k.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(ce)),k)},K=this.$W,ve=this.$M,Ce=this.$D,Te="set"+(this.$u?"UTC":"");switch(W){case M:return H?Z(1,0):Z(31,11);case v:return H?Z(1,ve):Z(0,ve+1);case g:var ye=this.$locale().weekStart||0,Pe=(K<ye?K+7:K)-ye;return Z(H?Ce-Pe:Ce+(6-Pe),ve);case h:case L:return ae(Te+"Hours",0);case a:return ae(Te+"Minutes",1);case u:return ae(Te+"Seconds",2);case o:return ae(Te+"Milliseconds",3);default:return this.clone()}},x.endOf=function(A){return this.startOf(A,!1)},x.$set=function(A,B){var k,H=I.p(A),W="set"+(this.$u?"UTC":""),Z=(k={},k[h]=W+"Date",k[L]=W+"Date",k[v]=W+"Month",k[M]=W+"FullYear",k[a]=W+"Hours",k[u]=W+"Minutes",k[o]=W+"Seconds",k[s]=W+"Milliseconds",k)[H],ae=H===h?this.$D+(B-this.$W):B;if(H===v||H===M){var K=this.clone().set(L,1);K.$d[Z](ae),K.init(),this.$d=K.set(L,Math.min(this.$D,K.daysInMonth())).$d}else Z&&this.$d[Z](ae);return this.init(),this},x.set=function(A,B){return this.clone().$set(A,B)},x.get=function(A){return this[I.p(A)]()},x.add=function(A,B){var k,H=this;A=Number(A);var W=I.p(B),Z=function(ve){var Ce=C(H);return I.w(Ce.date(Ce.date()+Math.round(ve*A)),H)};if(W===v)return this.set(v,this.$M+A);if(W===M)return this.set(M,this.$y+A);if(W===h)return Z(1);if(W===g)return Z(7);var ae=(k={},k[u]=i,k[a]=n,k[o]=t,k)[W]||1,K=this.$d.getTime()+A*ae;return I.w(K,this)},x.subtract=function(A,B){return this.add(-1*A,B)},x.format=function(A){var B=this,k=this.$locale();if(!this.isValid())return k.invalidDate||j;var H=A||"YYYY-MM-DDTHH:mm:ssZ",W=I.z(this),Z=this.$H,ae=this.$m,K=this.$M,ve=k.weekdays,Ce=k.months,Te=function(ce,se,ft,pt){return ce&&(ce[se]||ce(B,H))||ft[se].slice(0,pt)},ye=function(ce){return I.s(Z%12||12,ce,"0")},Pe=k.meridiem||function(ce,se,ft){var pt=ce<12?"AM":"PM";return ft?pt.toLowerCase():pt},Be={YY:String(this.$y).slice(-2),YYYY:I.s(this.$y,4,"0"),M:K+1,MM:I.s(K+1,2,"0"),MMM:Te(k.monthsShort,K,Ce,3),MMMM:Te(Ce,K),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:Te(k.weekdaysMin,this.$W,ve,2),ddd:Te(k.weekdaysShort,this.$W,ve,3),dddd:ve[this.$W],H:String(Z),HH:I.s(Z,2,"0"),h:ye(1),hh:ye(2),a:Pe(Z,ae,!0),A:Pe(Z,ae,!1),m:String(ae),mm:I.s(ae,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:W};return H.replace(te,function(ce,se){return se||Be[ce]||W.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(A,B,k){var H,W=I.p(B),Z=C(A),ae=(Z.utcOffset()-this.utcOffset())*i,K=this-Z,ve=I.m(this,Z);return ve=(H={},H[M]=ve/12,H[v]=ve,H[_]=ve/3,H[g]=(K-ae)/6048e5,H[h]=(K-ae)/864e5,H[a]=K/n,H[u]=K/i,H[o]=K/t,H)[W]||K,k?ve:I.a(ve)},x.daysInMonth=function(){return this.endOf(v).$D},x.$locale=function(){return w[this.$L]},x.locale=function(A,B){if(!A)return this.$L;var k=this.clone(),H=P(A,B,!0);return H&&(k.$L=H),k},x.clone=function(){return I.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},O}(),ee=V.prototype;return C.prototype=ee,[["$ms",s],["$s",o],["$m",u],["$H",a],["$W",h],["$M",v],["$y",M],["$D",L]].forEach(function(O){ee[O[1]]=function(x){return this.$g(x,O[0],O[1])}}),C.extend=function(O,x){return O.$i||(O(x,V,C),O.$i=!0),C},C.locale=P,C.isDayjs=E,C.unix=function(O){return C(1e3*O)},C.en=w[S],C.Ls=w,C.p={},C})})(Ni);var Zs=Ni.exports;const Rt=vr(Zs);class Qs extends st{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=ge` <slot name=${i}></slot> `,s={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:u}=this._renderedTemplates[i];this.contains(u)&&this.removeChild(u)}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}updated(){this.templates=this.getTemplates()}}const eo=(r,e="highlight",t="title")=>{const i=(s,o,u)=>{const a=o.split(".");let h;for(h=0;h<a.length-1;h++)s=s[a[h]];s[a[h]]=u},n=(s,o=[])=>{let u="",a=0;return o.forEach(h=>{const g=h[1]+1;u+=[s.substring(a,h[0]),`<mark class="${e}">`,s.substring(h[0],g),"</mark>"].join(""),a=g}),u+=s.substring(a),u};return r.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const u={...s};return o.forEach(a=>{a.key===t&&i(u,a.key,n(a.value,a.indices))}),u})};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},to={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},xr={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 Se(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 ro(r,e,t){switch(r){case"Point":return Ie(e).geometry;case"LineString":return Le(e).geometry;case"Polygon":return wr(e).geometry;case"MultiPoint":return Bi(e).geometry;case"MultiLineString":return _r(e).geometry;case"MultiPolygon":return Fi(e).geometry;default:throw new Error(r+" is invalid")}}function Ie(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(!Dt(r[0])||!Dt(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Se(i,e,t)}function io(r,e,t){return t===void 0&&(t={}),Xe(r.map(function(i){return Ie(i,e)}),t)}function wr(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 u={type:"Polygon",coordinates:r};return Se(u,e,t)}function no(r,e,t){return t===void 0&&(t={}),Xe(r.map(function(i){return wr(i,e)}),t)}function Le(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 Se(i,e,t)}function so(r,e,t){return t===void 0&&(t={}),Xe(r.map(function(i){return Le(i,e)}),t)}function Xe(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 _r(r,e,t){t===void 0&&(t={});var i={type:"MultiLineString",coordinates:r};return Se(i,e,t)}function Bi(r,e,t){t===void 0&&(t={});var i={type:"MultiPoint",coordinates:r};return Se(i,e,t)}function Fi(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return Se(i,e,t)}function oo(r,e,t){t===void 0&&(t={});var i={type:"GeometryCollection",geometries:r};return Se(i,e,t)}function ao(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 Hi(r,e){e===void 0&&(e="kilometers");var t=$r[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Mr(r,e){e===void 0&&(e="kilometers");var t=$r[e];if(!t)throw new Error(e+" units is invalid");return r/t}function lo(r,e){return Yi(Mr(r,e))}function uo(r){var e=r%360;return e<0&&(e+=360),e}function Yi(r){var e=r%(2*Math.PI);return e*180/Math.PI}function co(r){var e=r%360;return e*Math.PI/180}function ho(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 Hi(Mr(r,e),t)}function fo(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=xr[e];if(!i)throw new Error("invalid original units");var n=xr[t];if(!n)throw new Error("invalid final units");return r/i*n}function Dt(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Er(r){return!!r&&r.constructor===Object}function po(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(!Dt(e))throw new Error("bbox must only contain numbers")})}function go(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 vo=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:xr,bearingToAzimuth:uo,convertArea:fo,convertLength:ho,degreesToRadians:co,earthRadius:$e,factors:$r,feature:Se,featureCollection:Xe,geometry:ro,geometryCollection:oo,isNumber:Dt,isObject:Er,lengthToDegrees:lo,lengthToRadians:Mr,lineString:Le,lineStrings:so,multiLineString:_r,multiPoint:Bi,multiPolygon:Fi,point:Ie,points:io,polygon:wr,polygons:no,radiansToDegrees:Yi,radiansToLength:Hi,round:ao,unitsFactors:to,validateBBox:po,validateId:go},Symbol.toStringTag,{value:"Module"}));function ji(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 ut(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 ct(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=ji(r),n=ct(e),s=n.type,o=e.bbox,u=n.coordinates;if(o&&mo(i,o)===!1)return!1;s==="Polygon"&&(u=[u]);for(var a=!1,h=0;h<u.length&&!a;h++)if(Ui(i,u[h][0],t.ignoreBoundary)){for(var g=!1,v=1;v<u[h].length&&!g;)Ui(i,u[h][v],!t.ignoreBoundary)&&(g=!0),v++;g||(a=!0)}return a}function Ui(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],u=e[n][1],a=e[s][0],h=e[s][1],g=r[1]*(o-a)+u*(a-r[0])+h*(r[0]-o)===0&&(o-r[0])*(a-r[0])<=0&&(u-r[1])*(h-r[1])<=0;if(g)return!t;var v=u>r[1]!=h>r[1]&&r[0]<(a-o)*(r[1]-u)/(h-u)+o;v&&(i=!i)}return i}function mo(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function ht(r,e,t){if(r!==null)for(var i,n,s,o,u,a,h,g=0,v=0,_,M=r.type,L=M==="FeatureCollection",j=M==="Feature",ne=L?r.features.length:1,te=0;te<ne;te++){h=L?r.features[te].geometry:j?r.geometry:r,_=h?h.type==="GeometryCollection":!1,u=_?h.geometries.length:1;for(var f=0;f<u;f++){var p=0,b=0;if(o=_?h.geometries[f]:h,o!==null){a=o.coordinates;var S=o.type;switch(g=t&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){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++,S==="MultiPoint"&&p++}S==="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++}S==="MultiLineString"&&p++,S==="Polygon"&&b++}S==="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(ht(o.geometries[i],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function yo(r,e,t,i){var n=t;return ht(r,function(s,o,u,a,h){o===0&&t===void 0?n=s:n=e(n,s,o,u,a,h)},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 bo(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 It(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 $o(r,e,t){var i=t;return It(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function xo(r){var e=[];return ht(r,function(t){e.push(t)}),e}function Ar(r,e){var t,i,n,s,o,u,a,h,g,v,_=0,M=r.type==="FeatureCollection",L=r.type==="Feature",j=M?r.features.length:1;for(t=0;t<j;t++){for(u=M?r.features[t].geometry:L?r.geometry:r,h=M?r.features[t].properties:L?r.properties:{},g=M?r.features[t].bbox:L?r.bbox:void 0,v=M?r.features[t].id:L?r.id:void 0,a=u?u.type==="GeometryCollection":!1,o=a?u.geometries.length:1,n=0;n<o;n++){if(s=a?u.geometries[n]:u,s===null){if(e(null,_,h,g,v)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,_,h,g,v)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],_,h,g,v)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}_++}}function wo(r,e,t){var i=t;return Ar(r,function(n,s,o,u,a){s===0&&t===void 0?i=n:i=e(i,n,s,o,u,a)}),i}function Ye(r,e){Ar(r,function(t,i,n,s,o){var u=t===null?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return e(Se(t,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(u){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var h=0;h<t.coordinates.length;h++){var g=t.coordinates[h],v={type:a,coordinates:g};if(e(Se(v,n),i,h)===!1)return!1}})}function _o(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 Xi(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 u,a=0,h=0,g=0;if(ht(t,function(v,_,M,L,j){if(u===void 0||i>a||L>h||j>g){u=v,a=i,h=L,g=j,s=0;return}var ne=Le([u,v],t.properties);if(e(ne,i,n,j,s)===!1)return!1;s++,u=v})===!1)return!1}}})}function Mo(r,e,t){var i=t,n=!1;return Xi(r,function(s,o,u,a,h){n===!1&&t===void 0?i=s:i=e(i,s,o,u,a,h),n=!0}),i}function Wi(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 u=0;u<o.length;u++)if(e(Le(o[u],t.properties),i,n,u)===!1)return!1;break}}})}function Eo(r,e,t){var i=t;return Wi(r,function(n,s,o,u){s===0&&t===void 0?i=n:i=e(i,n,s,o,u)}),i}function Ao(r,e){if(e=e||{},!Er(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,u;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,u=r.features[t].geometry;break;case"Feature":o=o||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var a=u.coordinates;switch(u.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),Le([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),Le([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),Le([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),Le([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function So(r,e){if(e=e||{},!Er(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,u;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,u=r.features[t].geometry;break;case"Feature":o=o||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var a=u.coordinates;switch(u.type){case"Point":return Ie(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Ie(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Ie(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Ie(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Ie(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),Ie(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const ko=Object.freeze(Object.defineProperty({__proto__:null,coordAll:xo,coordEach:ht,coordReduce:yo,featureEach:It,featureReduce:$o,findPoint:So,findSegment:Ao,flattenEach:Ye,flattenReduce:_o,geomEach:Ar,geomReduce:wo,lineEach:Wi,lineReduce:Eo,propEach:zi,propReduce:bo,segmentEach:Xi,segmentReduce:Mo},Symbol.toStringTag,{value:"Module"}));function Vi(r){if(!r)throw new Error("geojson is required");var e=[];return Ye(r,function(t){Po(t,e)}),Xe(e)}function Po(r,e){var t=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":t=ut(i);break;case"LineString":t=[ut(i)]}t.forEach(function(n){var s=Oo(n,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function Oo(r,e){var t=[];return r.reduce(function(i,n){var s=Le([i,n],e);return s.bbox=Lo(i,n),t.push(s),n}),t}function Lo(r,e){var t=r[0],i=r[1],n=e[0],s=e[1],o=t<n?t:n,u=i<s?i:s,a=t>n?t:n,h=i>s?i:s;return[o,u,a,h]}var Sr={exports:{}},qi={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(lt,function(){function t(f,p,b,S,w){(function E(P,C,I,V,ee){for(;V>I;){if(V-I>600){var O=V-I+1,x=C-I+1,A=Math.log(O),B=.5*Math.exp(2*A/3),k=.5*Math.sqrt(A*B*(O-B)/O)*(x-O/2<0?-1:1),H=Math.max(I,Math.floor(C-x*B/O+k)),W=Math.min(V,Math.floor(C+(O-x)*B/O+k));E(P,C,H,W,ee)}var Z=P[C],ae=I,K=V;for(i(P,I,C),ee(P[V],Z)>0&&i(P,I,V);ae<K;){for(i(P,ae,K),ae++,K--;ee(P[ae],Z)<0;)ae++;for(;ee(P[K],Z)>0;)K--}ee(P[I],Z)===0?i(P,I,K):i(P,++K,V),K<=C&&(I=K+1),C<=K&&(V=K-1)}})(f,p,b||0,S||f.length-1,w||n)}function i(f,p,b){var S=f[p];f[p]=f[b],f[b]=S}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 S=0;S<p.length;S++)if(b(f,p[S]))return S;return-1}function u(f,p){a(f,0,f.children.length,p,f)}function a(f,p,b,S,w){w||(w=ne(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var E=p;E<b;E++){var P=f.children[E];h(w,f.leaf?S(P):P)}return w}function h(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 M(f){return f.maxX-f.minX+(f.maxY-f.minY)}function L(f,p){return f.minX<=p.minX&&f.minY<=p.minY&&p.maxX<=f.maxX&&p.maxY<=f.maxY}function j(f,p){return p.minX<=f.maxX&&p.minY<=f.maxY&&p.maxX>=f.minX&&p.maxY>=f.minY}function ne(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,S,w){for(var E=[p,b];E.length;)if(!((b=E.pop())-(p=E.pop())<=S)){var P=p+Math.ceil((b-p)/S/2)*S;t(f,P,p,b,w),E.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(!j(f,p))return b;for(var S=this.toBBox,w=[];p;){for(var E=0;E<p.children.length;E++){var P=p.children[E],C=p.leaf?S(P):P;j(f,C)&&(p.leaf?b.push(P):L(f,C)?this._all(P,b):w.push(P))}p=w.pop()}return b},s.prototype.collides=function(f){var p=this.data;if(!j(f,p))return!1;for(var b=[];p;){for(var S=0;S<p.children.length;S++){var w=p.children[S],E=p.leaf?this.toBBox(w):w;if(j(f,E)){if(p.leaf||L(f,E))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 S=this.data;this.data=b,b=S}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=ne([]),this},s.prototype.remove=function(f,p){if(!f)return this;for(var b,S,w,E=this.data,P=this.toBBox(f),C=[],I=[];E||C.length;){if(E||(E=C.pop(),S=C[C.length-1],b=I.pop(),w=!0),E.leaf){var V=o(f,E.children,p);if(V!==-1)return E.children.splice(V,1),C.push(E),this._condense(C),this}w||E.leaf||!L(E,P)?S?(b++,E=S.children[b],w=!1):E=null:(C.push(E),I.push(b),b=0,S=E,E=E.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,S){var w,E=b-p+1,P=this._maxEntries;if(E<=P)return u(w=ne(f.slice(p,b+1)),this.toBBox),w;S||(S=Math.ceil(Math.log(E)/Math.log(P)),P=Math.ceil(E/Math.pow(P,S-1))),(w=ne([])).leaf=!1,w.height=S;var C=Math.ceil(E/P),I=C*Math.ceil(Math.sqrt(P));te(f,p,b,I,this.compareMinX);for(var V=p;V<=b;V+=I){var ee=Math.min(V+I-1,b);te(f,V,ee,C,this.compareMinY);for(var O=V;O<=ee;O+=C){var x=Math.min(O+C-1,ee);w.children.push(this._build(f,O,x,S-1))}}return u(w,this.toBBox),w},s.prototype._chooseSubtree=function(f,p,b,S){for(;S.push(p),!p.leaf&&S.length-1!==b;){for(var w=1/0,E=1/0,P=void 0,C=0;C<p.children.length;C++){var I=p.children[C],V=_(I),ee=(O=f,x=I,(Math.max(x.maxX,O.maxX)-Math.min(x.minX,O.minX))*(Math.max(x.maxY,O.maxY)-Math.min(x.minY,O.minY))-V);ee<E?(E=ee,w=V<w?V:w,P=I):ee===E&&V<w&&(w=V,P=I)}p=P||p.children[0]}var O,x;return p},s.prototype._insert=function(f,p,b){var S=b?f:this.toBBox(f),w=[],E=this._chooseSubtree(S,this.data,p,w);for(E.children.push(f),h(E,S);p>=0&&w[p].children.length>this._maxEntries;)this._split(w,p),p--;this._adjustParentBBoxes(S,w,p)},s.prototype._split=function(f,p){var b=f[p],S=b.children.length,w=this._minEntries;this._chooseSplitAxis(b,w,S);var E=this._chooseSplitIndex(b,w,S),P=ne(b.children.splice(E,b.children.length-E));P.height=b.height,P.leaf=b.leaf,u(b,this.toBBox),u(P,this.toBBox),p?f[p-1].children.push(P):this._splitRoot(b,P)},s.prototype._splitRoot=function(f,p){this.data=ne([f,p]),this.data.height=f.height+1,this.data.leaf=!1,u(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(f,p,b){for(var S,w,E,P,C,I,V,ee=1/0,O=1/0,x=p;x<=b-p;x++){var A=a(f,0,x,this.toBBox),B=a(f,x,b,this.toBBox),k=(w=A,E=B,P=void 0,C=void 0,I=void 0,V=void 0,P=Math.max(w.minX,E.minX),C=Math.max(w.minY,E.minY),I=Math.min(w.maxX,E.maxX),V=Math.min(w.maxY,E.maxY),Math.max(0,I-P)*Math.max(0,V-C)),H=_(A)+_(B);k<ee?(ee=k,S=x,O=H<O?H:O):k===ee&&H<O&&(O=H,S=x)}return S||b-p},s.prototype._chooseSplitAxis=function(f,p,b){var S=f.leaf?this.compareMinX:g,w=f.leaf?this.compareMinY:v;this._allDistMargin(f,p,b,S)<this._allDistMargin(f,p,b,w)&&f.children.sort(S)},s.prototype._allDistMargin=function(f,p,b,S){f.children.sort(S);for(var w=this.toBBox,E=a(f,0,p,w),P=a(f,b-p,b,w),C=M(E)+M(P),I=p;I<b-p;I++){var V=f.children[I];h(E,f.leaf?w(V):V),C+=M(E)}for(var ee=b-p-1;ee>=p;ee--){var O=f.children[ee];h(P,f.leaf?w(O):O),C+=M(P)}return C},s.prototype._adjustParentBBoxes=function(f,p,b){for(var S=b;S>=0;S--)h(p[S],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():u(f[p],this.toBBox)},s})})(qi);var Co=qi.exports;const To=mr(vo),Ro=mr(ko);function Qe(r){var e=[1/0,1/0,-1/0,-1/0];return ht(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}Qe.default=Qe;const Do=mr(Object.freeze(Object.defineProperty({__proto__:null,default:Qe},Symbol.toStringTag,{value:"Module"})));var Ne=Co,Gi=To,Ki=Ro,dt=Do.default,Io=Ki.featureEach;Ki.coordEach,Gi.polygon;var Ji=Gi.featureCollection;function Zi(r){var e=new Ne(r);return e.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:dt(t),Ne.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:dt(n),i.push(n)}):Io(t,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:dt(n),i.push(n)}),Ne.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:dt(t),Ne.prototype.remove.call(this,t,i)},e.clear=function(){return Ne.prototype.clear.call(this)},e.search=function(t){var i=Ne.prototype.search.call(this,this.toBBox(t));return Ji(i)},e.collides=function(t){return Ne.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=Ne.prototype.all.call(this);return Ji(t)},e.toJSON=function(){return Ne.prototype.toJSON.call(this)},e.fromJSON=function(t){return Ne.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=dt(t);else if(t.type==="FeatureCollection")i=dt(t);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}Sr.exports=Zi,Sr.exports.default=Zi;var No=Sr.exports;const Bo=vr(No);function kr(r,e){var t={},i=[];if(r.type==="LineString"&&(r=Se(r)),e.type==="LineString"&&(e=Se(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=Qi(r,e);return n&&i.push(n),Xe(i)}var s=Bo();return s.load(Vi(e)),It(Vi(r),function(o){It(s.search(o),function(u){var a=Qi(o,u);if(a){var h=ut(a).join(",");t[h]||(t[h]=!0,i.push(a))}})}),Xe(i)}function Qi(r,e){var t=ut(r),i=ut(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],u=t[1][1],a=i[0][0],h=i[0][1],g=i[1][0],v=i[1][1],_=(v-h)*(o-n)-(g-a)*(u-s),M=(g-a)*(s-h)-(v-h)*(n-a),L=(o-n)*(s-h)-(u-s)*(n-a);if(_===0)return null;var j=M/_,ne=L/_;if(j>=0&&j<=1&&ne>=0&&ne<=1){var te=n+j*(o-n),f=s+j*(u-s);return Ie([te,f])}return null}function Pr(r,e){e===void 0&&(e={});var t=ct(r);switch(!e.properties&&r.type==="Feature"&&(e.properties=r.properties),t.type){case"Polygon":return Fo(t,e);case"MultiPolygon":return Ho(t,e);default:throw new Error("invalid poly")}}function Fo(r,e){e===void 0&&(e={});var t=ct(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{};return en(i,n)}function Ho(r,e){e===void 0&&(e={});var t=ct(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{},s=[];return i.forEach(function(o){s.push(en(o,n))}),Xe(s)}function en(r,e){return r.length>1?_r(r,e):Le(r[0],e)}function Yo(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!Wo(r.coordinates,e.coordinates);case"LineString":return!tn(e,r);case"Polygon":return!ke(r,e)}break;case"LineString":switch(e.type){case"Point":return!tn(r,e);case"LineString":return!Uo(r,e);case"Polygon":return!rn(e,r)}break;case"Polygon":switch(e.type){case"Point":return!ke(e,r);case"LineString":return!rn(r,e);case"Polygon":return!zo(e,r)}}return!1}function tn(r,e){for(var t=0;t<r.coordinates.length-1;t++)if(Xo(r.coordinates[t],r.coordinates[t+1],e.coordinates))return!0;return!1}function Uo(r,e){var t=kr(r,e);return t.features.length>0}function rn(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=kr(e,Pr(r));return s.features.length>0}function zo(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 u=o[s];if(ke(u,r))return!0}var a=kr(Pr(r),Pr(e));return a.features.length>0}function Xo(r,e,t){var i=t[0]-r[0],n=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],u=i*o-n*s;return u!==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 Wo(r,e){return r[0]===e[0]&&r[1]===e[1]}function Vo(r,e){var t=!1;return Ye(r,function(i){Ye(e,function(n){if(t===!0)return!0;t=!Yo(i.geometry,n.geometry)})}),t}function Nt(r,e,t){t===void 0&&(t={});for(var i=ji(r),n=ut(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")),qo(n[s],n[s+1],i,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function qo(r,e,t,i,n){var s=t[0],o=t[1],u=r[0],a=r[1],h=e[0],g=e[1],v=t[0]-u,_=t[1]-a,M=h-u,L=g-a,j=v*L-_*M;if(n!==null){if(Math.abs(j)>n)return!1}else if(j!==0)return!1;if(i){if(i==="start")return Math.abs(M)>=Math.abs(L)?M>0?u<s&&s<=h:h<=s&&s<u:L>0?a<o&&o<=g:g<=o&&o<a;if(i==="end")return Math.abs(M)>=Math.abs(L)?M>0?u<=s&&s<h:h<s&&s<=u:L>0?a<=o&&o<g:g<o&&o<=a;if(i==="both")return Math.abs(M)>=Math.abs(L)?M>0?u<s&&s<h:h<s&&s<u:L>0?a<o&&o<g:g<o&&o<a}else return Math.abs(M)>=Math.abs(L)?M>0?u<=s&&s<=h:h<=s&&s<=u:L>0?a<=o&&o<=g:g<=o&&o<=a;return!1}function Go(r,e){var t=ct(r),i=ct(e),n=t.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return Ko(t,i);case"LineString":return Nt(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 Jo(t,i);case"LineString":return Zo(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 ea(t,i);case"Polygon":case"MultiPolygon":return ta(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return ra(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function Ko(r,e){var t,i=!1;for(t=0;t<e.coordinates.length;t++)if(sn(e.coordinates[t],r.coordinates)){i=!0;break}return i}function Jo(r,e){for(var t=0;t<r.coordinates.length;t++){for(var i=!1,n=0;n<e.coordinates.length;n++)sn(r.coordinates[t],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function Zo(r,e){for(var t=!1,i=0;i<r.coordinates.length;i++){if(!Nt(r.coordinates[i],e))return!1;t||(t=Nt(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=ke(r.coordinates[1],e),!i){t=!1;break}i=ke(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&i}function ea(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Nt(r.coordinates[t],e))return!1;return!0}function ta(r,e){var t=Qe(e),i=Qe(r);if(!nn(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=ia(r.coordinates[s],r.coordinates[s+1]);n=ke(o,e,{ignoreBoundary:!0})}}return n}function ra(r,e){var t=Qe(r),i=Qe(e);if(!nn(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 nn(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function sn(r,e){return r[0]===e[0]&&r[1]===e[1]}function ia(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}var na=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,on=(r,e,t,i)=>{for(var n=i>1?void 0:i?sa(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&&na(e,t,n),n};const oa=(r,e)=>e?Vo(r,e):!0,aa=(r,e)=>e?Go(r,e):!0;let Or=class extends st{render(){return ge`
51
+ */class ar extends Kn{constructor(e){if(super(e),this.et=ue,e.type!==qn.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ue||e==null)return this.ft=void 0,this.et=e;if(e===Ke)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:[]}}}ar.directiveName="unsafeHTML",ar.resultType=1;const $i=Gn(ar);function He(r){return Array.isArray?Array.isArray(r):_i(r)==="[object Array]"}const Jn=1/0;function Zn(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-Jn?"-0":e}function Qn(r){return r==null?"":Zn(r)}function De(r){return typeof r=="string"}function xi(r){return typeof r=="number"}function es(r){return r===!0||r===!1||ts(r)&&_i(r)=="[object Boolean]"}function wi(r){return typeof r=="object"}function ts(r){return wi(r)&&r!==null}function Ae(r){return r!=null}function lr(r){return!r.trim().length}function _i(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ll="Extended search is not available",rs="Incorrect 'index' type",is=r=>`Invalid value for key ${r}`,ns=r=>`Pattern length exceeds max of ${r}.`,ss=r=>`Missing ${r} property in key`,os=r=>`Property 'weight' in key '${r}' must be a positive integer`,Mi=Object.prototype.hasOwnProperty;class as{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Ei(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 Ei(r){let e=null,t=null,i=null,n=1,s=null;if(De(r)||He(r))i=r,e=Ai(r),t=ur(r);else{if(!Mi.call(r,"name"))throw new Error(ss("name"));const o=r.name;if(i=o,Mi.call(r,"weight")&&(n=r.weight,n<=0))throw new Error(os(o));e=Ai(o),t=ur(o),s=r.getFn}return{path:e,id:t,weight:n,src:i,getFn:s}}function Ai(r){return He(r)?r:r.split(".")}function ur(r){return He(r)?r.join("."):r}function ls(r,e){let t=[],i=!1;const n=(s,o,u)=>{if(Ae(s))if(!o[u])t.push(s);else{let a=o[u];const h=s[a];if(!Ae(h))return;if(u===o.length-1&&(De(h)||xi(h)||es(h)))t.push(Qn(h));else if(He(h)){i=!0;for(let g=0,v=h.length;g<v;g+=1)n(h[g],o,u+1)}else o.length&&n(h,o,u+1)}};return n(r,De(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:ls,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const us=/[^ ]+/g;function cs(r=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(us).length;if(t.has(s))return t.get(s);const o=1/Math.pow(s,.5*r),u=parseFloat(Math.round(o*i)/i);return t.set(s,u),u},clear(){t.clear()}}}class cr{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=cs(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,De(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();De(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,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(!Ae(e)||lr(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(Ae(o)){if(He(o)){let u=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:h,value:g}=a.pop();if(Ae(g))if(De(g)&&!lr(g)){let v={v:g,i:h,n:this.norm.get(g)};u.push(v)}else He(g)&&g.forEach((v,_)=>{a.push({nestedArrIndex:_,value:v})})}i.$[s]=u}else if(De(o)&&!lr(o)){let u={v:o,n:this.norm.get(o)};i.$[s]=u}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Si(r,e,{getFn:t=X.getFn,fieldNormWeight:i=X.fieldNormWeight}={}){const n=new cr({getFn:t,fieldNormWeight:i});return n.setKeys(r.map(Ei)),n.setSources(e),n.create(),n}function hs(r,{getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){const{keys:i,records:n}=r,s=new cr({getFn:e,fieldNormWeight:t});return s.setKeys(i),s.setIndexRecords(n),s}function Ct(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 u=Math.abs(i-t);return n?o+u/n:u?1:o}function ds(r=[],e=X.minMatchCharLength){let t=[],i=-1,n=-1,s=0;for(let o=r.length;s<o;s+=1){let u=r[s];u&&i===-1?i=s:!u&&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 Ze=32;function fs(r,e,t,{location:i=X.location,distance:n=X.distance,threshold:s=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:u=X.minMatchCharLength,includeMatches:a=X.includeMatches,ignoreLocation:h=X.ignoreLocation}={}){if(e.length>Ze)throw new Error(ns(Ze));const g=e.length,v=r.length,_=Math.max(0,Math.min(i,v));let M=s,L=_;const j=u>1||a,ne=j?Array(v):[];let te;for(;(te=r.indexOf(e,L))>-1;){let E=Ct(e,{currentLocation:te,expectedLocation:_,distance:n,ignoreLocation:h});if(M=Math.min(E,M),L=te+g,j){let P=0;for(;P<g;)ne[te+P]=1,P+=1}}L=-1;let f=[],p=1,b=g+v;const S=1<<g-1;for(let E=0;E<g;E+=1){let P=0,C=b;for(;P<C;)Ct(e,{errors:E,currentLocation:_+C,expectedLocation:_,distance:n,ignoreLocation:h})<=M?P=C:b=C,C=Math.floor((b-P)/2+P);b=C;let I=Math.max(1,_-C+1),V=o?v:Math.min(_+C,v)+g,ee=Array(V+2);ee[V+1]=(1<<E)-1;for(let x=V;x>=I;x-=1){let A=x-1,B=t[r.charAt(A)];if(j&&(ne[A]=+!!B),ee[x]=(ee[x+1]<<1|1)&B,E&&(ee[x]|=(f[x+1]|f[x])<<1|1|f[x+1]),ee[x]&S&&(p=Ct(e,{errors:E,currentLocation:A,expectedLocation:_,distance:n,ignoreLocation:h}),p<=M)){if(M=p,L=A,L<=_)break;I=Math.max(1,2*_-L)}}if(Ct(e,{errors:E+1,currentLocation:_,expectedLocation:_,distance:n,ignoreLocation:h})>M)break;f=ee}const w={isMatch:L>=0,score:Math.max(.001,p)};if(j){const E=ds(ne,u);E.length?a&&(w.indices=E):w.isMatch=!1}return w}function ps(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 ki{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:u=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:h=X.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:u,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const g=(_,M)=>{this.chunks.push({pattern:_,alphabet:ps(_),startIndex:M})},v=this.pattern.length;if(v>Ze){let _=0;const M=v%Ze,L=v-M;for(;_<L;)g(this.pattern.substr(_,Ze),_),_+=Ze;if(M){const j=v-Ze;g(this.pattern.substr(j),j)}}else g(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:i}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let L={isMatch:!0,score:0};return i&&(L.indices=[[0,e.length-1]]),L}const{location:n,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:a,ignoreLocation:h}=this.options;let g=[],v=0,_=!1;this.chunks.forEach(({pattern:L,alphabet:j,startIndex:ne})=>{const{isMatch:te,score:f,indices:p}=fs(e,L,j,{location:n+ne,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:a,includeMatches:i,ignoreLocation:h});te&&(_=!0),v+=f,te&&p&&(g=[...g,...p])});let M={isMatch:_,score:_?v/this.chunks.length:1};return _&&i&&(M.indices=g),M}}class ze{constructor(e){this.pattern=e}static isMultiMatch(e){return Pi(e,this.multiRegex)}static isSingleMatch(e){return Pi(e,this.singleRegex)}search(){}}function Pi(r,e){const t=r.match(e);return t?t[1]:null}class gs extends ze{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 vs extends ze{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 ms extends ze{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 ys extends ze{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 bs extends ze{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 $s extends ze{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 Oi extends ze{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:u=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:h=X.ignoreLocation}={}){super(e),this._bitapSearch=new ki(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:u,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Li extends ze{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 hr=[gs,Li,ms,ys,$s,bs,vs,Oi],Ci=hr.length,xs=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,ws="|";function _s(r,e={}){return r.split(ws).map(t=>{let i=t.trim().split(xs).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const u=i[s];let a=!1,h=-1;for(;!a&&++h<Ci;){const g=hr[h];let v=g.isMultiMatch(u);v&&(n.push(new g(v,e)),a=!0)}if(!a)for(h=-1;++h<Ci;){const g=hr[h];let v=g.isSingleMatch(u);if(v){n.push(new g(v,e));break}}}return n})}const Ms=new Set([Oi.type,Li.type]);class Es{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,includeMatches:i=X.includeMatches,minMatchCharLength:n=X.minMatchCharLength,ignoreLocation:s=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:u=X.location,threshold:a=X.threshold,distance:h=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:u,threshold:a,distance:h},this.pattern=t?e:e.toLowerCase(),this.query=_s(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=[],u=0;for(let a=0,h=t.length;a<h;a+=1){const g=t[a];o.length=0,s=0;for(let v=0,_=g.length;v<_;v+=1){const M=g[v],{isMatch:L,indices:j,score:ne}=M.search(e);if(L){if(s+=1,u+=ne,i){const te=M.constructor.type;Ms.has(te)?o=[...o,...j]:o.push(j)}}else{u=0,s=0,o.length=0;break}}if(s){let v={isMatch:!0,score:u/s};return i&&(v.indices=o),v}}return{isMatch:!1,score:1}}}const dr=[];function As(...r){dr.push(...r)}function fr(r,e){for(let t=0,i=dr.length;t<i;t+=1){let n=dr[t];if(n.condition(r,e))return new n(r,e)}return new ki(r,e)}const Tt={AND:"$and",OR:"$or"},pr={PATH:"$path",PATTERN:"$val"},gr=r=>!!(r[Tt.AND]||r[Tt.OR]),Ss=r=>!!r[pr.PATH],ks=r=>!He(r)&&wi(r)&&!gr(r),Ti=r=>({[Tt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function Ri(r,e,{auto:t=!0}={}){const i=n=>{let s=Object.keys(n);const o=Ss(n);if(!o&&s.length>1&&!gr(n))return i(Ti(n));if(ks(n)){const a=o?n[pr.PATH]:s[0],h=o?n[pr.PATTERN]:n[a];if(!De(h))throw new Error(is(a));const g={keyId:ur(a),pattern:h};return t&&(g.searcher=fr(h,e)),g}let u={children:[],operator:s[0]};return s.forEach(a=>{const h=n[a];He(h)&&h.forEach(g=>{u.children.push(i(g))})}),u};return gr(r)||(r=Ti(r)),i(r)}function Ps(r,{ignoreFieldNorm:e=X.ignoreFieldNorm}){r.forEach(t=>{let i=1;t.matches.forEach(({key:n,norm:s,score:o})=>{const u=n?n.weight:null;i*=Math.pow(o===0&&u?Number.EPSILON:o,(u||1)*(e?1:s))}),t.score=i})}function Os(r,e){const t=r.matches;e.matches=[],Ae(t)&&t.forEach(i=>{if(!Ae(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 Ls(r,e){e.score=r.score}function Cs(r,e,{includeMatches:t=X.includeMatches,includeScore:i=X.includeScore}={}){const n=[];return t&&n.push(Os),i&&n.push(Ls),r.map(s=>{const{idx:o}=s,u={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,u)}),u})}class lt{constructor(e,t={},i){this.options={...X,...t},this.options.useExtendedSearch,this._keyStore=new as(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof cr))throw new Error(rs);this._myIndex=t||Si(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ae(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let 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:u}=this.options;let a=De(e)?De(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Ps(a,{ignoreFieldNorm:u}),s&&a.sort(o),xi(t)&&t>-1&&(a=a.slice(0,t)),Cs(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:u})=>{if(!Ae(s))return;const{isMatch:a,score:h,indices:g}=t.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:h,value:s,norm:u,indices:g}]})}),n}_searchLogical(e){const t=Ri(e,this.options),i=(u,a,h)=>{if(!u.children){const{keyId:v,searcher:_}=u,M=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(a,v),searcher:_});return M&&M.length?[{idx:h,item:a,matches:M}]:[]}const g=[];for(let v=0,_=u.children.length;v<_;v+=1){const M=u.children[v],L=i(M,a,h);if(L.length)g.push(...L);else if(u.operator===Tt.AND)return[]}return g},n=this._myIndex.records,s={},o=[];return n.forEach(({$:u,i:a})=>{if(Ae(u)){let h=i(t,u,a);h.length&&(s[a]||(s[a]={idx:a,item:u,matches:[]},o.push(s[a])),h.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:u})=>{if(!Ae(o))return;let a=[];i.forEach((h,g)=>{a.push(...this._findMatches({key:h,value:o[g],searcher:t}))}),a.length&&s.push({idx:u,item:o,matches:a})}),s}_findMatches({key:e,value:t,searcher:i}){if(!Ae(t))return[];let n=[];if(He(t))t.forEach(({v:s,i:o,n:u})=>{if(!Ae(s))return;const{isMatch:a,score:h,indices:g}=i.searchIn(s);a&&n.push({score:h,key:e,value:s,idx:o,norm:u,indices:g})});else{const{v:s,n:o}=t,{isMatch:u,score:a,indices:h}=i.searchIn(s);u&&n.push({score:a,key:e,value:s,norm:o,indices:h})}return n}}lt.version="6.6.2",lt.createIndex=Si,lt.parseIndex=hs,lt.config=X,lt.parseQuery=Ri,As(Es);var ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function mr(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 Ts="Expected a function",Di=0/0,Rs="[object Symbol]",Ds=/^\s+|\s+$/g,Is=/^[-+]0x[0-9a-f]+$/i,Ns=/^0b[01]+$/i,Bs=/^0o[0-7]+$/i,Fs=parseInt,Hs=typeof ut=="object"&&ut&&ut.Object===Object&&ut,Ys=typeof self=="object"&&self&&self.Object===Object&&self,js=Hs||Ys||Function("return this")(),Us=Object.prototype,zs=Us.toString,Xs=Math.max,Ws=Math.min,yr=function(){return js.Date.now()};function Vs(r,e,t){var i,n,s,o,u,a,h=0,g=!1,v=!1,_=!0;if(typeof r!="function")throw new TypeError(Ts);e=Ii(e)||0,br(t)&&(g=!!t.leading,v="maxWait"in t,s=v?Xs(Ii(t.maxWait)||0,e):s,_="trailing"in t?!!t.trailing:_);function M(w){var E=i,P=n;return i=n=void 0,h=w,o=r.apply(P,E),o}function L(w){return h=w,u=setTimeout(te,e),g?M(w):o}function j(w){var E=w-a,P=w-h,C=e-E;return v?Ws(C,s-P):C}function ne(w){var E=w-a,P=w-h;return a===void 0||E>=e||E<0||v&&P>=s}function te(){var w=yr();if(ne(w))return f(w);u=setTimeout(te,j(w))}function f(w){return u=void 0,_&&i?M(w):(i=n=void 0,o)}function p(){u!==void 0&&clearTimeout(u),h=0,i=a=n=u=void 0}function b(){return u===void 0?o:f(yr())}function S(){var w=yr(),E=ne(w);if(i=arguments,n=this,a=w,E){if(u===void 0)return L(a);if(v)return u=setTimeout(te,e),M(a)}return u===void 0&&(u=setTimeout(te,e)),o}return S.cancel=p,S.flush=b,S}function br(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function qs(r){return!!r&&typeof r=="object"}function Gs(r){return typeof r=="symbol"||qs(r)&&zs.call(r)==Rs}function Ii(r){if(typeof r=="number")return r;if(Gs(r))return Di;if(br(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=br(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(Ds,"");var t=Ns.test(r);return t||Bs.test(r)?Fs(r.slice(2),t?2:8):Is.test(r)?Di:+r}var Ks=Vs;const Js=vr(Ks);(()=>{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",u="pointers-min-distance",a="pointers-max-distance",h="range-dragging",g="data",v="min",_="max",M="step",L="round",j="type",ne="theme",te="rtl",f="btt",p="disabled",b="keyboard-disabled",S="mousewheel-disabled",w="slider-width",E="slider-height",P="slider-radius",C="slider-bg",I="slider-bg-hover",V="slider-bg-fill",ee="pointer-width",O="pointer-height",x="pointer-radius",A="pointer-bg",B="pointer-bg-hover",k="pointer-bg-focus",H="pointer-shadow",W="pointer-shadow-hover",Z="pointer-shadow-focus",ae="pointer-border",K="pointer-border-hover",ve="pointer-border-focus",Ce="animate-onclick",Te="css-links",ye="vertical",Pe="horizontal",Be=(l,d,y,m,T)=>{let Y=d-l;return Y===0?y:(m-y)*(T-l)/Y+y},ce=l=>!isNaN(parseFloat(l))&&isFinite(l),se=(l,d)=>ce(l)?Number(l):d,pt=(l,d)=>d===0?0:Math.round(l/d)*d,gt=(l,d=1/0)=>{if(d===1/0)return l;let y=e(10,d);return Math.round(l*y)/y},be=l=>l==null?!1:typeof l=="boolean"?l:l.trim().toLowerCase()==="true",da=(l,d)=>{l.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},fa=(l,d)=>{l.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},pa=(l,d)=>{l.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},ga=(l,d)=>{l.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},va=(l,d)=>{if(!d||d.length<=0)return;let y=d.map(T=>ce(T)?se(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}))},Lr=(l,d,y)=>{let m=0,T,Y,q,R,D=!1,G=(z,le,me,ge,he,de)=>{let _e=m;me!==void 0&&z>me&&(z=me),le!==void 0&&z<le&&(z=le),m=z;let Me=m;return(ge===ye&&de||ge===Pe&&he)&&(Me=100-Me),ge===ye?d.style.top=`${Me}%`:d.style.left=`${Me}%`,_e!==m},Q=z=>z===d||d.contains(z),F=(z,le,me,ge)=>{T=z,Y=le,q=me,R=ge},ie=z=>{D=z,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Oe=(z,le)=>{le==null?d.removeAttribute(z):d.setAttribute(z,le)},xe=z=>d.getAttribute(z),U=z=>{if(!D){switch(z.key){case"ArrowLeft":{z.preventDefault(),typeof T=="function"&&T(y);break}case"ArrowRight":{z.preventDefault(),typeof Y=="function"&&Y(y);break}case"ArrowUp":{z.preventDefault(),typeof q=="function"&&q(y);break}case"ArrowDown":{z.preventDefault(),typeof R=="function"&&R(y);break}}ga(l,z)}},J=()=>{D||da(l,d)};return d.className=`pointer pointer-${y}`,d.addEventListener("keydown",U),d.addEventListener("click",J),{$pointer:d,get percent(){return m},get disabled(){return D},set disabled(z){ie(z)},updatePosition:G,isClicked:Q,setCallbacks:F,setAttr:Oe,getAttr:xe,destroy:()=>{d.removeEventListener("keydown",U),d.removeEventListener("click",J),d.remove()}}},ma=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 Y=d[T].trim();Y!==""&&(y.push(Y),ce(Y)||(m=!1))}return m?y.map(T=>Number(T)):y},ya=(l,d)=>d?d.findIndex(y=>y===l||y.toString().trim()===l.toString().trim()):-1,ba=l=>({updatePosition:(d,y,m,T)=>{if(y.length<=0)return;let Y=y.length===1,q=y[0],R=y[y.length-1];d===ye?(l.style.removeProperty("width"),l.style.removeProperty("right"),l.style.removeProperty("left"),Y?l.style.height=`${q}%`:l.style.height=`${Math.abs(q-R)}%`,T?(l.style.bottom="0%",Y?l.style.top="auto":l.style.top=`${Math.min(100-R,100-q)}%`):(l.style.bottom="auto",Y?l.style.top="0%":l.style.top=`${Math.min(q,R)}%`)):(l.style.removeProperty("height"),l.style.removeProperty("top"),l.style.removeProperty("bottom"),Y?l.style.width=`${q}%`:l.style.width=`${Math.abs(q-R)}%`,m?(l.style.right="0%",Y?l.style.left="auto":l.style.left=`${Math.min(100-R,100-q)}%`):(l.style.right="auto",Y?l.style.left="0%":l.style.left=`${Math.min(q,R)}%`))}}),ln="--animate-onclick",$a="--width",xa="--height",wa="--panel-bg-border-radius",_a="--panel-bg",Ma="--panel-bg-hover",Ea="--panel-bg-fill",Aa="--pointer-width",Sa="--pointer-height",ka="--pointer-border-radius",Pa="--pointer-bg",Oa="--pointer-bg-hover",La="--pointer-bg-focus",Ca="--pointer-shadow",Ta="--pointer-shadow-hover",Ra="--pointer-shadow-focus",Da="--pointer-border",Ia="--pointer-border-hover",Na="--pointer-border-focus",Bt=(l,d,y)=>{let m=new Map;for(let T of l.attributes){let Y=T.nodeName.trim().toLowerCase();if(!d.test(Y))continue;let q=Y.replace(/\D/g,"").trim(),R=q===""||q==="0"||q==="1"?0:se(q,0)-1,D=y&&typeof y=="function"?y(T.value):T.value;m.set(R,D)}return m},Ba=l=>{if(!l)return null;let d=l.getAttribute(Te);if(!d)return null;let y=d.split(";"),m=[];for(let T of y)T.trim()!==""&&m.push(T.trim());return m},un=[[$a,w,"sliderWidth",null],[xa,E,"sliderHeight",null],[wa,P,"sliderRadius",null],[_a,C,"sliderBg",null],[Ma,I,"sliderBgHover",null],[Ea,V,"sliderBgFill",null],[Aa,ee,"pointer#Width",/^pointer([0-9]*)-width$/],[Sa,O,"pointer#Height",/^pointer([0-9]*)-height$/],[ka,x,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Pa,A,"pointer#Bg",/^pointer([0-9]*)-bg$/],[Oa,B,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[La,k,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Ca,H,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Ta,W,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Ra,Z,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Da,ae,"pointer#Border",/^pointer([0-9]*)-border$/],[Ia,K,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Na,ve,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Fa=(l,d,y)=>{let m=null,T=[],Y=new Map,q=(U,J=d)=>{let z=[...J.classList];for(let le of z)le.startsWith(U)&&d.classList.remove(le)},R=()=>{q("shape");let U=d.querySelectorAll(".pointer");for(let J of U)q("shape",J)},D=U=>{m=U,q("theme-"),typeof U=="string"&&d.classList.add(`theme-${U}`)},G=()=>{if(R(),!(T.length<=0)){d.classList.add("shape",`shape-${T[0]}`);for(let U=1;U<T.length;U++){let J=T[U];if(!J)continue;let z=d.querySelector(`.pointer-${U}`);!z||z.classList.add("shape",`shape-${J}`)}}},Q=(U,J)=>{T[U]=J,G()},F=()=>{R();let U=Bt(l,/^pointer([0-9]*)-shape$/);if(!(U.size<=0)){for(let J of U){let z=J[0];T[z]=J[1]}G()}},ie=(U,J)=>`${U}-${J}`,Oe=(U,J,z)=>{let le=y[z];if(!le)return;let me=z===0?d:le.$pointer;if(J==null){Y.has(ie(U,z))&&Y.delete(ie(U,z)),me.style.removeProperty(U);return}Y.set(ie(U,z),J),me.style.setProperty(U,J)},xe=(U,J)=>Y.get(ie(U,J));return(()=>{for(let U of un){let[J,z,le,me]=U;if(me){let he=Bt(l,me);for(let de of he){let _e=de[0],Me=de[1];Oe(J,Me,_e)}}else{let he=l.getAttribute(z);Oe(J,he,0)}let ge=[];if(le.indexOf("#")===-1)ge.push([le,0]);else{ge.push([le.replace("#",""),0]),ge.push([le.replace("#","0"),0]),ge.push([le.replace("#","1"),0]);for(let he=1;he<y.length;he++)ge.push([le.replace("#",(he+1).toString()),he])}for(let he of ge)try{let de=he[0],_e=he[1];Object.prototype.hasOwnProperty.call(l,de)||Object.defineProperty(l,de,{get(){return xe(J,_e)},set:Me=>{Oe(J,Me,_e)}})}catch(de){console.error(de)}}D(l.getAttribute(ne)),F()})(),{setStyle:Oe,getStyle:xe,get theme(){return m},set theme(U){D(U)},get pointerShapes(){return T},setPointerShape:Q}},vt="animate-on-click",cn="range-dragging",Ha=(l,d,y,m)=>{let T=[],Y=Q=>{for(let F of T)F.update&&typeof F.update=="function"&&F.update(Q)},q=()=>{for(let Q of T)Q.destroy&&typeof Q.destroy=="function"&&Q.destroy()},R=(Q,F)=>{for(let ie of T)ie.onAttrChange&&typeof ie.onAttrChange=="function"&&ie.onAttrChange(Q,F)},D=Q=>{if(Q.gettersAndSetters){for(let F of Q.gettersAndSetters)if(!(!F.name||!F.attributes))try{Object.prototype.hasOwnProperty.call(l,F.name)||Object.defineProperty(l,F.name,F.attributes)}catch(ie){console.error("defineSettersGetters error:",ie)}}},G=Q=>{var F;if(!Q.css)return;let ie=(F=l.shadowRoot)==null?void 0:F.querySelector("style");!ie||(ie.innerHTML+=Q.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let Q of window.tcRangeSliderPlugins){let F=Q();T.push(F),F.init&&typeof F.init=="function"&&(F.init(l,d,y,m),D(F),G(F))}},update:Y,onAttrChange:R,destroy:q}},Ya=10,ja=(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:se(G,0)-1,F=ce(R.value)?se(R.value,0):R.value;y.set(Q,F)}let T=Math.max(...Array.from(y.keys())),Y=[];Y.push([Lr(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,Y.push([Lr(l,D,R),y.get(R)])}return Y},hn=(l,d,y,m,T,Y,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 ce(D)?se(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,Y,{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)}},Ua=(l,d)=>{let y=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let m=2;m<Ya;m++)y.push([`value${m}`,`ariaLabel${m}`,`pointer${m}Shape`,`pointer${m}Disabled`,m-1]);for(let m of y)hn(l,d,m[4],m[0],m[1],m[2],m[3])},dn=(l,d,y)=>{var m;let T=(m=y.shadowRoot)==null?void 0:m.querySelector(".container");if(T)for(let Y of l)d?T.prepend(Y.$pointer):T.append(Y.$pointer)},Cr=0,Et=100,mt=2,fn="0.3s",za=(l,d,y)=>{let m=y.map(c=>c[0]),T=null,Y=null,q=null,R=null,D=Cr,G=Et,Q,F,ie=Pe,Oe=mt,xe=!1,U=!1,J=!1,z=0,le=1/0,me=!1,ge,he,de=!1,_e=!1,Me=!1,Ve=fn,pn=[],gn=c=>{de||(c.preventDefault&&c.preventDefault(),et(c),window.addEventListener("mousemove",et),window.addEventListener("mouseup",Ft),fa(l,c))},Ft=c=>{de||(ge=void 0,he=void 0,window.removeEventListener("mousemove",et),window.removeEventListener("mouseup",Ft),Ve&&d.classList.add(vt),pa(l,c))},Va=(c,$)=>{if(m.length<=0)return;if(m.length===1)return m[0].isClicked(c)&&Ve&&d.classList.remove(vt),m[0];let N=Ga(c);if(me){let re=$,Re=Yt(re);Re!==void 0&&(re=pt(re,Re)),N?(ge=re,he=0,Ve&&d.classList.remove(vt)):ge!==void 0&&(he=re-ge,ge=re)}if(!qa(c)&&!N){for(let re of m)if(!(!re.isClicked(c)||re.disabled))return Ve&&d.classList.remove(vt),re;for(let re of m)if(T===re)return re}let oe=1/0,fe=null;for(let re of m){if(re.disabled)continue;let Re=Math.abs($-re.percent);Re<oe&&(oe=Re,fe=re)}return fe},vn=()=>m.findIndex(c=>T===c&&!c.disabled),et=c=>{let $;if(ie===ye){let{height:oe,top:fe}=d.getBoundingClientRect(),re=c.type.indexOf("mouse")!==-1?c.clientY:c.touches[0].clientY;$=Math.min(Math.max(0,re-fe),oe)*100/oe}else{let{width:oe,left:fe}=d.getBoundingClientRect(),re=c.type.indexOf("mouse")!==-1?c.clientX:c.touches[0].clientX;$=Math.min(Math.max(0,re-fe),oe)*100/oe}if((xe||U)&&($=100-$),T=Va(c.target,$),me&&m.length>1&&he!==void 0){let oe=m[0],fe=m[m.length-1],re=oe.percent+he<0,Re=fe.percent+he>100;if(re||Re)return;for(let Gt=0;Gt<m.length;Gt++)Ee(Gt,m[Gt].percent+he);return}let N=vn();N!==-1&&(Ee(N,$),T==null||T.$pointer.focus())},Ht=c=>{if(de||document.activeElement!==l||T!=null&&T.disabled)return;c.stopPropagation(),c.preventDefault();let $=c.deltaY<0,N=xe||U,oe=$?!N:N,fe=vn();fe!==-1&&(oe?At(fe,m[fe].percent):St(fe,m[fe].percent))},mn=c=>{de||_e||(ie===ye?U?Ee(c,100):Ee(c,0):xe?St(c,m[c].percent):At(c,m[c].percent))},yn=c=>{de||_e||(ie===ye?U?Ee(c,0):Ee(c,100):xe?At(c,m[c].percent):St(c,m[c].percent))},bn=c=>{de||_e||(ie===ye?U?St(c,m[c].percent):At(c,m[c].percent):xe?Ee(c,100):Ee(c,0))},$n=c=>{de||_e||(ie===ye?U?At(c,m[c].percent):St(c,m[c].percent):xe?Ee(c,0):Ee(c,100))},qa=c=>c.classList.contains("panel"),Ga=c=>c.classList.contains("panel-fill"),At=(c,$)=>{if($===void 0)return;let N=Yt($);N==null&&(N=1),$-=N,$<0&&($=0),Ee(c,$)},St=(c,$)=>{if($===void 0)return;let N=Yt($);N==null&&(N=1),$+=N,$>100&&($=100),Ee(c,$)},tt=()=>{!R||R.update({percents:xn(),values:wn(),$pointers:_n(),min:Mn(),max:En(),data:Dr(),step:Rr(),round:Nr(),type:Ir(),textMin:jt(),textMax:Ut(),rightToLeft:Hr(),bottomToTop:Yr(),pointersOverlap:Xr(),pointersMinDistance:Br(),pointersMaxDistance:Fr(),rangeDragging:Wr(),disabled:jr(),keyboardDisabled:Ur(),mousewheelDisabled:zr()})},Ka=()=>{tt()},Ja=c=>{if(!(J||m.length<=1||G===D))if(c===0){let $=le*100/(G-D);return Math.max(0,m[c+1].percent-$)}else{let $=z*100/(G-D);return Math.min(m[c-1].percent+$,100)}},Za=c=>{if(!(J||m.length<=1||G===D))if(c===m.length-1){let $=le*100/(G-D);return Math.min(m[c-1].percent+$,100)}else{let $=z*100/(G-D);return Math.max(0,m[c+1].percent-$)}},Yt=c=>{let $;if(typeof Q=="function"){let N=Be(0,100,D,G,c);$=Q(N,c)}else $=Q;if(ce($)){let N=G-D;return $=N===0?0:$*100/N,$}},yt=c=>{if(c===void 0)return;let $=Be(0,100,D,G,c);return F!==void 0?F[Math.round($)]:gt($,Oe)},jt=()=>F!==void 0?F[D]:D,Ut=()=>F!==void 0?F[G]:G,Rr=()=>Q,Qa=c=>{var $;return c<=0||J?jt():($=yt(m[c-1].percent))!=null?$:""},el=c=>{var $;return m.length<=1||c>=m.length-1||J?Ut():($=yt(m[c+1].percent))!=null?$:""},xn=()=>m.map(c=>c.percent),wn=()=>m.map(c=>yt(c.percent)),_n=()=>m.map(c=>c.$pointer),Mn=()=>D,En=()=>G,Dr=()=>F,Ir=()=>ie,Nr=()=>Oe,Br=()=>z,Fr=()=>le,tl=c=>pn[c],Hr=()=>xe,Yr=()=>U,jr=()=>de,Ur=()=>_e,zr=()=>Me,Xr=()=>J,Wr=()=>me,Ee=(c,$)=>{if($===void 0)return;let N=Yt($);N!==void 0&&($=pt($,N));let oe=m[c];if(!oe)return;let fe=oe.updatePosition($,Ja(c),Za(c),ie,xe,U);Y==null||Y.updatePosition(ie,m.map(re=>re.percent),xe,U),tt();for(let re of m){let Re=yt(re.percent);Re!==void 0&&(re.setAttr("aria-valuenow",Re.toString()),re.setAttr("aria-valuetext",Re.toString()))}il(),fe&&va(l,m.map(re=>yt(re.percent)))},Fe=()=>{for(let c=0;c<m.length;c++)Ee(c,m[c].percent)},rl=(c,$)=>{D=F!==void 0?0:se(c,Cr),G=F!==void 0?F.length-1:se($,Et),zt(D),Xt(G)},il=()=>{var c,$;for(let N=0;N<m.length;N++){let oe=m[N];oe.setAttr("aria-valuemin",((c=Qa(N))!=null?c:"").toString()),oe.setAttr("aria-valuemax",(($=el(N))!=null?$:"").toString())}},zt=c=>{D=se(c,Cr),D>G&&(G=D+Et),Fe()},Xt=c=>{G=se(c,Et),G<D&&(G=D+Et),Fe()},An=c=>{J=!0;for(let $=0;$<c.length;$++)Wt(c[$],$);J=!1;for(let $=0;$<c.length;$++)Wt(c[$],$)},Wt=(c,$)=>{let N;F!==void 0?(N=c==null?0:ya(c,F),N===-1&&(N=0)):(N=se(c,D),N<D&&(N=D),N>G&&(N=G));let oe=Be(D,G,0,100,N);Ee($,oe)},Vt=c=>{if(c==null){Q=void 0;return}if(typeof c=="function"){Q=c,Fe();return}if(ce(c)){Q=se(c,1);let $=Math.abs(G-D);Q>$&&(Q=void 0),Fe();return}Q=void 0},Vr=c=>{J=c,Fe()},qr=c=>{(!ce(c)||c<0)&&(c=0),z=c},Gr=c=>{(!ce(c)||c<0)&&(c=1/0),le=c},Kr=c=>{de=c,d.classList.toggle("disabled",de),de?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Sn=c=>{_e=c},kn=c=>{Me=c,Me?document.removeEventListener("wheel",Ht):document.addEventListener("wheel",Ht,{passive:!1})},Jr=c=>{if(c==null){F=void 0;return}if(F=ma(c),F===void 0||F.length<=0){F=void 0;return}zt(0),Xt(F.length-1),Q===void 0&&Vt(1)},Zr=c=>{var $;typeof c=="string"?ie=c.trim().toLowerCase()===ye?ye:Pe:ie=Pe;let N=($=l.shadowRoot)==null?void 0:$.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${ie}`,Fe();let oe=ie===ye?"vertical":"horizontal";for(let fe of m)fe.setAttr("aria-orientation",oe)},Qr=c=>{xe=c,m.length>1&&dn(m,xe,l),Fe(),tt()},ei=c=>{U=c,m.length>1&&dn(m,U,l),Fe(),tt()},ti=c=>{Oe=se(c,mt),Oe<0&&(Oe=mt),tt()},Pn=c=>{c==null||c.toString().trim().toLowerCase()==="false"?(Ve=void 0,d.style.removeProperty(ln),d.classList.remove(vt)):(Ve=c.toString(),d.style.setProperty(ln,Ve),d.classList.add(vt))},On=(c,$)=>{let N=m[c];!N||(N.setAttr("aria-label",$),pn[c]=$)},qt=c=>{if(ge=void 0,m.length<=1){me=!1,d.classList.remove(cn);return}me=c,d.classList.toggle(cn,me)},nl=()=>{Kr(be(l.getAttribute(p))),_e=be(l.getAttribute(b)),Me=be(l.getAttribute(S));let c=Bt(l,/^pointer([0-9]*)-disabled$/,$=>be($));for(let $ of c){let N=$[0];!m[N]||(m[N].disabled=$[1])}},sl=()=>{let c=Bt(l,/^aria-label([0-9]*)$/);for(let $ of c){let N=$[0];On(N,$[1])}},ol=c=>{let $=m.length,N=m[$-1].$pointer,oe=N.cloneNode(!0);N.after(oe);let fe=Lr(l,oe,$);return fe.setCallbacks(mn,yn,bn,$n),m.push(fe),Wt(c,$),Fe(),tt(),$},al=()=>{let c=m.length,$=m[c-1];return $?($.destroy(),m.pop(),m.length<=1&&qt(!1),Fe(),tt(),c-1):-1};return(()=>{var c,$;for(let oe of m)oe.setCallbacks(mn,yn,bn,$n);let N=(c=l.shadowRoot)==null?void 0:c.querySelector(".panel-fill");N&&(Y=ba(N)),Zr(l.getAttribute(j)),Qr(be(l.getAttribute(te))),ei(be(l.getAttribute(f))),rl(l.getAttribute(v),l.getAttribute(_)),Vt(l.getAttribute(M)),Jr(l.getAttribute(g)),An(y.map(oe=>oe[1])),Vr(be(l.getAttribute(o))),qr(se(l.getAttribute(u),0)),Gr(se(l.getAttribute(a),1/0)),qt(be(l.getAttribute(h))),ti(se(l.getAttribute(L),mt)),nl(),sl(),q=Fa(l,d,m),Pn(($=l.getAttribute(Ce))!=null?$:fn),d.addEventListener("mousedown",gn),d.addEventListener("mouseup",Ft),d.addEventListener("touchmove",et),d.addEventListener("touchstart",et),Me||document.addEventListener("wheel",Ht,{passive:!1}),R=Ha(l,Ka,{setValues:An,setMin:zt,setMax:Xt,setStep:Vt,setPointersOverlap:Vr,setPointersMinDistance:qr,setPointersMaxDistance:Gr,setDisabled:Kr,setType:Zr,setRightToLeft:Qr,setBottomToTop:ei,setRound:ti,setKeyboardDisabled:Sn,setMousewheelDisabled:kn,setRangeDragging:qt,setData:Jr},{getPercents:xn,getValues:wn,getPointerElements:_n,getMin:Mn,getMax:En,getStep:Rr,getData:Dr,getType:Ir,getRound:Nr,getTextMin:jt,getTextMax:Ut,isRightToLeft:Hr,isBottomToTop:Yr,isDisabled:jr,isKeyboardDisabled:Ur,isMousewheelDisabled:zr,isPointersOverlap:Xr,isRangeDraggingEnabled:Wr,getPointersMinDistance:Br,getPointersMaxDistance:Fr}),R.init()})(),{get pointers(){return m},get styles(){return q},get pluginsManager(){return R},get min(){return jt()},get max(){return Ut()},get step(){return Rr()},get pointersOverlap(){return Xr()},set pointersOverlap(c){Vr(c)},get pointersMinDistance(){return Br()},set pointersMinDistance(c){qr(c)},get pointersMaxDistance(){return Fr()},set pointersMaxDistance(c){Gr(c)},get disabled(){return jr()},set disabled(c){Kr(c)},get data(){return Dr()},get type(){return Ir()},set type(c){Zr(c)},get rightToLeft(){return Hr()},set rightToLeft(c){Qr(c)},get bottomToTop(){return Yr()},set bottomToTop(c){ei(c)},get round(){return Nr()},set round(c){ti(c)},get animateOnClick(){return Ve},set animateOnClick(c){Pn(c)},get keyboardDisabled(){return Ur()},set keyboardDisabled(c){Sn(c)},get mousewheelDisabled(){return zr()},set mousewheelDisabled(c){kn(c)},get rangeDragging(){return Wr()},set rangeDragging(c){qt(c)},setMin:zt,setMax:Xt,setValue:Wt,setStep:Vt,setData:Jr,getTextValue:yt,setAriaLabel:On,getAriaLabel:tl,addPointer:ol,removePointer:al,destroy:()=>{d.removeEventListener("mousedown",gn),d.removeEventListener("mouseup",Ft),d.removeEventListener("touchmove",et),d.removeEventListener("touchstart",et),document.removeEventListener("wheel",Ht);for(let c of m)c.destroy();R==null||R.destroy()}}},Xa=(l,d,y)=>{let m=un.find(([R,D,G,Q])=>D.replace("#","")===d.replace(/\d+/g,""));if(m&&l.styles){let[R,D,G,Q]=m,F=d.replace(/\D/g,"").trim(),ie=F===""||F==="0"||F==="1"?0:se(F,0)-1;l.styles.setStyle(R,y,ie);return}switch(l&&l.pluginsManager&&l.pluginsManager.onAttrChange(d,y),d){case v:{l.setMin(y);break}case _:{l.setMax(y);break}case M:{l.setStep(y);break}case o:{l.pointersOverlap=be(y);break}case u:{l.pointersMinDistance=se(y,0);break}case h:{l.rangeDragging=be(y);break}case a:{l.pointersMaxDistance=se(y,1/0);break}case p:{l.disabled=be(y);break}case b:{l.keyboardDisabled=be(y);break}case S:{l.mousewheelDisabled=be(y);break}case g:{l.setData(y);break}case j:{l.type=y;break}case te:{l.rightToLeft=be(y);break}case f:{l.bottomToTop=be(y);break}case L:{l.round=se(y,mt);break}case ne:{l.styles&&(l.styles.theme=y);break}case Ce:{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 Y=d.replace(/\D/g,"").trim(),q=Y===""||Y==="0"||Y==="1"?0:se(Y,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=be(y);break}case"aria-label":{l.setAriaLabel(q,y);break}case"pointer-shape":{l.styles&&l.styles.setPointerShape(q,y);break}}},Wa=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:mt}set type(l){!this.slider||(this.slider.type=l??Pe)}get type(){var l;return((l=this.slider)==null?void 0:l.type)||Pe}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=be(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);hn(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=Ba(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=ja(this,y);this.slider=za(this,m,T),Ua(this,this.slider),this._observer=new MutationObserver(Y=>{Y.forEach(q=>{var R;if(!this.slider||q.type!=="attributes")return;let D=q.attributeName;!D||Xa(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()}},Tr=Wa;window.tcRangeSlider=Tr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Tr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Tr{})})();var Ni={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ut,function(){var t=1e3,i=6e4,n=36e5,s="millisecond",o="second",u="minute",a="hour",h="day",g="week",v="month",_="quarter",M="year",L="date",j="Invalid Date",ne=/^(\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(O){var x=["th","st","nd","rd"],A=O%100;return"["+O+(x[(A-20)%10]||x[A]||x[0])+"]"}},p=function(O,x,A){var B=String(O);return!B||B.length>=x?O:""+Array(x+1-B.length).join(A)+O},b={s:p,z:function(O){var x=-O.utcOffset(),A=Math.abs(x),B=Math.floor(A/60),k=A%60;return(x<=0?"+":"-")+p(B,2,"0")+":"+p(k,2,"0")},m:function O(x,A){if(x.date()<A.date())return-O(A,x);var B=12*(A.year()-x.year())+(A.month()-x.month()),k=x.clone().add(B,v),H=A-k<0,W=x.clone().add(B+(H?-1:1),v);return+(-(B+(A-k)/(H?k-W:W-k))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:v,y:M,w:g,d:h,D:L,h:a,m:u,s:o,ms:s,Q:_}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},S="en",w={};w[S]=f;var E=function(O){return O instanceof V},P=function O(x,A,B){var k;if(!x)return S;if(typeof x=="string"){var H=x.toLowerCase();w[H]&&(k=H),A&&(w[H]=A,k=H);var W=x.split("-");if(!k&&W.length>1)return O(W[0])}else{var Z=x.name;w[Z]=x,k=Z}return!B&&k&&(S=k),k||!B&&S},C=function(O,x){if(E(O))return O.clone();var A=typeof x=="object"?x:{};return A.date=O,A.args=arguments,new V(A)},I=b;I.l=P,I.i=E,I.w=function(O,x){return C(O,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var V=function(){function O(A){this.$L=P(A.locale,null,!0),this.parse(A)}var x=O.prototype;return x.parse=function(A){this.$d=function(B){var k=B.date,H=B.utc;if(k===null)return new Date(NaN);if(I.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var W=k.match(ne);if(W){var Z=W[2]-1||0,ae=(W[7]||"0").substring(0,3);return H?new Date(Date.UTC(W[1],Z,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ae)):new Date(W[1],Z,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ae)}}return new Date(k)}(A),this.$x=A.x||{},this.init()},x.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()},x.$utils=function(){return I},x.isValid=function(){return this.$d.toString()!==j},x.isSame=function(A,B){var k=C(A);return this.startOf(B)<=k&&k<=this.endOf(B)},x.isAfter=function(A,B){return C(A)<this.startOf(B)},x.isBefore=function(A,B){return this.endOf(B)<C(A)},x.$g=function(A,B,k){return I.u(A)?this[B]:this.set(k,A)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(A,B){var k=this,H=!!I.u(B)||B,W=I.p(A),Z=function(Be,ce){var se=I.w(k.$u?Date.UTC(k.$y,ce,Be):new Date(k.$y,ce,Be),k);return H?se:se.endOf(h)},ae=function(Be,ce){return I.w(k.toDate()[Be].apply(k.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(ce)),k)},K=this.$W,ve=this.$M,Ce=this.$D,Te="set"+(this.$u?"UTC":"");switch(W){case M:return H?Z(1,0):Z(31,11);case v:return H?Z(1,ve):Z(0,ve+1);case g:var ye=this.$locale().weekStart||0,Pe=(K<ye?K+7:K)-ye;return Z(H?Ce-Pe:Ce+(6-Pe),ve);case h:case L:return ae(Te+"Hours",0);case a:return ae(Te+"Minutes",1);case u:return ae(Te+"Seconds",2);case o:return ae(Te+"Milliseconds",3);default:return this.clone()}},x.endOf=function(A){return this.startOf(A,!1)},x.$set=function(A,B){var k,H=I.p(A),W="set"+(this.$u?"UTC":""),Z=(k={},k[h]=W+"Date",k[L]=W+"Date",k[v]=W+"Month",k[M]=W+"FullYear",k[a]=W+"Hours",k[u]=W+"Minutes",k[o]=W+"Seconds",k[s]=W+"Milliseconds",k)[H],ae=H===h?this.$D+(B-this.$W):B;if(H===v||H===M){var K=this.clone().set(L,1);K.$d[Z](ae),K.init(),this.$d=K.set(L,Math.min(this.$D,K.daysInMonth())).$d}else Z&&this.$d[Z](ae);return this.init(),this},x.set=function(A,B){return this.clone().$set(A,B)},x.get=function(A){return this[I.p(A)]()},x.add=function(A,B){var k,H=this;A=Number(A);var W=I.p(B),Z=function(ve){var Ce=C(H);return I.w(Ce.date(Ce.date()+Math.round(ve*A)),H)};if(W===v)return this.set(v,this.$M+A);if(W===M)return this.set(M,this.$y+A);if(W===h)return Z(1);if(W===g)return Z(7);var ae=(k={},k[u]=i,k[a]=n,k[o]=t,k)[W]||1,K=this.$d.getTime()+A*ae;return I.w(K,this)},x.subtract=function(A,B){return this.add(-1*A,B)},x.format=function(A){var B=this,k=this.$locale();if(!this.isValid())return k.invalidDate||j;var H=A||"YYYY-MM-DDTHH:mm:ssZ",W=I.z(this),Z=this.$H,ae=this.$m,K=this.$M,ve=k.weekdays,Ce=k.months,Te=function(ce,se,pt,gt){return ce&&(ce[se]||ce(B,H))||pt[se].slice(0,gt)},ye=function(ce){return I.s(Z%12||12,ce,"0")},Pe=k.meridiem||function(ce,se,pt){var gt=ce<12?"AM":"PM";return pt?gt.toLowerCase():gt},Be={YY:String(this.$y).slice(-2),YYYY:I.s(this.$y,4,"0"),M:K+1,MM:I.s(K+1,2,"0"),MMM:Te(k.monthsShort,K,Ce,3),MMMM:Te(Ce,K),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:Te(k.weekdaysMin,this.$W,ve,2),ddd:Te(k.weekdaysShort,this.$W,ve,3),dddd:ve[this.$W],H:String(Z),HH:I.s(Z,2,"0"),h:ye(1),hh:ye(2),a:Pe(Z,ae,!0),A:Pe(Z,ae,!1),m:String(ae),mm:I.s(ae,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:W};return H.replace(te,function(ce,se){return se||Be[ce]||W.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(A,B,k){var H,W=I.p(B),Z=C(A),ae=(Z.utcOffset()-this.utcOffset())*i,K=this-Z,ve=I.m(this,Z);return ve=(H={},H[M]=ve/12,H[v]=ve,H[_]=ve/3,H[g]=(K-ae)/6048e5,H[h]=(K-ae)/864e5,H[a]=K/n,H[u]=K/i,H[o]=K/t,H)[W]||K,k?ve:I.a(ve)},x.daysInMonth=function(){return this.endOf(v).$D},x.$locale=function(){return w[this.$L]},x.locale=function(A,B){if(!A)return this.$L;var k=this.clone(),H=P(A,B,!0);return H&&(k.$L=H),k},x.clone=function(){return I.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},O}(),ee=V.prototype;return C.prototype=ee,[["$ms",s],["$s",o],["$m",u],["$H",a],["$W",h],["$M",v],["$y",M],["$D",L]].forEach(function(O){ee[O[1]]=function(x){return this.$g(x,O[0],O[1])}}),C.extend=function(O,x){return O.$i||(O(x,V,C),O.$i=!0),C},C.locale=P,C.isDayjs=E,C.unix=function(O){return C(1e3*O)},C.en=w[S],C.Ls=w,C.p={},C})})(Ni);var Zs=Ni.exports;const Rt=vr(Zs);class Qs extends st{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=pe` <slot name=${i}></slot> `,s={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:u}=this._renderedTemplates[i];this.contains(u)&&this.removeChild(u)}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}updated(){this.templates=this.getTemplates()}}const eo=(r,e="highlight",t="title")=>{const i=(s,o,u)=>{const a=o.split(".");let h;for(h=0;h<a.length-1;h++)s=s[a[h]];s[a[h]]=u},n=(s,o=[])=>{let u="",a=0;return o.forEach(h=>{const g=h[1]+1;u+=[s.substring(a,h[0]),`<mark class="${e}">`,s.substring(h[0],g),"</mark>"].join(""),a=g}),u+=s.substring(a),u};return r.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const u={...s};return o.forEach(a=>{a.key===t&&i(u,a.key,n(a.value,a.indices))}),u})};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},to={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},xr={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 Se(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 ro(r,e,t){switch(r){case"Point":return Ie(e).geometry;case"LineString":return Le(e).geometry;case"Polygon":return wr(e).geometry;case"MultiPoint":return Bi(e).geometry;case"MultiLineString":return _r(e).geometry;case"MultiPolygon":return Fi(e).geometry;default:throw new Error(r+" is invalid")}}function Ie(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(!Dt(r[0])||!Dt(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Se(i,e,t)}function io(r,e,t){return t===void 0&&(t={}),Xe(r.map(function(i){return Ie(i,e)}),t)}function wr(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 u={type:"Polygon",coordinates:r};return Se(u,e,t)}function no(r,e,t){return t===void 0&&(t={}),Xe(r.map(function(i){return wr(i,e)}),t)}function Le(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 Se(i,e,t)}function so(r,e,t){return t===void 0&&(t={}),Xe(r.map(function(i){return Le(i,e)}),t)}function Xe(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 _r(r,e,t){t===void 0&&(t={});var i={type:"MultiLineString",coordinates:r};return Se(i,e,t)}function Bi(r,e,t){t===void 0&&(t={});var i={type:"MultiPoint",coordinates:r};return Se(i,e,t)}function Fi(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return Se(i,e,t)}function oo(r,e,t){t===void 0&&(t={});var i={type:"GeometryCollection",geometries:r};return Se(i,e,t)}function ao(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 Hi(r,e){e===void 0&&(e="kilometers");var t=$r[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Mr(r,e){e===void 0&&(e="kilometers");var t=$r[e];if(!t)throw new Error(e+" units is invalid");return r/t}function lo(r,e){return Yi(Mr(r,e))}function uo(r){var e=r%360;return e<0&&(e+=360),e}function Yi(r){var e=r%(2*Math.PI);return e*180/Math.PI}function co(r){var e=r%360;return e*Math.PI/180}function ho(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 Hi(Mr(r,e),t)}function fo(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=xr[e];if(!i)throw new Error("invalid original units");var n=xr[t];if(!n)throw new Error("invalid final units");return r/i*n}function Dt(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Er(r){return!!r&&r.constructor===Object}function po(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(!Dt(e))throw new Error("bbox must only contain numbers")})}function go(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 vo=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:xr,bearingToAzimuth:uo,convertArea:fo,convertLength:ho,degreesToRadians:co,earthRadius:$e,factors:$r,feature:Se,featureCollection:Xe,geometry:ro,geometryCollection:oo,isNumber:Dt,isObject:Er,lengthToDegrees:lo,lengthToRadians:Mr,lineString:Le,lineStrings:so,multiLineString:_r,multiPoint:Bi,multiPolygon:Fi,point:Ie,points:io,polygon:wr,polygons:no,radiansToDegrees:Yi,radiansToLength:Hi,round:ao,unitsFactors:to,validateBBox:po,validateId:go},Symbol.toStringTag,{value:"Module"}));function ji(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 ct(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 ht(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=ji(r),n=ht(e),s=n.type,o=e.bbox,u=n.coordinates;if(o&&mo(i,o)===!1)return!1;s==="Polygon"&&(u=[u]);for(var a=!1,h=0;h<u.length&&!a;h++)if(Ui(i,u[h][0],t.ignoreBoundary)){for(var g=!1,v=1;v<u[h].length&&!g;)Ui(i,u[h][v],!t.ignoreBoundary)&&(g=!0),v++;g||(a=!0)}return a}function Ui(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],u=e[n][1],a=e[s][0],h=e[s][1],g=r[1]*(o-a)+u*(a-r[0])+h*(r[0]-o)===0&&(o-r[0])*(a-r[0])<=0&&(u-r[1])*(h-r[1])<=0;if(g)return!t;var v=u>r[1]!=h>r[1]&&r[0]<(a-o)*(r[1]-u)/(h-u)+o;v&&(i=!i)}return i}function mo(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function dt(r,e,t){if(r!==null)for(var i,n,s,o,u,a,h,g=0,v=0,_,M=r.type,L=M==="FeatureCollection",j=M==="Feature",ne=L?r.features.length:1,te=0;te<ne;te++){h=L?r.features[te].geometry:j?r.geometry:r,_=h?h.type==="GeometryCollection":!1,u=_?h.geometries.length:1;for(var f=0;f<u;f++){var p=0,b=0;if(o=_?h.geometries[f]:h,o!==null){a=o.coordinates;var S=o.type;switch(g=t&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){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++,S==="MultiPoint"&&p++}S==="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++}S==="MultiLineString"&&p++,S==="Polygon"&&b++}S==="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(dt(o.geometries[i],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function yo(r,e,t,i){var n=t;return dt(r,function(s,o,u,a,h){o===0&&t===void 0?n=s:n=e(n,s,o,u,a,h)},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 bo(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 It(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 $o(r,e,t){var i=t;return It(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function xo(r){var e=[];return dt(r,function(t){e.push(t)}),e}function Ar(r,e){var t,i,n,s,o,u,a,h,g,v,_=0,M=r.type==="FeatureCollection",L=r.type==="Feature",j=M?r.features.length:1;for(t=0;t<j;t++){for(u=M?r.features[t].geometry:L?r.geometry:r,h=M?r.features[t].properties:L?r.properties:{},g=M?r.features[t].bbox:L?r.bbox:void 0,v=M?r.features[t].id:L?r.id:void 0,a=u?u.type==="GeometryCollection":!1,o=a?u.geometries.length:1,n=0;n<o;n++){if(s=a?u.geometries[n]:u,s===null){if(e(null,_,h,g,v)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,_,h,g,v)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],_,h,g,v)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}_++}}function wo(r,e,t){var i=t;return Ar(r,function(n,s,o,u,a){s===0&&t===void 0?i=n:i=e(i,n,s,o,u,a)}),i}function Ye(r,e){Ar(r,function(t,i,n,s,o){var u=t===null?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return e(Se(t,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(u){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var h=0;h<t.coordinates.length;h++){var g=t.coordinates[h],v={type:a,coordinates:g};if(e(Se(v,n),i,h)===!1)return!1}})}function _o(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 Xi(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 u,a=0,h=0,g=0;if(dt(t,function(v,_,M,L,j){if(u===void 0||i>a||L>h||j>g){u=v,a=i,h=L,g=j,s=0;return}var ne=Le([u,v],t.properties);if(e(ne,i,n,j,s)===!1)return!1;s++,u=v})===!1)return!1}}})}function Mo(r,e,t){var i=t,n=!1;return Xi(r,function(s,o,u,a,h){n===!1&&t===void 0?i=s:i=e(i,s,o,u,a,h),n=!0}),i}function Wi(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 u=0;u<o.length;u++)if(e(Le(o[u],t.properties),i,n,u)===!1)return!1;break}}})}function Eo(r,e,t){var i=t;return Wi(r,function(n,s,o,u){s===0&&t===void 0?i=n:i=e(i,n,s,o,u)}),i}function Ao(r,e){if(e=e||{},!Er(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,u;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,u=r.features[t].geometry;break;case"Feature":o=o||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var a=u.coordinates;switch(u.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),Le([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),Le([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),Le([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),Le([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function So(r,e){if(e=e||{},!Er(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,u;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,u=r.features[t].geometry;break;case"Feature":o=o||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var a=u.coordinates;switch(u.type){case"Point":return Ie(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Ie(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Ie(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Ie(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Ie(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),Ie(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const ko=Object.freeze(Object.defineProperty({__proto__:null,coordAll:xo,coordEach:dt,coordReduce:yo,featureEach:It,featureReduce:$o,findPoint:So,findSegment:Ao,flattenEach:Ye,flattenReduce:_o,geomEach:Ar,geomReduce:wo,lineEach:Wi,lineReduce:Eo,propEach:zi,propReduce:bo,segmentEach:Xi,segmentReduce:Mo},Symbol.toStringTag,{value:"Module"}));function Vi(r){if(!r)throw new Error("geojson is required");var e=[];return Ye(r,function(t){Po(t,e)}),Xe(e)}function Po(r,e){var t=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":t=ct(i);break;case"LineString":t=[ct(i)]}t.forEach(function(n){var s=Oo(n,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function Oo(r,e){var t=[];return r.reduce(function(i,n){var s=Le([i,n],e);return s.bbox=Lo(i,n),t.push(s),n}),t}function Lo(r,e){var t=r[0],i=r[1],n=e[0],s=e[1],o=t<n?t:n,u=i<s?i:s,a=t>n?t:n,h=i>s?i:s;return[o,u,a,h]}var Sr={exports:{}},qi={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ut,function(){function t(f,p,b,S,w){(function E(P,C,I,V,ee){for(;V>I;){if(V-I>600){var O=V-I+1,x=C-I+1,A=Math.log(O),B=.5*Math.exp(2*A/3),k=.5*Math.sqrt(A*B*(O-B)/O)*(x-O/2<0?-1:1),H=Math.max(I,Math.floor(C-x*B/O+k)),W=Math.min(V,Math.floor(C+(O-x)*B/O+k));E(P,C,H,W,ee)}var Z=P[C],ae=I,K=V;for(i(P,I,C),ee(P[V],Z)>0&&i(P,I,V);ae<K;){for(i(P,ae,K),ae++,K--;ee(P[ae],Z)<0;)ae++;for(;ee(P[K],Z)>0;)K--}ee(P[I],Z)===0?i(P,I,K):i(P,++K,V),K<=C&&(I=K+1),C<=K&&(V=K-1)}})(f,p,b||0,S||f.length-1,w||n)}function i(f,p,b){var S=f[p];f[p]=f[b],f[b]=S}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 S=0;S<p.length;S++)if(b(f,p[S]))return S;return-1}function u(f,p){a(f,0,f.children.length,p,f)}function a(f,p,b,S,w){w||(w=ne(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var E=p;E<b;E++){var P=f.children[E];h(w,f.leaf?S(P):P)}return w}function h(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 M(f){return f.maxX-f.minX+(f.maxY-f.minY)}function L(f,p){return f.minX<=p.minX&&f.minY<=p.minY&&p.maxX<=f.maxX&&p.maxY<=f.maxY}function j(f,p){return p.minX<=f.maxX&&p.minY<=f.maxY&&p.maxX>=f.minX&&p.maxY>=f.minY}function ne(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,S,w){for(var E=[p,b];E.length;)if(!((b=E.pop())-(p=E.pop())<=S)){var P=p+Math.ceil((b-p)/S/2)*S;t(f,P,p,b,w),E.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(!j(f,p))return b;for(var S=this.toBBox,w=[];p;){for(var E=0;E<p.children.length;E++){var P=p.children[E],C=p.leaf?S(P):P;j(f,C)&&(p.leaf?b.push(P):L(f,C)?this._all(P,b):w.push(P))}p=w.pop()}return b},s.prototype.collides=function(f){var p=this.data;if(!j(f,p))return!1;for(var b=[];p;){for(var S=0;S<p.children.length;S++){var w=p.children[S],E=p.leaf?this.toBBox(w):w;if(j(f,E)){if(p.leaf||L(f,E))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 S=this.data;this.data=b,b=S}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=ne([]),this},s.prototype.remove=function(f,p){if(!f)return this;for(var b,S,w,E=this.data,P=this.toBBox(f),C=[],I=[];E||C.length;){if(E||(E=C.pop(),S=C[C.length-1],b=I.pop(),w=!0),E.leaf){var V=o(f,E.children,p);if(V!==-1)return E.children.splice(V,1),C.push(E),this._condense(C),this}w||E.leaf||!L(E,P)?S?(b++,E=S.children[b],w=!1):E=null:(C.push(E),I.push(b),b=0,S=E,E=E.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,S){var w,E=b-p+1,P=this._maxEntries;if(E<=P)return u(w=ne(f.slice(p,b+1)),this.toBBox),w;S||(S=Math.ceil(Math.log(E)/Math.log(P)),P=Math.ceil(E/Math.pow(P,S-1))),(w=ne([])).leaf=!1,w.height=S;var C=Math.ceil(E/P),I=C*Math.ceil(Math.sqrt(P));te(f,p,b,I,this.compareMinX);for(var V=p;V<=b;V+=I){var ee=Math.min(V+I-1,b);te(f,V,ee,C,this.compareMinY);for(var O=V;O<=ee;O+=C){var x=Math.min(O+C-1,ee);w.children.push(this._build(f,O,x,S-1))}}return u(w,this.toBBox),w},s.prototype._chooseSubtree=function(f,p,b,S){for(;S.push(p),!p.leaf&&S.length-1!==b;){for(var w=1/0,E=1/0,P=void 0,C=0;C<p.children.length;C++){var I=p.children[C],V=_(I),ee=(O=f,x=I,(Math.max(x.maxX,O.maxX)-Math.min(x.minX,O.minX))*(Math.max(x.maxY,O.maxY)-Math.min(x.minY,O.minY))-V);ee<E?(E=ee,w=V<w?V:w,P=I):ee===E&&V<w&&(w=V,P=I)}p=P||p.children[0]}var O,x;return p},s.prototype._insert=function(f,p,b){var S=b?f:this.toBBox(f),w=[],E=this._chooseSubtree(S,this.data,p,w);for(E.children.push(f),h(E,S);p>=0&&w[p].children.length>this._maxEntries;)this._split(w,p),p--;this._adjustParentBBoxes(S,w,p)},s.prototype._split=function(f,p){var b=f[p],S=b.children.length,w=this._minEntries;this._chooseSplitAxis(b,w,S);var E=this._chooseSplitIndex(b,w,S),P=ne(b.children.splice(E,b.children.length-E));P.height=b.height,P.leaf=b.leaf,u(b,this.toBBox),u(P,this.toBBox),p?f[p-1].children.push(P):this._splitRoot(b,P)},s.prototype._splitRoot=function(f,p){this.data=ne([f,p]),this.data.height=f.height+1,this.data.leaf=!1,u(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(f,p,b){for(var S,w,E,P,C,I,V,ee=1/0,O=1/0,x=p;x<=b-p;x++){var A=a(f,0,x,this.toBBox),B=a(f,x,b,this.toBBox),k=(w=A,E=B,P=void 0,C=void 0,I=void 0,V=void 0,P=Math.max(w.minX,E.minX),C=Math.max(w.minY,E.minY),I=Math.min(w.maxX,E.maxX),V=Math.min(w.maxY,E.maxY),Math.max(0,I-P)*Math.max(0,V-C)),H=_(A)+_(B);k<ee?(ee=k,S=x,O=H<O?H:O):k===ee&&H<O&&(O=H,S=x)}return S||b-p},s.prototype._chooseSplitAxis=function(f,p,b){var S=f.leaf?this.compareMinX:g,w=f.leaf?this.compareMinY:v;this._allDistMargin(f,p,b,S)<this._allDistMargin(f,p,b,w)&&f.children.sort(S)},s.prototype._allDistMargin=function(f,p,b,S){f.children.sort(S);for(var w=this.toBBox,E=a(f,0,p,w),P=a(f,b-p,b,w),C=M(E)+M(P),I=p;I<b-p;I++){var V=f.children[I];h(E,f.leaf?w(V):V),C+=M(E)}for(var ee=b-p-1;ee>=p;ee--){var O=f.children[ee];h(P,f.leaf?w(O):O),C+=M(P)}return C},s.prototype._adjustParentBBoxes=function(f,p,b){for(var S=b;S>=0;S--)h(p[S],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():u(f[p],this.toBBox)},s})})(qi);var Co=qi.exports;const To=mr(vo),Ro=mr(ko);function Qe(r){var e=[1/0,1/0,-1/0,-1/0];return dt(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}Qe.default=Qe;const Do=mr(Object.freeze(Object.defineProperty({__proto__:null,default:Qe},Symbol.toStringTag,{value:"Module"})));var Ne=Co,Gi=To,Ki=Ro,ft=Do.default,Io=Ki.featureEach;Ki.coordEach,Gi.polygon;var Ji=Gi.featureCollection;function Zi(r){var e=new Ne(r);return e.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:ft(t),Ne.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:ft(n),i.push(n)}):Io(t,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:ft(n),i.push(n)}),Ne.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:ft(t),Ne.prototype.remove.call(this,t,i)},e.clear=function(){return Ne.prototype.clear.call(this)},e.search=function(t){var i=Ne.prototype.search.call(this,this.toBBox(t));return Ji(i)},e.collides=function(t){return Ne.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=Ne.prototype.all.call(this);return Ji(t)},e.toJSON=function(){return Ne.prototype.toJSON.call(this)},e.fromJSON=function(t){return Ne.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=ft(t);else if(t.type==="FeatureCollection")i=ft(t);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}Sr.exports=Zi,Sr.exports.default=Zi;var No=Sr.exports;const Bo=vr(No);function kr(r,e){var t={},i=[];if(r.type==="LineString"&&(r=Se(r)),e.type==="LineString"&&(e=Se(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=Qi(r,e);return n&&i.push(n),Xe(i)}var s=Bo();return s.load(Vi(e)),It(Vi(r),function(o){It(s.search(o),function(u){var a=Qi(o,u);if(a){var h=ct(a).join(",");t[h]||(t[h]=!0,i.push(a))}})}),Xe(i)}function Qi(r,e){var t=ct(r),i=ct(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],u=t[1][1],a=i[0][0],h=i[0][1],g=i[1][0],v=i[1][1],_=(v-h)*(o-n)-(g-a)*(u-s),M=(g-a)*(s-h)-(v-h)*(n-a),L=(o-n)*(s-h)-(u-s)*(n-a);if(_===0)return null;var j=M/_,ne=L/_;if(j>=0&&j<=1&&ne>=0&&ne<=1){var te=n+j*(o-n),f=s+j*(u-s);return Ie([te,f])}return null}function Pr(r,e){e===void 0&&(e={});var t=ht(r);switch(!e.properties&&r.type==="Feature"&&(e.properties=r.properties),t.type){case"Polygon":return Fo(t,e);case"MultiPolygon":return Ho(t,e);default:throw new Error("invalid poly")}}function Fo(r,e){e===void 0&&(e={});var t=ht(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{};return en(i,n)}function Ho(r,e){e===void 0&&(e={});var t=ht(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{},s=[];return i.forEach(function(o){s.push(en(o,n))}),Xe(s)}function en(r,e){return r.length>1?_r(r,e):Le(r[0],e)}function Yo(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!Wo(r.coordinates,e.coordinates);case"LineString":return!tn(e,r);case"Polygon":return!ke(r,e)}break;case"LineString":switch(e.type){case"Point":return!tn(r,e);case"LineString":return!Uo(r,e);case"Polygon":return!rn(e,r)}break;case"Polygon":switch(e.type){case"Point":return!ke(e,r);case"LineString":return!rn(r,e);case"Polygon":return!zo(e,r)}}return!1}function tn(r,e){for(var t=0;t<r.coordinates.length-1;t++)if(Xo(r.coordinates[t],r.coordinates[t+1],e.coordinates))return!0;return!1}function Uo(r,e){var t=kr(r,e);return t.features.length>0}function rn(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=kr(e,Pr(r));return s.features.length>0}function zo(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 u=o[s];if(ke(u,r))return!0}var a=kr(Pr(r),Pr(e));return a.features.length>0}function Xo(r,e,t){var i=t[0]-r[0],n=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],u=i*o-n*s;return u!==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 Wo(r,e){return r[0]===e[0]&&r[1]===e[1]}function Vo(r,e){var t=!1;return Ye(r,function(i){Ye(e,function(n){if(t===!0)return!0;t=!Yo(i.geometry,n.geometry)})}),t}function Nt(r,e,t){t===void 0&&(t={});for(var i=ji(r),n=ct(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")),qo(n[s],n[s+1],i,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function qo(r,e,t,i,n){var s=t[0],o=t[1],u=r[0],a=r[1],h=e[0],g=e[1],v=t[0]-u,_=t[1]-a,M=h-u,L=g-a,j=v*L-_*M;if(n!==null){if(Math.abs(j)>n)return!1}else if(j!==0)return!1;if(i){if(i==="start")return Math.abs(M)>=Math.abs(L)?M>0?u<s&&s<=h:h<=s&&s<u:L>0?a<o&&o<=g:g<=o&&o<a;if(i==="end")return Math.abs(M)>=Math.abs(L)?M>0?u<=s&&s<h:h<s&&s<=u:L>0?a<=o&&o<g:g<o&&o<=a;if(i==="both")return Math.abs(M)>=Math.abs(L)?M>0?u<s&&s<h:h<s&&s<u:L>0?a<o&&o<g:g<o&&o<a}else return Math.abs(M)>=Math.abs(L)?M>0?u<=s&&s<=h:h<=s&&s<=u:L>0?a<=o&&o<=g:g<=o&&o<=a;return!1}function Go(r,e){var t=ht(r),i=ht(e),n=t.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return Ko(t,i);case"LineString":return Nt(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 Jo(t,i);case"LineString":return Zo(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 ea(t,i);case"Polygon":case"MultiPolygon":return ta(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return ra(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function Ko(r,e){var t,i=!1;for(t=0;t<e.coordinates.length;t++)if(sn(e.coordinates[t],r.coordinates)){i=!0;break}return i}function Jo(r,e){for(var t=0;t<r.coordinates.length;t++){for(var i=!1,n=0;n<e.coordinates.length;n++)sn(r.coordinates[t],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function Zo(r,e){for(var t=!1,i=0;i<r.coordinates.length;i++){if(!Nt(r.coordinates[i],e))return!1;t||(t=Nt(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=ke(r.coordinates[1],e),!i){t=!1;break}i=ke(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&i}function ea(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Nt(r.coordinates[t],e))return!1;return!0}function ta(r,e){var t=Qe(e),i=Qe(r);if(!nn(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=ia(r.coordinates[s],r.coordinates[s+1]);n=ke(o,e,{ignoreBoundary:!0})}}return n}function ra(r,e){var t=Qe(r),i=Qe(e);if(!nn(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 nn(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function sn(r,e){return r[0]===e[0]&&r[1]===e[1]}function ia(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}var na=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,on=(r,e,t,i)=>{for(var n=i>1?void 0:i?sa(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&&na(e,t,n),n};const oa=(r,e)=>e?Vo(r,e):!0,aa=(r,e)=>e?Go(r,e):!0;let Or=class extends st{render(){return pe`
52
52
  <eox-map
53
53
  style="height: 400px"
54
54
  layers='[
@@ -63,7 +63,7 @@
63
63
  }
64
64
  ]'
65
65
  ></eox-map>
66
- `}firstUpdated(){this.setup()}setup(){this.eoxMap=this.renderRoot.querySelector("eox-map"),this.eoxMap.addDraw("draw",{id:"drawInteraction",type:"Polygon"});const r=e=>{let t=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:e.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(t)};this.eoxMap.interactions.drawInteraction.on("drawend",e=>{r(e.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",e=>{r(e.features.getArray()[0])})}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())}};on([_t()],Or.prototype,"eoxMap",2),Or=on([bi("eox-itemfilter-spatial-filter")],Or);const la=`
66
+ `}firstUpdated(){this.setup()}setup(){this.eoxMap=this.renderRoot.querySelector("eox-map"),this.eoxMap.addDraw("draw",{id:"drawInteraction",type:"Polygon"});const r=e=>{let t=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:e.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(t)};this.eoxMap.interactions.drawInteraction.on("drawend",e=>{r(e.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",e=>{r(e.features.getArray()[0])})}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())}};on([Mt()],Or.prototype,"eoxMap",2),Or=on([bi("eox-itemfilter-spatial-filter")],Or);const la=`
67
67
  :host {
68
68
  display: flex;
69
69
  box-sizing: border-box;
@@ -327,13 +327,13 @@ section.inline details.details-filter summary {
327
327
  overflow-x: hidden;
328
328
  overflow-y: auto;
329
329
  }
330
- `;var ca=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,We=(r,e,t,i)=>{for(var n=i>1?void 0:i?ha(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&&ca(e,t,n),n};class an{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.enableSearch=!1,this.exclusiveFilters=!1,this.filterProperties=[],this.fuseConfig={keys:["title"]},this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onSearch=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title"}}we.EOxItemFilter=class extends Qs{constructor(){super(...arguments),this._resultAggregation=[],this._items=[],this._filters={},this._config=new an,this.apply=e=>{this._items=e.map((t,i)=>({id:`item-${i}`,...t})),this._fuse=new at(this._items,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...this._config.fuseConfig}),this._config.filterProperties.length&&this._config.filterProperties.forEach(t=>{const i={},n=s=>t.format==="date"?Rt(s).unix():parseInt(s);this._items.forEach(s=>{if(t.type==="range"){if(Array.isArray(s[t.key])){const o=[n(s[t.key][0]),n(s[t.key][1])];i.min=i.min!==void 0?Math.min(i.min,o[0]):o[0],i.max=i.max!==void 0?Math.max(i.max,o[1]):o[1]}else{const o=n(s[t.key]);i.min=i.min!==void 0?Math.min(i.min,o):o,i.max=i.max!==void 0?Math.max(i.max,o):o}return}Array.isArray(s[t.key])?s[t.key].forEach(o=>{i[o]=void 0}):i[s[t.key]]=void 0}),this._filters[t.key]={type:t.type||"string",keys:i,...t.type==="range"&&{min:i.min,max:i.max,format:t.format},...t.type==="spatial"&&{mode:t.mode}}}),this._config.matchAllWhenEmpty!==!1&&(this._results=this.sortResults(this._items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((t,i)=>t.concat(i[this._config.aggregateResults]),[]))].sort((t,i)=>t.localeCompare(i)))},this.inputHandler=()=>{this.search(this.renderRoot.querySelector("input[type='text']").value)},this.debouncedInputHandler=Js(this.inputHandler,500,{leading:!0})}set config(e){const t=this._config;this._config={...new an,...e},this.requestUpdate("config",t)}get config(){return this._config}async search(e="",t=this._filters){const i=Object.entries(t).filter(([u,a])=>a.type==="string").reduce((u,[a,h])=>{const g="$or",v=[],_=M=>{const L={};L[a]=`="${M}"`,v.push(L)};return Object.entries(h.keys).filter(([M,L])=>L).forEach(([M,L])=>_(M)),v.length>0&&u.push({[g]:v}),u},[]);let n;if(!(e.length>0)&&!i.length&&this._config.matchAllWhenEmpty!==!1)n=this._items;else if(this.config.externalSearch)n=(await(await fetch(`${this.config.externalSearch(e,t)}`)).json()).features;else{const u={$and:[...e.length>0?[{$or:[...this._config.fuseConfig.keys.map(h=>({[h]:e}))]}]:[],...i]},a=this._fuse.search(u);n=this._config.enableHighlighting?eo(a,"highlight",this._config.titleProperty):a.map(h=>h.item)}const s=Object.entries(this._filters).filter(([u,a])=>a.type==="range").reduce((u,[a,h])=>(u[a]={min:h.keys.min,max:h.keys.max,format:h.format},u),{});if(Object.keys(s).length>0){const u=[];for(let a=0;a<n.length;a++){const h={};for(let[g,v]of Object.entries(s)){const _=M=>v.format==="date"?Rt(M).unix():M;n[a].hasOwnProperty(g)?Array.isArray(n[a][g])?h[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?h[g]=!0:h[g]=!1:h[g]=!0}Object.values(h).every(g=>!!g)&&u.push(n[a])}n=[...u]}const o=Object.entries(this._filters).filter(([u,a])=>a.type==="spatial").reduce((u,[a,h])=>(u[a]={geometry:h.geometry,mode:h.mode},u),{});if(Object.keys(o).length>0){const u=[];for(let a=0;a<n.length;a++){const h={};for(let g of Object.keys(o)){const v=o[g].mode||"within";n[a].hasOwnProperty(g)&&(v==="within"?aa(n[a][g],o[g].geometry):oa(n[a][g],o[g].geometry))?h[g]=!0:h[g]=!1}Object.values(h).every(g=>!!g)&&u.push(n[a])}n=[...u]}this._results=this.sortResults(n),this._config.onSearch(n),this.requestUpdate()}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(u=>this._filters[this._config.aggregateResults].keys[u])),(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]))}toggleFilter(e,t,i){i&&Object.keys(this._filters).filter(o=>this._filters[o].type==="string").forEach(o=>{this._config.filterProperties.find(u=>u.key===o).exclusive&&Object.keys(this._filters[o].keys).forEach(u=>{this._filters[o].keys[u]=!1})}),this._filters[e].keys[t]=!this._filters[e].keys[t];const n=this.renderRoot.querySelector('input[type="text"]');n?this.search(n.value):this.search();const s=this.renderRoot.querySelectorAll("ul#results input[type='radio']");for(let o=0;o<s.length;o++)s[o].checked=!1;this._selectedResult&&setTimeout(()=>{const o=this.renderRoot.querySelector(`#${this._selectedResult.id}`);o&&(o.checked=!0,this.requestUpdate())})}resetFilters(){this.renderRoot.querySelectorAll(".details-filter input").forEach(t=>{t.checked=!1});const e=this.renderRoot.querySelector('input[type="text"]');e&&(e.value=""),Object.keys(this._filters).forEach(t=>{if(this._filters[t].type==="range"){this._filters[t].keys.min=this._filters[t].min,this._filters[t].keys.max=this._filters[t].max;return}if(this._filters[t].type==="spatial"){this._filters[t].geometry=void 0,this.renderRoot.querySelector("eox-itemfilter-spatial-filter").reset();return}Object.keys(this._filters[t].keys).forEach(i=>{this._filters[t].keys[i]=!1})}),this.search(),this.requestUpdate()}render(){return ge`
330
+ `;var ca=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,We=(r,e,t,i)=>{for(var n=i>1?void 0:i?ha(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&&ca(e,t,n),n};class an{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.enableSearch=!1,this.exclusiveFilters=!1,this.filterProperties=[],this.fuseConfig={keys:["title"]},this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onSearch=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title"}}we.EOxItemFilter=class extends Qs{constructor(){super(...arguments),this._resultAggregation=[],this._items=[],this._filters={},this._config=new an,this.apply=e=>{this._items=e.map((t,i)=>({id:`item-${i}`,...t})),this._fuse=new lt(this._items,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...this._config.fuseConfig}),this._config.filterProperties.length&&this._config.filterProperties.forEach(t=>{const i={},n=s=>t.format==="date"?Rt(s).unix():parseInt(s);this._items.forEach(s=>{if(t.type==="range"){if(Array.isArray(s[t.key])){const o=[n(s[t.key][0]),n(s[t.key][1])];i.min=i.min!==void 0?Math.min(i.min,o[0]):o[0],i.max=i.max!==void 0?Math.max(i.max,o[1]):o[1]}else{const o=n(s[t.key]);i.min=i.min!==void 0?Math.min(i.min,o):o,i.max=i.max!==void 0?Math.max(i.max,o):o}return}Array.isArray(s[t.key])?s[t.key].forEach(o=>{i[o]=void 0}):i[s[t.key]]=void 0}),this._filters[t.key]={type:t.type||"string",keys:i,...t.type==="range"&&{min:i.min,max:i.max,format:t.format},...t.type==="spatial"&&{mode:t.mode||"intersects"}}}),this._config.matchAllWhenEmpty!==!1&&(this._results=this.sortResults(this._items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((t,i)=>t.concat(i[this._config.aggregateResults]),[]))].sort((t,i)=>t.localeCompare(i)))},this.inputHandler=()=>{this.search(this.renderRoot.querySelector("input[type='text']").value)},this.debouncedInputHandler=Js(this.inputHandler,500,{leading:!0})}set config(e){const t=this._config;this._config={...new an,...e},this.requestUpdate("config",t)}get config(){return this._config}async search(e="",t=this._filters){const i=Object.entries(t).filter(([u,a])=>a.type==="string").reduce((u,[a,h])=>{const g="$or",v=[],_=M=>{const L={};L[a]=`="${M}"`,v.push(L)};return Object.entries(h.keys).filter(([M,L])=>L).forEach(([M,L])=>_(M)),v.length>0&&u.push({[g]:v}),u},[]);let n;if(!(e.length>0)&&!i.length&&this._config.matchAllWhenEmpty!==!1)n=this._items;else if(this.config.externalSearch)n=(await(await fetch(`${this.config.externalSearch(e,t)}`)).json()).features;else{const u={$and:[...e.length>0?[{$or:[...this._config.fuseConfig.keys.map(h=>({[h]:e}))]}]:[],...i]},a=this._fuse.search(u);n=this._config.enableHighlighting?eo(a,"highlight",this._config.titleProperty):a.map(h=>h.item)}const s=Object.entries(this._filters).filter(([u,a])=>a.type==="range").reduce((u,[a,h])=>(u[a]={min:h.keys.min,max:h.keys.max,format:h.format},u),{});if(Object.keys(s).length>0){const u=[];for(let a=0;a<n.length;a++){const h={};for(let[g,v]of Object.entries(s)){const _=M=>v.format==="date"?Rt(M).unix():M;n[a].hasOwnProperty(g)?Array.isArray(n[a][g])?h[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?h[g]=!0:h[g]=!1:h[g]=!0}Object.values(h).every(g=>!!g)&&u.push(n[a])}n=[...u]}const o=Object.entries(this._filters).filter(([u,a])=>a.type==="spatial").reduce((u,[a,h])=>(u[a]={geometry:h.geometry,mode:h.mode},u),{});if(Object.values(o).map(u=>u.geometry).filter(u=>!!u).length>0){const u=[];for(let a=0;a<n.length;a++){const h={};for(let g of Object.keys(o)){const v=o[g].mode||"within";n[a].hasOwnProperty(g)&&(v==="within"?aa(n[a][g],o[g].geometry):oa(n[a][g],o[g].geometry))?h[g]=!0:h[g]=!1}Object.values(h).every(g=>!!g)&&u.push(n[a])}n=[...u]}this._results=this.sortResults(n),this._config.onSearch(n),this.requestUpdate()}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(u=>this._filters[this._config.aggregateResults].keys[u])),(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]))}toggleFilter(e,t,i){i&&Object.keys(this._filters).filter(o=>this._filters[o].type==="string").forEach(o=>{this._config.filterProperties.find(u=>u.key===o).exclusive&&Object.keys(this._filters[o].keys).forEach(u=>{this._filters[o].keys[u]=!1})}),this._filters[e].keys[t]=!this._filters[e].keys[t];const n=this.renderRoot.querySelector('input[type="text"]');n?this.search(n.value):this.search();const s=this.renderRoot.querySelectorAll("ul#results input[type='radio']");for(let o=0;o<s.length;o++)s[o].checked=!1;this._selectedResult&&setTimeout(()=>{const o=this.renderRoot.querySelector(`#${this._selectedResult.id}`);o&&(o.checked=!0,this.requestUpdate())})}resetFilters(){this.renderRoot.querySelectorAll(".details-filter input").forEach(t=>{t.checked=!1});const e=this.renderRoot.querySelector('input[type="text"]');e&&(e.value=""),Object.keys(this._filters).forEach(t=>{if(this._filters[t].type==="range"){this._filters[t].keys.min=this._filters[t].min,this._filters[t].keys.max=this._filters[t].max;return}if(this._filters[t].type==="spatial"){this._filters[t].geometry=void 0,this.renderRoot.querySelector("eox-itemfilter-spatial-filter").reset();return}Object.keys(this._filters[t].keys).forEach(i=>{this._filters[t].keys[i]=!1})}),this.search(),this.requestUpdate()}render(){return pe`
331
331
  <style>
332
332
  ${la}
333
333
  ${!this.unstyled&&ua}
334
334
  </style>
335
335
  <form @submit="${e=>e.preventDefault()}">
336
- ${ot(this._config.enableSearch,()=>ge`
336
+ ${ot(this._config.enableSearch,()=>pe`
337
337
  <section>
338
338
  <input
339
339
  type="text"
@@ -344,11 +344,11 @@ section.inline details.details-filter summary {
344
344
  />
345
345
  </section>
346
346
  `)}
347
- ${ot(this._config.filterProperties.length,()=>ge`
347
+ ${ot(this._config.filterProperties.length,()=>pe`
348
348
  <section class="${this.config.inlineMode?"inline":ue}">
349
- ${ot(!this.config.inlineMode,()=>ge` <slot name="filterstitle"></slot> `)}
349
+ ${ot(!this.config.inlineMode,()=>pe` <slot name="filterstitle"></slot> `)}
350
350
  <ul id="filters">
351
- ${Mt(this._config.filterProperties,e=>ge`
351
+ ${at(this._config.filterProperties,e=>pe`
352
352
  <details
353
353
  class="details-filter"
354
354
  part="details-filter"
@@ -364,7 +364,7 @@ section.inline details.details-filter summary {
364
364
  </span>
365
365
  </summary>
366
366
  <div class="scroll">
367
- ${e.type==="range"?ge`
367
+ ${e.type==="range"?pe`
368
368
  <div>
369
369
  ${e.format==="date"?Rt.unix(this._filters[e.key].keys.min):this._filters[e.key].keys.min}
370
370
  </div>
@@ -379,13 +379,27 @@ section.inline details.details-filter summary {
379
379
  <div>
380
380
  ${e.format==="date"?Rt.unix(this._filters[e.key].keys.max):this._filters[e.key].keys.max}
381
381
  </div>
382
- `:e.type==="spatial"?ge`
382
+ `:e.type==="spatial"?pe`
383
+ <form style="display: inline">
384
+ ${at(["intersects","within"],t=>pe`
385
+ <label>
386
+ <input
387
+ type="radio"
388
+ name="mode"
389
+ .checked="${this._filters[e.key].mode===t}"
390
+ value="${t}"
391
+ @click="${()=>{this._filters[e.key].mode=t,this.requestUpdate(),this.search(this.renderRoot.querySelector("input[type='text']").value)}}"
392
+ />
393
+ <small>${t} filter geometry</small>
394
+ </label>
395
+ `)}
396
+ </form>
383
397
  <eox-itemfilter-spatial-filter
384
398
  @filter="${t=>{Object.entries(this._filters).filter(([,i])=>i.type==="spatial").forEach(([i])=>{this._filters[i].geometry=t.detail.geometry}),this.search(this.renderRoot.querySelector("input[type='text']").value)}}"
385
399
  ></eox-itemfilter-spatial>
386
- `:ge`
400
+ `:pe`
387
401
  <ul>
388
- ${this._filters[e.key]?Mt(Object.keys(this._filters[e.key].keys).sort((t,i)=>t.localeCompare(i)),t=>ge`
402
+ ${this._filters[e.key]?at(Object.keys(this._filters[e.key].keys).sort((t,i)=>t.localeCompare(i)),t=>pe`
389
403
  <li>
390
404
  <label>
391
405
  <input
@@ -404,7 +418,7 @@ section.inline details.details-filter summary {
404
418
  </details>
405
419
  `)}
406
420
  </ul>
407
- ${ot(this._config.filterProperties,()=>ge`
421
+ ${ot(this._config.filterProperties,()=>pe`
408
422
  <a
409
423
  id="filter-reset"
410
424
  data-cy="filter-reset"
@@ -414,15 +428,15 @@ section.inline details.details-filter summary {
414
428
  `)}
415
429
  </section>
416
430
  `)}
417
- ${ot(this.config.showResults&&this._results,()=>ge`
431
+ ${ot(this.config.showResults&&this._results,()=>pe`
418
432
  <section id="section-results">
419
433
  <div>
420
434
  <slot name="resultstitle"></slot>
421
435
  </div>
422
436
  <div id="container-results" class="scroll">
423
- ${this._results.length<1?ge` <small class="no-results">No matching items</small> `:ue}
437
+ ${this._results.length<1?pe` <small class="no-results">No matching items</small> `:ue}
424
438
  <ul id="results" part="results">
425
- ${this._config.aggregateResults?Mt(this._resultAggregation.filter(e=>this.aggregateResults(this._results,e).length),e=>ge`<details
439
+ ${this._config.aggregateResults?at(this._resultAggregation.filter(e=>this.aggregateResults(this._results,e).length),e=>pe`<details
426
440
  id="details-results"
427
441
  open
428
442
  >
@@ -435,7 +449,7 @@ section.inline details.details-filter summary {
435
449
  </span>
436
450
  </summary>
437
451
  <ul>
438
- ${Mt(this.aggregateResults(this._results,e),t=>ge`
452
+ ${at(this.aggregateResults(this._results,e),t=>pe`
439
453
  <li>
440
454
  <label>
441
455
  <input
@@ -444,7 +458,7 @@ section.inline details.details-filter summary {
444
458
  id="${t.id}"
445
459
  @click=${()=>{this._selectedResult=t,this._config.onSelect(t)}}
446
460
  />
447
- ${ot(this.hasTemplate("result"),()=>this.renderTemplate("result",t,`result-${t.id}`),()=>ge`
461
+ ${ot(this.hasTemplate("result"),()=>this.renderTemplate("result",t,`result-${t.id}`),()=>pe`
448
462
  <span class="title"
449
463
  >${$i(t[this._config.titleProperty])}</span
450
464
  >
@@ -453,7 +467,7 @@ section.inline details.details-filter summary {
453
467
  </li>
454
468
  `)}
455
469
  </ul>
456
- </details>`):Mt(this._results,e=>ge`<li part="result">
470
+ </details>`):at(this._results,e=>pe`<li part="result">
457
471
  ${$i(e[this._config.titleProperty])}
458
472
  </li>`)}
459
473
  </ul>
@@ -461,4 +475,4 @@ section.inline details.details-filter summary {
461
475
  </section>
462
476
  `)}
463
477
  </form>
464
- `}},We([_t()],we.EOxItemFilter.prototype,"_items",2),We([_t()],we.EOxItemFilter.prototype,"_results",2),We([_t()],we.EOxItemFilter.prototype,"_filters",2),We([_t()],we.EOxItemFilter.prototype,"_selectedResult",2),We([Lt({attribute:!1})],we.EOxItemFilter.prototype,"config",1),We([Lt()],we.EOxItemFilter.prototype,"apply",2),We([Lt({type:Boolean})],we.EOxItemFilter.prototype,"unstyled",2),we.EOxItemFilter=We([bi("eox-itemfilter")],we.EOxItemFilter),Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})});
478
+ `}},We([Mt()],we.EOxItemFilter.prototype,"_items",2),We([Mt()],we.EOxItemFilter.prototype,"_results",2),We([Mt()],we.EOxItemFilter.prototype,"_filters",2),We([Mt()],we.EOxItemFilter.prototype,"_selectedResult",2),We([Lt({attribute:!1})],we.EOxItemFilter.prototype,"config",1),We([Lt()],we.EOxItemFilter.prototype,"apply",2),We([Lt({type:Boolean})],we.EOxItemFilter.prototype,"unstyled",2),we.EOxItemFilter=We([bi("eox-itemfilter")],we.EOxItemFilter),Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})});