@eox/layercontrol 0.25.2 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +1884 -1857
- package/dist/eox-layercontrol.umd.cjs +157 -143
- package/package.json +3 -3
- package/src/components/layer.js +15 -1
- package/types/layercontrol/src/components/layer.d.ts.map +1 -1
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(L,P){typeof exports=="object"&&typeof module<"u"?P(exports):typeof define=="function"&&define.amd?define(["exports"],P):(L=typeof globalThis<"u"?globalThis:L||self,P(L["eox-layercontrol"]={}))})(this,function(L){"use strict";var wa=Object.defineProperty;var Zo=L=>{throw TypeError(L)};var xa=(L,P,X)=>P in L?wa(L,P,{enumerable:!0,configurable:!0,writable:!0,value:X}):L[P]=X;var z=(L,P,X)=>xa(L,typeof P!="symbol"?P+"":P,X),gn=(L,P,X)=>P.has(L)||Zo("Cannot "+X);var T=(L,P,X)=>(gn(L,P,"read from private field"),X?X.call(L):P.get(L)),R=(L,P,X)=>P.has(L)?Zo("Cannot add the same private member more than once"):P instanceof WeakSet?P.add(L):P.set(L,X),fe=(L,P,X,ie)=>(gn(L,P,"write to private field"),ie?ie.call(L,X):P.set(L,X),X),q=(L,P,X)=>(gn(L,P,"access private method"),X);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var Fo,ri,si,Mt,he,Ie,Ne,mn,ai,li,di,zo,ui,ci,He,hi,pi,fi,gi,Ct,ge,qo,mi,yi,bi,vi,wi,xi,Ei,Xo,st,Yo,Wo,yn,Go,Jo,Ti,$i,Si,Ft,pe,Ko,Qo,_i;const P=globalThis,X=P.ShadowRoot&&(P.ShadyCSS===void 0||P.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ie=Symbol(),bn=new WeakMap;let vn=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==ie)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(X&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=bn.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&bn.set(e,t))}return t}toString(){return this.cssText}};const tr=i=>new vn(typeof i=="string"?i:i+"",void 0,ie),wn=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,o,r)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+i[r+1],i[0]);return new vn(e,i,ie)},er=(i,t)=>{if(X)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const n=document.createElement("style"),o=P.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,i.appendChild(n)}},xn=X?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return tr(e)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:ir,defineProperty:nr,getOwnPropertyDescriptor:or,getOwnPropertyNames:rr,getOwnPropertySymbols:sr,getPrototypeOf:ar}=Object,Nt=globalThis,En=Nt.trustedTypes,lr=En?En.emptyScript:"",Di=Nt.reactiveElementPolyfillSupport,me=(i,t)=>i,Pi={toAttribute(i,t){switch(t){case Boolean:i=i?lr:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},$n=(i,t)=>!ir(i,t),Sn={attribute:!0,type:String,converter:Pi,reflect:!1,hasChanged:$n};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Nt.litPropertyMetadata??(Nt.litPropertyMetadata=new WeakMap);class ne extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Sn){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(t,n,e);o!==void 0&&nr(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){const{get:o,set:r}=or(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get(){return o==null?void 0:o.call(this)},set(s){const a=o==null?void 0:o.call(this);r.call(this,s),this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Sn}static _$Ei(){if(this.hasOwnProperty(me("elementProperties")))return;const t=ar(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(me("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(me("properties"))){const e=this.properties,n=[...rr(e),...sr(e)];for(const o of n)this.createProperty(o,e[o])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[n,o]of e)this.elementProperties.set(n,o)}this._$Eh=new Map;for(const[e,n]of this.elementProperties){const o=this._$Eu(e,n);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)e.unshift(xn(o))}else t!==void 0&&e.push(xn(t));return e}static _$Eu(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return er(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var n;return(n=e.hostConnected)==null?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var n;return(n=e.hostDisconnected)==null?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EC(t,e){var r;const n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===!0){const s=(((r=n.converter)==null?void 0:r.toAttribute)!==void 0?n.converter:Pi).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){var r;const n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const s=n.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((r=s.converter)==null?void 0:r.fromAttribute)!==void 0?s.converter:Pi;this._$Em=o,this[o]=a.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,n){if(t!==void 0){if(n??(n=this.constructor.getPropertyOptions(t)),!(n.hasChanged??$n)(this[t],e))return;this.P(t,e,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,n){this._$AL.has(t)||this._$AL.set(t,e),n.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[r,s]of o)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(n=this._$EO)==null||n.forEach(o=>{var r;return(r=o.hostUpdate)==null?void 0:r.call(o)}),this.update(e)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(n=>{var o;return(o=n.hostUpdated)==null?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}ne.elementStyles=[],ne.shadowRootOptions={mode:"open"},ne[me("elementProperties")]=new Map,ne[me("finalized")]=new Map,Di==null||Di({ReactiveElement:ne}),(Nt.reactiveElementVersions??(Nt.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const ye=globalThis,Be=ye.trustedTypes,_n=Be?Be.createPolicy("lit-html",{createHTML:i=>i}):void 0,Oi="$lit$",Tt=`lit$${Math.random().toFixed(9).slice(2)}$`,Ri="?"+Tt,dr=`<${Ri}>`,Zt=document,be=()=>Zt.createComment(""),ve=i=>i===null||typeof i!="object"&&typeof i!="function",Li=Array.isArray,An=i=>Li(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Mi=`[
|
|
14
|
+
\f\r]`,we=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Cn=/-->/g,Tn=/>/g,zt=RegExp(`>|${Mi}(?:([^\\s"'>=/]+)(${Mi}*=${Mi}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dn=/'/g,Pn=/"/g,On=/^(?:script|style|textarea|title)$/i,ur=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),x=ur(1),xt=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),Rn=new WeakMap,qt=Zt.createTreeWalker(Zt,129);function Ln(i,t){if(!Li(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return _n!==void 0?_n.createHTML(t):t}const Mn=(i,t)=>{const e=i.length-1,n=[];let o,r=t===2?"<svg>":t===3?"<math>":"",s=we;for(let a=0;a<e;a++){const l=i[a];let d,c,u=-1,p=0;for(;p<l.length&&(s.lastIndex=p,c=s.exec(l),c!==null);)p=s.lastIndex,s===we?c[1]==="!--"?s=Cn:c[1]!==void 0?s=Tn:c[2]!==void 0?(On.test(c[2])&&(o=RegExp("</"+c[2],"g")),s=zt):c[3]!==void 0&&(s=zt):s===zt?c[0]===">"?(s=o??we,u=-1):c[1]===void 0?u=-2:(u=s.lastIndex-c[2].length,d=c[1],s=c[3]===void 0?zt:c[3]==='"'?Pn:Dn):s===Pn||s===Dn?s=zt:s===Cn||s===Tn?s=we:(s=zt,o=void 0);const f=s===zt&&i[a+1].startsWith("/>")?" ":"";r+=s===we?l+dr:u>=0?(n.push(d),l.slice(0,u)+Oi+l.slice(u)+Tt+f):l+Tt+(u===-2?a:f)}return[Ln(i,r+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class xe{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[d,c]=Mn(t,e);if(this.el=xe.createElement(d,n),qt.currentNode=this.el.content,e===2||e===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=qt.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const u of o.getAttributeNames())if(u.endsWith(Oi)){const p=c[s++],f=o.getAttribute(u).split(Tt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:g[2],strings:f,ctor:g[1]==="."?Nn:g[1]==="?"?Hn:g[1]==="@"?Vn:Ee}),o.removeAttribute(u)}else u.startsWith(Tt)&&(l.push({type:6,index:r}),o.removeAttribute(u));if(On.test(o.tagName)){const u=o.textContent.split(Tt),p=u.length-1;if(p>0){o.textContent=Be?Be.emptyScript:"";for(let f=0;f<p;f++)o.append(u[f],be()),qt.nextNode(),l.push({type:2,index:++r});o.append(u[p],be())}}}else if(o.nodeType===8)if(o.data===Ri)l.push({type:2,index:r});else{let u=-1;for(;(u=o.data.indexOf(Tt,u+1))!==-1;)l.push({type:7,index:r}),u+=Tt.length-1}r++}}static createElement(t,e){const n=Zt.createElement("template");return n.innerHTML=t,n}}function Xt(i,t,e=i,n){var s,a;if(t===xt)return t;let o=n!==void 0?(s=e._$Co)==null?void 0:s[n]:e._$Cl;const r=ve(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(i),o._$AT(i,e,n)),n!==void 0?(e._$Co??(e._$Co=[]))[n]=o:e._$Cl=o),o!==void 0&&(t=Xt(i,o._$AS(i,t.values),o,n)),t}let In=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,o=((t==null?void 0:t.creationScope)??Zt).importNode(e,!0);qt.currentNode=o;let r=qt.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let d;l.type===2?d=new oe(r,r.nextSibling,this,t):l.type===1?d=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(d=new Bn(r,this,t)),this._$AV.push(d),l=n[++a]}s!==(l==null?void 0:l.index)&&(r=qt.nextNode(),s++)}return qt.currentNode=Zt,o}p(t){let e=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}};class oe{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Xt(this,t,e),ve(t)?t===O||t==null||t===""?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==xt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):An(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==O&&ve(this._$AH)?this._$AA.nextSibling.data=t:this.T(Zt.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=xe.createElement(Ln(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(e);else{const s=new In(o,this),a=s.u(this.options);s.p(e),this.T(a),this._$AH=s}}_$AC(t){let e=Rn.get(t.strings);return e===void 0&&Rn.set(t.strings,e=new xe(t)),e}k(t){Li(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,o=0;for(const r of t)o===e.length?e.push(n=new oe(this.O(be()),this.O(be()),this,this.options)):n=e[o],n._$AI(r),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class Ee{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,o,r){this.type=1,this._$AH=O,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=O}_$AI(t,e=this,n,o){const r=this.strings;let s=!1;if(r===void 0)t=Xt(this,t,e,0),s=!ve(t)||t!==this._$AH&&t!==xt,s&&(this._$AH=t);else{const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Xt(this,a[n+l],e,l),d===xt&&(d=this._$AH[l]),s||(s=!ve(d)||d!==this._$AH[l]),d===O?t=O:t!==O&&(t+=(d??"")+r[l+1]),this._$AH[l]=d}s&&!o&&this.j(t)}j(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Nn extends Ee{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===O?void 0:t}}class Hn extends Ee{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==O)}}class Vn extends Ee{constructor(t,e,n,o,r){super(t,e,n,o,r),this.type=5}_$AI(t,e=this){if((t=Xt(this,t,e,0)??O)===xt)return;const n=this._$AH,o=t===O&&n!==O||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==O&&(n===O||o);o&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Bn{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Xt(this,t)}}const cr={M:Oi,P:Tt,A:Ri,C:1,L:Mn,R:In,D:An,V:Xt,I:oe,H:Ee,N:Hn,U:Vn,B:Nn,F:Bn},Ii=ye.litHtmlPolyfillSupport;Ii==null||Ii(xe,oe),(ye.litHtmlVersions??(ye.litHtmlVersions=[])).push("3.2.1");const hr=(i,t,e)=>{const n=(e==null?void 0:e.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const r=(e==null?void 0:e.renderBefore)??null;n._$litPart$=o=new oe(t.insertBefore(be(),r),r,void 0,e??{})}return o._$AI(i),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let
|
|
19
|
+
*/let dt=class extends ne{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=hr(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return xt}};dt._$litElement$=!0,dt.finalized=!0,(Fo=globalThis.litElementHydrateSupport)==null||Fo.call(globalThis,{LitElement:dt});const Ni=globalThis.litElementPolyfillSupport;Ni==null||Ni({LitElement:dt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function
|
|
23
|
+
*/function Q(i,t,e){return i?t(i):e==null?void 0:e(i)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const Ht={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Hi=i=>(...t)=>({_$litDirective$:i,values:t});class Vi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{I:
|
|
31
|
+
*/const{I:pr}=cr,fr=i=>i.strings===void 0,kn=()=>document.createComment(""),$e=(i,t,e)=>{var r;const n=i._$AA.parentNode,o=t===void 0?i._$AB:t._$AA;if(e===void 0){const s=n.insertBefore(kn(),o),a=n.insertBefore(kn(),o);e=new pr(s,a,i,i.options)}else{const s=e._$AB.nextSibling,a=e._$AM,l=a!==i;if(l){let d;(r=e._$AQ)==null||r.call(e,i),e._$AM=i,e._$AP!==void 0&&(d=i._$AU)!==a._$AU&&e._$AP(d)}if(s!==o||l){let d=e._$AA;for(;d!==s;){const c=d.nextSibling;n.insertBefore(d,o),d=c}}}return e},Yt=(i,t,e=i)=>(i._$AI(t,e),i),gr={},Un=(i,t=gr)=>i._$AH=t,mr=i=>i._$AH,Bi=i=>{var n;(n=i._$AP)==null||n.call(i,!1,!0);let t=i._$AA;const e=i._$AB.nextSibling;for(;t!==e;){const o=t.nextSibling;t.remove(),t=o}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const Fn=(i,t,e)=>{const n=new Map;for(let o=t;o<=e;o++)n.set(i[o],o);return n},yr=Hi(class extends Vi{constructor(i){if(super(i),i.type!==Ht.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,t,e){let n;e===void 0?e=t:t!==void 0&&(n=t);const o=[],r=[];let s=0;for(const a of i)o[s]=n?n(a,s):s,r[s]=e(a,s),s++;return{values:r,keys:o}}render(i,t,e){return this.dt(i,t,e).values}update(i,[t,e,n]){const o=mr(i),{values:r,keys:s}=this.dt(t,e,n);if(!Array.isArray(o))return this.ut=s,r;const a=this.ut??(this.ut=[]),l=[];let d,c,u=0,p=o.length-1,f=0,g=r.length-1;for(;u<=p&&f<=g;)if(o[u]===null)u++;else if(o[p]===null)p--;else if(a[u]===s[f])l[f]=Yt(o[u],r[f]),u++,f++;else if(a[p]===s[g])l[g]=Yt(o[p],r[g]),p--,g--;else if(a[u]===s[g])l[g]=Yt(o[u],r[g]),$e(i,l[g+1],o[u]),u++,g--;else if(a[p]===s[f])l[f]=Yt(o[p],r[f]),$e(i,o[u],o[p]),p--,f++;else if(d===void 0&&(d=Fn(s,f,g),c=Fn(a,u,p)),d.has(a[u]))if(d.has(a[p])){const b=c.get(s[f]),V=b!==void 0?o[b]:null;if(V===null){const et=$e(i,o[u]);Yt(et,r[f]),l[f]=et}else l[f]=Yt(V,r[f]),$e(i,o[u],V),o[b]=null;f++}else Bi(o[p]),p--;else Bi(o[u]),u++;for(;f<=g;){const b=$e(i,l[g+1]);Yt(b,r[f]),l[f++]=b}for(;u<=p;){const b=o[u++];b!==null&&Bi(b)}return this.ut=s,Un(i,l),xt}});/**
|
|
36
36
|
* wms-capabilities @0.6.0
|
|
37
37
|
* @description WMS service Capabilities > JSON, based on openlayers
|
|
38
38
|
* @license BSD-2-Clause
|
|
39
39
|
* @preserve
|
|
40
|
-
*/var
|
|
41
|
-
* Sortable 1.15.
|
|
40
|
+
*/var S=i=>i!==void 0,jn=(i,t,e)=>t in i?i[t]:i[t]=e;const Se={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class br{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,e){return ke(t,e).join("")}}function ke(i,t){return Zn(i,t,[]).join("")}function Zn(i,t,e){if(i.nodeType===Se.CDATA_SECTION||i.nodeType===Se.TEXT)t?e.push(String(i.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(i.nodeValue);else{var n;for(n=i.firstChild;n;n=n.nextSibling)Zn(n,t,e)}return e}function vr(i,t,e,n){for(var o=wr(t);o;o=xr(o)){var r=o.namespaceURI||null,s=i[r];if(S(s)){var a=s[o.localName];S(a)&&a.call(n,o,e)}}}function wr(i){let t=i.firstElementChild||i.firstChild;for(;t&&t.nodeType!==Se.ELEMENT;)t=t.nextSibling;return t}function xr(i){let t=i.nextElementSibling||i.nextSibling;for(;t&&t.nodeType!==Se.ELEMENT;)t=t.nextSibling;return t}function nt(i,t,e){return Er(i,t,e)}function Er(i,t,e){var n=S(e)?e:{},o,r;for(o=0,r=i.length;o<r;++o)n[i[o]]=t;return n}function zn(i,t){return function(e,n){var o=i.call(S(t)?t:this,e,n);if(S(o)){var r=n[n.length-1];r.push(o)}}}function tt(i,t,e,n,o){return n.push(i),vr(t,e,n,o),n.pop()}function y(i,t,e){return function(n,o){let r=i.call(S(e)?e:this,n,o);if(S(r)){var s=o[o.length-1],a=S(t)?t:n.localName;s[a]=r}}}function ht(i,t,e){return function(n,o){var r=i.call(S(e)?e:this,n,o);if(S(r)){var s=o[o.length-1],a=S(t)?t:n.localName,l=jn(s,a,[]);l.push(r)}}}const $r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function Sr(i){return i.replace($r,"")}function Wt(i){const t=/^\s*(true|1)|(false|0)\s*$/.exec(i);if(t)return S(t[1])||!1}function re(i){return Dt(ke(i,!1))}function Dt(i){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i);if(t)return parseFloat(t[1])}function ki(i){return Ue(ke(i,!1))}function Ue(i){const t=/^\s*(\d+)\s*$/.exec(i);if(t)return parseInt(t[1],10)}function D(i){return Sr(ke(i,!1))}const _r="http://www.w3.org/1999/xlink";function Ui(i){return i.getAttributeNS(_r,"href")}function Ar(i,t){return tt({},Qr,i,t)}function qn(i){return[Dt(i.getAttribute("minx")),Dt(i.getAttribute("miny")),Dt(i.getAttribute("maxx")),Dt(i.getAttribute("maxy"))]}function Cr(i,t){const e=qn(i),n=[Dt(i.getAttribute("resx")),Dt(i.getAttribute("resy"))];return{crs:i.getAttribute("CRS")||i.getAttribute("SRS"),extent:e,res:n}}function Tr(i,t){const e=qn(i);if(!(!S(e[0])||!S(e[1])||!S(e[2])||!S(e[3])))return e}function Dr(i,t){const e=parseFloat(i.getAttribute("min")),n=parseFloat(i.getAttribute("max"));return{min:e,max:n}}function Pr(i,t){const e=tt({},ts,i,t);if(!S(e))return;const n=e.westBoundLongitude,o=e.southBoundLatitude,r=e.eastBoundLongitude,s=e.northBoundLatitude;if(!(!S(n)||!S(o)||!S(r)||!S(s)))return[n,o,r,s]}function Or(i,t){return tt({},Xr,i,t)}function Rr(i,t){return tt({},Yr,i,t)}function Lr(i,t){return tt({},Wr,i,t)}function Mr(i,t){return tt({},Gr,i,t)}function Ir(i,t){return tt({},Jr,i,t)}function Nr(i,t){return tt([],Kr,i,t)}function Hr(i,t){const e=Wt(i.getAttribute("queryable"));return tt({queryable:S(e)?e:!1},Wn,i,t)}function Vr(i,t){var e=t[t.length-1];const n=tt({},Wn,i,t);if(!S(n))return;let o=Wt(i.getAttribute("queryable"));S(o)||(o=e.queryable),n.queryable=S(o)?o:!1;let r=Ue(i.getAttribute("cascaded"));S(r)||(r=e.cascaded),n.cascaded=r;let s=Wt(i.getAttribute("opaque"));S(s)||(s=e.opaque),n.opaque=S(s)?s:!1;let a=Wt(i.getAttribute("noSubsets"));S(a)||(a=e.noSubsets),n.noSubsets=S(a)?a:!1;let l=Dt(i.getAttribute("fixedWidth"));S(l)||(l=e.fixedWidth),n.fixedWidth=l;let d=Dt(i.getAttribute("fixedHeight"));S(d)||(d=e.fixedHeight),n.fixedHeight=d;const c=["Style","CRS","AuthorityURL"];for(let p=0,f=c.length;p<f;p++){const g=c[p],b=e[g];if(S(b)){let V=jn(n,g,[]);V=V.concat(b),n[g]=V}}const u=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let p=0,f=u.length;p<f;p++){const g=u[p],b=n[g];if(!S(b)){const V=e[g];n[g]=V}}return n}function Br(i,t){return{name:i.getAttribute("name"),units:i.getAttribute("units"),unitSymbol:i.getAttribute("unitSymbol"),default:i.getAttribute("default"),multipleValues:Wt(i.getAttribute("multipleValues")),nearestValue:Wt(i.getAttribute("nearestValue")),current:Wt(i.getAttribute("current")),values:D(i)}}function Pt(i,t){return tt({},ss,i,t)}function kr(i,t){return tt({},es,i,t)}function Ur(i,t){return tt({},ns,i,t)}function Fr(i,t){return tt({},os,i,t)}function Fi(i,t){return tt({},is,i,t)}function Xn(i,t){var e=Pt(i,t);if(S(e)){const n=[Ue(i.getAttribute("width")),Ue(i.getAttribute("height"))];return e.size=n,e}}function jr(i,t){var e=Pt(i,t);if(S(e))return e.name=i.getAttribute("name"),e}function Zr(i,t){var e=Pt(i,t);if(S(e))return e.type=i.getAttribute("type"),e}function zr(i,t){return tt({},rs,i,t)}function Yn(i,t){return tt([],as,i,t)}const ot=[null,"http://www.opengis.net/wms"],qr=nt(ot,{Service:y(Rr),Capability:y(Or)}),Xr=nt(ot,{Request:y(kr),Exception:y(Nr),Layer:y(Hr)}),Yr=nt(ot,{Name:y(D),Title:y(D),Abstract:y(D),KeywordList:y(Yn),OnlineResource:y(Ui),ContactInformation:y(Lr),Fees:y(D),AccessConstraints:y(D),LayerLimit:y(ki),MaxWidth:y(ki),MaxHeight:y(ki)}),Wr=nt(ot,{ContactPersonPrimary:y(Mr),ContactPosition:y(D),ContactAddress:y(Ir),ContactVoiceTelephone:y(D),ContactFacsimileTelephone:y(D),ContactElectronicMailAddress:y(D)}),Gr=nt(ot,{ContactPerson:y(D),ContactOrganization:y(D)}),Jr=nt(ot,{AddressType:y(D),Address:y(D),City:y(D),StateOrProvince:y(D),PostCode:y(D),Country:y(D)}),Kr=nt(ot,{Format:zn(D)}),Wn=nt(ot,{Name:y(D),Title:y(D),Abstract:y(D),KeywordList:y(Yn),CRS:ht(D),SRS:ht(D),EX_GeographicBoundingBox:y(Pr),LatLonBoundingBox:y(Tr),BoundingBox:ht(Cr),Dimension:ht(Br),Attribution:y(Ar),AuthorityURL:ht(jr),Identifier:ht(D),MetadataURL:ht(Zr),DataURL:ht(Pt),FeatureListURL:ht(Pt),Style:ht(zr),MinScaleDenominator:y(re),MaxScaleDenominator:y(re),ScaleHint:y(Dr),Layer:ht(Vr)}),Qr=nt(ot,{Title:y(D),OnlineResource:y(Ui),LogoURL:y(Xn)}),ts=nt(ot,{westBoundLongitude:y(re),eastBoundLongitude:y(re),southBoundLatitude:y(re),northBoundLatitude:y(re)}),es=nt(ot,{GetCapabilities:y(Fi),GetMap:y(Fi),GetFeatureInfo:y(Fi)}),is=nt(ot,{Format:ht(D),DCPType:ht(Ur)}),ns=nt(ot,{HTTP:y(Fr)}),os=nt(ot,{Get:y(Pt),Post:y(Pt)}),rs=nt(ot,{Name:y(D),Title:y(D),Abstract:y(D),LegendURL:ht(Xn),StyleSheetURL:y(Pt),StyleURL:y(Pt)}),ss=nt(ot,{Format:y(D),OnlineResource:y(Ui)}),as=nt(ot,{Keyword:zn(D)});class ls{constructor(t,e){!e&&typeof window<"u"&&(e=window.DOMParser),this.version=void 0,this._parser=new br(e),this._data=t}data(t){return this._data=t,this}toJSON(t){return t=t||this._data,this.parse(t)}parse(t){return this.readFromDocument(this._parser.toDocument(t))}readFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Se.ELEMENT)return this.readFromNode(e);return null}readFromNode(t){return this.version=t.getAttribute("version"),tt({version:this.version},qr,t,[])||null}}async function ds(i){let t=new URL(i),e=t.searchParams;e.set("SERVICE","WMS"),e.set("REQUEST","GetCapabilities");let n=t.toString();const o=await fetch(n);if(o.ok){const r=await o.text();return new ls(r).toJSON()}else throw new Error(`Error: ${o.status}`)}function ji(i){const t=/\b(?:wms|ows)\b/i,e=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(i)?"TileWMS":e.test(i)?"XYZ":!1}function us(i){const e=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(i),n=ji(i);return!!(i&&e&&n)}function Gn(i){return i.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function cs(i){try{return JSON.parse(Gn(i)),!!i}catch{return!1}}function hs(i,t){const e=new URL(i).searchParams;Object.entries(t).forEach(([s,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{e.set(l,a[l])}):e.set(s,a)});const n=i.split("?")[0],o=e.toString();return`${n}?${o}`}/**!
|
|
41
|
+
* Sortable 1.15.6
|
|
42
42
|
* @author RubaXa <trash@rubaxa.org>
|
|
43
43
|
* @author owenm <owen23355@gmail.com>
|
|
44
44
|
* @license MIT
|
|
45
|
-
*/function kn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,n)}return i}function pt(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?kn(Object(i),!0).forEach(function(n){ss(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):kn(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function Oe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Oe=function(t){return typeof t}:Oe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(e)}function ss(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function bt(){return bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},bt.apply(this,arguments)}function as(e,t){if(e==null)return{};var i={},n=Object.keys(e),o,r;for(r=0;r<n.length;r++)o=n[r],!(t.indexOf(o)>=0)&&(i[o]=e[o]);return i}function ls(e,t){if(e==null)return{};var i=as(e,t),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ds="1.15.4";function vt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var wt=vt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ce=vt(/Edge/i),Un=vt(/firefox/i),he=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Fn=vt(/iP(ad|od|hone)/i),jn=vt(/chrome/i)&&vt(/android/i),Zn={capture:!1,passive:!1};function A(e,t,i){e.addEventListener(t,i,!wt&&Zn)}function S(e,t,i){e.removeEventListener(t,i,!wt&&Zn)}function Re(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function zn(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ct(e,t,i,n){if(e){i=i||document;do{if(t!=null&&(t[0]===">"?e.parentNode===i&&Re(e,t):Re(e,t))||n&&e===i)return e;if(e===i)break}while(e=zn(e))}return null}var Xn=/\s+/g;function at(e,t,i){if(e&&t)if(e.classList)e.classList[i?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(Xn," ").replace(" "+t+" "," ");e.className=(n+(i?" "+t:"")).replace(Xn," ")}}function v(e,t,i){var n=e&&e.style;if(n){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),t===void 0?i:i[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=i+(typeof i=="string"?"":"px")}}function qt(e,t){var i="";if(typeof e=="string")i=e;else do{var n=v(e,"transform");n&&n!=="none"&&(i=n+" "+i)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function qn(e,t,i){if(e){var n=e.getElementsByTagName(t),o=0,r=n.length;if(i)for(;o<r;o++)i(n[o],o);return n}return[]}function ft(){var e=document.scrollingElement;return e||document.documentElement}function U(e,t,i,n,o){if(!(!e.getBoundingClientRect&&e!==window)){var r,s,a,l,d,c,u;if(e!==window&&e.parentNode&&e!==ft()?(r=e.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,d=r.right,c=r.height,u=r.width):(s=0,a=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||i)&&e!==window&&(o=o||e.parentNode,!wt))do if(o&&o.getBoundingClientRect&&(v(o,"transform")!=="none"||i&&v(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(v(o,"border-top-width")),a-=p.left+parseInt(v(o,"border-left-width")),l=s+r.height,d=a+r.width;break}while(o=o.parentNode);if(n&&e!==window){var f=qt(o||e),g=f&&f.a,y=f&&f.d;f&&(s/=y,a/=g,u/=g,c/=y,l=s+c,d=a+u)}return{top:s,left:a,bottom:l,right:d,width:u,height:c}}}function Yn(e,t,i){for(var n=At(e,!0),o=U(e)[t];n;){var r=U(n)[i],s=void 0;if(s=o>=r,!s)return n;if(n===ft())break;n=At(n,!1)}return!1}function Yt(e,t,i,n){for(var o=0,r=0,s=e.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==w.ghost&&(n||s[r]!==w.dragged)&&ct(s[r],i.draggable,e,!1)){if(o===t)return s[r];o++}r++}return null}function Mi(e,t){for(var i=e.lastElementChild;i&&(i===w.ghost||v(i,"display")==="none"||t&&!Re(i,t));)i=i.previousElementSibling;return i||null}function ut(e,t){var i=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==w.clone&&(!t||Re(e,t))&&i++;return i}function Wn(e){var t=0,i=0,n=ft();if(e)do{var o=qt(e),r=o.a,s=o.d;t+=e.scrollLeft*r,i+=e.scrollTop*s}while(e!==n&&(e=e.parentNode));return[t,i]}function us(e,t){for(var i in e)if(e.hasOwnProperty(i)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[i][n])return Number(i)}return-1}function At(e,t){if(!e||!e.getBoundingClientRect)return ft();var i=e,n=!1;do if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=v(i);if(i.clientWidth<i.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||i.clientHeight<i.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!i.getBoundingClientRect||i===document.body)return ft();if(n||t)return i;n=!0}}while(i=i.parentNode);return ft()}function cs(e,t){if(e&&t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function Ii(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var pe;function Gn(e,t){return function(){if(!pe){var i=arguments,n=this;i.length===1?e.call(n,i[0]):e.apply(n,i),pe=setTimeout(function(){pe=void 0},t)}}}function hs(){clearTimeout(pe),pe=void 0}function Jn(e,t,i){e.scrollLeft+=t,e.scrollTop+=i}function Kn(e){var t=window.Polymer,i=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):i?i(e).clone(!0)[0]:e.cloneNode(!0)}function Qn(e,t,i){var n={};return Array.from(e.children).forEach(function(o){var r,s,a,l;if(!(!ct(o,t.draggable,e,!1)||o.animated||o===i)){var d=U(o);n.left=Math.min((r=n.left)!==null&&r!==void 0?r:1/0,d.left),n.top=Math.min((s=n.top)!==null&&s!==void 0?s:1/0,d.top),n.right=Math.max((a=n.right)!==null&&a!==void 0?a:-1/0,d.right),n.bottom=Math.max((l=n.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var rt="Sortable"+new Date().getTime();function ps(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(v(o,"display")==="none"||o===w.ghost)){e.push({target:o,rect:U(o)});var r=pt({},e[e.length-1].rect);if(o.thisAnimationDuration){var s=qt(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(us(e,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var r=!1,s=0;e.forEach(function(a){var l=0,d=a.target,c=d.fromRect,u=U(d),p=d.prevFromRect,f=d.prevToRect,g=a.rect,y=qt(d,!0);y&&(u.top-=y.f,u.left-=y.e),d.toRect=u,d.thisAnimationDuration&&Ii(p,u)&&!Ii(c,u)&&(g.top-u.top)/(g.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=gs(g,p,f,o.options)),Ii(u,c)||(d.prevFromRect=c,d.prevToRect=u,l||(l=o.options.animation),o.animate(d,g,u,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof n=="function"&&n()},s):typeof n=="function"&&n(),e=[]},animate:function(n,o,r,s){if(s){v(n,"transition",""),v(n,"transform","");var a=qt(this.el),l=a&&a.a,d=a&&a.d,c=(o.left-r.left)/(l||1),u=(o.top-r.top)/(d||1);n.animatingX=!!c,n.animatingY=!!u,v(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=fs(n),v(n,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),v(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){v(n,"transition",""),v(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},s)}}}}function fs(e){return e.offsetWidth}function gs(e,t,i,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))*n.animation}var Wt=[],Ni={initializeByDefault:!0},fe={mount:function(t){for(var i in Ni)Ni.hasOwnProperty(i)&&!(i in t)&&(t[i]=Ni[i]);Wt.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Wt.push(t)},pluginEvent:function(t,i,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=t+"Global";Wt.forEach(function(s){i[s.pluginName]&&(i[s.pluginName][r]&&i[s.pluginName][r](pt({sortable:i},n)),i.options[s.pluginName]&&i[s.pluginName][t]&&i[s.pluginName][t](pt({sortable:i},n)))})},initializePlugins:function(t,i,n,o){Wt.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,i,t.options);d.sortable=t,d.options=t.options,t[l]=d,bt(n,d.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,i){var n={};return Wt.forEach(function(o){typeof o.eventProperties=="function"&&bt(n,o.eventProperties.call(i[o.pluginName],t))}),n},modifyOption:function(t,i,n){var o;return Wt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[i]=="function"&&(o=r.optionListeners[i].call(t[r.pluginName],n))}),o}};function ms(e){var t=e.sortable,i=e.rootEl,n=e.name,o=e.targetEl,r=e.cloneEl,s=e.toEl,a=e.fromEl,l=e.oldIndex,d=e.newIndex,c=e.oldDraggableIndex,u=e.newDraggableIndex,p=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||i&&i[rt],!!t){var y,R=t.options,H="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!wt&&!ce?y=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(n,!0,!0)),y.to=s||i,y.from=a||i,y.item=o||i,y.clone=r,y.oldIndex=l,y.newIndex=d,y.oldDraggableIndex=c,y.newDraggableIndex=u,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var k=pt(pt({},g),fe.getEventProperties(n,t));for(var it in k)y[it]=k[it];i&&i.dispatchEvent(y),R[H]&&R[H].call(t,y)}}var ys=["evt"],st=function(t,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,r=ls(n,ys);fe.pluginEvent.bind(w)(t,i,pt({dragEl:h,parentEl:N,ghostEl:x,rootEl:M,nextEl:Bt,lastDownEl:Le,cloneEl:I,cloneHidden:_t,dragStarted:me,putSortable:W,activeSortable:w.active,originalEvent:o,oldIndex:Gt,oldDraggableIndex:ge,newIndex:lt,newDraggableIndex:Ct,hideGhostForTarget:so,unhideGhostForTarget:ao,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(a){et({sortable:i,name:a,originalEvent:o})}},r))};function et(e){ms(pt({putSortable:W,cloneEl:I,targetEl:h,rootEl:M,oldIndex:Gt,oldDraggableIndex:ge,newIndex:lt,newDraggableIndex:Ct},e))}var h,N,x,M,Bt,Le,I,_t,Gt,lt,ge,Ct,Me,W,Jt=!1,Ie=!1,Ne=[],kt,ht,Hi,Vi,to,eo,me,Kt,ye,be=!1,He=!1,Ve,Q,Bi=[],ki=!1,Be=[],ke=typeof document<"u",Ue=Fn,io=ce||wt?"cssFloat":"float",bs=ke&&!jn&&!Fn&&"draggable"in document.createElement("div"),no=function(){if(ke){if(wt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),oo=function(t,i){var n=v(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=Yt(t,0,i),s=Yt(t,1,i),a=r&&v(r),l=s&&v(s),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+U(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+U(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=o&&n[io]==="none"||s&&n[io]==="none"&&d+c>o)?"vertical":"horizontal"},vs=function(t,i,n){var o=n?t.left:t.top,r=n?t.right:t.bottom,s=n?t.width:t.height,a=n?i.left:i.top,l=n?i.right:i.bottom,d=n?i.width:i.height;return o===a||r===l||o+s/2===a+d/2},ws=function(t,i){var n;return Ne.some(function(o){var r=o[rt].options.emptyInsertThreshold;if(!(!r||Mi(o))){var s=U(o),a=t>=s.left-r&&t<=s.right+r,l=i>=s.top-r&&i<=s.bottom+r;if(a&&l)return n=o}}),n},ro=function(t){function i(r,s){return function(a,l,d,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||u))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return i(r(a,l,d,c),s)(a,l,d,c);var p=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var n={},o=t.group;(!o||Oe(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=i(o.pull,!0),n.checkPut=i(o.put),n.revertClone=o.revertClone,t.group=n},so=function(){!no&&x&&v(x,"display","none")},ao=function(){!no&&x&&v(x,"display","")};ke&&!jn&&document.addEventListener("click",function(e){if(Ie)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ie=!1,!1},!0);var Ut=function(t){if(h){t=t.touches?t.touches[0]:t;var i=ws(t.clientX,t.clientY);if(i){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=i,n.preventDefault=void 0,n.stopPropagation=void 0,i[rt]._onDragOver(n)}}},$s=function(t){h&&h.parentNode[rt]._isOutsideThisEl(t.target)};function w(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=bt({},t),e[rt]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return oo(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:w.supportPointer!==!1&&"PointerEvent"in window&&!he,emptyInsertThreshold:5};fe.initializePlugins(this,e,i);for(var n in i)!(n in t)&&(t[n]=i[n]);ro(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:bs,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?A(e,"pointerdown",this._onTapStart):(A(e,"mousedown",this._onTapStart),A(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(A(e,"dragover",this),A(e,"dragenter",this)),Ne.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,ps())}w.prototype={constructor:w,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Kt=null)},_getDirection:function(t,i){return typeof this.options.direction=="function"?this.options.direction.call(this,t,i,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var i=this,n=this.el,o=this.options,r=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(Ds(n),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&he&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ct(l,o.draggable,n,!1),!(l&&l.animated)&&Le!==l)){if(Gt=ut(l),ge=ut(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){et({sortable:i,rootEl:d,name:"filter",targetEl:l,toEl:n,fromEl:n}),st("filter",i,{evt:t}),r&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=ct(d,u.trim(),n,!1),u)return et({sortable:i,rootEl:u,name:"filter",targetEl:l,fromEl:n,toEl:n}),st("filter",i,{evt:t}),!0}),c)){r&&t.preventDefault();return}o.handle&&!ct(d,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,i,n){var o=this,r=o.el,s=o.options,a=r.ownerDocument,l;if(n&&!h&&n.parentNode===r){var d=U(n);if(M=r,h=n,N=h.parentNode,Bt=h.nextSibling,Le=n,Me=s.group,w.dragged=h,kt={target:h,clientX:(i||t).clientX,clientY:(i||t).clientY},to=kt.clientX-d.left,eo=kt.clientY-d.top,this._lastX=(i||t).clientX,this._lastY=(i||t).clientY,h.style["will-change"]="all",l=function(){if(st("delayEnded",o,{evt:t}),w.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Un&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,i),et({sortable:o,name:"choose",originalEvent:t}),at(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){qn(h,c.trim(),Ui)}),A(a,"dragover",Ut),A(a,"mousemove",Ut),A(a,"touchmove",Ut),s.supportPointer?(A(a,"pointerup",o._onDrop),!this.nativeDraggable&&A(a,"pointercancel",o._onDrop)):(A(a,"mouseup",o._onDrop),A(a,"touchend",o._onDrop),A(a,"touchcancel",o._onDrop)),Un&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),st("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||i)&&(!this.nativeDraggable||!(ce||wt))){if(w.eventCanceled){this._onDrop();return}s.supportPointer?(A(a,"pointerup",o._disableDelayedDrag),A(a,"pointercancel",o._disableDelayedDrag)):(A(a,"mouseup",o._disableDelayedDrag),A(a,"touchend",o._disableDelayedDrag),A(a,"touchcancel",o._disableDelayedDrag)),A(a,"mousemove",o._delayedDragTouchMoveHandler),A(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&A(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var i=t.touches?t.touches[0]:t;Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Ui(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag),S(t,"touchend",this._disableDelayedDrag),S(t,"touchcancel",this._disableDelayedDrag),S(t,"pointerup",this._disableDelayedDrag),S(t,"pointercancel",this._disableDelayedDrag),S(t,"mousemove",this._delayedDragTouchMoveHandler),S(t,"touchmove",this._delayedDragTouchMoveHandler),S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,i){i=i||t.pointerType=="touch"&&t,!this.nativeDraggable||i?this.options.supportPointer?A(document,"pointermove",this._onTouchMove):i?A(document,"touchmove",this._onTouchMove):A(document,"mousemove",this._onTouchMove):(A(h,"dragend",this),A(M,"dragstart",this._onDragStart));try{je(function(){document.selection?document.selection.empty():window.getSelection().removeAllRanges()})}catch{}},_dragStarted:function(t,i){if(Jt=!1,M&&h){st("dragStarted",this,{evt:i}),this.nativeDraggable&&A(document,"dragover",$s);var n=this.options;!t&&at(h,n.dragClass,!1),at(h,n.ghostClass,!0),w.active=this,t&&this._appendGhost(),et({sortable:this,name:"start",originalEvent:i})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,so();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),i=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY),t!==i);)i=t;if(h.parentNode[rt]._isOutsideThisEl(t),i)do{if(i[rt]){var n=void 0;if(n=i[rt]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:i}),n&&!this.options.dragoverBubble)break}t=i}while(i=zn(i));ao()}},_onTouchMove:function(t){if(kt){var i=this.options,n=i.fallbackTolerance,o=i.fallbackOffset,r=t.touches?t.touches[0]:t,s=x&&qt(x,!0),a=x&&s&&s.a,l=x&&s&&s.d,d=Ue&&Q&&Wn(Q),c=(r.clientX-kt.clientX+o.x)/(a||1)+(d?d[0]-Bi[0]:0)/(a||1),u=(r.clientY-kt.clientY+o.y)/(l||1)+(d?d[1]-Bi[1]:0)/(l||1);if(!w.active&&!Jt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(x){s?(s.e+=c-(Hi||0),s.f+=u-(Vi||0)):s={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");v(x,"webkitTransform",p),v(x,"mozTransform",p),v(x,"msTransform",p),v(x,"transform",p),Hi=c,Vi=u,ht=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!x){var t=this.options.fallbackOnBody?document.body:M,i=U(h,!0,Ue,!0,t),n=this.options;if(Ue){for(Q=t;v(Q,"position")==="static"&&v(Q,"transform")==="none"&&Q!==document;)Q=Q.parentNode;Q!==document.body&&Q!==document.documentElement?(Q===document&&(Q=ft()),i.top+=Q.scrollTop,i.left+=Q.scrollLeft):Q=ft(),Bi=Wn(Q)}x=h.cloneNode(!0),at(x,n.ghostClass,!1),at(x,n.fallbackClass,!0),at(x,n.dragClass,!0),v(x,"transition",""),v(x,"transform",""),v(x,"box-sizing","border-box"),v(x,"margin",0),v(x,"top",i.top),v(x,"left",i.left),v(x,"width",i.width),v(x,"height",i.height),v(x,"opacity","0.8"),v(x,"position",Ue?"absolute":"fixed"),v(x,"zIndex","100000"),v(x,"pointerEvents","none"),w.ghost=x,t.appendChild(x),v(x,"transform-origin",to/parseInt(x.style.width)*100+"% "+eo/parseInt(x.style.height)*100+"%")}},_onDragStart:function(t,i){var n=this,o=t.dataTransfer,r=n.options;if(st("dragStart",this,{evt:t}),w.eventCanceled){this._onDrop();return}st("setupClone",this),w.eventCanceled||(I=Kn(h),I.removeAttribute("id"),I.draggable=!1,I.style["will-change"]="",this._hideClone(),at(I,this.options.chosenClass,!1),w.clone=I),n.cloneId=je(function(){st("clone",n),!w.eventCanceled&&(n.options.removeCloneOnHide||M.insertBefore(I,h),n._hideClone(),et({sortable:n,name:"clone"}))}),!i&&at(h,r.dragClass,!0),i?(Ie=!0,n._loopId=setInterval(n._emulateDragOver,50)):(S(document,"mouseup",n._onDrop),S(document,"touchend",n._onDrop),S(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,h)),A(document,"drop",n),v(h,"transform","translateZ(0)")),Jt=!0,n._dragStartId=je(n._dragStarted.bind(n,i,t)),A(document,"selectstart",n),me=!0,he&&v(document.body,"user-select","none")},_onDragOver:function(t){var i=this.el,n=t.target,o,r,s,a=this.options,l=a.group,d=w.active,c=Me===l,u=a.sort,p=W||d,f,g=this,y=!1;if(ki)return;function R(Ce,za){st(Ce,g,pt({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:u,fromSortable:p,target:n,completed:k,onMove:function(No,Xa){return Fe(M,i,h,o,No,U(No),t,Xa)},changed:it},za))}function H(){R("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function k(Ce){return R("dragOverCompleted",{insertion:Ce}),Ce&&(c?d._hideClone():d._showClone(g),g!==p&&(at(h,W?W.options.ghostClass:d.options.ghostClass,!1),at(h,a.ghostClass,!0)),W!==g&&g!==w.active?W=g:g===w.active&&W&&(W=null),p===g&&(g._ignoreWhileAnimating=n),g.animateAll(function(){R("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===i&&!n.animated)&&(Kt=null),!a.dragoverBubble&&!t.rootEl&&n!==document&&(h.parentNode[rt]._isOutsideThisEl(t.target),!Ce&&Ut(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function it(){lt=ut(h),Ct=ut(h,a.draggable),et({sortable:g,name:"change",toEl:i,newIndex:lt,newDraggableIndex:Ct,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=ct(n,a.draggable,i,!0),R("dragOver"),w.eventCanceled)return y;if(h.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||g._ignoreWhileAnimating===n)return k(!1);if(Ie=!1,d&&!a.disabled&&(c?u||(s=N!==M):W===this||(this.lastPutMode=Me.checkPull(this,d,h,t))&&l.checkPut(this,d,h,t))){if(f=this._getDirection(t,n)==="vertical",o=U(h),R("dragOverValid"),w.eventCanceled)return y;if(s)return N=M,H(),this._hideClone(),R("revert"),w.eventCanceled||(Bt?M.insertBefore(h,Bt):M.appendChild(h)),k(!0);var J=Mi(i,a.draggable);if(!J||As(t,f,this)&&!J.animated){if(J===h)return k(!1);if(J&&i===t.target&&(n=J),n&&(r=U(n)),Fe(M,i,h,o,n,r,t,!!n)!==!1)return H(),J&&J.nextSibling?i.insertBefore(h,J.nextSibling):i.appendChild(h),N=i,it(),k(!0)}else if(J&&Ss(t,f,this)){var nt=Yt(i,0,a,!0);if(nt===h)return k(!1);if(n=nt,r=U(n),Fe(M,i,h,o,n,r,t,!1)!==!1)return H(),i.insertBefore(h,nt),N=i,it(),k(!0)}else if(n.parentNode===i){r=U(n);var b=0,L,K=h.parentNode!==i,z=!vs(h.animated&&h.toRect||o,n.animated&&n.toRect||r,f),Se=f?"top":"left",Ot=Yn(n,"top","top")||Yn(h,"top","top"),Ae=Ot?Ot.scrollTop:void 0;Kt!==n&&(L=r[Se],be=!1,He=!z&&a.invertSwap||K),b=_s(t,n,r,f,z?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,He,Kt===n);var xt;if(b!==0){var Ft=ut(h);do Ft-=b,xt=N.children[Ft];while(xt&&(v(xt,"display")==="none"||xt===x))}if(b===0||xt===n)return k(!1);Kt=n,ye=b;var _e=n.nextElementSibling,Rt=!1;Rt=b===1;var mi=Fe(M,i,h,o,n,r,t,Rt);if(mi!==!1)return(mi===1||mi===-1)&&(Rt=mi===1),ki=!0,setTimeout(Es,30),H(),Rt&&!_e?i.appendChild(h):n.parentNode.insertBefore(h,Rt?_e:n),Ot&&Jn(Ot,0,Ae-Ot.scrollTop),N=h.parentNode,L!==void 0&&!He&&(Ve=Math.abs(L-U(n)[Se])),it(),k(!0)}if(i.contains(h))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Ut),S(document,"mousemove",Ut),S(document,"touchmove",Ut)},_offUpEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._onDrop),S(t,"touchend",this._onDrop),S(t,"pointerup",this._onDrop),S(t,"pointercancel",this._onDrop),S(t,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(t){var i=this.el,n=this.options;if(lt=ut(h),Ct=ut(h,n.draggable),st("drop",this,{evt:t}),N=h&&h.parentNode,lt=ut(h),Ct=ut(h,n.draggable),w.eventCanceled){this._nulling();return}Jt=!1,He=!1,be=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Fi(this.cloneId),Fi(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(i,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),he&&v(document.body,"user-select",""),v(h,"transform",""),t&&(me&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),x&&x.parentNode&&x.parentNode.removeChild(x),(M===N||W&&W.lastPutMode!=="clone")&&I&&I.parentNode&&I.parentNode.removeChild(I),h&&(this.nativeDraggable&&S(h,"dragend",this),Ui(h),h.style["will-change"]="",me&&!Jt&&at(h,W?W.options.ghostClass:this.options.ghostClass,!1),at(h,this.options.chosenClass,!1),et({sortable:this,name:"unchoose",toEl:N,newIndex:null,newDraggableIndex:null,originalEvent:t}),M!==N?(lt>=0&&(et({rootEl:N,name:"add",toEl:N,fromEl:M,originalEvent:t}),et({sortable:this,name:"remove",toEl:N,originalEvent:t}),et({rootEl:N,name:"sort",toEl:N,fromEl:M,originalEvent:t}),et({sortable:this,name:"sort",toEl:N,originalEvent:t})),W&&W.save()):lt!==Gt&<>=0&&(et({sortable:this,name:"update",toEl:N,originalEvent:t}),et({sortable:this,name:"sort",toEl:N,originalEvent:t})),w.active&&((lt==null||lt===-1)&&(lt=Gt,Ct=ge),et({sortable:this,name:"end",toEl:N,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){st("nulling",this),M=h=N=x=Bt=I=Le=_t=kt=ht=me=lt=Ct=Gt=ge=Kt=ye=W=Me=w.dragged=w.ghost=w.clone=w.active=null,Be.forEach(function(t){t.checked=!0}),Be.length=Hi=Vi=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),xs(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],i,n=this.el.children,o=0,r=n.length,s=this.options;o<r;o++)i=n[o],ct(i,s.draggable,this.el,!1)&&t.push(i.getAttribute(s.dataIdAttr)||Ts(i));return t},sort:function(t,i){var n={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];ct(a,this.options.draggable,o,!1)&&(n[r]=a)},this),i&&this.captureAnimationState(),t.forEach(function(r){n[r]&&(o.removeChild(n[r]),o.appendChild(n[r]))}),i&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,i){return ct(t,i||this.options.draggable,this.el,!1)},option:function(t,i){var n=this.options;if(i===void 0)return n[t];var o=fe.modifyOption(this,t,i);typeof o<"u"?n[t]=o:n[t]=i,t==="group"&&ro(n)},destroy:function(){st("destroy",this);var t=this.el;t[rt]=null,S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart),S(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(i){i.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ne.splice(Ne.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_t){if(st("hideClone",this),w.eventCanceled)return;v(I,"display","none"),this.options.removeCloneOnHide&&I.parentNode&&I.parentNode.removeChild(I),_t=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(_t){if(st("showClone",this),w.eventCanceled)return;h.parentNode==M&&!this.options.group.revertClone?M.insertBefore(I,h):Bt?M.insertBefore(I,Bt):M.appendChild(I),this.options.group.revertClone&&this.animate(h,I),v(I,"display",""),_t=!1}}};function xs(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Fe(e,t,i,n,o,r,s,a){var l,d=e[rt],c=d.options.onMove,u;return window.CustomEvent&&!wt&&!ce?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=i,l.draggedRect=n,l.related=o||t,l.relatedRect=r||U(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),c&&(u=c.call(d,l,s)),u}function Ui(e){e.draggable=!1}function Es(){ki=!1}function Ss(e,t,i){var n=U(Yt(i.el,0,i.options,!0)),o=Qn(i.el,i.options,x),r=10;return t?e.clientX<o.left-r||e.clientY<n.top&&e.clientX<n.right:e.clientY<o.top-r||e.clientY<n.bottom&&e.clientX<n.left}function As(e,t,i){var n=U(Mi(i.el,i.options.draggable)),o=Qn(i.el,i.options,x),r=10;return t?e.clientX>o.right+r||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>o.bottom+r||e.clientX>n.right&&e.clientY>n.top}function _s(e,t,i,n,o,r,s,a){var l=n?e.clientY:e.clientX,d=n?i.height:i.width,c=n?i.top:i.left,u=n?i.bottom:i.right,p=!1;if(!s){if(a&&Ve<d*o){if(!be&&(ye===1?l>c+d*r/2:l<u-d*r/2)&&(be=!0),be)p=!0;else if(ye===1?l<c+Ve:l>u-Ve)return-ye}else if(l>c+d*(1-o)/2&&l<u-d*(1-o)/2)return Cs(t)}return p=p||s,p&&(l<c+d*r/2||l>u-d*r/2)?l>c+d/2?1:-1:0}function Cs(e){return ut(h)<ut(e)?1:-1}function Ts(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,i=t.length,n=0;i--;)n+=t.charCodeAt(i);return n.toString(36)}function Ds(e){Be.length=0;for(var t=e.getElementsByTagName("input"),i=t.length;i--;){var n=t[i];n.checked&&Be.push(n)}}function je(e){return setTimeout(e,0)}function Fi(e){return clearTimeout(e)}ke&&A(document,"touchmove",function(e){(w.active||Jt)&&e.cancelable&&e.preventDefault()}),w.utils={on:A,off:S,css:v,find:qn,is:function(t,i){return!!ct(t,i,t,!1)},extend:cs,throttle:Gn,closest:ct,toggleClass:at,clone:Kn,index:ut,nextTick:je,cancelNextTick:Fi,detectDirection:oo,getChild:Yt,expando:rt},w.get=function(e){return e[rt]},w.mount=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(w.utils=pt(pt({},w.utils),n.utils)),fe.mount(n)})},w.create=function(e,t){return new w(e,t)},w.version=ds;var F=[],ve,ji,Zi=!1,zi,Xi,Ze,we;function Ps(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(i){var n=i.originalEvent;this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):this.options.supportPointer?A(document,"pointermove",this._handleFallbackAutoScroll):n.touches?A(document,"touchmove",this._handleFallbackAutoScroll):A(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(i){var n=i.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),lo(),ze(),hs()},nulling:function(){Ze=ji=ve=Zi=we=zi=Xi=null,F.length=0},_handleFallbackAutoScroll:function(i){this._handleAutoScroll(i,!0)},_handleAutoScroll:function(i,n){var o=this,r=(i.touches?i.touches[0]:i).clientX,s=(i.touches?i.touches[0]:i).clientY,a=document.elementFromPoint(r,s);if(Ze=i,n||this.options.forceAutoScrollFallback||ce||wt||he){qi(i,this.options,a,n);var l=At(a,!0);Zi&&(!we||r!==zi||s!==Xi)&&(we&&lo(),we=setInterval(function(){var d=At(document.elementFromPoint(r,s),!0);d!==l&&(l=d,ze()),qi(i,o.options,d,n)},10),zi=r,Xi=s)}else{if(!this.options.bubbleScroll||At(a,!0)===ft()){ze();return}qi(i,this.options,At(a,!1),!1)}}},bt(e,{pluginName:"scroll",initializeByDefault:!0})}function ze(){F.forEach(function(e){clearInterval(e.pid)}),F=[]}function lo(){clearInterval(we)}var qi=Gn(function(e,t,i,n){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=ft(),d=!1,c;ji!==i&&(ji=i,ze(),ve=t.scroll,c=t.scrollFn,ve===!0&&(ve=At(i,!0)));var u=0,p=ve;do{var f=p,g=U(f),y=g.top,R=g.bottom,H=g.left,k=g.right,it=g.width,J=g.height,nt=void 0,b=void 0,L=f.scrollWidth,K=f.scrollHeight,z=v(f),Se=f.scrollLeft,Ot=f.scrollTop;f===l?(nt=it<L&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),b=J<K&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(nt=it<L&&(z.overflowX==="auto"||z.overflowX==="scroll"),b=J<K&&(z.overflowY==="auto"||z.overflowY==="scroll"));var Ae=nt&&(Math.abs(k-o)<=s&&Se+it<L)-(Math.abs(H-o)<=s&&!!Se),xt=b&&(Math.abs(R-r)<=s&&Ot+J<K)-(Math.abs(y-r)<=s&&!!Ot);if(!F[u])for(var Ft=0;Ft<=u;Ft++)F[Ft]||(F[Ft]={});(F[u].vx!=Ae||F[u].vy!=xt||F[u].el!==f)&&(F[u].el=f,F[u].vx=Ae,F[u].vy=xt,clearInterval(F[u].pid),(Ae!=0||xt!=0)&&(d=!0,F[u].pid=setInterval((function(){n&&this.layer===0&&w.active._onTouchMove(Ze);var _e=F[this.layer].vy?F[this.layer].vy*a:0,Rt=F[this.layer].vx?F[this.layer].vx*a:0;typeof c=="function"&&c.call(w.dragged.parentNode[rt],Rt,_e,e,Ze,F[this.layer].el)!=="continue"||Jn(F[this.layer].el,Rt,_e)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==l&&(p=At(p,!1)));Zi=d}},30),uo=function(t){var i=t.originalEvent,n=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(i){var d=n||r;a();var c=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:i,u=document.elementFromPoint(c.clientX,c.clientY);l(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Yi(){}Yi.prototype={startIndex:null,dragStart:function(t){var i=t.oldDraggableIndex;this.startIndex=i},onSpill:function(t){var i=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=Yt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(i,o):this.sortable.el.appendChild(i),this.sortable.animateAll(),n&&n.animateAll()},drop:uo},bt(Yi,{pluginName:"revertOnSpill"});function Wi(){}Wi.prototype={onSpill:function(t){var i=t.dragEl,n=t.putSortable,o=n||this.sortable;o.captureAnimationState(),i.parentNode&&i.parentNode.removeChild(i),o.animateAll()},drop:uo},bt(Wi,{pluginName:"removeOnSpill"}),w.mount(new Ps),w.mount(Wi,Yi);const Os=e=>{const t=e.item;let i=Array.prototype.slice.call(t.parentNode.childNodes);return i=i.filter(n=>n.nodeType!=Node.ELEMENT_NODE||!n.classList.contains("sortable-fallback")),i},Rs=(e,t,i,n,o,r)=>{const a=e.item.parentNode;for(const y of i)a.appendChild(y);if(e.oldIndex==e.newIndex)return;const l=n.getArray(),d=e.item.querySelector("eox-layercontrol-layer").layer.get(o),c=l.find(y=>y.get(o)===d),u=r.dataset.layer,p=l.find(y=>y.get(o)==u);let f,g;for(f=0;f<l.length;f++)if(l[f]==c){n.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?n.insertAt(g,c):n.insertAt(g+1,c);break}t.requestUpdate()};function Ls(e,t,i,n){let o=[],r=null;e._sortable=w.create(e,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>o=Os(s),onMove:s=>{r=s.related},onEnd:s=>Rs(s,n,o,t,i,r)})}function Ms(e,t,i,n){const o=e.getArray();let r=!1;o.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),r=!0),s.get(i)||(s.set(i,`layer ${a}`),r=!0),r&&n.requestUpdate()})}function Gi(e,t,i){let n=[];const o=(r,s,a)=>{n=[...n,...r.filter(d=>d.get(s)===a)];const l=r.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>o(d.getLayers().getArray(),s,a)),n};return o(e,t,i),n}function Is(e,t,i){if(!e||!t)return!1;if(!co(e,i))return!0;const n=e.get("minZoom"),o=e.get("maxZoom"),r=t.getView().getZoom();return r>n&&r<o}function co(e,t){const i=e.get("minZoom"),n=e.get("maxZoom");return!!(t&&(i!==-1/0||n!==1/0))}function Ns(e,t){var o,r,s;return!e||!t?void 0:e.getLayers?"group":((s=(o=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:o.ol_uid)==null?void 0:s.includes(e.getSource?(r=e.getSource())==null?void 0:r.ol_uid:void 0))?"draw":e.declutter_!==void 0?"vector":"raster"}const Hs=(e,t,i)=>{let n=t;return i.layer.getSource().getTileUrlFunction()&&(n||(n=i.layer.getSource().getTileUrlFunction()),i.layer.getSource().setTileUrlFunction((...o)=>rs(n(...o),e)),i.layer.getSource().setKey(new Date)),n};function Vs(e,t,i){const n="updateStyleVariables"in t,o="setStyle"in t,r=n?t.style_:i.style;let s=r==null?void 0:r.variables;if(s){const a=Ji(e);if(r.variables={...s,...a},n)t.updateStyleVariables(a);else if(o){const l=Bs(r);t.setStyle(l)}}}const Ji=e=>{const t={};for(const i in e)if(typeof e[i]=="object"&&e[i]!==null){const n=Ji(e[i]);for(const o in n)t[o]=n==null?void 0:n[o]}else t[i]=e==null?void 0:e[i];return t};function Bs(e){let t=e;if("variables"in e){let i=JSON.stringify(e);const{variables:n}=e;for(const o in n)typeof n[o]=="number"?i=i.replaceAll(`["var","${o}"]`,n[o]):i=i.replaceAll(`["var","${o}"]`,`"${n[o]}"`);t=JSON.parse(i)}return t}const ks=(e,t)=>{var i;if(e)return!("domainProperties"in e)||"domain"in e?{...e}:(i=Object.keys(e))==null?void 0:i.reduce((n,o)=>{if(o==="domainProperties"){const r=Ji(t);n.domain=e[o].map(s=>r[s])}else n[o]=e[o];return n},{})};function ho(e,t){var n;let i={};for(const o in e){const r=e[o].type;if(r&&r!=="object")i[o]=r==="number"?Number(t[o]):t[o];else if(typeof e[o]=="object"&&((n=e[o])!=null&&n.properties)){const s=ho(e[o].properties,t);Object.keys(s).length>0&&(i[o]=s)}}return i}function Us(e,t){var r,s,a,l,d;if(!t)return null;let i={},n="updateStyleVariables"in e?(r=e.style_)==null?void 0:r.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&n)i=n;else if((l=(a=e.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const c=new URL(e.getSource().getTileUrlFunction()([0,0,0]));i=Object.fromEntries(c.searchParams.entries())}else return null;const o=ho(((d=t.schema)==null?void 0:d.properties)||t.schema,i);return Object.keys(o).length?o:null}const Fs=(e,t)=>e==null?void 0:e.filter(i=>["remove","sort"].filter(n=>t!=null&&t.get("layerControlDisable")?n!=="sort":!0).includes(i)),js=(e,t)=>e==null?void 0:e.filter(i=>{let n=!0;return["remove","sort"].includes(i)&&(n=!1),i==="info"&&(n=t.get("description")),i==="config"&&(n=t.get("layerConfig")),i==="datetime"&&(n=t.get("layerDatetime")),i==="legend"&&(n=t.get("layerLegend")),n}),Zs=(e,t)=>$`
|
|
46
|
-
<button slot="${
|
|
47
|
-
`,
|
|
45
|
+
*/function Jn(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function _t(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Jn(Object(e),!0).forEach(function(n){ps(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):Jn(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}function Fe(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(t){return typeof t}:Fe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fe(i)}function ps(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function Ot(){return Ot=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},Ot.apply(this,arguments)}function fs(i,t){if(i==null)return{};var e={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(t.indexOf(o)>=0)&&(e[o]=i[o]);return e}function gs(i,t){if(i==null)return{};var e=fs(i,t),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}var ms="1.15.6";function Rt(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var Lt=Rt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_e=Rt(/Edge/i),Kn=Rt(/firefox/i),Ae=Rt(/safari/i)&&!Rt(/chrome/i)&&!Rt(/android/i),Zi=Rt(/iP(ad|od|hone)/i),Qn=Rt(/chrome/i)&&Rt(/android/i),to={capture:!1,passive:!1};function C(i,t,e){i.addEventListener(t,e,!Lt&&to)}function _(i,t,e){i.removeEventListener(t,e,!Lt&&to)}function je(i,t){if(t){if(t[0]===">"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function eo(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function $t(i,t,e,n){if(i){e=e||document;do{if(t!=null&&(t[0]===">"?i.parentNode===e&&je(i,t):je(i,t))||n&&i===e)return i;if(i===e)break}while(i=eo(i))}return null}var io=/\s+/g;function bt(i,t,e){if(i&&t)if(i.classList)i.classList[e?"add":"remove"](t);else{var n=(" "+i.className+" ").replace(io," ").replace(" "+t+" "," ");i.className=(n+(e?" "+t:"")).replace(io," ")}}function v(i,t,e){var n=i&&i.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(e=i.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function se(i,t){var e="";if(typeof i=="string")e=i;else do{var n=v(i,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(i=i.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function no(i,t,e){if(i){var n=i.getElementsByTagName(t),o=0,r=n.length;if(e)for(;o<r;o++)e(n[o],o);return n}return[]}function At(){var i=document.scrollingElement;return i||document.documentElement}function W(i,t,e,n,o){if(!(!i.getBoundingClientRect&&i!==window)){var r,s,a,l,d,c,u;if(i!==window&&i.parentNode&&i!==At()?(r=i.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,d=r.right,c=r.height,u=r.width):(s=0,a=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||e)&&i!==window&&(o=o||i.parentNode,!Lt))do if(o&&o.getBoundingClientRect&&(v(o,"transform")!=="none"||e&&v(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(v(o,"border-top-width")),a-=p.left+parseInt(v(o,"border-left-width")),l=s+r.height,d=a+r.width;break}while(o=o.parentNode);if(n&&i!==window){var f=se(o||i),g=f&&f.a,b=f&&f.d;f&&(s/=b,a/=g,u/=g,c/=b,l=s+c,d=a+u)}return{top:s,left:a,bottom:l,right:d,width:u,height:c}}}function oo(i,t,e){for(var n=Vt(i,!0),o=W(i)[t];n;){var r=W(n)[e],s=void 0;if(s=o>=r,!s)return n;if(n===At())break;n=Vt(n,!1)}return!1}function ae(i,t,e,n){for(var o=0,r=0,s=i.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==w.ghost&&(n||s[r]!==w.dragged)&&$t(s[r],e.draggable,i,!1)){if(o===t)return s[r];o++}r++}return null}function zi(i,t){for(var e=i.lastElementChild;e&&(e===w.ghost||v(e,"display")==="none"||t&&!je(e,t));)e=e.previousElementSibling;return e||null}function Et(i,t){var e=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==w.clone&&(!t||je(i,t))&&e++;return e}function ro(i){var t=0,e=0,n=At();if(i)do{var o=se(i),r=o.a,s=o.d;t+=i.scrollLeft*r,e+=i.scrollTop*s}while(i!==n&&(i=i.parentNode));return[t,e]}function ys(i,t){for(var e in i)if(i.hasOwnProperty(e)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===i[e][n])return Number(e)}return-1}function Vt(i,t){if(!i||!i.getBoundingClientRect)return At();var e=i,n=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=v(e);if(e.clientWidth<e.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return At();if(n||t)return e;n=!0}}while(e=e.parentNode);return At()}function bs(i,t){if(i&&t)for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function qi(i,t){return Math.round(i.top)===Math.round(t.top)&&Math.round(i.left)===Math.round(t.left)&&Math.round(i.height)===Math.round(t.height)&&Math.round(i.width)===Math.round(t.width)}var Ce;function so(i,t){return function(){if(!Ce){var e=arguments,n=this;e.length===1?i.call(n,e[0]):i.apply(n,e),Ce=setTimeout(function(){Ce=void 0},t)}}}function vs(){clearTimeout(Ce),Ce=void 0}function ao(i,t,e){i.scrollLeft+=t,i.scrollTop+=e}function lo(i){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(i).cloneNode(!0):e?e(i).clone(!0)[0]:i.cloneNode(!0)}function uo(i,t,e){var n={};return Array.from(i.children).forEach(function(o){var r,s,a,l;if(!(!$t(o,t.draggable,i,!1)||o.animated||o===e)){var d=W(o);n.left=Math.min((r=n.left)!==null&&r!==void 0?r:1/0,d.left),n.top=Math.min((s=n.top)!==null&&s!==void 0?s:1/0,d.top),n.right=Math.max((a=n.right)!==null&&a!==void 0?a:-1/0,d.right),n.bottom=Math.max((l=n.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var pt="Sortable"+new Date().getTime();function ws(){var i=[],t;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(v(o,"display")==="none"||o===w.ghost)){i.push({target:o,rect:W(o)});var r=_t({},i[i.length-1].rect);if(o.thisAnimationDuration){var s=se(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(ys(i,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var r=!1,s=0;i.forEach(function(a){var l=0,d=a.target,c=d.fromRect,u=W(d),p=d.prevFromRect,f=d.prevToRect,g=a.rect,b=se(d,!0);b&&(u.top-=b.f,u.left-=b.e),d.toRect=u,d.thisAnimationDuration&&qi(p,u)&&!qi(c,u)&&(g.top-u.top)/(g.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=Es(g,p,f,o.options)),qi(u,c)||(d.prevFromRect=c,d.prevToRect=u,l||(l=o.options.animation),o.animate(d,g,u,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof n=="function"&&n()},s):typeof n=="function"&&n(),i=[]},animate:function(n,o,r,s){if(s){v(n,"transition",""),v(n,"transform","");var a=se(this.el),l=a&&a.a,d=a&&a.d,c=(o.left-r.left)/(l||1),u=(o.top-r.top)/(d||1);n.animatingX=!!c,n.animatingY=!!u,v(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=xs(n),v(n,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),v(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){v(n,"transition",""),v(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},s)}}}}function xs(i){return i.offsetWidth}function Es(i,t,e,n){return Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*n.animation}var le=[],Xi={initializeByDefault:!0},Te={mount:function(t){for(var e in Xi)Xi.hasOwnProperty(e)&&!(e in t)&&(t[e]=Xi[e]);le.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),le.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=t+"Global";le.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](_t({sortable:e},n)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](_t({sortable:e},n)))})},initializePlugins:function(t,e,n,o){le.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,e,t.options);d.sortable=t,d.options=t.options,t[l]=d,Ot(n,d.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,e){var n={};return le.forEach(function(o){typeof o.eventProperties=="function"&&Ot(n,o.eventProperties.call(e[o.pluginName],t))}),n},modifyOption:function(t,e,n){var o;return le.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(o=r.optionListeners[e].call(t[r.pluginName],n))}),o}};function $s(i){var t=i.sortable,e=i.rootEl,n=i.name,o=i.targetEl,r=i.cloneEl,s=i.toEl,a=i.fromEl,l=i.oldIndex,d=i.newIndex,c=i.oldDraggableIndex,u=i.newDraggableIndex,p=i.originalEvent,f=i.putSortable,g=i.extraEventProperties;if(t=t||e&&e[pt],!!t){var b,V=t.options,et="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Lt&&!_e?b=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(n,!0,!0)),b.to=s||e,b.from=a||e,b.item=o||e,b.clone=r,b.oldIndex=l,b.newIndex=d,b.oldDraggableIndex=c,b.newDraggableIndex=u,b.originalEvent=p,b.pullMode=f?f.lastPutMode:void 0;var Z=_t(_t({},g),Te.getEventProperties(n,t));for(var ct in Z)b[ct]=Z[ct];e&&e.dispatchEvent(b),V[et]&&V[et].call(t,b)}}var Ss=["evt"],ft=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,r=gs(n,Ss);Te.pluginEvent.bind(w)(t,e,_t({dragEl:h,parentEl:j,ghostEl:E,rootEl:B,nextEl:Gt,lastDownEl:Ze,cloneEl:U,cloneHidden:Bt,dragStarted:Pe,putSortable:rt,activeSortable:w.active,originalEvent:o,oldIndex:de,oldDraggableIndex:De,newIndex:vt,newDraggableIndex:kt,hideGhostForTarget:yo,unhideGhostForTarget:bo,cloneNowHidden:function(){Bt=!0},cloneNowShown:function(){Bt=!1},dispatchSortableEvent:function(a){ut({sortable:e,name:a,originalEvent:o})}},r))};function ut(i){$s(_t({putSortable:rt,cloneEl:U,targetEl:h,rootEl:B,oldIndex:de,oldDraggableIndex:De,newIndex:vt,newDraggableIndex:kt},i))}var h,j,E,B,Gt,Ze,U,Bt,de,vt,De,kt,ze,rt,ue=!1,qe=!1,Xe=[],Jt,St,Yi,Wi,co,ho,Pe,ce,Oe,Re=!1,Ye=!1,We,lt,Gi=[],Ji=!1,Ge=[],Je=typeof document<"u",Ke=Zi,po=_e||Lt?"cssFloat":"float",_s=Je&&!Qn&&!Zi&&"draggable"in document.createElement("div"),fo=function(){if(Je){if(Lt)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),go=function(t,e){var n=v(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ae(t,0,e),s=ae(t,1,e),a=r&&v(r),l=s&&v(s),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+W(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+W(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=o&&n[po]==="none"||s&&n[po]==="none"&&d+c>o)?"vertical":"horizontal"},As=function(t,e,n){var o=n?t.left:t.top,r=n?t.right:t.bottom,s=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,d=n?e.width:e.height;return o===a||r===l||o+s/2===a+d/2},Cs=function(t,e){var n;return Xe.some(function(o){var r=o[pt].options.emptyInsertThreshold;if(!(!r||zi(o))){var s=W(o),a=t>=s.left-r&&t<=s.right+r,l=e>=s.top-r&&e<=s.bottom+r;if(a&&l)return n=o}}),n},mo=function(t){function e(r,s){return function(a,l,d,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||u))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,d,c),s)(a,l,d,c);var p=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var n={},o=t.group;(!o||Fe(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},yo=function(){!fo&&E&&v(E,"display","none")},bo=function(){!fo&&E&&v(E,"display","")};Je&&!Qn&&document.addEventListener("click",function(i){if(qe)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),qe=!1,!1},!0);var Kt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=Cs(t.clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[pt]._onDragOver(n)}}},Ts=function(t){h&&h.parentNode[pt]._isOutsideThisEl(t.target)};function w(i,t){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=t=Ot({},t),i[pt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return go(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:w.supportPointer!==!1&&"PointerEvent"in window&&(!Ae||Zi),emptyInsertThreshold:5};Te.initializePlugins(this,i,e);for(var n in e)!(n in t)&&(t[n]=e[n]);mo(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:_s,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?C(i,"pointerdown",this._onTapStart):(C(i,"mousedown",this._onTapStart),C(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(i,"dragover",this),C(i,"dragenter",this)),Xe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ot(this,ws())}w.prototype={constructor:w,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(ce=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(Ns(n),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ae&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=$t(l,o.draggable,n,!1),!(l&&l.animated)&&Ze!==l)){if(de=Et(l),De=Et(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){ut({sortable:e,rootEl:d,name:"filter",targetEl:l,toEl:n,fromEl:n}),ft("filter",e,{evt:t}),r&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=$t(d,u.trim(),n,!1),u)return ut({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:n,toEl:n}),ft("filter",e,{evt:t}),!0}),c)){r&&t.preventDefault();return}o.handle&&!$t(d,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o=this,r=o.el,s=o.options,a=r.ownerDocument,l;if(n&&!h&&n.parentNode===r){var d=W(n);if(B=r,h=n,j=h.parentNode,Gt=h.nextSibling,Ze=n,ze=s.group,w.dragged=h,Jt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},co=Jt.clientX-d.left,ho=Jt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(ft("delayEnded",o,{evt:t}),w.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Kn&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,e),ut({sortable:o,name:"choose",originalEvent:t}),bt(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){no(h,c.trim(),Ki)}),C(a,"dragover",Kt),C(a,"mousemove",Kt),C(a,"touchmove",Kt),s.supportPointer?(C(a,"pointerup",o._onDrop),!this.nativeDraggable&&C(a,"pointercancel",o._onDrop)):(C(a,"mouseup",o._onDrop),C(a,"touchend",o._onDrop),C(a,"touchcancel",o._onDrop)),Kn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),ft("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(_e||Lt))){if(w.eventCanceled){this._onDrop();return}s.supportPointer?(C(a,"pointerup",o._disableDelayedDrag),C(a,"pointercancel",o._disableDelayedDrag)):(C(a,"mouseup",o._disableDelayedDrag),C(a,"touchend",o._disableDelayedDrag),C(a,"touchcancel",o._disableDelayedDrag)),C(a,"mousemove",o._delayedDragTouchMoveHandler),C(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&C(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Ki(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._disableDelayedDrag),_(t,"touchend",this._disableDelayedDrag),_(t,"touchcancel",this._disableDelayedDrag),_(t,"pointerup",this._disableDelayedDrag),_(t,"pointercancel",this._disableDelayedDrag),_(t,"mousemove",this._delayedDragTouchMoveHandler),_(t,"touchmove",this._delayedDragTouchMoveHandler),_(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):e?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(h,"dragend",this),C(B,"dragstart",this._onDragStart));try{document.selection?ti(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(ue=!1,B&&h){ft("dragStarted",this,{evt:e}),this.nativeDraggable&&C(document,"dragover",Ts);var n=this.options;!t&&bt(h,n.dragClass,!1),bt(h,n.ghostClass,!0),w.active=this,t&&this._appendGhost(),ut({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(St){this._lastX=St.clientX,this._lastY=St.clientY,yo();for(var t=document.elementFromPoint(St.clientX,St.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(St.clientX,St.clientY),t!==e);)e=t;if(h.parentNode[pt]._isOutsideThisEl(t),e)do{if(e[pt]){var n=void 0;if(n=e[pt]._onDragOver({clientX:St.clientX,clientY:St.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=eo(e));bo()}},_onTouchMove:function(t){if(Jt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=E&&se(E,!0),a=E&&s&&s.a,l=E&&s&&s.d,d=Ke&<&&ro(lt),c=(r.clientX-Jt.clientX+o.x)/(a||1)+(d?d[0]-Gi[0]:0)/(a||1),u=(r.clientY-Jt.clientY+o.y)/(l||1)+(d?d[1]-Gi[1]:0)/(l||1);if(!w.active&&!ue){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(E){s?(s.e+=c-(Yi||0),s.f+=u-(Wi||0)):s={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");v(E,"webkitTransform",p),v(E,"mozTransform",p),v(E,"msTransform",p),v(E,"transform",p),Yi=c,Wi=u,St=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!E){var t=this.options.fallbackOnBody?document.body:B,e=W(h,!0,Ke,!0,t),n=this.options;if(Ke){for(lt=t;v(lt,"position")==="static"&&v(lt,"transform")==="none"&<!==document;)lt=lt.parentNode;lt!==document.body&<!==document.documentElement?(lt===document&&(lt=At()),e.top+=lt.scrollTop,e.left+=lt.scrollLeft):lt=At(),Gi=ro(lt)}E=h.cloneNode(!0),bt(E,n.ghostClass,!1),bt(E,n.fallbackClass,!0),bt(E,n.dragClass,!0),v(E,"transition",""),v(E,"transform",""),v(E,"box-sizing","border-box"),v(E,"margin",0),v(E,"top",e.top),v(E,"left",e.left),v(E,"width",e.width),v(E,"height",e.height),v(E,"opacity","0.8"),v(E,"position",Ke?"absolute":"fixed"),v(E,"zIndex","100000"),v(E,"pointerEvents","none"),w.ghost=E,t.appendChild(E),v(E,"transform-origin",co/parseInt(E.style.width)*100+"% "+ho/parseInt(E.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,r=n.options;if(ft("dragStart",this,{evt:t}),w.eventCanceled){this._onDrop();return}ft("setupClone",this),w.eventCanceled||(U=lo(h),U.removeAttribute("id"),U.draggable=!1,U.style["will-change"]="",this._hideClone(),bt(U,this.options.chosenClass,!1),w.clone=U),n.cloneId=ti(function(){ft("clone",n),!w.eventCanceled&&(n.options.removeCloneOnHide||B.insertBefore(U,h),n._hideClone(),ut({sortable:n,name:"clone"}))}),!e&&bt(h,r.dragClass,!0),e?(qe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(_(document,"mouseup",n._onDrop),_(document,"touchend",n._onDrop),_(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,h)),C(document,"drop",n),v(h,"transform","translateZ(0)")),ue=!0,n._dragStartId=ti(n._dragStarted.bind(n,e,t)),C(document,"selectstart",n),Pe=!0,window.getSelection().removeAllRanges(),Ae&&v(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,o,r,s,a=this.options,l=a.group,d=w.active,c=ze===l,u=a.sort,p=rt||d,f,g=this,b=!1;if(Ji)return;function V(wt,Qt){ft(wt,g,_t({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:u,fromSortable:p,target:n,completed:Z,onMove:function(te,It){return Qe(B,e,h,o,te,W(te),t,It)},changed:ct},Qt))}function et(){V("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function Z(wt){return V("dragOverCompleted",{insertion:wt}),wt&&(c?d._hideClone():d._showClone(g),g!==p&&(bt(h,rt?rt.options.ghostClass:d.options.ghostClass,!1),bt(h,a.ghostClass,!0)),rt!==g&&g!==w.active?rt=g:g===w.active&&rt&&(rt=null),p===g&&(g._ignoreWhileAnimating=n),g.animateAll(function(){V("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===e&&!n.animated)&&(ce=null),!a.dragoverBubble&&!t.rootEl&&n!==document&&(h.parentNode[pt]._isOutsideThisEl(t.target),!wt&&Kt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),b=!0}function ct(){vt=Et(h),kt=Et(h,a.draggable),ut({sortable:g,name:"change",toEl:e,newIndex:vt,newDraggableIndex:kt,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=$t(n,a.draggable,e,!0),V("dragOver"),w.eventCanceled)return b;if(h.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||g._ignoreWhileAnimating===n)return Z(!1);if(qe=!1,d&&!a.disabled&&(c?u||(s=j!==B):rt===this||(this.lastPutMode=ze.checkPull(this,d,h,t))&&l.checkPut(this,d,h,t))){if(f=this._getDirection(t,n)==="vertical",o=W(h),V("dragOverValid"),w.eventCanceled)return b;if(s)return j=B,et(),this._hideClone(),V("revert"),w.eventCanceled||(Gt?B.insertBefore(h,Gt):B.appendChild(h)),Z(!0);var it=zi(e,a.draggable);if(!it||Rs(t,f,this)&&!it.animated){if(it===h)return Z(!1);if(it&&e===t.target&&(n=it),n&&(r=W(n)),Qe(B,e,h,o,n,r,t,!!n)!==!1)return et(),it&&it.nextSibling?e.insertBefore(h,it.nextSibling):e.appendChild(h),j=e,ct(),Z(!0)}else if(it&&Os(t,f,this)){var $=ae(e,0,a,!0);if($===h)return Z(!1);if(n=$,r=W(n),Qe(B,e,h,o,n,r,t,!1)!==!1)return et(),e.insertBefore(h,$),j=e,ct(),Z(!0)}else if(n.parentNode===e){r=W(n);var m=0,A,N=h.parentNode!==e,M=!As(h.animated&&h.toRect||o,n.animated&&n.toRect||r,f),J=f?"top":"left",K=oo(n,"top","top")||oo(h,"top","top"),k=K?K.scrollTop:void 0;ce!==n&&(A=r[J],Re=!1,Ye=!M&&a.invertSwap||N),m=Ls(t,n,r,f,M?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Ye,ce===n);var I;if(m!==0){var Y=Et(h);do Y-=m,I=j.children[Y];while(I&&(v(I,"display")==="none"||I===E))}if(m===0||I===n)return Z(!1);ce=n,Oe=m;var gt=n.nextElementSibling,at=!1;at=m===1;var mt=Qe(B,e,h,o,n,r,t,at);if(mt!==!1)return(mt===1||mt===-1)&&(at=mt===1),Ji=!0,setTimeout(Ps,30),et(),at&&!gt?e.appendChild(h):n.parentNode.insertBefore(h,at?gt:n),K&&ao(K,0,k-K.scrollTop),j=h.parentNode,A!==void 0&&!Ye&&(We=Math.abs(A-W(n)[J])),ct(),Z(!0)}if(e.contains(h))return Z(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",Kt),_(document,"mousemove",Kt),_(document,"touchmove",Kt)},_offUpEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._onDrop),_(t,"touchend",this._onDrop),_(t,"pointerup",this._onDrop),_(t,"pointercancel",this._onDrop),_(t,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(vt=Et(h),kt=Et(h,n.draggable),ft("drop",this,{evt:t}),j=h&&h.parentNode,vt=Et(h),kt=Et(h,n.draggable),w.eventCanceled){this._nulling();return}ue=!1,Ye=!1,Re=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Qi(this.cloneId),Qi(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ae&&v(document.body,"user-select",""),v(h,"transform",""),t&&(Pe&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),E&&E.parentNode&&E.parentNode.removeChild(E),(B===j||rt&&rt.lastPutMode!=="clone")&&U&&U.parentNode&&U.parentNode.removeChild(U),h&&(this.nativeDraggable&&_(h,"dragend",this),Ki(h),h.style["will-change"]="",Pe&&!ue&&bt(h,rt?rt.options.ghostClass:this.options.ghostClass,!1),bt(h,this.options.chosenClass,!1),ut({sortable:this,name:"unchoose",toEl:j,newIndex:null,newDraggableIndex:null,originalEvent:t}),B!==j?(vt>=0&&(ut({rootEl:j,name:"add",toEl:j,fromEl:B,originalEvent:t}),ut({sortable:this,name:"remove",toEl:j,originalEvent:t}),ut({rootEl:j,name:"sort",toEl:j,fromEl:B,originalEvent:t}),ut({sortable:this,name:"sort",toEl:j,originalEvent:t})),rt&&rt.save()):vt!==de&&vt>=0&&(ut({sortable:this,name:"update",toEl:j,originalEvent:t}),ut({sortable:this,name:"sort",toEl:j,originalEvent:t})),w.active&&((vt==null||vt===-1)&&(vt=de,kt=De),ut({sortable:this,name:"end",toEl:j,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ft("nulling",this),B=h=j=E=Gt=U=Ze=Bt=Jt=St=Pe=vt=kt=de=De=ce=Oe=rt=ze=w.dragged=w.ghost=w.clone=w.active=null,Ge.forEach(function(t){t.checked=!0}),Ge.length=Yi=Wi=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),Ds(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,o=0,r=n.length,s=this.options;o<r;o++)e=n[o],$t(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||Is(e));return t},sort:function(t,e){var n={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];$t(a,this.options.draggable,o,!1)&&(n[r]=a)},this),e&&this.captureAnimationState(),t.forEach(function(r){n[r]&&(o.removeChild(n[r]),o.appendChild(n[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return $t(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var o=Te.modifyOption(this,t,e);typeof o<"u"?n[t]=o:n[t]=e,t==="group"&&mo(n)},destroy:function(){ft("destroy",this);var t=this.el;t[pt]=null,_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart),_(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Xe.splice(Xe.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Bt){if(ft("hideClone",this),w.eventCanceled)return;v(U,"display","none"),this.options.removeCloneOnHide&&U.parentNode&&U.parentNode.removeChild(U),Bt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Bt){if(ft("showClone",this),w.eventCanceled)return;h.parentNode==B&&!this.options.group.revertClone?B.insertBefore(U,h):Gt?B.insertBefore(U,Gt):B.appendChild(U),this.options.group.revertClone&&this.animate(h,U),v(U,"display",""),Bt=!1}}};function Ds(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function Qe(i,t,e,n,o,r,s,a){var l,d=i[pt],c=d.options.onMove,u;return window.CustomEvent&&!Lt&&!_e?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=i,l.dragged=e,l.draggedRect=n,l.related=o||t,l.relatedRect=r||W(t),l.willInsertAfter=a,l.originalEvent=s,i.dispatchEvent(l),c&&(u=c.call(d,l,s)),u}function Ki(i){i.draggable=!1}function Ps(){Ji=!1}function Os(i,t,e){var n=W(ae(e.el,0,e.options,!0)),o=uo(e.el,e.options,E),r=10;return t?i.clientX<o.left-r||i.clientY<n.top&&i.clientX<n.right:i.clientY<o.top-r||i.clientY<n.bottom&&i.clientX<n.left}function Rs(i,t,e){var n=W(zi(e.el,e.options.draggable)),o=uo(e.el,e.options,E),r=10;return t?i.clientX>o.right+r||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>o.bottom+r||i.clientX>n.right&&i.clientY>n.top}function Ls(i,t,e,n,o,r,s,a){var l=n?i.clientY:i.clientX,d=n?e.height:e.width,c=n?e.top:e.left,u=n?e.bottom:e.right,p=!1;if(!s){if(a&&We<d*o){if(!Re&&(Oe===1?l>c+d*r/2:l<u-d*r/2)&&(Re=!0),Re)p=!0;else if(Oe===1?l<c+We:l>u-We)return-Oe}else if(l>c+d*(1-o)/2&&l<u-d*(1-o)/2)return Ms(t)}return p=p||s,p&&(l<c+d*r/2||l>u-d*r/2)?l>c+d/2?1:-1:0}function Ms(i){return Et(h)<Et(i)?1:-1}function Is(i){for(var t=i.tagName+i.className+i.src+i.href+i.textContent,e=t.length,n=0;e--;)n+=t.charCodeAt(e);return n.toString(36)}function Ns(i){Ge.length=0;for(var t=i.getElementsByTagName("input"),e=t.length;e--;){var n=t[e];n.checked&&Ge.push(n)}}function ti(i){return setTimeout(i,0)}function Qi(i){return clearTimeout(i)}Je&&C(document,"touchmove",function(i){(w.active||ue)&&i.cancelable&&i.preventDefault()}),w.utils={on:C,off:_,css:v,find:no,is:function(t,e){return!!$t(t,e,t,!1)},extend:bs,throttle:so,closest:$t,toggleClass:bt,clone:lo,index:Et,nextTick:ti,cancelNextTick:Qi,detectDirection:go,getChild:ae,expando:pt},w.get=function(i){return i[pt]},w.mount=function(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(w.utils=_t(_t({},w.utils),n.utils)),Te.mount(n)})},w.create=function(i,t){return new w(i,t)},w.version=ms;var G=[],Le,tn,en=!1,nn,on,ei,Me;function Hs(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return i.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?C(document,"dragover",this._handleAutoScroll):this.options.supportPointer?C(document,"pointermove",this._handleFallbackAutoScroll):n.touches?C(document,"touchmove",this._handleFallbackAutoScroll):C(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),vo(),ii(),vs()},nulling:function(){ei=tn=Le=en=Me=nn=on=null,G.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var o=this,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,s);if(ei=e,n||this.options.forceAutoScrollFallback||_e||Lt||Ae){rn(e,this.options,a,n);var l=Vt(a,!0);en&&(!Me||r!==nn||s!==on)&&(Me&&vo(),Me=setInterval(function(){var d=Vt(document.elementFromPoint(r,s),!0);d!==l&&(l=d,ii()),rn(e,o.options,d,n)},10),nn=r,on=s)}else{if(!this.options.bubbleScroll||Vt(a,!0)===At()){ii();return}rn(e,this.options,Vt(a,!1),!1)}}},Ot(i,{pluginName:"scroll",initializeByDefault:!0})}function ii(){G.forEach(function(i){clearInterval(i.pid)}),G=[]}function vo(){clearInterval(Me)}var rn=so(function(i,t,e,n){if(t.scroll){var o=(i.touches?i.touches[0]:i).clientX,r=(i.touches?i.touches[0]:i).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=At(),d=!1,c;tn!==e&&(tn=e,ii(),Le=t.scroll,c=t.scrollFn,Le===!0&&(Le=Vt(e,!0)));var u=0,p=Le;do{var f=p,g=W(f),b=g.top,V=g.bottom,et=g.left,Z=g.right,ct=g.width,it=g.height,$=void 0,m=void 0,A=f.scrollWidth,N=f.scrollHeight,M=v(f),J=f.scrollLeft,K=f.scrollTop;f===l?($=ct<A&&(M.overflowX==="auto"||M.overflowX==="scroll"||M.overflowX==="visible"),m=it<N&&(M.overflowY==="auto"||M.overflowY==="scroll"||M.overflowY==="visible")):($=ct<A&&(M.overflowX==="auto"||M.overflowX==="scroll"),m=it<N&&(M.overflowY==="auto"||M.overflowY==="scroll"));var k=$&&(Math.abs(Z-o)<=s&&J+ct<A)-(Math.abs(et-o)<=s&&!!J),I=m&&(Math.abs(V-r)<=s&&K+it<N)-(Math.abs(b-r)<=s&&!!K);if(!G[u])for(var Y=0;Y<=u;Y++)G[Y]||(G[Y]={});(G[u].vx!=k||G[u].vy!=I||G[u].el!==f)&&(G[u].el=f,G[u].vx=k,G[u].vy=I,clearInterval(G[u].pid),(k!=0||I!=0)&&(d=!0,G[u].pid=setInterval((function(){n&&this.layer===0&&w.active._onTouchMove(ei);var gt=G[this.layer].vy?G[this.layer].vy*a:0,at=G[this.layer].vx?G[this.layer].vx*a:0;typeof c=="function"&&c.call(w.dragged.parentNode[pt],at,gt,i,ei,G[this.layer].el)!=="continue"||ao(G[this.layer].el,at,gt)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==l&&(p=Vt(p,!1)));en=d}},30),wo=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var d=n||r;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function sn(){}sn.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=ae(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:wo},Ot(sn,{pluginName:"revertOnSpill"});function an(){}an.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,o=n||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:wo},Ot(an,{pluginName:"removeOnSpill"}),w.mount(new Hs),w.mount(an,sn);const Vs=i=>{const t=i.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(n=>n.nodeType!=Node.ELEMENT_NODE||!n.classList.contains("sortable-fallback")),e},Bs=(i,t,e,n,o,r)=>{const a=i.item.parentNode;for(const b of e)a.appendChild(b);if(i.oldIndex==i.newIndex)return;const l=n.getArray(),d=i.item.querySelector("eox-layercontrol-layer").layer.get(o),c=l.find(b=>b.get(o)===d),u=r.dataset.layer,p=l.find(b=>b.get(o)==u);let f,g;for(f=0;f<l.length;f++)if(l[f]==c){n.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?n.insertAt(g,c):n.insertAt(g+1,c);break}t.requestUpdate()};function ks(i,t,e,n){let o=[],r=null;i._sortable=w.create(i,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>o=Vs(s),onMove:s=>{r=s.related},onEnd:s=>Bs(s,n,o,t,e,r)})}function Us(i,t,e,n){const o=i.getArray();let r=!1;o.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),r=!0),s.get(e)||(s.set(e,`layer ${a}`),r=!0),r&&n.requestUpdate()})}function ln(i,t,e){let n=[];const o=(r,s,a)=>{n=[...n,...r.filter(d=>d.get(s)===a)];const l=r.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>o(d.getLayers().getArray(),s,a)),n};return o(i,t,e),n}function Fs(i,t,e){if(!i||!t)return!1;if(!xo(i,e))return!0;const n=i.get("minZoom"),o=i.get("maxZoom"),r=t.getView().getZoom();return r>n&&r<o}function xo(i,t){const e=i.get("minZoom"),n=i.get("maxZoom");return!!(t&&(e!==-1/0||n!==1/0))}function js(i,t){var o,r,s;return!i||!t?void 0:i.getLayers?"group":((s=(o=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:o.ol_uid)==null?void 0:s.includes(i.getSource?(r=i.getSource())==null?void 0:r.ol_uid:void 0))?"draw":i.declutter_!==void 0?"vector":"raster"}const Zs=(i,t,e)=>{let n=t;return e.layer.getSource().getTileUrlFunction()&&(n||(n=e.layer.getSource().getTileUrlFunction()),e.layer.getSource().setTileUrlFunction((...o)=>hs(n(...o),i)),e.layer.getSource().setKey(new Date)),n};function zs(i,t,e){const n="updateStyleVariables"in t,o="setStyle"in t,r=n?t.style_:e.style;let s=r==null?void 0:r.variables;if(s){const a=dn(i);if(r.variables={...s,...a},n)t.updateStyleVariables(a);else if(o){const l=qs(r);t.setStyle(l)}}}const dn=i=>{const t={};for(const e in i)if(typeof i[e]=="object"&&i[e]!==null){const n=dn(i[e]);for(const o in n)t[o]=n==null?void 0:n[o]}else t[e]=i==null?void 0:i[e];return t};function qs(i){let t=i;if("variables"in i){let e=JSON.stringify(i);const{variables:n}=i;for(const o in n)typeof n[o]=="number"?e=e.replaceAll(`["var","${o}"]`,n[o]):e=e.replaceAll(`["var","${o}"]`,`"${n[o]}"`);t=JSON.parse(e)}return t}const Xs=(i,t)=>{var e;if(i)return!("domainProperties"in i)||"domain"in i?{...i}:(e=Object.keys(i))==null?void 0:e.reduce((n,o)=>{if(o==="domainProperties"){const r=dn(t);n.domain=i[o].map(s=>r[s])}else n[o]=i[o];return n},{})};function Eo(i,t){var n;let e={};for(const o in i){const r=i[o].type;if(r&&r!=="object")e[o]=r==="number"?Number(t[o]):t[o];else if(typeof i[o]=="object"&&((n=i[o])!=null&&n.properties)){const s=Eo(i[o].properties,t);Object.keys(s).length>0&&(e[o]=s)}}return e}function Ys(i,t){var r,s,a,l,d;if(!t)return null;let e={},n="updateStyleVariables"in i?(r=i.style_)==null?void 0:r.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&n)e=n;else if((l=(a=i.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const c=new URL(i.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(c.searchParams.entries())}else return null;const o=Eo(((d=t.schema)==null?void 0:d.properties)||t.schema,e);return Object.keys(o).length?o:null}const Ws=(i,t)=>i==null?void 0:i.filter(e=>["remove","sort"].filter(n=>t!=null&&t.get("layerControlDisable")?n!=="sort":!0).includes(e)),Gs=(i,t)=>i==null?void 0:i.filter(e=>{let n=!0;return["remove","sort"].includes(e)&&(n=!1),e==="info"&&(n=t.get("description")),e==="config"&&(n=t.get("layerConfig")),e==="datetime"&&(n=t.get("layerDatetime")),e==="legend"&&(n=t.get("layerLegend")),n}),Js=(i,t)=>x`
|
|
46
|
+
<button slot="${i}-icon" class="icon">${t?i:O}</button>
|
|
47
|
+
`,Ks=i=>x`
|
|
48
48
|
<button
|
|
49
49
|
class="remove-icon icon"
|
|
50
|
-
@click=${()=>{const{layer:t}=
|
|
50
|
+
@click=${()=>{const{layer:t}=i;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),i.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
|
|
51
51
|
>
|
|
52
|
-
${
|
|
52
|
+
${i.unstyled?"x":O}
|
|
53
53
|
</button>
|
|
54
|
-
`,
|
|
54
|
+
`,Qs=i=>x`
|
|
55
55
|
<span class="button sort-icon icon drag-handle">
|
|
56
|
-
${
|
|
56
|
+
${i?"═":O}
|
|
57
57
|
</span>
|
|
58
|
-
|
|
58
|
+
`,$o=i=>{var e;const t=["layerControlHide","layerControlOptional"];return(e=i==null?void 0:i.getArray())==null?void 0:e.filter(n=>t.every(o=>!n.get(o)))};/**
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2020 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
-
*/const
|
|
62
|
+
*/const So=Hi(class extends Vi{constructor(i){if(super(i),i.type!==Ht.PROPERTY&&i.type!==Ht.ATTRIBUTE&&i.type!==Ht.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!fr(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===xt||t===O)return t;const e=i.element,n=i.name;if(i.type===Ht.PROPERTY){if(t===e[n])return xt}else if(i.type===Ht.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(n))return xt}else if(i.type===Ht.ATTRIBUTE&&e.getAttribute(n)===t+"")return xt;return Un(i),t}});/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/class
|
|
66
|
+
*/class un extends Vi{constructor(t){if(super(t),this.it=O,t.type!==Ht.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===O||t==null)return this._t=void 0,this.it=t;if(t===xt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}un.directiveName="unsafeHTML",un.resultType=1;const ta=Hi(un);/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/function*
|
|
70
|
+
*/function*ni(i,t){if(i!==void 0){let e=0;for(const n of i)yield t(n,e++)}}var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _o(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var cn,Ao;function ea(){if(Ao)return cn;Ao=1;var i="Expected a function",t=NaN,e="[object Symbol]",n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,d=typeof self=="object"&&self&&self.Object===Object&&self,c=l||d||Function("return this")(),u=Object.prototype,p=u.toString,f=Math.max,g=Math.min,b=function(){return c.Date.now()};function V(m,A,N){var M,J,K,k,I,Y,gt=0,at=!1,mt=!1,wt=!0;if(typeof m!="function")throw new TypeError(i);A=$(A)||0,Z(N)&&(at=!!N.leading,mt="maxWait"in N,K=mt?f($(N.maxWait)||0,A):K,wt="trailing"in N?!!N.trailing:wt);function Qt(H){var yt=M,jt=J;return M=J=void 0,gt=H,k=m.apply(jt,yt),k}function Ai(H){return gt=H,I=setTimeout(ee,A),at?Qt(H):k}function te(H){var yt=H-Y,jt=H-gt,jo=A-yt;return mt?g(jo,K-jt):jo}function It(H){var yt=H-Y,jt=H-gt;return Y===void 0||yt>=A||yt<0||mt&&jt>=K}function ee(){var H=b();if(It(H))return Ci(H);I=setTimeout(ee,te(H))}function Ci(H){return I=void 0,wt&&M?Qt(H):(M=J=void 0,k)}function fn(){I!==void 0&&clearTimeout(I),gt=0,M=Y=J=I=void 0}function Ve(){return I===void 0?k:Ci(b())}function F(){var H=b(),yt=It(H);if(M=arguments,J=this,Y=H,yt){if(I===void 0)return Ai(Y);if(mt)return I=setTimeout(ee,A),Qt(Y)}return I===void 0&&(I=setTimeout(ee,A)),k}return F.cancel=fn,F.flush=Ve,F}function et(m,A,N){var M=!0,J=!0;if(typeof m!="function")throw new TypeError(i);return Z(N)&&(M="leading"in N?!!N.leading:M,J="trailing"in N?!!N.trailing:J),V(m,A,{leading:M,maxWait:A,trailing:J})}function Z(m){var A=typeof m;return!!m&&(A=="object"||A=="function")}function ct(m){return!!m&&typeof m=="object"}function it(m){return typeof m=="symbol"||ct(m)&&p.call(m)==e}function $(m){if(typeof m=="number")return m;if(it(m))return t;if(Z(m)){var A=typeof m.valueOf=="function"?m.valueOf():m;m=Z(A)?A+"":A}if(typeof m!="string")return m===0?m:+m;m=m.replace(n,"");var N=r.test(m);return N||s.test(m)?a(m.slice(2),N?2:8):o.test(m)?t:+m}return cn=et,cn}var ia=ea();const Co=_o(ia);/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2018 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
-
*/const
|
|
74
|
+
*/const oi=i=>i??O;class To extends dt{constructor(){super();R(this,ri,wn`
|
|
75
75
|
.legend-container {
|
|
76
76
|
display: flex;
|
|
77
77
|
justify-content: center;
|
|
@@ -84,30 +84,30 @@
|
|
|
84
84
|
--cle-font-weight: inherit --cle-letter-spacing: inherit;
|
|
85
85
|
--cle-letter-spacing-title: inherit;
|
|
86
86
|
}
|
|
87
|
-
`);
|
|
87
|
+
`);R(this,si,"");this.unstyled=!1,this.noShadow=!1,this.layerLegend=null,this.layer=null}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return customElements.get("color-legend")||console.error("Please import `color-legend-element` in order to use layerLegend"),x`
|
|
88
88
|
<style>
|
|
89
|
-
${
|
|
90
|
-
${!this.unstyled&&
|
|
89
|
+
${T(this,ri)}
|
|
90
|
+
${!this.unstyled&&T(this,si)}
|
|
91
91
|
</style>
|
|
92
|
-
${
|
|
92
|
+
${Q(this.layerLegend,()=>x`
|
|
93
93
|
<div class="legend-container">
|
|
94
94
|
<!-- Render color-legend-->
|
|
95
95
|
<color-legend
|
|
96
96
|
id="${this.layer.get("id")}"
|
|
97
97
|
width=${this.layerLegend.width??325}
|
|
98
|
-
scaleType="${
|
|
99
|
-
markType="${
|
|
100
|
-
titleText="${
|
|
98
|
+
scaleType="${oi(this.layerLegend.scaleType)}"
|
|
99
|
+
markType="${oi(this.layerLegend.markType)}"
|
|
100
|
+
titleText="${oi(this.layerLegend.title)}"
|
|
101
101
|
.range=${this.layerLegend.range}
|
|
102
102
|
.domain=${this.layerLegend.domain}
|
|
103
|
-
tickFormat="${
|
|
103
|
+
tickFormat="${oi(this.layerLegend.tickFormat)}"
|
|
104
104
|
.ticks=${this.layerLegend.ticks??5}
|
|
105
105
|
.tickValues=${this.layerLegend.tickValues}
|
|
106
106
|
>
|
|
107
107
|
</color-legend>
|
|
108
108
|
</div>
|
|
109
109
|
`)}
|
|
110
|
-
`}}
|
|
110
|
+
`}}ri=new WeakMap,si=new WeakMap,z(To,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerLegend:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-legend",To);class Do extends dt{constructor(){super();R(this,Ne);R(this,Mt,{});R(this,he,null);R(this,Ie);R(this,ai,wn`
|
|
111
111
|
color-legend {
|
|
112
112
|
--cle-background: transparent;
|
|
113
113
|
--cle-font-family: inherit;
|
|
@@ -115,34 +115,34 @@
|
|
|
115
115
|
--cle-font-weight: inherit --cle-letter-spacing: inherit;
|
|
116
116
|
--cle-letter-spacing-title: inherit;
|
|
117
117
|
}
|
|
118
|
-
`);
|
|
118
|
+
`);R(this,li,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.throttleDataChange=Co(q(this,Ne,mn),1e3)}updated(e){if(e.has("layerConfig")){const n=this.layerConfig.type==="style"||this.layerConfig.style?100:1e3;this.throttleDataChange=Co(q(this,Ne,mn),n),this.requestUpdate()}}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){fe(this,he,Ys(this.layer,this.layerConfig)),Object.keys(T(this,Mt)).length!==0&&fe(this,he,T(this,Mt)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const e={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return x`
|
|
119
119
|
<style>
|
|
120
|
-
${
|
|
121
|
-
${!this.unstyled&&
|
|
120
|
+
${T(this,ai)}
|
|
121
|
+
${!this.unstyled&&T(this,li)}
|
|
122
122
|
</style>
|
|
123
|
-
${
|
|
124
|
-
${
|
|
123
|
+
${Q(this.layerConfig,()=>x`
|
|
124
|
+
${Q(this.layerConfig.legend,()=>x`
|
|
125
125
|
<eox-layercontrol-layer-legend
|
|
126
126
|
.noShadow=${!0}
|
|
127
127
|
.unstyled=${this.unstyled}
|
|
128
128
|
.layer=${this.layer}
|
|
129
|
-
.layerLegend=${
|
|
129
|
+
.layerLegend=${Xs(this.layerConfig.legend,T(this,Mt))}
|
|
130
130
|
></eox-layercontrol-layer-legend>
|
|
131
131
|
`)}
|
|
132
132
|
<!-- Render a JSON form for layer configuration -->
|
|
133
133
|
<eox-jsonform
|
|
134
134
|
.schema=${this.layerConfig.schema}
|
|
135
|
-
.value=${
|
|
136
|
-
.options=${
|
|
135
|
+
.value=${T(this,he)}
|
|
136
|
+
.options=${e}
|
|
137
137
|
@change=${this.throttleDataChange}
|
|
138
138
|
></eox-jsonform>
|
|
139
139
|
`)}
|
|
140
|
-
`}}
|
|
140
|
+
`}}Mt=new WeakMap,he=new WeakMap,Ie=new WeakMap,Ne=new WeakSet,mn=function(e){fe(this,Mt,e.detail),this.layerConfig.type==="style"||this.layerConfig.style?"setStyle"in this.layer||"updateStyleVariables"in this.layer?zs(T(this,Mt),this.layer,this.layerConfig):console.error(`Layer type ${this.layer.get("type")??""} does not support styles configuration`):fe(this,Ie,Zs(T(this,Mt),T(this,Ie),this)),this.requestUpdate()},ai=new WeakMap,li=new WeakMap,z(Do,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",Do);class Po extends dt{constructor(){super();R(this,di);R(this,ui,"");R(this,ci,"");this.unstyled=!1,this.noShadow=!1,this.layerDatetime=null,this.layer=null}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return customElements.get("eox-timecontrol")||console.error("Please import @eox/timecontrol in order to use layerDatetime"),x`
|
|
141
141
|
<style>
|
|
142
|
-
${
|
|
143
|
-
${!this.unstyled&&
|
|
142
|
+
${T(this,ui)}
|
|
143
|
+
${!this.unstyled&&T(this,ci)}
|
|
144
144
|
</style>
|
|
145
|
-
${
|
|
145
|
+
${Q(this.layerDatetime,()=>x`
|
|
146
146
|
<!-- Render a Timecontrol for layer date time -->
|
|
147
147
|
<eox-timecontrol
|
|
148
148
|
?unstyled=${this.unstyled}
|
|
@@ -153,10 +153,10 @@
|
|
|
153
153
|
.controlValues=${this.layerDatetime.controlValues}
|
|
154
154
|
.controlProperty=${void 0}
|
|
155
155
|
current-step=${this.layerDatetime.currentStep}
|
|
156
|
-
@stepchange=${
|
|
156
|
+
@stepchange=${q(this,di,zo)}
|
|
157
157
|
></eox-timecontrol>
|
|
158
158
|
`)}
|
|
159
|
-
`}}
|
|
159
|
+
`}}di=new WeakSet,zo=function(e){this.dispatchEvent(new CustomEvent("datetime:updated",{bubbles:!0,detail:{datetime:e.detail.currentStep,layer:this.layer}})),this.layerDatetime.currentStep=e.detail.currentStep,this.requestUpdate()},ui=new WeakMap,ci=new WeakMap,z(Po,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerDatetime:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-datetime",Po);class Oo extends dt{constructor(){super();R(this,He,e=>(this.selectedTab===e||this.toolsAsList)&&"highlighted");R(this,hi,`
|
|
160
160
|
.tabbed figure {
|
|
161
161
|
margin: 0;
|
|
162
162
|
}
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
.tabbed label.highlighted {
|
|
177
177
|
background: lightgrey;
|
|
178
178
|
}
|
|
179
|
-
`);
|
|
179
|
+
`);R(this,pi,`
|
|
180
180
|
.listed {
|
|
181
181
|
background: #ffffff !important;
|
|
182
182
|
display: flex;
|
|
@@ -202,21 +202,21 @@
|
|
|
202
202
|
background: #00417011;
|
|
203
203
|
border-top: 1px solid #0041701a;
|
|
204
204
|
}
|
|
205
|
-
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const
|
|
205
|
+
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.tabs,n=this.actions,o=n.length+e.length>1;return x`
|
|
206
206
|
<style>
|
|
207
|
-
${
|
|
208
|
-
${!this.unstyled&&
|
|
207
|
+
${T(this,hi)}
|
|
208
|
+
${!this.unstyled&&T(this,pi)}
|
|
209
209
|
</style>
|
|
210
210
|
<div class="tabbed">
|
|
211
211
|
<!-- Navigation for tabs and actions -->
|
|
212
|
-
${
|
|
212
|
+
${Q(o,()=>x`
|
|
213
213
|
<nav>
|
|
214
|
-
${
|
|
214
|
+
${Q(!this.toolsAsList,()=>x`
|
|
215
215
|
<div>
|
|
216
216
|
<!-- Labels for tabs -->
|
|
217
|
-
${
|
|
217
|
+
${ni(e,(r,s)=>x`
|
|
218
218
|
<label
|
|
219
|
-
class=${
|
|
219
|
+
class=${T(this,He).call(this,s)}
|
|
220
220
|
@click=${()=>this.selectedTab=s}
|
|
221
221
|
>
|
|
222
222
|
<!-- Customizable icon for each tab -->
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
</div>
|
|
227
227
|
<div>
|
|
228
228
|
<!-- Icons for actions -->
|
|
229
|
-
${
|
|
229
|
+
${ni(n,r=>x`
|
|
230
230
|
<span>
|
|
231
231
|
<!-- Customizable icon for each action -->
|
|
232
232
|
<slot name=${`${r}-icon`}>${r}</slot>
|
|
@@ -238,21 +238,21 @@
|
|
|
238
238
|
`)}
|
|
239
239
|
<figure>
|
|
240
240
|
<!-- Content for each tab -->
|
|
241
|
-
${
|
|
242
|
-
${
|
|
241
|
+
${ni(e,(r,s)=>x`
|
|
242
|
+
${Q(this.toolsAsList,()=>x`
|
|
243
243
|
<label class="listed">
|
|
244
244
|
<!-- Customizable icon for each tab -->
|
|
245
245
|
<slot name=${`${r}-icon`}>${r}</slot>
|
|
246
246
|
</label>
|
|
247
247
|
`)}
|
|
248
|
-
<div class="tab ${
|
|
248
|
+
<div class="tab ${T(this,He).call(this,s)}">
|
|
249
249
|
<!-- Content slot for each tab -->
|
|
250
250
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
251
251
|
</div>
|
|
252
252
|
`)}
|
|
253
253
|
</figure>
|
|
254
254
|
</div>
|
|
255
|
-
`}}
|
|
255
|
+
`}}He=new WeakMap,hi=new WeakMap,pi=new WeakMap,z(Oo,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-tools-items",Oo);const na=`
|
|
256
256
|
button,
|
|
257
257
|
.button {
|
|
258
258
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -376,7 +376,7 @@ button.smallest.icon::before {
|
|
|
376
376
|
width: 16px;
|
|
377
377
|
padding: 0px;
|
|
378
378
|
}
|
|
379
|
-
`,
|
|
379
|
+
`,oa=`
|
|
380
380
|
input[type=radio] {
|
|
381
381
|
appearance: none;
|
|
382
382
|
-webkit-appearance: none;
|
|
@@ -404,7 +404,7 @@ input[type=radio]:checked:after {
|
|
|
404
404
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
405
405
|
|
|
406
406
|
}
|
|
407
|
-
`,
|
|
407
|
+
`,Ro=`
|
|
408
408
|
input[type=checkbox] {
|
|
409
409
|
appearance: none;
|
|
410
410
|
-webkit-appearance: none;
|
|
@@ -427,7 +427,7 @@ input[type=checkbox]:checked:after {
|
|
|
427
427
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
428
428
|
|
|
429
429
|
}
|
|
430
|
-
`,
|
|
430
|
+
`,ra=`
|
|
431
431
|
input[type="range"] {
|
|
432
432
|
-webkit-appearance: none;
|
|
433
433
|
width: 90%;
|
|
@@ -504,9 +504,9 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
504
504
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
505
505
|
border: 0;
|
|
506
506
|
}
|
|
507
|
-
`;class
|
|
507
|
+
`;class Lo extends dt{constructor(){super();z(this,"_removeButton",()=>Ks(this));z(this,"_sortButton",()=>Qs(this.unstyled));z(this,"_button",e=>Js(e,this.unstyled));z(this,"_getDefaultTools",()=>{var e;return x`
|
|
508
508
|
<div slot="info-content">
|
|
509
|
-
${
|
|
509
|
+
${ta(this.layer.get("description"))}
|
|
510
510
|
</div>
|
|
511
511
|
<div slot="opacity-content">
|
|
512
512
|
<!-- Input for opacity -->
|
|
@@ -515,13 +515,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
515
515
|
min="0"
|
|
516
516
|
max="1"
|
|
517
517
|
step="0.01"
|
|
518
|
-
value=${
|
|
518
|
+
value=${So((e=this.layer)==null?void 0:e.getOpacity())}
|
|
519
519
|
@input=${n=>this.layer.setOpacity(parseFloat(n.target.value))}
|
|
520
520
|
/>
|
|
521
521
|
</div>
|
|
522
522
|
<div slot="config-content">
|
|
523
523
|
<!-- Layer configuration -->
|
|
524
|
-
${
|
|
524
|
+
${Q(this.layer.get("layerConfig"),()=>x`
|
|
525
525
|
<eox-layercontrol-layerconfig
|
|
526
526
|
slot="config-content"
|
|
527
527
|
.layer=${this.layer}
|
|
@@ -534,7 +534,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
534
534
|
</div>
|
|
535
535
|
<div slot="datetime-content">
|
|
536
536
|
<!-- Layer datetime -->
|
|
537
|
-
${
|
|
537
|
+
${Q(this.layer.get("layerDatetime"),()=>x`
|
|
538
538
|
<eox-layercontrol-layer-datetime
|
|
539
539
|
slot="datetime-content"
|
|
540
540
|
.noShadow=${!0}
|
|
@@ -547,7 +547,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
547
547
|
</div>
|
|
548
548
|
<div slot="legend-content">
|
|
549
549
|
<!-- Layer legend -->
|
|
550
|
-
${
|
|
550
|
+
${Q(this.layer.get("layerLegend"),()=>x`
|
|
551
551
|
<eox-layercontrol-layer-legend
|
|
552
552
|
slot="legend-content"
|
|
553
553
|
.noShadow=${!0}
|
|
@@ -560,11 +560,11 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
560
560
|
</div>
|
|
561
561
|
<div slot="remove-icon">${this._removeButton()}</div>
|
|
562
562
|
<div slot="sort-icon">${this._sortButton()}</div>
|
|
563
|
-
`});
|
|
564
|
-
${
|
|
565
|
-
${
|
|
566
|
-
${
|
|
567
|
-
${
|
|
563
|
+
`});R(this,fi,"");R(this,gi,`
|
|
564
|
+
${na}
|
|
565
|
+
${oa}
|
|
566
|
+
${Ro}
|
|
567
|
+
${ra}
|
|
568
568
|
.drag-handle {
|
|
569
569
|
cursor: n-resize;
|
|
570
570
|
}
|
|
@@ -671,20 +671,20 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
671
671
|
[slot=opacity-content] {
|
|
672
672
|
padding: 12px 6px;
|
|
673
673
|
}
|
|
674
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const
|
|
674
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=Ws(this.tools,this.layer),n=Gs(this.tools,this.layer),o=this[`_${e==null?void 0:e[0]}Button`]?this[`_${e==null?void 0:e[0]}Button`]():O,r=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",s=e==null?void 0:e.length,a=n==null?void 0:n.length;return x`
|
|
675
675
|
<style>
|
|
676
|
-
${
|
|
677
|
-
${!this.unstyled&&
|
|
676
|
+
${T(this,fi)}
|
|
677
|
+
${!this.unstyled&&T(this,gi)}
|
|
678
678
|
</style>
|
|
679
|
-
${
|
|
680
|
-
${
|
|
679
|
+
${Q(s+a>0,()=>x`
|
|
680
|
+
${Q(s===1&&a===0,()=>x`
|
|
681
681
|
<div class="single-action-container">
|
|
682
682
|
<div class="single-action">${o}</div>
|
|
683
683
|
</div>
|
|
684
|
-
`,()
|
|
684
|
+
`,()=>x`
|
|
685
685
|
<details
|
|
686
686
|
class="tools"
|
|
687
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
687
|
+
open=${this.layer.get("layerControlToolsExpand")||O}
|
|
688
688
|
>
|
|
689
689
|
<summary>
|
|
690
690
|
<button class="icon ${r}">Tools</button>
|
|
@@ -692,23 +692,24 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
692
692
|
<eox-layercontrol-tools-items
|
|
693
693
|
class="${this.toolsAsList?"tools-list":"tools-tab"}"
|
|
694
694
|
.noShadow=${!1}
|
|
695
|
-
.actions=${
|
|
695
|
+
.actions=${e}
|
|
696
696
|
.tabs=${n}
|
|
697
697
|
.unstyled=${this.unstyled}
|
|
698
698
|
.toolsAsList=${this.toolsAsList}
|
|
699
699
|
>
|
|
700
700
|
<!-- Rendering tabs and content -->
|
|
701
|
-
${
|
|
701
|
+
${ni(n,d=>this._button(d))}
|
|
702
702
|
<!-- Including default tools -->
|
|
703
703
|
${this._getDefaultTools()}
|
|
704
704
|
</eox-layercontrol-tools-items>
|
|
705
705
|
</details>
|
|
706
706
|
`)}
|
|
707
707
|
`)}
|
|
708
|
-
`}}
|
|
709
|
-
${
|
|
708
|
+
`}}fi=new WeakMap,gi=new WeakMap,z(Lo,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",Lo);const sa=i=>{const t=()=>{const e=Fs(i.layer,i.map,i.showLayerZoomState);let n=!1;!e&&i.currLayerVisibilityBasedOnZoom?(i.currLayerVisibilityBasedOnZoom=!1,n=!0):e&&!i.currLayerVisibilityBasedOnZoom&&(i.currLayerVisibilityBasedOnZoom=!0,n=!0),n&&(i.requestUpdate(),i.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};xo(i.layer,i.showLayerZoomState)&&(t(),i.map.getView().on("change:resolution",()=>t()))},aa=(i,t)=>{const e=t.layer;e.setVisible(i.target.checked),i.target.checked&&e.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(o=>{var r;o.layer!==e&&((r=o.layer)!=null&&r.get("layerControlExclusive"))&&(o.layer.setVisible(!1),o.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:e})),t.requestUpdate()};class Mo extends dt{constructor(){super();R(this,Ct);z(this,"currLayerVisibilityBasedOnZoom",!0);R(this,mi,"");R(this,yi,`
|
|
709
|
+
${Ro}
|
|
710
710
|
eox-layercontrol-layer {
|
|
711
711
|
width: 100%;
|
|
712
|
+
position: relative;
|
|
712
713
|
}
|
|
713
714
|
.layer input[type=checkbox],
|
|
714
715
|
.layer input[type=radio] {
|
|
@@ -740,6 +741,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
740
741
|
margin-right: 6px;
|
|
741
742
|
display: var(--layer-type-visibility);
|
|
742
743
|
}
|
|
744
|
+
[data-type] .title.color-swatch::before {
|
|
745
|
+
background: var(--layer-color);
|
|
746
|
+
border-radius: 3px;
|
|
747
|
+
content: "" !important;
|
|
748
|
+
width: 16px;
|
|
749
|
+
min-width: 16px;
|
|
750
|
+
height: 16px;
|
|
751
|
+
}
|
|
743
752
|
[data-type=group] .title::before {
|
|
744
753
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-outline%3C/title%3E%3Cpath d='M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z' /%3E%3C/svg%3E");
|
|
745
754
|
}
|
|
@@ -755,25 +764,30 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
755
764
|
[data-type=draw] .title::before {
|
|
756
765
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
|
|
757
766
|
}
|
|
758
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){
|
|
767
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){sa(this)}render(){var l;const e=this.layer.getVisible(),n=e?"visible":"",o=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=q(this,Ct,ge).call(this,"layerControlDisable")?"disabled":"",s=q(this,Ct,ge).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return x`
|
|
759
768
|
<style>
|
|
760
|
-
${
|
|
761
|
-
${!this.unstyled&&
|
|
769
|
+
${T(this,mi)}
|
|
770
|
+
${!this.unstyled&&T(this,yi)}
|
|
762
771
|
</style>
|
|
763
|
-
${
|
|
772
|
+
${Q(this.layer,()=>x`
|
|
764
773
|
<!-- Render the layer -->
|
|
765
774
|
<div class="layer ${n} ${o}">
|
|
766
775
|
<label class="drag-handle ${r}">
|
|
767
776
|
<!-- Input element for layer visibility -->
|
|
768
777
|
<input
|
|
769
778
|
type=${s}
|
|
770
|
-
.checked=${
|
|
771
|
-
@click=${
|
|
779
|
+
.checked=${So(e)}
|
|
780
|
+
@click=${q(this,Ct,qo)}
|
|
772
781
|
/>
|
|
773
782
|
|
|
774
783
|
<!-- Layer title -->
|
|
775
|
-
<span
|
|
776
|
-
|
|
784
|
+
<span
|
|
785
|
+
class="title ${q(this,Ct,ge).call(this,"color")?"color-swatch":""}"
|
|
786
|
+
style="--layer-color: ${q(this,Ct,ge).call(this,"color")}"
|
|
787
|
+
>
|
|
788
|
+
${q(this,Ct,ge).call(this,this.titleProperty)}
|
|
789
|
+
</span>
|
|
790
|
+
${Q(a,()=>x`<span class="tools-placeholder"></span>`)}
|
|
777
791
|
</label>
|
|
778
792
|
</div>
|
|
779
793
|
|
|
@@ -786,7 +800,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
786
800
|
.toolsAsList=${this.toolsAsList}
|
|
787
801
|
></eox-layercontrol-layer-tools>
|
|
788
802
|
`)}
|
|
789
|
-
`}}
|
|
803
|
+
`}}Ct=new WeakSet,ge=function(e){var n;return(n=this.layer)==null?void 0:n.get(e)},qo=function(e){aa(e,this)},mi=new WeakMap,yi=new WeakMap,z(Mo,"properties",{layer:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer",Mo);class Io extends dt{constructor(){super();R(this,bi,"");R(this,vi,`
|
|
790
804
|
details summary {
|
|
791
805
|
cursor: pointer;
|
|
792
806
|
display: flex;
|
|
@@ -810,15 +824,15 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
810
824
|
details[data-children-length="0"] summary::before {
|
|
811
825
|
display: none;
|
|
812
826
|
}
|
|
813
|
-
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var o,r;const
|
|
827
|
+
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var o,r;const e=!!((o=this.group)!=null&&o.get("layerControlExpand")),n=(r=$o(this.group.getLayers()))==null?void 0:r.length;return x`
|
|
814
828
|
<style>
|
|
815
|
-
${
|
|
816
|
-
${!this.unstyled&&
|
|
829
|
+
${T(this,bi)}
|
|
830
|
+
${!this.unstyled&&T(this,vi)}
|
|
817
831
|
</style>
|
|
818
|
-
${
|
|
832
|
+
${Q(this.group,()=>x`
|
|
819
833
|
<!-- Render the details element with the layer control -->
|
|
820
834
|
<details
|
|
821
|
-
open=${
|
|
835
|
+
open=${e||O}
|
|
822
836
|
data-children-length=${n}
|
|
823
837
|
>
|
|
824
838
|
<summary>
|
|
@@ -851,7 +865,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
851
865
|
></eox-layercontrol-layer-list>
|
|
852
866
|
</details>
|
|
853
867
|
`)}
|
|
854
|
-
`}}
|
|
868
|
+
`}}bi=new WeakMap,vi=new WeakMap,z(Io,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",Io);var hn,No;function la(){if(No)return hn;No=1;var i="Expected a function",t=NaN,e="[object Symbol]",n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,d=typeof self=="object"&&self&&self.Object===Object&&self,c=l||d||Function("return this")(),u=Object.prototype,p=u.toString,f=Math.max,g=Math.min,b=function(){return c.Date.now()};function V($,m,A){var N,M,J,K,k,I,Y=0,gt=!1,at=!1,mt=!0;if(typeof $!="function")throw new TypeError(i);m=it(m)||0,et(A)&&(gt=!!A.leading,at="maxWait"in A,J=at?f(it(A.maxWait)||0,m):J,mt="trailing"in A?!!A.trailing:mt);function wt(F){var H=N,yt=M;return N=M=void 0,Y=F,K=$.apply(yt,H),K}function Qt(F){return Y=F,k=setTimeout(It,m),gt?wt(F):K}function Ai(F){var H=F-I,yt=F-Y,jt=m-H;return at?g(jt,J-yt):jt}function te(F){var H=F-I,yt=F-Y;return I===void 0||H>=m||H<0||at&&yt>=J}function It(){var F=b();if(te(F))return ee(F);k=setTimeout(It,Ai(F))}function ee(F){return k=void 0,mt&&N?wt(F):(N=M=void 0,K)}function Ci(){k!==void 0&&clearTimeout(k),Y=0,N=I=M=k=void 0}function fn(){return k===void 0?K:ee(b())}function Ve(){var F=b(),H=te(F);if(N=arguments,M=this,I=F,H){if(k===void 0)return Qt(I);if(at)return k=setTimeout(It,m),wt(I)}return k===void 0&&(k=setTimeout(It,m)),K}return Ve.cancel=Ci,Ve.flush=fn,Ve}function et($){var m=typeof $;return!!$&&(m=="object"||m=="function")}function Z($){return!!$&&typeof $=="object"}function ct($){return typeof $=="symbol"||Z($)&&p.call($)==e}function it($){if(typeof $=="number")return $;if(ct($))return t;if(et($)){var m=typeof $.valueOf=="function"?$.valueOf():$;$=et(m)?m+"":m}if(typeof $!="string")return $===0?$:+$;$=$.replace(n,"");var A=r.test($);return A||s.test($)?a($.slice(2),A?2:8):o.test($)?t:+$}return hn=V,hn}var da=la();const ua=_o(da),ca=i=>{const{layers:t,idProperty:e,titleProperty:n,renderRoot:o}=i,r=ua(()=>{i.requestUpdate(),i.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),s=()=>r();if(t&&(t.hasListener("change:length")&&(t==null||t.un("change:length",s)),t.on("change:length",s),t)){const a=o.querySelector("ul");Us(t,e,n,i),ks(a,t,e,i)}};class Ho extends dt{constructor(){super();R(this,wi,"");R(this,xi,`
|
|
855
869
|
ul {
|
|
856
870
|
padding: 0;
|
|
857
871
|
margin: 0;
|
|
@@ -878,19 +892,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
878
892
|
}
|
|
879
893
|
li.sortable-ghost {
|
|
880
894
|
}
|
|
881
|
-
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}firstUpdated(){
|
|
895
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}firstUpdated(){ca(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.layers?$o(this.layers).reverse():[];return x`
|
|
882
896
|
<style>
|
|
883
|
-
${
|
|
884
|
-
${!this.unstyled&&
|
|
897
|
+
${T(this,wi)}
|
|
898
|
+
${!this.unstyled&&T(this,xi)}
|
|
885
899
|
</style>
|
|
886
900
|
<ul>
|
|
887
|
-
${
|
|
888
|
-
${
|
|
901
|
+
${Q(this.layers,()=>x`
|
|
902
|
+
${yr(e,n=>n,n=>x`
|
|
889
903
|
<li
|
|
890
904
|
data-layer="${n.get(this.idProperty)}"
|
|
891
|
-
data-type="${
|
|
905
|
+
data-type="${js(n,this.map)}"
|
|
892
906
|
>
|
|
893
|
-
${n.getLayers
|
|
907
|
+
${n.getLayers?x`
|
|
894
908
|
<eox-layercontrol-layer-group
|
|
895
909
|
.noShadow=${!0}
|
|
896
910
|
.group=${n}
|
|
@@ -904,7 +918,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
904
918
|
@changed=${()=>this.requestUpdate()}
|
|
905
919
|
>
|
|
906
920
|
</eox-layercontrol-layer-group>
|
|
907
|
-
|
|
921
|
+
`:x`
|
|
908
922
|
<eox-layercontrol-layer
|
|
909
923
|
.noShadow=${!0}
|
|
910
924
|
.layer=${n}
|
|
@@ -921,7 +935,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
921
935
|
`)}
|
|
922
936
|
`)}
|
|
923
937
|
</ul>
|
|
924
|
-
`}}
|
|
938
|
+
`}}wi=new WeakMap,xi=new WeakMap,z(Ho,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",Ho);const ha=i=>{const t=i.querySelector("select[name=optional]"),e=t?t.value:null,n=ln(i.layers.getArray(),"layerControlOptional",!0).find(o=>(o.get(i.idProperty)||o.ol_uid)===e);n==null||n.set("layerControlOptional",!1),n==null||n.setVisible(!0),i.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),i.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(o=>o.requestUpdate()),i.requestUpdate()};class Vo extends dt{constructor(){super();R(this,Ei);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=ln(this.layers.getArray(),"layerControlOptional",!0);return x`
|
|
925
939
|
<!-- Label for the dropdown -->
|
|
926
940
|
<label for="optional">Optional layers</label>
|
|
927
941
|
|
|
@@ -933,19 +947,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
933
947
|
</option>
|
|
934
948
|
|
|
935
949
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
936
|
-
${
|
|
950
|
+
${e.map(n=>{const o=n.get(this.idProperty)||n.ol_uid,r=n.get(this.titleProperty),s=`layer ${n.get(this.idProperty)}`;return x` <option value="${o}">${r||s}</option> `})}
|
|
937
951
|
</select>
|
|
938
952
|
|
|
939
953
|
<!-- Button to handle adding layers -->
|
|
940
|
-
<button @click="${
|
|
941
|
-
`}}
|
|
954
|
+
<button @click="${q(this,Ei,Xo)}">add</button>
|
|
955
|
+
`}}Ei=new WeakSet,Xo=function(){ha(this)},z(Vo,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",Vo);const pa=(i,t)=>{t.jsonInput=i.target.value,t.requestUpdate()},Bo=i=>{const t=JSON.parse(`{"data":${Gn(i.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(e=>{i.eoxMap.addOrUpdateLayer(e)}):i.eoxMap.addOrUpdateLayer(t.data),i.jsonInput=null,i.requestUpdate()},fa=(i,t)=>{t.urlInput=i.target.value,t.requestUpdate()};async function ga(i){const t=i.urlInput;if(i.wmsCapabilities=null,i.searchLoad=!0,i.requestUpdate(),!t)return!1;if(ji(t)==="XYZ")return{Name:t};try{const e=await ds(t);i.wmsCapabilities=e}catch{}finally{i.searchLoad=!1,i.requestUpdate()}return!1}const ma=(i,t)=>{const{Name:e}=i,n=ji(t.urlInput)||"XYZ",o={type:"Tile",properties:{id:e,title:e},source:{type:n,url:t.urlInput,params:{LAYERS:e}}};t.jsonInput=JSON.stringify(o)},ya=(i,t)=>{t.open=i||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class ko extends dt{constructor(){super();R(this,st);z(this,"urlInput",null);z(this,"jsonInput",null);z(this,"open",null);z(this,"searchLoad",!1);z(this,"wmsCapabilities",null);R(this,$i,`
|
|
942
956
|
.eox-add-layer-main .open {
|
|
943
957
|
position: relative;
|
|
944
958
|
}
|
|
945
959
|
.eox-add-layer-main .close {
|
|
946
960
|
display: none;
|
|
947
961
|
}
|
|
948
|
-
`);
|
|
962
|
+
`);R(this,Si,`
|
|
949
963
|
.eox-add {
|
|
950
964
|
background: #f0f2f5;
|
|
951
965
|
border-top: 1px solid #0041701a;
|
|
@@ -1078,23 +1092,23 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1078
1092
|
font-weight: bold;
|
|
1079
1093
|
display: inline-block;
|
|
1080
1094
|
}
|
|
1081
|
-
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const
|
|
1095
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",n=this.open==="url",o=this.open==="json",r=!us(this.urlInput)||this.searchLoad?!0:O;return x`
|
|
1082
1096
|
<style>
|
|
1083
|
-
${
|
|
1084
|
-
${!this.unstyled&&
|
|
1097
|
+
${T(this,$i)}
|
|
1098
|
+
${!this.unstyled&&T(this,Si)}
|
|
1085
1099
|
</style>
|
|
1086
1100
|
<div class="eox-add-layer-main">
|
|
1087
1101
|
<div class="eox-add-layer-col">
|
|
1088
1102
|
<!-- Tabbed interface for URL and JSON -->
|
|
1089
|
-
<ul class="eox-add-layer-tab ${
|
|
1103
|
+
<ul class="eox-add-layer-tab ${e}">
|
|
1090
1104
|
<li
|
|
1091
|
-
@click=${()=>
|
|
1105
|
+
@click=${()=>q(this,st,Ti).call(this,"url")}
|
|
1092
1106
|
class="${n?"active":""}"
|
|
1093
1107
|
>
|
|
1094
1108
|
URL
|
|
1095
1109
|
</li>
|
|
1096
1110
|
<li
|
|
1097
|
-
@click=${()=>
|
|
1111
|
+
@click=${()=>q(this,st,Ti).call(this,"json")}
|
|
1098
1112
|
class="${o?"active":""}"
|
|
1099
1113
|
>
|
|
1100
1114
|
JSON
|
|
@@ -1104,13 +1118,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1104
1118
|
<!-- Button to toggle tabs -->
|
|
1105
1119
|
<button
|
|
1106
1120
|
class="add-icon icon"
|
|
1107
|
-
@click=${()=>
|
|
1121
|
+
@click=${()=>q(this,st,Ti).call(this,this.open?null:"url")}
|
|
1108
1122
|
>
|
|
1109
1123
|
${this.unstyled?"Add Layer":""}
|
|
1110
1124
|
</button>
|
|
1111
1125
|
</div>
|
|
1112
|
-
<div class="eox-add ${
|
|
1113
|
-
${n
|
|
1126
|
+
<div class="eox-add ${e}">
|
|
1127
|
+
${n?x`
|
|
1114
1128
|
<!-- Input field for URL -->
|
|
1115
1129
|
<div class="eox-add-layer-col">
|
|
1116
1130
|
<input
|
|
@@ -1118,55 +1132,55 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1118
1132
|
class="add-url"
|
|
1119
1133
|
placeholder="Add URL (WMS/XYZ)"
|
|
1120
1134
|
.value="${this.urlInput}"
|
|
1121
|
-
@input=${
|
|
1135
|
+
@input=${q(this,st,Yo)}
|
|
1122
1136
|
>
|
|
1123
1137
|
</input>
|
|
1124
1138
|
<!-- Search button for URL -->
|
|
1125
1139
|
<button
|
|
1126
1140
|
class="search-icon"
|
|
1127
1141
|
disabled=${r}
|
|
1128
|
-
@click=${
|
|
1142
|
+
@click=${q(this,st,Wo)}
|
|
1129
1143
|
>
|
|
1130
1144
|
${this.unstyled?"Search":""}
|
|
1131
1145
|
</button>
|
|
1132
1146
|
</div>
|
|
1133
1147
|
|
|
1134
1148
|
<!-- Display layers for WMS capabilities -->
|
|
1135
|
-
${this.wmsCapabilities
|
|
1136
|
-
${this.wmsCapabilities.Capability.Layer.Layer.map(s=>{const a=s.Name;return
|
|
1149
|
+
${this.wmsCapabilities?x`<ul class="search-lists">
|
|
1150
|
+
${this.wmsCapabilities.Capability.Layer.Layer.map(s=>{const a=s.Name;return x`
|
|
1137
1151
|
<li class="search-list">
|
|
1138
1152
|
${a}
|
|
1139
1153
|
<!-- Button to add layer -->
|
|
1140
1154
|
<button
|
|
1141
1155
|
class="add-layer-icon icon"
|
|
1142
|
-
@click=${()=>
|
|
1156
|
+
@click=${()=>q(this,st,yn).call(this,s)}
|
|
1143
1157
|
>
|
|
1144
1158
|
${this.unstyled?"+":""}
|
|
1145
1159
|
</button>
|
|
1146
1160
|
</li>
|
|
1147
1161
|
`})}
|
|
1148
|
-
</ul>`:
|
|
1149
|
-
|
|
1162
|
+
</ul>`:O}
|
|
1163
|
+
`:x`
|
|
1150
1164
|
<!-- Textarea for JSON input -->
|
|
1151
1165
|
<textarea
|
|
1152
1166
|
class="add-layer-input"
|
|
1153
1167
|
placeholder="Please put a valid eox-map layer JSON."
|
|
1154
|
-
@input=${
|
|
1168
|
+
@input=${q(this,st,Jo)}
|
|
1155
1169
|
.value=${this.jsonInput}
|
|
1156
1170
|
></textarea>
|
|
1157
1171
|
|
|
1158
1172
|
<!-- Button to add JSON layer -->
|
|
1159
1173
|
<button
|
|
1160
1174
|
class="add-layer-icon json-add-layer"
|
|
1161
|
-
disabled=${
|
|
1162
|
-
@click=${
|
|
1175
|
+
disabled=${cs(this.jsonInput)?O:!0}
|
|
1176
|
+
@click=${q(this,st,Go)}
|
|
1163
1177
|
>
|
|
1164
1178
|
${this.unstyled?"Add JSON":""}
|
|
1165
1179
|
</button>
|
|
1166
1180
|
`}
|
|
1167
1181
|
</div>
|
|
1168
1182
|
</div>
|
|
1169
|
-
`}}
|
|
1183
|
+
`}}st=new WeakSet,Yo=function(e){fa(e,this)},Wo=async function(){const e=await ga(this);e&&q(this,st,yn).call(this,e)},yn=function(e){ma(e,this),Bo(this)},Go=function(){Bo(this)},Jo=function(e){pa(e,this)},Ti=function(e){ya(e,this)},$i=new WeakMap,Si=new WeakMap,z(ko,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",ko);const ba=(i,t)=>{if(t.requestUpdate(),i.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const e=t.renderRoot.querySelector("eox-layercontrol-optional-list");e==null||e.requestUpdate()}},va=i=>{let t;return typeof i=="string"?t=document.querySelector(i):t=i,t},Uo=i=>{const t=va(i.for);return t&&t.map!==i.map&&(i.map=t.map),t};class pn extends dt{constructor(){super();R(this,pe);R(this,Ft);R(this,_i,`
|
|
1170
1184
|
:host, :root {
|
|
1171
1185
|
font-family: Roboto, sans-serif;
|
|
1172
1186
|
--padding: 0.5rem;
|
|
@@ -1180,23 +1194,23 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1180
1194
|
display: block;
|
|
1181
1195
|
padding: var(--padding) 0;
|
|
1182
1196
|
}
|
|
1183
|
-
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","datetime","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride="",this.toolsAsList=!1}firstUpdated(){this.eoxMap=
|
|
1197
|
+
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","datetime","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride="",this.toolsAsList=!1}firstUpdated(){this.eoxMap=Uo(this)}updated(e){e.has("for")&&(this.eoxMap=Uo(this))}get eoxMap(){return T(this,Ft)}set eoxMap(e){const n=T(this,Ft);fe(this,Ft,e),this.requestUpdate("eoxMap",n)}render(){var o,r,s;const e=(o=this.map)==null?void 0:o.getLayers().getArray(),n=e&&((r=ln(e,"layerControlOptional",!0))==null?void 0:r.length)>0;return x`
|
|
1184
1198
|
<style>
|
|
1185
|
-
${!this.unstyled&&
|
|
1199
|
+
${!this.unstyled&&T(this,_i)}
|
|
1186
1200
|
${this.styleOverride}
|
|
1187
1201
|
</style>
|
|
1188
1202
|
|
|
1189
1203
|
<!-- Conditional rendering of add layers component -->
|
|
1190
|
-
${
|
|
1204
|
+
${Q(this.addExternalLayers&&((s=T(this,Ft))==null?void 0:s.addOrUpdateLayer),()=>x`
|
|
1191
1205
|
<eox-layercontrol-add-layers
|
|
1192
1206
|
.noShadow=${!0}
|
|
1193
|
-
.eoxMap=${
|
|
1207
|
+
.eoxMap=${T(this,Ft)}
|
|
1194
1208
|
.unstyled=${this.unstyled}
|
|
1195
1209
|
></eox-layercontrol-add-layers>
|
|
1196
1210
|
`)}
|
|
1197
1211
|
|
|
1198
1212
|
<!-- Conditional rendering of layer list component -->
|
|
1199
|
-
${
|
|
1213
|
+
${Q(this.map,()=>x`
|
|
1200
1214
|
<eox-layercontrol-layer-list
|
|
1201
1215
|
.noShadow=${!0}
|
|
1202
1216
|
class="layers"
|
|
@@ -1208,13 +1222,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1208
1222
|
.tools=${this.tools}
|
|
1209
1223
|
.unstyled=${this.unstyled}
|
|
1210
1224
|
.toolsAsList=${this.toolsAsList}
|
|
1211
|
-
@changed=${
|
|
1212
|
-
@datetime:updated=${
|
|
1225
|
+
@changed=${q(this,pe,Ko)}
|
|
1226
|
+
@datetime:updated=${q(this,pe,Qo)}
|
|
1213
1227
|
></eox-layercontrol-layer-list>
|
|
1214
1228
|
`)}
|
|
1215
1229
|
|
|
1216
1230
|
<!-- Conditional rendering of optional list component -->
|
|
1217
|
-
${
|
|
1231
|
+
${Q(n,()=>x`
|
|
1218
1232
|
<eox-layercontrol-optional-list
|
|
1219
1233
|
.noShadow=${!0}
|
|
1220
1234
|
.idProperty=${this.idProperty}
|
|
@@ -1223,4 +1237,4 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1223
1237
|
@changed=${()=>this.requestUpdate()}
|
|
1224
1238
|
></eox-layercontrol-optional-list>
|
|
1225
1239
|
`)}
|
|
1226
|
-
`}}
|
|
1240
|
+
`}}Ft=new WeakMap,pe=new WeakSet,Ko=function(e){ba(e,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:e.detail}))},Qo=function(e){this.dispatchEvent(new CustomEvent("datetime:updated",{detail:e.detail}))},_i=new WeakMap,z(pn,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol",pn),L.EOxLayerControl=pn,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|