@eox/layercontrol 0.25.0 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +211 -211
- package/dist/eox-layercontrol.umd.cjs +64 -64
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(O,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(O=typeof globalThis<"u"?globalThis:O||self,T(O["eox-layercontrol"]={}))})(this,function(O){"use strict";var qa=Object.defineProperty;var Ho=O=>{throw TypeError(O)};var Ya=(O,T,B)=>T in O?qa(O,T,{enumerable:!0,configurable:!0,writable:!0,value:B}):O[T]=B;var V=(O,T,B)=>Ya(O,typeof T!="symbol"?T+"":T,B),on=(O,T,B)=>T.has(O)||Ho("Cannot "+B);var _=(O,T,B)=>(on(O,T,"read from private field"),B?B.call(O):T.get(O)),P=(O,T,B)=>T.has(O)?Ho("Cannot add the same private member more than once"):T instanceof WeakSet?T.add(O):T.set(O,B),ee=(O,T,B,jt)=>(on(O,T,"write to private field"),jt?jt.call(O,B):T.set(O,B),B),j=(O,T,B)=>(on(O,T,"access private method"),B);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var Io,We,Ge,$t,Qt,$e,xe,rn,Je,Ke,Qe,Vo,ti,ei,Ee,ii,ni,oi,ri,
|
|
5
|
+
*/var Io,We,Ge,$t,Qt,$e,xe,rn,Je,Ke,Qe,Vo,ti,ei,Ee,ii,ni,oi,ri,Dt,yi,Bo,si,ai,li,di,ui,ci,hi,ko,G,Uo,Fo,sn,jo,Zo,bi,pi,fi,Pt,te,zo,Xo,gi;const T=globalThis,B=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jt=Symbol(),an=new WeakMap;let ln=class{constructor(t,i,n){if(this._$cssResult$=!0,n!==jt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const i=this.t;if(B&&t===void 0){const n=i!==void 0&&i.length===1;n&&(t=an.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&an.set(i,t))}return t}toString(){return this.cssText}};const qo=e=>new ln(typeof e=="string"?e:e+"",void 0,jt),dn=(e,...t)=>{const i=e.length===1?e[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)+e[r+1],e[0]);return new ln(i,e,jt)},Yo=(e,t)=>{if(B)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const n=document.createElement("style"),o=T.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=i.cssText,e.appendChild(n)}},un=B?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return qo(i)})(e):e;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const ne=globalThis,Te=ne.trustedTypes,fn=Te?Te.createPolicy("lit-html",{createHTML:e=>e}):void 0,$i="$lit$",gt=`lit$${Math.random().toFixed(9).slice(2)}$`,xi="?"+gt,ir=`<${xi}>`,Lt=document,oe=()=>Lt.createComment(""),re=e=>e===null||typeof e!="object"&&typeof e!="function",Ei=Array.isArray,gn=e=>Ei(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Si=`[
|
|
14
14
|
\f\r]`,se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,mn=/-->/g,yn=/>/g,Mt=RegExp(`>|${Si}(?:([^\\s"'>=/]+)(${Si}*=${Si}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),bn=/'/g,vn=/"/g,wn=/^(?:script|style|textarea|title)$/i,nr=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),$=nr(1),dt=Symbol.for("lit-noChange"),
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),bn=/'/g,vn=/"/g,wn=/^(?:script|style|textarea|title)$/i,nr=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),$=nr(1),dt=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),$n=new WeakMap,It=Lt.createTreeWalker(Lt,129);function xn(e,t){if(!Ei(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return fn!==void 0?fn.createHTML(t):t}const En=(e,t)=>{const i=e.length-1,n=[];let o,r=t===2?"<svg>":t===3?"<math>":"",s=se;for(let a=0;a<i;a++){const l=e[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===se?c[1]==="!--"?s=mn:c[1]!==void 0?s=yn:c[2]!==void 0?(wn.test(c[2])&&(o=RegExp("</"+c[2],"g")),s=Mt):c[3]!==void 0&&(s=Mt):s===Mt?c[0]===">"?(s=o??se,u=-1):c[1]===void 0?u=-2:(u=s.lastIndex-c[2].length,d=c[1],s=c[3]===void 0?Mt:c[3]==='"'?vn:bn):s===vn||s===bn?s=Mt:s===mn||s===yn?s=se:(s=Mt,o=void 0);const f=s===Mt&&e[a+1].startsWith("/>")?" ":"";r+=s===se?l+ir:u>=0?(n.push(d),l.slice(0,u)+$i+l.slice(u)+gt+f):l+gt+(u===-2?a:f)}return[xn(e,r+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class ae{constructor({strings:t,_$litType$:i},n){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[d,c]=En(t,i);if(this.el=ae.createElement(d,n),It.currentNode=this.el.content,i===2||i===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=It.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const u of o.getAttributeNames())if(u.endsWith($i)){const p=c[s++],f=o.getAttribute(u).split(gt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:g[2],strings:f,ctor:g[1]==="."?An:g[1]==="?"?_n:g[1]==="@"?Cn:le}),o.removeAttribute(u)}else u.startsWith(gt)&&(l.push({type:6,index:r}),o.removeAttribute(u));if(wn.test(o.tagName)){const u=o.textContent.split(gt),p=u.length-1;if(p>0){o.textContent=Te?Te.emptyScript:"";for(let f=0;f<p;f++)o.append(u[f],oe()),It.nextNode(),l.push({type:2,index:++r});o.append(u[p],oe())}}}else if(o.nodeType===8)if(o.data===xi)l.push({type:2,index:r});else{let u=-1;for(;(u=o.data.indexOf(gt,u+1))!==-1;)l.push({type:7,index:r}),u+=gt.length-1}r++}}static createElement(t,i){const n=Lt.createElement("template");return n.innerHTML=t,n}}function Nt(e,t,i=e,n){var s,a;if(t===dt)return t;let o=n!==void 0?(s=i._$Co)==null?void 0:s[n]:i._$Cl;const r=re(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(e),o._$AT(e,i,n)),n!==void 0?(i._$Co??(i._$Co=[]))[n]=o:i._$Cl=o),o!==void 0&&(t=Nt(e,o._$AS(e,t.values),o,n)),t}let Sn=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:n}=this._$AD,o=((t==null?void 0:t.creationScope)??Lt).importNode(i,!0);It.currentNode=o;let r=It.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let d;l.type===2?d=new zt(r,r.nextSibling,this,t):l.type===1?d=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(d=new Tn(r,this,t)),this._$AV.push(d),l=n[++a]}s!==(l==null?void 0:l.index)&&(r=It.nextNode(),s++)}return It.currentNode=Lt,o}p(t){let i=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,i),i+=n.strings.length-2):n._$AI(t[i])),i++}};class zt{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,i,n,o){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=n,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Nt(this,t,i),re(t)?t===D||t==null||t===""?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==dt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):gn(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!==D&&re(this._$AH)?this._$AA.nextSibling.data=t:this.T(Lt.createTextNode(t)),this._$AH=t}$(t){var r;const{values:i,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=ae.createElement(xn(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(i);else{const s=new Sn(o,this),a=s.u(this.options);s.p(i),this.T(a),this._$AH=s}}_$AC(t){let i=$n.get(t.strings);return i===void 0&&$n.set(t.strings,i=new ae(t)),i}k(t){Ei(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let n,o=0;for(const r of t)o===i.length?i.push(n=new zt(this.O(oe()),this.O(oe()),this,this.options)):n=i[o],n._$AI(r),o++;o<i.length&&(this._$AR(n&&n._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,i);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var i;this._$AM===void 0&&(this._$Cv=t,(i=this._$AP)==null||i.call(this,t))}}class le{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,n,o,r){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=i,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=D}_$AI(t,i=this,n,o){const r=this.strings;let s=!1;if(r===void 0)t=Nt(this,t,i,0),s=!re(t)||t!==this._$AH&&t!==dt,s&&(this._$AH=t);else{const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Nt(this,a[n+l],i,l),d===dt&&(d=this._$AH[l]),s||(s=!re(d)||d!==this._$AH[l]),d===D?t=D:t!==D&&(t+=(d??"")+r[l+1]),this._$AH[l]=d}s&&!o&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class An extends le{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}class _n extends le{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==D)}}class Cn extends le{constructor(t,i,n,o,r){super(t,i,n,o,r),this.type=5}_$AI(t,i=this){if((t=Nt(this,t,i,0)??D)===dt)return;const n=this._$AH,o=t===D&&n!==D||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==D&&(n===D||o);o&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i;typeof this._$AH=="function"?this._$AH.call(((i=this.options)==null?void 0:i.host)??this.element,t):this._$AH.handleEvent(t)}}class Tn{constructor(t,i,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Nt(this,t)}}const or={M:$i,P:gt,A:xi,C:1,L:En,R:Sn,D:gn,V:Nt,I:zt,H:le,N:_n,U:Cn,B:An,F:Tn},Ai=ne.litHtmlPolyfillSupport;Ai==null||Ai(ae,zt),(ne.litHtmlVersions??(ne.litHtmlVersions=[])).push("3.2.1");const rr=(e,t,i)=>{const n=(i==null?void 0:i.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const r=(i==null?void 0:i.renderBefore)??null;n._$litPart$=o=new zt(t.insertBefore(oe(),r),r,void 0,i??{})}return o._$AI(e),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -28,42 +28,42 @@
|
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{I:sr}=or,ar=e=>e.strings===void 0,
|
|
31
|
+
*/const{I:sr}=or,ar=e=>e.strings===void 0,Dn=()=>document.createComment(""),de=(e,t,i)=>{var r;const n=e._$AA.parentNode,o=t===void 0?e._$AB:t._$AA;if(i===void 0){const s=n.insertBefore(Dn(),o),a=n.insertBefore(Dn(),o);i=new sr(s,a,e,e.options)}else{const s=i._$AB.nextSibling,a=i._$AM,l=a!==e;if(l){let d;(r=i._$AQ)==null||r.call(i,e),i._$AM=e,i._$AP!==void 0&&(d=e._$AU)!==a._$AU&&i._$AP(d)}if(s!==o||l){let d=i._$AA;for(;d!==s;){const c=d.nextSibling;n.insertBefore(d,o),d=c}}}return i},Ht=(e,t,i=e)=>(e._$AI(t,i),e),lr={},Pn=(e,t=lr)=>e._$AH=t,dr=e=>e._$AH,Di=e=>{var n;(n=e._$AP)==null||n.call(e,!1,!0);let t=e._$AA;const i=e._$AB.nextSibling;for(;t!==i;){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 On=(e,t,i)=>{const n=new Map;for(let o=t;o<=i;o++)n.set(e[o],o);return n},ur=Ci(class extends Ti{constructor(e){if(super(e),e.type!==St.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,i){let n;i===void 0?i=t:t!==void 0&&(n=t);const o=[],r=[];let s=0;for(const a of e)o[s]=n?n(a,s):s,r[s]=i(a,s),s++;return{values:r,keys:o}}render(e,t,i){return this.dt(e,t,i).values}update(e,[t,i,n]){const o=dr(e),{values:r,keys:s}=this.dt(t,i,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]=Ht(o[u],r[f]),u++,f++;else if(a[p]===s[g])l[g]=Ht(o[p],r[g]),p--,g--;else if(a[u]===s[g])l[g]=Ht(o[u],r[g]),de(e,l[g+1],o[u]),u++,g--;else if(a[p]===s[f])l[f]=Ht(o[p],r[f]),de(e,o[u],o[p]),p--,f++;else if(d===void 0&&(d=On(s,f,g),c=On(a,u,p)),d.has(a[u]))if(d.has(a[p])){const y=c.get(s[f]),R=y!==void 0?o[y]:null;if(R===null){const H=de(e,o[u]);Ht(H,r[f]),l[f]=H}else l[f]=Ht(R,r[f]),de(e,o[u],R),o[y]=null;f++}else Di(o[p]),p--;else Di(o[u]),u++;for(;f<=g;){const y=de(e,l[g+1]);Ht(y,r[f]),l[f++]=y}for(;u<=p;){const y=o[u++];y!==null&&Di(y)}return this.ut=s,Pn(e,l),dt}});/**
|
|
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 E=e=>e!==void 0,Rn=(e,t,i)=>t in e?e[t]:e[t]=i;const ue={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 cr{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,i){return
|
|
41
|
-
* Sortable 1.15.
|
|
40
|
+
*/var E=e=>e!==void 0,Rn=(e,t,i)=>t in e?e[t]:e[t]=i;const ue={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 cr{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,i){return De(t,i).join("")}}function De(e,t){return Ln(e,t,[]).join("")}function Ln(e,t,i){if(e.nodeType===ue.CDATA_SECTION||e.nodeType===ue.TEXT)t?i.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(e.nodeValue);else{var n;for(n=e.firstChild;n;n=n.nextSibling)Ln(n,t,i)}return i}function hr(e,t,i,n){for(var o=pr(t);o;o=fr(o)){var r=o.namespaceURI||null,s=e[r];if(E(s)){var a=s[o.localName];E(a)&&a.call(n,o,i)}}}function pr(e){let t=e.firstElementChild||e.firstChild;for(;t&&t.nodeType!==ue.ELEMENT;)t=t.nextSibling;return t}function fr(e){let t=e.nextElementSibling||e.nextSibling;for(;t&&t.nodeType!==ue.ELEMENT;)t=t.nextSibling;return t}function q(e,t,i){return gr(e,t,i)}function gr(e,t,i){var n=E(i)?i:{},o,r;for(o=0,r=e.length;o<r;++o)n[e[o]]=t;return n}function Mn(e,t){return function(i,n){var o=e.call(E(t)?t:this,i,n);if(E(o)){var r=n[n.length-1];r.push(o)}}}function X(e,t,i,n,o){return n.push(e),hr(t,i,n,o),n.pop()}function m(e,t,i){return function(n,o){let r=e.call(E(i)?i:this,n,o);if(E(r)){var s=o[o.length-1],a=E(t)?t:n.localName;s[a]=r}}}function ot(e,t,i){return function(n,o){var r=e.call(E(i)?i:this,n,o);if(E(r)){var s=o[o.length-1],a=E(t)?t:n.localName,l=Rn(s,a,[]);l.push(r)}}}const mr=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function yr(e){return e.replace(mr,"")}function Vt(e){const t=/^\s*(true|1)|(false|0)\s*$/.exec(e);if(t)return E(t[1])||!1}function Xt(e){return mt(De(e,!1))}function mt(e){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(e);if(t)return parseFloat(t[1])}function Pi(e){return Pe(De(e,!1))}function Pe(e){const t=/^\s*(\d+)\s*$/.exec(e);if(t)return parseInt(t[1],10)}function C(e){return yr(De(e,!1))}const br="http://www.w3.org/1999/xlink";function Oi(e){return e.getAttributeNS(br,"href")}function vr(e,t){return X({},Xr,e,t)}function In(e){return[mt(e.getAttribute("minx")),mt(e.getAttribute("miny")),mt(e.getAttribute("maxx")),mt(e.getAttribute("maxy"))]}function wr(e,t){const i=In(e),n=[mt(e.getAttribute("resx")),mt(e.getAttribute("resy"))];return{crs:e.getAttribute("CRS")||e.getAttribute("SRS"),extent:i,res:n}}function $r(e,t){const i=In(e);if(!(!E(i[0])||!E(i[1])||!E(i[2])||!E(i[3])))return i}function xr(e,t){const i=parseFloat(e.getAttribute("min")),n=parseFloat(e.getAttribute("max"));return{min:i,max:n}}function Er(e,t){const i=X({},qr,e,t);if(!E(i))return;const n=i.westBoundLongitude,o=i.southBoundLatitude,r=i.eastBoundLongitude,s=i.northBoundLatitude;if(!(!E(n)||!E(o)||!E(r)||!E(s)))return[n,o,r,s]}function Sr(e,t){return X({},kr,e,t)}function Ar(e,t){return X({},Ur,e,t)}function _r(e,t){return X({},Fr,e,t)}function Cr(e,t){return X({},jr,e,t)}function Tr(e,t){return X({},Zr,e,t)}function Dr(e,t){return X([],zr,e,t)}function Pr(e,t){const i=Vt(e.getAttribute("queryable"));return X({queryable:E(i)?i:!1},Vn,e,t)}function Or(e,t){var i=t[t.length-1];const n=X({},Vn,e,t);if(!E(n))return;let o=Vt(e.getAttribute("queryable"));E(o)||(o=i.queryable),n.queryable=E(o)?o:!1;let r=Pe(e.getAttribute("cascaded"));E(r)||(r=i.cascaded),n.cascaded=r;let s=Vt(e.getAttribute("opaque"));E(s)||(s=i.opaque),n.opaque=E(s)?s:!1;let a=Vt(e.getAttribute("noSubsets"));E(a)||(a=i.noSubsets),n.noSubsets=E(a)?a:!1;let l=mt(e.getAttribute("fixedWidth"));E(l)||(l=i.fixedWidth),n.fixedWidth=l;let d=mt(e.getAttribute("fixedHeight"));E(d)||(d=i.fixedHeight),n.fixedHeight=d;const c=["Style","CRS","AuthorityURL"];for(let p=0,f=c.length;p<f;p++){const g=c[p],y=i[g];if(E(y)){let R=Rn(n,g,[]);R=R.concat(y),n[g]=R}}const u=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let p=0,f=u.length;p<f;p++){const g=u[p],y=n[g];if(!E(y)){const R=i[g];n[g]=R}}return n}function Rr(e,t){return{name:e.getAttribute("name"),units:e.getAttribute("units"),unitSymbol:e.getAttribute("unitSymbol"),default:e.getAttribute("default"),multipleValues:Vt(e.getAttribute("multipleValues")),nearestValue:Vt(e.getAttribute("nearestValue")),current:Vt(e.getAttribute("current")),values:C(e)}}function yt(e,t){return X({},Qr,e,t)}function Lr(e,t){return X({},Yr,e,t)}function Mr(e,t){return X({},Gr,e,t)}function Ir(e,t){return X({},Jr,e,t)}function Ri(e,t){return X({},Wr,e,t)}function Nn(e,t){var i=yt(e,t);if(E(i)){const n=[Pe(e.getAttribute("width")),Pe(e.getAttribute("height"))];return i.size=n,i}}function Nr(e,t){var i=yt(e,t);if(E(i))return i.name=e.getAttribute("name"),i}function Hr(e,t){var i=yt(e,t);if(E(i))return i.type=e.getAttribute("type"),i}function Vr(e,t){return X({},Kr,e,t)}function Hn(e,t){return X([],ts,e,t)}const Y=[null,"http://www.opengis.net/wms"],Br=q(Y,{Service:m(Ar),Capability:m(Sr)}),kr=q(Y,{Request:m(Lr),Exception:m(Dr),Layer:m(Pr)}),Ur=q(Y,{Name:m(C),Title:m(C),Abstract:m(C),KeywordList:m(Hn),OnlineResource:m(Oi),ContactInformation:m(_r),Fees:m(C),AccessConstraints:m(C),LayerLimit:m(Pi),MaxWidth:m(Pi),MaxHeight:m(Pi)}),Fr=q(Y,{ContactPersonPrimary:m(Cr),ContactPosition:m(C),ContactAddress:m(Tr),ContactVoiceTelephone:m(C),ContactFacsimileTelephone:m(C),ContactElectronicMailAddress:m(C)}),jr=q(Y,{ContactPerson:m(C),ContactOrganization:m(C)}),Zr=q(Y,{AddressType:m(C),Address:m(C),City:m(C),StateOrProvince:m(C),PostCode:m(C),Country:m(C)}),zr=q(Y,{Format:Mn(C)}),Vn=q(Y,{Name:m(C),Title:m(C),Abstract:m(C),KeywordList:m(Hn),CRS:ot(C),SRS:ot(C),EX_GeographicBoundingBox:m(Er),LatLonBoundingBox:m($r),BoundingBox:ot(wr),Dimension:ot(Rr),Attribution:m(vr),AuthorityURL:ot(Nr),Identifier:ot(C),MetadataURL:ot(Hr),DataURL:ot(yt),FeatureListURL:ot(yt),Style:ot(Vr),MinScaleDenominator:m(Xt),MaxScaleDenominator:m(Xt),ScaleHint:m(xr),Layer:ot(Or)}),Xr=q(Y,{Title:m(C),OnlineResource:m(Oi),LogoURL:m(Nn)}),qr=q(Y,{westBoundLongitude:m(Xt),eastBoundLongitude:m(Xt),southBoundLatitude:m(Xt),northBoundLatitude:m(Xt)}),Yr=q(Y,{GetCapabilities:m(Ri),GetMap:m(Ri),GetFeatureInfo:m(Ri)}),Wr=q(Y,{Format:ot(C),DCPType:ot(Mr)}),Gr=q(Y,{HTTP:m(Ir)}),Jr=q(Y,{Get:m(yt),Post:m(yt)}),Kr=q(Y,{Name:m(C),Title:m(C),Abstract:m(C),LegendURL:ot(Nn),StyleSheetURL:m(yt),StyleURL:m(yt)}),Qr=q(Y,{Format:m(C),OnlineResource:m(Oi)}),ts=q(Y,{Keyword:Mn(C)});class es{constructor(t,i){!i&&typeof window<"u"&&(i=window.DOMParser),this.version=void 0,this._parser=new cr(i),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 i=t.firstChild;i;i=i.nextSibling)if(i.nodeType==ue.ELEMENT)return this.readFromNode(i);return null}readFromNode(t){return this.version=t.getAttribute("version"),X({version:this.version},Br,t,[])||null}}async function is(e){let t=new URL(e),i=t.searchParams;i.set("SERVICE","WMS"),i.set("REQUEST","GetCapabilities");let n=t.toString();const o=await fetch(n);if(o.ok){const r=await o.text();return new es(r).toJSON()}else throw new Error(`Error: ${o.status}`)}function Li(e){const t=/\b(?:wms|ows)\b/i,i=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(e)?"TileWMS":i.test(e)?"XYZ":!1}function ns(e){const i=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(e),n=Li(e);return!!(e&&i&&n)}function Bn(e){return e.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function os(e){try{return JSON.parse(Bn(e)),!!e}catch{return!1}}function rs(e,t){const i=new URL(e).searchParams;Object.entries(t).forEach(([s,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{i.set(l,a[l])}):i.set(s,a)});const n=e.split("?")[0],o=i.toString();return`${n}?${o}`}/**!
|
|
41
|
+
* Sortable 1.15.4
|
|
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 De(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?De=function(t){return typeof t}:De=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De(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.3";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 P(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||De(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?P(e,"pointerdown",this._onTapStart):(P(e,"mousedown",this._onTapStart),P(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(P(e,"dragover",this),P(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(Ps(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.cancelable&&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.cancelable&&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)}),P(a,"dragover",Ut),P(a,"mousemove",Ut),P(a,"touchmove",Ut),P(a,"mouseup",o._onDrop),P(a,"touchend",o._onDrop),P(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}P(a,"mouseup",o._disableDelayedDrag),P(a,"touchend",o._disableDelayedDrag),P(a,"touchcancel",o._disableDelayedDrag),P(a,"mousemove",o._delayedDragTouchMoveHandler),P(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&P(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,"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?P(document,"pointermove",this._onTouchMove):i?P(document,"touchmove",this._onTouchMove):P(document,"mousemove",this._onTouchMove):(P(h,"dragend",this),P(M,"dragstart",this._onDragStart));try{document.selection?je(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,i){if(Jt=!1,M&&h){st("dragStarted",this,{evt:i}),this.nativeDraggable&&P(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)),P(document,"drop",n),v(h,"transform","translateZ(0)")),Jt=!0,n._dragStartId=je(n._dragStarted.bind(n,i,t)),P(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",Dt=Yn(n,"top","top")||Yn(h,"top","top"),Ae=Dt?Dt.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),Dt&&Jn(Dt,0,Ae-Dt.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,"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 Ps(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&&P(document,"touchmove",function(e){(w.active||Jt)&&e.cancelable&&e.preventDefault()}),w.utils={on:P,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 Os(){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?P(document,"dragover",this._handleAutoScroll):this.options.supportPointer?P(document,"pointermove",this._handleFallbackAutoScroll):n.touches?P(document,"touchmove",this._handleFallbackAutoScroll):P(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,Dt=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&&Dt+J<K)-(Math.abs(y-r)<=s&&!!Dt);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 Os),w.mount(Wi,Yi);const Ds=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=Ds(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="${e}-icon" class="icon">${t?e:
|
|
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="${e}-icon" class="icon">${t?e:D}</button>
|
|
47
47
|
`,zs=e=>$`
|
|
48
48
|
<button
|
|
49
49
|
class="remove-icon icon"
|
|
50
50
|
@click=${()=>{const{layer:t}=e;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),e.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
|
|
51
51
|
>
|
|
52
|
-
${e.unstyled?"x":
|
|
52
|
+
${e.unstyled?"x":D}
|
|
53
53
|
</button>
|
|
54
54
|
`,Xs=e=>$`
|
|
55
55
|
<span class="button sort-icon icon drag-handle">
|
|
56
|
-
${e?"═":
|
|
56
|
+
${e?"═":D}
|
|
57
57
|
</span>
|
|
58
58
|
`,po=e=>{var i;const t=["layerControlHide","layerControlOptional"];return(i=e==null?void 0:e.getArray())==null?void 0:i.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 fo=Ci(class extends Ti{constructor(e){if(super(e),e.type!==St.PROPERTY&&e.type!==St.ATTRIBUTE&&e.type!==St.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ar(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===dt||t===
|
|
62
|
+
*/const fo=Ci(class extends Ti{constructor(e){if(super(e),e.type!==St.PROPERTY&&e.type!==St.ATTRIBUTE&&e.type!==St.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ar(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===dt||t===D)return t;const i=e.element,n=e.name;if(e.type===St.PROPERTY){if(t===i[n])return dt}else if(e.type===St.BOOLEAN_ATTRIBUTE){if(!!t===i.hasAttribute(n))return dt}else if(e.type===St.ATTRIBUTE&&i.getAttribute(n)===t+"")return dt;return Pn(e),t}});/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/class Ki extends Ti{constructor(t){if(super(t),this.it=
|
|
66
|
+
*/class Ki extends Ti{constructor(t){if(super(t),this.it=D,t.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||t==null)return this._t=void 0,this.it=t;if(t===dt)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 i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}Ki.directiveName="unsafeHTML",Ki.resultType=1;const qs=Ci(Ki);/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2018 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
-
*/const Ye=e=>e??
|
|
74
|
+
*/const Ye=e=>e??D;class wo extends tt{constructor(){super();P(this,We,dn`
|
|
75
75
|
.legend-container {
|
|
76
76
|
display: flex;
|
|
77
77
|
justify-content: center;
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
--cle-font-weight: inherit --cle-letter-spacing: inherit;
|
|
85
85
|
--cle-letter-spacing-title: inherit;
|
|
86
86
|
}
|
|
87
|
-
`);
|
|
87
|
+
`);P(this,Ge,"");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"),$`
|
|
88
88
|
<style>
|
|
89
|
-
${
|
|
90
|
-
${!this.unstyled&&
|
|
89
|
+
${_(this,We)}
|
|
90
|
+
${!this.unstyled&&_(this,Ge)}
|
|
91
91
|
</style>
|
|
92
92
|
${Z(this.layerLegend,()=>$`
|
|
93
93
|
<div class="legend-container">
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
</color-legend>
|
|
108
108
|
</div>
|
|
109
109
|
`)}
|
|
110
|
-
`}}We=new WeakMap,Ge=new WeakMap,V(wo,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerLegend:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-legend",wo);class $o extends tt{constructor(){super();
|
|
110
|
+
`}}We=new WeakMap,Ge=new WeakMap,V(wo,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerLegend:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-legend",wo);class $o extends tt{constructor(){super();P(this,xe);P(this,$t,{});P(this,Qt,null);P(this,$e);P(this,Je,dn`
|
|
111
111
|
color-legend {
|
|
112
112
|
--cle-background: transparent;
|
|
113
113
|
--cle-font-family: inherit;
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
--cle-font-weight: inherit --cle-letter-spacing: inherit;
|
|
116
116
|
--cle-letter-spacing-title: inherit;
|
|
117
117
|
}
|
|
118
|
-
`);
|
|
118
|
+
`);P(this,Ke,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.throttleDataChange=vo(j(this,xe,rn),1e3)}updated(i){if(i.has("layerConfig")){const n=this.layerConfig.type==="style"||this.layerConfig.style?100:1e3;this.throttleDataChange=vo(j(this,xe,rn),n),this.requestUpdate()}}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){ee(this,Qt,Us(this.layer,this.layerConfig)),Object.keys(_(this,$t)).length!==0&&ee(this,Qt,_(this,$t)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const i={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return $`
|
|
119
119
|
<style>
|
|
120
|
-
${
|
|
121
|
-
${!this.unstyled&&
|
|
120
|
+
${_(this,Je)}
|
|
121
|
+
${!this.unstyled&&_(this,Ke)}
|
|
122
122
|
</style>
|
|
123
123
|
${Z(this.layerConfig,()=>$`
|
|
124
124
|
${Z(this.layerConfig.legend,()=>$`
|
|
@@ -126,21 +126,21 @@
|
|
|
126
126
|
.noShadow=${!0}
|
|
127
127
|
.unstyled=${this.unstyled}
|
|
128
128
|
.layer=${this.layer}
|
|
129
|
-
.layerLegend=${ks(this.layerConfig.legend,
|
|
129
|
+
.layerLegend=${ks(this.layerConfig.legend,_(this,$t))}
|
|
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=${
|
|
135
|
+
.value=${_(this,Qt)}
|
|
136
136
|
.options=${i}
|
|
137
137
|
@change=${this.throttleDataChange}
|
|
138
138
|
></eox-jsonform>
|
|
139
139
|
`)}
|
|
140
|
-
`}}$t=new WeakMap,Qt=new WeakMap,$e=new WeakMap,xe=new WeakSet,rn=function(i){ee(this,$t,i.detail),this.layerConfig.type==="style"||this.layerConfig.style?"setStyle"in this.layer||"updateStyleVariables"in this.layer?Vs(
|
|
140
|
+
`}}$t=new WeakMap,Qt=new WeakMap,$e=new WeakMap,xe=new WeakSet,rn=function(i){ee(this,$t,i.detail),this.layerConfig.type==="style"||this.layerConfig.style?"setStyle"in this.layer||"updateStyleVariables"in this.layer?Vs(_(this,$t),this.layer,this.layerConfig):console.error(`Layer type ${this.layer.get("type")??""} does not support styles configuration`):ee(this,$e,Hs(_(this,$t),_(this,$e),this)),this.requestUpdate()},Je=new WeakMap,Ke=new WeakMap,V($o,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",$o);class xo extends tt{constructor(){super();P(this,Qe);P(this,ti,"");P(this,ei,"");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"),$`
|
|
141
141
|
<style>
|
|
142
|
-
${
|
|
143
|
-
${!this.unstyled&&
|
|
142
|
+
${_(this,ti)}
|
|
143
|
+
${!this.unstyled&&_(this,ei)}
|
|
144
144
|
</style>
|
|
145
145
|
${Z(this.layerDatetime,()=>$`
|
|
146
146
|
<!-- Render a Timecontrol for layer date time -->
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
@stepchange=${j(this,Qe,Vo)}
|
|
157
157
|
></eox-timecontrol>
|
|
158
158
|
`)}
|
|
159
|
-
`}}Qe=new WeakSet,Vo=function(i){this.dispatchEvent(new CustomEvent("datetime:updated",{bubbles:!0,detail:{datetime:i.detail.currentStep,layer:this.layer}})),this.layerDatetime.currentStep=i.detail.currentStep,this.requestUpdate()},ti=new WeakMap,ei=new WeakMap,V(xo,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerDatetime:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-datetime",xo);class Eo extends tt{constructor(){super();
|
|
159
|
+
`}}Qe=new WeakSet,Vo=function(i){this.dispatchEvent(new CustomEvent("datetime:updated",{bubbles:!0,detail:{datetime:i.detail.currentStep,layer:this.layer}})),this.layerDatetime.currentStep=i.detail.currentStep,this.requestUpdate()},ti=new WeakMap,ei=new WeakMap,V(xo,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerDatetime:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-datetime",xo);class Eo extends tt{constructor(){super();P(this,Ee,i=>(this.selectedTab===i||this.toolsAsList)&&"highlighted");P(this,ii,`
|
|
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
|
+
`);P(this,ni,`
|
|
180
180
|
.listed {
|
|
181
181
|
background: #ffffff !important;
|
|
182
182
|
display: flex;
|
|
@@ -204,8 +204,8 @@
|
|
|
204
204
|
}
|
|
205
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 i=this.tabs,n=this.actions,o=n.length+i.length>1;return $`
|
|
206
206
|
<style>
|
|
207
|
-
${
|
|
208
|
-
${!this.unstyled&&
|
|
207
|
+
${_(this,ii)}
|
|
208
|
+
${!this.unstyled&&_(this,ni)}
|
|
209
209
|
</style>
|
|
210
210
|
<div class="tabbed">
|
|
211
211
|
<!-- Navigation for tabs and actions -->
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
<!-- Labels for tabs -->
|
|
217
217
|
${Xe(i,(r,s)=>$`
|
|
218
218
|
<label
|
|
219
|
-
class=${
|
|
219
|
+
class=${_(this,Ee).call(this,s)}
|
|
220
220
|
@click=${()=>this.selectedTab=s}
|
|
221
221
|
>
|
|
222
222
|
<!-- Customizable icon for each tab -->
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
<slot name=${`${r}-icon`}>${r}</slot>
|
|
246
246
|
</label>
|
|
247
247
|
`)}
|
|
248
|
-
<div class="tab ${
|
|
248
|
+
<div class="tab ${_(this,Ee).call(this,s)}">
|
|
249
249
|
<!-- Content slot for each tab -->
|
|
250
250
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
251
251
|
</div>
|
|
@@ -560,7 +560,7 @@ 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
|
-
`});
|
|
563
|
+
`});P(this,oi,"");P(this,ri,`
|
|
564
564
|
${ha}
|
|
565
565
|
${pa}
|
|
566
566
|
${So}
|
|
@@ -671,10 +671,10 @@ 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 i=Fs(this.tools,this.layer),n=js(this.tools,this.layer),o=this[`_${i==null?void 0:i[0]}Button`]?this[`_${i==null?void 0:i[0]}Button`]():
|
|
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 i=Fs(this.tools,this.layer),n=js(this.tools,this.layer),o=this[`_${i==null?void 0:i[0]}Button`]?this[`_${i==null?void 0:i[0]}Button`]():D,r=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",s=i==null?void 0:i.length,a=n==null?void 0:n.length;return $`
|
|
675
675
|
<style>
|
|
676
|
-
${
|
|
677
|
-
${!this.unstyled&&
|
|
676
|
+
${_(this,oi)}
|
|
677
|
+
${!this.unstyled&&_(this,ri)}
|
|
678
678
|
</style>
|
|
679
679
|
${Z(s+a>0,()=>$`
|
|
680
680
|
${Z(s===1&&a===0,()=>$`
|
|
@@ -684,7 +684,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
684
684
|
`,()=>$`
|
|
685
685
|
<details
|
|
686
686
|
class="tools"
|
|
687
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
687
|
+
open=${this.layer.get("layerControlToolsExpand")||D}
|
|
688
688
|
>
|
|
689
689
|
<summary>
|
|
690
690
|
<button class="icon ${r}">Tools</button>
|
|
@@ -705,7 +705,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
705
705
|
</details>
|
|
706
706
|
`)}
|
|
707
707
|
`)}
|
|
708
|
-
`}}oi=new WeakMap,ri=new WeakMap,V(Ao,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",Ao);const ga=e=>{const t=()=>{const i=Is(e.layer,e.map,e.showLayerZoomState);let n=!1;!i&&e.currLayerVisibilityBasedOnZoom?(e.currLayerVisibilityBasedOnZoom=!1,n=!0):i&&!e.currLayerVisibilityBasedOnZoom&&(e.currLayerVisibilityBasedOnZoom=!0,n=!0),n&&(e.requestUpdate(),e.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};co(e.layer,e.showLayerZoomState)&&(t(),e.map.getView().on("change:resolution",()=>t()))},ma=(e,t)=>{const i=t.layer;i.setVisible(e.target.checked),e.target.checked&&i.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(o=>{var r;o.layer!==i&&((r=o.layer)!=null&&r.get("layerControlExclusive"))&&(o.layer.setVisible(!1),o.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:i})),t.requestUpdate()};class _o extends tt{constructor(){super();
|
|
708
|
+
`}}oi=new WeakMap,ri=new WeakMap,V(Ao,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",Ao);const ga=e=>{const t=()=>{const i=Is(e.layer,e.map,e.showLayerZoomState);let n=!1;!i&&e.currLayerVisibilityBasedOnZoom?(e.currLayerVisibilityBasedOnZoom=!1,n=!0):i&&!e.currLayerVisibilityBasedOnZoom&&(e.currLayerVisibilityBasedOnZoom=!0,n=!0),n&&(e.requestUpdate(),e.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};co(e.layer,e.showLayerZoomState)&&(t(),e.map.getView().on("change:resolution",()=>t()))},ma=(e,t)=>{const i=t.layer;i.setVisible(e.target.checked),e.target.checked&&i.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(o=>{var r;o.layer!==i&&((r=o.layer)!=null&&r.get("layerControlExclusive"))&&(o.layer.setVisible(!1),o.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:i})),t.requestUpdate()};class _o extends tt{constructor(){super();P(this,Dt);V(this,"currLayerVisibilityBasedOnZoom",!0);P(this,si,"");P(this,ai,`
|
|
709
709
|
${So}
|
|
710
710
|
eox-layercontrol-layer {
|
|
711
711
|
width: 100%;
|
|
@@ -755,10 +755,10 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
755
755
|
[data-type=draw] .title::before {
|
|
756
756
|
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
757
|
}
|
|
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(){ga(this)}render(){var l;const i=this.layer.getVisible(),n=i?"visible":"",o=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=j(this,
|
|
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(){ga(this)}render(){var l;const i=this.layer.getVisible(),n=i?"visible":"",o=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=j(this,Dt,yi).call(this,"layerControlDisable")?"disabled":"",s=j(this,Dt,yi).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return $`
|
|
759
759
|
<style>
|
|
760
|
-
${
|
|
761
|
-
${!this.unstyled&&
|
|
760
|
+
${_(this,si)}
|
|
761
|
+
${!this.unstyled&&_(this,ai)}
|
|
762
762
|
</style>
|
|
763
763
|
${Z(this.layer,()=>$`
|
|
764
764
|
<!-- Render the layer -->
|
|
@@ -768,11 +768,11 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
768
768
|
<input
|
|
769
769
|
type=${s}
|
|
770
770
|
.checked=${fo(i)}
|
|
771
|
-
@click=${j(this,
|
|
771
|
+
@click=${j(this,Dt,Bo)}
|
|
772
772
|
/>
|
|
773
773
|
|
|
774
774
|
<!-- Layer title -->
|
|
775
|
-
<span class="title">${j(this,
|
|
775
|
+
<span class="title">${j(this,Dt,yi).call(this,this.titleProperty)}</span>
|
|
776
776
|
${Z(a,()=>$`<span class="tools-placeholder"></span>`)}
|
|
777
777
|
</label>
|
|
778
778
|
</div>
|
|
@@ -786,7 +786,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
786
786
|
.toolsAsList=${this.toolsAsList}
|
|
787
787
|
></eox-layercontrol-layer-tools>
|
|
788
788
|
`)}
|
|
789
|
-
`}}
|
|
789
|
+
`}}Dt=new WeakSet,yi=function(i){var n;return(n=this.layer)==null?void 0:n.get(i)},Bo=function(i){ma(i,this)},si=new WeakMap,ai=new WeakMap,V(_o,"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",_o);class Co extends tt{constructor(){super();P(this,li,"");P(this,di,`
|
|
790
790
|
details summary {
|
|
791
791
|
cursor: pointer;
|
|
792
792
|
display: flex;
|
|
@@ -812,13 +812,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
812
812
|
}
|
|
813
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 i=!!((o=this.group)!=null&&o.get("layerControlExpand")),n=(r=po(this.group.getLayers()))==null?void 0:r.length;return $`
|
|
814
814
|
<style>
|
|
815
|
-
${
|
|
816
|
-
${!this.unstyled&&
|
|
815
|
+
${_(this,li)}
|
|
816
|
+
${!this.unstyled&&_(this,di)}
|
|
817
817
|
</style>
|
|
818
818
|
${Z(this.group,()=>$`
|
|
819
819
|
<!-- Render the details element with the layer control -->
|
|
820
820
|
<details
|
|
821
|
-
open=${i||
|
|
821
|
+
open=${i||D}
|
|
822
822
|
data-children-length=${n}
|
|
823
823
|
>
|
|
824
824
|
<summary>
|
|
@@ -851,7 +851,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
851
851
|
></eox-layercontrol-layer-list>
|
|
852
852
|
</details>
|
|
853
853
|
`)}
|
|
854
|
-
`}}li=new WeakMap,di=new WeakMap,V(Co,"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",Co);var ya="Expected a function",To=NaN,ba="[object Symbol]",va=/^\s+|\s+$/g,wa=/^[-+]0x[0-9a-f]+$/i,$a=/^0b[01]+$/i,xa=/^0o[0-7]+$/i,Ea=parseInt,Sa=typeof Tt=="object"&&Tt&&Tt.Object===Object&&Tt,Aa=typeof self=="object"&&self&&self.Object===Object&&self,_a=Sa||Aa||Function("return this")(),Ca=Object.prototype,Ta=Ca.toString,
|
|
854
|
+
`}}li=new WeakMap,di=new WeakMap,V(Co,"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",Co);var ya="Expected a function",To=NaN,ba="[object Symbol]",va=/^\s+|\s+$/g,wa=/^[-+]0x[0-9a-f]+$/i,$a=/^0b[01]+$/i,xa=/^0o[0-7]+$/i,Ea=parseInt,Sa=typeof Tt=="object"&&Tt&&Tt.Object===Object&&Tt,Aa=typeof self=="object"&&self&&self.Object===Object&&self,_a=Sa||Aa||Function("return this")(),Ca=Object.prototype,Ta=Ca.toString,Da=Math.max,Pa=Math.min,tn=function(){return _a.Date.now()};function Oa(e,t,i){var n,o,r,s,a,l,d=0,c=!1,u=!1,p=!0;if(typeof e!="function")throw new TypeError(ya);t=Do(t)||0,en(i)&&(c=!!i.leading,u="maxWait"in i,r=u?Da(Do(i.maxWait)||0,t):r,p="trailing"in i?!!i.trailing:p);function f(b){var L=n,K=o;return n=o=void 0,d=b,s=e.apply(K,L),s}function g(b){return d=b,a=setTimeout(H,t),c?f(b):s}function y(b){var L=b-l,K=b-d,z=t-L;return u?Pa(z,r-K):z}function R(b){var L=b-l,K=b-d;return l===void 0||L>=t||L<0||u&&K>=r}function H(){var b=tn();if(R(b))return k(b);a=setTimeout(H,y(b))}function k(b){return a=void 0,p&&n?f(b):(n=o=void 0,s)}function it(){a!==void 0&&clearTimeout(a),d=0,n=l=o=a=void 0}function J(){return a===void 0?s:k(tn())}function nt(){var b=tn(),L=R(b);if(n=arguments,o=this,l=b,L){if(a===void 0)return g(l);if(u)return a=setTimeout(H,t),f(l)}return a===void 0&&(a=setTimeout(H,t)),s}return nt.cancel=it,nt.flush=J,nt}function en(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ra(e){return!!e&&typeof e=="object"}function La(e){return typeof e=="symbol"||Ra(e)&&Ta.call(e)==ba}function Do(e){if(typeof e=="number")return e;if(La(e))return To;if(en(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=en(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(va,"");var i=$a.test(e);return i||xa.test(e)?Ea(e.slice(2),i?2:8):wa.test(e)?To:+e}var Ma=Oa;const Ia=go(Ma),Na=e=>{const{layers:t,idProperty:i,titleProperty:n,renderRoot:o}=e,r=Ia(()=>{e.requestUpdate(),e.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");Ms(t,i,n,e),Ls(a,t,i,e)}};class Po extends tt{constructor(){super();P(this,ui,"");P(this,ci,`
|
|
855
855
|
ul {
|
|
856
856
|
padding: 0;
|
|
857
857
|
margin: 0;
|
|
@@ -880,8 +880,8 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
880
880
|
}
|
|
881
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(){Na(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const i=this.layers?po(this.layers).reverse():[];return $`
|
|
882
882
|
<style>
|
|
883
|
-
${
|
|
884
|
-
${!this.unstyled&&
|
|
883
|
+
${_(this,ui)}
|
|
884
|
+
${!this.unstyled&&_(this,ci)}
|
|
885
885
|
</style>
|
|
886
886
|
<ul>
|
|
887
887
|
${Z(this.layers,()=>$`
|
|
@@ -921,7 +921,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
921
921
|
`)}
|
|
922
922
|
`)}
|
|
923
923
|
</ul>
|
|
924
|
-
`}}ui=new WeakMap,ci=new WeakMap,V(
|
|
924
|
+
`}}ui=new WeakMap,ci=new WeakMap,V(Po,"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",Po);const Ha=e=>{const t=e.querySelector("select[name=optional]"),i=t?t.value:null,n=Gi(e.layers.getArray(),"layerControlOptional",!0).find(o=>(o.get(e.idProperty)||o.ol_uid)===i);n==null||n.set("layerControlOptional",!1),n==null||n.setVisible(!0),e.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),e.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(o=>o.requestUpdate()),e.requestUpdate()};class Oo extends tt{constructor(){super();P(this,hi);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const i=Gi(this.layers.getArray(),"layerControlOptional",!0);return $`
|
|
925
925
|
<!-- Label for the dropdown -->
|
|
926
926
|
<label for="optional">Optional layers</label>
|
|
927
927
|
|
|
@@ -938,14 +938,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
938
938
|
|
|
939
939
|
<!-- Button to handle adding layers -->
|
|
940
940
|
<button @click="${j(this,hi,ko)}">add</button>
|
|
941
|
-
`}}hi=new WeakSet,ko=function(){Ha(this)},V(
|
|
941
|
+
`}}hi=new WeakSet,ko=function(){Ha(this)},V(Oo,"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",Oo);const Va=(e,t)=>{t.jsonInput=e.target.value,t.requestUpdate()},Ro=e=>{const t=JSON.parse(`{"data":${Bn(e.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(i=>{e.eoxMap.addOrUpdateLayer(i)}):e.eoxMap.addOrUpdateLayer(t.data),e.jsonInput=null,e.requestUpdate()},Ba=(e,t)=>{t.urlInput=e.target.value,t.requestUpdate()};async function ka(e){const t=e.urlInput;if(e.wmsCapabilities=null,e.searchLoad=!0,e.requestUpdate(),!t)return!1;if(Li(t)==="XYZ")return{Name:t};try{const i=await is(t);e.wmsCapabilities=i}catch{}finally{e.searchLoad=!1,e.requestUpdate()}return!1}const Ua=(e,t)=>{const{Name:i}=e,n=Li(t.urlInput)||"XYZ",o={type:"Tile",properties:{id:i,title:i},source:{type:n,url:t.urlInput,params:{LAYERS:i}}};t.jsonInput=JSON.stringify(o)},Fa=(e,t)=>{t.open=e||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class Lo extends tt{constructor(){super();P(this,G);V(this,"urlInput",null);V(this,"jsonInput",null);V(this,"open",null);V(this,"searchLoad",!1);V(this,"wmsCapabilities",null);P(this,pi,`
|
|
942
942
|
.eox-add-layer-main .open {
|
|
943
943
|
position: relative;
|
|
944
944
|
}
|
|
945
945
|
.eox-add-layer-main .close {
|
|
946
946
|
display: none;
|
|
947
947
|
}
|
|
948
|
-
`);
|
|
948
|
+
`);P(this,fi,`
|
|
949
949
|
.eox-add {
|
|
950
950
|
background: #f0f2f5;
|
|
951
951
|
border-top: 1px solid #0041701a;
|
|
@@ -1078,10 +1078,10 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1078
1078
|
font-weight: bold;
|
|
1079
1079
|
display: inline-block;
|
|
1080
1080
|
}
|
|
1081
|
-
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const i=this.open?"open":"close",n=this.open==="url",o=this.open==="json",r=!ns(this.urlInput)||this.searchLoad?!0:
|
|
1081
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const i=this.open?"open":"close",n=this.open==="url",o=this.open==="json",r=!ns(this.urlInput)||this.searchLoad?!0:D;return $`
|
|
1082
1082
|
<style>
|
|
1083
|
-
${
|
|
1084
|
-
${!this.unstyled&&
|
|
1083
|
+
${_(this,pi)}
|
|
1084
|
+
${!this.unstyled&&_(this,fi)}
|
|
1085
1085
|
</style>
|
|
1086
1086
|
<div class="eox-add-layer-main">
|
|
1087
1087
|
<div class="eox-add-layer-col">
|
|
@@ -1145,7 +1145,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1145
1145
|
</button>
|
|
1146
1146
|
</li>
|
|
1147
1147
|
`})}
|
|
1148
|
-
</ul>`:
|
|
1148
|
+
</ul>`:D}
|
|
1149
1149
|
`:$`
|
|
1150
1150
|
<!-- Textarea for JSON input -->
|
|
1151
1151
|
<textarea
|
|
@@ -1158,7 +1158,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1158
1158
|
<!-- Button to add JSON layer -->
|
|
1159
1159
|
<button
|
|
1160
1160
|
class="add-layer-icon json-add-layer"
|
|
1161
|
-
disabled=${os(this.jsonInput)?
|
|
1161
|
+
disabled=${os(this.jsonInput)?D:!0}
|
|
1162
1162
|
@click=${j(this,G,jo)}
|
|
1163
1163
|
>
|
|
1164
1164
|
${this.unstyled?"Add JSON":""}
|
|
@@ -1166,7 +1166,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1166
1166
|
`}
|
|
1167
1167
|
</div>
|
|
1168
1168
|
</div>
|
|
1169
|
-
`}}G=new WeakSet,Uo=function(i){Ba(i,this)},Fo=async function(){const i=await ka(this);i&&j(this,G,sn).call(this,i)},sn=function(i){Ua(i,this),Ro(this)},jo=function(){Ro(this)},Zo=function(i){Va(i,this)},bi=function(i){Fa(i,this)},pi=new WeakMap,fi=new WeakMap,V(Lo,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",Lo);const ja=(e,t)=>{if(t.requestUpdate(),e.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const i=t.renderRoot.querySelector("eox-layercontrol-optional-list");i==null||i.requestUpdate()}},Za=e=>{let t;return typeof e=="string"?t=document.querySelector(e):t=e,t},Mo=e=>{const t=Za(e.for);return t&&t.map!==e.map&&(e.map=t.map),t};class nn extends tt{constructor(){super();
|
|
1169
|
+
`}}G=new WeakSet,Uo=function(i){Ba(i,this)},Fo=async function(){const i=await ka(this);i&&j(this,G,sn).call(this,i)},sn=function(i){Ua(i,this),Ro(this)},jo=function(){Ro(this)},Zo=function(i){Va(i,this)},bi=function(i){Fa(i,this)},pi=new WeakMap,fi=new WeakMap,V(Lo,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",Lo);const ja=(e,t)=>{if(t.requestUpdate(),e.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const i=t.renderRoot.querySelector("eox-layercontrol-optional-list");i==null||i.requestUpdate()}},Za=e=>{let t;return typeof e=="string"?t=document.querySelector(e):t=e,t},Mo=e=>{const t=Za(e.for);return t&&t.map!==e.map&&(e.map=t.map),t};class nn extends tt{constructor(){super();P(this,te);P(this,Pt);P(this,gi,`
|
|
1170
1170
|
:host, :root {
|
|
1171
1171
|
font-family: Roboto, sans-serif;
|
|
1172
1172
|
--padding: 0.5rem;
|
|
@@ -1180,17 +1180,17 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1180
1180
|
display: block;
|
|
1181
1181
|
padding: var(--padding) 0;
|
|
1182
1182
|
}
|
|
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=Mo(this)}updated(i){i.has("for")&&(this.eoxMap=Mo(this))}get eoxMap(){return
|
|
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=Mo(this)}updated(i){i.has("for")&&(this.eoxMap=Mo(this))}get eoxMap(){return _(this,Pt)}set eoxMap(i){const n=_(this,Pt);ee(this,Pt,i),this.requestUpdate("eoxMap",n)}render(){var o,r,s;const i=(o=this.map)==null?void 0:o.getLayers().getArray(),n=i&&((r=Gi(i,"layerControlOptional",!0))==null?void 0:r.length)>0;return $`
|
|
1184
1184
|
<style>
|
|
1185
|
-
${!this.unstyled&&
|
|
1185
|
+
${!this.unstyled&&_(this,gi)}
|
|
1186
1186
|
${this.styleOverride}
|
|
1187
1187
|
</style>
|
|
1188
1188
|
|
|
1189
1189
|
<!-- Conditional rendering of add layers component -->
|
|
1190
|
-
${Z(this.addExternalLayers&&((s=
|
|
1190
|
+
${Z(this.addExternalLayers&&((s=_(this,Pt))==null?void 0:s.addOrUpdateLayer),()=>$`
|
|
1191
1191
|
<eox-layercontrol-add-layers
|
|
1192
1192
|
.noShadow=${!0}
|
|
1193
|
-
.eoxMap=${
|
|
1193
|
+
.eoxMap=${_(this,Pt)}
|
|
1194
1194
|
.unstyled=${this.unstyled}
|
|
1195
1195
|
></eox-layercontrol-add-layers>
|
|
1196
1196
|
`)}
|
|
@@ -1223,4 +1223,4 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1223
1223
|
@changed=${()=>this.requestUpdate()}
|
|
1224
1224
|
></eox-layercontrol-optional-list>
|
|
1225
1225
|
`)}
|
|
1226
|
-
`}}
|
|
1226
|
+
`}}Pt=new WeakMap,te=new WeakSet,zo=function(i){ja(i,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:i.detail}))},Xo=function(i){this.dispatchEvent(new CustomEvent("datetime:updated",{detail:i.detail}))},gi=new WeakMap,V(nn,"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",nn),O.EOxLayerControl=nn,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|