@eox/itemfilter 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-itemfilter.js +680 -667
- package/dist/eox-itemfilter.umd.cjs +87 -79
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const zt=globalThis,cr=zt.trustedTypes,sn=cr?cr.createPolicy("lit-html",{createHTML:t=>t}):void 0,Hr="$lit$",Je=`lit$${(Math.random()+"").slice(9)}$`,qr="?"+Je,go=`<${qr}>`,pt=document,Yt=()=>pt.createComment(""),Wt=t=>t===null||typeof t!="object"&&typeof t!="function",on=Array.isArray,ln=t=>on(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Ur=`[
|
|
14
14
|
\f\r]`,Xt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,an=/-->/g,cn=/>/g,gt=RegExp(`>|${Ur}(?:([^\\s"'>=/]+)(${Ur}*=${Ur}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),un=/'/g,hn=/"/g,dn=/^(?:script|style|textarea|title)$/i,mo=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),un=/'/g,hn=/"/g,dn=/^(?:script|style|textarea|title)$/i,mo=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),U=mo(1),lt=Symbol.for("lit-noChange"),se=Symbol.for("lit-nothing"),fn=new WeakMap,mt=pt.createTreeWalker(pt,129);function pn(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return sn!==void 0?sn.createHTML(e):e}const gn=(t,e)=>{const r=t.length-1,i=[];let n,s=e===2?"<svg>":"",o=Xt;for(let l=0;l<r;l++){const a=t[l];let c,f,p=-1,b=0;for(;b<a.length&&(o.lastIndex=b,f=o.exec(a),f!==null);)b=o.lastIndex,o===Xt?f[1]==="!--"?o=an:f[1]!==void 0?o=cn:f[2]!==void 0?(dn.test(f[2])&&(n=RegExp("</"+f[2],"g")),o=gt):f[3]!==void 0&&(o=gt):o===gt?f[0]===">"?(o=n??Xt,p=-1):f[1]===void 0?p=-2:(p=o.lastIndex-f[2].length,c=f[1],o=f[3]===void 0?gt:f[3]==='"'?hn:un):o===hn||o===un?o=gt:o===an||o===cn?o=Xt:(o=gt,n=void 0);const y=o===gt&&t[l+1].startsWith("/>")?" ":"";s+=o===Xt?a+go:p>=0?(i.push(c),a.slice(0,p)+Hr+a.slice(p)+Je+y):a+Je+(p===-2?l:y)}return[pn(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]};class Vt{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,o=0;const l=e.length-1,a=this.parts,[c,f]=gn(e,r);if(this.el=Vt.createElement(c,i),mt.currentNode=this.el.content,r===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=mt.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(const p of n.getAttributeNames())if(p.endsWith(Hr)){const b=f[o++],y=n.getAttribute(p).split(Je),E=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:E[2],strings:y,ctor:E[1]==="."?yn:E[1]==="?"?vn:E[1]==="@"?bn:Kt}),n.removeAttribute(p)}else p.startsWith(Je)&&(a.push({type:6,index:s}),n.removeAttribute(p));if(dn.test(n.tagName)){const p=n.textContent.split(Je),b=p.length-1;if(b>0){n.textContent=cr?cr.emptyScript:"";for(let y=0;y<b;y++)n.append(p[y],Yt()),mt.nextNode(),a.push({type:2,index:++s});n.append(p[b],Yt())}}}else if(n.nodeType===8)if(n.data===qr)a.push({type:2,index:s});else{let p=-1;for(;(p=n.data.indexOf(Je,p+1))!==-1;)a.push({type:7,index:s}),p+=Je.length-1}s++}}static createElement(e,r){const i=pt.createElement("template");return i.innerHTML=e,i}}function yt(t,e,r=t,i){var o,l;if(e===lt)return e;let n=i!==void 0?(o=r._$Co)==null?void 0:o[i]:r._$Cl;const s=Wt(e)?void 0:e._$litDirective$;return(n==null?void 0:n.constructor)!==s&&((l=n==null?void 0:n._$AO)==null||l.call(n,!1),s===void 0?n=void 0:(n=new s(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??(r._$Co=[]))[i]=n:r._$Cl=n),n!==void 0&&(e=yt(t,n._$AS(t,e.values),n,i)),e}class mn{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:r},parts:i}=this._$AD,n=((e==null?void 0:e.creationScope)??pt).importNode(r,!0);mt.currentNode=n;let s=mt.nextNode(),o=0,l=0,a=i[0];for(;a!==void 0;){if(o===a.index){let c;a.type===2?c=new Mt(s,s.nextSibling,this,e):a.type===1?c=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(c=new xn(s,this,e)),this._$AV.push(c),a=i[++l]}o!==(a==null?void 0:a.index)&&(s=mt.nextNode(),o++)}return mt.currentNode=pt,n}p(e){let r=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}}class Mt{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=se,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=yt(this,e,r),Wt(e)?e===se||e==null||e===""?(this._$AH!==se&&this._$AR(),this._$AH=se):e!==this._$AH&&e!==lt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ln(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==se&&Wt(this._$AH)?this._$AA.nextSibling.data=e:this.T(pt.createTextNode(e)),this._$AH=e}$(e){var s;const{values:r,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Vt.createElement(pn(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===n)this._$AH.p(r);else{const o=new mn(n,this),l=o.u(this.options);o.p(r),this.T(l),this._$AH=o}}_$AC(e){let r=fn.get(e.strings);return r===void 0&&fn.set(e.strings,r=new Vt(e)),r}k(e){on(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let i,n=0;for(const s of e)n===r.length?r.push(i=new Mt(this.S(Yt()),this.S(Yt()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,r);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var r;this._$AM===void 0&&(this._$Cv=e,(r=this._$AP)==null||r.call(this,e))}}class Kt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,s){this.type=1,this._$AH=se,this._$AN=void 0,this.element=e,this.name=r,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=se}_$AI(e,r=this,i,n){const s=this.strings;let o=!1;if(s===void 0)e=yt(this,e,r,0),o=!Wt(e)||e!==this._$AH&&e!==lt,o&&(this._$AH=e);else{const l=e;let a,c;for(e=s[0],a=0;a<s.length-1;a++)c=yt(this,l[i+a],r,a),c===lt&&(c=this._$AH[a]),o||(o=!Wt(c)||c!==this._$AH[a]),c===se?e=se:e!==se&&(e+=(c??"")+s[a+1]),this._$AH[a]=c}o&&!n&&this.j(e)}j(e){e===se?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class yn extends Kt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===se?void 0:e}}class vn extends Kt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==se)}}class bn extends Kt{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){if((e=yt(this,e,r,0)??se)===lt)return;const i=this._$AH,n=e===se&&i!==se||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==se&&(i===se||n);n&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,e):this._$AH.handleEvent(e)}}class xn{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){yt(this,e)}}const yo={P:Hr,A:Je,C:qr,M:1,L:gn,R:mn,D:ln,V:yt,I:Mt,H:Kt,N:vn,U:bn,B:yn,F:xn},zr=zt.litHtmlPolyfillSupport;zr==null||zr(Vt,Mt),(zt.litHtmlVersions??(zt.litHtmlVersions=[])).push("3.1.2");const vo=(t,e,r)=>{const i=(r==null?void 0:r.renderBefore)??e;let n=i._$litPart$;if(n===void 0){const s=(r==null?void 0:r.renderBefore)??null;i._$litPart$=n=new Mt(e.insertBefore(Yt(),s),s,void 0,r??{})}return n._$AI(t),n};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* 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
|
-
*/const Sn=(t,e,r)=>{const i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},An=$n(class extends _n{constructor(t){if(super(t),t.type!==wn.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);const n=[],s=[];let o=0;for(const l of t)n[o]=i?i(l,o):o,s[o]=r(l,o),o++;return{values:s,keys:n}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,i]){const n=Eo(t),{values:s,keys:o}=this.dt(e,r,i);if(!Array.isArray(n))return this.ut=o,s;const l=this.ut??(this.ut=[]),a=[];let c,f,p=0,b=n.length-1,y=0,E=s.length-1;for(;p<=b&&y<=E;)if(n[p]===null)p++;else if(n[b]===null)b--;else if(l[p]===o[y])a[y]=vt(n[p],s[y]),p++,y++;else if(l[b]===o[E])a[E]=vt(n[b],s[E]),b--,E--;else if(l[p]===o[E])a[E]=vt(n[p],s[E]),Jt(t,a[E+1],n[p]),p++,E--;else if(l[b]===o[y])a[y]=vt(n[b],s[y]),Jt(t,n[p],n[b]),b--,y++;else if(c===void 0&&(c=Sn(o,y,E),f=Sn(l,p,b)),c.has(l[p]))if(c.has(l[b])){const O=f.get(o[y]),
|
|
51
|
+
*/const Sn=(t,e,r)=>{const i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},An=$n(class extends _n{constructor(t){if(super(t),t.type!==wn.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);const n=[],s=[];let o=0;for(const l of t)n[o]=i?i(l,o):o,s[o]=r(l,o),o++;return{values:s,keys:n}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,i]){const n=Eo(t),{values:s,keys:o}=this.dt(e,r,i);if(!Array.isArray(n))return this.ut=o,s;const l=this.ut??(this.ut=[]),a=[];let c,f,p=0,b=n.length-1,y=0,E=s.length-1;for(;p<=b&&y<=E;)if(n[p]===null)p++;else if(n[b]===null)b--;else if(l[p]===o[y])a[y]=vt(n[p],s[y]),p++,y++;else if(l[b]===o[E])a[E]=vt(n[b],s[E]),b--,E--;else if(l[p]===o[E])a[E]=vt(n[p],s[E]),Jt(t,a[E+1],n[p]),p++,E--;else if(l[b]===o[y])a[y]=vt(n[b],s[y]),Jt(t,n[p],n[b]),b--,y++;else if(c===void 0&&(c=Sn(o,y,E),f=Sn(l,p,b)),c.has(l[p]))if(c.has(l[b])){const O=f.get(o[y]),z=O!==void 0?n[O]:null;if(z===null){const B=Jt(t,n[p]);vt(B,s[y]),a[y]=B}else a[y]=vt(z,s[y]),Jt(t,n[p],z),n[O]=null;y++}else Wr(n[b]),b--;else Wr(n[p]),p++;for(;y<=E;){const O=Jt(t,a[E+1]);vt(O,s[y]),a[y++]=O}for(;p<=b;){const O=n[p++];O!==null&&Wr(O)}return this.ut=o,_o(t,a),lt}});/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2020 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/const On=Symbol.for(""),So=t=>{if((t==null?void 0:t.r)===On)return t==null?void 0:t._$litStatic$},Ot=t=>({_$litStatic$:t,r:On}),Pn=new Map,Ao=t=>(e,...r)=>{const i=r.length;let n,s;const o=[],l=[];let a,c=0,f=!1;for(;c<i;){for(a=e[c];c<i&&(s=r[c],(n=So(s))!==void 0);)a+=n+e[++c],f=!0;c!==i&&l.push(s),o.push(a),c++}if(c===i&&o.push(e[i]),f){const p=o.join("$$lit$$");(e=Pn.get(p))===void 0&&(o.raw=o,Pn.set(p,e=o)),r=l}return t(e,...r)},ur=Ao(W);(()=>{var t=Object.defineProperty,e=Math.pow,r=(u,d,x)=>d in u?t(u,d,{enumerable:!0,configurable:!0,writable:!0,value:x}):u[d]=x,i=(u,d,x)=>(r(u,typeof d!="symbol"?d+"":d,x),x),n=(u,d)=>` ${d&&d.length>0?d.map(x=>`<link rel="stylesheet" href="${x}" />`).join(""):""} <style> ${u} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,s=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",o="pointers-overlap",l="pointers-min-distance",a="pointers-max-distance",c="range-dragging",f="data",p="min",b="max",y="step",E="round",O="type",U="theme",B="rtl",g="btt",m="disabled",w="keyboard-disabled",S="mousewheel-disabled",_="slider-width",A="slider-height",k="slider-radius",F="slider-bg",H="slider-bg-hover",I="slider-bg-fill",te="pointer-width",le="pointer-height",P="pointer-radius",L="pointer-bg",M="pointer-bg-hover",j="pointer-bg-focus",C="pointer-shadow",G="pointer-shadow-hover",z="pointer-shadow-focus",oe="pointer-border",re="pointer-border-hover",ye="pointer-border-focus",ve="animate-onclick",Me="css-links",xe="vertical",Oe="horizontal",nt=(u,d,x,v,R)=>{let Y=d-u;return Y===0?x:(v-x)*(R-u)/Y+x},Ee=u=>!isNaN(parseFloat(u))&&isFinite(u),ie=(u,d)=>Ee(u)?Number(u):d,qe=(u,d)=>d===0?0:Math.round(u/d)*d,_t=(u,d=1/0)=>{if(d===1/0)return u;let x=e(10,d);return Math.round(u*x)/x},fe=u=>u==null?!1:typeof u=="boolean"?u:u.trim().toLowerCase()==="true",kc=(u,d)=>{u.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},Rc=(u,d)=>{u.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},Tc=(u,d)=>{u.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},Ic=(u,d)=>{u.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},Dc=(u,d)=>{if(!d||d.length<=0)return;let x=d.map(R=>Ee(R)?ie(R,R):R),v={values:x||[]};v.value=x[0],v.value0=x[0],v.value1=x[0];for(let R=1;R<x.length;R++)v[`value${R+1}`]=x[R];u.dispatchEvent(new CustomEvent("change",{detail:v}))},Oi=(u,d,x)=>{let v=0,R,Y,Z,T,D=!1,Q=(V,he,we,be,pe,ge)=>{let Pe=v;we!==void 0&&V>we&&(V=we),he!==void 0&&V<he&&(V=he),v=V;let Le=v;return(be===xe&&ge||be===Oe&&pe)&&(Le=100-Le),be===xe?d.style.top=`${Le}%`:d.style.left=`${Le}%`,Pe!==v},ne=V=>V===d||d.contains(V),q=(V,he,we,be)=>{R=V,Y=he,Z=we,T=be},ce=V=>{D=V,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Ne=(V,he)=>{he==null?d.removeAttribute(V):d.setAttribute(V,he)},Ae=V=>d.getAttribute(V),X=V=>{if(!D){switch(V.key){case"ArrowLeft":{V.preventDefault(),typeof R=="function"&&R(x);break}case"ArrowRight":{V.preventDefault(),typeof Y=="function"&&Y(x);break}case"ArrowUp":{V.preventDefault(),typeof Z=="function"&&Z(x);break}case"ArrowDown":{V.preventDefault(),typeof T=="function"&&T(x);break}}Ic(u,V)}},ee=()=>{D||kc(u,d)};return d.className=`pointer pointer-${x}`,d.addEventListener("keydown",X),d.addEventListener("click",ee),{$pointer:d,get percent(){return v},get disabled(){return D},set disabled(V){ce(V)},updatePosition:Q,isClicked:ne,setCallbacks:q,setAttr:Ne,getAttr:Ae,destroy:()=>{d.removeEventListener("keydown",X),d.removeEventListener("click",ee),d.remove()}}},jc=u=>{if(u==null)return;if(Array.isArray(u))return u;if(u.trim()==="")return;let d=u.split(","),x=[],v=!0;for(let R=0;R<d.length;R++){let Y=d[R].trim();Y!==""&&(x.push(Y),Ee(Y)||(v=!1))}return v?x.map(R=>Number(R)):x},Nc=(u,d)=>d?d.findIndex(x=>x===u||x.toString().trim()===u.toString().trim()):-1,Bc=u=>({updatePosition:(d,x,v,R)=>{if(x.length<=0)return;let Y=x.length===1,Z=x[0],T=x[x.length-1];d===xe?(u.style.removeProperty("width"),u.style.removeProperty("right"),u.style.removeProperty("left"),Y?u.style.height=`${Z}%`:u.style.height=`${Math.abs(Z-T)}%`,R?(u.style.bottom="0%",Y?u.style.top="auto":u.style.top=`${Math.min(100-T,100-Z)}%`):(u.style.bottom="auto",Y?u.style.top="0%":u.style.top=`${Math.min(Z,T)}%`)):(u.style.removeProperty("height"),u.style.removeProperty("top"),u.style.removeProperty("bottom"),Y?u.style.width=`${Z}%`:u.style.width=`${Math.abs(Z-T)}%`,v?(u.style.right="0%",Y?u.style.left="auto":u.style.left=`${Math.min(100-T,100-Z)}%`):(u.style.right="auto",Y?u.style.left="0%":u.style.left=`${Math.min(Z,T)}%`))}}),Ts="--animate-onclick",Fc="--width",Hc="--height",qc="--panel-bg-border-radius",Uc="--panel-bg",zc="--panel-bg-hover",Yc="--panel-bg-fill",Wc="--pointer-width",Xc="--pointer-height",Vc="--pointer-border-radius",Kc="--pointer-bg",Gc="--pointer-bg-hover",Jc="--pointer-bg-focus",Zc="--pointer-shadow",Qc="--pointer-shadow-hover",eu="--pointer-shadow-focus",tu="--pointer-border",ru="--pointer-border-hover",iu="--pointer-border-focus",Ar=(u,d,x)=>{let v=new Map;for(let R of u.attributes){let Y=R.nodeName.trim().toLowerCase();if(!d.test(Y))continue;let Z=Y.replace(/\D/g,"").trim(),T=Z===""||Z==="0"||Z==="1"?0:ie(Z,0)-1,D=x&&typeof x=="function"?x(R.value):R.value;v.set(T,D)}return v},nu=u=>{if(!u)return null;let d=u.getAttribute(Me);if(!d)return null;let x=d.split(";"),v=[];for(let R of x)R.trim()!==""&&v.push(R.trim());return v},Is=[[Fc,_,"sliderWidth",null],[Hc,A,"sliderHeight",null],[qc,k,"sliderRadius",null],[Uc,F,"sliderBg",null],[zc,H,"sliderBgHover",null],[Yc,I,"sliderBgFill",null],[Wc,te,"pointer#Width",/^pointer([0-9]*)-width$/],[Xc,le,"pointer#Height",/^pointer([0-9]*)-height$/],[Vc,P,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Kc,L,"pointer#Bg",/^pointer([0-9]*)-bg$/],[Gc,M,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Jc,j,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Zc,C,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Qc,G,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[eu,z,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[tu,oe,"pointer#Border",/^pointer([0-9]*)-border$/],[ru,re,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[iu,ye,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],su=(u,d,x)=>{let v=null,R=[],Y=new Map,Z=(X,ee=d)=>{let V=[...ee.classList];for(let he of V)he.startsWith(X)&&d.classList.remove(he)},T=()=>{Z("shape");let X=d.querySelectorAll(".pointer");for(let ee of X)Z("shape",ee)},D=X=>{v=X,Z("theme-"),typeof X=="string"&&d.classList.add(`theme-${X}`)},Q=()=>{if(T(),!(R.length<=0)){d.classList.add("shape",`shape-${R[0]}`);for(let X=1;X<R.length;X++){let ee=R[X];if(!ee)continue;let V=d.querySelector(`.pointer-${X}`);!V||V.classList.add("shape",`shape-${ee}`)}}},ne=(X,ee)=>{R[X]=ee,Q()},q=()=>{T();let X=Ar(u,/^pointer([0-9]*)-shape$/);if(!(X.size<=0)){for(let ee of X){let V=ee[0];R[V]=ee[1]}Q()}},ce=(X,ee)=>`${X}-${ee}`,Ne=(X,ee,V)=>{let he=x[V];if(!he)return;let we=V===0?d:he.$pointer;if(ee==null){Y.has(ce(X,V))&&Y.delete(ce(X,V)),we.style.removeProperty(X);return}Y.set(ce(X,V),ee),we.style.setProperty(X,ee)},Ae=(X,ee)=>Y.get(ce(X,ee));return(()=>{for(let X of Is){let[ee,V,he,we]=X;if(we){let pe=Ar(u,we);for(let ge of pe){let Pe=ge[0],Le=ge[1];Ne(ee,Le,Pe)}}else{let pe=u.getAttribute(V);Ne(ee,pe,0)}let be=[];if(he.indexOf("#")===-1)be.push([he,0]);else{be.push([he.replace("#",""),0]),be.push([he.replace("#","0"),0]),be.push([he.replace("#","1"),0]);for(let pe=1;pe<x.length;pe++)be.push([he.replace("#",(pe+1).toString()),pe])}for(let pe of be)try{let ge=pe[0],Pe=pe[1];Object.prototype.hasOwnProperty.call(u,ge)||Object.defineProperty(u,ge,{get(){return Ae(ee,Pe)},set:Le=>{Ne(ee,Le,Pe)}})}catch(ge){console.error(ge)}}D(u.getAttribute(U)),q()})(),{setStyle:Ne,getStyle:Ae,get theme(){return v},set theme(X){D(X)},get pointerShapes(){return R},setPointerShape:ne}},Ft="animate-on-click",Ds="range-dragging",ou=(u,d,x,v)=>{let R=[],Y=ne=>{for(let q of R)q.update&&typeof q.update=="function"&&q.update(ne)},Z=()=>{for(let ne of R)ne.destroy&&typeof ne.destroy=="function"&&ne.destroy()},T=(ne,q)=>{for(let ce of R)ce.onAttrChange&&typeof ce.onAttrChange=="function"&&ce.onAttrChange(ne,q)},D=ne=>{if(ne.gettersAndSetters){for(let q of ne.gettersAndSetters)if(!(!q.name||!q.attributes))try{Object.prototype.hasOwnProperty.call(u,q.name)||Object.defineProperty(u,q.name,q.attributes)}catch(ce){console.error("defineSettersGetters error:",ce)}}},Q=ne=>{var q;if(!ne.css)return;let ce=(q=u.shadowRoot)==null?void 0:q.querySelector("style");!ce||(ce.innerHTML+=ne.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let ne of window.tcRangeSliderPlugins){let q=ne();R.push(q),q.init&&typeof q.init=="function"&&(q.init(u,d,x,v),D(q),Q(q))}},update:Y,onAttrChange:T,destroy:Z}},lu=10,js=20,au=(u,d)=>{let x=new Map,v=/^value([0-9]*)$/;for(let T of u.attributes){let D=T.nodeName.trim().toLowerCase();if(!v.test(D))continue;let Q=D.replace("value","").trim(),ne=Q===""||Q==="0"||Q==="1"?0:ie(Q,0)-1,q=Ee(T.value)?ie(T.value,0):T.value;x.set(ne,q)}let R=Math.max(...Array.from(x.keys())),Y=[];Y.push([Oi(u,d,0),x.get(0)]);let Z=d;for(let T=1;T<=R;T++){let D=d.cloneNode(!0);Z.after(D),Z=D,Y.push([Oi(u,D,T),x.get(T)])}return Y},Ns=(u,d,x,v,R,Y,Z)=>{try{Object.defineProperty(u,v,{configurable:!0,get(){if(!d)return;let T=d.pointers[x];if(!T)return;let D=d.getTextValue(T.percent);return Ee(D)?ie(D,D):D},set:T=>{d.pointers[x]?d==null||d.setValue(T,x):d==null||d.addPointer(T)}}),Object.defineProperty(u,R,{configurable:!0,get(){var T,D;return(D=(T=d==null?void 0:d.pointers[x])==null?void 0:T.getAttr("aria-label"))!=null?D:void 0},set:T=>{!d||d.setAriaLabel(x,T)}}),Object.defineProperty(u,Y,{configurable:!0,get(){var T,D;return(D=(T=d==null?void 0:d.styles)==null?void 0:T.pointerShapes[x])!=null?D:null},set:T=>{!d||!d.styles||d.styles.setPointerShape(x,T)}}),Object.defineProperty(u,Z,{configurable:!0,get(){var T;return(T=d==null?void 0:d.pointers[x].disabled)!=null?T:!1},set:T=>{if(!d)return;let D=d==null?void 0:d.pointers[x];!D||(D.disabled=T)}})}catch(T){console.error(T)}},cu=(u,d)=>{let x=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let v=2;v<lu;v++)x.push([`value${v}`,`ariaLabel${v}`,`pointer${v}Shape`,`pointer${v}Disabled`,v-1]);for(let v of x)Ns(u,d,v[4],v[0],v[1],v[2],v[3])},Bs=(u,d,x)=>{var v;let R=(v=x.shadowRoot)==null?void 0:v.querySelector(".container");if(R)for(let Y of u)d?R.prepend(Y.$pointer):R.append(Y.$pointer)},uu=(u,d)=>{if(!(!d||u.length<=1)){for(let x of u)x.$pointer.style.zIndex=js.toString();d.$pointer.style.zIndex=(js*2).toString()}},Pi=0,sr=100,Ht=2,Fs="0.3s",hu=(u,d,x)=>{let v=x.map(h=>h[0]),R=null,Y=null,Z=null,T=null,D=Pi,Q=sr,ne,q,ce=Oe,Ne=Ht,Ae=!1,X=!1,ee=!1,V=0,he=1/0,we=!1,be,pe,ge=!1,Pe=!1,Le=!1,ft=Fs,Hs=[],qs=h=>{ge||(h.preventDefault&&h.preventDefault(),Et(h),window.addEventListener("mousemove",Et),window.addEventListener("mouseup",Mr),Rc(u,h))},Mr=h=>{ge||(be=void 0,pe=void 0,window.removeEventListener("mousemove",Et),window.removeEventListener("mouseup",Mr),ft&&d.classList.add(Ft),Tc(u,h))},pu=(h,$)=>{if(v.length<=0)return;if(v.length===1)return v[0].isClicked(h)&&ft&&d.classList.remove(Ft),v[0];let N=mu(h);if(we){let ae=$,Ue=Pr(ae);Ue!==void 0&&(ae=qe(ae,Ue)),N?(be=ae,pe=0,ft&&d.classList.remove(Ft)):be!==void 0&&(pe=ae-be,be=ae)}if(!gu(h)&&!N){for(let ae of v)if(!(!ae.isClicked(h)||ae.disabled))return ft&&d.classList.remove(Ft),ae;for(let ae of v)if(R===ae)return ae}let ue=1/0,me=null;for(let ae of v){if(ae.disabled)continue;let Ue=Math.abs($-ae.percent);Ue<ue&&(ue=Ue,me=ae)}return me},Us=()=>v.findIndex(h=>R===h&&!h.disabled),Et=h=>{let $;if(ce===xe){let{height:ue,top:me}=d.getBoundingClientRect(),ae=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;$=Math.min(Math.max(0,ae-me),ue)*100/ue}else{let{width:ue,left:me}=d.getBoundingClientRect(),ae=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;$=Math.min(Math.max(0,ae-me),ue)*100/ue}if((Ae||X)&&($=100-$),R=pu(h.target,$),R&&uu(v,R),we&&v.length>1&&pe!==void 0){let ue=v[0],me=v[v.length-1],ae=ue.percent+pe<0,Ue=me.percent+pe>100;if(ae||Ue)return;for(let jr=0;jr<v.length;jr++)Ce(jr,v[jr].percent+pe);return}let N=Us();N!==-1&&(Ce(N,$),R==null||R.$pointer.focus())},Or=h=>{if(ge||document.activeElement!==u||R!=null&&R.disabled)return;h.stopPropagation(),h.preventDefault();let $=h.deltaY<0,N=Ae||X,ue=$?!N:N,me=Us();me!==-1&&(ue?or(me,v[me].percent):lr(me,v[me].percent))},zs=h=>{ge||Pe||(ce===xe?X?Ce(h,100):Ce(h,0):Ae?lr(h,v[h].percent):or(h,v[h].percent))},Ys=h=>{ge||Pe||(ce===xe?X?Ce(h,0):Ce(h,100):Ae?or(h,v[h].percent):lr(h,v[h].percent))},Ws=h=>{ge||Pe||(ce===xe?X?lr(h,v[h].percent):or(h,v[h].percent):Ae?Ce(h,100):Ce(h,0))},Xs=h=>{ge||Pe||(ce===xe?X?or(h,v[h].percent):lr(h,v[h].percent):Ae?Ce(h,0):Ce(h,100))},gu=h=>h.classList.contains("panel"),mu=h=>h.classList.contains("panel-fill"),or=(h,$)=>{if($===void 0)return;let N=Pr($);N==null&&(N=1),$-=N,$<0&&($=0),Ce(h,$)},lr=(h,$)=>{if($===void 0)return;let N=Pr($);N==null&&(N=1),$+=N,$>100&&($=100),Ce(h,$)},St=()=>{!T||T.update({percents:Vs(),values:Ks(),$pointers:Gs(),min:Js(),max:Zs(),data:ki(),step:Ci(),round:Ti(),type:Ri(),textMin:Lr(),textMax:Cr(),rightToLeft:ji(),bottomToTop:Ni(),pointersOverlap:qi(),pointersMinDistance:Ii(),pointersMaxDistance:Di(),rangeDragging:Ui(),disabled:Bi(),keyboardDisabled:Fi(),mousewheelDisabled:Hi()})},yu=()=>{St()},vu=h=>{if(!(ee||v.length<=1||Q===D))if(h===0){let $=he*100/(Q-D);return Math.max(0,v[h+1].percent-$)}else{let $=V*100/(Q-D);return Math.min(v[h-1].percent+$,100)}},bu=h=>{if(!(ee||v.length<=1||Q===D))if(h===v.length-1){let $=he*100/(Q-D);return Math.min(v[h-1].percent+$,100)}else{let $=V*100/(Q-D);return Math.max(0,v[h+1].percent-$)}},Pr=h=>{let $;if(typeof ne=="function"){let N=nt(0,100,D,Q,h);$=ne(N,h)}else $=ne;if(Ee($)){let N=Q-D;return $=N===0?0:$*100/N,$}},qt=h=>{if(h===void 0)return;let $=nt(0,100,D,Q,h);return q!==void 0?q[Math.round($)]:_t($,Ne)},Lr=()=>q!==void 0?q[D]:D,Cr=()=>q!==void 0?q[Q]:Q,Ci=()=>ne,xu=h=>{var $;return h<=0||ee?Lr():($=qt(v[h-1].percent))!=null?$:""},wu=h=>{var $;return v.length<=1||h>=v.length-1||ee?Cr():($=qt(v[h+1].percent))!=null?$:""},Vs=()=>v.map(h=>h.percent),Ks=()=>v.map(h=>qt(h.percent)),Gs=()=>v.map(h=>h.$pointer),Js=()=>D,Zs=()=>Q,ki=()=>q,Ri=()=>ce,Ti=()=>Ne,Ii=()=>V,Di=()=>he,$u=h=>Hs[h],ji=()=>Ae,Ni=()=>X,Bi=()=>ge,Fi=()=>Pe,Hi=()=>Le,qi=()=>ee,Ui=()=>we,Ce=(h,$)=>{if($===void 0)return;let N=Pr($);N!==void 0&&($=qe($,N));let ue=v[h];if(!ue)return;let me=ue.updatePosition($,vu(h),bu(h),ce,Ae,X);Y==null||Y.updatePosition(ce,v.map(ae=>ae.percent),Ae,X),St();for(let ae of v){let Ue=qt(ae.percent);Ue!==void 0&&(ae.setAttr("aria-valuenow",Ue.toString()),ae.setAttr("aria-valuetext",Ue.toString()))}Eu(),me&&Dc(u,v.map(ae=>qt(ae.percent)))},Ge=()=>{for(let h=0;h<v.length;h++)Ce(h,v[h].percent)},_u=(h,$)=>{D=q!==void 0?0:ie(h,Pi),Q=q!==void 0?q.length-1:ie($,sr),kr(D),Rr(Q)},Eu=()=>{var h,$;for(let N=0;N<v.length;N++){let ue=v[N];ue.setAttr("aria-valuemin",((h=xu(N))!=null?h:"").toString()),ue.setAttr("aria-valuemax",(($=wu(N))!=null?$:"").toString())}},kr=h=>{D=ie(h,Pi),D>Q&&(Q=D+sr),Ge()},Rr=h=>{Q=ie(h,sr),Q<D&&(Q=D+sr),Ge()},Qs=h=>{ee=!0;for(let $=0;$<h.length;$++)Tr(h[$],$);ee=!1;for(let $=0;$<h.length;$++)Tr(h[$],$)},Tr=(h,$)=>{let N;q!==void 0?(N=h==null?0:Nc(h,q),N===-1&&(N=0)):(N=ie(h,D),N<D&&(N=D),N>Q&&(N=Q));let ue=nt(D,Q,0,100,N);Ce($,ue)},Ir=h=>{if(h==null){ne=void 0;return}if(typeof h=="function"){ne=h,Ge();return}if(Ee(h)){ne=ie(h,1);let $=Math.abs(Q-D);ne>$&&(ne=void 0),Ge();return}ne=void 0},zi=h=>{ee=h,Ge()},Yi=h=>{(!Ee(h)||h<0)&&(h=0),V=h},Wi=h=>{(!Ee(h)||h<0)&&(h=1/0),he=h},Xi=h=>{ge=h,d.classList.toggle("disabled",ge),ge?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},eo=h=>{Pe=h},to=h=>{Le=h,Le?document.removeEventListener("wheel",Or):document.addEventListener("wheel",Or,{passive:!1})},Vi=h=>{if(h==null){q=void 0;return}if(q=jc(h),q===void 0||q.length<=0){q=void 0;return}kr(0),Rr(q.length-1),ne===void 0&&Ir(1)},Ki=h=>{var $;typeof h=="string"?ce=h.trim().toLowerCase()===xe?xe:Oe:ce=Oe;let N=($=u.shadowRoot)==null?void 0:$.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${ce}`,Ge();let ue=ce===xe?"vertical":"horizontal";for(let me of v)me.setAttr("aria-orientation",ue)},Gi=h=>{Ae=h,v.length>1&&Bs(v,Ae,u),Ge(),St()},Ji=h=>{X=h,v.length>1&&Bs(v,X,u),Ge(),St()},Zi=h=>{Ne=ie(h,Ht),Ne<0&&(Ne=Ht),St()},ro=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(ft=void 0,d.style.removeProperty(Ts),d.classList.remove(Ft)):(ft=h.toString(),d.style.setProperty(Ts,ft),d.classList.add(Ft))},io=(h,$)=>{let N=v[h];!N||(N.setAttr("aria-label",$),Hs[h]=$)},Dr=h=>{if(be=void 0,v.length<=1){we=!1,d.classList.remove(Ds);return}we=h,d.classList.toggle(Ds,we)},Su=()=>{Xi(fe(u.getAttribute(m))),Pe=fe(u.getAttribute(w)),Le=fe(u.getAttribute(S));let h=Ar(u,/^pointer([0-9]*)-disabled$/,$=>fe($));for(let $ of h){let N=$[0];!v[N]||(v[N].disabled=$[1])}},Au=()=>{let h=Ar(u,/^aria-label([0-9]*)$/);for(let $ of h){let N=$[0];io(N,$[1])}},Mu=h=>{let $=v.length,N=v[$-1].$pointer,ue=N.cloneNode(!0);N.after(ue);let me=Oi(u,ue,$);return me.setCallbacks(zs,Ys,Ws,Xs),v.push(me),Tr(h,$),Ge(),St(),$},Ou=()=>{let h=v.length,$=v[h-1];return $?($.destroy(),v.pop(),v.length<=1&&Dr(!1),Ge(),St(),h-1):-1};return(()=>{var h,$;for(let ue of v)ue.setCallbacks(zs,Ys,Ws,Xs);let N=(h=u.shadowRoot)==null?void 0:h.querySelector(".panel-fill");N&&(Y=Bc(N)),Ki(u.getAttribute(O)),Gi(fe(u.getAttribute(B))),Ji(fe(u.getAttribute(g))),_u(u.getAttribute(p),u.getAttribute(b)),Ir(u.getAttribute(y)),Vi(u.getAttribute(f)),Qs(x.map(ue=>ue[1])),zi(fe(u.getAttribute(o))),Yi(ie(u.getAttribute(l),0)),Wi(ie(u.getAttribute(a),1/0)),Dr(fe(u.getAttribute(c))),Zi(ie(u.getAttribute(E),Ht)),Su(),Au(),Z=su(u,d,v),ro(($=u.getAttribute(ve))!=null?$:Fs),d.addEventListener("mousedown",qs),d.addEventListener("mouseup",Mr),d.addEventListener("touchmove",Et),d.addEventListener("touchstart",Et),Le||document.addEventListener("wheel",Or,{passive:!1}),T=ou(u,yu,{setValues:Qs,setMin:kr,setMax:Rr,setStep:Ir,setPointersOverlap:zi,setPointersMinDistance:Yi,setPointersMaxDistance:Wi,setDisabled:Xi,setType:Ki,setRightToLeft:Gi,setBottomToTop:Ji,setRound:Zi,setKeyboardDisabled:eo,setMousewheelDisabled:to,setRangeDragging:Dr,setData:Vi},{getPercents:Vs,getValues:Ks,getPointerElements:Gs,getMin:Js,getMax:Zs,getStep:Ci,getData:ki,getType:Ri,getRound:Ti,getTextMin:Lr,getTextMax:Cr,isRightToLeft:ji,isBottomToTop:Ni,isDisabled:Bi,isKeyboardDisabled:Fi,isMousewheelDisabled:Hi,isPointersOverlap:qi,isRangeDraggingEnabled:Ui,getPointersMinDistance:Ii,getPointersMaxDistance:Di}),T.init()})(),{get pointers(){return v},get styles(){return Z},get pluginsManager(){return T},get min(){return Lr()},get max(){return Cr()},get step(){return Ci()},get pointersOverlap(){return qi()},set pointersOverlap(h){zi(h)},get pointersMinDistance(){return Ii()},set pointersMinDistance(h){Yi(h)},get pointersMaxDistance(){return Di()},set pointersMaxDistance(h){Wi(h)},get disabled(){return Bi()},set disabled(h){Xi(h)},get data(){return ki()},get type(){return Ri()},set type(h){Ki(h)},get rightToLeft(){return ji()},set rightToLeft(h){Gi(h)},get bottomToTop(){return Ni()},set bottomToTop(h){Ji(h)},get round(){return Ti()},set round(h){Zi(h)},get animateOnClick(){return ft},set animateOnClick(h){ro(h)},get keyboardDisabled(){return Fi()},set keyboardDisabled(h){eo(h)},get mousewheelDisabled(){return Hi()},set mousewheelDisabled(h){to(h)},get rangeDragging(){return Ui()},set rangeDragging(h){Dr(h)},setMin:kr,setMax:Rr,setValue:Tr,setStep:Ir,setData:Vi,getTextValue:qt,setAriaLabel:io,getAriaLabel:$u,addPointer:Mu,removePointer:Ou,destroy:()=>{d.removeEventListener("mousedown",qs),d.removeEventListener("mouseup",Mr),d.removeEventListener("touchmove",Et),d.removeEventListener("touchstart",Et),document.removeEventListener("wheel",Or);for(let h of v)h.destroy();T==null||T.destroy()}}},du=(u,d,x)=>{let v=Is.find(([T,D,Q,ne])=>D.replace("#","")===d.replace(/\d+/g,""));if(v&&u.styles){let[T,D,Q,ne]=v,q=d.replace(/\D/g,"").trim(),ce=q===""||q==="0"||q==="1"?0:ie(q,0)-1;u.styles.setStyle(T,x,ce);return}switch(u&&u.pluginsManager&&u.pluginsManager.onAttrChange(d,x),d){case p:{u.setMin(x);break}case b:{u.setMax(x);break}case y:{u.setStep(x);break}case o:{u.pointersOverlap=fe(x);break}case l:{u.pointersMinDistance=ie(x,0);break}case c:{u.rangeDragging=fe(x);break}case a:{u.pointersMaxDistance=ie(x,1/0);break}case m:{u.disabled=fe(x);break}case w:{u.keyboardDisabled=fe(x);break}case S:{u.mousewheelDisabled=fe(x);break}case f:{u.setData(x);break}case O:{u.type=x;break}case B:{u.rightToLeft=fe(x);break}case g:{u.bottomToTop=fe(x);break}case E:{u.round=ie(x,Ht);break}case U:{u.styles&&(u.styles.theme=x);break}case ve:{u.animateOnClick=x;break}}let R=null;if(/^value([0-9]*)$/.test(d)&&(R="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(R="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(R="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(R="pointer-shape"),!R)return;let Y=d.replace(/\D/g,"").trim(),Z=Y===""||Y==="0"||Y==="1"?0:ie(Y,0)-1;switch(R){case"value":{u.setValue(x,Z);break}case"pointer-disabled":{let T=u==null?void 0:u.pointers[Z];if(!T)return;T.disabled=fe(x);break}case"aria-label":{u.setAriaLabel(Z,x);break}case"pointer-shape":{u.styles&&u.styles.setPointerShape(Z,x);break}}},fu=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(u){this.slider&&this.slider.setStep(u)}get step(){var u;return(u=this.slider)==null?void 0:u.step}set disabled(u){this.slider&&(this.slider.disabled=u)}get disabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.disabled)!=null?d:!1}set data(u){var d;(d=this.slider)==null||d.setData(u)}get data(){var u;return(u=this.slider)==null?void 0:u.data}set min(u){var d;(d=this.slider)==null||d.setMin(u)}get min(){var u;return(u=this.slider)==null?void 0:u.min}set max(u){var d;(d=this.slider)==null||d.setMax(u)}get max(){var u;return(u=this.slider)==null?void 0:u.max}set round(u){!this.slider||(this.slider.round=u)}get round(){var u,d;return(d=(u=this.slider)==null?void 0:u.round)!=null?d:Ht}set type(u){!this.slider||(this.slider.type=u??Oe)}get type(){var u;return((u=this.slider)==null?void 0:u.type)||Oe}set pointersOverlap(u){!this.slider||(this.slider.pointersOverlap=u)}get pointersOverlap(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersOverlap)!=null?d:!1}set pointersMinDistance(u){!this.slider||(this.slider.pointersMinDistance=u)}get pointersMinDistance(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersMinDistance)!=null?d:0}set pointersMaxDistance(u){!this.slider||(this.slider.pointersMaxDistance=u)}get pointersMaxDistance(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersMaxDistance)!=null?d:1/0}set theme(u){!this.slider||!this.slider.styles||(this.slider.styles.theme=u)}get theme(){var u,d,x;return(x=(d=(u=this.slider)==null?void 0:u.styles)==null?void 0:d.theme)!=null?x:null}set rtl(u){!this.slider||(this.slider.rightToLeft=u)}get rtl(){var u,d;return(d=(u=this.slider)==null?void 0:u.rightToLeft)!=null?d:!1}set btt(u){!this.slider||(this.slider.bottomToTop=u)}get btt(){var u,d;return(d=(u=this.slider)==null?void 0:u.bottomToTop)!=null?d:!1}set keyboardDisabled(u){!this.slider||(this.slider.keyboardDisabled=u)}get keyboardDisabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(u){!this.slider||(this.slider.mousewheelDisabled=u)}get mousewheelDisabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.mousewheelDisabled)!=null?d:!1}set animateOnClick(u){!this.slider||(this.slider.animateOnClick=u)}get animateOnClick(){var u;return(u=this.slider)==null?void 0:u.animateOnClick}get rangeDragging(){var u,d;return(d=(u=this.slider)==null?void 0:u.rangeDragging)!=null?d:!1}set rangeDragging(u){this.slider&&(this.slider.rangeDragging=fe(u))}get externalCSSList(){return this._externalCSSList}addPointer(u){var d,x;if(!this.slider)return;let v=(x=(d=this.slider)==null?void 0:d.addPointer(u))!=null?x:0;Ns(this,this.slider,v,`value${v+1}`,`ariaLabel${v+1}`,`pointerShape${v+1}`,`pointer${v+1}Disabled`)}removePointer(){var u;!this.slider||(u=this.slider)==null||u.removePointer()}addCSS(u){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=u,this.shadowRoot.appendChild(d)}connectedCallback(){var u,d;if(!this.shadowRoot)return;this._externalCSSList=nu(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let x=(u=this.shadowRoot)==null?void 0:u.querySelector(".pointer");if(!x)return;let v=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!v)return;let R=au(this,x);this.slider=hu(this,v,R),cu(this,this.slider),this._observer=new MutationObserver(Y=>{Y.forEach(Z=>{var T;if(!this.slider||Z.type!=="attributes")return;let D=Z.attributeName;!D||du(this.slider,D,(T=this.getAttribute(D))!=null?T:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Li=fu;window.tcRangeSlider=Li,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Li),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Li{})})();var Pt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Kr(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}),r}var Ln={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(Pt,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",o="second",l="minute",a="hour",c="day",f="week",p="month",b="quarter",y="year",E="date",O="Invalid Date",U=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|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,g={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(P){var L=["th","st","nd","rd"],M=P%100;return"["+P+(L[(M-20)%10]||L[M]||L[0])+"]"}},m=function(P,L,M){var j=String(P);return!j||j.length>=L?P:""+Array(L+1-j.length).join(M)+P},w={s:m,z:function(P){var L=-P.utcOffset(),M=Math.abs(L),j=Math.floor(M/60),C=M%60;return(L<=0?"+":"-")+m(j,2,"0")+":"+m(C,2,"0")},m:function P(L,M){if(L.date()<M.date())return-P(M,L);var j=12*(M.year()-L.year())+(M.month()-L.month()),C=L.clone().add(j,p),G=M-C<0,z=L.clone().add(j+(G?-1:1),p);return+(-(j+(M-C)/(G?C-z:z-C))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:p,y,w:f,d:c,D:E,h:a,m:l,s:o,ms:s,Q:b}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},S="en",_={};_[S]=g;var A="$isDayjsObject",k=function(P){return P instanceof te||!(!P||!P[A])},F=function P(L,M,j){var C;if(!L)return S;if(typeof L=="string"){var G=L.toLowerCase();_[G]&&(C=G),M&&(_[G]=M,C=G);var z=L.split("-");if(!C&&z.length>1)return P(z[0])}else{var oe=L.name;_[oe]=L,C=oe}return!j&&C&&(S=C),C||!j&&S},H=function(P,L){if(k(P))return P.clone();var M=typeof L=="object"?L:{};return M.date=P,M.args=arguments,new te(M)},I=w;I.l=F,I.i=k,I.w=function(P,L){return H(P,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var te=function(){function P(M){this.$L=F(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[A]=!0}var L=P.prototype;return L.parse=function(M){this.$d=function(j){var C=j.date,G=j.utc;if(C===null)return new Date(NaN);if(I.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var z=C.match(U);if(z){var oe=z[2]-1||0,re=(z[7]||"0").substring(0,3);return G?new Date(Date.UTC(z[1],oe,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)):new Date(z[1],oe,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)}}return new Date(C)}(M),this.init()},L.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},L.$utils=function(){return I},L.isValid=function(){return this.$d.toString()!==O},L.isSame=function(M,j){var C=H(M);return this.startOf(j)<=C&&C<=this.endOf(j)},L.isAfter=function(M,j){return H(M)<this.startOf(j)},L.isBefore=function(M,j){return this.endOf(j)<H(M)},L.$g=function(M,j,C){return I.u(M)?this[j]:this.set(C,M)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(M,j){var C=this,G=!!I.u(j)||j,z=I.p(M),oe=function(Ee,ie){var qe=I.w(C.$u?Date.UTC(C.$y,ie,Ee):new Date(C.$y,ie,Ee),C);return G?qe:qe.endOf(c)},re=function(Ee,ie){return I.w(C.toDate()[Ee].apply(C.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(ie)),C)},ye=this.$W,ve=this.$M,Me=this.$D,xe="set"+(this.$u?"UTC":"");switch(z){case y:return G?oe(1,0):oe(31,11);case p:return G?oe(1,ve):oe(0,ve+1);case f:var Oe=this.$locale().weekStart||0,nt=(ye<Oe?ye+7:ye)-Oe;return oe(G?Me-nt:Me+(6-nt),ve);case c:case E:return re(xe+"Hours",0);case a:return re(xe+"Minutes",1);case l:return re(xe+"Seconds",2);case o:return re(xe+"Milliseconds",3);default:return this.clone()}},L.endOf=function(M){return this.startOf(M,!1)},L.$set=function(M,j){var C,G=I.p(M),z="set"+(this.$u?"UTC":""),oe=(C={},C[c]=z+"Date",C[E]=z+"Date",C[p]=z+"Month",C[y]=z+"FullYear",C[a]=z+"Hours",C[l]=z+"Minutes",C[o]=z+"Seconds",C[s]=z+"Milliseconds",C)[G],re=G===c?this.$D+(j-this.$W):j;if(G===p||G===y){var ye=this.clone().set(E,1);ye.$d[oe](re),ye.init(),this.$d=ye.set(E,Math.min(this.$D,ye.daysInMonth())).$d}else oe&&this.$d[oe](re);return this.init(),this},L.set=function(M,j){return this.clone().$set(M,j)},L.get=function(M){return this[I.p(M)]()},L.add=function(M,j){var C,G=this;M=Number(M);var z=I.p(j),oe=function(ve){var Me=H(G);return I.w(Me.date(Me.date()+Math.round(ve*M)),G)};if(z===p)return this.set(p,this.$M+M);if(z===y)return this.set(y,this.$y+M);if(z===c)return oe(1);if(z===f)return oe(7);var re=(C={},C[l]=i,C[a]=n,C[o]=r,C)[z]||1,ye=this.$d.getTime()+M*re;return I.w(ye,this)},L.subtract=function(M,j){return this.add(-1*M,j)},L.format=function(M){var j=this,C=this.$locale();if(!this.isValid())return C.invalidDate||O;var G=M||"YYYY-MM-DDTHH:mm:ssZ",z=I.z(this),oe=this.$H,re=this.$m,ye=this.$M,ve=C.weekdays,Me=C.months,xe=C.meridiem,Oe=function(ie,qe,_t,fe){return ie&&(ie[qe]||ie(j,G))||_t[qe].slice(0,fe)},nt=function(ie){return I.s(oe%12||12,ie,"0")},Ee=xe||function(ie,qe,_t){var fe=ie<12?"AM":"PM";return _t?fe.toLowerCase():fe};return G.replace(B,function(ie,qe){return qe||function(_t){switch(_t){case"YY":return String(j.$y).slice(-2);case"YYYY":return I.s(j.$y,4,"0");case"M":return ye+1;case"MM":return I.s(ye+1,2,"0");case"MMM":return Oe(C.monthsShort,ye,Me,3);case"MMMM":return Oe(Me,ye);case"D":return j.$D;case"DD":return I.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return Oe(C.weekdaysMin,j.$W,ve,2);case"ddd":return Oe(C.weekdaysShort,j.$W,ve,3);case"dddd":return ve[j.$W];case"H":return String(oe);case"HH":return I.s(oe,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return Ee(oe,re,!0);case"A":return Ee(oe,re,!1);case"m":return String(re);case"mm":return I.s(re,2,"0");case"s":return String(j.$s);case"ss":return I.s(j.$s,2,"0");case"SSS":return I.s(j.$ms,3,"0");case"Z":return z}return null}(ie)||z.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(M,j,C){var G,z=this,oe=I.p(j),re=H(M),ye=(re.utcOffset()-this.utcOffset())*i,ve=this-re,Me=function(){return I.m(z,re)};switch(oe){case y:G=Me()/12;break;case p:G=Me();break;case b:G=Me()/3;break;case f:G=(ve-ye)/6048e5;break;case c:G=(ve-ye)/864e5;break;case a:G=ve/n;break;case l:G=ve/i;break;case o:G=ve/r;break;default:G=ve}return C?G:I.a(G)},L.daysInMonth=function(){return this.endOf(p).$D},L.$locale=function(){return _[this.$L]},L.locale=function(M,j){if(!M)return this.$L;var C=this.clone(),G=F(M,j,!0);return G&&(C.$L=G),C},L.clone=function(){return I.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},P}(),le=te.prototype;return H.prototype=le,[["$ms",s],["$s",o],["$m",l],["$H",a],["$W",c],["$M",p],["$y",y],["$D",E]].forEach(function(P){le[P[1]]=function(L){return this.$g(L,P[0],P[1])}}),H.extend=function(P,L){return P.$i||(P(L,te,H),P.$i=!0),H},H.locale=F,H.isDayjs=k,H.unix=function(P){return H(1e3*P)},H.en=_[S],H.Ls=_,H.p={},H})})(Ln);var Mo=Ln.exports;const Lt=Vr(Mo);class Oo extends _e{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,r){this._startExpression=e,this._endExpression=r;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,r,i){if(!this.hasTemplate(e))return null;i=i||e;const n=W` <slot name=${i}></slot> `,s={[e]:{...r}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:l}=this._renderedTemplates[i];this.contains(l)&&this.removeChild(l)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let r=0;r<this.children.length;r++){const i=this.children[r];if(i.nodeName==="RENDER-TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=r}}return e}_renderTemplate(e,r,i){let n;if(r&&r.childNodes.length){const s=r.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,r){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),r);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,r){r={...r};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(r)}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,r,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,r,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const Gr=`
|
|
59
|
+
*/const On=Symbol.for(""),So=t=>{if((t==null?void 0:t.r)===On)return t==null?void 0:t._$litStatic$},Ot=t=>({_$litStatic$:t,r:On}),Pn=new Map,Ao=t=>(e,...r)=>{const i=r.length;let n,s;const o=[],l=[];let a,c=0,f=!1;for(;c<i;){for(a=e[c];c<i&&(s=r[c],(n=So(s))!==void 0);)a+=n+e[++c],f=!0;c!==i&&l.push(s),o.push(a),c++}if(c===i&&o.push(e[i]),f){const p=o.join("$$lit$$");(e=Pn.get(p))===void 0&&(o.raw=o,Pn.set(p,e=o)),r=l}return t(e,...r)},ur=Ao(U);(()=>{var t=Object.defineProperty,e=Math.pow,r=(u,d,x)=>d in u?t(u,d,{enumerable:!0,configurable:!0,writable:!0,value:x}):u[d]=x,i=(u,d,x)=>(r(u,typeof d!="symbol"?d+"":d,x),x),n=(u,d)=>` ${d&&d.length>0?d.map(x=>`<link rel="stylesheet" href="${x}" />`).join(""):""} <style> ${u} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,s=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",o="pointers-overlap",l="pointers-min-distance",a="pointers-max-distance",c="range-dragging",f="data",p="min",b="max",y="step",E="round",O="type",z="theme",B="rtl",g="btt",m="disabled",w="keyboard-disabled",S="mousewheel-disabled",_="slider-width",A="slider-height",k="slider-radius",F="slider-bg",H="slider-bg-hover",I="slider-bg-fill",te="pointer-width",le="pointer-height",P="pointer-radius",L="pointer-bg",M="pointer-bg-hover",j="pointer-bg-focus",C="pointer-shadow",G="pointer-shadow-hover",Y="pointer-shadow-focus",oe="pointer-border",re="pointer-border-hover",ye="pointer-border-focus",ve="animate-onclick",Me="css-links",xe="vertical",Oe="horizontal",nt=(u,d,x,v,R)=>{let W=d-u;return W===0?x:(v-x)*(R-u)/W+x},Ee=u=>!isNaN(parseFloat(u))&&isFinite(u),ie=(u,d)=>Ee(u)?Number(u):d,qe=(u,d)=>d===0?0:Math.round(u/d)*d,_t=(u,d=1/0)=>{if(d===1/0)return u;let x=e(10,d);return Math.round(u*x)/x},fe=u=>u==null?!1:typeof u=="boolean"?u:u.trim().toLowerCase()==="true",kc=(u,d)=>{u.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},Rc=(u,d)=>{u.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},Tc=(u,d)=>{u.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},Ic=(u,d)=>{u.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},Dc=(u,d)=>{if(!d||d.length<=0)return;let x=d.map(R=>Ee(R)?ie(R,R):R),v={values:x||[]};v.value=x[0],v.value0=x[0],v.value1=x[0];for(let R=1;R<x.length;R++)v[`value${R+1}`]=x[R];u.dispatchEvent(new CustomEvent("change",{detail:v}))},Oi=(u,d,x)=>{let v=0,R,W,Z,T,D=!1,Q=(V,he,we,be,pe,ge)=>{let Pe=v;we!==void 0&&V>we&&(V=we),he!==void 0&&V<he&&(V=he),v=V;let Le=v;return(be===xe&&ge||be===Oe&&pe)&&(Le=100-Le),be===xe?d.style.top=`${Le}%`:d.style.left=`${Le}%`,Pe!==v},ne=V=>V===d||d.contains(V),q=(V,he,we,be)=>{R=V,W=he,Z=we,T=be},ce=V=>{D=V,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Ne=(V,he)=>{he==null?d.removeAttribute(V):d.setAttribute(V,he)},Ae=V=>d.getAttribute(V),X=V=>{if(!D){switch(V.key){case"ArrowLeft":{V.preventDefault(),typeof R=="function"&&R(x);break}case"ArrowRight":{V.preventDefault(),typeof W=="function"&&W(x);break}case"ArrowUp":{V.preventDefault(),typeof Z=="function"&&Z(x);break}case"ArrowDown":{V.preventDefault(),typeof T=="function"&&T(x);break}}Ic(u,V)}},ee=()=>{D||kc(u,d)};return d.className=`pointer pointer-${x}`,d.addEventListener("keydown",X),d.addEventListener("click",ee),{$pointer:d,get percent(){return v},get disabled(){return D},set disabled(V){ce(V)},updatePosition:Q,isClicked:ne,setCallbacks:q,setAttr:Ne,getAttr:Ae,destroy:()=>{d.removeEventListener("keydown",X),d.removeEventListener("click",ee),d.remove()}}},jc=u=>{if(u==null)return;if(Array.isArray(u))return u;if(u.trim()==="")return;let d=u.split(","),x=[],v=!0;for(let R=0;R<d.length;R++){let W=d[R].trim();W!==""&&(x.push(W),Ee(W)||(v=!1))}return v?x.map(R=>Number(R)):x},Nc=(u,d)=>d?d.findIndex(x=>x===u||x.toString().trim()===u.toString().trim()):-1,Bc=u=>({updatePosition:(d,x,v,R)=>{if(x.length<=0)return;let W=x.length===1,Z=x[0],T=x[x.length-1];d===xe?(u.style.removeProperty("width"),u.style.removeProperty("right"),u.style.removeProperty("left"),W?u.style.height=`${Z}%`:u.style.height=`${Math.abs(Z-T)}%`,R?(u.style.bottom="0%",W?u.style.top="auto":u.style.top=`${Math.min(100-T,100-Z)}%`):(u.style.bottom="auto",W?u.style.top="0%":u.style.top=`${Math.min(Z,T)}%`)):(u.style.removeProperty("height"),u.style.removeProperty("top"),u.style.removeProperty("bottom"),W?u.style.width=`${Z}%`:u.style.width=`${Math.abs(Z-T)}%`,v?(u.style.right="0%",W?u.style.left="auto":u.style.left=`${Math.min(100-T,100-Z)}%`):(u.style.right="auto",W?u.style.left="0%":u.style.left=`${Math.min(Z,T)}%`))}}),Ts="--animate-onclick",Fc="--width",Hc="--height",qc="--panel-bg-border-radius",Uc="--panel-bg",zc="--panel-bg-hover",Yc="--panel-bg-fill",Wc="--pointer-width",Xc="--pointer-height",Vc="--pointer-border-radius",Kc="--pointer-bg",Gc="--pointer-bg-hover",Jc="--pointer-bg-focus",Zc="--pointer-shadow",Qc="--pointer-shadow-hover",eu="--pointer-shadow-focus",tu="--pointer-border",ru="--pointer-border-hover",iu="--pointer-border-focus",Ar=(u,d,x)=>{let v=new Map;for(let R of u.attributes){let W=R.nodeName.trim().toLowerCase();if(!d.test(W))continue;let Z=W.replace(/\D/g,"").trim(),T=Z===""||Z==="0"||Z==="1"?0:ie(Z,0)-1,D=x&&typeof x=="function"?x(R.value):R.value;v.set(T,D)}return v},nu=u=>{if(!u)return null;let d=u.getAttribute(Me);if(!d)return null;let x=d.split(";"),v=[];for(let R of x)R.trim()!==""&&v.push(R.trim());return v},Is=[[Fc,_,"sliderWidth",null],[Hc,A,"sliderHeight",null],[qc,k,"sliderRadius",null],[Uc,F,"sliderBg",null],[zc,H,"sliderBgHover",null],[Yc,I,"sliderBgFill",null],[Wc,te,"pointer#Width",/^pointer([0-9]*)-width$/],[Xc,le,"pointer#Height",/^pointer([0-9]*)-height$/],[Vc,P,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Kc,L,"pointer#Bg",/^pointer([0-9]*)-bg$/],[Gc,M,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Jc,j,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Zc,C,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Qc,G,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[eu,Y,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[tu,oe,"pointer#Border",/^pointer([0-9]*)-border$/],[ru,re,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[iu,ye,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],su=(u,d,x)=>{let v=null,R=[],W=new Map,Z=(X,ee=d)=>{let V=[...ee.classList];for(let he of V)he.startsWith(X)&&d.classList.remove(he)},T=()=>{Z("shape");let X=d.querySelectorAll(".pointer");for(let ee of X)Z("shape",ee)},D=X=>{v=X,Z("theme-"),typeof X=="string"&&d.classList.add(`theme-${X}`)},Q=()=>{if(T(),!(R.length<=0)){d.classList.add("shape",`shape-${R[0]}`);for(let X=1;X<R.length;X++){let ee=R[X];if(!ee)continue;let V=d.querySelector(`.pointer-${X}`);!V||V.classList.add("shape",`shape-${ee}`)}}},ne=(X,ee)=>{R[X]=ee,Q()},q=()=>{T();let X=Ar(u,/^pointer([0-9]*)-shape$/);if(!(X.size<=0)){for(let ee of X){let V=ee[0];R[V]=ee[1]}Q()}},ce=(X,ee)=>`${X}-${ee}`,Ne=(X,ee,V)=>{let he=x[V];if(!he)return;let we=V===0?d:he.$pointer;if(ee==null){W.has(ce(X,V))&&W.delete(ce(X,V)),we.style.removeProperty(X);return}W.set(ce(X,V),ee),we.style.setProperty(X,ee)},Ae=(X,ee)=>W.get(ce(X,ee));return(()=>{for(let X of Is){let[ee,V,he,we]=X;if(we){let pe=Ar(u,we);for(let ge of pe){let Pe=ge[0],Le=ge[1];Ne(ee,Le,Pe)}}else{let pe=u.getAttribute(V);Ne(ee,pe,0)}let be=[];if(he.indexOf("#")===-1)be.push([he,0]);else{be.push([he.replace("#",""),0]),be.push([he.replace("#","0"),0]),be.push([he.replace("#","1"),0]);for(let pe=1;pe<x.length;pe++)be.push([he.replace("#",(pe+1).toString()),pe])}for(let pe of be)try{let ge=pe[0],Pe=pe[1];Object.prototype.hasOwnProperty.call(u,ge)||Object.defineProperty(u,ge,{get(){return Ae(ee,Pe)},set:Le=>{Ne(ee,Le,Pe)}})}catch(ge){console.error(ge)}}D(u.getAttribute(z)),q()})(),{setStyle:Ne,getStyle:Ae,get theme(){return v},set theme(X){D(X)},get pointerShapes(){return R},setPointerShape:ne}},Ft="animate-on-click",Ds="range-dragging",ou=(u,d,x,v)=>{let R=[],W=ne=>{for(let q of R)q.update&&typeof q.update=="function"&&q.update(ne)},Z=()=>{for(let ne of R)ne.destroy&&typeof ne.destroy=="function"&&ne.destroy()},T=(ne,q)=>{for(let ce of R)ce.onAttrChange&&typeof ce.onAttrChange=="function"&&ce.onAttrChange(ne,q)},D=ne=>{if(ne.gettersAndSetters){for(let q of ne.gettersAndSetters)if(!(!q.name||!q.attributes))try{Object.prototype.hasOwnProperty.call(u,q.name)||Object.defineProperty(u,q.name,q.attributes)}catch(ce){console.error("defineSettersGetters error:",ce)}}},Q=ne=>{var q;if(!ne.css)return;let ce=(q=u.shadowRoot)==null?void 0:q.querySelector("style");!ce||(ce.innerHTML+=ne.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let ne of window.tcRangeSliderPlugins){let q=ne();R.push(q),q.init&&typeof q.init=="function"&&(q.init(u,d,x,v),D(q),Q(q))}},update:W,onAttrChange:T,destroy:Z}},lu=10,js=20,au=(u,d)=>{let x=new Map,v=/^value([0-9]*)$/;for(let T of u.attributes){let D=T.nodeName.trim().toLowerCase();if(!v.test(D))continue;let Q=D.replace("value","").trim(),ne=Q===""||Q==="0"||Q==="1"?0:ie(Q,0)-1,q=Ee(T.value)?ie(T.value,0):T.value;x.set(ne,q)}let R=Math.max(...Array.from(x.keys())),W=[];W.push([Oi(u,d,0),x.get(0)]);let Z=d;for(let T=1;T<=R;T++){let D=d.cloneNode(!0);Z.after(D),Z=D,W.push([Oi(u,D,T),x.get(T)])}return W},Ns=(u,d,x,v,R,W,Z)=>{try{Object.defineProperty(u,v,{configurable:!0,get(){if(!d)return;let T=d.pointers[x];if(!T)return;let D=d.getTextValue(T.percent);return Ee(D)?ie(D,D):D},set:T=>{d.pointers[x]?d==null||d.setValue(T,x):d==null||d.addPointer(T)}}),Object.defineProperty(u,R,{configurable:!0,get(){var T,D;return(D=(T=d==null?void 0:d.pointers[x])==null?void 0:T.getAttr("aria-label"))!=null?D:void 0},set:T=>{!d||d.setAriaLabel(x,T)}}),Object.defineProperty(u,W,{configurable:!0,get(){var T,D;return(D=(T=d==null?void 0:d.styles)==null?void 0:T.pointerShapes[x])!=null?D:null},set:T=>{!d||!d.styles||d.styles.setPointerShape(x,T)}}),Object.defineProperty(u,Z,{configurable:!0,get(){var T;return(T=d==null?void 0:d.pointers[x].disabled)!=null?T:!1},set:T=>{if(!d)return;let D=d==null?void 0:d.pointers[x];!D||(D.disabled=T)}})}catch(T){console.error(T)}},cu=(u,d)=>{let x=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let v=2;v<lu;v++)x.push([`value${v}`,`ariaLabel${v}`,`pointer${v}Shape`,`pointer${v}Disabled`,v-1]);for(let v of x)Ns(u,d,v[4],v[0],v[1],v[2],v[3])},Bs=(u,d,x)=>{var v;let R=(v=x.shadowRoot)==null?void 0:v.querySelector(".container");if(R)for(let W of u)d?R.prepend(W.$pointer):R.append(W.$pointer)},uu=(u,d)=>{if(!(!d||u.length<=1)){for(let x of u)x.$pointer.style.zIndex=js.toString();d.$pointer.style.zIndex=(js*2).toString()}},Pi=0,sr=100,Ht=2,Fs="0.3s",hu=(u,d,x)=>{let v=x.map(h=>h[0]),R=null,W=null,Z=null,T=null,D=Pi,Q=sr,ne,q,ce=Oe,Ne=Ht,Ae=!1,X=!1,ee=!1,V=0,he=1/0,we=!1,be,pe,ge=!1,Pe=!1,Le=!1,ft=Fs,Hs=[],qs=h=>{ge||(h.preventDefault&&h.preventDefault(),Et(h),window.addEventListener("mousemove",Et),window.addEventListener("mouseup",Mr),Rc(u,h))},Mr=h=>{ge||(be=void 0,pe=void 0,window.removeEventListener("mousemove",Et),window.removeEventListener("mouseup",Mr),ft&&d.classList.add(Ft),Tc(u,h))},pu=(h,$)=>{if(v.length<=0)return;if(v.length===1)return v[0].isClicked(h)&&ft&&d.classList.remove(Ft),v[0];let N=mu(h);if(we){let ae=$,Ue=Pr(ae);Ue!==void 0&&(ae=qe(ae,Ue)),N?(be=ae,pe=0,ft&&d.classList.remove(Ft)):be!==void 0&&(pe=ae-be,be=ae)}if(!gu(h)&&!N){for(let ae of v)if(!(!ae.isClicked(h)||ae.disabled))return ft&&d.classList.remove(Ft),ae;for(let ae of v)if(R===ae)return ae}let ue=1/0,me=null;for(let ae of v){if(ae.disabled)continue;let Ue=Math.abs($-ae.percent);Ue<ue&&(ue=Ue,me=ae)}return me},Us=()=>v.findIndex(h=>R===h&&!h.disabled),Et=h=>{let $;if(ce===xe){let{height:ue,top:me}=d.getBoundingClientRect(),ae=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;$=Math.min(Math.max(0,ae-me),ue)*100/ue}else{let{width:ue,left:me}=d.getBoundingClientRect(),ae=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;$=Math.min(Math.max(0,ae-me),ue)*100/ue}if((Ae||X)&&($=100-$),R=pu(h.target,$),R&&uu(v,R),we&&v.length>1&&pe!==void 0){let ue=v[0],me=v[v.length-1],ae=ue.percent+pe<0,Ue=me.percent+pe>100;if(ae||Ue)return;for(let jr=0;jr<v.length;jr++)Ce(jr,v[jr].percent+pe);return}let N=Us();N!==-1&&(Ce(N,$),R==null||R.$pointer.focus())},Or=h=>{if(ge||document.activeElement!==u||R!=null&&R.disabled)return;h.stopPropagation(),h.preventDefault();let $=h.deltaY<0,N=Ae||X,ue=$?!N:N,me=Us();me!==-1&&(ue?or(me,v[me].percent):lr(me,v[me].percent))},zs=h=>{ge||Pe||(ce===xe?X?Ce(h,100):Ce(h,0):Ae?lr(h,v[h].percent):or(h,v[h].percent))},Ys=h=>{ge||Pe||(ce===xe?X?Ce(h,0):Ce(h,100):Ae?or(h,v[h].percent):lr(h,v[h].percent))},Ws=h=>{ge||Pe||(ce===xe?X?lr(h,v[h].percent):or(h,v[h].percent):Ae?Ce(h,100):Ce(h,0))},Xs=h=>{ge||Pe||(ce===xe?X?or(h,v[h].percent):lr(h,v[h].percent):Ae?Ce(h,0):Ce(h,100))},gu=h=>h.classList.contains("panel"),mu=h=>h.classList.contains("panel-fill"),or=(h,$)=>{if($===void 0)return;let N=Pr($);N==null&&(N=1),$-=N,$<0&&($=0),Ce(h,$)},lr=(h,$)=>{if($===void 0)return;let N=Pr($);N==null&&(N=1),$+=N,$>100&&($=100),Ce(h,$)},St=()=>{!T||T.update({percents:Vs(),values:Ks(),$pointers:Gs(),min:Js(),max:Zs(),data:ki(),step:Ci(),round:Ti(),type:Ri(),textMin:Lr(),textMax:Cr(),rightToLeft:ji(),bottomToTop:Ni(),pointersOverlap:qi(),pointersMinDistance:Ii(),pointersMaxDistance:Di(),rangeDragging:Ui(),disabled:Bi(),keyboardDisabled:Fi(),mousewheelDisabled:Hi()})},yu=()=>{St()},vu=h=>{if(!(ee||v.length<=1||Q===D))if(h===0){let $=he*100/(Q-D);return Math.max(0,v[h+1].percent-$)}else{let $=V*100/(Q-D);return Math.min(v[h-1].percent+$,100)}},bu=h=>{if(!(ee||v.length<=1||Q===D))if(h===v.length-1){let $=he*100/(Q-D);return Math.min(v[h-1].percent+$,100)}else{let $=V*100/(Q-D);return Math.max(0,v[h+1].percent-$)}},Pr=h=>{let $;if(typeof ne=="function"){let N=nt(0,100,D,Q,h);$=ne(N,h)}else $=ne;if(Ee($)){let N=Q-D;return $=N===0?0:$*100/N,$}},qt=h=>{if(h===void 0)return;let $=nt(0,100,D,Q,h);return q!==void 0?q[Math.round($)]:_t($,Ne)},Lr=()=>q!==void 0?q[D]:D,Cr=()=>q!==void 0?q[Q]:Q,Ci=()=>ne,xu=h=>{var $;return h<=0||ee?Lr():($=qt(v[h-1].percent))!=null?$:""},wu=h=>{var $;return v.length<=1||h>=v.length-1||ee?Cr():($=qt(v[h+1].percent))!=null?$:""},Vs=()=>v.map(h=>h.percent),Ks=()=>v.map(h=>qt(h.percent)),Gs=()=>v.map(h=>h.$pointer),Js=()=>D,Zs=()=>Q,ki=()=>q,Ri=()=>ce,Ti=()=>Ne,Ii=()=>V,Di=()=>he,$u=h=>Hs[h],ji=()=>Ae,Ni=()=>X,Bi=()=>ge,Fi=()=>Pe,Hi=()=>Le,qi=()=>ee,Ui=()=>we,Ce=(h,$)=>{if($===void 0)return;let N=Pr($);N!==void 0&&($=qe($,N));let ue=v[h];if(!ue)return;let me=ue.updatePosition($,vu(h),bu(h),ce,Ae,X);W==null||W.updatePosition(ce,v.map(ae=>ae.percent),Ae,X),St();for(let ae of v){let Ue=qt(ae.percent);Ue!==void 0&&(ae.setAttr("aria-valuenow",Ue.toString()),ae.setAttr("aria-valuetext",Ue.toString()))}Eu(),me&&Dc(u,v.map(ae=>qt(ae.percent)))},Ge=()=>{for(let h=0;h<v.length;h++)Ce(h,v[h].percent)},_u=(h,$)=>{D=q!==void 0?0:ie(h,Pi),Q=q!==void 0?q.length-1:ie($,sr),kr(D),Rr(Q)},Eu=()=>{var h,$;for(let N=0;N<v.length;N++){let ue=v[N];ue.setAttr("aria-valuemin",((h=xu(N))!=null?h:"").toString()),ue.setAttr("aria-valuemax",(($=wu(N))!=null?$:"").toString())}},kr=h=>{D=ie(h,Pi),D>Q&&(Q=D+sr),Ge()},Rr=h=>{Q=ie(h,sr),Q<D&&(Q=D+sr),Ge()},Qs=h=>{ee=!0;for(let $=0;$<h.length;$++)Tr(h[$],$);ee=!1;for(let $=0;$<h.length;$++)Tr(h[$],$)},Tr=(h,$)=>{let N;q!==void 0?(N=h==null?0:Nc(h,q),N===-1&&(N=0)):(N=ie(h,D),N<D&&(N=D),N>Q&&(N=Q));let ue=nt(D,Q,0,100,N);Ce($,ue)},Ir=h=>{if(h==null){ne=void 0;return}if(typeof h=="function"){ne=h,Ge();return}if(Ee(h)){ne=ie(h,1);let $=Math.abs(Q-D);ne>$&&(ne=void 0),Ge();return}ne=void 0},zi=h=>{ee=h,Ge()},Yi=h=>{(!Ee(h)||h<0)&&(h=0),V=h},Wi=h=>{(!Ee(h)||h<0)&&(h=1/0),he=h},Xi=h=>{ge=h,d.classList.toggle("disabled",ge),ge?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},eo=h=>{Pe=h},to=h=>{Le=h,Le?document.removeEventListener("wheel",Or):document.addEventListener("wheel",Or,{passive:!1})},Vi=h=>{if(h==null){q=void 0;return}if(q=jc(h),q===void 0||q.length<=0){q=void 0;return}kr(0),Rr(q.length-1),ne===void 0&&Ir(1)},Ki=h=>{var $;typeof h=="string"?ce=h.trim().toLowerCase()===xe?xe:Oe:ce=Oe;let N=($=u.shadowRoot)==null?void 0:$.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${ce}`,Ge();let ue=ce===xe?"vertical":"horizontal";for(let me of v)me.setAttr("aria-orientation",ue)},Gi=h=>{Ae=h,v.length>1&&Bs(v,Ae,u),Ge(),St()},Ji=h=>{X=h,v.length>1&&Bs(v,X,u),Ge(),St()},Zi=h=>{Ne=ie(h,Ht),Ne<0&&(Ne=Ht),St()},ro=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(ft=void 0,d.style.removeProperty(Ts),d.classList.remove(Ft)):(ft=h.toString(),d.style.setProperty(Ts,ft),d.classList.add(Ft))},io=(h,$)=>{let N=v[h];!N||(N.setAttr("aria-label",$),Hs[h]=$)},Dr=h=>{if(be=void 0,v.length<=1){we=!1,d.classList.remove(Ds);return}we=h,d.classList.toggle(Ds,we)},Su=()=>{Xi(fe(u.getAttribute(m))),Pe=fe(u.getAttribute(w)),Le=fe(u.getAttribute(S));let h=Ar(u,/^pointer([0-9]*)-disabled$/,$=>fe($));for(let $ of h){let N=$[0];!v[N]||(v[N].disabled=$[1])}},Au=()=>{let h=Ar(u,/^aria-label([0-9]*)$/);for(let $ of h){let N=$[0];io(N,$[1])}},Mu=h=>{let $=v.length,N=v[$-1].$pointer,ue=N.cloneNode(!0);N.after(ue);let me=Oi(u,ue,$);return me.setCallbacks(zs,Ys,Ws,Xs),v.push(me),Tr(h,$),Ge(),St(),$},Ou=()=>{let h=v.length,$=v[h-1];return $?($.destroy(),v.pop(),v.length<=1&&Dr(!1),Ge(),St(),h-1):-1};return(()=>{var h,$;for(let ue of v)ue.setCallbacks(zs,Ys,Ws,Xs);let N=(h=u.shadowRoot)==null?void 0:h.querySelector(".panel-fill");N&&(W=Bc(N)),Ki(u.getAttribute(O)),Gi(fe(u.getAttribute(B))),Ji(fe(u.getAttribute(g))),_u(u.getAttribute(p),u.getAttribute(b)),Ir(u.getAttribute(y)),Vi(u.getAttribute(f)),Qs(x.map(ue=>ue[1])),zi(fe(u.getAttribute(o))),Yi(ie(u.getAttribute(l),0)),Wi(ie(u.getAttribute(a),1/0)),Dr(fe(u.getAttribute(c))),Zi(ie(u.getAttribute(E),Ht)),Su(),Au(),Z=su(u,d,v),ro(($=u.getAttribute(ve))!=null?$:Fs),d.addEventListener("mousedown",qs),d.addEventListener("mouseup",Mr),d.addEventListener("touchmove",Et),d.addEventListener("touchstart",Et),Le||document.addEventListener("wheel",Or,{passive:!1}),T=ou(u,yu,{setValues:Qs,setMin:kr,setMax:Rr,setStep:Ir,setPointersOverlap:zi,setPointersMinDistance:Yi,setPointersMaxDistance:Wi,setDisabled:Xi,setType:Ki,setRightToLeft:Gi,setBottomToTop:Ji,setRound:Zi,setKeyboardDisabled:eo,setMousewheelDisabled:to,setRangeDragging:Dr,setData:Vi},{getPercents:Vs,getValues:Ks,getPointerElements:Gs,getMin:Js,getMax:Zs,getStep:Ci,getData:ki,getType:Ri,getRound:Ti,getTextMin:Lr,getTextMax:Cr,isRightToLeft:ji,isBottomToTop:Ni,isDisabled:Bi,isKeyboardDisabled:Fi,isMousewheelDisabled:Hi,isPointersOverlap:qi,isRangeDraggingEnabled:Ui,getPointersMinDistance:Ii,getPointersMaxDistance:Di}),T.init()})(),{get pointers(){return v},get styles(){return Z},get pluginsManager(){return T},get min(){return Lr()},get max(){return Cr()},get step(){return Ci()},get pointersOverlap(){return qi()},set pointersOverlap(h){zi(h)},get pointersMinDistance(){return Ii()},set pointersMinDistance(h){Yi(h)},get pointersMaxDistance(){return Di()},set pointersMaxDistance(h){Wi(h)},get disabled(){return Bi()},set disabled(h){Xi(h)},get data(){return ki()},get type(){return Ri()},set type(h){Ki(h)},get rightToLeft(){return ji()},set rightToLeft(h){Gi(h)},get bottomToTop(){return Ni()},set bottomToTop(h){Ji(h)},get round(){return Ti()},set round(h){Zi(h)},get animateOnClick(){return ft},set animateOnClick(h){ro(h)},get keyboardDisabled(){return Fi()},set keyboardDisabled(h){eo(h)},get mousewheelDisabled(){return Hi()},set mousewheelDisabled(h){to(h)},get rangeDragging(){return Ui()},set rangeDragging(h){Dr(h)},setMin:kr,setMax:Rr,setValue:Tr,setStep:Ir,setData:Vi,getTextValue:qt,setAriaLabel:io,getAriaLabel:$u,addPointer:Mu,removePointer:Ou,destroy:()=>{d.removeEventListener("mousedown",qs),d.removeEventListener("mouseup",Mr),d.removeEventListener("touchmove",Et),d.removeEventListener("touchstart",Et),document.removeEventListener("wheel",Or);for(let h of v)h.destroy();T==null||T.destroy()}}},du=(u,d,x)=>{let v=Is.find(([T,D,Q,ne])=>D.replace("#","")===d.replace(/\d+/g,""));if(v&&u.styles){let[T,D,Q,ne]=v,q=d.replace(/\D/g,"").trim(),ce=q===""||q==="0"||q==="1"?0:ie(q,0)-1;u.styles.setStyle(T,x,ce);return}switch(u&&u.pluginsManager&&u.pluginsManager.onAttrChange(d,x),d){case p:{u.setMin(x);break}case b:{u.setMax(x);break}case y:{u.setStep(x);break}case o:{u.pointersOverlap=fe(x);break}case l:{u.pointersMinDistance=ie(x,0);break}case c:{u.rangeDragging=fe(x);break}case a:{u.pointersMaxDistance=ie(x,1/0);break}case m:{u.disabled=fe(x);break}case w:{u.keyboardDisabled=fe(x);break}case S:{u.mousewheelDisabled=fe(x);break}case f:{u.setData(x);break}case O:{u.type=x;break}case B:{u.rightToLeft=fe(x);break}case g:{u.bottomToTop=fe(x);break}case E:{u.round=ie(x,Ht);break}case z:{u.styles&&(u.styles.theme=x);break}case ve:{u.animateOnClick=x;break}}let R=null;if(/^value([0-9]*)$/.test(d)&&(R="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(R="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(R="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(R="pointer-shape"),!R)return;let W=d.replace(/\D/g,"").trim(),Z=W===""||W==="0"||W==="1"?0:ie(W,0)-1;switch(R){case"value":{u.setValue(x,Z);break}case"pointer-disabled":{let T=u==null?void 0:u.pointers[Z];if(!T)return;T.disabled=fe(x);break}case"aria-label":{u.setAriaLabel(Z,x);break}case"pointer-shape":{u.styles&&u.styles.setPointerShape(Z,x);break}}},fu=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(u){this.slider&&this.slider.setStep(u)}get step(){var u;return(u=this.slider)==null?void 0:u.step}set disabled(u){this.slider&&(this.slider.disabled=u)}get disabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.disabled)!=null?d:!1}set data(u){var d;(d=this.slider)==null||d.setData(u)}get data(){var u;return(u=this.slider)==null?void 0:u.data}set min(u){var d;(d=this.slider)==null||d.setMin(u)}get min(){var u;return(u=this.slider)==null?void 0:u.min}set max(u){var d;(d=this.slider)==null||d.setMax(u)}get max(){var u;return(u=this.slider)==null?void 0:u.max}set round(u){!this.slider||(this.slider.round=u)}get round(){var u,d;return(d=(u=this.slider)==null?void 0:u.round)!=null?d:Ht}set type(u){!this.slider||(this.slider.type=u??Oe)}get type(){var u;return((u=this.slider)==null?void 0:u.type)||Oe}set pointersOverlap(u){!this.slider||(this.slider.pointersOverlap=u)}get pointersOverlap(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersOverlap)!=null?d:!1}set pointersMinDistance(u){!this.slider||(this.slider.pointersMinDistance=u)}get pointersMinDistance(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersMinDistance)!=null?d:0}set pointersMaxDistance(u){!this.slider||(this.slider.pointersMaxDistance=u)}get pointersMaxDistance(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersMaxDistance)!=null?d:1/0}set theme(u){!this.slider||!this.slider.styles||(this.slider.styles.theme=u)}get theme(){var u,d,x;return(x=(d=(u=this.slider)==null?void 0:u.styles)==null?void 0:d.theme)!=null?x:null}set rtl(u){!this.slider||(this.slider.rightToLeft=u)}get rtl(){var u,d;return(d=(u=this.slider)==null?void 0:u.rightToLeft)!=null?d:!1}set btt(u){!this.slider||(this.slider.bottomToTop=u)}get btt(){var u,d;return(d=(u=this.slider)==null?void 0:u.bottomToTop)!=null?d:!1}set keyboardDisabled(u){!this.slider||(this.slider.keyboardDisabled=u)}get keyboardDisabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(u){!this.slider||(this.slider.mousewheelDisabled=u)}get mousewheelDisabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.mousewheelDisabled)!=null?d:!1}set animateOnClick(u){!this.slider||(this.slider.animateOnClick=u)}get animateOnClick(){var u;return(u=this.slider)==null?void 0:u.animateOnClick}get rangeDragging(){var u,d;return(d=(u=this.slider)==null?void 0:u.rangeDragging)!=null?d:!1}set rangeDragging(u){this.slider&&(this.slider.rangeDragging=fe(u))}get externalCSSList(){return this._externalCSSList}addPointer(u){var d,x;if(!this.slider)return;let v=(x=(d=this.slider)==null?void 0:d.addPointer(u))!=null?x:0;Ns(this,this.slider,v,`value${v+1}`,`ariaLabel${v+1}`,`pointerShape${v+1}`,`pointer${v+1}Disabled`)}removePointer(){var u;!this.slider||(u=this.slider)==null||u.removePointer()}addCSS(u){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=u,this.shadowRoot.appendChild(d)}connectedCallback(){var u,d;if(!this.shadowRoot)return;this._externalCSSList=nu(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let x=(u=this.shadowRoot)==null?void 0:u.querySelector(".pointer");if(!x)return;let v=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!v)return;let R=au(this,x);this.slider=hu(this,v,R),cu(this,this.slider),this._observer=new MutationObserver(W=>{W.forEach(Z=>{var T;if(!this.slider||Z.type!=="attributes")return;let D=Z.attributeName;!D||du(this.slider,D,(T=this.getAttribute(D))!=null?T:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Li=fu;window.tcRangeSlider=Li,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Li),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Li{})})();var Pt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Kr(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}),r}var Ln={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(Pt,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",o="second",l="minute",a="hour",c="day",f="week",p="month",b="quarter",y="year",E="date",O="Invalid Date",z=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|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,g={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(P){var L=["th","st","nd","rd"],M=P%100;return"["+P+(L[(M-20)%10]||L[M]||L[0])+"]"}},m=function(P,L,M){var j=String(P);return!j||j.length>=L?P:""+Array(L+1-j.length).join(M)+P},w={s:m,z:function(P){var L=-P.utcOffset(),M=Math.abs(L),j=Math.floor(M/60),C=M%60;return(L<=0?"+":"-")+m(j,2,"0")+":"+m(C,2,"0")},m:function P(L,M){if(L.date()<M.date())return-P(M,L);var j=12*(M.year()-L.year())+(M.month()-L.month()),C=L.clone().add(j,p),G=M-C<0,Y=L.clone().add(j+(G?-1:1),p);return+(-(j+(M-C)/(G?C-Y:Y-C))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:p,y,w:f,d:c,D:E,h:a,m:l,s:o,ms:s,Q:b}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},S="en",_={};_[S]=g;var A="$isDayjsObject",k=function(P){return P instanceof te||!(!P||!P[A])},F=function P(L,M,j){var C;if(!L)return S;if(typeof L=="string"){var G=L.toLowerCase();_[G]&&(C=G),M&&(_[G]=M,C=G);var Y=L.split("-");if(!C&&Y.length>1)return P(Y[0])}else{var oe=L.name;_[oe]=L,C=oe}return!j&&C&&(S=C),C||!j&&S},H=function(P,L){if(k(P))return P.clone();var M=typeof L=="object"?L:{};return M.date=P,M.args=arguments,new te(M)},I=w;I.l=F,I.i=k,I.w=function(P,L){return H(P,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var te=function(){function P(M){this.$L=F(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[A]=!0}var L=P.prototype;return L.parse=function(M){this.$d=function(j){var C=j.date,G=j.utc;if(C===null)return new Date(NaN);if(I.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var Y=C.match(z);if(Y){var oe=Y[2]-1||0,re=(Y[7]||"0").substring(0,3);return G?new Date(Date.UTC(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,re)):new Date(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,re)}}return new Date(C)}(M),this.init()},L.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},L.$utils=function(){return I},L.isValid=function(){return this.$d.toString()!==O},L.isSame=function(M,j){var C=H(M);return this.startOf(j)<=C&&C<=this.endOf(j)},L.isAfter=function(M,j){return H(M)<this.startOf(j)},L.isBefore=function(M,j){return this.endOf(j)<H(M)},L.$g=function(M,j,C){return I.u(M)?this[j]:this.set(C,M)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(M,j){var C=this,G=!!I.u(j)||j,Y=I.p(M),oe=function(Ee,ie){var qe=I.w(C.$u?Date.UTC(C.$y,ie,Ee):new Date(C.$y,ie,Ee),C);return G?qe:qe.endOf(c)},re=function(Ee,ie){return I.w(C.toDate()[Ee].apply(C.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(ie)),C)},ye=this.$W,ve=this.$M,Me=this.$D,xe="set"+(this.$u?"UTC":"");switch(Y){case y:return G?oe(1,0):oe(31,11);case p:return G?oe(1,ve):oe(0,ve+1);case f:var Oe=this.$locale().weekStart||0,nt=(ye<Oe?ye+7:ye)-Oe;return oe(G?Me-nt:Me+(6-nt),ve);case c:case E:return re(xe+"Hours",0);case a:return re(xe+"Minutes",1);case l:return re(xe+"Seconds",2);case o:return re(xe+"Milliseconds",3);default:return this.clone()}},L.endOf=function(M){return this.startOf(M,!1)},L.$set=function(M,j){var C,G=I.p(M),Y="set"+(this.$u?"UTC":""),oe=(C={},C[c]=Y+"Date",C[E]=Y+"Date",C[p]=Y+"Month",C[y]=Y+"FullYear",C[a]=Y+"Hours",C[l]=Y+"Minutes",C[o]=Y+"Seconds",C[s]=Y+"Milliseconds",C)[G],re=G===c?this.$D+(j-this.$W):j;if(G===p||G===y){var ye=this.clone().set(E,1);ye.$d[oe](re),ye.init(),this.$d=ye.set(E,Math.min(this.$D,ye.daysInMonth())).$d}else oe&&this.$d[oe](re);return this.init(),this},L.set=function(M,j){return this.clone().$set(M,j)},L.get=function(M){return this[I.p(M)]()},L.add=function(M,j){var C,G=this;M=Number(M);var Y=I.p(j),oe=function(ve){var Me=H(G);return I.w(Me.date(Me.date()+Math.round(ve*M)),G)};if(Y===p)return this.set(p,this.$M+M);if(Y===y)return this.set(y,this.$y+M);if(Y===c)return oe(1);if(Y===f)return oe(7);var re=(C={},C[l]=i,C[a]=n,C[o]=r,C)[Y]||1,ye=this.$d.getTime()+M*re;return I.w(ye,this)},L.subtract=function(M,j){return this.add(-1*M,j)},L.format=function(M){var j=this,C=this.$locale();if(!this.isValid())return C.invalidDate||O;var G=M||"YYYY-MM-DDTHH:mm:ssZ",Y=I.z(this),oe=this.$H,re=this.$m,ye=this.$M,ve=C.weekdays,Me=C.months,xe=C.meridiem,Oe=function(ie,qe,_t,fe){return ie&&(ie[qe]||ie(j,G))||_t[qe].slice(0,fe)},nt=function(ie){return I.s(oe%12||12,ie,"0")},Ee=xe||function(ie,qe,_t){var fe=ie<12?"AM":"PM";return _t?fe.toLowerCase():fe};return G.replace(B,function(ie,qe){return qe||function(_t){switch(_t){case"YY":return String(j.$y).slice(-2);case"YYYY":return I.s(j.$y,4,"0");case"M":return ye+1;case"MM":return I.s(ye+1,2,"0");case"MMM":return Oe(C.monthsShort,ye,Me,3);case"MMMM":return Oe(Me,ye);case"D":return j.$D;case"DD":return I.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return Oe(C.weekdaysMin,j.$W,ve,2);case"ddd":return Oe(C.weekdaysShort,j.$W,ve,3);case"dddd":return ve[j.$W];case"H":return String(oe);case"HH":return I.s(oe,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return Ee(oe,re,!0);case"A":return Ee(oe,re,!1);case"m":return String(re);case"mm":return I.s(re,2,"0");case"s":return String(j.$s);case"ss":return I.s(j.$s,2,"0");case"SSS":return I.s(j.$ms,3,"0");case"Z":return Y}return null}(ie)||Y.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(M,j,C){var G,Y=this,oe=I.p(j),re=H(M),ye=(re.utcOffset()-this.utcOffset())*i,ve=this-re,Me=function(){return I.m(Y,re)};switch(oe){case y:G=Me()/12;break;case p:G=Me();break;case b:G=Me()/3;break;case f:G=(ve-ye)/6048e5;break;case c:G=(ve-ye)/864e5;break;case a:G=ve/n;break;case l:G=ve/i;break;case o:G=ve/r;break;default:G=ve}return C?G:I.a(G)},L.daysInMonth=function(){return this.endOf(p).$D},L.$locale=function(){return _[this.$L]},L.locale=function(M,j){if(!M)return this.$L;var C=this.clone(),G=F(M,j,!0);return G&&(C.$L=G),C},L.clone=function(){return I.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},P}(),le=te.prototype;return H.prototype=le,[["$ms",s],["$s",o],["$m",l],["$H",a],["$W",c],["$M",p],["$y",y],["$D",E]].forEach(function(P){le[P[1]]=function(L){return this.$g(L,P[0],P[1])}}),H.extend=function(P,L){return P.$i||(P(L,te,H),P.$i=!0),H},H.locale=F,H.isDayjs=k,H.unix=function(P){return H(1e3*P)},H.en=_[S],H.Ls=_,H.p={},H})})(Ln);var Mo=Ln.exports;const Lt=Vr(Mo);class Oo extends _e{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,r){this._startExpression=e,this._endExpression=r;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,r,i){if(!this.hasTemplate(e))return null;i=i||e;const n=U` <slot name=${i}></slot> `,s={[e]:{...r}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:l}=this._renderedTemplates[i];this.contains(l)&&this.removeChild(l)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let r=0;r<this.children.length;r++){const i=this.children[r];if(i.nodeName==="RENDER-TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=r}}return e}_renderTemplate(e,r,i){let n;if(r&&r.childNodes.length){const s=r.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,r){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),r);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,r){r={...r};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(r)}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,r,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,r,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const Gr=`
|
|
60
60
|
:host {
|
|
61
61
|
display: flex;
|
|
62
62
|
box-sizing: border-box;
|
|
@@ -479,7 +479,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
479
479
|
height: 16px;
|
|
480
480
|
width: 16px;
|
|
481
481
|
}
|
|
482
|
-
`;var Po=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Qr=(t,e,r,i)=>{for(var n=i>1?void 0:i?Lo(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Po(e,r,n),n};let hr=class extends _e{handleDetailsToggle(t){this.dispatchEvent(new CustomEvent("details-toggled",{detail:t,bubbles:!0,composed:!0}))}_resetFilter(){this.querySelector("[slot='filter']").reset()}render(){return
|
|
482
|
+
`;var Po=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Qr=(t,e,r,i)=>{for(var n=i>1?void 0:i?Lo(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Po(e,r,n),n};let hr=class extends _e{handleDetailsToggle(t){this.dispatchEvent(new CustomEvent("details-toggled",{detail:t,bubbles:!0,composed:!0}))}_resetFilter(){this.querySelector("[slot='filter']").reset()}render(){return U`
|
|
483
483
|
<style>
|
|
484
484
|
${Gr}
|
|
485
485
|
${!this.unstyled&&Zr}
|
|
@@ -503,7 +503,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
503
503
|
<slot name="filter"></slot>
|
|
504
504
|
</div>
|
|
505
505
|
</details>
|
|
506
|
-
`}};Qr([J({attribute:!1})],hr.prototype,"filterObject",2),Qr([J()],hr.prototype,"unstyled",2),hr=Qr([ke("eox-itemfilter-expandcontainer")],hr);const Ct=t=>{if(!t.dirty)return null;switch(t.type){case"multiselect":for(const r in t.state)t.state[r]=!1;break;case"range":t.state.min=t.min,t.state.max=t.max;break;case"select":for(const r in t.state)t.state[r]=!1;break;case"spatial":t.state.geometry=void 0;break;case"text":t.keys.forEach(r=>{t.state[r]=void 0});break}return delete t.stringifiedState,delete t.dirty,t},ei=Math.min,kt=Math.max,dr=Math.round,fr=Math.floor,at=t=>({x:t,y:t});function Cn(t){return t.split("-")[0]}function Co(t){return t.split("-")[1]}function ko(t){return t==="x"?"y":"x"}function Ro(t){return t==="y"?"height":"width"}function kn(t){return["top","bottom"].includes(Cn(t))?"y":"x"}function To(t){return ko(kn(t))}function Rn(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Tn(t,e,r){let{reference:i,floating:n}=t;const s=kn(e),o=To(e),l=Ro(o),a=Cn(e),c=s==="y",f=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,b=i[l]/2-n[l]/2;let y;switch(a){case"top":y={x:f,y:i.y-n.height};break;case"bottom":y={x:f,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:p};break;case"left":y={x:i.x-n.width,y:p};break;default:y={x:i.x,y:i.y}}switch(Co(e)){case"start":y[o]-=b*(r&&c?-1:1);break;case"end":y[o]+=b*(r&&c?-1:1);break}return y}const Io=async(t,e,r)=>{const{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,l=s.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:f,y:p}=Tn(c,i,a),b=i,y={},E=0;for(let O=0;O<l.length;O++){const{name:U,fn:B}=l[O],{x:g,y:m,data:w,reset:S}=await B({x:f,y:p,initialPlacement:i,placement:b,strategy:n,middlewareData:y,rects:c,platform:o,elements:{reference:t,floating:e}});f=g??f,p=m??p,y={...y,[U]:{...y[U],...w}},S&&E<=50&&(E++,typeof S=="object"&&(S.placement&&(b=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):S.rects),{x:f,y:p}=Tn(c,b,a)),O=-1)}return{x:f,y:p,placement:b,strategy:n,middlewareData:y}};function ct(t){return In(t)?(t.nodeName||"").toLowerCase():"#document"}function Re(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qe(t){var e;return(e=(In(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function In(t){return t instanceof Node||t instanceof Re(t).Node}function et(t){return t instanceof Element||t instanceof Re(t).Element}function ze(t){return t instanceof HTMLElement||t instanceof Re(t).HTMLElement}function Dn(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Re(t).ShadowRoot}function Zt(t){const{overflow:e,overflowX:r,overflowY:i,display:n}=Ie(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&!["inline","contents"].includes(n)}function Do(t){return["table","td","th"].includes(ct(t))}function ti(t){const e=ri(),r=Ie(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(r.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(r.contain||"").includes(i))}function jo(t){let e=Rt(t);for(;ze(e)&&!pr(e);){if(ti(e))return e;e=Rt(e)}return null}function ri(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pr(t){return["html","body","#document"].includes(ct(t))}function Ie(t){return Re(t).getComputedStyle(t)}function gr(t){return et(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Rt(t){if(ct(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Dn(t)&&t.host||Qe(t);return Dn(e)?e.host:e}function jn(t){const e=Rt(t);return pr(e)?t.ownerDocument?t.ownerDocument.body:t.body:ze(e)&&Zt(e)?e:jn(e)}function Qt(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);const n=jn(t),s=n===((i=t.ownerDocument)==null?void 0:i.body),o=Re(n);return s?e.concat(o,o.visualViewport||[],Zt(n)?n:[],o.frameElement&&r?Qt(o.frameElement):[]):e.concat(n,Qt(n,[],r))}function Nn(t){const e=Ie(t);let r=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const n=ze(t),s=n?t.offsetWidth:r,o=n?t.offsetHeight:i,l=dr(r)!==s||dr(i)!==o;return l&&(r=s,i=o),{width:r,height:i,$:l}}function ii(t){return et(t)?t:t.contextElement}function Tt(t){const e=ii(t);if(!ze(e))return at(1);const r=e.getBoundingClientRect(),{width:i,height:n,$:s}=Nn(e);let o=(s?dr(r.width):r.width)/i,l=(s?dr(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const No=at(0);function Bn(t){const e=Re(t);return!ri()||!e.visualViewport?No:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Bo(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Re(t)?!1:e}function bt(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=ii(t);let o=at(1);e&&(i?et(i)&&(o=Tt(i)):o=Tt(t));const l=Bo(s,r,i)?Bn(s):at(0);let a=(n.left+l.x)/o.x,c=(n.top+l.y)/o.y,f=n.width/o.x,p=n.height/o.y;if(s){const b=Re(s),y=i&&et(i)?Re(i):i;let E=b,O=E.frameElement;for(;O&&i&&y!==E;){const U=Tt(O),B=O.getBoundingClientRect(),g=Ie(O),m=B.left+(O.clientLeft+parseFloat(g.paddingLeft))*U.x,w=B.top+(O.clientTop+parseFloat(g.paddingTop))*U.y;a*=U.x,c*=U.y,f*=U.x,p*=U.y,a+=m,c+=w,E=Re(O),O=E.frameElement}}return Rn({width:f,height:p,x:a,y:c})}const Fo=[":popover-open",":modal"];function Fn(t){return Fo.some(e=>{try{return t.matches(e)}catch{return!1}})}function Ho(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t;const s=n==="fixed",o=Qe(i),l=e?Fn(e.floating):!1;if(i===o||l&&s)return r;let a={scrollLeft:0,scrollTop:0},c=at(1);const f=at(0),p=ze(i);if((p||!p&&!s)&&((ct(i)!=="body"||Zt(o))&&(a=gr(i)),ze(i))){const b=bt(i);c=Tt(i),f.x=b.x+i.clientLeft,f.y=b.y+i.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-a.scrollLeft*c.x+f.x,y:r.y*c.y-a.scrollTop*c.y+f.y}}function qo(t){return Array.from(t.getClientRects())}function Hn(t){return bt(Qe(t)).left+gr(t).scrollLeft}function Uo(t){const e=Qe(t),r=gr(t),i=t.ownerDocument.body,n=kt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=kt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-r.scrollLeft+Hn(t);const l=-r.scrollTop;return Ie(i).direction==="rtl"&&(o+=kt(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:o,y:l}}function zo(t,e){const r=Re(t),i=Qe(t),n=r.visualViewport;let s=i.clientWidth,o=i.clientHeight,l=0,a=0;if(n){s=n.width,o=n.height;const c=ri();(!c||c&&e==="fixed")&&(l=n.offsetLeft,a=n.offsetTop)}return{width:s,height:o,x:l,y:a}}function Yo(t,e){const r=bt(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,s=ze(t)?Tt(t):at(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,a=n*s.x,c=i*s.y;return{width:o,height:l,x:a,y:c}}function qn(t,e,r){let i;if(e==="viewport")i=zo(t,r);else if(e==="document")i=Uo(Qe(t));else if(et(e))i=Yo(e,r);else{const n=Bn(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return Rn(i)}function Un(t,e){const r=Rt(t);return r===e||!et(r)||pr(r)?!1:Ie(r).position==="fixed"||Un(r,e)}function Wo(t,e){const r=e.get(t);if(r)return r;let i=Qt(t,[],!1).filter(l=>et(l)&&ct(l)!=="body"),n=null;const s=Ie(t).position==="fixed";let o=s?Rt(t):t;for(;et(o)&&!pr(o);){const l=Ie(o),a=ti(o);!a&&l.position==="fixed"&&(n=null),(s?!a&&!n:!a&&l.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Zt(o)&&!a&&Un(t,o))?i=i.filter(f=>f!==o):n=l,o=Rt(o)}return e.set(t,i),i}function Xo(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t;const o=[...r==="clippingAncestors"?Wo(e,this._c):[].concat(r),i],l=o[0],a=o.reduce((c,f)=>{const p=qn(e,f,n);return c.top=kt(p.top,c.top),c.right=ei(p.right,c.right),c.bottom=ei(p.bottom,c.bottom),c.left=kt(p.left,c.left),c},qn(e,l,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Vo(t){const{width:e,height:r}=Nn(t);return{width:e,height:r}}function Ko(t,e,r){const i=ze(e),n=Qe(e),s=r==="fixed",o=bt(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const a=at(0);if(i||!i&&!s)if((ct(e)!=="body"||Zt(n))&&(l=gr(e)),i){const p=bt(e,!0,s,e);a.x=p.x+e.clientLeft,a.y=p.y+e.clientTop}else n&&(a.x=Hn(n));const c=o.left+l.scrollLeft-a.x,f=o.top+l.scrollTop-a.y;return{x:c,y:f,width:o.width,height:o.height}}function zn(t,e){return!ze(t)||Ie(t).position==="fixed"?null:e?e(t):t.offsetParent}function Yn(t,e){const r=Re(t);if(!ze(t)||Fn(t))return r;let i=zn(t,e);for(;i&&Do(i)&&Ie(i).position==="static";)i=zn(i,e);return i&&(ct(i)==="html"||ct(i)==="body"&&Ie(i).position==="static"&&!ti(i))?r:i||jo(t)||r}const Go=async function(t){const e=this.getOffsetParent||Yn,r=this.getDimensions;return{reference:Ko(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await r(t.floating)}}};function Jo(t){return Ie(t).direction==="rtl"}const Zo={convertOffsetParentRelativeRectToViewportRelativeRect:Ho,getDocumentElement:Qe,getClippingRect:Xo,getOffsetParent:Yn,getElementRects:Go,getClientRects:qo,getDimensions:Vo,getScale:Tt,isElement:et,isRTL:Jo};function Qo(t,e){let r=null,i;const n=Qe(t);function s(){var l;clearTimeout(i),(l=r)==null||l.disconnect(),r=null}function o(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();const{left:c,top:f,width:p,height:b}=t.getBoundingClientRect();if(l||e(),!p||!b)return;const y=fr(f),E=fr(n.clientWidth-(c+p)),O=fr(n.clientHeight-(f+b)),U=fr(c),g={rootMargin:-y+"px "+-E+"px "+-O+"px "+-U+"px",threshold:kt(0,ei(1,a))||1};let m=!0;function w(S){const _=S[0].intersectionRatio;if(_!==a){if(!m)return o();_?o(!1,_):i=setTimeout(()=>{o(!1,1e-7)},100)}m=!1}try{r=new IntersectionObserver(w,{...g,root:n.ownerDocument})}catch{r=new IntersectionObserver(w,g)}r.observe(t)}return o(!0),s}function el(t,e,r,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=ii(t),f=n||s?[...c?Qt(c):[],...Qt(e)]:[];f.forEach(B=>{n&&B.addEventListener("scroll",r,{passive:!0}),s&&B.addEventListener("resize",r)});const p=c&&l?Qo(c,r):null;let b=-1,y=null;o&&(y=new ResizeObserver(B=>{let[g]=B;g&&g.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var m;(m=y)==null||m.observe(e)})),r()}),c&&!a&&y.observe(c),y.observe(e));let E,O=a?bt(t):null;a&&U();function U(){const B=bt(t);O&&(B.x!==O.x||B.y!==O.y||B.width!==O.width||B.height!==O.height)&&r(),O=B,E=requestAnimationFrame(U)}return r(),()=>{var B;f.forEach(g=>{n&&g.removeEventListener("scroll",r),s&&g.removeEventListener("resize",r)}),p==null||p(),(B=y)==null||B.disconnect(),y=null,a&&cancelAnimationFrame(E)}}const tl=(t,e,r)=>{const i=new Map,n={platform:Zo,...r},s={...n.platform,_c:i};return Io(t,e,{...n,platform:s})};var rl=Object.defineProperty,il=Object.getOwnPropertyDescriptor,mr=(t,e,r,i)=>{for(var n=i>1?void 0:i?il(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&rl(e,r,n),n};let er=class extends _e{constructor(){super(...arguments),this.open=!1,this.parent=null,this.unstyled=!1,this._clickEventListener=()=>{this.open=!1},this._keyboardEventListener=t=>{const{code:e}=t;["Escape"].includes(e)&&this._handleKeyboard(e)}}_handleKeyboard(t){this.clientHeight}_overlayCleanup(){}connectedCallback(){super.connectedCallback(),this.unstyled||setTimeout(()=>{const t=this.parent||this.renderRoot.querySelector("[name=trigger]").assignedNodes()[0],e=this.renderRoot.querySelector("#dropdown"),r=()=>{e.classList.contains("open")&&tl(t,e,{strategy:"fixed"}).then(({x:i,y:n})=>{Object.assign(e.style,{left:`${i}px`,top:`${n}px`,width:`${t.getBoundingClientRect().width}px`})})};this._overlayCleanup=el(t,e,r)})}disconnectedCallback(){super.disconnectedCallback(),this._overlayCleanup(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener),window.removeEventListener("click",this._clickEventListener)}render(){return W`
|
|
506
|
+
`}};Qr([J({attribute:!1})],hr.prototype,"filterObject",2),Qr([J()],hr.prototype,"unstyled",2),hr=Qr([ke("eox-itemfilter-expandcontainer")],hr);const Ct=t=>{if(!t.dirty)return null;switch(t.type){case"multiselect":for(const r in t.state)t.state[r]=!1;break;case"range":t.state.min=t.min,t.state.max=t.max;break;case"select":for(const r in t.state)t.state[r]=!1;break;case"spatial":t.state.geometry=void 0;break;case"text":t.keys.forEach(r=>{t.state[r]=void 0});break}return delete t.stringifiedState,delete t.dirty,t},ei=Math.min,kt=Math.max,dr=Math.round,fr=Math.floor,at=t=>({x:t,y:t});function Cn(t){return t.split("-")[0]}function Co(t){return t.split("-")[1]}function ko(t){return t==="x"?"y":"x"}function Ro(t){return t==="y"?"height":"width"}function kn(t){return["top","bottom"].includes(Cn(t))?"y":"x"}function To(t){return ko(kn(t))}function Rn(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Tn(t,e,r){let{reference:i,floating:n}=t;const s=kn(e),o=To(e),l=Ro(o),a=Cn(e),c=s==="y",f=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,b=i[l]/2-n[l]/2;let y;switch(a){case"top":y={x:f,y:i.y-n.height};break;case"bottom":y={x:f,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:p};break;case"left":y={x:i.x-n.width,y:p};break;default:y={x:i.x,y:i.y}}switch(Co(e)){case"start":y[o]-=b*(r&&c?-1:1);break;case"end":y[o]+=b*(r&&c?-1:1);break}return y}const Io=async(t,e,r)=>{const{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,l=s.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:f,y:p}=Tn(c,i,a),b=i,y={},E=0;for(let O=0;O<l.length;O++){const{name:z,fn:B}=l[O],{x:g,y:m,data:w,reset:S}=await B({x:f,y:p,initialPlacement:i,placement:b,strategy:n,middlewareData:y,rects:c,platform:o,elements:{reference:t,floating:e}});f=g??f,p=m??p,y={...y,[z]:{...y[z],...w}},S&&E<=50&&(E++,typeof S=="object"&&(S.placement&&(b=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):S.rects),{x:f,y:p}=Tn(c,b,a)),O=-1)}return{x:f,y:p,placement:b,strategy:n,middlewareData:y}};function ct(t){return In(t)?(t.nodeName||"").toLowerCase():"#document"}function Re(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qe(t){var e;return(e=(In(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function In(t){return t instanceof Node||t instanceof Re(t).Node}function et(t){return t instanceof Element||t instanceof Re(t).Element}function ze(t){return t instanceof HTMLElement||t instanceof Re(t).HTMLElement}function Dn(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Re(t).ShadowRoot}function Zt(t){const{overflow:e,overflowX:r,overflowY:i,display:n}=Ie(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&!["inline","contents"].includes(n)}function Do(t){return["table","td","th"].includes(ct(t))}function ti(t){const e=ri(),r=Ie(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(r.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(r.contain||"").includes(i))}function jo(t){let e=Rt(t);for(;ze(e)&&!pr(e);){if(ti(e))return e;e=Rt(e)}return null}function ri(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pr(t){return["html","body","#document"].includes(ct(t))}function Ie(t){return Re(t).getComputedStyle(t)}function gr(t){return et(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Rt(t){if(ct(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Dn(t)&&t.host||Qe(t);return Dn(e)?e.host:e}function jn(t){const e=Rt(t);return pr(e)?t.ownerDocument?t.ownerDocument.body:t.body:ze(e)&&Zt(e)?e:jn(e)}function Qt(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);const n=jn(t),s=n===((i=t.ownerDocument)==null?void 0:i.body),o=Re(n);return s?e.concat(o,o.visualViewport||[],Zt(n)?n:[],o.frameElement&&r?Qt(o.frameElement):[]):e.concat(n,Qt(n,[],r))}function Nn(t){const e=Ie(t);let r=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const n=ze(t),s=n?t.offsetWidth:r,o=n?t.offsetHeight:i,l=dr(r)!==s||dr(i)!==o;return l&&(r=s,i=o),{width:r,height:i,$:l}}function ii(t){return et(t)?t:t.contextElement}function Tt(t){const e=ii(t);if(!ze(e))return at(1);const r=e.getBoundingClientRect(),{width:i,height:n,$:s}=Nn(e);let o=(s?dr(r.width):r.width)/i,l=(s?dr(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const No=at(0);function Bn(t){const e=Re(t);return!ri()||!e.visualViewport?No:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Bo(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Re(t)?!1:e}function bt(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=ii(t);let o=at(1);e&&(i?et(i)&&(o=Tt(i)):o=Tt(t));const l=Bo(s,r,i)?Bn(s):at(0);let a=(n.left+l.x)/o.x,c=(n.top+l.y)/o.y,f=n.width/o.x,p=n.height/o.y;if(s){const b=Re(s),y=i&&et(i)?Re(i):i;let E=b,O=E.frameElement;for(;O&&i&&y!==E;){const z=Tt(O),B=O.getBoundingClientRect(),g=Ie(O),m=B.left+(O.clientLeft+parseFloat(g.paddingLeft))*z.x,w=B.top+(O.clientTop+parseFloat(g.paddingTop))*z.y;a*=z.x,c*=z.y,f*=z.x,p*=z.y,a+=m,c+=w,E=Re(O),O=E.frameElement}}return Rn({width:f,height:p,x:a,y:c})}const Fo=[":popover-open",":modal"];function Fn(t){return Fo.some(e=>{try{return t.matches(e)}catch{return!1}})}function Ho(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t;const s=n==="fixed",o=Qe(i),l=e?Fn(e.floating):!1;if(i===o||l&&s)return r;let a={scrollLeft:0,scrollTop:0},c=at(1);const f=at(0),p=ze(i);if((p||!p&&!s)&&((ct(i)!=="body"||Zt(o))&&(a=gr(i)),ze(i))){const b=bt(i);c=Tt(i),f.x=b.x+i.clientLeft,f.y=b.y+i.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-a.scrollLeft*c.x+f.x,y:r.y*c.y-a.scrollTop*c.y+f.y}}function qo(t){return Array.from(t.getClientRects())}function Hn(t){return bt(Qe(t)).left+gr(t).scrollLeft}function Uo(t){const e=Qe(t),r=gr(t),i=t.ownerDocument.body,n=kt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=kt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-r.scrollLeft+Hn(t);const l=-r.scrollTop;return Ie(i).direction==="rtl"&&(o+=kt(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:o,y:l}}function zo(t,e){const r=Re(t),i=Qe(t),n=r.visualViewport;let s=i.clientWidth,o=i.clientHeight,l=0,a=0;if(n){s=n.width,o=n.height;const c=ri();(!c||c&&e==="fixed")&&(l=n.offsetLeft,a=n.offsetTop)}return{width:s,height:o,x:l,y:a}}function Yo(t,e){const r=bt(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,s=ze(t)?Tt(t):at(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,a=n*s.x,c=i*s.y;return{width:o,height:l,x:a,y:c}}function qn(t,e,r){let i;if(e==="viewport")i=zo(t,r);else if(e==="document")i=Uo(Qe(t));else if(et(e))i=Yo(e,r);else{const n=Bn(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return Rn(i)}function Un(t,e){const r=Rt(t);return r===e||!et(r)||pr(r)?!1:Ie(r).position==="fixed"||Un(r,e)}function Wo(t,e){const r=e.get(t);if(r)return r;let i=Qt(t,[],!1).filter(l=>et(l)&&ct(l)!=="body"),n=null;const s=Ie(t).position==="fixed";let o=s?Rt(t):t;for(;et(o)&&!pr(o);){const l=Ie(o),a=ti(o);!a&&l.position==="fixed"&&(n=null),(s?!a&&!n:!a&&l.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Zt(o)&&!a&&Un(t,o))?i=i.filter(f=>f!==o):n=l,o=Rt(o)}return e.set(t,i),i}function Xo(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t;const o=[...r==="clippingAncestors"?Wo(e,this._c):[].concat(r),i],l=o[0],a=o.reduce((c,f)=>{const p=qn(e,f,n);return c.top=kt(p.top,c.top),c.right=ei(p.right,c.right),c.bottom=ei(p.bottom,c.bottom),c.left=kt(p.left,c.left),c},qn(e,l,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Vo(t){const{width:e,height:r}=Nn(t);return{width:e,height:r}}function Ko(t,e,r){const i=ze(e),n=Qe(e),s=r==="fixed",o=bt(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const a=at(0);if(i||!i&&!s)if((ct(e)!=="body"||Zt(n))&&(l=gr(e)),i){const p=bt(e,!0,s,e);a.x=p.x+e.clientLeft,a.y=p.y+e.clientTop}else n&&(a.x=Hn(n));const c=o.left+l.scrollLeft-a.x,f=o.top+l.scrollTop-a.y;return{x:c,y:f,width:o.width,height:o.height}}function zn(t,e){return!ze(t)||Ie(t).position==="fixed"?null:e?e(t):t.offsetParent}function Yn(t,e){const r=Re(t);if(!ze(t)||Fn(t))return r;let i=zn(t,e);for(;i&&Do(i)&&Ie(i).position==="static";)i=zn(i,e);return i&&(ct(i)==="html"||ct(i)==="body"&&Ie(i).position==="static"&&!ti(i))?r:i||jo(t)||r}const Go=async function(t){const e=this.getOffsetParent||Yn,r=this.getDimensions;return{reference:Ko(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await r(t.floating)}}};function Jo(t){return Ie(t).direction==="rtl"}const Zo={convertOffsetParentRelativeRectToViewportRelativeRect:Ho,getDocumentElement:Qe,getClippingRect:Xo,getOffsetParent:Yn,getElementRects:Go,getClientRects:qo,getDimensions:Vo,getScale:Tt,isElement:et,isRTL:Jo};function Qo(t,e){let r=null,i;const n=Qe(t);function s(){var l;clearTimeout(i),(l=r)==null||l.disconnect(),r=null}function o(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();const{left:c,top:f,width:p,height:b}=t.getBoundingClientRect();if(l||e(),!p||!b)return;const y=fr(f),E=fr(n.clientWidth-(c+p)),O=fr(n.clientHeight-(f+b)),z=fr(c),g={rootMargin:-y+"px "+-E+"px "+-O+"px "+-z+"px",threshold:kt(0,ei(1,a))||1};let m=!0;function w(S){const _=S[0].intersectionRatio;if(_!==a){if(!m)return o();_?o(!1,_):i=setTimeout(()=>{o(!1,1e-7)},100)}m=!1}try{r=new IntersectionObserver(w,{...g,root:n.ownerDocument})}catch{r=new IntersectionObserver(w,g)}r.observe(t)}return o(!0),s}function el(t,e,r,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=ii(t),f=n||s?[...c?Qt(c):[],...Qt(e)]:[];f.forEach(B=>{n&&B.addEventListener("scroll",r,{passive:!0}),s&&B.addEventListener("resize",r)});const p=c&&l?Qo(c,r):null;let b=-1,y=null;o&&(y=new ResizeObserver(B=>{let[g]=B;g&&g.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var m;(m=y)==null||m.observe(e)})),r()}),c&&!a&&y.observe(c),y.observe(e));let E,O=a?bt(t):null;a&&z();function z(){const B=bt(t);O&&(B.x!==O.x||B.y!==O.y||B.width!==O.width||B.height!==O.height)&&r(),O=B,E=requestAnimationFrame(z)}return r(),()=>{var B;f.forEach(g=>{n&&g.removeEventListener("scroll",r),s&&g.removeEventListener("resize",r)}),p==null||p(),(B=y)==null||B.disconnect(),y=null,a&&cancelAnimationFrame(E)}}const tl=(t,e,r)=>{const i=new Map,n={platform:Zo,...r},s={...n.platform,_c:i};return Io(t,e,{...n,platform:s})};var rl=Object.defineProperty,il=Object.getOwnPropertyDescriptor,mr=(t,e,r,i)=>{for(var n=i>1?void 0:i?il(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&rl(e,r,n),n};let er=class extends _e{constructor(){super(...arguments),this.open=!1,this.parent=null,this.unstyled=!1,this._clickEventListener=()=>{this.open=!1},this._keyboardEventListener=t=>{const{code:e}=t;["Escape"].includes(e)&&this._handleKeyboard(e)}}_handleKeyboard(t){this.clientHeight}_overlayCleanup(){}connectedCallback(){super.connectedCallback(),this.unstyled||setTimeout(()=>{const t=this.parent||this.renderRoot.querySelector("[name=trigger]").assignedNodes()[0],e=this.renderRoot.querySelector("#dropdown"),r=()=>{e.classList.contains("open")&&tl(t,e,{strategy:"fixed"}).then(({x:i,y:n})=>{Object.assign(e.style,{left:`${i}px`,top:`${n}px`,width:`${t.getBoundingClientRect().width}px`})})};this._overlayCleanup=el(t,e,r)})}disconnectedCallback(){super.disconnectedCallback(),this._overlayCleanup(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener),window.removeEventListener("click",this._clickEventListener)}render(){return U`
|
|
507
507
|
<style>
|
|
508
508
|
#dropdown {
|
|
509
509
|
display: none;
|
|
@@ -511,7 +511,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
511
511
|
#dropdown.open {
|
|
512
512
|
display: block;
|
|
513
513
|
}
|
|
514
|
-
${this.unstyled?se:
|
|
514
|
+
${this.unstyled?se:U`
|
|
515
515
|
eox-dropdown { height: 100%;} #dropdown { position: fixed; top:
|
|
516
516
|
0px; left: 0; width: 100%; margin: 0; padding: 0; background:
|
|
517
517
|
white; border-bottom-left-radius: 4px; border-bottom-right-radius:
|
|
@@ -523,7 +523,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
523
523
|
<div id="dropdown">
|
|
524
524
|
<slot name="content"></slot>
|
|
525
525
|
</div>
|
|
526
|
-
`}updated(t){if(t.has("open")){const e=this.renderRoot.querySelector("#dropdown");this.open?e.classList.add("open"):e.classList.remove("open"),this.requestUpdate()}}firstUpdated(){window.addEventListener("click",this._clickEventListener),this.getRootNode().addEventListener("keydown",this._keyboardEventListener),this.renderRoot.querySelector("[name=trigger]").assignedNodes()[0].addEventListener("focus",()=>{this.open=!0})}};mr([J({type:Boolean})],er.prototype,"open",2),mr([J()],er.prototype,"parent",2),mr([J({type:Boolean})],er.prototype,"unstyled",2),er=mr([ke("eox-dropdown")],er);var nl=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,yr=(t,e,r,i)=>{for(var n=i>1?void 0:i?sl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&nl(e,r,n),n};let tr=class extends _e{constructor(){super(...arguments),this.items=[],this.titleProperty="title",this.unstyled=!1,this._keyboardEventListener=t=>{const{code:e}=t;this.parentElement.classList.contains("hidden")&&["ArrowLeft","ArrowRight","Backspace"].includes(e)||(e==="Space"&&t.preventDefault(),["Escape","Space","Enter"].includes(e)||t.stopPropagation(),["ArrowLeft","ArrowRight","Escape","Backspace"].includes(e)&&this._handleKeyboard(e,t.target.value??""))}}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.items}))}_handleKeyboard(t,e){const r=this.renderRoot.querySelector(".chip.highlighted");if((t==="Escape"||e)&&r&&r.classList.remove("highlighted"),t==="Backspace"&&!e){if(this.items.length){r&&this.items.splice(Array.from(this.renderRoot.querySelectorAll(".chip")).indexOf(r),1);const i=this.renderRoot.querySelectorAll(".chip")[this.renderRoot.querySelectorAll(".chip").length-1];i.classList.contains("highlighted")||i.classList.add("highlighted"),this.requestUpdate()}this._dispatchEvent()}if((t==="ArrowLeft"||t==="ArrowRight")&&!e){if(this.renderRoot.querySelectorAll(".chip").length<1)return;let i=0;const n=this.renderRoot.querySelector(".chip.highlighted");n&&(i=Array.from(this.renderRoot.querySelectorAll(".chip")).indexOf(n),n.classList.remove("highlighted")),i=i+(t==="ArrowLeft"?-1:1),t==="ArrowLeft"&&i<0&&(i=this.renderRoot.querySelectorAll(".chip").length-1),t==="ArrowRight"&&i>this.renderRoot.querySelectorAll(".chip").length-1&&(i=0),Array.from(this.renderRoot.querySelectorAll(".chip"))[i].classList.add("highlighted")}}connectedCallback(){super.connectedCallback(),this.getRootNode().addEventListener("keydown",this._keyboardEventListener)}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}render(){return
|
|
526
|
+
`}updated(t){if(t.has("open")){const e=this.renderRoot.querySelector("#dropdown");this.open?e.classList.add("open"):e.classList.remove("open"),this.requestUpdate()}}firstUpdated(){window.addEventListener("click",this._clickEventListener),this.getRootNode().addEventListener("keydown",this._keyboardEventListener),this.renderRoot.querySelector("[name=trigger]").assignedNodes()[0].addEventListener("focus",()=>{this.open=!0})}};mr([J({type:Boolean})],er.prototype,"open",2),mr([J()],er.prototype,"parent",2),mr([J({type:Boolean})],er.prototype,"unstyled",2),er=mr([ke("eox-dropdown")],er);var nl=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,yr=(t,e,r,i)=>{for(var n=i>1?void 0:i?sl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&nl(e,r,n),n};let tr=class extends _e{constructor(){super(...arguments),this.items=[],this.titleProperty="title",this.unstyled=!1,this._keyboardEventListener=t=>{const{code:e}=t;this.parentElement.classList.contains("hidden")&&["ArrowLeft","ArrowRight","Backspace"].includes(e)||(e==="Space"&&t.preventDefault(),["Escape","Space","Enter"].includes(e)||t.stopPropagation(),["ArrowLeft","ArrowRight","Escape","Backspace"].includes(e)&&this._handleKeyboard(e,t.target.value??""))}}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.items}))}_handleKeyboard(t,e){const r=this.renderRoot.querySelector(".chip.highlighted");if((t==="Escape"||e)&&r&&r.classList.remove("highlighted"),t==="Backspace"&&!e){if(this.items.length){r&&this.items.splice(Array.from(this.renderRoot.querySelectorAll(".chip")).indexOf(r),1);const i=this.renderRoot.querySelectorAll(".chip")[this.renderRoot.querySelectorAll(".chip").length-1];i.classList.contains("highlighted")||i.classList.add("highlighted"),this.requestUpdate()}this._dispatchEvent()}if((t==="ArrowLeft"||t==="ArrowRight")&&!e){if(this.renderRoot.querySelectorAll(".chip").length<1)return;let i=0;const n=this.renderRoot.querySelector(".chip.highlighted");n&&(i=Array.from(this.renderRoot.querySelectorAll(".chip")).indexOf(n),n.classList.remove("highlighted")),i=i+(t==="ArrowLeft"?-1:1),t==="ArrowLeft"&&i<0&&(i=this.renderRoot.querySelectorAll(".chip").length-1),t==="ArrowRight"&&i>this.renderRoot.querySelectorAll(".chip").length-1&&(i=0),Array.from(this.renderRoot.querySelectorAll(".chip"))[i].classList.add("highlighted")}}connectedCallback(){super.connectedCallback(),this.getRootNode().addEventListener("keydown",this._keyboardEventListener)}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}render(){return U`
|
|
527
527
|
<style>
|
|
528
528
|
.chip.highlighted {
|
|
529
529
|
background: lightgrey;
|
|
@@ -531,7 +531,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
531
531
|
.chip-title {
|
|
532
532
|
pointer-events: none;
|
|
533
533
|
}
|
|
534
|
-
${this.unstyled?se:
|
|
534
|
+
${this.unstyled?se:U`
|
|
535
535
|
.chip-container { display: flex; flex: 0; } .chip { display: flex;
|
|
536
536
|
align-items: center; background: #00417022; border-radius: 4px;
|
|
537
537
|
margin-right: 4px; padding: 5px 10px; font-size: small; cursor:
|
|
@@ -541,7 +541,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
541
541
|
`}
|
|
542
542
|
</style>
|
|
543
543
|
<span class="chip-container">
|
|
544
|
-
${Gt(this.items,t=>
|
|
544
|
+
${Gt(this.items,t=>U`
|
|
545
545
|
<span
|
|
546
546
|
class="chip"
|
|
547
547
|
@click=${e=>{this.renderRoot.querySelectorAll(".chip").forEach(r=>{r.classList.remove("highlighted")}),e.target.classList.add("highlighted"),this.requestUpdate()}}
|
|
@@ -549,8 +549,8 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
549
549
|
<span class="chip-title"
|
|
550
550
|
>${t[this.titleProperty]}</span
|
|
551
551
|
>
|
|
552
|
-
${de(t._inProgress,()=>t.stringifiedState?"":
|
|
553
|
-
${de(t.stringifiedState,()=>
|
|
552
|
+
${de(t._inProgress,()=>t.stringifiedState?"":U` ... `)}
|
|
553
|
+
${de(t.stringifiedState,()=>U`: ${t.stringifiedState}`)}
|
|
554
554
|
<span
|
|
555
555
|
class="chip-close"
|
|
556
556
|
@click=${e=>{e.stopPropagation(),this.items.splice(this.items.indexOf(t),1),this._dispatchEvent(),this.requestUpdate()}}
|
|
@@ -559,7 +559,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
559
559
|
</span>
|
|
560
560
|
`)}
|
|
561
561
|
</span>
|
|
562
|
-
`}};yr([J({type:Array})],tr.prototype,"items",2),yr([J()],tr.prototype,"titleProperty",2),yr([J({type:Boolean})],tr.prototype,"unstyled",2),tr=yr([ke("eox-itemfilter-chips")],tr);var ol=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,Ye=(t,e,r,i)=>{for(var n=i>1?void 0:i?ll(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&ol(e,r,n),n};let Be=class extends _e{constructor(){super(...arguments),this.idProperty="id",this.items=[],this.titleProperty="title",this.itemTitleProperty=this.titleProperty,this.multiple=!1,this.unstyled=!1,this.multiStep=!1,this.inputText="",this.selectedItems=[],this._keyboardEventListener=t=>{const{code:e}=t;["ArrowUp","ArrowDown","Escape","Backspace"].includes(e)&&this._handleKeyboard(e)}}_handleKeyboard(t){var e,r,i,n;if(this.clientHeight!==0){if(t==="Escape"){if(this.selectedItems.length<1||this.multiple){this.renderRoot.querySelector("input").value!==""?this.renderRoot.querySelector("input").value="":this.renderRoot.querySelector("eox-dropdown").open=!1;return}this.multiple||(this.renderRoot.querySelector("input").value!==this.selectedItems[0][this.titleProperty]?this.renderRoot.querySelector("input").value=this.selectedItems[0][this.titleProperty]:this.renderRoot.querySelector("eox-dropdown").open=!1);return}(t==="ArrowDown"||t==="ArrowUp")&&(this.renderRoot.querySelector("eox-dropdown").open=!0,(e=this.parentElement)!=null&&e.inline&&this.renderRoot.querySelector("eox-selectionlist")._handleKeyboard(t)),this.renderRoot.querySelector("input").select(),(r=this.parentElement)!=null&&r.inline&&(["ArrowUp","ArrowDown"].includes(t)||((n=(i=this.parentElement.parentElement)==null?void 0:i.parentElement)==null?void 0:n.querySelector("#inline-input")).focus())}}_handleHighlight(t){t[0]._inProgress||(this.renderRoot.querySelector("input").value=t[0][this.titleProperty]||"",this.renderRoot.querySelector("input").select())}_handleSelect(t){var e;t.length>0&&this.multiStep&&t.forEach(r=>{this.selectedItems.includes(r)||(r._inProgress=!0)}),this.selectedItems=t,t.length>0?this.multiple?(this.renderRoot.querySelector("input").value="",this.renderRoot.querySelector("input").focus()):(this.renderRoot.querySelector("input").value=t[0][this.titleProperty],t[0]._inProgress||(this.renderRoot.querySelector("eox-dropdown").open=!1)):(this.renderRoot.querySelector("input").select(),this.renderRoot.querySelector("input").focus()),this._dispatchEvent(),this.requestUpdate(),(e=this.renderRoot.querySelector("eox-itemfilter-chips"))==null||e.requestUpdate()}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.selectedItems}))}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}firstUpdated(){this.getRootNode().addEventListener("keydown",this._keyboardEventListener)}updated(t){t.has("selectedItems")&&this._handleSelect(this.selectedItems)}render(){return
|
|
562
|
+
`}};yr([J({type:Array})],tr.prototype,"items",2),yr([J()],tr.prototype,"titleProperty",2),yr([J({type:Boolean})],tr.prototype,"unstyled",2),tr=yr([ke("eox-itemfilter-chips")],tr);var ol=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,Ye=(t,e,r,i)=>{for(var n=i>1?void 0:i?ll(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&ol(e,r,n),n};let Be=class extends _e{constructor(){super(...arguments),this.idProperty="id",this.items=[],this.titleProperty="title",this.itemTitleProperty=this.titleProperty,this.multiple=!1,this.unstyled=!1,this.multiStep=!1,this.inputText="",this.selectedItems=[],this._keyboardEventListener=t=>{const{code:e}=t;["ArrowUp","ArrowDown","Escape","Backspace"].includes(e)&&this._handleKeyboard(e)}}_handleKeyboard(t){var e,r,i,n;if(this.clientHeight!==0){if(t==="Escape"){if(this.selectedItems.length<1||this.multiple){this.renderRoot.querySelector("input").value!==""?this.renderRoot.querySelector("input").value="":this.renderRoot.querySelector("eox-dropdown").open=!1;return}this.multiple||(this.renderRoot.querySelector("input").value!==this.selectedItems[0][this.titleProperty]?this.renderRoot.querySelector("input").value=this.selectedItems[0][this.titleProperty]:this.renderRoot.querySelector("eox-dropdown").open=!1);return}(t==="ArrowDown"||t==="ArrowUp")&&(this.renderRoot.querySelector("eox-dropdown").open=!0,(e=this.parentElement)!=null&&e.inline&&this.renderRoot.querySelector("eox-selectionlist")._handleKeyboard(t)),this.renderRoot.querySelector("input").select(),(r=this.parentElement)!=null&&r.inline&&(["ArrowUp","ArrowDown"].includes(t)||((n=(i=this.parentElement.parentElement)==null?void 0:i.parentElement)==null?void 0:n.querySelector("#inline-input")).focus())}}_handleHighlight(t){t[0]._inProgress||(this.renderRoot.querySelector("input").value=t[0][this.titleProperty]||"",this.renderRoot.querySelector("input").select())}_handleSelect(t){var e;t.length>0&&this.multiStep&&t.forEach(r=>{this.selectedItems.includes(r)||(r._inProgress=!0)}),this.selectedItems=t,t.length>0?this.multiple?(this.renderRoot.querySelector("input").value="",this.renderRoot.querySelector("input").focus()):(this.renderRoot.querySelector("input").value=t[0][this.titleProperty],t[0]._inProgress||(this.renderRoot.querySelector("eox-dropdown").open=!1)):(this.renderRoot.querySelector("input").select(),this.renderRoot.querySelector("input").focus()),this._dispatchEvent(),this.requestUpdate(),(e=this.renderRoot.querySelector("eox-itemfilter-chips"))==null||e.requestUpdate()}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.selectedItems}))}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}firstUpdated(){this.getRootNode().addEventListener("keydown",this._keyboardEventListener)}updated(t){t.has("selectedItems")&&this._handleSelect(this.selectedItems)}render(){return U`
|
|
563
563
|
<style>
|
|
564
564
|
:host,
|
|
565
565
|
.container {
|
|
@@ -568,7 +568,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
568
568
|
#dropdown {
|
|
569
569
|
display: none;
|
|
570
570
|
}
|
|
571
|
-
${this.unstyled?se:
|
|
571
|
+
${this.unstyled?se:U`
|
|
572
572
|
${Jr} :host { position: relative; } .container { width: 100%;
|
|
573
573
|
position: relative; border: 1px solid #00417066; border-radius:
|
|
574
574
|
4px; height: 24px; padding: 5px; flex: 1; justify-content:
|
|
@@ -591,7 +591,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
591
591
|
part="container"
|
|
592
592
|
@click=${t=>{t.stopPropagation(),this.renderRoot.querySelector("input[type=text]").focus()}}
|
|
593
593
|
>
|
|
594
|
-
${de(this.multiple,()=>
|
|
594
|
+
${de(this.multiple,()=>U`
|
|
595
595
|
<eox-itemfilter-chips
|
|
596
596
|
.items=${this.selectedItems}
|
|
597
597
|
.titleProperty=${this.titleProperty}
|
|
@@ -609,7 +609,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
609
609
|
@focus=${()=>{this.inputText="",this.requestUpdate()}}
|
|
610
610
|
@input=${t=>{this.inputText=t.target.value.toLowerCase()}}
|
|
611
611
|
/>
|
|
612
|
-
${de(this.items.length>0,()=>
|
|
612
|
+
${de(this.items.length>0,()=>U`
|
|
613
613
|
<eox-selectionlist
|
|
614
614
|
slot="content"
|
|
615
615
|
.filter=${this.inputText}
|
|
@@ -628,7 +628,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
628
628
|
</eox-dropdown>
|
|
629
629
|
</div>
|
|
630
630
|
</div>
|
|
631
|
-
${de(this.selectedItems.length>0,()=>
|
|
631
|
+
${de(this.selectedItems.length>0,()=>U`
|
|
632
632
|
<div class="button-container">
|
|
633
633
|
<button
|
|
634
634
|
class="icon"
|
|
@@ -638,7 +638,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
638
638
|
</button>
|
|
639
639
|
</div>
|
|
640
640
|
`)}
|
|
641
|
-
`}};Ye([J()],Be.prototype,"idProperty",2),Ye([J()],Be.prototype,"items",2),Ye([J()],Be.prototype,"titleProperty",2),Ye([J()],Be.prototype,"itemTitleProperty",2),Ye([J({type:Boolean})],Be.prototype,"multiple",2),Ye([J({type:Boolean})],Be.prototype,"unstyled",2),Ye([J({type:Boolean})],Be.prototype,"multiStep",2),Ye([Ze()],Be.prototype,"inputText",2),Ye([Ze()],Be.prototype,"selectedItems",2),Be=Ye([ke("eox-autocomplete")],Be);var al=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,We=(t,e,r,i)=>{for(var n=i>1?void 0:i?cl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&al(e,r,n),n};let Fe=class extends _e{constructor(){super(...arguments),this.filter="",this.idProperty="id",this.items=[],this.titleProperty="title",this.multiple=!1,this.selectedItems=[],this.unstyled=!1,this.noShadow=!1,this._currentHighlight=null,this._keyboardEventListener=t=>{["ArrowDown","ArrowUp","Enter","Escape"].includes(t.code)&&this._handleKeyboard(t.code)}}_handleKeyboard(t){if(this.clientHeight===0)return;const e=this.renderRoot.querySelector("li.highlighted");if(t==="Escape"){this._currentHighlight&&(this._currentHighlight=null);return}if(t==="Enter"){if(e){const s=this.items.find(o=>o[this.idProperty]===e.dataset.identifier);this._handleSelect(s),this.requestUpdate()}return}const r=this.renderRoot.querySelectorAll("li");let i=-1;e&&(delete e.dataset.highlighted,i=Array.from(r).indexOf(e)),t==="ArrowDown"&&(i++,i>r.length-1&&(i=0)),t==="ArrowUp"&&(i--,i<0&&(i=r.length-1));const n=Array.from(r)[i];n&&(this._currentHighlight=this.items.find(s=>s[this.idProperty]===n.dataset.identifier)),this.dispatchEvent(new CustomEvent("items-highlighted",{detail:[this._currentHighlight]}))}_handleSelect(t){if(t)if(this.multiple){const e=this.selectedItems.find(r=>r[this.idProperty]===t[this.idProperty]);e?this.selectedItems.splice(this.selectedItems.indexOf(e),1):this.selectedItems.push(t)}else this.selectedItems=[t];else this.selectedItems=[],this._currentHighlight=null;this._dispatchEvent()}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.selectedItems}))}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}firstUpdated(){this.getRootNode().addEventListener("keydown",this._keyboardEventListener)}updated(t){t.has("filter")&&(this.filter.length>0?setTimeout(()=>{const e=this.renderRoot.querySelectorAll("li")[0];e&&(this._currentHighlight=this.items.find(r=>r[this.idProperty]===e.dataset.identifier))}):this._currentHighlight=null)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return
|
|
641
|
+
`}};Ye([J()],Be.prototype,"idProperty",2),Ye([J()],Be.prototype,"items",2),Ye([J()],Be.prototype,"titleProperty",2),Ye([J()],Be.prototype,"itemTitleProperty",2),Ye([J({type:Boolean})],Be.prototype,"multiple",2),Ye([J({type:Boolean})],Be.prototype,"unstyled",2),Ye([J({type:Boolean})],Be.prototype,"multiStep",2),Ye([Ze()],Be.prototype,"inputText",2),Ye([Ze()],Be.prototype,"selectedItems",2),Be=Ye([ke("eox-autocomplete")],Be);var al=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,We=(t,e,r,i)=>{for(var n=i>1?void 0:i?cl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&al(e,r,n),n};let Fe=class extends _e{constructor(){super(...arguments),this.filter="",this.idProperty="id",this.items=[],this.titleProperty="title",this.multiple=!1,this.selectedItems=[],this.unstyled=!1,this.noShadow=!1,this._currentHighlight=null,this._keyboardEventListener=t=>{["ArrowDown","ArrowUp","Enter","Escape"].includes(t.code)&&this._handleKeyboard(t.code)}}_handleKeyboard(t){if(this.clientHeight===0)return;const e=this.renderRoot.querySelector("li.highlighted");if(t==="Escape"){this._currentHighlight&&(this._currentHighlight=null);return}if(t==="Enter"){if(e){const s=this.items.find(o=>o[this.idProperty]===e.dataset.identifier);this._handleSelect(s),this.requestUpdate()}return}const r=this.renderRoot.querySelectorAll("li");let i=-1;e&&(delete e.dataset.highlighted,i=Array.from(r).indexOf(e)),t==="ArrowDown"&&(i++,i>r.length-1&&(i=0)),t==="ArrowUp"&&(i--,i<0&&(i=r.length-1));const n=Array.from(r)[i];n&&(this._currentHighlight=this.items.find(s=>s[this.idProperty]===n.dataset.identifier)),this.dispatchEvent(new CustomEvent("items-highlighted",{detail:[this._currentHighlight]}))}_handleSelect(t){if(t)if(this.multiple){const e=this.selectedItems.find(r=>r[this.idProperty]===t[this.idProperty]);e?this.selectedItems.splice(this.selectedItems.indexOf(e),1):this.selectedItems.push(t)}else this.selectedItems=[t];else this.selectedItems=[],this._currentHighlight=null;this._dispatchEvent()}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.selectedItems}))}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}firstUpdated(){this.getRootNode().addEventListener("keydown",this._keyboardEventListener)}updated(t){t.has("filter")&&(this.filter.length>0?setTimeout(()=>{const e=this.renderRoot.querySelectorAll("li")[0];e&&(this._currentHighlight=this.items.find(r=>r[this.idProperty]===e.dataset.identifier))}):this._currentHighlight=null)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return U`
|
|
642
642
|
<style>
|
|
643
643
|
${Gr}
|
|
644
644
|
:host {
|
|
@@ -653,7 +653,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
653
653
|
${!this.unstyled&&Zr}
|
|
654
654
|
</style>
|
|
655
655
|
<ul>
|
|
656
|
-
${An(this.items.filter(t=>this.filter?t[this.titleProperty].toLowerCase().includes(this.filter.toLowerCase()):!0),t=>t[this.idProperty],t=>
|
|
656
|
+
${An(this.items.filter(t=>this.filter?t[this.titleProperty].toLowerCase().includes(this.filter.toLowerCase()):!0),t=>t[this.idProperty],t=>U`
|
|
657
657
|
<li
|
|
658
658
|
class=${this._currentHighlight===t?"highlighted":se}
|
|
659
659
|
data-identifier=${t[this.idProperty]}
|
|
@@ -674,8 +674,8 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
674
674
|
</li>
|
|
675
675
|
`)}
|
|
676
676
|
</ul>
|
|
677
|
-
`}};We([J()],Fe.prototype,"filter",2),We([J()],Fe.prototype,"idProperty",2),We([J()],Fe.prototype,"items",2),We([J()],Fe.prototype,"titleProperty",2),We([J({type:Boolean})],Fe.prototype,"multiple",2),We([J()],Fe.prototype,"selectedItems",2),We([J({type:Boolean})],Fe.prototype,"unstyled",2),We([J({type:Boolean})],Fe.prototype,"noShadow",2),We([Ze()],Fe.prototype,"_currentHighlight",2),Fe=We([ke("eox-selectionlist")],Fe);var ul=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,vr=(t,e,r,i)=>{for(var n=i>1?void 0:i?hl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&ul(e,r,n),n};let rr=class extends _e{constructor(){super(...arguments),this.inline=!1,this.unstyled=!1}reset(){this.renderRoot.querySelectorAll("input[type='checkbox']").forEach(t=>{t instanceof HTMLInputElement&&(t.checked=!1)}),Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}_getItems(){const t="sort"in this.filterObject?this.filterObject.sort:(e,r)=>e.localeCompare(r);return Object.keys(this.filterObject.state).sort(t).map(e=>({id:e,title:e.replace(/^./,e[0].toUpperCase())}))}_getSelectedItems(){return Object.keys(this.filterObject.state).filter(t=>this.filterObject.state[t]).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_handleSelected(t){var e;Object.keys(this.filterObject.state).forEach(r=>{this.filterObject.state[r]=t.map(i=>i.id).includes(r)}),this.filterObject.stringifiedState=Object.keys(this.filterObject.state).filter(r=>this.filterObject.state[r]).join(", "),((e=this.filterObject.stringifiedState)==null?void 0:e.length)>0&&(this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter"))}render(){return de(this.filterObject,()=>
|
|
678
|
-
${de(this.inline||Object.keys(this.filterObject.state).length>10,()=>
|
|
677
|
+
`}};We([J()],Fe.prototype,"filter",2),We([J()],Fe.prototype,"idProperty",2),We([J()],Fe.prototype,"items",2),We([J()],Fe.prototype,"titleProperty",2),We([J({type:Boolean})],Fe.prototype,"multiple",2),We([J()],Fe.prototype,"selectedItems",2),We([J({type:Boolean})],Fe.prototype,"unstyled",2),We([J({type:Boolean})],Fe.prototype,"noShadow",2),We([Ze()],Fe.prototype,"_currentHighlight",2),Fe=We([ke("eox-selectionlist")],Fe);var ul=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,vr=(t,e,r,i)=>{for(var n=i>1?void 0:i?hl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&ul(e,r,n),n};let rr=class extends _e{constructor(){super(...arguments),this.inline=!1,this.unstyled=!1}reset(){this.renderRoot.querySelectorAll("input[type='checkbox']").forEach(t=>{t instanceof HTMLInputElement&&(t.checked=!1)}),Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}_getItems(){const t="sort"in this.filterObject?this.filterObject.sort:(e,r)=>e.localeCompare(r);return Object.keys(this.filterObject.state).sort(t).map(e=>({id:e,title:e.replace(/^./,e[0].toUpperCase())}))}_getSelectedItems(){return Object.keys(this.filterObject.state).filter(t=>this.filterObject.state[t]).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_handleSelected(t){var e;Object.keys(this.filterObject.state).forEach(r=>{this.filterObject.state[r]=t.map(i=>i.id).includes(r)}),this.filterObject.stringifiedState=Object.keys(this.filterObject.state).filter(r=>this.filterObject.state[r]).join(", "),((e=this.filterObject.stringifiedState)==null?void 0:e.length)>0&&(this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter"))}render(){return de(this.filterObject,()=>U`
|
|
678
|
+
${de(this.inline||Object.keys(this.filterObject.state).length>10,()=>U`
|
|
679
679
|
<eox-autocomplete
|
|
680
680
|
multiple
|
|
681
681
|
.items=${this._getItems()}
|
|
@@ -684,7 +684,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
684
684
|
@items-selected=${t=>this._handleSelected(t.detail)}
|
|
685
685
|
>
|
|
686
686
|
</eox-autocomplete>
|
|
687
|
-
`,()=>
|
|
687
|
+
`,()=>U`
|
|
688
688
|
<eox-selectionlist
|
|
689
689
|
.noShadow=${!this.inline}
|
|
690
690
|
multiple
|
|
@@ -694,7 +694,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
694
694
|
@items-selected=${t=>this._handleSelected(t.detail)}
|
|
695
695
|
></eox-selectionlist>
|
|
696
696
|
`)}
|
|
697
|
-
`)}};vr([J()],rr.prototype,"filterObject",2),vr([J({type:Boolean})],rr.prototype,"inline",2),vr([J({type:Boolean})],rr.prototype,"unstyled",2),rr=vr([ke("eox-itemfilter-multiselect")],rr);var dl="Expected a function",Wn=NaN,fl="[object Symbol]",pl=/^\s+|\s+$/g,gl=/^[-+]0x[0-9a-f]+$/i,ml=/^0b[01]+$/i,yl=/^0o[0-7]+$/i,vl=parseInt,bl=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,xl=typeof self=="object"&&self&&self.Object===Object&&self,wl=bl||xl||Function("return this")(),$l=Object.prototype,_l=$l.toString,El=Math.max,Sl=Math.min,ni=function(){return wl.Date.now()};function Al(t,e,r){var i,n,s,o,l,a,c=0,f=!1,p=!1,b=!0;if(typeof t!="function")throw new TypeError(dl);e=Xn(e)||0,si(r)&&(f=!!r.leading,p="maxWait"in r,s=p?El(Xn(r.maxWait)||0,e):s,b="trailing"in r?!!r.trailing:b);function y(_){var A=i,k=n;return i=n=void 0,c=_,o=t.apply(k,A),o}function E(_){return c=_,l=setTimeout(B,e),f?y(_):o}function O(_){var A=_-a,k=_-c,F=e-A;return p?Sl(F,s-k):F}function
|
|
697
|
+
`)}};vr([J()],rr.prototype,"filterObject",2),vr([J({type:Boolean})],rr.prototype,"inline",2),vr([J({type:Boolean})],rr.prototype,"unstyled",2),rr=vr([ke("eox-itemfilter-multiselect")],rr);var dl="Expected a function",Wn=NaN,fl="[object Symbol]",pl=/^\s+|\s+$/g,gl=/^[-+]0x[0-9a-f]+$/i,ml=/^0b[01]+$/i,yl=/^0o[0-7]+$/i,vl=parseInt,bl=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,xl=typeof self=="object"&&self&&self.Object===Object&&self,wl=bl||xl||Function("return this")(),$l=Object.prototype,_l=$l.toString,El=Math.max,Sl=Math.min,ni=function(){return wl.Date.now()};function Al(t,e,r){var i,n,s,o,l,a,c=0,f=!1,p=!1,b=!0;if(typeof t!="function")throw new TypeError(dl);e=Xn(e)||0,si(r)&&(f=!!r.leading,p="maxWait"in r,s=p?El(Xn(r.maxWait)||0,e):s,b="trailing"in r?!!r.trailing:b);function y(_){var A=i,k=n;return i=n=void 0,c=_,o=t.apply(k,A),o}function E(_){return c=_,l=setTimeout(B,e),f?y(_):o}function O(_){var A=_-a,k=_-c,F=e-A;return p?Sl(F,s-k):F}function z(_){var A=_-a,k=_-c;return a===void 0||A>=e||A<0||p&&k>=s}function B(){var _=ni();if(z(_))return g(_);l=setTimeout(B,O(_))}function g(_){return l=void 0,b&&i?y(_):(i=n=void 0,o)}function m(){l!==void 0&&clearTimeout(l),c=0,i=a=n=l=void 0}function w(){return l===void 0?o:g(ni())}function S(){var _=ni(),A=z(_);if(i=arguments,n=this,a=_,A){if(l===void 0)return E(a);if(p)return l=setTimeout(B,e),y(a)}return l===void 0&&(l=setTimeout(B,e)),o}return S.cancel=m,S.flush=w,S}function si(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ml(t){return!!t&&typeof t=="object"}function Ol(t){return typeof t=="symbol"||Ml(t)&&_l.call(t)==fl}function Xn(t){if(typeof t=="number")return t;if(Ol(t))return Wn;if(si(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=si(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(pl,"");var r=ml.test(t);return r||yl.test(t)?vl(t.slice(2),r?2:8):gl.test(t)?Wn:+t}var Pl=Al;const Vn=Vr(Pl);var Ll=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Kn=(t,e,r,i)=>{for(var n=i>1?void 0:i?Cl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Ll(e,r,n),n};let oi=class extends _e{constructor(){super(...arguments),this.inputHandler=t=>{const[e,r]=t.detail.values;(e!==this.filterObject.state.min||r!=this.filterObject.state.max)&&([this.filterObject.state.min,this.filterObject.state.max]=[e,r],this.filterObject.dirty=!0),this.filterObject.dirty&&(this.filterObject.stringifiedState=`${Lt(e)} - ${Lt(r)}`),this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()},this.debouncedInputHandler=Vn(this.inputHandler,0,{leading:!0})}reset(){Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}render(){return de(this.filterObject,()=>U`
|
|
698
698
|
<div class="range-before">
|
|
699
699
|
${this.filterObject.format==="date"?Lt.unix(this.filterObject.state.min):this.filterObject.state.min}
|
|
700
700
|
</div>
|
|
@@ -709,8 +709,8 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
709
709
|
<div class="range-after">
|
|
710
710
|
${this.filterObject.format==="date"?Lt.unix(this.filterObject.state.max):this.filterObject.state.max}
|
|
711
711
|
</div>
|
|
712
|
-
`)}};Kn([J()],oi.prototype,"filterObject",2),oi=Kn([ke("eox-itemfilter-range")],oi);var kl=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,br=(t,e,r,i)=>{for(var n=i>1?void 0:i?Rl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&kl(e,r,n),n};let ir=class extends _e{constructor(){super(...arguments),this.inline=!1,this.unstyled=!1}reset(){this.renderRoot.querySelectorAll("input[type='radio']").forEach(t=>{t instanceof HTMLInputElement&&(t.checked=!1)}),Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}_getItems(){const t="sort"in this.filterObject?this.filterObject.sort:(e,r)=>e.localeCompare(r);return Object.keys(this.filterObject.state).sort(t).map(e=>({id:e,title:e.replace(/^./,e[0].toUpperCase())}))}_getSelectedItems(){return Object.keys(this.filterObject.state).filter(t=>this.filterObject.state[t]).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_handleSelected(t){var e;Object.keys(this.filterObject.state).forEach(r=>{this.filterObject.state[r]=t.detail.map(i=>i.id).includes(r)}),this.filterObject.stringifiedState=Object.keys(this.filterObject.state).filter(r=>this.filterObject.state[r])[0],((e=this.filterObject.stringifiedState)==null?void 0:e.length)>0&&(this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter"))}render(){return de(this.filterObject,()=>
|
|
713
|
-
${de(this.inline||Object.keys(this.filterObject.state).length>10,()=>
|
|
712
|
+
`)}};Kn([J()],oi.prototype,"filterObject",2),oi=Kn([ke("eox-itemfilter-range")],oi);var kl=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,br=(t,e,r,i)=>{for(var n=i>1?void 0:i?Rl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&kl(e,r,n),n};let ir=class extends _e{constructor(){super(...arguments),this.inline=!1,this.unstyled=!1}reset(){this.renderRoot.querySelectorAll("input[type='radio']").forEach(t=>{t instanceof HTMLInputElement&&(t.checked=!1)}),Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}_getItems(){const t="sort"in this.filterObject?this.filterObject.sort:(e,r)=>e.localeCompare(r);return Object.keys(this.filterObject.state).sort(t).map(e=>({id:e,title:e.replace(/^./,e[0].toUpperCase())}))}_getSelectedItems(){return Object.keys(this.filterObject.state).filter(t=>this.filterObject.state[t]).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_handleSelected(t){var e;Object.keys(this.filterObject.state).forEach(r=>{this.filterObject.state[r]=t.detail.map(i=>i.id).includes(r)}),this.filterObject.stringifiedState=Object.keys(this.filterObject.state).filter(r=>this.filterObject.state[r])[0],((e=this.filterObject.stringifiedState)==null?void 0:e.length)>0&&(this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter"))}render(){return de(this.filterObject,()=>U`
|
|
713
|
+
${de(this.inline||Object.keys(this.filterObject.state).length>10,()=>U`
|
|
714
714
|
<eox-autocomplete
|
|
715
715
|
.items=${this._getItems()}
|
|
716
716
|
.selectedItems=${this._getSelectedItems()}
|
|
@@ -718,7 +718,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
718
718
|
@items-selected=${t=>this._handleSelected(t)}
|
|
719
719
|
>
|
|
720
720
|
</eox-autocomplete>
|
|
721
|
-
`,()=>
|
|
721
|
+
`,()=>U`
|
|
722
722
|
<eox-selectionlist
|
|
723
723
|
.noShadow=${!this.inline}
|
|
724
724
|
.items=${this._getItems()}
|
|
@@ -727,9 +727,9 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
727
727
|
@items-selected=${t=>this._handleSelected(t)}
|
|
728
728
|
></eox-selectionlist>
|
|
729
729
|
`)}
|
|
730
|
-
`)}};br([J()],ir.prototype,"filterObject",2),br([J({type:Boolean})],ir.prototype,"inline",2),br([J({type:Boolean})],ir.prototype,"unstyled",2),ir=br([ke("eox-itemfilter-select")],ir);var Se=63710088e-1,li={centimeters:Se*100,centimetres:Se*100,degrees:Se/111325,feet:Se*3.28084,inches:Se*39.37,kilometers:Se/1e3,kilometres:Se/1e3,meters:Se,metres:Se,miles:Se/1609.344,millimeters:Se*1e3,millimetres:Se*1e3,nauticalmiles:Se/1852,radians:1,yards:Se*1.0936},Tl={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/Se,yards:1.0936133},ai={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 De(t,e,r){r===void 0&&(r={});var i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=e||{},i.geometry=t,i}function Il(t,e,r){switch(t){case"Point":return Xe(e).geometry;case"LineString":return He(e).geometry;case"Polygon":return ci(e).geometry;case"MultiPoint":return Gn(e).geometry;case"MultiLineString":return ui(e).geometry;case"MultiPolygon":return Jn(e).geometry;default:throw new Error(t+" is invalid")}}function Xe(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!xr(t[0])||!xr(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return De(i,e,r)}function Dl(t,e,r){return r===void 0&&(r={}),ut(t.map(function(i){return Xe(i,e)}),r)}function ci(t,e,r){r===void 0&&(r={});for(var i=0,n=t;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:t};return De(l,e,r)}function jl(t,e,r){return r===void 0&&(r={}),ut(t.map(function(i){return ci(i,e)}),r)}function He(t,e,r){if(r===void 0&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:t};return De(i,e,r)}function Nl(t,e,r){return r===void 0&&(r={}),ut(t.map(function(i){return He(i,e)}),r)}function ut(t,e){e===void 0&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function ui(t,e,r){r===void 0&&(r={});var i={type:"MultiLineString",coordinates:t};return De(i,e,r)}function Gn(t,e,r){r===void 0&&(r={});var i={type:"MultiPoint",coordinates:t};return De(i,e,r)}function Jn(t,e,r){r===void 0&&(r={});var i={type:"MultiPolygon",coordinates:t};return De(i,e,r)}function Bl(t,e,r){r===void 0&&(r={});var i={type:"GeometryCollection",geometries:t};return De(i,e,r)}function Fl(t,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r}function Zn(t,e){e===void 0&&(e="kilometers");var r=li[e];if(!r)throw new Error(e+" units is invalid");return t*r}function hi(t,e){e===void 0&&(e="kilometers");var r=li[e];if(!r)throw new Error(e+" units is invalid");return t/r}function Hl(t,e){return Qn(hi(t,e))}function ql(t){var e=t%360;return e<0&&(e+=360),e}function Qn(t){var e=t%(2*Math.PI);return e*180/Math.PI}function Ul(t){var e=t%360;return e*Math.PI/180}function zl(t,e,r){if(e===void 0&&(e="kilometers"),r===void 0&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return Zn(hi(t,e),r)}function Yl(t,e,r){if(e===void 0&&(e="meters"),r===void 0&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=ai[e];if(!i)throw new Error("invalid original units");var n=ai[r];if(!n)throw new Error("invalid final units");return t/i*n}function xr(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function di(t){return!!t&&t.constructor===Object}function Wl(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!xr(e))throw new Error("bbox must only contain numbers")})}function Xl(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}const Vl=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:ai,bearingToAzimuth:ql,convertArea:Yl,convertLength:zl,degreesToRadians:Ul,earthRadius:Se,factors:li,feature:De,featureCollection:ut,geometry:Il,geometryCollection:Bl,isNumber:xr,isObject:di,lengthToDegrees:Hl,lengthToRadians:hi,lineString:He,lineStrings:Nl,multiLineString:ui,multiPoint:Gn,multiPolygon:Jn,point:Xe,points:Dl,polygon:ci,polygons:jl,radiansToDegrees:Qn,radiansToLength:Zn,round:Fl,unitsFactors:Tl,validateBBox:Wl,validateId:Xl},Symbol.toStringTag,{value:"Module"}));function es(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function It(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Dt(t){return t.type==="Feature"?t.geometry:t}function je(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=es(t),n=Dt(e),s=n.type,o=e.bbox,l=n.coordinates;if(o&&Kl(i,o)===!1)return!1;s==="Polygon"&&(l=[l]);for(var a=!1,c=0;c<l.length&&!a;c++)if(ts(i,l[c][0],r.ignoreBoundary)){for(var f=!1,p=1;p<l[c].length&&!f;)ts(i,l[c][p],!r.ignoreBoundary)&&(f=!0),p++;f||(a=!0)}return a}function ts(t,e,r){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],l=e[n][1],a=e[s][0],c=e[s][1],f=t[1]*(o-a)+l*(a-t[0])+c*(t[0]-o)===0&&(o-t[0])*(a-t[0])<=0&&(l-t[1])*(c-t[1])<=0;if(f)return!r;var p=l>t[1]!=c>t[1]&&t[0]<(a-o)*(t[1]-l)/(c-l)+o;p&&(i=!i)}return i}function Kl(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function jt(t,e,r){if(t!==null)for(var i,n,s,o,l,a,c,f=0,p=0,b,y=t.type,E=y==="FeatureCollection",O=y==="Feature",U=E?t.features.length:1,B=0;B<U;B++){c=E?t.features[B].geometry:O?t.geometry:t,b=c?c.type==="GeometryCollection":!1,l=b?c.geometries.length:1;for(var g=0;g<l;g++){var m=0,w=0;if(o=b?c.geometries[g]:c,o!==null){a=o.coordinates;var S=o.type;switch(f=r&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(e(a,p,B,m,w)===!1)return!1;p++,m++;break;case"LineString":case"MultiPoint":for(i=0;i<a.length;i++){if(e(a[i],p,B,m,w)===!1)return!1;p++,S==="MultiPoint"&&m++}S==="LineString"&&m++;break;case"Polygon":case"MultiLineString":for(i=0;i<a.length;i++){for(n=0;n<a[i].length-f;n++){if(e(a[i][n],p,B,m,w)===!1)return!1;p++}S==="MultiLineString"&&m++,S==="Polygon"&&w++}S==="Polygon"&&m++;break;case"MultiPolygon":for(i=0;i<a.length;i++){for(w=0,n=0;n<a[i].length;n++){for(s=0;s<a[i][n].length-f;s++){if(e(a[i][n][s],p,B,m,w)===!1)return!1;p++}w++}m++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(jt(o.geometries[i],e,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Gl(t,e,r,i){var n=r;return jt(t,function(s,o,l,a,c){o===0&&r===void 0?n=s:n=e(n,s,o,l,a,c)},i),n}function rs(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length&&e(t.features[r].properties,r)!==!1;r++);break;case"Feature":e(t.properties,0);break}}function Jl(t,e,r){var i=r;return rs(t,function(n,s){s===0&&r===void 0?i=n:i=e(i,n,s)}),i}function wr(t,e){if(t.type==="Feature")e(t,0);else if(t.type==="FeatureCollection")for(var r=0;r<t.features.length&&e(t.features[r],r)!==!1;r++);}function Zl(t,e,r){var i=r;return wr(t,function(n,s){s===0&&r===void 0?i=n:i=e(i,n,s)}),i}function Ql(t){var e=[];return jt(t,function(r){e.push(r)}),e}function fi(t,e){var r,i,n,s,o,l,a,c,f,p,b=0,y=t.type==="FeatureCollection",E=t.type==="Feature",O=y?t.features.length:1;for(r=0;r<O;r++){for(l=y?t.features[r].geometry:E?t.geometry:t,c=y?t.features[r].properties:E?t.properties:{},f=y?t.features[r].bbox:E?t.bbox:void 0,p=y?t.features[r].id:E?t.id:void 0,a=l?l.type==="GeometryCollection":!1,o=a?l.geometries.length:1,n=0;n<o;n++){if(s=a?l.geometries[n]:l,s===null){if(e(null,b,c,f,p)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,b,c,f,p)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],b,c,f,p)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}b++}}function ea(t,e,r){var i=r;return fi(t,function(n,s,o,l,a){s===0&&r===void 0?i=n:i=e(i,n,s,o,l,a)}),i}function tt(t,e){fi(t,function(r,i,n,s,o){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return e(De(r,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var c=0;c<r.coordinates.length;c++){var f=r.coordinates[c],p={type:a,coordinates:f};if(e(De(p,n),i,c)===!1)return!1}})}function ta(t,e,r){var i=r;return tt(t,function(n,s,o){s===0&&o===0&&r===void 0?i=n:i=e(i,n,s,o)}),i}function is(t,e){tt(t,function(r,i,n){var s=0;if(r.geometry){var o=r.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var l,a=0,c=0,f=0;if(jt(r,function(p,b,y,E,O){if(l===void 0||i>a||E>c||O>f){l=p,a=i,c=E,f=O,s=0;return}var U=He([l,p],r.properties);if(e(U,i,n,O,s)===!1)return!1;s++,l=p})===!1)return!1}}})}function ra(t,e,r){var i=r,n=!1;return is(t,function(s,o,l,a,c){n===!1&&r===void 0?i=s:i=e(i,s,o,l,a,c),n=!0}),i}function ns(t,e){if(!t)throw new Error("geojson is required");tt(t,function(r,i,n){if(r.geometry!==null){var s=r.geometry.type,o=r.geometry.coordinates;switch(s){case"LineString":if(e(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<o.length;l++)if(e(He(o[l],r.properties),i,n,l)===!1)return!1;break}}})}function ia(t,e,r){var i=r;return ns(t,function(n,s,o,l){s===0&&r===void 0?i=n:i=e(i,n,s,o,l)}),i}function na(t,e){if(e=e||{},!di(e))throw new Error("options is invalid");var r=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,l;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),o=o||t.features[r].properties,l=t.features[r].geometry;break;case"Feature":o=o||t.properties,l=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=t;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),He([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),He([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),He([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),He([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function sa(t,e){if(e=e||{},!di(e))throw new Error("options is invalid");var r=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,l;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),o=o||t.features[r].properties,l=t.features[r].geometry;break;case"Feature":o=o||t.properties,l=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=t;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":return Xe(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Xe(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Xe(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Xe(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Xe(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),Xe(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const oa=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Ql,coordEach:jt,coordReduce:Gl,featureEach:wr,featureReduce:Zl,findPoint:sa,findSegment:na,flattenEach:tt,flattenReduce:ta,geomEach:fi,geomReduce:ea,lineEach:ns,lineReduce:ia,propEach:rs,propReduce:Jl,segmentEach:is,segmentReduce:ra},Symbol.toStringTag,{value:"Module"}));function ss(t){if(!t)throw new Error("geojson is required");var e=[];return tt(t,function(r){la(r,e)}),ut(e)}function la(t,e){var r=[],i=t.geometry;if(i!==null){switch(i.type){case"Polygon":r=It(i);break;case"LineString":r=[It(i)]}r.forEach(function(n){var s=aa(n,t.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function aa(t,e){var r=[];return t.reduce(function(i,n){var s=He([i,n],e);return s.bbox=ca(i,n),r.push(s),n}),r}function ca(t,e){var r=t[0],i=t[1],n=e[0],s=e[1],o=r<n?r:n,l=i<s?i:s,a=r>n?r:n,c=i>s?i:s;return[o,l,a,c]}var pi={exports:{}},os={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(Pt,function(){function r(g,m,w,S,_){(function A(k,F,H,I,te){for(;I>H;){if(I-H>600){var le=I-H+1,P=F-H+1,L=Math.log(le),M=.5*Math.exp(2*L/3),j=.5*Math.sqrt(L*M*(le-M)/le)*(P-le/2<0?-1:1),C=Math.max(H,Math.floor(F-P*M/le+j)),G=Math.min(I,Math.floor(F+(le-P)*M/le+j));A(k,F,C,G,te)}var z=k[F],oe=H,re=I;for(i(k,H,F),te(k[I],z)>0&&i(k,H,I);oe<re;){for(i(k,oe,re),oe++,re--;te(k[oe],z)<0;)oe++;for(;te(k[re],z)>0;)re--}te(k[H],z)===0?i(k,H,re):i(k,++re,I),re<=F&&(H=re+1),F<=re&&(I=re-1)}})(g,m,w||0,S||g.length-1,_||n)}function i(g,m,w){var S=g[m];g[m]=g[w],g[w]=S}function n(g,m){return g<m?-1:g>m?1:0}var s=function(g){g===void 0&&(g=9),this._maxEntries=Math.max(4,g),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(g,m,w){if(!w)return m.indexOf(g);for(var S=0;S<m.length;S++)if(w(g,m[S]))return S;return-1}function l(g,m){a(g,0,g.children.length,m,g)}function a(g,m,w,S,_){_||(_=U(null)),_.minX=1/0,_.minY=1/0,_.maxX=-1/0,_.maxY=-1/0;for(var A=m;A<w;A++){var k=g.children[A];c(_,g.leaf?S(k):k)}return _}function c(g,m){return g.minX=Math.min(g.minX,m.minX),g.minY=Math.min(g.minY,m.minY),g.maxX=Math.max(g.maxX,m.maxX),g.maxY=Math.max(g.maxY,m.maxY),g}function f(g,m){return g.minX-m.minX}function p(g,m){return g.minY-m.minY}function b(g){return(g.maxX-g.minX)*(g.maxY-g.minY)}function y(g){return g.maxX-g.minX+(g.maxY-g.minY)}function E(g,m){return g.minX<=m.minX&&g.minY<=m.minY&&m.maxX<=g.maxX&&m.maxY<=g.maxY}function O(g,m){return m.minX<=g.maxX&&m.minY<=g.maxY&&m.maxX>=g.minX&&m.maxY>=g.minY}function U(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function B(g,m,w,S,_){for(var A=[m,w];A.length;)if(!((w=A.pop())-(m=A.pop())<=S)){var k=m+Math.ceil((w-m)/S/2)*S;r(g,k,m,w,_),A.push(m,k,k,w)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(g){var m=this.data,w=[];if(!O(g,m))return w;for(var S=this.toBBox,_=[];m;){for(var A=0;A<m.children.length;A++){var k=m.children[A],F=m.leaf?S(k):k;O(g,F)&&(m.leaf?w.push(k):E(g,F)?this._all(k,w):_.push(k))}m=_.pop()}return w},s.prototype.collides=function(g){var m=this.data;if(!O(g,m))return!1;for(var w=[];m;){for(var S=0;S<m.children.length;S++){var _=m.children[S],A=m.leaf?this.toBBox(_):_;if(O(g,A)){if(m.leaf||E(g,A))return!0;w.push(_)}}m=w.pop()}return!1},s.prototype.load=function(g){if(!g||!g.length)return this;if(g.length<this._minEntries){for(var m=0;m<g.length;m++)this.insert(g[m]);return this}var w=this._build(g.slice(),0,g.length-1,0);if(this.data.children.length)if(this.data.height===w.height)this._splitRoot(this.data,w);else{if(this.data.height<w.height){var S=this.data;this.data=w,w=S}this._insert(w,this.data.height-w.height-1,!0)}else this.data=w;return this},s.prototype.insert=function(g){return g&&this._insert(g,this.data.height-1),this},s.prototype.clear=function(){return this.data=U([]),this},s.prototype.remove=function(g,m){if(!g)return this;for(var w,S,_,A=this.data,k=this.toBBox(g),F=[],H=[];A||F.length;){if(A||(A=F.pop(),S=F[F.length-1],w=H.pop(),_=!0),A.leaf){var I=o(g,A.children,m);if(I!==-1)return A.children.splice(I,1),F.push(A),this._condense(F),this}_||A.leaf||!E(A,k)?S?(w++,A=S.children[w],_=!1):A=null:(F.push(A),H.push(w),w=0,S=A,A=A.children[0])}return this},s.prototype.toBBox=function(g){return g},s.prototype.compareMinX=function(g,m){return g.minX-m.minX},s.prototype.compareMinY=function(g,m){return g.minY-m.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(g){return this.data=g,this},s.prototype._all=function(g,m){for(var w=[];g;)g.leaf?m.push.apply(m,g.children):w.push.apply(w,g.children),g=w.pop();return m},s.prototype._build=function(g,m,w,S){var _,A=w-m+1,k=this._maxEntries;if(A<=k)return l(_=U(g.slice(m,w+1)),this.toBBox),_;S||(S=Math.ceil(Math.log(A)/Math.log(k)),k=Math.ceil(A/Math.pow(k,S-1))),(_=U([])).leaf=!1,_.height=S;var F=Math.ceil(A/k),H=F*Math.ceil(Math.sqrt(k));B(g,m,w,H,this.compareMinX);for(var I=m;I<=w;I+=H){var te=Math.min(I+H-1,w);B(g,I,te,F,this.compareMinY);for(var le=I;le<=te;le+=F){var P=Math.min(le+F-1,te);_.children.push(this._build(g,le,P,S-1))}}return l(_,this.toBBox),_},s.prototype._chooseSubtree=function(g,m,w,S){for(;S.push(m),!m.leaf&&S.length-1!==w;){for(var _=1/0,A=1/0,k=void 0,F=0;F<m.children.length;F++){var H=m.children[F],I=b(H),te=(le=g,P=H,(Math.max(P.maxX,le.maxX)-Math.min(P.minX,le.minX))*(Math.max(P.maxY,le.maxY)-Math.min(P.minY,le.minY))-I);te<A?(A=te,_=I<_?I:_,k=H):te===A&&I<_&&(_=I,k=H)}m=k||m.children[0]}var le,P;return m},s.prototype._insert=function(g,m,w){var S=w?g:this.toBBox(g),_=[],A=this._chooseSubtree(S,this.data,m,_);for(A.children.push(g),c(A,S);m>=0&&_[m].children.length>this._maxEntries;)this._split(_,m),m--;this._adjustParentBBoxes(S,_,m)},s.prototype._split=function(g,m){var w=g[m],S=w.children.length,_=this._minEntries;this._chooseSplitAxis(w,_,S);var A=this._chooseSplitIndex(w,_,S),k=U(w.children.splice(A,w.children.length-A));k.height=w.height,k.leaf=w.leaf,l(w,this.toBBox),l(k,this.toBBox),m?g[m-1].children.push(k):this._splitRoot(w,k)},s.prototype._splitRoot=function(g,m){this.data=U([g,m]),this.data.height=g.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(g,m,w){for(var S,_,A,k,F,H,I,te=1/0,le=1/0,P=m;P<=w-m;P++){var L=a(g,0,P,this.toBBox),M=a(g,P,w,this.toBBox),j=(_=L,A=M,k=void 0,F=void 0,H=void 0,I=void 0,k=Math.max(_.minX,A.minX),F=Math.max(_.minY,A.minY),H=Math.min(_.maxX,A.maxX),I=Math.min(_.maxY,A.maxY),Math.max(0,H-k)*Math.max(0,I-F)),C=b(L)+b(M);j<te?(te=j,S=P,le=C<le?C:le):j===te&&C<le&&(le=C,S=P)}return S||w-m},s.prototype._chooseSplitAxis=function(g,m,w){var S=g.leaf?this.compareMinX:f,_=g.leaf?this.compareMinY:p;this._allDistMargin(g,m,w,S)<this._allDistMargin(g,m,w,_)&&g.children.sort(S)},s.prototype._allDistMargin=function(g,m,w,S){g.children.sort(S);for(var _=this.toBBox,A=a(g,0,m,_),k=a(g,w-m,w,_),F=y(A)+y(k),H=m;H<w-m;H++){var I=g.children[H];c(A,g.leaf?_(I):I),F+=y(A)}for(var te=w-m-1;te>=m;te--){var le=g.children[te];c(k,g.leaf?_(le):le),F+=y(k)}return F},s.prototype._adjustParentBBoxes=function(g,m,w){for(var S=w;S>=0;S--)c(m[S],g)},s.prototype._condense=function(g){for(var m=g.length-1,w=void 0;m>=0;m--)g[m].children.length===0?m>0?(w=g[m-1].children).splice(w.indexOf(g[m]),1):this.clear():l(g[m],this.toBBox)},s})})(os);var ua=os.exports;const ha=Kr(Vl),da=Kr(oa);function xt(t){var e=[1/0,1/0,-1/0,-1/0];return jt(t,function(r){e[0]>r[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]<r[0]&&(e[2]=r[0]),e[3]<r[1]&&(e[3]=r[1])}),e}xt.default=xt;const fa=Kr(Object.freeze(Object.defineProperty({__proto__:null,default:xt},Symbol.toStringTag,{value:"Module"})));var Ve=ua,ls=ha,as=da,Nt=fa.default,pa=as.featureEach;as.coordEach,ls.polygon;var cs=ls.featureCollection;function us(t){var e=new Ve(t);return e.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Nt(r),Ve.prototype.insert.call(this,r)},e.load=function(r){var i=[];return Array.isArray(r)?r.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Nt(n),i.push(n)}):pa(r,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Nt(n),i.push(n)}),Ve.prototype.load.call(this,i)},e.remove=function(r,i){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Nt(r),Ve.prototype.remove.call(this,r,i)},e.clear=function(){return Ve.prototype.clear.call(this)},e.search=function(r){var i=Ve.prototype.search.call(this,this.toBBox(r));return cs(i)},e.collides=function(r){return Ve.prototype.collides.call(this,this.toBBox(r))},e.all=function(){var r=Ve.prototype.all.call(this);return cs(r)},e.toJSON=function(){return Ve.prototype.toJSON.call(this)},e.fromJSON=function(r){return Ve.prototype.fromJSON.call(this,r)},e.toBBox=function(r){var i;if(r.bbox)i=r.bbox;else if(Array.isArray(r)&&r.length===4)i=r;else if(Array.isArray(r)&&r.length===6)i=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")i=Nt(r);else if(r.type==="FeatureCollection")i=Nt(r);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}pi.exports=us,pi.exports.default=us;var ga=pi.exports;const ma=Vr(ga);function gi(t,e){var r={},i=[];if(t.type==="LineString"&&(t=De(t)),e.type==="LineString"&&(e=De(e)),t.type==="Feature"&&e.type==="Feature"&&t.geometry!==null&&e.geometry!==null&&t.geometry.type==="LineString"&&e.geometry.type==="LineString"&&t.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=hs(t,e);return n&&i.push(n),ut(i)}var s=ma();return s.load(ss(e)),wr(ss(t),function(o){wr(s.search(o),function(l){var a=hs(o,l);if(a){var c=It(a).join(",");r[c]||(r[c]=!0,i.push(a))}})}),ut(i)}function hs(t,e){var r=It(t),i=It(e);if(r.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=r[0][0],s=r[0][1],o=r[1][0],l=r[1][1],a=i[0][0],c=i[0][1],f=i[1][0],p=i[1][1],b=(p-c)*(o-n)-(f-a)*(l-s),y=(f-a)*(s-c)-(p-c)*(n-a),E=(o-n)*(s-c)-(l-s)*(n-a);if(b===0)return null;var O=y/b,U=E/b;if(O>=0&&O<=1&&U>=0&&U<=1){var B=n+O*(o-n),g=s+O*(l-s);return Xe([B,g])}return null}function mi(t,e){e===void 0&&(e={});var r=Dt(t);switch(!e.properties&&t.type==="Feature"&&(e.properties=t.properties),r.type){case"Polygon":return ya(r,e);case"MultiPolygon":return va(r,e);default:throw new Error("invalid poly")}}function ya(t,e){e===void 0&&(e={});var r=Dt(t),i=r.coordinates,n=e.properties?e.properties:t.type==="Feature"?t.properties:{};return ds(i,n)}function va(t,e){e===void 0&&(e={});var r=Dt(t),i=r.coordinates,n=e.properties?e.properties:t.type==="Feature"?t.properties:{},s=[];return i.forEach(function(o){s.push(ds(o,n))}),ut(s)}function ds(t,e){return t.length>1?ui(t,e):He(t[0],e)}function ba(t,e){var r=!0;return tt(t,function(i){tt(e,function(n){if(r===!1)return!1;r=xa(i.geometry,n.geometry)})}),r}function xa(t,e){switch(t.type){case"Point":switch(e.type){case"Point":return!Ea(t.coordinates,e.coordinates);case"LineString":return!fs(e,t);case"Polygon":return!je(t,e)}break;case"LineString":switch(e.type){case"Point":return!fs(t,e);case"LineString":return!wa(t,e);case"Polygon":return!ps(e,t)}break;case"Polygon":switch(e.type){case"Point":return!je(e,t);case"LineString":return!ps(t,e);case"Polygon":return!$a(e,t)}}return!1}function fs(t,e){for(var r=0;r<t.coordinates.length-1;r++)if(_a(t.coordinates[r],t.coordinates[r+1],e.coordinates))return!0;return!1}function wa(t,e){var r=gi(t,e);return r.features.length>0}function ps(t,e){for(var r=0,i=e.coordinates;r<i.length;r++){var n=i[r];if(je(n,t))return!0}var s=gi(e,mi(t));return s.features.length>0}function $a(t,e){for(var r=0,i=t.coordinates[0];r<i.length;r++){var n=i[r];if(je(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var l=o[s];if(je(l,t))return!0}var a=gi(mi(t),mi(e));return a.features.length>0}function _a(t,e,r){var i=r[0]-t[0],n=r[1]-t[1],s=e[0]-t[0],o=e[1]-t[1],l=i*o-n*s;return l!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?t[0]<=r[0]&&r[0]<=e[0]:e[0]<=r[0]&&r[0]<=t[0]:o>0?t[1]<=r[1]&&r[1]<=e[1]:e[1]<=r[1]&&r[1]<=t[1]}function Ea(t,e){return t[0]===e[0]&&t[1]===e[1]}function Sa(t,e){var r=!1;return tt(t,function(i){tt(e,function(n){if(r===!0)return!0;r=!ba(i.geometry,n.geometry)})}),r}function $r(t,e,r){r===void 0&&(r={});for(var i=es(t),n=It(e),s=0;s<n.length-1;s++){var o=!1;if(r.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),Aa(n[s],n[s+1],i,o,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function Aa(t,e,r,i,n){var s=r[0],o=r[1],l=t[0],a=t[1],c=e[0],f=e[1],p=r[0]-l,b=r[1]-a,y=c-l,E=f-a,O=p*E-b*y;if(n!==null){if(Math.abs(O)>n)return!1}else if(O!==0)return!1;if(i){if(i==="start")return Math.abs(y)>=Math.abs(E)?y>0?l<s&&s<=c:c<=s&&s<l:E>0?a<o&&o<=f:f<=o&&o<a;if(i==="end")return Math.abs(y)>=Math.abs(E)?y>0?l<=s&&s<c:c<s&&s<=l:E>0?a<=o&&o<f:f<o&&o<=a;if(i==="both")return Math.abs(y)>=Math.abs(E)?y>0?l<s&&s<c:c<s&&s<l:E>0?a<o&&o<f:f<o&&o<a}else return Math.abs(y)>=Math.abs(E)?y>0?l<=s&&s<=c:c<=s&&s<=l:E>0?a<=o&&o<=f:f<=o&&o<=a;return!1}function Ma(t,e){var r=Dt(t),i=Dt(e),n=r.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return Oa(r,i);case"LineString":return $r(r,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return je(r,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return Pa(r,i);case"LineString":return La(r,i);case"Polygon":case"MultiPolygon":return Ca(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return ka(r,i);case"Polygon":case"MultiPolygon":return Ra(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return Ta(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function Oa(t,e){var r,i=!1;for(r=0;r<e.coordinates.length;r++)if(ms(e.coordinates[r],t.coordinates)){i=!0;break}return i}function Pa(t,e){for(var r=0;r<t.coordinates.length;r++){for(var i=!1,n=0;n<e.coordinates.length;n++)ms(t.coordinates[r],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function La(t,e){for(var r=!1,i=0;i<t.coordinates.length;i++){if(!$r(t.coordinates[i],e))return!1;r||(r=$r(t.coordinates[i],e,{ignoreEndVertices:!0}))}return r}function Ca(t,e){for(var r=!0,i=!1,n=0;n<t.coordinates.length;n++){if(i=je(t.coordinates[1],e),!i){r=!1;break}i=je(t.coordinates[1],e,{ignoreBoundary:!0})}return r&&i}function ka(t,e){for(var r=0;r<t.coordinates.length;r++)if(!$r(t.coordinates[r],e))return!1;return!0}function Ra(t,e){var r=xt(e),i=xt(t);if(!gs(r,i))return!1;for(var n=!1,s=0;s<t.coordinates.length-1;s++){if(!je(t.coordinates[s],e))return!1;if(n||(n=je(t.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=Ia(t.coordinates[s],t.coordinates[s+1]);n=je(o,e,{ignoreBoundary:!0})}}return n}function Ta(t,e){var r=xt(t),i=xt(e);if(!gs(i,r))return!1;for(var n=0;n<t.coordinates[0].length;n++)if(!je(t.coordinates[0][n],e))return!1;return!0}function gs(t,e){return!(t[0]>e[0]||t[2]<e[2]||t[1]>e[1]||t[3]<e[3])}function ms(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ia(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var Da=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,nr=(t,e,r,i)=>{for(var n=i>1?void 0:i?ja(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Da(e,r,n),n};const Na=(t,e)=>e?Sa(t,e):!0,Ba=(t,e)=>e?Ma(t,e):!0;let yi=class extends _e{reset(){Ct(this.filterObject),this.renderRoot.querySelector("eox-itemfilter-spatial-filter").reset(),this.requestUpdate()}createRenderRoot(){return this}render(){return de(this.filterObject,()=>{var t;return W`
|
|
730
|
+
`)}};br([J()],ir.prototype,"filterObject",2),br([J({type:Boolean})],ir.prototype,"inline",2),br([J({type:Boolean})],ir.prototype,"unstyled",2),ir=br([ke("eox-itemfilter-select")],ir);var Se=63710088e-1,li={centimeters:Se*100,centimetres:Se*100,degrees:Se/111325,feet:Se*3.28084,inches:Se*39.37,kilometers:Se/1e3,kilometres:Se/1e3,meters:Se,metres:Se,miles:Se/1609.344,millimeters:Se*1e3,millimetres:Se*1e3,nauticalmiles:Se/1852,radians:1,yards:Se*1.0936},Tl={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/Se,yards:1.0936133},ai={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 De(t,e,r){r===void 0&&(r={});var i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=e||{},i.geometry=t,i}function Il(t,e,r){switch(t){case"Point":return Xe(e).geometry;case"LineString":return He(e).geometry;case"Polygon":return ci(e).geometry;case"MultiPoint":return Gn(e).geometry;case"MultiLineString":return ui(e).geometry;case"MultiPolygon":return Jn(e).geometry;default:throw new Error(t+" is invalid")}}function Xe(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!xr(t[0])||!xr(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return De(i,e,r)}function Dl(t,e,r){return r===void 0&&(r={}),ut(t.map(function(i){return Xe(i,e)}),r)}function ci(t,e,r){r===void 0&&(r={});for(var i=0,n=t;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:t};return De(l,e,r)}function jl(t,e,r){return r===void 0&&(r={}),ut(t.map(function(i){return ci(i,e)}),r)}function He(t,e,r){if(r===void 0&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:t};return De(i,e,r)}function Nl(t,e,r){return r===void 0&&(r={}),ut(t.map(function(i){return He(i,e)}),r)}function ut(t,e){e===void 0&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function ui(t,e,r){r===void 0&&(r={});var i={type:"MultiLineString",coordinates:t};return De(i,e,r)}function Gn(t,e,r){r===void 0&&(r={});var i={type:"MultiPoint",coordinates:t};return De(i,e,r)}function Jn(t,e,r){r===void 0&&(r={});var i={type:"MultiPolygon",coordinates:t};return De(i,e,r)}function Bl(t,e,r){r===void 0&&(r={});var i={type:"GeometryCollection",geometries:t};return De(i,e,r)}function Fl(t,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r}function Zn(t,e){e===void 0&&(e="kilometers");var r=li[e];if(!r)throw new Error(e+" units is invalid");return t*r}function hi(t,e){e===void 0&&(e="kilometers");var r=li[e];if(!r)throw new Error(e+" units is invalid");return t/r}function Hl(t,e){return Qn(hi(t,e))}function ql(t){var e=t%360;return e<0&&(e+=360),e}function Qn(t){var e=t%(2*Math.PI);return e*180/Math.PI}function Ul(t){var e=t%360;return e*Math.PI/180}function zl(t,e,r){if(e===void 0&&(e="kilometers"),r===void 0&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return Zn(hi(t,e),r)}function Yl(t,e,r){if(e===void 0&&(e="meters"),r===void 0&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=ai[e];if(!i)throw new Error("invalid original units");var n=ai[r];if(!n)throw new Error("invalid final units");return t/i*n}function xr(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function di(t){return!!t&&t.constructor===Object}function Wl(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!xr(e))throw new Error("bbox must only contain numbers")})}function Xl(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}const Vl=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:ai,bearingToAzimuth:ql,convertArea:Yl,convertLength:zl,degreesToRadians:Ul,earthRadius:Se,factors:li,feature:De,featureCollection:ut,geometry:Il,geometryCollection:Bl,isNumber:xr,isObject:di,lengthToDegrees:Hl,lengthToRadians:hi,lineString:He,lineStrings:Nl,multiLineString:ui,multiPoint:Gn,multiPolygon:Jn,point:Xe,points:Dl,polygon:ci,polygons:jl,radiansToDegrees:Qn,radiansToLength:Zn,round:Fl,unitsFactors:Tl,validateBBox:Wl,validateId:Xl},Symbol.toStringTag,{value:"Module"}));function es(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function It(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Dt(t){return t.type==="Feature"?t.geometry:t}function je(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=es(t),n=Dt(e),s=n.type,o=e.bbox,l=n.coordinates;if(o&&Kl(i,o)===!1)return!1;s==="Polygon"&&(l=[l]);for(var a=!1,c=0;c<l.length&&!a;c++)if(ts(i,l[c][0],r.ignoreBoundary)){for(var f=!1,p=1;p<l[c].length&&!f;)ts(i,l[c][p],!r.ignoreBoundary)&&(f=!0),p++;f||(a=!0)}return a}function ts(t,e,r){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],l=e[n][1],a=e[s][0],c=e[s][1],f=t[1]*(o-a)+l*(a-t[0])+c*(t[0]-o)===0&&(o-t[0])*(a-t[0])<=0&&(l-t[1])*(c-t[1])<=0;if(f)return!r;var p=l>t[1]!=c>t[1]&&t[0]<(a-o)*(t[1]-l)/(c-l)+o;p&&(i=!i)}return i}function Kl(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function jt(t,e,r){if(t!==null)for(var i,n,s,o,l,a,c,f=0,p=0,b,y=t.type,E=y==="FeatureCollection",O=y==="Feature",z=E?t.features.length:1,B=0;B<z;B++){c=E?t.features[B].geometry:O?t.geometry:t,b=c?c.type==="GeometryCollection":!1,l=b?c.geometries.length:1;for(var g=0;g<l;g++){var m=0,w=0;if(o=b?c.geometries[g]:c,o!==null){a=o.coordinates;var S=o.type;switch(f=r&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(e(a,p,B,m,w)===!1)return!1;p++,m++;break;case"LineString":case"MultiPoint":for(i=0;i<a.length;i++){if(e(a[i],p,B,m,w)===!1)return!1;p++,S==="MultiPoint"&&m++}S==="LineString"&&m++;break;case"Polygon":case"MultiLineString":for(i=0;i<a.length;i++){for(n=0;n<a[i].length-f;n++){if(e(a[i][n],p,B,m,w)===!1)return!1;p++}S==="MultiLineString"&&m++,S==="Polygon"&&w++}S==="Polygon"&&m++;break;case"MultiPolygon":for(i=0;i<a.length;i++){for(w=0,n=0;n<a[i].length;n++){for(s=0;s<a[i][n].length-f;s++){if(e(a[i][n][s],p,B,m,w)===!1)return!1;p++}w++}m++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(jt(o.geometries[i],e,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Gl(t,e,r,i){var n=r;return jt(t,function(s,o,l,a,c){o===0&&r===void 0?n=s:n=e(n,s,o,l,a,c)},i),n}function rs(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length&&e(t.features[r].properties,r)!==!1;r++);break;case"Feature":e(t.properties,0);break}}function Jl(t,e,r){var i=r;return rs(t,function(n,s){s===0&&r===void 0?i=n:i=e(i,n,s)}),i}function wr(t,e){if(t.type==="Feature")e(t,0);else if(t.type==="FeatureCollection")for(var r=0;r<t.features.length&&e(t.features[r],r)!==!1;r++);}function Zl(t,e,r){var i=r;return wr(t,function(n,s){s===0&&r===void 0?i=n:i=e(i,n,s)}),i}function Ql(t){var e=[];return jt(t,function(r){e.push(r)}),e}function fi(t,e){var r,i,n,s,o,l,a,c,f,p,b=0,y=t.type==="FeatureCollection",E=t.type==="Feature",O=y?t.features.length:1;for(r=0;r<O;r++){for(l=y?t.features[r].geometry:E?t.geometry:t,c=y?t.features[r].properties:E?t.properties:{},f=y?t.features[r].bbox:E?t.bbox:void 0,p=y?t.features[r].id:E?t.id:void 0,a=l?l.type==="GeometryCollection":!1,o=a?l.geometries.length:1,n=0;n<o;n++){if(s=a?l.geometries[n]:l,s===null){if(e(null,b,c,f,p)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,b,c,f,p)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],b,c,f,p)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}b++}}function ea(t,e,r){var i=r;return fi(t,function(n,s,o,l,a){s===0&&r===void 0?i=n:i=e(i,n,s,o,l,a)}),i}function tt(t,e){fi(t,function(r,i,n,s,o){var l=r===null?null:r.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return e(De(r,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var c=0;c<r.coordinates.length;c++){var f=r.coordinates[c],p={type:a,coordinates:f};if(e(De(p,n),i,c)===!1)return!1}})}function ta(t,e,r){var i=r;return tt(t,function(n,s,o){s===0&&o===0&&r===void 0?i=n:i=e(i,n,s,o)}),i}function is(t,e){tt(t,function(r,i,n){var s=0;if(r.geometry){var o=r.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var l,a=0,c=0,f=0;if(jt(r,function(p,b,y,E,O){if(l===void 0||i>a||E>c||O>f){l=p,a=i,c=E,f=O,s=0;return}var z=He([l,p],r.properties);if(e(z,i,n,O,s)===!1)return!1;s++,l=p})===!1)return!1}}})}function ra(t,e,r){var i=r,n=!1;return is(t,function(s,o,l,a,c){n===!1&&r===void 0?i=s:i=e(i,s,o,l,a,c),n=!0}),i}function ns(t,e){if(!t)throw new Error("geojson is required");tt(t,function(r,i,n){if(r.geometry!==null){var s=r.geometry.type,o=r.geometry.coordinates;switch(s){case"LineString":if(e(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<o.length;l++)if(e(He(o[l],r.properties),i,n,l)===!1)return!1;break}}})}function ia(t,e,r){var i=r;return ns(t,function(n,s,o,l){s===0&&r===void 0?i=n:i=e(i,n,s,o,l)}),i}function na(t,e){if(e=e||{},!di(e))throw new Error("options is invalid");var r=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,l;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),o=o||t.features[r].properties,l=t.features[r].geometry;break;case"Feature":o=o||t.properties,l=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=t;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),He([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),He([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),He([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),He([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function sa(t,e){if(e=e||{},!di(e))throw new Error("options is invalid");var r=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,l;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),o=o||t.features[r].properties,l=t.features[r].geometry;break;case"Feature":o=o||t.properties,l=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=t;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":return Xe(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Xe(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Xe(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Xe(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Xe(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),Xe(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const oa=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Ql,coordEach:jt,coordReduce:Gl,featureEach:wr,featureReduce:Zl,findPoint:sa,findSegment:na,flattenEach:tt,flattenReduce:ta,geomEach:fi,geomReduce:ea,lineEach:ns,lineReduce:ia,propEach:rs,propReduce:Jl,segmentEach:is,segmentReduce:ra},Symbol.toStringTag,{value:"Module"}));function ss(t){if(!t)throw new Error("geojson is required");var e=[];return tt(t,function(r){la(r,e)}),ut(e)}function la(t,e){var r=[],i=t.geometry;if(i!==null){switch(i.type){case"Polygon":r=It(i);break;case"LineString":r=[It(i)]}r.forEach(function(n){var s=aa(n,t.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function aa(t,e){var r=[];return t.reduce(function(i,n){var s=He([i,n],e);return s.bbox=ca(i,n),r.push(s),n}),r}function ca(t,e){var r=t[0],i=t[1],n=e[0],s=e[1],o=r<n?r:n,l=i<s?i:s,a=r>n?r:n,c=i>s?i:s;return[o,l,a,c]}var pi={exports:{}},os={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(Pt,function(){function r(g,m,w,S,_){(function A(k,F,H,I,te){for(;I>H;){if(I-H>600){var le=I-H+1,P=F-H+1,L=Math.log(le),M=.5*Math.exp(2*L/3),j=.5*Math.sqrt(L*M*(le-M)/le)*(P-le/2<0?-1:1),C=Math.max(H,Math.floor(F-P*M/le+j)),G=Math.min(I,Math.floor(F+(le-P)*M/le+j));A(k,F,C,G,te)}var Y=k[F],oe=H,re=I;for(i(k,H,F),te(k[I],Y)>0&&i(k,H,I);oe<re;){for(i(k,oe,re),oe++,re--;te(k[oe],Y)<0;)oe++;for(;te(k[re],Y)>0;)re--}te(k[H],Y)===0?i(k,H,re):i(k,++re,I),re<=F&&(H=re+1),F<=re&&(I=re-1)}})(g,m,w||0,S||g.length-1,_||n)}function i(g,m,w){var S=g[m];g[m]=g[w],g[w]=S}function n(g,m){return g<m?-1:g>m?1:0}var s=function(g){g===void 0&&(g=9),this._maxEntries=Math.max(4,g),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(g,m,w){if(!w)return m.indexOf(g);for(var S=0;S<m.length;S++)if(w(g,m[S]))return S;return-1}function l(g,m){a(g,0,g.children.length,m,g)}function a(g,m,w,S,_){_||(_=z(null)),_.minX=1/0,_.minY=1/0,_.maxX=-1/0,_.maxY=-1/0;for(var A=m;A<w;A++){var k=g.children[A];c(_,g.leaf?S(k):k)}return _}function c(g,m){return g.minX=Math.min(g.minX,m.minX),g.minY=Math.min(g.minY,m.minY),g.maxX=Math.max(g.maxX,m.maxX),g.maxY=Math.max(g.maxY,m.maxY),g}function f(g,m){return g.minX-m.minX}function p(g,m){return g.minY-m.minY}function b(g){return(g.maxX-g.minX)*(g.maxY-g.minY)}function y(g){return g.maxX-g.minX+(g.maxY-g.minY)}function E(g,m){return g.minX<=m.minX&&g.minY<=m.minY&&m.maxX<=g.maxX&&m.maxY<=g.maxY}function O(g,m){return m.minX<=g.maxX&&m.minY<=g.maxY&&m.maxX>=g.minX&&m.maxY>=g.minY}function z(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function B(g,m,w,S,_){for(var A=[m,w];A.length;)if(!((w=A.pop())-(m=A.pop())<=S)){var k=m+Math.ceil((w-m)/S/2)*S;r(g,k,m,w,_),A.push(m,k,k,w)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(g){var m=this.data,w=[];if(!O(g,m))return w;for(var S=this.toBBox,_=[];m;){for(var A=0;A<m.children.length;A++){var k=m.children[A],F=m.leaf?S(k):k;O(g,F)&&(m.leaf?w.push(k):E(g,F)?this._all(k,w):_.push(k))}m=_.pop()}return w},s.prototype.collides=function(g){var m=this.data;if(!O(g,m))return!1;for(var w=[];m;){for(var S=0;S<m.children.length;S++){var _=m.children[S],A=m.leaf?this.toBBox(_):_;if(O(g,A)){if(m.leaf||E(g,A))return!0;w.push(_)}}m=w.pop()}return!1},s.prototype.load=function(g){if(!g||!g.length)return this;if(g.length<this._minEntries){for(var m=0;m<g.length;m++)this.insert(g[m]);return this}var w=this._build(g.slice(),0,g.length-1,0);if(this.data.children.length)if(this.data.height===w.height)this._splitRoot(this.data,w);else{if(this.data.height<w.height){var S=this.data;this.data=w,w=S}this._insert(w,this.data.height-w.height-1,!0)}else this.data=w;return this},s.prototype.insert=function(g){return g&&this._insert(g,this.data.height-1),this},s.prototype.clear=function(){return this.data=z([]),this},s.prototype.remove=function(g,m){if(!g)return this;for(var w,S,_,A=this.data,k=this.toBBox(g),F=[],H=[];A||F.length;){if(A||(A=F.pop(),S=F[F.length-1],w=H.pop(),_=!0),A.leaf){var I=o(g,A.children,m);if(I!==-1)return A.children.splice(I,1),F.push(A),this._condense(F),this}_||A.leaf||!E(A,k)?S?(w++,A=S.children[w],_=!1):A=null:(F.push(A),H.push(w),w=0,S=A,A=A.children[0])}return this},s.prototype.toBBox=function(g){return g},s.prototype.compareMinX=function(g,m){return g.minX-m.minX},s.prototype.compareMinY=function(g,m){return g.minY-m.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(g){return this.data=g,this},s.prototype._all=function(g,m){for(var w=[];g;)g.leaf?m.push.apply(m,g.children):w.push.apply(w,g.children),g=w.pop();return m},s.prototype._build=function(g,m,w,S){var _,A=w-m+1,k=this._maxEntries;if(A<=k)return l(_=z(g.slice(m,w+1)),this.toBBox),_;S||(S=Math.ceil(Math.log(A)/Math.log(k)),k=Math.ceil(A/Math.pow(k,S-1))),(_=z([])).leaf=!1,_.height=S;var F=Math.ceil(A/k),H=F*Math.ceil(Math.sqrt(k));B(g,m,w,H,this.compareMinX);for(var I=m;I<=w;I+=H){var te=Math.min(I+H-1,w);B(g,I,te,F,this.compareMinY);for(var le=I;le<=te;le+=F){var P=Math.min(le+F-1,te);_.children.push(this._build(g,le,P,S-1))}}return l(_,this.toBBox),_},s.prototype._chooseSubtree=function(g,m,w,S){for(;S.push(m),!m.leaf&&S.length-1!==w;){for(var _=1/0,A=1/0,k=void 0,F=0;F<m.children.length;F++){var H=m.children[F],I=b(H),te=(le=g,P=H,(Math.max(P.maxX,le.maxX)-Math.min(P.minX,le.minX))*(Math.max(P.maxY,le.maxY)-Math.min(P.minY,le.minY))-I);te<A?(A=te,_=I<_?I:_,k=H):te===A&&I<_&&(_=I,k=H)}m=k||m.children[0]}var le,P;return m},s.prototype._insert=function(g,m,w){var S=w?g:this.toBBox(g),_=[],A=this._chooseSubtree(S,this.data,m,_);for(A.children.push(g),c(A,S);m>=0&&_[m].children.length>this._maxEntries;)this._split(_,m),m--;this._adjustParentBBoxes(S,_,m)},s.prototype._split=function(g,m){var w=g[m],S=w.children.length,_=this._minEntries;this._chooseSplitAxis(w,_,S);var A=this._chooseSplitIndex(w,_,S),k=z(w.children.splice(A,w.children.length-A));k.height=w.height,k.leaf=w.leaf,l(w,this.toBBox),l(k,this.toBBox),m?g[m-1].children.push(k):this._splitRoot(w,k)},s.prototype._splitRoot=function(g,m){this.data=z([g,m]),this.data.height=g.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(g,m,w){for(var S,_,A,k,F,H,I,te=1/0,le=1/0,P=m;P<=w-m;P++){var L=a(g,0,P,this.toBBox),M=a(g,P,w,this.toBBox),j=(_=L,A=M,k=void 0,F=void 0,H=void 0,I=void 0,k=Math.max(_.minX,A.minX),F=Math.max(_.minY,A.minY),H=Math.min(_.maxX,A.maxX),I=Math.min(_.maxY,A.maxY),Math.max(0,H-k)*Math.max(0,I-F)),C=b(L)+b(M);j<te?(te=j,S=P,le=C<le?C:le):j===te&&C<le&&(le=C,S=P)}return S||w-m},s.prototype._chooseSplitAxis=function(g,m,w){var S=g.leaf?this.compareMinX:f,_=g.leaf?this.compareMinY:p;this._allDistMargin(g,m,w,S)<this._allDistMargin(g,m,w,_)&&g.children.sort(S)},s.prototype._allDistMargin=function(g,m,w,S){g.children.sort(S);for(var _=this.toBBox,A=a(g,0,m,_),k=a(g,w-m,w,_),F=y(A)+y(k),H=m;H<w-m;H++){var I=g.children[H];c(A,g.leaf?_(I):I),F+=y(A)}for(var te=w-m-1;te>=m;te--){var le=g.children[te];c(k,g.leaf?_(le):le),F+=y(k)}return F},s.prototype._adjustParentBBoxes=function(g,m,w){for(var S=w;S>=0;S--)c(m[S],g)},s.prototype._condense=function(g){for(var m=g.length-1,w=void 0;m>=0;m--)g[m].children.length===0?m>0?(w=g[m-1].children).splice(w.indexOf(g[m]),1):this.clear():l(g[m],this.toBBox)},s})})(os);var ua=os.exports;const ha=Kr(Vl),da=Kr(oa);function xt(t){var e=[1/0,1/0,-1/0,-1/0];return jt(t,function(r){e[0]>r[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]<r[0]&&(e[2]=r[0]),e[3]<r[1]&&(e[3]=r[1])}),e}xt.default=xt;const fa=Kr(Object.freeze(Object.defineProperty({__proto__:null,default:xt},Symbol.toStringTag,{value:"Module"})));var Ve=ua,ls=ha,as=da,Nt=fa.default,pa=as.featureEach;as.coordEach,ls.polygon;var cs=ls.featureCollection;function us(t){var e=new Ve(t);return e.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Nt(r),Ve.prototype.insert.call(this,r)},e.load=function(r){var i=[];return Array.isArray(r)?r.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Nt(n),i.push(n)}):pa(r,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Nt(n),i.push(n)}),Ve.prototype.load.call(this,i)},e.remove=function(r,i){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Nt(r),Ve.prototype.remove.call(this,r,i)},e.clear=function(){return Ve.prototype.clear.call(this)},e.search=function(r){var i=Ve.prototype.search.call(this,this.toBBox(r));return cs(i)},e.collides=function(r){return Ve.prototype.collides.call(this,this.toBBox(r))},e.all=function(){var r=Ve.prototype.all.call(this);return cs(r)},e.toJSON=function(){return Ve.prototype.toJSON.call(this)},e.fromJSON=function(r){return Ve.prototype.fromJSON.call(this,r)},e.toBBox=function(r){var i;if(r.bbox)i=r.bbox;else if(Array.isArray(r)&&r.length===4)i=r;else if(Array.isArray(r)&&r.length===6)i=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")i=Nt(r);else if(r.type==="FeatureCollection")i=Nt(r);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}pi.exports=us,pi.exports.default=us;var ga=pi.exports;const ma=Vr(ga);function gi(t,e){var r={},i=[];if(t.type==="LineString"&&(t=De(t)),e.type==="LineString"&&(e=De(e)),t.type==="Feature"&&e.type==="Feature"&&t.geometry!==null&&e.geometry!==null&&t.geometry.type==="LineString"&&e.geometry.type==="LineString"&&t.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=hs(t,e);return n&&i.push(n),ut(i)}var s=ma();return s.load(ss(e)),wr(ss(t),function(o){wr(s.search(o),function(l){var a=hs(o,l);if(a){var c=It(a).join(",");r[c]||(r[c]=!0,i.push(a))}})}),ut(i)}function hs(t,e){var r=It(t),i=It(e);if(r.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=r[0][0],s=r[0][1],o=r[1][0],l=r[1][1],a=i[0][0],c=i[0][1],f=i[1][0],p=i[1][1],b=(p-c)*(o-n)-(f-a)*(l-s),y=(f-a)*(s-c)-(p-c)*(n-a),E=(o-n)*(s-c)-(l-s)*(n-a);if(b===0)return null;var O=y/b,z=E/b;if(O>=0&&O<=1&&z>=0&&z<=1){var B=n+O*(o-n),g=s+O*(l-s);return Xe([B,g])}return null}function mi(t,e){e===void 0&&(e={});var r=Dt(t);switch(!e.properties&&t.type==="Feature"&&(e.properties=t.properties),r.type){case"Polygon":return ya(r,e);case"MultiPolygon":return va(r,e);default:throw new Error("invalid poly")}}function ya(t,e){e===void 0&&(e={});var r=Dt(t),i=r.coordinates,n=e.properties?e.properties:t.type==="Feature"?t.properties:{};return ds(i,n)}function va(t,e){e===void 0&&(e={});var r=Dt(t),i=r.coordinates,n=e.properties?e.properties:t.type==="Feature"?t.properties:{},s=[];return i.forEach(function(o){s.push(ds(o,n))}),ut(s)}function ds(t,e){return t.length>1?ui(t,e):He(t[0],e)}function ba(t,e){var r=!0;return tt(t,function(i){tt(e,function(n){if(r===!1)return!1;r=xa(i.geometry,n.geometry)})}),r}function xa(t,e){switch(t.type){case"Point":switch(e.type){case"Point":return!Ea(t.coordinates,e.coordinates);case"LineString":return!fs(e,t);case"Polygon":return!je(t,e)}break;case"LineString":switch(e.type){case"Point":return!fs(t,e);case"LineString":return!wa(t,e);case"Polygon":return!ps(e,t)}break;case"Polygon":switch(e.type){case"Point":return!je(e,t);case"LineString":return!ps(t,e);case"Polygon":return!$a(e,t)}}return!1}function fs(t,e){for(var r=0;r<t.coordinates.length-1;r++)if(_a(t.coordinates[r],t.coordinates[r+1],e.coordinates))return!0;return!1}function wa(t,e){var r=gi(t,e);return r.features.length>0}function ps(t,e){for(var r=0,i=e.coordinates;r<i.length;r++){var n=i[r];if(je(n,t))return!0}var s=gi(e,mi(t));return s.features.length>0}function $a(t,e){for(var r=0,i=t.coordinates[0];r<i.length;r++){var n=i[r];if(je(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var l=o[s];if(je(l,t))return!0}var a=gi(mi(t),mi(e));return a.features.length>0}function _a(t,e,r){var i=r[0]-t[0],n=r[1]-t[1],s=e[0]-t[0],o=e[1]-t[1],l=i*o-n*s;return l!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?t[0]<=r[0]&&r[0]<=e[0]:e[0]<=r[0]&&r[0]<=t[0]:o>0?t[1]<=r[1]&&r[1]<=e[1]:e[1]<=r[1]&&r[1]<=t[1]}function Ea(t,e){return t[0]===e[0]&&t[1]===e[1]}function Sa(t,e){var r=!1;return tt(t,function(i){tt(e,function(n){if(r===!0)return!0;r=!ba(i.geometry,n.geometry)})}),r}function $r(t,e,r){r===void 0&&(r={});for(var i=es(t),n=It(e),s=0;s<n.length-1;s++){var o=!1;if(r.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),Aa(n[s],n[s+1],i,o,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function Aa(t,e,r,i,n){var s=r[0],o=r[1],l=t[0],a=t[1],c=e[0],f=e[1],p=r[0]-l,b=r[1]-a,y=c-l,E=f-a,O=p*E-b*y;if(n!==null){if(Math.abs(O)>n)return!1}else if(O!==0)return!1;if(i){if(i==="start")return Math.abs(y)>=Math.abs(E)?y>0?l<s&&s<=c:c<=s&&s<l:E>0?a<o&&o<=f:f<=o&&o<a;if(i==="end")return Math.abs(y)>=Math.abs(E)?y>0?l<=s&&s<c:c<s&&s<=l:E>0?a<=o&&o<f:f<o&&o<=a;if(i==="both")return Math.abs(y)>=Math.abs(E)?y>0?l<s&&s<c:c<s&&s<l:E>0?a<o&&o<f:f<o&&o<a}else return Math.abs(y)>=Math.abs(E)?y>0?l<=s&&s<=c:c<=s&&s<=l:E>0?a<=o&&o<=f:f<=o&&o<=a;return!1}function Ma(t,e){var r=Dt(t),i=Dt(e),n=r.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return Oa(r,i);case"LineString":return $r(r,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return je(r,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return Pa(r,i);case"LineString":return La(r,i);case"Polygon":case"MultiPolygon":return Ca(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return ka(r,i);case"Polygon":case"MultiPolygon":return Ra(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return Ta(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function Oa(t,e){var r,i=!1;for(r=0;r<e.coordinates.length;r++)if(ms(e.coordinates[r],t.coordinates)){i=!0;break}return i}function Pa(t,e){for(var r=0;r<t.coordinates.length;r++){for(var i=!1,n=0;n<e.coordinates.length;n++)ms(t.coordinates[r],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function La(t,e){for(var r=!1,i=0;i<t.coordinates.length;i++){if(!$r(t.coordinates[i],e))return!1;r||(r=$r(t.coordinates[i],e,{ignoreEndVertices:!0}))}return r}function Ca(t,e){for(var r=!0,i=!1,n=0;n<t.coordinates.length;n++){if(i=je(t.coordinates[1],e),!i){r=!1;break}i=je(t.coordinates[1],e,{ignoreBoundary:!0})}return r&&i}function ka(t,e){for(var r=0;r<t.coordinates.length;r++)if(!$r(t.coordinates[r],e))return!1;return!0}function Ra(t,e){var r=xt(e),i=xt(t);if(!gs(r,i))return!1;for(var n=!1,s=0;s<t.coordinates.length-1;s++){if(!je(t.coordinates[s],e))return!1;if(n||(n=je(t.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=Ia(t.coordinates[s],t.coordinates[s+1]);n=je(o,e,{ignoreBoundary:!0})}}return n}function Ta(t,e){var r=xt(t),i=xt(e);if(!gs(i,r))return!1;for(var n=0;n<t.coordinates[0].length;n++)if(!je(t.coordinates[0][n],e))return!1;return!0}function gs(t,e){return!(t[0]>e[0]||t[2]<e[2]||t[1]>e[1]||t[3]<e[3])}function ms(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ia(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var Da=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,nr=(t,e,r,i)=>{for(var n=i>1?void 0:i?ja(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Da(e,r,n),n};const Na=(t,e)=>e?Sa(t,e):!0,Ba=(t,e)=>e?Ma(t,e):!0;let yi=class extends _e{reset(){Ct(this.filterObject),this.renderRoot.querySelector("eox-itemfilter-spatial-filter").reset(),this.requestUpdate()}createRenderRoot(){return this}render(){return de(this.filterObject,()=>{var t;return U`
|
|
731
731
|
<form style="display: inline">
|
|
732
|
-
${Gt(["intersects","within"],e=>
|
|
732
|
+
${Gt(["intersects","within"],e=>U`
|
|
733
733
|
<label>
|
|
734
734
|
<input
|
|
735
735
|
type="radio"
|
|
@@ -748,7 +748,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
748
748
|
.geometry=${(t=this.filterObject.state)==null?void 0:t.geometry}
|
|
749
749
|
@filter="${e=>{this.filterObject.state.geometry=e.detail.geometry,this.filterObject.dirty=!0,this.filterObject.stringifiedState="Polygon",this.dispatchEvent(new CustomEvent("filter"))}}"
|
|
750
750
|
></eox-itemfilter-spatial>
|
|
751
|
-
`})}};nr([J()],yi.prototype,"filterObject",2),yi=nr([ke("eox-itemfilter-spatial")],yi);let _r=class extends _e{render(){return
|
|
751
|
+
`})}};nr([J()],yi.prototype,"filterObject",2),yi=nr([ke("eox-itemfilter-spatial")],yi);let _r=class extends _e{render(){return U`<eox-map part="map" style="height: 400px"></eox-map>`}firstUpdated(){this.setup()}setup(){const t=[{type:"Vector",properties:{id:"draw"},source:{type:"Vector",...this.geometry&&{format:"GeoJSON"},...this.geometry&&{url:this.createFeatureUrl(this.geometry)}},zIndex:1,interactions:[{type:"draw",options:{id:"drawInteraction",type:"Box",modify:!0}}]},{type:"Tile",source:{type:"XYZ",url:"https://s2maps-tiles.eu/wmts/1.0.0/osm_3857/default/g/{z}/{y}/{x}.jpg",attribution:"{ OSM: Data © OpenStreetMap contributors and others, Rendering © EOX }"}}];this.eoxMap=this.renderRoot.querySelector("eox-map"),setTimeout(()=>{this.eoxMap.layers=t;const e=r=>{const i=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:r.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(i)};this.eoxMap.interactions.drawInteraction.on("drawend",r=>{e(r.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",r=>{e(r.features.getArray()[0])})},1e3)}createFeatureUrl(t){return`data:text/json,${encodeURIComponent(JSON.stringify({type:"FeatureCollection",features:[{type:"Feature",properties:null,geometry:t}]}))}`}reset(){var e;const t=this.eoxMap.getLayerById("draw").getSource();((e=t.getFeatures())==null?void 0:e.length)>0&&(t.clear(),this.eoxMap.removeInteraction("drawInteraction_modify"),this.setup())}};nr([J()],_r.prototype,"geometry",2),nr([Ze()],_r.prototype,"eoxMap",2),_r=nr([ke("eox-itemfilter-spatial-filter")],_r);var Fa=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor,ys=(t,e,r,i)=>{for(var n=i>1?void 0:i?Ha(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Fa(e,r,n),n};let vi=class extends _e{constructor(){super(...arguments),this.inputHandler=()=>{const t=this.renderRoot.querySelector("input[type='text']");this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=t.value}),this.filterObject.dirty=!0,this.filterObject.stringifiedState=t.value,this.dispatchEvent(new CustomEvent("filter"))},this.debouncedInputHandler=Vn(this.inputHandler,500,{leading:!0})}reset(){const t=this.renderRoot.querySelector("input[type='text']");t.value="",Ct(this.filterObject),this.filterObject.dirty=!1,this.requestUpdate()}createRenderRoot(){return this}render(){return de(this.filterObject,()=>U`
|
|
752
752
|
<style>
|
|
753
753
|
input {
|
|
754
754
|
max-height: 100%;
|
|
@@ -763,13 +763,13 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
763
763
|
@input="${this.debouncedInputHandler}"
|
|
764
764
|
@click=${t=>{t.stopPropagation()}}
|
|
765
765
|
/>
|
|
766
|
-
`)}};ys([J()],vi.prototype,"filterObject",2),vi=ys([ke("eox-itemfilter-text")],vi);var qa=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,wt=(t,e,r,i)=>{for(var n=i>1?void 0:i?Ua(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&qa(e,r,n),n};let ht=class extends _e{constructor(){super(...arguments),this.idProperty="id",this.items=[],this.titleProperty="title",this.unstyled=!1,this.inputText="",this.replaceInput=null,this._clickOutsideListener=()=>{this.items.forEach(t=>{delete t._inProgress}),this.requestUpdate()},this._keyboardEventListener=t=>{["Enter","Escape","Space"].includes(t.code)&&this._handleKeyboard(t.code)}}_handleKeyboard(t){var s,o,l,a,c,f;if(this.clientHeight===0)return;const e=this.items.find(p=>p._inProgress),r=(e==null?void 0:e.type)==="text"&&(e==null?void 0:e.dirty),i=this.renderRoot.querySelector("#inline-input"),n=(f=(c=(a=(l=(o=(s=this.renderRoot)==null?void 0:s.querySelector("[data-filter]"))==null?void 0:o.querySelector("eox-autocomplete"))==null?void 0:l.renderRoot)==null?void 0:a.querySelector("eox-selectionlist"))==null?void 0:c.renderRoot)==null?void 0:f.querySelector("li.highlighted");if(t=="Enter"&&n&&i.selectionStart&&(n.querySelector("input[type=checkbox]").dispatchEvent(new Event("change")),i.selectionStart=0,i.value="",i.focus()),["Escape","Space"].includes(t)||t=="Enter"&&r){e&&(delete e._inProgress,this.requestUpdate(),this.inputText="",this.renderRoot.querySelector("input").value="",this.renderRoot.querySelector("input").focus()),this.renderRoot.querySelector("[slot=content]").classList.remove("hidden");return}}_handleReset(t){t.forEach(e=>{Ct(e),delete e._inProgress,delete e.stringifiedState}),this.renderRoot.querySelector("[slot=content]").classList.remove("hidden"),this.requestUpdate(),this.dispatchEvent(new CustomEvent("filter"))}connectedCallback(){super.connectedCallback(),this.getRootNode().addEventListener("keydown",this._keyboardEventListener),window.addEventListener("click",this._clickOutsideListener)}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener),window.removeEventListener("click",this._clickOutsideListener)}render(){return
|
|
766
|
+
`)}};ys([J()],vi.prototype,"filterObject",2),vi=ys([ke("eox-itemfilter-text")],vi);var qa=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,wt=(t,e,r,i)=>{for(var n=i>1?void 0:i?Ua(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&qa(e,r,n),n};let ht=class extends _e{constructor(){super(...arguments),this.idProperty="id",this.items=[],this.titleProperty="title",this.unstyled=!1,this.inputText="",this.replaceInput=null,this._clickOutsideListener=()=>{this.items.forEach(t=>{delete t._inProgress}),this.requestUpdate()},this._keyboardEventListener=t=>{["Enter","Escape","Space"].includes(t.code)&&this._handleKeyboard(t.code)}}_handleKeyboard(t){var s,o,l,a,c,f;if(this.clientHeight===0)return;const e=this.items.find(p=>p._inProgress),r=(e==null?void 0:e.type)==="text"&&(e==null?void 0:e.dirty),i=this.renderRoot.querySelector("#inline-input"),n=(f=(c=(a=(l=(o=(s=this.renderRoot)==null?void 0:s.querySelector("[data-filter]"))==null?void 0:o.querySelector("eox-autocomplete"))==null?void 0:l.renderRoot)==null?void 0:a.querySelector("eox-selectionlist"))==null?void 0:c.renderRoot)==null?void 0:f.querySelector("li.highlighted");if(t=="Enter"&&n&&i.selectionStart&&(n.querySelector("input[type=checkbox]").dispatchEvent(new Event("change")),i.selectionStart=0,i.value="",i.focus()),["Escape","Space"].includes(t)||t=="Enter"&&r){e&&(delete e._inProgress,this.requestUpdate(),this.inputText="",this.renderRoot.querySelector("input").value="",this.renderRoot.querySelector("input").focus()),this.renderRoot.querySelector("[slot=content]").classList.remove("hidden");return}}_handleReset(t){t.forEach(e=>{Ct(e),delete e._inProgress,delete e.stringifiedState}),this.renderRoot.querySelector("[slot=content]").classList.remove("hidden"),this.requestUpdate(),this.dispatchEvent(new CustomEvent("filter"))}connectedCallback(){super.connectedCallback(),this.getRootNode().addEventListener("keydown",this._keyboardEventListener),window.addEventListener("click",this._clickOutsideListener)}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener),window.removeEventListener("click",this._clickOutsideListener)}render(){return U`
|
|
767
767
|
<style>
|
|
768
768
|
:host,
|
|
769
769
|
.container {
|
|
770
770
|
display: flex;
|
|
771
771
|
}
|
|
772
|
-
${this.unstyled?se:
|
|
772
|
+
${this.unstyled?se:U`
|
|
773
773
|
${Jr} :host { position: relative; } .container { width: 100%;
|
|
774
774
|
position: relative; border: 1px solid #00417066; border-radius:
|
|
775
775
|
4px; height: 24px; padding: 5px; flex: 1; justify-content:
|
|
@@ -810,7 +810,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
810
810
|
@input=${t=>{if(this.inputText=t.target.value.toLowerCase(),this.replaceInput){const e=this.renderRoot.querySelector("[data-filter]").renderRoot.querySelector("input")||this.renderRoot.querySelector("[data-filter]").renderRoot.querySelector("eox-autocomplete").renderRoot.querySelector("input");e&&(e.value=this.inputText,e.dispatchEvent(new Event("input")))}}}
|
|
811
811
|
/>
|
|
812
812
|
<div slot="content">
|
|
813
|
-
${de(!this.items.find(t=>t._inProgress),()=>
|
|
813
|
+
${de(!this.items.find(t=>t._inProgress),()=>U`
|
|
814
814
|
<eox-selectionlist
|
|
815
815
|
.filter=${this.inputText}
|
|
816
816
|
.idProperty=${this.idProperty}
|
|
@@ -840,7 +840,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
840
840
|
</eox-dropdown>
|
|
841
841
|
</div>
|
|
842
842
|
</div>
|
|
843
|
-
${de(this.items.filter(t=>t.stringifiedState||t._inProgress).length>0,()=>
|
|
843
|
+
${de(this.items.filter(t=>t.stringifiedState||t._inProgress).length>0,()=>U`
|
|
844
844
|
<div class="button-container">
|
|
845
845
|
<button
|
|
846
846
|
class="icon"
|
|
@@ -850,7 +850,32 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
850
850
|
</button>
|
|
851
851
|
</div>
|
|
852
852
|
`)}
|
|
853
|
-
`}};wt([J()],ht.prototype,"idProperty",2),wt([J()],ht.prototype,"items",2),wt([J()],ht.prototype,"titleProperty",2),wt([J()],ht.prototype,"unstyled",2),wt([Ze()],ht.prototype,"inputText",2),wt([Ze()],ht.prototype,"replaceInput",2),ht=wt([ke("eox-itemfilter-inline")],ht);function rt(t){return Array.isArray?Array.isArray(t):xs(t)==="[object Array]"}const za=1/0;function Ya(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-za?"-0":e}function Wa(t){return t==null?"":Ya(t)}function Ke(t){return typeof t=="string"}function vs(t){return typeof t=="number"}function Xa(t){return t===!0||t===!1||Va(t)&&xs(t)=="[object Boolean]"}function bs(t){return typeof t=="object"}function Va(t){return bs(t)&&t!==null}function Te(t){return t!=null}function bi(t){return!t.trim().length}function xs(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Ru="Extended search is not available",Ka="Incorrect 'index' type",Ga=t=>`Invalid value for key ${t}`,Ja=t=>`Pattern length exceeds max of ${t}.`,Za=t=>`Missing ${t} property in key`,Qa=t=>`Property 'weight' in key '${t}' must be a positive integer`,ws=Object.prototype.hasOwnProperty;class ec{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(i=>{let n=$s(i);this._keys.push(n),this._keyMap[n.id]=n,r+=n.weight}),this._keys.forEach(i=>{i.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function $s(t){let e=null,r=null,i=null,n=1,s=null;if(Ke(t)||rt(t))i=t,e=_s(t),r=xi(t);else{if(!ws.call(t,"name"))throw new Error(Za("name"));const o=t.name;if(i=o,ws.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(Qa(o));e=_s(o),r=xi(o),s=t.getFn}return{path:e,id:r,weight:n,src:i,getFn:s}}function _s(t){return rt(t)?t:t.split(".")}function xi(t){return rt(t)?t.join("."):t}function tc(t,e){let r=[],i=!1;const n=(s,o,l)=>{if(Te(s))if(!o[l])r.push(s);else{let a=o[l];const c=s[a];if(!Te(c))return;if(l===o.length-1&&(Ke(c)||vs(c)||Xa(c)))r.push(Wa(c));else if(rt(c)){i=!0;for(let f=0,p=c.length;f<p;f+=1)n(c[f],o,l+1)}else o.length&&n(c,o,l+1)}};return n(t,Ke(e)?e.split("."):e,0),i?r:r[0]}var K={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:tc,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const rc=/[^ ]+/g;function ic(t=1,e=3){const r=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(rc).length;if(r.has(s))return r.get(s);const o=1/Math.pow(s,.5*t),l=parseFloat(Math.round(o*i)/i);return r.set(s,l),l},clear(){r.clear()}}}class wi{constructor({getFn:e=K.getFn,fieldNormWeight:r=K.fieldNormWeight}={}){this.norm=ic(r,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((r,i)=>{this._keysMap[r.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ke(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();Ke(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,i=this.size();r<i;r+=1)this.records[r].i-=1}getValueForItemAtKeyId(e,r){return e[this._keysMap[r]]}size(){return this.records.length}_addString(e,r){if(!Te(e)||bi(e))return;let i={v:e,i:r,n:this.norm.get(e)};this.records.push(i)}_addObject(e,r){let i={i:r,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(Te(o)){if(rt(o)){let l=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:c,value:f}=a.pop();if(Te(f))if(Ke(f)&&!bi(f)){let p={v:f,i:c,n:this.norm.get(f)};l.push(p)}else rt(f)&&f.forEach((p,b)=>{a.push({nestedArrIndex:b,value:p})})}i.$[s]=l}else if(Ke(o)&&!bi(o)){let l={v:o,n:this.norm.get(o)};i.$[s]=l}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Es(t,e,{getFn:r=K.getFn,fieldNormWeight:i=K.fieldNormWeight}={}){const n=new wi({getFn:r,fieldNormWeight:i});return n.setKeys(t.map($s)),n.setSources(e),n.create(),n}function nc(t,{getFn:e=K.getFn,fieldNormWeight:r=K.fieldNormWeight}={}){const{keys:i,records:n}=t,s=new wi({getFn:e,fieldNormWeight:r});return s.setKeys(i),s.setIndexRecords(n),s}function Er(t,{errors:e=0,currentLocation:r=0,expectedLocation:i=0,distance:n=K.distance,ignoreLocation:s=K.ignoreLocation}={}){const o=e/t.length;if(s)return o;const l=Math.abs(i-r);return n?o+l/n:l?1:o}function sc(t=[],e=K.minMatchCharLength){let r=[],i=-1,n=-1,s=0;for(let o=t.length;s<o;s+=1){let l=t[s];l&&i===-1?i=s:!l&&i!==-1&&(n=s-1,n-i+1>=e&&r.push([i,n]),i=-1)}return t[s-1]&&s-i>=e&&r.push([i,s-1]),r}const $t=32;function oc(t,e,r,{location:i=K.location,distance:n=K.distance,threshold:s=K.threshold,findAllMatches:o=K.findAllMatches,minMatchCharLength:l=K.minMatchCharLength,includeMatches:a=K.includeMatches,ignoreLocation:c=K.ignoreLocation}={}){if(e.length>$t)throw new Error(Ja($t));const f=e.length,p=t.length,b=Math.max(0,Math.min(i,p));let y=s,E=b;const O=l>1||a,U=O?Array(p):[];let B;for(;(B=t.indexOf(e,E))>-1;){let A=Er(e,{currentLocation:B,expectedLocation:b,distance:n,ignoreLocation:c});if(y=Math.min(A,y),E=B+f,O){let k=0;for(;k<f;)U[B+k]=1,k+=1}}E=-1;let g=[],m=1,w=f+p;const S=1<<f-1;for(let A=0;A<f;A+=1){let k=0,F=w;for(;k<F;)Er(e,{errors:A,currentLocation:b+F,expectedLocation:b,distance:n,ignoreLocation:c})<=y?k=F:w=F,F=Math.floor((w-k)/2+k);w=F;let H=Math.max(1,b-F+1),I=o?p:Math.min(b+F,p)+f,te=Array(I+2);te[I+1]=(1<<A)-1;for(let P=I;P>=H;P-=1){let L=P-1,M=r[t.charAt(L)];if(O&&(U[L]=+!!M),te[P]=(te[P+1]<<1|1)&M,A&&(te[P]|=(g[P+1]|g[P])<<1|1|g[P+1]),te[P]&S&&(m=Er(e,{errors:A,currentLocation:L,expectedLocation:b,distance:n,ignoreLocation:c}),m<=y)){if(y=m,E=L,E<=b)break;H=Math.max(1,2*b-E)}}if(Er(e,{errors:A+1,currentLocation:b,expectedLocation:b,distance:n,ignoreLocation:c})>y)break;g=te}const _={isMatch:E>=0,score:Math.max(.001,m)};if(O){const A=sc(U,l);A.length?a&&(_.indices=A):_.isMatch=!1}return _}function lc(t){let e={};for(let r=0,i=t.length;r<i;r+=1){const n=t.charAt(r);e[n]=(e[n]||0)|1<<i-r-1}return e}class Ss{constructor(e,{location:r=K.location,threshold:i=K.threshold,distance:n=K.distance,includeMatches:s=K.includeMatches,findAllMatches:o=K.findAllMatches,minMatchCharLength:l=K.minMatchCharLength,isCaseSensitive:a=K.isCaseSensitive,ignoreLocation:c=K.ignoreLocation}={}){if(this.options={location:r,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:c},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(b,y)=>{this.chunks.push({pattern:b,alphabet:lc(b),startIndex:y})},p=this.pattern.length;if(p>$t){let b=0;const y=p%$t,E=p-y;for(;b<E;)f(this.pattern.substr(b,$t),b),b+=$t;if(y){const O=p-$t;f(this.pattern.substr(O),O)}}else f(this.pattern,0)}searchIn(e){const{isCaseSensitive:r,includeMatches:i}=this.options;if(r||(e=e.toLowerCase()),this.pattern===e){let E={isMatch:!0,score:0};return i&&(E.indices=[[0,e.length-1]]),E}const{location:n,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,ignoreLocation:c}=this.options;let f=[],p=0,b=!1;this.chunks.forEach(({pattern:E,alphabet:O,startIndex:U})=>{const{isMatch:B,score:g,indices:m}=oc(e,E,O,{location:n+U,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:c});B&&(b=!0),p+=g,B&&m&&(f=[...f,...m])});let y={isMatch:b,score:b?p/this.chunks.length:1};return b&&i&&(y.indices=f),y}}class dt{constructor(e){this.pattern=e}static isMultiMatch(e){return As(e,this.multiRegex)}static isSingleMatch(e){return As(e,this.singleRegex)}search(){}}function As(t,e){const r=t.match(e);return r?r[1]:null}class ac extends dt{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class cc extends dt{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 uc extends dt{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class hc extends dt{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class dc extends dt{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class fc extends dt{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class Ms extends dt{constructor(e,{location:r=K.location,threshold:i=K.threshold,distance:n=K.distance,includeMatches:s=K.includeMatches,findAllMatches:o=K.findAllMatches,minMatchCharLength:l=K.minMatchCharLength,isCaseSensitive:a=K.isCaseSensitive,ignoreLocation:c=K.ignoreLocation}={}){super(e),this._bitapSearch=new Ss(e,{location:r,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Os extends dt{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,r))>-1;)r=i+s,n.push([i,r-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const $i=[ac,Os,uc,hc,fc,dc,cc,Ms],Ps=$i.length,pc=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,gc="|";function mc(t,e={}){return t.split(gc).map(r=>{let i=r.trim().split(pc).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const l=i[s];let a=!1,c=-1;for(;!a&&++c<Ps;){const f=$i[c];let p=f.isMultiMatch(l);p&&(n.push(new f(p,e)),a=!0)}if(!a)for(c=-1;++c<Ps;){const f=$i[c];let p=f.isSingleMatch(l);if(p){n.push(new f(p,e));break}}}return n})}const yc=new Set([Ms.type,Os.type]);class vc{constructor(e,{isCaseSensitive:r=K.isCaseSensitive,includeMatches:i=K.includeMatches,minMatchCharLength:n=K.minMatchCharLength,ignoreLocation:s=K.ignoreLocation,findAllMatches:o=K.findAllMatches,location:l=K.location,threshold:a=K.threshold,distance:c=K.distance}={}){this.query=null,this.options={isCaseSensitive:r,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:l,threshold:a,distance:c},this.pattern=r?e:e.toLowerCase(),this.query=mc(this.pattern,this.options)}static condition(e,r){return r.useExtendedSearch}searchIn(e){const r=this.query;if(!r)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],l=0;for(let a=0,c=r.length;a<c;a+=1){const f=r[a];o.length=0,s=0;for(let p=0,b=f.length;p<b;p+=1){const y=f[p],{isMatch:E,indices:O,score:U}=y.search(e);if(E){if(s+=1,l+=U,i){const B=y.constructor.type;yc.has(B)?o=[...o,...O]:o.push(O)}}else{l=0,s=0,o.length=0;break}}if(s){let p={isMatch:!0,score:l/s};return i&&(p.indices=o),p}}return{isMatch:!1,score:1}}}const _i=[];function bc(...t){_i.push(...t)}function Ei(t,e){for(let r=0,i=_i.length;r<i;r+=1){let n=_i[r];if(n.condition(t,e))return new n(t,e)}return new Ss(t,e)}const Sr={AND:"$and",OR:"$or"},Si={PATH:"$path",PATTERN:"$val"},Ai=t=>!!(t[Sr.AND]||t[Sr.OR]),xc=t=>!!t[Si.PATH],wc=t=>!rt(t)&&bs(t)&&!Ai(t),Ls=t=>({[Sr.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Cs(t,e,{auto:r=!0}={}){const i=n=>{let s=Object.keys(n);const o=xc(n);if(!o&&s.length>1&&!Ai(n))return i(Ls(n));if(wc(n)){const a=o?n[Si.PATH]:s[0],c=o?n[Si.PATTERN]:n[a];if(!Ke(c))throw new Error(Ga(a));const f={keyId:xi(a),pattern:c};return r&&(f.searcher=Ei(c,e)),f}let l={children:[],operator:s[0]};return s.forEach(a=>{const c=n[a];rt(c)&&c.forEach(f=>{l.children.push(i(f))})}),l};return Ai(t)||(t=Ls(t)),i(t)}function $c(t,{ignoreFieldNorm:e=K.ignoreFieldNorm}){t.forEach(r=>{let i=1;r.matches.forEach(({key:n,norm:s,score:o})=>{const l=n?n.weight:null;i*=Math.pow(o===0&&l?Number.EPSILON:o,(l||1)*(e?1:s))}),r.score=i})}function _c(t,e){const r=t.matches;e.matches=[],Te(r)&&r.forEach(i=>{if(!Te(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 Ec(t,e){e.score=t.score}function Sc(t,e,{includeMatches:r=K.includeMatches,includeScore:i=K.includeScore}={}){const n=[];return r&&n.push(_c),i&&n.push(Ec),t.map(s=>{const{idx:o}=s,l={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,l)}),l})}class Bt{constructor(e,r={},i){this.options={...K,...r},this.options.useExtendedSearch,this._keyStore=new ec(this.options.keys),this.setCollection(e,i)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof wi))throw new Error(Ka);this._myIndex=r||Es(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Te(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];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,r.push(s))}return r}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:r=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;let a=Ke(e)?Ke(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return $c(a,{ignoreFieldNorm:l}),s&&a.sort(o),vs(r)&&r>-1&&(a=a.slice(0,r)),Sc(a,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const r=Ei(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:l})=>{if(!Te(s))return;const{isMatch:a,score:c,indices:f}=r.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:c,value:s,norm:l,indices:f}]})}),n}_searchLogical(e){const r=Cs(e,this.options),i=(l,a,c)=>{if(!l.children){const{keyId:p,searcher:b}=l,y=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(a,p),searcher:b});return y&&y.length?[{idx:c,item:a,matches:y}]:[]}const f=[];for(let p=0,b=l.children.length;p<b;p+=1){const y=l.children[p],E=i(y,a,c);if(E.length)f.push(...E);else if(l.operator===Sr.AND)return[]}return f},n=this._myIndex.records,s={},o=[];return n.forEach(({$:l,i:a})=>{if(Te(l)){let c=i(r,l,a);c.length&&(s[a]||(s[a]={idx:a,item:l,matches:[]},o.push(s[a])),c.forEach(({matches:f})=>{s[a].matches.push(...f)}))}}),o}_searchObjectList(e){const r=Ei(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:l})=>{if(!Te(o))return;let a=[];i.forEach((c,f)=>{a.push(...this._findMatches({key:c,value:o[f],searcher:r}))}),a.length&&s.push({idx:l,item:o,matches:a})}),s}_findMatches({key:e,value:r,searcher:i}){if(!Te(r))return[];let n=[];if(rt(r))r.forEach(({v:s,i:o,n:l})=>{if(!Te(s))return;const{isMatch:a,score:c,indices:f}=i.searchIn(s);a&&n.push({score:c,key:e,value:s,idx:o,norm:l,indices:f})});else{const{v:s,n:o}=r,{isMatch:l,score:a,indices:c}=i.searchIn(s);l&&n.push({score:a,key:e,value:s,norm:o,indices:c})}return n}}Bt.version="7.0.0",Bt.createIndex=Es,Bt.parseIndex=nc,Bt.config=K,Bt.parseQuery=Cs,bc(vc);const Ac=(t,e="highlight",r="title")=>{const i=(s,o,l)=>{const a=o.split(".");let c;for(c=0;c<a.length-1;c++)s=s[a[c]];s[a[c]]=l},n=(s,o=[])=>{let l="",a=0;return o.forEach(c=>{const f=c[1]+1;l+=[s.substring(a,c[0]),`<mark class="${e}">`,s.substring(c[0],f),"</mark>"].join(""),a=f}),l+=s.substring(a),l};return t.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const l={};for(const[a,c]of Object.entries(s))l[a]=c;return o.forEach(a=>{a.key===r&&i(l,a.key,n(a.value,a.indices))}),l})};let ks;const Mc=(t,e)=>{ks=new Bt(t,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},Oc=async(t,e,r)=>{const i=Object.entries(e).filter(([,l])=>l.type==="text"||l.type==="select"||l.type==="multiselect").reduce((l,[a,c])=>{const f="$or",p=[],b=(y,E)=>{const O={};c.type==="text"?O[y]=`${E}`:O[a]=`="${y}"`,p.push(O)};return Object.entries(c.state).filter(([,y])=>y).forEach(([y,E])=>b(y,E)),p.length>0&&l.push({[f]:p}),l},[]);let n;if(!(i.length>0)&&r.matchAllWhenEmpty!==!1)n=t;else{const l={$and:[...i]},a=ks.search(l);n=r.enableHighlighting?Ac(a,"highlight",r.titleProperty):a.map(c=>c.item)}const s=Object.entries(e).filter(([,l])=>l.type==="range").reduce((l,[a,c])=>(l[a]={min:c.state.min,max:c.state.max,format:c.format},l),{});if(Object.keys(s).length>0){const l=[];for(let a=0;a<n.length;a++){const c={};for(const[f,p]of Object.entries(s)){const b=y=>p.format==="date"?Lt(y).unix():y;Object.prototype.hasOwnProperty.call(n[a],f)?Array.isArray(n[a][f])?c[f]=s[f].min<=b(n[a][f][1])&&b(n[a][f][0])<=s[f].max:b(n[a][f])>=s[f].min&&b(n[a][f])<=s[f].max?c[f]=!0:c[f]=!1:c[f]=!0}Object.values(c).every(f=>!!f)&&l.push(n[a])}n=[...l]}const o=Object.entries(e).filter(([,l])=>l.type==="spatial").reduce((l,[a,c])=>(l[a]={geometry:c.state.geometry,mode:c.state.mode},l),{});if(Object.values(o).map(l=>l.geometry).filter(l=>!!l).length>0){const l=[];for(let a=0;a<n.length;a++){const c={};for(const f of Object.keys(o)){const p=o[f].mode||"within";Object.prototype.hasOwnProperty.call(n[a],f)&&(p==="within"?Ba(n[a][f],o[f].geometry):Na(n[a][f],o[f].geometry))?c[f]=!0:c[f]=!1}Object.values(c).every(f=>!!f)&&l.push(n[a])}n=[...l]}return n},Pc=async(t,e,r)=>(await(await fetch(`${r.externalFilter(t,e)}`)).json()).features;var Lc=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,it=(t,e,r,i)=>{for(var n=i>1?void 0:i?Cc(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Lc(e,r,n),n};class Mi{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title",this.expandMultipleFilters=!0,this.expandResults=!0,this.expandMultipleResults=!0}}$e.EOxItemFilter=class extends Oo{constructor(){super(...arguments),this._resultAggregation=[],this._items=[],this.filters={},this._config=new Mi,this.apply=e=>{this._items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?Lt(o).unix():parseInt(o);this._items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const l=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,l[0]):l[0],n.max=n.max!==void 0?Math.max(n.max,l[1]):l[1]}else{const l=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,l):l,n.max=n.max!==void 0?Math.max(n.max,l):l}return}Array.isArray(o[i.key])?o[i.key].forEach(l=>{n[l]=void 0}):i.type==="spatial"?(n.geometry=void 0,n.mode=i.mode||"intersects"):n[o[i.key]]=void 0}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!1},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this._items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const r=[];Object.values(this.filters).forEach(i=>{i.type==="text"?i.keys.forEach(n=>{r.includes(n)||r.push(n)}):(i.type==="select"||i.type==="multiselect")&&(r.includes(i.key)||r.push(i.key))}),Mc(this._items,{keys:r,...this._config.fuseConfig}),this.search()}}set items(e){this.apply(e)}get items(){return this._items}set config(e){const r=this._config;this._config={...new Mi,...e},this.requestUpdate("config",r)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await Pc(this._items,this.filters,this._config):e=await Oc(this._items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,r){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(l=>this.filters[this._config.aggregateResults].state[l])),(s!=null&&s.length?s.includes(r):!0)&&Array.isArray(n)?n.includes(r):n===r})}sortResults(e){return[...e].sort((r,i)=>r[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}toggleAccordion(e){let r;if(e.detail?r=e.detail.target:r=e.target,r.classList.contains("details-filter")){if(!r.open||this.config.expandMultipleFilters)return;this.shadowRoot.querySelectorAll("eox-itemfilter-expandcontainer").forEach(i=>{const n=i.shadowRoot.querySelector(".details-filter");n&&n!==r&&n.removeAttribute("open")})}else{if(!r.open||this.config.expandMultipleResults)return;this.shadowRoot.querySelectorAll("details").forEach(i=>{i!==r&&i.removeAttribute("open")})}}render(){return W`
|
|
853
|
+
`}};wt([J()],ht.prototype,"idProperty",2),wt([J()],ht.prototype,"items",2),wt([J()],ht.prototype,"titleProperty",2),wt([J()],ht.prototype,"unstyled",2),wt([Ze()],ht.prototype,"inputText",2),wt([Ze()],ht.prototype,"replaceInput",2),ht=wt([ke("eox-itemfilter-inline")],ht);function rt(t){return Array.isArray?Array.isArray(t):xs(t)==="[object Array]"}const za=1/0;function Ya(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-za?"-0":e}function Wa(t){return t==null?"":Ya(t)}function Ke(t){return typeof t=="string"}function vs(t){return typeof t=="number"}function Xa(t){return t===!0||t===!1||Va(t)&&xs(t)=="[object Boolean]"}function bs(t){return typeof t=="object"}function Va(t){return bs(t)&&t!==null}function Te(t){return t!=null}function bi(t){return!t.trim().length}function xs(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Ru="Extended search is not available",Ka="Incorrect 'index' type",Ga=t=>`Invalid value for key ${t}`,Ja=t=>`Pattern length exceeds max of ${t}.`,Za=t=>`Missing ${t} property in key`,Qa=t=>`Property 'weight' in key '${t}' must be a positive integer`,ws=Object.prototype.hasOwnProperty;class ec{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(i=>{let n=$s(i);this._keys.push(n),this._keyMap[n.id]=n,r+=n.weight}),this._keys.forEach(i=>{i.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function $s(t){let e=null,r=null,i=null,n=1,s=null;if(Ke(t)||rt(t))i=t,e=_s(t),r=xi(t);else{if(!ws.call(t,"name"))throw new Error(Za("name"));const o=t.name;if(i=o,ws.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(Qa(o));e=_s(o),r=xi(o),s=t.getFn}return{path:e,id:r,weight:n,src:i,getFn:s}}function _s(t){return rt(t)?t:t.split(".")}function xi(t){return rt(t)?t.join("."):t}function tc(t,e){let r=[],i=!1;const n=(s,o,l)=>{if(Te(s))if(!o[l])r.push(s);else{let a=o[l];const c=s[a];if(!Te(c))return;if(l===o.length-1&&(Ke(c)||vs(c)||Xa(c)))r.push(Wa(c));else if(rt(c)){i=!0;for(let f=0,p=c.length;f<p;f+=1)n(c[f],o,l+1)}else o.length&&n(c,o,l+1)}};return n(t,Ke(e)?e.split("."):e,0),i?r:r[0]}var K={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:tc,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const rc=/[^ ]+/g;function ic(t=1,e=3){const r=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(rc).length;if(r.has(s))return r.get(s);const o=1/Math.pow(s,.5*t),l=parseFloat(Math.round(o*i)/i);return r.set(s,l),l},clear(){r.clear()}}}class wi{constructor({getFn:e=K.getFn,fieldNormWeight:r=K.fieldNormWeight}={}){this.norm=ic(r,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((r,i)=>{this._keysMap[r.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ke(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();Ke(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,i=this.size();r<i;r+=1)this.records[r].i-=1}getValueForItemAtKeyId(e,r){return e[this._keysMap[r]]}size(){return this.records.length}_addString(e,r){if(!Te(e)||bi(e))return;let i={v:e,i:r,n:this.norm.get(e)};this.records.push(i)}_addObject(e,r){let i={i:r,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(Te(o)){if(rt(o)){let l=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:c,value:f}=a.pop();if(Te(f))if(Ke(f)&&!bi(f)){let p={v:f,i:c,n:this.norm.get(f)};l.push(p)}else rt(f)&&f.forEach((p,b)=>{a.push({nestedArrIndex:b,value:p})})}i.$[s]=l}else if(Ke(o)&&!bi(o)){let l={v:o,n:this.norm.get(o)};i.$[s]=l}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Es(t,e,{getFn:r=K.getFn,fieldNormWeight:i=K.fieldNormWeight}={}){const n=new wi({getFn:r,fieldNormWeight:i});return n.setKeys(t.map($s)),n.setSources(e),n.create(),n}function nc(t,{getFn:e=K.getFn,fieldNormWeight:r=K.fieldNormWeight}={}){const{keys:i,records:n}=t,s=new wi({getFn:e,fieldNormWeight:r});return s.setKeys(i),s.setIndexRecords(n),s}function Er(t,{errors:e=0,currentLocation:r=0,expectedLocation:i=0,distance:n=K.distance,ignoreLocation:s=K.ignoreLocation}={}){const o=e/t.length;if(s)return o;const l=Math.abs(i-r);return n?o+l/n:l?1:o}function sc(t=[],e=K.minMatchCharLength){let r=[],i=-1,n=-1,s=0;for(let o=t.length;s<o;s+=1){let l=t[s];l&&i===-1?i=s:!l&&i!==-1&&(n=s-1,n-i+1>=e&&r.push([i,n]),i=-1)}return t[s-1]&&s-i>=e&&r.push([i,s-1]),r}const $t=32;function oc(t,e,r,{location:i=K.location,distance:n=K.distance,threshold:s=K.threshold,findAllMatches:o=K.findAllMatches,minMatchCharLength:l=K.minMatchCharLength,includeMatches:a=K.includeMatches,ignoreLocation:c=K.ignoreLocation}={}){if(e.length>$t)throw new Error(Ja($t));const f=e.length,p=t.length,b=Math.max(0,Math.min(i,p));let y=s,E=b;const O=l>1||a,z=O?Array(p):[];let B;for(;(B=t.indexOf(e,E))>-1;){let A=Er(e,{currentLocation:B,expectedLocation:b,distance:n,ignoreLocation:c});if(y=Math.min(A,y),E=B+f,O){let k=0;for(;k<f;)z[B+k]=1,k+=1}}E=-1;let g=[],m=1,w=f+p;const S=1<<f-1;for(let A=0;A<f;A+=1){let k=0,F=w;for(;k<F;)Er(e,{errors:A,currentLocation:b+F,expectedLocation:b,distance:n,ignoreLocation:c})<=y?k=F:w=F,F=Math.floor((w-k)/2+k);w=F;let H=Math.max(1,b-F+1),I=o?p:Math.min(b+F,p)+f,te=Array(I+2);te[I+1]=(1<<A)-1;for(let P=I;P>=H;P-=1){let L=P-1,M=r[t.charAt(L)];if(O&&(z[L]=+!!M),te[P]=(te[P+1]<<1|1)&M,A&&(te[P]|=(g[P+1]|g[P])<<1|1|g[P+1]),te[P]&S&&(m=Er(e,{errors:A,currentLocation:L,expectedLocation:b,distance:n,ignoreLocation:c}),m<=y)){if(y=m,E=L,E<=b)break;H=Math.max(1,2*b-E)}}if(Er(e,{errors:A+1,currentLocation:b,expectedLocation:b,distance:n,ignoreLocation:c})>y)break;g=te}const _={isMatch:E>=0,score:Math.max(.001,m)};if(O){const A=sc(z,l);A.length?a&&(_.indices=A):_.isMatch=!1}return _}function lc(t){let e={};for(let r=0,i=t.length;r<i;r+=1){const n=t.charAt(r);e[n]=(e[n]||0)|1<<i-r-1}return e}class Ss{constructor(e,{location:r=K.location,threshold:i=K.threshold,distance:n=K.distance,includeMatches:s=K.includeMatches,findAllMatches:o=K.findAllMatches,minMatchCharLength:l=K.minMatchCharLength,isCaseSensitive:a=K.isCaseSensitive,ignoreLocation:c=K.ignoreLocation}={}){if(this.options={location:r,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:c},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(b,y)=>{this.chunks.push({pattern:b,alphabet:lc(b),startIndex:y})},p=this.pattern.length;if(p>$t){let b=0;const y=p%$t,E=p-y;for(;b<E;)f(this.pattern.substr(b,$t),b),b+=$t;if(y){const O=p-$t;f(this.pattern.substr(O),O)}}else f(this.pattern,0)}searchIn(e){const{isCaseSensitive:r,includeMatches:i}=this.options;if(r||(e=e.toLowerCase()),this.pattern===e){let E={isMatch:!0,score:0};return i&&(E.indices=[[0,e.length-1]]),E}const{location:n,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,ignoreLocation:c}=this.options;let f=[],p=0,b=!1;this.chunks.forEach(({pattern:E,alphabet:O,startIndex:z})=>{const{isMatch:B,score:g,indices:m}=oc(e,E,O,{location:n+z,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:c});B&&(b=!0),p+=g,B&&m&&(f=[...f,...m])});let y={isMatch:b,score:b?p/this.chunks.length:1};return b&&i&&(y.indices=f),y}}class dt{constructor(e){this.pattern=e}static isMultiMatch(e){return As(e,this.multiRegex)}static isSingleMatch(e){return As(e,this.singleRegex)}search(){}}function As(t,e){const r=t.match(e);return r?r[1]:null}class ac extends dt{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class cc extends dt{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 uc extends dt{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class hc extends dt{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class dc extends dt{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class fc extends dt{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class Ms extends dt{constructor(e,{location:r=K.location,threshold:i=K.threshold,distance:n=K.distance,includeMatches:s=K.includeMatches,findAllMatches:o=K.findAllMatches,minMatchCharLength:l=K.minMatchCharLength,isCaseSensitive:a=K.isCaseSensitive,ignoreLocation:c=K.ignoreLocation}={}){super(e),this._bitapSearch=new Ss(e,{location:r,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Os extends dt{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,r))>-1;)r=i+s,n.push([i,r-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const $i=[ac,Os,uc,hc,fc,dc,cc,Ms],Ps=$i.length,pc=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,gc="|";function mc(t,e={}){return t.split(gc).map(r=>{let i=r.trim().split(pc).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const l=i[s];let a=!1,c=-1;for(;!a&&++c<Ps;){const f=$i[c];let p=f.isMultiMatch(l);p&&(n.push(new f(p,e)),a=!0)}if(!a)for(c=-1;++c<Ps;){const f=$i[c];let p=f.isSingleMatch(l);if(p){n.push(new f(p,e));break}}}return n})}const yc=new Set([Ms.type,Os.type]);class vc{constructor(e,{isCaseSensitive:r=K.isCaseSensitive,includeMatches:i=K.includeMatches,minMatchCharLength:n=K.minMatchCharLength,ignoreLocation:s=K.ignoreLocation,findAllMatches:o=K.findAllMatches,location:l=K.location,threshold:a=K.threshold,distance:c=K.distance}={}){this.query=null,this.options={isCaseSensitive:r,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:l,threshold:a,distance:c},this.pattern=r?e:e.toLowerCase(),this.query=mc(this.pattern,this.options)}static condition(e,r){return r.useExtendedSearch}searchIn(e){const r=this.query;if(!r)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],l=0;for(let a=0,c=r.length;a<c;a+=1){const f=r[a];o.length=0,s=0;for(let p=0,b=f.length;p<b;p+=1){const y=f[p],{isMatch:E,indices:O,score:z}=y.search(e);if(E){if(s+=1,l+=z,i){const B=y.constructor.type;yc.has(B)?o=[...o,...O]:o.push(O)}}else{l=0,s=0,o.length=0;break}}if(s){let p={isMatch:!0,score:l/s};return i&&(p.indices=o),p}}return{isMatch:!1,score:1}}}const _i=[];function bc(...t){_i.push(...t)}function Ei(t,e){for(let r=0,i=_i.length;r<i;r+=1){let n=_i[r];if(n.condition(t,e))return new n(t,e)}return new Ss(t,e)}const Sr={AND:"$and",OR:"$or"},Si={PATH:"$path",PATTERN:"$val"},Ai=t=>!!(t[Sr.AND]||t[Sr.OR]),xc=t=>!!t[Si.PATH],wc=t=>!rt(t)&&bs(t)&&!Ai(t),Ls=t=>({[Sr.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Cs(t,e,{auto:r=!0}={}){const i=n=>{let s=Object.keys(n);const o=xc(n);if(!o&&s.length>1&&!Ai(n))return i(Ls(n));if(wc(n)){const a=o?n[Si.PATH]:s[0],c=o?n[Si.PATTERN]:n[a];if(!Ke(c))throw new Error(Ga(a));const f={keyId:xi(a),pattern:c};return r&&(f.searcher=Ei(c,e)),f}let l={children:[],operator:s[0]};return s.forEach(a=>{const c=n[a];rt(c)&&c.forEach(f=>{l.children.push(i(f))})}),l};return Ai(t)||(t=Ls(t)),i(t)}function $c(t,{ignoreFieldNorm:e=K.ignoreFieldNorm}){t.forEach(r=>{let i=1;r.matches.forEach(({key:n,norm:s,score:o})=>{const l=n?n.weight:null;i*=Math.pow(o===0&&l?Number.EPSILON:o,(l||1)*(e?1:s))}),r.score=i})}function _c(t,e){const r=t.matches;e.matches=[],Te(r)&&r.forEach(i=>{if(!Te(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 Ec(t,e){e.score=t.score}function Sc(t,e,{includeMatches:r=K.includeMatches,includeScore:i=K.includeScore}={}){const n=[];return r&&n.push(_c),i&&n.push(Ec),t.map(s=>{const{idx:o}=s,l={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,l)}),l})}class Bt{constructor(e,r={},i){this.options={...K,...r},this.options.useExtendedSearch,this._keyStore=new ec(this.options.keys),this.setCollection(e,i)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof wi))throw new Error(Ka);this._myIndex=r||Es(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Te(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];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,r.push(s))}return r}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:r=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;let a=Ke(e)?Ke(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return $c(a,{ignoreFieldNorm:l}),s&&a.sort(o),vs(r)&&r>-1&&(a=a.slice(0,r)),Sc(a,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const r=Ei(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:l})=>{if(!Te(s))return;const{isMatch:a,score:c,indices:f}=r.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:c,value:s,norm:l,indices:f}]})}),n}_searchLogical(e){const r=Cs(e,this.options),i=(l,a,c)=>{if(!l.children){const{keyId:p,searcher:b}=l,y=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(a,p),searcher:b});return y&&y.length?[{idx:c,item:a,matches:y}]:[]}const f=[];for(let p=0,b=l.children.length;p<b;p+=1){const y=l.children[p],E=i(y,a,c);if(E.length)f.push(...E);else if(l.operator===Sr.AND)return[]}return f},n=this._myIndex.records,s={},o=[];return n.forEach(({$:l,i:a})=>{if(Te(l)){let c=i(r,l,a);c.length&&(s[a]||(s[a]={idx:a,item:l,matches:[]},o.push(s[a])),c.forEach(({matches:f})=>{s[a].matches.push(...f)}))}}),o}_searchObjectList(e){const r=Ei(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:l})=>{if(!Te(o))return;let a=[];i.forEach((c,f)=>{a.push(...this._findMatches({key:c,value:o[f],searcher:r}))}),a.length&&s.push({idx:l,item:o,matches:a})}),s}_findMatches({key:e,value:r,searcher:i}){if(!Te(r))return[];let n=[];if(rt(r))r.forEach(({v:s,i:o,n:l})=>{if(!Te(s))return;const{isMatch:a,score:c,indices:f}=i.searchIn(s);a&&n.push({score:c,key:e,value:s,idx:o,norm:l,indices:f})});else{const{v:s,n:o}=r,{isMatch:l,score:a,indices:c}=i.searchIn(s);l&&n.push({score:a,key:e,value:s,norm:o,indices:c})}return n}}Bt.version="7.0.0",Bt.createIndex=Es,Bt.parseIndex=nc,Bt.config=K,Bt.parseQuery=Cs,bc(vc);const Ac=(t,e="highlight",r="title")=>{const i=(s,o,l)=>{const a=o.split(".");let c;for(c=0;c<a.length-1;c++)s=s[a[c]];s[a[c]]=l},n=(s,o=[])=>{let l="",a=0;return o.forEach(c=>{const f=c[1]+1;l+=[s.substring(a,c[0]),`<mark class="${e}">`,s.substring(c[0],f),"</mark>"].join(""),a=f}),l+=s.substring(a),l};return t.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const l={};for(const[a,c]of Object.entries(s))l[a]=c;return o.forEach(a=>{a.key===r&&i(l,a.key,n(a.value,a.indices))}),l})};let ks;const Mc=(t,e)=>{ks=new Bt(t,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},Oc=async(t,e,r)=>{const i=Object.entries(e).filter(([,l])=>l.type==="text"||l.type==="select"||l.type==="multiselect").reduce((l,[a,c])=>{const f="$or",p=[],b=(y,E)=>{const O={};c.type==="text"?O[y]=`${E}`:O[a]=`="${y}"`,p.push(O)};return Object.entries(c.state).filter(([,y])=>y).forEach(([y,E])=>b(y,E)),p.length>0&&l.push({[f]:p}),l},[]);let n;if(!(i.length>0)&&r.matchAllWhenEmpty!==!1)n=t;else{const l={$and:[...i]},a=ks.search(l);n=r.enableHighlighting?Ac(a,"highlight",r.titleProperty):a.map(c=>c.item)}const s=Object.entries(e).filter(([,l])=>l.type==="range").reduce((l,[a,c])=>(l[a]={min:c.state.min,max:c.state.max,format:c.format},l),{});if(Object.keys(s).length>0){const l=[];for(let a=0;a<n.length;a++){const c={};for(const[f,p]of Object.entries(s)){const b=y=>p.format==="date"?Lt(y).unix():y;Object.prototype.hasOwnProperty.call(n[a],f)?Array.isArray(n[a][f])?c[f]=s[f].min<=b(n[a][f][1])&&b(n[a][f][0])<=s[f].max:b(n[a][f])>=s[f].min&&b(n[a][f])<=s[f].max?c[f]=!0:c[f]=!1:c[f]=!0}Object.values(c).every(f=>!!f)&&l.push(n[a])}n=[...l]}const o=Object.entries(e).filter(([,l])=>l.type==="spatial").reduce((l,[a,c])=>(l[a]={geometry:c.state.geometry,mode:c.state.mode},l),{});if(Object.values(o).map(l=>l.geometry).filter(l=>!!l).length>0){const l=[];for(let a=0;a<n.length;a++){const c={};for(const f of Object.keys(o)){const p=o[f].mode||"within";Object.prototype.hasOwnProperty.call(n[a],f)&&(p==="within"?Ba(n[a][f],o[f].geometry):Na(n[a][f],o[f].geometry))?c[f]=!0:c[f]=!1}Object.values(c).every(f=>!!f)&&l.push(n[a])}n=[...l]}return n},Pc=async(t,e,r)=>(await(await fetch(`${r.externalFilter(t,e)}`)).json()).features;var Lc=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,it=(t,e,r,i)=>{for(var n=i>1?void 0:i?Cc(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Lc(e,r,n),n};class Mi{constructor(){this.aggregateResults=void 0,this.autoSpreadSingle=!1,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title",this.expandMultipleFilters=!0,this.expandResults=!0,this.expandMultipleResults=!0}}$e.EOxItemFilter=class extends Oo{constructor(){super(...arguments),this._resultAggregation=[],this._items=[],this.filters={},this._config=new Mi,this.apply=e=>{this._items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?Lt(o).unix():parseInt(o);this._items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const l=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,l[0]):l[0],n.max=n.max!==void 0?Math.max(n.max,l[1]):l[1]}else{const l=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,l):l,n.max=n.max!==void 0?Math.max(n.max,l):l}return}Array.isArray(o[i.key])?o[i.key].forEach(l=>{n[l]=void 0}):i.type==="spatial"?(n.geometry=void 0,n.mode=i.mode||"intersects"):n[o[i.key]]=void 0}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!1},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this._items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const r=[];Object.values(this.filters).forEach(i=>{i.type==="text"?i.keys.forEach(n=>{r.includes(n)||r.push(n)}):(i.type==="select"||i.type==="multiselect")&&(r.includes(i.key)||r.push(i.key))}),Mc(this._items,{keys:r,...this._config.fuseConfig}),this.search()}}set items(e){this.apply(e)}get items(){return this._items}set config(e){const r=this._config;this._config={...new Mi,...e},this.requestUpdate("config",r)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await Pc(this._items,this.filters,this._config):e=await Oc(this._items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,r){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(l=>this.filters[this._config.aggregateResults].state[l])),(s!=null&&s.length?s.includes(r):!0)&&Array.isArray(n)?n.includes(r):n===r})}createItemList(e){return U`
|
|
854
|
+
<ul>
|
|
855
|
+
${An(this.aggregateResults(this.results,e),r=>r.id,r=>{var i,n;return U`
|
|
856
|
+
<li
|
|
857
|
+
class=${((i=this.selectedResult)==null?void 0:i[this._config.titleProperty])===r[this._config.titleProperty]?"highlighted":se}
|
|
858
|
+
>
|
|
859
|
+
<label>
|
|
860
|
+
<input
|
|
861
|
+
data-cy="result-radio"
|
|
862
|
+
type="radio"
|
|
863
|
+
class="result-radio"
|
|
864
|
+
name="result"
|
|
865
|
+
id="${r.id}"
|
|
866
|
+
?checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===r[this._config.titleProperty]||se}
|
|
867
|
+
@click=${()=>{this.selectedResult=r,this._config.onSelect(r)}}
|
|
868
|
+
/>
|
|
869
|
+
${de(this.hasTemplate("result"),()=>this.renderTemplate("result",r,`result-${r.id}`),()=>U`
|
|
870
|
+
<span class="title"
|
|
871
|
+
>${Mn(r[this._config.titleProperty])}</span
|
|
872
|
+
>
|
|
873
|
+
`)}
|
|
874
|
+
</label>
|
|
875
|
+
</li>
|
|
876
|
+
`})}
|
|
877
|
+
</ul>
|
|
878
|
+
`}sortResults(e){return[...e].sort((r,i)=>r[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}toggleAccordion(e){let r;if(e.detail?r=e.detail.target:r=e.target,r.classList.contains("details-filter")){if(!r.open||this.config.expandMultipleFilters)return;this.shadowRoot.querySelectorAll("eox-itemfilter-expandcontainer").forEach(i=>{const n=i.shadowRoot.querySelector(".details-filter");n&&n!==r&&n.removeAttribute("open")})}else{if(!r.open||this.config.expandMultipleResults)return;this.shadowRoot.querySelectorAll("details").forEach(i=>{i!==r&&i.removeAttribute("open")})}}render(){return U`
|
|
854
879
|
<style>
|
|
855
880
|
${Gr}
|
|
856
881
|
${!this.unstyled&&Zr}
|
|
@@ -860,19 +885,19 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
860
885
|
id="itemfilter"
|
|
861
886
|
@submit="${e=>e.preventDefault()}"
|
|
862
887
|
>
|
|
863
|
-
${de(this._config.inlineMode,()=>
|
|
888
|
+
${de(this._config.inlineMode,()=>U`
|
|
864
889
|
<eox-itemfilter-inline
|
|
865
890
|
.items=${Object.values(this.filters)}
|
|
866
891
|
.unstyled=${this.unstyled}
|
|
867
892
|
@filter=${()=>this.search()}
|
|
868
893
|
>
|
|
869
894
|
</eox-itemfilter-inline>
|
|
870
|
-
`,()=>
|
|
871
|
-
${de(this._config.filterProperties.length,()=>
|
|
895
|
+
`,()=>U`
|
|
896
|
+
${de(this._config.filterProperties.length,()=>U`
|
|
872
897
|
<section
|
|
873
898
|
class="${this.config.inlineMode?"inline":se}"
|
|
874
899
|
>
|
|
875
|
-
${de(!this.config.inlineMode,()=>
|
|
900
|
+
${de(!this.config.inlineMode,()=>U`
|
|
876
901
|
<slot name="filterstitle"
|
|
877
902
|
><h4 style="margin-top: 8px">Filters</h4></slot
|
|
878
903
|
>
|
|
@@ -894,7 +919,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
894
919
|
.unstyled=${this.unstyled}
|
|
895
920
|
@details-toggled=${this.toggleAccordion}
|
|
896
921
|
>
|
|
897
|
-
${de(e.dirty,()=>
|
|
922
|
+
${de(e.dirty,()=>U`
|
|
898
923
|
<button
|
|
899
924
|
slot="reset-button"
|
|
900
925
|
class="reset-icon icon"
|
|
@@ -916,7 +941,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
916
941
|
</li>
|
|
917
942
|
`)}
|
|
918
943
|
</ul>
|
|
919
|
-
${de(this._config.filterProperties&&Object.values(this.filters).map(e=>e.dirty).filter(e=>e).length>0,()=>
|
|
944
|
+
${de(this._config.filterProperties&&Object.values(this.filters).map(e=>e.dirty).filter(e=>e).length>0,()=>U`
|
|
920
945
|
<button
|
|
921
946
|
id="filter-reset"
|
|
922
947
|
class="outline small icon-text reset-icon"
|
|
@@ -928,7 +953,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
928
953
|
`)}
|
|
929
954
|
</section>
|
|
930
955
|
`)}
|
|
931
|
-
${de(this.config.showResults&&this.results,()=>
|
|
956
|
+
${de(this.config.showResults&&this.results,()=>U`
|
|
932
957
|
<section id="section-results">
|
|
933
958
|
<div>
|
|
934
959
|
<slot name="resultstitle"
|
|
@@ -936,48 +961,31 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
936
961
|
>
|
|
937
962
|
</div>
|
|
938
963
|
<div id="container-results" class="scroll">
|
|
939
|
-
${this.results.length<1?
|
|
964
|
+
${this.results.length<1?U`
|
|
940
965
|
<small class="no-results">No matching items</small>
|
|
941
966
|
`:se}
|
|
942
967
|
<ul id="results" part="results">
|
|
943
|
-
${this._config.aggregateResults?Gt(this._resultAggregation.filter(e=>this.aggregateResults(this.results,e).length),e=>
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
${e}
|
|
951
|
-
<span class="count"
|
|
952
|
-
>${this.aggregateResults(this.results,e).length}</span
|
|
968
|
+
${this._config.aggregateResults?Gt(this._resultAggregation.filter(e=>this.aggregateResults(this.results,e).length),e=>U` ${de(this.aggregateResults(this.results,e).length===1&&this.config.autoSpreadSingle,()=>U` <div style="margin-left: -8px">
|
|
969
|
+
${this.createItemList(e)}
|
|
970
|
+
</div>`,()=>U`
|
|
971
|
+
<details
|
|
972
|
+
class="details-results"
|
|
973
|
+
@toggle=${this.toggleAccordion}
|
|
974
|
+
?open=${this._config.expandResults||se}
|
|
953
975
|
>
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
id="${r.id}"
|
|
968
|
-
?checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===r[this._config.titleProperty]||se}
|
|
969
|
-
@click=${()=>{this.selectedResult=r,this._config.onSelect(r)}}
|
|
970
|
-
/>
|
|
971
|
-
${de(this.hasTemplate("result"),()=>this.renderTemplate("result",r,`result-${r.id}`),()=>W`
|
|
972
|
-
<span class="title"
|
|
973
|
-
>${Mn(r[this._config.titleProperty])}</span
|
|
974
|
-
>
|
|
975
|
-
`)}
|
|
976
|
-
</label>
|
|
977
|
-
</li>
|
|
978
|
-
`})}
|
|
979
|
-
</ul>
|
|
980
|
-
</details>`):Gt(this.results,e=>W`<li part="result">
|
|
976
|
+
<summary>
|
|
977
|
+
<span class="title">
|
|
978
|
+
${e}
|
|
979
|
+
<span class="count"
|
|
980
|
+
>${this.aggregateResults(this.results,e).length}</span
|
|
981
|
+
>
|
|
982
|
+
</span>
|
|
983
|
+
</summary>
|
|
984
|
+
<div>
|
|
985
|
+
${this.createItemList(e)}
|
|
986
|
+
</div>
|
|
987
|
+
</details>
|
|
988
|
+
`)}`):Gt(this.results,e=>U`<li part="result">
|
|
981
989
|
<label>
|
|
982
990
|
<input
|
|
983
991
|
type="radio"
|
|
@@ -985,7 +993,7 @@ eox-itemfilter-expandcontainer button.reset-icon:before {
|
|
|
985
993
|
id="${e.id}"
|
|
986
994
|
@click=${()=>{this.selectedResult=e,this._config.onSelect(e)}}
|
|
987
995
|
/>
|
|
988
|
-
${de(this.hasTemplate("result"),()=>this.renderTemplate("result",e,`result-${e.id}`),()=>
|
|
996
|
+
${de(this.hasTemplate("result"),()=>this.renderTemplate("result",e,`result-${e.id}`),()=>U`
|
|
989
997
|
<span class="title"
|
|
990
998
|
>${Mn(e[this._config.titleProperty])}</span
|
|
991
999
|
>
|