@eox/layercontrol 0.4.0 → 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 +922 -723
- package/dist/eox-layercontrol.umd.cjs +100 -51
- package/package.json +1 -1
package/dist/eox-layercontrol.js
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const jt = window, De = jt.ShadowRoot && (jt.ShadyCSS === void 0 || jt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ri = Symbol(), Me = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let Ri = class {
|
|
8
8
|
constructor(t, e, n) {
|
|
9
|
-
if (this._$cssResult$ = !0, n !==
|
|
9
|
+
if (this._$cssResult$ = !0, n !== ri)
|
|
10
10
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
11
11
|
this.cssText = t, this.t = e;
|
|
12
12
|
}
|
|
13
13
|
get styleSheet() {
|
|
14
14
|
let t = this.o;
|
|
15
15
|
const e = this.t;
|
|
16
|
-
if (
|
|
16
|
+
if (De && t === void 0) {
|
|
17
17
|
const n = e !== void 0 && e.length === 1;
|
|
18
|
-
n && (t =
|
|
18
|
+
n && (t = Me.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Me.set(e, t));
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
@@ -23,27 +23,27 @@ let $n = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const n = document.createElement("style"), r =
|
|
26
|
+
const ki = (i) => new Ri(typeof i == "string" ? i : i + "", void 0, ri), Ui = (i, t) => {
|
|
27
|
+
De ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
28
|
+
const n = document.createElement("style"), r = jt.litNonce;
|
|
29
29
|
r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
|
|
30
30
|
});
|
|
31
|
-
},
|
|
31
|
+
}, He = De ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
32
32
|
let e = "";
|
|
33
33
|
for (const n of t.cssRules)
|
|
34
34
|
e += n.cssText;
|
|
35
|
-
return
|
|
35
|
+
return ki(e);
|
|
36
36
|
})(i) : i;
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/
|
|
42
|
-
var
|
|
43
|
-
const
|
|
42
|
+
var se;
|
|
43
|
+
const qt = window, Be = qt.trustedTypes, Vi = Be ? Be.emptyScript : "", Re = qt.reactiveElementPolyfillSupport, Ee = { toAttribute(i, t) {
|
|
44
44
|
switch (t) {
|
|
45
45
|
case Boolean:
|
|
46
|
-
i = i ?
|
|
46
|
+
i = i ? Vi : null;
|
|
47
47
|
break;
|
|
48
48
|
case Object:
|
|
49
49
|
case Array:
|
|
@@ -68,8 +68,8 @@ const Xt = window, Pe = Xt.trustedTypes, Sn = Pe ? Pe.emptyScript : "", Ie = Xt.
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return e;
|
|
71
|
-
} },
|
|
72
|
-
let
|
|
71
|
+
} }, oi = (i, t) => t !== i && (t == t || i == i), ae = { attribute: !0, type: String, converter: Ee, reflect: !1, hasChanged: oi }, $e = "finalized";
|
|
72
|
+
let pt = class extends HTMLElement {
|
|
73
73
|
constructor() {
|
|
74
74
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
75
75
|
}
|
|
@@ -85,7 +85,7 @@ let ht = class extends HTMLElement {
|
|
|
85
85
|
r !== void 0 && (this._$Ev.set(r, n), t.push(r));
|
|
86
86
|
}), t;
|
|
87
87
|
}
|
|
88
|
-
static createProperty(t, e =
|
|
88
|
+
static createProperty(t, e = ae) {
|
|
89
89
|
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
90
90
|
const n = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, n, e);
|
|
91
91
|
r !== void 0 && Object.defineProperty(this.prototype, t, r);
|
|
@@ -100,12 +100,12 @@ let ht = class extends HTMLElement {
|
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
103
|
-
return this.elementProperties.get(t) ||
|
|
103
|
+
return this.elementProperties.get(t) || ae;
|
|
104
104
|
}
|
|
105
105
|
static finalize() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty($e))
|
|
107
107
|
return !1;
|
|
108
|
-
this[
|
|
108
|
+
this[$e] = !0;
|
|
109
109
|
const t = Object.getPrototypeOf(this);
|
|
110
110
|
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
111
111
|
const e = this.properties, n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
@@ -119,9 +119,9 @@ let ht = class extends HTMLElement {
|
|
|
119
119
|
if (Array.isArray(t)) {
|
|
120
120
|
const n = new Set(t.flat(1 / 0).reverse());
|
|
121
121
|
for (const r of n)
|
|
122
|
-
e.unshift(
|
|
122
|
+
e.unshift(He(r));
|
|
123
123
|
} else
|
|
124
|
-
t !== void 0 && e.push(
|
|
124
|
+
t !== void 0 && e.push(He(t));
|
|
125
125
|
return e;
|
|
126
126
|
}
|
|
127
127
|
static _$Ep(t, e) {
|
|
@@ -148,7 +148,7 @@ let ht = class extends HTMLElement {
|
|
|
148
148
|
createRenderRoot() {
|
|
149
149
|
var t;
|
|
150
150
|
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
151
|
-
return
|
|
151
|
+
return Ui(e, this.constructor.elementStyles), e;
|
|
152
152
|
}
|
|
153
153
|
connectedCallback() {
|
|
154
154
|
var t;
|
|
@@ -169,25 +169,25 @@ let ht = class extends HTMLElement {
|
|
|
169
169
|
attributeChangedCallback(t, e, n) {
|
|
170
170
|
this._$AK(t, n);
|
|
171
171
|
}
|
|
172
|
-
_$EO(t, e, n =
|
|
172
|
+
_$EO(t, e, n = ae) {
|
|
173
173
|
var r;
|
|
174
174
|
const o = this.constructor._$Ep(t, n);
|
|
175
175
|
if (o !== void 0 && n.reflect === !0) {
|
|
176
|
-
const
|
|
177
|
-
this._$El = t,
|
|
176
|
+
const s = (((r = n.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? n.converter : Ee).toAttribute(e, n.type);
|
|
177
|
+
this._$El = t, s == null ? this.removeAttribute(o) : this.setAttribute(o, s), this._$El = null;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
_$AK(t, e) {
|
|
181
181
|
var n;
|
|
182
182
|
const r = this.constructor, o = r._$Ev.get(t);
|
|
183
183
|
if (o !== void 0 && this._$El !== o) {
|
|
184
|
-
const
|
|
185
|
-
this._$El = o, this[o] =
|
|
184
|
+
const s = r.getPropertyOptions(o), a = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((n = s.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? s.converter : Ee;
|
|
185
|
+
this._$El = o, this[o] = a.fromAttribute(e, s.type), this._$El = null;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
requestUpdate(t, e, n) {
|
|
189
189
|
let r = !0;
|
|
190
|
-
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged ||
|
|
190
|
+
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || oi)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
|
|
191
191
|
}
|
|
192
192
|
async _$Ej() {
|
|
193
193
|
this.isUpdatePending = !0;
|
|
@@ -248,91 +248,91 @@ let ht = class extends HTMLElement {
|
|
|
248
248
|
firstUpdated(t) {
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
|
|
251
|
+
pt[$e] = !0, pt.elementProperties = /* @__PURE__ */ new Map(), pt.elementStyles = [], pt.shadowRootOptions = { mode: "open" }, Re == null || Re({ ReactiveElement: pt }), ((se = qt.reactiveElementVersions) !== null && se !== void 0 ? se : qt.reactiveElementVersions = []).push("1.6.2");
|
|
252
252
|
/**
|
|
253
253
|
* @license
|
|
254
254
|
* Copyright 2017 Google LLC
|
|
255
255
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
256
256
|
*/
|
|
257
|
-
var
|
|
258
|
-
const
|
|
259
|
-
\f\r]`,
|
|
260
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
257
|
+
var le;
|
|
258
|
+
const Zt = window, _t = Zt.trustedTypes, ke = _t ? _t.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Kt = "$lit$", W = `lit$${(Math.random() + "").slice(9)}$`, Te = "?" + W, Fi = `<${Te}>`, dt = document, Nt = () => dt.createComment(""), Lt = (i) => i === null || typeof i != "object" && typeof i != "function", si = Array.isArray, ai = (i) => si(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", de = `[
|
|
259
|
+
\f\r]`, Dt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ue = /-->/g, Ve = />/g, it = RegExp(`>|${de}(?:([^\\s"'>=/]+)(${de}*=${de}*(?:[^
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Fe = /'/g, je = /"/g, li = /^(?:script|style|textarea|title)$/i, ji = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), N = ji(1), j = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), ze = /* @__PURE__ */ new WeakMap(), lt = dt.createTreeWalker(dt, 129, null, !1), di = (i, t) => {
|
|
261
261
|
const e = i.length - 1, n = [];
|
|
262
|
-
let r, o = t === 2 ? "<svg>" : "",
|
|
262
|
+
let r, o = t === 2 ? "<svg>" : "", s = Dt;
|
|
263
263
|
for (let l = 0; l < e; l++) {
|
|
264
264
|
const d = i[l];
|
|
265
|
-
let
|
|
266
|
-
for (;
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
o +=
|
|
265
|
+
let f, u, c = -1, m = 0;
|
|
266
|
+
for (; m < d.length && (s.lastIndex = m, u = s.exec(d), u !== null); )
|
|
267
|
+
m = s.lastIndex, s === Dt ? u[1] === "!--" ? s = Ue : u[1] !== void 0 ? s = Ve : u[2] !== void 0 ? (li.test(u[2]) && (r = RegExp("</" + u[2], "g")), s = it) : u[3] !== void 0 && (s = it) : s === it ? u[0] === ">" ? (s = r ?? Dt, c = -1) : u[1] === void 0 ? c = -2 : (c = s.lastIndex - u[2].length, f = u[1], s = u[3] === void 0 ? it : u[3] === '"' ? je : Fe) : s === je || s === Fe ? s = it : s === Ue || s === Ve ? s = Dt : (s = it, r = void 0);
|
|
268
|
+
const p = s === it && i[l + 1].startsWith("/>") ? " " : "";
|
|
269
|
+
o += s === Dt ? d + Fi : c >= 0 ? (n.push(f), d.slice(0, c) + Kt + d.slice(c) + W + p) : d + W + (c === -2 ? (n.push(void 0), l) : p);
|
|
270
270
|
}
|
|
271
|
-
const
|
|
271
|
+
const a = o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
|
272
272
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
273
273
|
throw Error("invalid template strings array");
|
|
274
|
-
return [
|
|
274
|
+
return [ke !== void 0 ? ke.createHTML(a) : a, n];
|
|
275
275
|
};
|
|
276
|
-
class
|
|
276
|
+
class Mt {
|
|
277
277
|
constructor({ strings: t, _$litType$: e }, n) {
|
|
278
278
|
let r;
|
|
279
279
|
this.parts = [];
|
|
280
|
-
let o = 0,
|
|
281
|
-
const
|
|
282
|
-
if (this.el =
|
|
283
|
-
const u = this.el.content,
|
|
284
|
-
|
|
280
|
+
let o = 0, s = 0;
|
|
281
|
+
const a = t.length - 1, l = this.parts, [d, f] = di(t, e);
|
|
282
|
+
if (this.el = Mt.createElement(d, n), lt.currentNode = this.el.content, e === 2) {
|
|
283
|
+
const u = this.el.content, c = u.firstChild;
|
|
284
|
+
c.remove(), u.append(...c.childNodes);
|
|
285
285
|
}
|
|
286
|
-
for (; (r =
|
|
286
|
+
for (; (r = lt.nextNode()) !== null && l.length < a; ) {
|
|
287
287
|
if (r.nodeType === 1) {
|
|
288
288
|
if (r.hasAttributes()) {
|
|
289
289
|
const u = [];
|
|
290
|
-
for (const
|
|
291
|
-
if (
|
|
292
|
-
const
|
|
293
|
-
if (u.push(
|
|
294
|
-
const
|
|
295
|
-
l.push({ type: 1, index: o, name: v[2], strings:
|
|
290
|
+
for (const c of r.getAttributeNames())
|
|
291
|
+
if (c.endsWith(Kt) || c.startsWith(W)) {
|
|
292
|
+
const m = f[s++];
|
|
293
|
+
if (u.push(c), m !== void 0) {
|
|
294
|
+
const p = r.getAttribute(m.toLowerCase() + Kt).split(W), v = /([.?@])?(.*)/.exec(m);
|
|
295
|
+
l.push({ type: 1, index: o, name: v[2], strings: p, ctor: v[1] === "." ? ui : v[1] === "?" ? ci : v[1] === "@" ? fi : Ht });
|
|
296
296
|
} else
|
|
297
297
|
l.push({ type: 6, index: o });
|
|
298
298
|
}
|
|
299
|
-
for (const
|
|
300
|
-
r.removeAttribute(
|
|
299
|
+
for (const c of u)
|
|
300
|
+
r.removeAttribute(c);
|
|
301
301
|
}
|
|
302
|
-
if (
|
|
303
|
-
const u = r.textContent.split(
|
|
304
|
-
if (
|
|
305
|
-
r.textContent =
|
|
306
|
-
for (let
|
|
307
|
-
r.append(u[
|
|
308
|
-
r.append(u[
|
|
302
|
+
if (li.test(r.tagName)) {
|
|
303
|
+
const u = r.textContent.split(W), c = u.length - 1;
|
|
304
|
+
if (c > 0) {
|
|
305
|
+
r.textContent = _t ? _t.emptyScript : "";
|
|
306
|
+
for (let m = 0; m < c; m++)
|
|
307
|
+
r.append(u[m], Nt()), lt.nextNode(), l.push({ type: 2, index: ++o });
|
|
308
|
+
r.append(u[c], Nt());
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
} else if (r.nodeType === 8)
|
|
312
|
-
if (r.data ===
|
|
312
|
+
if (r.data === Te)
|
|
313
313
|
l.push({ type: 2, index: o });
|
|
314
314
|
else {
|
|
315
315
|
let u = -1;
|
|
316
|
-
for (; (u = r.data.indexOf(
|
|
317
|
-
l.push({ type: 7, index: o }), u +=
|
|
316
|
+
for (; (u = r.data.indexOf(W, u + 1)) !== -1; )
|
|
317
|
+
l.push({ type: 7, index: o }), u += W.length - 1;
|
|
318
318
|
}
|
|
319
319
|
o++;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
static createElement(t, e) {
|
|
323
|
-
const n =
|
|
323
|
+
const n = dt.createElement("template");
|
|
324
324
|
return n.innerHTML = t, n;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
var r, o,
|
|
329
|
-
if (t ===
|
|
327
|
+
function ht(i, t, e = i, n) {
|
|
328
|
+
var r, o, s, a;
|
|
329
|
+
if (t === j)
|
|
330
330
|
return t;
|
|
331
331
|
let l = n !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[n] : e._$Cl;
|
|
332
|
-
const d =
|
|
333
|
-
return (l == null ? void 0 : l.constructor) !== d && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), d === void 0 ? l = void 0 : (l = new d(i), l._$AT(i, e, n)), n !== void 0 ? ((
|
|
332
|
+
const d = Lt(t) ? void 0 : t._$litDirective$;
|
|
333
|
+
return (l == null ? void 0 : l.constructor) !== d && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), d === void 0 ? l = void 0 : (l = new d(i), l._$AT(i, e, n)), n !== void 0 ? ((s = (a = e)._$Co) !== null && s !== void 0 ? s : a._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = ht(i, l._$AS(i, t.values), l, n)), t;
|
|
334
334
|
}
|
|
335
|
-
class
|
|
335
|
+
class hi {
|
|
336
336
|
constructor(t, e) {
|
|
337
337
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
338
338
|
}
|
|
@@ -344,17 +344,17 @@ class xn {
|
|
|
344
344
|
}
|
|
345
345
|
u(t) {
|
|
346
346
|
var e;
|
|
347
|
-
const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e :
|
|
348
|
-
|
|
349
|
-
let
|
|
347
|
+
const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : dt).importNode(n, !0);
|
|
348
|
+
lt.currentNode = o;
|
|
349
|
+
let s = lt.nextNode(), a = 0, l = 0, d = r[0];
|
|
350
350
|
for (; d !== void 0; ) {
|
|
351
|
-
if (
|
|
352
|
-
let
|
|
353
|
-
d.type === 2 ?
|
|
351
|
+
if (a === d.index) {
|
|
352
|
+
let f;
|
|
353
|
+
d.type === 2 ? f = new Et(s, s.nextSibling, this, t) : d.type === 1 ? f = new d.ctor(s, d.name, d.strings, this, t) : d.type === 6 && (f = new pi(s, this, t)), this._$AV.push(f), d = r[++l];
|
|
354
354
|
}
|
|
355
|
-
|
|
355
|
+
a !== (d == null ? void 0 : d.index) && (s = lt.nextNode(), a++);
|
|
356
356
|
}
|
|
357
|
-
return
|
|
357
|
+
return lt.currentNode = dt, o;
|
|
358
358
|
}
|
|
359
359
|
v(t) {
|
|
360
360
|
let e = 0;
|
|
@@ -362,7 +362,7 @@ class xn {
|
|
|
362
362
|
n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
class
|
|
365
|
+
class Et {
|
|
366
366
|
constructor(t, e, n, r) {
|
|
367
367
|
var o;
|
|
368
368
|
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = r, this._$Cp = (o = r == null ? void 0 : r.isConnected) === null || o === void 0 || o;
|
|
@@ -383,7 +383,7 @@ class It {
|
|
|
383
383
|
return this._$AB;
|
|
384
384
|
}
|
|
385
385
|
_$AI(t, e = this) {
|
|
386
|
-
t =
|
|
386
|
+
t = ht(this, t, e), Lt(t) ? t === E || t == null || t === "" ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : ai(t) ? this.T(t) : this._(t);
|
|
387
387
|
}
|
|
388
388
|
k(t) {
|
|
389
389
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -392,28 +392,28 @@ class It {
|
|
|
392
392
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
393
393
|
}
|
|
394
394
|
_(t) {
|
|
395
|
-
this._$AH !== E &&
|
|
395
|
+
this._$AH !== E && Lt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(dt.createTextNode(t)), this._$AH = t;
|
|
396
396
|
}
|
|
397
397
|
g(t) {
|
|
398
398
|
var e;
|
|
399
|
-
const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el =
|
|
399
|
+
const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Mt.createElement(r.h, this.options)), r);
|
|
400
400
|
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
|
|
401
401
|
this._$AH.v(n);
|
|
402
402
|
else {
|
|
403
|
-
const
|
|
404
|
-
|
|
403
|
+
const s = new hi(o, this), a = s.u(this.options);
|
|
404
|
+
s.v(n), this.$(a), this._$AH = s;
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
_$AC(t) {
|
|
408
|
-
let e =
|
|
409
|
-
return e === void 0 &&
|
|
408
|
+
let e = ze.get(t.strings);
|
|
409
|
+
return e === void 0 && ze.set(t.strings, e = new Mt(t)), e;
|
|
410
410
|
}
|
|
411
411
|
T(t) {
|
|
412
|
-
|
|
412
|
+
si(this._$AH) || (this._$AH = [], this._$AR());
|
|
413
413
|
const e = this._$AH;
|
|
414
414
|
let n, r = 0;
|
|
415
415
|
for (const o of t)
|
|
416
|
-
r === e.length ? e.push(n = new
|
|
416
|
+
r === e.length ? e.push(n = new Et(this.k(Nt()), this.k(Nt()), this, this.options)) : n = e[r], n._$AI(o), r++;
|
|
417
417
|
r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
|
|
418
418
|
}
|
|
419
419
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -428,7 +428,7 @@ class It {
|
|
|
428
428
|
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
class
|
|
431
|
+
class Ht {
|
|
432
432
|
constructor(t, e, n, r, o) {
|
|
433
433
|
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = e, 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 = E;
|
|
434
434
|
}
|
|
@@ -440,22 +440,22 @@ class Kt {
|
|
|
440
440
|
}
|
|
441
441
|
_$AI(t, e = this, n, r) {
|
|
442
442
|
const o = this.strings;
|
|
443
|
-
let
|
|
443
|
+
let s = !1;
|
|
444
444
|
if (o === void 0)
|
|
445
|
-
t =
|
|
445
|
+
t = ht(this, t, e, 0), s = !Lt(t) || t !== this._$AH && t !== j, s && (this._$AH = t);
|
|
446
446
|
else {
|
|
447
|
-
const
|
|
447
|
+
const a = t;
|
|
448
448
|
let l, d;
|
|
449
449
|
for (t = o[0], l = 0; l < o.length - 1; l++)
|
|
450
|
-
d =
|
|
450
|
+
d = ht(this, a[n + l], e, l), d === j && (d = this._$AH[l]), s || (s = !Lt(d) || d !== this._$AH[l]), d === E ? t = E : t !== E && (t += (d ?? "") + o[l + 1]), this._$AH[l] = d;
|
|
451
451
|
}
|
|
452
|
-
|
|
452
|
+
s && !r && this.j(t);
|
|
453
453
|
}
|
|
454
454
|
j(t) {
|
|
455
455
|
t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
class
|
|
458
|
+
class ui extends Ht {
|
|
459
459
|
constructor() {
|
|
460
460
|
super(...arguments), this.type = 3;
|
|
461
461
|
}
|
|
@@ -463,32 +463,32 @@ class Pn extends Kt {
|
|
|
463
463
|
this.element[this.name] = t === E ? void 0 : t;
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
const
|
|
467
|
-
class
|
|
466
|
+
const zi = _t ? _t.emptyScript : "";
|
|
467
|
+
class ci extends Ht {
|
|
468
468
|
constructor() {
|
|
469
469
|
super(...arguments), this.type = 4;
|
|
470
470
|
}
|
|
471
471
|
j(t) {
|
|
472
|
-
t && t !== E ? this.element.setAttribute(this.name,
|
|
472
|
+
t && t !== E ? this.element.setAttribute(this.name, zi) : this.element.removeAttribute(this.name);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
class
|
|
475
|
+
class fi extends Ht {
|
|
476
476
|
constructor(t, e, n, r, o) {
|
|
477
477
|
super(t, e, n, r, o), this.type = 5;
|
|
478
478
|
}
|
|
479
479
|
_$AI(t, e = this) {
|
|
480
480
|
var n;
|
|
481
|
-
if ((t = (n =
|
|
481
|
+
if ((t = (n = ht(this, t, e, 0)) !== null && n !== void 0 ? n : E) === j)
|
|
482
482
|
return;
|
|
483
|
-
const r = this._$AH, o = t === E && r !== E || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive,
|
|
484
|
-
o && this.element.removeEventListener(this.name, this, r),
|
|
483
|
+
const r = this._$AH, o = t === E && r !== E || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, s = t !== E && (r === E || o);
|
|
484
|
+
o && this.element.removeEventListener(this.name, this, r), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(t) {
|
|
487
487
|
var e, n;
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call((n = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && n !== void 0 ? n : this.element, t) : this._$AH.handleEvent(t);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
class
|
|
491
|
+
class pi {
|
|
492
492
|
constructor(t, e, n) {
|
|
493
493
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
|
|
494
494
|
}
|
|
@@ -496,28 +496,28 @@ class Mn {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(t) {
|
|
499
|
-
|
|
499
|
+
ht(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const Xi = { O: Kt, P: W, A: Te, C: 1, M: di, L: hi, D: ai, R: ht, I: Et, V: Ht, H: ci, N: fi, U: ui, F: pi }, Xe = Zt.litHtmlPolyfillSupport;
|
|
503
|
+
Xe == null || Xe(Mt, Et), ((le = Zt.litHtmlVersions) !== null && le !== void 0 ? le : Zt.litHtmlVersions = []).push("2.7.4");
|
|
504
|
+
const Yi = (i, t, e) => {
|
|
505
505
|
var n, r;
|
|
506
506
|
const o = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
|
|
507
|
-
let
|
|
508
|
-
if (
|
|
509
|
-
const
|
|
510
|
-
o._$litPart$ =
|
|
507
|
+
let s = o._$litPart$;
|
|
508
|
+
if (s === void 0) {
|
|
509
|
+
const a = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
|
|
510
|
+
o._$litPart$ = s = new Et(t.insertBefore(Nt(), a), a, void 0, e ?? {});
|
|
511
511
|
}
|
|
512
|
-
return
|
|
512
|
+
return s._$AI(i), s;
|
|
513
513
|
};
|
|
514
514
|
/**
|
|
515
515
|
* @license
|
|
516
516
|
* Copyright 2017 Google LLC
|
|
517
517
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
518
518
|
*/
|
|
519
|
-
var
|
|
520
|
-
class
|
|
519
|
+
var he, ue;
|
|
520
|
+
let vt = class extends pt {
|
|
521
521
|
constructor() {
|
|
522
522
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
523
523
|
}
|
|
@@ -528,7 +528,7 @@ class ft extends ht {
|
|
|
528
528
|
}
|
|
529
529
|
update(t) {
|
|
530
530
|
const e = this.render();
|
|
531
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
531
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Yi(e, this.renderRoot, this.renderOptions);
|
|
532
532
|
}
|
|
533
533
|
connectedCallback() {
|
|
534
534
|
var t;
|
|
@@ -539,22 +539,22 @@ class ft extends ht {
|
|
|
539
539
|
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
540
540
|
}
|
|
541
541
|
render() {
|
|
542
|
-
return
|
|
542
|
+
return j;
|
|
543
543
|
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
((
|
|
544
|
+
};
|
|
545
|
+
vt.finalized = !0, vt._$litElement$ = !0, (he = globalThis.litElementHydrateSupport) === null || he === void 0 || he.call(globalThis, { LitElement: vt });
|
|
546
|
+
const Ye = globalThis.litElementPolyfillSupport;
|
|
547
|
+
Ye == null || Ye({ LitElement: vt });
|
|
548
|
+
((ue = globalThis.litElementVersions) !== null && ue !== void 0 ? ue : globalThis.litElementVersions = []).push("3.3.2");
|
|
549
549
|
/**
|
|
550
550
|
* @license
|
|
551
551
|
* Copyright 2017 Google LLC
|
|
552
552
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
553
553
|
*/
|
|
554
|
-
const
|
|
554
|
+
const gi = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => {
|
|
555
555
|
const { kind: r, elements: o } = n;
|
|
556
|
-
return { kind: r, elements: o, finisher(
|
|
557
|
-
customElements.define(e,
|
|
556
|
+
return { kind: r, elements: o, finisher(s) {
|
|
557
|
+
customElements.define(e, s);
|
|
558
558
|
} };
|
|
559
559
|
})(i, t);
|
|
560
560
|
/**
|
|
@@ -562,51 +562,198 @@ const en = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.def
|
|
|
562
562
|
* Copyright 2017 Google LLC
|
|
563
563
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
564
564
|
*/
|
|
565
|
-
const
|
|
565
|
+
const Wi = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
|
566
566
|
e.createProperty(t.key, i);
|
|
567
567
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
568
568
|
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
569
569
|
}, finisher(e) {
|
|
570
570
|
e.createProperty(t.key, i);
|
|
571
|
-
} },
|
|
571
|
+
} }, Gi = (i, t, e) => {
|
|
572
572
|
t.constructor.createProperty(e, i);
|
|
573
573
|
};
|
|
574
|
-
function
|
|
575
|
-
return (t, e) => e !== void 0 ?
|
|
574
|
+
function R(i) {
|
|
575
|
+
return (t, e) => e !== void 0 ? Gi(i, t, e) : Wi(i, t);
|
|
576
576
|
}
|
|
577
577
|
/**
|
|
578
578
|
* @license
|
|
579
579
|
* Copyright 2017 Google LLC
|
|
580
580
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
581
581
|
*/
|
|
582
|
-
function
|
|
583
|
-
return
|
|
582
|
+
function $t(i) {
|
|
583
|
+
return R({ ...i, state: !0 });
|
|
584
584
|
}
|
|
585
585
|
/**
|
|
586
586
|
* @license
|
|
587
587
|
* Copyright 2021 Google LLC
|
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
589
589
|
*/
|
|
590
|
-
var
|
|
591
|
-
((
|
|
590
|
+
var ce;
|
|
591
|
+
((ce = window.HTMLSlotElement) === null || ce === void 0 ? void 0 : ce.prototype.assignedElements) != null;
|
|
592
592
|
/**
|
|
593
593
|
* @license
|
|
594
|
-
* Copyright
|
|
594
|
+
* Copyright 2017 Google LLC
|
|
595
595
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
596
596
|
*/
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
597
|
+
const st = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, mi = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
598
|
+
class vi {
|
|
599
|
+
constructor(t) {
|
|
600
|
+
}
|
|
601
|
+
get _$AU() {
|
|
602
|
+
return this._$AM._$AU;
|
|
603
|
+
}
|
|
604
|
+
_$AT(t, e, n) {
|
|
605
|
+
this._$Ct = t, this._$AM = e, this._$Ci = n;
|
|
606
|
+
}
|
|
607
|
+
_$AS(t, e) {
|
|
608
|
+
return this.update(t, e);
|
|
609
|
+
}
|
|
610
|
+
update(t, e) {
|
|
611
|
+
return this.render(...e);
|
|
602
612
|
}
|
|
603
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* @license
|
|
616
|
+
* Copyright 2020 Google LLC
|
|
617
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
618
|
+
*/
|
|
619
|
+
const { I: qi } = Xi, Zi = (i) => i.strings === void 0, We = () => document.createComment(""), Tt = (i, t, e) => {
|
|
620
|
+
var n;
|
|
621
|
+
const r = i._$AA.parentNode, o = t === void 0 ? i._$AB : t._$AA;
|
|
622
|
+
if (e === void 0) {
|
|
623
|
+
const s = r.insertBefore(We(), o), a = r.insertBefore(We(), o);
|
|
624
|
+
e = new qi(s, a, i, i.options);
|
|
625
|
+
} else {
|
|
626
|
+
const s = e._$AB.nextSibling, a = e._$AM, l = a !== i;
|
|
627
|
+
if (l) {
|
|
628
|
+
let d;
|
|
629
|
+
(n = e._$AQ) === null || n === void 0 || n.call(e, i), e._$AM = i, e._$AP !== void 0 && (d = i._$AU) !== a._$AU && e._$AP(d);
|
|
630
|
+
}
|
|
631
|
+
if (s !== o || l) {
|
|
632
|
+
let d = e._$AA;
|
|
633
|
+
for (; d !== s; ) {
|
|
634
|
+
const f = d.nextSibling;
|
|
635
|
+
r.insertBefore(d, o), d = f;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
return e;
|
|
640
|
+
}, nt = (i, t, e = i) => (i._$AI(t, e), i), Ki = {}, yi = (i, t = Ki) => i._$AH = t, Qi = (i) => i._$AH, fe = (i) => {
|
|
641
|
+
var t;
|
|
642
|
+
(t = i._$AP) === null || t === void 0 || t.call(i, !1, !0);
|
|
643
|
+
let e = i._$AA;
|
|
644
|
+
const n = i._$AB.nextSibling;
|
|
645
|
+
for (; e !== n; ) {
|
|
646
|
+
const r = e.nextSibling;
|
|
647
|
+
e.remove(), e = r;
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
/**
|
|
651
|
+
* @license
|
|
652
|
+
* Copyright 2017 Google LLC
|
|
653
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
654
|
+
*/
|
|
655
|
+
const Ge = (i, t, e) => {
|
|
656
|
+
const n = /* @__PURE__ */ new Map();
|
|
657
|
+
for (let r = t; r <= e; r++)
|
|
658
|
+
n.set(i[r], r);
|
|
659
|
+
return n;
|
|
660
|
+
}, we = mi(class extends vi {
|
|
661
|
+
constructor(i) {
|
|
662
|
+
if (super(i), i.type !== st.CHILD)
|
|
663
|
+
throw Error("repeat() can only be used in text expressions");
|
|
664
|
+
}
|
|
665
|
+
dt(i, t, e) {
|
|
666
|
+
let n;
|
|
667
|
+
e === void 0 ? e = t : t !== void 0 && (n = t);
|
|
668
|
+
const r = [], o = [];
|
|
669
|
+
let s = 0;
|
|
670
|
+
for (const a of i)
|
|
671
|
+
r[s] = n ? n(a, s) : s, o[s] = e(a, s), s++;
|
|
672
|
+
return { values: o, keys: r };
|
|
673
|
+
}
|
|
674
|
+
render(i, t, e) {
|
|
675
|
+
return this.dt(i, t, e).values;
|
|
676
|
+
}
|
|
677
|
+
update(i, [t, e, n]) {
|
|
678
|
+
var r;
|
|
679
|
+
const o = Qi(i), { values: s, keys: a } = this.dt(t, e, n);
|
|
680
|
+
if (!Array.isArray(o))
|
|
681
|
+
return this.ht = a, s;
|
|
682
|
+
const l = (r = this.ht) !== null && r !== void 0 ? r : this.ht = [], d = [];
|
|
683
|
+
let f, u, c = 0, m = o.length - 1, p = 0, v = s.length - 1;
|
|
684
|
+
for (; c <= m && p <= v; )
|
|
685
|
+
if (o[c] === null)
|
|
686
|
+
c++;
|
|
687
|
+
else if (o[m] === null)
|
|
688
|
+
m--;
|
|
689
|
+
else if (l[c] === a[p])
|
|
690
|
+
d[p] = nt(o[c], s[p]), c++, p++;
|
|
691
|
+
else if (l[m] === a[v])
|
|
692
|
+
d[v] = nt(o[m], s[v]), m--, v--;
|
|
693
|
+
else if (l[c] === a[v])
|
|
694
|
+
d[v] = nt(o[c], s[v]), Tt(i, d[v + 1], o[c]), c++, v--;
|
|
695
|
+
else if (l[m] === a[p])
|
|
696
|
+
d[p] = nt(o[m], s[p]), Tt(i, o[c], o[m]), m--, p++;
|
|
697
|
+
else if (f === void 0 && (f = Ge(a, p, v), u = Ge(l, c, m)), f.has(l[c]))
|
|
698
|
+
if (f.has(l[m])) {
|
|
699
|
+
const D = u.get(a[p]), V = D !== void 0 ? o[D] : null;
|
|
700
|
+
if (V === null) {
|
|
701
|
+
const O = Tt(i, o[c]);
|
|
702
|
+
nt(O, s[p]), d[p] = O;
|
|
703
|
+
} else
|
|
704
|
+
d[p] = nt(V, s[p]), Tt(i, o[c], V), o[D] = null;
|
|
705
|
+
p++;
|
|
706
|
+
} else
|
|
707
|
+
fe(o[m]), m--;
|
|
708
|
+
else
|
|
709
|
+
fe(o[c]), c++;
|
|
710
|
+
for (; p <= v; ) {
|
|
711
|
+
const D = Tt(i, d[v + 1]);
|
|
712
|
+
nt(D, s[p]), d[p++] = D;
|
|
713
|
+
}
|
|
714
|
+
for (; c <= m; ) {
|
|
715
|
+
const D = o[c++];
|
|
716
|
+
D !== null && fe(D);
|
|
717
|
+
}
|
|
718
|
+
return this.ht = a, yi(i, d), j;
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
/**
|
|
722
|
+
* @license
|
|
723
|
+
* Copyright 2020 Google LLC
|
|
724
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
725
|
+
*/
|
|
726
|
+
const Ce = mi(class extends vi {
|
|
727
|
+
constructor(i) {
|
|
728
|
+
if (super(i), i.type !== st.PROPERTY && i.type !== st.ATTRIBUTE && i.type !== st.BOOLEAN_ATTRIBUTE)
|
|
729
|
+
throw Error("The `live` directive is not allowed on child or event bindings");
|
|
730
|
+
if (!Zi(i))
|
|
731
|
+
throw Error("`live` bindings can only contain a single expression");
|
|
732
|
+
}
|
|
733
|
+
render(i) {
|
|
734
|
+
return i;
|
|
735
|
+
}
|
|
736
|
+
update(i, [t]) {
|
|
737
|
+
if (t === j || t === E)
|
|
738
|
+
return t;
|
|
739
|
+
const e = i.element, n = i.name;
|
|
740
|
+
if (i.type === st.PROPERTY) {
|
|
741
|
+
if (t === e[n])
|
|
742
|
+
return j;
|
|
743
|
+
} else if (i.type === st.BOOLEAN_ATTRIBUTE) {
|
|
744
|
+
if (!!t === e.hasAttribute(n))
|
|
745
|
+
return j;
|
|
746
|
+
} else if (i.type === st.ATTRIBUTE && e.getAttribute(n) === t + "")
|
|
747
|
+
return j;
|
|
748
|
+
return yi(i), t;
|
|
749
|
+
}
|
|
750
|
+
});
|
|
604
751
|
/**
|
|
605
752
|
* @license
|
|
606
753
|
* Copyright 2021 Google LLC
|
|
607
754
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
608
755
|
*/
|
|
609
|
-
function
|
|
756
|
+
function _i(i, t, e) {
|
|
610
757
|
return i ? t() : e == null ? void 0 : e();
|
|
611
758
|
}
|
|
612
759
|
/**!
|
|
@@ -615,7 +762,7 @@ function nn(i, t, e) {
|
|
|
615
762
|
* @author owenm <owen23355@gmail.com>
|
|
616
763
|
* @license MIT
|
|
617
764
|
*/
|
|
618
|
-
function
|
|
765
|
+
function qe(i, t) {
|
|
619
766
|
var e = Object.keys(i);
|
|
620
767
|
if (Object.getOwnPropertySymbols) {
|
|
621
768
|
var n = Object.getOwnPropertySymbols(i);
|
|
@@ -625,26 +772,26 @@ function Ve(i, t) {
|
|
|
625
772
|
}
|
|
626
773
|
return e;
|
|
627
774
|
}
|
|
628
|
-
function
|
|
775
|
+
function X(i) {
|
|
629
776
|
for (var t = 1; t < arguments.length; t++) {
|
|
630
777
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
631
|
-
t % 2 ?
|
|
632
|
-
|
|
633
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) :
|
|
778
|
+
t % 2 ? qe(Object(e), !0).forEach(function(n) {
|
|
779
|
+
Ji(i, n, e[n]);
|
|
780
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : qe(Object(e)).forEach(function(n) {
|
|
634
781
|
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
|
|
635
782
|
});
|
|
636
783
|
}
|
|
637
784
|
return i;
|
|
638
785
|
}
|
|
639
|
-
function
|
|
786
|
+
function zt(i) {
|
|
640
787
|
"@babel/helpers - typeof";
|
|
641
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
788
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? zt = function(t) {
|
|
642
789
|
return typeof t;
|
|
643
|
-
} :
|
|
790
|
+
} : zt = function(t) {
|
|
644
791
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
645
|
-
},
|
|
792
|
+
}, zt(i);
|
|
646
793
|
}
|
|
647
|
-
function
|
|
794
|
+
function Ji(i, t, e) {
|
|
648
795
|
return t in i ? Object.defineProperty(i, t, {
|
|
649
796
|
value: e,
|
|
650
797
|
enumerable: !0,
|
|
@@ -652,17 +799,17 @@ function Bn(i, t, e) {
|
|
|
652
799
|
writable: !0
|
|
653
800
|
}) : i[t] = e, i;
|
|
654
801
|
}
|
|
655
|
-
function
|
|
656
|
-
return
|
|
802
|
+
function J() {
|
|
803
|
+
return J = Object.assign || function(i) {
|
|
657
804
|
for (var t = 1; t < arguments.length; t++) {
|
|
658
805
|
var e = arguments[t];
|
|
659
806
|
for (var n in e)
|
|
660
807
|
Object.prototype.hasOwnProperty.call(e, n) && (i[n] = e[n]);
|
|
661
808
|
}
|
|
662
809
|
return i;
|
|
663
|
-
},
|
|
810
|
+
}, J.apply(this, arguments);
|
|
664
811
|
}
|
|
665
|
-
function
|
|
812
|
+
function tn(i, t) {
|
|
666
813
|
if (i == null)
|
|
667
814
|
return {};
|
|
668
815
|
var e = {}, n = Object.keys(i), r, o;
|
|
@@ -670,10 +817,10 @@ function Un(i, t) {
|
|
|
670
817
|
r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
|
|
671
818
|
return e;
|
|
672
819
|
}
|
|
673
|
-
function
|
|
820
|
+
function en(i, t) {
|
|
674
821
|
if (i == null)
|
|
675
822
|
return {};
|
|
676
|
-
var e =
|
|
823
|
+
var e = tn(i, t), n, r;
|
|
677
824
|
if (Object.getOwnPropertySymbols) {
|
|
678
825
|
var o = Object.getOwnPropertySymbols(i);
|
|
679
826
|
for (r = 0; r < o.length; r++)
|
|
@@ -681,22 +828,22 @@ function Vn(i, t) {
|
|
|
681
828
|
}
|
|
682
829
|
return e;
|
|
683
830
|
}
|
|
684
|
-
var
|
|
685
|
-
function
|
|
831
|
+
var nn = "1.15.0";
|
|
832
|
+
function G(i) {
|
|
686
833
|
if (typeof window < "u" && window.navigator)
|
|
687
834
|
return !!/* @__PURE__ */ navigator.userAgent.match(i);
|
|
688
835
|
}
|
|
689
|
-
var
|
|
836
|
+
var tt = G(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ie = G(/Edge/i), Ze = G(/firefox/i), Xt = G(/safari/i) && !G(/chrome/i) && !G(/android/i), bi = G(/iP(ad|od|hone)/i), Ei = G(/chrome/i) && G(/android/i), $i = {
|
|
690
837
|
capture: !1,
|
|
691
838
|
passive: !1
|
|
692
839
|
};
|
|
693
840
|
function $(i, t, e) {
|
|
694
|
-
i.addEventListener(t, e, !
|
|
841
|
+
i.addEventListener(t, e, !tt && $i);
|
|
695
842
|
}
|
|
696
843
|
function b(i, t, e) {
|
|
697
|
-
i.removeEventListener(t, e, !
|
|
844
|
+
i.removeEventListener(t, e, !tt && $i);
|
|
698
845
|
}
|
|
699
|
-
function
|
|
846
|
+
function Qt(i, t) {
|
|
700
847
|
if (t) {
|
|
701
848
|
if (t[0] === ">" && (t = t.substring(1)), i)
|
|
702
849
|
try {
|
|
@@ -712,32 +859,32 @@ function Yt(i, t) {
|
|
|
712
859
|
return !1;
|
|
713
860
|
}
|
|
714
861
|
}
|
|
715
|
-
function
|
|
862
|
+
function rn(i) {
|
|
716
863
|
return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
|
|
717
864
|
}
|
|
718
|
-
function
|
|
865
|
+
function z(i, t, e, n) {
|
|
719
866
|
if (i) {
|
|
720
867
|
e = e || document;
|
|
721
868
|
do {
|
|
722
|
-
if (t != null && (t[0] === ">" ? i.parentNode === e &&
|
|
869
|
+
if (t != null && (t[0] === ">" ? i.parentNode === e && Qt(i, t) : Qt(i, t)) || n && i === e)
|
|
723
870
|
return i;
|
|
724
871
|
if (i === e)
|
|
725
872
|
break;
|
|
726
|
-
} while (i =
|
|
873
|
+
} while (i = rn(i));
|
|
727
874
|
}
|
|
728
875
|
return null;
|
|
729
876
|
}
|
|
730
|
-
var
|
|
731
|
-
function
|
|
877
|
+
var Ke = /\s+/g;
|
|
878
|
+
function M(i, t, e) {
|
|
732
879
|
if (i && t)
|
|
733
880
|
if (i.classList)
|
|
734
881
|
i.classList[e ? "add" : "remove"](t);
|
|
735
882
|
else {
|
|
736
|
-
var n = (" " + i.className + " ").replace(
|
|
737
|
-
i.className = (n + (e ? " " + t : "")).replace(
|
|
883
|
+
var n = (" " + i.className + " ").replace(Ke, " ").replace(" " + t + " ", " ");
|
|
884
|
+
i.className = (n + (e ? " " + t : "")).replace(Ke, " ");
|
|
738
885
|
}
|
|
739
886
|
}
|
|
740
|
-
function
|
|
887
|
+
function g(i, t, e) {
|
|
741
888
|
var n = i && i.style;
|
|
742
889
|
if (n) {
|
|
743
890
|
if (e === void 0)
|
|
@@ -745,19 +892,19 @@ function p(i, t, e) {
|
|
|
745
892
|
!(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
|
|
746
893
|
}
|
|
747
894
|
}
|
|
748
|
-
function
|
|
895
|
+
function yt(i, t) {
|
|
749
896
|
var e = "";
|
|
750
897
|
if (typeof i == "string")
|
|
751
898
|
e = i;
|
|
752
899
|
else
|
|
753
900
|
do {
|
|
754
|
-
var n =
|
|
901
|
+
var n = g(i, "transform");
|
|
755
902
|
n && n !== "none" && (e = n + " " + e);
|
|
756
903
|
} while (!t && (i = i.parentNode));
|
|
757
904
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
758
905
|
return r && new r(e);
|
|
759
906
|
}
|
|
760
|
-
function
|
|
907
|
+
function wi(i, t, e) {
|
|
761
908
|
if (i) {
|
|
762
909
|
var n = i.getElementsByTagName(t), r = 0, o = n.length;
|
|
763
910
|
if (e)
|
|
@@ -767,80 +914,80 @@ function sn(i, t, e) {
|
|
|
767
914
|
}
|
|
768
915
|
return [];
|
|
769
916
|
}
|
|
770
|
-
function
|
|
917
|
+
function Q() {
|
|
771
918
|
var i = document.scrollingElement;
|
|
772
919
|
return i || document.documentElement;
|
|
773
920
|
}
|
|
774
|
-
function
|
|
921
|
+
function T(i, t, e, n, r) {
|
|
775
922
|
if (!(!i.getBoundingClientRect && i !== window)) {
|
|
776
|
-
var o,
|
|
777
|
-
if (i !== window && i.parentNode && i !==
|
|
923
|
+
var o, s, a, l, d, f, u;
|
|
924
|
+
if (i !== window && i.parentNode && i !== Q() ? (o = i.getBoundingClientRect(), s = o.top, a = o.left, l = o.bottom, d = o.right, f = o.height, u = o.width) : (s = 0, a = 0, l = window.innerHeight, d = window.innerWidth, f = window.innerHeight, u = window.innerWidth), (t || e) && i !== window && (r = r || i.parentNode, !tt))
|
|
778
925
|
do
|
|
779
|
-
if (r && r.getBoundingClientRect && (
|
|
780
|
-
var
|
|
781
|
-
|
|
926
|
+
if (r && r.getBoundingClientRect && (g(r, "transform") !== "none" || e && g(r, "position") !== "static")) {
|
|
927
|
+
var c = r.getBoundingClientRect();
|
|
928
|
+
s -= c.top + parseInt(g(r, "border-top-width")), a -= c.left + parseInt(g(r, "border-left-width")), l = s + o.height, d = a + o.width;
|
|
782
929
|
break;
|
|
783
930
|
}
|
|
784
931
|
while (r = r.parentNode);
|
|
785
932
|
if (n && i !== window) {
|
|
786
|
-
var
|
|
787
|
-
|
|
933
|
+
var m = yt(r || i), p = m && m.a, v = m && m.d;
|
|
934
|
+
m && (s /= v, a /= p, u /= p, f /= v, l = s + f, d = a + u);
|
|
788
935
|
}
|
|
789
936
|
return {
|
|
790
|
-
top:
|
|
791
|
-
left:
|
|
937
|
+
top: s,
|
|
938
|
+
left: a,
|
|
792
939
|
bottom: l,
|
|
793
940
|
right: d,
|
|
794
941
|
width: u,
|
|
795
|
-
height:
|
|
942
|
+
height: f
|
|
796
943
|
};
|
|
797
944
|
}
|
|
798
945
|
}
|
|
799
|
-
function
|
|
800
|
-
for (var n =
|
|
801
|
-
var o =
|
|
802
|
-
if (e === "top" || e === "left" ?
|
|
946
|
+
function Qe(i, t, e) {
|
|
947
|
+
for (var n = ti(i, !0), r = T(i)[t]; n; ) {
|
|
948
|
+
var o = T(n)[e], s = void 0;
|
|
949
|
+
if (e === "top" || e === "left" ? s = r >= o : s = r <= o, !s)
|
|
803
950
|
return n;
|
|
804
|
-
if (n ===
|
|
951
|
+
if (n === Q())
|
|
805
952
|
break;
|
|
806
|
-
n =
|
|
953
|
+
n = ti(n, !1);
|
|
807
954
|
}
|
|
808
955
|
return !1;
|
|
809
956
|
}
|
|
810
|
-
function
|
|
811
|
-
for (var r = 0, o = 0,
|
|
812
|
-
if (
|
|
957
|
+
function bt(i, t, e, n) {
|
|
958
|
+
for (var r = 0, o = 0, s = i.children; o < s.length; ) {
|
|
959
|
+
if (s[o].style.display !== "none" && s[o] !== y.ghost && (n || s[o] !== y.dragged) && z(s[o], e.draggable, i, !1)) {
|
|
813
960
|
if (r === t)
|
|
814
|
-
return
|
|
961
|
+
return s[o];
|
|
815
962
|
r++;
|
|
816
963
|
}
|
|
817
964
|
o++;
|
|
818
965
|
}
|
|
819
966
|
return null;
|
|
820
967
|
}
|
|
821
|
-
function
|
|
822
|
-
for (var e = i.lastElementChild; e && (e ===
|
|
968
|
+
function xe(i, t) {
|
|
969
|
+
for (var e = i.lastElementChild; e && (e === y.ghost || g(e, "display") === "none" || t && !Qt(e, t)); )
|
|
823
970
|
e = e.previousElementSibling;
|
|
824
971
|
return e || null;
|
|
825
972
|
}
|
|
826
|
-
function
|
|
973
|
+
function k(i, t) {
|
|
827
974
|
var e = 0;
|
|
828
975
|
if (!i || !i.parentNode)
|
|
829
976
|
return -1;
|
|
830
977
|
for (; i = i.previousElementSibling; )
|
|
831
|
-
i.nodeName.toUpperCase() !== "TEMPLATE" && i !==
|
|
978
|
+
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== y.clone && (!t || Qt(i, t)) && e++;
|
|
832
979
|
return e;
|
|
833
980
|
}
|
|
834
|
-
function
|
|
835
|
-
var t = 0, e = 0, n =
|
|
981
|
+
function Je(i) {
|
|
982
|
+
var t = 0, e = 0, n = Q();
|
|
836
983
|
if (i)
|
|
837
984
|
do {
|
|
838
|
-
var r =
|
|
839
|
-
t += i.scrollLeft * o, e += i.scrollTop *
|
|
985
|
+
var r = yt(i), o = r.a, s = r.d;
|
|
986
|
+
t += i.scrollLeft * o, e += i.scrollTop * s;
|
|
840
987
|
} while (i !== n && (i = i.parentNode));
|
|
841
988
|
return [t, e];
|
|
842
989
|
}
|
|
843
|
-
function
|
|
990
|
+
function on(i, t) {
|
|
844
991
|
for (var e in i)
|
|
845
992
|
if (i.hasOwnProperty(e)) {
|
|
846
993
|
for (var n in t)
|
|
@@ -849,68 +996,68 @@ function zn(i, t) {
|
|
|
849
996
|
}
|
|
850
997
|
return -1;
|
|
851
998
|
}
|
|
852
|
-
function
|
|
999
|
+
function ti(i, t) {
|
|
853
1000
|
if (!i || !i.getBoundingClientRect)
|
|
854
|
-
return
|
|
1001
|
+
return Q();
|
|
855
1002
|
var e = i, n = !1;
|
|
856
1003
|
do
|
|
857
1004
|
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
858
|
-
var r =
|
|
1005
|
+
var r = g(e);
|
|
859
1006
|
if (e.clientWidth < e.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
860
1007
|
if (!e.getBoundingClientRect || e === document.body)
|
|
861
|
-
return
|
|
1008
|
+
return Q();
|
|
862
1009
|
if (n || t)
|
|
863
1010
|
return e;
|
|
864
1011
|
n = !0;
|
|
865
1012
|
}
|
|
866
1013
|
}
|
|
867
1014
|
while (e = e.parentNode);
|
|
868
|
-
return
|
|
1015
|
+
return Q();
|
|
869
1016
|
}
|
|
870
|
-
function
|
|
1017
|
+
function sn(i, t) {
|
|
871
1018
|
if (i && t)
|
|
872
1019
|
for (var e in t)
|
|
873
1020
|
t.hasOwnProperty(e) && (i[e] = t[e]);
|
|
874
1021
|
return i;
|
|
875
1022
|
}
|
|
876
|
-
function
|
|
1023
|
+
function pe(i, t) {
|
|
877
1024
|
return Math.round(i.top) === Math.round(t.top) && Math.round(i.left) === Math.round(t.left) && Math.round(i.height) === Math.round(t.height) && Math.round(i.width) === Math.round(t.width);
|
|
878
1025
|
}
|
|
879
|
-
var
|
|
880
|
-
function
|
|
1026
|
+
var ge;
|
|
1027
|
+
function an(i, t) {
|
|
881
1028
|
return function() {
|
|
882
|
-
if (!
|
|
1029
|
+
if (!ge) {
|
|
883
1030
|
var e = arguments, n = this;
|
|
884
|
-
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e),
|
|
885
|
-
|
|
1031
|
+
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e), ge = setTimeout(function() {
|
|
1032
|
+
ge = void 0;
|
|
886
1033
|
}, t);
|
|
887
1034
|
}
|
|
888
1035
|
};
|
|
889
1036
|
}
|
|
890
|
-
function
|
|
1037
|
+
function ln(i, t, e) {
|
|
891
1038
|
i.scrollLeft += t, i.scrollTop += e;
|
|
892
1039
|
}
|
|
893
|
-
function
|
|
1040
|
+
function Ci(i) {
|
|
894
1041
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
895
1042
|
return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
|
|
896
1043
|
}
|
|
897
|
-
var
|
|
898
|
-
function
|
|
1044
|
+
var U = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
1045
|
+
function dn() {
|
|
899
1046
|
var i = [], t;
|
|
900
1047
|
return {
|
|
901
1048
|
captureAnimationState: function() {
|
|
902
1049
|
if (i = [], !!this.options.animation) {
|
|
903
1050
|
var n = [].slice.call(this.el.children);
|
|
904
1051
|
n.forEach(function(r) {
|
|
905
|
-
if (!(
|
|
1052
|
+
if (!(g(r, "display") === "none" || r === y.ghost)) {
|
|
906
1053
|
i.push({
|
|
907
1054
|
target: r,
|
|
908
|
-
rect:
|
|
1055
|
+
rect: T(r)
|
|
909
1056
|
});
|
|
910
|
-
var o =
|
|
1057
|
+
var o = X({}, i[i.length - 1].rect);
|
|
911
1058
|
if (r.thisAnimationDuration) {
|
|
912
|
-
var
|
|
913
|
-
|
|
1059
|
+
var s = yt(r, !0);
|
|
1060
|
+
s && (o.top -= s.f, o.left -= s.e);
|
|
914
1061
|
}
|
|
915
1062
|
r.fromRect = o;
|
|
916
1063
|
}
|
|
@@ -921,7 +1068,7 @@ function Gn() {
|
|
|
921
1068
|
i.push(n);
|
|
922
1069
|
},
|
|
923
1070
|
removeAnimationState: function(n) {
|
|
924
|
-
i.splice(
|
|
1071
|
+
i.splice(on(i, {
|
|
925
1072
|
target: n
|
|
926
1073
|
}), 1);
|
|
927
1074
|
},
|
|
@@ -931,44 +1078,44 @@ function Gn() {
|
|
|
931
1078
|
clearTimeout(t), typeof n == "function" && n();
|
|
932
1079
|
return;
|
|
933
1080
|
}
|
|
934
|
-
var o = !1,
|
|
935
|
-
i.forEach(function(
|
|
936
|
-
var l = 0, d =
|
|
937
|
-
v && (u.top -= v.f, u.left -= v.e), d.toRect = u, d.thisAnimationDuration &&
|
|
938
|
-
(
|
|
1081
|
+
var o = !1, s = 0;
|
|
1082
|
+
i.forEach(function(a) {
|
|
1083
|
+
var l = 0, d = a.target, f = d.fromRect, u = T(d), c = d.prevFromRect, m = d.prevToRect, p = a.rect, v = yt(d, !0);
|
|
1084
|
+
v && (u.top -= v.f, u.left -= v.e), d.toRect = u, d.thisAnimationDuration && pe(c, u) && !pe(f, u) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1085
|
+
(p.top - u.top) / (p.left - u.left) === (f.top - u.top) / (f.left - u.left) && (l = un(p, c, m, r.options)), pe(u, f) || (d.prevFromRect = f, d.prevToRect = u, l || (l = r.options.animation), r.animate(d, p, u, l)), l && (o = !0, s = Math.max(s, l), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
|
|
939
1086
|
d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
|
|
940
1087
|
}, l), d.thisAnimationDuration = l);
|
|
941
1088
|
}), clearTimeout(t), o ? t = setTimeout(function() {
|
|
942
1089
|
typeof n == "function" && n();
|
|
943
|
-
},
|
|
1090
|
+
}, s) : typeof n == "function" && n(), i = [];
|
|
944
1091
|
},
|
|
945
|
-
animate: function(n, r, o,
|
|
946
|
-
if (
|
|
947
|
-
|
|
948
|
-
var
|
|
949
|
-
n.animatingX = !!
|
|
950
|
-
|
|
951
|
-
},
|
|
1092
|
+
animate: function(n, r, o, s) {
|
|
1093
|
+
if (s) {
|
|
1094
|
+
g(n, "transition", ""), g(n, "transform", "");
|
|
1095
|
+
var a = yt(this.el), l = a && a.a, d = a && a.d, f = (r.left - o.left) / (l || 1), u = (r.top - o.top) / (d || 1);
|
|
1096
|
+
n.animatingX = !!f, n.animatingY = !!u, g(n, "transform", "translate3d(" + f + "px," + u + "px,0)"), this.forRepaintDummy = hn(n), g(n, "transition", "transform " + s + "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() {
|
|
1097
|
+
g(n, "transition", ""), g(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
1098
|
+
}, s);
|
|
952
1099
|
}
|
|
953
1100
|
}
|
|
954
1101
|
};
|
|
955
1102
|
}
|
|
956
|
-
function
|
|
1103
|
+
function hn(i) {
|
|
957
1104
|
return i.offsetWidth;
|
|
958
1105
|
}
|
|
959
|
-
function
|
|
1106
|
+
function un(i, t, e, n) {
|
|
960
1107
|
return Math.sqrt(Math.pow(t.top - i.top, 2) + Math.pow(t.left - i.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * n.animation;
|
|
961
1108
|
}
|
|
962
|
-
var
|
|
1109
|
+
var ct = [], me = {
|
|
963
1110
|
initializeByDefault: !0
|
|
964
|
-
},
|
|
1111
|
+
}, Bt = {
|
|
965
1112
|
mount: function(t) {
|
|
966
|
-
for (var e in
|
|
967
|
-
|
|
968
|
-
|
|
1113
|
+
for (var e in me)
|
|
1114
|
+
me.hasOwnProperty(e) && !(e in t) && (t[e] = me[e]);
|
|
1115
|
+
ct.forEach(function(n) {
|
|
969
1116
|
if (n.pluginName === t.pluginName)
|
|
970
1117
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
971
|
-
}),
|
|
1118
|
+
}), ct.push(t);
|
|
972
1119
|
},
|
|
973
1120
|
pluginEvent: function(t, e, n) {
|
|
974
1121
|
var r = this;
|
|
@@ -976,181 +1123,181 @@ var lt = [], ue = {
|
|
|
976
1123
|
r.eventCanceled = !0;
|
|
977
1124
|
};
|
|
978
1125
|
var o = t + "Global";
|
|
979
|
-
|
|
980
|
-
e[
|
|
1126
|
+
ct.forEach(function(s) {
|
|
1127
|
+
e[s.pluginName] && (e[s.pluginName][o] && e[s.pluginName][o](X({
|
|
981
1128
|
sortable: e
|
|
982
|
-
}, n)), e.options[
|
|
1129
|
+
}, n)), e.options[s.pluginName] && e[s.pluginName][t] && e[s.pluginName][t](X({
|
|
983
1130
|
sortable: e
|
|
984
1131
|
}, n)));
|
|
985
1132
|
});
|
|
986
1133
|
},
|
|
987
1134
|
initializePlugins: function(t, e, n, r) {
|
|
988
|
-
|
|
989
|
-
var l =
|
|
990
|
-
if (!(!t.options[l] && !
|
|
991
|
-
var d = new
|
|
992
|
-
d.sortable = t, d.options = t.options, t[l] = d,
|
|
1135
|
+
ct.forEach(function(a) {
|
|
1136
|
+
var l = a.pluginName;
|
|
1137
|
+
if (!(!t.options[l] && !a.initializeByDefault)) {
|
|
1138
|
+
var d = new a(t, e, t.options);
|
|
1139
|
+
d.sortable = t, d.options = t.options, t[l] = d, J(n, d.defaults);
|
|
993
1140
|
}
|
|
994
1141
|
});
|
|
995
1142
|
for (var o in t.options)
|
|
996
1143
|
if (t.options.hasOwnProperty(o)) {
|
|
997
|
-
var
|
|
998
|
-
typeof
|
|
1144
|
+
var s = this.modifyOption(t, o, t.options[o]);
|
|
1145
|
+
typeof s < "u" && (t.options[o] = s);
|
|
999
1146
|
}
|
|
1000
1147
|
},
|
|
1001
1148
|
getEventProperties: function(t, e) {
|
|
1002
1149
|
var n = {};
|
|
1003
|
-
return
|
|
1004
|
-
typeof r.eventProperties == "function" &&
|
|
1150
|
+
return ct.forEach(function(r) {
|
|
1151
|
+
typeof r.eventProperties == "function" && J(n, r.eventProperties.call(e[r.pluginName], t));
|
|
1005
1152
|
}), n;
|
|
1006
1153
|
},
|
|
1007
1154
|
modifyOption: function(t, e, n) {
|
|
1008
1155
|
var r;
|
|
1009
|
-
return
|
|
1156
|
+
return ct.forEach(function(o) {
|
|
1010
1157
|
t[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (r = o.optionListeners[e].call(t[o.pluginName], n));
|
|
1011
1158
|
}), r;
|
|
1012
1159
|
}
|
|
1013
1160
|
};
|
|
1014
|
-
function
|
|
1015
|
-
var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl,
|
|
1016
|
-
if (t = t || e && e[
|
|
1017
|
-
var v,
|
|
1018
|
-
window.CustomEvent && !
|
|
1161
|
+
function cn(i) {
|
|
1162
|
+
var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl, s = i.toEl, a = i.fromEl, l = i.oldIndex, d = i.newIndex, f = i.oldDraggableIndex, u = i.newDraggableIndex, c = i.originalEvent, m = i.putSortable, p = i.extraEventProperties;
|
|
1163
|
+
if (t = t || e && e[U], !!t) {
|
|
1164
|
+
var v, D = t.options, V = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
1165
|
+
window.CustomEvent && !tt && !ie ? v = new CustomEvent(n, {
|
|
1019
1166
|
bubbles: !0,
|
|
1020
1167
|
cancelable: !0
|
|
1021
|
-
}) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to =
|
|
1022
|
-
var
|
|
1023
|
-
for (var
|
|
1024
|
-
v[
|
|
1025
|
-
e && e.dispatchEvent(v),
|
|
1168
|
+
}) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to = s || e, v.from = a || e, v.item = r || e, v.clone = o, v.oldIndex = l, v.newIndex = d, v.oldDraggableIndex = f, v.newDraggableIndex = u, v.originalEvent = c, v.pullMode = m ? m.lastPutMode : void 0;
|
|
1169
|
+
var O = X(X({}, p), Bt.getEventProperties(n, t));
|
|
1170
|
+
for (var et in O)
|
|
1171
|
+
v[et] = O[et];
|
|
1172
|
+
e && e.dispatchEvent(v), D[V] && D[V].call(t, v);
|
|
1026
1173
|
}
|
|
1027
1174
|
}
|
|
1028
|
-
var
|
|
1029
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o =
|
|
1030
|
-
|
|
1175
|
+
var fn = ["evt"], L = function(t, e) {
|
|
1176
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = en(n, fn);
|
|
1177
|
+
Bt.pluginEvent.bind(y)(t, e, X({
|
|
1031
1178
|
dragEl: h,
|
|
1032
|
-
parentEl:
|
|
1033
|
-
ghostEl:
|
|
1179
|
+
parentEl: A,
|
|
1180
|
+
ghostEl: _,
|
|
1034
1181
|
rootEl: w,
|
|
1035
|
-
nextEl:
|
|
1036
|
-
lastDownEl:
|
|
1182
|
+
nextEl: at,
|
|
1183
|
+
lastDownEl: Yt,
|
|
1037
1184
|
cloneEl: C,
|
|
1038
|
-
cloneHidden:
|
|
1039
|
-
dragStarted:
|
|
1040
|
-
putSortable:
|
|
1041
|
-
activeSortable:
|
|
1185
|
+
cloneHidden: K,
|
|
1186
|
+
dragStarted: xt,
|
|
1187
|
+
putSortable: x,
|
|
1188
|
+
activeSortable: y.active,
|
|
1042
1189
|
originalEvent: r,
|
|
1043
|
-
oldIndex:
|
|
1044
|
-
oldDraggableIndex:
|
|
1045
|
-
newIndex:
|
|
1046
|
-
newDraggableIndex:
|
|
1047
|
-
hideGhostForTarget:
|
|
1048
|
-
unhideGhostForTarget:
|
|
1190
|
+
oldIndex: mt,
|
|
1191
|
+
oldDraggableIndex: Ot,
|
|
1192
|
+
newIndex: H,
|
|
1193
|
+
newDraggableIndex: Z,
|
|
1194
|
+
hideGhostForTarget: Ti,
|
|
1195
|
+
unhideGhostForTarget: xi,
|
|
1049
1196
|
cloneNowHidden: function() {
|
|
1050
|
-
|
|
1197
|
+
K = !0;
|
|
1051
1198
|
},
|
|
1052
1199
|
cloneNowShown: function() {
|
|
1053
|
-
|
|
1200
|
+
K = !1;
|
|
1054
1201
|
},
|
|
1055
|
-
dispatchSortableEvent: function(
|
|
1056
|
-
|
|
1202
|
+
dispatchSortableEvent: function(a) {
|
|
1203
|
+
I({
|
|
1057
1204
|
sortable: e,
|
|
1058
|
-
name:
|
|
1205
|
+
name: a,
|
|
1059
1206
|
originalEvent: r
|
|
1060
1207
|
});
|
|
1061
1208
|
}
|
|
1062
1209
|
}, o));
|
|
1063
1210
|
};
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1066
|
-
putSortable:
|
|
1211
|
+
function I(i) {
|
|
1212
|
+
cn(X({
|
|
1213
|
+
putSortable: x,
|
|
1067
1214
|
cloneEl: C,
|
|
1068
1215
|
targetEl: h,
|
|
1069
1216
|
rootEl: w,
|
|
1070
|
-
oldIndex:
|
|
1071
|
-
oldDraggableIndex:
|
|
1072
|
-
newIndex:
|
|
1073
|
-
newDraggableIndex:
|
|
1217
|
+
oldIndex: mt,
|
|
1218
|
+
oldDraggableIndex: Ot,
|
|
1219
|
+
newIndex: H,
|
|
1220
|
+
newDraggableIndex: Z
|
|
1074
1221
|
}, i));
|
|
1075
1222
|
}
|
|
1076
|
-
var h,
|
|
1077
|
-
if (
|
|
1078
|
-
if (
|
|
1223
|
+
var h, A, _, w, at, Yt, C, K, mt, H, Ot, Z, kt, x, gt = !1, Jt = !1, te = [], rt, F, ve, ye, ei, ii, xt, ft, Pt, It = !1, Ut = !1, Wt, P, _e = [], Ae = !1, ee = [], ne = typeof document < "u", Vt = bi, ni = ie || tt ? "cssFloat" : "float", pn = ne && !Ei && !bi && "draggable" in document.createElement("div"), Ai = function() {
|
|
1224
|
+
if (ne) {
|
|
1225
|
+
if (tt)
|
|
1079
1226
|
return !1;
|
|
1080
1227
|
var i = document.createElement("x");
|
|
1081
1228
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
1082
1229
|
}
|
|
1083
|
-
}(),
|
|
1084
|
-
var n =
|
|
1230
|
+
}(), Si = function(t, e) {
|
|
1231
|
+
var n = g(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = bt(t, 0, e), s = bt(t, 1, e), a = o && g(o), l = s && g(s), d = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + T(o).width, f = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(s).width;
|
|
1085
1232
|
if (n.display === "flex")
|
|
1086
1233
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1087
1234
|
if (n.display === "grid")
|
|
1088
1235
|
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1089
|
-
if (o &&
|
|
1090
|
-
var u =
|
|
1091
|
-
return
|
|
1092
|
-
}
|
|
1093
|
-
return o && (
|
|
1094
|
-
},
|
|
1095
|
-
var r = n ? t.left : t.top, o = n ? t.right : t.bottom,
|
|
1096
|
-
return r ===
|
|
1097
|
-
},
|
|
1236
|
+
if (o && a.float && a.float !== "none") {
|
|
1237
|
+
var u = a.float === "left" ? "left" : "right";
|
|
1238
|
+
return s && (l.clear === "both" || l.clear === u) ? "vertical" : "horizontal";
|
|
1239
|
+
}
|
|
1240
|
+
return o && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || d >= r && n[ni] === "none" || s && n[ni] === "none" && d + f > r) ? "vertical" : "horizontal";
|
|
1241
|
+
}, gn = function(t, e, n) {
|
|
1242
|
+
var r = n ? t.left : t.top, o = n ? t.right : t.bottom, s = n ? t.width : t.height, a = n ? e.left : e.top, l = n ? e.right : e.bottom, d = n ? e.width : e.height;
|
|
1243
|
+
return r === a || o === l || r + s / 2 === a + d / 2;
|
|
1244
|
+
}, mn = function(t, e) {
|
|
1098
1245
|
var n;
|
|
1099
|
-
return
|
|
1100
|
-
var o = r[
|
|
1101
|
-
if (!(!o ||
|
|
1102
|
-
var
|
|
1103
|
-
if (
|
|
1246
|
+
return te.some(function(r) {
|
|
1247
|
+
var o = r[U].options.emptyInsertThreshold;
|
|
1248
|
+
if (!(!o || xe(r))) {
|
|
1249
|
+
var s = T(r), a = t >= s.left - o && t <= s.right + o, l = e >= s.top - o && e <= s.bottom + o;
|
|
1250
|
+
if (a && l)
|
|
1104
1251
|
return n = r;
|
|
1105
1252
|
}
|
|
1106
1253
|
}), n;
|
|
1107
|
-
},
|
|
1108
|
-
function e(o,
|
|
1109
|
-
return function(
|
|
1110
|
-
var u =
|
|
1111
|
-
if (o == null && (
|
|
1254
|
+
}, Di = function(t) {
|
|
1255
|
+
function e(o, s) {
|
|
1256
|
+
return function(a, l, d, f) {
|
|
1257
|
+
var u = a.options.group.name && l.options.group.name && a.options.group.name === l.options.group.name;
|
|
1258
|
+
if (o == null && (s || u))
|
|
1112
1259
|
return !0;
|
|
1113
1260
|
if (o == null || o === !1)
|
|
1114
1261
|
return !1;
|
|
1115
|
-
if (
|
|
1262
|
+
if (s && o === "clone")
|
|
1116
1263
|
return o;
|
|
1117
1264
|
if (typeof o == "function")
|
|
1118
|
-
return e(o(
|
|
1119
|
-
var
|
|
1120
|
-
return o === !0 || typeof o == "string" && o ===
|
|
1265
|
+
return e(o(a, l, d, f), s)(a, l, d, f);
|
|
1266
|
+
var c = (s ? a : l).options.group.name;
|
|
1267
|
+
return o === !0 || typeof o == "string" && o === c || o.join && o.indexOf(c) > -1;
|
|
1121
1268
|
};
|
|
1122
1269
|
}
|
|
1123
1270
|
var n = {}, r = t.group;
|
|
1124
|
-
(!r ||
|
|
1271
|
+
(!r || zt(r) != "object") && (r = {
|
|
1125
1272
|
name: r
|
|
1126
1273
|
}), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
|
|
1127
|
-
},
|
|
1128
|
-
!
|
|
1129
|
-
},
|
|
1130
|
-
!
|
|
1274
|
+
}, Ti = function() {
|
|
1275
|
+
!Ai && _ && g(_, "display", "none");
|
|
1276
|
+
}, xi = function() {
|
|
1277
|
+
!Ai && _ && g(_, "display", "");
|
|
1131
1278
|
};
|
|
1132
|
-
|
|
1133
|
-
if (
|
|
1134
|
-
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(),
|
|
1279
|
+
ne && !Ei && document.addEventListener("click", function(i) {
|
|
1280
|
+
if (Jt)
|
|
1281
|
+
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), Jt = !1, !1;
|
|
1135
1282
|
}, !0);
|
|
1136
|
-
var
|
|
1283
|
+
var ot = function(t) {
|
|
1137
1284
|
if (h) {
|
|
1138
1285
|
t = t.touches ? t.touches[0] : t;
|
|
1139
|
-
var e =
|
|
1286
|
+
var e = mn(t.clientX, t.clientY);
|
|
1140
1287
|
if (e) {
|
|
1141
1288
|
var n = {};
|
|
1142
1289
|
for (var r in t)
|
|
1143
1290
|
t.hasOwnProperty(r) && (n[r] = t[r]);
|
|
1144
|
-
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[
|
|
1291
|
+
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[U]._onDragOver(n);
|
|
1145
1292
|
}
|
|
1146
1293
|
}
|
|
1147
|
-
},
|
|
1148
|
-
h && h.parentNode[
|
|
1294
|
+
}, vn = function(t) {
|
|
1295
|
+
h && h.parentNode[U]._isOutsideThisEl(t.target);
|
|
1149
1296
|
};
|
|
1150
|
-
function
|
|
1297
|
+
function y(i, t) {
|
|
1151
1298
|
if (!(i && i.nodeType && i.nodeType === 1))
|
|
1152
1299
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));
|
|
1153
|
-
this.el = i, this.options = t =
|
|
1300
|
+
this.el = i, this.options = t = J({}, t), i[U] = this;
|
|
1154
1301
|
var e = {
|
|
1155
1302
|
group: null,
|
|
1156
1303
|
sort: !0,
|
|
@@ -1166,7 +1313,7 @@ function g(i, t) {
|
|
|
1166
1313
|
// will be set to same as swapThreshold if default
|
|
1167
1314
|
removeCloneOnHide: !0,
|
|
1168
1315
|
direction: function() {
|
|
1169
|
-
return
|
|
1316
|
+
return Si(i, this.options);
|
|
1170
1317
|
},
|
|
1171
1318
|
ghostClass: "sortable-ghost",
|
|
1172
1319
|
chosenClass: "sortable-chosen",
|
|
@@ -1176,8 +1323,8 @@ function g(i, t) {
|
|
|
1176
1323
|
preventOnFilter: !0,
|
|
1177
1324
|
animation: 0,
|
|
1178
1325
|
easing: null,
|
|
1179
|
-
setData: function(
|
|
1180
|
-
|
|
1326
|
+
setData: function(s, a) {
|
|
1327
|
+
s.setData("Text", a.textContent);
|
|
1181
1328
|
},
|
|
1182
1329
|
dropBubble: !1,
|
|
1183
1330
|
dragoverBubble: !1,
|
|
@@ -1193,94 +1340,94 @@ function g(i, t) {
|
|
|
1193
1340
|
x: 0,
|
|
1194
1341
|
y: 0
|
|
1195
1342
|
},
|
|
1196
|
-
supportPointer:
|
|
1343
|
+
supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && !Xt,
|
|
1197
1344
|
emptyInsertThreshold: 5
|
|
1198
1345
|
};
|
|
1199
|
-
|
|
1346
|
+
Bt.initializePlugins(this, i, e);
|
|
1200
1347
|
for (var n in e)
|
|
1201
1348
|
!(n in t) && (t[n] = e[n]);
|
|
1202
|
-
|
|
1349
|
+
Di(t);
|
|
1203
1350
|
for (var r in this)
|
|
1204
1351
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
1205
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1352
|
+
this.nativeDraggable = t.forceFallback ? !1 : pn, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? $(i, "pointerdown", this._onTapStart) : ($(i, "mousedown", this._onTapStart), $(i, "touchstart", this._onTapStart)), this.nativeDraggable && ($(i, "dragover", this), $(i, "dragenter", this)), te.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), J(this, dn());
|
|
1206
1353
|
}
|
|
1207
|
-
|
|
1354
|
+
y.prototype = /** @lends Sortable.prototype */
|
|
1208
1355
|
{
|
|
1209
|
-
constructor:
|
|
1356
|
+
constructor: y,
|
|
1210
1357
|
_isOutsideThisEl: function(t) {
|
|
1211
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1358
|
+
!this.el.contains(t) && t !== this.el && (ft = null);
|
|
1212
1359
|
},
|
|
1213
1360
|
_getDirection: function(t, e) {
|
|
1214
1361
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, h) : this.options.direction;
|
|
1215
1362
|
},
|
|
1216
1363
|
_onTapStart: function(t) {
|
|
1217
1364
|
if (t.cancelable) {
|
|
1218
|
-
var e = this, n = this.el, r = this.options, o = r.preventOnFilter,
|
|
1219
|
-
if (
|
|
1220
|
-
if (
|
|
1221
|
-
if (
|
|
1222
|
-
|
|
1365
|
+
var e = this, n = this.el, r = this.options, o = r.preventOnFilter, s = t.type, a = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (a || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, f = r.filter;
|
|
1366
|
+
if (An(n), !h && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Xt && l && l.tagName.toUpperCase() === "SELECT") && (l = z(l, r.draggable, n, !1), !(l && l.animated) && Yt !== l)) {
|
|
1367
|
+
if (mt = k(l), Ot = k(l, r.draggable), typeof f == "function") {
|
|
1368
|
+
if (f.call(this, t, l, this)) {
|
|
1369
|
+
I({
|
|
1223
1370
|
sortable: e,
|
|
1224
1371
|
rootEl: d,
|
|
1225
1372
|
name: "filter",
|
|
1226
1373
|
targetEl: l,
|
|
1227
1374
|
toEl: n,
|
|
1228
1375
|
fromEl: n
|
|
1229
|
-
}),
|
|
1376
|
+
}), L("filter", e, {
|
|
1230
1377
|
evt: t
|
|
1231
1378
|
}), o && t.cancelable && t.preventDefault();
|
|
1232
1379
|
return;
|
|
1233
1380
|
}
|
|
1234
|
-
} else if (
|
|
1235
|
-
if (u =
|
|
1236
|
-
return
|
|
1381
|
+
} else if (f && (f = f.split(",").some(function(u) {
|
|
1382
|
+
if (u = z(d, u.trim(), n, !1), u)
|
|
1383
|
+
return I({
|
|
1237
1384
|
sortable: e,
|
|
1238
1385
|
rootEl: u,
|
|
1239
1386
|
name: "filter",
|
|
1240
1387
|
targetEl: l,
|
|
1241
1388
|
fromEl: n,
|
|
1242
1389
|
toEl: n
|
|
1243
|
-
}),
|
|
1390
|
+
}), L("filter", e, {
|
|
1244
1391
|
evt: t
|
|
1245
1392
|
}), !0;
|
|
1246
|
-
}),
|
|
1393
|
+
}), f)) {
|
|
1247
1394
|
o && t.cancelable && t.preventDefault();
|
|
1248
1395
|
return;
|
|
1249
1396
|
}
|
|
1250
|
-
r.handle && !
|
|
1397
|
+
r.handle && !z(d, r.handle, n, !1) || this._prepareDragStart(t, a, l);
|
|
1251
1398
|
}
|
|
1252
1399
|
}
|
|
1253
1400
|
},
|
|
1254
1401
|
_prepareDragStart: function(t, e, n) {
|
|
1255
|
-
var r = this, o = r.el,
|
|
1402
|
+
var r = this, o = r.el, s = r.options, a = o.ownerDocument, l;
|
|
1256
1403
|
if (n && !h && n.parentNode === o) {
|
|
1257
|
-
var d =
|
|
1258
|
-
if (w = o, h = n,
|
|
1404
|
+
var d = T(n);
|
|
1405
|
+
if (w = o, h = n, A = h.parentNode, at = h.nextSibling, Yt = n, kt = s.group, y.dragged = h, rt = {
|
|
1259
1406
|
target: h,
|
|
1260
1407
|
clientX: (e || t).clientX,
|
|
1261
1408
|
clientY: (e || t).clientY
|
|
1262
|
-
},
|
|
1263
|
-
if (
|
|
1409
|
+
}, ei = rt.clientX - d.left, ii = rt.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, h.style["will-change"] = "all", l = function() {
|
|
1410
|
+
if (L("delayEnded", r, {
|
|
1264
1411
|
evt: t
|
|
1265
|
-
}),
|
|
1412
|
+
}), y.eventCanceled) {
|
|
1266
1413
|
r._onDrop();
|
|
1267
1414
|
return;
|
|
1268
1415
|
}
|
|
1269
|
-
r._disableDelayedDragEvents(), !
|
|
1416
|
+
r._disableDelayedDragEvents(), !Ze && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(t, e), I({
|
|
1270
1417
|
sortable: r,
|
|
1271
1418
|
name: "choose",
|
|
1272
1419
|
originalEvent: t
|
|
1273
|
-
}),
|
|
1274
|
-
},
|
|
1275
|
-
|
|
1276
|
-
}), $(
|
|
1420
|
+
}), M(h, s.chosenClass, !0);
|
|
1421
|
+
}, s.ignore.split(",").forEach(function(f) {
|
|
1422
|
+
wi(h, f.trim(), be);
|
|
1423
|
+
}), $(a, "dragover", ot), $(a, "mousemove", ot), $(a, "touchmove", ot), $(a, "mouseup", r._onDrop), $(a, "touchend", r._onDrop), $(a, "touchcancel", r._onDrop), Ze && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), L("delayStart", this, {
|
|
1277
1424
|
evt: t
|
|
1278
|
-
}),
|
|
1279
|
-
if (
|
|
1425
|
+
}), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(ie || tt))) {
|
|
1426
|
+
if (y.eventCanceled) {
|
|
1280
1427
|
this._onDrop();
|
|
1281
1428
|
return;
|
|
1282
1429
|
}
|
|
1283
|
-
$(
|
|
1430
|
+
$(a, "mouseup", r._disableDelayedDrag), $(a, "touchend", r._disableDelayedDrag), $(a, "touchcancel", r._disableDelayedDrag), $(a, "mousemove", r._delayedDragTouchMoveHandler), $(a, "touchmove", r._delayedDragTouchMoveHandler), s.supportPointer && $(a, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, s.delay);
|
|
1284
1431
|
} else
|
|
1285
1432
|
l();
|
|
1286
1433
|
}
|
|
@@ -1290,7 +1437,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1290
1437
|
Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
1291
1438
|
},
|
|
1292
1439
|
_disableDelayedDrag: function() {
|
|
1293
|
-
h &&
|
|
1440
|
+
h && be(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1294
1441
|
},
|
|
1295
1442
|
_disableDelayedDragEvents: function() {
|
|
1296
1443
|
var t = this.el.ownerDocument;
|
|
@@ -1299,19 +1446,19 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1299
1446
|
_triggerDragStart: function(t, e) {
|
|
1300
1447
|
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? $(document, "pointermove", this._onTouchMove) : e ? $(document, "touchmove", this._onTouchMove) : $(document, "mousemove", this._onTouchMove) : ($(h, "dragend", this), $(w, "dragstart", this._onDragStart));
|
|
1301
1448
|
try {
|
|
1302
|
-
document.selection ?
|
|
1449
|
+
document.selection ? Gt(function() {
|
|
1303
1450
|
document.selection.empty();
|
|
1304
1451
|
}) : window.getSelection().removeAllRanges();
|
|
1305
1452
|
} catch {
|
|
1306
1453
|
}
|
|
1307
1454
|
},
|
|
1308
1455
|
_dragStarted: function(t, e) {
|
|
1309
|
-
if (
|
|
1310
|
-
|
|
1456
|
+
if (gt = !1, w && h) {
|
|
1457
|
+
L("dragStarted", this, {
|
|
1311
1458
|
evt: e
|
|
1312
|
-
}), this.nativeDraggable && $(document, "dragover",
|
|
1459
|
+
}), this.nativeDraggable && $(document, "dragover", vn);
|
|
1313
1460
|
var n = this.options;
|
|
1314
|
-
!t &&
|
|
1461
|
+
!t && M(h, n.dragClass, !1), M(h, n.ghostClass, !0), y.active = this, t && this._appendGhost(), I({
|
|
1315
1462
|
sortable: this,
|
|
1316
1463
|
name: "start",
|
|
1317
1464
|
originalEvent: e
|
|
@@ -1320,17 +1467,17 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1320
1467
|
this._nulling();
|
|
1321
1468
|
},
|
|
1322
1469
|
_emulateDragOver: function() {
|
|
1323
|
-
if (
|
|
1324
|
-
this._lastX =
|
|
1325
|
-
for (var t = document.elementFromPoint(
|
|
1470
|
+
if (F) {
|
|
1471
|
+
this._lastX = F.clientX, this._lastY = F.clientY, Ti();
|
|
1472
|
+
for (var t = document.elementFromPoint(F.clientX, F.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(F.clientX, F.clientY), t !== e); )
|
|
1326
1473
|
e = t;
|
|
1327
|
-
if (h.parentNode[
|
|
1474
|
+
if (h.parentNode[U]._isOutsideThisEl(t), e)
|
|
1328
1475
|
do {
|
|
1329
|
-
if (e[
|
|
1476
|
+
if (e[U]) {
|
|
1330
1477
|
var n = void 0;
|
|
1331
|
-
if (n = e[
|
|
1332
|
-
clientX:
|
|
1333
|
-
clientY:
|
|
1478
|
+
if (n = e[U]._onDragOver({
|
|
1479
|
+
clientX: F.clientX,
|
|
1480
|
+
clientY: F.clientY,
|
|
1334
1481
|
target: t,
|
|
1335
1482
|
rootEl: e
|
|
1336
1483
|
}), n && !this.options.dragoverBubble)
|
|
@@ -1338,150 +1485,150 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1338
1485
|
}
|
|
1339
1486
|
t = e;
|
|
1340
1487
|
} while (e = e.parentNode);
|
|
1341
|
-
|
|
1488
|
+
xi();
|
|
1342
1489
|
}
|
|
1343
1490
|
},
|
|
1344
1491
|
_onTouchMove: function(t) {
|
|
1345
|
-
if (
|
|
1346
|
-
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t,
|
|
1347
|
-
if (!
|
|
1492
|
+
if (rt) {
|
|
1493
|
+
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, s = _ && yt(_, !0), a = _ && s && s.a, l = _ && s && s.d, d = Vt && P && Je(P), f = (o.clientX - rt.clientX + r.x) / (a || 1) + (d ? d[0] - _e[0] : 0) / (a || 1), u = (o.clientY - rt.clientY + r.y) / (l || 1) + (d ? d[1] - _e[1] : 0) / (l || 1);
|
|
1494
|
+
if (!y.active && !gt) {
|
|
1348
1495
|
if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
|
|
1349
1496
|
return;
|
|
1350
1497
|
this._onDragStart(t, !0);
|
|
1351
1498
|
}
|
|
1352
|
-
if (
|
|
1353
|
-
|
|
1499
|
+
if (_) {
|
|
1500
|
+
s ? (s.e += f - (ve || 0), s.f += u - (ye || 0)) : s = {
|
|
1354
1501
|
a: 1,
|
|
1355
1502
|
b: 0,
|
|
1356
1503
|
c: 0,
|
|
1357
1504
|
d: 1,
|
|
1358
|
-
e:
|
|
1505
|
+
e: f,
|
|
1359
1506
|
f: u
|
|
1360
1507
|
};
|
|
1361
|
-
var
|
|
1362
|
-
|
|
1508
|
+
var c = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
1509
|
+
g(_, "webkitTransform", c), g(_, "mozTransform", c), g(_, "msTransform", c), g(_, "transform", c), ve = f, ye = u, F = o;
|
|
1363
1510
|
}
|
|
1364
1511
|
t.cancelable && t.preventDefault();
|
|
1365
1512
|
}
|
|
1366
1513
|
},
|
|
1367
1514
|
_appendGhost: function() {
|
|
1368
|
-
if (!
|
|
1369
|
-
var t = this.options.fallbackOnBody ? document.body : w, e =
|
|
1370
|
-
if (
|
|
1371
|
-
for (
|
|
1372
|
-
|
|
1373
|
-
|
|
1515
|
+
if (!_) {
|
|
1516
|
+
var t = this.options.fallbackOnBody ? document.body : w, e = T(h, !0, Vt, !0, t), n = this.options;
|
|
1517
|
+
if (Vt) {
|
|
1518
|
+
for (P = t; g(P, "position") === "static" && g(P, "transform") === "none" && P !== document; )
|
|
1519
|
+
P = P.parentNode;
|
|
1520
|
+
P !== document.body && P !== document.documentElement ? (P === document && (P = Q()), e.top += P.scrollTop, e.left += P.scrollLeft) : P = Q(), _e = Je(P);
|
|
1374
1521
|
}
|
|
1375
|
-
|
|
1522
|
+
_ = h.cloneNode(!0), M(_, n.ghostClass, !1), M(_, n.fallbackClass, !0), M(_, n.dragClass, !0), g(_, "transition", ""), g(_, "transform", ""), g(_, "box-sizing", "border-box"), g(_, "margin", 0), g(_, "top", e.top), g(_, "left", e.left), g(_, "width", e.width), g(_, "height", e.height), g(_, "opacity", "0.8"), g(_, "position", Vt ? "absolute" : "fixed"), g(_, "zIndex", "100000"), g(_, "pointerEvents", "none"), y.ghost = _, t.appendChild(_), g(_, "transform-origin", ei / parseInt(_.style.width) * 100 + "% " + ii / parseInt(_.style.height) * 100 + "%");
|
|
1376
1523
|
}
|
|
1377
1524
|
},
|
|
1378
1525
|
_onDragStart: function(t, e) {
|
|
1379
1526
|
var n = this, r = t.dataTransfer, o = n.options;
|
|
1380
|
-
if (
|
|
1527
|
+
if (L("dragStart", this, {
|
|
1381
1528
|
evt: t
|
|
1382
|
-
}),
|
|
1529
|
+
}), y.eventCanceled) {
|
|
1383
1530
|
this._onDrop();
|
|
1384
1531
|
return;
|
|
1385
1532
|
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1533
|
+
L("setupClone", this), y.eventCanceled || (C = Ci(h), C.removeAttribute("id"), C.draggable = !1, C.style["will-change"] = "", this._hideClone(), M(C, this.options.chosenClass, !1), y.clone = C), n.cloneId = Gt(function() {
|
|
1534
|
+
L("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide || w.insertBefore(C, h), n._hideClone(), I({
|
|
1388
1535
|
sortable: n,
|
|
1389
1536
|
name: "clone"
|
|
1390
1537
|
}));
|
|
1391
|
-
}), !e &&
|
|
1538
|
+
}), !e && M(h, o.dragClass, !0), e ? (Jt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (b(document, "mouseup", n._onDrop), b(document, "touchend", n._onDrop), b(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, h)), $(document, "drop", n), g(h, "transform", "translateZ(0)")), gt = !0, n._dragStartId = Gt(n._dragStarted.bind(n, e, t)), $(document, "selectstart", n), xt = !0, Xt && g(document.body, "user-select", "none");
|
|
1392
1539
|
},
|
|
1393
1540
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1394
1541
|
_onDragOver: function(t) {
|
|
1395
|
-
var e = this.el, n = t.target, r, o,
|
|
1396
|
-
if (
|
|
1542
|
+
var e = this.el, n = t.target, r, o, s, a = this.options, l = a.group, d = y.active, f = kt === l, u = a.sort, c = x || d, m, p = this, v = !1;
|
|
1543
|
+
if (Ae)
|
|
1397
1544
|
return;
|
|
1398
|
-
function
|
|
1399
|
-
|
|
1545
|
+
function D(St, Hi) {
|
|
1546
|
+
L(St, p, X({
|
|
1400
1547
|
evt: t,
|
|
1401
|
-
isOwner:
|
|
1402
|
-
axis:
|
|
1403
|
-
revert:
|
|
1548
|
+
isOwner: f,
|
|
1549
|
+
axis: m ? "vertical" : "horizontal",
|
|
1550
|
+
revert: s,
|
|
1404
1551
|
dragRect: r,
|
|
1405
1552
|
targetRect: o,
|
|
1406
1553
|
canSort: u,
|
|
1407
|
-
fromSortable:
|
|
1554
|
+
fromSortable: c,
|
|
1408
1555
|
target: n,
|
|
1409
|
-
completed:
|
|
1410
|
-
onMove: function(
|
|
1411
|
-
return
|
|
1556
|
+
completed: O,
|
|
1557
|
+
onMove: function(Le, Bi) {
|
|
1558
|
+
return Ft(w, e, h, r, Le, T(Le), t, Bi);
|
|
1412
1559
|
},
|
|
1413
|
-
changed:
|
|
1414
|
-
},
|
|
1560
|
+
changed: et
|
|
1561
|
+
}, Hi));
|
|
1415
1562
|
}
|
|
1416
|
-
function
|
|
1417
|
-
|
|
1563
|
+
function V() {
|
|
1564
|
+
D("dragOverAnimationCapture"), p.captureAnimationState(), p !== c && c.captureAnimationState();
|
|
1418
1565
|
}
|
|
1419
|
-
function
|
|
1420
|
-
return
|
|
1421
|
-
insertion:
|
|
1422
|
-
}),
|
|
1423
|
-
|
|
1424
|
-
}),
|
|
1566
|
+
function O(St) {
|
|
1567
|
+
return D("dragOverCompleted", {
|
|
1568
|
+
insertion: St
|
|
1569
|
+
}), St && (f ? d._hideClone() : d._showClone(p), p !== c && (M(h, x ? x.options.ghostClass : d.options.ghostClass, !1), M(h, a.ghostClass, !0)), x !== p && p !== y.active ? x = p : p === y.active && x && (x = null), c === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
1570
|
+
D("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
1571
|
+
}), p !== c && (c.animateAll(), c._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (ft = null), !a.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[U]._isOutsideThisEl(t.target), !St && ot(t)), !a.dragoverBubble && t.stopPropagation && t.stopPropagation(), v = !0;
|
|
1425
1572
|
}
|
|
1426
|
-
function
|
|
1427
|
-
|
|
1428
|
-
sortable:
|
|
1573
|
+
function et() {
|
|
1574
|
+
H = k(h), Z = k(h, a.draggable), I({
|
|
1575
|
+
sortable: p,
|
|
1429
1576
|
name: "change",
|
|
1430
1577
|
toEl: e,
|
|
1431
|
-
newIndex:
|
|
1432
|
-
newDraggableIndex:
|
|
1578
|
+
newIndex: H,
|
|
1579
|
+
newDraggableIndex: Z,
|
|
1433
1580
|
originalEvent: t
|
|
1434
1581
|
});
|
|
1435
1582
|
}
|
|
1436
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n =
|
|
1583
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = z(n, a.draggable, e, !0), D("dragOver"), y.eventCanceled)
|
|
1437
1584
|
return v;
|
|
1438
|
-
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY ||
|
|
1439
|
-
return
|
|
1440
|
-
if (
|
|
1441
|
-
if (
|
|
1585
|
+
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n)
|
|
1586
|
+
return O(!1);
|
|
1587
|
+
if (Jt = !1, d && !a.disabled && (f ? u || (s = A !== w) : x === this || (this.lastPutMode = kt.checkPull(this, d, h, t)) && l.checkPut(this, d, h, t))) {
|
|
1588
|
+
if (m = this._getDirection(t, n) === "vertical", r = T(h), D("dragOverValid"), y.eventCanceled)
|
|
1442
1589
|
return v;
|
|
1443
|
-
if (
|
|
1444
|
-
return
|
|
1445
|
-
var
|
|
1446
|
-
if (!
|
|
1447
|
-
if (
|
|
1448
|
-
return
|
|
1449
|
-
if (
|
|
1450
|
-
return
|
|
1451
|
-
} else if (
|
|
1452
|
-
var
|
|
1453
|
-
if (
|
|
1454
|
-
return
|
|
1455
|
-
if (n =
|
|
1456
|
-
return
|
|
1590
|
+
if (s)
|
|
1591
|
+
return A = w, V(), this._hideClone(), D("revert"), y.eventCanceled || (at ? w.insertBefore(h, at) : w.appendChild(h)), O(!0);
|
|
1592
|
+
var Y = xe(e, a.draggable);
|
|
1593
|
+
if (!Y || En(t, m, this) && !Y.animated) {
|
|
1594
|
+
if (Y === h)
|
|
1595
|
+
return O(!1);
|
|
1596
|
+
if (Y && e === t.target && (n = Y), n && (o = T(n)), Ft(w, e, h, r, n, o, t, !!n) !== !1)
|
|
1597
|
+
return V(), Y && Y.nextSibling ? e.insertBefore(h, Y.nextSibling) : e.appendChild(h), A = e, et(), O(!0);
|
|
1598
|
+
} else if (Y && bn(t, m, this)) {
|
|
1599
|
+
var re = bt(e, 0, a, !0);
|
|
1600
|
+
if (re === h)
|
|
1601
|
+
return O(!1);
|
|
1602
|
+
if (n = re, o = T(n), Ft(w, e, h, r, n, o, t, !1) !== !1)
|
|
1603
|
+
return V(), e.insertBefore(h, re), A = e, et(), O(!0);
|
|
1457
1604
|
} else if (n.parentNode === e) {
|
|
1458
|
-
o =
|
|
1459
|
-
var
|
|
1460
|
-
|
|
1461
|
-
var
|
|
1462
|
-
if (
|
|
1463
|
-
var
|
|
1605
|
+
o = T(n);
|
|
1606
|
+
var ut = 0, oe, Li = h.parentNode !== e, Oe = !gn(h.animated && h.toRect || r, n.animated && n.toRect || o, m), Pe = m ? "top" : "left", wt = Qe(n, "top", "top") || Qe(h, "top", "top"), Mi = wt ? wt.scrollTop : void 0;
|
|
1607
|
+
ft !== n && (oe = o[Pe], It = !1, Ut = !Oe && a.invertSwap || Li), ut = $n(t, n, o, m, Oe ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, Ut, ft === n);
|
|
1608
|
+
var Ct;
|
|
1609
|
+
if (ut !== 0) {
|
|
1610
|
+
var Ie = k(h);
|
|
1464
1611
|
do
|
|
1465
|
-
|
|
1466
|
-
while (
|
|
1612
|
+
Ie -= ut, Ct = A.children[Ie];
|
|
1613
|
+
while (Ct && (g(Ct, "display") === "none" || Ct === _));
|
|
1467
1614
|
}
|
|
1468
|
-
if (
|
|
1469
|
-
return
|
|
1470
|
-
|
|
1471
|
-
var
|
|
1472
|
-
|
|
1473
|
-
var
|
|
1474
|
-
if (
|
|
1475
|
-
return (
|
|
1615
|
+
if (ut === 0 || Ct === n)
|
|
1616
|
+
return O(!1);
|
|
1617
|
+
ft = n, Pt = ut;
|
|
1618
|
+
var Ne = n.nextElementSibling, At = !1;
|
|
1619
|
+
At = ut === 1;
|
|
1620
|
+
var Rt = Ft(w, e, h, r, n, o, t, At);
|
|
1621
|
+
if (Rt !== !1)
|
|
1622
|
+
return (Rt === 1 || Rt === -1) && (At = Rt === 1), Ae = !0, setTimeout(_n, 30), V(), At && !Ne ? e.appendChild(h) : n.parentNode.insertBefore(h, At ? Ne : n), wt && ln(wt, 0, Mi - wt.scrollTop), A = h.parentNode, oe !== void 0 && !Ut && (Wt = Math.abs(oe - T(n)[Pe])), et(), O(!0);
|
|
1476
1623
|
}
|
|
1477
1624
|
if (e.contains(h))
|
|
1478
|
-
return
|
|
1625
|
+
return O(!1);
|
|
1479
1626
|
}
|
|
1480
1627
|
return !1;
|
|
1481
1628
|
},
|
|
1482
1629
|
_ignoreWhileAnimating: null,
|
|
1483
1630
|
_offMoveEvents: function() {
|
|
1484
|
-
b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover",
|
|
1631
|
+
b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover", ot), b(document, "mousemove", ot), b(document, "touchmove", ot);
|
|
1485
1632
|
},
|
|
1486
1633
|
_offUpEvents: function() {
|
|
1487
1634
|
var t = this.el.ownerDocument;
|
|
@@ -1489,62 +1636,62 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1489
1636
|
},
|
|
1490
1637
|
_onDrop: function(t) {
|
|
1491
1638
|
var e = this.el, n = this.options;
|
|
1492
|
-
if (
|
|
1639
|
+
if (H = k(h), Z = k(h, n.draggable), L("drop", this, {
|
|
1493
1640
|
evt: t
|
|
1494
|
-
}),
|
|
1641
|
+
}), A = h && h.parentNode, H = k(h), Z = k(h, n.draggable), y.eventCanceled) {
|
|
1495
1642
|
this._nulling();
|
|
1496
1643
|
return;
|
|
1497
1644
|
}
|
|
1498
|
-
|
|
1645
|
+
gt = !1, Ut = !1, It = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Se(this.cloneId), Se(this._dragStartId), this.nativeDraggable && (b(document, "drop", this), b(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Xt && g(document.body, "user-select", ""), g(h, "transform", ""), t && (xt && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), _ && _.parentNode && _.parentNode.removeChild(_), (w === A || x && x.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), h && (this.nativeDraggable && b(h, "dragend", this), be(h), h.style["will-change"] = "", xt && !gt && M(h, x ? x.options.ghostClass : this.options.ghostClass, !1), M(h, this.options.chosenClass, !1), I({
|
|
1499
1646
|
sortable: this,
|
|
1500
1647
|
name: "unchoose",
|
|
1501
|
-
toEl:
|
|
1648
|
+
toEl: A,
|
|
1502
1649
|
newIndex: null,
|
|
1503
1650
|
newDraggableIndex: null,
|
|
1504
1651
|
originalEvent: t
|
|
1505
|
-
}), w !==
|
|
1506
|
-
rootEl:
|
|
1652
|
+
}), w !== A ? (H >= 0 && (I({
|
|
1653
|
+
rootEl: A,
|
|
1507
1654
|
name: "add",
|
|
1508
|
-
toEl:
|
|
1655
|
+
toEl: A,
|
|
1509
1656
|
fromEl: w,
|
|
1510
1657
|
originalEvent: t
|
|
1511
|
-
}),
|
|
1658
|
+
}), I({
|
|
1512
1659
|
sortable: this,
|
|
1513
1660
|
name: "remove",
|
|
1514
|
-
toEl:
|
|
1661
|
+
toEl: A,
|
|
1515
1662
|
originalEvent: t
|
|
1516
|
-
}),
|
|
1517
|
-
rootEl:
|
|
1663
|
+
}), I({
|
|
1664
|
+
rootEl: A,
|
|
1518
1665
|
name: "sort",
|
|
1519
|
-
toEl:
|
|
1666
|
+
toEl: A,
|
|
1520
1667
|
fromEl: w,
|
|
1521
1668
|
originalEvent: t
|
|
1522
|
-
}),
|
|
1669
|
+
}), I({
|
|
1523
1670
|
sortable: this,
|
|
1524
1671
|
name: "sort",
|
|
1525
|
-
toEl:
|
|
1672
|
+
toEl: A,
|
|
1526
1673
|
originalEvent: t
|
|
1527
|
-
})),
|
|
1674
|
+
})), x && x.save()) : H !== mt && H >= 0 && (I({
|
|
1528
1675
|
sortable: this,
|
|
1529
1676
|
name: "update",
|
|
1530
|
-
toEl:
|
|
1677
|
+
toEl: A,
|
|
1531
1678
|
originalEvent: t
|
|
1532
|
-
}),
|
|
1679
|
+
}), I({
|
|
1533
1680
|
sortable: this,
|
|
1534
1681
|
name: "sort",
|
|
1535
|
-
toEl:
|
|
1682
|
+
toEl: A,
|
|
1536
1683
|
originalEvent: t
|
|
1537
|
-
})),
|
|
1684
|
+
})), y.active && ((H == null || H === -1) && (H = mt, Z = Ot), I({
|
|
1538
1685
|
sortable: this,
|
|
1539
1686
|
name: "end",
|
|
1540
|
-
toEl:
|
|
1687
|
+
toEl: A,
|
|
1541
1688
|
originalEvent: t
|
|
1542
1689
|
}), this.save()))), this._nulling();
|
|
1543
1690
|
},
|
|
1544
1691
|
_nulling: function() {
|
|
1545
|
-
|
|
1692
|
+
L("nulling", this), w = h = A = _ = at = C = Yt = K = rt = F = xt = H = Z = mt = Ot = ft = Pt = x = kt = y.dragged = y.ghost = y.clone = y.active = null, ee.forEach(function(t) {
|
|
1546
1693
|
t.checked = !0;
|
|
1547
|
-
}),
|
|
1694
|
+
}), ee.length = ve = ye = 0;
|
|
1548
1695
|
},
|
|
1549
1696
|
handleEvent: function(t) {
|
|
1550
1697
|
switch (t.type) {
|
|
@@ -1554,7 +1701,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1554
1701
|
break;
|
|
1555
1702
|
case "dragenter":
|
|
1556
1703
|
case "dragover":
|
|
1557
|
-
h && (this._onDragOver(t),
|
|
1704
|
+
h && (this._onDragOver(t), yn(t));
|
|
1558
1705
|
break;
|
|
1559
1706
|
case "selectstart":
|
|
1560
1707
|
t.preventDefault();
|
|
@@ -1566,8 +1713,8 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1566
1713
|
* @returns {String[]}
|
|
1567
1714
|
*/
|
|
1568
1715
|
toArray: function() {
|
|
1569
|
-
for (var t = [], e, n = this.el.children, r = 0, o = n.length,
|
|
1570
|
-
e = n[r],
|
|
1716
|
+
for (var t = [], e, n = this.el.children, r = 0, o = n.length, s = this.options; r < o; r++)
|
|
1717
|
+
e = n[r], z(e, s.draggable, this.el, !1) && t.push(e.getAttribute(s.dataIdAttr) || Cn(e));
|
|
1571
1718
|
return t;
|
|
1572
1719
|
},
|
|
1573
1720
|
/**
|
|
@@ -1576,9 +1723,9 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1576
1723
|
*/
|
|
1577
1724
|
sort: function(t, e) {
|
|
1578
1725
|
var n = {}, r = this.el;
|
|
1579
|
-
this.toArray().forEach(function(o,
|
|
1580
|
-
var
|
|
1581
|
-
|
|
1726
|
+
this.toArray().forEach(function(o, s) {
|
|
1727
|
+
var a = r.children[s];
|
|
1728
|
+
z(a, this.options.draggable, r, !1) && (n[o] = a);
|
|
1582
1729
|
}, this), e && this.captureAnimationState(), t.forEach(function(o) {
|
|
1583
1730
|
n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
|
|
1584
1731
|
}), e && this.animateAll();
|
|
@@ -1597,7 +1744,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1597
1744
|
* @returns {HTMLElement|null}
|
|
1598
1745
|
*/
|
|
1599
1746
|
closest: function(t, e) {
|
|
1600
|
-
return
|
|
1747
|
+
return z(t, e || this.options.draggable, this.el, !1);
|
|
1601
1748
|
},
|
|
1602
1749
|
/**
|
|
1603
1750
|
* Set/get option
|
|
@@ -1609,24 +1756,24 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1609
1756
|
var n = this.options;
|
|
1610
1757
|
if (e === void 0)
|
|
1611
1758
|
return n[t];
|
|
1612
|
-
var r =
|
|
1613
|
-
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" &&
|
|
1759
|
+
var r = Bt.modifyOption(this, t, e);
|
|
1760
|
+
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" && Di(n);
|
|
1614
1761
|
},
|
|
1615
1762
|
/**
|
|
1616
1763
|
* Destroy
|
|
1617
1764
|
*/
|
|
1618
1765
|
destroy: function() {
|
|
1619
|
-
|
|
1766
|
+
L("destroy", this);
|
|
1620
1767
|
var t = this.el;
|
|
1621
|
-
t[
|
|
1768
|
+
t[U] = null, b(t, "mousedown", this._onTapStart), b(t, "touchstart", this._onTapStart), b(t, "pointerdown", this._onTapStart), this.nativeDraggable && (b(t, "dragover", this), b(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
|
|
1622
1769
|
e.removeAttribute("draggable");
|
|
1623
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1770
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), te.splice(te.indexOf(this.el), 1), this.el = t = null;
|
|
1624
1771
|
},
|
|
1625
1772
|
_hideClone: function() {
|
|
1626
|
-
if (!
|
|
1627
|
-
if (
|
|
1773
|
+
if (!K) {
|
|
1774
|
+
if (L("hideClone", this), y.eventCanceled)
|
|
1628
1775
|
return;
|
|
1629
|
-
|
|
1776
|
+
g(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), K = !0;
|
|
1630
1777
|
}
|
|
1631
1778
|
},
|
|
1632
1779
|
_showClone: function(t) {
|
|
@@ -1634,124 +1781,124 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1634
1781
|
this._hideClone();
|
|
1635
1782
|
return;
|
|
1636
1783
|
}
|
|
1637
|
-
if (
|
|
1638
|
-
if (
|
|
1784
|
+
if (K) {
|
|
1785
|
+
if (L("showClone", this), y.eventCanceled)
|
|
1639
1786
|
return;
|
|
1640
|
-
h.parentNode == w && !this.options.group.revertClone ? w.insertBefore(C, h) :
|
|
1787
|
+
h.parentNode == w && !this.options.group.revertClone ? w.insertBefore(C, h) : at ? w.insertBefore(C, at) : w.appendChild(C), this.options.group.revertClone && this.animate(h, C), g(C, "display", ""), K = !1;
|
|
1641
1788
|
}
|
|
1642
1789
|
}
|
|
1643
1790
|
};
|
|
1644
|
-
function
|
|
1791
|
+
function yn(i) {
|
|
1645
1792
|
i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
|
|
1646
1793
|
}
|
|
1647
|
-
function
|
|
1648
|
-
var l, d = i[
|
|
1649
|
-
return window.CustomEvent && !
|
|
1794
|
+
function Ft(i, t, e, n, r, o, s, a) {
|
|
1795
|
+
var l, d = i[U], f = d.options.onMove, u;
|
|
1796
|
+
return window.CustomEvent && !tt && !ie ? l = new CustomEvent("move", {
|
|
1650
1797
|
bubbles: !0,
|
|
1651
1798
|
cancelable: !0
|
|
1652
|
-
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = i, l.dragged = e, l.draggedRect = n, l.related = r || t, l.relatedRect = o ||
|
|
1799
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = i, l.dragged = e, l.draggedRect = n, l.related = r || t, l.relatedRect = o || T(t), l.willInsertAfter = a, l.originalEvent = s, i.dispatchEvent(l), f && (u = f.call(d, l, s)), u;
|
|
1653
1800
|
}
|
|
1654
|
-
function
|
|
1801
|
+
function be(i) {
|
|
1655
1802
|
i.draggable = !1;
|
|
1656
1803
|
}
|
|
1657
|
-
function
|
|
1658
|
-
|
|
1804
|
+
function _n() {
|
|
1805
|
+
Ae = !1;
|
|
1659
1806
|
}
|
|
1660
|
-
function
|
|
1661
|
-
var n =
|
|
1807
|
+
function bn(i, t, e) {
|
|
1808
|
+
var n = T(bt(e.el, 0, e.options, !0)), r = 10;
|
|
1662
1809
|
return t ? 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;
|
|
1663
1810
|
}
|
|
1664
|
-
function
|
|
1665
|
-
var n =
|
|
1811
|
+
function En(i, t, e) {
|
|
1812
|
+
var n = T(xe(e.el, e.options.draggable)), r = 10;
|
|
1666
1813
|
return t ? 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;
|
|
1667
1814
|
}
|
|
1668
|
-
function
|
|
1669
|
-
var l = n ? i.clientY : i.clientX, d = n ? e.height : e.width,
|
|
1670
|
-
if (!
|
|
1671
|
-
if (
|
|
1672
|
-
if (!
|
|
1673
|
-
|
|
1674
|
-
else if (
|
|
1675
|
-
return -
|
|
1676
|
-
} else if (l >
|
|
1677
|
-
return
|
|
1815
|
+
function $n(i, t, e, n, r, o, s, a) {
|
|
1816
|
+
var l = n ? i.clientY : i.clientX, d = n ? e.height : e.width, f = n ? e.top : e.left, u = n ? e.bottom : e.right, c = !1;
|
|
1817
|
+
if (!s) {
|
|
1818
|
+
if (a && Wt < d * r) {
|
|
1819
|
+
if (!It && (Pt === 1 ? l > f + d * o / 2 : l < u - d * o / 2) && (It = !0), It)
|
|
1820
|
+
c = !0;
|
|
1821
|
+
else if (Pt === 1 ? l < f + Wt : l > u - Wt)
|
|
1822
|
+
return -Pt;
|
|
1823
|
+
} else if (l > f + d * (1 - r) / 2 && l < u - d * (1 - r) / 2)
|
|
1824
|
+
return wn(t);
|
|
1678
1825
|
}
|
|
1679
|
-
return
|
|
1826
|
+
return c = c || s, c && (l < f + d * o / 2 || l > u - d * o / 2) ? l > f + d / 2 ? 1 : -1 : 0;
|
|
1680
1827
|
}
|
|
1681
|
-
function
|
|
1682
|
-
return
|
|
1828
|
+
function wn(i) {
|
|
1829
|
+
return k(h) < k(i) ? 1 : -1;
|
|
1683
1830
|
}
|
|
1684
|
-
function
|
|
1831
|
+
function Cn(i) {
|
|
1685
1832
|
for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
|
|
1686
1833
|
n += t.charCodeAt(e);
|
|
1687
1834
|
return n.toString(36);
|
|
1688
1835
|
}
|
|
1689
|
-
function
|
|
1690
|
-
|
|
1836
|
+
function An(i) {
|
|
1837
|
+
ee.length = 0;
|
|
1691
1838
|
for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1692
1839
|
var n = t[e];
|
|
1693
|
-
n.checked &&
|
|
1840
|
+
n.checked && ee.push(n);
|
|
1694
1841
|
}
|
|
1695
1842
|
}
|
|
1696
|
-
function
|
|
1843
|
+
function Gt(i) {
|
|
1697
1844
|
return setTimeout(i, 0);
|
|
1698
1845
|
}
|
|
1699
|
-
function
|
|
1846
|
+
function Se(i) {
|
|
1700
1847
|
return clearTimeout(i);
|
|
1701
1848
|
}
|
|
1702
|
-
|
|
1703
|
-
(
|
|
1849
|
+
ne && $(document, "touchmove", function(i) {
|
|
1850
|
+
(y.active || gt) && i.cancelable && i.preventDefault();
|
|
1704
1851
|
});
|
|
1705
|
-
|
|
1852
|
+
y.utils = {
|
|
1706
1853
|
on: $,
|
|
1707
1854
|
off: b,
|
|
1708
|
-
css:
|
|
1709
|
-
find:
|
|
1855
|
+
css: g,
|
|
1856
|
+
find: wi,
|
|
1710
1857
|
is: function(t, e) {
|
|
1711
|
-
return !!
|
|
1858
|
+
return !!z(t, e, t, !1);
|
|
1712
1859
|
},
|
|
1713
|
-
extend:
|
|
1714
|
-
throttle:
|
|
1715
|
-
closest:
|
|
1716
|
-
toggleClass:
|
|
1717
|
-
clone:
|
|
1718
|
-
index:
|
|
1719
|
-
nextTick:
|
|
1720
|
-
cancelNextTick:
|
|
1721
|
-
detectDirection:
|
|
1722
|
-
getChild:
|
|
1860
|
+
extend: sn,
|
|
1861
|
+
throttle: an,
|
|
1862
|
+
closest: z,
|
|
1863
|
+
toggleClass: M,
|
|
1864
|
+
clone: Ci,
|
|
1865
|
+
index: k,
|
|
1866
|
+
nextTick: Gt,
|
|
1867
|
+
cancelNextTick: Se,
|
|
1868
|
+
detectDirection: Si,
|
|
1869
|
+
getChild: bt
|
|
1723
1870
|
};
|
|
1724
|
-
|
|
1725
|
-
return i[
|
|
1871
|
+
y.get = function(i) {
|
|
1872
|
+
return i[U];
|
|
1726
1873
|
};
|
|
1727
|
-
|
|
1874
|
+
y.mount = function() {
|
|
1728
1875
|
for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
|
|
1729
1876
|
t[e] = arguments[e];
|
|
1730
1877
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
|
|
1731
1878
|
if (!n.prototype || !n.prototype.constructor)
|
|
1732
1879
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1733
|
-
n.utils && (
|
|
1880
|
+
n.utils && (y.utils = X(X({}, y.utils), n.utils)), Bt.mount(n);
|
|
1734
1881
|
});
|
|
1735
1882
|
};
|
|
1736
|
-
|
|
1737
|
-
return new
|
|
1883
|
+
y.create = function(i, t) {
|
|
1884
|
+
return new y(i, t);
|
|
1738
1885
|
};
|
|
1739
|
-
|
|
1740
|
-
var
|
|
1741
|
-
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable,
|
|
1886
|
+
y.version = nn;
|
|
1887
|
+
var Oi = function(t) {
|
|
1888
|
+
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, s = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
1742
1889
|
if (e) {
|
|
1743
1890
|
var d = n || o;
|
|
1744
|
-
|
|
1745
|
-
var
|
|
1746
|
-
l(), d && !d.el.contains(u) && (
|
|
1891
|
+
a();
|
|
1892
|
+
var f = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, u = document.elementFromPoint(f.clientX, f.clientY);
|
|
1893
|
+
l(), d && !d.el.contains(u) && (s("spill"), this.onSpill({
|
|
1747
1894
|
dragEl: r,
|
|
1748
1895
|
putSortable: n
|
|
1749
1896
|
}));
|
|
1750
1897
|
}
|
|
1751
1898
|
};
|
|
1752
|
-
function
|
|
1899
|
+
function Pi() {
|
|
1753
1900
|
}
|
|
1754
|
-
|
|
1901
|
+
Pi.prototype = {
|
|
1755
1902
|
startIndex: null,
|
|
1756
1903
|
dragStart: function(t) {
|
|
1757
1904
|
var e = t.oldDraggableIndex;
|
|
@@ -1760,27 +1907,27 @@ gn.prototype = {
|
|
|
1760
1907
|
onSpill: function(t) {
|
|
1761
1908
|
var e = t.dragEl, n = t.putSortable;
|
|
1762
1909
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1763
|
-
var r =
|
|
1910
|
+
var r = bt(this.sortable.el, this.startIndex, this.options);
|
|
1764
1911
|
r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
|
|
1765
1912
|
},
|
|
1766
|
-
drop:
|
|
1913
|
+
drop: Oi
|
|
1767
1914
|
};
|
|
1768
|
-
|
|
1915
|
+
J(Pi, {
|
|
1769
1916
|
pluginName: "revertOnSpill"
|
|
1770
1917
|
});
|
|
1771
|
-
function
|
|
1918
|
+
function Ii() {
|
|
1772
1919
|
}
|
|
1773
|
-
|
|
1920
|
+
Ii.prototype = {
|
|
1774
1921
|
onSpill: function(t) {
|
|
1775
1922
|
var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
|
|
1776
1923
|
r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
|
|
1777
1924
|
},
|
|
1778
|
-
drop:
|
|
1925
|
+
drop: Oi
|
|
1779
1926
|
};
|
|
1780
|
-
|
|
1927
|
+
J(Ii, {
|
|
1781
1928
|
pluginName: "removeOnSpill"
|
|
1782
1929
|
});
|
|
1783
|
-
const
|
|
1930
|
+
const Ni = `
|
|
1784
1931
|
:host {
|
|
1785
1932
|
display: block;
|
|
1786
1933
|
}
|
|
@@ -1788,13 +1935,13 @@ const vn = `
|
|
|
1788
1935
|
display: flex;
|
|
1789
1936
|
justify-content: space-between;
|
|
1790
1937
|
}
|
|
1791
|
-
.
|
|
1938
|
+
.drag-handle {
|
|
1792
1939
|
cursor: ns-resize;
|
|
1793
1940
|
}
|
|
1794
1941
|
ul[data-group] {
|
|
1795
1942
|
padding-inline-start: 40px;
|
|
1796
1943
|
}
|
|
1797
|
-
`,
|
|
1944
|
+
`, Sn = `
|
|
1798
1945
|
ul {
|
|
1799
1946
|
padding: 0;
|
|
1800
1947
|
}
|
|
@@ -1820,31 +1967,63 @@ li label > input[type=checkbox]:after {
|
|
|
1820
1967
|
li label > input[type=checkbox]:checked:after {
|
|
1821
1968
|
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");
|
|
1822
1969
|
}
|
|
1823
|
-
.
|
|
1970
|
+
.drag-handle span {
|
|
1824
1971
|
display: none;
|
|
1825
1972
|
}
|
|
1826
|
-
.
|
|
1973
|
+
.drag-handle {
|
|
1827
1974
|
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");
|
|
1828
1975
|
width: 24px;
|
|
1829
1976
|
height: 24px;
|
|
1830
1977
|
}
|
|
1978
|
+
li.sortable-chosen {
|
|
1979
|
+
background: #eeea;
|
|
1980
|
+
}
|
|
1981
|
+
li.sortable-drag {
|
|
1982
|
+
opacity: 0;
|
|
1983
|
+
}
|
|
1984
|
+
li.sortable-ghost {
|
|
1985
|
+
}
|
|
1986
|
+
details.group-details {
|
|
1987
|
+
position: relative;
|
|
1988
|
+
}
|
|
1989
|
+
details.group-details > summary {
|
|
1990
|
+
list-style: none;
|
|
1991
|
+
position: absolute;
|
|
1992
|
+
right: 20px;
|
|
1993
|
+
top: -64px;
|
|
1994
|
+
font-size: 0;
|
|
1995
|
+
}
|
|
1996
|
+
details.group-details > summary:after {
|
|
1997
|
+
display: block;
|
|
1998
|
+
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");
|
|
1999
|
+
width: 24px;
|
|
2000
|
+
height: 24px;
|
|
2001
|
+
cursor: pointer;
|
|
2002
|
+
}
|
|
2003
|
+
details[open].group-details > summary:after {
|
|
2004
|
+
display: block;
|
|
2005
|
+
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");
|
|
2006
|
+
width: 24px;
|
|
2007
|
+
height: 24px;
|
|
2008
|
+
cursor: pointer;
|
|
2009
|
+
}
|
|
1831
2010
|
`;
|
|
1832
|
-
var
|
|
1833
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1834
|
-
(
|
|
1835
|
-
return n && r &&
|
|
2011
|
+
var Dn = Object.defineProperty, Tn = Object.getOwnPropertyDescriptor, S = (i, t, e, n) => {
|
|
2012
|
+
for (var r = n > 1 ? void 0 : n ? Tn(t, e) : t, o = i.length - 1, s; o >= 0; o--)
|
|
2013
|
+
(s = i[o]) && (r = (n ? s(t, e, r) : s(r)) || r);
|
|
2014
|
+
return n && r && Dn(t, e, r), r;
|
|
1836
2015
|
};
|
|
1837
|
-
let
|
|
2016
|
+
let B = class extends vt {
|
|
1838
2017
|
constructor() {
|
|
1839
2018
|
super(...arguments), this.layerIdentifier = "ol_uid", this.layerTitle = "title", this.sortBy = "layerOrder", this.layerConfig = ["opacity"], this.externalLayerConfig = void 0, this.filterLayers = (i, t, e) => {
|
|
1840
2019
|
let n = [];
|
|
1841
|
-
const r = (o,
|
|
1842
|
-
n = [...n, ...o.filter((d) => d.get(
|
|
2020
|
+
const r = (o, s, a) => {
|
|
2021
|
+
n = [...n, ...o.filter((d) => d.get(s) === a)];
|
|
1843
2022
|
const l = o.filter((d) => d.getLayers);
|
|
1844
2023
|
return l.length > 0 && l.forEach(
|
|
1845
2024
|
(d) => (
|
|
1846
2025
|
// @ts-ignore
|
|
1847
|
-
r(d.getLayers().getArray(),
|
|
2026
|
+
r(d.getLayers().getArray(), s, a)
|
|
1848
2027
|
)
|
|
1849
2028
|
), n;
|
|
1850
2029
|
};
|
|
@@ -1883,11 +2062,21 @@ let H = class extends ft {
|
|
|
1883
2062
|
(t) => t.get("layerControlHide") !== !0 && t.get("layerControlOptional") !== !0
|
|
1884
2063
|
);
|
|
1885
2064
|
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
2065
|
+
toggleLayerVisibility(i, t) {
|
|
2066
|
+
if (i.setVisible(!i.getVisible()), i.get("layerControlExclusive")) {
|
|
2067
|
+
let e = [];
|
|
2068
|
+
t ? e = this.findLayerById(
|
|
2069
|
+
this.layerCollection.getArray(),
|
|
2070
|
+
t
|
|
2071
|
+
).getLayers().getArray().filter(
|
|
2072
|
+
(r) => r.get(this.layerIdentifier) !== i.get(this.layerIdentifier) && r.get("layerControlExclusive")
|
|
2073
|
+
) : e = this.layerCollection.getArray().filter(
|
|
2074
|
+
(n) => n.get(this.layerIdentifier) !== i.get(this.layerIdentifier) && n.get("layerControlExclusive")
|
|
2075
|
+
), e.forEach((n) => {
|
|
2076
|
+
n.setVisible(!1);
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
this.requestUpdate();
|
|
1891
2080
|
}
|
|
1892
2081
|
render() {
|
|
1893
2082
|
var r;
|
|
@@ -1895,78 +2084,84 @@ let H = class extends ft {
|
|
|
1895
2084
|
this._updateControl(e), e.on("change:length", () => {
|
|
1896
2085
|
this._currentlySorting || this._updateControl(e);
|
|
1897
2086
|
});
|
|
1898
|
-
const n = (o,
|
|
1899
|
-
<ul data-group="${
|
|
1900
|
-
${
|
|
2087
|
+
const n = (o, s) => N`
|
|
2088
|
+
<ul data-group="${s ?? E}">
|
|
2089
|
+
${we(
|
|
1901
2090
|
o,
|
|
1902
|
-
(
|
|
2091
|
+
(a) => a.get(this.layerIdentifier),
|
|
2092
|
+
(a) => N`
|
|
1903
2093
|
<li
|
|
1904
2094
|
data-layer="${//@ts-ignore
|
|
1905
|
-
|
|
1906
|
-
data-disabled="${
|
|
2095
|
+
a.get(this.layerIdentifier)}"
|
|
2096
|
+
data-disabled="${a.get("layerControlDisable") || E}"
|
|
1907
2097
|
>
|
|
1908
2098
|
<div class="layer">
|
|
1909
2099
|
<label>
|
|
1910
2100
|
<input
|
|
1911
2101
|
type="checkbox"
|
|
1912
|
-
checked="${
|
|
2102
|
+
.checked="${Ce(a.getVisible())}"
|
|
1913
2103
|
@click=${() => {
|
|
1914
|
-
|
|
2104
|
+
this.toggleLayerVisibility(a, s);
|
|
1915
2105
|
}}
|
|
1916
2106
|
/>
|
|
1917
2107
|
<span class="title"
|
|
1918
|
-
>${
|
|
1919
|
-
|
|
2108
|
+
>${a.get(this.layerTitle) || `${// @ts-ignore
|
|
2109
|
+
a.get(this.layerIdentifier)}`}</span
|
|
1920
2110
|
>
|
|
1921
2111
|
</label>
|
|
1922
|
-
${this.sortBy === "layerOrder" && !
|
|
2112
|
+
${this.sortBy === "layerOrder" && !a.get("layerControlDisable") ? N`<div class="drag-handle">
|
|
1923
2113
|
<span>=</span>
|
|
1924
2114
|
</div>` : E}
|
|
1925
2115
|
</div>
|
|
1926
|
-
${this.layerConfig ?
|
|
2116
|
+
${this.layerConfig ? N`
|
|
1927
2117
|
<eox-layerconfig
|
|
1928
2118
|
.layerConfig="${this.layerConfig}"
|
|
1929
2119
|
.layerControl="${this}"
|
|
1930
|
-
.layer=${
|
|
2120
|
+
.layer=${a}
|
|
1931
2121
|
.external=${this.externalLayerConfig}
|
|
1932
2122
|
></eox-layerconfig>
|
|
1933
2123
|
` : E}
|
|
1934
2124
|
${// @ts-ignore
|
|
1935
|
-
this.externalLayerConfig &&
|
|
2125
|
+
this.externalLayerConfig && a.style_ ? N`
|
|
1936
2126
|
<button
|
|
1937
|
-
@click=${() => this._emitLayerconfig(
|
|
2127
|
+
@click=${() => this._emitLayerconfig(a)}
|
|
1938
2128
|
>
|
|
1939
2129
|
configure
|
|
1940
2130
|
</button>
|
|
1941
2131
|
` : E}
|
|
1942
2132
|
${// @ts-ignore
|
|
1943
|
-
|
|
2133
|
+
a.getLayers ? N`
|
|
2134
|
+
<details open class="group-details">
|
|
2135
|
+
<summary>Layers</summary>
|
|
2136
|
+
${n(
|
|
1944
2137
|
this.preFilterLayers(
|
|
1945
2138
|
// @ts-ignore
|
|
1946
|
-
[...
|
|
2139
|
+
[...a.getLayers().getArray()].reverse()
|
|
1947
2140
|
),
|
|
1948
|
-
|
|
1949
|
-
)
|
|
2141
|
+
a.get("id")
|
|
2142
|
+
)}
|
|
2143
|
+
</details>
|
|
2144
|
+
` : E}
|
|
1950
2145
|
</li>
|
|
1951
2146
|
`
|
|
1952
2147
|
)}
|
|
1953
2148
|
</ul>
|
|
1954
2149
|
`;
|
|
1955
|
-
return
|
|
2150
|
+
return N`
|
|
1956
2151
|
<style>
|
|
1957
|
-
${
|
|
1958
|
-
${!this.unstyled &&
|
|
2152
|
+
${Ni}
|
|
2153
|
+
${!this.unstyled && Sn}
|
|
1959
2154
|
</style>
|
|
1960
2155
|
<div>
|
|
1961
2156
|
<slot></slot>
|
|
1962
2157
|
<div>
|
|
1963
|
-
${
|
|
2158
|
+
${n(
|
|
1964
2159
|
this.preFilterLayers(e.getArray())
|
|
1965
2160
|
)}
|
|
1966
2161
|
</div>
|
|
1967
|
-
${
|
|
2162
|
+
${_i(
|
|
1968
2163
|
((r = this.optionalLayerArray) == null ? void 0 : r.length) > 0,
|
|
1969
|
-
() =>
|
|
2164
|
+
() => N`
|
|
1970
2165
|
<label for="optional">Optional layers</label>
|
|
1971
2166
|
|
|
1972
2167
|
<select name="optional">
|
|
@@ -1974,7 +2169,7 @@ let H = class extends ft {
|
|
|
1974
2169
|
-- select an optional layer to add --
|
|
1975
2170
|
</option>
|
|
1976
2171
|
${this.optionalLayerArray.map(
|
|
1977
|
-
(o) =>
|
|
2172
|
+
(o) => N`
|
|
1978
2173
|
<option
|
|
1979
2174
|
value="${// @ts-ignore
|
|
1980
2175
|
o.get(this.layerIdentifier)}"
|
|
@@ -1989,21 +2184,21 @@ let H = class extends ft {
|
|
|
1989
2184
|
@click="${() => {
|
|
1990
2185
|
const o = this.optionalLayerArray.find(
|
|
1991
2186
|
// @ts-ignore
|
|
1992
|
-
(
|
|
2187
|
+
(s) => s.get(this.layerIdentifier) === // @ts-ignore
|
|
1993
2188
|
this.shadowRoot.querySelector("select[name=optional]").value
|
|
1994
2189
|
);
|
|
1995
2190
|
if (o.get("group")) {
|
|
1996
|
-
const
|
|
2191
|
+
const s = this.findLayerById(
|
|
1997
2192
|
this.layerCollection.getArray(),
|
|
1998
2193
|
o.get("group")
|
|
1999
2194
|
);
|
|
2000
|
-
|
|
2195
|
+
s.getLayers().remove(o), s.getLayers().insertAt(s.getLayers().getLength(), o);
|
|
2001
2196
|
} else
|
|
2002
2197
|
this.layerCollection.remove(o), this.layerCollection.insertAt(
|
|
2003
2198
|
this.layerCollection.getLength(),
|
|
2004
2199
|
o
|
|
2005
2200
|
);
|
|
2006
|
-
o.set("layerControlOptional", !1), o.setVisible(!0)
|
|
2201
|
+
o.set("layerControlOptional", !1), o.setVisible(!0);
|
|
2007
2202
|
}}"
|
|
2008
2203
|
>
|
|
2009
2204
|
add
|
|
@@ -2016,10 +2211,13 @@ let H = class extends ft {
|
|
|
2016
2211
|
updated() {
|
|
2017
2212
|
this.sortBy == "layerOrder" && this.renderRoot.querySelectorAll("ul").forEach((t) => {
|
|
2018
2213
|
const e = t.dataset.group;
|
|
2019
|
-
|
|
2020
|
-
handle: ".
|
|
2214
|
+
y.create(t, {
|
|
2215
|
+
handle: ".drag-handle",
|
|
2021
2216
|
dataIdAttr: "data-layer",
|
|
2022
2217
|
filter: "data-disabled",
|
|
2218
|
+
swapThreshold: 0.5,
|
|
2219
|
+
animation: 150,
|
|
2220
|
+
easing: "cubic-bezier(1, 0, 0, 1)",
|
|
2023
2221
|
store: {
|
|
2024
2222
|
get: () => e ? [
|
|
2025
2223
|
...this.findLayerById(
|
|
@@ -2031,7 +2229,7 @@ let H = class extends ft {
|
|
|
2031
2229
|
].reverse(),
|
|
2032
2230
|
set: (n) => {
|
|
2033
2231
|
var r = n.toArray().reverse();
|
|
2034
|
-
r.forEach((o,
|
|
2232
|
+
r.forEach((o, s) => {
|
|
2035
2233
|
if (e) {
|
|
2036
2234
|
const l = this.findLayerById(
|
|
2037
2235
|
this.layerCollection.getArray(),
|
|
@@ -2040,62 +2238,59 @@ let H = class extends ft {
|
|
|
2040
2238
|
l.getArray(),
|
|
2041
2239
|
o
|
|
2042
2240
|
);
|
|
2043
|
-
l.remove(d), l.insertAt(
|
|
2241
|
+
l.remove(d), l.insertAt(s, d);
|
|
2044
2242
|
} else {
|
|
2045
|
-
const
|
|
2243
|
+
const a = this.findLayerById(
|
|
2046
2244
|
this.layerCollection.getArray(),
|
|
2047
2245
|
o
|
|
2048
2246
|
);
|
|
2049
|
-
this.layerCollection.remove(
|
|
2247
|
+
this.layerCollection.remove(a), this.layerCollection.insertAt(s, a);
|
|
2050
2248
|
}
|
|
2051
2249
|
});
|
|
2052
2250
|
}
|
|
2053
2251
|
},
|
|
2054
|
-
onMove: (n) => !n.related.dataset.disabled
|
|
2055
|
-
onSort: () => {
|
|
2056
|
-
this.resetLayerConfig();
|
|
2057
|
-
}
|
|
2252
|
+
onMove: (n) => !n.related.dataset.disabled
|
|
2058
2253
|
});
|
|
2059
2254
|
});
|
|
2060
2255
|
}
|
|
2061
2256
|
};
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
],
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
],
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
],
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
],
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
],
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
],
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
],
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
],
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
],
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
],
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
],
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
],
|
|
2098
|
-
let
|
|
2257
|
+
S([
|
|
2258
|
+
$t()
|
|
2259
|
+
], B.prototype, "olMap", 2);
|
|
2260
|
+
S([
|
|
2261
|
+
$t()
|
|
2262
|
+
], B.prototype, "layerCollection", 2);
|
|
2263
|
+
S([
|
|
2264
|
+
$t()
|
|
2265
|
+
], B.prototype, "layerArray", 2);
|
|
2266
|
+
S([
|
|
2267
|
+
$t()
|
|
2268
|
+
], B.prototype, "optionalLayerArray", 2);
|
|
2269
|
+
S([
|
|
2270
|
+
R()
|
|
2271
|
+
], B.prototype, "for", 2);
|
|
2272
|
+
S([
|
|
2273
|
+
R()
|
|
2274
|
+
], B.prototype, "layerIdentifier", 2);
|
|
2275
|
+
S([
|
|
2276
|
+
R()
|
|
2277
|
+
], B.prototype, "layerTitle", 2);
|
|
2278
|
+
S([
|
|
2279
|
+
R()
|
|
2280
|
+
], B.prototype, "sortBy", 2);
|
|
2281
|
+
S([
|
|
2282
|
+
R({ type: Array })
|
|
2283
|
+
], B.prototype, "layerConfig", 2);
|
|
2284
|
+
S([
|
|
2285
|
+
R({ type: Boolean })
|
|
2286
|
+
], B.prototype, "externalLayerConfig", 2);
|
|
2287
|
+
S([
|
|
2288
|
+
R({ type: Boolean })
|
|
2289
|
+
], B.prototype, "unstyled", 2);
|
|
2290
|
+
B = S([
|
|
2291
|
+
gi("eox-layercontrol")
|
|
2292
|
+
], B);
|
|
2293
|
+
let q = class extends vt {
|
|
2099
2294
|
constructor() {
|
|
2100
2295
|
super(...arguments), this._configList = {};
|
|
2101
2296
|
}
|
|
@@ -2116,51 +2311,55 @@ let W = class extends ft {
|
|
|
2116
2311
|
t && t.color && t.color[0] === "array" && (this._configList = t.variables);
|
|
2117
2312
|
}
|
|
2118
2313
|
connectedCallback() {
|
|
2119
|
-
super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement
|
|
2314
|
+
super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this._layerControlElement && (this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement.addEventListener("layerconfig", (i) => {
|
|
2120
2315
|
this._currentLayer = i.detail.layer, this._parseConfigs(this._currentLayer), this.requestUpdate();
|
|
2121
|
-
})) : (this._layerControlElement = this.layerControl, this._currentLayer = this.layer, this._parseConfigs(this._currentLayer));
|
|
2316
|
+
}))) : (this._layerControlElement = this.layerControl, this._currentLayer = this.layer, this._parseConfigs(this._currentLayer));
|
|
2122
2317
|
}
|
|
2123
2318
|
render() {
|
|
2124
|
-
return
|
|
2319
|
+
return N`
|
|
2125
2320
|
<style>
|
|
2126
|
-
${
|
|
2321
|
+
${Ni}
|
|
2127
2322
|
</style>
|
|
2128
|
-
${
|
|
2323
|
+
${_i(
|
|
2129
2324
|
this._currentLayer,
|
|
2130
|
-
() =>
|
|
2325
|
+
() => N`
|
|
2131
2326
|
<div>
|
|
2132
2327
|
<slot></slot>
|
|
2133
|
-
${this.for ?
|
|
2134
|
-
${
|
|
2328
|
+
${this.for ? N`layer: ${this._currentLayer.get("name")}` : E}
|
|
2329
|
+
${we(
|
|
2135
2330
|
this.layerConfig.filter(
|
|
2136
2331
|
(i) => this.for ? i !== "opacity" : !0
|
|
2137
2332
|
),
|
|
2138
|
-
(i) =>
|
|
2333
|
+
(i) => i,
|
|
2334
|
+
(i) => N`
|
|
2139
2335
|
<div>${i}</div>
|
|
2140
2336
|
<input
|
|
2141
2337
|
type="range"
|
|
2142
2338
|
min="0"
|
|
2143
2339
|
max="1"
|
|
2144
2340
|
step="0.01"
|
|
2145
|
-
value="${this._currentLayer.getOpacity()}"
|
|
2341
|
+
value="${Ce(this._currentLayer.getOpacity())}"
|
|
2146
2342
|
@input=${(t) => this._handleInput(t, i)}
|
|
2147
2343
|
/>
|
|
2148
2344
|
`
|
|
2149
2345
|
)}
|
|
2150
|
-
${Object.keys(this._configList).length > 0 && !this.external ?
|
|
2346
|
+
${Object.keys(this._configList).length > 0 && !this.external ? N`
|
|
2151
2347
|
<details open="${this.for ? !0 : E}">
|
|
2152
2348
|
<summary>Layer config</summary>
|
|
2153
2349
|
<ul>
|
|
2154
|
-
${
|
|
2350
|
+
${we(
|
|
2155
2351
|
Object.keys(this._configList),
|
|
2156
|
-
(i) =>
|
|
2352
|
+
(i) => i,
|
|
2353
|
+
(i) => N` <li>
|
|
2157
2354
|
<div>${i}</div>
|
|
2158
2355
|
<input
|
|
2159
2356
|
type="range"
|
|
2160
2357
|
min="${["red", "green", "blue"].includes(i) ? 1 : 2e3}"
|
|
2161
2358
|
max="${["red", "green", "blue"].includes(i) ? 4 : 5e3}"
|
|
2162
|
-
value="${
|
|
2163
|
-
|
|
2359
|
+
value="${Ce(
|
|
2360
|
+
// @ts-ignore
|
|
2361
|
+
this._configList[i]
|
|
2362
|
+
)}"
|
|
2164
2363
|
@input=${(t) => this._handleInput(t, i)}
|
|
2165
2364
|
/>
|
|
2166
2365
|
</li>`
|
|
@@ -2174,31 +2373,31 @@ let W = class extends ft {
|
|
|
2174
2373
|
`;
|
|
2175
2374
|
}
|
|
2176
2375
|
};
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
],
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
],
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
],
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
],
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
],
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
],
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
],
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
],
|
|
2376
|
+
S([
|
|
2377
|
+
R()
|
|
2378
|
+
], q.prototype, "for", 2);
|
|
2379
|
+
S([
|
|
2380
|
+
R({ type: Array })
|
|
2381
|
+
], q.prototype, "layerConfig", 2);
|
|
2382
|
+
S([
|
|
2383
|
+
R({ type: Object, attribute: !1 })
|
|
2384
|
+
], q.prototype, "layerControl", 2);
|
|
2385
|
+
S([
|
|
2386
|
+
R({ type: Object, attribute: !1 })
|
|
2387
|
+
], q.prototype, "layer", 2);
|
|
2388
|
+
S([
|
|
2389
|
+
R({ type: Boolean })
|
|
2390
|
+
], q.prototype, "external", 2);
|
|
2391
|
+
S([
|
|
2392
|
+
$t()
|
|
2393
|
+
], q.prototype, "_currentLayer", 2);
|
|
2394
|
+
S([
|
|
2395
|
+
$t()
|
|
2396
|
+
], q.prototype, "_configList", 2);
|
|
2397
|
+
q = S([
|
|
2398
|
+
gi("eox-layerconfig")
|
|
2399
|
+
], q);
|
|
2201
2400
|
export {
|
|
2202
|
-
|
|
2203
|
-
|
|
2401
|
+
q as EOxLayerConfig,
|
|
2402
|
+
B as EOxLayerControl
|
|
2204
2403
|
};
|