@eox/itemfilter 0.8.6 → 0.9.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/README.md +4 -0
- package/dist/eox-itemfilter.js +1954 -1815
- package/dist/eox-itemfilter.umd.cjs +66 -58
- package/package.json +5 -6
- package/test/general.cy.ts +8 -5
- package/test/state.cy.ts +6 -4
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(xe,qe){typeof exports=="object"&&typeof module<"u"?qe(exports):typeof define=="function"&&define.amd?define(["exports"],qe):(xe=typeof globalThis<"u"?globalThis:xe||self,qe(xe["eox-itemfilter"]={}))})(this,function(xe){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const qe=window,sr=qe.ShadowRoot&&(qe.ShadyCSS===void 0||qe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$i=Symbol(),wi=new WeakMap;let ps=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==$i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(sr&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=wi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&wi.set(t,e))}return e}toString(){return this.cssText}};const gs=r=>new ps(typeof r=="string"?r:r+"",void 0,$i),vs=(r,e)=>{sr?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style"),n=qe.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=t.cssText,r.appendChild(i)})},_i=sr?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return gs(t)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var or;const Dt=window,Ei=Dt.trustedTypes,
|
|
9
|
+
*/var or;const Dt=window,Ei=Dt.trustedTypes,ms=Ei?Ei.emptyScript:"",Mi=Dt.reactiveElementPolyfillSupport,ar={toAttribute(r,e){switch(e){case Boolean:r=r?ms:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},Ai=(r,e)=>e!==r&&(e==e||r==r),lr={attribute:!0,type:String,converter:ar,reflect:!1,hasChanged:Ai},cr="finalized";let ut=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,i)=>{const n=this._$Ep(i,t);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,t=lr){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(n){const s=this[e];this[t]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||lr}static finalize(){if(this.hasOwnProperty(cr))return!1;this[cr]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of i)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)t.unshift(_i(n))}else e!==void 0&&t.push(_i(e));return t}static _$Ep(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,i;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return vs(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=lr){var n;const s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){const o=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:ar).toAttribute(t,i.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,t){var i;const n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=n.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:ar;this._$El=s,this[s]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||Ai)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,i)=>this._$EO(i,this[i],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};ut[cr]=!0,ut.elementProperties=new Map,ut.elementStyles=[],ut.shadowRootOptions={mode:"open"},Mi==null||Mi({ReactiveElement:ut}),((or=Dt.reactiveElementVersions)!==null&&or!==void 0?or:Dt.reactiveElementVersions=[]).push("1.6.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var ur;const It=window,
|
|
14
|
-
\f\r]`,At=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,Ti=/"/g,Ri=/^(?:script|style|textarea|title)$/i,
|
|
13
|
+
*/var ur;const It=window,ht=It.trustedTypes,Oi=ht?ht.createPolicy("lit-html",{createHTML:r=>r}):void 0,jt="$lit$",Ye=`lit$${(Math.random()+"").slice(9)}$`,hr="?"+Ye,ys=`<${hr}>`,et=document,Et=()=>et.createComment(""),Mt=r=>r===null||typeof r!="object"&&typeof r!="function",Si=Array.isArray,Pi=r=>Si(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",dr=`[
|
|
14
|
+
\f\r]`,At=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ki=/-->/g,Ci=/>/g,tt=RegExp(`>|${dr}(?:([^\\s"'>=/]+)(${dr}*=${dr}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,Ti=/"/g,Ri=/^(?:script|style|textarea|title)$/i,bs=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ue=bs(1),Ce=Symbol.for("lit-noChange"),se=Symbol.for("lit-nothing"),Di=new WeakMap,rt=et.createTreeWalker(et,129,null,!1);function Ii(r,e){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Oi!==void 0?Oi.createHTML(e):e}const ji=(r,e)=>{const t=r.length-1,i=[];let n,s=e===2?"<svg>":"",o=At;for(let a=0;a<t;a++){const l=r[a];let u,p,m=-1,b=0;for(;b<l.length&&(o.lastIndex=b,p=o.exec(l),p!==null);)b=o.lastIndex,o===At?p[1]==="!--"?o=ki:p[1]!==void 0?o=Ci:p[2]!==void 0?(Ri.test(p[2])&&(n=RegExp("</"+p[2],"g")),o=tt):p[3]!==void 0&&(o=tt):o===tt?p[0]===">"?(o=n??At,m=-1):p[1]===void 0?m=-2:(m=o.lastIndex-p[2].length,u=p[1],o=p[3]===void 0?tt:p[3]==='"'?Ti:Li):o===Ti||o===Li?o=tt:o===ki||o===Ci?o=At:(o=tt,n=void 0);const x=o===tt&&r[a+1].startsWith("/>")?" ":"";s+=o===At?l+ys:m>=0?(i.push(u),l.slice(0,m)+jt+l.slice(m)+Ye+x):l+Ye+(m===-2?(i.push(void 0),a):x)}return[Ii(r,s+(r[t]||"<?>")+(e===2?"</svg>":"")),i]};class Ot{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let s=0,o=0;const a=e.length-1,l=this.parts,[u,p]=ji(e,t);if(this.el=Ot.createElement(u,i),rt.currentNode=this.el.content,t===2){const m=this.el.content,b=m.firstChild;b.remove(),m.append(...b.childNodes)}for(;(n=rt.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes()){const m=[];for(const b of n.getAttributeNames())if(b.endsWith(jt)||b.startsWith(Ye)){const x=p[o++];if(m.push(b),x!==void 0){const E=n.getAttribute(x.toLowerCase()+jt).split(Ye),I=/([.?@])?(.*)/.exec(x);l.push({type:1,index:s,name:I[2],strings:E,ctor:I[1]==="."?Bi:I[1]==="?"?Fi:I[1]==="@"?Hi:St})}else l.push({type:6,index:s})}for(const b of m)n.removeAttribute(b)}if(Ri.test(n.tagName)){const m=n.textContent.split(Ye),b=m.length-1;if(b>0){n.textContent=ht?ht.emptyScript:"";for(let x=0;x<b;x++)n.append(m[x],Et()),rt.nextNode(),l.push({type:2,index:++s});n.append(m[b],Et())}}}else if(n.nodeType===8)if(n.data===hr)l.push({type:2,index:s});else{let m=-1;for(;(m=n.data.indexOf(Ye,m+1))!==-1;)l.push({type:7,index:s}),m+=Ye.length-1}s++}}static createElement(e,t){const i=et.createElement("template");return i.innerHTML=e,i}}function it(r,e,t=r,i){var n,s,o,a;if(e===Ce)return e;let l=i!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[i]:t._$Cl;const u=Mt(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==u&&((s=l==null?void 0:l._$AO)===null||s===void 0||s.call(l,!1),u===void 0?l=void 0:(l=new u(r),l._$AT(r,t,i)),i!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[i]=l:t._$Cl=l),l!==void 0&&(e=it(r,l._$AS(r,e.values),l,i)),e}class Ni{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:i},parts:n}=this._$AD,s=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:et).importNode(i,!0);rt.currentNode=s;let o=rt.nextNode(),a=0,l=0,u=n[0];for(;u!==void 0;){if(a===u.index){let p;u.type===2?p=new dt(o,o.nextSibling,this,e):u.type===1?p=new u.ctor(o,u.name,u.strings,this,e):u.type===6&&(p=new Ui(o,this,e)),this._$AV.push(p),u=n[++l]}a!==(u==null?void 0:u.index)&&(o=rt.nextNode(),a++)}return rt.currentNode=et,s}v(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class dt{constructor(e,t,i,n){var s;this.type=2,this._$AH=se,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=n,this._$Cp=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=it(this,e,t),Mt(e)?e===se||e==null||e===""?(this._$AH!==se&&this._$AR(),this._$AH=se):e!==this._$AH&&e!==Ce&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Pi(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==se&&Mt(this._$AH)?this._$AA.nextSibling.data=e:this.$(et.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Ot.createElement(Ii(n.h,n.h[0]),this.options)),n);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===s)this._$AH.v(i);else{const o=new Ni(s,this),a=o.u(this.options);o.v(i),this.$(a),this._$AH=o}}_$AC(e){let t=Di.get(e.strings);return t===void 0&&Di.set(e.strings,t=new Ot(e)),t}T(e){Si(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const s of e)n===t.length?t.push(i=new dt(this.k(Et()),this.k(Et()),this,this.options)):i=t[n],i._$AI(s),n++;n<t.length&&(this._$AR(i&&i._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class St{constructor(e,t,i,n,s){this.type=1,this._$AH=se,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=se}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,n){const s=this.strings;let o=!1;if(s===void 0)e=it(this,e,t,0),o=!Mt(e)||e!==this._$AH&&e!==Ce,o&&(this._$AH=e);else{const a=e;let l,u;for(e=s[0],l=0;l<s.length-1;l++)u=it(this,a[i+l],t,l),u===Ce&&(u=this._$AH[l]),o||(o=!Mt(u)||u!==this._$AH[l]),u===se?e=se:e!==se&&(e+=(u??"")+s[l+1]),this._$AH[l]=u}o&&!n&&this.j(e)}j(e){e===se?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Bi extends St{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===se?void 0:e}}const xs=ht?ht.emptyScript:"";class Fi extends St{constructor(){super(...arguments),this.type=4}j(e){e&&e!==se?this.element.setAttribute(this.name,xs):this.element.removeAttribute(this.name)}}class Hi extends St{constructor(e,t,i,n,s){super(e,t,i,n,s),this.type=5}_$AI(e,t=this){var i;if((e=(i=it(this,e,t,0))!==null&&i!==void 0?i:se)===Ce)return;const n=this._$AH,s=e===se&&n!==se||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==se&&(n===se||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class Ui{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){it(this,e)}}const $s={O:jt,P:Ye,A:hr,C:1,M:ji,L:Ni,R:Pi,D:it,I:dt,V:St,H:Fi,N:Hi,U:Bi,F:Ui},Yi=It.litHtmlPolyfillSupport;Yi==null||Yi(Ot,dt),((ur=It.litHtmlVersions)!==null&&ur!==void 0?ur:It.litHtmlVersions=[]).push("2.8.0");const ws=(r,e,t)=>{var i,n;const s=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let o=s._$litPart$;if(o===void 0){const a=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new dt(e.insertBefore(Et(),a),a,void 0,t??{})}return o._$AI(r),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var fr,pr;let
|
|
19
|
+
*/var fr,pr;let Le=class extends ut{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ws(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Ce}};Le.finalized=!0,Le._$litElement$=!0,(fr=globalThis.litElementHydrateSupport)===null||fr===void 0||fr.call(globalThis,{LitElement:Le});const zi=globalThis.litElementPolyfillSupport;zi==null||zi({LitElement:Le}),((pr=globalThis.litElementVersions)!==null&&pr!==void 0?pr:globalThis.litElementVersions=[]).push("3.3.2");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const Ge=r=>e=>typeof e=="function"?((t,i)=>(customElements.define(t,i),i))(r,e):((t,i)=>{const{kind:n,elements:s}=i;return{kind:n,elements:s,finisher(o){customElements.define(t,o)}}})(r,e);/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const _s=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,r)}},Es=(r,e,t)=>{e.constructor.createProperty(t,r)};function Pe(r){return(e,t)=>t!==void 0?Es(r,e,t):_s(r,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function Pt(r){return
|
|
31
|
+
*/function Pt(r){return Pe({...r,state:!0})}/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -36,31 +36,31 @@
|
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2021 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function
|
|
39
|
+
*/function ft(r,e,t){return r?e():t==null?void 0:t()}/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2021 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/function*
|
|
43
|
+
*/function*pt(r,e){if(r!==void 0){let t=0;for(const i of r)yield e(i,t++)}}/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const
|
|
47
|
+
*/const Ke={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},vr=r=>(...e)=>({_$litDirective$:r,values:e});class mr{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2020 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/const{I:
|
|
51
|
+
*/const{I:Ms}=$s,As=r=>r.strings===void 0,Xi=()=>document.createComment(""),kt=(r,e,t)=>{var i;const n=r._$AA.parentNode,s=e===void 0?r._$AB:e._$AA;if(t===void 0){const o=n.insertBefore(Xi(),s),a=n.insertBefore(Xi(),s);t=new Ms(o,a,r,r.options)}else{const o=t._$AB.nextSibling,a=t._$AM,l=a!==r;if(l){let u;(i=t._$AQ)===null||i===void 0||i.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==a._$AU&&t._$AP(u)}if(o!==s||l){let u=t._$AA;for(;u!==o;){const p=u.nextSibling;n.insertBefore(u,s),u=p}}}return t},nt=(r,e,t=r)=>(r._$AI(e,t),r),Os={},Vi=(r,e=Os)=>r._$AH=e,Ss=r=>r._$AH,yr=r=>{var e;(e=r._$AP)===null||e===void 0||e.call(r,!1,!0);let t=r._$AA;const i=r._$AB.nextSibling;for(;t!==i;){const n=t.nextSibling;t.remove(),t=n}};/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/const
|
|
55
|
+
*/const Wi=(r,e,t)=>{const i=new Map;for(let n=e;n<=t;n++)i.set(r[n],n);return i},Ps=vr(class extends mr{constructor(r){if(super(r),r.type!==Ke.CHILD)throw Error("repeat() can only be used in text expressions")}ct(r,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);const n=[],s=[];let o=0;for(const a of r)n[o]=i?i(a,o):o,s[o]=t(a,o),o++;return{values:s,keys:n}}render(r,e,t){return this.ct(r,e,t).values}update(r,[e,t,i]){var n;const s=Ss(r),{values:o,keys:a}=this.ct(e,t,i);if(!Array.isArray(s))return this.ut=a,o;const l=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],u=[];let p,m,b=0,x=s.length-1,E=0,I=o.length-1;for(;b<=x&&E<=I;)if(s[b]===null)b++;else if(s[x]===null)x--;else if(l[b]===a[E])u[E]=nt(s[b],o[E]),b++,E++;else if(l[x]===a[I])u[I]=nt(s[x],o[I]),x--,I--;else if(l[b]===a[I])u[I]=nt(s[b],o[I]),kt(r,u[I+1],s[b]),b++,I--;else if(l[x]===a[E])u[E]=nt(s[x],o[E]),kt(r,s[b],s[x]),x--,E++;else if(p===void 0&&(p=Wi(a,E,I),m=Wi(l,b,x)),p.has(l[b]))if(p.has(l[x])){const q=m.get(a[E]),J=q!==void 0?s[q]:null;if(J===null){const f=kt(r,s[b]);nt(f,o[E]),u[E]=f}else u[E]=nt(J,o[E]),kt(r,s[b],J),s[q]=null;E++}else yr(s[x]),x--;else yr(s[b]),b++;for(;E<=I;){const q=kt(r,u[I+1]);nt(q,o[E]),u[E++]=q}for(;b<=x;){const q=s[b++];q!==null&&yr(q)}return this.ut=a,Vi(r,u),Ce}});/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/let br=class extends mr{constructor(e){if(super(e),this.et=
|
|
59
|
+
*/let br=class extends mr{constructor(e){if(super(e),this.et=se,e.type!==Ke.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===se||e==null)return this.ft=void 0,this.et=e;if(e===Ce)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}};br.directiveName="unsafeHTML",br.resultType=1;const qi=vr(br);/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2020 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/const qi=Symbol.for(""),Ss=r=>{if((r==null?void 0:r.r)===qi)return r==null?void 0:r._$litStatic$},Nt=r=>({_$litStatic$:r,r:qi}),Gi=new Map,Ps=r=>(e,...t)=>{const i=t.length;let n,s;const o=[],l=[];let a,u=0,p=!1;for(;u<i;){for(a=e[u];u<i&&(s=t[u],(n=Ss(s))!==void 0);)a+=n+e[++u],p=!0;u!==i&&l.push(s),o.push(a),u++}if(u===i&&o.push(e[i]),p){const v=o.join("$$lit$$");(e=Gi.get(v))===void 0&&(o.raw=o,Gi.set(v,e=o)),t=l}return r(e,...t)},xr=Ps(he);(()=>{var r=Object.defineProperty,e=Math.pow,t=(c,d,b)=>d in c?r(c,d,{enumerable:!0,configurable:!0,writable:!0,value:b}):c[d]=b,i=(c,d,b)=>(t(c,typeof d!="symbol"?d+"":d,b),b),n=(c,d)=>` ${d&&d.length>0?d.map(b=>`<link rel="stylesheet" href="${b}" />`).join(""):""} <style> ${c} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,s=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",o="pointers-overlap",l="pointers-min-distance",a="pointers-max-distance",u="range-dragging",p="data",v="min",y="max",x="step",M="round",j="type",q="theme",J="rtl",f="btt",g="disabled",$="keyboard-disabled",S="mousewheel-disabled",E="slider-width",A="slider-height",C="slider-radius",L="slider-bg",I="slider-bg-hover",W="slider-bg-fill",re="pointer-width",k="pointer-height",_="pointer-radius",O="pointer-bg",B="pointer-bg-hover",P="pointer-bg-focus",H="pointer-shadow",V="pointer-shadow-hover",ee="pointer-shadow-focus",le="pointer-border",Z="pointer-border-hover",ve="pointer-border-focus",De="animate-onclick",Ie="css-links",be="vertical",Le="horizontal",He=(c,d,b,m,T)=>{let U=d-c;return U===0?b:(m-b)*(T-c)/U+b},ue=c=>!isNaN(parseFloat(c))&&isFinite(c),oe=(c,d)=>ue(c)?Number(c):d,bt=(c,d)=>d===0?0:Math.round(c/d)*d,xt=(c,d=1/0)=>{if(d===1/0)return c;let b=e(10,d);return Math.round(c*b)/b},xe=c=>c==null?!1:typeof c=="boolean"?c:c.trim().toLowerCase()==="true",rl=(c,d)=>{c.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},il=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},nl=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},sl=(c,d)=>{c.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},ol=(c,d)=>{if(!d||d.length<=0)return;let b=d.map(T=>ue(T)?oe(T,T):T),m={values:b||[]};m.value=b[0],m.value0=b[0],m.value1=b[0];for(let T=1;T<b.length;T++)m[`value${T+1}`]=b[T];c.dispatchEvent(new CustomEvent("change",{detail:m}))},Kr=(c,d,b)=>{let m=0,T,U,G,R,D=!1,K=(z,ce,me,ge,de,fe)=>{let _e=m;me!==void 0&&z>me&&(z=me),ce!==void 0&&z<ce&&(z=ce),m=z;let Ee=m;return(ge===be&&fe||ge===Le&&de)&&(Ee=100-Ee),ge===be?d.style.top=`${Ee}%`:d.style.left=`${Ee}%`,_e!==m},te=z=>z===d||d.contains(z),F=(z,ce,me,ge)=>{T=z,U=ce,G=me,R=ge},se=z=>{D=z,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Te=(z,ce)=>{ce==null?d.removeAttribute(z):d.setAttribute(z,ce)},we=z=>d.getAttribute(z),Y=z=>{if(!D){switch(z.key){case"ArrowLeft":{z.preventDefault(),typeof T=="function"&&T(b);break}case"ArrowRight":{z.preventDefault(),typeof U=="function"&&U(b);break}case"ArrowUp":{z.preventDefault(),typeof G=="function"&&G(b);break}case"ArrowDown":{z.preventDefault(),typeof R=="function"&&R(b);break}}sl(c,z)}},Q=()=>{D||rl(c,d)};return d.className=`pointer pointer-${b}`,d.addEventListener("keydown",Y),d.addEventListener("click",Q),{$pointer:d,get percent(){return m},get disabled(){return D},set disabled(z){se(z)},updatePosition:K,isClicked:te,setCallbacks:F,setAttr:Te,getAttr:we,destroy:()=>{d.removeEventListener("keydown",Y),d.removeEventListener("click",Q),d.remove()}}},al=c=>{if(c==null)return;if(Array.isArray(c))return c;if(c.trim()==="")return;let d=c.split(","),b=[],m=!0;for(let T=0;T<d.length;T++){let U=d[T].trim();U!==""&&(b.push(U),ue(U)||(m=!1))}return m?b.map(T=>Number(T)):b},ll=(c,d)=>d?d.findIndex(b=>b===c||b.toString().trim()===c.toString().trim()):-1,cl=c=>({updatePosition:(d,b,m,T)=>{if(b.length<=0)return;let U=b.length===1,G=b[0],R=b[b.length-1];d===be?(c.style.removeProperty("width"),c.style.removeProperty("right"),c.style.removeProperty("left"),U?c.style.height=`${G}%`:c.style.height=`${Math.abs(G-R)}%`,T?(c.style.bottom="0%",U?c.style.top="auto":c.style.top=`${Math.min(100-R,100-G)}%`):(c.style.bottom="auto",U?c.style.top="0%":c.style.top=`${Math.min(G,R)}%`)):(c.style.removeProperty("height"),c.style.removeProperty("top"),c.style.removeProperty("bottom"),U?c.style.width=`${G}%`:c.style.width=`${Math.abs(G-R)}%`,m?(c.style.right="0%",U?c.style.left="auto":c.style.left=`${Math.min(100-R,100-G)}%`):(c.style.right="auto",U?c.style.left="0%":c.style.left=`${Math.min(G,R)}%`))}}),Yn="--animate-onclick",ul="--width",hl="--height",dl="--panel-bg-border-radius",fl="--panel-bg",pl="--panel-bg-hover",gl="--panel-bg-fill",vl="--pointer-width",ml="--pointer-height",yl="--pointer-border-radius",bl="--pointer-bg",xl="--pointer-bg-hover",$l="--pointer-bg-focus",wl="--pointer-shadow",_l="--pointer-shadow-hover",El="--pointer-shadow-focus",Ml="--pointer-border",Al="--pointer-border-hover",Ol="--pointer-border-focus",Wt=(c,d,b)=>{let m=new Map;for(let T of c.attributes){let U=T.nodeName.trim().toLowerCase();if(!d.test(U))continue;let G=U.replace(/\D/g,"").trim(),R=G===""||G==="0"||G==="1"?0:oe(G,0)-1,D=b&&typeof b=="function"?b(T.value):T.value;m.set(R,D)}return m},Sl=c=>{if(!c)return null;let d=c.getAttribute(Ie);if(!d)return null;let b=d.split(";"),m=[];for(let T of b)T.trim()!==""&&m.push(T.trim());return m},zn=[[ul,E,"sliderWidth",null],[hl,A,"sliderHeight",null],[dl,C,"sliderRadius",null],[fl,L,"sliderBg",null],[pl,I,"sliderBgHover",null],[gl,W,"sliderBgFill",null],[vl,re,"pointer#Width",/^pointer([0-9]*)-width$/],[ml,k,"pointer#Height",/^pointer([0-9]*)-height$/],[yl,_,"pointer#Radius",/^pointer([0-9]*)-radius$/],[bl,O,"pointer#Bg",/^pointer([0-9]*)-bg$/],[xl,B,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[$l,P,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[wl,H,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[_l,V,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[El,ee,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Ml,le,"pointer#Border",/^pointer([0-9]*)-border$/],[Al,Z,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Ol,ve,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Pl=(c,d,b)=>{let m=null,T=[],U=new Map,G=(Y,Q=d)=>{let z=[...Q.classList];for(let ce of z)ce.startsWith(Y)&&d.classList.remove(ce)},R=()=>{G("shape");let Y=d.querySelectorAll(".pointer");for(let Q of Y)G("shape",Q)},D=Y=>{m=Y,G("theme-"),typeof Y=="string"&&d.classList.add(`theme-${Y}`)},K=()=>{if(R(),!(T.length<=0)){d.classList.add("shape",`shape-${T[0]}`);for(let Y=1;Y<T.length;Y++){let Q=T[Y];if(!Q)continue;let z=d.querySelector(`.pointer-${Y}`);!z||z.classList.add("shape",`shape-${Q}`)}}},te=(Y,Q)=>{T[Y]=Q,K()},F=()=>{R();let Y=Wt(c,/^pointer([0-9]*)-shape$/);if(!(Y.size<=0)){for(let Q of Y){let z=Q[0];T[z]=Q[1]}K()}},se=(Y,Q)=>`${Y}-${Q}`,Te=(Y,Q,z)=>{let ce=b[z];if(!ce)return;let me=z===0?d:ce.$pointer;if(Q==null){U.has(se(Y,z))&&U.delete(se(Y,z)),me.style.removeProperty(Y);return}U.set(se(Y,z),Q),me.style.setProperty(Y,Q)},we=(Y,Q)=>U.get(se(Y,Q));return(()=>{for(let Y of zn){let[Q,z,ce,me]=Y;if(me){let de=Wt(c,me);for(let fe of de){let _e=fe[0],Ee=fe[1];Te(Q,Ee,_e)}}else{let de=c.getAttribute(z);Te(Q,de,0)}let ge=[];if(ce.indexOf("#")===-1)ge.push([ce,0]);else{ge.push([ce.replace("#",""),0]),ge.push([ce.replace("#","0"),0]),ge.push([ce.replace("#","1"),0]);for(let de=1;de<b.length;de++)ge.push([ce.replace("#",(de+1).toString()),de])}for(let de of ge)try{let fe=de[0],_e=de[1];Object.prototype.hasOwnProperty.call(c,fe)||Object.defineProperty(c,fe,{get(){return we(Q,_e)},set:Ee=>{Te(Q,Ee,_e)}})}catch(fe){console.error(fe)}}D(c.getAttribute(q)),F()})(),{setStyle:Te,getStyle:we,get theme(){return m},set theme(Y){D(Y)},get pointerShapes(){return T},setPointerShape:te}},$t="animate-on-click",Xn="range-dragging",Cl=(c,d,b,m)=>{let T=[],U=te=>{for(let F of T)F.update&&typeof F.update=="function"&&F.update(te)},G=()=>{for(let te of T)te.destroy&&typeof te.destroy=="function"&&te.destroy()},R=(te,F)=>{for(let se of T)se.onAttrChange&&typeof se.onAttrChange=="function"&&se.onAttrChange(te,F)},D=te=>{if(te.gettersAndSetters){for(let F of te.gettersAndSetters)if(!(!F.name||!F.attributes))try{Object.prototype.hasOwnProperty.call(c,F.name)||Object.defineProperty(c,F.name,F.attributes)}catch(se){console.error("defineSettersGetters error:",se)}}},K=te=>{var F;if(!te.css)return;let se=(F=c.shadowRoot)==null?void 0:F.querySelector("style");!se||(se.innerHTML+=te.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let te of window.tcRangeSliderPlugins){let F=te();T.push(F),F.init&&typeof F.init=="function"&&(F.init(c,d,b,m),D(F),K(F))}},update:U,onAttrChange:R,destroy:G}},kl=10,Ll=(c,d)=>{let b=new Map,m=/^value([0-9]*)$/;for(let R of c.attributes){let D=R.nodeName.trim().toLowerCase();if(!m.test(D))continue;let K=D.replace("value","").trim(),te=K===""||K==="0"||K==="1"?0:oe(K,0)-1,F=ue(R.value)?oe(R.value,0):R.value;b.set(te,F)}let T=Math.max(...Array.from(b.keys())),U=[];U.push([Kr(c,d,0),b.get(0)]);let G=d;for(let R=1;R<=T;R++){let D=d.cloneNode(!0);G.after(D),G=D,U.push([Kr(c,D,R),b.get(R)])}return U},Vn=(c,d,b,m,T,U,G)=>{try{Object.defineProperty(c,m,{configurable:!0,get(){if(!d)return;let R=d.pointers[b];if(!R)return;let D=d.getTextValue(R.percent);return ue(D)?oe(D,D):D},set:R=>{d.pointers[b]?d==null||d.setValue(R,b):d==null||d.addPointer(R)}}),Object.defineProperty(c,T,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.pointers[b])==null?void 0:R.getAttr("aria-label"))!=null?D:void 0},set:R=>{!d||d.setAriaLabel(b,R)}}),Object.defineProperty(c,U,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.styles)==null?void 0:R.pointerShapes[b])!=null?D:null},set:R=>{!d||!d.styles||d.styles.setPointerShape(b,R)}}),Object.defineProperty(c,G,{configurable:!0,get(){var R;return(R=d==null?void 0:d.pointers[b].disabled)!=null?R:!1},set:R=>{if(!d)return;let D=d==null?void 0:d.pointers[b];!D||(D.disabled=R)}})}catch(R){console.error(R)}},Tl=(c,d)=>{let b=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let m=2;m<kl;m++)b.push([`value${m}`,`ariaLabel${m}`,`pointer${m}Shape`,`pointer${m}Disabled`,m-1]);for(let m of b)Vn(c,d,m[4],m[0],m[1],m[2],m[3])},Wn=(c,d,b)=>{var m;let T=(m=b.shadowRoot)==null?void 0:m.querySelector(".container");if(T)for(let U of c)d?T.prepend(U.$pointer):T.append(U.$pointer)},Jr=0,Lt=100,wt=2,qn="0.3s",Rl=(c,d,b)=>{let m=b.map(h=>h[0]),T=null,U=null,G=null,R=null,D=Jr,K=Lt,te,F,se=Le,Te=wt,we=!1,Y=!1,Q=!1,z=0,ce=1/0,me=!1,ge,de,fe=!1,_e=!1,Ee=!1,Ze=qn,Gn=[],Kn=h=>{fe||(h.preventDefault&&h.preventDefault(),ot(h),window.addEventListener("mousemove",ot),window.addEventListener("mouseup",qt),il(c,h))},qt=h=>{fe||(ge=void 0,de=void 0,window.removeEventListener("mousemove",ot),window.removeEventListener("mouseup",qt),Ze&&d.classList.add($t),nl(c,h))},jl=(h,w)=>{if(m.length<=0)return;if(m.length===1)return m[0].isClicked(h)&&Ze&&d.classList.remove($t),m[0];let N=Bl(h);if(me){let ie=w,je=Kt(ie);je!==void 0&&(ie=bt(ie,je)),N?(ge=ie,de=0,Ze&&d.classList.remove($t)):ge!==void 0&&(de=ie-ge,ge=ie)}if(!Nl(h)&&!N){for(let ie of m)if(!(!ie.isClicked(h)||ie.disabled))return Ze&&d.classList.remove($t),ie;for(let ie of m)if(T===ie)return ie}let ae=1/0,pe=null;for(let ie of m){if(ie.disabled)continue;let je=Math.abs(w-ie.percent);je<ae&&(ae=je,pe=ie)}return pe},Jn=()=>m.findIndex(h=>T===h&&!h.disabled),ot=h=>{let w;if(se===be){let{height:ae,top:pe}=d.getBoundingClientRect(),ie=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;w=Math.min(Math.max(0,ie-pe),ae)*100/ae}else{let{width:ae,left:pe}=d.getBoundingClientRect(),ie=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;w=Math.min(Math.max(0,ie-pe),ae)*100/ae}if((we||Y)&&(w=100-w),T=jl(h.target,w),me&&m.length>1&&de!==void 0){let ae=m[0],pe=m[m.length-1],ie=ae.percent+de<0,je=pe.percent+de>100;if(ie||je)return;for(let nr=0;nr<m.length;nr++)Me(nr,m[nr].percent+de);return}let N=Jn();N!==-1&&(Me(N,w),T==null||T.$pointer.focus())},Gt=h=>{if(fe||document.activeElement!==c||T!=null&&T.disabled)return;h.stopPropagation(),h.preventDefault();let w=h.deltaY<0,N=we||Y,ae=w?!N:N,pe=Jn();pe!==-1&&(ae?Tt(pe,m[pe].percent):Rt(pe,m[pe].percent))},Zn=h=>{fe||_e||(se===be?Y?Me(h,100):Me(h,0):we?Rt(h,m[h].percent):Tt(h,m[h].percent))},Qn=h=>{fe||_e||(se===be?Y?Me(h,0):Me(h,100):we?Tt(h,m[h].percent):Rt(h,m[h].percent))},es=h=>{fe||_e||(se===be?Y?Rt(h,m[h].percent):Tt(h,m[h].percent):we?Me(h,100):Me(h,0))},ts=h=>{fe||_e||(se===be?Y?Tt(h,m[h].percent):Rt(h,m[h].percent):we?Me(h,0):Me(h,100))},Nl=h=>h.classList.contains("panel"),Bl=h=>h.classList.contains("panel-fill"),Tt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w-=N,w<0&&(w=0),Me(h,w)},Rt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w+=N,w>100&&(w=100),Me(h,w)},at=()=>{!R||R.update({percents:rs(),values:is(),$pointers:ns(),min:ss(),max:os(),data:ei(),step:Qr(),round:ri(),type:ti(),textMin:Jt(),textMax:Zt(),rightToLeft:si(),bottomToTop:oi(),pointersOverlap:ui(),pointersMinDistance:ii(),pointersMaxDistance:ni(),rangeDragging:hi(),disabled:ai(),keyboardDisabled:li(),mousewheelDisabled:ci()})},Fl=()=>{at()},Hl=h=>{if(!(Q||m.length<=1||K===D))if(h===0){let w=ce*100/(K-D);return Math.max(0,m[h+1].percent-w)}else{let w=z*100/(K-D);return Math.min(m[h-1].percent+w,100)}},Ul=h=>{if(!(Q||m.length<=1||K===D))if(h===m.length-1){let w=ce*100/(K-D);return Math.min(m[h-1].percent+w,100)}else{let w=z*100/(K-D);return Math.max(0,m[h+1].percent-w)}},Kt=h=>{let w;if(typeof te=="function"){let N=He(0,100,D,K,h);w=te(N,h)}else w=te;if(ue(w)){let N=K-D;return w=N===0?0:w*100/N,w}},_t=h=>{if(h===void 0)return;let w=He(0,100,D,K,h);return F!==void 0?F[Math.round(w)]:xt(w,Te)},Jt=()=>F!==void 0?F[D]:D,Zt=()=>F!==void 0?F[K]:K,Qr=()=>te,Yl=h=>{var w;return h<=0||Q?Jt():(w=_t(m[h-1].percent))!=null?w:""},zl=h=>{var w;return m.length<=1||h>=m.length-1||Q?Zt():(w=_t(m[h+1].percent))!=null?w:""},rs=()=>m.map(h=>h.percent),is=()=>m.map(h=>_t(h.percent)),ns=()=>m.map(h=>h.$pointer),ss=()=>D,os=()=>K,ei=()=>F,ti=()=>se,ri=()=>Te,ii=()=>z,ni=()=>ce,Xl=h=>Gn[h],si=()=>we,oi=()=>Y,ai=()=>fe,li=()=>_e,ci=()=>Ee,ui=()=>Q,hi=()=>me,Me=(h,w)=>{if(w===void 0)return;let N=Kt(w);N!==void 0&&(w=bt(w,N));let ae=m[h];if(!ae)return;let pe=ae.updatePosition(w,Hl(h),Ul(h),se,we,Y);U==null||U.updatePosition(se,m.map(ie=>ie.percent),we,Y),at();for(let ie of m){let je=_t(ie.percent);je!==void 0&&(ie.setAttr("aria-valuenow",je.toString()),ie.setAttr("aria-valuetext",je.toString()))}Wl(),pe&&ol(c,m.map(ie=>_t(ie.percent)))},Ue=()=>{for(let h=0;h<m.length;h++)Me(h,m[h].percent)},Vl=(h,w)=>{D=F!==void 0?0:oe(h,Jr),K=F!==void 0?F.length-1:oe(w,Lt),Qt(D),er(K)},Wl=()=>{var h,w;for(let N=0;N<m.length;N++){let ae=m[N];ae.setAttr("aria-valuemin",((h=Yl(N))!=null?h:"").toString()),ae.setAttr("aria-valuemax",((w=zl(N))!=null?w:"").toString())}},Qt=h=>{D=oe(h,Jr),D>K&&(K=D+Lt),Ue()},er=h=>{K=oe(h,Lt),K<D&&(K=D+Lt),Ue()},as=h=>{Q=!0;for(let w=0;w<h.length;w++)tr(h[w],w);Q=!1;for(let w=0;w<h.length;w++)tr(h[w],w)},tr=(h,w)=>{let N;F!==void 0?(N=h==null?0:ll(h,F),N===-1&&(N=0)):(N=oe(h,D),N<D&&(N=D),N>K&&(N=K));let ae=He(D,K,0,100,N);Me(w,ae)},rr=h=>{if(h==null){te=void 0;return}if(typeof h=="function"){te=h,Ue();return}if(ue(h)){te=oe(h,1);let w=Math.abs(K-D);te>w&&(te=void 0),Ue();return}te=void 0},di=h=>{Q=h,Ue()},fi=h=>{(!ue(h)||h<0)&&(h=0),z=h},pi=h=>{(!ue(h)||h<0)&&(h=1/0),ce=h},gi=h=>{fe=h,d.classList.toggle("disabled",fe),fe?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},ls=h=>{_e=h},cs=h=>{Ee=h,Ee?document.removeEventListener("wheel",Gt):document.addEventListener("wheel",Gt,{passive:!1})},vi=h=>{if(h==null){F=void 0;return}if(F=al(h),F===void 0||F.length<=0){F=void 0;return}Qt(0),er(F.length-1),te===void 0&&rr(1)},mi=h=>{var w;typeof h=="string"?se=h.trim().toLowerCase()===be?be:Le:se=Le;let N=(w=c.shadowRoot)==null?void 0:w.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${se}`,Ue();let ae=se===be?"vertical":"horizontal";for(let pe of m)pe.setAttr("aria-orientation",ae)},yi=h=>{we=h,m.length>1&&Wn(m,we,c),Ue(),at()},bi=h=>{Y=h,m.length>1&&Wn(m,Y,c),Ue(),at()},xi=h=>{Te=oe(h,wt),Te<0&&(Te=wt),at()},us=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(Ze=void 0,d.style.removeProperty(Yn),d.classList.remove($t)):(Ze=h.toString(),d.style.setProperty(Yn,Ze),d.classList.add($t))},hs=(h,w)=>{let N=m[h];!N||(N.setAttr("aria-label",w),Gn[h]=w)},ir=h=>{if(ge=void 0,m.length<=1){me=!1,d.classList.remove(Xn);return}me=h,d.classList.toggle(Xn,me)},ql=()=>{gi(xe(c.getAttribute(g))),_e=xe(c.getAttribute($)),Ee=xe(c.getAttribute(S));let h=Wt(c,/^pointer([0-9]*)-disabled$/,w=>xe(w));for(let w of h){let N=w[0];!m[N]||(m[N].disabled=w[1])}},Gl=()=>{let h=Wt(c,/^aria-label([0-9]*)$/);for(let w of h){let N=w[0];hs(N,w[1])}},Kl=h=>{let w=m.length,N=m[w-1].$pointer,ae=N.cloneNode(!0);N.after(ae);let pe=Kr(c,ae,w);return pe.setCallbacks(Zn,Qn,es,ts),m.push(pe),tr(h,w),Ue(),at(),w},Jl=()=>{let h=m.length,w=m[h-1];return w?(w.destroy(),m.pop(),m.length<=1&&ir(!1),Ue(),at(),h-1):-1};return(()=>{var h,w;for(let ae of m)ae.setCallbacks(Zn,Qn,es,ts);let N=(h=c.shadowRoot)==null?void 0:h.querySelector(".panel-fill");N&&(U=cl(N)),mi(c.getAttribute(j)),yi(xe(c.getAttribute(J))),bi(xe(c.getAttribute(f))),Vl(c.getAttribute(v),c.getAttribute(y)),rr(c.getAttribute(x)),vi(c.getAttribute(p)),as(b.map(ae=>ae[1])),di(xe(c.getAttribute(o))),fi(oe(c.getAttribute(l),0)),pi(oe(c.getAttribute(a),1/0)),ir(xe(c.getAttribute(u))),xi(oe(c.getAttribute(M),wt)),ql(),Gl(),G=Pl(c,d,m),us((w=c.getAttribute(De))!=null?w:qn),d.addEventListener("mousedown",Kn),d.addEventListener("mouseup",qt),d.addEventListener("touchmove",ot),d.addEventListener("touchstart",ot),Ee||document.addEventListener("wheel",Gt,{passive:!1}),R=Cl(c,Fl,{setValues:as,setMin:Qt,setMax:er,setStep:rr,setPointersOverlap:di,setPointersMinDistance:fi,setPointersMaxDistance:pi,setDisabled:gi,setType:mi,setRightToLeft:yi,setBottomToTop:bi,setRound:xi,setKeyboardDisabled:ls,setMousewheelDisabled:cs,setRangeDragging:ir,setData:vi},{getPercents:rs,getValues:is,getPointerElements:ns,getMin:ss,getMax:os,getStep:Qr,getData:ei,getType:ti,getRound:ri,getTextMin:Jt,getTextMax:Zt,isRightToLeft:si,isBottomToTop:oi,isDisabled:ai,isKeyboardDisabled:li,isMousewheelDisabled:ci,isPointersOverlap:ui,isRangeDraggingEnabled:hi,getPointersMinDistance:ii,getPointersMaxDistance:ni}),R.init()})(),{get pointers(){return m},get styles(){return G},get pluginsManager(){return R},get min(){return Jt()},get max(){return Zt()},get step(){return Qr()},get pointersOverlap(){return ui()},set pointersOverlap(h){di(h)},get pointersMinDistance(){return ii()},set pointersMinDistance(h){fi(h)},get pointersMaxDistance(){return ni()},set pointersMaxDistance(h){pi(h)},get disabled(){return ai()},set disabled(h){gi(h)},get data(){return ei()},get type(){return ti()},set type(h){mi(h)},get rightToLeft(){return si()},set rightToLeft(h){yi(h)},get bottomToTop(){return oi()},set bottomToTop(h){bi(h)},get round(){return ri()},set round(h){xi(h)},get animateOnClick(){return Ze},set animateOnClick(h){us(h)},get keyboardDisabled(){return li()},set keyboardDisabled(h){ls(h)},get mousewheelDisabled(){return ci()},set mousewheelDisabled(h){cs(h)},get rangeDragging(){return hi()},set rangeDragging(h){ir(h)},setMin:Qt,setMax:er,setValue:tr,setStep:rr,setData:vi,getTextValue:_t,setAriaLabel:hs,getAriaLabel:Xl,addPointer:Kl,removePointer:Jl,destroy:()=>{d.removeEventListener("mousedown",Kn),d.removeEventListener("mouseup",qt),d.removeEventListener("touchmove",ot),d.removeEventListener("touchstart",ot),document.removeEventListener("wheel",Gt);for(let h of m)h.destroy();R==null||R.destroy()}}},Dl=(c,d,b)=>{let m=zn.find(([R,D,K,te])=>D.replace("#","")===d.replace(/\d+/g,""));if(m&&c.styles){let[R,D,K,te]=m,F=d.replace(/\D/g,"").trim(),se=F===""||F==="0"||F==="1"?0:oe(F,0)-1;c.styles.setStyle(R,b,se);return}switch(c&&c.pluginsManager&&c.pluginsManager.onAttrChange(d,b),d){case v:{c.setMin(b);break}case y:{c.setMax(b);break}case x:{c.setStep(b);break}case o:{c.pointersOverlap=xe(b);break}case l:{c.pointersMinDistance=oe(b,0);break}case u:{c.rangeDragging=xe(b);break}case a:{c.pointersMaxDistance=oe(b,1/0);break}case g:{c.disabled=xe(b);break}case $:{c.keyboardDisabled=xe(b);break}case S:{c.mousewheelDisabled=xe(b);break}case p:{c.setData(b);break}case j:{c.type=b;break}case J:{c.rightToLeft=xe(b);break}case f:{c.bottomToTop=xe(b);break}case M:{c.round=oe(b,wt);break}case q:{c.styles&&(c.styles.theme=b);break}case De:{c.animateOnClick=b;break}}let T=null;if(/^value([0-9]*)$/.test(d)&&(T="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(T="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(T="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(T="pointer-shape"),!T)return;let U=d.replace(/\D/g,"").trim(),G=U===""||U==="0"||U==="1"?0:oe(U,0)-1;switch(T){case"value":{c.setValue(b,G);break}case"pointer-disabled":{let R=c==null?void 0:c.pointers[G];if(!R)return;R.disabled=xe(b);break}case"aria-label":{c.setAriaLabel(G,b);break}case"pointer-shape":{c.styles&&c.styles.setPointerShape(G,b);break}}},Il=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(c){this.slider&&this.slider.setStep(c)}get step(){var c;return(c=this.slider)==null?void 0:c.step}set disabled(c){this.slider&&(this.slider.disabled=c)}get disabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.disabled)!=null?d:!1}set data(c){var d;(d=this.slider)==null||d.setData(c)}get data(){var c;return(c=this.slider)==null?void 0:c.data}set min(c){var d;(d=this.slider)==null||d.setMin(c)}get min(){var c;return(c=this.slider)==null?void 0:c.min}set max(c){var d;(d=this.slider)==null||d.setMax(c)}get max(){var c;return(c=this.slider)==null?void 0:c.max}set round(c){!this.slider||(this.slider.round=c)}get round(){var c,d;return(d=(c=this.slider)==null?void 0:c.round)!=null?d:wt}set type(c){!this.slider||(this.slider.type=c??Le)}get type(){var c;return((c=this.slider)==null?void 0:c.type)||Le}set pointersOverlap(c){!this.slider||(this.slider.pointersOverlap=c)}get pointersOverlap(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersOverlap)!=null?d:!1}set pointersMinDistance(c){!this.slider||(this.slider.pointersMinDistance=c)}get pointersMinDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMinDistance)!=null?d:0}set pointersMaxDistance(c){!this.slider||(this.slider.pointersMaxDistance=c)}get pointersMaxDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMaxDistance)!=null?d:1/0}set theme(c){!this.slider||!this.slider.styles||(this.slider.styles.theme=c)}get theme(){var c,d,b;return(b=(d=(c=this.slider)==null?void 0:c.styles)==null?void 0:d.theme)!=null?b:null}set rtl(c){!this.slider||(this.slider.rightToLeft=c)}get rtl(){var c,d;return(d=(c=this.slider)==null?void 0:c.rightToLeft)!=null?d:!1}set btt(c){!this.slider||(this.slider.bottomToTop=c)}get btt(){var c,d;return(d=(c=this.slider)==null?void 0:c.bottomToTop)!=null?d:!1}set keyboardDisabled(c){!this.slider||(this.slider.keyboardDisabled=c)}get keyboardDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(c){!this.slider||(this.slider.mousewheelDisabled=c)}get mousewheelDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.mousewheelDisabled)!=null?d:!1}set animateOnClick(c){!this.slider||(this.slider.animateOnClick=c)}get animateOnClick(){var c;return(c=this.slider)==null?void 0:c.animateOnClick}get rangeDragging(){var c,d;return(d=(c=this.slider)==null?void 0:c.rangeDragging)!=null?d:!1}set rangeDragging(c){this.slider&&(this.slider.rangeDragging=xe(c))}get externalCSSList(){return this._externalCSSList}addPointer(c){var d;if(!this.slider)return;let b=(d=this.slider)==null?void 0:d.addPointer(c);Vn(this,this.slider,b,`value${b+1}`,`ariaLabel${b+1}`,`pointerShape${b+1}`,`pointer${b+1}Disabled`)}removePointer(){var c;!this.slider||(c=this.slider)==null||c.removePointer()}addCSS(c){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=c,this.shadowRoot.appendChild(d)}connectedCallback(){var c,d;if(!this.shadowRoot)return;this._externalCSSList=Sl(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let b=(c=this.shadowRoot)==null?void 0:c.querySelector(".pointer");if(!b)return;let m=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!m)return;let T=Ll(this,b);this.slider=Rl(this,m,T),Tl(this,this.slider),this._observer=new MutationObserver(U=>{U.forEach(G=>{var R;if(!this.slider||G.type!=="attributes")return;let D=G.attributeName;!D||Dl(this.slider,D,(R=this.getAttribute(D))!=null?R:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Zr=Il;window.tcRangeSlider=Zr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Zr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Zr{})})();var ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $r(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function wr(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var n=[null];n.push.apply(n,arguments);var s=Function.bind.apply(e,n);return new s}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var Ki={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ft,function(){var t=1e3,i=6e4,n=36e5,s="millisecond",o="second",l="minute",a="hour",u="day",p="week",v="month",y="quarter",x="year",M="date",j="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var _=["th","st","nd","rd"],O=k%100;return"["+k+(_[(O-20)%10]||_[O]||_[0])+"]"}},g=function(k,_,O){var B=String(k);return!B||B.length>=_?k:""+Array(_+1-B.length).join(O)+k},$={s:g,z:function(k){var _=-k.utcOffset(),O=Math.abs(_),B=Math.floor(O/60),P=O%60;return(_<=0?"+":"-")+g(B,2,"0")+":"+g(P,2,"0")},m:function k(_,O){if(_.date()<O.date())return-k(O,_);var B=12*(O.year()-_.year())+(O.month()-_.month()),P=_.clone().add(B,v),H=O-P<0,V=_.clone().add(B+(H?-1:1),v);return+(-(B+(O-P)/(H?P-V:V-P))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:v,y:x,w:p,d:u,D:M,h:a,m:l,s:o,ms:s,Q:y}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},S="en",E={};E[S]=f;var A=function(k){return k instanceof W},C=function k(_,O,B){var P;if(!_)return S;if(typeof _=="string"){var H=_.toLowerCase();E[H]&&(P=H),O&&(E[H]=O,P=H);var V=_.split("-");if(!P&&V.length>1)return k(V[0])}else{var ee=_.name;E[ee]=_,P=ee}return!B&&P&&(S=P),P||!B&&S},L=function(k,_){if(A(k))return k.clone();var O=typeof _=="object"?_:{};return O.date=k,O.args=arguments,new W(O)},I=$;I.l=C,I.i=A,I.w=function(k,_){return L(k,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var W=function(){function k(O){this.$L=C(O.locale,null,!0),this.parse(O)}var _=k.prototype;return _.parse=function(O){this.$d=function(B){var P=B.date,H=B.utc;if(P===null)return new Date(NaN);if(I.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var V=P.match(q);if(V){var ee=V[2]-1||0,le=(V[7]||"0").substring(0,3);return H?new Date(Date.UTC(V[1],ee,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)):new Date(V[1],ee,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)}}return new Date(P)}(O),this.$x=O.x||{},this.init()},_.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},_.$utils=function(){return I},_.isValid=function(){return this.$d.toString()!==j},_.isSame=function(O,B){var P=L(O);return this.startOf(B)<=P&&P<=this.endOf(B)},_.isAfter=function(O,B){return L(O)<this.startOf(B)},_.isBefore=function(O,B){return this.endOf(B)<L(O)},_.$g=function(O,B,P){return I.u(O)?this[B]:this.set(P,O)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(O,B){var P=this,H=!!I.u(B)||B,V=I.p(O),ee=function(He,ue){var oe=I.w(P.$u?Date.UTC(P.$y,ue,He):new Date(P.$y,ue,He),P);return H?oe:oe.endOf(u)},le=function(He,ue){return I.w(P.toDate()[He].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(ue)),P)},Z=this.$W,ve=this.$M,De=this.$D,Ie="set"+(this.$u?"UTC":"");switch(V){case x:return H?ee(1,0):ee(31,11);case v:return H?ee(1,ve):ee(0,ve+1);case p:var be=this.$locale().weekStart||0,Le=(Z<be?Z+7:Z)-be;return ee(H?De-Le:De+(6-Le),ve);case u:case M:return le(Ie+"Hours",0);case a:return le(Ie+"Minutes",1);case l:return le(Ie+"Seconds",2);case o:return le(Ie+"Milliseconds",3);default:return this.clone()}},_.endOf=function(O){return this.startOf(O,!1)},_.$set=function(O,B){var P,H=I.p(O),V="set"+(this.$u?"UTC":""),ee=(P={},P[u]=V+"Date",P[M]=V+"Date",P[v]=V+"Month",P[x]=V+"FullYear",P[a]=V+"Hours",P[l]=V+"Minutes",P[o]=V+"Seconds",P[s]=V+"Milliseconds",P)[H],le=H===u?this.$D+(B-this.$W):B;if(H===v||H===x){var Z=this.clone().set(M,1);Z.$d[ee](le),Z.init(),this.$d=Z.set(M,Math.min(this.$D,Z.daysInMonth())).$d}else ee&&this.$d[ee](le);return this.init(),this},_.set=function(O,B){return this.clone().$set(O,B)},_.get=function(O){return this[I.p(O)]()},_.add=function(O,B){var P,H=this;O=Number(O);var V=I.p(B),ee=function(ve){var De=L(H);return I.w(De.date(De.date()+Math.round(ve*O)),H)};if(V===v)return this.set(v,this.$M+O);if(V===x)return this.set(x,this.$y+O);if(V===u)return ee(1);if(V===p)return ee(7);var le=(P={},P[l]=i,P[a]=n,P[o]=t,P)[V]||1,Z=this.$d.getTime()+O*le;return I.w(Z,this)},_.subtract=function(O,B){return this.add(-1*O,B)},_.format=function(O){var B=this,P=this.$locale();if(!this.isValid())return P.invalidDate||j;var H=O||"YYYY-MM-DDTHH:mm:ssZ",V=I.z(this),ee=this.$H,le=this.$m,Z=this.$M,ve=P.weekdays,De=P.months,Ie=function(ue,oe,bt,xt){return ue&&(ue[oe]||ue(B,H))||bt[oe].slice(0,xt)},be=function(ue){return I.s(ee%12||12,ue,"0")},Le=P.meridiem||function(ue,oe,bt){var xt=ue<12?"AM":"PM";return bt?xt.toLowerCase():xt},He={YY:String(this.$y).slice(-2),YYYY:I.s(this.$y,4,"0"),M:Z+1,MM:I.s(Z+1,2,"0"),MMM:Ie(P.monthsShort,Z,De,3),MMMM:Ie(De,Z),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:Ie(P.weekdaysMin,this.$W,ve,2),ddd:Ie(P.weekdaysShort,this.$W,ve,3),dddd:ve[this.$W],H:String(ee),HH:I.s(ee,2,"0"),h:be(1),hh:be(2),a:Le(ee,le,!0),A:Le(ee,le,!1),m:String(le),mm:I.s(le,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:V};return H.replace(J,function(ue,oe){return oe||He[ue]||V.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(O,B,P){var H,V=I.p(B),ee=L(O),le=(ee.utcOffset()-this.utcOffset())*i,Z=this-ee,ve=I.m(this,ee);return ve=(H={},H[x]=ve/12,H[v]=ve,H[y]=ve/3,H[p]=(Z-le)/6048e5,H[u]=(Z-le)/864e5,H[a]=Z/n,H[l]=Z/i,H[o]=Z/t,H)[V]||Z,P?ve:I.a(ve)},_.daysInMonth=function(){return this.endOf(v).$D},_.$locale=function(){return E[this.$L]},_.locale=function(O,B){if(!O)return this.$L;var P=this.clone(),H=C(O,B,!0);return H&&(P.$L=H),P},_.clone=function(){return I.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},k}(),re=W.prototype;return L.prototype=re,[["$ms",s],["$s",o],["$m",l],["$H",a],["$W",u],["$M",v],["$y",x],["$D",M]].forEach(function(k){re[k[1]]=function(_){return this.$g(_,k[0],k[1])}}),L.extend=function(k,_){return k.$i||(k(_,W,L),k.$i=!0),L},L.locale=C,L.isDayjs=A,L.unix=function(k){return L(1e3*k)},L.en=E[S],L.Ls=E,L.p={},L})})(Ki);var Cs=Ki.exports;const Bt=$r(Cs);class ks extends Pe{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,t){this._startExpression=e,this._endExpression=t;const i=this.escapeRegex(this._startExpression),n=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${i}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${n}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,t,i){if(!this.hasTemplate(e))return null;i=i||e;const n=he` <slot name=${i}></slot> `,s={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:l}=this._renderedTemplates[i];this.contains(l)&&this.removeChild(l)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let t=0;t<this.children.length;t++){const i=this.children[t];if(i.nodeName==="RENDER-TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=t}}return e}_renderTemplate(e,t,i){let n;if(t&&t.childNodes.length){const s=t.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,t){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),t);return s?typeof s=="object"?JSON.stringify(s):s.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,t){t={...t};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(t)}catch{}return n}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,t,i){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,i),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=i,e;for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n];this.renderNode(s,t,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const Ji=`
|
|
63
|
+
*/const Gi=Symbol.for(""),ks=r=>{if((r==null?void 0:r.r)===Gi)return r==null?void 0:r._$litStatic$},Nt=r=>({_$litStatic$:r,r:Gi}),Ki=new Map,Cs=r=>(e,...t)=>{const i=t.length;let n,s;const o=[],a=[];let l,u=0,p=!1;for(;u<i;){for(l=e[u];u<i&&(s=t[u],(n=ks(s))!==void 0);)l+=n+e[++u],p=!0;u!==i&&a.push(s),o.push(l),u++}if(u===i&&o.push(e[i]),p){const m=o.join("$$lit$$");(e=Ki.get(m))===void 0&&(o.raw=o,Ki.set(m,e=o)),t=a}return r(e,...t)},xr=Cs(ue);(()=>{var r=Object.defineProperty,e=Math.pow,t=(c,d,y)=>d in c?r(c,d,{enumerable:!0,configurable:!0,writable:!0,value:y}):c[d]=y,i=(c,d,y)=>(t(c,typeof d!="symbol"?d+"":d,y),y),n=(c,d)=>` ${d&&d.length>0?d.map(y=>`<link rel="stylesheet" href="${y}" />`).join(""):""} <style> ${c} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,s=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",o="pointers-overlap",a="pointers-min-distance",l="pointers-max-distance",u="range-dragging",p="data",m="min",b="max",x="step",E="round",I="type",q="theme",J="rtl",f="btt",g="disabled",$="keyboard-disabled",O="mousewheel-disabled",_="slider-width",M="slider-height",C="slider-radius",B="slider-bg",F="slider-bg-hover",R="slider-bg-fill",Q="pointer-width",ne="pointer-height",S="pointer-radius",P="pointer-bg",A="pointer-bg-hover",j="pointer-bg-focus",k="pointer-shadow",W="pointer-shadow-hover",U="pointer-shadow-focus",ie="pointer-border",ee="pointer-border-hover",ge="pointer-border-focus",ve="animate-onclick",Ee="css-links",ye="vertical",Me="horizontal",We=(c,d,y,v,L)=>{let Y=d-c;return Y===0?y:(v-y)*(L-c)/Y+y},$e=c=>!isNaN(parseFloat(c))&&isFinite(c),te=(c,d)=>$e(c)?Number(c):d,je=(c,d)=>d===0?0:Math.round(c/d)*d,at=(c,d=1/0)=>{if(d===1/0)return c;let y=e(10,d);return Math.round(c*y)/y},he=c=>c==null?!1:typeof c=="boolean"?c:c.trim().toLowerCase()==="true",nl=(c,d)=>{c.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},sl=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},ol=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},al=(c,d)=>{c.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},ll=(c,d)=>{if(!d||d.length<=0)return;let y=d.map(L=>$e(L)?te(L,L):L),v={values:y||[]};v.value=y[0],v.value0=y[0],v.value1=y[0];for(let L=1;L<y.length;L++)v[`value${L+1}`]=y[L];c.dispatchEvent(new CustomEvent("change",{detail:v}))},Kr=(c,d,y)=>{let v=0,L,Y,G,T,D=!1,K=(X,ce,be,me,de,fe)=>{let Ae=v;be!==void 0&&X>be&&(X=be),ce!==void 0&&X<ce&&(X=ce),v=X;let Oe=v;return(me===ye&&fe||me===Me&&de)&&(Oe=100-Oe),me===ye?d.style.top=`${Oe}%`:d.style.left=`${Oe}%`,Ae!==v},re=X=>X===d||d.contains(X),H=(X,ce,be,me)=>{L=X,Y=ce,G=be,T=me},ae=X=>{D=X,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},De=(X,ce)=>{ce==null?d.removeAttribute(X):d.setAttribute(X,ce)},_e=X=>d.getAttribute(X),z=X=>{if(!D){switch(X.key){case"ArrowLeft":{X.preventDefault(),typeof L=="function"&&L(y);break}case"ArrowRight":{X.preventDefault(),typeof Y=="function"&&Y(y);break}case"ArrowUp":{X.preventDefault(),typeof G=="function"&&G(y);break}case"ArrowDown":{X.preventDefault(),typeof T=="function"&&T(y);break}}al(c,X)}},Z=()=>{D||nl(c,d)};return d.className=`pointer pointer-${y}`,d.addEventListener("keydown",z),d.addEventListener("click",Z),{$pointer:d,get percent(){return v},get disabled(){return D},set disabled(X){ae(X)},updatePosition:K,isClicked:re,setCallbacks:H,setAttr:De,getAttr:_e,destroy:()=>{d.removeEventListener("keydown",z),d.removeEventListener("click",Z),d.remove()}}},cl=c=>{if(c==null)return;if(Array.isArray(c))return c;if(c.trim()==="")return;let d=c.split(","),y=[],v=!0;for(let L=0;L<d.length;L++){let Y=d[L].trim();Y!==""&&(y.push(Y),$e(Y)||(v=!1))}return v?y.map(L=>Number(L)):y},ul=(c,d)=>d?d.findIndex(y=>y===c||y.toString().trim()===c.toString().trim()):-1,hl=c=>({updatePosition:(d,y,v,L)=>{if(y.length<=0)return;let Y=y.length===1,G=y[0],T=y[y.length-1];d===ye?(c.style.removeProperty("width"),c.style.removeProperty("right"),c.style.removeProperty("left"),Y?c.style.height=`${G}%`:c.style.height=`${Math.abs(G-T)}%`,L?(c.style.bottom="0%",Y?c.style.top="auto":c.style.top=`${Math.min(100-T,100-G)}%`):(c.style.bottom="auto",Y?c.style.top="0%":c.style.top=`${Math.min(G,T)}%`)):(c.style.removeProperty("height"),c.style.removeProperty("top"),c.style.removeProperty("bottom"),Y?c.style.width=`${G}%`:c.style.width=`${Math.abs(G-T)}%`,v?(c.style.right="0%",Y?c.style.left="auto":c.style.left=`${Math.min(100-T,100-G)}%`):(c.style.right="auto",Y?c.style.left="0%":c.style.left=`${Math.min(G,T)}%`))}}),zn="--animate-onclick",dl="--width",fl="--height",pl="--panel-bg-border-radius",gl="--panel-bg",vl="--panel-bg-hover",ml="--panel-bg-fill",yl="--pointer-width",bl="--pointer-height",xl="--pointer-border-radius",$l="--pointer-bg",wl="--pointer-bg-hover",_l="--pointer-bg-focus",El="--pointer-shadow",Ml="--pointer-shadow-hover",Al="--pointer-shadow-focus",Ol="--pointer-border",Sl="--pointer-border-hover",Pl="--pointer-border-focus",Wt=(c,d,y)=>{let v=new Map;for(let L of c.attributes){let Y=L.nodeName.trim().toLowerCase();if(!d.test(Y))continue;let G=Y.replace(/\D/g,"").trim(),T=G===""||G==="0"||G==="1"?0:te(G,0)-1,D=y&&typeof y=="function"?y(L.value):L.value;v.set(T,D)}return v},kl=c=>{if(!c)return null;let d=c.getAttribute(Ee);if(!d)return null;let y=d.split(";"),v=[];for(let L of y)L.trim()!==""&&v.push(L.trim());return v},Xn=[[dl,_,"sliderWidth",null],[fl,M,"sliderHeight",null],[pl,C,"sliderRadius",null],[gl,B,"sliderBg",null],[vl,F,"sliderBgHover",null],[ml,R,"sliderBgFill",null],[yl,Q,"pointer#Width",/^pointer([0-9]*)-width$/],[bl,ne,"pointer#Height",/^pointer([0-9]*)-height$/],[xl,S,"pointer#Radius",/^pointer([0-9]*)-radius$/],[$l,P,"pointer#Bg",/^pointer([0-9]*)-bg$/],[wl,A,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[_l,j,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[El,k,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Ml,W,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Al,U,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Ol,ie,"pointer#Border",/^pointer([0-9]*)-border$/],[Sl,ee,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Pl,ge,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Cl=(c,d,y)=>{let v=null,L=[],Y=new Map,G=(z,Z=d)=>{let X=[...Z.classList];for(let ce of X)ce.startsWith(z)&&d.classList.remove(ce)},T=()=>{G("shape");let z=d.querySelectorAll(".pointer");for(let Z of z)G("shape",Z)},D=z=>{v=z,G("theme-"),typeof z=="string"&&d.classList.add(`theme-${z}`)},K=()=>{if(T(),!(L.length<=0)){d.classList.add("shape",`shape-${L[0]}`);for(let z=1;z<L.length;z++){let Z=L[z];if(!Z)continue;let X=d.querySelector(`.pointer-${z}`);!X||X.classList.add("shape",`shape-${Z}`)}}},re=(z,Z)=>{L[z]=Z,K()},H=()=>{T();let z=Wt(c,/^pointer([0-9]*)-shape$/);if(!(z.size<=0)){for(let Z of z){let X=Z[0];L[X]=Z[1]}K()}},ae=(z,Z)=>`${z}-${Z}`,De=(z,Z,X)=>{let ce=y[X];if(!ce)return;let be=X===0?d:ce.$pointer;if(Z==null){Y.has(ae(z,X))&&Y.delete(ae(z,X)),be.style.removeProperty(z);return}Y.set(ae(z,X),Z),be.style.setProperty(z,Z)},_e=(z,Z)=>Y.get(ae(z,Z));return(()=>{for(let z of Xn){let[Z,X,ce,be]=z;if(be){let de=Wt(c,be);for(let fe of de){let Ae=fe[0],Oe=fe[1];De(Z,Oe,Ae)}}else{let de=c.getAttribute(X);De(Z,de,0)}let me=[];if(ce.indexOf("#")===-1)me.push([ce,0]);else{me.push([ce.replace("#",""),0]),me.push([ce.replace("#","0"),0]),me.push([ce.replace("#","1"),0]);for(let de=1;de<y.length;de++)me.push([ce.replace("#",(de+1).toString()),de])}for(let de of me)try{let fe=de[0],Ae=de[1];Object.prototype.hasOwnProperty.call(c,fe)||Object.defineProperty(c,fe,{get(){return _e(Z,Ae)},set:Oe=>{De(Z,Oe,Ae)}})}catch(fe){console.error(fe)}}D(c.getAttribute(q)),H()})(),{setStyle:De,getStyle:_e,get theme(){return v},set theme(z){D(z)},get pointerShapes(){return L},setPointerShape:re}},$t="animate-on-click",Vn="range-dragging",Ll=(c,d,y,v)=>{let L=[],Y=re=>{for(let H of L)H.update&&typeof H.update=="function"&&H.update(re)},G=()=>{for(let re of L)re.destroy&&typeof re.destroy=="function"&&re.destroy()},T=(re,H)=>{for(let ae of L)ae.onAttrChange&&typeof ae.onAttrChange=="function"&&ae.onAttrChange(re,H)},D=re=>{if(re.gettersAndSetters){for(let H of re.gettersAndSetters)if(!(!H.name||!H.attributes))try{Object.prototype.hasOwnProperty.call(c,H.name)||Object.defineProperty(c,H.name,H.attributes)}catch(ae){console.error("defineSettersGetters error:",ae)}}},K=re=>{var H;if(!re.css)return;let ae=(H=c.shadowRoot)==null?void 0:H.querySelector("style");!ae||(ae.innerHTML+=re.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let re of window.tcRangeSliderPlugins){let H=re();L.push(H),H.init&&typeof H.init=="function"&&(H.init(c,d,y,v),D(H),K(H))}},update:Y,onAttrChange:T,destroy:G}},Tl=10,Wn=20,Rl=(c,d)=>{let y=new Map,v=/^value([0-9]*)$/;for(let T of c.attributes){let D=T.nodeName.trim().toLowerCase();if(!v.test(D))continue;let K=D.replace("value","").trim(),re=K===""||K==="0"||K==="1"?0:te(K,0)-1,H=$e(T.value)?te(T.value,0):T.value;y.set(re,H)}let L=Math.max(...Array.from(y.keys())),Y=[];Y.push([Kr(c,d,0),y.get(0)]);let G=d;for(let T=1;T<=L;T++){let D=d.cloneNode(!0);G.after(D),G=D,Y.push([Kr(c,D,T),y.get(T)])}return Y},qn=(c,d,y,v,L,Y,G)=>{try{Object.defineProperty(c,v,{configurable:!0,get(){if(!d)return;let T=d.pointers[y];if(!T)return;let D=d.getTextValue(T.percent);return $e(D)?te(D,D):D},set:T=>{d.pointers[y]?d==null||d.setValue(T,y):d==null||d.addPointer(T)}}),Object.defineProperty(c,L,{configurable:!0,get(){var T,D;return(D=(T=d==null?void 0:d.pointers[y])==null?void 0:T.getAttr("aria-label"))!=null?D:void 0},set:T=>{!d||d.setAriaLabel(y,T)}}),Object.defineProperty(c,Y,{configurable:!0,get(){var T,D;return(D=(T=d==null?void 0:d.styles)==null?void 0:T.pointerShapes[y])!=null?D:null},set:T=>{!d||!d.styles||d.styles.setPointerShape(y,T)}}),Object.defineProperty(c,G,{configurable:!0,get(){var T;return(T=d==null?void 0:d.pointers[y].disabled)!=null?T:!1},set:T=>{if(!d)return;let D=d==null?void 0:d.pointers[y];!D||(D.disabled=T)}})}catch(T){console.error(T)}},Dl=(c,d)=>{let y=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let v=2;v<Tl;v++)y.push([`value${v}`,`ariaLabel${v}`,`pointer${v}Shape`,`pointer${v}Disabled`,v-1]);for(let v of y)qn(c,d,v[4],v[0],v[1],v[2],v[3])},Gn=(c,d,y)=>{var v;let L=(v=y.shadowRoot)==null?void 0:v.querySelector(".container");if(L)for(let Y of c)d?L.prepend(Y.$pointer):L.append(Y.$pointer)},Il=(c,d)=>{if(!(!d||c.length<=1)){for(let y of c)y.$pointer.style.zIndex=Wn.toString();d.$pointer.style.zIndex=(Wn*2).toString()}},Jr=0,Lt=100,wt=2,Kn="0.3s",jl=(c,d,y)=>{let v=y.map(h=>h[0]),L=null,Y=null,G=null,T=null,D=Jr,K=Lt,re,H,ae=Me,De=wt,_e=!1,z=!1,Z=!1,X=0,ce=1/0,be=!1,me,de,fe=!1,Ae=!1,Oe=!1,Qe=Kn,Jn=[],Zn=h=>{fe||(h.preventDefault&&h.preventDefault(),lt(h),window.addEventListener("mousemove",lt),window.addEventListener("mouseup",qt),sl(c,h))},qt=h=>{fe||(me=void 0,de=void 0,window.removeEventListener("mousemove",lt),window.removeEventListener("mouseup",qt),Qe&&d.classList.add($t),ol(c,h))},Fl=(h,w)=>{if(v.length<=0)return;if(v.length===1)return v[0].isClicked(h)&&Qe&&d.classList.remove($t),v[0];let N=Ul(h);if(be){let oe=w,Ne=Kt(oe);Ne!==void 0&&(oe=je(oe,Ne)),N?(me=oe,de=0,Qe&&d.classList.remove($t)):me!==void 0&&(de=oe-me,me=oe)}if(!Hl(h)&&!N){for(let oe of v)if(!(!oe.isClicked(h)||oe.disabled))return Qe&&d.classList.remove($t),oe;for(let oe of v)if(L===oe)return oe}let le=1/0,pe=null;for(let oe of v){if(oe.disabled)continue;let Ne=Math.abs(w-oe.percent);Ne<le&&(le=Ne,pe=oe)}return pe},Qn=()=>v.findIndex(h=>L===h&&!h.disabled),lt=h=>{let w;if(ae===ye){let{height:le,top:pe}=d.getBoundingClientRect(),oe=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;w=Math.min(Math.max(0,oe-pe),le)*100/le}else{let{width:le,left:pe}=d.getBoundingClientRect(),oe=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;w=Math.min(Math.max(0,oe-pe),le)*100/le}if((_e||z)&&(w=100-w),L=Fl(h.target,w),L&&Il(v,L),be&&v.length>1&&de!==void 0){let le=v[0],pe=v[v.length-1],oe=le.percent+de<0,Ne=pe.percent+de>100;if(oe||Ne)return;for(let nr=0;nr<v.length;nr++)Se(nr,v[nr].percent+de);return}let N=Qn();N!==-1&&(Se(N,w),L==null||L.$pointer.focus())},Gt=h=>{if(fe||document.activeElement!==c||L!=null&&L.disabled)return;h.stopPropagation(),h.preventDefault();let w=h.deltaY<0,N=_e||z,le=w?!N:N,pe=Qn();pe!==-1&&(le?Tt(pe,v[pe].percent):Rt(pe,v[pe].percent))},es=h=>{fe||Ae||(ae===ye?z?Se(h,100):Se(h,0):_e?Rt(h,v[h].percent):Tt(h,v[h].percent))},ts=h=>{fe||Ae||(ae===ye?z?Se(h,0):Se(h,100):_e?Tt(h,v[h].percent):Rt(h,v[h].percent))},rs=h=>{fe||Ae||(ae===ye?z?Rt(h,v[h].percent):Tt(h,v[h].percent):_e?Se(h,100):Se(h,0))},is=h=>{fe||Ae||(ae===ye?z?Tt(h,v[h].percent):Rt(h,v[h].percent):_e?Se(h,0):Se(h,100))},Hl=h=>h.classList.contains("panel"),Ul=h=>h.classList.contains("panel-fill"),Tt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w-=N,w<0&&(w=0),Se(h,w)},Rt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w+=N,w>100&&(w=100),Se(h,w)},ct=()=>{!T||T.update({percents:ns(),values:ss(),$pointers:os(),min:as(),max:ls(),data:ei(),step:Qr(),round:ri(),type:ti(),textMin:Jt(),textMax:Zt(),rightToLeft:si(),bottomToTop:oi(),pointersOverlap:ui(),pointersMinDistance:ii(),pointersMaxDistance:ni(),rangeDragging:hi(),disabled:ai(),keyboardDisabled:li(),mousewheelDisabled:ci()})},Yl=()=>{ct()},zl=h=>{if(!(Z||v.length<=1||K===D))if(h===0){let w=ce*100/(K-D);return Math.max(0,v[h+1].percent-w)}else{let w=X*100/(K-D);return Math.min(v[h-1].percent+w,100)}},Xl=h=>{if(!(Z||v.length<=1||K===D))if(h===v.length-1){let w=ce*100/(K-D);return Math.min(v[h-1].percent+w,100)}else{let w=X*100/(K-D);return Math.max(0,v[h+1].percent-w)}},Kt=h=>{let w;if(typeof re=="function"){let N=We(0,100,D,K,h);w=re(N,h)}else w=re;if($e(w)){let N=K-D;return w=N===0?0:w*100/N,w}},_t=h=>{if(h===void 0)return;let w=We(0,100,D,K,h);return H!==void 0?H[Math.round(w)]:at(w,De)},Jt=()=>H!==void 0?H[D]:D,Zt=()=>H!==void 0?H[K]:K,Qr=()=>re,Vl=h=>{var w;return h<=0||Z?Jt():(w=_t(v[h-1].percent))!=null?w:""},Wl=h=>{var w;return v.length<=1||h>=v.length-1||Z?Zt():(w=_t(v[h+1].percent))!=null?w:""},ns=()=>v.map(h=>h.percent),ss=()=>v.map(h=>_t(h.percent)),os=()=>v.map(h=>h.$pointer),as=()=>D,ls=()=>K,ei=()=>H,ti=()=>ae,ri=()=>De,ii=()=>X,ni=()=>ce,ql=h=>Jn[h],si=()=>_e,oi=()=>z,ai=()=>fe,li=()=>Ae,ci=()=>Oe,ui=()=>Z,hi=()=>be,Se=(h,w)=>{if(w===void 0)return;let N=Kt(w);N!==void 0&&(w=je(w,N));let le=v[h];if(!le)return;let pe=le.updatePosition(w,zl(h),Xl(h),ae,_e,z);Y==null||Y.updatePosition(ae,v.map(oe=>oe.percent),_e,z),ct();for(let oe of v){let Ne=_t(oe.percent);Ne!==void 0&&(oe.setAttr("aria-valuenow",Ne.toString()),oe.setAttr("aria-valuetext",Ne.toString()))}Kl(),pe&&ll(c,v.map(oe=>_t(oe.percent)))},Ue=()=>{for(let h=0;h<v.length;h++)Se(h,v[h].percent)},Gl=(h,w)=>{D=H!==void 0?0:te(h,Jr),K=H!==void 0?H.length-1:te(w,Lt),Qt(D),er(K)},Kl=()=>{var h,w;for(let N=0;N<v.length;N++){let le=v[N];le.setAttr("aria-valuemin",((h=Vl(N))!=null?h:"").toString()),le.setAttr("aria-valuemax",((w=Wl(N))!=null?w:"").toString())}},Qt=h=>{D=te(h,Jr),D>K&&(K=D+Lt),Ue()},er=h=>{K=te(h,Lt),K<D&&(K=D+Lt),Ue()},cs=h=>{Z=!0;for(let w=0;w<h.length;w++)tr(h[w],w);Z=!1;for(let w=0;w<h.length;w++)tr(h[w],w)},tr=(h,w)=>{let N;H!==void 0?(N=h==null?0:ul(h,H),N===-1&&(N=0)):(N=te(h,D),N<D&&(N=D),N>K&&(N=K));let le=We(D,K,0,100,N);Se(w,le)},rr=h=>{if(h==null){re=void 0;return}if(typeof h=="function"){re=h,Ue();return}if($e(h)){re=te(h,1);let w=Math.abs(K-D);re>w&&(re=void 0),Ue();return}re=void 0},di=h=>{Z=h,Ue()},fi=h=>{(!$e(h)||h<0)&&(h=0),X=h},pi=h=>{(!$e(h)||h<0)&&(h=1/0),ce=h},gi=h=>{fe=h,d.classList.toggle("disabled",fe),fe?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},us=h=>{Ae=h},hs=h=>{Oe=h,Oe?document.removeEventListener("wheel",Gt):document.addEventListener("wheel",Gt,{passive:!1})},vi=h=>{if(h==null){H=void 0;return}if(H=cl(h),H===void 0||H.length<=0){H=void 0;return}Qt(0),er(H.length-1),re===void 0&&rr(1)},mi=h=>{var w;typeof h=="string"?ae=h.trim().toLowerCase()===ye?ye:Me:ae=Me;let N=(w=c.shadowRoot)==null?void 0:w.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${ae}`,Ue();let le=ae===ye?"vertical":"horizontal";for(let pe of v)pe.setAttr("aria-orientation",le)},yi=h=>{_e=h,v.length>1&&Gn(v,_e,c),Ue(),ct()},bi=h=>{z=h,v.length>1&&Gn(v,z,c),Ue(),ct()},xi=h=>{De=te(h,wt),De<0&&(De=wt),ct()},ds=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(Qe=void 0,d.style.removeProperty(zn),d.classList.remove($t)):(Qe=h.toString(),d.style.setProperty(zn,Qe),d.classList.add($t))},fs=(h,w)=>{let N=v[h];!N||(N.setAttr("aria-label",w),Jn[h]=w)},ir=h=>{if(me=void 0,v.length<=1){be=!1,d.classList.remove(Vn);return}be=h,d.classList.toggle(Vn,be)},Jl=()=>{gi(he(c.getAttribute(g))),Ae=he(c.getAttribute($)),Oe=he(c.getAttribute(O));let h=Wt(c,/^pointer([0-9]*)-disabled$/,w=>he(w));for(let w of h){let N=w[0];!v[N]||(v[N].disabled=w[1])}},Zl=()=>{let h=Wt(c,/^aria-label([0-9]*)$/);for(let w of h){let N=w[0];fs(N,w[1])}},Ql=h=>{let w=v.length,N=v[w-1].$pointer,le=N.cloneNode(!0);N.after(le);let pe=Kr(c,le,w);return pe.setCallbacks(es,ts,rs,is),v.push(pe),tr(h,w),Ue(),ct(),w},ec=()=>{let h=v.length,w=v[h-1];return w?(w.destroy(),v.pop(),v.length<=1&&ir(!1),Ue(),ct(),h-1):-1};return(()=>{var h,w;for(let le of v)le.setCallbacks(es,ts,rs,is);let N=(h=c.shadowRoot)==null?void 0:h.querySelector(".panel-fill");N&&(Y=hl(N)),mi(c.getAttribute(I)),yi(he(c.getAttribute(J))),bi(he(c.getAttribute(f))),Gl(c.getAttribute(m),c.getAttribute(b)),rr(c.getAttribute(x)),vi(c.getAttribute(p)),cs(y.map(le=>le[1])),di(he(c.getAttribute(o))),fi(te(c.getAttribute(a),0)),pi(te(c.getAttribute(l),1/0)),ir(he(c.getAttribute(u))),xi(te(c.getAttribute(E),wt)),Jl(),Zl(),G=Cl(c,d,v),ds((w=c.getAttribute(ve))!=null?w:Kn),d.addEventListener("mousedown",Zn),d.addEventListener("mouseup",qt),d.addEventListener("touchmove",lt),d.addEventListener("touchstart",lt),Oe||document.addEventListener("wheel",Gt,{passive:!1}),T=Ll(c,Yl,{setValues:cs,setMin:Qt,setMax:er,setStep:rr,setPointersOverlap:di,setPointersMinDistance:fi,setPointersMaxDistance:pi,setDisabled:gi,setType:mi,setRightToLeft:yi,setBottomToTop:bi,setRound:xi,setKeyboardDisabled:us,setMousewheelDisabled:hs,setRangeDragging:ir,setData:vi},{getPercents:ns,getValues:ss,getPointerElements:os,getMin:as,getMax:ls,getStep:Qr,getData:ei,getType:ti,getRound:ri,getTextMin:Jt,getTextMax:Zt,isRightToLeft:si,isBottomToTop:oi,isDisabled:ai,isKeyboardDisabled:li,isMousewheelDisabled:ci,isPointersOverlap:ui,isRangeDraggingEnabled:hi,getPointersMinDistance:ii,getPointersMaxDistance:ni}),T.init()})(),{get pointers(){return v},get styles(){return G},get pluginsManager(){return T},get min(){return Jt()},get max(){return Zt()},get step(){return Qr()},get pointersOverlap(){return ui()},set pointersOverlap(h){di(h)},get pointersMinDistance(){return ii()},set pointersMinDistance(h){fi(h)},get pointersMaxDistance(){return ni()},set pointersMaxDistance(h){pi(h)},get disabled(){return ai()},set disabled(h){gi(h)},get data(){return ei()},get type(){return ti()},set type(h){mi(h)},get rightToLeft(){return si()},set rightToLeft(h){yi(h)},get bottomToTop(){return oi()},set bottomToTop(h){bi(h)},get round(){return ri()},set round(h){xi(h)},get animateOnClick(){return Qe},set animateOnClick(h){ds(h)},get keyboardDisabled(){return li()},set keyboardDisabled(h){us(h)},get mousewheelDisabled(){return ci()},set mousewheelDisabled(h){hs(h)},get rangeDragging(){return hi()},set rangeDragging(h){ir(h)},setMin:Qt,setMax:er,setValue:tr,setStep:rr,setData:vi,getTextValue:_t,setAriaLabel:fs,getAriaLabel:ql,addPointer:Ql,removePointer:ec,destroy:()=>{d.removeEventListener("mousedown",Zn),d.removeEventListener("mouseup",qt),d.removeEventListener("touchmove",lt),d.removeEventListener("touchstart",lt),document.removeEventListener("wheel",Gt);for(let h of v)h.destroy();T==null||T.destroy()}}},Nl=(c,d,y)=>{let v=Xn.find(([T,D,K,re])=>D.replace("#","")===d.replace(/\d+/g,""));if(v&&c.styles){let[T,D,K,re]=v,H=d.replace(/\D/g,"").trim(),ae=H===""||H==="0"||H==="1"?0:te(H,0)-1;c.styles.setStyle(T,y,ae);return}switch(c&&c.pluginsManager&&c.pluginsManager.onAttrChange(d,y),d){case m:{c.setMin(y);break}case b:{c.setMax(y);break}case x:{c.setStep(y);break}case o:{c.pointersOverlap=he(y);break}case a:{c.pointersMinDistance=te(y,0);break}case u:{c.rangeDragging=he(y);break}case l:{c.pointersMaxDistance=te(y,1/0);break}case g:{c.disabled=he(y);break}case $:{c.keyboardDisabled=he(y);break}case O:{c.mousewheelDisabled=he(y);break}case p:{c.setData(y);break}case I:{c.type=y;break}case J:{c.rightToLeft=he(y);break}case f:{c.bottomToTop=he(y);break}case E:{c.round=te(y,wt);break}case q:{c.styles&&(c.styles.theme=y);break}case ve:{c.animateOnClick=y;break}}let L=null;if(/^value([0-9]*)$/.test(d)&&(L="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(L="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(L="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(L="pointer-shape"),!L)return;let Y=d.replace(/\D/g,"").trim(),G=Y===""||Y==="0"||Y==="1"?0:te(Y,0)-1;switch(L){case"value":{c.setValue(y,G);break}case"pointer-disabled":{let T=c==null?void 0:c.pointers[G];if(!T)return;T.disabled=he(y);break}case"aria-label":{c.setAriaLabel(G,y);break}case"pointer-shape":{c.styles&&c.styles.setPointerShape(G,y);break}}},Bl=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(c){this.slider&&this.slider.setStep(c)}get step(){var c;return(c=this.slider)==null?void 0:c.step}set disabled(c){this.slider&&(this.slider.disabled=c)}get disabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.disabled)!=null?d:!1}set data(c){var d;(d=this.slider)==null||d.setData(c)}get data(){var c;return(c=this.slider)==null?void 0:c.data}set min(c){var d;(d=this.slider)==null||d.setMin(c)}get min(){var c;return(c=this.slider)==null?void 0:c.min}set max(c){var d;(d=this.slider)==null||d.setMax(c)}get max(){var c;return(c=this.slider)==null?void 0:c.max}set round(c){!this.slider||(this.slider.round=c)}get round(){var c,d;return(d=(c=this.slider)==null?void 0:c.round)!=null?d:wt}set type(c){!this.slider||(this.slider.type=c??Me)}get type(){var c;return((c=this.slider)==null?void 0:c.type)||Me}set pointersOverlap(c){!this.slider||(this.slider.pointersOverlap=c)}get pointersOverlap(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersOverlap)!=null?d:!1}set pointersMinDistance(c){!this.slider||(this.slider.pointersMinDistance=c)}get pointersMinDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMinDistance)!=null?d:0}set pointersMaxDistance(c){!this.slider||(this.slider.pointersMaxDistance=c)}get pointersMaxDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMaxDistance)!=null?d:1/0}set theme(c){!this.slider||!this.slider.styles||(this.slider.styles.theme=c)}get theme(){var c,d,y;return(y=(d=(c=this.slider)==null?void 0:c.styles)==null?void 0:d.theme)!=null?y:null}set rtl(c){!this.slider||(this.slider.rightToLeft=c)}get rtl(){var c,d;return(d=(c=this.slider)==null?void 0:c.rightToLeft)!=null?d:!1}set btt(c){!this.slider||(this.slider.bottomToTop=c)}get btt(){var c,d;return(d=(c=this.slider)==null?void 0:c.bottomToTop)!=null?d:!1}set keyboardDisabled(c){!this.slider||(this.slider.keyboardDisabled=c)}get keyboardDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(c){!this.slider||(this.slider.mousewheelDisabled=c)}get mousewheelDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.mousewheelDisabled)!=null?d:!1}set animateOnClick(c){!this.slider||(this.slider.animateOnClick=c)}get animateOnClick(){var c;return(c=this.slider)==null?void 0:c.animateOnClick}get rangeDragging(){var c,d;return(d=(c=this.slider)==null?void 0:c.rangeDragging)!=null?d:!1}set rangeDragging(c){this.slider&&(this.slider.rangeDragging=he(c))}get externalCSSList(){return this._externalCSSList}addPointer(c){var d,y;if(!this.slider)return;let v=(y=(d=this.slider)==null?void 0:d.addPointer(c))!=null?y:0;qn(this,this.slider,v,`value${v+1}`,`ariaLabel${v+1}`,`pointerShape${v+1}`,`pointer${v+1}Disabled`)}removePointer(){var c;!this.slider||(c=this.slider)==null||c.removePointer()}addCSS(c){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=c,this.shadowRoot.appendChild(d)}connectedCallback(){var c,d;if(!this.shadowRoot)return;this._externalCSSList=kl(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let y=(c=this.shadowRoot)==null?void 0:c.querySelector(".pointer");if(!y)return;let v=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!v)return;let L=Rl(this,y);this.slider=jl(this,v,L),Dl(this,this.slider),this._observer=new MutationObserver(Y=>{Y.forEach(G=>{var T;if(!this.slider||G.type!=="attributes")return;let D=G.attributeName;!D||Nl(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()}},Zr=Bl;window.tcRangeSlider=Zr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Zr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Zr{})})();var gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $r(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function wr(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var Ji={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(gt,function(){var t=1e3,i=6e4,n=36e5,s="millisecond",o="second",a="minute",l="hour",u="day",p="week",m="month",b="quarter",x="year",E="date",I="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var P=["th","st","nd","rd"],A=S%100;return"["+S+(P[(A-20)%10]||P[A]||P[0])+"]"}},g=function(S,P,A){var j=String(S);return!j||j.length>=P?S:""+Array(P+1-j.length).join(A)+S},$={s:g,z:function(S){var P=-S.utcOffset(),A=Math.abs(P),j=Math.floor(A/60),k=A%60;return(P<=0?"+":"-")+g(j,2,"0")+":"+g(k,2,"0")},m:function S(P,A){if(P.date()<A.date())return-S(A,P);var j=12*(A.year()-P.year())+(A.month()-P.month()),k=P.clone().add(j,m),W=A-k<0,U=P.clone().add(j+(W?-1:1),m);return+(-(j+(A-k)/(W?k-U:U-k))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:m,y:x,w:p,d:u,D:E,h:l,m:a,s:o,ms:s,Q:b}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},O="en",_={};_[O]=f;var M="$isDayjsObject",C=function(S){return S instanceof Q||!(!S||!S[M])},B=function S(P,A,j){var k;if(!P)return O;if(typeof P=="string"){var W=P.toLowerCase();_[W]&&(k=W),A&&(_[W]=A,k=W);var U=P.split("-");if(!k&&U.length>1)return S(U[0])}else{var ie=P.name;_[ie]=P,k=ie}return!j&&k&&(O=k),k||!j&&O},F=function(S,P){if(C(S))return S.clone();var A=typeof P=="object"?P:{};return A.date=S,A.args=arguments,new Q(A)},R=$;R.l=B,R.i=C,R.w=function(S,P){return F(S,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var Q=function(){function S(A){this.$L=B(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[M]=!0}var P=S.prototype;return P.parse=function(A){this.$d=function(j){var k=j.date,W=j.utc;if(k===null)return new Date(NaN);if(R.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var U=k.match(q);if(U){var ie=U[2]-1||0,ee=(U[7]||"0").substring(0,3);return W?new Date(Date.UTC(U[1],ie,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ee)):new Date(U[1],ie,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ee)}}return new Date(k)}(A),this.init()},P.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},P.$utils=function(){return R},P.isValid=function(){return this.$d.toString()!==I},P.isSame=function(A,j){var k=F(A);return this.startOf(j)<=k&&k<=this.endOf(j)},P.isAfter=function(A,j){return F(A)<this.startOf(j)},P.isBefore=function(A,j){return this.endOf(j)<F(A)},P.$g=function(A,j,k){return R.u(A)?this[j]:this.set(k,A)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(A,j){var k=this,W=!!R.u(j)||j,U=R.p(A),ie=function($e,te){var je=R.w(k.$u?Date.UTC(k.$y,te,$e):new Date(k.$y,te,$e),k);return W?je:je.endOf(u)},ee=function($e,te){return R.w(k.toDate()[$e].apply(k.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(te)),k)},ge=this.$W,ve=this.$M,Ee=this.$D,ye="set"+(this.$u?"UTC":"");switch(U){case x:return W?ie(1,0):ie(31,11);case m:return W?ie(1,ve):ie(0,ve+1);case p:var Me=this.$locale().weekStart||0,We=(ge<Me?ge+7:ge)-Me;return ie(W?Ee-We:Ee+(6-We),ve);case u:case E:return ee(ye+"Hours",0);case l:return ee(ye+"Minutes",1);case a:return ee(ye+"Seconds",2);case o:return ee(ye+"Milliseconds",3);default:return this.clone()}},P.endOf=function(A){return this.startOf(A,!1)},P.$set=function(A,j){var k,W=R.p(A),U="set"+(this.$u?"UTC":""),ie=(k={},k[u]=U+"Date",k[E]=U+"Date",k[m]=U+"Month",k[x]=U+"FullYear",k[l]=U+"Hours",k[a]=U+"Minutes",k[o]=U+"Seconds",k[s]=U+"Milliseconds",k)[W],ee=W===u?this.$D+(j-this.$W):j;if(W===m||W===x){var ge=this.clone().set(E,1);ge.$d[ie](ee),ge.init(),this.$d=ge.set(E,Math.min(this.$D,ge.daysInMonth())).$d}else ie&&this.$d[ie](ee);return this.init(),this},P.set=function(A,j){return this.clone().$set(A,j)},P.get=function(A){return this[R.p(A)]()},P.add=function(A,j){var k,W=this;A=Number(A);var U=R.p(j),ie=function(ve){var Ee=F(W);return R.w(Ee.date(Ee.date()+Math.round(ve*A)),W)};if(U===m)return this.set(m,this.$M+A);if(U===x)return this.set(x,this.$y+A);if(U===u)return ie(1);if(U===p)return ie(7);var ee=(k={},k[a]=i,k[l]=n,k[o]=t,k)[U]||1,ge=this.$d.getTime()+A*ee;return R.w(ge,this)},P.subtract=function(A,j){return this.add(-1*A,j)},P.format=function(A){var j=this,k=this.$locale();if(!this.isValid())return k.invalidDate||I;var W=A||"YYYY-MM-DDTHH:mm:ssZ",U=R.z(this),ie=this.$H,ee=this.$m,ge=this.$M,ve=k.weekdays,Ee=k.months,ye=k.meridiem,Me=function(te,je,at,he){return te&&(te[je]||te(j,W))||at[je].slice(0,he)},We=function(te){return R.s(ie%12||12,te,"0")},$e=ye||function(te,je,at){var he=te<12?"AM":"PM";return at?he.toLowerCase():he};return W.replace(J,function(te,je){return je||function(at){switch(at){case"YY":return String(j.$y).slice(-2);case"YYYY":return R.s(j.$y,4,"0");case"M":return ge+1;case"MM":return R.s(ge+1,2,"0");case"MMM":return Me(k.monthsShort,ge,Ee,3);case"MMMM":return Me(Ee,ge);case"D":return j.$D;case"DD":return R.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return Me(k.weekdaysMin,j.$W,ve,2);case"ddd":return Me(k.weekdaysShort,j.$W,ve,3);case"dddd":return ve[j.$W];case"H":return String(ie);case"HH":return R.s(ie,2,"0");case"h":return We(1);case"hh":return We(2);case"a":return $e(ie,ee,!0);case"A":return $e(ie,ee,!1);case"m":return String(ee);case"mm":return R.s(ee,2,"0");case"s":return String(j.$s);case"ss":return R.s(j.$s,2,"0");case"SSS":return R.s(j.$ms,3,"0");case"Z":return U}return null}(te)||U.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(A,j,k){var W,U=this,ie=R.p(j),ee=F(A),ge=(ee.utcOffset()-this.utcOffset())*i,ve=this-ee,Ee=function(){return R.m(U,ee)};switch(ie){case x:W=Ee()/12;break;case m:W=Ee();break;case b:W=Ee()/3;break;case p:W=(ve-ge)/6048e5;break;case u:W=(ve-ge)/864e5;break;case l:W=ve/n;break;case a:W=ve/i;break;case o:W=ve/t;break;default:W=ve}return k?W:R.a(W)},P.daysInMonth=function(){return this.endOf(m).$D},P.$locale=function(){return _[this.$L]},P.locale=function(A,j){if(!A)return this.$L;var k=this.clone(),W=B(A,j,!0);return W&&(k.$L=W),k},P.clone=function(){return R.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},S}(),ne=Q.prototype;return F.prototype=ne,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",u],["$M",m],["$y",x],["$D",E]].forEach(function(S){ne[S[1]]=function(P){return this.$g(P,S[0],S[1])}}),F.extend=function(S,P){return S.$i||(S(P,Q,F),S.$i=!0),F},F.locale=B,F.isDayjs=C,F.unix=function(S){return F(1e3*S)},F.en=_[O],F.Ls=_,F.p={},F})})(Ji);var Ls=Ji.exports;const Bt=$r(Ls);class Ts extends Le{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,t){this._startExpression=e,this._endExpression=t;const i=this.escapeRegex(this._startExpression),n=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${i}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${n}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,t,i){if(!this.hasTemplate(e))return null;i=i||e;const n=ue` <slot name=${i}></slot> `,s={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:a}=this._renderedTemplates[i];this.contains(a)&&this.removeChild(a)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let t=0;t<this.children.length;t++){const i=this.children[t];if(i.nodeName==="RENDER-TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=t}}return e}_renderTemplate(e,t,i){let n;if(t&&t.childNodes.length){const s=t.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,t){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),t);return s?typeof s=="object"?JSON.stringify(s):s.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,t){t={...t};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(t)}catch{}return n}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,t,i){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,i),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=i,e;for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n];this.renderNode(s,t,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const Zi=`
|
|
64
64
|
:host {
|
|
65
65
|
display: flex;
|
|
66
66
|
box-sizing: border-box;
|
|
@@ -81,7 +81,7 @@ form#itemfilter {
|
|
|
81
81
|
details {
|
|
82
82
|
width: 100%;
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`,Qi=`
|
|
85
85
|
* {
|
|
86
86
|
font-family: Roboto, sans-serif;
|
|
87
87
|
}
|
|
@@ -94,6 +94,7 @@ button {
|
|
|
94
94
|
--error-color: #FF5252;
|
|
95
95
|
|
|
96
96
|
display: inline-flex;
|
|
97
|
+
position: relative;
|
|
97
98
|
align-items: center;
|
|
98
99
|
color: #fff;
|
|
99
100
|
border-width: 0;
|
|
@@ -113,7 +114,7 @@ button {
|
|
|
113
114
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
button:hover {
|
|
117
|
+
button:hover:not([disabled]):not(.icon) {
|
|
117
118
|
box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
|
|
118
119
|
background: var(--primary-color-hover);
|
|
119
120
|
}
|
|
@@ -122,6 +123,10 @@ button, button:active {
|
|
|
122
123
|
background: var(--primary-color);
|
|
123
124
|
}
|
|
124
125
|
|
|
126
|
+
button[disabled] {
|
|
127
|
+
opacity: 0.5;
|
|
128
|
+
}
|
|
129
|
+
|
|
125
130
|
button.outline {
|
|
126
131
|
background: transparent;
|
|
127
132
|
box-shadow: none;
|
|
@@ -140,6 +145,8 @@ button.icon {
|
|
|
140
145
|
padding: 0;
|
|
141
146
|
border-radius: 50%;
|
|
142
147
|
width: 24px;
|
|
148
|
+
height: 24px;
|
|
149
|
+
text-indent: -9999px;
|
|
143
150
|
}
|
|
144
151
|
|
|
145
152
|
button.icon-text {
|
|
@@ -454,16 +461,16 @@ eox-itemfilter-range {
|
|
|
454
461
|
.range-after {
|
|
455
462
|
margin-left: .5rem;
|
|
456
463
|
}
|
|
457
|
-
`;var
|
|
464
|
+
`;var Rs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,_r=(r,e,t,i)=>{for(var n=i>1?void 0:i?Ds(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Rs(e,t,n),n};let Ft=class extends Le{handleDetailsToggle(r){this.dispatchEvent(new CustomEvent("details-toggled",{detail:r,bubbles:!0,composed:!0}))}render(){return ue`
|
|
458
465
|
<style>
|
|
459
|
-
${
|
|
460
|
-
${!this.unstyled&&
|
|
466
|
+
${Zi}
|
|
467
|
+
${!this.unstyled&&Qi}
|
|
461
468
|
</style>
|
|
462
469
|
<details
|
|
463
470
|
@toggle="${this.handleDetailsToggle}"
|
|
464
471
|
class="details-filter"
|
|
465
472
|
part="details-filter"
|
|
466
|
-
open=${this.filterObject.expanded||
|
|
473
|
+
open=${this.filterObject.expanded||se}
|
|
467
474
|
>
|
|
468
475
|
<summary>
|
|
469
476
|
<span
|
|
@@ -477,10 +484,10 @@ eox-itemfilter-range {
|
|
|
477
484
|
<slot name="filter"></slot>
|
|
478
485
|
</div>
|
|
479
486
|
</details>
|
|
480
|
-
`}};_r([
|
|
487
|
+
`}};_r([Pe({attribute:!1})],Ft.prototype,"filterObject",2),_r([Pe()],Ft.prototype,"unstyled",2),Ft=_r([Ge("eox-itemfilter-expandcontainer")],Ft);var Is=Object.defineProperty,js=Object.getOwnPropertyDescriptor,en=(r,e,t,i)=>{for(var n=i>1?void 0:i?js(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Is(e,t,n),n};let Er=class extends Le{reset(){this.renderRoot.querySelectorAll("input[type='checkbox']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return ue`
|
|
481
488
|
<ul>
|
|
482
|
-
${
|
|
483
|
-
<li class=${this.filterObject.state[r]?"highlighted":
|
|
489
|
+
${pt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>ue`
|
|
490
|
+
<li class=${this.filterObject.state[r]?"highlighted":se}>
|
|
484
491
|
<label>
|
|
485
492
|
<input
|
|
486
493
|
data-cy="multiselect-checkbox"
|
|
@@ -488,7 +495,7 @@ eox-itemfilter-range {
|
|
|
488
495
|
type="checkbox"
|
|
489
496
|
class="multiselect-checkbox"
|
|
490
497
|
id=${r}
|
|
491
|
-
checked="${this.filterObject.state[r]||
|
|
498
|
+
checked="${this.filterObject.state[r]||se}"
|
|
492
499
|
@click=${()=>{this.filterObject.state[r]=!this.filterObject.state[r],this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()}}
|
|
493
500
|
/>
|
|
494
501
|
<span class="title">${r}</span>
|
|
@@ -496,7 +503,7 @@ eox-itemfilter-range {
|
|
|
496
503
|
</li>
|
|
497
504
|
`)}
|
|
498
505
|
</ul>
|
|
499
|
-
`}};
|
|
506
|
+
`}};en([Pe()],Er.prototype,"filterObject",2),Er=en([Ge("eox-itemfilter-multiselect")],Er);var Ns="Expected a function",tn=0/0,Bs="[object Symbol]",Fs=/^\s+|\s+$/g,Hs=/^[-+]0x[0-9a-f]+$/i,Us=/^0b[01]+$/i,Ys=/^0o[0-7]+$/i,zs=parseInt,Xs=typeof gt=="object"&>&>.Object===Object&>,Vs=typeof self=="object"&&self&&self.Object===Object&&self,Ws=Xs||Vs||Function("return this")(),qs=Object.prototype,Gs=qs.toString,Ks=Math.max,Js=Math.min,Mr=function(){return Ws.Date.now()};function Zs(r,e,t){var i,n,s,o,a,l,u=0,p=!1,m=!1,b=!0;if(typeof r!="function")throw new TypeError(Ns);e=rn(e)||0,Ar(t)&&(p=!!t.leading,m="maxWait"in t,s=m?Ks(rn(t.maxWait)||0,e):s,b="trailing"in t?!!t.trailing:b);function x(_){var M=i,C=n;return i=n=void 0,u=_,o=r.apply(C,M),o}function E(_){return u=_,a=setTimeout(J,e),p?x(_):o}function I(_){var M=_-l,C=_-u,B=e-M;return m?Js(B,s-C):B}function q(_){var M=_-l,C=_-u;return l===void 0||M>=e||M<0||m&&C>=s}function J(){var _=Mr();if(q(_))return f(_);a=setTimeout(J,I(_))}function f(_){return a=void 0,b&&i?x(_):(i=n=void 0,o)}function g(){a!==void 0&&clearTimeout(a),u=0,i=l=n=a=void 0}function $(){return a===void 0?o:f(Mr())}function O(){var _=Mr(),M=q(_);if(i=arguments,n=this,l=_,M){if(a===void 0)return E(l);if(m)return a=setTimeout(J,e),x(l)}return a===void 0&&(a=setTimeout(J,e)),o}return O.cancel=g,O.flush=$,O}function Ar(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function Qs(r){return!!r&&typeof r=="object"}function eo(r){return typeof r=="symbol"||Qs(r)&&Gs.call(r)==Bs}function rn(r){if(typeof r=="number")return r;if(eo(r))return tn;if(Ar(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Ar(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(Fs,"");var t=Us.test(r);return t||Ys.test(r)?zs(r.slice(2),t?2:8):Hs.test(r)?tn:+r}var to=Zs;const nn=$r(to);var ro=Object.defineProperty,io=Object.getOwnPropertyDescriptor,sn=(r,e,t,i)=>{for(var n=i>1?void 0:i?io(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&ro(e,t,n),n};let Or=class extends Le{constructor(){super(...arguments),this.inputHandler=r=>{const[e,t]=r.detail.values;(e!==this.filterObject.state.min||t!=this.filterObject.state.max)&&([this.filterObject.state.min,this.filterObject.state.max]=[e,t],this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()},this.debouncedInputHandler=nn(this.inputHandler,0,{leading:!0})}reset(){this.filterObject.state.min=this.filterObject.min,this.filterObject.state.max=this.filterObject.max,delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return ue`
|
|
500
507
|
<div class="range-before">
|
|
501
508
|
${this.filterObject.format==="date"?Bt.unix(this.filterObject.state.min):this.filterObject.state.min}
|
|
502
509
|
</div>
|
|
@@ -511,17 +518,17 @@ eox-itemfilter-range {
|
|
|
511
518
|
<div class="range-after">
|
|
512
519
|
${this.filterObject.format==="date"?Bt.unix(this.filterObject.state.max):this.filterObject.state.max}
|
|
513
520
|
</div>
|
|
514
|
-
`}};
|
|
521
|
+
`}};sn([Pe()],Or.prototype,"filterObject",2),Or=sn([Ge("eox-itemfilter-range")],Or);var no=Object.defineProperty,so=Object.getOwnPropertyDescriptor,on=(r,e,t,i)=>{for(var n=i>1?void 0:i?so(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&no(e,t,n),n};let Sr=class extends Le{reset(){this.renderRoot.querySelectorAll("input[type='radio']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return ue`
|
|
515
522
|
<ul>
|
|
516
|
-
${
|
|
517
|
-
<li class=${this.filterObject.state[r]?"highlighted":
|
|
523
|
+
${pt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>ue`
|
|
524
|
+
<li class=${this.filterObject.state[r]?"highlighted":se}>
|
|
518
525
|
<label>
|
|
519
526
|
<input
|
|
520
527
|
name="selection"
|
|
521
528
|
type="radio"
|
|
522
529
|
class="select-radio"
|
|
523
530
|
id=${r}
|
|
524
|
-
checked="${this.filterObject.state[r]||
|
|
531
|
+
checked="${this.filterObject.state[r]||se}"
|
|
525
532
|
@click=${()=>{for(const e in this.filterObject.state)this.filterObject.state[e]=e===r;this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()}}
|
|
526
533
|
/>
|
|
527
534
|
<span class="title">${r}</span>
|
|
@@ -529,18 +536,19 @@ eox-itemfilter-range {
|
|
|
529
536
|
</li>
|
|
530
537
|
`)}
|
|
531
538
|
</ul>
|
|
532
|
-
`}};
|
|
539
|
+
`}};on([Pe()],Sr.prototype,"filterObject",2),Sr=on([Ge("eox-itemfilter-select")],Sr);/**
|
|
533
540
|
* @license
|
|
534
541
|
* Copyright 2020 Google LLC
|
|
535
542
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
536
|
-
*/const no=vr(class extends mr{constructor(r){if(super(r),r.type!==Ge.PROPERTY&&r.type!==Ge.ATTRIBUTE&&r.type!==Ge.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Es(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===Se||e===ne)return e;const t=r.element,i=r.name;if(r.type===Ge.PROPERTY){if(e===t[i])return Se}else if(r.type===Ge.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return Se}else if(r.type===Ge.ATTRIBUTE&&t.getAttribute(i)===e+"")return Se;return Xi(r),e}});var $e=63710088e-1,Pr={centimeters:$e*100,centimetres:$e*100,degrees:$e/111325,feet:$e*3.28084,inches:$e*39.37,kilometers:$e/1e3,kilometres:$e/1e3,meters:$e,metres:$e,miles:$e/1609.344,millimeters:$e*1e3,millimetres:$e*1e3,nauticalmiles:$e/1852,radians:1,yards:$e*1.0936},so={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/$e,yards:1.0936133},Cr={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Ce(r,e,t){t===void 0&&(t={});var i={type:"Feature"};return(t.id===0||t.id)&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.properties=e||{},i.geometry=r,i}function oo(r,e,t){switch(r){case"Point":return Ne(e).geometry;case"LineString":return Re(e).geometry;case"Polygon":return kr(e).geometry;case"MultiPoint":return on(e).geometry;case"MultiLineString":return Lr(e).geometry;case"MultiPolygon":return an(e).geometry;default:throw new Error(r+" is invalid")}}function Ne(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ht(r[0])||!Ht(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Ce(i,e,t)}function ao(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return Ne(i,e)}),t)}function kr(r,e,t){t===void 0&&(t={});for(var i=0,n=r;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:r};return Ce(l,e,t)}function lo(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return kr(i,e)}),t)}function Re(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:r};return Ce(i,e,t)}function co(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return Re(i,e)}),t)}function Ke(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function Lr(r,e,t){t===void 0&&(t={});var i={type:"MultiLineString",coordinates:r};return Ce(i,e,t)}function on(r,e,t){t===void 0&&(t={});var i={type:"MultiPoint",coordinates:r};return Ce(i,e,t)}function an(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return Ce(i,e,t)}function uo(r,e,t){t===void 0&&(t={});var i={type:"GeometryCollection",geometries:r};return Ce(i,e,t)}function ho(r,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var t=Math.pow(10,e||0);return Math.round(r*t)/t}function ln(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Tr(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r/t}function fo(r,e){return cn(Tr(r,e))}function po(r){var e=r%360;return e<0&&(e+=360),e}function cn(r){var e=r%(2*Math.PI);return e*180/Math.PI}function go(r){var e=r%360;return e*Math.PI/180}function vo(r,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("length must be a positive number");return ln(Tr(r,e),t)}function mo(r,e,t){if(e===void 0&&(e="meters"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("area must be a positive number");var i=Cr[e];if(!i)throw new Error("invalid original units");var n=Cr[t];if(!n)throw new Error("invalid final units");return r/i*n}function Ht(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Rr(r){return!!r&&r.constructor===Object}function yo(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(e){if(!Ht(e))throw new Error("bbox must only contain numbers")})}function bo(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}const xo=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:Cr,bearingToAzimuth:po,convertArea:mo,convertLength:vo,degreesToRadians:go,earthRadius:$e,factors:Pr,feature:Ce,featureCollection:Ke,geometry:oo,geometryCollection:uo,isNumber:Ht,isObject:Rr,lengthToDegrees:fo,lengthToRadians:Tr,lineString:Re,lineStrings:co,multiLineString:Lr,multiPoint:on,multiPolygon:an,point:Ne,points:ao,polygon:kr,polygons:lo,radiansToDegrees:cn,radiansToLength:ln,round:ho,unitsFactors:so,validateBBox:yo,validateId:bo},Symbol.toStringTag,{value:"Module"}));function un(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function pt(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function gt(r){return r.type==="Feature"?r.geometry:r}function ke(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=un(r),n=gt(e),s=n.type,o=e.bbox,l=n.coordinates;if(o&&$o(i,o)===!1)return!1;s==="Polygon"&&(l=[l]);for(var a=!1,u=0;u<l.length&&!a;u++)if(hn(i,l[u][0],t.ignoreBoundary)){for(var p=!1,v=1;v<l[u].length&&!p;)hn(i,l[u][v],!t.ignoreBoundary)&&(p=!0),v++;p||(a=!0)}return a}function hn(r,e,t){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],l=e[n][1],a=e[s][0],u=e[s][1],p=r[1]*(o-a)+l*(a-r[0])+u*(r[0]-o)===0&&(o-r[0])*(a-r[0])<=0&&(l-r[1])*(u-r[1])<=0;if(p)return!t;var v=l>r[1]!=u>r[1]&&r[0]<(a-o)*(r[1]-l)/(u-l)+o;v&&(i=!i)}return i}function $o(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function vt(r,e,t){if(r!==null)for(var i,n,s,o,l,a,u,p=0,v=0,y,x=r.type,M=x==="FeatureCollection",j=x==="Feature",q=M?r.features.length:1,J=0;J<q;J++){u=M?r.features[J].geometry:j?r.geometry:r,y=u?u.type==="GeometryCollection":!1,l=y?u.geometries.length:1;for(var f=0;f<l;f++){var g=0,$=0;if(o=y?u.geometries[f]:u,o!==null){a=o.coordinates;var S=o.type;switch(p=t&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(e(a,v,J,g,$)===!1)return!1;v++,g++;break;case"LineString":case"MultiPoint":for(i=0;i<a.length;i++){if(e(a[i],v,J,g,$)===!1)return!1;v++,S==="MultiPoint"&&g++}S==="LineString"&&g++;break;case"Polygon":case"MultiLineString":for(i=0;i<a.length;i++){for(n=0;n<a[i].length-p;n++){if(e(a[i][n],v,J,g,$)===!1)return!1;v++}S==="MultiLineString"&&g++,S==="Polygon"&&$++}S==="Polygon"&&g++;break;case"MultiPolygon":for(i=0;i<a.length;i++){for($=0,n=0;n<a[i].length;n++){for(s=0;s<a[i][n].length-p;s++){if(e(a[i][n][s],v,J,g,$)===!1)return!1;v++}$++}g++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(vt(o.geometries[i],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function wo(r,e,t,i){var n=t;return vt(r,function(s,o,l,a,u){o===0&&t===void 0?n=s:n=e(n,s,o,l,a,u)},i),n}function dn(r,e){var t;switch(r.type){case"FeatureCollection":for(t=0;t<r.features.length&&e(r.features[t].properties,t)!==!1;t++);break;case"Feature":e(r.properties,0);break}}function _o(r,e,t){var i=t;return dn(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Ut(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function Eo(r,e,t){var i=t;return Ut(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Mo(r){var e=[];return vt(r,function(t){e.push(t)}),e}function Dr(r,e){var t,i,n,s,o,l,a,u,p,v,y=0,x=r.type==="FeatureCollection",M=r.type==="Feature",j=x?r.features.length:1;for(t=0;t<j;t++){for(l=x?r.features[t].geometry:M?r.geometry:r,u=x?r.features[t].properties:M?r.properties:{},p=x?r.features[t].bbox:M?r.bbox:void 0,v=x?r.features[t].id:M?r.id:void 0,a=l?l.type==="GeometryCollection":!1,o=a?l.geometries.length:1,n=0;n<o;n++){if(s=a?l.geometries[n]:l,s===null){if(e(null,y,u,p,v)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,y,u,p,v)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],y,u,p,v)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}function Ao(r,e,t){var i=t;return Dr(r,function(n,s,o,l,a){s===0&&t===void 0?i=n:i=e(i,n,s,o,l,a)}),i}function ze(r,e){Dr(r,function(t,i,n,s,o){var l=t===null?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return e(Ce(t,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var p=t.coordinates[u],v={type:a,coordinates:p};if(e(Ce(v,n),i,u)===!1)return!1}})}function Oo(r,e,t){var i=t;return ze(r,function(n,s,o){s===0&&o===0&&t===void 0?i=n:i=e(i,n,s,o)}),i}function fn(r,e){ze(r,function(t,i,n){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var l,a=0,u=0,p=0;if(vt(t,function(v,y,x,M,j){if(l===void 0||i>a||M>u||j>p){l=v,a=i,u=M,p=j,s=0;return}var q=Re([l,v],t.properties);if(e(q,i,n,j,s)===!1)return!1;s++,l=v})===!1)return!1}}})}function So(r,e,t){var i=t,n=!1;return fn(r,function(s,o,l,a,u){n===!1&&t===void 0?i=s:i=e(i,s,o,l,a,u),n=!0}),i}function pn(r,e){if(!r)throw new Error("geojson is required");ze(r,function(t,i,n){if(t.geometry!==null){var s=t.geometry.type,o=t.geometry.coordinates;switch(s){case"LineString":if(e(t,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<o.length;l++)if(e(Re(o[l],t.properties),i,n,l)===!1)return!1;break}}})}function Po(r,e,t){var i=t;return pn(r,function(n,s,o,l){s===0&&t===void 0?i=n:i=e(i,n,s,o,l)}),i}function Co(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,l;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,l=r.features[t].geometry;break;case"Feature":o=o||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),Re([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),Re([a[n][s],a[n][s+1]],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s-1),Re([a[i][s],a[i][s+1]],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s-1),Re([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function ko(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,l;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,l=r.features[t].geometry;break;case"Feature":o=o||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":return Ne(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Ne(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Ne(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Ne(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Ne(a[i][s],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s),Ne(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const Lo=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Mo,coordEach:vt,coordReduce:wo,featureEach:Ut,featureReduce:Eo,findPoint:ko,findSegment:Co,flattenEach:ze,flattenReduce:Oo,geomEach:Dr,geomReduce:Ao,lineEach:pn,lineReduce:Po,propEach:dn,propReduce:_o,segmentEach:fn,segmentReduce:So},Symbol.toStringTag,{value:"Module"}));function gn(r){if(!r)throw new Error("geojson is required");var e=[];return ze(r,function(t){To(t,e)}),Ke(e)}function To(r,e){var t=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":t=pt(i);break;case"LineString":t=[pt(i)]}t.forEach(function(n){var s=Ro(n,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function Ro(r,e){var t=[];return r.reduce(function(i,n){var s=Re([i,n],e);return s.bbox=Do(i,n),t.push(s),n}),t}function Do(r,e){var t=r[0],i=r[1],n=e[0],s=e[1],o=t<n?t:n,l=i<s?i:s,a=t>n?t:n,u=i>s?i:s;return[o,l,a,u]}var Ir={exports:{}},vn={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ft,function(){function t(f,g,$,S,E){(function A(C,L,I,W,re){for(;W>I;){if(W-I>600){var k=W-I+1,_=L-I+1,O=Math.log(k),B=.5*Math.exp(2*O/3),P=.5*Math.sqrt(O*B*(k-B)/k)*(_-k/2<0?-1:1),H=Math.max(I,Math.floor(L-_*B/k+P)),V=Math.min(W,Math.floor(L+(k-_)*B/k+P));A(C,L,H,V,re)}var ee=C[L],le=I,Z=W;for(i(C,I,L),re(C[W],ee)>0&&i(C,I,W);le<Z;){for(i(C,le,Z),le++,Z--;re(C[le],ee)<0;)le++;for(;re(C[Z],ee)>0;)Z--}re(C[I],ee)===0?i(C,I,Z):i(C,++Z,W),Z<=L&&(I=Z+1),L<=Z&&(W=Z-1)}})(f,g,$||0,S||f.length-1,E||n)}function i(f,g,$){var S=f[g];f[g]=f[$],f[$]=S}function n(f,g){return f<g?-1:f>g?1:0}var s=function(f){f===void 0&&(f=9),this._maxEntries=Math.max(4,f),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(f,g,$){if(!$)return g.indexOf(f);for(var S=0;S<g.length;S++)if($(f,g[S]))return S;return-1}function l(f,g){a(f,0,f.children.length,g,f)}function a(f,g,$,S,E){E||(E=q(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var A=g;A<$;A++){var C=f.children[A];u(E,f.leaf?S(C):C)}return E}function u(f,g){return f.minX=Math.min(f.minX,g.minX),f.minY=Math.min(f.minY,g.minY),f.maxX=Math.max(f.maxX,g.maxX),f.maxY=Math.max(f.maxY,g.maxY),f}function p(f,g){return f.minX-g.minX}function v(f,g){return f.minY-g.minY}function y(f){return(f.maxX-f.minX)*(f.maxY-f.minY)}function x(f){return f.maxX-f.minX+(f.maxY-f.minY)}function M(f,g){return f.minX<=g.minX&&f.minY<=g.minY&&g.maxX<=f.maxX&&g.maxY<=f.maxY}function j(f,g){return g.minX<=f.maxX&&g.minY<=f.maxY&&g.maxX>=f.minX&&g.maxY>=f.minY}function q(f){return{children:f,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function J(f,g,$,S,E){for(var A=[g,$];A.length;)if(!(($=A.pop())-(g=A.pop())<=S)){var C=g+Math.ceil(($-g)/S/2)*S;t(f,C,g,$,E),A.push(g,C,C,$)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(f){var g=this.data,$=[];if(!j(f,g))return $;for(var S=this.toBBox,E=[];g;){for(var A=0;A<g.children.length;A++){var C=g.children[A],L=g.leaf?S(C):C;j(f,L)&&(g.leaf?$.push(C):M(f,L)?this._all(C,$):E.push(C))}g=E.pop()}return $},s.prototype.collides=function(f){var g=this.data;if(!j(f,g))return!1;for(var $=[];g;){for(var S=0;S<g.children.length;S++){var E=g.children[S],A=g.leaf?this.toBBox(E):E;if(j(f,A)){if(g.leaf||M(f,A))return!0;$.push(E)}}g=$.pop()}return!1},s.prototype.load=function(f){if(!f||!f.length)return this;if(f.length<this._minEntries){for(var g=0;g<f.length;g++)this.insert(f[g]);return this}var $=this._build(f.slice(),0,f.length-1,0);if(this.data.children.length)if(this.data.height===$.height)this._splitRoot(this.data,$);else{if(this.data.height<$.height){var S=this.data;this.data=$,$=S}this._insert($,this.data.height-$.height-1,!0)}else this.data=$;return this},s.prototype.insert=function(f){return f&&this._insert(f,this.data.height-1),this},s.prototype.clear=function(){return this.data=q([]),this},s.prototype.remove=function(f,g){if(!f)return this;for(var $,S,E,A=this.data,C=this.toBBox(f),L=[],I=[];A||L.length;){if(A||(A=L.pop(),S=L[L.length-1],$=I.pop(),E=!0),A.leaf){var W=o(f,A.children,g);if(W!==-1)return A.children.splice(W,1),L.push(A),this._condense(L),this}E||A.leaf||!M(A,C)?S?($++,A=S.children[$],E=!1):A=null:(L.push(A),I.push($),$=0,S=A,A=A.children[0])}return this},s.prototype.toBBox=function(f){return f},s.prototype.compareMinX=function(f,g){return f.minX-g.minX},s.prototype.compareMinY=function(f,g){return f.minY-g.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(f){return this.data=f,this},s.prototype._all=function(f,g){for(var $=[];f;)f.leaf?g.push.apply(g,f.children):$.push.apply($,f.children),f=$.pop();return g},s.prototype._build=function(f,g,$,S){var E,A=$-g+1,C=this._maxEntries;if(A<=C)return l(E=q(f.slice(g,$+1)),this.toBBox),E;S||(S=Math.ceil(Math.log(A)/Math.log(C)),C=Math.ceil(A/Math.pow(C,S-1))),(E=q([])).leaf=!1,E.height=S;var L=Math.ceil(A/C),I=L*Math.ceil(Math.sqrt(C));J(f,g,$,I,this.compareMinX);for(var W=g;W<=$;W+=I){var re=Math.min(W+I-1,$);J(f,W,re,L,this.compareMinY);for(var k=W;k<=re;k+=L){var _=Math.min(k+L-1,re);E.children.push(this._build(f,k,_,S-1))}}return l(E,this.toBBox),E},s.prototype._chooseSubtree=function(f,g,$,S){for(;S.push(g),!g.leaf&&S.length-1!==$;){for(var E=1/0,A=1/0,C=void 0,L=0;L<g.children.length;L++){var I=g.children[L],W=y(I),re=(k=f,_=I,(Math.max(_.maxX,k.maxX)-Math.min(_.minX,k.minX))*(Math.max(_.maxY,k.maxY)-Math.min(_.minY,k.minY))-W);re<A?(A=re,E=W<E?W:E,C=I):re===A&&W<E&&(E=W,C=I)}g=C||g.children[0]}var k,_;return g},s.prototype._insert=function(f,g,$){var S=$?f:this.toBBox(f),E=[],A=this._chooseSubtree(S,this.data,g,E);for(A.children.push(f),u(A,S);g>=0&&E[g].children.length>this._maxEntries;)this._split(E,g),g--;this._adjustParentBBoxes(S,E,g)},s.prototype._split=function(f,g){var $=f[g],S=$.children.length,E=this._minEntries;this._chooseSplitAxis($,E,S);var A=this._chooseSplitIndex($,E,S),C=q($.children.splice(A,$.children.length-A));C.height=$.height,C.leaf=$.leaf,l($,this.toBBox),l(C,this.toBBox),g?f[g-1].children.push(C):this._splitRoot($,C)},s.prototype._splitRoot=function(f,g){this.data=q([f,g]),this.data.height=f.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(f,g,$){for(var S,E,A,C,L,I,W,re=1/0,k=1/0,_=g;_<=$-g;_++){var O=a(f,0,_,this.toBBox),B=a(f,_,$,this.toBBox),P=(E=O,A=B,C=void 0,L=void 0,I=void 0,W=void 0,C=Math.max(E.minX,A.minX),L=Math.max(E.minY,A.minY),I=Math.min(E.maxX,A.maxX),W=Math.min(E.maxY,A.maxY),Math.max(0,I-C)*Math.max(0,W-L)),H=y(O)+y(B);P<re?(re=P,S=_,k=H<k?H:k):P===re&&H<k&&(k=H,S=_)}return S||$-g},s.prototype._chooseSplitAxis=function(f,g,$){var S=f.leaf?this.compareMinX:p,E=f.leaf?this.compareMinY:v;this._allDistMargin(f,g,$,S)<this._allDistMargin(f,g,$,E)&&f.children.sort(S)},s.prototype._allDistMargin=function(f,g,$,S){f.children.sort(S);for(var E=this.toBBox,A=a(f,0,g,E),C=a(f,$-g,$,E),L=x(A)+x(C),I=g;I<$-g;I++){var W=f.children[I];u(A,f.leaf?E(W):W),L+=x(A)}for(var re=$-g-1;re>=g;re--){var k=f.children[re];u(C,f.leaf?E(k):k),L+=x(C)}return L},s.prototype._adjustParentBBoxes=function(f,g,$){for(var S=$;S>=0;S--)u(g[S],f)},s.prototype._condense=function(f){for(var g=f.length-1,$=void 0;g>=0;g--)f[g].children.length===0?g>0?($=f[g-1].children).splice($.indexOf(f[g]),1):this.clear():l(f[g],this.toBBox)},s})})(vn);var Io=vn.exports;const jo=wr(xo),No=wr(Lo);function nt(r){var e=[1/0,1/0,-1/0,-1/0];return vt(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}nt.default=nt;const Bo=wr(Object.freeze(Object.defineProperty({__proto__:null,default:nt},Symbol.toStringTag,{value:"Module"})));var Be=Io,mn=jo,yn=No,mt=Bo.default,Fo=yn.featureEach;yn.coordEach,mn.polygon;var bn=mn.featureCollection;function xn(r){var e=new Be(r);return e.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:mt(t),Be.prototype.insert.call(this,t)},e.load=function(t){var i=[];return Array.isArray(t)?t.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:mt(n),i.push(n)}):Fo(t,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:mt(n),i.push(n)}),Be.prototype.load.call(this,i)},e.remove=function(t,i){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:mt(t),Be.prototype.remove.call(this,t,i)},e.clear=function(){return Be.prototype.clear.call(this)},e.search=function(t){var i=Be.prototype.search.call(this,this.toBBox(t));return bn(i)},e.collides=function(t){return Be.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=Be.prototype.all.call(this);return bn(t)},e.toJSON=function(){return Be.prototype.toJSON.call(this)},e.fromJSON=function(t){return Be.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var i;if(t.bbox)i=t.bbox;else if(Array.isArray(t)&&t.length===4)i=t;else if(Array.isArray(t)&&t.length===6)i=[t[0],t[1],t[3],t[4]];else if(t.type==="Feature")i=mt(t);else if(t.type==="FeatureCollection")i=mt(t);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}Ir.exports=xn,Ir.exports.default=xn;var Ho=Ir.exports;const Uo=$r(Ho);function jr(r,e){var t={},i=[];if(r.type==="LineString"&&(r=Ce(r)),e.type==="LineString"&&(e=Ce(e)),r.type==="Feature"&&e.type==="Feature"&&r.geometry!==null&&e.geometry!==null&&r.geometry.type==="LineString"&&e.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=$n(r,e);return n&&i.push(n),Ke(i)}var s=Uo();return s.load(gn(e)),Ut(gn(r),function(o){Ut(s.search(o),function(l){var a=$n(o,l);if(a){var u=pt(a).join(",");t[u]||(t[u]=!0,i.push(a))}})}),Ke(i)}function $n(r,e){var t=pt(r),i=pt(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=t[0][0],s=t[0][1],o=t[1][0],l=t[1][1],a=i[0][0],u=i[0][1],p=i[1][0],v=i[1][1],y=(v-u)*(o-n)-(p-a)*(l-s),x=(p-a)*(s-u)-(v-u)*(n-a),M=(o-n)*(s-u)-(l-s)*(n-a);if(y===0)return null;var j=x/y,q=M/y;if(j>=0&&j<=1&&q>=0&&q<=1){var J=n+j*(o-n),f=s+j*(l-s);return Ne([J,f])}return null}function Nr(r,e){e===void 0&&(e={});var t=gt(r);switch(!e.properties&&r.type==="Feature"&&(e.properties=r.properties),t.type){case"Polygon":return Yo(t,e);case"MultiPolygon":return zo(t,e);default:throw new Error("invalid poly")}}function Yo(r,e){e===void 0&&(e={});var t=gt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{};return wn(i,n)}function zo(r,e){e===void 0&&(e={});var t=gt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{},s=[];return i.forEach(function(o){s.push(wn(o,n))}),Ke(s)}function wn(r,e){return r.length>1?Lr(r,e):Re(r[0],e)}function Xo(r,e){var t=!0;return ze(r,function(i){ze(e,function(n){if(t===!1)return!1;t=Vo(i.geometry,n.geometry)})}),t}function Vo(r,e){switch(r.type){case"Point":switch(e.type){case"Point":return!Ko(r.coordinates,e.coordinates);case"LineString":return!_n(e,r);case"Polygon":return!ke(r,e)}break;case"LineString":switch(e.type){case"Point":return!_n(r,e);case"LineString":return!Wo(r,e);case"Polygon":return!En(e,r)}break;case"Polygon":switch(e.type){case"Point":return!ke(e,r);case"LineString":return!En(r,e);case"Polygon":return!qo(e,r)}}return!1}function _n(r,e){for(var t=0;t<r.coordinates.length-1;t++)if(Go(r.coordinates[t],r.coordinates[t+1],e.coordinates))return!0;return!1}function Wo(r,e){var t=jr(r,e);return t.features.length>0}function En(r,e){for(var t=0,i=e.coordinates;t<i.length;t++){var n=i[t];if(ke(n,r))return!0}var s=jr(e,Nr(r));return s.features.length>0}function qo(r,e){for(var t=0,i=r.coordinates[0];t<i.length;t++){var n=i[t];if(ke(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var l=o[s];if(ke(l,r))return!0}var a=jr(Nr(r),Nr(e));return a.features.length>0}function Go(r,e,t){var i=t[0]-r[0],n=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],l=i*o-n*s;return l!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?r[0]<=t[0]&&t[0]<=e[0]:e[0]<=t[0]&&t[0]<=r[0]:o>0?r[1]<=t[1]&&t[1]<=e[1]:e[1]<=t[1]&&t[1]<=r[1]}function Ko(r,e){return r[0]===e[0]&&r[1]===e[1]}function Jo(r,e){var t=!1;return ze(r,function(i){ze(e,function(n){if(t===!0)return!0;t=!Xo(i.geometry,n.geometry)})}),t}function Yt(r,e,t){t===void 0&&(t={});for(var i=un(r),n=pt(e),s=0;s<n.length-1;s++){var o=!1;if(t.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),Zo(n[s],n[s+1],i,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function Zo(r,e,t,i,n){var s=t[0],o=t[1],l=r[0],a=r[1],u=e[0],p=e[1],v=t[0]-l,y=t[1]-a,x=u-l,M=p-a,j=v*M-y*x;if(n!==null){if(Math.abs(j)>n)return!1}else if(j!==0)return!1;if(i){if(i==="start")return Math.abs(x)>=Math.abs(M)?x>0?l<s&&s<=u:u<=s&&s<l:M>0?a<o&&o<=p:p<=o&&o<a;if(i==="end")return Math.abs(x)>=Math.abs(M)?x>0?l<=s&&s<u:u<s&&s<=l:M>0?a<=o&&o<p:p<o&&o<=a;if(i==="both")return Math.abs(x)>=Math.abs(M)?x>0?l<s&&s<u:u<s&&s<l:M>0?a<o&&o<p:p<o&&o<a}else return Math.abs(x)>=Math.abs(M)?x>0?l<=s&&s<=u:u<=s&&s<=l:M>0?a<=o&&o<=p:p<=o&&o<=a;return!1}function Qo(r,e){var t=gt(r),i=gt(e),n=t.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return ea(t,i);case"LineString":return Yt(t,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return ke(t,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return ta(t,i);case"LineString":return ra(t,i);case"Polygon":case"MultiPolygon":return ia(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return na(t,i);case"Polygon":case"MultiPolygon":return sa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return oa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function ea(r,e){var t,i=!1;for(t=0;t<e.coordinates.length;t++)if(An(e.coordinates[t],r.coordinates)){i=!0;break}return i}function ta(r,e){for(var t=0;t<r.coordinates.length;t++){for(var i=!1,n=0;n<e.coordinates.length;n++)An(r.coordinates[t],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function ra(r,e){for(var t=!1,i=0;i<r.coordinates.length;i++){if(!Yt(r.coordinates[i],e))return!1;t||(t=Yt(r.coordinates[i],e,{ignoreEndVertices:!0}))}return t}function ia(r,e){for(var t=!0,i=!1,n=0;n<r.coordinates.length;n++){if(i=ke(r.coordinates[1],e),!i){t=!1;break}i=ke(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&i}function na(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Yt(r.coordinates[t],e))return!1;return!0}function sa(r,e){var t=nt(e),i=nt(r);if(!Mn(t,i))return!1;for(var n=!1,s=0;s<r.coordinates.length-1;s++){if(!ke(r.coordinates[s],e))return!1;if(n||(n=ke(r.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=aa(r.coordinates[s],r.coordinates[s+1]);n=ke(o,e,{ignoreBoundary:!0})}}return n}function oa(r,e){var t=nt(r),i=nt(e);if(!Mn(i,t))return!1;for(var n=0;n<r.coordinates[0].length;n++)if(!ke(r.coordinates[0][n],e))return!1;return!0}function Mn(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function An(r,e){return r[0]===e[0]&&r[1]===e[1]}function aa(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}var la=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,kt=(r,e,t,i)=>{for(var n=i>1?void 0:i?ca(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&la(e,t,n),n};const ua=(r,e)=>e?Jo(r,e):!0,ha=(r,e)=>e?Qo(r,e):!0;let Br=class extends Pe{reset(){this.filterObject.state.geometry=void 0;const r=this.renderRoot.querySelector("eox-itemfilter-spatial-filter");delete this.filterObject.dirty,r.reset(),this.requestUpdate()}createRenderRoot(){return this}render(){var r;return he`
|
|
543
|
+
*/const oo=vr(class extends mr{constructor(r){if(super(r),r.type!==Ke.PROPERTY&&r.type!==Ke.ATTRIBUTE&&r.type!==Ke.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!As(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===Ce||e===se)return e;const t=r.element,i=r.name;if(r.type===Ke.PROPERTY){if(e===t[i])return Ce}else if(r.type===Ke.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return Ce}else if(r.type===Ke.ATTRIBUTE&&t.getAttribute(i)===e+"")return Ce;return Vi(r),e}});var we=63710088e-1,Pr={centimeters:we*100,centimetres:we*100,degrees:we/111325,feet:we*3.28084,inches:we*39.37,kilometers:we/1e3,kilometres:we/1e3,meters:we,metres:we,miles:we/1609.344,millimeters:we*1e3,millimetres:we*1e3,nauticalmiles:we/1852,radians:1,yards:we*1.0936},ao={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/we,yards:1.0936133},kr={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 Te(r,e,t){t===void 0&&(t={});var i={type:"Feature"};return(t.id===0||t.id)&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.properties=e||{},i.geometry=r,i}function lo(r,e,t){switch(r){case"Point":return Be(e).geometry;case"LineString":return Ie(e).geometry;case"Polygon":return Cr(e).geometry;case"MultiPoint":return an(e).geometry;case"MultiLineString":return Lr(e).geometry;case"MultiPolygon":return ln(e).geometry;default:throw new Error(r+" is invalid")}}function Be(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ht(r[0])||!Ht(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Te(i,e,t)}function co(r,e,t){return t===void 0&&(t={}),Je(r.map(function(i){return Be(i,e)}),t)}function Cr(r,e,t){t===void 0&&(t={});for(var i=0,n=r;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:r};return Te(a,e,t)}function uo(r,e,t){return t===void 0&&(t={}),Je(r.map(function(i){return Cr(i,e)}),t)}function Ie(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:r};return Te(i,e,t)}function ho(r,e,t){return t===void 0&&(t={}),Je(r.map(function(i){return Ie(i,e)}),t)}function Je(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function Lr(r,e,t){t===void 0&&(t={});var i={type:"MultiLineString",coordinates:r};return Te(i,e,t)}function an(r,e,t){t===void 0&&(t={});var i={type:"MultiPoint",coordinates:r};return Te(i,e,t)}function ln(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return Te(i,e,t)}function fo(r,e,t){t===void 0&&(t={});var i={type:"GeometryCollection",geometries:r};return Te(i,e,t)}function po(r,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var t=Math.pow(10,e||0);return Math.round(r*t)/t}function cn(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Tr(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r/t}function go(r,e){return un(Tr(r,e))}function vo(r){var e=r%360;return e<0&&(e+=360),e}function un(r){var e=r%(2*Math.PI);return e*180/Math.PI}function mo(r){var e=r%360;return e*Math.PI/180}function yo(r,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("length must be a positive number");return cn(Tr(r,e),t)}function bo(r,e,t){if(e===void 0&&(e="meters"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("area must be a positive number");var i=kr[e];if(!i)throw new Error("invalid original units");var n=kr[t];if(!n)throw new Error("invalid final units");return r/i*n}function Ht(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Rr(r){return!!r&&r.constructor===Object}function xo(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(e){if(!Ht(e))throw new Error("bbox must only contain numbers")})}function $o(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}const wo=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:kr,bearingToAzimuth:vo,convertArea:bo,convertLength:yo,degreesToRadians:mo,earthRadius:we,factors:Pr,feature:Te,featureCollection:Je,geometry:lo,geometryCollection:fo,isNumber:Ht,isObject:Rr,lengthToDegrees:go,lengthToRadians:Tr,lineString:Ie,lineStrings:ho,multiLineString:Lr,multiPoint:an,multiPolygon:ln,point:Be,points:co,polygon:Cr,polygons:uo,radiansToDegrees:un,radiansToLength:cn,round:po,unitsFactors:ao,validateBBox:xo,validateId:$o},Symbol.toStringTag,{value:"Module"}));function hn(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function vt(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function mt(r){return r.type==="Feature"?r.geometry:r}function Re(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=hn(r),n=mt(e),s=n.type,o=e.bbox,a=n.coordinates;if(o&&_o(i,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var l=!1,u=0;u<a.length&&!l;u++)if(dn(i,a[u][0],t.ignoreBoundary)){for(var p=!1,m=1;m<a[u].length&&!p;)dn(i,a[u][m],!t.ignoreBoundary)&&(p=!0),m++;p||(l=!0)}return l}function dn(r,e,t){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],a=e[n][1],l=e[s][0],u=e[s][1],p=r[1]*(o-l)+a*(l-r[0])+u*(r[0]-o)===0&&(o-r[0])*(l-r[0])<=0&&(a-r[1])*(u-r[1])<=0;if(p)return!t;var m=a>r[1]!=u>r[1]&&r[0]<(l-o)*(r[1]-a)/(u-a)+o;m&&(i=!i)}return i}function _o(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function yt(r,e,t){if(r!==null)for(var i,n,s,o,a,l,u,p=0,m=0,b,x=r.type,E=x==="FeatureCollection",I=x==="Feature",q=E?r.features.length:1,J=0;J<q;J++){u=E?r.features[J].geometry:I?r.geometry:r,b=u?u.type==="GeometryCollection":!1,a=b?u.geometries.length:1;for(var f=0;f<a;f++){var g=0,$=0;if(o=b?u.geometries[f]:u,o!==null){l=o.coordinates;var O=o.type;switch(p=t&&(O==="Polygon"||O==="MultiPolygon")?1:0,O){case null:break;case"Point":if(e(l,m,J,g,$)===!1)return!1;m++,g++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(e(l[i],m,J,g,$)===!1)return!1;m++,O==="MultiPoint"&&g++}O==="LineString"&&g++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(n=0;n<l[i].length-p;n++){if(e(l[i][n],m,J,g,$)===!1)return!1;m++}O==="MultiLineString"&&g++,O==="Polygon"&&$++}O==="Polygon"&&g++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for($=0,n=0;n<l[i].length;n++){for(s=0;s<l[i][n].length-p;s++){if(e(l[i][n][s],m,J,g,$)===!1)return!1;m++}$++}g++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(yt(o.geometries[i],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Eo(r,e,t,i){var n=t;return yt(r,function(s,o,a,l,u){o===0&&t===void 0?n=s:n=e(n,s,o,a,l,u)},i),n}function fn(r,e){var t;switch(r.type){case"FeatureCollection":for(t=0;t<r.features.length&&e(r.features[t].properties,t)!==!1;t++);break;case"Feature":e(r.properties,0);break}}function Mo(r,e,t){var i=t;return fn(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Ut(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function Ao(r,e,t){var i=t;return Ut(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Oo(r){var e=[];return yt(r,function(t){e.push(t)}),e}function Dr(r,e){var t,i,n,s,o,a,l,u,p,m,b=0,x=r.type==="FeatureCollection",E=r.type==="Feature",I=x?r.features.length:1;for(t=0;t<I;t++){for(a=x?r.features[t].geometry:E?r.geometry:r,u=x?r.features[t].properties:E?r.properties:{},p=x?r.features[t].bbox:E?r.bbox:void 0,m=x?r.features[t].id:E?r.id:void 0,l=a?a.type==="GeometryCollection":!1,o=l?a.geometries.length:1,n=0;n<o;n++){if(s=l?a.geometries[n]:a,s===null){if(e(null,b,u,p,m)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,b,u,p,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],b,u,p,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}b++}}function So(r,e,t){var i=t;return Dr(r,function(n,s,o,a,l){s===0&&t===void 0?i=n:i=e(i,n,s,o,a,l)}),i}function ze(r,e){Dr(r,function(t,i,n,s,o){var a=t===null?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return e(Te(t,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var l;switch(a){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var p=t.coordinates[u],m={type:l,coordinates:p};if(e(Te(m,n),i,u)===!1)return!1}})}function Po(r,e,t){var i=t;return ze(r,function(n,s,o){s===0&&o===0&&t===void 0?i=n:i=e(i,n,s,o)}),i}function pn(r,e){ze(r,function(t,i,n){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,l=0,u=0,p=0;if(yt(t,function(m,b,x,E,I){if(a===void 0||i>l||E>u||I>p){a=m,l=i,u=E,p=I,s=0;return}var q=Ie([a,m],t.properties);if(e(q,i,n,I,s)===!1)return!1;s++,a=m})===!1)return!1}}})}function ko(r,e,t){var i=t,n=!1;return pn(r,function(s,o,a,l,u){n===!1&&t===void 0?i=s:i=e(i,s,o,a,l,u),n=!0}),i}function gn(r,e){if(!r)throw new Error("geojson is required");ze(r,function(t,i,n){if(t.geometry!==null){var s=t.geometry.type,o=t.geometry.coordinates;switch(s){case"LineString":if(e(t,i,n,0,0)===!1)return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(e(Ie(o[a],t.properties),i,n,a)===!1)return!1;break}}})}function Co(r,e,t){var i=t;return gn(r,function(n,s,o,a){s===0&&t===void 0?i=n:i=e(i,n,s,o,a)}),i}function Lo(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,a;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,a=r.features[t].geometry;break;case"Feature":o=o||r.properties,a=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":a=r;break;default:throw new Error("geojson is invalid")}if(a===null)return null;var l=a.coordinates;switch(a.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=l.length+s-1),Ie([l[s],l[s+1]],o,e);case"Polygon":return n<0&&(n=l.length+n),s<0&&(s=l[n].length+s-1),Ie([l[n][s],l[n][s+1]],o,e);case"MultiLineString":return i<0&&(i=l.length+i),s<0&&(s=l[i].length+s-1),Ie([l[i][s],l[i][s+1]],o,e);case"MultiPolygon":return i<0&&(i=l.length+i),n<0&&(n=l[i].length+n),s<0&&(s=l[i][n].length-s-1),Ie([l[i][n][s],l[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function To(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,a;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,a=r.features[t].geometry;break;case"Feature":o=o||r.properties,a=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":a=r;break;default:throw new Error("geojson is invalid")}if(a===null)return null;var l=a.coordinates;switch(a.type){case"Point":return Be(l,o,e);case"MultiPoint":return i<0&&(i=l.length+i),Be(l[i],o,e);case"LineString":return s<0&&(s=l.length+s),Be(l[s],o,e);case"Polygon":return n<0&&(n=l.length+n),s<0&&(s=l[n].length+s),Be(l[n][s],o,e);case"MultiLineString":return i<0&&(i=l.length+i),s<0&&(s=l[i].length+s),Be(l[i][s],o,e);case"MultiPolygon":return i<0&&(i=l.length+i),n<0&&(n=l[i].length+n),s<0&&(s=l[i][n].length-s),Be(l[i][n][s],o,e)}throw new Error("geojson is invalid")}const Ro=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Oo,coordEach:yt,coordReduce:Eo,featureEach:Ut,featureReduce:Ao,findPoint:To,findSegment:Lo,flattenEach:ze,flattenReduce:Po,geomEach:Dr,geomReduce:So,lineEach:gn,lineReduce:Co,propEach:fn,propReduce:Mo,segmentEach:pn,segmentReduce:ko},Symbol.toStringTag,{value:"Module"}));function vn(r){if(!r)throw new Error("geojson is required");var e=[];return ze(r,function(t){Do(t,e)}),Je(e)}function Do(r,e){var t=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":t=vt(i);break;case"LineString":t=[vt(i)]}t.forEach(function(n){var s=Io(n,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function Io(r,e){var t=[];return r.reduce(function(i,n){var s=Ie([i,n],e);return s.bbox=jo(i,n),t.push(s),n}),t}function jo(r,e){var t=r[0],i=r[1],n=e[0],s=e[1],o=t<n?t:n,a=i<s?i:s,l=t>n?t:n,u=i>s?i:s;return[o,a,l,u]}var Ir={exports:{}},mn={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(gt,function(){function t(f,g,$,O,_){(function M(C,B,F,R,Q){for(;R>F;){if(R-F>600){var ne=R-F+1,S=B-F+1,P=Math.log(ne),A=.5*Math.exp(2*P/3),j=.5*Math.sqrt(P*A*(ne-A)/ne)*(S-ne/2<0?-1:1),k=Math.max(F,Math.floor(B-S*A/ne+j)),W=Math.min(R,Math.floor(B+(ne-S)*A/ne+j));M(C,B,k,W,Q)}var U=C[B],ie=F,ee=R;for(i(C,F,B),Q(C[R],U)>0&&i(C,F,R);ie<ee;){for(i(C,ie,ee),ie++,ee--;Q(C[ie],U)<0;)ie++;for(;Q(C[ee],U)>0;)ee--}Q(C[F],U)===0?i(C,F,ee):i(C,++ee,R),ee<=B&&(F=ee+1),B<=ee&&(R=ee-1)}})(f,g,$||0,O||f.length-1,_||n)}function i(f,g,$){var O=f[g];f[g]=f[$],f[$]=O}function n(f,g){return f<g?-1:f>g?1:0}var s=function(f){f===void 0&&(f=9),this._maxEntries=Math.max(4,f),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(f,g,$){if(!$)return g.indexOf(f);for(var O=0;O<g.length;O++)if($(f,g[O]))return O;return-1}function a(f,g){l(f,0,f.children.length,g,f)}function l(f,g,$,O,_){_||(_=q(null)),_.minX=1/0,_.minY=1/0,_.maxX=-1/0,_.maxY=-1/0;for(var M=g;M<$;M++){var C=f.children[M];u(_,f.leaf?O(C):C)}return _}function u(f,g){return f.minX=Math.min(f.minX,g.minX),f.minY=Math.min(f.minY,g.minY),f.maxX=Math.max(f.maxX,g.maxX),f.maxY=Math.max(f.maxY,g.maxY),f}function p(f,g){return f.minX-g.minX}function m(f,g){return f.minY-g.minY}function b(f){return(f.maxX-f.minX)*(f.maxY-f.minY)}function x(f){return f.maxX-f.minX+(f.maxY-f.minY)}function E(f,g){return f.minX<=g.minX&&f.minY<=g.minY&&g.maxX<=f.maxX&&g.maxY<=f.maxY}function I(f,g){return g.minX<=f.maxX&&g.minY<=f.maxY&&g.maxX>=f.minX&&g.maxY>=f.minY}function q(f){return{children:f,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function J(f,g,$,O,_){for(var M=[g,$];M.length;)if(!(($=M.pop())-(g=M.pop())<=O)){var C=g+Math.ceil(($-g)/O/2)*O;t(f,C,g,$,_),M.push(g,C,C,$)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(f){var g=this.data,$=[];if(!I(f,g))return $;for(var O=this.toBBox,_=[];g;){for(var M=0;M<g.children.length;M++){var C=g.children[M],B=g.leaf?O(C):C;I(f,B)&&(g.leaf?$.push(C):E(f,B)?this._all(C,$):_.push(C))}g=_.pop()}return $},s.prototype.collides=function(f){var g=this.data;if(!I(f,g))return!1;for(var $=[];g;){for(var O=0;O<g.children.length;O++){var _=g.children[O],M=g.leaf?this.toBBox(_):_;if(I(f,M)){if(g.leaf||E(f,M))return!0;$.push(_)}}g=$.pop()}return!1},s.prototype.load=function(f){if(!f||!f.length)return this;if(f.length<this._minEntries){for(var g=0;g<f.length;g++)this.insert(f[g]);return this}var $=this._build(f.slice(),0,f.length-1,0);if(this.data.children.length)if(this.data.height===$.height)this._splitRoot(this.data,$);else{if(this.data.height<$.height){var O=this.data;this.data=$,$=O}this._insert($,this.data.height-$.height-1,!0)}else this.data=$;return this},s.prototype.insert=function(f){return f&&this._insert(f,this.data.height-1),this},s.prototype.clear=function(){return this.data=q([]),this},s.prototype.remove=function(f,g){if(!f)return this;for(var $,O,_,M=this.data,C=this.toBBox(f),B=[],F=[];M||B.length;){if(M||(M=B.pop(),O=B[B.length-1],$=F.pop(),_=!0),M.leaf){var R=o(f,M.children,g);if(R!==-1)return M.children.splice(R,1),B.push(M),this._condense(B),this}_||M.leaf||!E(M,C)?O?($++,M=O.children[$],_=!1):M=null:(B.push(M),F.push($),$=0,O=M,M=M.children[0])}return this},s.prototype.toBBox=function(f){return f},s.prototype.compareMinX=function(f,g){return f.minX-g.minX},s.prototype.compareMinY=function(f,g){return f.minY-g.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(f){return this.data=f,this},s.prototype._all=function(f,g){for(var $=[];f;)f.leaf?g.push.apply(g,f.children):$.push.apply($,f.children),f=$.pop();return g},s.prototype._build=function(f,g,$,O){var _,M=$-g+1,C=this._maxEntries;if(M<=C)return a(_=q(f.slice(g,$+1)),this.toBBox),_;O||(O=Math.ceil(Math.log(M)/Math.log(C)),C=Math.ceil(M/Math.pow(C,O-1))),(_=q([])).leaf=!1,_.height=O;var B=Math.ceil(M/C),F=B*Math.ceil(Math.sqrt(C));J(f,g,$,F,this.compareMinX);for(var R=g;R<=$;R+=F){var Q=Math.min(R+F-1,$);J(f,R,Q,B,this.compareMinY);for(var ne=R;ne<=Q;ne+=B){var S=Math.min(ne+B-1,Q);_.children.push(this._build(f,ne,S,O-1))}}return a(_,this.toBBox),_},s.prototype._chooseSubtree=function(f,g,$,O){for(;O.push(g),!g.leaf&&O.length-1!==$;){for(var _=1/0,M=1/0,C=void 0,B=0;B<g.children.length;B++){var F=g.children[B],R=b(F),Q=(ne=f,S=F,(Math.max(S.maxX,ne.maxX)-Math.min(S.minX,ne.minX))*(Math.max(S.maxY,ne.maxY)-Math.min(S.minY,ne.minY))-R);Q<M?(M=Q,_=R<_?R:_,C=F):Q===M&&R<_&&(_=R,C=F)}g=C||g.children[0]}var ne,S;return g},s.prototype._insert=function(f,g,$){var O=$?f:this.toBBox(f),_=[],M=this._chooseSubtree(O,this.data,g,_);for(M.children.push(f),u(M,O);g>=0&&_[g].children.length>this._maxEntries;)this._split(_,g),g--;this._adjustParentBBoxes(O,_,g)},s.prototype._split=function(f,g){var $=f[g],O=$.children.length,_=this._minEntries;this._chooseSplitAxis($,_,O);var M=this._chooseSplitIndex($,_,O),C=q($.children.splice(M,$.children.length-M));C.height=$.height,C.leaf=$.leaf,a($,this.toBBox),a(C,this.toBBox),g?f[g-1].children.push(C):this._splitRoot($,C)},s.prototype._splitRoot=function(f,g){this.data=q([f,g]),this.data.height=f.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(f,g,$){for(var O,_,M,C,B,F,R,Q=1/0,ne=1/0,S=g;S<=$-g;S++){var P=l(f,0,S,this.toBBox),A=l(f,S,$,this.toBBox),j=(_=P,M=A,C=void 0,B=void 0,F=void 0,R=void 0,C=Math.max(_.minX,M.minX),B=Math.max(_.minY,M.minY),F=Math.min(_.maxX,M.maxX),R=Math.min(_.maxY,M.maxY),Math.max(0,F-C)*Math.max(0,R-B)),k=b(P)+b(A);j<Q?(Q=j,O=S,ne=k<ne?k:ne):j===Q&&k<ne&&(ne=k,O=S)}return O||$-g},s.prototype._chooseSplitAxis=function(f,g,$){var O=f.leaf?this.compareMinX:p,_=f.leaf?this.compareMinY:m;this._allDistMargin(f,g,$,O)<this._allDistMargin(f,g,$,_)&&f.children.sort(O)},s.prototype._allDistMargin=function(f,g,$,O){f.children.sort(O);for(var _=this.toBBox,M=l(f,0,g,_),C=l(f,$-g,$,_),B=x(M)+x(C),F=g;F<$-g;F++){var R=f.children[F];u(M,f.leaf?_(R):R),B+=x(M)}for(var Q=$-g-1;Q>=g;Q--){var ne=f.children[Q];u(C,f.leaf?_(ne):ne),B+=x(C)}return B},s.prototype._adjustParentBBoxes=function(f,g,$){for(var O=$;O>=0;O--)u(g[O],f)},s.prototype._condense=function(f){for(var g=f.length-1,$=void 0;g>=0;g--)f[g].children.length===0?g>0?($=f[g-1].children).splice($.indexOf(f[g]),1):this.clear():a(f[g],this.toBBox)},s})})(mn);var No=mn.exports;const Bo=wr(wo),Fo=wr(Ro);function st(r){var e=[1/0,1/0,-1/0,-1/0];return yt(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}st.default=st;const Ho=wr(Object.freeze(Object.defineProperty({__proto__:null,default:st},Symbol.toStringTag,{value:"Module"})));var Fe=No,yn=Bo,bn=Fo,bt=Ho.default,Uo=bn.featureEach;bn.coordEach,yn.polygon;var xn=yn.featureCollection;function $n(r){var e=new Fe(r);return e.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:bt(t),Fe.prototype.insert.call(this,t)},e.load=function(t){var i=[];return Array.isArray(t)?t.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:bt(n),i.push(n)}):Uo(t,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:bt(n),i.push(n)}),Fe.prototype.load.call(this,i)},e.remove=function(t,i){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:bt(t),Fe.prototype.remove.call(this,t,i)},e.clear=function(){return Fe.prototype.clear.call(this)},e.search=function(t){var i=Fe.prototype.search.call(this,this.toBBox(t));return xn(i)},e.collides=function(t){return Fe.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=Fe.prototype.all.call(this);return xn(t)},e.toJSON=function(){return Fe.prototype.toJSON.call(this)},e.fromJSON=function(t){return Fe.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var i;if(t.bbox)i=t.bbox;else if(Array.isArray(t)&&t.length===4)i=t;else if(Array.isArray(t)&&t.length===6)i=[t[0],t[1],t[3],t[4]];else if(t.type==="Feature")i=bt(t);else if(t.type==="FeatureCollection")i=bt(t);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}Ir.exports=$n,Ir.exports.default=$n;var Yo=Ir.exports;const zo=$r(Yo);function jr(r,e){var t={},i=[];if(r.type==="LineString"&&(r=Te(r)),e.type==="LineString"&&(e=Te(e)),r.type==="Feature"&&e.type==="Feature"&&r.geometry!==null&&e.geometry!==null&&r.geometry.type==="LineString"&&e.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=wn(r,e);return n&&i.push(n),Je(i)}var s=zo();return s.load(vn(e)),Ut(vn(r),function(o){Ut(s.search(o),function(a){var l=wn(o,a);if(l){var u=vt(l).join(",");t[u]||(t[u]=!0,i.push(l))}})}),Je(i)}function wn(r,e){var t=vt(r),i=vt(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=t[0][0],s=t[0][1],o=t[1][0],a=t[1][1],l=i[0][0],u=i[0][1],p=i[1][0],m=i[1][1],b=(m-u)*(o-n)-(p-l)*(a-s),x=(p-l)*(s-u)-(m-u)*(n-l),E=(o-n)*(s-u)-(a-s)*(n-l);if(b===0)return null;var I=x/b,q=E/b;if(I>=0&&I<=1&&q>=0&&q<=1){var J=n+I*(o-n),f=s+I*(a-s);return Be([J,f])}return null}function Nr(r,e){e===void 0&&(e={});var t=mt(r);switch(!e.properties&&r.type==="Feature"&&(e.properties=r.properties),t.type){case"Polygon":return Xo(t,e);case"MultiPolygon":return Vo(t,e);default:throw new Error("invalid poly")}}function Xo(r,e){e===void 0&&(e={});var t=mt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{};return _n(i,n)}function Vo(r,e){e===void 0&&(e={});var t=mt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{},s=[];return i.forEach(function(o){s.push(_n(o,n))}),Je(s)}function _n(r,e){return r.length>1?Lr(r,e):Ie(r[0],e)}function Wo(r,e){var t=!0;return ze(r,function(i){ze(e,function(n){if(t===!1)return!1;t=qo(i.geometry,n.geometry)})}),t}function qo(r,e){switch(r.type){case"Point":switch(e.type){case"Point":return!Zo(r.coordinates,e.coordinates);case"LineString":return!En(e,r);case"Polygon":return!Re(r,e)}break;case"LineString":switch(e.type){case"Point":return!En(r,e);case"LineString":return!Go(r,e);case"Polygon":return!Mn(e,r)}break;case"Polygon":switch(e.type){case"Point":return!Re(e,r);case"LineString":return!Mn(r,e);case"Polygon":return!Ko(e,r)}}return!1}function En(r,e){for(var t=0;t<r.coordinates.length-1;t++)if(Jo(r.coordinates[t],r.coordinates[t+1],e.coordinates))return!0;return!1}function Go(r,e){var t=jr(r,e);return t.features.length>0}function Mn(r,e){for(var t=0,i=e.coordinates;t<i.length;t++){var n=i[t];if(Re(n,r))return!0}var s=jr(e,Nr(r));return s.features.length>0}function Ko(r,e){for(var t=0,i=r.coordinates[0];t<i.length;t++){var n=i[t];if(Re(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var a=o[s];if(Re(a,r))return!0}var l=jr(Nr(r),Nr(e));return l.features.length>0}function Jo(r,e,t){var i=t[0]-r[0],n=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],a=i*o-n*s;return a!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?r[0]<=t[0]&&t[0]<=e[0]:e[0]<=t[0]&&t[0]<=r[0]:o>0?r[1]<=t[1]&&t[1]<=e[1]:e[1]<=t[1]&&t[1]<=r[1]}function Zo(r,e){return r[0]===e[0]&&r[1]===e[1]}function Qo(r,e){var t=!1;return ze(r,function(i){ze(e,function(n){if(t===!0)return!0;t=!Wo(i.geometry,n.geometry)})}),t}function Yt(r,e,t){t===void 0&&(t={});for(var i=hn(r),n=vt(e),s=0;s<n.length-1;s++){var o=!1;if(t.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),ea(n[s],n[s+1],i,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function ea(r,e,t,i,n){var s=t[0],o=t[1],a=r[0],l=r[1],u=e[0],p=e[1],m=t[0]-a,b=t[1]-l,x=u-a,E=p-l,I=m*E-b*x;if(n!==null){if(Math.abs(I)>n)return!1}else if(I!==0)return!1;if(i){if(i==="start")return Math.abs(x)>=Math.abs(E)?x>0?a<s&&s<=u:u<=s&&s<a:E>0?l<o&&o<=p:p<=o&&o<l;if(i==="end")return Math.abs(x)>=Math.abs(E)?x>0?a<=s&&s<u:u<s&&s<=a:E>0?l<=o&&o<p:p<o&&o<=l;if(i==="both")return Math.abs(x)>=Math.abs(E)?x>0?a<s&&s<u:u<s&&s<a:E>0?l<o&&o<p:p<o&&o<l}else return Math.abs(x)>=Math.abs(E)?x>0?a<=s&&s<=u:u<=s&&s<=a:E>0?l<=o&&o<=p:p<=o&&o<=l;return!1}function ta(r,e){var t=mt(r),i=mt(e),n=t.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return ra(t,i);case"LineString":return Yt(t,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Re(t,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return ia(t,i);case"LineString":return na(t,i);case"Polygon":case"MultiPolygon":return sa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return oa(t,i);case"Polygon":case"MultiPolygon":return aa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return la(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function ra(r,e){var t,i=!1;for(t=0;t<e.coordinates.length;t++)if(On(e.coordinates[t],r.coordinates)){i=!0;break}return i}function ia(r,e){for(var t=0;t<r.coordinates.length;t++){for(var i=!1,n=0;n<e.coordinates.length;n++)On(r.coordinates[t],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function na(r,e){for(var t=!1,i=0;i<r.coordinates.length;i++){if(!Yt(r.coordinates[i],e))return!1;t||(t=Yt(r.coordinates[i],e,{ignoreEndVertices:!0}))}return t}function sa(r,e){for(var t=!0,i=!1,n=0;n<r.coordinates.length;n++){if(i=Re(r.coordinates[1],e),!i){t=!1;break}i=Re(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&i}function oa(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Yt(r.coordinates[t],e))return!1;return!0}function aa(r,e){var t=st(e),i=st(r);if(!An(t,i))return!1;for(var n=!1,s=0;s<r.coordinates.length-1;s++){if(!Re(r.coordinates[s],e))return!1;if(n||(n=Re(r.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=ca(r.coordinates[s],r.coordinates[s+1]);n=Re(o,e,{ignoreBoundary:!0})}}return n}function la(r,e){var t=st(r),i=st(e);if(!An(i,t))return!1;for(var n=0;n<r.coordinates[0].length;n++)if(!Re(r.coordinates[0][n],e))return!1;return!0}function An(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function On(r,e){return r[0]===e[0]&&r[1]===e[1]}function ca(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}var ua=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,Ct=(r,e,t,i)=>{for(var n=i>1?void 0:i?ha(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&ua(e,t,n),n};const da=(r,e)=>e?Qo(r,e):!0,fa=(r,e)=>e?ta(r,e):!0;let Br=class extends Le{reset(){this.filterObject.state.geometry=void 0;const r=this.renderRoot.querySelector("eox-itemfilter-spatial-filter");delete this.filterObject.dirty,r.reset(),this.requestUpdate()}createRenderRoot(){return this}render(){var r;return ue`
|
|
537
544
|
<form style="display: inline">
|
|
538
|
-
${
|
|
545
|
+
${pt(["intersects","within"],e=>ue`
|
|
539
546
|
<label>
|
|
540
547
|
<input
|
|
541
548
|
type="radio"
|
|
542
549
|
name="mode"
|
|
543
|
-
.checked="${
|
|
550
|
+
.checked="${oo(this.filterObject.state.mode===e)}
|
|
551
|
+
"
|
|
544
552
|
value="${e}"
|
|
545
553
|
@click="${()=>{this.filterObject.state.mode=e;const t=new CustomEvent("filter",{detail:{[this.filterObject.key]:{}}});this.dispatchEvent(t)}}"
|
|
546
554
|
/>
|
|
@@ -553,7 +561,7 @@ eox-itemfilter-range {
|
|
|
553
561
|
.geometry=${(r=this.filterObject.state)==null?void 0:r.geometry}
|
|
554
562
|
@filter="${e=>{this.filterObject.state.geometry=e.detail.geometry,this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))}}"
|
|
555
563
|
></eox-itemfilter-spatial>
|
|
556
|
-
`}};
|
|
564
|
+
`}};Ct([Pe()],Br.prototype,"filterObject",2),Br=Ct([Ge("eox-itemfilter-spatial")],Br);let zt=class extends Le{render(){return ue`<eox-map part="map" style="height: 400px"></eox-map>`}firstUpdated(){this.setup()}setup(){const r=[{type:"Vector",properties:{id:"draw"},source:{type:"Vector",...this.geometry&&{format:"GeoJSON"},...this.geometry&&{url:this.createFeatureUrl(this.geometry)}},zIndex:1},{type:"Tile",source:{type:"XYZ",url:"https://s2maps-tiles.eu/wmts/1.0.0/osm_3857/default/g/{z}/{y}/{x}.jpg",attribution:"{ OSM: Data © OpenStreetMap contributors and others, Rendering © EOX }"}}];this.eoxMap=this.renderRoot.querySelector("eox-map"),setTimeout(()=>{this.eoxMap.setLayers(r),this.eoxMap.addDraw("draw",{id:"drawInteraction",type:"Polygon"});const e=t=>{const i=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:t.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(i)};this.eoxMap.interactions.drawInteraction.on("drawend",t=>{e(t.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",t=>{e(t.features.getArray()[0])})})}createFeatureUrl(r){return`data:text/json,${encodeURIComponent(JSON.stringify({type:"FeatureCollection",features:[{type:"Feature",properties:null,geometry:r}]}))}`}reset(){var e;const r=this.eoxMap.getLayerById("draw").getSource();((e=r.getFeatures())==null?void 0:e.length)>0&&(r.clear(),this.eoxMap.removeInteraction("drawInteraction_modify"),this.setup())}};Ct([Pe()],zt.prototype,"geometry",2),Ct([Pt()],zt.prototype,"eoxMap",2),zt=Ct([Ge("eox-itemfilter-spatial-filter")],zt);var pa=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,Sn=(r,e,t,i)=>{for(var n=i>1?void 0:i?ga(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&pa(e,t,n),n};let Fr=class extends Le{constructor(){super(...arguments),this.inputHandler=()=>{const r=this.renderRoot.querySelector("input[type='text']");this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=r.value}),this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))},this.debouncedInputHandler=nn(this.inputHandler,500,{leading:!0})}reset(){const r=this.renderRoot.querySelector("input[type='text']");r.value="",this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=void 0}),delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return ue`
|
|
557
565
|
<input
|
|
558
566
|
type="text"
|
|
559
567
|
placeholder="Type something..."
|
|
@@ -562,25 +570,25 @@ eox-itemfilter-range {
|
|
|
562
570
|
value="${Object.values(this.filterObject.state)[0]}"
|
|
563
571
|
@input="${this.debouncedInputHandler}"
|
|
564
572
|
/>
|
|
565
|
-
`}};On([Ae()],Fr.prototype,"filterObject",2),Fr=On([qe("eox-itemfilter-text")],Fr);function Xe(r){return Array.isArray?Array.isArray(r):Cn(r)==="[object Array]"}const pa=1/0;function ga(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-pa?"-0":e}function va(r){return r==null?"":ga(r)}function Fe(r){return typeof r=="string"}function Sn(r){return typeof r=="number"}function ma(r){return r===!0||r===!1||ya(r)&&Cn(r)=="[object Boolean]"}function Pn(r){return typeof r=="object"}function ya(r){return Pn(r)&&r!==null}function Oe(r){return r!=null}function Hr(r){return!r.trim().length}function Cn(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ic="Extended search is not available",ba="Incorrect 'index' type",xa=r=>`Invalid value for key ${r}`,$a=r=>`Pattern length exceeds max of ${r}.`,wa=r=>`Missing ${r} property in key`,_a=r=>`Property 'weight' in key '${r}' must be a positive integer`,kn=Object.prototype.hasOwnProperty;class Ea{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Ln(i);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ln(r){let e=null,t=null,i=null,n=1,s=null;if(Fe(r)||Xe(r))i=r,e=Tn(r),t=Ur(r);else{if(!kn.call(r,"name"))throw new Error(wa("name"));const o=r.name;if(i=o,kn.call(r,"weight")&&(n=r.weight,n<=0))throw new Error(_a(o));e=Tn(o),t=Ur(o),s=r.getFn}return{path:e,id:t,weight:n,src:i,getFn:s}}function Tn(r){return Xe(r)?r:r.split(".")}function Ur(r){return Xe(r)?r.join("."):r}function Ma(r,e){let t=[],i=!1;const n=(s,o,l)=>{if(Oe(s))if(!o[l])t.push(s);else{let a=o[l];const u=s[a];if(!Oe(u))return;if(l===o.length-1&&(Fe(u)||Sn(u)||ma(u)))t.push(va(u));else if(Xe(u)){i=!0;for(let p=0,v=u.length;p<v;p+=1)n(u[p],o,l+1)}else o.length&&n(u,o,l+1)}};return n(r,Fe(e)?e.split("."):e,0),i?t:t[0]}var X={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Ma,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Aa=/[^ ]+/g;function Oa(r=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(Aa).length;if(t.has(s))return t.get(s);const o=1/Math.pow(s,.5*r),l=parseFloat(Math.round(o*i)/i);return t.set(s,l),l},clear(){t.clear()}}}class Yr{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=Oa(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Fe(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();Fe(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Oe(e)||Hr(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(Oe(o)){if(Xe(o)){let l=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:u,value:p}=a.pop();if(Oe(p))if(Fe(p)&&!Hr(p)){let v={v:p,i:u,n:this.norm.get(p)};l.push(v)}else Xe(p)&&p.forEach((v,y)=>{a.push({nestedArrIndex:y,value:v})})}i.$[s]=l}else if(Fe(o)&&!Hr(o)){let l={v:o,n:this.norm.get(o)};i.$[s]=l}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Rn(r,e,{getFn:t=X.getFn,fieldNormWeight:i=X.fieldNormWeight}={}){const n=new Yr({getFn:t,fieldNormWeight:i});return n.setKeys(r.map(Ln)),n.setSources(e),n.create(),n}function Sa(r,{getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){const{keys:i,records:n}=r,s=new Yr({getFn:e,fieldNormWeight:t});return s.setKeys(i),s.setIndexRecords(n),s}function Xt(r,{errors:e=0,currentLocation:t=0,expectedLocation:i=0,distance:n=X.distance,ignoreLocation:s=X.ignoreLocation}={}){const o=e/r.length;if(s)return o;const l=Math.abs(i-t);return n?o+l/n:l?1:o}function Pa(r=[],e=X.minMatchCharLength){let t=[],i=-1,n=-1,s=0;for(let o=r.length;s<o;s+=1){let l=r[s];l&&i===-1?i=s:!l&&i!==-1&&(n=s-1,n-i+1>=e&&t.push([i,n]),i=-1)}return r[s-1]&&s-i>=e&&t.push([i,s-1]),t}const st=32;function Ca(r,e,t,{location:i=X.location,distance:n=X.distance,threshold:s=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,includeMatches:a=X.includeMatches,ignoreLocation:u=X.ignoreLocation}={}){if(e.length>st)throw new Error($a(st));const p=e.length,v=r.length,y=Math.max(0,Math.min(i,v));let x=s,M=y;const j=l>1||a,q=j?Array(v):[];let J;for(;(J=r.indexOf(e,M))>-1;){let A=Xt(e,{currentLocation:J,expectedLocation:y,distance:n,ignoreLocation:u});if(x=Math.min(A,x),M=J+p,j){let C=0;for(;C<p;)q[J+C]=1,C+=1}}M=-1;let f=[],g=1,$=p+v;const S=1<<p-1;for(let A=0;A<p;A+=1){let C=0,L=$;for(;C<L;)Xt(e,{errors:A,currentLocation:y+L,expectedLocation:y,distance:n,ignoreLocation:u})<=x?C=L:$=L,L=Math.floor(($-C)/2+C);$=L;let I=Math.max(1,y-L+1),W=o?v:Math.min(y+L,v)+p,re=Array(W+2);re[W+1]=(1<<A)-1;for(let _=W;_>=I;_-=1){let O=_-1,B=t[r.charAt(O)];if(j&&(q[O]=+!!B),re[_]=(re[_+1]<<1|1)&B,A&&(re[_]|=(f[_+1]|f[_])<<1|1|f[_+1]),re[_]&S&&(g=Xt(e,{errors:A,currentLocation:O,expectedLocation:y,distance:n,ignoreLocation:u}),g<=x)){if(x=g,M=O,M<=y)break;I=Math.max(1,2*y-M)}}if(Xt(e,{errors:A+1,currentLocation:y,expectedLocation:y,distance:n,ignoreLocation:u})>x)break;f=re}const E={isMatch:M>=0,score:Math.max(.001,g)};if(j){const A=Pa(q,l);A.length?a&&(E.indices=A):E.isMatch=!1}return E}function ka(r){let e={};for(let t=0,i=r.length;t<i;t+=1){const n=r.charAt(t);e[n]=(e[n]||0)|1<<i-t-1}return e}class Dn{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:u},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const p=(y,x)=>{this.chunks.push({pattern:y,alphabet:ka(y),startIndex:x})},v=this.pattern.length;if(v>st){let y=0;const x=v%st,M=v-x;for(;y<M;)p(this.pattern.substr(y,st),y),y+=st;if(x){const j=v-st;p(this.pattern.substr(j),j)}}else p(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:i}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let M={isMatch:!0,score:0};return i&&(M.indices=[[0,e.length-1]]),M}const{location:n,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,ignoreLocation:u}=this.options;let p=[],v=0,y=!1;this.chunks.forEach(({pattern:M,alphabet:j,startIndex:q})=>{const{isMatch:J,score:f,indices:g}=Ca(e,M,j,{location:n+q,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});J&&(y=!0),v+=f,J&&g&&(p=[...p,...g])});let x={isMatch:y,score:y?v/this.chunks.length:1};return y&&i&&(x.indices=p),x}}class Je{constructor(e){this.pattern=e}static isMultiMatch(e){return In(e,this.multiRegex)}static isSingleMatch(e){return In(e,this.singleRegex)}search(){}}function In(r,e){const t=r.match(e);return t?t[1]:null}class La extends Je{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Ta extends Je{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class Ra extends Je{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Da extends Je{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Ia extends Je{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ja extends Je{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class jn extends Je{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){super(e),this._bitapSearch=new Dn(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Nn extends Je{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+s,n.push([i,t-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const zr=[La,Nn,Ra,Da,ja,Ia,Ta,jn],Bn=zr.length,Na=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ba="|";function Fa(r,e={}){return r.split(Ba).map(t=>{let i=t.trim().split(Na).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const l=i[s];let a=!1,u=-1;for(;!a&&++u<Bn;){const p=zr[u];let v=p.isMultiMatch(l);v&&(n.push(new p(v,e)),a=!0)}if(!a)for(u=-1;++u<Bn;){const p=zr[u];let v=p.isSingleMatch(l);if(v){n.push(new p(v,e));break}}}return n})}const Ha=new Set([jn.type,Nn.type]);class Ua{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,includeMatches:i=X.includeMatches,minMatchCharLength:n=X.minMatchCharLength,ignoreLocation:s=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:l=X.location,threshold:a=X.threshold,distance:u=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:l,threshold:a,distance:u},this.pattern=t?e:e.toLowerCase(),this.query=Fa(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],l=0;for(let a=0,u=t.length;a<u;a+=1){const p=t[a];o.length=0,s=0;for(let v=0,y=p.length;v<y;v+=1){const x=p[v],{isMatch:M,indices:j,score:q}=x.search(e);if(M){if(s+=1,l+=q,i){const J=x.constructor.type;Ha.has(J)?o=[...o,...j]:o.push(j)}}else{l=0,s=0,o.length=0;break}}if(s){let v={isMatch:!0,score:l/s};return i&&(v.indices=o),v}}return{isMatch:!1,score:1}}}const Xr=[];function Ya(...r){Xr.push(...r)}function Vr(r,e){for(let t=0,i=Xr.length;t<i;t+=1){let n=Xr[t];if(n.condition(r,e))return new n(r,e)}return new Dn(r,e)}const Vt={AND:"$and",OR:"$or"},Wr={PATH:"$path",PATTERN:"$val"},qr=r=>!!(r[Vt.AND]||r[Vt.OR]),za=r=>!!r[Wr.PATH],Xa=r=>!Xe(r)&&Pn(r)&&!qr(r),Fn=r=>({[Vt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function Hn(r,e,{auto:t=!0}={}){const i=n=>{let s=Object.keys(n);const o=za(n);if(!o&&s.length>1&&!qr(n))return i(Fn(n));if(Xa(n)){const a=o?n[Wr.PATH]:s[0],u=o?n[Wr.PATTERN]:n[a];if(!Fe(u))throw new Error(xa(a));const p={keyId:Ur(a),pattern:u};return t&&(p.searcher=Vr(u,e)),p}let l={children:[],operator:s[0]};return s.forEach(a=>{const u=n[a];Xe(u)&&u.forEach(p=>{l.children.push(i(p))})}),l};return qr(r)||(r=Fn(r)),i(r)}function Va(r,{ignoreFieldNorm:e=X.ignoreFieldNorm}){r.forEach(t=>{let i=1;t.matches.forEach(({key:n,norm:s,score:o})=>{const l=n?n.weight:null;i*=Math.pow(o===0&&l?Number.EPSILON:o,(l||1)*(e?1:s))}),t.score=i})}function Wa(r,e){const t=r.matches;e.matches=[],Oe(t)&&t.forEach(i=>{if(!Oe(i.indices)||!i.indices.length)return;const{indices:n,value:s}=i;let o={indices:n,value:s};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function qa(r,e){e.score=r.score}function Ga(r,e,{includeMatches:t=X.includeMatches,includeScore:i=X.includeScore}={}){const n=[];return t&&n.push(Wa),i&&n.push(qa),r.map(s=>{const{idx:o}=s,l={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,l)}),l})}class yt{constructor(e,t={},i){this.options={...X,...t},this.options.useExtendedSearch,this._keyStore=new Ea(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Yr))throw new Error(ba);this._myIndex=t||Rn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Oe(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,n=this._docs.length;i<n;i+=1){const s=this._docs[i];e(s,i)&&(this.removeAt(i),i-=1,n-=1,t.push(s))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;let a=Fe(e)?Fe(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Va(a,{ignoreFieldNorm:l}),s&&a.sort(o),Sn(t)&&t>-1&&(a=a.slice(0,t)),Ga(a,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const t=Vr(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:l})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:p}=t.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:u,value:s,norm:l,indices:p}]})}),n}_searchLogical(e){const t=Hn(e,this.options),i=(l,a,u)=>{if(!l.children){const{keyId:v,searcher:y}=l,x=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(a,v),searcher:y});return x&&x.length?[{idx:u,item:a,matches:x}]:[]}const p=[];for(let v=0,y=l.children.length;v<y;v+=1){const x=l.children[v],M=i(x,a,u);if(M.length)p.push(...M);else if(l.operator===Vt.AND)return[]}return p},n=this._myIndex.records,s={},o=[];return n.forEach(({$:l,i:a})=>{if(Oe(l)){let u=i(t,l,a);u.length&&(s[a]||(s[a]={idx:a,item:l,matches:[]},o.push(s[a])),u.forEach(({matches:p})=>{s[a].matches.push(...p)}))}}),o}_searchObjectList(e){const t=Vr(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:l})=>{if(!Oe(o))return;let a=[];i.forEach((u,p)=>{a.push(...this._findMatches({key:u,value:o[p],searcher:t}))}),a.length&&s.push({idx:l,item:o,matches:a})}),s}_findMatches({key:e,value:t,searcher:i}){if(!Oe(t))return[];let n=[];if(Xe(t))t.forEach(({v:s,i:o,n:l})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:p}=i.searchIn(s);a&&n.push({score:u,key:e,value:s,idx:o,norm:l,indices:p})});else{const{v:s,n:o}=t,{isMatch:l,score:a,indices:u}=i.searchIn(s);l&&n.push({score:a,key:e,value:s,norm:o,indices:u})}return n}}yt.version="6.6.2",yt.createIndex=Rn,yt.parseIndex=Sa,yt.config=X,yt.parseQuery=Hn,Ya(Ua);const Ka=(r,e="highlight",t="title")=>{const i=(s,o,l)=>{const a=o.split(".");let u;for(u=0;u<a.length-1;u++)s=s[a[u]];s[a[u]]=l},n=(s,o=[])=>{let l="",a=0;return o.forEach(u=>{const p=u[1]+1;l+=[s.substring(a,u[0]),`<mark class="${e}">`,s.substring(u[0],p),"</mark>"].join(""),a=p}),l+=s.substring(a),l};return r.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const l={...s};return o.forEach(a=>{a.key===t&&i(l,a.key,n(a.value,a.indices))}),l})};let Un;const Ja=(r,e)=>{Un=new yt(r,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},Za=async(r,e,t)=>{const i=Object.entries(e).filter(([l,a])=>a.type==="text"||a.type==="select"||a.type==="multiselect").reduce((l,[a,u])=>{const p="$or",v=[],y=(x,M)=>{const j={};u.type==="text"?j[x]=`${M}`:j[a]=`="${x}"`,v.push(j)};return Object.entries(u.state).filter(([x,M])=>M).forEach(([x,M])=>y(x,M)),v.length>0&&l.push({[p]:v}),l},[]);let n;if(!(i.length>0)&&t.matchAllWhenEmpty!==!1)n=r;else{const l={$and:[...i]},a=Un.search(l);n=t.enableHighlighting?Ka(a,"highlight",t.titleProperty):a.map(u=>u.item)}const s=Object.entries(e).filter(([l,a])=>a.type==="range").reduce((l,[a,u])=>(l[a]={min:u.state.min,max:u.state.max,format:u.format},l),{});if(Object.keys(s).length>0){const l=[];for(let a=0;a<n.length;a++){const u={};for(const[p,v]of Object.entries(s)){const y=x=>v.format==="date"?Bt(x).unix():x;n[a].hasOwnProperty(p)?Array.isArray(n[a][p])?u[p]=s[p].min<=y(n[a][p][1])&&y(n[a][p][0])<=s[p].max:y(n[a][p])>=s[p].min&&y(n[a][p])<=s[p].max?u[p]=!0:u[p]=!1:u[p]=!0}Object.values(u).every(p=>!!p)&&l.push(n[a])}n=[...l]}const o=Object.entries(e).filter(([l,a])=>a.type==="spatial").reduce((l,[a,u])=>(l[a]={geometry:u.state.geometry,mode:u.state.mode},l),{});if(Object.values(o).map(l=>l.geometry).filter(l=>!!l).length>0){const l=[];for(let a=0;a<n.length;a++){const u={};for(const p of Object.keys(o)){const v=o[p].mode||"within";n[a].hasOwnProperty(p)&&(v==="within"?ha(n[a][p],o[p].geometry):ua(n[a][p],o[p].geometry))?u[p]=!0:u[p]=!1}Object.values(u).every(p=>!!p)&&l.push(n[a])}n=[...l]}return n},Qa=async(r,e,t)=>(await(await fetch(`${t.externalFilter(r,e)}`)).json()).features;var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Ve=(r,e,t,i)=>{for(var n=i>1?void 0:i?tl(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&el(e,t,n),n};class Gr{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title",this.expandMultipleFilters=!0,this.expandMultipleResults=!0}}ye.EOxItemFilter=class extends ks{constructor(){super(...arguments),this._resultAggregation=[],this.filters={},this.items=[],this._config=new Gr,this.apply=e=>{this.items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?Bt(o).unix():parseInt(o);this.items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const l=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,l[0]):l[0],n.max=n.max!==void 0?Math.max(n.max,l[1]):l[1]}else{const l=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,l):l,n.max=n.max!==void 0?Math.max(n.max,l):l}return}Array.isArray(o[i.key])?o[i.key].forEach(l=>{n[l]=void 0}):i.type==="spatial"?(n.geometry=void 0,n.mode=i.mode||"intersects"):n[o[i.key]]=void 0}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!0},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this.items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this.items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const t=[];Object.values(this.filters).forEach(i=>{i.type==="text"?i.keys.forEach(n=>{t.includes(n)||t.push(n)}):(i.type==="select"||i.type==="multiselect")&&(t.includes(i.key)||t.push(i.key))}),Ja(this.items,{keys:t,...this._config.fuseConfig}),this.search()}}set config(e){const t=this._config;this._config={...new Gr,...e},this.requestUpdate("config",t)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await Qa(this.items,this.filters,this._config):e=await Za(this.items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,t){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(l=>this.filters[this._config.aggregateResults].state[l])),(s!=null&&s.length?s.includes(t):!0)&&Array.isArray(n)?n.includes(t):n===t})}sortResults(e){return[...e].sort((t,i)=>t[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}toggleAccordion(e){let t;if(e.detail?t=e.detail.target:t=e.target,t.classList.contains("details-filter")){if(!t.open||this.config.expandMultipleFilters)return;this.shadowRoot.querySelectorAll("eox-itemfilter-expandcontainer").forEach(i=>{const n=i.shadowRoot.querySelector(".details-filter");n&&n!==t&&n.removeAttribute("open")})}else{if(!t.open||this.config.expandMultipleResults)return;this.shadowRoot.querySelectorAll("details").forEach(i=>{i!==t&&i.removeAttribute("open")})}}render(){return he`
|
|
573
|
+
`}};Sn([Pe()],Fr.prototype,"filterObject",2),Fr=Sn([Ge("eox-itemfilter-text")],Fr);function Xe(r){return Array.isArray?Array.isArray(r):Cn(r)==="[object Array]"}const va=1/0;function ma(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-va?"-0":e}function ya(r){return r==null?"":ma(r)}function He(r){return typeof r=="string"}function Pn(r){return typeof r=="number"}function ba(r){return r===!0||r===!1||xa(r)&&Cn(r)=="[object Boolean]"}function kn(r){return typeof r=="object"}function xa(r){return kn(r)&&r!==null}function ke(r){return r!=null}function Hr(r){return!r.trim().length}function Cn(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const oc="Extended search is not available",$a="Incorrect 'index' type",wa=r=>`Invalid value for key ${r}`,_a=r=>`Pattern length exceeds max of ${r}.`,Ea=r=>`Missing ${r} property in key`,Ma=r=>`Property 'weight' in key '${r}' must be a positive integer`,Ln=Object.prototype.hasOwnProperty;class Aa{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Tn(i);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Tn(r){let e=null,t=null,i=null,n=1,s=null;if(He(r)||Xe(r))i=r,e=Rn(r),t=Ur(r);else{if(!Ln.call(r,"name"))throw new Error(Ea("name"));const o=r.name;if(i=o,Ln.call(r,"weight")&&(n=r.weight,n<=0))throw new Error(Ma(o));e=Rn(o),t=Ur(o),s=r.getFn}return{path:e,id:t,weight:n,src:i,getFn:s}}function Rn(r){return Xe(r)?r:r.split(".")}function Ur(r){return Xe(r)?r.join("."):r}function Oa(r,e){let t=[],i=!1;const n=(s,o,a)=>{if(ke(s))if(!o[a])t.push(s);else{let l=o[a];const u=s[l];if(!ke(u))return;if(a===o.length-1&&(He(u)||Pn(u)||ba(u)))t.push(ya(u));else if(Xe(u)){i=!0;for(let p=0,m=u.length;p<m;p+=1)n(u[p],o,a+1)}else o.length&&n(u,o,a+1)}};return n(r,He(e)?e.split("."):e,0),i?t:t[0]}var V={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Oa,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Sa=/[^ ]+/g;function Pa(r=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(Sa).length;if(t.has(s))return t.get(s);const o=1/Math.pow(s,.5*r),a=parseFloat(Math.round(o*i)/i);return t.set(s,a),a},clear(){t.clear()}}}class Yr{constructor({getFn:e=V.getFn,fieldNormWeight:t=V.fieldNormWeight}={}){this.norm=Pa(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,He(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();He(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!ke(e)||Hr(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(ke(o)){if(Xe(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:u,value:p}=l.pop();if(ke(p))if(He(p)&&!Hr(p)){let m={v:p,i:u,n:this.norm.get(p)};a.push(m)}else Xe(p)&&p.forEach((m,b)=>{l.push({nestedArrIndex:b,value:m})})}i.$[s]=a}else if(He(o)&&!Hr(o)){let a={v:o,n:this.norm.get(o)};i.$[s]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Dn(r,e,{getFn:t=V.getFn,fieldNormWeight:i=V.fieldNormWeight}={}){const n=new Yr({getFn:t,fieldNormWeight:i});return n.setKeys(r.map(Tn)),n.setSources(e),n.create(),n}function ka(r,{getFn:e=V.getFn,fieldNormWeight:t=V.fieldNormWeight}={}){const{keys:i,records:n}=r,s=new Yr({getFn:e,fieldNormWeight:t});return s.setKeys(i),s.setIndexRecords(n),s}function Xt(r,{errors:e=0,currentLocation:t=0,expectedLocation:i=0,distance:n=V.distance,ignoreLocation:s=V.ignoreLocation}={}){const o=e/r.length;if(s)return o;const a=Math.abs(i-t);return n?o+a/n:a?1:o}function Ca(r=[],e=V.minMatchCharLength){let t=[],i=-1,n=-1,s=0;for(let o=r.length;s<o;s+=1){let a=r[s];a&&i===-1?i=s:!a&&i!==-1&&(n=s-1,n-i+1>=e&&t.push([i,n]),i=-1)}return r[s-1]&&s-i>=e&&t.push([i,s-1]),t}const ot=32;function La(r,e,t,{location:i=V.location,distance:n=V.distance,threshold:s=V.threshold,findAllMatches:o=V.findAllMatches,minMatchCharLength:a=V.minMatchCharLength,includeMatches:l=V.includeMatches,ignoreLocation:u=V.ignoreLocation}={}){if(e.length>ot)throw new Error(_a(ot));const p=e.length,m=r.length,b=Math.max(0,Math.min(i,m));let x=s,E=b;const I=a>1||l,q=I?Array(m):[];let J;for(;(J=r.indexOf(e,E))>-1;){let M=Xt(e,{currentLocation:J,expectedLocation:b,distance:n,ignoreLocation:u});if(x=Math.min(M,x),E=J+p,I){let C=0;for(;C<p;)q[J+C]=1,C+=1}}E=-1;let f=[],g=1,$=p+m;const O=1<<p-1;for(let M=0;M<p;M+=1){let C=0,B=$;for(;C<B;)Xt(e,{errors:M,currentLocation:b+B,expectedLocation:b,distance:n,ignoreLocation:u})<=x?C=B:$=B,B=Math.floor(($-C)/2+C);$=B;let F=Math.max(1,b-B+1),R=o?m:Math.min(b+B,m)+p,Q=Array(R+2);Q[R+1]=(1<<M)-1;for(let S=R;S>=F;S-=1){let P=S-1,A=t[r.charAt(P)];if(I&&(q[P]=+!!A),Q[S]=(Q[S+1]<<1|1)&A,M&&(Q[S]|=(f[S+1]|f[S])<<1|1|f[S+1]),Q[S]&O&&(g=Xt(e,{errors:M,currentLocation:P,expectedLocation:b,distance:n,ignoreLocation:u}),g<=x)){if(x=g,E=P,E<=b)break;F=Math.max(1,2*b-E)}}if(Xt(e,{errors:M+1,currentLocation:b,expectedLocation:b,distance:n,ignoreLocation:u})>x)break;f=Q}const _={isMatch:E>=0,score:Math.max(.001,g)};if(I){const M=Ca(q,a);M.length?l&&(_.indices=M):_.isMatch=!1}return _}function Ta(r){let e={};for(let t=0,i=r.length;t<i;t+=1){const n=r.charAt(t);e[n]=(e[n]||0)|1<<i-t-1}return e}class In{constructor(e,{location:t=V.location,threshold:i=V.threshold,distance:n=V.distance,includeMatches:s=V.includeMatches,findAllMatches:o=V.findAllMatches,minMatchCharLength:a=V.minMatchCharLength,isCaseSensitive:l=V.isCaseSensitive,ignoreLocation:u=V.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:u},this.pattern=l?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const p=(b,x)=>{this.chunks.push({pattern:b,alphabet:Ta(b),startIndex:x})},m=this.pattern.length;if(m>ot){let b=0;const x=m%ot,E=m-x;for(;b<E;)p(this.pattern.substr(b,ot),b),b+=ot;if(x){const I=m-ot;p(this.pattern.substr(I),I)}}else p(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:i}=this.options;if(t||(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:a,minMatchCharLength:l,ignoreLocation:u}=this.options;let p=[],m=0,b=!1;this.chunks.forEach(({pattern:E,alphabet:I,startIndex:q})=>{const{isMatch:J,score:f,indices:g}=La(e,E,I,{location:n+q,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:u});J&&(b=!0),m+=f,J&&g&&(p=[...p,...g])});let x={isMatch:b,score:b?m/this.chunks.length:1};return b&&i&&(x.indices=p),x}}class Ze{constructor(e){this.pattern=e}static isMultiMatch(e){return jn(e,this.multiRegex)}static isSingleMatch(e){return jn(e,this.singleRegex)}search(){}}function jn(r,e){const t=r.match(e);return t?t[1]:null}class Ra extends Ze{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Da extends Ze{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class Ia extends Ze{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class ja extends Ze{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Na extends Ze{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Ba extends Ze{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Nn extends Ze{constructor(e,{location:t=V.location,threshold:i=V.threshold,distance:n=V.distance,includeMatches:s=V.includeMatches,findAllMatches:o=V.findAllMatches,minMatchCharLength:a=V.minMatchCharLength,isCaseSensitive:l=V.isCaseSensitive,ignoreLocation:u=V.ignoreLocation}={}){super(e),this._bitapSearch=new In(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Bn extends Ze{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+s,n.push([i,t-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const zr=[Ra,Bn,Ia,ja,Ba,Na,Da,Nn],Fn=zr.length,Fa=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ha="|";function Ua(r,e={}){return r.split(Ha).map(t=>{let i=t.trim().split(Fa).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const a=i[s];let l=!1,u=-1;for(;!l&&++u<Fn;){const p=zr[u];let m=p.isMultiMatch(a);m&&(n.push(new p(m,e)),l=!0)}if(!l)for(u=-1;++u<Fn;){const p=zr[u];let m=p.isSingleMatch(a);if(m){n.push(new p(m,e));break}}}return n})}const Ya=new Set([Nn.type,Bn.type]);class za{constructor(e,{isCaseSensitive:t=V.isCaseSensitive,includeMatches:i=V.includeMatches,minMatchCharLength:n=V.minMatchCharLength,ignoreLocation:s=V.ignoreLocation,findAllMatches:o=V.findAllMatches,location:a=V.location,threshold:l=V.threshold,distance:u=V.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:a,threshold:l,distance:u},this.pattern=t?e:e.toLowerCase(),this.query=Ua(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],a=0;for(let l=0,u=t.length;l<u;l+=1){const p=t[l];o.length=0,s=0;for(let m=0,b=p.length;m<b;m+=1){const x=p[m],{isMatch:E,indices:I,score:q}=x.search(e);if(E){if(s+=1,a+=q,i){const J=x.constructor.type;Ya.has(J)?o=[...o,...I]:o.push(I)}}else{a=0,s=0,o.length=0;break}}if(s){let m={isMatch:!0,score:a/s};return i&&(m.indices=o),m}}return{isMatch:!1,score:1}}}const Xr=[];function Xa(...r){Xr.push(...r)}function Vr(r,e){for(let t=0,i=Xr.length;t<i;t+=1){let n=Xr[t];if(n.condition(r,e))return new n(r,e)}return new In(r,e)}const Vt={AND:"$and",OR:"$or"},Wr={PATH:"$path",PATTERN:"$val"},qr=r=>!!(r[Vt.AND]||r[Vt.OR]),Va=r=>!!r[Wr.PATH],Wa=r=>!Xe(r)&&kn(r)&&!qr(r),Hn=r=>({[Vt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function Un(r,e,{auto:t=!0}={}){const i=n=>{let s=Object.keys(n);const o=Va(n);if(!o&&s.length>1&&!qr(n))return i(Hn(n));if(Wa(n)){const l=o?n[Wr.PATH]:s[0],u=o?n[Wr.PATTERN]:n[l];if(!He(u))throw new Error(wa(l));const p={keyId:Ur(l),pattern:u};return t&&(p.searcher=Vr(u,e)),p}let a={children:[],operator:s[0]};return s.forEach(l=>{const u=n[l];Xe(u)&&u.forEach(p=>{a.children.push(i(p))})}),a};return qr(r)||(r=Hn(r)),i(r)}function qa(r,{ignoreFieldNorm:e=V.ignoreFieldNorm}){r.forEach(t=>{let i=1;t.matches.forEach(({key:n,norm:s,score:o})=>{const a=n?n.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:s))}),t.score=i})}function Ga(r,e){const t=r.matches;e.matches=[],ke(t)&&t.forEach(i=>{if(!ke(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 Ka(r,e){e.score=r.score}function Ja(r,e,{includeMatches:t=V.includeMatches,includeScore:i=V.includeScore}={}){const n=[];return t&&n.push(Ga),i&&n.push(Ka),r.map(s=>{const{idx:o}=s,a={item:e[o],refIndex:o};return n.length&&n.forEach(l=>{l(s,a)}),a})}class xt{constructor(e,t={},i){this.options={...V,...t},this.options.useExtendedSearch,this._keyStore=new Aa(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Yr))throw new Error($a);this._myIndex=t||Dn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){ke(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,n=this._docs.length;i<n;i+=1){const s=this._docs[i];e(s,i)&&(this.removeAt(i),i-=1,n-=1,t.push(s))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:a}=this.options;let l=He(e)?He(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return qa(l,{ignoreFieldNorm:a}),s&&l.sort(o),Pn(t)&&t>-1&&(l=l.slice(0,t)),Ja(l,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const t=Vr(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:a})=>{if(!ke(s))return;const{isMatch:l,score:u,indices:p}=t.searchIn(s);l&&n.push({item:s,idx:o,matches:[{score:u,value:s,norm:a,indices:p}]})}),n}_searchLogical(e){const t=Un(e,this.options),i=(a,l,u)=>{if(!a.children){const{keyId:m,searcher:b}=a,x=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(l,m),searcher:b});return x&&x.length?[{idx:u,item:l,matches:x}]:[]}const p=[];for(let m=0,b=a.children.length;m<b;m+=1){const x=a.children[m],E=i(x,l,u);if(E.length)p.push(...E);else if(a.operator===Vt.AND)return[]}return p},n=this._myIndex.records,s={},o=[];return n.forEach(({$:a,i:l})=>{if(ke(a)){let u=i(t,a,l);u.length&&(s[l]||(s[l]={idx:l,item:a,matches:[]},o.push(s[l])),u.forEach(({matches:p})=>{s[l].matches.push(...p)}))}}),o}_searchObjectList(e){const t=Vr(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:a})=>{if(!ke(o))return;let l=[];i.forEach((u,p)=>{l.push(...this._findMatches({key:u,value:o[p],searcher:t}))}),l.length&&s.push({idx:a,item:o,matches:l})}),s}_findMatches({key:e,value:t,searcher:i}){if(!ke(t))return[];let n=[];if(Xe(t))t.forEach(({v:s,i:o,n:a})=>{if(!ke(s))return;const{isMatch:l,score:u,indices:p}=i.searchIn(s);l&&n.push({score:u,key:e,value:s,idx:o,norm:a,indices:p})});else{const{v:s,n:o}=t,{isMatch:a,score:l,indices:u}=i.searchIn(s);a&&n.push({score:l,key:e,value:s,norm:o,indices:u})}return n}}xt.version="6.6.2",xt.createIndex=Dn,xt.parseIndex=ka,xt.config=V,xt.parseQuery=Un,Xa(za);const Za=(r,e="highlight",t="title")=>{const i=(s,o,a)=>{const l=o.split(".");let u;for(u=0;u<l.length-1;u++)s=s[l[u]];s[l[u]]=a},n=(s,o=[])=>{let a="",l=0;return o.forEach(u=>{const p=u[1]+1;a+=[s.substring(l,u[0]),`<mark class="${e}">`,s.substring(u[0],p),"</mark>"].join(""),l=p}),a+=s.substring(l),a};return r.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const a={};for(const[l,u]of Object.entries(s))a[l]=u;return o.forEach(l=>{l.key===t&&i(a,l.key,n(l.value,l.indices))}),a})};let Yn;const Qa=(r,e)=>{Yn=new xt(r,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},el=async(r,e,t)=>{const i=Object.entries(e).filter(([,a])=>a.type==="text"||a.type==="select"||a.type==="multiselect").reduce((a,[l,u])=>{const p="$or",m=[],b=(x,E)=>{const I={};u.type==="text"?I[x]=`${E}`:I[l]=`="${x}"`,m.push(I)};return Object.entries(u.state).filter(([,x])=>x).forEach(([x,E])=>b(x,E)),m.length>0&&a.push({[p]:m}),a},[]);let n;if(!(i.length>0)&&t.matchAllWhenEmpty!==!1)n=r;else{const a={$and:[...i]},l=Yn.search(a);n=t.enableHighlighting?Za(l,"highlight",t.titleProperty):l.map(u=>u.item)}const s=Object.entries(e).filter(([,a])=>a.type==="range").reduce((a,[l,u])=>(a[l]={min:u.state.min,max:u.state.max,format:u.format},a),{});if(Object.keys(s).length>0){const a=[];for(let l=0;l<n.length;l++){const u={};for(const[p,m]of Object.entries(s)){const b=x=>m.format==="date"?Bt(x).unix():x;Object.prototype.hasOwnProperty.call(n[l],p)?Array.isArray(n[l][p])?u[p]=s[p].min<=b(n[l][p][1])&&b(n[l][p][0])<=s[p].max:b(n[l][p])>=s[p].min&&b(n[l][p])<=s[p].max?u[p]=!0:u[p]=!1:u[p]=!0}Object.values(u).every(p=>!!p)&&a.push(n[l])}n=[...a]}const o=Object.entries(e).filter(([,a])=>a.type==="spatial").reduce((a,[l,u])=>(a[l]={geometry:u.state.geometry,mode:u.state.mode},a),{});if(Object.values(o).map(a=>a.geometry).filter(a=>!!a).length>0){const a=[];for(let l=0;l<n.length;l++){const u={};for(const p of Object.keys(o)){const m=o[p].mode||"within";Object.prototype.hasOwnProperty.call(n[l],p)&&(m==="within"?fa(n[l][p],o[p].geometry):da(n[l][p],o[p].geometry))?u[p]=!0:u[p]=!1}Object.values(u).every(p=>!!p)&&a.push(n[l])}n=[...a]}return n},tl=async(r,e,t)=>(await(await fetch(`${t.externalFilter(r,e)}`)).json()).features;var rl=Object.defineProperty,il=Object.getOwnPropertyDescriptor,Ve=(r,e,t,i)=>{for(var n=i>1?void 0:i?il(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&rl(e,t,n),n};class Gr{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title",this.expandMultipleFilters=!0,this.expandResults=!0,this.expandMultipleResults=!0}}xe.EOxItemFilter=class extends Ts{constructor(){super(...arguments),this._resultAggregation=[],this.filters={},this.items=[],this._config=new Gr,this.apply=e=>{this.items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?Bt(o).unix():parseInt(o);this.items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const a=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,a[0]):a[0],n.max=n.max!==void 0?Math.max(n.max,a[1]):a[1]}else{const a=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,a):a,n.max=n.max!==void 0?Math.max(n.max,a):a}return}Array.isArray(o[i.key])?o[i.key].forEach(a=>{n[a]=void 0}):i.type==="spatial"?(n.geometry=void 0,n.mode=i.mode||"intersects"):n[o[i.key]]=void 0}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!0},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this.items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this.items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const t=[];Object.values(this.filters).forEach(i=>{i.type==="text"?i.keys.forEach(n=>{t.includes(n)||t.push(n)}):(i.type==="select"||i.type==="multiselect")&&(t.includes(i.key)||t.push(i.key))}),Qa(this.items,{keys:t,...this._config.fuseConfig}),this.search()}}set config(e){const t=this._config;this._config={...new Gr,...e},this.requestUpdate("config",t)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await tl(this.items,this.filters,this._config):e=await el(this.items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,t){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(a=>this.filters[this._config.aggregateResults].state[a])),(s!=null&&s.length?s.includes(t):!0)&&Array.isArray(n)?n.includes(t):n===t})}sortResults(e){return[...e].sort((t,i)=>t[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}toggleAccordion(e){let t;if(e.detail?t=e.detail.target:t=e.target,t.classList.contains("details-filter")){if(!t.open||this.config.expandMultipleFilters)return;this.shadowRoot.querySelectorAll("eox-itemfilter-expandcontainer").forEach(i=>{const n=i.shadowRoot.querySelector(".details-filter");n&&n!==t&&n.removeAttribute("open")})}else{if(!t.open||this.config.expandMultipleResults)return;this.shadowRoot.querySelectorAll("details").forEach(i=>{i!==t&&i.removeAttribute("open")})}}render(){return ue`
|
|
566
574
|
<style>
|
|
567
|
-
${
|
|
568
|
-
${!this.unstyled&&
|
|
575
|
+
${Zi}
|
|
576
|
+
${!this.unstyled&&Qi}
|
|
569
577
|
${this.styleOverride}
|
|
570
578
|
</style>
|
|
571
579
|
<form
|
|
572
580
|
id="itemfilter"
|
|
573
581
|
@submit="${e=>e.preventDefault()}"
|
|
574
582
|
>
|
|
575
|
-
${
|
|
576
|
-
<section class="${this.config.inlineMode?"inline":
|
|
577
|
-
${
|
|
583
|
+
${ft(this._config.filterProperties.length,()=>ue`
|
|
584
|
+
<section class="${this.config.inlineMode?"inline":se}">
|
|
585
|
+
${ft(!this.config.inlineMode,()=>ue`
|
|
578
586
|
<slot name="filterstitle"
|
|
579
587
|
><h4 style="margin-top: 8px">Filters</h4></slot
|
|
580
588
|
>
|
|
581
589
|
`)}
|
|
582
590
|
<ul id="filters">
|
|
583
|
-
${
|
|
591
|
+
${pt(Object.values(this.filters),e=>xr`
|
|
584
592
|
<li>
|
|
585
593
|
${e.featured?xr`
|
|
586
594
|
<eox-itemfilter-${Nt(e.type)}
|
|
@@ -607,7 +615,7 @@ eox-itemfilter-range {
|
|
|
607
615
|
</li>
|
|
608
616
|
`)}
|
|
609
617
|
</ul>
|
|
610
|
-
${
|
|
618
|
+
${ft(this._config.filterProperties&&Object.values(this.filters).map(e=>e.dirty).filter(e=>e).length>0,()=>ue`
|
|
611
619
|
<button
|
|
612
620
|
id="filter-reset"
|
|
613
621
|
class="outline small"
|
|
@@ -619,7 +627,7 @@ eox-itemfilter-range {
|
|
|
619
627
|
`)}
|
|
620
628
|
</section>
|
|
621
629
|
`)}
|
|
622
|
-
${
|
|
630
|
+
${ft(this.config.showResults&&this.results,()=>ue`
|
|
623
631
|
<section id="section-results">
|
|
624
632
|
<div>
|
|
625
633
|
<slot name="resultstitle"
|
|
@@ -627,12 +635,12 @@ eox-itemfilter-range {
|
|
|
627
635
|
>
|
|
628
636
|
</div>
|
|
629
637
|
<div id="container-results" class="scroll">
|
|
630
|
-
${this.results.length<1?
|
|
638
|
+
${this.results.length<1?ue` <small class="no-results">No matching items</small> `:se}
|
|
631
639
|
<ul id="results" part="results">
|
|
632
|
-
${this._config.aggregateResults?
|
|
640
|
+
${this._config.aggregateResults?pt(this._resultAggregation.filter(e=>this.aggregateResults(this.results,e).length),e=>ue`<details
|
|
633
641
|
class="details-results"
|
|
634
642
|
@toggle=${this.toggleAccordion}
|
|
635
|
-
open
|
|
643
|
+
open=${this._config.expandResults||se}
|
|
636
644
|
>
|
|
637
645
|
<summary>
|
|
638
646
|
<span class="title">
|
|
@@ -643,9 +651,9 @@ eox-itemfilter-range {
|
|
|
643
651
|
</span>
|
|
644
652
|
</summary>
|
|
645
653
|
<ul>
|
|
646
|
-
${
|
|
654
|
+
${Ps(this.aggregateResults(this.results,e),t=>t.id,t=>{var i,n;return ue`
|
|
647
655
|
<li
|
|
648
|
-
class=${((i=this.selectedResult)==null?void 0:i[this._config.titleProperty])===t[this._config.titleProperty]?"highlighted":
|
|
656
|
+
class=${((i=this.selectedResult)==null?void 0:i[this._config.titleProperty])===t[this._config.titleProperty]?"highlighted":se}
|
|
649
657
|
>
|
|
650
658
|
<label>
|
|
651
659
|
<input
|
|
@@ -654,19 +662,19 @@ eox-itemfilter-range {
|
|
|
654
662
|
class="result-radio"
|
|
655
663
|
name="result"
|
|
656
664
|
id="${t.id}"
|
|
657
|
-
checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===t[this._config.titleProperty]||
|
|
665
|
+
checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===t[this._config.titleProperty]||se}
|
|
658
666
|
@click=${()=>{this.selectedResult=t,this._config.onSelect(t)}}
|
|
659
667
|
/>
|
|
660
|
-
${
|
|
668
|
+
${ft(this.hasTemplate("result"),()=>this.renderTemplate("result",t,`result-${t.id}`),()=>ue`
|
|
661
669
|
<span class="title"
|
|
662
|
-
>${
|
|
670
|
+
>${qi(t[this._config.titleProperty])}</span
|
|
663
671
|
>
|
|
664
672
|
`)}
|
|
665
673
|
</label>
|
|
666
674
|
</li>
|
|
667
675
|
`})}
|
|
668
676
|
</ul>
|
|
669
|
-
</details>`):
|
|
677
|
+
</details>`):pt(this.results,e=>ue`<li part="result">
|
|
670
678
|
<label>
|
|
671
679
|
<input
|
|
672
680
|
type="radio"
|
|
@@ -674,9 +682,9 @@ eox-itemfilter-range {
|
|
|
674
682
|
id="${e.id}"
|
|
675
683
|
@click=${()=>{this.selectedResult=e,this._config.onSelect(e)}}
|
|
676
684
|
/>
|
|
677
|
-
${
|
|
685
|
+
${ft(this.hasTemplate("result"),()=>this.renderTemplate("result",e,`result-${e.id}`),()=>ue`
|
|
678
686
|
<span class="title"
|
|
679
|
-
>${
|
|
687
|
+
>${qi(e[this._config.titleProperty])}</span
|
|
680
688
|
>
|
|
681
689
|
`)}
|
|
682
690
|
</label>
|
|
@@ -686,4 +694,4 @@ eox-itemfilter-range {
|
|
|
686
694
|
</section>
|
|
687
695
|
`)}
|
|
688
696
|
</form>
|
|
689
|
-
`}},Ve([Pt()],
|
|
697
|
+
`}},Ve([Pt()],xe.EOxItemFilter.prototype,"filters",2),Ve([Pt()],xe.EOxItemFilter.prototype,"items",2),Ve([Pt()],xe.EOxItemFilter.prototype,"results",2),Ve([Pt()],xe.EOxItemFilter.prototype,"selectedResult",2),Ve([Pe({attribute:!1})],xe.EOxItemFilter.prototype,"config",1),Ve([Pe()],xe.EOxItemFilter.prototype,"apply",2),Ve([Pe({attribute:!1})],xe.EOxItemFilter.prototype,"styleOverride",2),Ve([Pe({type:Boolean})],xe.EOxItemFilter.prototype,"unstyled",2),xe.EOxItemFilter=Ve([Ge("eox-itemfilter")],xe.EOxItemFilter),xe.ElementConfig=Gr,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});
|