@eox/layercontrol 0.3.1 → 0.5.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 +1028 -783
- package/dist/eox-layercontrol.umd.cjs +139 -79
- package/package.json +1 -1
|
@@ -1,51 +1,63 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(b,q){typeof exports=="object"&&typeof module<"u"?q(exports):typeof define=="function"&&define.amd?define(["exports"],q):(b=typeof globalThis<"u"?globalThis:b||self,q(b["eox-layercontrol"]={}))})(this,function(b){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const q=window,it=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ot=Symbol(),xt=new WeakMap;let Nn=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(it&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=xt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&xt.set(t,e))}return e}toString(){return this.cssText}};const Mn=i=>new Nn(typeof i=="string"?i:i+"",void 0,Ot),Hn=(i,e)=>{it?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),r=q.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=t.cssText,i.appendChild(n)})},Lt=it?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Mn(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var rt;const Re=window,Pt=Re.trustedTypes,Bn=Pt?Pt.emptyScript:"",It=Re.reactiveElementPolyfillSupport,ot={toAttribute(i,e){switch(e){case Boolean:i=i?Bn:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Nt=(i,e)=>e!==i&&(e==e||i==i),at={attribute:!0,type:String,converter:ot,reflect:!1,hasChanged:Nt},st="finalized";let ue=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const r=this._$Ep(n,t);r!==void 0&&(this._$Ev.set(r,n),e.push(r))}),e}static createProperty(e,t=at){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){const o=this[e];this[t]=r,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||at}static finalize(){if(this.hasOwnProperty(st))return!1;this[st]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of n)this.createProperty(r,t[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const r of n)t.unshift(Lt(r))}else e!==void 0&&t.push(Lt(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Hn(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=at){var r;const o=this.constructor._$Ep(e,n);if(o!==void 0&&n.reflect===!0){const a=(((r=n.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?n.converter:ot).toAttribute(t,n.type);this._$El=e,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null}}_$AK(e,t){var n;const r=this.constructor,o=r._$Ev.get(e);if(o!==void 0&&this._$El!==o){const a=r.getPropertyOptions(o),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?a.converter:ot;this._$El=o,this[o]=l.fromAttribute(t,a.type),this._$El=null}}requestUpdate(e,t,n){let r=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Nt)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(n)):this._$Ek()}catch(r){throw t=!1,this._$Ek(),r}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var r;return(r=n.hostUpdated)===null||r===void 0?void 0:r.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};ue[st]=!0,ue.elementProperties=new Map,ue.elementStyles=[],ue.shadowRootOptions={mode:"open"},It==null||It({ReactiveElement:ue}),((rt=Re.reactiveElementVersions)!==null&&rt!==void 0?rt:Re.reactiveElementVersions=[]).push("1.6.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var lt;const ke=window,ce=ke.trustedTypes,Mt=ce?ce.createPolicy("lit-html",{createHTML:i=>i}):void 0,Ue="$lit$",Y=`lit$${(Math.random()+"").slice(9)}$`,dt="?"+Y,Rn=`<${dt}>`,te=document,$e=()=>te.createComment(""),we=i=>i===null||typeof i!="object"&&typeof i!="function",Ht=Array.isArray,Bt=i=>Ht(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",ht=`[
|
|
14
|
+
\f\r]`,Ae=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,kt=/>/g,ne=RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ut=/'/g,Vt=/"/g,jt=/^(?:script|style|textarea|title)$/i,kn=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),I=kn(1),V=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),Ft=new WeakMap,ie=te.createTreeWalker(te,129,null,!1),zt=(i,e)=>{const t=i.length-1,n=[];let r,o=e===2?"<svg>":"",a=Ae;for(let s=0;s<t;s++){const d=i[s];let c,u,f=-1,m=0;for(;m<d.length&&(a.lastIndex=m,u=a.exec(d),u!==null);)m=a.lastIndex,a===Ae?u[1]==="!--"?a=Rt:u[1]!==void 0?a=kt:u[2]!==void 0?(jt.test(u[2])&&(r=RegExp("</"+u[2],"g")),a=ne):u[3]!==void 0&&(a=ne):a===ne?u[0]===">"?(a=r??Ae,f=-1):u[1]===void 0?f=-2:(f=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?ne:u[3]==='"'?Vt:Ut):a===Vt||a===Ut?a=ne:a===Rt||a===kt?a=Ae:(a=ne,r=void 0);const p=a===ne&&i[s+1].startsWith("/>")?" ":"";o+=a===Ae?d+Rn:f>=0?(n.push(c),d.slice(0,f)+Ue+d.slice(f)+Y+p):d+Y+(f===-2?(n.push(void 0),s):p)}const l=o+(i[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Mt!==void 0?Mt.createHTML(l):l,n]};class Se{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let o=0,a=0;const l=e.length-1,s=this.parts,[d,c]=zt(e,t);if(this.el=Se.createElement(d,n),ie.currentNode=this.el.content,t===2){const u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(r=ie.nextNode())!==null&&s.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const u=[];for(const f of r.getAttributeNames())if(f.endsWith(Ue)||f.startsWith(Y)){const m=c[a++];if(u.push(f),m!==void 0){const p=r.getAttribute(m.toLowerCase()+Ue).split(Y),v=/([.?@])?(.*)/.exec(m);s.push({type:1,index:o,name:v[2],strings:p,ctor:v[1]==="."?Yt:v[1]==="?"?Wt:v[1]==="@"?Gt:De})}else s.push({type:6,index:o})}for(const f of u)r.removeAttribute(f)}if(jt.test(r.tagName)){const u=r.textContent.split(Y),f=u.length-1;if(f>0){r.textContent=ce?ce.emptyScript:"";for(let m=0;m<f;m++)r.append(u[m],$e()),ie.nextNode(),s.push({type:2,index:++o});r.append(u[f],$e())}}}else if(r.nodeType===8)if(r.data===dt)s.push({type:2,index:o});else{let u=-1;for(;(u=r.data.indexOf(Y,u+1))!==-1;)s.push({type:7,index:o}),u+=Y.length-1}o++}}static createElement(e,t){const n=te.createElement("template");return n.innerHTML=e,n}}function re(i,e,t=i,n){var r,o,a,l;if(e===V)return e;let s=n!==void 0?(r=t._$Co)===null||r===void 0?void 0:r[n]:t._$Cl;const d=we(e)?void 0:e._$litDirective$;return(s==null?void 0:s.constructor)!==d&&((o=s==null?void 0:s._$AO)===null||o===void 0||o.call(s,!1),d===void 0?s=void 0:(s=new d(i),s._$AT(i,t,n)),n!==void 0?((a=(l=t)._$Co)!==null&&a!==void 0?a:l._$Co=[])[n]=s:t._$Cl=s),s!==void 0&&(e=re(i,s._$AS(i,e.values),s,n)),e}class Xt{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:r}=this._$AD,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:te).importNode(n,!0);ie.currentNode=o;let a=ie.nextNode(),l=0,s=0,d=r[0];for(;d!==void 0;){if(l===d.index){let c;d.type===2?c=new fe(a,a.nextSibling,this,e):d.type===1?c=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(c=new qt(a,this,e)),this._$AV.push(c),d=r[++s]}l!==(d==null?void 0:d.index)&&(a=ie.nextNode(),l++)}return ie.currentNode=te,o}v(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class fe{constructor(e,t,n,r){var o;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cp=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=re(this,e,t),we(e)?e===C||e==null||e===""?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==V&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Bt(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==C&&we(this._$AH)?this._$AA.nextSibling.data=e:this.$(te.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Se.createElement(r.h,this.options)),r);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===o)this._$AH.v(n);else{const a=new Xt(o,this),l=a.u(this.options);a.v(n),this.$(l),this._$AH=a}}_$AC(e){let t=Ft.get(e.strings);return t===void 0&&Ft.set(e.strings,t=new Se(e)),t}T(e){Ht(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const o of e)r===t.length?t.push(n=new fe(this.k($e()),this.k($e()),this,this.options)):n=t[r],n._$AI(o),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class De{constructor(e,t,n,r,o){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,r){const o=this.strings;let a=!1;if(o===void 0)e=re(this,e,t,0),a=!we(e)||e!==this._$AH&&e!==V,a&&(this._$AH=e);else{const l=e;let s,d;for(e=o[0],s=0;s<o.length-1;s++)d=re(this,l[n+s],t,s),d===V&&(d=this._$AH[s]),a||(a=!we(d)||d!==this._$AH[s]),d===C?e=C:e!==C&&(e+=(d??"")+o[s+1]),this._$AH[s]=d}a&&!r&&this.j(e)}j(e){e===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Yt extends De{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===C?void 0:e}}const Un=ce?ce.emptyScript:"";class Wt extends De{constructor(){super(...arguments),this.type=4}j(e){e&&e!==C?this.element.setAttribute(this.name,Un):this.element.removeAttribute(this.name)}}class Gt extends De{constructor(e,t,n,r,o){super(e,t,n,r,o),this.type=5}_$AI(e,t=this){var n;if((e=(n=re(this,e,t,0))!==null&&n!==void 0?n:C)===V)return;const r=this._$AH,o=e===C&&r!==C||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,a=e!==C&&(r===C||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}}class qt{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){re(this,e)}}const Vn={O:Ue,P:Y,A:dt,C:1,M:zt,L:Xt,D:Bt,R:re,I:fe,V:De,H:Wt,N:Gt,U:Yt,F:qt},Zt=ke.litHtmlPolyfillSupport;Zt==null||Zt(Se,fe),((lt=ke.litHtmlVersions)!==null&<!==void 0?lt:ke.litHtmlVersions=[]).push("2.7.4");const jn=(i,e,t)=>{var n,r;const o=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let a=o._$litPart$;if(a===void 0){const l=(r=t==null?void 0:t.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=a=new fe(e.insertBefore($e(),l),l,void 0,t??{})}return a._$AI(i),a};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
19
|
+
*/var ut,ct;let pe=class extends ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=jn(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return V}};pe.finalized=!0,pe._$litElement$=!0,(ut=globalThis.litElementHydrateSupport)===null||ut===void 0||ut.call(globalThis,{LitElement:pe});const Kt=globalThis.litElementPolyfillSupport;Kt==null||Kt({LitElement:pe}),((ct=globalThis.litElementVersions)!==null&&ct!==void 0?ct:globalThis.litElementVersions=[]).push("3.3.2");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const Qt=i=>e=>typeof e=="function"?((t,n)=>(customElements.define(t,n),n))(i,e):((t,n)=>{const{kind:r,elements:o}=n;return{kind:r,elements:o,finisher(a){customElements.define(t,a)}}})(i,e);/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const Fn=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},zn=(i,e,t)=>{e.constructor.createProperty(t,i)};function H(i){return(e,t)=>t!==void 0?zn(i,e,t):Fn(i,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function
|
|
31
|
+
*/function ge(i){return H({...i,state:!0})}/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/var
|
|
35
|
+
*/var ft;((ft=window.HTMLSlotElement)===null||ft===void 0?void 0:ft.prototype.assignedElements)!=null;/**
|
|
36
36
|
* @license
|
|
37
|
-
* Copyright
|
|
37
|
+
* Copyright 2017 Google LLC
|
|
38
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
+
*/const oe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Jt=i=>(...e)=>({_$litDirective$:i,values:e});class en{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
|
|
40
|
+
* @license
|
|
41
|
+
* Copyright 2020 Google LLC
|
|
38
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/
|
|
43
|
+
*/const{I:Xn}=Vn,Yn=i=>i.strings===void 0,tn=()=>document.createComment(""),Te=(i,e,t)=>{var n;const r=i._$AA.parentNode,o=e===void 0?i._$AB:e._$AA;if(t===void 0){const a=r.insertBefore(tn(),o),l=r.insertBefore(tn(),o);t=new Xn(a,l,i,i.options)}else{const a=t._$AB.nextSibling,l=t._$AM,s=l!==i;if(s){let d;(n=t._$AQ)===null||n===void 0||n.call(t,i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==l._$AU&&t._$AP(d)}if(a!==o||s){let d=t._$AA;for(;d!==a;){const c=d.nextSibling;r.insertBefore(d,o),d=c}}}return t},ae=(i,e,t=i)=>(i._$AI(e,t),i),Wn={},nn=(i,e=Wn)=>i._$AH=e,Gn=i=>i._$AH,pt=i=>{var e;(e=i._$AP)===null||e===void 0||e.call(i,!1,!0);let t=i._$AA;const n=i._$AB.nextSibling;for(;t!==n;){const r=t.nextSibling;t.remove(),t=r}};/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2017 Google LLC
|
|
46
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
+
*/const rn=(i,e,t)=>{const n=new Map;for(let r=e;r<=t;r++)n.set(i[r],r);return n},gt=Jt(class extends en{constructor(i){if(super(i),i.type!==oe.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let n;t===void 0?t=e:e!==void 0&&(n=e);const r=[],o=[];let a=0;for(const l of i)r[a]=n?n(l,a):a,o[a]=t(l,a),a++;return{values:o,keys:r}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,n]){var r;const o=Gn(i),{values:a,keys:l}=this.dt(e,t,n);if(!Array.isArray(o))return this.ht=l,a;const s=(r=this.ht)!==null&&r!==void 0?r:this.ht=[],d=[];let c,u,f=0,m=o.length-1,p=0,v=a.length-1;for(;f<=m&&p<=v;)if(o[f]===null)f++;else if(o[m]===null)m--;else if(s[f]===l[p])d[p]=ae(o[f],a[p]),f++,p++;else if(s[m]===l[v])d[v]=ae(o[m],a[v]),m--,v--;else if(s[f]===l[v])d[v]=ae(o[f],a[v]),Te(i,d[v+1],o[f]),f++,v--;else if(s[m]===l[p])d[p]=ae(o[m],a[p]),Te(i,o[f],o[m]),m--,p++;else if(c===void 0&&(c=rn(l,p,v),u=rn(s,f,m)),c.has(s[f]))if(c.has(s[m])){const T=u.get(l[p]),F=T!==void 0?o[T]:null;if(F===null){const P=Te(i,o[f]);ae(P,a[p]),d[p]=P}else d[p]=ae(F,a[p]),Te(i,o[f],F),o[T]=null;p++}else pt(o[m]),m--;else pt(o[f]),f++;for(;p<=v;){const T=Te(i,d[v+1]);ae(T,a[p]),d[p++]=T}for(;f<=m;){const T=o[f++];T!==null&&pt(T)}return this.ht=l,nn(i,d),V}});/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright 2020 Google LLC
|
|
50
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
+
*/const mt=Jt(class extends en{constructor(i){if(super(i),i.type!==oe.PROPERTY&&i.type!==oe.ATTRIBUTE&&i.type!==oe.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Yn(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===V||e===C)return e;const t=i.element,n=i.name;if(i.type===oe.PROPERTY){if(e===t[n])return V}else if(i.type===oe.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(n))return V}else if(i.type===oe.ATTRIBUTE&&t.getAttribute(n)===e+"")return V;return nn(i),e}});/**
|
|
40
52
|
* @license
|
|
41
53
|
* Copyright 2021 Google LLC
|
|
42
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/function
|
|
55
|
+
*/function on(i,e,t){return i?e():t==null?void 0:t()}/**!
|
|
44
56
|
* Sortable 1.15.0
|
|
45
57
|
* @author RubaXa <trash@rubaxa.org>
|
|
46
58
|
* @author owenm <owen23355@gmail.com>
|
|
47
59
|
* @license MIT
|
|
48
|
-
*/function zt(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),t.push.apply(t,n)}return t}function z(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?zt(Object(t),!0).forEach(function(n){Mn(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):zt(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function Be(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Be=function(e){return typeof e}:Be=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(i)}function Mn(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Z(){return Z=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Z.apply(this,arguments)}function Hn(i,e){if(i==null)return{};var t={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(e.indexOf(o)>=0)&&(t[o]=i[o]);return t}function kn(i,e){if(i==null)return{};var t=Hn(i,e),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(t[n]=i[n])}return t}var Rn="1.15.0";function W(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var K=W(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ue=W(/Edge/i),Ft=W(/firefox/i),Ve=W(/safari/i)&&!W(/chrome/i)&&!W(/android/i),Xt=W(/iP(ad|od|hone)/i),Wt=W(/chrome/i)&&W(/android/i),Yt={capture:!1,passive:!1};function C(i,e,t){i.addEventListener(e,t,!K&&Yt)}function E(i,e,t){i.removeEventListener(e,t,!K&&Yt)}function je(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function Bn(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function F(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&je(i,e):je(i,e))||n&&i===t)return i;if(i===t)break}while(i=Bn(i))}return null}var Gt=/\s+/g;function k(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(Gt," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(Gt," ")}}function p(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ge(i,e){var t="";if(typeof i=="string")t=i;else do{var n=p(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function qt(i,e,t){if(i){var n=i.getElementsByTagName(e),o=0,r=n.length;if(t)for(;o<r;o++)t(n[o],o);return n}return[]}function J(){var i=document.scrollingElement;return i||document.documentElement}function T(i,e,t,n,o){if(!(!i.getBoundingClientRect&&i!==window)){var r,a,l,s,d,c,u;if(i!==window&&i.parentNode&&i!==J()?(r=i.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,d=r.right,c=r.height,u=r.width):(a=0,l=0,s=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(e||t)&&i!==window&&(o=o||i.parentNode,!K))do if(o&&o.getBoundingClientRect&&(p(o,"transform")!=="none"||t&&p(o,"position")!=="static")){var f=o.getBoundingClientRect();a-=f.top+parseInt(p(o,"border-top-width")),l-=f.left+parseInt(p(o,"border-left-width")),s=a+r.height,d=l+r.width;break}while(o=o.parentNode);if(n&&i!==window){var b=ge(o||i),_=b&&b.a,y=b&&b.d;b&&(a/=y,l/=_,u/=_,c/=y,s=a+c,d=l+u)}return{top:a,left:l,bottom:s,right:d,width:u,height:c}}}function Zt(i,e,t){for(var n=Jt(i,!0),o=T(i)[e];n;){var r=T(n)[t],a=void 0;if(t==="top"||t==="left"?a=o>=r:a=o<=r,!a)return n;if(n===J())break;n=Jt(n,!1)}return!1}function me(i,e,t,n){for(var o=0,r=0,a=i.children;r<a.length;){if(a[r].style.display!=="none"&&a[r]!==g.ghost&&(n||a[r]!==g.dragged)&&F(a[r],t.draggable,i,!1)){if(o===e)return a[r];o++}r++}return null}function ct(i,e){for(var t=i.lastElementChild;t&&(t===g.ghost||p(t,"display")==="none"||e&&!je(t,e));)t=t.previousElementSibling;return t||null}function U(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==g.clone&&(!e||je(i,e))&&t++;return t}function Kt(i){var e=0,t=0,n=J();if(i)do{var o=ge(i),r=o.a,a=o.d;e+=i.scrollLeft*r,t+=i.scrollTop*a}while(i!==n&&(i=i.parentNode));return[e,t]}function Un(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===i[t][n])return Number(t)}return-1}function Jt(i,e){if(!i||!i.getBoundingClientRect)return J();var t=i,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=p(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return J();if(n||e)return t;n=!0}}while(t=t.parentNode);return J()}function Vn(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function ft(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var pt;function jn(i,e){return function(){if(!pt){var t=arguments,n=this;t.length===1?i.call(n,t[0]):i.apply(n,t),pt=setTimeout(function(){pt=void 0},e)}}}function zn(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function Qt(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}var V="Sortable"+new Date().getTime();function Fn(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(p(o,"display")==="none"||o===g.ghost)){i.push({target:o,rect:T(o)});var r=z({},i[i.length-1].rect);if(o.thisAnimationDuration){var a=ge(o,!0);a&&(r.top-=a.f,r.left-=a.e)}o.fromRect=r}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(Un(i,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var r=!1,a=0;i.forEach(function(l){var s=0,d=l.target,c=d.fromRect,u=T(d),f=d.prevFromRect,b=d.prevToRect,_=l.rect,y=ge(d,!0);y&&(u.top-=y.f,u.left-=y.e),d.toRect=u,d.thisAnimationDuration&&ft(f,u)&&!ft(c,u)&&(_.top-u.top)/(_.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=Wn(_,f,b,o.options)),ft(u,c)||(d.prevFromRect=c,d.prevToRect=u,s||(s=o.options.animation),o.animate(d,_,u,s)),s&&(r=!0,a=Math.max(a,s),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},s),d.thisAnimationDuration=s)}),clearTimeout(e),r?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),i=[]},animate:function(n,o,r,a){if(a){p(n,"transition",""),p(n,"transform","");var l=ge(this.el),s=l&&l.a,d=l&&l.d,c=(o.left-r.left)/(s||1),u=(o.top-r.top)/(d||1);n.animatingX=!!c,n.animatingY=!!u,p(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=Xn(n),p(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),p(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){p(n,"transition",""),p(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function Xn(i){return i.offsetWidth}function Wn(i,e,t,n){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var ve=[],gt={initializeByDefault:!0},De={mount:function(e){for(var t in gt)gt.hasOwnProperty(t)&&!(t in e)&&(e[t]=gt[t]);ve.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),ve.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";ve.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][r]&&t[a.pluginName][r](z({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](z({sortable:t},n)))})},initializePlugins:function(e,t,n,o){ve.forEach(function(l){var s=l.pluginName;if(!(!e.options[s]&&!l.initializeByDefault)){var d=new l(e,t,e.options);d.sortable=e,d.options=e.options,e[s]=d,Z(n,d.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);typeof a<"u"&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return ve.forEach(function(o){typeof o.eventProperties=="function"&&Z(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return ve.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]=="function"&&(o=r.optionListeners[t].call(e[r.pluginName],n))}),o}};function Yn(i){var e=i.sortable,t=i.rootEl,n=i.name,o=i.targetEl,r=i.cloneEl,a=i.toEl,l=i.fromEl,s=i.oldIndex,d=i.newIndex,c=i.oldDraggableIndex,u=i.newDraggableIndex,f=i.originalEvent,b=i.putSortable,_=i.extraEventProperties;if(e=e||t&&t[V],!!e){var y,Y=e.options,se="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!K&&!Ue?y=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(n,!0,!0)),y.to=a||t,y.from=l||t,y.item=o||t,y.clone=r,y.oldIndex=s,y.newIndex=d,y.oldDraggableIndex=c,y.newDraggableIndex=u,y.originalEvent=f,y.pullMode=b?b.lastPutMode:void 0;var B=z(z({},_),De.getEventProperties(n,e));for(var le in B)y[le]=B[le];t&&t.dispatchEvent(y),Y[se]&&Y[se].call(e,y)}}var Gn=["evt"],N=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,r=kn(n,Gn);De.pluginEvent.bind(g)(e,t,z({dragEl:h,parentEl:A,ghostEl:m,rootEl:w,nextEl:oe,lastDownEl:ze,cloneEl:S,cloneHidden:Q,dragStarted:Te,putSortable:x,activeSortable:g.active,originalEvent:o,oldIndex:ye,oldDraggableIndex:Oe,newIndex:R,newDraggableIndex:ee,hideGhostForTarget:sn,unhideGhostForTarget:ln,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(l){L({sortable:t,name:l,originalEvent:o})}},r))};function L(i){Yn(z({putSortable:x,cloneEl:S,targetEl:h,rootEl:w,oldIndex:ye,oldDraggableIndex:Oe,newIndex:R,newDraggableIndex:ee},i))}var h,A,m,w,oe,ze,S,Q,ye,R,Oe,ee,Fe,x,_e=!1,Xe=!1,We=[],re,j,mt,vt,en,tn,Te,be,xe,Pe=!1,Ye=!1,Ge,I,yt=[],_t=!1,qe=[],Ze=typeof document<"u",Ke=Xt,nn=Ue||K?"cssFloat":"float",qn=Ze&&!Wt&&!Xt&&"draggable"in document.createElement("div"),on=function(){if(Ze){if(K)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),rn=function(e,t){var n=p(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=me(e,0,t),a=me(e,1,t),l=r&&p(r),s=a&&p(a),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=o&&n[nn]==="none"||a&&n[nn]==="none"&&d+c>o)?"vertical":"horizontal"},Zn=function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,a=n?e.width:e.height,l=n?t.left:t.top,s=n?t.right:t.bottom,d=n?t.width:t.height;return o===l||r===s||o+a/2===l+d/2},Kn=function(e,t){var n;return We.some(function(o){var r=o[V].options.emptyInsertThreshold;if(!(!r||ct(o))){var a=T(o),l=e>=a.left-r&&e<=a.right+r,s=t>=a.top-r&&t<=a.bottom+r;if(l&&s)return n=o}}),n},an=function(e){function t(r,a){return function(l,s,d,c){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||u))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return t(r(l,s,d,c),a)(l,s,d,c);var f=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===f||r.join&&r.indexOf(f)>-1}}var n={},o=e.group;(!o||Be(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},sn=function(){!on&&m&&p(m,"display","none")},ln=function(){!on&&m&&p(m,"display","")};Ze&&!Wt&&document.addEventListener("click",function(i){if(Xe)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Xe=!1,!1},!0);var ae=function(e){if(h){e=e.touches?e.touches[0]:e;var t=Kn(e.clientX,e.clientY);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[V]._onDragOver(n)}}},Jn=function(e){h&&h.parentNode[V]._isOutsideThisEl(e.target)};function g(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=Z({},e),i[V]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return rn(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.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&&!Ve,emptyInsertThreshold:5};De.initializePlugins(this,i,t);for(var n in t)!(n in e)&&(e[n]=t[n]);an(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:qn,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?C(i,"pointerdown",this._onTapStart):(C(i,"mousedown",this._onTapStart),C(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(i,"dragover",this),C(i,"dragenter",this)),We.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Z(this,Fn())}g.prototype={constructor:g,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(be=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,h):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;if(ai(n),!h&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ve&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=F(s,o.draggable,n,!1),!(s&&s.animated)&&ze!==s)){if(ye=U(s),Oe=U(s,o.draggable),typeof c=="function"){if(c.call(this,e,s,this)){L({sortable:t,rootEl:d,name:"filter",targetEl:s,toEl:n,fromEl:n}),N("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=F(d,u.trim(),n,!1),u)return L({sortable:t,rootEl:u,name:"filter",targetEl:s,fromEl:n,toEl:n}),N("filter",t,{evt:e}),!0}),c)){r&&e.cancelable&&e.preventDefault();return}o.handle&&!F(d,o.handle,n,!1)||this._prepareDragStart(e,l,s)}}},_prepareDragStart:function(e,t,n){var o=this,r=o.el,a=o.options,l=r.ownerDocument,s;if(n&&!h&&n.parentNode===r){var d=T(n);if(w=r,h=n,A=h.parentNode,oe=h.nextSibling,ze=n,Fe=a.group,g.dragged=h,re={target:h,clientX:(t||e).clientX,clientY:(t||e).clientY},en=re.clientX-d.left,tn=re.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,h.style["will-change"]="all",s=function(){if(N("delayEnded",o,{evt:e}),g.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ft&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(e,t),L({sortable:o,name:"choose",originalEvent:e}),k(h,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){qt(h,c.trim(),bt)}),C(l,"dragover",ae),C(l,"mousemove",ae),C(l,"touchmove",ae),C(l,"mouseup",o._onDrop),C(l,"touchend",o._onDrop),C(l,"touchcancel",o._onDrop),Ft&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),N("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ue||K))){if(g.eventCanceled){this._onDrop();return}C(l,"mouseup",o._disableDelayedDrag),C(l,"touchend",o._disableDelayedDrag),C(l,"touchcancel",o._disableDelayedDrag),C(l,"mousemove",o._delayedDragTouchMoveHandler),C(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&C(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&bt(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._disableDelayedDrag),E(e,"touchend",this._disableDelayedDrag),E(e,"touchcancel",this._disableDelayedDrag),E(e,"mousemove",this._delayedDragTouchMoveHandler),E(e,"touchmove",this._delayedDragTouchMoveHandler),E(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):t?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(h,"dragend",this),C(w,"dragstart",this._onDragStart));try{document.selection?Qe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(_e=!1,w&&h){N("dragStarted",this,{evt:t}),this.nativeDraggable&&C(document,"dragover",Jn);var n=this.options;!e&&k(h,n.dragClass,!1),k(h,n.ghostClass,!0),g.active=this,e&&this._appendGhost(),L({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(j){this._lastX=j.clientX,this._lastY=j.clientY,sn();for(var e=document.elementFromPoint(j.clientX,j.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(j.clientX,j.clientY),e!==t);)t=e;if(h.parentNode[V]._isOutsideThisEl(e),t)do{if(t[V]){var n=void 0;if(n=t[V]._onDragOver({clientX:j.clientX,clientY:j.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);ln()}},_onTouchMove:function(e){if(re){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=m&&ge(m,!0),l=m&&a&&a.a,s=m&&a&&a.d,d=Ke&&I&&Kt(I),c=(r.clientX-re.clientX+o.x)/(l||1)+(d?d[0]-yt[0]:0)/(l||1),u=(r.clientY-re.clientY+o.y)/(s||1)+(d?d[1]-yt[1]:0)/(s||1);if(!g.active&&!_e){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(m){a?(a.e+=c-(mt||0),a.f+=u-(vt||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var f="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");p(m,"webkitTransform",f),p(m,"mozTransform",f),p(m,"msTransform",f),p(m,"transform",f),mt=c,vt=u,j=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!m){var e=this.options.fallbackOnBody?document.body:w,t=T(h,!0,Ke,!0,e),n=this.options;if(Ke){for(I=e;p(I,"position")==="static"&&p(I,"transform")==="none"&&I!==document;)I=I.parentNode;I!==document.body&&I!==document.documentElement?(I===document&&(I=J()),t.top+=I.scrollTop,t.left+=I.scrollLeft):I=J(),yt=Kt(I)}m=h.cloneNode(!0),k(m,n.ghostClass,!1),k(m,n.fallbackClass,!0),k(m,n.dragClass,!0),p(m,"transition",""),p(m,"transform",""),p(m,"box-sizing","border-box"),p(m,"margin",0),p(m,"top",t.top),p(m,"left",t.left),p(m,"width",t.width),p(m,"height",t.height),p(m,"opacity","0.8"),p(m,"position",Ke?"absolute":"fixed"),p(m,"zIndex","100000"),p(m,"pointerEvents","none"),g.ghost=m,e.appendChild(m),p(m,"transform-origin",en/parseInt(m.style.width)*100+"% "+tn/parseInt(m.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;if(N("dragStart",this,{evt:e}),g.eventCanceled){this._onDrop();return}N("setupClone",this),g.eventCanceled||(S=Qt(h),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),k(S,this.options.chosenClass,!1),g.clone=S),n.cloneId=Qe(function(){N("clone",n),!g.eventCanceled&&(n.options.removeCloneOnHide||w.insertBefore(S,h),n._hideClone(),L({sortable:n,name:"clone"}))}),!t&&k(h,r.dragClass,!0),t?(Xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(E(document,"mouseup",n._onDrop),E(document,"touchend",n._onDrop),E(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,h)),C(document,"drop",n),p(h,"transform","translateZ(0)")),_e=!0,n._dragStartId=Qe(n._dragStarted.bind(n,t,e)),C(document,"selectstart",n),Te=!0,Ve&&p(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,o,r,a,l=this.options,s=l.group,d=g.active,c=Fe===s,u=l.sort,f=x||d,b,_=this,y=!1;if(_t)return;function Y(Me,ci){N(Me,_,z({evt:e,isOwner:c,axis:b?"vertical":"horizontal",revert:a,dragRect:o,targetRect:r,canSort:u,fromSortable:f,target:n,completed:B,onMove:function(vn,fi){return Je(w,t,h,o,vn,T(vn),e,fi)},changed:le},ci))}function se(){Y("dragOverAnimationCapture"),_.captureAnimationState(),_!==f&&f.captureAnimationState()}function B(Me){return Y("dragOverCompleted",{insertion:Me}),Me&&(c?d._hideClone():d._showClone(_),_!==f&&(k(h,x?x.options.ghostClass:d.options.ghostClass,!1),k(h,l.ghostClass,!0)),x!==_&&_!==g.active?x=_:_===g.active&&x&&(x=null),f===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){Y("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===t&&!n.animated)&&(be=null),!l.dragoverBubble&&!e.rootEl&&n!==document&&(h.parentNode[V]._isOutsideThisEl(e.target),!Me&&ae(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function le(){R=U(h),ee=U(h,l.draggable),L({sortable:_,name:"change",toEl:t,newIndex:R,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=F(n,l.draggable,t,!0),Y("dragOver"),g.eventCanceled)return y;if(h.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return B(!1);if(Xe=!1,d&&!l.disabled&&(c?u||(a=A!==w):x===this||(this.lastPutMode=Fe.checkPull(this,d,h,e))&&s.checkPut(this,d,h,e))){if(b=this._getDirection(e,n)==="vertical",o=T(h),Y("dragOverValid"),g.eventCanceled)return y;if(a)return A=w,se(),this._hideClone(),Y("revert"),g.eventCanceled||(oe?w.insertBefore(h,oe):w.appendChild(h)),B(!0);var G=ct(t,l.draggable);if(!G||ni(e,b,this)&&!G.animated){if(G===h)return B(!1);if(G&&t===e.target&&(n=G),n&&(r=T(n)),Je(w,t,h,o,n,r,e,!!n)!==!1)return se(),G&&G.nextSibling?t.insertBefore(h,G.nextSibling):t.appendChild(h),A=t,le(),B(!0)}else if(G&&ti(e,b,this)){var Ct=me(t,0,l,!0);if(Ct===h)return B(!1);if(n=Ct,r=T(n),Je(w,t,h,o,n,r,e,!1)!==!1)return se(),t.insertBefore(h,Ct),A=t,le(),B(!0)}else if(n.parentNode===t){r=T(n);var Ee=0,$t,hi=h.parentNode!==t,fn=!Zn(h.animated&&h.toRect||o,n.animated&&n.toRect||r,b),pn=b?"top":"left",Ie=Zt(n,"top","top")||Zt(h,"top","top"),ui=Ie?Ie.scrollTop:void 0;be!==n&&($t=r[pn],Pe=!1,Ye=!fn&&l.invertSwap||hi),Ee=ii(e,n,r,b,fn?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ye,be===n);var Le;if(Ee!==0){var gn=U(h);do gn-=Ee,Le=A.children[gn];while(Le&&(p(Le,"display")==="none"||Le===m))}if(Ee===0||Le===n)return B(!1);be=n,xe=Ee;var mn=n.nextElementSibling,Ne=!1;Ne=Ee===1;var et=Je(w,t,h,o,n,r,e,Ne);if(et!==!1)return(et===1||et===-1)&&(Ne=et===1),_t=!0,setTimeout(ei,30),se(),Ne&&!mn?t.appendChild(h):n.parentNode.insertBefore(h,Ne?mn:n),Ie&&zn(Ie,0,ui-Ie.scrollTop),A=h.parentNode,$t!==void 0&&!Ye&&(Ge=Math.abs($t-T(n)[pn])),le(),B(!0)}if(t.contains(h))return B(!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",ae),E(document,"mousemove",ae),E(document,"touchmove",ae)},_offUpEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._onDrop),E(e,"touchend",this._onDrop),E(e,"pointerup",this._onDrop),E(e,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(R=U(h),ee=U(h,n.draggable),N("drop",this,{evt:e}),A=h&&h.parentNode,R=U(h),ee=U(h,n.draggable),g.eventCanceled){this._nulling();return}_e=!1,Ye=!1,Pe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Et(this.cloneId),Et(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ve&&p(document.body,"user-select",""),p(h,"transform",""),e&&(Te&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(w===A||x&&x.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),h&&(this.nativeDraggable&&E(h,"dragend",this),bt(h),h.style["will-change"]="",Te&&!_e&&k(h,x?x.options.ghostClass:this.options.ghostClass,!1),k(h,this.options.chosenClass,!1),L({sortable:this,name:"unchoose",toEl:A,newIndex:null,newDraggableIndex:null,originalEvent:e}),w!==A?(R>=0&&(L({rootEl:A,name:"add",toEl:A,fromEl:w,originalEvent:e}),L({sortable:this,name:"remove",toEl:A,originalEvent:e}),L({rootEl:A,name:"sort",toEl:A,fromEl:w,originalEvent:e}),L({sortable:this,name:"sort",toEl:A,originalEvent:e})),x&&x.save()):R!==ye&&R>=0&&(L({sortable:this,name:"update",toEl:A,originalEvent:e}),L({sortable:this,name:"sort",toEl:A,originalEvent:e})),g.active&&((R==null||R===-1)&&(R=ye,ee=Oe),L({sortable:this,name:"end",toEl:A,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),w=h=A=m=oe=S=ze=Q=re=j=Te=R=ee=ye=Oe=be=xe=x=Fe=g.dragged=g.ghost=g.clone=g.active=null,qe.forEach(function(e){e.checked=!0}),qe.length=mt=vt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":h&&(this._onDragOver(e),Qn(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)t=n[o],F(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||ri(t));return e},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(r,a){var l=o.children[a];F(l,this.options.draggable,o,!1)&&(n[r]=l)},this),t&&this.captureAnimationState(),e.forEach(function(r){n[r]&&(o.removeChild(n[r]),o.appendChild(n[r]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return F(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var o=De.modifyOption(this,e,t);typeof o<"u"?n[e]=o:n[e]=t,e==="group"&&an(n)},destroy:function(){N("destroy",this);var e=this.el;e[V]=null,E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart),E(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),We.splice(We.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Q){if(N("hideClone",this),g.eventCanceled)return;p(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),Q=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),g.eventCanceled)return;h.parentNode==w&&!this.options.group.revertClone?w.insertBefore(S,h):oe?w.insertBefore(S,oe):w.appendChild(S),this.options.group.revertClone&&this.animate(h,S),p(S,"display",""),Q=!1}}};function Qn(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function Je(i,e,t,n,o,r,a,l){var s,d=i[V],c=d.options.onMove,u;return window.CustomEvent&&!K&&!Ue?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=e,s.from=i,s.dragged=t,s.draggedRect=n,s.related=o||e,s.relatedRect=r||T(e),s.willInsertAfter=l,s.originalEvent=a,i.dispatchEvent(s),c&&(u=c.call(d,s,a)),u}function bt(i){i.draggable=!1}function ei(){_t=!1}function ti(i,e,t){var n=T(me(t.el,0,t.options,!0)),o=10;return e?i.clientX<n.left-o||i.clientY<n.top&&i.clientX<n.right:i.clientY<n.top-o||i.clientY<n.bottom&&i.clientX<n.left}function ni(i,e,t){var n=T(ct(t.el,t.options.draggable)),o=10;return e?i.clientX>n.right+o||i.clientX<=n.right&&i.clientY>n.bottom&&i.clientX>=n.left:i.clientX>n.right&&i.clientY>n.top||i.clientX<=n.right&&i.clientY>n.bottom+o}function ii(i,e,t,n,o,r,a,l){var s=n?i.clientY:i.clientX,d=n?t.height:t.width,c=n?t.top:t.left,u=n?t.bottom:t.right,f=!1;if(!a){if(l&&Ge<d*o){if(!Pe&&(xe===1?s>c+d*r/2:s<u-d*r/2)&&(Pe=!0),Pe)f=!0;else if(xe===1?s<c+Ge:s>u-Ge)return-xe}else if(s>c+d*(1-o)/2&&s<u-d*(1-o)/2)return oi(e)}return f=f||a,f&&(s<c+d*r/2||s>u-d*r/2)?s>c+d/2?1:-1:0}function oi(i){return U(h)<U(i)?1:-1}function ri(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function ai(i){qe.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&qe.push(n)}}function Qe(i){return setTimeout(i,0)}function Et(i){return clearTimeout(i)}Ze&&C(document,"touchmove",function(i){(g.active||_e)&&i.cancelable&&i.preventDefault()}),g.utils={on:C,off:E,css:p,find:qt,is:function(e,t){return!!F(e,t,e,!1)},extend:Vn,throttle:jn,closest:F,toggleClass:k,clone:Qt,index:U,nextTick:Qe,cancelNextTick:Et,detectDirection:rn,getChild:me},g.get=function(i){return i[V]},g.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(g.utils=z(z({},g.utils),n.utils)),De.mount(n)})},g.create=function(i,e){return new g(i,e)},g.version=Rn;var dn=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var d=n||r;l();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),d&&!d.el.contains(u)&&(a("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function hn(){}hn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=me(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:dn},Z(hn,{pluginName:"revertOnSpill"});function un(){}un.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,o=n||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:dn},Z(un,{pluginName:"removeOnSpill"});const cn=`
|
|
60
|
+
*/function an(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function z(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?an(Object(t),!0).forEach(function(n){qn(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):an(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function Ve(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ve=function(e){return typeof e}:Ve=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(i)}function qn(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Z(){return Z=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Z.apply(this,arguments)}function Zn(i,e){if(i==null)return{};var t={},n=Object.keys(i),r,o;for(o=0;o<n.length;o++)r=n[o],!(e.indexOf(r)>=0)&&(t[r]=i[r]);return t}function Kn(i,e){if(i==null)return{};var t=Zn(i,e),n,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(r=0;r<o.length;r++)n=o[r],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(t[n]=i[n])}return t}var Qn="1.15.0";function W(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var K=W(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),je=W(/Edge/i),sn=W(/firefox/i),Fe=W(/safari/i)&&!W(/chrome/i)&&!W(/android/i),ln=W(/iP(ad|od|hone)/i),dn=W(/chrome/i)&&W(/android/i),hn={capture:!1,passive:!1};function $(i,e,t){i.addEventListener(e,t,!K&&hn)}function E(i,e,t){i.removeEventListener(e,t,!K&&hn)}function ze(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function Jn(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function X(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&ze(i,e):ze(i,e))||n&&i===t)return i;if(i===t)break}while(i=Jn(i))}return null}var un=/\s+/g;function B(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(un," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(un," ")}}function g(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function me(i,e){var t="";if(typeof i=="string")t=i;else do{var n=g(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function cn(i,e,t){if(i){var n=i.getElementsByTagName(e),r=0,o=n.length;if(t)for(;r<o;r++)t(n[r],r);return n}return[]}function Q(){var i=document.scrollingElement;return i||document.documentElement}function O(i,e,t,n,r){if(!(!i.getBoundingClientRect&&i!==window)){var o,a,l,s,d,c,u;if(i!==window&&i.parentNode&&i!==Q()?(o=i.getBoundingClientRect(),a=o.top,l=o.left,s=o.bottom,d=o.right,c=o.height,u=o.width):(a=0,l=0,s=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(e||t)&&i!==window&&(r=r||i.parentNode,!K))do if(r&&r.getBoundingClientRect&&(g(r,"transform")!=="none"||t&&g(r,"position")!=="static")){var f=r.getBoundingClientRect();a-=f.top+parseInt(g(r,"border-top-width")),l-=f.left+parseInt(g(r,"border-left-width")),s=a+o.height,d=l+o.width;break}while(r=r.parentNode);if(n&&i!==window){var m=me(r||i),p=m&&m.a,v=m&&m.d;m&&(a/=v,l/=p,u/=p,c/=v,s=a+c,d=l+u)}return{top:a,left:l,bottom:s,right:d,width:u,height:c}}}function fn(i,e,t){for(var n=gn(i,!0),r=O(i)[e];n;){var o=O(n)[t],a=void 0;if(t==="top"||t==="left"?a=r>=o:a=r<=o,!a)return n;if(n===Q())break;n=gn(n,!1)}return!1}function ve(i,e,t,n){for(var r=0,o=0,a=i.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==y.ghost&&(n||a[o]!==y.dragged)&&X(a[o],t.draggable,i,!1)){if(r===e)return a[o];r++}o++}return null}function vt(i,e){for(var t=i.lastElementChild;t&&(t===y.ghost||g(t,"display")==="none"||e&&!ze(t,e));)t=t.previousElementSibling;return t||null}function k(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==y.clone&&(!e||ze(i,e))&&t++;return t}function pn(i){var e=0,t=0,n=Q();if(i)do{var r=me(i),o=r.a,a=r.d;e+=i.scrollLeft*o,t+=i.scrollTop*a}while(i!==n&&(i=i.parentNode));return[e,t]}function ei(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===i[t][n])return Number(t)}return-1}function gn(i,e){if(!i||!i.getBoundingClientRect)return Q();var t=i,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=g(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Q();if(n||e)return t;n=!0}}while(t=t.parentNode);return Q()}function ti(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function yt(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var _t;function ni(i,e){return function(){if(!_t){var t=arguments,n=this;t.length===1?i.call(n,t[0]):i.apply(n,t),_t=setTimeout(function(){_t=void 0},e)}}}function ii(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function mn(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}var U="Sortable"+new Date().getTime();function ri(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(g(r,"display")==="none"||r===y.ghost)){i.push({target:r,rect:O(r)});var o=z({},i[i.length-1].rect);if(r.thisAnimationDuration){var a=me(r,!0);a&&(o.top-=a.f,o.left-=a.e)}r.fromRect=o}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(ei(i,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var o=!1,a=0;i.forEach(function(l){var s=0,d=l.target,c=d.fromRect,u=O(d),f=d.prevFromRect,m=d.prevToRect,p=l.rect,v=me(d,!0);v&&(u.top-=v.f,u.left-=v.e),d.toRect=u,d.thisAnimationDuration&&yt(f,u)&&!yt(c,u)&&(p.top-u.top)/(p.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=ai(p,f,m,r.options)),yt(u,c)||(d.prevFromRect=c,d.prevToRect=u,s||(s=r.options.animation),r.animate(d,p,u,s)),s&&(o=!0,a=Math.max(a,s),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},s),d.thisAnimationDuration=s)}),clearTimeout(e),o?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),i=[]},animate:function(n,r,o,a){if(a){g(n,"transition",""),g(n,"transform","");var l=me(this.el),s=l&&l.a,d=l&&l.d,c=(r.left-o.left)/(s||1),u=(r.top-o.top)/(d||1);n.animatingX=!!c,n.animatingY=!!u,g(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=oi(n),g(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),g(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){g(n,"transition",""),g(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function oi(i){return i.offsetWidth}function ai(i,e,t,n){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var ye=[],bt={initializeByDefault:!0},Oe={mount:function(e){for(var t in bt)bt.hasOwnProperty(t)&&!(t in e)&&(e[t]=bt[t]);ye.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),ye.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";ye.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][o]&&t[a.pluginName][o](z({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](z({sortable:t},n)))})},initializePlugins:function(e,t,n,r){ye.forEach(function(l){var s=l.pluginName;if(!(!e.options[s]&&!l.initializeByDefault)){var d=new l(e,t,e.options);d.sortable=e,d.options=e.options,e[s]=d,Z(n,d.defaults)}});for(var o in e.options)if(e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);typeof a<"u"&&(e.options[o]=a)}},getEventProperties:function(e,t){var n={};return ye.forEach(function(r){typeof r.eventProperties=="function"&&Z(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return ye.forEach(function(o){e[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[t]=="function"&&(r=o.optionListeners[t].call(e[o.pluginName],n))}),r}};function si(i){var e=i.sortable,t=i.rootEl,n=i.name,r=i.targetEl,o=i.cloneEl,a=i.toEl,l=i.fromEl,s=i.oldIndex,d=i.newIndex,c=i.oldDraggableIndex,u=i.newDraggableIndex,f=i.originalEvent,m=i.putSortable,p=i.extraEventProperties;if(e=e||t&&t[U],!!e){var v,T=e.options,F="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!K&&!je?v=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(n,!0,!0)),v.to=a||t,v.from=l||t,v.item=r||t,v.clone=o,v.oldIndex=s,v.newIndex=d,v.oldDraggableIndex=c,v.newDraggableIndex=u,v.originalEvent=f,v.pullMode=m?m.lastPutMode:void 0;var P=z(z({},p),Oe.getEventProperties(n,e));for(var he in P)v[he]=P[he];t&&t.dispatchEvent(v),T[F]&&T[F].call(e,v)}}var li=["evt"],M=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=Kn(n,li);Oe.pluginEvent.bind(y)(e,t,z({dragEl:h,parentEl:S,ghostEl:_,rootEl:w,nextEl:se,lastDownEl:Xe,cloneEl:A,cloneHidden:J,dragStarted:Le,putSortable:x,activeSortable:y.active,originalEvent:r,oldIndex:_e,oldDraggableIndex:xe,newIndex:R,newDraggableIndex:ee,hideGhostForTarget:$n,unhideGhostForTarget:wn,cloneNowHidden:function(){J=!0},cloneNowShown:function(){J=!1},dispatchSortableEvent:function(l){N({sortable:t,name:l,originalEvent:r})}},o))};function N(i){si(z({putSortable:x,cloneEl:A,targetEl:h,rootEl:w,oldIndex:_e,oldDraggableIndex:xe,newIndex:R,newDraggableIndex:ee},i))}var h,S,_,w,se,Xe,A,J,_e,R,xe,ee,Ye,x,be=!1,We=!1,Ge=[],le,j,Et,Ct,vn,yn,Le,Ee,Pe,Ie=!1,qe=!1,Ze,L,$t=[],wt=!1,Ke=[],Qe=typeof document<"u",Je=ln,_n=je||K?"cssFloat":"float",di=Qe&&!dn&&!ln&&"draggable"in document.createElement("div"),bn=function(){if(Qe){if(K)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),En=function(e,t){var n=g(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=ve(e,0,t),a=ve(e,1,t),l=o&&g(o),s=a&&g(a),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=r&&n[_n]==="none"||a&&n[_n]==="none"&&d+c>r)?"vertical":"horizontal"},hi=function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,l=n?t.left:t.top,s=n?t.right:t.bottom,d=n?t.width:t.height;return r===l||o===s||r+a/2===l+d/2},ui=function(e,t){var n;return Ge.some(function(r){var o=r[U].options.emptyInsertThreshold;if(!(!o||vt(r))){var a=O(r),l=e>=a.left-o&&e<=a.right+o,s=t>=a.top-o&&t<=a.bottom+o;if(l&&s)return n=r}}),n},Cn=function(e){function t(o,a){return function(l,s,d,c){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(o==null&&(a||u))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return t(o(l,s,d,c),a)(l,s,d,c);var f=(a?l:s).options.group.name;return o===!0||typeof o=="string"&&o===f||o.join&&o.indexOf(f)>-1}}var n={},r=e.group;(!r||Ve(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},$n=function(){!bn&&_&&g(_,"display","none")},wn=function(){!bn&&_&&g(_,"display","")};Qe&&!dn&&document.addEventListener("click",function(i){if(We)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),We=!1,!1},!0);var de=function(e){if(h){e=e.touches?e.touches[0]:e;var t=ui(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[U]._onDragOver(n)}}},ci=function(e){h&&h.parentNode[U]._isOutsideThisEl(e.target)};function y(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=Z({},e),i[U]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return En(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.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:y.supportPointer!==!1&&"PointerEvent"in window&&!Fe,emptyInsertThreshold:5};Oe.initializePlugins(this,i,t);for(var n in t)!(n in e)&&(e[n]=t[n]);Cn(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:di,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$(i,"pointerdown",this._onTapStart):($(i,"mousedown",this._onTapStart),$(i,"touchstart",this._onTapStart)),this.nativeDraggable&&($(i,"dragover",this),$(i,"dragenter",this)),Ge.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Z(this,ri())}y.prototype={constructor:y,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ee=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,h):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(bi(n),!h&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Fe&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=X(s,r.draggable,n,!1),!(s&&s.animated)&&Xe!==s)){if(_e=k(s),xe=k(s,r.draggable),typeof c=="function"){if(c.call(this,e,s,this)){N({sortable:t,rootEl:d,name:"filter",targetEl:s,toEl:n,fromEl:n}),M("filter",t,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=X(d,u.trim(),n,!1),u)return N({sortable:t,rootEl:u,name:"filter",targetEl:s,fromEl:n,toEl:n}),M("filter",t,{evt:e}),!0}),c)){o&&e.cancelable&&e.preventDefault();return}r.handle&&!X(d,r.handle,n,!1)||this._prepareDragStart(e,l,s)}}},_prepareDragStart:function(e,t,n){var r=this,o=r.el,a=r.options,l=o.ownerDocument,s;if(n&&!h&&n.parentNode===o){var d=O(n);if(w=o,h=n,S=h.parentNode,se=h.nextSibling,Xe=n,Ye=a.group,y.dragged=h,le={target:h,clientX:(t||e).clientX,clientY:(t||e).clientY},vn=le.clientX-d.left,yn=le.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,h.style["will-change"]="all",s=function(){if(M("delayEnded",r,{evt:e}),y.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!sn&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(e,t),N({sortable:r,name:"choose",originalEvent:e}),B(h,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){cn(h,c.trim(),At)}),$(l,"dragover",de),$(l,"mousemove",de),$(l,"touchmove",de),$(l,"mouseup",r._onDrop),$(l,"touchend",r._onDrop),$(l,"touchcancel",r._onDrop),sn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),M("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(je||K))){if(y.eventCanceled){this._onDrop();return}$(l,"mouseup",r._disableDelayedDrag),$(l,"touchend",r._disableDelayedDrag),$(l,"touchcancel",r._disableDelayedDrag),$(l,"mousemove",r._delayedDragTouchMoveHandler),$(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&$(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&At(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._disableDelayedDrag),E(e,"touchend",this._disableDelayedDrag),E(e,"touchcancel",this._disableDelayedDrag),E(e,"mousemove",this._delayedDragTouchMoveHandler),E(e,"touchmove",this._delayedDragTouchMoveHandler),E(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?$(document,"pointermove",this._onTouchMove):t?$(document,"touchmove",this._onTouchMove):$(document,"mousemove",this._onTouchMove):($(h,"dragend",this),$(w,"dragstart",this._onDragStart));try{document.selection?tt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(be=!1,w&&h){M("dragStarted",this,{evt:t}),this.nativeDraggable&&$(document,"dragover",ci);var n=this.options;!e&&B(h,n.dragClass,!1),B(h,n.ghostClass,!0),y.active=this,e&&this._appendGhost(),N({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(j){this._lastX=j.clientX,this._lastY=j.clientY,$n();for(var e=document.elementFromPoint(j.clientX,j.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(j.clientX,j.clientY),e!==t);)t=e;if(h.parentNode[U]._isOutsideThisEl(e),t)do{if(t[U]){var n=void 0;if(n=t[U]._onDragOver({clientX:j.clientX,clientY:j.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);wn()}},_onTouchMove:function(e){if(le){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,a=_&&me(_,!0),l=_&&a&&a.a,s=_&&a&&a.d,d=Je&&L&&pn(L),c=(o.clientX-le.clientX+r.x)/(l||1)+(d?d[0]-$t[0]:0)/(l||1),u=(o.clientY-le.clientY+r.y)/(s||1)+(d?d[1]-$t[1]:0)/(s||1);if(!y.active&&!be){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(_){a?(a.e+=c-(Et||0),a.f+=u-(Ct||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var f="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");g(_,"webkitTransform",f),g(_,"mozTransform",f),g(_,"msTransform",f),g(_,"transform",f),Et=c,Ct=u,j=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!_){var e=this.options.fallbackOnBody?document.body:w,t=O(h,!0,Je,!0,e),n=this.options;if(Je){for(L=e;g(L,"position")==="static"&&g(L,"transform")==="none"&&L!==document;)L=L.parentNode;L!==document.body&&L!==document.documentElement?(L===document&&(L=Q()),t.top+=L.scrollTop,t.left+=L.scrollLeft):L=Q(),$t=pn(L)}_=h.cloneNode(!0),B(_,n.ghostClass,!1),B(_,n.fallbackClass,!0),B(_,n.dragClass,!0),g(_,"transition",""),g(_,"transform",""),g(_,"box-sizing","border-box"),g(_,"margin",0),g(_,"top",t.top),g(_,"left",t.left),g(_,"width",t.width),g(_,"height",t.height),g(_,"opacity","0.8"),g(_,"position",Je?"absolute":"fixed"),g(_,"zIndex","100000"),g(_,"pointerEvents","none"),y.ghost=_,e.appendChild(_),g(_,"transform-origin",vn/parseInt(_.style.width)*100+"% "+yn/parseInt(_.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;if(M("dragStart",this,{evt:e}),y.eventCanceled){this._onDrop();return}M("setupClone",this),y.eventCanceled||(A=mn(h),A.removeAttribute("id"),A.draggable=!1,A.style["will-change"]="",this._hideClone(),B(A,this.options.chosenClass,!1),y.clone=A),n.cloneId=tt(function(){M("clone",n),!y.eventCanceled&&(n.options.removeCloneOnHide||w.insertBefore(A,h),n._hideClone(),N({sortable:n,name:"clone"}))}),!t&&B(h,o.dragClass,!0),t?(We=!0,n._loopId=setInterval(n._emulateDragOver,50)):(E(document,"mouseup",n._onDrop),E(document,"touchend",n._onDrop),E(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,h)),$(document,"drop",n),g(h,"transform","translateZ(0)")),be=!0,n._dragStartId=tt(n._dragStarted.bind(n,t,e)),$(document,"selectstart",n),Le=!0,Fe&&g(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,r,o,a,l=this.options,s=l.group,d=y.active,c=Ye===s,u=l.sort,f=x||d,m,p=this,v=!1;if(wt)return;function T(Be,Si){M(Be,p,z({evt:e,isOwner:c,axis:m?"vertical":"horizontal",revert:a,dragRect:r,targetRect:o,canSort:u,fromSortable:f,target:n,completed:P,onMove:function(In,Di){return et(w,t,h,r,In,O(In),e,Di)},changed:he},Si))}function F(){T("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function P(Be){return T("dragOverCompleted",{insertion:Be}),Be&&(c?d._hideClone():d._showClone(p),p!==f&&(B(h,x?x.options.ghostClass:d.options.ghostClass,!1),B(h,l.ghostClass,!0)),x!==p&&p!==y.active?x=p:p===y.active&&x&&(x=null),f===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){T("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===t&&!n.animated)&&(Ee=null),!l.dragoverBubble&&!e.rootEl&&n!==document&&(h.parentNode[U]._isOutsideThisEl(e.target),!Be&&de(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function he(){R=k(h),ee=k(h,l.draggable),N({sortable:p,name:"change",toEl:t,newIndex:R,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=X(n,l.draggable,t,!0),T("dragOver"),y.eventCanceled)return v;if(h.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return P(!1);if(We=!1,d&&!l.disabled&&(c?u||(a=S!==w):x===this||(this.lastPutMode=Ye.checkPull(this,d,h,e))&&s.checkPut(this,d,h,e))){if(m=this._getDirection(e,n)==="vertical",r=O(h),T("dragOverValid"),y.eventCanceled)return v;if(a)return S=w,F(),this._hideClone(),T("revert"),y.eventCanceled||(se?w.insertBefore(h,se):w.appendChild(h)),P(!0);var G=vt(t,l.draggable);if(!G||mi(e,m,this)&&!G.animated){if(G===h)return P(!1);if(G&&t===e.target&&(n=G),n&&(o=O(n)),et(w,t,h,r,n,o,e,!!n)!==!1)return F(),G&&G.nextSibling?t.insertBefore(h,G.nextSibling):t.appendChild(h),S=t,he(),P(!0)}else if(G&&gi(e,m,this)){var Dt=ve(t,0,l,!0);if(Dt===h)return P(!1);if(n=Dt,o=O(n),et(w,t,h,r,n,o,e,!1)!==!1)return F(),t.insertBefore(h,Dt),S=t,he(),P(!0)}else if(n.parentNode===t){o=O(n);var Ce=0,Tt,wi=h.parentNode!==t,On=!hi(h.animated&&h.toRect||r,n.animated&&n.toRect||o,m),xn=m?"top":"left",Ne=fn(n,"top","top")||fn(h,"top","top"),Ai=Ne?Ne.scrollTop:void 0;Ee!==n&&(Tt=o[xn],Ie=!1,qe=!On&&l.invertSwap||wi),Ce=vi(e,n,o,m,On?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,qe,Ee===n);var Me;if(Ce!==0){var Ln=k(h);do Ln-=Ce,Me=S.children[Ln];while(Me&&(g(Me,"display")==="none"||Me===_))}if(Ce===0||Me===n)return P(!1);Ee=n,Pe=Ce;var Pn=n.nextElementSibling,He=!1;He=Ce===1;var nt=et(w,t,h,r,n,o,e,He);if(nt!==!1)return(nt===1||nt===-1)&&(He=nt===1),wt=!0,setTimeout(pi,30),F(),He&&!Pn?t.appendChild(h):n.parentNode.insertBefore(h,He?Pn:n),Ne&&ii(Ne,0,Ai-Ne.scrollTop),S=h.parentNode,Tt!==void 0&&!qe&&(Ze=Math.abs(Tt-O(n)[xn])),he(),P(!0)}if(t.contains(h))return P(!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",de),E(document,"mousemove",de),E(document,"touchmove",de)},_offUpEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._onDrop),E(e,"touchend",this._onDrop),E(e,"pointerup",this._onDrop),E(e,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(R=k(h),ee=k(h,n.draggable),M("drop",this,{evt:e}),S=h&&h.parentNode,R=k(h),ee=k(h,n.draggable),y.eventCanceled){this._nulling();return}be=!1,qe=!1,Ie=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),St(this.cloneId),St(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Fe&&g(document.body,"user-select",""),g(h,"transform",""),e&&(Le&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),_&&_.parentNode&&_.parentNode.removeChild(_),(w===S||x&&x.lastPutMode!=="clone")&&A&&A.parentNode&&A.parentNode.removeChild(A),h&&(this.nativeDraggable&&E(h,"dragend",this),At(h),h.style["will-change"]="",Le&&!be&&B(h,x?x.options.ghostClass:this.options.ghostClass,!1),B(h,this.options.chosenClass,!1),N({sortable:this,name:"unchoose",toEl:S,newIndex:null,newDraggableIndex:null,originalEvent:e}),w!==S?(R>=0&&(N({rootEl:S,name:"add",toEl:S,fromEl:w,originalEvent:e}),N({sortable:this,name:"remove",toEl:S,originalEvent:e}),N({rootEl:S,name:"sort",toEl:S,fromEl:w,originalEvent:e}),N({sortable:this,name:"sort",toEl:S,originalEvent:e})),x&&x.save()):R!==_e&&R>=0&&(N({sortable:this,name:"update",toEl:S,originalEvent:e}),N({sortable:this,name:"sort",toEl:S,originalEvent:e})),y.active&&((R==null||R===-1)&&(R=_e,ee=xe),N({sortable:this,name:"end",toEl:S,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){M("nulling",this),w=h=S=_=se=A=Xe=J=le=j=Le=R=ee=_e=xe=Ee=Pe=x=Ye=y.dragged=y.ghost=y.clone=y.active=null,Ke.forEach(function(e){e.checked=!0}),Ke.length=Et=Ct=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":h&&(this._onDragOver(e),fi(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,o=n.length,a=this.options;r<o;r++)t=n[r],X(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||_i(t));return e},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(o,a){var l=r.children[a];X(l,this.options.draggable,r,!1)&&(n[o]=l)},this),t&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return X(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=Oe.modifyOption(this,e,t);typeof r<"u"?n[e]=r:n[e]=t,e==="group"&&Cn(n)},destroy:function(){M("destroy",this);var e=this.el;e[U]=null,E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart),E(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ge.splice(Ge.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!J){if(M("hideClone",this),y.eventCanceled)return;g(A,"display","none"),this.options.removeCloneOnHide&&A.parentNode&&A.parentNode.removeChild(A),J=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(J){if(M("showClone",this),y.eventCanceled)return;h.parentNode==w&&!this.options.group.revertClone?w.insertBefore(A,h):se?w.insertBefore(A,se):w.appendChild(A),this.options.group.revertClone&&this.animate(h,A),g(A,"display",""),J=!1}}};function fi(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function et(i,e,t,n,r,o,a,l){var s,d=i[U],c=d.options.onMove,u;return window.CustomEvent&&!K&&!je?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=e,s.from=i,s.dragged=t,s.draggedRect=n,s.related=r||e,s.relatedRect=o||O(e),s.willInsertAfter=l,s.originalEvent=a,i.dispatchEvent(s),c&&(u=c.call(d,s,a)),u}function At(i){i.draggable=!1}function pi(){wt=!1}function gi(i,e,t){var n=O(ve(t.el,0,t.options,!0)),r=10;return e?i.clientX<n.left-r||i.clientY<n.top&&i.clientX<n.right:i.clientY<n.top-r||i.clientY<n.bottom&&i.clientX<n.left}function mi(i,e,t){var n=O(vt(t.el,t.options.draggable)),r=10;return e?i.clientX>n.right+r||i.clientX<=n.right&&i.clientY>n.bottom&&i.clientX>=n.left:i.clientX>n.right&&i.clientY>n.top||i.clientX<=n.right&&i.clientY>n.bottom+r}function vi(i,e,t,n,r,o,a,l){var s=n?i.clientY:i.clientX,d=n?t.height:t.width,c=n?t.top:t.left,u=n?t.bottom:t.right,f=!1;if(!a){if(l&&Ze<d*r){if(!Ie&&(Pe===1?s>c+d*o/2:s<u-d*o/2)&&(Ie=!0),Ie)f=!0;else if(Pe===1?s<c+Ze:s>u-Ze)return-Pe}else if(s>c+d*(1-r)/2&&s<u-d*(1-r)/2)return yi(e)}return f=f||a,f&&(s<c+d*o/2||s>u-d*o/2)?s>c+d/2?1:-1:0}function yi(i){return k(h)<k(i)?1:-1}function _i(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function bi(i){Ke.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&Ke.push(n)}}function tt(i){return setTimeout(i,0)}function St(i){return clearTimeout(i)}Qe&&$(document,"touchmove",function(i){(y.active||be)&&i.cancelable&&i.preventDefault()}),y.utils={on:$,off:E,css:g,find:cn,is:function(e,t){return!!X(e,t,e,!1)},extend:ti,throttle:ni,closest:X,toggleClass:B,clone:mn,index:k,nextTick:tt,cancelNextTick:St,detectDirection:En,getChild:ve},y.get=function(i){return i[U]},y.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(y.utils=z(z({},y.utils),n.utils)),Oe.mount(n)})},y.create=function(i,e){return new y(i,e)},y.version=Qn;var An=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var d=n||o;l();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),d&&!d.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Sn(){}Sn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=ve(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:An},Z(Sn,{pluginName:"revertOnSpill"});function Dn(){}Dn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,r=n||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:An},Z(Dn,{pluginName:"removeOnSpill"});const Tn=`
|
|
49
61
|
:host {
|
|
50
62
|
display: block;
|
|
51
63
|
}
|
|
@@ -53,10 +65,13 @@
|
|
|
53
65
|
display: flex;
|
|
54
66
|
justify-content: space-between;
|
|
55
67
|
}
|
|
56
|
-
.
|
|
68
|
+
.drag-handle {
|
|
57
69
|
cursor: ns-resize;
|
|
58
70
|
}
|
|
59
|
-
|
|
71
|
+
ul[data-group] {
|
|
72
|
+
padding-inline-start: 40px;
|
|
73
|
+
}
|
|
74
|
+
`,Ei=`
|
|
60
75
|
ul {
|
|
61
76
|
padding: 0;
|
|
62
77
|
}
|
|
@@ -82,65 +97,110 @@ li label > input[type=checkbox]:after {
|
|
|
82
97
|
li label > input[type=checkbox]:checked:after {
|
|
83
98
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath fill='%23004170' d='M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z' /%3E%3C/svg%3E");
|
|
84
99
|
}
|
|
85
|
-
.
|
|
100
|
+
.drag-handle span {
|
|
86
101
|
display: none;
|
|
87
102
|
}
|
|
88
|
-
.
|
|
103
|
+
.drag-handle {
|
|
89
104
|
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag%3C/title%3E%3Cpath fill='%23004170' d='M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z' /%3E%3C/svg%3E");
|
|
90
105
|
width: 24px;
|
|
91
106
|
height: 24px;
|
|
92
107
|
}
|
|
93
|
-
|
|
108
|
+
li.sortable-chosen {
|
|
109
|
+
background: #eeea;
|
|
110
|
+
}
|
|
111
|
+
li.sortable-drag {
|
|
112
|
+
opacity: 0;
|
|
113
|
+
}
|
|
114
|
+
li.sortable-ghost {
|
|
115
|
+
}
|
|
116
|
+
details.group-details {
|
|
117
|
+
position: relative;
|
|
118
|
+
}
|
|
119
|
+
details.group-details > summary {
|
|
120
|
+
list-style: none;
|
|
121
|
+
position: absolute;
|
|
122
|
+
right: 20px;
|
|
123
|
+
top: -64px;
|
|
124
|
+
font-size: 0;
|
|
125
|
+
}
|
|
126
|
+
details.group-details > summary:after {
|
|
127
|
+
display: block;
|
|
128
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eplus%3C/title%3E%3Cpath d='M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z' /%3E%3C/svg%3E");
|
|
129
|
+
width: 24px;
|
|
130
|
+
height: 24px;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
}
|
|
133
|
+
details[open].group-details > summary:after {
|
|
134
|
+
display: block;
|
|
135
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eminus%3C/title%3E%3Cpath d='M19,13H5V11H19V13Z' /%3E%3C/svg%3E");
|
|
136
|
+
width: 24px;
|
|
137
|
+
height: 24px;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
}
|
|
140
|
+
`;var Ci=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,D=(i,e,t,n)=>{for(var r=n>1?void 0:n?$i(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(n?a(e,t,r):a(r))||r);return n&&r&&Ci(e,t,r),r};b.EOxLayerControl=class extends pe{constructor(){super(...arguments),this.layerIdentifier="ol_uid",this.layerTitle="title",this.sortBy="layerOrder",this.layerConfig=["opacity"],this.externalLayerConfig=void 0,this.filterLayers=(e,t,n)=>{let r=[];const o=(a,l,s)=>{r=[...r,...a.filter(c=>c.get(l)===s)];const d=a.filter(c=>c.getLayers);return d.length>0&&d.forEach(c=>o(c.getLayers().getArray(),l,s)),r};return o(e,t,n),r},this.findLayerById=(e,t)=>this.filterLayers(e,"id",t)[0]}_updateControl(e){this.layerCollection=e,this.optionalLayerArray=this.filterLayers(e.getArray(),"layerControlOptional",!0),this.requestUpdate()}_emitLayerconfig(e){const t={detail:{layer:e},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("layerconfig",t))}changeOpacity(e,t){e.setOpacity(t)}changeStyleProperty(e,t,n){e.updateStyleVariables({...e.style_,[t]:n})}preFilterLayers(e){return[...e].filter(t=>t.get("layerControlHide")!==!0&&t.get("layerControlOptional")!==!0)}toggleLayerVisibility(e,t){if(e.setVisible(!e.getVisible()),e.get("layerControlExclusive")){let n=[];t?n=this.findLayerById(this.layerCollection.getArray(),t).getLayers().getArray().filter(o=>o.get(this.layerIdentifier)!==e.get(this.layerIdentifier)&&o.get("layerControlExclusive")):n=this.layerCollection.getArray().filter(r=>r.get(this.layerIdentifier)!==e.get(this.layerIdentifier)&&r.get("layerControlExclusive")),n.forEach(r=>{r.setVisible(!1)})}this.requestUpdate()}render(){var o;const e=document.querySelector(this.for),n=(e.map||e).getLayers();this._updateControl(n),n.on("change:length",()=>{this._currentlySorting||this._updateControl(n)});const r=(a,l)=>I`
|
|
141
|
+
<ul data-group="${l??C}">
|
|
142
|
+
${gt(a,s=>s.get(this.layerIdentifier),s=>I`
|
|
143
|
+
<li
|
|
144
|
+
data-layer="${s.get(this.layerIdentifier)}"
|
|
145
|
+
data-disabled="${s.get("layerControlDisable")||C}"
|
|
146
|
+
>
|
|
147
|
+
<div class="layer">
|
|
148
|
+
<label>
|
|
149
|
+
<input
|
|
150
|
+
type="checkbox"
|
|
151
|
+
.checked="${mt(s.getVisible())}"
|
|
152
|
+
@click=${()=>{this.toggleLayerVisibility(s,l)}}
|
|
153
|
+
/>
|
|
154
|
+
<span class="title"
|
|
155
|
+
>${s.get(this.layerTitle)||`${s.get(this.layerIdentifier)}`}</span
|
|
156
|
+
>
|
|
157
|
+
</label>
|
|
158
|
+
${this.sortBy==="layerOrder"&&!s.get("layerControlDisable")?I`<div class="drag-handle">
|
|
159
|
+
<span>=</span>
|
|
160
|
+
</div>`:C}
|
|
161
|
+
</div>
|
|
162
|
+
${this.layerConfig?I`
|
|
163
|
+
<eox-layerconfig
|
|
164
|
+
.layerConfig="${this.layerConfig}"
|
|
165
|
+
.layerControl="${this}"
|
|
166
|
+
.layer=${s}
|
|
167
|
+
.external=${this.externalLayerConfig}
|
|
168
|
+
></eox-layerconfig>
|
|
169
|
+
`:C}
|
|
170
|
+
${this.externalLayerConfig&&s.style_?I`
|
|
171
|
+
<button
|
|
172
|
+
@click=${()=>this._emitLayerconfig(s)}
|
|
173
|
+
>
|
|
174
|
+
configure
|
|
175
|
+
</button>
|
|
176
|
+
`:C}
|
|
177
|
+
${s.getLayers?I`
|
|
178
|
+
<details open class="group-details">
|
|
179
|
+
<summary>Layers</summary>
|
|
180
|
+
${r(this.preFilterLayers([...s.getLayers().getArray()].reverse()),s.get("id"))}
|
|
181
|
+
</details>
|
|
182
|
+
`:C}
|
|
183
|
+
</li>
|
|
184
|
+
`)}
|
|
185
|
+
</ul>
|
|
186
|
+
`;return I`
|
|
94
187
|
<style>
|
|
95
|
-
${
|
|
96
|
-
${!this.unstyled&&
|
|
188
|
+
${Tn}
|
|
189
|
+
${!this.unstyled&&Ei}
|
|
97
190
|
</style>
|
|
98
191
|
<div>
|
|
99
192
|
<slot></slot>
|
|
100
|
-
<
|
|
101
|
-
${
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
>
|
|
105
|
-
<div class="layer">
|
|
106
|
-
<label>
|
|
107
|
-
<input
|
|
108
|
-
type="checkbox"
|
|
109
|
-
checked="${a.getVisible()||$}"
|
|
110
|
-
@click=${()=>{a.setVisible(!a.getVisible()),this.requestUpdate()}}
|
|
111
|
-
/>
|
|
112
|
-
<span class="title"
|
|
113
|
-
>${a.get(this.layerTitle)||`layer ${a.get(this.layerIdentifier)}`}</span
|
|
114
|
-
>
|
|
115
|
-
</label>
|
|
116
|
-
${this.sortBy==="layerOrder"?M`<div class="dragHandle">
|
|
117
|
-
<span>=</span>
|
|
118
|
-
</div>`:$}
|
|
119
|
-
</div>
|
|
120
|
-
${this.layerConfig&&!this.hideConfigs?M`
|
|
121
|
-
<eox-layerconfig
|
|
122
|
-
.layerConfig="${this.layerConfig}"
|
|
123
|
-
.layerControl="${this}"
|
|
124
|
-
.layer=${a}
|
|
125
|
-
.external=${this.externalLayerConfig}
|
|
126
|
-
></eox-layerconfig>
|
|
127
|
-
`:$}
|
|
128
|
-
${this.externalLayerConfig&&a.style_?M`
|
|
129
|
-
<button @click=${()=>this._emitLayerconfig(a)}>
|
|
130
|
-
configure
|
|
131
|
-
</button>
|
|
132
|
-
`:$}
|
|
133
|
-
</li>
|
|
134
|
-
`)}
|
|
135
|
-
</ul>
|
|
136
|
-
${jt(((r=this.optionalLayerArray)==null?void 0:r.length)>0,()=>M`
|
|
193
|
+
<div>
|
|
194
|
+
${r(this.preFilterLayers(n.getArray()))}
|
|
195
|
+
</div>
|
|
196
|
+
${on(((o=this.optionalLayerArray)==null?void 0:o.length)>0,()=>I`
|
|
137
197
|
<label for="optional">Optional layers</label>
|
|
138
198
|
|
|
139
199
|
<select name="optional">
|
|
140
200
|
<option disabled selected value>
|
|
141
201
|
-- select an optional layer to add --
|
|
142
202
|
</option>
|
|
143
|
-
${this.optionalLayerArray.map(a=>
|
|
203
|
+
${this.optionalLayerArray.map(a=>I`
|
|
144
204
|
<option
|
|
145
205
|
value="${a.get(this.layerIdentifier)}"
|
|
146
206
|
>
|
|
@@ -149,48 +209,48 @@ li label > input[type=checkbox]:checked:after {
|
|
|
149
209
|
`)}
|
|
150
210
|
</select>
|
|
151
211
|
<button
|
|
152
|
-
@click="${()=>{const a=this.optionalLayerArray.find(l=>l.get(this.layerIdentifier)===this.shadowRoot.querySelector("select[name=optional]").value);this.layerCollection.remove(a),this.layerCollection.insertAt(this.layerCollection.getLength(),a)
|
|
212
|
+
@click="${()=>{const a=this.optionalLayerArray.find(l=>l.get(this.layerIdentifier)===this.shadowRoot.querySelector("select[name=optional]").value);if(a.get("group")){const l=this.findLayerById(this.layerCollection.getArray(),a.get("group"));l.getLayers().remove(a),l.getLayers().insertAt(l.getLayers().getLength(),a)}else this.layerCollection.remove(a),this.layerCollection.insertAt(this.layerCollection.getLength(),a);a.set("layerControlOptional",!1),a.setVisible(!0)}}"
|
|
153
213
|
>
|
|
154
214
|
add
|
|
155
215
|
</button>
|
|
156
216
|
`)}
|
|
157
217
|
</div>
|
|
158
|
-
`}updated(){this.sortBy=="layerOrder"&&
|
|
218
|
+
`}updated(){this.sortBy=="layerOrder"&&this.renderRoot.querySelectorAll("ul").forEach(t=>{const n=t.dataset.group;y.create(t,{handle:".drag-handle",dataIdAttr:"data-layer",filter:"data-disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",store:{get:()=>n?[...this.findLayerById(this.layerCollection.getArray(),n).getLayers().getArray().map(a=>a.get(this.layerIdentifier))].reverse():[...this.layerCollection.getArray().map(r=>r.get(this.layerIdentifier))].reverse(),set:r=>{var o=r.toArray().reverse();o.forEach((a,l)=>{if(n){const d=this.findLayerById(this.layerCollection.getArray(),n).getLayers(),c=this.findLayerById(d.getArray(),a);d.remove(c),d.insertAt(l,c)}else{const s=this.findLayerById(this.layerCollection.getArray(),a);this.layerCollection.remove(s),this.layerCollection.insertAt(l,s)}})}},onMove:r=>!r.related.dataset.disabled})})}},D([ge()],b.EOxLayerControl.prototype,"olMap",2),D([ge()],b.EOxLayerControl.prototype,"layerCollection",2),D([ge()],b.EOxLayerControl.prototype,"layerArray",2),D([ge()],b.EOxLayerControl.prototype,"optionalLayerArray",2),D([H()],b.EOxLayerControl.prototype,"for",2),D([H()],b.EOxLayerControl.prototype,"layerIdentifier",2),D([H()],b.EOxLayerControl.prototype,"layerTitle",2),D([H()],b.EOxLayerControl.prototype,"sortBy",2),D([H({type:Array})],b.EOxLayerControl.prototype,"layerConfig",2),D([H({type:Boolean})],b.EOxLayerControl.prototype,"externalLayerConfig",2),D([H({type:Boolean})],b.EOxLayerControl.prototype,"unstyled",2),b.EOxLayerControl=D([Qt("eox-layercontrol")],b.EOxLayerControl),b.EOxLayerConfig=class extends pe{constructor(){super(...arguments),this._configList={}}_handleInput(e,t){t==="opacity"?this._layerControlElement.changeOpacity(this._currentLayer,parseFloat(e.target.value)):this._layerControlElement.changeStyleProperty(this._currentLayer,t,parseFloat(e.target.value))}_parseConfigs(e){if(!e)return;const t=e.style_;t&&t.color&&t.color[0]==="array"&&(this._configList=t.variables)}connectedCallback(){super.connectedCallback(),!this.layerConfig&&!this.layerControl?(this._layerControlElement=document.querySelector(this.for),this._layerControlElement&&(this.layerConfig=this._layerControlElement.layerConfig,this._layerControlElement.addEventListener("layerconfig",e=>{this._currentLayer=e.detail.layer,this._parseConfigs(this._currentLayer),this.requestUpdate()}))):(this._layerControlElement=this.layerControl,this._currentLayer=this.layer,this._parseConfigs(this._currentLayer))}render(){return I`
|
|
159
219
|
<style>
|
|
160
|
-
${
|
|
220
|
+
${Tn}
|
|
161
221
|
</style>
|
|
162
|
-
${
|
|
222
|
+
${on(this._currentLayer,()=>I`
|
|
163
223
|
<div>
|
|
164
224
|
<slot></slot>
|
|
165
|
-
${this.for?
|
|
166
|
-
${
|
|
167
|
-
<div>${
|
|
225
|
+
${this.for?I`layer: ${this._currentLayer.get("name")}`:C}
|
|
226
|
+
${gt(this.layerConfig.filter(e=>this.for?e!=="opacity":!0),e=>e,e=>I`
|
|
227
|
+
<div>${e}</div>
|
|
168
228
|
<input
|
|
169
229
|
type="range"
|
|
170
230
|
min="0"
|
|
171
231
|
max="1"
|
|
172
232
|
step="0.01"
|
|
173
|
-
value="${this._currentLayer.getOpacity()}"
|
|
174
|
-
@input=${
|
|
233
|
+
value="${mt(this._currentLayer.getOpacity())}"
|
|
234
|
+
@input=${t=>this._handleInput(t,e)}
|
|
175
235
|
/>
|
|
176
236
|
`)}
|
|
177
|
-
${Object.keys(this._configList).length>0&&!this.external?
|
|
178
|
-
<details open="${this.for?!0
|
|
237
|
+
${Object.keys(this._configList).length>0&&!this.external?I`
|
|
238
|
+
<details open="${this.for?!0:C}">
|
|
179
239
|
<summary>Layer config</summary>
|
|
180
240
|
<ul>
|
|
181
|
-
${
|
|
182
|
-
<div>${
|
|
241
|
+
${gt(Object.keys(this._configList),e=>e,e=>I` <li>
|
|
242
|
+
<div>${e}</div>
|
|
183
243
|
<input
|
|
184
244
|
type="range"
|
|
185
|
-
min="${["red","green","blue"].includes(
|
|
186
|
-
max="${["red","green","blue"].includes(
|
|
187
|
-
value="${this._configList[
|
|
188
|
-
@input=${
|
|
245
|
+
min="${["red","green","blue"].includes(e)?1:2e3}"
|
|
246
|
+
max="${["red","green","blue"].includes(e)?4:5e3}"
|
|
247
|
+
value="${mt(this._configList[e])}"
|
|
248
|
+
@input=${t=>this._handleInput(t,e)}
|
|
189
249
|
/>
|
|
190
250
|
</li>`)}
|
|
191
251
|
</ul>
|
|
192
252
|
</details>
|
|
193
|
-
|
|
253
|
+
`:C}
|
|
194
254
|
</div>
|
|
195
255
|
`)}
|
|
196
|
-
`}},
|
|
256
|
+
`}},D([H()],b.EOxLayerConfig.prototype,"for",2),D([H({type:Array})],b.EOxLayerConfig.prototype,"layerConfig",2),D([H({type:Object,attribute:!1})],b.EOxLayerConfig.prototype,"layerControl",2),D([H({type:Object,attribute:!1})],b.EOxLayerConfig.prototype,"layer",2),D([H({type:Boolean})],b.EOxLayerConfig.prototype,"external",2),D([ge()],b.EOxLayerConfig.prototype,"_currentLayer",2),D([ge()],b.EOxLayerConfig.prototype,"_configList",2),b.EOxLayerConfig=D([Qt("eox-layerconfig")],b.EOxLayerConfig),Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|