@eox/layercontrol 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +823 -736
- package/dist/eox-layercontrol.umd.cjs +82 -68
- package/package.json +2 -2
- package/test/_mockMap.js +20 -2
- package/test/layersUpdate.cy.js +57 -4
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
1
|
+
var hn=Object.defineProperty;var dn=(C,x,H)=>x in C?hn(C,x,{enumerable:!0,configurable:!0,writable:!0,value:H}):C[x]=H;var R=(C,x,H)=>(dn(C,typeof x!="symbol"?x+"":x,H),H),un=(C,x,H)=>{if(!x.has(C))throw TypeError("Cannot "+H)};var k=(C,x,H)=>(un(C,x,"read from private field"),H?H.call(C):x.get(C)),I=(C,x,H)=>{if(x.has(C))throw TypeError("Cannot add the same private member more than once");x instanceof WeakSet?x.add(C):x.set(C,H)};(function(C,x){typeof exports=="object"&&typeof module<"u"?x(exports):typeof define=="function"&&define.amd?define(["exports"],x):(C=typeof globalThis<"u"?globalThis:C||self,x(C["eox-layercontrol"]={}))})(this,function(C){var eo,ve,be,we,Ee,_e,$e,xe,Se,Ae,Ce,Te,De,Oe,Pe;"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const x=
|
|
5
|
+
*/const x=globalThis,H=x.ShadowRoot&&(x.ShadyCSS===void 0||x.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,si=Symbol(),ai=new WeakMap;let oo=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==si)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(H&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=ai.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ai.set(e,t))}return t}toString(){return this.cssText}};const no=o=>new oo(typeof o=="string"?o:o+"",void 0,si),ro=(o,t)=>{if(H)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),n=x.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=e.cssText,o.appendChild(i)}},li=H?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return no(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/
|
|
9
|
+
*/const{is:so,defineProperty:ao,getOwnPropertyDescriptor:lo,getOwnPropertyNames:ho,getOwnPropertySymbols:uo,getPrototypeOf:co}=Object,at=globalThis,hi=at.trustedTypes,po=hi?hi.emptyScript:"",Me=at.reactiveElementPolyfillSupport,Ht=(o,t)=>o,Le={toAttribute(o,t){switch(t){case Boolean:o=o?po:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},di=(o,t)=>!so(o,t),ui={attribute:!0,type:String,converter:Le,reflect:!1,hasChanged:di};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),at.litPropertyMetadata??(at.litPropertyMetadata=new WeakMap);class xt extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ui){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(t,i,e);n!==void 0&&ao(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){const{get:n,set:r}=lo(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get(){return n==null?void 0:n.call(this)},set(s){const l=n==null?void 0:n.call(this);r.call(this,s),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ui}static _$Ei(){if(this.hasOwnProperty(Ht("elementProperties")))return;const t=co(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ht("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ht("properties"))){const e=this.properties,i=[...ho(e),...uo(e)];for(const n of i)this.createProperty(n,e[n])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,n]of e)this.elementProperties.set(i,n)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const n=this._$Eu(e,i);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const n of i)e.unshift(li(n))}else t!==void 0&&e.push(li(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ro(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){var r;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){const s=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Le).toAttribute(e,i.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,e){var r;const i=this.constructor,n=i._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const s=i.getPropertyOptions(n),l=typeof s.converter=="function"?{fromAttribute:s.converter}:((r=s.converter)==null?void 0:r.fromAttribute)!==void 0?s.converter:Le;this._$Em=n,this[n]=l.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,i,n=!1,r){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??di)(n?r:this[t],e))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[r,s]of n)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.C(r,this[r],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$ES)==null||i.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$ET()}catch(n){throw t=!1,this._$ET(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(i=>{var n;return(n=i.hostUpdated)==null?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}xt.elementStyles=[],xt.shadowRootOptions={mode:"open"},xt[Ht("elementProperties")]=new Map,xt[Ht("finalized")]=new Map,Me==null||Me({ReactiveElement:xt}),(at.reactiveElementVersions??(at.reactiveElementVersions=[])).push("2.0.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const Mt=globalThis,te=Mt.trustedTypes,ci=te?te.createPolicy("lit-html",{createHTML:o=>o}):void 0,pi="$lit$",lt=`lit$${(Math.random()+"").slice(9)}$`,fi="?"+lt,fo=`<${fi}>`,ft=document,Lt=()=>ft.createComment(""),Nt=o=>o===null||typeof o!="object"&&typeof o!="function",gi=Array.isArray,go=o=>gi(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Ne=`[
|
|
14
|
+
\f\r]`,kt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,mi=/-->/g,yi=/>/g,gt=RegExp(`>|${Ne}(?:([^\\s"'>=/]+)(${Ne}*=${Ne}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),vi=/'/g,bi=/"/g,wi=/^(?:script|style|textarea|title)$/i,mo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),_=mo(1),q=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),Ei=new WeakMap,mt=ft.createTreeWalker(ft,129);function _i(o,t){if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ci!==void 0?ci.createHTML(t):t}const yo=(o,t)=>{const e=o.length-1,i=[];let n,r=t===2?"<svg>":"",s=kt;for(let l=0;l<e;l++){const a=o[l];let h,c,d=-1,g=0;for(;g<a.length&&(s.lastIndex=g,c=s.exec(a),c!==null);)g=s.lastIndex,s===kt?c[1]==="!--"?s=mi:c[1]!==void 0?s=yi:c[2]!==void 0?(wi.test(c[2])&&(n=RegExp("</"+c[2],"g")),s=gt):c[3]!==void 0&&(s=gt):s===gt?c[0]===">"?(s=n??kt,d=-1):c[1]===void 0?d=-2:(d=s.lastIndex-c[2].length,h=c[1],s=c[3]===void 0?gt:c[3]==='"'?bi:vi):s===bi||s===vi?s=gt:s===mi||s===yi?s=kt:(s=gt,n=void 0);const v=s===gt&&o[l+1].startsWith("/>")?" ":"";r+=s===kt?a+fo:d>=0?(i.push(h),a.slice(0,d)+pi+a.slice(d)+lt+v):a+lt+(d===-2?l:v)}return[_i(o,r+(o[e]||"<?>")+(t===2?"</svg>":"")),i]};class It{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,s=0;const l=t.length-1,a=this.parts,[h,c]=yo(t,e);if(this.el=It.createElement(h,i),mt.currentNode=this.el.content,e===2){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=mt.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(const d of n.getAttributeNames())if(d.endsWith(pi)){const g=c[s++],v=n.getAttribute(d).split(lt),y=/([.?@])?(.*)/.exec(g);a.push({type:1,index:r,name:y[2],strings:v,ctor:y[1]==="."?bo:y[1]==="?"?wo:y[1]==="@"?Eo:ee}),n.removeAttribute(d)}else d.startsWith(lt)&&(a.push({type:6,index:r}),n.removeAttribute(d));if(wi.test(n.tagName)){const d=n.textContent.split(lt),g=d.length-1;if(g>0){n.textContent=te?te.emptyScript:"";for(let v=0;v<g;v++)n.append(d[v],Lt()),mt.nextNode(),a.push({type:2,index:++r});n.append(d[g],Lt())}}}else if(n.nodeType===8)if(n.data===fi)a.push({type:2,index:r});else{let d=-1;for(;(d=n.data.indexOf(lt,d+1))!==-1;)a.push({type:7,index:r}),d+=lt.length-1}r++}}static createElement(t,e){const i=ft.createElement("template");return i.innerHTML=t,i}}function St(o,t,e=o,i){var s,l;if(t===q)return t;let n=i!==void 0?(s=e._$Co)==null?void 0:s[i]:e._$Cl;const r=Nt(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==r&&((l=n==null?void 0:n._$AO)==null||l.call(n,!1),r===void 0?n=void 0:(n=new r(o),n._$AT(o,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=n:e._$Cl=n),n!==void 0&&(t=St(o,n._$AS(o,t.values),n,i)),t}class vo{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,n=((t==null?void 0:t.creationScope)??ft).importNode(e,!0);mt.currentNode=n;let r=mt.nextNode(),s=0,l=0,a=i[0];for(;a!==void 0;){if(s===a.index){let h;a.type===2?h=new Vt(r,r.nextSibling,this,t):a.type===1?h=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(h=new _o(r,this,t)),this._$AV.push(h),a=i[++l]}s!==(a==null?void 0:a.index)&&(r=mt.nextNode(),s++)}return mt.currentNode=ft,n}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Vt{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,n){this.type=2,this._$AH=$,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=St(this,t,e),Nt(t)?t===$||t==null||t===""?(this._$AH!==$&&this._$AR(),this._$AH=$):t!==this._$AH&&t!==q&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):go(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==$&&Nt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ft.createTextNode(t)),this._$AH=t}g(t){var r;const{values:e,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=It.createElement(_i(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===n)this._$AH.p(e);else{const s=new vo(n,this),l=s.u(this.options);s.p(e),this.$(l),this._$AH=s}}_$AC(t){let e=Ei.get(t.strings);return e===void 0&&Ei.set(t.strings,e=new It(t)),e}T(t){gi(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new Vt(this.k(Lt()),this.k(Lt()),this,this.options)):i=e[n],i._$AI(r),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class ee{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,n,r){this.type=1,this._$AH=$,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=$}_$AI(t,e=this,i,n){const r=this.strings;let s=!1;if(r===void 0)t=St(this,t,e,0),s=!Nt(t)||t!==this._$AH&&t!==q,s&&(this._$AH=t);else{const l=t;let a,h;for(t=r[0],a=0;a<r.length-1;a++)h=St(this,l[i+a],e,a),h===q&&(h=this._$AH[a]),s||(s=!Nt(h)||h!==this._$AH[a]),h===$?t=$:t!==$&&(t+=(h??"")+r[a+1]),this._$AH[a]=h}s&&!n&&this.O(t)}O(t){t===$?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class bo extends ee{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===$?void 0:t}}class wo extends ee{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==$)}}class Eo extends ee{constructor(t,e,i,n,r){super(t,e,i,n,r),this.type=5}_$AI(t,e=this){if((t=St(this,t,e,0)??$)===q)return;const i=this._$AH,n=t===$&&i!==$||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==$&&(i===$||n);n&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class _o{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){St(this,t)}}const ke=Mt.litHtmlPolyfillSupport;ke==null||ke(It,Vt),(Mt.litHtmlVersions??(Mt.litHtmlVersions=[])).push("3.0.2");const $o=(o,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let n=i._$litPart$;if(n===void 0){const r=(e==null?void 0:e.renderBefore)??null;i._$litPart$=n=new Vt(t.insertBefore(Lt(),r),r,void 0,e??{})}return n._$AI(o),n};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/
|
|
19
|
+
*/class X extends xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=$o(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return q}}X._$litElement$=!0,X.finalized=!0,(eo=globalThis.litElementHydrateSupport)==null||eo.call(globalThis,{LitElement:X});const Ie=globalThis.litElementPolyfillSupport;Ie==null||Ie({LitElement:X}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function et(o,t,e){return o?t():e==null?void 0:e()}/**
|
|
23
|
+
*/function et(o,t,e){return o?t(o):e==null?void 0:e(o)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const yt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ve=o=>(...t)=>({_$litDirective$:o,values:t});let Re=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const
|
|
31
|
+
*/const xo=o=>o.strings===void 0,So={},$i=(o,t=So)=>o._$AH=t;/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const Ao=Ve(class extends Re{constructor(){super(...arguments),this.key=$}render(o,t){return this.key=o,t}update(o,[t,e]){return t!==this.key&&($i(o),this.key=t),e}});/**!
|
|
36
36
|
* Sortable 1.15.0
|
|
37
37
|
* @author RubaXa <trash@rubaxa.org>
|
|
38
38
|
* @author owenm <owen23355@gmail.com>
|
|
39
39
|
* @license MIT
|
|
40
|
-
*/function Ti(o,t){var e=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),e.push.apply(e,i)}return e}function K(o){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Ti(Object(e),!0).forEach(function(i){xo(o,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(e)):Ti(Object(e)).forEach(function(i){Object.defineProperty(o,i,Object.getOwnPropertyDescriptor(e,i))})}return o}function ee(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ee=function(t){return typeof t}:ee=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(o)}function xo(o,t,e){return t in o?Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[t]=e,o}function it(){return it=Object.assign||function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i])}return o},it.apply(this,arguments)}function Ao(o,t){if(o==null)return{};var e={},i=Object.keys(o),n,r;for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(e[n]=o[n]);return e}function Co(o,t){if(o==null)return{};var e=Ao(o,t),i,n;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(o,i)&&(e[i]=o[i])}return e}var So="1.15.0";function ot(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var nt=ot(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Vt=ot(/Edge/i),Di=ot(/firefox/i),Rt=ot(/safari/i)&&!ot(/chrome/i)&&!ot(/android/i),Pi=ot(/iP(ad|od|hone)/i),Oi=ot(/chrome/i)&&ot(/android/i),Hi={capture:!1,passive:!1};function w(o,t,e){o.addEventListener(t,e,!nt&&Hi)}function E(o,t,e){o.removeEventListener(t,e,!nt&&Hi)}function ie(o,t){if(t){if(t[0]===">"&&(t=t.substring(1)),o)try{if(o.matches)return o.matches(t);if(o.msMatchesSelector)return o.msMatchesSelector(t);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(t)}catch{return!1}return!1}}function To(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function J(o,t,e,i){if(o){e=e||document;do{if(t!=null&&(t[0]===">"?o.parentNode===e&&ie(o,t):ie(o,t))||i&&o===e)return o;if(o===e)break}while(o=To(o))}return null}var Mi=/\s+/g;function B(o,t,e){if(o&&t)if(o.classList)o.classList[e?"add":"remove"](t);else{var i=(" "+o.className+" ").replace(Mi," ").replace(" "+t+" "," ");o.className=(i+(e?" "+t:"")).replace(Mi," ")}}function f(o,t,e){var i=o&&o.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(e=o.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function Ct(o,t){var e="";if(typeof o=="string")e=o;else do{var i=f(o,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(o=o.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(e)}function Ni(o,t,e){if(o){var i=o.getElementsByTagName(t),n=0,r=i.length;if(e)for(;n<r;n++)e(i[n],n);return i}return[]}function Q(){var o=document.scrollingElement;return o||document.documentElement}function P(o,t,e,i,n){if(!(!o.getBoundingClientRect&&o!==window)){var r,s,l,a,d,c,u;if(o!==window&&o.parentNode&&o!==Q()?(r=o.getBoundingClientRect(),s=r.top,l=r.left,a=r.bottom,d=r.right,c=r.height,u=r.width):(s=0,l=0,a=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||e)&&o!==window&&(n=n||o.parentNode,!nt))do if(n&&n.getBoundingClientRect&&(f(n,"transform")!=="none"||e&&f(n,"position")!=="static")){var p=n.getBoundingClientRect();s-=p.top+parseInt(f(n,"border-top-width")),l-=p.left+parseInt(f(n,"border-left-width")),a=s+r.height,d=l+r.width;break}while(n=n.parentNode);if(i&&o!==window){var v=Ct(n||o),y=v&&v.a,b=v&&v.d;v&&(s/=b,l/=y,u/=y,c/=b,a=s+c,d=l+u)}return{top:s,left:l,bottom:a,right:d,width:u,height:c}}}function ki(o,t,e){for(var i=lt(o,!0),n=P(o)[t];i;){var r=P(i)[e],s=void 0;if(e==="top"||e==="left"?s=n>=r:s=n<=r,!s)return i;if(i===Q())break;i=lt(i,!1)}return!1}function St(o,t,e,i){for(var n=0,r=0,s=o.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==g.ghost&&(i||s[r]!==g.dragged)&&J(s[r],e.draggable,o,!1)){if(n===t)return s[r];n++}r++}return null}function ze(o,t){for(var e=o.lastElementChild;e&&(e===g.ghost||f(e,"display")==="none"||t&&!ie(e,t));)e=e.previousElementSibling;return e||null}function j(o,t){var e=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==g.clone&&(!t||ie(o,t))&&e++;return e}function Ii(o){var t=0,e=0,i=Q();if(o)do{var n=Ct(o),r=n.a,s=n.d;t+=o.scrollLeft*r,e+=o.scrollTop*s}while(o!==i&&(o=o.parentNode));return[t,e]}function Do(o,t){for(var e in o)if(o.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===o[e][i])return Number(e)}return-1}function lt(o,t){if(!o||!o.getBoundingClientRect)return Q();var e=o,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var n=f(e);if(e.clientWidth<e.scrollWidth&&(n.overflowX=="auto"||n.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(n.overflowY=="auto"||n.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return Q();if(i||t)return e;i=!0}}while(e=e.parentNode);return Q()}function Po(o,t){if(o&&t)for(var e in t)t.hasOwnProperty(e)&&(o[e]=t[e]);return o}function Xe(o,t){return Math.round(o.top)===Math.round(t.top)&&Math.round(o.left)===Math.round(t.left)&&Math.round(o.height)===Math.round(t.height)&&Math.round(o.width)===Math.round(t.width)}var Bt;function Vi(o,t){return function(){if(!Bt){var e=arguments,i=this;e.length===1?o.call(i,e[0]):o.apply(i,e),Bt=setTimeout(function(){Bt=void 0},t)}}}function Oo(){clearTimeout(Bt),Bt=void 0}function Ri(o,t,e){o.scrollLeft+=t,o.scrollTop+=e}function Bi(o){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(o).cloneNode(!0):e?e(o).clone(!0)[0]:o.cloneNode(!0)}var L="Sortable"+new Date().getTime();function Ho(){var o=[],t;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(n){if(!(f(n,"display")==="none"||n===g.ghost)){o.push({target:n,rect:P(n)});var r=K({},o[o.length-1].rect);if(n.thisAnimationDuration){var s=Ct(n,!0);s&&(r.top-=s.f,r.left-=s.e)}n.fromRect=r}})}},addAnimationState:function(i){o.push(i)},removeAnimationState:function(i){o.splice(Do(o,{target:i}),1)},animateAll:function(i){var n=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;o.forEach(function(l){var a=0,d=l.target,c=d.fromRect,u=P(d),p=d.prevFromRect,v=d.prevToRect,y=l.rect,b=Ct(d,!0);b&&(u.top-=b.f,u.left-=b.e),d.toRect=u,d.thisAnimationDuration&&Xe(p,u)&&!Xe(c,u)&&(y.top-u.top)/(y.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(a=No(y,p,v,n.options)),Xe(u,c)||(d.prevFromRect=c,d.prevToRect=u,a||(a=n.options.animation),n.animate(d,y,u,a)),a&&(r=!0,s=Math.max(s,a),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},a),d.thisAnimationDuration=a)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),o=[]},animate:function(i,n,r,s){if(s){f(i,"transition",""),f(i,"transform","");var l=Ct(this.el),a=l&&l.a,d=l&&l.d,c=(n.left-r.left)/(a||1),u=(n.top-r.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,f(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=Mo(i),f(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),f(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){f(i,"transition",""),f(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function Mo(o){return o.offsetWidth}function No(o,t,e,i){return Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var Tt=[],Ye={initializeByDefault:!0},Lt={mount:function(t){for(var e in Ye)Ye.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ye[e]);Tt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Tt.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";Tt.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](K({sortable:e},i)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](K({sortable:e},i)))})},initializePlugins:function(t,e,i,n){Tt.forEach(function(l){var a=l.pluginName;if(!(!t.options[a]&&!l.initializeByDefault)){var d=new l(t,e,t.options);d.sortable=t,d.options=t.options,t[a]=d,it(i,d.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,e){var i={};return Tt.forEach(function(n){typeof n.eventProperties=="function"&&it(i,n.eventProperties.call(e[n.pluginName],t))}),i},modifyOption:function(t,e,i){var n;return Tt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(n=r.optionListeners[e].call(t[r.pluginName],i))}),n}};function ko(o){var t=o.sortable,e=o.rootEl,i=o.name,n=o.targetEl,r=o.cloneEl,s=o.toEl,l=o.fromEl,a=o.oldIndex,d=o.newIndex,c=o.oldDraggableIndex,u=o.newDraggableIndex,p=o.originalEvent,v=o.putSortable,y=o.extraEventProperties;if(t=t||e&&e[L],!!t){var b,Z=t.options,rt="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!nt&&!Vt?b=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(i,!0,!0)),b.to=s||e,b.from=l||e,b.item=n||e,b.clone=r,b.oldIndex=a,b.newIndex=d,b.oldDraggableIndex=c,b.newDraggableIndex=u,b.originalEvent=p,b.pullMode=v?v.lastPutMode:void 0;var k=K(K({},y),Lt.getEventProperties(i,t));for(var G in k)b[G]=k[G];e&&e.dispatchEvent(b),Z[rt]&&Z[rt].call(t,b)}}var Io=["evt"],R=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i.evt,r=Co(i,Io);Lt.pluginEvent.bind(g)(t,e,K({dragEl:h,parentEl:T,ghostEl:m,rootEl:A,nextEl:vt,lastDownEl:oe,cloneEl:C,cloneHidden:dt,dragStarted:Ft,putSortable:O,activeSortable:g.active,originalEvent:n,oldIndex:Dt,oldDraggableIndex:Ut,newIndex:U,newDraggableIndex:ut,hideGhostForTarget:ji,unhideGhostForTarget:qi,cloneNowHidden:function(){dt=!0},cloneNowShown:function(){dt=!1},dispatchSortableEvent:function(l){N({sortable:e,name:l,originalEvent:n})}},r))};function N(o){ko(K({putSortable:O,cloneEl:C,targetEl:h,rootEl:A,oldIndex:Dt,oldDraggableIndex:Ut,newIndex:U,newDraggableIndex:ut},o))}var h,T,m,A,vt,oe,C,dt,Dt,U,Ut,ut,ne,O,Pt=!1,re=!1,se=[],yt,W,je,qe,Li,Ui,Ft,Ot,zt,Xt=!1,ae=!1,le,M,We=[],Ze=!1,de=[],ue=typeof document<"u",he=Pi,Fi=Vt||nt?"cssFloat":"float",Vo=ue&&!Oi&&!Pi&&"draggable"in document.createElement("div"),zi=function(){if(ue){if(nt)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Xi=function(t,e){var i=f(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=St(t,0,e),s=St(t,1,e),l=r&&f(r),a=s&&f(s),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+P(r).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+P(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return s&&(a.clear==="both"||a.clear===u)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=n&&i[Fi]==="none"||s&&i[Fi]==="none"&&d+c>n)?"vertical":"horizontal"},Ro=function(t,e,i){var n=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,l=i?e.left:e.top,a=i?e.right:e.bottom,d=i?e.width:e.height;return n===l||r===a||n+s/2===l+d/2},Bo=function(t,e){var i;return se.some(function(n){var r=n[L].options.emptyInsertThreshold;if(!(!r||ze(n))){var s=P(n),l=t>=s.left-r&&t<=s.right+r,a=e>=s.top-r&&e<=s.bottom+r;if(l&&a)return i=n}}),i},Yi=function(t){function e(r,s){return function(l,a,d,c){var u=l.options.group.name&&a.options.group.name&&l.options.group.name===a.options.group.name;if(r==null&&(s||u))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(l,a,d,c),s)(l,a,d,c);var p=(s?l:a).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},n=t.group;(!n||ee(n)!="object")&&(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},ji=function(){!zi&&m&&f(m,"display","none")},qi=function(){!zi&&m&&f(m,"display","")};ue&&!Oi&&document.addEventListener("click",function(o){if(re)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),re=!1,!1},!0);var bt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=Bo(t.clientX,t.clientY);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[L]._onDragOver(i)}}},Lo=function(t){h&&h.parentNode[L]._isOutsideThisEl(t.target)};function g(o,t){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=t=it({},t),o[L]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Xi(o,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,l){s.setData("Text",l.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:g.supportPointer!==!1&&"PointerEvent"in window&&!Rt,emptyInsertThreshold:5};Lt.initializePlugins(this,o,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Yi(t);for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));this.nativeDraggable=t.forceFallback?!1:Vo,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?w(o,"pointerdown",this._onTapStart):(w(o,"mousedown",this._onTapStart),w(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(o,"dragover",this),w(o,"dragenter",this)),se.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),it(this,Ho())}g.prototype={constructor:g,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ot=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=n.filter;if(Wo(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||n.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Rt&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=J(a,n.draggable,i,!1),!(a&&a.animated)&&oe!==a)){if(Dt=j(a),Ut=j(a,n.draggable),typeof c=="function"){if(c.call(this,t,a,this)){N({sortable:e,rootEl:d,name:"filter",targetEl:a,toEl:i,fromEl:i}),R("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=J(d,u.trim(),i,!1),u)return N({sortable:e,rootEl:u,name:"filter",targetEl:a,fromEl:i,toEl:i}),R("filter",e,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}n.handle&&!J(d,n.handle,i,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,e,i){var n=this,r=n.el,s=n.options,l=r.ownerDocument,a;if(i&&!h&&i.parentNode===r){var d=P(i);if(A=r,h=i,T=h.parentNode,vt=h.nextSibling,oe=i,ne=s.group,g.dragged=h,yt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},Li=yt.clientX-d.left,Ui=yt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",a=function(){if(R("delayEnded",n,{evt:t}),g.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!Di&&n.nativeDraggable&&(h.draggable=!0),n._triggerDragStart(t,e),N({sortable:n,name:"choose",originalEvent:t}),B(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Ni(h,c.trim(),Ge)}),w(l,"dragover",bt),w(l,"mousemove",bt),w(l,"touchmove",bt),w(l,"mouseup",n._onDrop),w(l,"touchend",n._onDrop),w(l,"touchcancel",n._onDrop),Di&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),R("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Vt||nt))){if(g.eventCanceled){this._onDrop();return}w(l,"mouseup",n._disableDelayedDrag),w(l,"touchend",n._disableDelayedDrag),w(l,"touchcancel",n._disableDelayedDrag),w(l,"mousemove",n._delayedDragTouchMoveHandler),w(l,"touchmove",n._delayedDragTouchMoveHandler),s.supportPointer&&w(l,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(a,s.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Ge(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._disableDelayedDrag),E(t,"touchend",this._disableDelayedDrag),E(t,"touchcancel",this._disableDelayedDrag),E(t,"mousemove",this._delayedDragTouchMoveHandler),E(t,"touchmove",this._delayedDragTouchMoveHandler),E(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):e?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(h,"dragend",this),w(A,"dragstart",this._onDragStart));try{document.selection?pe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Pt=!1,A&&h){R("dragStarted",this,{evt:e}),this.nativeDraggable&&w(document,"dragover",Lo);var i=this.options;!t&&B(h,i.dragClass,!1),B(h,i.ghostClass,!0),g.active=this,t&&this._appendGhost(),N({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(W){this._lastX=W.clientX,this._lastY=W.clientY,ji();for(var t=document.elementFromPoint(W.clientX,W.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(W.clientX,W.clientY),t!==e);)e=t;if(h.parentNode[L]._isOutsideThisEl(t),e)do{if(e[L]){var i=void 0;if(i=e[L]._onDragOver({clientX:W.clientX,clientY:W.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);qi()}},_onTouchMove:function(t){if(yt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=m&&Ct(m,!0),l=m&&s&&s.a,a=m&&s&&s.d,d=he&&M&&Ii(M),c=(r.clientX-yt.clientX+n.x)/(l||1)+(d?d[0]-We[0]:0)/(l||1),u=(r.clientY-yt.clientY+n.y)/(a||1)+(d?d[1]-We[1]:0)/(a||1);if(!g.active&&!Pt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(m){s?(s.e+=c-(je||0),s.f+=u-(qe||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,")");f(m,"webkitTransform",p),f(m,"mozTransform",p),f(m,"msTransform",p),f(m,"transform",p),je=c,qe=u,W=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!m){var t=this.options.fallbackOnBody?document.body:A,e=P(h,!0,he,!0,t),i=this.options;if(he){for(M=t;f(M,"position")==="static"&&f(M,"transform")==="none"&&M!==document;)M=M.parentNode;M!==document.body&&M!==document.documentElement?(M===document&&(M=Q()),e.top+=M.scrollTop,e.left+=M.scrollLeft):M=Q(),We=Ii(M)}m=h.cloneNode(!0),B(m,i.ghostClass,!1),B(m,i.fallbackClass,!0),B(m,i.dragClass,!0),f(m,"transition",""),f(m,"transform",""),f(m,"box-sizing","border-box"),f(m,"margin",0),f(m,"top",e.top),f(m,"left",e.left),f(m,"width",e.width),f(m,"height",e.height),f(m,"opacity","0.8"),f(m,"position",he?"absolute":"fixed"),f(m,"zIndex","100000"),f(m,"pointerEvents","none"),g.ghost=m,t.appendChild(m),f(m,"transform-origin",Li/parseInt(m.style.width)*100+"% "+Ui/parseInt(m.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;if(R("dragStart",this,{evt:t}),g.eventCanceled){this._onDrop();return}R("setupClone",this),g.eventCanceled||(C=Bi(h),C.removeAttribute("id"),C.draggable=!1,C.style["will-change"]="",this._hideClone(),B(C,this.options.chosenClass,!1),g.clone=C),i.cloneId=pe(function(){R("clone",i),!g.eventCanceled&&(i.options.removeCloneOnHide||A.insertBefore(C,h),i._hideClone(),N({sortable:i,name:"clone"}))}),!e&&B(h,r.dragClass,!0),e?(re=!0,i._loopId=setInterval(i._emulateDragOver,50)):(E(document,"mouseup",i._onDrop),E(document,"touchend",i._onDrop),E(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,h)),w(document,"drop",i),f(h,"transform","translateZ(0)")),Pt=!0,i._dragStartId=pe(i._dragStarted.bind(i,e,t)),w(document,"selectstart",i),Ft=!0,Rt&&f(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,n,r,s,l=this.options,a=l.group,d=g.active,c=ne===a,u=l.sort,p=O||d,v,y=this,b=!1;if(Ze)return;function Z(Kt,on){R(Kt,y,K({evt:t,isOwner:c,axis:v?"vertical":"horizontal",revert:s,dragRect:n,targetRect:r,canSort:u,fromSortable:p,target:i,completed:k,onMove:function(no,nn){return ce(A,e,h,n,no,P(no),t,nn)},changed:G},on))}function rt(){Z("dragOverAnimationCapture"),y.captureAnimationState(),y!==p&&p.captureAnimationState()}function k(Kt){return Z("dragOverCompleted",{insertion:Kt}),Kt&&(c?d._hideClone():d._showClone(y),y!==p&&(B(h,O?O.options.ghostClass:d.options.ghostClass,!1),B(h,l.ghostClass,!0)),O!==y&&y!==g.active?O=y:y===g.active&&O&&(O=null),p===y&&(y._ignoreWhileAnimating=i),y.animateAll(function(){Z("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(Ot=null),!l.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[L]._isOutsideThisEl(t.target),!Kt&&bt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),b=!0}function G(){U=j(h),ut=j(h,l.draggable),N({sortable:y,name:"change",toEl:e,newIndex:U,newDraggableIndex:ut,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=J(i,l.draggable,e,!0),Z("dragOver"),g.eventCanceled)return b;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||y._ignoreWhileAnimating===i)return k(!1);if(re=!1,d&&!l.disabled&&(c?u||(s=T!==A):O===this||(this.lastPutMode=ne.checkPull(this,d,h,t))&&a.checkPut(this,d,h,t))){if(v=this._getDirection(t,i)==="vertical",n=P(h),Z("dragOverValid"),g.eventCanceled)return b;if(s)return T=A,rt(),this._hideClone(),Z("revert"),g.eventCanceled||(vt?A.insertBefore(h,vt):A.appendChild(h)),k(!0);var F=ze(e,l.draggable);if(!F||Xo(t,v,this)&&!F.animated){if(F===h)return k(!1);if(F&&e===t.target&&(i=F),i&&(r=P(i)),ce(A,e,h,n,i,r,t,!!i)!==!1)return rt(),F&&F.nextSibling?e.insertBefore(h,F.nextSibling):e.appendChild(h),T=e,G(),k(!0)}else if(F&&zo(t,v,this)){var Et=St(e,0,l,!0);if(Et===h)return k(!1);if(i=Et,r=P(i),ce(A,e,h,n,i,r,t,!1)!==!1)return rt(),e.insertBefore(h,Et),T=e,G(),k(!0)}else if(i.parentNode===e){r=P(i);var tt=0,wt,qt=h.parentNode!==e,z=!Ro(h.animated&&h.toRect||n,i.animated&&i.toRect||r,v),Wt=v?"top":"left",ht=ki(i,"top","top")||ki(h,"top","top"),Zt=ht?ht.scrollTop:void 0;Ot!==i&&(wt=r[Wt],Xt=!1,ae=!z&&l.invertSwap||qt),tt=Yo(t,i,r,v,z?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,ae,Ot===i);var st;if(tt!==0){var _t=j(h);do _t-=tt,st=T.children[_t];while(st&&(f(st,"display")==="none"||st===m))}if(tt===0||st===i)return k(!1);Ot=i,zt=tt;var Gt=i.nextElementSibling,ct=!1;ct=tt===1;var Oe=ce(A,e,h,n,i,r,t,ct);if(Oe!==!1)return(Oe===1||Oe===-1)&&(ct=Oe===1),Ze=!0,setTimeout(Fo,30),rt(),ct&&!Gt?e.appendChild(h):i.parentNode.insertBefore(h,ct?Gt:i),ht&&Ri(ht,0,Zt-ht.scrollTop),T=h.parentNode,wt!==void 0&&!ae&&(le=Math.abs(wt-P(i)[Wt])),G(),k(!0)}if(e.contains(h))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",bt),E(document,"mousemove",bt),E(document,"touchmove",bt)},_offUpEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._onDrop),E(t,"touchend",this._onDrop),E(t,"pointerup",this._onDrop),E(t,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(U=j(h),ut=j(h,i.draggable),R("drop",this,{evt:t}),T=h&&h.parentNode,U=j(h),ut=j(h,i.draggable),g.eventCanceled){this._nulling();return}Pt=!1,ae=!1,Xt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ke(this.cloneId),Ke(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Rt&&f(document.body,"user-select",""),f(h,"transform",""),t&&(Ft&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(A===T||O&&O.lastPutMode!=="clone")&&C&&C.parentNode&&C.parentNode.removeChild(C),h&&(this.nativeDraggable&&E(h,"dragend",this),Ge(h),h.style["will-change"]="",Ft&&!Pt&&B(h,O?O.options.ghostClass:this.options.ghostClass,!1),B(h,this.options.chosenClass,!1),N({sortable:this,name:"unchoose",toEl:T,newIndex:null,newDraggableIndex:null,originalEvent:t}),A!==T?(U>=0&&(N({rootEl:T,name:"add",toEl:T,fromEl:A,originalEvent:t}),N({sortable:this,name:"remove",toEl:T,originalEvent:t}),N({rootEl:T,name:"sort",toEl:T,fromEl:A,originalEvent:t}),N({sortable:this,name:"sort",toEl:T,originalEvent:t})),O&&O.save()):U!==Dt&&U>=0&&(N({sortable:this,name:"update",toEl:T,originalEvent:t}),N({sortable:this,name:"sort",toEl:T,originalEvent:t})),g.active&&((U==null||U===-1)&&(U=Dt,ut=Ut),N({sortable:this,name:"end",toEl:T,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){R("nulling",this),A=h=T=m=vt=C=oe=dt=yt=W=Ft=U=ut=Dt=Ut=Ot=zt=O=ne=g.dragged=g.ghost=g.clone=g.active=null,de.forEach(function(t){t.checked=!0}),de.length=je=qe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),Uo(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,n=0,r=i.length,s=this.options;n<r;n++)e=i[n],J(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||qo(e));return t},sort:function(t,e){var i={},n=this.el;this.toArray().forEach(function(r,s){var l=n.children[s];J(l,this.options.draggable,n,!1)&&(i[r]=l)},this),e&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(n.removeChild(i[r]),n.appendChild(i[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return J(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var n=Lt.modifyOption(this,t,e);typeof n<"u"?i[t]=n:i[t]=e,t==="group"&&Yi(i)},destroy:function(){R("destroy",this);var t=this.el;t[L]=null,E(t,"mousedown",this._onTapStart),E(t,"touchstart",this._onTapStart),E(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(t,"dragover",this),E(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),se.splice(se.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!dt){if(R("hideClone",this),g.eventCanceled)return;f(C,"display","none"),this.options.removeCloneOnHide&&C.parentNode&&C.parentNode.removeChild(C),dt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(dt){if(R("showClone",this),g.eventCanceled)return;h.parentNode==A&&!this.options.group.revertClone?A.insertBefore(C,h):vt?A.insertBefore(C,vt):A.appendChild(C),this.options.group.revertClone&&this.animate(h,C),f(C,"display",""),dt=!1}}};function Uo(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function ce(o,t,e,i,n,r,s,l){var a,d=o[L],c=d.options.onMove,u;return window.CustomEvent&&!nt&&!Vt?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=t,a.from=o,a.dragged=e,a.draggedRect=i,a.related=n||t,a.relatedRect=r||P(t),a.willInsertAfter=l,a.originalEvent=s,o.dispatchEvent(a),c&&(u=c.call(d,a,s)),u}function Ge(o){o.draggable=!1}function Fo(){Ze=!1}function zo(o,t,e){var i=P(St(e.el,0,e.options,!0)),n=10;return t?o.clientX<i.left-n||o.clientY<i.top&&o.clientX<i.right:o.clientY<i.top-n||o.clientY<i.bottom&&o.clientX<i.left}function Xo(o,t,e){var i=P(ze(e.el,e.options.draggable)),n=10;return t?o.clientX>i.right+n||o.clientX<=i.right&&o.clientY>i.bottom&&o.clientX>=i.left:o.clientX>i.right&&o.clientY>i.top||o.clientX<=i.right&&o.clientY>i.bottom+n}function Yo(o,t,e,i,n,r,s,l){var a=i?o.clientY:o.clientX,d=i?e.height:e.width,c=i?e.top:e.left,u=i?e.bottom:e.right,p=!1;if(!s){if(l&&le<d*n){if(!Xt&&(zt===1?a>c+d*r/2:a<u-d*r/2)&&(Xt=!0),Xt)p=!0;else if(zt===1?a<c+le:a>u-le)return-zt}else if(a>c+d*(1-n)/2&&a<u-d*(1-n)/2)return jo(t)}return p=p||s,p&&(a<c+d*r/2||a>u-d*r/2)?a>c+d/2?1:-1:0}function jo(o){return j(h)<j(o)?1:-1}function qo(o){for(var t=o.tagName+o.className+o.src+o.href+o.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function Wo(o){de.length=0;for(var t=o.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&de.push(i)}}function pe(o){return setTimeout(o,0)}function Ke(o){return clearTimeout(o)}ue&&w(document,"touchmove",function(o){(g.active||Pt)&&o.cancelable&&o.preventDefault()}),g.utils={on:w,off:E,css:f,find:Ni,is:function(t,e){return!!J(t,e,t,!1)},extend:Po,throttle:Vi,closest:J,toggleClass:B,clone:Bi,index:j,nextTick:pe,cancelNextTick:Ke,detectDirection:Xi,getChild:St},g.get=function(o){return o[L]},g.mount=function(){for(var o=arguments.length,t=new Array(o),e=0;e<o;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(g.utils=K(K({},g.utils),i.utils)),Lt.mount(i)})},g.create=function(o,t){return new g(o,t)},g.version=So;var D=[],Yt,Je,Qe=!1,ti,ei,fe,jt;function Zo(){function o(){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 o.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):i.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):(E(document,"pointermove",this._handleFallbackAutoScroll),E(document,"touchmove",this._handleFallbackAutoScroll),E(document,"mousemove",this._handleFallbackAutoScroll)),Wi(),ge(),Oo()},nulling:function(){fe=Je=Yt=Qe=jt=ti=ei=null,D.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var n=this,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(r,s);if(fe=e,i||this.options.forceAutoScrollFallback||Vt||nt||Rt){ii(e,this.options,l,i);var a=lt(l,!0);Qe&&(!jt||r!==ti||s!==ei)&&(jt&&Wi(),jt=setInterval(function(){var d=lt(document.elementFromPoint(r,s),!0);d!==a&&(a=d,ge()),ii(e,n.options,d,i)},10),ti=r,ei=s)}else{if(!this.options.bubbleScroll||lt(l,!0)===Q()){ge();return}ii(e,this.options,lt(l,!1),!1)}}},it(o,{pluginName:"scroll",initializeByDefault:!0})}function ge(){D.forEach(function(o){clearInterval(o.pid)}),D=[]}function Wi(){clearInterval(jt)}var ii=Vi(function(o,t,e,i){if(t.scroll){var n=(o.touches?o.touches[0]:o).clientX,r=(o.touches?o.touches[0]:o).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,a=Q(),d=!1,c;Je!==e&&(Je=e,ge(),Yt=t.scroll,c=t.scrollFn,Yt===!0&&(Yt=lt(e,!0)));var u=0,p=Yt;do{var v=p,y=P(v),b=y.top,Z=y.bottom,rt=y.left,k=y.right,G=y.width,F=y.height,Et=void 0,tt=void 0,wt=v.scrollWidth,qt=v.scrollHeight,z=f(v),Wt=v.scrollLeft,ht=v.scrollTop;v===a?(Et=G<wt&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),tt=F<qt&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(Et=G<wt&&(z.overflowX==="auto"||z.overflowX==="scroll"),tt=F<qt&&(z.overflowY==="auto"||z.overflowY==="scroll"));var Zt=Et&&(Math.abs(k-n)<=s&&Wt+G<wt)-(Math.abs(rt-n)<=s&&!!Wt),st=tt&&(Math.abs(Z-r)<=s&&ht+F<qt)-(Math.abs(b-r)<=s&&!!ht);if(!D[u])for(var _t=0;_t<=u;_t++)D[_t]||(D[_t]={});(D[u].vx!=Zt||D[u].vy!=st||D[u].el!==v)&&(D[u].el=v,D[u].vx=Zt,D[u].vy=st,clearInterval(D[u].pid),(Zt!=0||st!=0)&&(d=!0,D[u].pid=setInterval((function(){i&&this.layer===0&&g.active._onTouchMove(fe);var Gt=D[this.layer].vy?D[this.layer].vy*l:0,ct=D[this.layer].vx?D[this.layer].vx*l:0;typeof c=="function"&&c.call(g.dragged.parentNode[L],ct,Gt,o,fe,D[this.layer].el)!=="continue"||Ri(D[this.layer].el,ct,Gt)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==a&&(p=lt(p,!1)));Qe=d}},30),Zi=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var d=i||r;l();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);a(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function oi(){}oi.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=St(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Zi},it(oi,{pluginName:"revertOnSpill"});function ni(){}ni.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,n=i||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Zi},it(ni,{pluginName:"removeOnSpill"}),g.mount(new Zo),g.mount(ni,oi);const Go=(o,t,e)=>{let i=[];o._sortable=g.create(o,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:n=>{const r=n.item;i=Array.prototype.slice.call(r.parentNode.childNodes),i=i.filter(s=>s.nodeType!=Node.ELEMENT_NODE||!s.classList.contains("sortable-fallback"))},onEnd:n=>{const s=n.item.parentNode;for(const a of i)s.appendChild(a);if(n.oldIndex==n.newIndex)return;const l=t.getArray().find(a=>a.ol_uid===n.item.querySelector("eox-layercontrol-layer").layer.ol_uid);t.remove(l),t.insertAt(t.getLength()-n.newIndex,l),e.requestUpdate()}})},ri=(o,t,e)=>{let i=[];const n=(r,s,l)=>{i=[...i,...r.filter(d=>d.get(s)===l)];const a=r.filter(d=>d.getLayers);return a.length>0&&a.forEach(d=>n(d.getLayers().getArray(),s,l)),i};return n(o,t,e),i},Ko=(o,t)=>{var e,i,n;if(!(!o||!t))return o.getLayers?"group":(n=(e=t.getInteractions().getArray().filter(r=>r.freehand_!==void 0).map(r=>r.source_))==null?void 0:e.ol_uid)!=null&&n.includes(o.getSource?(i=o.getSource())==null?void 0:i.ol_uid:void 0)?"draw":o.declutter_!==void 0?"vector":"raster"};/**
|
|
40
|
+
*/function xi(o,t){var e=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),e.push.apply(e,i)}return e}function K(o){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?xi(Object(e),!0).forEach(function(i){Co(o,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(e)):xi(Object(e)).forEach(function(i){Object.defineProperty(o,i,Object.getOwnPropertyDescriptor(e,i))})}return o}function ie(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ie=function(t){return typeof t}:ie=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(o)}function Co(o,t,e){return t in o?Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[t]=e,o}function it(){return it=Object.assign||function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i])}return o},it.apply(this,arguments)}function To(o,t){if(o==null)return{};var e={},i=Object.keys(o),n,r;for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(e[n]=o[n]);return e}function Do(o,t){if(o==null)return{};var e=To(o,t),i,n;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(o,i)&&(e[i]=o[i])}return e}var Oo="1.15.0";function ot(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var nt=ot(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Rt=ot(/Edge/i),Si=ot(/firefox/i),Bt=ot(/safari/i)&&!ot(/chrome/i)&&!ot(/android/i),Ai=ot(/iP(ad|od|hone)/i),Ci=ot(/chrome/i)&&ot(/android/i),Ti={capture:!1,passive:!1};function w(o,t,e){o.addEventListener(t,e,!nt&&Ti)}function b(o,t,e){o.removeEventListener(t,e,!nt&&Ti)}function oe(o,t){if(t){if(t[0]===">"&&(t=t.substring(1)),o)try{if(o.matches)return o.matches(t);if(o.msMatchesSelector)return o.msMatchesSelector(t);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(t)}catch{return!1}return!1}}function Po(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function J(o,t,e,i){if(o){e=e||document;do{if(t!=null&&(t[0]===">"?o.parentNode===e&&oe(o,t):oe(o,t))||i&&o===e)return o;if(o===e)break}while(o=Po(o))}return null}var Di=/\s+/g;function B(o,t,e){if(o&&t)if(o.classList)o.classList[e?"add":"remove"](t);else{var i=(" "+o.className+" ").replace(Di," ").replace(" "+t+" "," ");o.className=(i+(e?" "+t:"")).replace(Di," ")}}function p(o,t,e){var i=o&&o.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(e=o.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function At(o,t){var e="";if(typeof o=="string")e=o;else do{var i=p(o,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(o=o.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(e)}function Oi(o,t,e){if(o){var i=o.getElementsByTagName(t),n=0,r=i.length;if(e)for(;n<r;n++)e(i[n],n);return i}return[]}function Q(){var o=document.scrollingElement;return o||document.documentElement}function O(o,t,e,i,n){if(!(!o.getBoundingClientRect&&o!==window)){var r,s,l,a,h,c,d;if(o!==window&&o.parentNode&&o!==Q()?(r=o.getBoundingClientRect(),s=r.top,l=r.left,a=r.bottom,h=r.right,c=r.height,d=r.width):(s=0,l=0,a=window.innerHeight,h=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||e)&&o!==window&&(n=n||o.parentNode,!nt))do if(n&&n.getBoundingClientRect&&(p(n,"transform")!=="none"||e&&p(n,"position")!=="static")){var g=n.getBoundingClientRect();s-=g.top+parseInt(p(n,"border-top-width")),l-=g.left+parseInt(p(n,"border-left-width")),a=s+r.height,h=l+r.width;break}while(n=n.parentNode);if(i&&o!==window){var v=At(n||o),y=v&&v.a,E=v&&v.d;v&&(s/=E,l/=y,d/=y,c/=E,a=s+c,h=l+d)}return{top:s,left:l,bottom:a,right:h,width:d,height:c}}}function Pi(o,t,e){for(var i=ht(o,!0),n=O(o)[t];i;){var r=O(i)[e],s=void 0;if(e==="top"||e==="left"?s=n>=r:s=n<=r,!s)return i;if(i===Q())break;i=ht(i,!1)}return!1}function Ct(o,t,e,i){for(var n=0,r=0,s=o.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==f.ghost&&(i||s[r]!==f.dragged)&&J(s[r],e.draggable,o,!1)){if(n===t)return s[r];n++}r++}return null}function Be(o,t){for(var e=o.lastElementChild;e&&(e===f.ghost||p(e,"display")==="none"||t&&!oe(e,t));)e=e.previousElementSibling;return e||null}function Y(o,t){var e=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==f.clone&&(!t||oe(o,t))&&e++;return e}function Hi(o){var t=0,e=0,i=Q();if(o)do{var n=At(o),r=n.a,s=n.d;t+=o.scrollLeft*r,e+=o.scrollTop*s}while(o!==i&&(o=o.parentNode));return[t,e]}function Ho(o,t){for(var e in o)if(o.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===o[e][i])return Number(e)}return-1}function ht(o,t){if(!o||!o.getBoundingClientRect)return Q();var e=o,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var n=p(e);if(e.clientWidth<e.scrollWidth&&(n.overflowX=="auto"||n.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(n.overflowY=="auto"||n.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return Q();if(i||t)return e;i=!0}}while(e=e.parentNode);return Q()}function Mo(o,t){if(o&&t)for(var e in t)t.hasOwnProperty(e)&&(o[e]=t[e]);return o}function Ue(o,t){return Math.round(o.top)===Math.round(t.top)&&Math.round(o.left)===Math.round(t.left)&&Math.round(o.height)===Math.round(t.height)&&Math.round(o.width)===Math.round(t.width)}var Ut;function Mi(o,t){return function(){if(!Ut){var e=arguments,i=this;e.length===1?o.call(i,e[0]):o.apply(i,e),Ut=setTimeout(function(){Ut=void 0},t)}}}function Lo(){clearTimeout(Ut),Ut=void 0}function Li(o,t,e){o.scrollLeft+=t,o.scrollTop+=e}function Ni(o){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(o).cloneNode(!0):e?e(o).clone(!0)[0]:o.cloneNode(!0)}var U="Sortable"+new Date().getTime();function No(){var o=[],t;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(n){if(!(p(n,"display")==="none"||n===f.ghost)){o.push({target:n,rect:O(n)});var r=K({},o[o.length-1].rect);if(n.thisAnimationDuration){var s=At(n,!0);s&&(r.top-=s.f,r.left-=s.e)}n.fromRect=r}})}},addAnimationState:function(i){o.push(i)},removeAnimationState:function(i){o.splice(Ho(o,{target:i}),1)},animateAll:function(i){var n=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;o.forEach(function(l){var a=0,h=l.target,c=h.fromRect,d=O(h),g=h.prevFromRect,v=h.prevToRect,y=l.rect,E=At(h,!0);E&&(d.top-=E.f,d.left-=E.e),h.toRect=d,h.thisAnimationDuration&&Ue(g,d)&&!Ue(c,d)&&(y.top-d.top)/(y.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(a=Io(y,g,v,n.options)),Ue(d,c)||(h.prevFromRect=c,h.prevToRect=d,a||(a=n.options.animation),n.animate(h,y,d,a)),a&&(r=!0,s=Math.max(s,a),clearTimeout(h.animationResetTimer),h.animationResetTimer=setTimeout(function(){h.animationTime=0,h.prevFromRect=null,h.fromRect=null,h.prevToRect=null,h.thisAnimationDuration=null},a),h.thisAnimationDuration=a)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),o=[]},animate:function(i,n,r,s){if(s){p(i,"transition",""),p(i,"transform","");var l=At(this.el),a=l&&l.a,h=l&&l.d,c=(n.left-r.left)/(a||1),d=(n.top-r.top)/(h||1);i.animatingX=!!c,i.animatingY=!!d,p(i,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=ko(i),p(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),p(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){p(i,"transition",""),p(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function ko(o){return o.offsetWidth}function Io(o,t,e,i){return Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var Tt=[],Ze={initializeByDefault:!0},Zt={mount:function(t){for(var e in Ze)Ze.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ze[e]);Tt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Tt.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";Tt.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](K({sortable:e},i)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](K({sortable:e},i)))})},initializePlugins:function(t,e,i,n){Tt.forEach(function(l){var a=l.pluginName;if(!(!t.options[a]&&!l.initializeByDefault)){var h=new l(t,e,t.options);h.sortable=t,h.options=t.options,t[a]=h,it(i,h.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,e){var i={};return Tt.forEach(function(n){typeof n.eventProperties=="function"&&it(i,n.eventProperties.call(e[n.pluginName],t))}),i},modifyOption:function(t,e,i){var n;return Tt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(n=r.optionListeners[e].call(t[r.pluginName],i))}),n}};function Vo(o){var t=o.sortable,e=o.rootEl,i=o.name,n=o.targetEl,r=o.cloneEl,s=o.toEl,l=o.fromEl,a=o.oldIndex,h=o.newIndex,c=o.oldDraggableIndex,d=o.newDraggableIndex,g=o.originalEvent,v=o.putSortable,y=o.extraEventProperties;if(t=t||e&&e[U],!!t){var E,W=t.options,rt="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!nt&&!Rt?E=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(i,!0,!0)),E.to=s||e,E.from=l||e,E.item=n||e,E.clone=r,E.oldIndex=a,E.newIndex=h,E.oldDraggableIndex=c,E.newDraggableIndex=d,E.originalEvent=g,E.pullMode=v?v.lastPutMode:void 0;var N=K(K({},y),Zt.getEventProperties(i,t));for(var G in N)E[G]=N[G];e&&e.dispatchEvent(E),W[rt]&&W[rt].call(t,E)}}var Ro=["evt"],V=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i.evt,r=Do(i,Ro);Zt.pluginEvent.bind(f)(t,e,K({dragEl:u,parentEl:T,ghostEl:m,rootEl:S,nextEl:vt,lastDownEl:ne,cloneEl:A,cloneHidden:dt,dragStarted:zt,putSortable:P,activeSortable:f.active,originalEvent:n,oldIndex:Dt,oldDraggableIndex:Ft,newIndex:Z,newDraggableIndex:ut,hideGhostForTarget:Zi,unhideGhostForTarget:Fi,cloneNowHidden:function(){dt=!0},cloneNowShown:function(){dt=!1},dispatchSortableEvent:function(l){L({sortable:e,name:l,originalEvent:n})}},r))};function L(o){Vo(K({putSortable:P,cloneEl:A,targetEl:u,rootEl:S,oldIndex:Dt,oldDraggableIndex:Ft,newIndex:Z,newDraggableIndex:ut},o))}var u,T,m,S,vt,ne,A,dt,Dt,Z,Ft,ut,re,P,Ot=!1,se=!1,ae=[],bt,j,Fe,ze,ki,Ii,zt,Pt,Xt,Yt=!1,le=!1,he,M,Xe=[],Ye=!1,de=[],ue=typeof document<"u",ce=Ai,Vi=Rt||nt?"cssFloat":"float",Bo=ue&&!Ci&&!Ai&&"draggable"in document.createElement("div"),Ri=function(){if(ue){if(nt)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Bi=function(t,e){var i=p(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=Ct(t,0,e),s=Ct(t,1,e),l=r&&p(r),a=s&&p(s),h=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(r).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var d=l.float==="left"?"left":"right";return s&&(a.clear==="both"||a.clear===d)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||h>=n&&i[Vi]==="none"||s&&i[Vi]==="none"&&h+c>n)?"vertical":"horizontal"},Uo=function(t,e,i){var n=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,l=i?e.left:e.top,a=i?e.right:e.bottom,h=i?e.width:e.height;return n===l||r===a||n+s/2===l+h/2},Zo=function(t,e){var i;return ae.some(function(n){var r=n[U].options.emptyInsertThreshold;if(!(!r||Be(n))){var s=O(n),l=t>=s.left-r&&t<=s.right+r,a=e>=s.top-r&&e<=s.bottom+r;if(l&&a)return i=n}}),i},Ui=function(t){function e(r,s){return function(l,a,h,c){var d=l.options.group.name&&a.options.group.name&&l.options.group.name===a.options.group.name;if(r==null&&(s||d))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(l,a,h,c),s)(l,a,h,c);var g=(s?l:a).options.group.name;return r===!0||typeof r=="string"&&r===g||r.join&&r.indexOf(g)>-1}}var i={},n=t.group;(!n||ie(n)!="object")&&(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},Zi=function(){!Ri&&m&&p(m,"display","none")},Fi=function(){!Ri&&m&&p(m,"display","")};ue&&!Ci&&document.addEventListener("click",function(o){if(se)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),se=!1,!1},!0);var wt=function(t){if(u){t=t.touches?t.touches[0]:t;var e=Zo(t.clientX,t.clientY);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[U]._onDragOver(i)}}},Fo=function(t){u&&u.parentNode[U]._isOutsideThisEl(t.target)};function f(o,t){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=t=it({},t),o[U]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Bi(o,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,l){s.setData("Text",l.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:f.supportPointer!==!1&&"PointerEvent"in window&&!Bt,emptyInsertThreshold:5};Zt.initializePlugins(this,o,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Ui(t);for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));this.nativeDraggable=t.forceFallback?!1:Bo,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?w(o,"pointerdown",this._onTapStart):(w(o,"mousedown",this._onTapStart),w(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(o,"dragover",this),w(o,"dragenter",this)),ae.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),it(this,No())}f.prototype={constructor:f,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Pt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,u):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(l||t).target,h=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=n.filter;if(Ko(i),!u&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||n.disabled)&&!h.isContentEditable&&!(!this.nativeDraggable&&Bt&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=J(a,n.draggable,i,!1),!(a&&a.animated)&&ne!==a)){if(Dt=Y(a),Ft=Y(a,n.draggable),typeof c=="function"){if(c.call(this,t,a,this)){L({sortable:e,rootEl:h,name:"filter",targetEl:a,toEl:i,fromEl:i}),V("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=J(h,d.trim(),i,!1),d)return L({sortable:e,rootEl:d,name:"filter",targetEl:a,fromEl:i,toEl:i}),V("filter",e,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}n.handle&&!J(h,n.handle,i,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,e,i){var n=this,r=n.el,s=n.options,l=r.ownerDocument,a;if(i&&!u&&i.parentNode===r){var h=O(i);if(S=r,u=i,T=u.parentNode,vt=u.nextSibling,ne=i,re=s.group,f.dragged=u,bt={target:u,clientX:(e||t).clientX,clientY:(e||t).clientY},ki=bt.clientX-h.left,Ii=bt.clientY-h.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,u.style["will-change"]="all",a=function(){if(V("delayEnded",n,{evt:t}),f.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!Si&&n.nativeDraggable&&(u.draggable=!0),n._triggerDragStart(t,e),L({sortable:n,name:"choose",originalEvent:t}),B(u,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Oi(u,c.trim(),qe)}),w(l,"dragover",wt),w(l,"mousemove",wt),w(l,"touchmove",wt),w(l,"mouseup",n._onDrop),w(l,"touchend",n._onDrop),w(l,"touchcancel",n._onDrop),Si&&this.nativeDraggable&&(this.options.touchStartThreshold=4,u.draggable=!0),V("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Rt||nt))){if(f.eventCanceled){this._onDrop();return}w(l,"mouseup",n._disableDelayedDrag),w(l,"touchend",n._disableDelayedDrag),w(l,"touchcancel",n._disableDelayedDrag),w(l,"mousemove",n._delayedDragTouchMoveHandler),w(l,"touchmove",n._delayedDragTouchMoveHandler),s.supportPointer&&w(l,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(a,s.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){u&&qe(u),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):e?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(u,"dragend",this),w(S,"dragstart",this._onDragStart));try{document.selection?fe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Ot=!1,S&&u){V("dragStarted",this,{evt:e}),this.nativeDraggable&&w(document,"dragover",Fo);var i=this.options;!t&&B(u,i.dragClass,!1),B(u,i.ghostClass,!0),f.active=this,t&&this._appendGhost(),L({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(j){this._lastX=j.clientX,this._lastY=j.clientY,Zi();for(var t=document.elementFromPoint(j.clientX,j.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(j.clientX,j.clientY),t!==e);)e=t;if(u.parentNode[U]._isOutsideThisEl(t),e)do{if(e[U]){var i=void 0;if(i=e[U]._onDragOver({clientX:j.clientX,clientY:j.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Fi()}},_onTouchMove:function(t){if(bt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=m&&At(m,!0),l=m&&s&&s.a,a=m&&s&&s.d,h=ce&&M&&Hi(M),c=(r.clientX-bt.clientX+n.x)/(l||1)+(h?h[0]-Xe[0]:0)/(l||1),d=(r.clientY-bt.clientY+n.y)/(a||1)+(h?h[1]-Xe[1]:0)/(a||1);if(!f.active&&!Ot){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(m){s?(s.e+=c-(Fe||0),s.f+=d-(ze||0)):s={a:1,b:0,c:0,d:1,e:c,f:d};var g="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");p(m,"webkitTransform",g),p(m,"mozTransform",g),p(m,"msTransform",g),p(m,"transform",g),Fe=c,ze=d,j=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!m){var t=this.options.fallbackOnBody?document.body:S,e=O(u,!0,ce,!0,t),i=this.options;if(ce){for(M=t;p(M,"position")==="static"&&p(M,"transform")==="none"&&M!==document;)M=M.parentNode;M!==document.body&&M!==document.documentElement?(M===document&&(M=Q()),e.top+=M.scrollTop,e.left+=M.scrollLeft):M=Q(),Xe=Hi(M)}m=u.cloneNode(!0),B(m,i.ghostClass,!1),B(m,i.fallbackClass,!0),B(m,i.dragClass,!0),p(m,"transition",""),p(m,"transform",""),p(m,"box-sizing","border-box"),p(m,"margin",0),p(m,"top",e.top),p(m,"left",e.left),p(m,"width",e.width),p(m,"height",e.height),p(m,"opacity","0.8"),p(m,"position",ce?"absolute":"fixed"),p(m,"zIndex","100000"),p(m,"pointerEvents","none"),f.ghost=m,t.appendChild(m),p(m,"transform-origin",ki/parseInt(m.style.width)*100+"% "+Ii/parseInt(m.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;if(V("dragStart",this,{evt:t}),f.eventCanceled){this._onDrop();return}V("setupClone",this),f.eventCanceled||(A=Ni(u),A.removeAttribute("id"),A.draggable=!1,A.style["will-change"]="",this._hideClone(),B(A,this.options.chosenClass,!1),f.clone=A),i.cloneId=fe(function(){V("clone",i),!f.eventCanceled&&(i.options.removeCloneOnHide||S.insertBefore(A,u),i._hideClone(),L({sortable:i,name:"clone"}))}),!e&&B(u,r.dragClass,!0),e?(se=!0,i._loopId=setInterval(i._emulateDragOver,50)):(b(document,"mouseup",i._onDrop),b(document,"touchend",i._onDrop),b(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,u)),w(document,"drop",i),p(u,"transform","translateZ(0)")),Ot=!0,i._dragStartId=fe(i._dragStarted.bind(i,e,t)),w(document,"selectstart",i),zt=!0,Bt&&p(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,n,r,s,l=this.options,a=l.group,h=f.active,c=re===a,d=l.sort,g=P||h,v,y=this,E=!1;if(Ye)return;function W(Qt,an){V(Qt,y,K({evt:t,isOwner:c,axis:v?"vertical":"horizontal",revert:s,dragRect:n,targetRect:r,canSort:d,fromSortable:g,target:i,completed:N,onMove:function(io,ln){return pe(S,e,u,n,io,O(io),t,ln)},changed:G},an))}function rt(){W("dragOverAnimationCapture"),y.captureAnimationState(),y!==g&&g.captureAnimationState()}function N(Qt){return W("dragOverCompleted",{insertion:Qt}),Qt&&(c?h._hideClone():h._showClone(y),y!==g&&(B(u,P?P.options.ghostClass:h.options.ghostClass,!1),B(u,l.ghostClass,!0)),P!==y&&y!==f.active?P=y:y===f.active&&P&&(P=null),g===y&&(y._ignoreWhileAnimating=i),y.animateAll(function(){W("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(i===u&&!u.animated||i===e&&!i.animated)&&(Pt=null),!l.dragoverBubble&&!t.rootEl&&i!==document&&(u.parentNode[U]._isOutsideThisEl(t.target),!Qt&&wt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),E=!0}function G(){Z=Y(u),ut=Y(u,l.draggable),L({sortable:y,name:"change",toEl:e,newIndex:Z,newDraggableIndex:ut,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=J(i,l.draggable,e,!0),W("dragOver"),f.eventCanceled)return E;if(u.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||y._ignoreWhileAnimating===i)return N(!1);if(se=!1,h&&!l.disabled&&(c?d||(s=T!==S):P===this||(this.lastPutMode=re.checkPull(this,h,u,t))&&a.checkPut(this,h,u,t))){if(v=this._getDirection(t,i)==="vertical",n=O(u),W("dragOverValid"),f.eventCanceled)return E;if(s)return T=S,rt(),this._hideClone(),W("revert"),f.eventCanceled||(vt?S.insertBefore(u,vt):S.appendChild(u)),N(!0);var F=Be(e,l.draggable);if(!F||qo(t,v,this)&&!F.animated){if(F===u)return N(!1);if(F&&e===t.target&&(i=F),i&&(r=O(i)),pe(S,e,u,n,i,r,t,!!i)!==!1)return rt(),F&&F.nextSibling?e.insertBefore(u,F.nextSibling):e.appendChild(u),T=e,G(),N(!0)}else if(F&&Yo(t,v,this)){var Et=Ct(e,0,l,!0);if(Et===u)return N(!1);if(i=Et,r=O(i),pe(S,e,u,n,i,r,t,!1)!==!1)return rt(),e.insertBefore(u,Et),T=e,G(),N(!0)}else if(i.parentNode===e){r=O(i);var tt=0,_t,Wt=u.parentNode!==e,z=!Uo(u.animated&&u.toRect||n,i.animated&&i.toRect||r,v),Gt=v?"top":"left",ct=Pi(i,"top","top")||Pi(u,"top","top"),Kt=ct?ct.scrollTop:void 0;Pt!==i&&(_t=r[Gt],Yt=!1,le=!z&&l.invertSwap||Wt),tt=jo(t,i,r,v,z?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,le,Pt===i);var st;if(tt!==0){var $t=Y(u);do $t-=tt,st=T.children[$t];while(st&&(p(st,"display")==="none"||st===m))}if(tt===0||st===i)return N(!1);Pt=i,Xt=tt;var Jt=i.nextElementSibling,pt=!1;pt=tt===1;var He=pe(S,e,u,n,i,r,t,pt);if(He!==!1)return(He===1||He===-1)&&(pt=He===1),Ye=!0,setTimeout(Xo,30),rt(),pt&&!Jt?e.appendChild(u):i.parentNode.insertBefore(u,pt?Jt:i),ct&&Li(ct,0,Kt-ct.scrollTop),T=u.parentNode,_t!==void 0&&!le&&(he=Math.abs(_t-O(i)[Gt])),G(),N(!0)}if(e.contains(u))return N(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",wt),b(document,"mousemove",wt),b(document,"touchmove",wt)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(Z=Y(u),ut=Y(u,i.draggable),V("drop",this,{evt:t}),T=u&&u.parentNode,Z=Y(u),ut=Y(u,i.draggable),f.eventCanceled){this._nulling();return}Ot=!1,le=!1,Yt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),je(this.cloneId),je(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Bt&&p(document.body,"user-select",""),p(u,"transform",""),t&&(zt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(S===T||P&&P.lastPutMode!=="clone")&&A&&A.parentNode&&A.parentNode.removeChild(A),u&&(this.nativeDraggable&&b(u,"dragend",this),qe(u),u.style["will-change"]="",zt&&!Ot&&B(u,P?P.options.ghostClass:this.options.ghostClass,!1),B(u,this.options.chosenClass,!1),L({sortable:this,name:"unchoose",toEl:T,newIndex:null,newDraggableIndex:null,originalEvent:t}),S!==T?(Z>=0&&(L({rootEl:T,name:"add",toEl:T,fromEl:S,originalEvent:t}),L({sortable:this,name:"remove",toEl:T,originalEvent:t}),L({rootEl:T,name:"sort",toEl:T,fromEl:S,originalEvent:t}),L({sortable:this,name:"sort",toEl:T,originalEvent:t})),P&&P.save()):Z!==Dt&&Z>=0&&(L({sortable:this,name:"update",toEl:T,originalEvent:t}),L({sortable:this,name:"sort",toEl:T,originalEvent:t})),f.active&&((Z==null||Z===-1)&&(Z=Dt,ut=Ft),L({sortable:this,name:"end",toEl:T,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){V("nulling",this),S=u=T=m=vt=A=ne=dt=bt=j=zt=Z=ut=Dt=Ft=Pt=Xt=P=re=f.dragged=f.ghost=f.clone=f.active=null,de.forEach(function(t){t.checked=!0}),de.length=Fe=ze=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":u&&(this._onDragOver(t),zo(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,n=0,r=i.length,s=this.options;n<r;n++)e=i[n],J(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||Go(e));return t},sort:function(t,e){var i={},n=this.el;this.toArray().forEach(function(r,s){var l=n.children[s];J(l,this.options.draggable,n,!1)&&(i[r]=l)},this),e&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(n.removeChild(i[r]),n.appendChild(i[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return J(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var n=Zt.modifyOption(this,t,e);typeof n<"u"?i[t]=n:i[t]=e,t==="group"&&Ui(i)},destroy:function(){V("destroy",this);var t=this.el;t[U]=null,b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart),b(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ae.splice(ae.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!dt){if(V("hideClone",this),f.eventCanceled)return;p(A,"display","none"),this.options.removeCloneOnHide&&A.parentNode&&A.parentNode.removeChild(A),dt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(dt){if(V("showClone",this),f.eventCanceled)return;u.parentNode==S&&!this.options.group.revertClone?S.insertBefore(A,u):vt?S.insertBefore(A,vt):S.appendChild(A),this.options.group.revertClone&&this.animate(u,A),p(A,"display",""),dt=!1}}};function zo(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function pe(o,t,e,i,n,r,s,l){var a,h=o[U],c=h.options.onMove,d;return window.CustomEvent&&!nt&&!Rt?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=t,a.from=o,a.dragged=e,a.draggedRect=i,a.related=n||t,a.relatedRect=r||O(t),a.willInsertAfter=l,a.originalEvent=s,o.dispatchEvent(a),c&&(d=c.call(h,a,s)),d}function qe(o){o.draggable=!1}function Xo(){Ye=!1}function Yo(o,t,e){var i=O(Ct(e.el,0,e.options,!0)),n=10;return t?o.clientX<i.left-n||o.clientY<i.top&&o.clientX<i.right:o.clientY<i.top-n||o.clientY<i.bottom&&o.clientX<i.left}function qo(o,t,e){var i=O(Be(e.el,e.options.draggable)),n=10;return t?o.clientX>i.right+n||o.clientX<=i.right&&o.clientY>i.bottom&&o.clientX>=i.left:o.clientX>i.right&&o.clientY>i.top||o.clientX<=i.right&&o.clientY>i.bottom+n}function jo(o,t,e,i,n,r,s,l){var a=i?o.clientY:o.clientX,h=i?e.height:e.width,c=i?e.top:e.left,d=i?e.bottom:e.right,g=!1;if(!s){if(l&&he<h*n){if(!Yt&&(Xt===1?a>c+h*r/2:a<d-h*r/2)&&(Yt=!0),Yt)g=!0;else if(Xt===1?a<c+he:a>d-he)return-Xt}else if(a>c+h*(1-n)/2&&a<d-h*(1-n)/2)return Wo(t)}return g=g||s,g&&(a<c+h*r/2||a>d-h*r/2)?a>c+h/2?1:-1:0}function Wo(o){return Y(u)<Y(o)?1:-1}function Go(o){for(var t=o.tagName+o.className+o.src+o.href+o.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function Ko(o){de.length=0;for(var t=o.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&de.push(i)}}function fe(o){return setTimeout(o,0)}function je(o){return clearTimeout(o)}ue&&w(document,"touchmove",function(o){(f.active||Ot)&&o.cancelable&&o.preventDefault()}),f.utils={on:w,off:b,css:p,find:Oi,is:function(t,e){return!!J(t,e,t,!1)},extend:Mo,throttle:Mi,closest:J,toggleClass:B,clone:Ni,index:Y,nextTick:fe,cancelNextTick:je,detectDirection:Bi,getChild:Ct},f.get=function(o){return o[U]},f.mount=function(){for(var o=arguments.length,t=new Array(o),e=0;e<o;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(f.utils=K(K({},f.utils),i.utils)),Zt.mount(i)})},f.create=function(o,t){return new f(o,t)},f.version=Oo;var D=[],qt,We,Ge=!1,Ke,Je,ge,jt;function Jo(){function o(){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 o.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):i.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),zi(),me(),Lo()},nulling:function(){ge=We=qt=Ge=jt=Ke=Je=null,D.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var n=this,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(r,s);if(ge=e,i||this.options.forceAutoScrollFallback||Rt||nt||Bt){Qe(e,this.options,l,i);var a=ht(l,!0);Ge&&(!jt||r!==Ke||s!==Je)&&(jt&&zi(),jt=setInterval(function(){var h=ht(document.elementFromPoint(r,s),!0);h!==a&&(a=h,me()),Qe(e,n.options,h,i)},10),Ke=r,Je=s)}else{if(!this.options.bubbleScroll||ht(l,!0)===Q()){me();return}Qe(e,this.options,ht(l,!1),!1)}}},it(o,{pluginName:"scroll",initializeByDefault:!0})}function me(){D.forEach(function(o){clearInterval(o.pid)}),D=[]}function zi(){clearInterval(jt)}var Qe=Mi(function(o,t,e,i){if(t.scroll){var n=(o.touches?o.touches[0]:o).clientX,r=(o.touches?o.touches[0]:o).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,a=Q(),h=!1,c;We!==e&&(We=e,me(),qt=t.scroll,c=t.scrollFn,qt===!0&&(qt=ht(e,!0)));var d=0,g=qt;do{var v=g,y=O(v),E=y.top,W=y.bottom,rt=y.left,N=y.right,G=y.width,F=y.height,Et=void 0,tt=void 0,_t=v.scrollWidth,Wt=v.scrollHeight,z=p(v),Gt=v.scrollLeft,ct=v.scrollTop;v===a?(Et=G<_t&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),tt=F<Wt&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(Et=G<_t&&(z.overflowX==="auto"||z.overflowX==="scroll"),tt=F<Wt&&(z.overflowY==="auto"||z.overflowY==="scroll"));var Kt=Et&&(Math.abs(N-n)<=s&&Gt+G<_t)-(Math.abs(rt-n)<=s&&!!Gt),st=tt&&(Math.abs(W-r)<=s&&ct+F<Wt)-(Math.abs(E-r)<=s&&!!ct);if(!D[d])for(var $t=0;$t<=d;$t++)D[$t]||(D[$t]={});(D[d].vx!=Kt||D[d].vy!=st||D[d].el!==v)&&(D[d].el=v,D[d].vx=Kt,D[d].vy=st,clearInterval(D[d].pid),(Kt!=0||st!=0)&&(h=!0,D[d].pid=setInterval((function(){i&&this.layer===0&&f.active._onTouchMove(ge);var Jt=D[this.layer].vy?D[this.layer].vy*l:0,pt=D[this.layer].vx?D[this.layer].vx*l:0;typeof c=="function"&&c.call(f.dragged.parentNode[U],pt,Jt,o,ge,D[this.layer].el)!=="continue"||Li(D[this.layer].el,pt,Jt)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&g!==a&&(g=ht(g,!1)));Ge=h}},30),Xi=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var h=i||r;l();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),h&&!h.el.contains(d)&&(s("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ti(){}ti.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=Ct(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Xi},it(ti,{pluginName:"revertOnSpill"});function ei(){}ei.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,n=i||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Xi},it(ei,{pluginName:"removeOnSpill"}),f.mount(new Jo),f.mount(ei,ti);const Qo=(o,t,e)=>{let i=[];o._sortable=f.create(o,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:n=>{const r=n.item;i=Array.prototype.slice.call(r.parentNode.childNodes),i=i.filter(s=>s.nodeType!=Node.ELEMENT_NODE||!s.classList.contains("sortable-fallback"))},onEnd:n=>{const s=n.item.parentNode;for(const a of i)s.appendChild(a);if(n.oldIndex==n.newIndex)return;const l=t.getArray().find(a=>a.ol_uid===n.item.querySelector("eox-layercontrol-layer").layer.ol_uid);t.remove(l),t.insertAt(t.getLength()-n.newIndex,l),e.requestUpdate()}})},ii=(o,t,e)=>{let i=[];const n=(r,s,l)=>{i=[...i,...r.filter(h=>h.get(s)===l)];const a=r.filter(h=>h.getLayers);return a.length>0&&a.forEach(h=>n(h.getLayers().getArray(),s,l)),i};return n(o,t,e),i},tn=(o,t)=>{var e,i,n;if(!(!o||!t))return o.getLayers?"group":(n=(e=t.getInteractions().getArray().filter(r=>r.freehand_!==void 0).map(r=>r.source_))==null?void 0:e.ol_uid)!=null&&n.includes(o.getSource?(i=o.getSource())==null?void 0:i.ol_uid:void 0)?"draw":o.declutter_!==void 0?"vector":"raster"},Yi=(o,t)=>{const e=o.get("minZoom"),i=o.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))},en=(o,t,e)=>{if(!o||!t)return!1;if(!Yi(o,e))return!0;const i=o.get("minZoom"),n=o.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<n};/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2020 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/const
|
|
44
|
+
*/const oi=Ve(class extends Re{constructor(o){if(super(o),o.type!==yt.PROPERTY&&o.type!==yt.ATTRIBUTE&&o.type!==yt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!xo(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===q||t===$)return t;const e=o.element,i=o.name;if(o.type===yt.PROPERTY){if(t===e[i])return q}else if(o.type===yt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return q}else if(o.type===yt.ATTRIBUTE&&e.getAttribute(i)===t+"")return q;return $i(o),t}});/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2017 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
-
*/class
|
|
48
|
+
*/class ni extends Re{constructor(t){if(super(t),this.et=$,t.type!==yt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===$||t==null)return this.vt=void 0,this.et=t;if(t===q)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ni.directiveName="unsafeHTML",ni.resultType=1;const on=Ve(ni);/**
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2021 Google LLC
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/function*
|
|
52
|
+
*/function*ye(o,t){if(o!==void 0){let e=0;for(const i of o)yield t(i,e++)}}class qi extends X{constructor(){super();I(this,ve,"");I(this,be,"");this.layer=null,this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var e;return _`
|
|
53
53
|
<style>
|
|
54
|
-
${
|
|
55
|
-
${!this.unstyled&&
|
|
54
|
+
${k(this,ve)}
|
|
55
|
+
${!this.unstyled&&k(this,be)}
|
|
56
56
|
</style>
|
|
57
57
|
<input
|
|
58
58
|
type="range"
|
|
59
59
|
min="0"
|
|
60
60
|
max="1"
|
|
61
61
|
step="0.01"
|
|
62
|
-
value=${
|
|
62
|
+
value=${oi((e=this.layer)==null?void 0:e.getOpacity())}
|
|
63
63
|
@input=${i=>this.layer.setOpacity(parseFloat(i.target.value))}
|
|
64
64
|
/>
|
|
65
65
|
<button
|
|
@@ -68,7 +68,7 @@ var rn=Object.defineProperty;var sn=(S,x,H)=>x in S?rn(S,x,{enumerable:!0,config
|
|
|
68
68
|
>
|
|
69
69
|
x
|
|
70
70
|
</button>
|
|
71
|
-
`}}ve=new WeakMap,
|
|
71
|
+
`}}ve=new WeakMap,be=new WeakMap,R(qi,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layerconfig",qi);class ji extends X{constructor(){super();I(this,we,`
|
|
72
72
|
.tabbed figure {
|
|
73
73
|
margin: 0;
|
|
74
74
|
}
|
|
@@ -88,7 +88,7 @@ var rn=Object.defineProperty;var sn=(S,x,H)=>x in S?rn(S,x,{enumerable:!0,config
|
|
|
88
88
|
.tabbed label.highlighted {
|
|
89
89
|
background: lightgrey;
|
|
90
90
|
}
|
|
91
|
-
`);
|
|
91
|
+
`);I(this,Ee,`
|
|
92
92
|
.tabbed {
|
|
93
93
|
font-size: small;
|
|
94
94
|
}
|
|
@@ -110,14 +110,14 @@ var rn=Object.defineProperty;var sn=(S,x,H)=>x in S?rn(S,x,{enumerable:!0,config
|
|
|
110
110
|
}
|
|
111
111
|
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return _`
|
|
112
112
|
<style>
|
|
113
|
-
${
|
|
114
|
-
${!this.unstyled&&
|
|
113
|
+
${k(this,we)}
|
|
114
|
+
${!this.unstyled&&k(this,Ee)}
|
|
115
115
|
</style>
|
|
116
116
|
<div class="tabbed">
|
|
117
117
|
${et(this.actions.length+this.tabs.length>1,()=>_`
|
|
118
118
|
<nav>
|
|
119
119
|
<div>
|
|
120
|
-
${
|
|
120
|
+
${ye(this.tabs,(e,i)=>_`
|
|
121
121
|
<label
|
|
122
122
|
class=${this.selectedTab===i&&"highlighted"}
|
|
123
123
|
@click=${()=>this.selectedTab=i}
|
|
@@ -127,7 +127,7 @@ var rn=Object.defineProperty;var sn=(S,x,H)=>x in S?rn(S,x,{enumerable:!0,config
|
|
|
127
127
|
`)}
|
|
128
128
|
</div>
|
|
129
129
|
<div>
|
|
130
|
-
${
|
|
130
|
+
${ye(this.actions,e=>_`
|
|
131
131
|
<span>
|
|
132
132
|
<slot name=${e+"-icon"}>${e}</slot>
|
|
133
133
|
</span>
|
|
@@ -136,14 +136,14 @@ var rn=Object.defineProperty;var sn=(S,x,H)=>x in S?rn(S,x,{enumerable:!0,config
|
|
|
136
136
|
</nav>
|
|
137
137
|
`)}
|
|
138
138
|
<figure>
|
|
139
|
-
${
|
|
139
|
+
${ye(this.tabs,(e,i)=>_`
|
|
140
140
|
<div class="tab ${this.selectedTab===i&&"highlighted"}">
|
|
141
141
|
<slot name=${e+"-content"}>${e}</slot>
|
|
142
142
|
</div>
|
|
143
143
|
`)}
|
|
144
144
|
</figure>
|
|
145
145
|
</div>
|
|
146
|
-
`}}
|
|
146
|
+
`}}we=new WeakMap,Ee=new WeakMap,R(ji,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",ji);const nn=`
|
|
147
147
|
button {
|
|
148
148
|
/* TODO: why does this only work here and not from :root? */
|
|
149
149
|
--primary-color: #004170;
|
|
@@ -232,7 +232,7 @@ button.small {
|
|
|
232
232
|
padding: 12.4px;
|
|
233
233
|
font-size: .75rem;
|
|
234
234
|
}
|
|
235
|
-
`,
|
|
235
|
+
`,rn=`
|
|
236
236
|
input[type=radio] {
|
|
237
237
|
appearance: none;
|
|
238
238
|
-webkit-appearance: none;
|
|
@@ -260,7 +260,7 @@ input[type=radio]:checked:after {
|
|
|
260
260
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
261
261
|
|
|
262
262
|
}
|
|
263
|
-
`,
|
|
263
|
+
`,Wi=`
|
|
264
264
|
input[type=checkbox] {
|
|
265
265
|
appearance: none;
|
|
266
266
|
-webkit-appearance: none;
|
|
@@ -283,7 +283,7 @@ input[type=checkbox]:checked:after {
|
|
|
283
283
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
284
284
|
|
|
285
285
|
}
|
|
286
|
-
`,
|
|
286
|
+
`,sn=`
|
|
287
287
|
input[type="range"] {
|
|
288
288
|
-webkit-appearance: none;
|
|
289
289
|
width: 90%;
|
|
@@ -360,22 +360,22 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
360
360
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
361
361
|
border: 0;
|
|
362
362
|
}
|
|
363
|
-
`;class
|
|
363
|
+
`;class Gi extends X{constructor(){super();R(this,"_parseActions",e=>e==null?void 0:e.filter(i=>["remove","sort"].filter(n=>{var r;return(r=this.layer)!=null&&r.get("layerControlDisable")?n!=="sort":!0}).includes(i)));R(this,"_parseTools",e=>e==null?void 0:e.filter(i=>{var r;let n=!0;return["remove","sort"].includes(i)&&(n=!1),i==="info"&&(n=this.layer.get("description")),i==="config"&&(n=(r=this.layer.style_)==null?void 0:r.color),n}));R(this,"_removeButton",_`
|
|
364
364
|
<button
|
|
365
365
|
class="remove-icon icon"
|
|
366
366
|
@click=${()=>{var e,i;(e=this.layer)==null||e.set("layerControlOptional",!0),(i=this.layer)==null||i.setVisible(!1),this.dispatchEvent(new CustomEvent("changed",{detail:this.layer,bubbles:!0}))}}
|
|
367
367
|
>
|
|
368
368
|
${this.unstyled?"x":$}
|
|
369
369
|
</button>
|
|
370
|
-
`);
|
|
370
|
+
`);R(this,"_sortButton",_`
|
|
371
371
|
<button class="sort-icon icon drag-handle">
|
|
372
372
|
${this.unstyled?"sort":$}
|
|
373
373
|
</button>
|
|
374
|
-
`);
|
|
375
|
-
${
|
|
376
|
-
${
|
|
377
|
-
${
|
|
378
|
-
${
|
|
374
|
+
`);I(this,_e,"");I(this,$e,`
|
|
375
|
+
${nn}
|
|
376
|
+
${rn}
|
|
377
|
+
${Wi}
|
|
378
|
+
${sn}
|
|
379
379
|
button.icon.drag-handle {
|
|
380
380
|
cursor: n-resize;
|
|
381
381
|
}
|
|
@@ -467,8 +467,8 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
467
467
|
}
|
|
468
468
|
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var e,i;return _`
|
|
469
469
|
<style>
|
|
470
|
-
${
|
|
471
|
-
${!this.unstyled&&
|
|
470
|
+
${k(this,_e)}
|
|
471
|
+
${!this.unstyled&&k(this,$e)}
|
|
472
472
|
</style>
|
|
473
473
|
${et(((e=this._parseActions(this.tools))==null?void 0:e.length)+((i=this._parseTools(this.tools))==null?void 0:i.length)>0,()=>{var n,r;return _`
|
|
474
474
|
${et(((n=this._parseActions(this.tools))==null?void 0:n.length)===1&&((r=this._parseTools(this.tools))==null?void 0:r.length)===0,()=>_`
|
|
@@ -495,14 +495,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
495
495
|
.tabs=${this._parseTools(this.tools)}
|
|
496
496
|
.unstyled=${this.unstyled}
|
|
497
497
|
>
|
|
498
|
-
${
|
|
498
|
+
${ye(this._parseTools(this.tools),l=>_`
|
|
499
499
|
<button slot="${l}-icon" class="icon">
|
|
500
500
|
${this.unstyled?l:$}
|
|
501
501
|
</button>
|
|
502
502
|
`)}
|
|
503
503
|
|
|
504
504
|
<div slot="info-content">
|
|
505
|
-
${
|
|
505
|
+
${on(this.layer.get("description"))}
|
|
506
506
|
</div>
|
|
507
507
|
<div slot="opacity-content">
|
|
508
508
|
<input
|
|
@@ -510,7 +510,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
510
510
|
min="0"
|
|
511
511
|
max="1"
|
|
512
512
|
step="0.01"
|
|
513
|
-
value=${
|
|
513
|
+
value=${oi((s=this.layer)==null?void 0:s.getOpacity())}
|
|
514
514
|
@input=${l=>this.layer.setOpacity(parseFloat(l.target.value))}
|
|
515
515
|
/>
|
|
516
516
|
</div>
|
|
@@ -527,11 +527,15 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
527
527
|
</details>
|
|
528
528
|
`})}
|
|
529
529
|
`})}
|
|
530
|
-
`}}
|
|
531
|
-
${
|
|
530
|
+
`}}_e=new WeakMap,$e=new WeakMap,R(Gi,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",Gi);class Ki extends X{constructor(){super();R(this,"currLayerVisibilityBasedOnZoom",!0);I(this,xe,"");I(this,Se,`
|
|
531
|
+
${Wi}
|
|
532
532
|
eox-layercontrol-layer {
|
|
533
533
|
width: 100%;
|
|
534
534
|
}
|
|
535
|
+
.layer.zoom-state-invisible {
|
|
536
|
+
background: #d2e2ee;
|
|
537
|
+
opacity: 0.3;
|
|
538
|
+
}
|
|
535
539
|
.layer {
|
|
536
540
|
width: 100%;
|
|
537
541
|
align-items: center;
|
|
@@ -564,19 +568,22 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
564
568
|
[data-type=draw] .title::before {
|
|
565
569
|
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");
|
|
566
570
|
}
|
|
567
|
-
`);this.layer=null,this.titleProperty="title",this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return _`
|
|
571
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}updateLayerZoomVisibility(){const e=en(this.layer,this.map,this.showLayerZoomState);let i=!1;!e&&this.currLayerVisibilityBasedOnZoom?(this.currLayerVisibilityBasedOnZoom=!1,i=!0):e&&!this.currLayerVisibilityBasedOnZoom&&(this.currLayerVisibilityBasedOnZoom=!0,i=!0),i&&(this.requestUpdate(),this.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))}firstUpdated(){Yi(this.layer,this.showLayerZoomState)&&(this.updateLayerZoomVisibility(),this.map.getView().on("change:resolution",()=>this.updateLayerZoomVisibility()))}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return _`
|
|
568
572
|
<style>
|
|
569
|
-
${
|
|
570
|
-
${!this.unstyled&&
|
|
573
|
+
${k(this,xe)}
|
|
574
|
+
${!this.unstyled&&k(this,Se)}
|
|
571
575
|
</style>
|
|
572
576
|
${et(this.layer,()=>{var e;return _`
|
|
573
|
-
<div
|
|
577
|
+
<div
|
|
578
|
+
class="layer ${this.layer.getVisible()?"visible":""}
|
|
579
|
+
${this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible"}"
|
|
580
|
+
>
|
|
574
581
|
<label
|
|
575
582
|
class="${this.layer.get("layerControlDisable")?"disabled":""}"
|
|
576
583
|
>
|
|
577
584
|
<input
|
|
578
585
|
type=${this.layer.get("layerControlExclusive")?"radio":"checkbox"}
|
|
579
|
-
.checked=${
|
|
586
|
+
.checked=${oi(this.layer.getVisible())}
|
|
580
587
|
@click=${i=>{this.layer.setVisible(i.target.checked),i.target.checked&&this.layer.get("layerControlExclusive")&&this.parentNode.parentNode.querySelectorAll("li > eox-layercontrol-layer").forEach(r=>{var s;r.layer!==this.layer&&((s=r.layer)!=null&&s.get("layerControlExclusive"))&&(r.layer.setVisible(!1),r.requestUpdate())}),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.requestUpdate()}}
|
|
581
588
|
/>
|
|
582
589
|
<span class="title">${this.layer.get(this.titleProperty)}</span>
|
|
@@ -590,7 +597,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
590
597
|
.unstyled=${this.unstyled}
|
|
591
598
|
></eox-layercontrol-layer-tools>
|
|
592
599
|
`})}
|
|
593
|
-
`}}
|
|
600
|
+
`}}xe=new WeakMap,Se=new WeakMap,R(Ki,"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}}),customElements.define("eox-layercontrol-layer",Ki);class Ji extends X{constructor(){super();I(this,Ae,"");I(this,Ce,`
|
|
594
601
|
details summary {
|
|
595
602
|
cursor: pointer;
|
|
596
603
|
display: flex;
|
|
@@ -611,10 +618,10 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
611
618
|
details[open] > summary:before {
|
|
612
619
|
transform: rotate(90deg);
|
|
613
620
|
}
|
|
614
|
-
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return _`
|
|
621
|
+
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return _`
|
|
615
622
|
<style>
|
|
616
|
-
${
|
|
617
|
-
${!this.unstyled&&
|
|
623
|
+
${k(this,Ae)}
|
|
624
|
+
${!this.unstyled&&k(this,Ce)}
|
|
618
625
|
</style>
|
|
619
626
|
${et(this.group,()=>_`
|
|
620
627
|
<details open=${this.group.get("layerControlExpand")||$}>
|
|
@@ -622,7 +629,9 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
622
629
|
<eox-layercontrol-layer
|
|
623
630
|
.noShadow=${!0}
|
|
624
631
|
.layer=${this.group}
|
|
632
|
+
.map=${this.map}
|
|
625
633
|
.titleProperty=${this.titleProperty}
|
|
634
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
626
635
|
.tools=${this.tools}
|
|
627
636
|
.unstyled=${this.unstyled}
|
|
628
637
|
@changed=${()=>this.requestUpdate()}
|
|
@@ -634,13 +643,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
634
643
|
.layers=${this.group.getLayers()}
|
|
635
644
|
.map=${this.map}
|
|
636
645
|
.titleProperty=${this.titleProperty}
|
|
646
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
637
647
|
.tools=${this.tools}
|
|
638
648
|
.unstyled=${this.unstyled}
|
|
639
649
|
@changed=${()=>this.requestUpdate()}
|
|
640
650
|
></eox-layercontrol-layer-list>
|
|
641
651
|
</details>
|
|
642
652
|
`)}
|
|
643
|
-
`}}Ae=new WeakMap,Ce=new WeakMap,
|
|
653
|
+
`}}Ae=new WeakMap,Ce=new WeakMap,R(Ji,"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}}),customElements.define("eox-layercontrol-layer-group",Ji);class Qi extends X{constructor(){super();I(this,Te,"");I(this,De,`
|
|
644
654
|
ul {
|
|
645
655
|
padding: 0;
|
|
646
656
|
}
|
|
@@ -667,17 +677,17 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
667
677
|
}
|
|
668
678
|
li.sortable-ghost {
|
|
669
679
|
}
|
|
670
|
-
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.unstyled=!1,this.noShadow=!0}updated(){this.layers&&(this.layers.on("change:length",()=>{this.requestUpdate(),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))}),
|
|
680
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!0}updated(){this.layers&&(this.layers.on("change:length",()=>{this.requestUpdate(),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))}),Qo(this.renderRoot.querySelector("ul"),this.layers,this))}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return _`
|
|
671
681
|
<style>
|
|
672
|
-
${
|
|
673
|
-
${!this.unstyled&&
|
|
682
|
+
${k(this,Te)}
|
|
683
|
+
${!this.unstyled&&k(this,De)}
|
|
674
684
|
</style>
|
|
675
685
|
<ul>
|
|
676
686
|
${et(this.layers,()=>_`
|
|
677
|
-
${this.layers.getArray().filter(e=>!e.get("layerControlHide")&&!e.get("layerControlOptional")).reverse().map(e
|
|
687
|
+
${this.layers.getArray().filter(e=>!e.get("layerControlHide")&&!e.get("layerControlOptional")).reverse().map(e=>Ao(e.get(this.idProperty),_`
|
|
678
688
|
<li
|
|
679
689
|
data-layer="${e.get(this.idProperty)}"
|
|
680
|
-
data-type="${
|
|
690
|
+
data-type="${tn(e,this.map)}"
|
|
681
691
|
>
|
|
682
692
|
${e.getLayers?_`
|
|
683
693
|
<eox-layercontrol-layer-group
|
|
@@ -686,6 +696,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
686
696
|
.idProperty=${this.idProperty}
|
|
687
697
|
.map=${this.map}
|
|
688
698
|
.titleProperty=${this.titleProperty}
|
|
699
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
689
700
|
.tools=${this.tools}
|
|
690
701
|
.unstyled=${this.unstyled}
|
|
691
702
|
@changed=${()=>this.requestUpdate()}
|
|
@@ -695,7 +706,9 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
695
706
|
<eox-layercontrol-layer
|
|
696
707
|
.noShadow=${!0}
|
|
697
708
|
.layer=${e}
|
|
709
|
+
.map=${this.map}
|
|
698
710
|
.titleProperty=${this.titleProperty}
|
|
711
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
699
712
|
.tools=${this.tools}
|
|
700
713
|
.unstyled=${this.unstyled}
|
|
701
714
|
@changed=${()=>{this.requestUpdate()}}
|
|
@@ -705,14 +718,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
705
718
|
`))}
|
|
706
719
|
`)}
|
|
707
720
|
</ul>
|
|
708
|
-
`}}
|
|
721
|
+
`}}Te=new WeakMap,De=new WeakMap,R(Qi,"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}}),customElements.define("eox-layercontrol-layer-list",Qi);class to extends X{constructor(){super(),this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return _`
|
|
709
722
|
<label for="optional">Optional layers</label>
|
|
710
723
|
|
|
711
724
|
<select name="optional" data-cy="optionalLayers">
|
|
712
725
|
<option disabled selected value>
|
|
713
726
|
-- select an optional layer to add --
|
|
714
727
|
</option>
|
|
715
|
-
${
|
|
728
|
+
${ii(this.layers.getArray(),"layerControlOptional",!0).map(t=>_`
|
|
716
729
|
<option
|
|
717
730
|
value="${t.get(this.idProperty)||t.ol_uid}"
|
|
718
731
|
>
|
|
@@ -721,18 +734,18 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
721
734
|
`)}
|
|
722
735
|
</select>
|
|
723
736
|
<button
|
|
724
|
-
@click="${()=>{const t=
|
|
737
|
+
@click="${()=>{const t=ii(this.layers.getArray(),"layerControlOptional",!0).find(e=>(e.get(this.idProperty)||e.ol_uid)===this.querySelector("select[name=optional]").value);t==null||t.set("layerControlOptional",!1),t==null||t.setVisible(!0),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(e=>e.requestUpdate()),this.requestUpdate()}}"
|
|
725
738
|
>
|
|
726
739
|
add
|
|
727
740
|
</button>
|
|
728
|
-
`}}
|
|
741
|
+
`}}R(to,"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",to);class ri extends X{constructor(){super();I(this,Oe,"");I(this,Pe,`
|
|
729
742
|
* {
|
|
730
743
|
font-family: Roboto, sans-serif;
|
|
731
744
|
}
|
|
732
|
-
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.tools=["info","opacity","remove","sort"],this.unstyled=!1,this.styleOverride=""}updated(){const e=document.querySelector(this.for);e&&(this.map=e.map)}render(){var e;return _`
|
|
745
|
+
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","remove","sort"],this.unstyled=!1,this.styleOverride=""}updated(){const e=document.querySelector(this.for);e&&(this.map=e.map)}render(){var e;return _`
|
|
733
746
|
<style>
|
|
734
|
-
${
|
|
735
|
-
${!this.unstyled&&
|
|
747
|
+
${k(this,Oe)}
|
|
748
|
+
${!this.unstyled&&k(this,Pe)}
|
|
736
749
|
${this.styleOverride}
|
|
737
750
|
</style>
|
|
738
751
|
${et(this.map,()=>_`
|
|
@@ -743,12 +756,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
743
756
|
.layers=${this.map.getLayers()}
|
|
744
757
|
.map=${this.map}
|
|
745
758
|
.titleProperty=${this.titleProperty}
|
|
759
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
746
760
|
.tools=${this.tools}
|
|
747
761
|
.unstyled=${this.unstyled}
|
|
748
|
-
@changed=${()
|
|
762
|
+
@changed=${i=>{if(this.requestUpdate(),i.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const n=this.renderRoot.querySelector("eox-layercontrol-optional-list");n==null||n.requestUpdate()}}}
|
|
749
763
|
></eox-layercontrol-layer-list>
|
|
750
764
|
`)}
|
|
751
|
-
${et(this.map&&((e=
|
|
765
|
+
${et(this.map&&((e=ii(this.map.getLayers().getArray(),"layerControlOptional",!0))==null?void 0:e.length)>0,()=>_`
|
|
752
766
|
<eox-layercontrol-optional-list
|
|
753
767
|
.noShadow=${!0}
|
|
754
768
|
.idProperty=${this.idProperty}
|
|
@@ -757,4 +771,4 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
757
771
|
@changed=${()=>this.requestUpdate()}
|
|
758
772
|
></eox-layercontrol-optional-list>
|
|
759
773
|
`)}
|
|
760
|
-
`}}
|
|
774
|
+
`}}Oe=new WeakMap,Pe=new WeakMap,R(ri,"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},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",ri),C.EOxLayerControl=ri,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|