@eox/layercontrol 0.19.0 → 0.20.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 +1111 -1009
- package/dist/eox-layercontrol.umd.cjs +153 -116
- package/package.json +2 -1
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Io = Object.defineProperty;
|
|
2
|
+
var Jn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var Ho = (e, t, n) => t in e ? Io(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var N = (e, t, n) => Ho(e, typeof t != "symbol" ? t + "" : t, n), pn = (e, t, n) => t.has(e) || Jn("Cannot " + n);
|
|
7
|
+
var P = (e, t, n) => (pn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), T = (e, t, n) => t.has(e) ? Jn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Qt = (e, t, n, i) => (pn(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), B = (e, t, n) => (pn(e, t, "access private method"), n);
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
let
|
|
13
|
+
const Te = globalThis, Ln = Te.ShadowRoot && (Te.ShadyCSS === void 0 || Te.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, $i = Symbol(), Kn = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
let Bo = class {
|
|
15
15
|
constructor(t, n, i) {
|
|
16
|
-
if (this._$cssResult$ = !0, i !==
|
|
16
|
+
if (this._$cssResult$ = !0, i !== $i) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
17
17
|
this.cssText = t, this.t = n;
|
|
18
18
|
}
|
|
19
19
|
get styleSheet() {
|
|
20
20
|
let t = this.o;
|
|
21
21
|
const n = this.t;
|
|
22
|
-
if (
|
|
22
|
+
if (Ln && t === void 0) {
|
|
23
23
|
const i = n !== void 0 && n.length === 1;
|
|
24
|
-
i && (t =
|
|
24
|
+
i && (t = Kn.get(n)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Kn.set(n, t));
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
27
|
}
|
|
@@ -29,26 +29,26 @@ let Ro = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
32
|
+
const Vo = (e) => new Bo(typeof e == "string" ? e : e + "", void 0, $i), Lo = (e, t) => {
|
|
33
|
+
if (Ln) e.adoptedStyleSheets = t.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
|
|
34
34
|
else for (const n of t) {
|
|
35
|
-
const i = document.createElement("style"), o =
|
|
35
|
+
const i = document.createElement("style"), o = Te.litNonce;
|
|
36
36
|
o !== void 0 && i.setAttribute("nonce", o), i.textContent = n.cssText, e.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Qn = Ln ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let n = "";
|
|
40
40
|
for (const i of t.cssRules) n += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Vo(n);
|
|
42
42
|
})(e) : e;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Uo, defineProperty: ko, getOwnPropertyDescriptor: Fo, getOwnPropertyNames: jo, getOwnPropertySymbols: Zo, getPrototypeOf: zo } = Object, At = globalThis, ti = At.trustedTypes, Xo = ti ? ti.emptyScript : "", fn = At.reactiveElementPolyfillSupport, re = (e, t) => e, Rn = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
e = e ?
|
|
51
|
+
e = e ? Xo : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,23 +73,23 @@ const { is: No, defineProperty: Io, getOwnPropertyDescriptor: Ho, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return n;
|
|
76
|
-
} },
|
|
76
|
+
} }, _i = (e, t) => !Uo(e, t), ei = { attribute: !0, type: String, converter: Rn, reflect: !1, hasChanged: _i };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), At.litPropertyMetadata ?? (At.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
-
class
|
|
78
|
+
class Ut extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, n =
|
|
85
|
+
static createProperty(t, n = ei) {
|
|
86
86
|
if (n.state && (n.attribute = !1), this._$Ei(), this.elementProperties.set(t, n), !n.noAccessor) {
|
|
87
87
|
const i = Symbol(), o = this.getPropertyDescriptor(t, i, n);
|
|
88
|
-
o !== void 0 &&
|
|
88
|
+
o !== void 0 && ko(this.prototype, t, o);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, n, i) {
|
|
92
|
-
const { get: o, set: r } =
|
|
92
|
+
const { get: o, set: r } = Fo(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[n];
|
|
94
94
|
}, set(s) {
|
|
95
95
|
this[n] = s;
|
|
@@ -102,17 +102,17 @@ class kt extends HTMLElement {
|
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
104
104
|
static getPropertyOptions(t) {
|
|
105
|
-
return this.elementProperties.get(t) ??
|
|
105
|
+
return this.elementProperties.get(t) ?? ei;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const t =
|
|
108
|
+
if (this.hasOwnProperty(re("elementProperties"))) return;
|
|
109
|
+
const t = zo(this);
|
|
110
110
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
115
|
-
const n = this.properties, i = [...
|
|
113
|
+
if (this.hasOwnProperty(re("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(re("properties"))) {
|
|
115
|
+
const n = this.properties, i = [...jo(n), ...Zo(n)];
|
|
116
116
|
for (const o of i) this.createProperty(o, n[o]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
@@ -131,8 +131,8 @@ class kt extends HTMLElement {
|
|
|
131
131
|
const n = [];
|
|
132
132
|
if (Array.isArray(t)) {
|
|
133
133
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const o of i) n.unshift(
|
|
135
|
-
} else t !== void 0 && n.push(
|
|
134
|
+
for (const o of i) n.unshift(Qn(o));
|
|
135
|
+
} else t !== void 0 && n.push(Qn(t));
|
|
136
136
|
return n;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(t, n) {
|
|
@@ -161,7 +161,7 @@ class kt extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return Lo(t, this.constructor.elementStyles), t;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var t;
|
|
@@ -186,7 +186,7 @@ class kt extends HTMLElement {
|
|
|
186
186
|
var r;
|
|
187
187
|
const i = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, i);
|
|
188
188
|
if (o !== void 0 && i.reflect === !0) {
|
|
189
|
-
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter :
|
|
189
|
+
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : Rn).toAttribute(n, i.type);
|
|
190
190
|
this._$Em = t, s == null ? this.removeAttribute(o) : this.setAttribute(o, s), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -194,13 +194,13 @@ class kt extends HTMLElement {
|
|
|
194
194
|
var r;
|
|
195
195
|
const i = this.constructor, o = i._$Eh.get(t);
|
|
196
196
|
if (o !== void 0 && this._$Em !== o) {
|
|
197
|
-
const s = i.getPropertyOptions(o), a = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((r = s.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? s.converter :
|
|
197
|
+
const s = i.getPropertyOptions(o), a = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((r = s.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? s.converter : Rn;
|
|
198
198
|
this._$Em = o, this[o] = a.fromAttribute(n, s.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(t, n, i) {
|
|
202
202
|
if (t !== void 0) {
|
|
203
|
-
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ??
|
|
203
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? _i)(this[t], n)) return;
|
|
204
204
|
this.P(t, n, i);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -273,59 +273,59 @@ class kt extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
Ut.elementStyles = [], Ut.shadowRootOptions = { mode: "open" }, Ut[re("elementProperties")] = /* @__PURE__ */ new Map(), Ut[re("finalized")] = /* @__PURE__ */ new Map(), fn == null || fn({ ReactiveElement: Ut }), (At.reactiveElementVersions ?? (At.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
282
|
+
const se = globalThis, Be = se.trustedTypes, ni = Be ? Be.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Un = "$lit$", pt = `lit$${Math.random().toFixed(9).slice(2)}$`, kn = "?" + pt, qo = `<${kn}>`, Ht = document, he = () => Ht.createComment(""), pe = (e) => e === null || typeof e != "object" && typeof e != "function", Ai = Array.isArray, Ci = (e) => Ai(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", gn = `[
|
|
283
|
+
\f\r]`, te = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ii = /-->/g, oi = />/g, Pt = RegExp(`>|${gn}(?:([^\\s"'>=/]+)(${gn}*=${gn}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ri = /'/g, si = /"/g, Ti = /^(?:script|style|textarea|title)$/i, Yo = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), E = Yo(1), rt = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), ai = /* @__PURE__ */ new WeakMap(), Nt = Ht.createTreeWalker(Ht, 129);
|
|
285
|
+
function Pi(e, t) {
|
|
286
286
|
if (!Array.isArray(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
-
return
|
|
287
|
+
return ni !== void 0 ? ni.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const Di = (e, t) => {
|
|
290
290
|
const n = e.length - 1, i = [];
|
|
291
|
-
let o, r = t === 2 ? "<svg>" : "", s =
|
|
291
|
+
let o, r = t === 2 ? "<svg>" : "", s = te;
|
|
292
292
|
for (let a = 0; a < n; a++) {
|
|
293
293
|
const l = e[a];
|
|
294
|
-
let u,
|
|
295
|
-
for (; p < l.length && (s.lastIndex = p,
|
|
294
|
+
let u, c, d = -1, p = 0;
|
|
295
|
+
for (; p < l.length && (s.lastIndex = p, c = s.exec(l), c !== null); ) p = s.lastIndex, s === te ? c[1] === "!--" ? s = ii : c[1] !== void 0 ? s = oi : c[2] !== void 0 ? (Ti.test(c[2]) && (o = RegExp("</" + c[2], "g")), s = Pt) : c[3] !== void 0 && (s = Pt) : s === Pt ? c[0] === ">" ? (s = o ?? te, d = -1) : c[1] === void 0 ? d = -2 : (d = s.lastIndex - c[2].length, u = c[1], s = c[3] === void 0 ? Pt : c[3] === '"' ? si : ri) : s === si || s === ri ? s = Pt : s === ii || s === oi ? s = te : (s = Pt, o = void 0);
|
|
296
296
|
const f = s === Pt && e[a + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
r += s ===
|
|
297
|
+
r += s === te ? l + qo : d >= 0 ? (i.push(u), l.slice(0, d) + Un + l.slice(d) + pt + f) : l + pt + (d === -2 ? a : f);
|
|
298
298
|
}
|
|
299
|
-
return [
|
|
299
|
+
return [Pi(e, r + (e[n] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
301
|
+
class fe {
|
|
302
302
|
constructor({ strings: t, _$litType$: n }, i) {
|
|
303
303
|
let o;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let r = 0, s = 0;
|
|
306
|
-
const a = t.length - 1, l = this.parts, [u,
|
|
307
|
-
if (this.el =
|
|
308
|
-
const
|
|
309
|
-
|
|
306
|
+
const a = t.length - 1, l = this.parts, [u, c] = Di(t, n);
|
|
307
|
+
if (this.el = fe.createElement(u, i), Nt.currentNode = this.el.content, n === 2) {
|
|
308
|
+
const d = this.el.content.firstChild;
|
|
309
|
+
d.replaceWith(...d.childNodes);
|
|
310
310
|
}
|
|
311
311
|
for (; (o = Nt.nextNode()) !== null && l.length < a; ) {
|
|
312
312
|
if (o.nodeType === 1) {
|
|
313
|
-
if (o.hasAttributes()) for (const
|
|
314
|
-
const p =
|
|
315
|
-
l.push({ type: 1, index: r, name: g[2], strings: f, ctor: g[1] === "." ?
|
|
316
|
-
} else
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
313
|
+
if (o.hasAttributes()) for (const d of o.getAttributeNames()) if (d.endsWith(Un)) {
|
|
314
|
+
const p = c[s++], f = o.getAttribute(d).split(pt), g = /([.?@])?(.*)/.exec(p);
|
|
315
|
+
l.push({ type: 1, index: r, name: g[2], strings: f, ctor: g[1] === "." ? Oi : g[1] === "?" ? Mi : g[1] === "@" ? Ni : ve }), o.removeAttribute(d);
|
|
316
|
+
} else d.startsWith(pt) && (l.push({ type: 6, index: r }), o.removeAttribute(d));
|
|
317
|
+
if (Ti.test(o.tagName)) {
|
|
318
|
+
const d = o.textContent.split(pt), p = d.length - 1;
|
|
319
319
|
if (p > 0) {
|
|
320
|
-
o.textContent =
|
|
321
|
-
for (let f = 0; f < p; f++) o.append(
|
|
322
|
-
o.append(
|
|
320
|
+
o.textContent = Be ? Be.emptyScript : "";
|
|
321
|
+
for (let f = 0; f < p; f++) o.append(d[f], he()), Nt.nextNode(), l.push({ type: 2, index: ++r });
|
|
322
|
+
o.append(d[p], he());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (o.nodeType === 8) if (o.data ===
|
|
325
|
+
} else if (o.nodeType === 8) if (o.data === kn) l.push({ type: 2, index: r });
|
|
326
326
|
else {
|
|
327
|
-
let
|
|
328
|
-
for (; (
|
|
327
|
+
let d = -1;
|
|
328
|
+
for (; (d = o.data.indexOf(pt, d + 1)) !== -1; ) l.push({ type: 7, index: r }), d += pt.length - 1;
|
|
329
329
|
}
|
|
330
330
|
r++;
|
|
331
331
|
}
|
|
@@ -337,12 +337,12 @@ class pe {
|
|
|
337
337
|
}
|
|
338
338
|
function Bt(e, t, n = e, i) {
|
|
339
339
|
var s, a;
|
|
340
|
-
if (t ===
|
|
340
|
+
if (t === rt) return t;
|
|
341
341
|
let o = i !== void 0 ? (s = n._$Co) == null ? void 0 : s[i] : n._$Cl;
|
|
342
|
-
const r =
|
|
342
|
+
const r = pe(t) ? void 0 : t._$litDirective$;
|
|
343
343
|
return (o == null ? void 0 : o.constructor) !== r && ((a = o == null ? void 0 : o._$AO) == null || a.call(o, !1), r === void 0 ? o = void 0 : (o = new r(e), o._$AT(e, n, i)), i !== void 0 ? (n._$Co ?? (n._$Co = []))[i] = o : n._$Cl = o), o !== void 0 && (t = Bt(e, o._$AS(e, t.values), o, i)), t;
|
|
344
344
|
}
|
|
345
|
-
class
|
|
345
|
+
class Ri {
|
|
346
346
|
constructor(t, n) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = n;
|
|
348
348
|
}
|
|
@@ -359,7 +359,7 @@ class Ti {
|
|
|
359
359
|
for (; l !== void 0; ) {
|
|
360
360
|
if (s === l.index) {
|
|
361
361
|
let u;
|
|
362
|
-
l.type === 2 ? u = new
|
|
362
|
+
l.type === 2 ? u = new Yt(r, r.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (u = new Ii(r, this, t)), this._$AV.push(u), l = i[++a];
|
|
363
363
|
}
|
|
364
364
|
s !== (l == null ? void 0 : l.index) && (r = Nt.nextNode(), s++);
|
|
365
365
|
}
|
|
@@ -370,7 +370,7 @@ class Ti {
|
|
|
370
370
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, n), n += i.strings.length - 2) : i._$AI(t[n])), n++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class Yt {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var t;
|
|
376
376
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -390,7 +390,7 @@ class qt {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(t, n = this) {
|
|
393
|
-
t = Bt(this, t, n),
|
|
393
|
+
t = Bt(this, t, n), pe(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== rt && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ci(t) ? this.k(t) : this._(t);
|
|
394
394
|
}
|
|
395
395
|
S(t) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -399,26 +399,26 @@ class qt {
|
|
|
399
399
|
this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
|
|
400
400
|
}
|
|
401
401
|
_(t) {
|
|
402
|
-
this._$AH !== C &&
|
|
402
|
+
this._$AH !== C && pe(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Ht.createTextNode(t)), this._$AH = t;
|
|
403
403
|
}
|
|
404
404
|
$(t) {
|
|
405
405
|
var r;
|
|
406
|
-
const { values: n, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
406
|
+
const { values: n, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = fe.createElement(Pi(i.h, i.h[0]), this.options)), i);
|
|
407
407
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === o) this._$AH.p(n);
|
|
408
408
|
else {
|
|
409
|
-
const s = new
|
|
409
|
+
const s = new Ri(o, this), a = s.u(this.options);
|
|
410
410
|
s.p(n), this.T(a), this._$AH = s;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(t) {
|
|
414
|
-
let n =
|
|
415
|
-
return n === void 0 &&
|
|
414
|
+
let n = ai.get(t.strings);
|
|
415
|
+
return n === void 0 && ai.set(t.strings, n = new fe(t)), n;
|
|
416
416
|
}
|
|
417
417
|
k(t) {
|
|
418
|
-
|
|
418
|
+
Ai(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const n = this._$AH;
|
|
420
420
|
let i, o = 0;
|
|
421
|
-
for (const r of t) o === n.length ? n.push(i = new
|
|
421
|
+
for (const r of t) o === n.length ? n.push(i = new Yt(this.S(he()), this.S(he()), this, this.options)) : i = n[o], i._$AI(r), o++;
|
|
422
422
|
o < n.length && (this._$AR(i && i._$AB.nextSibling, o), n.length = o);
|
|
423
423
|
}
|
|
424
424
|
_$AR(t = this._$AA.nextSibling, n) {
|
|
@@ -433,7 +433,7 @@ class qt {
|
|
|
433
433
|
this._$AM === void 0 && (this._$Cv = t, (n = this._$AP) == null || n.call(this, t));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class ve {
|
|
437
437
|
get tagName() {
|
|
438
438
|
return this.element.tagName;
|
|
439
439
|
}
|
|
@@ -446,11 +446,11 @@ class be {
|
|
|
446
446
|
_$AI(t, n = this, i, o) {
|
|
447
447
|
const r = this.strings;
|
|
448
448
|
let s = !1;
|
|
449
|
-
if (r === void 0) t = Bt(this, t, n, 0), s = !
|
|
449
|
+
if (r === void 0) t = Bt(this, t, n, 0), s = !pe(t) || t !== this._$AH && t !== rt, s && (this._$AH = t);
|
|
450
450
|
else {
|
|
451
451
|
const a = t;
|
|
452
452
|
let l, u;
|
|
453
|
-
for (t = r[0], l = 0; l < r.length - 1; l++) u = Bt(this, a[i + l], n, l), u ===
|
|
453
|
+
for (t = r[0], l = 0; l < r.length - 1; l++) u = Bt(this, a[i + l], n, l), u === rt && (u = this._$AH[l]), s || (s = !pe(u) || u !== this._$AH[l]), u === C ? t = C : t !== C && (t += (u ?? "") + r[l + 1]), this._$AH[l] = u;
|
|
454
454
|
}
|
|
455
455
|
s && !o && this.j(t);
|
|
456
456
|
}
|
|
@@ -458,7 +458,7 @@ class be {
|
|
|
458
458
|
t === C ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class Oi extends ve {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ class Pi extends be {
|
|
|
466
466
|
this.element[this.name] = t === C ? void 0 : t;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class
|
|
469
|
+
class Mi extends ve {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,12 +474,12 @@ class Oi extends be {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!t && t !== C);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class Ni extends ve {
|
|
478
478
|
constructor(t, n, i, o, r) {
|
|
479
479
|
super(t, n, i, o, r), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(t, n = this) {
|
|
482
|
-
if ((t = Bt(this, t, n, 0) ?? C) ===
|
|
482
|
+
if ((t = Bt(this, t, n, 0) ?? C) === rt) return;
|
|
483
483
|
const i = this._$AH, o = t === C && i !== C || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== C && (i === C || o);
|
|
484
484
|
o && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
@@ -488,7 +488,7 @@ class Ri extends be {
|
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call(((n = this.options) == null ? void 0 : n.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
class
|
|
491
|
+
class Ii {
|
|
492
492
|
constructor(t, n, i) {
|
|
493
493
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = i;
|
|
494
494
|
}
|
|
@@ -499,14 +499,14 @@ class Di {
|
|
|
499
499
|
Bt(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const Wo = { P: Un, A: pt, C: kn, M: 1, L: Di, R: Ri, D: Ci, V: Bt, I: Yt, H: ve, N: Mi, U: Ni, B: Oi, F: Ii }, mn = se.litHtmlPolyfillSupport;
|
|
503
|
+
mn == null || mn(fe, Yt), (se.litHtmlVersions ?? (se.litHtmlVersions = [])).push("3.1.4");
|
|
504
|
+
const Go = (e, t, n) => {
|
|
505
505
|
const i = (n == null ? void 0 : n.renderBefore) ?? t;
|
|
506
506
|
let o = i._$litPart$;
|
|
507
507
|
if (o === void 0) {
|
|
508
508
|
const r = (n == null ? void 0 : n.renderBefore) ?? null;
|
|
509
|
-
i._$litPart$ = o = new
|
|
509
|
+
i._$litPart$ = o = new Yt(t.insertBefore(he(), r), r, void 0, n ?? {});
|
|
510
510
|
}
|
|
511
511
|
return o._$AI(e), o;
|
|
512
512
|
};
|
|
@@ -515,7 +515,7 @@ const zo = (e, t, n) => {
|
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let
|
|
518
|
+
let Q = class extends Ut {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -526,7 +526,7 @@ let nt = class extends kt {
|
|
|
526
526
|
}
|
|
527
527
|
update(t) {
|
|
528
528
|
const n = this.render();
|
|
529
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Go(n, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var t;
|
|
@@ -537,20 +537,20 @@ let nt = class extends kt {
|
|
|
537
537
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return rt;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
|
|
543
|
+
var Si;
|
|
544
|
+
Q._$litElement$ = !0, Q.finalized = !0, (Si = globalThis.litElementHydrateSupport) == null || Si.call(globalThis, { LitElement: Q });
|
|
545
|
+
const yn = globalThis.litElementPolyfillSupport;
|
|
546
|
+
yn == null || yn({ LitElement: Q });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.6");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
550
550
|
* Copyright 2021 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
function
|
|
553
|
+
function K(e, t, n) {
|
|
554
554
|
return e ? t(e) : n == null ? void 0 : n(e);
|
|
555
555
|
}
|
|
556
556
|
/**
|
|
@@ -558,8 +558,8 @@ function rt(e, t, n) {
|
|
|
558
558
|
* Copyright 2017 Google LLC
|
|
559
559
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
560
560
|
*/
|
|
561
|
-
const Et = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 },
|
|
562
|
-
class
|
|
561
|
+
const Et = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Fn = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
562
|
+
class jn {
|
|
563
563
|
constructor(t) {
|
|
564
564
|
}
|
|
565
565
|
get _$AU() {
|
|
@@ -580,12 +580,12 @@ class kn {
|
|
|
580
580
|
* Copyright 2020 Google LLC
|
|
581
581
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
582
582
|
*/
|
|
583
|
-
const { I:
|
|
583
|
+
const { I: Jo } = Wo, Ko = (e) => e.strings === void 0, li = () => document.createComment(""), ee = (e, t, n) => {
|
|
584
584
|
var r;
|
|
585
585
|
const i = e._$AA.parentNode, o = t === void 0 ? e._$AB : t._$AA;
|
|
586
586
|
if (n === void 0) {
|
|
587
|
-
const s = i.insertBefore(
|
|
588
|
-
n = new
|
|
587
|
+
const s = i.insertBefore(li(), o), a = i.insertBefore(li(), o);
|
|
588
|
+
n = new Jo(s, a, e, e.options);
|
|
589
589
|
} else {
|
|
590
590
|
const s = n._$AB.nextSibling, a = n._$AM, l = a !== e;
|
|
591
591
|
if (l) {
|
|
@@ -595,13 +595,13 @@ const { I: Zo } = jo, Xo = (e) => e.strings === void 0, ri = () => document.crea
|
|
|
595
595
|
if (s !== o || l) {
|
|
596
596
|
let u = n._$AA;
|
|
597
597
|
for (; u !== s; ) {
|
|
598
|
-
const
|
|
599
|
-
i.insertBefore(u, o), u =
|
|
598
|
+
const c = u.nextSibling;
|
|
599
|
+
i.insertBefore(u, o), u = c;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
return n;
|
|
604
|
-
},
|
|
604
|
+
}, Dt = (e, t, n = e) => (e._$AI(t, n), e), Qo = {}, Hi = (e, t = Qo) => e._$AH = t, tr = (e) => e._$AH, bn = (e) => {
|
|
605
605
|
var i;
|
|
606
606
|
(i = e._$AP) == null || i.call(e, !1, !0);
|
|
607
607
|
let t = e._$AA;
|
|
@@ -616,11 +616,11 @@ const { I: Zo } = jo, Xo = (e) => e.strings === void 0, ri = () => document.crea
|
|
|
616
616
|
* Copyright 2017 Google LLC
|
|
617
617
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
618
618
|
*/
|
|
619
|
-
const
|
|
619
|
+
const ui = (e, t, n) => {
|
|
620
620
|
const i = /* @__PURE__ */ new Map();
|
|
621
621
|
for (let o = t; o <= n; o++) i.set(e[o], o);
|
|
622
622
|
return i;
|
|
623
|
-
},
|
|
623
|
+
}, er = Fn(class extends jn {
|
|
624
624
|
constructor(e) {
|
|
625
625
|
if (super(e), e.type !== Et.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
626
626
|
}
|
|
@@ -636,34 +636,34 @@ const si = (e, t, n) => {
|
|
|
636
636
|
return this.dt(e, t, n).values;
|
|
637
637
|
}
|
|
638
638
|
update(e, [t, n, i]) {
|
|
639
|
-
const o =
|
|
639
|
+
const o = tr(e), { values: r, keys: s } = this.dt(t, n, i);
|
|
640
640
|
if (!Array.isArray(o)) return this.ut = s, r;
|
|
641
641
|
const a = this.ut ?? (this.ut = []), l = [];
|
|
642
|
-
let u,
|
|
643
|
-
for (;
|
|
642
|
+
let u, c, d = 0, p = o.length - 1, f = 0, g = r.length - 1;
|
|
643
|
+
for (; d <= p && f <= g; ) if (o[d] === null) d++;
|
|
644
644
|
else if (o[p] === null) p--;
|
|
645
|
-
else if (a[
|
|
646
|
-
else if (a[p] === s[g]) l[g] =
|
|
647
|
-
else if (a[
|
|
648
|
-
else if (a[p] === s[f]) l[f] =
|
|
649
|
-
else if (u === void 0 && (u =
|
|
650
|
-
const y =
|
|
651
|
-
if (
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
-
} else l[f] =
|
|
645
|
+
else if (a[d] === s[f]) l[f] = Dt(o[d], r[f]), d++, f++;
|
|
646
|
+
else if (a[p] === s[g]) l[g] = Dt(o[p], r[g]), p--, g--;
|
|
647
|
+
else if (a[d] === s[g]) l[g] = Dt(o[d], r[g]), ee(e, l[g + 1], o[d]), d++, g--;
|
|
648
|
+
else if (a[p] === s[f]) l[f] = Dt(o[p], r[f]), ee(e, o[d], o[p]), p--, f++;
|
|
649
|
+
else if (u === void 0 && (u = ui(s, f, g), c = ui(a, d, p)), u.has(a[d])) if (u.has(a[p])) {
|
|
650
|
+
const y = c.get(s[f]), D = y !== void 0 ? o[y] : null;
|
|
651
|
+
if (D === null) {
|
|
652
|
+
const U = ee(e, o[d]);
|
|
653
|
+
Dt(U, r[f]), l[f] = U;
|
|
654
|
+
} else l[f] = Dt(D, r[f]), ee(e, o[d], D), o[y] = null;
|
|
655
655
|
f++;
|
|
656
|
-
} else
|
|
657
|
-
else
|
|
656
|
+
} else bn(o[p]), p--;
|
|
657
|
+
else bn(o[d]), d++;
|
|
658
658
|
for (; f <= g; ) {
|
|
659
|
-
const y =
|
|
660
|
-
|
|
659
|
+
const y = ee(e, l[g + 1]);
|
|
660
|
+
Dt(y, r[f]), l[f++] = y;
|
|
661
661
|
}
|
|
662
|
-
for (;
|
|
663
|
-
const y = o[
|
|
664
|
-
y !== null &&
|
|
662
|
+
for (; d <= p; ) {
|
|
663
|
+
const y = o[d++];
|
|
664
|
+
y !== null && bn(y);
|
|
665
665
|
}
|
|
666
|
-
return this.ut = s,
|
|
666
|
+
return this.ut = s, Hi(e, l), rt;
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
/**
|
|
@@ -672,8 +672,8 @@ const si = (e, t, n) => {
|
|
|
672
672
|
* @license BSD-2-Clause
|
|
673
673
|
* @preserve
|
|
674
674
|
*/
|
|
675
|
-
var
|
|
676
|
-
const
|
|
675
|
+
var x = (e) => e !== void 0, Bi = (e, t, n) => t in e ? e[t] : e[t] = n;
|
|
676
|
+
const ge = {
|
|
677
677
|
ELEMENT: 1,
|
|
678
678
|
ATTRIBUTE: 2,
|
|
679
679
|
TEXT: 3,
|
|
@@ -687,7 +687,7 @@ const fe = {
|
|
|
687
687
|
DOCUMENT_FRAGMENT: 11,
|
|
688
688
|
NOTATION: 12
|
|
689
689
|
};
|
|
690
|
-
class
|
|
690
|
+
class nr {
|
|
691
691
|
/**
|
|
692
692
|
* XML DOM parser
|
|
693
693
|
* @constructor
|
|
@@ -712,56 +712,56 @@ class Go {
|
|
|
712
712
|
* @api
|
|
713
713
|
*/
|
|
714
714
|
getAllTextContent(t, n) {
|
|
715
|
-
return
|
|
715
|
+
return cn(t, n).join("");
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
function
|
|
719
|
-
return
|
|
718
|
+
function cn(e, t) {
|
|
719
|
+
return Vi(e, t, []).join("");
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
if (e.nodeType ===
|
|
721
|
+
function Vi(e, t, n) {
|
|
722
|
+
if (e.nodeType === ge.CDATA_SECTION || e.nodeType === ge.TEXT)
|
|
723
723
|
t ? n.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : n.push(e.nodeValue);
|
|
724
724
|
else {
|
|
725
725
|
var i;
|
|
726
726
|
for (i = e.firstChild; i; i = i.nextSibling)
|
|
727
|
-
|
|
727
|
+
Vi(i, t, n);
|
|
728
728
|
}
|
|
729
729
|
return n;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
for (var o =
|
|
731
|
+
function ir(e, t, n, i) {
|
|
732
|
+
for (var o = or(t); o; o = rr(o)) {
|
|
733
733
|
var r = o.namespaceURI || null, s = e[r];
|
|
734
|
-
if (
|
|
734
|
+
if (x(s)) {
|
|
735
735
|
var a = s[o.localName];
|
|
736
|
-
|
|
736
|
+
x(a) && a.call(i, o, n);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function or(e) {
|
|
741
741
|
let t = e.firstElementChild || e.firstChild;
|
|
742
|
-
for (; t && t.nodeType !==
|
|
742
|
+
for (; t && t.nodeType !== ge.ELEMENT; )
|
|
743
743
|
t = t.nextSibling;
|
|
744
744
|
return t;
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function rr(e) {
|
|
747
747
|
let t = e.nextElementSibling || e.nextSibling;
|
|
748
|
-
for (; t && t.nodeType !==
|
|
748
|
+
for (; t && t.nodeType !== ge.ELEMENT; )
|
|
749
749
|
t = t.nextSibling;
|
|
750
750
|
return t;
|
|
751
751
|
}
|
|
752
752
|
function j(e, t, n) {
|
|
753
753
|
return (
|
|
754
754
|
/** @type {Object.<string, Object.<string, XMLParser.Parser>>} */
|
|
755
|
-
|
|
755
|
+
sr(e, t, n)
|
|
756
756
|
);
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
var i =
|
|
758
|
+
function sr(e, t, n) {
|
|
759
|
+
var i = x(n) ? n : {}, o, r;
|
|
760
760
|
for (o = 0, r = e.length; o < r; ++o)
|
|
761
761
|
i[e[o]] = t;
|
|
762
762
|
return i;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function Li(e, t) {
|
|
765
765
|
return (
|
|
766
766
|
/**
|
|
767
767
|
* @param {Node} node Node.
|
|
@@ -769,19 +769,19 @@ function Hi(e, t) {
|
|
|
769
769
|
*/
|
|
770
770
|
function(n, i) {
|
|
771
771
|
var o = e.call(
|
|
772
|
-
|
|
772
|
+
x(t) ? t : this,
|
|
773
773
|
n,
|
|
774
774
|
i
|
|
775
775
|
);
|
|
776
|
-
if (
|
|
776
|
+
if (x(o)) {
|
|
777
777
|
var r = i[i.length - 1];
|
|
778
778
|
r.push(o);
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
);
|
|
782
782
|
}
|
|
783
|
-
function
|
|
784
|
-
return i.push(e),
|
|
783
|
+
function L(e, t, n, i, o) {
|
|
784
|
+
return i.push(e), ir(t, n, i, o), i.pop();
|
|
785
785
|
}
|
|
786
786
|
function m(e, t, n) {
|
|
787
787
|
return (
|
|
@@ -791,15 +791,15 @@ function m(e, t, n) {
|
|
|
791
791
|
*/
|
|
792
792
|
function(i, o) {
|
|
793
793
|
let r = e.call(
|
|
794
|
-
|
|
794
|
+
x(n) ? n : this,
|
|
795
795
|
i,
|
|
796
796
|
o
|
|
797
797
|
);
|
|
798
|
-
if (
|
|
798
|
+
if (x(r)) {
|
|
799
799
|
var s = (
|
|
800
800
|
/** @type {Object} */
|
|
801
801
|
o[o.length - 1]
|
|
802
|
-
), a =
|
|
802
|
+
), a = x(t) ? t : i.localName;
|
|
803
803
|
s[a] = r;
|
|
804
804
|
}
|
|
805
805
|
}
|
|
@@ -813,56 +813,56 @@ function J(e, t, n) {
|
|
|
813
813
|
*/
|
|
814
814
|
function(i, o) {
|
|
815
815
|
var r = e.call(
|
|
816
|
-
|
|
816
|
+
x(n) ? n : this,
|
|
817
817
|
i,
|
|
818
818
|
o
|
|
819
819
|
);
|
|
820
|
-
if (
|
|
820
|
+
if (x(r)) {
|
|
821
821
|
var s = (
|
|
822
822
|
/** @type {Object} */
|
|
823
823
|
o[o.length - 1]
|
|
824
|
-
), a =
|
|
824
|
+
), a = x(t) ? t : i.localName, l = Bi(s, a, []);
|
|
825
825
|
l.push(r);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
);
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
function
|
|
832
|
-
return e.replace(
|
|
830
|
+
const ar = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
|
831
|
+
function lr(e) {
|
|
832
|
+
return e.replace(ar, "");
|
|
833
833
|
}
|
|
834
834
|
function It(e) {
|
|
835
835
|
const t = /^\s*(true|1)|(false|0)\s*$/.exec(e);
|
|
836
836
|
if (t)
|
|
837
|
-
return
|
|
837
|
+
return x(t[1]) || !1;
|
|
838
838
|
}
|
|
839
839
|
function Ft(e) {
|
|
840
|
-
return ft(
|
|
840
|
+
return ft(cn(e, !1));
|
|
841
841
|
}
|
|
842
842
|
function ft(e) {
|
|
843
843
|
const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(e);
|
|
844
844
|
if (t)
|
|
845
845
|
return parseFloat(t[1]);
|
|
846
846
|
}
|
|
847
|
-
function
|
|
848
|
-
return
|
|
847
|
+
function vn(e) {
|
|
848
|
+
return Ve(cn(e, !1));
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Ve(e) {
|
|
851
851
|
const t = /^\s*(\d+)\s*$/.exec(e);
|
|
852
852
|
if (t)
|
|
853
853
|
return parseInt(t[1], 10);
|
|
854
854
|
}
|
|
855
855
|
function $(e) {
|
|
856
|
-
return
|
|
856
|
+
return lr(cn(e, !1));
|
|
857
857
|
}
|
|
858
|
-
const
|
|
859
|
-
function
|
|
860
|
-
return e.getAttributeNS(
|
|
858
|
+
const ur = "http://www.w3.org/1999/xlink";
|
|
859
|
+
function Zn(e) {
|
|
860
|
+
return e.getAttributeNS(ur, "href");
|
|
861
861
|
}
|
|
862
|
-
function
|
|
863
|
-
return
|
|
862
|
+
function dr(e, t) {
|
|
863
|
+
return L({}, Br, e, t);
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function Ui(e) {
|
|
866
866
|
return [
|
|
867
867
|
ft(e.getAttribute("minx")),
|
|
868
868
|
ft(e.getAttribute("miny")),
|
|
@@ -870,8 +870,8 @@ function Bi(e) {
|
|
|
870
870
|
ft(e.getAttribute("maxy"))
|
|
871
871
|
];
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
const n =
|
|
873
|
+
function cr(e, t) {
|
|
874
|
+
const n = Ui(e), i = [
|
|
875
875
|
ft(e.getAttribute("resx")),
|
|
876
876
|
ft(e.getAttribute("resy"))
|
|
877
877
|
];
|
|
@@ -881,23 +881,23 @@ function rr(e, t) {
|
|
|
881
881
|
res: i
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
const n =
|
|
886
|
-
if (!(!
|
|
884
|
+
function hr(e, t) {
|
|
885
|
+
const n = Ui(e);
|
|
886
|
+
if (!(!x(n[0]) || !x(n[1]) || !x(n[2]) || !x(n[3])))
|
|
887
887
|
return n;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function pr(e, t) {
|
|
890
890
|
const n = parseFloat(e.getAttribute("min")), i = parseFloat(e.getAttribute("max"));
|
|
891
891
|
return { min: n, max: i };
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
const n =
|
|
893
|
+
function fr(e, t) {
|
|
894
|
+
const n = L(
|
|
895
895
|
{},
|
|
896
|
-
|
|
896
|
+
Vr,
|
|
897
897
|
e,
|
|
898
898
|
t
|
|
899
899
|
);
|
|
900
|
-
if (!
|
|
900
|
+
if (!x(n)) return;
|
|
901
901
|
const i = (
|
|
902
902
|
/** @type {number|undefined} */
|
|
903
903
|
n.westBoundLongitude
|
|
@@ -911,7 +911,7 @@ function lr(e, t) {
|
|
|
911
911
|
/** @type {number|undefined} */
|
|
912
912
|
n.northBoundLatitude
|
|
913
913
|
);
|
|
914
|
-
if (!(!
|
|
914
|
+
if (!(!x(i) || !x(o) || !x(r) || !x(s)))
|
|
915
915
|
return [
|
|
916
916
|
i,
|
|
917
917
|
o,
|
|
@@ -919,91 +919,91 @@ function lr(e, t) {
|
|
|
919
919
|
s
|
|
920
920
|
];
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return
|
|
922
|
+
function gr(e, t) {
|
|
923
|
+
return L({}, Rr, e, t);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
return
|
|
925
|
+
function mr(e, t) {
|
|
926
|
+
return L({}, Or, e, t);
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
return
|
|
928
|
+
function yr(e, t) {
|
|
929
|
+
return L(
|
|
930
930
|
{},
|
|
931
|
-
|
|
931
|
+
Mr,
|
|
932
932
|
e,
|
|
933
933
|
t
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
936
|
+
function br(e, t) {
|
|
937
|
+
return L(
|
|
938
938
|
{},
|
|
939
|
-
|
|
939
|
+
Nr,
|
|
940
940
|
e,
|
|
941
941
|
t
|
|
942
942
|
);
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
return
|
|
944
|
+
function vr(e, t) {
|
|
945
|
+
return L(
|
|
946
946
|
{},
|
|
947
|
-
|
|
947
|
+
Ir,
|
|
948
948
|
e,
|
|
949
949
|
t
|
|
950
950
|
);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return
|
|
952
|
+
function wr(e, t) {
|
|
953
|
+
return L(
|
|
954
954
|
[],
|
|
955
|
-
|
|
955
|
+
Hr,
|
|
956
956
|
e,
|
|
957
957
|
t
|
|
958
958
|
);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function Er(e, t) {
|
|
961
961
|
const n = It(e.getAttribute("queryable"));
|
|
962
|
-
return
|
|
962
|
+
return L(
|
|
963
963
|
{
|
|
964
|
-
queryable:
|
|
964
|
+
queryable: x(n) ? n : !1
|
|
965
965
|
},
|
|
966
|
-
|
|
966
|
+
ji,
|
|
967
967
|
e,
|
|
968
968
|
t
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function xr(e, t) {
|
|
972
972
|
var n = (
|
|
973
973
|
/** @type {Object.<string,*>} */
|
|
974
974
|
t[t.length - 1]
|
|
975
975
|
);
|
|
976
976
|
const i = (
|
|
977
977
|
/** @type {Object.<string,*>} */
|
|
978
|
-
|
|
978
|
+
L(
|
|
979
979
|
{},
|
|
980
|
-
|
|
980
|
+
ji,
|
|
981
981
|
e,
|
|
982
982
|
t
|
|
983
983
|
)
|
|
984
984
|
);
|
|
985
|
-
if (!
|
|
985
|
+
if (!x(i)) return;
|
|
986
986
|
let o = It(e.getAttribute("queryable"));
|
|
987
|
-
|
|
988
|
-
let r =
|
|
989
|
-
|
|
987
|
+
x(o) || (o = n.queryable), i.queryable = x(o) ? o : !1;
|
|
988
|
+
let r = Ve(e.getAttribute("cascaded"));
|
|
989
|
+
x(r) || (r = n.cascaded), i.cascaded = r;
|
|
990
990
|
let s = It(e.getAttribute("opaque"));
|
|
991
|
-
|
|
991
|
+
x(s) || (s = n.opaque), i.opaque = x(s) ? s : !1;
|
|
992
992
|
let a = It(e.getAttribute("noSubsets"));
|
|
993
|
-
|
|
993
|
+
x(a) || (a = n.noSubsets), i.noSubsets = x(a) ? a : !1;
|
|
994
994
|
let l = ft(e.getAttribute("fixedWidth"));
|
|
995
|
-
|
|
995
|
+
x(l) || (l = n.fixedWidth), i.fixedWidth = l;
|
|
996
996
|
let u = ft(e.getAttribute("fixedHeight"));
|
|
997
|
-
|
|
998
|
-
const
|
|
999
|
-
for (let p = 0, f =
|
|
1000
|
-
const g =
|
|
1001
|
-
if (
|
|
1002
|
-
let
|
|
1003
|
-
|
|
997
|
+
x(u) || (u = n.fixedHeight), i.fixedHeight = u;
|
|
998
|
+
const c = ["Style", "CRS", "AuthorityURL"];
|
|
999
|
+
for (let p = 0, f = c.length; p < f; p++) {
|
|
1000
|
+
const g = c[p], y = n[g];
|
|
1001
|
+
if (x(y)) {
|
|
1002
|
+
let D = Bi(i, g, []);
|
|
1003
|
+
D = D.concat(y), i[g] = D;
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
const
|
|
1006
|
+
const d = [
|
|
1007
1007
|
"EX_GeographicBoundingBox",
|
|
1008
1008
|
"BoundingBox",
|
|
1009
1009
|
"Dimension",
|
|
@@ -1011,16 +1011,16 @@ function mr(e, t) {
|
|
|
1011
1011
|
"MinScaleDenominator",
|
|
1012
1012
|
"MaxScaleDenominator"
|
|
1013
1013
|
];
|
|
1014
|
-
for (let p = 0, f =
|
|
1015
|
-
const g =
|
|
1016
|
-
if (!
|
|
1017
|
-
const
|
|
1018
|
-
i[g] =
|
|
1014
|
+
for (let p = 0, f = d.length; p < f; p++) {
|
|
1015
|
+
const g = d[p], y = i[g];
|
|
1016
|
+
if (!x(y)) {
|
|
1017
|
+
const D = n[g];
|
|
1018
|
+
i[g] = D;
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
1021
|
return i;
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Sr(e, t) {
|
|
1024
1024
|
return {
|
|
1025
1025
|
name: e.getAttribute("name"),
|
|
1026
1026
|
units: e.getAttribute("units"),
|
|
@@ -1033,105 +1033,105 @@ function yr(e, t) {
|
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
1035
|
function mt(e, t) {
|
|
1036
|
-
return
|
|
1036
|
+
return L(
|
|
1037
1037
|
{},
|
|
1038
|
-
|
|
1038
|
+
Zr,
|
|
1039
1039
|
e,
|
|
1040
1040
|
t
|
|
1041
1041
|
);
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
return
|
|
1043
|
+
function $r(e, t) {
|
|
1044
|
+
return L({}, Lr, e, t);
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return
|
|
1046
|
+
function _r(e, t) {
|
|
1047
|
+
return L({}, kr, e, t);
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return
|
|
1049
|
+
function Ar(e, t) {
|
|
1050
|
+
return L({}, Fr, e, t);
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
return
|
|
1052
|
+
function wn(e, t) {
|
|
1053
|
+
return L({}, Ur, e, t);
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function ki(e, t) {
|
|
1056
1056
|
var n = mt(e, t);
|
|
1057
|
-
if (
|
|
1057
|
+
if (x(n)) {
|
|
1058
1058
|
const i = [
|
|
1059
|
-
|
|
1060
|
-
|
|
1059
|
+
Ve(e.getAttribute("width")),
|
|
1060
|
+
Ve(e.getAttribute("height"))
|
|
1061
1061
|
];
|
|
1062
1062
|
return n.size = i, n;
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function Cr(e, t) {
|
|
1066
1066
|
var n = mt(e, t);
|
|
1067
|
-
if (
|
|
1067
|
+
if (x(n))
|
|
1068
1068
|
return n.name = e.getAttribute("name"), n;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function Tr(e, t) {
|
|
1071
1071
|
var n = mt(e, t);
|
|
1072
|
-
if (
|
|
1072
|
+
if (x(n))
|
|
1073
1073
|
return n.type = e.getAttribute("type"), n;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1075
|
+
function Pr(e, t) {
|
|
1076
|
+
return L({}, jr, e, t);
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
1078
|
+
function Fi(e, t) {
|
|
1079
|
+
return L(
|
|
1080
1080
|
[],
|
|
1081
|
-
|
|
1081
|
+
zr,
|
|
1082
1082
|
e,
|
|
1083
1083
|
t
|
|
1084
1084
|
);
|
|
1085
1085
|
}
|
|
1086
|
-
const
|
|
1086
|
+
const Z = [
|
|
1087
1087
|
null,
|
|
1088
1088
|
"http://www.opengis.net/wms"
|
|
1089
|
-
],
|
|
1090
|
-
|
|
1089
|
+
], Dr = j(
|
|
1090
|
+
Z,
|
|
1091
1091
|
{
|
|
1092
|
-
Service: m(
|
|
1093
|
-
Capability: m(
|
|
1092
|
+
Service: m(mr),
|
|
1093
|
+
Capability: m(gr)
|
|
1094
1094
|
}
|
|
1095
|
-
),
|
|
1096
|
-
|
|
1095
|
+
), Rr = j(
|
|
1096
|
+
Z,
|
|
1097
1097
|
{
|
|
1098
|
-
Request: m(
|
|
1099
|
-
Exception: m(
|
|
1100
|
-
Layer: m(
|
|
1098
|
+
Request: m($r),
|
|
1099
|
+
Exception: m(wr),
|
|
1100
|
+
Layer: m(Er)
|
|
1101
1101
|
}
|
|
1102
|
-
),
|
|
1103
|
-
|
|
1102
|
+
), Or = j(
|
|
1103
|
+
Z,
|
|
1104
1104
|
{
|
|
1105
1105
|
Name: m($),
|
|
1106
1106
|
Title: m($),
|
|
1107
1107
|
Abstract: m($),
|
|
1108
|
-
KeywordList: m(
|
|
1109
|
-
OnlineResource: m(
|
|
1110
|
-
ContactInformation: m(
|
|
1108
|
+
KeywordList: m(Fi),
|
|
1109
|
+
OnlineResource: m(Zn),
|
|
1110
|
+
ContactInformation: m(yr),
|
|
1111
1111
|
Fees: m($),
|
|
1112
1112
|
AccessConstraints: m($),
|
|
1113
|
-
LayerLimit: m(
|
|
1114
|
-
MaxWidth: m(
|
|
1115
|
-
MaxHeight: m(
|
|
1113
|
+
LayerLimit: m(vn),
|
|
1114
|
+
MaxWidth: m(vn),
|
|
1115
|
+
MaxHeight: m(vn)
|
|
1116
1116
|
}
|
|
1117
|
-
),
|
|
1118
|
-
|
|
1117
|
+
), Mr = j(
|
|
1118
|
+
Z,
|
|
1119
1119
|
{
|
|
1120
|
-
ContactPersonPrimary: m(
|
|
1120
|
+
ContactPersonPrimary: m(br),
|
|
1121
1121
|
ContactPosition: m($),
|
|
1122
|
-
ContactAddress: m(
|
|
1122
|
+
ContactAddress: m(vr),
|
|
1123
1123
|
ContactVoiceTelephone: m($),
|
|
1124
1124
|
ContactFacsimileTelephone: m($),
|
|
1125
1125
|
ContactElectronicMailAddress: m($)
|
|
1126
1126
|
}
|
|
1127
|
-
),
|
|
1128
|
-
|
|
1127
|
+
), Nr = j(
|
|
1128
|
+
Z,
|
|
1129
1129
|
{
|
|
1130
1130
|
ContactPerson: m($),
|
|
1131
1131
|
ContactOrganization: m($)
|
|
1132
1132
|
}
|
|
1133
|
-
),
|
|
1134
|
-
|
|
1133
|
+
), Ir = j(
|
|
1134
|
+
Z,
|
|
1135
1135
|
{
|
|
1136
1136
|
AddressType: m($),
|
|
1137
1137
|
Address: m($),
|
|
@@ -1140,78 +1140,78 @@ const z = [
|
|
|
1140
1140
|
PostCode: m($),
|
|
1141
1141
|
Country: m($)
|
|
1142
1142
|
}
|
|
1143
|
-
),
|
|
1144
|
-
|
|
1143
|
+
), Hr = j(
|
|
1144
|
+
Z,
|
|
1145
1145
|
{
|
|
1146
|
-
Format:
|
|
1146
|
+
Format: Li($)
|
|
1147
1147
|
}
|
|
1148
|
-
),
|
|
1149
|
-
|
|
1148
|
+
), ji = j(
|
|
1149
|
+
Z,
|
|
1150
1150
|
{
|
|
1151
1151
|
Name: m($),
|
|
1152
1152
|
Title: m($),
|
|
1153
1153
|
Abstract: m($),
|
|
1154
|
-
KeywordList: m(
|
|
1154
|
+
KeywordList: m(Fi),
|
|
1155
1155
|
CRS: J($),
|
|
1156
1156
|
SRS: J($),
|
|
1157
|
-
EX_GeographicBoundingBox: m(
|
|
1158
|
-
LatLonBoundingBox: m(
|
|
1159
|
-
BoundingBox: J(
|
|
1160
|
-
Dimension: J(
|
|
1161
|
-
Attribution: m(
|
|
1162
|
-
AuthorityURL: J(
|
|
1157
|
+
EX_GeographicBoundingBox: m(fr),
|
|
1158
|
+
LatLonBoundingBox: m(hr),
|
|
1159
|
+
BoundingBox: J(cr),
|
|
1160
|
+
Dimension: J(Sr),
|
|
1161
|
+
Attribution: m(dr),
|
|
1162
|
+
AuthorityURL: J(Cr),
|
|
1163
1163
|
Identifier: J($),
|
|
1164
|
-
MetadataURL: J(
|
|
1164
|
+
MetadataURL: J(Tr),
|
|
1165
1165
|
DataURL: J(mt),
|
|
1166
1166
|
FeatureListURL: J(mt),
|
|
1167
|
-
Style: J(
|
|
1167
|
+
Style: J(Pr),
|
|
1168
1168
|
MinScaleDenominator: m(Ft),
|
|
1169
1169
|
MaxScaleDenominator: m(Ft),
|
|
1170
|
-
ScaleHint: m(
|
|
1171
|
-
Layer: J(
|
|
1170
|
+
ScaleHint: m(pr),
|
|
1171
|
+
Layer: J(xr)
|
|
1172
1172
|
}
|
|
1173
|
-
),
|
|
1174
|
-
|
|
1173
|
+
), Br = j(
|
|
1174
|
+
Z,
|
|
1175
1175
|
{
|
|
1176
1176
|
Title: m($),
|
|
1177
|
-
OnlineResource: m(
|
|
1178
|
-
LogoURL: m(
|
|
1177
|
+
OnlineResource: m(Zn),
|
|
1178
|
+
LogoURL: m(ki)
|
|
1179
1179
|
}
|
|
1180
|
-
),
|
|
1180
|
+
), Vr = j(Z, {
|
|
1181
1181
|
westBoundLongitude: m(Ft),
|
|
1182
1182
|
eastBoundLongitude: m(Ft),
|
|
1183
1183
|
southBoundLatitude: m(Ft),
|
|
1184
1184
|
northBoundLatitude: m(Ft)
|
|
1185
|
-
}),
|
|
1186
|
-
|
|
1185
|
+
}), Lr = j(
|
|
1186
|
+
Z,
|
|
1187
1187
|
{
|
|
1188
1188
|
GetCapabilities: m(
|
|
1189
|
-
|
|
1189
|
+
wn
|
|
1190
1190
|
),
|
|
1191
1191
|
GetMap: m(
|
|
1192
|
-
|
|
1192
|
+
wn
|
|
1193
1193
|
),
|
|
1194
1194
|
GetFeatureInfo: m(
|
|
1195
|
-
|
|
1195
|
+
wn
|
|
1196
1196
|
)
|
|
1197
1197
|
}
|
|
1198
|
-
),
|
|
1199
|
-
|
|
1198
|
+
), Ur = j(
|
|
1199
|
+
Z,
|
|
1200
1200
|
{
|
|
1201
1201
|
Format: J($),
|
|
1202
1202
|
DCPType: J(
|
|
1203
|
-
|
|
1203
|
+
_r
|
|
1204
1204
|
)
|
|
1205
1205
|
}
|
|
1206
|
-
),
|
|
1207
|
-
|
|
1206
|
+
), kr = j(
|
|
1207
|
+
Z,
|
|
1208
1208
|
{
|
|
1209
1209
|
HTTP: m(
|
|
1210
|
-
|
|
1210
|
+
Ar
|
|
1211
1211
|
)
|
|
1212
1212
|
}
|
|
1213
|
-
),
|
|
1214
|
-
|
|
1213
|
+
), Fr = j(
|
|
1214
|
+
Z,
|
|
1215
1215
|
{
|
|
1216
1216
|
Get: m(
|
|
1217
1217
|
mt
|
|
@@ -1220,29 +1220,29 @@ const z = [
|
|
|
1220
1220
|
mt
|
|
1221
1221
|
)
|
|
1222
1222
|
}
|
|
1223
|
-
),
|
|
1224
|
-
|
|
1223
|
+
), jr = j(
|
|
1224
|
+
Z,
|
|
1225
1225
|
{
|
|
1226
1226
|
Name: m($),
|
|
1227
1227
|
Title: m($),
|
|
1228
1228
|
Abstract: m($),
|
|
1229
|
-
LegendURL: J(
|
|
1229
|
+
LegendURL: J(ki),
|
|
1230
1230
|
StyleSheetURL: m(mt),
|
|
1231
1231
|
StyleURL: m(mt)
|
|
1232
1232
|
}
|
|
1233
|
-
),
|
|
1234
|
-
|
|
1233
|
+
), Zr = j(
|
|
1234
|
+
Z,
|
|
1235
1235
|
{
|
|
1236
1236
|
Format: m($),
|
|
1237
|
-
OnlineResource: m(
|
|
1237
|
+
OnlineResource: m(Zn)
|
|
1238
1238
|
}
|
|
1239
|
-
),
|
|
1240
|
-
|
|
1239
|
+
), zr = j(
|
|
1240
|
+
Z,
|
|
1241
1241
|
{
|
|
1242
|
-
Keyword:
|
|
1242
|
+
Keyword: Li($)
|
|
1243
1243
|
}
|
|
1244
1244
|
);
|
|
1245
|
-
class
|
|
1245
|
+
class Xr {
|
|
1246
1246
|
/**
|
|
1247
1247
|
* WMS Capabilities parser
|
|
1248
1248
|
*
|
|
@@ -1250,7 +1250,7 @@ class kr {
|
|
|
1250
1250
|
* @constructor
|
|
1251
1251
|
*/
|
|
1252
1252
|
constructor(t, n) {
|
|
1253
|
-
!n && typeof window < "u" && (n = window.DOMParser), this.version = void 0, this._parser = new
|
|
1253
|
+
!n && typeof window < "u" && (n = window.DOMParser), this.version = void 0, this._parser = new nr(n), this._data = t;
|
|
1254
1254
|
}
|
|
1255
1255
|
/**
|
|
1256
1256
|
* @param {String} xmlString
|
|
@@ -1279,7 +1279,7 @@ class kr {
|
|
|
1279
1279
|
*/
|
|
1280
1280
|
readFromDocument(t) {
|
|
1281
1281
|
for (let n = t.firstChild; n; n = n.nextSibling)
|
|
1282
|
-
if (n.nodeType ==
|
|
1282
|
+
if (n.nodeType == ge.ELEMENT)
|
|
1283
1283
|
return this.readFromNode(n);
|
|
1284
1284
|
return null;
|
|
1285
1285
|
}
|
|
@@ -1288,44 +1288,44 @@ class kr {
|
|
|
1288
1288
|
* @return {Object}
|
|
1289
1289
|
*/
|
|
1290
1290
|
readFromNode(t) {
|
|
1291
|
-
return this.version = t.getAttribute("version"),
|
|
1291
|
+
return this.version = t.getAttribute("version"), L({
|
|
1292
1292
|
version: this.version
|
|
1293
|
-
},
|
|
1293
|
+
}, Dr, t, []) || null;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
async function
|
|
1296
|
+
async function qr(e) {
|
|
1297
1297
|
let t = new URL(e), n = t.searchParams;
|
|
1298
1298
|
n.set("SERVICE", "WMS"), n.set("REQUEST", "GetCapabilities");
|
|
1299
1299
|
let i = t.toString();
|
|
1300
1300
|
const o = await fetch(i);
|
|
1301
1301
|
if (o.ok) {
|
|
1302
1302
|
const r = await o.text();
|
|
1303
|
-
return new
|
|
1303
|
+
return new Xr(r).toJSON();
|
|
1304
1304
|
} else
|
|
1305
1305
|
throw new Error(`Error: ${o.status}`);
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function zn(e) {
|
|
1308
1308
|
const t = /\b(?:wms|ows)\b/i, n = /{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;
|
|
1309
1309
|
return t.test(e) ? "TileWMS" : n.test(e) ? "XYZ" : !1;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
const n = /^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(e), i =
|
|
1311
|
+
function Yr(e) {
|
|
1312
|
+
const n = /^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(e), i = zn(e);
|
|
1313
1313
|
return !!(e && n && i);
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function Zi(e) {
|
|
1316
1316
|
return e.replace(
|
|
1317
1317
|
/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,
|
|
1318
1318
|
'"$2": '
|
|
1319
1319
|
).replace(/,\s*}/g, "}").replace(/,\s*]/g, "]").replace(/\s*(\{|}|\[|\]|,)\s*/g, "$1").replaceAll('": //', "://");
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Wr(e) {
|
|
1322
1322
|
try {
|
|
1323
|
-
return JSON.parse(
|
|
1323
|
+
return JSON.parse(Zi(e)), !!e;
|
|
1324
1324
|
} catch {
|
|
1325
1325
|
return !1;
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function Gr(e, t) {
|
|
1329
1329
|
const n = new URL(e).searchParams;
|
|
1330
1330
|
Object.entries(t).forEach(([s, a]) => {
|
|
1331
1331
|
typeof a == "object" && !Array.isArray(a) && a !== null ? Object.keys(a).forEach((l) => {
|
|
@@ -1341,7 +1341,7 @@ function zr(e, t) {
|
|
|
1341
1341
|
* @author owenm <owen23355@gmail.com>
|
|
1342
1342
|
* @license MIT
|
|
1343
1343
|
*/
|
|
1344
|
-
function
|
|
1344
|
+
function di(e, t) {
|
|
1345
1345
|
var n = Object.keys(e);
|
|
1346
1346
|
if (Object.getOwnPropertySymbols) {
|
|
1347
1347
|
var i = Object.getOwnPropertySymbols(e);
|
|
@@ -1351,26 +1351,26 @@ function ai(e, t) {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
return n;
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function ct(e) {
|
|
1355
1355
|
for (var t = 1; t < arguments.length; t++) {
|
|
1356
1356
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
1357
|
-
t % 2 ?
|
|
1358
|
-
|
|
1359
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1357
|
+
t % 2 ? di(Object(n), !0).forEach(function(i) {
|
|
1358
|
+
Jr(e, i, n[i]);
|
|
1359
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : di(Object(n)).forEach(function(i) {
|
|
1360
1360
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i));
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
1363
|
return e;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function Pe(e) {
|
|
1366
1366
|
"@babel/helpers - typeof";
|
|
1367
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
1367
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Pe = function(t) {
|
|
1368
1368
|
return typeof t;
|
|
1369
|
-
} :
|
|
1369
|
+
} : Pe = function(t) {
|
|
1370
1370
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1371
|
-
},
|
|
1371
|
+
}, Pe(e);
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function Jr(e, t, n) {
|
|
1374
1374
|
return t in e ? Object.defineProperty(e, t, {
|
|
1375
1375
|
value: n,
|
|
1376
1376
|
enumerable: !0,
|
|
@@ -1388,16 +1388,16 @@ function yt() {
|
|
|
1388
1388
|
return e;
|
|
1389
1389
|
}, yt.apply(this, arguments);
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function Kr(e, t) {
|
|
1392
1392
|
if (e == null) return {};
|
|
1393
1393
|
var n = {}, i = Object.keys(e), o, r;
|
|
1394
1394
|
for (r = 0; r < i.length; r++)
|
|
1395
1395
|
o = i[r], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
1396
1396
|
return n;
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1398
|
+
function Qr(e, t) {
|
|
1399
1399
|
if (e == null) return {};
|
|
1400
|
-
var n =
|
|
1400
|
+
var n = Kr(e, t), i, o;
|
|
1401
1401
|
if (Object.getOwnPropertySymbols) {
|
|
1402
1402
|
var r = Object.getOwnPropertySymbols(e);
|
|
1403
1403
|
for (o = 0; o < r.length; o++)
|
|
@@ -1405,22 +1405,22 @@ function qr(e, t) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
return n;
|
|
1407
1407
|
}
|
|
1408
|
-
var
|
|
1408
|
+
var ts = "1.15.2";
|
|
1409
1409
|
function gt(e) {
|
|
1410
1410
|
if (typeof window < "u" && window.navigator)
|
|
1411
1411
|
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1412
1412
|
}
|
|
1413
|
-
var bt = gt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),
|
|
1413
|
+
var bt = gt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), we = gt(/Edge/i), ci = gt(/firefox/i), ae = gt(/safari/i) && !gt(/chrome/i) && !gt(/android/i), zi = gt(/iP(ad|od|hone)/i), Xi = gt(/chrome/i) && gt(/android/i), qi = {
|
|
1414
1414
|
capture: !1,
|
|
1415
1415
|
passive: !1
|
|
1416
1416
|
};
|
|
1417
1417
|
function _(e, t, n) {
|
|
1418
|
-
e.addEventListener(t, n, !bt &&
|
|
1418
|
+
e.addEventListener(t, n, !bt && qi);
|
|
1419
1419
|
}
|
|
1420
1420
|
function S(e, t, n) {
|
|
1421
|
-
e.removeEventListener(t, n, !bt &&
|
|
1421
|
+
e.removeEventListener(t, n, !bt && qi);
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function Le(e, t) {
|
|
1424
1424
|
if (t) {
|
|
1425
1425
|
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
1426
1426
|
try {
|
|
@@ -1436,28 +1436,28 @@ function Ve(e, t) {
|
|
|
1436
1436
|
return !1;
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function es(e) {
|
|
1440
1440
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1441
1441
|
}
|
|
1442
1442
|
function ut(e, t, n, i) {
|
|
1443
1443
|
if (e) {
|
|
1444
1444
|
n = n || document;
|
|
1445
1445
|
do {
|
|
1446
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
1446
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Le(e, t) : Le(e, t)) || i && e === n)
|
|
1447
1447
|
return e;
|
|
1448
1448
|
if (e === n) break;
|
|
1449
|
-
} while (e =
|
|
1449
|
+
} while (e = es(e));
|
|
1450
1450
|
}
|
|
1451
1451
|
return null;
|
|
1452
1452
|
}
|
|
1453
|
-
var
|
|
1454
|
-
function
|
|
1453
|
+
var hi = /\s+/g;
|
|
1454
|
+
function et(e, t, n) {
|
|
1455
1455
|
if (e && t)
|
|
1456
1456
|
if (e.classList)
|
|
1457
1457
|
e.classList[n ? "add" : "remove"](t);
|
|
1458
1458
|
else {
|
|
1459
|
-
var i = (" " + e.className + " ").replace(
|
|
1460
|
-
e.className = (i + (n ? " " + t : "")).replace(
|
|
1459
|
+
var i = (" " + e.className + " ").replace(hi, " ").replace(" " + t + " ", " ");
|
|
1460
|
+
e.className = (i + (n ? " " + t : "")).replace(hi, " ");
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
1463
|
function b(e, t, n) {
|
|
@@ -1468,7 +1468,7 @@ function b(e, t, n) {
|
|
|
1468
1468
|
!(t in i) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), i[t] = n + (typeof n == "string" ? "" : "px");
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function Zt(e, t) {
|
|
1472
1472
|
var n = "";
|
|
1473
1473
|
if (typeof e == "string")
|
|
1474
1474
|
n = e;
|
|
@@ -1480,7 +1480,7 @@ function zt(e, t) {
|
|
|
1480
1480
|
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1481
1481
|
return o && new o(n);
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1483
|
+
function Yi(e, t, n) {
|
|
1484
1484
|
if (e) {
|
|
1485
1485
|
var i = e.getElementsByTagName(t), o = 0, r = i.length;
|
|
1486
1486
|
if (n)
|
|
@@ -1490,14 +1490,14 @@ function Zi(e, t, n) {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
return [];
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function dt() {
|
|
1494
1494
|
var e = document.scrollingElement;
|
|
1495
1495
|
return e || document.documentElement;
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function H(e, t, n, i, o) {
|
|
1498
1498
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
1499
|
-
var r, s, a, l, u,
|
|
1500
|
-
if (e !== window && e.parentNode && e !==
|
|
1499
|
+
var r, s, a, l, u, c, d;
|
|
1500
|
+
if (e !== window && e.parentNode && e !== dt() ? (r = e.getBoundingClientRect(), s = r.top, a = r.left, l = r.bottom, u = r.right, c = r.height, d = r.width) : (s = 0, a = 0, l = window.innerHeight, u = window.innerWidth, c = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (o = o || e.parentNode, !bt))
|
|
1501
1501
|
do
|
|
1502
1502
|
if (o && o.getBoundingClientRect && (b(o, "transform") !== "none" || n && b(o, "position") !== "static")) {
|
|
1503
1503
|
var p = o.getBoundingClientRect();
|
|
@@ -1506,24 +1506,24 @@ function I(e, t, n, i, o) {
|
|
|
1506
1506
|
}
|
|
1507
1507
|
while (o = o.parentNode);
|
|
1508
1508
|
if (i && e !== window) {
|
|
1509
|
-
var f =
|
|
1510
|
-
f && (s /= y, a /= g,
|
|
1509
|
+
var f = Zt(o || e), g = f && f.a, y = f && f.d;
|
|
1510
|
+
f && (s /= y, a /= g, d /= g, c /= y, l = s + c, u = a + d);
|
|
1511
1511
|
}
|
|
1512
1512
|
return {
|
|
1513
1513
|
top: s,
|
|
1514
1514
|
left: a,
|
|
1515
1515
|
bottom: l,
|
|
1516
1516
|
right: u,
|
|
1517
|
-
width:
|
|
1518
|
-
height:
|
|
1517
|
+
width: d,
|
|
1518
|
+
height: c
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1523
|
-
for (var i = _t(e, !0), o =
|
|
1524
|
-
var r =
|
|
1522
|
+
function pi(e, t, n) {
|
|
1523
|
+
for (var i = _t(e, !0), o = H(e)[t]; i; ) {
|
|
1524
|
+
var r = H(i)[n], s = void 0;
|
|
1525
1525
|
if (s = o >= r, !s) return i;
|
|
1526
|
-
if (i ===
|
|
1526
|
+
if (i === dt()) break;
|
|
1527
1527
|
i = _t(i, !1);
|
|
1528
1528
|
}
|
|
1529
1529
|
return !1;
|
|
@@ -1539,29 +1539,29 @@ function Xt(e, t, n, i) {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
return null;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1543
|
-
for (var n = e.lastElementChild; n && (n === v.ghost || b(n, "display") === "none" || t && !
|
|
1542
|
+
function Xn(e, t) {
|
|
1543
|
+
for (var n = e.lastElementChild; n && (n === v.ghost || b(n, "display") === "none" || t && !Le(n, t)); )
|
|
1544
1544
|
n = n.previousElementSibling;
|
|
1545
1545
|
return n || null;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function ot(e, t) {
|
|
1548
1548
|
var n = 0;
|
|
1549
1549
|
if (!e || !e.parentNode)
|
|
1550
1550
|
return -1;
|
|
1551
1551
|
for (; e = e.previousElementSibling; )
|
|
1552
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== v.clone && (!t ||
|
|
1552
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== v.clone && (!t || Le(e, t)) && n++;
|
|
1553
1553
|
return n;
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1556
|
-
var t = 0, n = 0, i =
|
|
1555
|
+
function fi(e) {
|
|
1556
|
+
var t = 0, n = 0, i = dt();
|
|
1557
1557
|
if (e)
|
|
1558
1558
|
do {
|
|
1559
|
-
var o =
|
|
1559
|
+
var o = Zt(e), r = o.a, s = o.d;
|
|
1560
1560
|
t += e.scrollLeft * r, n += e.scrollTop * s;
|
|
1561
1561
|
} while (e !== i && (e = e.parentNode));
|
|
1562
1562
|
return [t, n];
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function ns(e, t) {
|
|
1565
1565
|
for (var n in e)
|
|
1566
1566
|
if (e.hasOwnProperty(n)) {
|
|
1567
1567
|
for (var i in t)
|
|
@@ -1570,62 +1570,62 @@ function Gr(e, t) {
|
|
|
1570
1570
|
return -1;
|
|
1571
1571
|
}
|
|
1572
1572
|
function _t(e, t) {
|
|
1573
|
-
if (!e || !e.getBoundingClientRect) return
|
|
1573
|
+
if (!e || !e.getBoundingClientRect) return dt();
|
|
1574
1574
|
var n = e, i = !1;
|
|
1575
1575
|
do
|
|
1576
1576
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
1577
1577
|
var o = b(n);
|
|
1578
1578
|
if (n.clientWidth < n.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
|
|
1579
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
1579
|
+
if (!n.getBoundingClientRect || n === document.body) return dt();
|
|
1580
1580
|
if (i || t) return n;
|
|
1581
1581
|
i = !0;
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
while (n = n.parentNode);
|
|
1585
|
-
return
|
|
1585
|
+
return dt();
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function is(e, t) {
|
|
1588
1588
|
if (e && t)
|
|
1589
1589
|
for (var n in t)
|
|
1590
1590
|
t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1591
1591
|
return e;
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function En(e, t) {
|
|
1594
1594
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
1595
1595
|
}
|
|
1596
|
-
var
|
|
1597
|
-
function
|
|
1596
|
+
var le;
|
|
1597
|
+
function Wi(e, t) {
|
|
1598
1598
|
return function() {
|
|
1599
|
-
if (!
|
|
1599
|
+
if (!le) {
|
|
1600
1600
|
var n = arguments, i = this;
|
|
1601
|
-
n.length === 1 ? e.call(i, n[0]) : e.apply(i, n),
|
|
1602
|
-
|
|
1601
|
+
n.length === 1 ? e.call(i, n[0]) : e.apply(i, n), le = setTimeout(function() {
|
|
1602
|
+
le = void 0;
|
|
1603
1603
|
}, t);
|
|
1604
1604
|
}
|
|
1605
1605
|
};
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1608
|
-
clearTimeout(
|
|
1607
|
+
function os() {
|
|
1608
|
+
clearTimeout(le), le = void 0;
|
|
1609
1609
|
}
|
|
1610
|
-
function
|
|
1610
|
+
function Gi(e, t, n) {
|
|
1611
1611
|
e.scrollLeft += t, e.scrollTop += n;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function Ji(e) {
|
|
1614
1614
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
1615
1615
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function Ki(e, t, n) {
|
|
1618
1618
|
var i = {};
|
|
1619
1619
|
return Array.from(e.children).forEach(function(o) {
|
|
1620
1620
|
var r, s, a, l;
|
|
1621
1621
|
if (!(!ut(o, t.draggable, e, !1) || o.animated || o === n)) {
|
|
1622
|
-
var u =
|
|
1622
|
+
var u = H(o);
|
|
1623
1623
|
i.left = Math.min((r = i.left) !== null && r !== void 0 ? r : 1 / 0, u.left), i.top = Math.min((s = i.top) !== null && s !== void 0 ? s : 1 / 0, u.top), i.right = Math.max((a = i.right) !== null && a !== void 0 ? a : -1 / 0, u.right), i.bottom = Math.max((l = i.bottom) !== null && l !== void 0 ? l : -1 / 0, u.bottom);
|
|
1624
1624
|
}
|
|
1625
1625
|
}), i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
|
|
1626
1626
|
}
|
|
1627
|
-
var
|
|
1628
|
-
function
|
|
1627
|
+
var it = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
1628
|
+
function rs() {
|
|
1629
1629
|
var e = [], t;
|
|
1630
1630
|
return {
|
|
1631
1631
|
captureAnimationState: function() {
|
|
@@ -1635,11 +1635,11 @@ function Qr() {
|
|
|
1635
1635
|
if (!(b(o, "display") === "none" || o === v.ghost)) {
|
|
1636
1636
|
e.push({
|
|
1637
1637
|
target: o,
|
|
1638
|
-
rect:
|
|
1638
|
+
rect: H(o)
|
|
1639
1639
|
});
|
|
1640
|
-
var r =
|
|
1640
|
+
var r = ct({}, e[e.length - 1].rect);
|
|
1641
1641
|
if (o.thisAnimationDuration) {
|
|
1642
|
-
var s =
|
|
1642
|
+
var s = Zt(o, !0);
|
|
1643
1643
|
s && (r.top -= s.f, r.left -= s.e);
|
|
1644
1644
|
}
|
|
1645
1645
|
o.fromRect = r;
|
|
@@ -1651,7 +1651,7 @@ function Qr() {
|
|
|
1651
1651
|
e.push(i);
|
|
1652
1652
|
},
|
|
1653
1653
|
removeAnimationState: function(i) {
|
|
1654
|
-
e.splice(
|
|
1654
|
+
e.splice(ns(e, {
|
|
1655
1655
|
target: i
|
|
1656
1656
|
}), 1);
|
|
1657
1657
|
},
|
|
@@ -1663,9 +1663,9 @@ function Qr() {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
var r = !1, s = 0;
|
|
1665
1665
|
e.forEach(function(a) {
|
|
1666
|
-
var l = 0, u = a.target,
|
|
1667
|
-
y && (
|
|
1668
|
-
(g.top -
|
|
1666
|
+
var l = 0, u = a.target, c = u.fromRect, d = H(u), p = u.prevFromRect, f = u.prevToRect, g = a.rect, y = Zt(u, !0);
|
|
1667
|
+
y && (d.top -= y.f, d.left -= y.e), u.toRect = d, u.thisAnimationDuration && En(p, d) && !En(c, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1668
|
+
(g.top - d.top) / (g.left - d.left) === (c.top - d.top) / (c.left - d.left) && (l = as(g, p, f, o.options)), En(d, c) || (u.prevFromRect = c, u.prevToRect = d, l || (l = o.options.animation), o.animate(u, g, d, l)), l && (r = !0, s = Math.max(s, l), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
1669
1669
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
1670
1670
|
}, l), u.thisAnimationDuration = l);
|
|
1671
1671
|
}), clearTimeout(t), r ? t = setTimeout(function() {
|
|
@@ -1675,26 +1675,26 @@ function Qr() {
|
|
|
1675
1675
|
animate: function(i, o, r, s) {
|
|
1676
1676
|
if (s) {
|
|
1677
1677
|
b(i, "transition", ""), b(i, "transform", "");
|
|
1678
|
-
var a =
|
|
1679
|
-
i.animatingX = !!
|
|
1678
|
+
var a = Zt(this.el), l = a && a.a, u = a && a.d, c = (o.left - r.left) / (l || 1), d = (o.top - r.top) / (u || 1);
|
|
1679
|
+
i.animatingX = !!c, i.animatingY = !!d, b(i, "transform", "translate3d(" + c + "px," + d + "px,0)"), this.forRepaintDummy = ss(i), b(i, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), b(i, "transform", "translate3d(0,0,0)"), typeof i.animated == "number" && clearTimeout(i.animated), i.animated = setTimeout(function() {
|
|
1680
1680
|
b(i, "transition", ""), b(i, "transform", ""), i.animated = !1, i.animatingX = !1, i.animatingY = !1;
|
|
1681
1681
|
}, s);
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
1684
|
};
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function ss(e) {
|
|
1687
1687
|
return e.offsetWidth;
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function as(e, t, n, i) {
|
|
1690
1690
|
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) * i.animation;
|
|
1691
1691
|
}
|
|
1692
|
-
var Vt = [],
|
|
1692
|
+
var Vt = [], xn = {
|
|
1693
1693
|
initializeByDefault: !0
|
|
1694
|
-
},
|
|
1694
|
+
}, Ee = {
|
|
1695
1695
|
mount: function(t) {
|
|
1696
|
-
for (var n in
|
|
1697
|
-
|
|
1696
|
+
for (var n in xn)
|
|
1697
|
+
xn.hasOwnProperty(n) && !(n in t) && (t[n] = xn[n]);
|
|
1698
1698
|
Vt.forEach(function(i) {
|
|
1699
1699
|
if (i.pluginName === t.pluginName)
|
|
1700
1700
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
@@ -1707,9 +1707,9 @@ var Vt = [], vn = {
|
|
|
1707
1707
|
};
|
|
1708
1708
|
var r = t + "Global";
|
|
1709
1709
|
Vt.forEach(function(s) {
|
|
1710
|
-
n[s.pluginName] && (n[s.pluginName][r] && n[s.pluginName][r](
|
|
1710
|
+
n[s.pluginName] && (n[s.pluginName][r] && n[s.pluginName][r](ct({
|
|
1711
1711
|
sortable: n
|
|
1712
|
-
}, i)), n.options[s.pluginName] && n[s.pluginName][t] && n[s.pluginName][t](
|
|
1712
|
+
}, i)), n.options[s.pluginName] && n[s.pluginName][t] && n[s.pluginName][t](ct({
|
|
1713
1713
|
sortable: n
|
|
1714
1714
|
}, i)));
|
|
1715
1715
|
});
|
|
@@ -1741,41 +1741,41 @@ var Vt = [], vn = {
|
|
|
1741
1741
|
}), o;
|
|
1742
1742
|
}
|
|
1743
1743
|
};
|
|
1744
|
-
function
|
|
1745
|
-
var t = e.sortable, n = e.rootEl, i = e.name, o = e.targetEl, r = e.cloneEl, s = e.toEl, a = e.fromEl, l = e.oldIndex, u = e.newIndex,
|
|
1746
|
-
if (t = t || n && n[
|
|
1747
|
-
var y,
|
|
1748
|
-
window.CustomEvent && !bt && !
|
|
1744
|
+
function ls(e) {
|
|
1745
|
+
var t = e.sortable, n = e.rootEl, i = e.name, o = e.targetEl, r = e.cloneEl, s = e.toEl, a = e.fromEl, l = e.oldIndex, u = e.newIndex, c = e.oldDraggableIndex, d = e.newDraggableIndex, p = e.originalEvent, f = e.putSortable, g = e.extraEventProperties;
|
|
1746
|
+
if (t = t || n && n[it], !!t) {
|
|
1747
|
+
var y, D = t.options, U = "on" + i.charAt(0).toUpperCase() + i.substr(1);
|
|
1748
|
+
window.CustomEvent && !bt && !we ? y = new CustomEvent(i, {
|
|
1749
1749
|
bubbles: !0,
|
|
1750
1750
|
cancelable: !0
|
|
1751
|
-
}) : (y = document.createEvent("Event"), y.initEvent(i, !0, !0)), y.to = s || n, y.from = a || n, y.item = o || n, y.clone = r, y.oldIndex = l, y.newIndex = u, y.oldDraggableIndex =
|
|
1752
|
-
var
|
|
1753
|
-
for (var
|
|
1754
|
-
y[
|
|
1755
|
-
n && n.dispatchEvent(y),
|
|
1751
|
+
}) : (y = document.createEvent("Event"), y.initEvent(i, !0, !0)), y.to = s || n, y.from = a || n, y.item = o || n, y.clone = r, y.oldIndex = l, y.newIndex = u, y.oldDraggableIndex = c, y.newDraggableIndex = d, y.originalEvent = p, y.pullMode = f ? f.lastPutMode : void 0;
|
|
1752
|
+
var V = ct(ct({}, g), Ee.getEventProperties(i, t));
|
|
1753
|
+
for (var tt in V)
|
|
1754
|
+
y[tt] = V[tt];
|
|
1755
|
+
n && n.dispatchEvent(y), D[U] && D[U].call(t, y);
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
|
-
var
|
|
1759
|
-
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r =
|
|
1760
|
-
|
|
1758
|
+
var us = ["evt"], G = function(t, n) {
|
|
1759
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r = Qr(i, us);
|
|
1760
|
+
Ee.pluginEvent.bind(v)(t, n, ct({
|
|
1761
1761
|
dragEl: h,
|
|
1762
1762
|
parentEl: M,
|
|
1763
1763
|
ghostEl: w,
|
|
1764
1764
|
rootEl: R,
|
|
1765
1765
|
nextEl: Mt,
|
|
1766
|
-
lastDownEl:
|
|
1767
|
-
cloneEl:
|
|
1766
|
+
lastDownEl: De,
|
|
1767
|
+
cloneEl: O,
|
|
1768
1768
|
cloneHidden: St,
|
|
1769
|
-
dragStarted:
|
|
1770
|
-
putSortable:
|
|
1769
|
+
dragStarted: ne,
|
|
1770
|
+
putSortable: k,
|
|
1771
1771
|
activeSortable: v.active,
|
|
1772
1772
|
originalEvent: o,
|
|
1773
1773
|
oldIndex: jt,
|
|
1774
|
-
oldDraggableIndex:
|
|
1775
|
-
newIndex:
|
|
1774
|
+
oldDraggableIndex: ue,
|
|
1775
|
+
newIndex: nt,
|
|
1776
1776
|
newDraggableIndex: xt,
|
|
1777
|
-
hideGhostForTarget:
|
|
1778
|
-
unhideGhostForTarget:
|
|
1777
|
+
hideGhostForTarget: no,
|
|
1778
|
+
unhideGhostForTarget: io,
|
|
1779
1779
|
cloneNowHidden: function() {
|
|
1780
1780
|
St = !0;
|
|
1781
1781
|
},
|
|
@@ -1792,95 +1792,95 @@ var is = ["evt"], G = function(t, n) {
|
|
|
1792
1792
|
}, r));
|
|
1793
1793
|
};
|
|
1794
1794
|
function W(e) {
|
|
1795
|
-
|
|
1796
|
-
putSortable:
|
|
1797
|
-
cloneEl:
|
|
1795
|
+
ls(ct({
|
|
1796
|
+
putSortable: k,
|
|
1797
|
+
cloneEl: O,
|
|
1798
1798
|
targetEl: h,
|
|
1799
1799
|
rootEl: R,
|
|
1800
1800
|
oldIndex: jt,
|
|
1801
|
-
oldDraggableIndex:
|
|
1802
|
-
newIndex:
|
|
1801
|
+
oldDraggableIndex: ue,
|
|
1802
|
+
newIndex: nt,
|
|
1803
1803
|
newDraggableIndex: xt
|
|
1804
1804
|
}, e));
|
|
1805
1805
|
}
|
|
1806
|
-
var h, M, w, R, Mt,
|
|
1807
|
-
if (
|
|
1806
|
+
var h, M, w, R, Mt, De, O, St, jt, nt, ue, xt, Se, k, kt = !1, Ue = !1, ke = [], Rt, lt, Sn, $n, gi, mi, ne, Lt, de, ce = !1, $e = !1, Re, q, _n = [], On = !1, Fe = [], hn = typeof document < "u", _e = zi, yi = we || bt ? "cssFloat" : "float", ds = hn && !Xi && !zi && "draggable" in document.createElement("div"), Qi = function() {
|
|
1807
|
+
if (hn) {
|
|
1808
1808
|
if (bt)
|
|
1809
1809
|
return !1;
|
|
1810
1810
|
var e = document.createElement("x");
|
|
1811
1811
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
1812
1812
|
}
|
|
1813
|
-
}(),
|
|
1814
|
-
var i = b(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Xt(t, 0, n), s = Xt(t, 1, n), a = r && b(r), l = s && b(s), u = a && parseInt(a.marginLeft) + parseInt(a.marginRight) +
|
|
1813
|
+
}(), to = function(t, n) {
|
|
1814
|
+
var i = b(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Xt(t, 0, n), s = Xt(t, 1, n), a = r && b(r), l = s && b(s), u = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + H(r).width, c = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + H(s).width;
|
|
1815
1815
|
if (i.display === "flex")
|
|
1816
1816
|
return i.flexDirection === "column" || i.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1817
1817
|
if (i.display === "grid")
|
|
1818
1818
|
return i.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1819
1819
|
if (r && a.float && a.float !== "none") {
|
|
1820
|
-
var
|
|
1821
|
-
return s && (l.clear === "both" || l.clear ===
|
|
1820
|
+
var d = a.float === "left" ? "left" : "right";
|
|
1821
|
+
return s && (l.clear === "both" || l.clear === d) ? "vertical" : "horizontal";
|
|
1822
1822
|
}
|
|
1823
|
-
return r && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || u >= o && i[
|
|
1824
|
-
},
|
|
1823
|
+
return r && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || u >= o && i[yi] === "none" || s && i[yi] === "none" && u + c > o) ? "vertical" : "horizontal";
|
|
1824
|
+
}, cs = function(t, n, i) {
|
|
1825
1825
|
var o = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, a = i ? n.left : n.top, l = i ? n.right : n.bottom, u = i ? n.width : n.height;
|
|
1826
1826
|
return o === a || r === l || o + s / 2 === a + u / 2;
|
|
1827
|
-
},
|
|
1827
|
+
}, hs = function(t, n) {
|
|
1828
1828
|
var i;
|
|
1829
1829
|
return ke.some(function(o) {
|
|
1830
|
-
var r = o[
|
|
1831
|
-
if (!(!r ||
|
|
1832
|
-
var s =
|
|
1830
|
+
var r = o[it].options.emptyInsertThreshold;
|
|
1831
|
+
if (!(!r || Xn(o))) {
|
|
1832
|
+
var s = H(o), a = t >= s.left - r && t <= s.right + r, l = n >= s.top - r && n <= s.bottom + r;
|
|
1833
1833
|
if (a && l)
|
|
1834
1834
|
return i = o;
|
|
1835
1835
|
}
|
|
1836
1836
|
}), i;
|
|
1837
|
-
},
|
|
1837
|
+
}, eo = function(t) {
|
|
1838
1838
|
function n(r, s) {
|
|
1839
|
-
return function(a, l, u,
|
|
1840
|
-
var
|
|
1841
|
-
if (r == null && (s ||
|
|
1839
|
+
return function(a, l, u, c) {
|
|
1840
|
+
var d = a.options.group.name && l.options.group.name && a.options.group.name === l.options.group.name;
|
|
1841
|
+
if (r == null && (s || d))
|
|
1842
1842
|
return !0;
|
|
1843
1843
|
if (r == null || r === !1)
|
|
1844
1844
|
return !1;
|
|
1845
1845
|
if (s && r === "clone")
|
|
1846
1846
|
return r;
|
|
1847
1847
|
if (typeof r == "function")
|
|
1848
|
-
return n(r(a, l, u,
|
|
1848
|
+
return n(r(a, l, u, c), s)(a, l, u, c);
|
|
1849
1849
|
var p = (s ? a : l).options.group.name;
|
|
1850
1850
|
return r === !0 || typeof r == "string" && r === p || r.join && r.indexOf(p) > -1;
|
|
1851
1851
|
};
|
|
1852
1852
|
}
|
|
1853
1853
|
var i = {}, o = t.group;
|
|
1854
|
-
(!o ||
|
|
1854
|
+
(!o || Pe(o) != "object") && (o = {
|
|
1855
1855
|
name: o
|
|
1856
1856
|
}), i.name = o.name, i.checkPull = n(o.pull, !0), i.checkPut = n(o.put), i.revertClone = o.revertClone, t.group = i;
|
|
1857
|
-
},
|
|
1858
|
-
!
|
|
1859
|
-
},
|
|
1860
|
-
!
|
|
1857
|
+
}, no = function() {
|
|
1858
|
+
!Qi && w && b(w, "display", "none");
|
|
1859
|
+
}, io = function() {
|
|
1860
|
+
!Qi && w && b(w, "display", "");
|
|
1861
1861
|
};
|
|
1862
|
-
|
|
1863
|
-
if (
|
|
1864
|
-
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(),
|
|
1862
|
+
hn && !Xi && document.addEventListener("click", function(e) {
|
|
1863
|
+
if (Ue)
|
|
1864
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ue = !1, !1;
|
|
1865
1865
|
}, !0);
|
|
1866
|
-
var
|
|
1866
|
+
var Ot = function(t) {
|
|
1867
1867
|
if (h) {
|
|
1868
1868
|
t = t.touches ? t.touches[0] : t;
|
|
1869
|
-
var n =
|
|
1869
|
+
var n = hs(t.clientX, t.clientY);
|
|
1870
1870
|
if (n) {
|
|
1871
1871
|
var i = {};
|
|
1872
1872
|
for (var o in t)
|
|
1873
1873
|
t.hasOwnProperty(o) && (i[o] = t[o]);
|
|
1874
|
-
i.target = i.rootEl = n, i.preventDefault = void 0, i.stopPropagation = void 0, n[
|
|
1874
|
+
i.target = i.rootEl = n, i.preventDefault = void 0, i.stopPropagation = void 0, n[it]._onDragOver(i);
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
},
|
|
1878
|
-
h && h.parentNode[
|
|
1877
|
+
}, ps = function(t) {
|
|
1878
|
+
h && h.parentNode[it]._isOutsideThisEl(t.target);
|
|
1879
1879
|
};
|
|
1880
1880
|
function v(e, t) {
|
|
1881
1881
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
1882
1882
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
1883
|
-
this.el = e, this.options = t = yt({}, t), e[
|
|
1883
|
+
this.el = e, this.options = t = yt({}, t), e[it] = this;
|
|
1884
1884
|
var n = {
|
|
1885
1885
|
group: null,
|
|
1886
1886
|
sort: !0,
|
|
@@ -1896,7 +1896,7 @@ function v(e, t) {
|
|
|
1896
1896
|
// will be set to same as swapThreshold if default
|
|
1897
1897
|
removeCloneOnHide: !0,
|
|
1898
1898
|
direction: function() {
|
|
1899
|
-
return
|
|
1899
|
+
return to(e, this.options);
|
|
1900
1900
|
},
|
|
1901
1901
|
ghostClass: "sortable-ghost",
|
|
1902
1902
|
chosenClass: "sortable-chosen",
|
|
@@ -1923,16 +1923,16 @@ function v(e, t) {
|
|
|
1923
1923
|
x: 0,
|
|
1924
1924
|
y: 0
|
|
1925
1925
|
},
|
|
1926
|
-
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1926
|
+
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !ae,
|
|
1927
1927
|
emptyInsertThreshold: 5
|
|
1928
1928
|
};
|
|
1929
|
-
|
|
1929
|
+
Ee.initializePlugins(this, e, n);
|
|
1930
1930
|
for (var i in n)
|
|
1931
1931
|
!(i in t) && (t[i] = n[i]);
|
|
1932
|
-
|
|
1932
|
+
eo(t);
|
|
1933
1933
|
for (var o in this)
|
|
1934
1934
|
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
|
|
1935
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1935
|
+
this.nativeDraggable = t.forceFallback ? !1 : ds, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? _(e, "pointerdown", this._onTapStart) : (_(e, "mousedown", this._onTapStart), _(e, "touchstart", this._onTapStart)), this.nativeDraggable && (_(e, "dragover", this), _(e, "dragenter", this)), ke.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), yt(this, rs());
|
|
1936
1936
|
}
|
|
1937
1937
|
v.prototype = /** @lends Sortable.prototype */
|
|
1938
1938
|
{
|
|
@@ -1945,10 +1945,10 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
1945
1945
|
},
|
|
1946
1946
|
_onTapStart: function(t) {
|
|
1947
1947
|
if (t.cancelable) {
|
|
1948
|
-
var n = this, i = this.el, o = this.options, r = o.preventOnFilter, s = t.type, a = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (a || t).target, u = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l,
|
|
1949
|
-
if (
|
|
1950
|
-
if (jt =
|
|
1951
|
-
if (
|
|
1948
|
+
var n = this, i = this.el, o = this.options, r = o.preventOnFilter, s = t.type, a = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (a || t).target, u = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, c = o.filter;
|
|
1949
|
+
if (Es(i), !h && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || o.disabled) && !u.isContentEditable && !(!this.nativeDraggable && ae && l && l.tagName.toUpperCase() === "SELECT") && (l = ut(l, o.draggable, i, !1), !(l && l.animated) && De !== l)) {
|
|
1950
|
+
if (jt = ot(l), ue = ot(l, o.draggable), typeof c == "function") {
|
|
1951
|
+
if (c.call(this, t, l, this)) {
|
|
1952
1952
|
W({
|
|
1953
1953
|
sortable: n,
|
|
1954
1954
|
rootEl: u,
|
|
@@ -1961,11 +1961,11 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
1961
1961
|
}), r && t.cancelable && t.preventDefault();
|
|
1962
1962
|
return;
|
|
1963
1963
|
}
|
|
1964
|
-
} else if (
|
|
1965
|
-
if (
|
|
1964
|
+
} else if (c && (c = c.split(",").some(function(d) {
|
|
1965
|
+
if (d = ut(u, d.trim(), i, !1), d)
|
|
1966
1966
|
return W({
|
|
1967
1967
|
sortable: n,
|
|
1968
|
-
rootEl:
|
|
1968
|
+
rootEl: d,
|
|
1969
1969
|
name: "filter",
|
|
1970
1970
|
targetEl: l,
|
|
1971
1971
|
fromEl: i,
|
|
@@ -1973,7 +1973,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
1973
1973
|
}), G("filter", n, {
|
|
1974
1974
|
evt: t
|
|
1975
1975
|
}), !0;
|
|
1976
|
-
}),
|
|
1976
|
+
}), c)) {
|
|
1977
1977
|
r && t.cancelable && t.preventDefault();
|
|
1978
1978
|
return;
|
|
1979
1979
|
}
|
|
@@ -1984,28 +1984,28 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
1984
1984
|
_prepareDragStart: function(t, n, i) {
|
|
1985
1985
|
var o = this, r = o.el, s = o.options, a = r.ownerDocument, l;
|
|
1986
1986
|
if (i && !h && i.parentNode === r) {
|
|
1987
|
-
var u =
|
|
1988
|
-
if (R = r, h = i, M = h.parentNode, Mt = h.nextSibling,
|
|
1987
|
+
var u = H(i);
|
|
1988
|
+
if (R = r, h = i, M = h.parentNode, Mt = h.nextSibling, De = i, Se = s.group, v.dragged = h, Rt = {
|
|
1989
1989
|
target: h,
|
|
1990
1990
|
clientX: (n || t).clientX,
|
|
1991
1991
|
clientY: (n || t).clientY
|
|
1992
|
-
},
|
|
1992
|
+
}, gi = Rt.clientX - u.left, mi = Rt.clientY - u.top, this._lastX = (n || t).clientX, this._lastY = (n || t).clientY, h.style["will-change"] = "all", l = function() {
|
|
1993
1993
|
if (G("delayEnded", o, {
|
|
1994
1994
|
evt: t
|
|
1995
1995
|
}), v.eventCanceled) {
|
|
1996
1996
|
o._onDrop();
|
|
1997
1997
|
return;
|
|
1998
1998
|
}
|
|
1999
|
-
o._disableDelayedDragEvents(), !
|
|
1999
|
+
o._disableDelayedDragEvents(), !ci && o.nativeDraggable && (h.draggable = !0), o._triggerDragStart(t, n), W({
|
|
2000
2000
|
sortable: o,
|
|
2001
2001
|
name: "choose",
|
|
2002
2002
|
originalEvent: t
|
|
2003
|
-
}),
|
|
2004
|
-
}, s.ignore.split(",").forEach(function(
|
|
2005
|
-
|
|
2006
|
-
}), _(a, "dragover",
|
|
2003
|
+
}), et(h, s.chosenClass, !0);
|
|
2004
|
+
}, s.ignore.split(",").forEach(function(c) {
|
|
2005
|
+
Yi(h, c.trim(), An);
|
|
2006
|
+
}), _(a, "dragover", Ot), _(a, "mousemove", Ot), _(a, "touchmove", Ot), _(a, "mouseup", o._onDrop), _(a, "touchend", o._onDrop), _(a, "touchcancel", o._onDrop), ci && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), G("delayStart", this, {
|
|
2007
2007
|
evt: t
|
|
2008
|
-
}), s.delay && (!s.delayOnTouchOnly || n) && (!this.nativeDraggable || !(
|
|
2008
|
+
}), s.delay && (!s.delayOnTouchOnly || n) && (!this.nativeDraggable || !(we || bt))) {
|
|
2009
2009
|
if (v.eventCanceled) {
|
|
2010
2010
|
this._onDrop();
|
|
2011
2011
|
return;
|
|
@@ -2020,7 +2020,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2020
2020
|
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
2021
2021
|
},
|
|
2022
2022
|
_disableDelayedDrag: function() {
|
|
2023
|
-
h &&
|
|
2023
|
+
h && An(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2024
2024
|
},
|
|
2025
2025
|
_disableDelayedDragEvents: function() {
|
|
2026
2026
|
var t = this.el.ownerDocument;
|
|
@@ -2029,19 +2029,19 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2029
2029
|
_triggerDragStart: function(t, n) {
|
|
2030
2030
|
n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ? _(document, "pointermove", this._onTouchMove) : n ? _(document, "touchmove", this._onTouchMove) : _(document, "mousemove", this._onTouchMove) : (_(h, "dragend", this), _(R, "dragstart", this._onDragStart));
|
|
2031
2031
|
try {
|
|
2032
|
-
document.selection ?
|
|
2032
|
+
document.selection ? Oe(function() {
|
|
2033
2033
|
document.selection.empty();
|
|
2034
2034
|
}) : window.getSelection().removeAllRanges();
|
|
2035
2035
|
} catch {
|
|
2036
2036
|
}
|
|
2037
2037
|
},
|
|
2038
2038
|
_dragStarted: function(t, n) {
|
|
2039
|
-
if (
|
|
2039
|
+
if (kt = !1, R && h) {
|
|
2040
2040
|
G("dragStarted", this, {
|
|
2041
2041
|
evt: n
|
|
2042
|
-
}), this.nativeDraggable && _(document, "dragover",
|
|
2042
|
+
}), this.nativeDraggable && _(document, "dragover", ps);
|
|
2043
2043
|
var i = this.options;
|
|
2044
|
-
!t &&
|
|
2044
|
+
!t && et(h, i.dragClass, !1), et(h, i.ghostClass, !0), v.active = this, t && this._appendGhost(), W({
|
|
2045
2045
|
sortable: this,
|
|
2046
2046
|
name: "start",
|
|
2047
2047
|
originalEvent: n
|
|
@@ -2051,14 +2051,14 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2051
2051
|
},
|
|
2052
2052
|
_emulateDragOver: function() {
|
|
2053
2053
|
if (lt) {
|
|
2054
|
-
this._lastX = lt.clientX, this._lastY = lt.clientY,
|
|
2054
|
+
this._lastX = lt.clientX, this._lastY = lt.clientY, no();
|
|
2055
2055
|
for (var t = document.elementFromPoint(lt.clientX, lt.clientY), n = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(lt.clientX, lt.clientY), t !== n); )
|
|
2056
2056
|
n = t;
|
|
2057
|
-
if (h.parentNode[
|
|
2057
|
+
if (h.parentNode[it]._isOutsideThisEl(t), n)
|
|
2058
2058
|
do {
|
|
2059
|
-
if (n[
|
|
2059
|
+
if (n[it]) {
|
|
2060
2060
|
var i = void 0;
|
|
2061
|
-
if (i = n[
|
|
2061
|
+
if (i = n[it]._onDragOver({
|
|
2062
2062
|
clientX: lt.clientX,
|
|
2063
2063
|
clientY: lt.clientY,
|
|
2064
2064
|
target: t,
|
|
@@ -2068,41 +2068,41 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2068
2068
|
}
|
|
2069
2069
|
t = n;
|
|
2070
2070
|
} while (n = n.parentNode);
|
|
2071
|
-
|
|
2071
|
+
io();
|
|
2072
2072
|
}
|
|
2073
2073
|
},
|
|
2074
2074
|
_onTouchMove: function(t) {
|
|
2075
2075
|
if (Rt) {
|
|
2076
|
-
var n = this.options, i = n.fallbackTolerance, o = n.fallbackOffset, r = t.touches ? t.touches[0] : t, s = w &&
|
|
2077
|
-
if (!v.active && !
|
|
2076
|
+
var n = this.options, i = n.fallbackTolerance, o = n.fallbackOffset, r = t.touches ? t.touches[0] : t, s = w && Zt(w, !0), a = w && s && s.a, l = w && s && s.d, u = _e && q && fi(q), c = (r.clientX - Rt.clientX + o.x) / (a || 1) + (u ? u[0] - _n[0] : 0) / (a || 1), d = (r.clientY - Rt.clientY + o.y) / (l || 1) + (u ? u[1] - _n[1] : 0) / (l || 1);
|
|
2077
|
+
if (!v.active && !kt) {
|
|
2078
2078
|
if (i && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < i)
|
|
2079
2079
|
return;
|
|
2080
2080
|
this._onDragStart(t, !0);
|
|
2081
2081
|
}
|
|
2082
2082
|
if (w) {
|
|
2083
|
-
s ? (s.e +=
|
|
2083
|
+
s ? (s.e += c - (Sn || 0), s.f += d - ($n || 0)) : s = {
|
|
2084
2084
|
a: 1,
|
|
2085
2085
|
b: 0,
|
|
2086
2086
|
c: 0,
|
|
2087
2087
|
d: 1,
|
|
2088
|
-
e:
|
|
2089
|
-
f:
|
|
2088
|
+
e: c,
|
|
2089
|
+
f: d
|
|
2090
2090
|
};
|
|
2091
2091
|
var p = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
2092
|
-
b(w, "webkitTransform", p), b(w, "mozTransform", p), b(w, "msTransform", p), b(w, "transform", p),
|
|
2092
|
+
b(w, "webkitTransform", p), b(w, "mozTransform", p), b(w, "msTransform", p), b(w, "transform", p), Sn = c, $n = d, lt = r;
|
|
2093
2093
|
}
|
|
2094
2094
|
t.cancelable && t.preventDefault();
|
|
2095
2095
|
}
|
|
2096
2096
|
},
|
|
2097
2097
|
_appendGhost: function() {
|
|
2098
2098
|
if (!w) {
|
|
2099
|
-
var t = this.options.fallbackOnBody ? document.body : R, n =
|
|
2100
|
-
if (
|
|
2099
|
+
var t = this.options.fallbackOnBody ? document.body : R, n = H(h, !0, _e, !0, t), i = this.options;
|
|
2100
|
+
if (_e) {
|
|
2101
2101
|
for (q = t; b(q, "position") === "static" && b(q, "transform") === "none" && q !== document; )
|
|
2102
2102
|
q = q.parentNode;
|
|
2103
|
-
q !== document.body && q !== document.documentElement ? (q === document && (q =
|
|
2103
|
+
q !== document.body && q !== document.documentElement ? (q === document && (q = dt()), n.top += q.scrollTop, n.left += q.scrollLeft) : q = dt(), _n = fi(q);
|
|
2104
2104
|
}
|
|
2105
|
-
w = h.cloneNode(!0),
|
|
2105
|
+
w = h.cloneNode(!0), et(w, i.ghostClass, !1), et(w, i.fallbackClass, !0), et(w, i.dragClass, !0), b(w, "transition", ""), b(w, "transform", ""), b(w, "box-sizing", "border-box"), b(w, "margin", 0), b(w, "top", n.top), b(w, "left", n.left), b(w, "width", n.width), b(w, "height", n.height), b(w, "opacity", "0.8"), b(w, "position", _e ? "absolute" : "fixed"), b(w, "zIndex", "100000"), b(w, "pointerEvents", "none"), v.ghost = w, t.appendChild(w), b(w, "transform-origin", gi / parseInt(w.style.width) * 100 + "% " + mi / parseInt(w.style.height) * 100 + "%");
|
|
2106
2106
|
}
|
|
2107
2107
|
},
|
|
2108
2108
|
_onDragStart: function(t, n) {
|
|
@@ -2113,102 +2113,102 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2113
2113
|
this._onDrop();
|
|
2114
2114
|
return;
|
|
2115
2115
|
}
|
|
2116
|
-
G("setupClone", this), v.eventCanceled || (
|
|
2117
|
-
G("clone", i), !v.eventCanceled && (i.options.removeCloneOnHide || R.insertBefore(
|
|
2116
|
+
G("setupClone", this), v.eventCanceled || (O = Ji(h), O.removeAttribute("id"), O.draggable = !1, O.style["will-change"] = "", this._hideClone(), et(O, this.options.chosenClass, !1), v.clone = O), i.cloneId = Oe(function() {
|
|
2117
|
+
G("clone", i), !v.eventCanceled && (i.options.removeCloneOnHide || R.insertBefore(O, h), i._hideClone(), W({
|
|
2118
2118
|
sortable: i,
|
|
2119
2119
|
name: "clone"
|
|
2120
2120
|
}));
|
|
2121
|
-
}), !n &&
|
|
2121
|
+
}), !n && et(h, r.dragClass, !0), n ? (Ue = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (S(document, "mouseup", i._onDrop), S(document, "touchend", i._onDrop), S(document, "touchcancel", i._onDrop), o && (o.effectAllowed = "move", r.setData && r.setData.call(i, o, h)), _(document, "drop", i), b(h, "transform", "translateZ(0)")), kt = !0, i._dragStartId = Oe(i._dragStarted.bind(i, n, t)), _(document, "selectstart", i), ne = !0, ae && b(document.body, "user-select", "none");
|
|
2122
2122
|
},
|
|
2123
2123
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
2124
2124
|
_onDragOver: function(t) {
|
|
2125
|
-
var n = this.el, i = t.target, o, r, s, a = this.options, l = a.group, u = v.active,
|
|
2126
|
-
if (
|
|
2127
|
-
function
|
|
2128
|
-
G(
|
|
2125
|
+
var n = this.el, i = t.target, o, r, s, a = this.options, l = a.group, u = v.active, c = Se === l, d = a.sort, p = k || u, f, g = this, y = !1;
|
|
2126
|
+
if (On) return;
|
|
2127
|
+
function D(Kt, Mo) {
|
|
2128
|
+
G(Kt, g, ct({
|
|
2129
2129
|
evt: t,
|
|
2130
|
-
isOwner:
|
|
2130
|
+
isOwner: c,
|
|
2131
2131
|
axis: f ? "vertical" : "horizontal",
|
|
2132
2132
|
revert: s,
|
|
2133
2133
|
dragRect: o,
|
|
2134
2134
|
targetRect: r,
|
|
2135
|
-
canSort:
|
|
2135
|
+
canSort: d,
|
|
2136
2136
|
fromSortable: p,
|
|
2137
2137
|
target: i,
|
|
2138
|
-
completed:
|
|
2139
|
-
onMove: function(
|
|
2140
|
-
return
|
|
2138
|
+
completed: V,
|
|
2139
|
+
onMove: function(Gn, No) {
|
|
2140
|
+
return Ae(R, n, h, o, Gn, H(Gn), t, No);
|
|
2141
2141
|
},
|
|
2142
|
-
changed:
|
|
2143
|
-
},
|
|
2142
|
+
changed: tt
|
|
2143
|
+
}, Mo));
|
|
2144
2144
|
}
|
|
2145
|
-
function
|
|
2146
|
-
|
|
2145
|
+
function U() {
|
|
2146
|
+
D("dragOverAnimationCapture"), g.captureAnimationState(), g !== p && p.captureAnimationState();
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2149
|
-
return
|
|
2150
|
-
insertion:
|
|
2151
|
-
}),
|
|
2152
|
-
|
|
2153
|
-
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (i === h && !h.animated || i === n && !i.animated) && (Lt = null), !a.dragoverBubble && !t.rootEl && i !== document && (h.parentNode[
|
|
2148
|
+
function V(Kt) {
|
|
2149
|
+
return D("dragOverCompleted", {
|
|
2150
|
+
insertion: Kt
|
|
2151
|
+
}), Kt && (c ? u._hideClone() : u._showClone(g), g !== p && (et(h, k ? k.options.ghostClass : u.options.ghostClass, !1), et(h, a.ghostClass, !0)), k !== g && g !== v.active ? k = g : g === v.active && k && (k = null), p === g && (g._ignoreWhileAnimating = i), g.animateAll(function() {
|
|
2152
|
+
D("dragOverAnimationComplete"), g._ignoreWhileAnimating = null;
|
|
2153
|
+
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (i === h && !h.animated || i === n && !i.animated) && (Lt = null), !a.dragoverBubble && !t.rootEl && i !== document && (h.parentNode[it]._isOutsideThisEl(t.target), !Kt && Ot(t)), !a.dragoverBubble && t.stopPropagation && t.stopPropagation(), y = !0;
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2156
|
-
|
|
2155
|
+
function tt() {
|
|
2156
|
+
nt = ot(h), xt = ot(h, a.draggable), W({
|
|
2157
2157
|
sortable: g,
|
|
2158
2158
|
name: "change",
|
|
2159
2159
|
toEl: n,
|
|
2160
|
-
newIndex:
|
|
2160
|
+
newIndex: nt,
|
|
2161
2161
|
newDraggableIndex: xt,
|
|
2162
2162
|
originalEvent: t
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = ut(i, a.draggable, n, !0),
|
|
2165
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = ut(i, a.draggable, n, !0), D("dragOver"), v.eventCanceled) return y;
|
|
2166
2166
|
if (h.contains(t.target) || i.animated && i.animatingX && i.animatingY || g._ignoreWhileAnimating === i)
|
|
2167
|
-
return
|
|
2168
|
-
if (
|
|
2169
|
-
if (f = this._getDirection(t, i) === "vertical", o =
|
|
2167
|
+
return V(!1);
|
|
2168
|
+
if (Ue = !1, u && !a.disabled && (c ? d || (s = M !== R) : k === this || (this.lastPutMode = Se.checkPull(this, u, h, t)) && l.checkPut(this, u, h, t))) {
|
|
2169
|
+
if (f = this._getDirection(t, i) === "vertical", o = H(h), D("dragOverValid"), v.eventCanceled) return y;
|
|
2170
2170
|
if (s)
|
|
2171
|
-
return M = R,
|
|
2172
|
-
var Y =
|
|
2173
|
-
if (!Y ||
|
|
2171
|
+
return M = R, U(), this._hideClone(), D("revert"), v.eventCanceled || (Mt ? R.insertBefore(h, Mt) : R.appendChild(h)), V(!0);
|
|
2172
|
+
var Y = Xn(n, a.draggable);
|
|
2173
|
+
if (!Y || ys(t, f, this) && !Y.animated) {
|
|
2174
2174
|
if (Y === h)
|
|
2175
|
-
return
|
|
2176
|
-
if (Y && n === t.target && (i = Y), i && (r =
|
|
2177
|
-
return
|
|
2178
|
-
} else if (Y &&
|
|
2175
|
+
return V(!1);
|
|
2176
|
+
if (Y && n === t.target && (i = Y), i && (r = H(i)), Ae(R, n, h, o, i, r, t, !!i) !== !1)
|
|
2177
|
+
return U(), Y && Y.nextSibling ? n.insertBefore(h, Y.nextSibling) : n.appendChild(h), M = n, tt(), V(!0);
|
|
2178
|
+
} else if (Y && ms(t, f, this)) {
|
|
2179
2179
|
var st = Xt(n, 0, a, !0);
|
|
2180
2180
|
if (st === h)
|
|
2181
|
-
return
|
|
2182
|
-
if (i = st, r =
|
|
2183
|
-
return
|
|
2181
|
+
return V(!1);
|
|
2182
|
+
if (i = st, r = H(i), Ae(R, n, h, o, i, r, t, !1) !== !1)
|
|
2183
|
+
return U(), n.insertBefore(h, st), M = n, tt(), V(!0);
|
|
2184
2184
|
} else if (i.parentNode === n) {
|
|
2185
|
-
r =
|
|
2186
|
-
var A = 0,
|
|
2187
|
-
Lt !== i && (
|
|
2185
|
+
r = H(i);
|
|
2186
|
+
var A = 0, z, at = h.parentNode !== n, X = !cs(h.animated && h.toRect || o, i.animated && i.toRect || r, f), Wt = f ? "top" : "left", vt = pi(i, "top", "top") || pi(h, "top", "top"), Gt = vt ? vt.scrollTop : void 0;
|
|
2187
|
+
Lt !== i && (z = r[Wt], ce = !1, $e = !X && a.invertSwap || at), A = bs(t, i, r, f, X ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, $e, Lt === i);
|
|
2188
2188
|
var ht;
|
|
2189
2189
|
if (A !== 0) {
|
|
2190
|
-
var Tt =
|
|
2190
|
+
var Tt = ot(h);
|
|
2191
2191
|
do
|
|
2192
2192
|
Tt -= A, ht = M.children[Tt];
|
|
2193
2193
|
while (ht && (b(ht, "display") === "none" || ht === w));
|
|
2194
2194
|
}
|
|
2195
2195
|
if (A === 0 || ht === i)
|
|
2196
|
-
return
|
|
2197
|
-
Lt = i,
|
|
2198
|
-
var
|
|
2196
|
+
return V(!1);
|
|
2197
|
+
Lt = i, de = A;
|
|
2198
|
+
var Jt = i.nextElementSibling, wt = !1;
|
|
2199
2199
|
wt = A === 1;
|
|
2200
|
-
var
|
|
2201
|
-
if (
|
|
2202
|
-
return (
|
|
2200
|
+
var xe = Ae(R, n, h, o, i, r, t, wt);
|
|
2201
|
+
if (xe !== !1)
|
|
2202
|
+
return (xe === 1 || xe === -1) && (wt = xe === 1), On = !0, setTimeout(gs, 30), U(), wt && !Jt ? n.appendChild(h) : i.parentNode.insertBefore(h, wt ? Jt : i), vt && Gi(vt, 0, Gt - vt.scrollTop), M = h.parentNode, z !== void 0 && !$e && (Re = Math.abs(z - H(i)[Wt])), tt(), V(!0);
|
|
2203
2203
|
}
|
|
2204
2204
|
if (n.contains(h))
|
|
2205
|
-
return
|
|
2205
|
+
return V(!1);
|
|
2206
2206
|
}
|
|
2207
2207
|
return !1;
|
|
2208
2208
|
},
|
|
2209
2209
|
_ignoreWhileAnimating: null,
|
|
2210
2210
|
_offMoveEvents: function() {
|
|
2211
|
-
S(document, "mousemove", this._onTouchMove), S(document, "touchmove", this._onTouchMove), S(document, "pointermove", this._onTouchMove), S(document, "dragover",
|
|
2211
|
+
S(document, "mousemove", this._onTouchMove), S(document, "touchmove", this._onTouchMove), S(document, "pointermove", this._onTouchMove), S(document, "dragover", Ot), S(document, "mousemove", Ot), S(document, "touchmove", Ot);
|
|
2212
2212
|
},
|
|
2213
2213
|
_offUpEvents: function() {
|
|
2214
2214
|
var t = this.el.ownerDocument;
|
|
@@ -2216,20 +2216,20 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2216
2216
|
},
|
|
2217
2217
|
_onDrop: function(t) {
|
|
2218
2218
|
var n = this.el, i = this.options;
|
|
2219
|
-
if (
|
|
2219
|
+
if (nt = ot(h), xt = ot(h, i.draggable), G("drop", this, {
|
|
2220
2220
|
evt: t
|
|
2221
|
-
}), M = h && h.parentNode,
|
|
2221
|
+
}), M = h && h.parentNode, nt = ot(h), xt = ot(h, i.draggable), v.eventCanceled) {
|
|
2222
2222
|
this._nulling();
|
|
2223
2223
|
return;
|
|
2224
2224
|
}
|
|
2225
|
-
|
|
2225
|
+
kt = !1, $e = !1, ce = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Mn(this.cloneId), Mn(this._dragStartId), this.nativeDraggable && (S(document, "drop", this), S(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ae && b(document.body, "user-select", ""), b(h, "transform", ""), t && (ne && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()), w && w.parentNode && w.parentNode.removeChild(w), (R === M || k && k.lastPutMode !== "clone") && O && O.parentNode && O.parentNode.removeChild(O), h && (this.nativeDraggable && S(h, "dragend", this), An(h), h.style["will-change"] = "", ne && !kt && et(h, k ? k.options.ghostClass : this.options.ghostClass, !1), et(h, this.options.chosenClass, !1), W({
|
|
2226
2226
|
sortable: this,
|
|
2227
2227
|
name: "unchoose",
|
|
2228
2228
|
toEl: M,
|
|
2229
2229
|
newIndex: null,
|
|
2230
2230
|
newDraggableIndex: null,
|
|
2231
2231
|
originalEvent: t
|
|
2232
|
-
}), R !== M ? (
|
|
2232
|
+
}), R !== M ? (nt >= 0 && (W({
|
|
2233
2233
|
rootEl: M,
|
|
2234
2234
|
name: "add",
|
|
2235
2235
|
toEl: M,
|
|
@@ -2251,7 +2251,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2251
2251
|
name: "sort",
|
|
2252
2252
|
toEl: M,
|
|
2253
2253
|
originalEvent: t
|
|
2254
|
-
})),
|
|
2254
|
+
})), k && k.save()) : nt !== jt && nt >= 0 && (W({
|
|
2255
2255
|
sortable: this,
|
|
2256
2256
|
name: "update",
|
|
2257
2257
|
toEl: M,
|
|
@@ -2261,7 +2261,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2261
2261
|
name: "sort",
|
|
2262
2262
|
toEl: M,
|
|
2263
2263
|
originalEvent: t
|
|
2264
|
-
})), v.active && ((
|
|
2264
|
+
})), v.active && ((nt == null || nt === -1) && (nt = jt, xt = ue), W({
|
|
2265
2265
|
sortable: this,
|
|
2266
2266
|
name: "end",
|
|
2267
2267
|
toEl: M,
|
|
@@ -2269,9 +2269,9 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2269
2269
|
}), this.save()))), this._nulling();
|
|
2270
2270
|
},
|
|
2271
2271
|
_nulling: function() {
|
|
2272
|
-
G("nulling", this), R = h = M = w = Mt =
|
|
2272
|
+
G("nulling", this), R = h = M = w = Mt = O = De = St = Rt = lt = ne = nt = xt = jt = ue = Lt = de = k = Se = v.dragged = v.ghost = v.clone = v.active = null, Fe.forEach(function(t) {
|
|
2273
2273
|
t.checked = !0;
|
|
2274
|
-
}),
|
|
2274
|
+
}), Fe.length = Sn = $n = 0;
|
|
2275
2275
|
},
|
|
2276
2276
|
handleEvent: function(t) {
|
|
2277
2277
|
switch (t.type) {
|
|
@@ -2281,7 +2281,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2281
2281
|
break;
|
|
2282
2282
|
case "dragenter":
|
|
2283
2283
|
case "dragover":
|
|
2284
|
-
h && (this._onDragOver(t),
|
|
2284
|
+
h && (this._onDragOver(t), fs(t));
|
|
2285
2285
|
break;
|
|
2286
2286
|
case "selectstart":
|
|
2287
2287
|
t.preventDefault();
|
|
@@ -2294,7 +2294,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2294
2294
|
*/
|
|
2295
2295
|
toArray: function() {
|
|
2296
2296
|
for (var t = [], n, i = this.el.children, o = 0, r = i.length, s = this.options; o < r; o++)
|
|
2297
|
-
n = i[o], ut(n, s.draggable, this.el, !1) && t.push(n.getAttribute(s.dataIdAttr) ||
|
|
2297
|
+
n = i[o], ut(n, s.draggable, this.el, !1) && t.push(n.getAttribute(s.dataIdAttr) || ws(n));
|
|
2298
2298
|
return t;
|
|
2299
2299
|
},
|
|
2300
2300
|
/**
|
|
@@ -2336,8 +2336,8 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2336
2336
|
var i = this.options;
|
|
2337
2337
|
if (n === void 0)
|
|
2338
2338
|
return i[t];
|
|
2339
|
-
var o =
|
|
2340
|
-
typeof o < "u" ? i[t] = o : i[t] = n, t === "group" &&
|
|
2339
|
+
var o = Ee.modifyOption(this, t, n);
|
|
2340
|
+
typeof o < "u" ? i[t] = o : i[t] = n, t === "group" && eo(i);
|
|
2341
2341
|
},
|
|
2342
2342
|
/**
|
|
2343
2343
|
* Destroy
|
|
@@ -2345,14 +2345,14 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2345
2345
|
destroy: function() {
|
|
2346
2346
|
G("destroy", this);
|
|
2347
2347
|
var t = this.el;
|
|
2348
|
-
t[
|
|
2348
|
+
t[it] = null, S(t, "mousedown", this._onTapStart), S(t, "touchstart", this._onTapStart), S(t, "pointerdown", this._onTapStart), this.nativeDraggable && (S(t, "dragover", this), S(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(n) {
|
|
2349
2349
|
n.removeAttribute("draggable");
|
|
2350
2350
|
}), this._onDrop(), this._disableDelayedDragEvents(), ke.splice(ke.indexOf(this.el), 1), this.el = t = null;
|
|
2351
2351
|
},
|
|
2352
2352
|
_hideClone: function() {
|
|
2353
2353
|
if (!St) {
|
|
2354
2354
|
if (G("hideClone", this), v.eventCanceled) return;
|
|
2355
|
-
b(
|
|
2355
|
+
b(O, "display", "none"), this.options.removeCloneOnHide && O.parentNode && O.parentNode.removeChild(O), St = !0;
|
|
2356
2356
|
}
|
|
2357
2357
|
},
|
|
2358
2358
|
_showClone: function(t) {
|
|
@@ -2362,92 +2362,92 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2362
2362
|
}
|
|
2363
2363
|
if (St) {
|
|
2364
2364
|
if (G("showClone", this), v.eventCanceled) return;
|
|
2365
|
-
h.parentNode == R && !this.options.group.revertClone ? R.insertBefore(
|
|
2365
|
+
h.parentNode == R && !this.options.group.revertClone ? R.insertBefore(O, h) : Mt ? R.insertBefore(O, Mt) : R.appendChild(O), this.options.group.revertClone && this.animate(h, O), b(O, "display", ""), St = !1;
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
2368
|
};
|
|
2369
|
-
function
|
|
2369
|
+
function fs(e) {
|
|
2370
2370
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2371
2371
|
}
|
|
2372
|
-
function
|
|
2373
|
-
var l, u = e[
|
|
2374
|
-
return window.CustomEvent && !bt && !
|
|
2372
|
+
function Ae(e, t, n, i, o, r, s, a) {
|
|
2373
|
+
var l, u = e[it], c = u.options.onMove, d;
|
|
2374
|
+
return window.CustomEvent && !bt && !we ? l = new CustomEvent("move", {
|
|
2375
2375
|
bubbles: !0,
|
|
2376
2376
|
cancelable: !0
|
|
2377
|
-
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = e, l.dragged = n, l.draggedRect = i, l.related = o || t, l.relatedRect = r ||
|
|
2377
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = e, l.dragged = n, l.draggedRect = i, l.related = o || t, l.relatedRect = r || H(t), l.willInsertAfter = a, l.originalEvent = s, e.dispatchEvent(l), c && (d = c.call(u, l, s)), d;
|
|
2378
2378
|
}
|
|
2379
|
-
function
|
|
2379
|
+
function An(e) {
|
|
2380
2380
|
e.draggable = !1;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2383
|
-
|
|
2382
|
+
function gs() {
|
|
2383
|
+
On = !1;
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2386
|
-
var i =
|
|
2385
|
+
function ms(e, t, n) {
|
|
2386
|
+
var i = H(Xt(n.el, 0, n.options, !0)), o = Ki(n.el, n.options, w), r = 10;
|
|
2387
2387
|
return t ? e.clientX < o.left - r || e.clientY < i.top && e.clientX < i.right : e.clientY < o.top - r || e.clientY < i.bottom && e.clientX < i.left;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
var i =
|
|
2389
|
+
function ys(e, t, n) {
|
|
2390
|
+
var i = H(Xn(n.el, n.options.draggable)), o = Ki(n.el, n.options, w), r = 10;
|
|
2391
2391
|
return t ? e.clientX > o.right + r || e.clientY > i.bottom && e.clientX > i.left : e.clientY > o.bottom + r || e.clientX > i.right && e.clientY > i.top;
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2394
|
-
var l = i ? e.clientY : e.clientX, u = i ? n.height : n.width,
|
|
2393
|
+
function bs(e, t, n, i, o, r, s, a) {
|
|
2394
|
+
var l = i ? e.clientY : e.clientX, u = i ? n.height : n.width, c = i ? n.top : n.left, d = i ? n.bottom : n.right, p = !1;
|
|
2395
2395
|
if (!s) {
|
|
2396
|
-
if (a &&
|
|
2397
|
-
if (!ce && (
|
|
2396
|
+
if (a && Re < u * o) {
|
|
2397
|
+
if (!ce && (de === 1 ? l > c + u * r / 2 : l < d - u * r / 2) && (ce = !0), ce)
|
|
2398
2398
|
p = !0;
|
|
2399
|
-
else if (
|
|
2400
|
-
return -
|
|
2401
|
-
} else if (l >
|
|
2402
|
-
return
|
|
2399
|
+
else if (de === 1 ? l < c + Re : l > d - Re)
|
|
2400
|
+
return -de;
|
|
2401
|
+
} else if (l > c + u * (1 - o) / 2 && l < d - u * (1 - o) / 2)
|
|
2402
|
+
return vs(t);
|
|
2403
2403
|
}
|
|
2404
|
-
return p = p || s, p && (l <
|
|
2404
|
+
return p = p || s, p && (l < c + u * r / 2 || l > d - u * r / 2) ? l > c + u / 2 ? 1 : -1 : 0;
|
|
2405
2405
|
}
|
|
2406
|
-
function
|
|
2407
|
-
return
|
|
2406
|
+
function vs(e) {
|
|
2407
|
+
return ot(h) < ot(e) ? 1 : -1;
|
|
2408
2408
|
}
|
|
2409
|
-
function
|
|
2409
|
+
function ws(e) {
|
|
2410
2410
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, i = 0; n--; )
|
|
2411
2411
|
i += t.charCodeAt(n);
|
|
2412
2412
|
return i.toString(36);
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2415
|
-
|
|
2414
|
+
function Es(e) {
|
|
2415
|
+
Fe.length = 0;
|
|
2416
2416
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--; ) {
|
|
2417
2417
|
var i = t[n];
|
|
2418
|
-
i.checked &&
|
|
2418
|
+
i.checked && Fe.push(i);
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
|
-
function
|
|
2421
|
+
function Oe(e) {
|
|
2422
2422
|
return setTimeout(e, 0);
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function Mn(e) {
|
|
2425
2425
|
return clearTimeout(e);
|
|
2426
2426
|
}
|
|
2427
|
-
|
|
2428
|
-
(v.active ||
|
|
2427
|
+
hn && _(document, "touchmove", function(e) {
|
|
2428
|
+
(v.active || kt) && e.cancelable && e.preventDefault();
|
|
2429
2429
|
});
|
|
2430
2430
|
v.utils = {
|
|
2431
2431
|
on: _,
|
|
2432
2432
|
off: S,
|
|
2433
2433
|
css: b,
|
|
2434
|
-
find:
|
|
2434
|
+
find: Yi,
|
|
2435
2435
|
is: function(t, n) {
|
|
2436
2436
|
return !!ut(t, n, t, !1);
|
|
2437
2437
|
},
|
|
2438
|
-
extend:
|
|
2439
|
-
throttle:
|
|
2438
|
+
extend: is,
|
|
2439
|
+
throttle: Wi,
|
|
2440
2440
|
closest: ut,
|
|
2441
|
-
toggleClass:
|
|
2442
|
-
clone:
|
|
2443
|
-
index:
|
|
2444
|
-
nextTick:
|
|
2445
|
-
cancelNextTick:
|
|
2446
|
-
detectDirection:
|
|
2441
|
+
toggleClass: et,
|
|
2442
|
+
clone: Ji,
|
|
2443
|
+
index: ot,
|
|
2444
|
+
nextTick: Oe,
|
|
2445
|
+
cancelNextTick: Mn,
|
|
2446
|
+
detectDirection: to,
|
|
2447
2447
|
getChild: Xt
|
|
2448
2448
|
};
|
|
2449
2449
|
v.get = function(e) {
|
|
2450
|
-
return e[
|
|
2450
|
+
return e[it];
|
|
2451
2451
|
};
|
|
2452
2452
|
v.mount = function() {
|
|
2453
2453
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
@@ -2455,15 +2455,15 @@ v.mount = function() {
|
|
|
2455
2455
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(i) {
|
|
2456
2456
|
if (!i.prototype || !i.prototype.constructor)
|
|
2457
2457
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));
|
|
2458
|
-
i.utils && (v.utils =
|
|
2458
|
+
i.utils && (v.utils = ct(ct({}, v.utils), i.utils)), Ee.mount(i);
|
|
2459
2459
|
});
|
|
2460
2460
|
};
|
|
2461
2461
|
v.create = function(e, t) {
|
|
2462
2462
|
return new v(e, t);
|
|
2463
2463
|
};
|
|
2464
|
-
v.version =
|
|
2465
|
-
var
|
|
2466
|
-
function
|
|
2464
|
+
v.version = ts;
|
|
2465
|
+
var I = [], ie, Nn, In = !1, Cn, Tn, je, oe;
|
|
2466
|
+
function xs() {
|
|
2467
2467
|
function e() {
|
|
2468
2468
|
this.defaults = {
|
|
2469
2469
|
scroll: !0,
|
|
@@ -2485,29 +2485,29 @@ function ms() {
|
|
|
2485
2485
|
!this.options.dragOverBubble && !i.rootEl && this._handleAutoScroll(i);
|
|
2486
2486
|
},
|
|
2487
2487
|
drop: function() {
|
|
2488
|
-
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
2488
|
+
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)), bi(), Me(), os();
|
|
2489
2489
|
},
|
|
2490
2490
|
nulling: function() {
|
|
2491
|
-
|
|
2491
|
+
je = Nn = ie = In = oe = Cn = Tn = null, I.length = 0;
|
|
2492
2492
|
},
|
|
2493
2493
|
_handleFallbackAutoScroll: function(n) {
|
|
2494
2494
|
this._handleAutoScroll(n, !0);
|
|
2495
2495
|
},
|
|
2496
2496
|
_handleAutoScroll: function(n, i) {
|
|
2497
2497
|
var o = this, r = (n.touches ? n.touches[0] : n).clientX, s = (n.touches ? n.touches[0] : n).clientY, a = document.elementFromPoint(r, s);
|
|
2498
|
-
if (
|
|
2499
|
-
|
|
2498
|
+
if (je = n, i || this.options.forceAutoScrollFallback || we || bt || ae) {
|
|
2499
|
+
Pn(n, this.options, a, i);
|
|
2500
2500
|
var l = _t(a, !0);
|
|
2501
|
-
|
|
2501
|
+
In && (!oe || r !== Cn || s !== Tn) && (oe && bi(), oe = setInterval(function() {
|
|
2502
2502
|
var u = _t(document.elementFromPoint(r, s), !0);
|
|
2503
|
-
u !== l && (l = u,
|
|
2504
|
-
}, 10),
|
|
2503
|
+
u !== l && (l = u, Me()), Pn(n, o.options, u, i);
|
|
2504
|
+
}, 10), Cn = r, Tn = s);
|
|
2505
2505
|
} else {
|
|
2506
|
-
if (!this.options.bubbleScroll || _t(a, !0) ===
|
|
2507
|
-
|
|
2506
|
+
if (!this.options.bubbleScroll || _t(a, !0) === dt()) {
|
|
2507
|
+
Me();
|
|
2508
2508
|
return;
|
|
2509
2509
|
}
|
|
2510
|
-
|
|
2510
|
+
Pn(n, this.options, _t(a, !1), !1);
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
2513
|
}, yt(e, {
|
|
@@ -2515,51 +2515,51 @@ function ms() {
|
|
|
2515
2515
|
initializeByDefault: !0
|
|
2516
2516
|
});
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2519
|
-
|
|
2518
|
+
function Me() {
|
|
2519
|
+
I.forEach(function(e) {
|
|
2520
2520
|
clearInterval(e.pid);
|
|
2521
|
-
}),
|
|
2521
|
+
}), I = [];
|
|
2522
2522
|
}
|
|
2523
|
-
function
|
|
2524
|
-
clearInterval(
|
|
2523
|
+
function bi() {
|
|
2524
|
+
clearInterval(oe);
|
|
2525
2525
|
}
|
|
2526
|
-
var
|
|
2526
|
+
var Pn = Wi(function(e, t, n, i) {
|
|
2527
2527
|
if (t.scroll) {
|
|
2528
|
-
var o = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, s = t.scrollSensitivity, a = t.scrollSpeed, l =
|
|
2529
|
-
|
|
2530
|
-
var
|
|
2528
|
+
var o = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, s = t.scrollSensitivity, a = t.scrollSpeed, l = dt(), u = !1, c;
|
|
2529
|
+
Nn !== n && (Nn = n, Me(), ie = t.scroll, c = t.scrollFn, ie === !0 && (ie = _t(n, !0)));
|
|
2530
|
+
var d = 0, p = ie;
|
|
2531
2531
|
do {
|
|
2532
|
-
var f = p, g =
|
|
2533
|
-
f === l ? (st =
|
|
2534
|
-
var
|
|
2535
|
-
if (!
|
|
2536
|
-
for (var Tt = 0; Tt <=
|
|
2537
|
-
|
|
2538
|
-
(
|
|
2539
|
-
i && this.layer === 0 && v.active._onTouchMove(
|
|
2540
|
-
var
|
|
2541
|
-
typeof
|
|
2532
|
+
var f = p, g = H(f), y = g.top, D = g.bottom, U = g.left, V = g.right, tt = g.width, Y = g.height, st = void 0, A = void 0, z = f.scrollWidth, at = f.scrollHeight, X = b(f), Wt = f.scrollLeft, vt = f.scrollTop;
|
|
2533
|
+
f === l ? (st = tt < z && (X.overflowX === "auto" || X.overflowX === "scroll" || X.overflowX === "visible"), A = Y < at && (X.overflowY === "auto" || X.overflowY === "scroll" || X.overflowY === "visible")) : (st = tt < z && (X.overflowX === "auto" || X.overflowX === "scroll"), A = Y < at && (X.overflowY === "auto" || X.overflowY === "scroll"));
|
|
2534
|
+
var Gt = st && (Math.abs(V - o) <= s && Wt + tt < z) - (Math.abs(U - o) <= s && !!Wt), ht = A && (Math.abs(D - r) <= s && vt + Y < at) - (Math.abs(y - r) <= s && !!vt);
|
|
2535
|
+
if (!I[d])
|
|
2536
|
+
for (var Tt = 0; Tt <= d; Tt++)
|
|
2537
|
+
I[Tt] || (I[Tt] = {});
|
|
2538
|
+
(I[d].vx != Gt || I[d].vy != ht || I[d].el !== f) && (I[d].el = f, I[d].vx = Gt, I[d].vy = ht, clearInterval(I[d].pid), (Gt != 0 || ht != 0) && (u = !0, I[d].pid = setInterval((function() {
|
|
2539
|
+
i && this.layer === 0 && v.active._onTouchMove(je);
|
|
2540
|
+
var Jt = I[this.layer].vy ? I[this.layer].vy * a : 0, wt = I[this.layer].vx ? I[this.layer].vx * a : 0;
|
|
2541
|
+
typeof c == "function" && c.call(v.dragged.parentNode[it], wt, Jt, e, je, I[this.layer].el) !== "continue" || Gi(I[this.layer].el, wt, Jt);
|
|
2542
2542
|
}).bind({
|
|
2543
|
-
layer:
|
|
2544
|
-
}), 24))),
|
|
2543
|
+
layer: d
|
|
2544
|
+
}), 24))), d++;
|
|
2545
2545
|
} while (t.bubbleScroll && p !== l && (p = _t(p, !1)));
|
|
2546
|
-
|
|
2546
|
+
In = u;
|
|
2547
2547
|
}
|
|
2548
|
-
}, 30),
|
|
2548
|
+
}, 30), oo = function(t) {
|
|
2549
2549
|
var n = t.originalEvent, i = t.putSortable, o = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
2550
2550
|
if (n) {
|
|
2551
2551
|
var u = i || r;
|
|
2552
2552
|
a();
|
|
2553
|
-
var
|
|
2554
|
-
l(), u && !u.el.contains(
|
|
2553
|
+
var c = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, d = document.elementFromPoint(c.clientX, c.clientY);
|
|
2554
|
+
l(), u && !u.el.contains(d) && (s("spill"), this.onSpill({
|
|
2555
2555
|
dragEl: o,
|
|
2556
2556
|
putSortable: i
|
|
2557
2557
|
}));
|
|
2558
2558
|
}
|
|
2559
2559
|
};
|
|
2560
|
-
function
|
|
2560
|
+
function qn() {
|
|
2561
2561
|
}
|
|
2562
|
-
|
|
2562
|
+
qn.prototype = {
|
|
2563
2563
|
startIndex: null,
|
|
2564
2564
|
dragStart: function(t) {
|
|
2565
2565
|
var n = t.oldDraggableIndex;
|
|
@@ -2571,32 +2571,32 @@ zn.prototype = {
|
|
|
2571
2571
|
var o = Xt(this.sortable.el, this.startIndex, this.options);
|
|
2572
2572
|
o ? this.sortable.el.insertBefore(n, o) : this.sortable.el.appendChild(n), this.sortable.animateAll(), i && i.animateAll();
|
|
2573
2573
|
},
|
|
2574
|
-
drop:
|
|
2574
|
+
drop: oo
|
|
2575
2575
|
};
|
|
2576
|
-
yt(
|
|
2576
|
+
yt(qn, {
|
|
2577
2577
|
pluginName: "revertOnSpill"
|
|
2578
2578
|
});
|
|
2579
|
-
function
|
|
2579
|
+
function Yn() {
|
|
2580
2580
|
}
|
|
2581
|
-
|
|
2581
|
+
Yn.prototype = {
|
|
2582
2582
|
onSpill: function(t) {
|
|
2583
2583
|
var n = t.dragEl, i = t.putSortable, o = i || this.sortable;
|
|
2584
2584
|
o.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), o.animateAll();
|
|
2585
2585
|
},
|
|
2586
|
-
drop:
|
|
2586
|
+
drop: oo
|
|
2587
2587
|
};
|
|
2588
|
-
yt(
|
|
2588
|
+
yt(Yn, {
|
|
2589
2589
|
pluginName: "removeOnSpill"
|
|
2590
2590
|
});
|
|
2591
|
-
v.mount(new
|
|
2592
|
-
v.mount(
|
|
2593
|
-
const
|
|
2591
|
+
v.mount(new xs());
|
|
2592
|
+
v.mount(Yn, qn);
|
|
2593
|
+
const Ss = (e) => {
|
|
2594
2594
|
const t = e.item;
|
|
2595
2595
|
let n = Array.prototype.slice.call(t.parentNode.childNodes);
|
|
2596
2596
|
return n = n.filter(
|
|
2597
2597
|
(i) => i.nodeType != Node.ELEMENT_NODE || !i.classList.contains("sortable-fallback")
|
|
2598
2598
|
), n;
|
|
2599
|
-
},
|
|
2599
|
+
}, $s = (e, t, n, i, o, r) => {
|
|
2600
2600
|
const a = e.item.parentNode;
|
|
2601
2601
|
for (const y of n)
|
|
2602
2602
|
a.appendChild(y);
|
|
@@ -2604,23 +2604,23 @@ const ys = (e) => {
|
|
|
2604
2604
|
const l = i.getArray(), u = (
|
|
2605
2605
|
/** @type {Element & {layer: import("ol/layer").Layer}} */
|
|
2606
2606
|
e.item.querySelector("eox-layercontrol-layer").layer.get(o)
|
|
2607
|
-
),
|
|
2608
|
-
(y) => y.get(o) ==
|
|
2607
|
+
), c = l.find((y) => y.get(o) === u), d = r.dataset.layer, p = l.find(
|
|
2608
|
+
(y) => y.get(o) == d
|
|
2609
2609
|
);
|
|
2610
2610
|
let f, g;
|
|
2611
2611
|
for (f = 0; f < l.length; f++)
|
|
2612
|
-
if (l[f] ==
|
|
2612
|
+
if (l[f] == c) {
|
|
2613
2613
|
i.removeAt(f);
|
|
2614
2614
|
break;
|
|
2615
2615
|
}
|
|
2616
2616
|
for (g = 0; g < l.length; g++)
|
|
2617
2617
|
if (l[g] === p) {
|
|
2618
|
-
f > g ? i.insertAt(g,
|
|
2618
|
+
f > g ? i.insertAt(g, c) : i.insertAt(g + 1, c);
|
|
2619
2619
|
break;
|
|
2620
2620
|
}
|
|
2621
2621
|
t.requestUpdate();
|
|
2622
2622
|
};
|
|
2623
|
-
function
|
|
2623
|
+
function _s(e, t, n, i) {
|
|
2624
2624
|
let o = [], r = null;
|
|
2625
2625
|
e._sortable = v.create(e, {
|
|
2626
2626
|
handle: ".drag-handle",
|
|
@@ -2628,14 +2628,14 @@ function vs(e, t, n, i) {
|
|
|
2628
2628
|
swapThreshold: 0.5,
|
|
2629
2629
|
animation: 150,
|
|
2630
2630
|
easing: "cubic-bezier(1, 0, 0, 1)",
|
|
2631
|
-
onStart: (s) => o =
|
|
2631
|
+
onStart: (s) => o = Ss(s),
|
|
2632
2632
|
onMove: (s) => {
|
|
2633
2633
|
r = s.related;
|
|
2634
2634
|
},
|
|
2635
|
-
onEnd: (s) =>
|
|
2635
|
+
onEnd: (s) => $s(s, i, o, t, n, r)
|
|
2636
2636
|
});
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2638
|
+
function As(e, t, n, i) {
|
|
2639
2639
|
const o = e.getArray();
|
|
2640
2640
|
let r = !1;
|
|
2641
2641
|
o.forEach((s) => {
|
|
@@ -2643,7 +2643,7 @@ function ws(e, t, n, i) {
|
|
|
2643
2643
|
s.get(t) || (s.set(t, a), r = !0), s.get(n) || (s.set(n, `layer ${a}`), r = !0), r && i.requestUpdate();
|
|
2644
2644
|
});
|
|
2645
2645
|
}
|
|
2646
|
-
function
|
|
2646
|
+
function Wn(e, t, n) {
|
|
2647
2647
|
let i = [];
|
|
2648
2648
|
const o = (r, s, a) => {
|
|
2649
2649
|
i = [
|
|
@@ -2665,24 +2665,24 @@ function Xn(e, t, n) {
|
|
|
2665
2665
|
};
|
|
2666
2666
|
return o(e, t, n), i;
|
|
2667
2667
|
}
|
|
2668
|
-
function
|
|
2668
|
+
function Cs(e, t, n) {
|
|
2669
2669
|
if (!e || !t) return !1;
|
|
2670
|
-
if (!
|
|
2670
|
+
if (!ro(e, n)) return !0;
|
|
2671
2671
|
const i = e.get("minZoom"), o = e.get("maxZoom"), r = t.getView().getZoom();
|
|
2672
2672
|
return r > i && r < o;
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2674
|
+
function ro(e, t) {
|
|
2675
2675
|
const n = e.get("minZoom"), i = e.get("maxZoom");
|
|
2676
2676
|
return !!(t && (n !== -1 / 0 || i !== 1 / 0));
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2678
|
+
function Ts(e, t) {
|
|
2679
2679
|
var o, r, s;
|
|
2680
2680
|
return !e || !t ? void 0 : e.getLayers ? "group" : ((s = (o = t.getInteractions().getArray().filter((a) => a.freehand_ !== void 0).map((a) => a.source_)) == null ? void 0 : o.ol_uid) == null ? void 0 : s.includes(
|
|
2681
2681
|
// @ts-ignore
|
|
2682
2682
|
e.getSource ? (r = e.getSource()) == null ? void 0 : r.ol_uid : void 0
|
|
2683
2683
|
)) ? "draw" : e.declutter_ !== void 0 ? "vector" : "raster";
|
|
2684
2684
|
}
|
|
2685
|
-
function
|
|
2685
|
+
function so(e, t) {
|
|
2686
2686
|
var i;
|
|
2687
2687
|
let n = {};
|
|
2688
2688
|
for (const o in e) {
|
|
@@ -2690,7 +2690,7 @@ function io(e, t) {
|
|
|
2690
2690
|
if (r && r !== "object")
|
|
2691
2691
|
n[o] = r === "number" ? Number(t[o]) : t[o];
|
|
2692
2692
|
else if (typeof e[o] == "object" && ((i = e[o]) != null && i.properties)) {
|
|
2693
|
-
const s =
|
|
2693
|
+
const s = so(
|
|
2694
2694
|
e[o].properties,
|
|
2695
2695
|
t
|
|
2696
2696
|
);
|
|
@@ -2699,7 +2699,7 @@ function io(e, t) {
|
|
|
2699
2699
|
}
|
|
2700
2700
|
return n;
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2702
|
+
function Ps(e, t) {
|
|
2703
2703
|
var r, s, a, l, u;
|
|
2704
2704
|
if (!t) return null;
|
|
2705
2705
|
let n = {}, i = "updateStyleVariables" in e ? (
|
|
@@ -2709,23 +2709,23 @@ function Ss(e, t) {
|
|
|
2709
2709
|
if ((t.type === "style" || t.style) && i)
|
|
2710
2710
|
n = i;
|
|
2711
2711
|
else if ((l = (a = e.getSource()) == null ? void 0 : a.getTileUrlFunction) != null && l.call(a)) {
|
|
2712
|
-
const
|
|
2713
|
-
n = Object.fromEntries(
|
|
2712
|
+
const c = new URL(e.getSource().getTileUrlFunction()([0, 0, 0]));
|
|
2713
|
+
n = Object.fromEntries(c.searchParams.entries());
|
|
2714
2714
|
} else return null;
|
|
2715
|
-
const o =
|
|
2715
|
+
const o = so(
|
|
2716
2716
|
((u = t.schema) == null ? void 0 : u.properties) || t.schema,
|
|
2717
2717
|
n
|
|
2718
2718
|
);
|
|
2719
2719
|
return Object.keys(o).length ? o : null;
|
|
2720
2720
|
}
|
|
2721
|
-
const
|
|
2721
|
+
const Ds = (e, t) => e == null ? void 0 : e.filter(
|
|
2722
2722
|
(n) => ["remove", "sort"].filter((i) => t != null && t.get("layerControlDisable") ? i !== "sort" : !0).includes(n)
|
|
2723
|
-
),
|
|
2723
|
+
), Rs = (e, t) => e == null ? void 0 : e.filter((n) => {
|
|
2724
2724
|
let i = !0;
|
|
2725
|
-
return ["remove", "sort"].includes(n) && (i = !1), n === "info" && (i = t.get("description")), n === "config" && (i = t.get("layerConfig")), i;
|
|
2726
|
-
}),
|
|
2725
|
+
return ["remove", "sort"].includes(n) && (i = !1), n === "info" && (i = t.get("description")), n === "config" && (i = t.get("layerConfig")), n === "datetime" && (i = t.get("layerDatetime")), i;
|
|
2726
|
+
}), Os = (e, t) => E`
|
|
2727
2727
|
<button slot="${e}-icon" class="icon">${t ? e : C}</button>
|
|
2728
|
-
`,
|
|
2728
|
+
`, Ms = (e) => E`
|
|
2729
2729
|
<button
|
|
2730
2730
|
class="remove-icon icon"
|
|
2731
2731
|
@click=${() => {
|
|
@@ -2740,11 +2740,11 @@ const $s = (e, t) => e == null ? void 0 : e.filter(
|
|
|
2740
2740
|
>
|
|
2741
2741
|
${e.unstyled ? "x" : C}
|
|
2742
2742
|
</button>
|
|
2743
|
-
`,
|
|
2743
|
+
`, Ns = (e) => E`
|
|
2744
2744
|
<span class="button sort-icon icon drag-handle">
|
|
2745
2745
|
${e ? "═" : C}
|
|
2746
2746
|
</span>
|
|
2747
|
-
`,
|
|
2747
|
+
`, ao = (e) => {
|
|
2748
2748
|
var n;
|
|
2749
2749
|
const t = ["layerControlHide", "layerControlOptional"];
|
|
2750
2750
|
return (n = e == null ? void 0 : e.getArray()) == null ? void 0 : n.filter((i) => t.every((o) => !i.get(o)));
|
|
@@ -2754,23 +2754,23 @@ const $s = (e, t) => e == null ? void 0 : e.filter(
|
|
|
2754
2754
|
* Copyright 2020 Google LLC
|
|
2755
2755
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2756
2756
|
*/
|
|
2757
|
-
const
|
|
2757
|
+
const lo = Fn(class extends jn {
|
|
2758
2758
|
constructor(e) {
|
|
2759
2759
|
if (super(e), e.type !== Et.PROPERTY && e.type !== Et.ATTRIBUTE && e.type !== Et.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
2760
|
-
if (!
|
|
2760
|
+
if (!Ko(e)) throw Error("`live` bindings can only contain a single expression");
|
|
2761
2761
|
}
|
|
2762
2762
|
render(e) {
|
|
2763
2763
|
return e;
|
|
2764
2764
|
}
|
|
2765
2765
|
update(e, [t]) {
|
|
2766
|
-
if (t ===
|
|
2766
|
+
if (t === rt || t === C) return t;
|
|
2767
2767
|
const n = e.element, i = e.name;
|
|
2768
2768
|
if (e.type === Et.PROPERTY) {
|
|
2769
|
-
if (t === n[i]) return
|
|
2769
|
+
if (t === n[i]) return rt;
|
|
2770
2770
|
} else if (e.type === Et.BOOLEAN_ATTRIBUTE) {
|
|
2771
|
-
if (!!t === n.hasAttribute(i)) return
|
|
2772
|
-
} else if (e.type === Et.ATTRIBUTE && n.getAttribute(i) === t + "") return
|
|
2773
|
-
return
|
|
2771
|
+
if (!!t === n.hasAttribute(i)) return rt;
|
|
2772
|
+
} else if (e.type === Et.ATTRIBUTE && n.getAttribute(i) === t + "") return rt;
|
|
2773
|
+
return Hi(e), t;
|
|
2774
2774
|
}
|
|
2775
2775
|
});
|
|
2776
2776
|
/**
|
|
@@ -2778,13 +2778,13 @@ const ro = Ln(class extends kn {
|
|
|
2778
2778
|
* Copyright 2017 Google LLC
|
|
2779
2779
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2780
2780
|
*/
|
|
2781
|
-
class
|
|
2781
|
+
class Hn extends jn {
|
|
2782
2782
|
constructor(t) {
|
|
2783
2783
|
if (super(t), this.it = C, t.type !== Et.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
2784
2784
|
}
|
|
2785
2785
|
render(t) {
|
|
2786
2786
|
if (t === C || t == null) return this._t = void 0, this.it = t;
|
|
2787
|
-
if (t ===
|
|
2787
|
+
if (t === rt) return t;
|
|
2788
2788
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
2789
2789
|
if (t === this.it) return this._t;
|
|
2790
2790
|
this.it = t;
|
|
@@ -2792,51 +2792,51 @@ class Mn extends kn {
|
|
|
2792
2792
|
return n.raw = n, this._t = { _$litType$: this.constructor.resultType, strings: n, values: [] };
|
|
2793
2793
|
}
|
|
2794
2794
|
}
|
|
2795
|
-
|
|
2796
|
-
const
|
|
2795
|
+
Hn.directiveName = "unsafeHTML", Hn.resultType = 1;
|
|
2796
|
+
const Is = Fn(Hn);
|
|
2797
2797
|
/**
|
|
2798
2798
|
* @license
|
|
2799
2799
|
* Copyright 2021 Google LLC
|
|
2800
2800
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2801
2801
|
*/
|
|
2802
|
-
function*
|
|
2802
|
+
function* Ne(e, t) {
|
|
2803
2803
|
if (e !== void 0) {
|
|
2804
2804
|
let n = 0;
|
|
2805
2805
|
for (const i of e) yield t(i, n++);
|
|
2806
2806
|
}
|
|
2807
2807
|
}
|
|
2808
|
-
const
|
|
2808
|
+
const Hs = (e, t, n) => {
|
|
2809
2809
|
let i = t;
|
|
2810
2810
|
return n.layer.getSource().getTileUrlFunction() && (i || (i = n.layer.getSource().getTileUrlFunction()), n.layer.getSource().setTileUrlFunction(
|
|
2811
|
-
(...o) =>
|
|
2811
|
+
(...o) => Gr(i(...o), e)
|
|
2812
2812
|
), n.layer.getSource().setKey(/* @__PURE__ */ new Date())), i;
|
|
2813
2813
|
};
|
|
2814
|
-
function
|
|
2814
|
+
function Bs(e, t, n) {
|
|
2815
2815
|
const i = "updateStyleVariables" in t, o = "setStyle" in t, r = i ? (
|
|
2816
2816
|
/** @type {import('ol/layer/WebGLTile').default} */
|
|
2817
2817
|
t.style_
|
|
2818
2818
|
) : n.style;
|
|
2819
2819
|
let s = r == null ? void 0 : r.variables;
|
|
2820
2820
|
if (s) {
|
|
2821
|
-
const a =
|
|
2821
|
+
const a = uo(e);
|
|
2822
2822
|
if (r.variables = {
|
|
2823
2823
|
...s,
|
|
2824
2824
|
...a
|
|
2825
2825
|
}, i)
|
|
2826
2826
|
t.updateStyleVariables(a);
|
|
2827
2827
|
else if (o) {
|
|
2828
|
-
const l =
|
|
2828
|
+
const l = Vs(r);
|
|
2829
2829
|
t.setStyle(
|
|
2830
2830
|
l
|
|
2831
2831
|
);
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
2834
2834
|
}
|
|
2835
|
-
const
|
|
2835
|
+
const uo = (e) => {
|
|
2836
2836
|
const t = {};
|
|
2837
2837
|
for (const n in e)
|
|
2838
2838
|
if (typeof e[n] == "object" && e[n] !== null) {
|
|
2839
|
-
const i =
|
|
2839
|
+
const i = uo(
|
|
2840
2840
|
/** @type {Record<string,any>} */
|
|
2841
2841
|
e[n]
|
|
2842
2842
|
);
|
|
@@ -2846,7 +2846,7 @@ const so = (e) => {
|
|
|
2846
2846
|
t[n] = e == null ? void 0 : e[n];
|
|
2847
2847
|
return t;
|
|
2848
2848
|
};
|
|
2849
|
-
function
|
|
2849
|
+
function Vs(e) {
|
|
2850
2850
|
let t = e;
|
|
2851
2851
|
if ("variables" in e) {
|
|
2852
2852
|
let n = JSON.stringify(e);
|
|
@@ -2860,113 +2860,113 @@ function Ds(e) {
|
|
|
2860
2860
|
}
|
|
2861
2861
|
return t;
|
|
2862
2862
|
}
|
|
2863
|
-
var
|
|
2864
|
-
function
|
|
2863
|
+
var Ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2864
|
+
function Ls(e) {
|
|
2865
2865
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2866
2866
|
}
|
|
2867
|
-
var
|
|
2868
|
-
return
|
|
2867
|
+
var Us = "Expected a function", vi = NaN, ks = "[object Symbol]", Fs = /^\s+|\s+$/g, js = /^[-+]0x[0-9a-f]+$/i, Zs = /^0b[01]+$/i, zs = /^0o[0-7]+$/i, Xs = parseInt, qs = typeof Ce == "object" && Ce && Ce.Object === Object && Ce, Ys = typeof self == "object" && self && self.Object === Object && self, Ws = qs || Ys || Function("return this")(), Gs = Object.prototype, Js = Gs.toString, Ks = Math.max, Qs = Math.min, Dn = function() {
|
|
2868
|
+
return Ws.Date.now();
|
|
2869
2869
|
};
|
|
2870
|
-
function
|
|
2871
|
-
var i, o, r, s, a, l, u = 0,
|
|
2870
|
+
function ta(e, t, n) {
|
|
2871
|
+
var i, o, r, s, a, l, u = 0, c = !1, d = !1, p = !0;
|
|
2872
2872
|
if (typeof e != "function")
|
|
2873
|
-
throw new TypeError(
|
|
2874
|
-
t =
|
|
2873
|
+
throw new TypeError(Us);
|
|
2874
|
+
t = wi(t) || 0, Bn(n) && (c = !!n.leading, d = "maxWait" in n, r = d ? Ks(wi(n.maxWait) || 0, t) : r, p = "trailing" in n ? !!n.trailing : p);
|
|
2875
2875
|
function f(A) {
|
|
2876
|
-
var
|
|
2877
|
-
return i = o = void 0, u = A, s = e.apply(at,
|
|
2876
|
+
var z = i, at = o;
|
|
2877
|
+
return i = o = void 0, u = A, s = e.apply(at, z), s;
|
|
2878
2878
|
}
|
|
2879
2879
|
function g(A) {
|
|
2880
|
-
return u = A, a = setTimeout(
|
|
2880
|
+
return u = A, a = setTimeout(U, t), c ? f(A) : s;
|
|
2881
2881
|
}
|
|
2882
2882
|
function y(A) {
|
|
2883
|
-
var
|
|
2884
|
-
return
|
|
2883
|
+
var z = A - l, at = A - u, X = t - z;
|
|
2884
|
+
return d ? Qs(X, r - at) : X;
|
|
2885
2885
|
}
|
|
2886
|
-
function
|
|
2887
|
-
var
|
|
2888
|
-
return l === void 0 ||
|
|
2886
|
+
function D(A) {
|
|
2887
|
+
var z = A - l, at = A - u;
|
|
2888
|
+
return l === void 0 || z >= t || z < 0 || d && at >= r;
|
|
2889
2889
|
}
|
|
2890
|
-
function
|
|
2891
|
-
var A =
|
|
2892
|
-
if (
|
|
2893
|
-
return
|
|
2894
|
-
a = setTimeout(
|
|
2890
|
+
function U() {
|
|
2891
|
+
var A = Dn();
|
|
2892
|
+
if (D(A))
|
|
2893
|
+
return V(A);
|
|
2894
|
+
a = setTimeout(U, y(A));
|
|
2895
2895
|
}
|
|
2896
|
-
function
|
|
2896
|
+
function V(A) {
|
|
2897
2897
|
return a = void 0, p && i ? f(A) : (i = o = void 0, s);
|
|
2898
2898
|
}
|
|
2899
|
-
function
|
|
2899
|
+
function tt() {
|
|
2900
2900
|
a !== void 0 && clearTimeout(a), u = 0, i = l = o = a = void 0;
|
|
2901
2901
|
}
|
|
2902
2902
|
function Y() {
|
|
2903
|
-
return a === void 0 ? s :
|
|
2903
|
+
return a === void 0 ? s : V(Dn());
|
|
2904
2904
|
}
|
|
2905
2905
|
function st() {
|
|
2906
|
-
var A =
|
|
2907
|
-
if (i = arguments, o = this, l = A,
|
|
2906
|
+
var A = Dn(), z = D(A);
|
|
2907
|
+
if (i = arguments, o = this, l = A, z) {
|
|
2908
2908
|
if (a === void 0)
|
|
2909
2909
|
return g(l);
|
|
2910
|
-
if (
|
|
2911
|
-
return a = setTimeout(
|
|
2910
|
+
if (d)
|
|
2911
|
+
return a = setTimeout(U, t), f(l);
|
|
2912
2912
|
}
|
|
2913
|
-
return a === void 0 && (a = setTimeout(
|
|
2913
|
+
return a === void 0 && (a = setTimeout(U, t)), s;
|
|
2914
2914
|
}
|
|
2915
|
-
return st.cancel =
|
|
2915
|
+
return st.cancel = tt, st.flush = Y, st;
|
|
2916
2916
|
}
|
|
2917
|
-
function
|
|
2917
|
+
function Bn(e) {
|
|
2918
2918
|
var t = typeof e;
|
|
2919
2919
|
return !!e && (t == "object" || t == "function");
|
|
2920
2920
|
}
|
|
2921
|
-
function
|
|
2921
|
+
function ea(e) {
|
|
2922
2922
|
return !!e && typeof e == "object";
|
|
2923
2923
|
}
|
|
2924
|
-
function
|
|
2925
|
-
return typeof e == "symbol" ||
|
|
2924
|
+
function na(e) {
|
|
2925
|
+
return typeof e == "symbol" || ea(e) && Js.call(e) == ks;
|
|
2926
2926
|
}
|
|
2927
|
-
function
|
|
2927
|
+
function wi(e) {
|
|
2928
2928
|
if (typeof e == "number")
|
|
2929
2929
|
return e;
|
|
2930
|
-
if (
|
|
2931
|
-
return
|
|
2932
|
-
if (
|
|
2930
|
+
if (na(e))
|
|
2931
|
+
return vi;
|
|
2932
|
+
if (Bn(e)) {
|
|
2933
2933
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
2934
|
-
e =
|
|
2934
|
+
e = Bn(t) ? t + "" : t;
|
|
2935
2935
|
}
|
|
2936
2936
|
if (typeof e != "string")
|
|
2937
2937
|
return e === 0 ? e : +e;
|
|
2938
|
-
e = e.replace(
|
|
2939
|
-
var n =
|
|
2940
|
-
return n ||
|
|
2941
|
-
}
|
|
2942
|
-
var
|
|
2943
|
-
const
|
|
2944
|
-
var
|
|
2945
|
-
class
|
|
2938
|
+
e = e.replace(Fs, "");
|
|
2939
|
+
var n = Zs.test(e);
|
|
2940
|
+
return n || zs.test(e) ? Xs(e.slice(2), n ? 2 : 8) : js.test(e) ? vi : +e;
|
|
2941
|
+
}
|
|
2942
|
+
var ia = ta;
|
|
2943
|
+
const co = /* @__PURE__ */ Ls(ia);
|
|
2944
|
+
var zt, me, ye, Ze, po, ze, Xe;
|
|
2945
|
+
class ho extends Q {
|
|
2946
2946
|
constructor() {
|
|
2947
2947
|
super();
|
|
2948
|
-
|
|
2948
|
+
T(this, Ze);
|
|
2949
2949
|
/**
|
|
2950
2950
|
* data input by the user
|
|
2951
2951
|
*
|
|
2952
2952
|
* @type {{[key: string]: any}}
|
|
2953
2953
|
*/
|
|
2954
|
-
|
|
2954
|
+
T(this, zt, {});
|
|
2955
2955
|
/**
|
|
2956
2956
|
* data input by the user
|
|
2957
2957
|
*
|
|
2958
2958
|
* @type {{[key: string]: any}}
|
|
2959
2959
|
*/
|
|
2960
|
-
|
|
2960
|
+
T(this, me, null);
|
|
2961
2961
|
/**
|
|
2962
2962
|
* Original tile url function, if it exist
|
|
2963
2963
|
*
|
|
2964
2964
|
* @type {Function}
|
|
2965
2965
|
*/
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.debouncedDataChange =
|
|
2966
|
+
T(this, ye);
|
|
2967
|
+
T(this, ze, "");
|
|
2968
|
+
T(this, Xe, "");
|
|
2969
|
+
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.debouncedDataChange = co(B(this, Ze, po), 1e3, {
|
|
2970
2970
|
leading: !0
|
|
2971
2971
|
});
|
|
2972
2972
|
}
|
|
@@ -2980,24 +2980,24 @@ class lo extends nt {
|
|
|
2980
2980
|
* Renders a JSON form for configuration options of a layer.
|
|
2981
2981
|
*/
|
|
2982
2982
|
render() {
|
|
2983
|
-
|
|
2983
|
+
Qt(this, me, Ps(this.layer, this.layerConfig)), customElements.get("eox-jsonform") || console.error("Please import @eox/jsonform in order to use layerconfig");
|
|
2984
2984
|
const n = {
|
|
2985
2985
|
disable_edit_json: !0,
|
|
2986
2986
|
disable_collapse: !0,
|
|
2987
2987
|
disable_properties: !0
|
|
2988
2988
|
};
|
|
2989
|
-
return
|
|
2989
|
+
return E`
|
|
2990
2990
|
<style>
|
|
2991
|
-
${
|
|
2992
|
-
${!this.unstyled &&
|
|
2991
|
+
${P(this, ze)}
|
|
2992
|
+
${!this.unstyled && P(this, Xe)}
|
|
2993
2993
|
</style>
|
|
2994
|
-
${
|
|
2994
|
+
${K(
|
|
2995
2995
|
this.layerConfig,
|
|
2996
|
-
() =>
|
|
2996
|
+
() => E`
|
|
2997
2997
|
<!-- Render a JSON form for layer configuration -->
|
|
2998
2998
|
<eox-jsonform
|
|
2999
2999
|
.schema=${this.layerConfig.schema}
|
|
3000
|
-
.value=${
|
|
3000
|
+
.value=${P(this, me)}
|
|
3001
3001
|
.options=${n}
|
|
3002
3002
|
@change=${this.debouncedDataChange}
|
|
3003
3003
|
></eox-jsonform>
|
|
@@ -3006,21 +3006,21 @@ class lo extends nt {
|
|
|
3006
3006
|
`;
|
|
3007
3007
|
}
|
|
3008
3008
|
}
|
|
3009
|
-
|
|
3009
|
+
zt = new WeakMap(), me = new WeakMap(), ye = new WeakMap(), Ze = new WeakSet(), /**
|
|
3010
3010
|
* Handles changes in eox-jsonform values.
|
|
3011
3011
|
*
|
|
3012
3012
|
* @param {{ detail: { value: string; }; }} e
|
|
3013
3013
|
*/
|
|
3014
|
-
|
|
3015
|
-
|
|
3014
|
+
po = function(n) {
|
|
3015
|
+
Qt(this, zt, n.detail), this.layerConfig.type === "style" || this.layerConfig.style ? "setStyle" in this.layer || "updateStyleVariables" in this.layer ? Bs(P(this, zt), this.layer, this.layerConfig) : console.error(
|
|
3016
3016
|
`Layer type ${this.layer.get("type") ?? ""} does not support styles configuration`
|
|
3017
|
-
) : (
|
|
3018
|
-
|
|
3019
|
-
|
|
3017
|
+
) : (Qt(this, ye, Hs(
|
|
3018
|
+
P(this, zt),
|
|
3019
|
+
P(this, ye),
|
|
3020
3020
|
this
|
|
3021
3021
|
)), this.requestUpdate());
|
|
3022
|
-
}, ze = new WeakMap(),
|
|
3023
|
-
|
|
3022
|
+
}, ze = new WeakMap(), Xe = new WeakMap(), // Define static properties for the component
|
|
3023
|
+
N(ho, "properties", {
|
|
3024
3024
|
layer: { attribute: !1 },
|
|
3025
3025
|
unstyled: { type: Boolean },
|
|
3026
3026
|
noShadow: { type: Boolean },
|
|
@@ -3028,15 +3028,88 @@ H(lo, "properties", {
|
|
|
3028
3028
|
});
|
|
3029
3029
|
customElements.define(
|
|
3030
3030
|
"eox-layercontrol-layerconfig",
|
|
3031
|
-
|
|
3031
|
+
ho
|
|
3032
3032
|
);
|
|
3033
|
-
var
|
|
3034
|
-
class
|
|
3033
|
+
var qe, go, Ye, We;
|
|
3034
|
+
class fo extends Q {
|
|
3035
|
+
constructor() {
|
|
3036
|
+
super();
|
|
3037
|
+
T(this, qe);
|
|
3038
|
+
T(this, Ye, "");
|
|
3039
|
+
T(this, We, "");
|
|
3040
|
+
this.unstyled = !1, this.noShadow = !1, this.layerDatetime = null, this.layer = null;
|
|
3041
|
+
}
|
|
3042
|
+
/**
|
|
3043
|
+
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
3044
|
+
*/
|
|
3045
|
+
createRenderRoot() {
|
|
3046
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
3047
|
+
}
|
|
3048
|
+
/**
|
|
3049
|
+
* Renders a Time Control for datetime options of a layer.
|
|
3050
|
+
*/
|
|
3051
|
+
render() {
|
|
3052
|
+
return customElements.get("eox-timecontrol") || console.error(
|
|
3053
|
+
"Please import @eox/timecontrol in order to use layerDatetime"
|
|
3054
|
+
), E`
|
|
3055
|
+
<style>
|
|
3056
|
+
${P(this, Ye)}
|
|
3057
|
+
${!this.unstyled && P(this, We)}
|
|
3058
|
+
</style>
|
|
3059
|
+
${K(
|
|
3060
|
+
this.layerDatetime,
|
|
3061
|
+
() => E`
|
|
3062
|
+
<!-- Render a Timecontrol for layer date time -->
|
|
3063
|
+
<eox-timecontrol
|
|
3064
|
+
?unstyled=${this.unstyled}
|
|
3065
|
+
.for=${void 0}
|
|
3066
|
+
.layer=${void 0}
|
|
3067
|
+
.slider=${this.layerDatetime.slider ?? !1}
|
|
3068
|
+
.disablePlay=${this.layerDatetime.disablePlay ?? !1}
|
|
3069
|
+
.controlValues=${this.layerDatetime.controlValues}
|
|
3070
|
+
.controlProperty=${void 0}
|
|
3071
|
+
current-step=${this.layerDatetime.currentStep}
|
|
3072
|
+
@stepchange=${B(this, qe, go)}
|
|
3073
|
+
></eox-timecontrol>
|
|
3074
|
+
`
|
|
3075
|
+
)}
|
|
3076
|
+
`;
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
qe = new WeakSet(), /**
|
|
3080
|
+
* Handles timecontrol Stepchange &
|
|
3081
|
+
* triggers `datetime:updated` event on step change
|
|
3082
|
+
*
|
|
3083
|
+
* @param {CustomEvent<{currentStep:string|number}>} evt
|
|
3084
|
+
**/
|
|
3085
|
+
go = function(n) {
|
|
3086
|
+
this.dispatchEvent(
|
|
3087
|
+
new CustomEvent("datetime:updated", {
|
|
3088
|
+
bubbles: !0,
|
|
3089
|
+
detail: {
|
|
3090
|
+
datetime: n.detail.currentStep,
|
|
3091
|
+
layer: this.layer
|
|
3092
|
+
}
|
|
3093
|
+
})
|
|
3094
|
+
), this.layerDatetime.currentStep = n.detail.currentStep, this.requestUpdate();
|
|
3095
|
+
}, Ye = new WeakMap(), We = new WeakMap(), // Define static properties for the component
|
|
3096
|
+
N(fo, "properties", {
|
|
3097
|
+
unstyled: { type: Boolean },
|
|
3098
|
+
noShadow: { type: Boolean },
|
|
3099
|
+
layerDatetime: { attribute: !1 },
|
|
3100
|
+
layer: { attribute: !1 }
|
|
3101
|
+
});
|
|
3102
|
+
customElements.define(
|
|
3103
|
+
"eox-layercontrol-layer-datetime",
|
|
3104
|
+
fo
|
|
3105
|
+
);
|
|
3106
|
+
var be, Ge, Je;
|
|
3107
|
+
class mo extends Q {
|
|
3035
3108
|
constructor() {
|
|
3036
3109
|
super();
|
|
3037
3110
|
/** @param {number} index */
|
|
3038
|
-
|
|
3039
|
-
|
|
3111
|
+
T(this, be, (n) => this.selectedTab === n && "highlighted");
|
|
3112
|
+
T(this, Ge, `
|
|
3040
3113
|
.tabbed figure {
|
|
3041
3114
|
margin: 0;
|
|
3042
3115
|
}
|
|
@@ -3057,7 +3130,7 @@ class co extends nt {
|
|
|
3057
3130
|
background: lightgrey;
|
|
3058
3131
|
}
|
|
3059
3132
|
`);
|
|
3060
|
-
|
|
3133
|
+
T(this, Je, `
|
|
3061
3134
|
.tabbed {
|
|
3062
3135
|
font-size: small;
|
|
3063
3136
|
}
|
|
@@ -3093,24 +3166,24 @@ class co extends nt {
|
|
|
3093
3166
|
*/
|
|
3094
3167
|
render() {
|
|
3095
3168
|
const n = this.tabs, i = this.actions, o = i.length + n.length > 1;
|
|
3096
|
-
return
|
|
3169
|
+
return E`
|
|
3097
3170
|
<style>
|
|
3098
|
-
${
|
|
3099
|
-
${!this.unstyled &&
|
|
3171
|
+
${P(this, Ge)}
|
|
3172
|
+
${!this.unstyled && P(this, Je)}
|
|
3100
3173
|
</style>
|
|
3101
3174
|
<div class="tabbed">
|
|
3102
3175
|
<!-- Navigation for tabs and actions -->
|
|
3103
|
-
${
|
|
3176
|
+
${K(
|
|
3104
3177
|
o,
|
|
3105
|
-
() =>
|
|
3178
|
+
() => E`
|
|
3106
3179
|
<nav>
|
|
3107
3180
|
<div>
|
|
3108
3181
|
<!-- Labels for tabs -->
|
|
3109
|
-
${
|
|
3182
|
+
${Ne(
|
|
3110
3183
|
n,
|
|
3111
|
-
(r, s) =>
|
|
3184
|
+
(r, s) => E`
|
|
3112
3185
|
<label
|
|
3113
|
-
class=${
|
|
3186
|
+
class=${P(this, be).call(this, s)}
|
|
3114
3187
|
@click=${() => this.selectedTab = s}
|
|
3115
3188
|
>
|
|
3116
3189
|
<!-- Customizable icon for each tab -->
|
|
@@ -3121,9 +3194,9 @@ class co extends nt {
|
|
|
3121
3194
|
</div>
|
|
3122
3195
|
<div>
|
|
3123
3196
|
<!-- Icons for actions -->
|
|
3124
|
-
${
|
|
3197
|
+
${Ne(
|
|
3125
3198
|
i,
|
|
3126
|
-
(r) =>
|
|
3199
|
+
(r) => E`
|
|
3127
3200
|
<span>
|
|
3128
3201
|
<!-- Customizable icon for each action -->
|
|
3129
3202
|
<slot name=${`${r}-icon`}>${r}</slot>
|
|
@@ -3136,10 +3209,10 @@ class co extends nt {
|
|
|
3136
3209
|
)}
|
|
3137
3210
|
<figure>
|
|
3138
3211
|
<!-- Content for each tab -->
|
|
3139
|
-
${
|
|
3212
|
+
${Ne(
|
|
3140
3213
|
n,
|
|
3141
|
-
(r, s) =>
|
|
3142
|
-
<div class="tab ${
|
|
3214
|
+
(r, s) => E`
|
|
3215
|
+
<div class="tab ${P(this, be).call(this, s)}">
|
|
3143
3216
|
<!-- Content slot for each tab -->
|
|
3144
3217
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
3145
3218
|
</div>
|
|
@@ -3150,16 +3223,16 @@ class co extends nt {
|
|
|
3150
3223
|
`;
|
|
3151
3224
|
}
|
|
3152
3225
|
}
|
|
3153
|
-
|
|
3154
|
-
|
|
3226
|
+
be = new WeakMap(), Ge = new WeakMap(), Je = new WeakMap(), // Define static properties for the component
|
|
3227
|
+
N(mo, "properties", {
|
|
3155
3228
|
actions: { attribute: !1 },
|
|
3156
3229
|
selectedTab: { state: !0 },
|
|
3157
3230
|
tabs: { attribute: !1 },
|
|
3158
3231
|
unstyled: { type: Boolean },
|
|
3159
3232
|
noShadow: { type: Boolean }
|
|
3160
3233
|
});
|
|
3161
|
-
customElements.define("eox-layercontrol-tabs",
|
|
3162
|
-
const
|
|
3234
|
+
customElements.define("eox-layercontrol-tabs", mo);
|
|
3235
|
+
const oa = `
|
|
3163
3236
|
button,
|
|
3164
3237
|
.button {
|
|
3165
3238
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -3283,7 +3356,7 @@ button.smallest.icon::before {
|
|
|
3283
3356
|
width: 16px;
|
|
3284
3357
|
padding: 0px;
|
|
3285
3358
|
}
|
|
3286
|
-
`,
|
|
3359
|
+
`, ra = `
|
|
3287
3360
|
input[type=radio] {
|
|
3288
3361
|
appearance: none;
|
|
3289
3362
|
-webkit-appearance: none;
|
|
@@ -3311,7 +3384,7 @@ input[type=radio]:checked:after {
|
|
|
3311
3384
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
3312
3385
|
|
|
3313
3386
|
}
|
|
3314
|
-
`,
|
|
3387
|
+
`, yo = `
|
|
3315
3388
|
input[type=checkbox] {
|
|
3316
3389
|
appearance: none;
|
|
3317
3390
|
-webkit-appearance: none;
|
|
@@ -3334,7 +3407,7 @@ input[type=checkbox]:checked:after {
|
|
|
3334
3407
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
3335
3408
|
|
|
3336
3409
|
}
|
|
3337
|
-
`,
|
|
3410
|
+
`, sa = `
|
|
3338
3411
|
input[type="range"] {
|
|
3339
3412
|
-webkit-appearance: none;
|
|
3340
3413
|
width: 90%;
|
|
@@ -3412,14 +3485,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
3412
3485
|
border: 0;
|
|
3413
3486
|
}
|
|
3414
3487
|
`;
|
|
3415
|
-
var
|
|
3416
|
-
class
|
|
3488
|
+
var Ke, Qe;
|
|
3489
|
+
class bo extends Q {
|
|
3417
3490
|
constructor() {
|
|
3418
3491
|
super();
|
|
3419
3492
|
// Initializes '_removeButton' invoking 'removeButton' function with 'this' context.
|
|
3420
|
-
|
|
3493
|
+
N(this, "_removeButton", () => Ms(this));
|
|
3421
3494
|
// Initializes '_sortButton' invoking 'sortButton' function with 'unstyled' property as a parameter.
|
|
3422
|
-
|
|
3495
|
+
N(this, "_sortButton", () => Ns(this.unstyled));
|
|
3423
3496
|
/**
|
|
3424
3497
|
* Initializes '_button' as a function accepting 'tool' parameter to generate a Button.
|
|
3425
3498
|
* Uses 'this.unstyled' as a context parameter for Button generation.
|
|
@@ -3427,13 +3500,13 @@ class po extends nt {
|
|
|
3427
3500
|
* @param {string} tool - Tool parameter for Button generation.
|
|
3428
3501
|
* @returns {import("lit").HTMLTemplateResult} - The generated Button element.
|
|
3429
3502
|
*/
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
${
|
|
3434
|
-
${
|
|
3435
|
-
${
|
|
3436
|
-
${
|
|
3503
|
+
N(this, "_button", (n) => Os(n, this.unstyled));
|
|
3504
|
+
T(this, Ke, "");
|
|
3505
|
+
T(this, Qe, `
|
|
3506
|
+
${oa}
|
|
3507
|
+
${ra}
|
|
3508
|
+
${yo}
|
|
3509
|
+
${sa}
|
|
3437
3510
|
.drag-handle {
|
|
3438
3511
|
cursor: n-resize;
|
|
3439
3512
|
}
|
|
@@ -3513,6 +3586,10 @@ class po extends nt {
|
|
|
3513
3586
|
button.icon[slot=config-icon]::before {
|
|
3514
3587
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Etune%3C/title%3E%3Cpath d='M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z' /%3E%3C/svg%3E");
|
|
3515
3588
|
}
|
|
3589
|
+
details.tools summary .datetime-icon,
|
|
3590
|
+
button.icon[slot=datetime-icon]::before {
|
|
3591
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eclock-outline%3C/title%3E%3Cpath d='M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z' /%3E%3C/svg%3E");
|
|
3592
|
+
}
|
|
3516
3593
|
.single-action .remove-icon::before,
|
|
3517
3594
|
[slot=remove-icon] button.icon::before {
|
|
3518
3595
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ff0000' viewBox='0 0 24 24'%3E%3Ctitle%3Edelete-outline%3C/title%3E%3Cpath d='M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z' /%3E%3C/svg%3E");
|
|
@@ -3536,28 +3613,28 @@ class po extends nt {
|
|
|
3536
3613
|
}
|
|
3537
3614
|
render() {
|
|
3538
3615
|
var l;
|
|
3539
|
-
const n =
|
|
3616
|
+
const n = Ds(this.tools, this.layer), i = Rs(this.tools, this.layer), o = this[`_${n == null ? void 0 : n[0]}Button`] ? (
|
|
3540
3617
|
// @ts-ignore
|
|
3541
3618
|
this[`_${n == null ? void 0 : n[0]}Button`]()
|
|
3542
3619
|
) : C, r = ((l = this.tools) == null ? void 0 : l.length) === 1 ? `${this.tools[0]}-icon` : "", s = n == null ? void 0 : n.length, a = i == null ? void 0 : i.length;
|
|
3543
|
-
return
|
|
3620
|
+
return E`
|
|
3544
3621
|
<style>
|
|
3545
|
-
${
|
|
3546
|
-
${!this.unstyled &&
|
|
3622
|
+
${P(this, Ke)}
|
|
3623
|
+
${!this.unstyled && P(this, Qe)}
|
|
3547
3624
|
</style>
|
|
3548
|
-
${
|
|
3625
|
+
${K(
|
|
3549
3626
|
s + a > 0,
|
|
3550
|
-
() =>
|
|
3551
|
-
${
|
|
3627
|
+
() => E`
|
|
3628
|
+
${K(
|
|
3552
3629
|
s === 1 && a === 0,
|
|
3553
|
-
() =>
|
|
3630
|
+
() => E`
|
|
3554
3631
|
<div class="single-action-container">
|
|
3555
3632
|
<div class="single-action">${o}</div>
|
|
3556
3633
|
</div>
|
|
3557
3634
|
`,
|
|
3558
3635
|
() => {
|
|
3559
3636
|
var u;
|
|
3560
|
-
return
|
|
3637
|
+
return E`
|
|
3561
3638
|
<details
|
|
3562
3639
|
class="tools"
|
|
3563
3640
|
open=${this.layer.get("layerControlToolsExpand") || C}
|
|
@@ -3572,10 +3649,10 @@ class po extends nt {
|
|
|
3572
3649
|
.unstyled=${this.unstyled}
|
|
3573
3650
|
>
|
|
3574
3651
|
<!-- Rendering tabs and content -->
|
|
3575
|
-
${
|
|
3652
|
+
${Ne(i, (c) => this._button(c))}
|
|
3576
3653
|
|
|
3577
3654
|
<div slot="info-content">
|
|
3578
|
-
${
|
|
3655
|
+
${Is(this.layer.get("description"))}
|
|
3579
3656
|
</div>
|
|
3580
3657
|
<div slot="opacity-content">
|
|
3581
3658
|
<!-- Input for opacity -->
|
|
@@ -3584,15 +3661,15 @@ class po extends nt {
|
|
|
3584
3661
|
min="0"
|
|
3585
3662
|
max="1"
|
|
3586
3663
|
step="0.01"
|
|
3587
|
-
value=${
|
|
3588
|
-
@input=${(
|
|
3664
|
+
value=${lo((u = this.layer) == null ? void 0 : u.getOpacity())}
|
|
3665
|
+
@input=${(c) => this.layer.setOpacity(parseFloat(c.target.value))}
|
|
3589
3666
|
/>
|
|
3590
3667
|
</div>
|
|
3591
3668
|
<div slot="config-content">
|
|
3592
3669
|
<!-- Layer configuration -->
|
|
3593
|
-
${
|
|
3670
|
+
${K(
|
|
3594
3671
|
this.layer.get("layerConfig"),
|
|
3595
|
-
() =>
|
|
3672
|
+
() => E`
|
|
3596
3673
|
<eox-layercontrol-layerconfig
|
|
3597
3674
|
slot="config-content"
|
|
3598
3675
|
.layer=${this.layer}
|
|
@@ -3602,6 +3679,22 @@ class po extends nt {
|
|
|
3602
3679
|
@changed=${() => this.requestUpdate()}
|
|
3603
3680
|
></eox-layercontrol-layerconfig>
|
|
3604
3681
|
`
|
|
3682
|
+
)}
|
|
3683
|
+
</div>
|
|
3684
|
+
<div slot="datetime-content">
|
|
3685
|
+
<!-- Layer datetime -->
|
|
3686
|
+
${K(
|
|
3687
|
+
this.layer.get("layerDatetime"),
|
|
3688
|
+
() => E`
|
|
3689
|
+
<eox-layercontrol-layer-datetime
|
|
3690
|
+
slot="datetime-content"
|
|
3691
|
+
.noShadow=${!0}
|
|
3692
|
+
.layerDatetime=${this.layer.get("layerDatetime")}
|
|
3693
|
+
.layer=${this.layer}
|
|
3694
|
+
.unstyled=${this.unstyled}
|
|
3695
|
+
@changed=${() => this.requestUpdate()}
|
|
3696
|
+
></eox-layercontrol-layer-datetime>
|
|
3697
|
+
`
|
|
3605
3698
|
)}
|
|
3606
3699
|
</div>
|
|
3607
3700
|
<div slot="remove-icon">${this._removeButton()}</div>
|
|
@@ -3616,8 +3709,8 @@ class po extends nt {
|
|
|
3616
3709
|
`;
|
|
3617
3710
|
}
|
|
3618
3711
|
}
|
|
3619
|
-
|
|
3620
|
-
|
|
3712
|
+
Ke = new WeakMap(), Qe = new WeakMap(), // Define static properties for the component
|
|
3713
|
+
N(bo, "properties", {
|
|
3621
3714
|
layer: { attribute: !1 },
|
|
3622
3715
|
tools: { attribute: !1 },
|
|
3623
3716
|
unstyled: { type: Boolean },
|
|
@@ -3625,11 +3718,11 @@ H(po, "properties", {
|
|
|
3625
3718
|
});
|
|
3626
3719
|
customElements.define(
|
|
3627
3720
|
"eox-layercontrol-layer-tools",
|
|
3628
|
-
|
|
3721
|
+
bo
|
|
3629
3722
|
);
|
|
3630
|
-
const
|
|
3723
|
+
const aa = (e) => {
|
|
3631
3724
|
const t = () => {
|
|
3632
|
-
const n =
|
|
3725
|
+
const n = Cs(
|
|
3633
3726
|
e.layer,
|
|
3634
3727
|
e.map,
|
|
3635
3728
|
e.showLayerZoomState
|
|
@@ -3639,11 +3732,11 @@ const ea = (e) => {
|
|
|
3639
3732
|
new CustomEvent("change:resolution", { bubbles: !0 })
|
|
3640
3733
|
));
|
|
3641
3734
|
};
|
|
3642
|
-
|
|
3735
|
+
ro(
|
|
3643
3736
|
e.layer,
|
|
3644
3737
|
e.showLayerZoomState
|
|
3645
3738
|
) && (t(), e.map.getView().on("change:resolution", () => t()));
|
|
3646
|
-
},
|
|
3739
|
+
}, la = (e, t) => {
|
|
3647
3740
|
const n = t.layer;
|
|
3648
3741
|
n.setVisible(e.target.checked), e.target.checked && n.get("layerControlExclusive") && t.closest(
|
|
3649
3742
|
".layers > ul"
|
|
@@ -3654,20 +3747,20 @@ const ea = (e) => {
|
|
|
3654
3747
|
new CustomEvent("changed", { bubbles: !0, detail: n })
|
|
3655
3748
|
), t.requestUpdate();
|
|
3656
3749
|
};
|
|
3657
|
-
var Ct,
|
|
3658
|
-
class
|
|
3750
|
+
var Ct, Ie, wo, tn, en;
|
|
3751
|
+
class vo extends Q {
|
|
3659
3752
|
constructor() {
|
|
3660
3753
|
super();
|
|
3661
|
-
|
|
3754
|
+
T(this, Ct);
|
|
3662
3755
|
/**
|
|
3663
3756
|
* Represents the current layer visibility based on zoom level.
|
|
3664
3757
|
*
|
|
3665
3758
|
* @type {Boolean}
|
|
3666
3759
|
*/
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
${
|
|
3760
|
+
N(this, "currLayerVisibilityBasedOnZoom", !0);
|
|
3761
|
+
T(this, tn, "");
|
|
3762
|
+
T(this, en, `
|
|
3763
|
+
${yo}
|
|
3671
3764
|
eox-layercontrol-layer {
|
|
3672
3765
|
width: 100%;
|
|
3673
3766
|
}
|
|
@@ -3721,7 +3814,7 @@ class fo extends nt {
|
|
|
3721
3814
|
* and register "change:resolution" ones at the beginning if `showLayerZoomState` is present
|
|
3722
3815
|
*/
|
|
3723
3816
|
firstUpdated() {
|
|
3724
|
-
|
|
3817
|
+
aa(this);
|
|
3725
3818
|
}
|
|
3726
3819
|
/**
|
|
3727
3820
|
* Renders layer controls and tools with conditional display based on certain properties.
|
|
@@ -3730,30 +3823,30 @@ class fo extends nt {
|
|
|
3730
3823
|
*/
|
|
3731
3824
|
render() {
|
|
3732
3825
|
var l;
|
|
3733
|
-
const n = this.layer.getVisible(), i = n ? "visible" : "", o = this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible", r =
|
|
3734
|
-
return
|
|
3826
|
+
const n = this.layer.getVisible(), i = n ? "visible" : "", o = this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible", r = B(this, Ct, Ie).call(this, "layerControlDisable") ? "disabled" : "", s = B(this, Ct, Ie).call(this, "layerControlExclusive") ? "radio" : "checkbox", a = ((l = this.tools) == null ? void 0 : l.length) > 0;
|
|
3827
|
+
return E`
|
|
3735
3828
|
<style>
|
|
3736
|
-
${
|
|
3737
|
-
${!this.unstyled &&
|
|
3829
|
+
${P(this, tn)}
|
|
3830
|
+
${!this.unstyled && P(this, en)}
|
|
3738
3831
|
</style>
|
|
3739
|
-
${
|
|
3832
|
+
${K(
|
|
3740
3833
|
this.layer,
|
|
3741
|
-
() =>
|
|
3834
|
+
() => E`
|
|
3742
3835
|
<!-- Render the layer -->
|
|
3743
3836
|
<div class="layer ${i} ${o}">
|
|
3744
3837
|
<label class="drag-handle ${r}">
|
|
3745
3838
|
<!-- Input element for layer visibility -->
|
|
3746
3839
|
<input
|
|
3747
3840
|
type=${s}
|
|
3748
|
-
.checked=${
|
|
3749
|
-
@click=${
|
|
3841
|
+
.checked=${lo(n)}
|
|
3842
|
+
@click=${B(this, Ct, wo)}
|
|
3750
3843
|
/>
|
|
3751
3844
|
|
|
3752
3845
|
<!-- Layer title -->
|
|
3753
|
-
<span class="title">${
|
|
3754
|
-
${
|
|
3846
|
+
<span class="title">${B(this, Ct, Ie).call(this, this.titleProperty)}</span>
|
|
3847
|
+
${K(
|
|
3755
3848
|
a,
|
|
3756
|
-
() =>
|
|
3849
|
+
() => E`<span class="tools-placeholder"></span>`
|
|
3757
3850
|
)}
|
|
3758
3851
|
</label>
|
|
3759
3852
|
</div>
|
|
@@ -3776,7 +3869,7 @@ Ct = new WeakSet(), /**
|
|
|
3776
3869
|
* @param {string} key - The key for the layer property.
|
|
3777
3870
|
* @returns {any} - The value of the layer property if exists, otherwise undefined.
|
|
3778
3871
|
*/
|
|
3779
|
-
|
|
3872
|
+
Ie = function(n) {
|
|
3780
3873
|
var i;
|
|
3781
3874
|
return (i = this.layer) == null ? void 0 : i.get(n);
|
|
3782
3875
|
}, /**
|
|
@@ -3784,10 +3877,10 @@ Ne = function(n) {
|
|
|
3784
3877
|
*
|
|
3785
3878
|
* @param {{target: { checked: boolean }}} evt - The input change event.
|
|
3786
3879
|
*/
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
},
|
|
3790
|
-
|
|
3880
|
+
wo = function(n) {
|
|
3881
|
+
la(n, this);
|
|
3882
|
+
}, tn = new WeakMap(), en = new WeakMap(), // Define static properties for the component
|
|
3883
|
+
N(vo, "properties", {
|
|
3791
3884
|
layer: { attribute: !1 },
|
|
3792
3885
|
map: { attribute: !1, state: !0 },
|
|
3793
3886
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -3796,13 +3889,13 @@ H(fo, "properties", {
|
|
|
3796
3889
|
unstyled: { type: Boolean },
|
|
3797
3890
|
noShadow: { type: Boolean }
|
|
3798
3891
|
});
|
|
3799
|
-
customElements.define("eox-layercontrol-layer",
|
|
3800
|
-
var
|
|
3801
|
-
class
|
|
3892
|
+
customElements.define("eox-layercontrol-layer", vo);
|
|
3893
|
+
var nn, on;
|
|
3894
|
+
class Eo extends Q {
|
|
3802
3895
|
constructor() {
|
|
3803
3896
|
super();
|
|
3804
|
-
|
|
3805
|
-
|
|
3897
|
+
T(this, nn, "");
|
|
3898
|
+
T(this, on, `
|
|
3806
3899
|
details summary {
|
|
3807
3900
|
cursor: pointer;
|
|
3808
3901
|
display: flex;
|
|
@@ -3842,17 +3935,17 @@ class mo extends nt {
|
|
|
3842
3935
|
*/
|
|
3843
3936
|
render() {
|
|
3844
3937
|
var o, r;
|
|
3845
|
-
const n = !!((o = this.group) != null && o.get("layerControlExpand")), i = (r =
|
|
3938
|
+
const n = !!((o = this.group) != null && o.get("layerControlExpand")), i = (r = ao(
|
|
3846
3939
|
this.group.getLayers()
|
|
3847
3940
|
)) == null ? void 0 : r.length;
|
|
3848
|
-
return
|
|
3941
|
+
return E`
|
|
3849
3942
|
<style>
|
|
3850
|
-
${
|
|
3851
|
-
${!this.unstyled &&
|
|
3943
|
+
${P(this, nn)}
|
|
3944
|
+
${!this.unstyled && P(this, on)}
|
|
3852
3945
|
</style>
|
|
3853
|
-
${
|
|
3946
|
+
${K(
|
|
3854
3947
|
this.group,
|
|
3855
|
-
() =>
|
|
3948
|
+
() => E`
|
|
3856
3949
|
<!-- Render the details element with the layer control -->
|
|
3857
3950
|
<details
|
|
3858
3951
|
open=${n || C}
|
|
@@ -3890,8 +3983,8 @@ class mo extends nt {
|
|
|
3890
3983
|
`;
|
|
3891
3984
|
}
|
|
3892
3985
|
}
|
|
3893
|
-
|
|
3894
|
-
|
|
3986
|
+
nn = new WeakMap(), on = new WeakMap(), // Define static properties for the component
|
|
3987
|
+
N(Eo, "properties", {
|
|
3895
3988
|
group: { attribute: !1 },
|
|
3896
3989
|
idProperty: { attribute: "id-property" },
|
|
3897
3990
|
map: { attribute: !1, state: !0 },
|
|
@@ -3903,30 +3996,30 @@ H(mo, "properties", {
|
|
|
3903
3996
|
});
|
|
3904
3997
|
customElements.define(
|
|
3905
3998
|
"eox-layercontrol-layer-group",
|
|
3906
|
-
|
|
3999
|
+
Eo
|
|
3907
4000
|
);
|
|
3908
|
-
const
|
|
3909
|
-
const { layers: t, idProperty: n, titleProperty: i, renderRoot: o } = e, r =
|
|
4001
|
+
const ua = (e) => {
|
|
4002
|
+
const { layers: t, idProperty: n, titleProperty: i, renderRoot: o } = e, r = co(() => {
|
|
3910
4003
|
e.requestUpdate(), e.dispatchEvent(
|
|
3911
4004
|
new CustomEvent("changed", { bubbles: !0 })
|
|
3912
4005
|
);
|
|
3913
4006
|
}, 50), s = () => r();
|
|
3914
4007
|
if (t && (t.hasListener("change:length") && (t == null || t.un("change:length", s)), t.on("change:length", s), t)) {
|
|
3915
4008
|
const a = o.querySelector("ul");
|
|
3916
|
-
|
|
4009
|
+
As(
|
|
3917
4010
|
t,
|
|
3918
4011
|
n,
|
|
3919
4012
|
i,
|
|
3920
4013
|
e
|
|
3921
|
-
),
|
|
4014
|
+
), _s(a, t, n, e);
|
|
3922
4015
|
}
|
|
3923
4016
|
};
|
|
3924
|
-
var
|
|
3925
|
-
class
|
|
4017
|
+
var rn, sn;
|
|
4018
|
+
class xo extends Q {
|
|
3926
4019
|
constructor() {
|
|
3927
4020
|
super();
|
|
3928
|
-
|
|
3929
|
-
|
|
4021
|
+
T(this, rn, "");
|
|
4022
|
+
T(this, sn, `
|
|
3930
4023
|
ul {
|
|
3931
4024
|
padding: 0;
|
|
3932
4025
|
margin: 0;
|
|
@@ -3961,7 +4054,7 @@ class yo extends nt {
|
|
|
3961
4054
|
* Executes specific logic after the initial render of the component.
|
|
3962
4055
|
*/
|
|
3963
4056
|
firstUpdated() {
|
|
3964
|
-
|
|
4057
|
+
ua(this);
|
|
3965
4058
|
}
|
|
3966
4059
|
/**
|
|
3967
4060
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -3974,27 +4067,27 @@ class yo extends nt {
|
|
|
3974
4067
|
* layer groups or individual layers accordingly. Utilizes conditional rendering and iterates through available layers.
|
|
3975
4068
|
*/
|
|
3976
4069
|
render() {
|
|
3977
|
-
const n = this.layers ?
|
|
3978
|
-
return
|
|
4070
|
+
const n = this.layers ? ao(this.layers).reverse() : [];
|
|
4071
|
+
return E`
|
|
3979
4072
|
<style>
|
|
3980
|
-
${
|
|
3981
|
-
${!this.unstyled &&
|
|
4073
|
+
${P(this, rn)}
|
|
4074
|
+
${!this.unstyled && P(this, sn)}
|
|
3982
4075
|
</style>
|
|
3983
4076
|
<ul>
|
|
3984
|
-
${
|
|
4077
|
+
${K(
|
|
3985
4078
|
this.layers,
|
|
3986
|
-
() =>
|
|
3987
|
-
${
|
|
4079
|
+
() => E`
|
|
4080
|
+
${er(
|
|
3988
4081
|
n,
|
|
3989
4082
|
(i) => i,
|
|
3990
|
-
(i) =>
|
|
4083
|
+
(i) => E`
|
|
3991
4084
|
<li
|
|
3992
4085
|
data-layer="${i.get(this.idProperty)}"
|
|
3993
|
-
data-type="${
|
|
4086
|
+
data-type="${Ts(i, this.map)}"
|
|
3994
4087
|
>
|
|
3995
4088
|
${/** Checks if the layer is a group or individual layer and renders accordingly */
|
|
3996
4089
|
/** @type {import("ol/layer").Group} */
|
|
3997
|
-
i.getLayers ?
|
|
4090
|
+
i.getLayers ? E`
|
|
3998
4091
|
<eox-layercontrol-layer-group
|
|
3999
4092
|
.noShadow=${!0}
|
|
4000
4093
|
.group=${i}
|
|
@@ -4007,7 +4100,7 @@ class yo extends nt {
|
|
|
4007
4100
|
@changed=${() => this.requestUpdate()}
|
|
4008
4101
|
>
|
|
4009
4102
|
</eox-layercontrol-layer-group>
|
|
4010
|
-
` :
|
|
4103
|
+
` : E`
|
|
4011
4104
|
<eox-layercontrol-layer
|
|
4012
4105
|
.noShadow=${!0}
|
|
4013
4106
|
.layer=${i}
|
|
@@ -4028,8 +4121,8 @@ class yo extends nt {
|
|
|
4028
4121
|
`;
|
|
4029
4122
|
}
|
|
4030
4123
|
}
|
|
4031
|
-
|
|
4032
|
-
|
|
4124
|
+
rn = new WeakMap(), sn = new WeakMap(), // Define static properties for the component
|
|
4125
|
+
N(xo, "properties", {
|
|
4033
4126
|
idProperty: { attribute: "id-property" },
|
|
4034
4127
|
layers: { attribute: !1 },
|
|
4035
4128
|
map: { attribute: !1, state: !0 },
|
|
@@ -4039,11 +4132,11 @@ H(yo, "properties", {
|
|
|
4039
4132
|
unstyled: { type: Boolean },
|
|
4040
4133
|
noShadow: { type: Boolean }
|
|
4041
4134
|
});
|
|
4042
|
-
customElements.define("eox-layercontrol-layer-list",
|
|
4043
|
-
const
|
|
4135
|
+
customElements.define("eox-layercontrol-layer-list", xo);
|
|
4136
|
+
const da = (e) => {
|
|
4044
4137
|
const t = e.querySelector(
|
|
4045
4138
|
"select[name=optional]"
|
|
4046
|
-
), n = t ? t.value : null, i =
|
|
4139
|
+
), n = t ? t.value : null, i = Wn(
|
|
4047
4140
|
e.layers.getArray(),
|
|
4048
4141
|
"layerControlOptional",
|
|
4049
4142
|
!0
|
|
@@ -4062,11 +4155,11 @@ const oa = (e) => {
|
|
|
4062
4155
|
)
|
|
4063
4156
|
), e.requestUpdate();
|
|
4064
4157
|
};
|
|
4065
|
-
var
|
|
4066
|
-
class
|
|
4158
|
+
var an, $o;
|
|
4159
|
+
class So extends Q {
|
|
4067
4160
|
constructor() {
|
|
4068
4161
|
super();
|
|
4069
|
-
|
|
4162
|
+
T(this, an);
|
|
4070
4163
|
this.idProperty = "id", this.layers = null, this.titleProperty = "title", this.unstyled = !1, this.noShadow = !1;
|
|
4071
4164
|
}
|
|
4072
4165
|
/**
|
|
@@ -4081,12 +4174,12 @@ class bo extends nt {
|
|
|
4081
4174
|
* Generates dropdown options based on the extracted layer information.
|
|
4082
4175
|
*/
|
|
4083
4176
|
render() {
|
|
4084
|
-
const n =
|
|
4177
|
+
const n = Wn(
|
|
4085
4178
|
this.layers.getArray(),
|
|
4086
4179
|
"layerControlOptional",
|
|
4087
4180
|
!0
|
|
4088
4181
|
);
|
|
4089
|
-
return
|
|
4182
|
+
return E`
|
|
4090
4183
|
<!-- Label for the dropdown -->
|
|
4091
4184
|
<label for="optional">Optional layers</label>
|
|
4092
4185
|
|
|
@@ -4100,23 +4193,23 @@ class bo extends nt {
|
|
|
4100
4193
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
4101
4194
|
${n.map((i) => {
|
|
4102
4195
|
const o = i.get(this.idProperty) || i.ol_uid, r = i.get(this.titleProperty), s = `layer ${i.get(this.idProperty)}`;
|
|
4103
|
-
return
|
|
4196
|
+
return E` <option value="${o}">${r || s}</option> `;
|
|
4104
4197
|
})}
|
|
4105
4198
|
</select>
|
|
4106
4199
|
|
|
4107
4200
|
<!-- Button to handle adding layers -->
|
|
4108
|
-
<button @click="${
|
|
4201
|
+
<button @click="${B(this, an, $o)}">add</button>
|
|
4109
4202
|
`;
|
|
4110
4203
|
}
|
|
4111
4204
|
}
|
|
4112
|
-
|
|
4205
|
+
an = new WeakSet(), /**
|
|
4113
4206
|
* Handles the addition of selected layers to a list.
|
|
4114
4207
|
* Invokes the 'addToListMethod' with the current context.
|
|
4115
4208
|
*/
|
|
4116
|
-
|
|
4117
|
-
|
|
4209
|
+
$o = function() {
|
|
4210
|
+
da(this);
|
|
4118
4211
|
}, // Define static properties for the component
|
|
4119
|
-
|
|
4212
|
+
N(So, "properties", {
|
|
4120
4213
|
idProperty: { attribute: "id-property" },
|
|
4121
4214
|
layers: { attribute: !1 },
|
|
4122
4215
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -4125,27 +4218,27 @@ H(bo, "properties", {
|
|
|
4125
4218
|
});
|
|
4126
4219
|
customElements.define(
|
|
4127
4220
|
"eox-layercontrol-optional-list",
|
|
4128
|
-
|
|
4221
|
+
So
|
|
4129
4222
|
);
|
|
4130
|
-
const
|
|
4223
|
+
const ca = (e, t) => {
|
|
4131
4224
|
t.jsonInput = e.target.value, t.requestUpdate();
|
|
4132
|
-
},
|
|
4225
|
+
}, Ei = (e) => {
|
|
4133
4226
|
const t = JSON.parse(
|
|
4134
|
-
`{"data":${
|
|
4227
|
+
`{"data":${Zi(e.jsonInput)}}`
|
|
4135
4228
|
);
|
|
4136
4229
|
Array.isArray(t.data) ? t.data.forEach((n) => {
|
|
4137
4230
|
e.eoxMap.addOrUpdateLayer(n);
|
|
4138
4231
|
}) : e.eoxMap.addOrUpdateLayer(t.data), e.jsonInput = null, e.requestUpdate();
|
|
4139
|
-
},
|
|
4232
|
+
}, ha = (e, t) => {
|
|
4140
4233
|
t.urlInput = e.target.value, t.requestUpdate();
|
|
4141
4234
|
};
|
|
4142
|
-
async function
|
|
4235
|
+
async function pa(e) {
|
|
4143
4236
|
const t = e.urlInput;
|
|
4144
4237
|
if (e.wmsCapabilities = null, e.searchLoad = !0, e.requestUpdate(), !t) return !1;
|
|
4145
|
-
if (
|
|
4238
|
+
if (zn(t) === "XYZ")
|
|
4146
4239
|
return { Name: t };
|
|
4147
4240
|
try {
|
|
4148
|
-
const n = await
|
|
4241
|
+
const n = await qr(t);
|
|
4149
4242
|
e.wmsCapabilities = n;
|
|
4150
4243
|
} catch {
|
|
4151
4244
|
} finally {
|
|
@@ -4153,8 +4246,8 @@ async function aa(e) {
|
|
|
4153
4246
|
}
|
|
4154
4247
|
return !1;
|
|
4155
4248
|
}
|
|
4156
|
-
const
|
|
4157
|
-
const { Name: n } = e, i =
|
|
4249
|
+
const fa = (e, t) => {
|
|
4250
|
+
const { Name: n } = e, i = zn(t.urlInput) || "XYZ", o = {
|
|
4158
4251
|
type: "Tile",
|
|
4159
4252
|
properties: {
|
|
4160
4253
|
id: n,
|
|
@@ -4172,45 +4265,45 @@ const la = (e, t) => {
|
|
|
4172
4265
|
}
|
|
4173
4266
|
};
|
|
4174
4267
|
t.jsonInput = JSON.stringify(o);
|
|
4175
|
-
},
|
|
4268
|
+
}, ga = (e, t) => {
|
|
4176
4269
|
t.open = e || null, t.urlInput = null, t.jsonInput = null, t.wmsCapabilities = null, t.requestUpdate();
|
|
4177
4270
|
};
|
|
4178
|
-
var F,
|
|
4179
|
-
class
|
|
4271
|
+
var F, Ao, Co, Vn, To, Po, He, ln, un;
|
|
4272
|
+
class _o extends Q {
|
|
4180
4273
|
constructor() {
|
|
4181
4274
|
super();
|
|
4182
|
-
|
|
4275
|
+
T(this, F);
|
|
4183
4276
|
/**
|
|
4184
4277
|
* State for URL Input for WMS/XYZ URLs
|
|
4185
4278
|
*
|
|
4186
4279
|
* @type {String}
|
|
4187
4280
|
*/
|
|
4188
|
-
|
|
4281
|
+
N(this, "urlInput", null);
|
|
4189
4282
|
/**
|
|
4190
4283
|
* State for JSON Textarea - For EOxMap JSON
|
|
4191
4284
|
*
|
|
4192
4285
|
* @type {String}
|
|
4193
4286
|
*/
|
|
4194
|
-
|
|
4287
|
+
N(this, "jsonInput", null);
|
|
4195
4288
|
/**
|
|
4196
4289
|
* State for add layer - consist of url/json
|
|
4197
4290
|
*
|
|
4198
4291
|
* @type {"url" | "json" | null}
|
|
4199
4292
|
*/
|
|
4200
|
-
|
|
4293
|
+
N(this, "open", null);
|
|
4201
4294
|
/**
|
|
4202
4295
|
* Loader state when search is triggered
|
|
4203
4296
|
*
|
|
4204
4297
|
* @type {Boolean}
|
|
4205
4298
|
*/
|
|
4206
|
-
|
|
4299
|
+
N(this, "searchLoad", !1);
|
|
4207
4300
|
/**
|
|
4208
4301
|
* State for `WMS Capabilities JSON`
|
|
4209
4302
|
*
|
|
4210
4303
|
* @type {import("wms-capabilities").WMSCapabilitiesJSON}
|
|
4211
4304
|
*/
|
|
4212
|
-
|
|
4213
|
-
|
|
4305
|
+
N(this, "wmsCapabilities", null);
|
|
4306
|
+
T(this, ln, `
|
|
4214
4307
|
.eox-add-layer-main .open {
|
|
4215
4308
|
position: relative;
|
|
4216
4309
|
}
|
|
@@ -4218,7 +4311,7 @@ class wo extends nt {
|
|
|
4218
4311
|
display: none;
|
|
4219
4312
|
}
|
|
4220
4313
|
`);
|
|
4221
|
-
|
|
4314
|
+
T(this, un, `
|
|
4222
4315
|
.eox-add {
|
|
4223
4316
|
background: #f0f2f5;
|
|
4224
4317
|
border-top: 1px solid #0041701a;
|
|
@@ -4367,24 +4460,24 @@ class wo extends nt {
|
|
|
4367
4460
|
* Handles input fields, search, and addition of layers.
|
|
4368
4461
|
*/
|
|
4369
4462
|
render() {
|
|
4370
|
-
const n = this.open ? "open" : "close", i = this.open === "url", o = this.open === "json", r = !
|
|
4371
|
-
return
|
|
4463
|
+
const n = this.open ? "open" : "close", i = this.open === "url", o = this.open === "json", r = !Yr(this.urlInput) || this.searchLoad ? !0 : C;
|
|
4464
|
+
return E`
|
|
4372
4465
|
<style>
|
|
4373
|
-
${
|
|
4374
|
-
${!this.unstyled &&
|
|
4466
|
+
${P(this, ln)}
|
|
4467
|
+
${!this.unstyled && P(this, un)}
|
|
4375
4468
|
</style>
|
|
4376
4469
|
<div class="eox-add-layer-main">
|
|
4377
4470
|
<div class="eox-add-layer-col">
|
|
4378
4471
|
<!-- Tabbed interface for URL and JSON -->
|
|
4379
4472
|
<ul class="eox-add-layer-tab ${n}">
|
|
4380
4473
|
<li
|
|
4381
|
-
@click=${() =>
|
|
4474
|
+
@click=${() => B(this, F, He).call(this, "url")}
|
|
4382
4475
|
class="${i ? "active" : ""}"
|
|
4383
4476
|
>
|
|
4384
4477
|
URL
|
|
4385
4478
|
</li>
|
|
4386
4479
|
<li
|
|
4387
|
-
@click=${() =>
|
|
4480
|
+
@click=${() => B(this, F, He).call(this, "json")}
|
|
4388
4481
|
class="${o ? "active" : ""}"
|
|
4389
4482
|
>
|
|
4390
4483
|
JSON
|
|
@@ -4394,13 +4487,13 @@ class wo extends nt {
|
|
|
4394
4487
|
<!-- Button to toggle tabs -->
|
|
4395
4488
|
<button
|
|
4396
4489
|
class="add-icon icon"
|
|
4397
|
-
@click=${() =>
|
|
4490
|
+
@click=${() => B(this, F, He).call(this, this.open ? null : "url")}
|
|
4398
4491
|
>
|
|
4399
4492
|
${this.unstyled ? "Add Layer" : ""}
|
|
4400
4493
|
</button>
|
|
4401
4494
|
</div>
|
|
4402
4495
|
<div class="eox-add ${n}">
|
|
4403
|
-
${i ?
|
|
4496
|
+
${i ? E`
|
|
4404
4497
|
<!-- Input field for URL -->
|
|
4405
4498
|
<div class="eox-add-layer-col">
|
|
4406
4499
|
<input
|
|
@@ -4408,25 +4501,25 @@ class wo extends nt {
|
|
|
4408
4501
|
class="add-url"
|
|
4409
4502
|
placeholder="Add URL (WMS/XYZ)"
|
|
4410
4503
|
.value="${this.urlInput}"
|
|
4411
|
-
@input=${
|
|
4504
|
+
@input=${B(this, F, Ao)}
|
|
4412
4505
|
>
|
|
4413
4506
|
</input>
|
|
4414
4507
|
<!-- Search button for URL -->
|
|
4415
4508
|
<button
|
|
4416
4509
|
class="search-icon"
|
|
4417
4510
|
disabled=${r}
|
|
4418
|
-
@click=${
|
|
4511
|
+
@click=${B(this, F, Co)}
|
|
4419
4512
|
>
|
|
4420
4513
|
${this.unstyled ? "Search" : ""}
|
|
4421
4514
|
</button>
|
|
4422
4515
|
</div>
|
|
4423
4516
|
|
|
4424
4517
|
<!-- Display layers for WMS capabilities -->
|
|
4425
|
-
${this.wmsCapabilities ?
|
|
4518
|
+
${this.wmsCapabilities ? E`<ul class="search-lists">
|
|
4426
4519
|
${this.wmsCapabilities.Capability.Layer.Layer.map(
|
|
4427
4520
|
(s) => {
|
|
4428
4521
|
const a = s.Name;
|
|
4429
|
-
return
|
|
4522
|
+
return E`
|
|
4430
4523
|
<li class="search-list">
|
|
4431
4524
|
${a}
|
|
4432
4525
|
<!-- Button to add layer -->
|
|
@@ -4434,7 +4527,7 @@ class wo extends nt {
|
|
|
4434
4527
|
class="add-layer-icon icon"
|
|
4435
4528
|
@click=${() => (
|
|
4436
4529
|
//@ts-ignore
|
|
4437
|
-
|
|
4530
|
+
B(this, F, Vn).call(this, s)
|
|
4438
4531
|
)}
|
|
4439
4532
|
>
|
|
4440
4533
|
${this.unstyled ? "+" : ""}
|
|
@@ -4444,20 +4537,20 @@ class wo extends nt {
|
|
|
4444
4537
|
}
|
|
4445
4538
|
)}
|
|
4446
4539
|
</ul>` : C}
|
|
4447
|
-
` :
|
|
4540
|
+
` : E`
|
|
4448
4541
|
<!-- Textarea for JSON input -->
|
|
4449
4542
|
<textarea
|
|
4450
4543
|
class="add-layer-input"
|
|
4451
4544
|
placeholder="Please put a valid eox-map layer JSON."
|
|
4452
|
-
@input=${
|
|
4545
|
+
@input=${B(this, F, Po)}
|
|
4453
4546
|
.value=${this.jsonInput}
|
|
4454
4547
|
></textarea>
|
|
4455
4548
|
|
|
4456
4549
|
<!-- Button to add JSON layer -->
|
|
4457
4550
|
<button
|
|
4458
4551
|
class="add-layer-icon json-add-layer"
|
|
4459
|
-
disabled=${
|
|
4460
|
-
@click=${
|
|
4552
|
+
disabled=${Wr(this.jsonInput) ? C : !0}
|
|
4553
|
+
@click=${B(this, F, To)}
|
|
4461
4554
|
>
|
|
4462
4555
|
${this.unstyled ? "Add JSON" : ""}
|
|
4463
4556
|
</button>
|
|
@@ -4473,116 +4566,116 @@ F = new WeakSet(), /**
|
|
|
4473
4566
|
*
|
|
4474
4567
|
* @param {Event} evt - The input change event triggering the method.
|
|
4475
4568
|
*/
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
},
|
|
4479
|
-
const n = await
|
|
4480
|
-
n &&
|
|
4569
|
+
Ao = function(n) {
|
|
4570
|
+
ha(n, this);
|
|
4571
|
+
}, Co = async function() {
|
|
4572
|
+
const n = await pa(this);
|
|
4573
|
+
n && B(this, F, Vn).call(this, n);
|
|
4481
4574
|
}, /**
|
|
4482
4575
|
* Handles input field changes by triggering layer processing and adding layers.
|
|
4483
4576
|
*
|
|
4484
4577
|
* @param {{"Name": string}} layer - The layer information triggering the method.
|
|
4485
4578
|
*/
|
|
4486
|
-
|
|
4487
|
-
|
|
4579
|
+
Vn = function(n) {
|
|
4580
|
+
fa(n, this), Ei(this);
|
|
4488
4581
|
}, /**
|
|
4489
4582
|
* Initiates the addition of layers, triggering the handleAddLayerMethod.
|
|
4490
4583
|
*/
|
|
4491
|
-
|
|
4492
|
-
|
|
4584
|
+
To = function() {
|
|
4585
|
+
Ei(this);
|
|
4493
4586
|
}, /**
|
|
4494
4587
|
* Handles input field changes by invoking the 'handleJsonInputChangeMethod'.
|
|
4495
4588
|
*
|
|
4496
4589
|
* @param {{target: { value: string }}} evt - The input change event triggering the method.
|
|
4497
4590
|
*/
|
|
4498
|
-
|
|
4499
|
-
|
|
4591
|
+
Po = function(n) {
|
|
4592
|
+
ca(n, this);
|
|
4500
4593
|
}, /**
|
|
4501
4594
|
* Handles tab changes by invoking the 'openCloseTabMethod'.
|
|
4502
4595
|
*
|
|
4503
4596
|
* @param {"url" | "json" | null} tab - The tab identifier triggering the method.
|
|
4504
4597
|
*/
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
},
|
|
4508
|
-
|
|
4598
|
+
He = function(n) {
|
|
4599
|
+
ga(n, this);
|
|
4600
|
+
}, ln = new WeakMap(), un = new WeakMap(), // Define static properties for the component
|
|
4601
|
+
N(_o, "properties", {
|
|
4509
4602
|
eoxMap: { attribute: !1, state: !0 },
|
|
4510
4603
|
unstyled: { type: Boolean },
|
|
4511
4604
|
noShadow: { type: Boolean }
|
|
4512
4605
|
});
|
|
4513
|
-
customElements.define("eox-layercontrol-add-layers",
|
|
4514
|
-
const
|
|
4606
|
+
customElements.define("eox-layercontrol-add-layers", _o);
|
|
4607
|
+
const ma = (e, t) => {
|
|
4515
4608
|
if (t.requestUpdate(), e.target.tagName === "EOX-LAYERCONTROL-LAYER-TOOLS") {
|
|
4516
4609
|
const n = t.renderRoot.querySelector(
|
|
4517
4610
|
"eox-layercontrol-optional-list"
|
|
4518
4611
|
);
|
|
4519
4612
|
n == null || n.requestUpdate();
|
|
4520
4613
|
}
|
|
4521
|
-
},
|
|
4614
|
+
}, ya = (e) => {
|
|
4522
4615
|
let t;
|
|
4523
4616
|
return typeof e == "string" ? t = /** @type {HTMLElement} */
|
|
4524
4617
|
document.querySelector(e) : t = e, t;
|
|
4525
|
-
},
|
|
4526
|
-
const t =
|
|
4618
|
+
}, xi = (e) => {
|
|
4619
|
+
const t = ya(e.for);
|
|
4527
4620
|
return t && t.map !== e.map && (e.map = t.map), t;
|
|
4528
4621
|
};
|
|
4529
|
-
var $t,
|
|
4530
|
-
class
|
|
4622
|
+
var $t, qt, Ro, Oo, dn;
|
|
4623
|
+
class Do extends Q {
|
|
4531
4624
|
// Constructor to set default values for properties
|
|
4532
4625
|
constructor() {
|
|
4533
4626
|
super();
|
|
4534
|
-
|
|
4627
|
+
T(this, qt);
|
|
4535
4628
|
/**
|
|
4536
4629
|
* Instance of `eox-map` which is a wrapper for the OL
|
|
4537
4630
|
*
|
|
4538
4631
|
* @type {import("../../map/main").EOxMap}
|
|
4539
4632
|
*/
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = ["info", "opacity", "config", "remove", "sort"], this.addExternalLayers = !1, this.unstyled = !1, this.styleOverride = "";
|
|
4633
|
+
T(this, $t);
|
|
4634
|
+
T(this, dn, "* { font-family: Roboto, sans-serif; }");
|
|
4635
|
+
this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = ["info", "opacity", "datetime", "config", "remove", "sort"], this.addExternalLayers = !1, this.unstyled = !1, this.styleOverride = "";
|
|
4543
4636
|
}
|
|
4544
4637
|
/**
|
|
4545
4638
|
* Called when the component is first updated
|
|
4546
4639
|
* Updated #eoxMap after first update.
|
|
4547
4640
|
*/
|
|
4548
4641
|
firstUpdated() {
|
|
4549
|
-
this.eoxMap =
|
|
4642
|
+
this.eoxMap = xi(this);
|
|
4550
4643
|
}
|
|
4551
4644
|
updated(n) {
|
|
4552
|
-
n.has("for") && (this.eoxMap =
|
|
4645
|
+
n.has("for") && (this.eoxMap = xi(this));
|
|
4553
4646
|
}
|
|
4554
4647
|
get eoxMap() {
|
|
4555
|
-
return
|
|
4648
|
+
return P(this, $t);
|
|
4556
4649
|
}
|
|
4557
4650
|
set eoxMap(n) {
|
|
4558
|
-
const i =
|
|
4559
|
-
|
|
4651
|
+
const i = P(this, $t);
|
|
4652
|
+
Qt(this, $t, n), this.requestUpdate("eoxMap", i);
|
|
4560
4653
|
}
|
|
4561
4654
|
render() {
|
|
4562
4655
|
var o, r, s;
|
|
4563
|
-
const n = (o = this.map) == null ? void 0 : o.getLayers().getArray(), i = n && ((r =
|
|
4564
|
-
return
|
|
4656
|
+
const n = (o = this.map) == null ? void 0 : o.getLayers().getArray(), i = n && ((r = Wn(n, "layerControlOptional", !0)) == null ? void 0 : r.length) > 0;
|
|
4657
|
+
return E`
|
|
4565
4658
|
<style>
|
|
4566
|
-
${!this.unstyled &&
|
|
4659
|
+
${!this.unstyled && P(this, dn)}
|
|
4567
4660
|
${this.styleOverride}
|
|
4568
4661
|
</style>
|
|
4569
4662
|
|
|
4570
4663
|
<!-- Conditional rendering of add layers component -->
|
|
4571
|
-
${
|
|
4572
|
-
this.addExternalLayers && ((s =
|
|
4573
|
-
() =>
|
|
4664
|
+
${K(
|
|
4665
|
+
this.addExternalLayers && ((s = P(this, $t)) == null ? void 0 : s.addOrUpdateLayer),
|
|
4666
|
+
() => E`
|
|
4574
4667
|
<eox-layercontrol-add-layers
|
|
4575
4668
|
.noShadow=${!0}
|
|
4576
|
-
.eoxMap=${
|
|
4669
|
+
.eoxMap=${P(this, $t)}
|
|
4577
4670
|
.unstyled=${this.unstyled}
|
|
4578
4671
|
></eox-layercontrol-add-layers>
|
|
4579
4672
|
`
|
|
4580
4673
|
)}
|
|
4581
4674
|
|
|
4582
4675
|
<!-- Conditional rendering of layer list component -->
|
|
4583
|
-
${
|
|
4676
|
+
${K(
|
|
4584
4677
|
this.map,
|
|
4585
|
-
() =>
|
|
4678
|
+
() => E`
|
|
4586
4679
|
<eox-layercontrol-layer-list
|
|
4587
4680
|
.noShadow=${!0}
|
|
4588
4681
|
class="layers"
|
|
@@ -4593,15 +4686,16 @@ class _o extends nt {
|
|
|
4593
4686
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
4594
4687
|
.tools=${this.tools}
|
|
4595
4688
|
.unstyled=${this.unstyled}
|
|
4596
|
-
@changed=${
|
|
4689
|
+
@changed=${B(this, qt, Ro)}
|
|
4690
|
+
@datetime:updated=${B(this, qt, Oo)}
|
|
4597
4691
|
></eox-layercontrol-layer-list>
|
|
4598
4692
|
`
|
|
4599
4693
|
)}
|
|
4600
4694
|
|
|
4601
4695
|
<!-- Conditional rendering of optional list component -->
|
|
4602
|
-
${
|
|
4696
|
+
${K(
|
|
4603
4697
|
i,
|
|
4604
|
-
() =>
|
|
4698
|
+
() => E`
|
|
4605
4699
|
<eox-layercontrol-optional-list
|
|
4606
4700
|
.noShadow=${!0}
|
|
4607
4701
|
.idProperty=${this.idProperty}
|
|
@@ -4614,15 +4708,23 @@ class _o extends nt {
|
|
|
4614
4708
|
`;
|
|
4615
4709
|
}
|
|
4616
4710
|
}
|
|
4617
|
-
$t = new WeakMap(),
|
|
4711
|
+
$t = new WeakMap(), qt = new WeakSet(), /**
|
|
4618
4712
|
* Event handler for changes in the layer list
|
|
4619
4713
|
*
|
|
4620
4714
|
* @param {CustomEvent & {target: Element}} evt
|
|
4621
4715
|
*/
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
},
|
|
4625
|
-
|
|
4716
|
+
Ro = function(n) {
|
|
4717
|
+
ma(n, this), this.dispatchEvent(new CustomEvent("layerchange", { detail: n.detail }));
|
|
4718
|
+
}, /**
|
|
4719
|
+
* Dispatches datetime updates from layer datetime to the layercontrol
|
|
4720
|
+
* @param {CustomEvent} evt
|
|
4721
|
+
*/
|
|
4722
|
+
Oo = function(n) {
|
|
4723
|
+
this.dispatchEvent(
|
|
4724
|
+
new CustomEvent("datetime:updated", { detail: n.detail })
|
|
4725
|
+
);
|
|
4726
|
+
}, dn = new WeakMap(), // Define static properties for the component
|
|
4727
|
+
N(Do, "properties", {
|
|
4626
4728
|
for: { type: String },
|
|
4627
4729
|
idProperty: { attribute: "id-property" },
|
|
4628
4730
|
map: { attribute: !1, state: !0 },
|
|
@@ -4633,7 +4735,7 @@ H(_o, "properties", {
|
|
|
4633
4735
|
unstyled: { type: Boolean },
|
|
4634
4736
|
styleOverride: { type: String }
|
|
4635
4737
|
});
|
|
4636
|
-
customElements.define("eox-layercontrol",
|
|
4738
|
+
customElements.define("eox-layercontrol", Do);
|
|
4637
4739
|
export {
|
|
4638
|
-
|
|
4740
|
+
Do as EOxLayerControl
|
|
4639
4741
|
};
|