@eox/layercontrol 0.21.1 → 0.23.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/README.md +4 -0
- package/dist/eox-layercontrol.js +1360 -1216
- package/dist/eox-layercontrol.umd.cjs +220 -147
- package/package.json +10 -13
- package/src/components/add-layers.js +416 -0
- package/src/components/layer-config.js +212 -0
- package/src/components/layer-datetime.js +128 -0
- package/src/components/layer-group.js +193 -0
- package/src/components/layer-legend.js +135 -0
- package/src/components/layer-list.js +209 -0
- package/src/components/layer-tools.js +353 -0
- package/src/components/layer.js +244 -0
- package/src/components/optional-list.js +124 -0
- package/src/components/tab-sliders.js +0 -0
- package/src/components/tools-items.js +199 -0
- package/src/enums/index.js +16 -0
- package/src/enums/stories/assets/cropomhusc-feature-collection.json +5274 -0
- package/src/enums/stories/index.js +536 -0
- package/src/helpers/check-properties.js +41 -0
- package/src/helpers/clean-json-input.js +29 -0
- package/src/helpers/create-sortable.js +104 -0
- package/src/helpers/detect-map-url-type.js +20 -0
- package/src/helpers/fetch-capabilities.js +32 -0
- package/src/helpers/filter-layers.js +45 -0
- package/src/helpers/get-layer-type.js +35 -0
- package/src/helpers/get-legend-config.js +25 -0
- package/src/helpers/get-start-vals.js +73 -0
- package/src/helpers/hide-layers-based-on-property.js +11 -0
- package/src/helpers/index.js +22 -0
- package/src/helpers/is-layer-json-valid.js +19 -0
- package/src/helpers/is-layer-visible-based-on-zoom-state.js +31 -0
- package/src/helpers/is-layer-zoom-state-req.js +17 -0
- package/src/helpers/is-map-url-valid.js +22 -0
- package/src/helpers/layer-tools.js +82 -0
- package/src/helpers/update-url.js +32 -0
- package/src/main.js +269 -0
- package/src/methods/add-layer/add-layer.js +33 -0
- package/src/methods/add-layer/index.js +8 -0
- package/src/methods/add-layer/json-input-change.js +15 -0
- package/src/methods/add-layer/open-close-tab.js +21 -0
- package/src/methods/add-layer/url-input-change.js +17 -0
- package/src/methods/add-layer/url-layer.js +37 -0
- package/src/methods/add-layer/wms-search-url.js +44 -0
- package/src/methods/layer/first-updated.js +65 -0
- package/src/methods/layer/index.js +4 -0
- package/src/methods/layer/input-click.js +43 -0
- package/src/methods/layer-config/apply-updated-styles.js +98 -0
- package/src/methods/layer-config/data-change.js +44 -0
- package/src/methods/layer-config/index.js +7 -0
- package/src/methods/layer-list/first-updated.js +55 -0
- package/src/methods/layer-list/index.js +3 -0
- package/src/methods/layercontrol/first-update.js +22 -0
- package/src/methods/layercontrol/index.js +4 -0
- package/src/methods/layercontrol/layer-list-change.js +23 -0
- package/src/methods/optional-list/add-to-list.js +44 -0
- package/src/methods/optional-list/index.js +3 -0
- package/test/_mockMap.js +0 -154
- package/test/cases/general/check-layer-size.js +0 -25
- package/test/cases/general/check-pre-open-layer-tools.js +0 -26
- package/test/cases/general/check-pre-open-section.js +0 -29
- package/test/cases/general/disable-drag.js +0 -26
- package/test/cases/general/empty-groups.js +0 -41
- package/test/cases/general/exclusive-layers.js +0 -35
- package/test/cases/general/hide-layers.js +0 -23
- package/test/cases/general/index.js +0 -9
- package/test/cases/general/render-optional-layer.js +0 -31
- package/test/cases/general/show-layer-title.js +0 -23
- package/test/cases/layer-update/add-external-layer.js +0 -96
- package/test/cases/layer-update/add-layer-from-optional.js +0 -51
- package/test/cases/layer-update/check-if-layer-pushed-to-group.js +0 -33
- package/test/cases/layer-update/check-layer-changed-event.js +0 -29
- package/test/cases/layer-update/check-layer-is-pushed-to-root.js +0 -22
- package/test/cases/layer-update/check-layer-removed-from-group.js +0 -33
- package/test/cases/layer-update/check-layer-removed-from-root.js +0 -27
- package/test/cases/layer-update/check-layer-size-after-multiple-calls.js +0 -34
- package/test/cases/layer-update/check-layer-zoom-state.js +0 -54
- package/test/cases/layer-update/index.js +0 -9
- package/test/general.cy.js +0 -57
- package/test/layersUpdate.cy.js +0 -72
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Yo = Object.defineProperty;
|
|
2
|
+
var si = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var Wo = (e, t, n) => t in e ? Yo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var I = (e, t, n) => Wo(e, typeof t != "symbol" ? t + "" : t, n), yn = (e, t, n) => t.has(e) || si("Cannot " + n);
|
|
7
|
+
var S = (e, t, n) => (yn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), C = (e, t, n) => t.has(e) ? si("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), kt = (e, t, n, i) => (yn(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), V = (e, t, n) => (yn(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 De = globalThis, zn = De.ShadowRoot && (De.ShadyCSS === void 0 || De.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Xn = Symbol(), ai = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
let Ni = class {
|
|
15
15
|
constructor(t, n, i) {
|
|
16
|
-
if (this._$cssResult$ = !0, i !==
|
|
16
|
+
if (this._$cssResult$ = !0, i !== Xn) 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 (zn && t === void 0) {
|
|
23
23
|
const i = n !== void 0 && n.length === 1;
|
|
24
|
-
i && (t =
|
|
24
|
+
i && (t = ai.get(n)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ai.set(n, t));
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
27
|
}
|
|
@@ -29,26 +29,33 @@ let zo = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const Go = (e) => new Ni(typeof e == "string" ? e : e + "", void 0, Xn), Hi = (e, ...t) => {
|
|
33
|
+
const n = e.length === 1 ? e[0] : t.reduce((i, o, r) => i + ((s) => {
|
|
34
|
+
if (s._$cssResult$ === !0) return s.cssText;
|
|
35
|
+
if (typeof s == "number") return s;
|
|
36
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
37
|
+
})(o) + e[r + 1], e[0]);
|
|
38
|
+
return new Ni(n, e, Xn);
|
|
39
|
+
}, Jo = (e, t) => {
|
|
40
|
+
if (zn) e.adoptedStyleSheets = t.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
|
|
34
41
|
else for (const n of t) {
|
|
35
|
-
const i = document.createElement("style"), o =
|
|
42
|
+
const i = document.createElement("style"), o = De.litNonce;
|
|
36
43
|
o !== void 0 && i.setAttribute("nonce", o), i.textContent = n.cssText, e.appendChild(i);
|
|
37
44
|
}
|
|
38
|
-
},
|
|
45
|
+
}, li = zn ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
39
46
|
let n = "";
|
|
40
47
|
for (const i of t.cssRules) n += i.cssText;
|
|
41
|
-
return
|
|
48
|
+
return Go(n);
|
|
42
49
|
})(e) : e;
|
|
43
50
|
/**
|
|
44
51
|
* @license
|
|
45
52
|
* Copyright 2017 Google LLC
|
|
46
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
54
|
*/
|
|
48
|
-
const { is:
|
|
55
|
+
const { is: Ko, defineProperty: Qo, getOwnPropertyDescriptor: tr, getOwnPropertyNames: er, getOwnPropertySymbols: nr, getPrototypeOf: ir } = Object, Tt = globalThis, ui = Tt.trustedTypes, or = ui ? ui.emptyScript : "", bn = Tt.reactiveElementPolyfillSupport, ae = (e, t) => e, Nn = { toAttribute(e, t) {
|
|
49
56
|
switch (t) {
|
|
50
57
|
case Boolean:
|
|
51
|
-
e = e ?
|
|
58
|
+
e = e ? or : null;
|
|
52
59
|
break;
|
|
53
60
|
case Object:
|
|
54
61
|
case Array:
|
|
@@ -73,23 +80,23 @@ const { is: Yo, defineProperty: Wo, getOwnPropertyDescriptor: Go, getOwnProperty
|
|
|
73
80
|
}
|
|
74
81
|
}
|
|
75
82
|
return n;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
class
|
|
83
|
+
} }, Vi = (e, t) => !Ko(e, t), di = { attribute: !0, type: String, converter: Nn, reflect: !1, hasChanged: Vi };
|
|
84
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), Tt.litPropertyMetadata ?? (Tt.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
85
|
+
class jt extends HTMLElement {
|
|
79
86
|
static addInitializer(t) {
|
|
80
87
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
88
|
}
|
|
82
89
|
static get observedAttributes() {
|
|
83
90
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
91
|
}
|
|
85
|
-
static createProperty(t, n =
|
|
92
|
+
static createProperty(t, n = di) {
|
|
86
93
|
if (n.state && (n.attribute = !1), this._$Ei(), this.elementProperties.set(t, n), !n.noAccessor) {
|
|
87
94
|
const i = Symbol(), o = this.getPropertyDescriptor(t, i, n);
|
|
88
|
-
o !== void 0 &&
|
|
95
|
+
o !== void 0 && Qo(this.prototype, t, o);
|
|
89
96
|
}
|
|
90
97
|
}
|
|
91
98
|
static getPropertyDescriptor(t, n, i) {
|
|
92
|
-
const { get: o, set: r } =
|
|
99
|
+
const { get: o, set: r } = tr(this.prototype, t) ?? { get() {
|
|
93
100
|
return this[n];
|
|
94
101
|
}, set(s) {
|
|
95
102
|
this[n] = s;
|
|
@@ -102,17 +109,17 @@ class Ut extends HTMLElement {
|
|
|
102
109
|
}, configurable: !0, enumerable: !0 };
|
|
103
110
|
}
|
|
104
111
|
static getPropertyOptions(t) {
|
|
105
|
-
return this.elementProperties.get(t) ??
|
|
112
|
+
return this.elementProperties.get(t) ?? di;
|
|
106
113
|
}
|
|
107
114
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const t =
|
|
115
|
+
if (this.hasOwnProperty(ae("elementProperties"))) return;
|
|
116
|
+
const t = ir(this);
|
|
110
117
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
118
|
}
|
|
112
119
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
115
|
-
const n = this.properties, i = [...
|
|
120
|
+
if (this.hasOwnProperty(ae("finalized"))) return;
|
|
121
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ae("properties"))) {
|
|
122
|
+
const n = this.properties, i = [...er(n), ...nr(n)];
|
|
116
123
|
for (const o of i) this.createProperty(o, n[o]);
|
|
117
124
|
}
|
|
118
125
|
const t = this[Symbol.metadata];
|
|
@@ -131,8 +138,8 @@ class Ut extends HTMLElement {
|
|
|
131
138
|
const n = [];
|
|
132
139
|
if (Array.isArray(t)) {
|
|
133
140
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const o of i) n.unshift(
|
|
135
|
-
} else t !== void 0 && n.push(
|
|
141
|
+
for (const o of i) n.unshift(li(o));
|
|
142
|
+
} else t !== void 0 && n.push(li(t));
|
|
136
143
|
return n;
|
|
137
144
|
}
|
|
138
145
|
static _$Eu(t, n) {
|
|
@@ -161,7 +168,7 @@ class Ut extends HTMLElement {
|
|
|
161
168
|
}
|
|
162
169
|
createRenderRoot() {
|
|
163
170
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
171
|
+
return Jo(t, this.constructor.elementStyles), t;
|
|
165
172
|
}
|
|
166
173
|
connectedCallback() {
|
|
167
174
|
var t;
|
|
@@ -186,7 +193,7 @@ class Ut extends HTMLElement {
|
|
|
186
193
|
var r;
|
|
187
194
|
const i = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, i);
|
|
188
195
|
if (o !== void 0 && i.reflect === !0) {
|
|
189
|
-
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter :
|
|
196
|
+
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : Nn).toAttribute(n, i.type);
|
|
190
197
|
this._$Em = t, s == null ? this.removeAttribute(o) : this.setAttribute(o, s), this._$Em = null;
|
|
191
198
|
}
|
|
192
199
|
}
|
|
@@ -194,13 +201,13 @@ class Ut extends HTMLElement {
|
|
|
194
201
|
var r;
|
|
195
202
|
const i = this.constructor, o = i._$Eh.get(t);
|
|
196
203
|
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 :
|
|
204
|
+
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 : Nn;
|
|
198
205
|
this._$Em = o, this[o] = a.fromAttribute(n, s.type), this._$Em = null;
|
|
199
206
|
}
|
|
200
207
|
}
|
|
201
208
|
requestUpdate(t, n, i) {
|
|
202
209
|
if (t !== void 0) {
|
|
203
|
-
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ??
|
|
210
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Vi)(this[t], n)) return;
|
|
204
211
|
this.P(t, n, i);
|
|
205
212
|
}
|
|
206
213
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -273,76 +280,76 @@ class Ut extends HTMLElement {
|
|
|
273
280
|
firstUpdated(t) {
|
|
274
281
|
}
|
|
275
282
|
}
|
|
276
|
-
|
|
283
|
+
jt.elementStyles = [], jt.shadowRootOptions = { mode: "open" }, jt[ae("elementProperties")] = /* @__PURE__ */ new Map(), jt[ae("finalized")] = /* @__PURE__ */ new Map(), bn == null || bn({ ReactiveElement: jt }), (Tt.reactiveElementVersions ?? (Tt.reactiveElementVersions = [])).push("2.0.4");
|
|
277
284
|
/**
|
|
278
285
|
* @license
|
|
279
286
|
* Copyright 2017 Google LLC
|
|
280
287
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
288
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
288
|
-
}
|
|
289
|
-
const
|
|
289
|
+
const le = globalThis, Be = le.trustedTypes, ci = Be ? Be.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, qn = "$lit$", ft = `lit$${Math.random().toFixed(9).slice(2)}$`, Yn = "?" + ft, rr = `<${Yn}>`, Vt = document, fe = () => Vt.createComment(""), ge = (e) => e === null || typeof e != "object" && typeof e != "function", Wn = Array.isArray, Bi = (e) => Wn(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", vn = `[
|
|
290
|
+
\f\r]`, ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, hi = /-->/g, pi = />/g, Ot = RegExp(`>|${vn}(?:([^\\s"'>=/]+)(${vn}*=${vn}*(?:[^
|
|
291
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), fi = /'/g, gi = /"/g, ki = /^(?:script|style|textarea|title)$/i, sr = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), $ = sr(1), at = Symbol.for("lit-noChange"), P = Symbol.for("lit-nothing"), mi = /* @__PURE__ */ new WeakMap(), Nt = Vt.createTreeWalker(Vt, 129);
|
|
292
|
+
function Ui(e, t) {
|
|
293
|
+
if (!Wn(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
294
|
+
return ci !== void 0 ? ci.createHTML(t) : t;
|
|
295
|
+
}
|
|
296
|
+
const Fi = (e, t) => {
|
|
290
297
|
const n = e.length - 1, i = [];
|
|
291
|
-
let o, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", s =
|
|
298
|
+
let o, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", s = ne;
|
|
292
299
|
for (let a = 0; a < n; a++) {
|
|
293
300
|
const l = e[a];
|
|
294
301
|
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 ===
|
|
302
|
+
for (; p < l.length && (s.lastIndex = p, c = s.exec(l), c !== null); ) p = s.lastIndex, s === ne ? c[1] === "!--" ? s = hi : c[1] !== void 0 ? s = pi : c[2] !== void 0 ? (ki.test(c[2]) && (o = RegExp("</" + c[2], "g")), s = Ot) : c[3] !== void 0 && (s = Ot) : s === Ot ? c[0] === ">" ? (s = o ?? ne, d = -1) : c[1] === void 0 ? d = -2 : (d = s.lastIndex - c[2].length, u = c[1], s = c[3] === void 0 ? Ot : c[3] === '"' ? gi : fi) : s === gi || s === fi ? s = Ot : s === hi || s === pi ? s = ne : (s = Ot, o = void 0);
|
|
296
303
|
const f = s === Ot && e[a + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
r += s ===
|
|
304
|
+
r += s === ne ? l + rr : d >= 0 ? (i.push(u), l.slice(0, d) + qn + l.slice(d) + ft + f) : l + ft + (d === -2 ? a : f);
|
|
298
305
|
}
|
|
299
|
-
return [
|
|
306
|
+
return [Ui(e, r + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
300
307
|
};
|
|
301
|
-
class
|
|
308
|
+
class me {
|
|
302
309
|
constructor({ strings: t, _$litType$: n }, i) {
|
|
303
310
|
let o;
|
|
304
311
|
this.parts = [];
|
|
305
312
|
let r = 0, s = 0;
|
|
306
|
-
const a = t.length - 1, l = this.parts, [u, c] =
|
|
307
|
-
if (this.el =
|
|
313
|
+
const a = t.length - 1, l = this.parts, [u, c] = Fi(t, n);
|
|
314
|
+
if (this.el = me.createElement(u, i), Nt.currentNode = this.el.content, n === 2 || n === 3) {
|
|
308
315
|
const d = this.el.content.firstChild;
|
|
309
316
|
d.replaceWith(...d.childNodes);
|
|
310
317
|
}
|
|
311
318
|
for (; (o = Nt.nextNode()) !== null && l.length < a; ) {
|
|
312
319
|
if (o.nodeType === 1) {
|
|
313
|
-
if (o.hasAttributes()) for (const d of o.getAttributeNames()) if (d.endsWith(
|
|
314
|
-
const p = c[s++], f = o.getAttribute(d).split(
|
|
315
|
-
l.push({ type: 1, index: r, name: g[2], strings: f, ctor: g[1] === "." ?
|
|
316
|
-
} else d.startsWith(
|
|
317
|
-
if (
|
|
318
|
-
const d = o.textContent.split(
|
|
320
|
+
if (o.hasAttributes()) for (const d of o.getAttributeNames()) if (d.endsWith(qn)) {
|
|
321
|
+
const p = c[s++], f = o.getAttribute(d).split(ft), g = /([.?@])?(.*)/.exec(p);
|
|
322
|
+
l.push({ type: 1, index: r, name: g[2], strings: f, ctor: g[1] === "." ? Zi : g[1] === "?" ? zi : g[1] === "@" ? Xi : $e }), o.removeAttribute(d);
|
|
323
|
+
} else d.startsWith(ft) && (l.push({ type: 6, index: r }), o.removeAttribute(d));
|
|
324
|
+
if (ki.test(o.tagName)) {
|
|
325
|
+
const d = o.textContent.split(ft), p = d.length - 1;
|
|
319
326
|
if (p > 0) {
|
|
320
|
-
o.textContent =
|
|
321
|
-
for (let f = 0; f < p; f++) o.append(d[f],
|
|
322
|
-
o.append(d[p],
|
|
327
|
+
o.textContent = Be ? Be.emptyScript : "";
|
|
328
|
+
for (let f = 0; f < p; f++) o.append(d[f], fe()), Nt.nextNode(), l.push({ type: 2, index: ++r });
|
|
329
|
+
o.append(d[p], fe());
|
|
323
330
|
}
|
|
324
331
|
}
|
|
325
|
-
} else if (o.nodeType === 8) if (o.data ===
|
|
332
|
+
} else if (o.nodeType === 8) if (o.data === Yn) l.push({ type: 2, index: r });
|
|
326
333
|
else {
|
|
327
334
|
let d = -1;
|
|
328
|
-
for (; (d = o.data.indexOf(
|
|
335
|
+
for (; (d = o.data.indexOf(ft, d + 1)) !== -1; ) l.push({ type: 7, index: r }), d += ft.length - 1;
|
|
329
336
|
}
|
|
330
337
|
r++;
|
|
331
338
|
}
|
|
332
339
|
}
|
|
333
340
|
static createElement(t, n) {
|
|
334
|
-
const i =
|
|
341
|
+
const i = Vt.createElement("template");
|
|
335
342
|
return i.innerHTML = t, i;
|
|
336
343
|
}
|
|
337
344
|
}
|
|
338
345
|
function Bt(e, t, n = e, i) {
|
|
339
346
|
var s, a;
|
|
340
347
|
if (t === at) return t;
|
|
341
|
-
let o = i !== void 0 ? (s = n.
|
|
342
|
-
const r =
|
|
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.
|
|
348
|
+
let o = i !== void 0 ? (s = n._$Co) == null ? void 0 : s[i] : n._$Cl;
|
|
349
|
+
const r = ge(t) ? void 0 : t._$litDirective$;
|
|
350
|
+
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
351
|
}
|
|
345
|
-
class
|
|
352
|
+
let ji = class {
|
|
346
353
|
constructor(t, n) {
|
|
347
354
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = n;
|
|
348
355
|
}
|
|
@@ -353,30 +360,30 @@ class Li {
|
|
|
353
360
|
return this._$AM._$AU;
|
|
354
361
|
}
|
|
355
362
|
u(t) {
|
|
356
|
-
const { el: { content: n }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ??
|
|
363
|
+
const { el: { content: n }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? Vt).importNode(n, !0);
|
|
357
364
|
Nt.currentNode = o;
|
|
358
365
|
let r = Nt.nextNode(), s = 0, a = 0, l = i[0];
|
|
359
366
|
for (; l !== void 0; ) {
|
|
360
367
|
if (s === l.index) {
|
|
361
368
|
let u;
|
|
362
|
-
l.type === 2 ? u = new
|
|
369
|
+
l.type === 2 ? u = new Jt(r, r.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (u = new qi(r, this, t)), this._$AV.push(u), l = i[++a];
|
|
363
370
|
}
|
|
364
371
|
s !== (l == null ? void 0 : l.index) && (r = Nt.nextNode(), s++);
|
|
365
372
|
}
|
|
366
|
-
return Nt.currentNode =
|
|
373
|
+
return Nt.currentNode = Vt, o;
|
|
367
374
|
}
|
|
368
375
|
p(t) {
|
|
369
376
|
let n = 0;
|
|
370
377
|
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
378
|
}
|
|
372
|
-
}
|
|
373
|
-
|
|
379
|
+
};
|
|
380
|
+
class Jt {
|
|
374
381
|
get _$AU() {
|
|
375
382
|
var t;
|
|
376
|
-
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this.
|
|
383
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
377
384
|
}
|
|
378
385
|
constructor(t, n, i, o) {
|
|
379
|
-
this.type = 2, this._$AH =
|
|
386
|
+
this.type = 2, this._$AH = P, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = i, this.options = o, this._$Cv = (o == null ? void 0 : o.isConnected) ?? !0;
|
|
380
387
|
}
|
|
381
388
|
get parentNode() {
|
|
382
389
|
let t = this._$AA.parentNode;
|
|
@@ -390,7 +397,7 @@ let cn = class Bi {
|
|
|
390
397
|
return this._$AB;
|
|
391
398
|
}
|
|
392
399
|
_$AI(t, n = this) {
|
|
393
|
-
t = Bt(this, t, n),
|
|
400
|
+
t = Bt(this, t, n), ge(t) ? t === P || t == null || t === "" ? (this._$AH !== P && this._$AR(), this._$AH = P) : t !== this._$AH && t !== at && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Bi(t) ? this.k(t) : this._(t);
|
|
394
401
|
}
|
|
395
402
|
O(t) {
|
|
396
403
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -399,26 +406,26 @@ let cn = class Bi {
|
|
|
399
406
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
400
407
|
}
|
|
401
408
|
_(t) {
|
|
402
|
-
this._$AH !==
|
|
409
|
+
this._$AH !== P && ge(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Vt.createTextNode(t)), this._$AH = t;
|
|
403
410
|
}
|
|
404
411
|
$(t) {
|
|
405
412
|
var r;
|
|
406
|
-
const { values: n, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
413
|
+
const { values: n, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = me.createElement(Ui(i.h, i.h[0]), this.options)), i);
|
|
407
414
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === o) this._$AH.p(n);
|
|
408
415
|
else {
|
|
409
|
-
const s = new
|
|
416
|
+
const s = new ji(o, this), a = s.u(this.options);
|
|
410
417
|
s.p(n), this.T(a), this._$AH = s;
|
|
411
418
|
}
|
|
412
419
|
}
|
|
413
420
|
_$AC(t) {
|
|
414
|
-
let n =
|
|
415
|
-
return n === void 0 &&
|
|
421
|
+
let n = mi.get(t.strings);
|
|
422
|
+
return n === void 0 && mi.set(t.strings, n = new me(t)), n;
|
|
416
423
|
}
|
|
417
424
|
k(t) {
|
|
418
|
-
|
|
425
|
+
Wn(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
426
|
const n = this._$AH;
|
|
420
427
|
let i, o = 0;
|
|
421
|
-
for (const r of t) o === n.length ? n.push(i = new
|
|
428
|
+
for (const r of t) o === n.length ? n.push(i = new Jt(this.O(fe()), this.O(fe()), this, this.options)) : i = n[o], i._$AI(r), o++;
|
|
422
429
|
o < n.length && (this._$AR(i && i._$AB.nextSibling, o), n.length = o);
|
|
423
430
|
}
|
|
424
431
|
_$AR(t = this._$AA.nextSibling, n) {
|
|
@@ -430,10 +437,10 @@ let cn = class Bi {
|
|
|
430
437
|
}
|
|
431
438
|
setConnected(t) {
|
|
432
439
|
var n;
|
|
433
|
-
this._$AM === void 0 && (this.
|
|
440
|
+
this._$AM === void 0 && (this._$Cv = t, (n = this._$AP) == null || n.call(this, t));
|
|
434
441
|
}
|
|
435
|
-
}
|
|
436
|
-
class
|
|
442
|
+
}
|
|
443
|
+
class $e {
|
|
437
444
|
get tagName() {
|
|
438
445
|
return this.element.tagName;
|
|
439
446
|
}
|
|
@@ -441,46 +448,46 @@ class we {
|
|
|
441
448
|
return this._$AM._$AU;
|
|
442
449
|
}
|
|
443
450
|
constructor(t, n, i, o, r) {
|
|
444
|
-
this.type = 1, this._$AH =
|
|
451
|
+
this.type = 1, this._$AH = P, this._$AN = void 0, this.element = t, this.name = n, this._$AM = o, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = P;
|
|
445
452
|
}
|
|
446
453
|
_$AI(t, n = this, i, o) {
|
|
447
454
|
const r = this.strings;
|
|
448
455
|
let s = !1;
|
|
449
|
-
if (r === void 0) t = Bt(this, t, n, 0), s = !
|
|
456
|
+
if (r === void 0) t = Bt(this, t, n, 0), s = !ge(t) || t !== this._$AH && t !== at, s && (this._$AH = t);
|
|
450
457
|
else {
|
|
451
458
|
const a = t;
|
|
452
459
|
let l, u;
|
|
453
|
-
for (t = r[0], l = 0; l < r.length - 1; l++) u = Bt(this, a[i + l], n, l), u === at && (u = this._$AH[l]), s || (s = !
|
|
460
|
+
for (t = r[0], l = 0; l < r.length - 1; l++) u = Bt(this, a[i + l], n, l), u === at && (u = this._$AH[l]), s || (s = !ge(u) || u !== this._$AH[l]), u === P ? t = P : t !== P && (t += (u ?? "") + r[l + 1]), this._$AH[l] = u;
|
|
454
461
|
}
|
|
455
462
|
s && !o && this.j(t);
|
|
456
463
|
}
|
|
457
464
|
j(t) {
|
|
458
|
-
t ===
|
|
465
|
+
t === P ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
466
|
}
|
|
460
467
|
}
|
|
461
|
-
class
|
|
468
|
+
class Zi extends $e {
|
|
462
469
|
constructor() {
|
|
463
470
|
super(...arguments), this.type = 3;
|
|
464
471
|
}
|
|
465
472
|
j(t) {
|
|
466
|
-
this.element[this.name] = t ===
|
|
473
|
+
this.element[this.name] = t === P ? void 0 : t;
|
|
467
474
|
}
|
|
468
475
|
}
|
|
469
|
-
class
|
|
476
|
+
class zi extends $e {
|
|
470
477
|
constructor() {
|
|
471
478
|
super(...arguments), this.type = 4;
|
|
472
479
|
}
|
|
473
480
|
j(t) {
|
|
474
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
481
|
+
this.element.toggleAttribute(this.name, !!t && t !== P);
|
|
475
482
|
}
|
|
476
483
|
}
|
|
477
|
-
class
|
|
484
|
+
class Xi extends $e {
|
|
478
485
|
constructor(t, n, i, o, r) {
|
|
479
486
|
super(t, n, i, o, r), this.type = 5;
|
|
480
487
|
}
|
|
481
488
|
_$AI(t, n = this) {
|
|
482
|
-
if ((t = Bt(this, t, n, 0) ??
|
|
483
|
-
const i = this._$AH, o = t ===
|
|
489
|
+
if ((t = Bt(this, t, n, 0) ?? P) === at) return;
|
|
490
|
+
const i = this._$AH, o = t === P && i !== P || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== P && (i === P || o);
|
|
484
491
|
o && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
492
|
}
|
|
486
493
|
handleEvent(t) {
|
|
@@ -488,7 +495,7 @@ class Ui extends we {
|
|
|
488
495
|
typeof this._$AH == "function" ? this._$AH.call(((n = this.options) == null ? void 0 : n.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
489
496
|
}
|
|
490
497
|
}
|
|
491
|
-
class
|
|
498
|
+
class qi {
|
|
492
499
|
constructor(t, n, i) {
|
|
493
500
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = i;
|
|
494
501
|
}
|
|
@@ -499,14 +506,14 @@ class Fi {
|
|
|
499
506
|
Bt(this, t);
|
|
500
507
|
}
|
|
501
508
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
509
|
+
const ar = { M: qn, P: ft, A: Yn, C: 1, L: Fi, R: ji, D: Bi, V: Bt, I: Jt, H: $e, N: zi, U: Xi, B: Zi, F: qi }, wn = le.litHtmlPolyfillSupport;
|
|
510
|
+
wn == null || wn(me, Jt), (le.litHtmlVersions ?? (le.litHtmlVersions = [])).push("3.2.1");
|
|
511
|
+
const lr = (e, t, n) => {
|
|
505
512
|
const i = (n == null ? void 0 : n.renderBefore) ?? t;
|
|
506
513
|
let o = i._$litPart$;
|
|
507
514
|
if (o === void 0) {
|
|
508
515
|
const r = (n == null ? void 0 : n.renderBefore) ?? null;
|
|
509
|
-
i._$litPart$ = o = new
|
|
516
|
+
i._$litPart$ = o = new Jt(t.insertBefore(fe(), r), r, void 0, n ?? {});
|
|
510
517
|
}
|
|
511
518
|
return o._$AI(e), o;
|
|
512
519
|
};
|
|
@@ -515,9 +522,9 @@ const or = (e, t, n) => {
|
|
|
515
522
|
* Copyright 2017 Google LLC
|
|
516
523
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
524
|
*/
|
|
518
|
-
class
|
|
525
|
+
let tt = class extends jt {
|
|
519
526
|
constructor() {
|
|
520
|
-
super(...arguments), this.renderOptions = { host: this }, this.
|
|
527
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
528
|
}
|
|
522
529
|
createRenderRoot() {
|
|
523
530
|
var n;
|
|
@@ -526,31 +533,31 @@ class it extends Ut {
|
|
|
526
533
|
}
|
|
527
534
|
update(t) {
|
|
528
535
|
const n = this.render();
|
|
529
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.
|
|
536
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = lr(n, this.renderRoot, this.renderOptions);
|
|
530
537
|
}
|
|
531
538
|
connectedCallback() {
|
|
532
539
|
var t;
|
|
533
|
-
super.connectedCallback(), (t = this.
|
|
540
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
|
534
541
|
}
|
|
535
542
|
disconnectedCallback() {
|
|
536
543
|
var t;
|
|
537
|
-
super.disconnectedCallback(), (t = this.
|
|
544
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
538
545
|
}
|
|
539
546
|
render() {
|
|
540
547
|
return at;
|
|
541
548
|
}
|
|
542
|
-
}
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.
|
|
549
|
+
};
|
|
550
|
+
var Ii;
|
|
551
|
+
tt._$litElement$ = !0, tt.finalized = !0, (Ii = globalThis.litElementHydrateSupport) == null || Ii.call(globalThis, { LitElement: tt });
|
|
552
|
+
const $n = globalThis.litElementPolyfillSupport;
|
|
553
|
+
$n == null || $n({ LitElement: tt });
|
|
554
|
+
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
548
555
|
/**
|
|
549
556
|
* @license
|
|
550
557
|
* Copyright 2021 Google LLC
|
|
551
558
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
559
|
*/
|
|
553
|
-
function
|
|
560
|
+
function F(e, t, n) {
|
|
554
561
|
return e ? t(e) : n == null ? void 0 : n(e);
|
|
555
562
|
}
|
|
556
563
|
/**
|
|
@@ -558,15 +565,15 @@ function G(e, t, n) {
|
|
|
558
565
|
* Copyright 2017 Google LLC
|
|
559
566
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
560
567
|
*/
|
|
561
|
-
const
|
|
562
|
-
class
|
|
568
|
+
const xt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Gn = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
569
|
+
class Jn {
|
|
563
570
|
constructor(t) {
|
|
564
571
|
}
|
|
565
572
|
get _$AU() {
|
|
566
573
|
return this._$AM._$AU;
|
|
567
574
|
}
|
|
568
575
|
_$AT(t, n, i) {
|
|
569
|
-
this.
|
|
576
|
+
this._$Ct = t, this._$AM = n, this._$Ci = i;
|
|
570
577
|
}
|
|
571
578
|
_$AS(t, n) {
|
|
572
579
|
return this.update(t, n);
|
|
@@ -580,12 +587,12 @@ class qn {
|
|
|
580
587
|
* Copyright 2020 Google LLC
|
|
581
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
582
589
|
*/
|
|
583
|
-
const { I:
|
|
590
|
+
const { I: ur } = ar, dr = (e) => e.strings === void 0, yi = () => document.createComment(""), ie = (e, t, n) => {
|
|
584
591
|
var r;
|
|
585
592
|
const i = e._$AA.parentNode, o = t === void 0 ? e._$AB : t._$AA;
|
|
586
593
|
if (n === void 0) {
|
|
587
|
-
const s = i.insertBefore(
|
|
588
|
-
n = new
|
|
594
|
+
const s = i.insertBefore(yi(), o), a = i.insertBefore(yi(), o);
|
|
595
|
+
n = new ur(s, a, e, e.options);
|
|
589
596
|
} else {
|
|
590
597
|
const s = n._$AB.nextSibling, a = n._$AM, l = a !== e;
|
|
591
598
|
if (l) {
|
|
@@ -601,7 +608,7 @@ const { I: rr } = ir, sr = (e) => e.strings === void 0, hi = () => document.crea
|
|
|
601
608
|
}
|
|
602
609
|
}
|
|
603
610
|
return n;
|
|
604
|
-
},
|
|
611
|
+
}, Rt = (e, t, n = e) => (e._$AI(t, n), e), cr = {}, Yi = (e, t = cr) => e._$AH = t, hr = (e) => e._$AH, xn = (e) => {
|
|
605
612
|
var i;
|
|
606
613
|
(i = e._$AP) == null || i.call(e, !1, !0);
|
|
607
614
|
let t = e._$AA;
|
|
@@ -616,13 +623,13 @@ const { I: rr } = ir, sr = (e) => e.strings === void 0, hi = () => document.crea
|
|
|
616
623
|
* Copyright 2017 Google LLC
|
|
617
624
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
618
625
|
*/
|
|
619
|
-
const
|
|
626
|
+
const bi = (e, t, n) => {
|
|
620
627
|
const i = /* @__PURE__ */ new Map();
|
|
621
628
|
for (let o = t; o <= n; o++) i.set(e[o], o);
|
|
622
629
|
return i;
|
|
623
|
-
},
|
|
630
|
+
}, pr = Gn(class extends Jn {
|
|
624
631
|
constructor(e) {
|
|
625
|
-
if (super(e), e.type !==
|
|
632
|
+
if (super(e), e.type !== xt.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
626
633
|
}
|
|
627
634
|
dt(e, t, n) {
|
|
628
635
|
let i;
|
|
@@ -636,34 +643,34 @@ const pi = (e, t, n) => {
|
|
|
636
643
|
return this.dt(e, t, n).values;
|
|
637
644
|
}
|
|
638
645
|
update(e, [t, n, i]) {
|
|
639
|
-
const o =
|
|
646
|
+
const o = hr(e), { values: r, keys: s } = this.dt(t, n, i);
|
|
640
647
|
if (!Array.isArray(o)) return this.ut = s, r;
|
|
641
648
|
const a = this.ut ?? (this.ut = []), l = [];
|
|
642
649
|
let u, c, d = 0, p = o.length - 1, f = 0, g = r.length - 1;
|
|
643
650
|
for (; d <= p && f <= g; ) if (o[d] === null) d++;
|
|
644
651
|
else if (o[p] === null) p--;
|
|
645
|
-
else if (a[d] === s[f]) l[f] =
|
|
646
|
-
else if (a[p] === s[g]) l[g] =
|
|
647
|
-
else if (a[d] === s[g]) l[g] =
|
|
648
|
-
else if (a[p] === s[f]) l[f] =
|
|
649
|
-
else if (u === void 0 && (u =
|
|
650
|
-
const y = c.get(s[f]),
|
|
651
|
-
if (
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
-
} else l[f] =
|
|
652
|
+
else if (a[d] === s[f]) l[f] = Rt(o[d], r[f]), d++, f++;
|
|
653
|
+
else if (a[p] === s[g]) l[g] = Rt(o[p], r[g]), p--, g--;
|
|
654
|
+
else if (a[d] === s[g]) l[g] = Rt(o[d], r[g]), ie(e, l[g + 1], o[d]), d++, g--;
|
|
655
|
+
else if (a[p] === s[f]) l[f] = Rt(o[p], r[f]), ie(e, o[d], o[p]), p--, f++;
|
|
656
|
+
else if (u === void 0 && (u = bi(s, f, g), c = bi(a, d, p)), u.has(a[d])) if (u.has(a[p])) {
|
|
657
|
+
const y = c.get(s[f]), D = y !== void 0 ? o[y] : null;
|
|
658
|
+
if (D === null) {
|
|
659
|
+
const M = ie(e, o[d]);
|
|
660
|
+
Rt(M, r[f]), l[f] = M;
|
|
661
|
+
} else l[f] = Rt(D, r[f]), ie(e, o[d], D), o[y] = null;
|
|
655
662
|
f++;
|
|
656
|
-
} else
|
|
657
|
-
else
|
|
663
|
+
} else xn(o[p]), p--;
|
|
664
|
+
else xn(o[d]), d++;
|
|
658
665
|
for (; f <= g; ) {
|
|
659
|
-
const y =
|
|
660
|
-
|
|
666
|
+
const y = ie(e, l[g + 1]);
|
|
667
|
+
Rt(y, r[f]), l[f++] = y;
|
|
661
668
|
}
|
|
662
669
|
for (; d <= p; ) {
|
|
663
670
|
const y = o[d++];
|
|
664
|
-
y !== null &&
|
|
671
|
+
y !== null && xn(y);
|
|
665
672
|
}
|
|
666
|
-
return this.ut = s,
|
|
673
|
+
return this.ut = s, Yi(e, l), at;
|
|
667
674
|
}
|
|
668
675
|
});
|
|
669
676
|
/**
|
|
@@ -672,8 +679,8 @@ const pi = (e, t, n) => {
|
|
|
672
679
|
* @license BSD-2-Clause
|
|
673
680
|
* @preserve
|
|
674
681
|
*/
|
|
675
|
-
var
|
|
676
|
-
const
|
|
682
|
+
var E = (e) => e !== void 0, Wi = (e, t, n) => t in e ? e[t] : e[t] = n;
|
|
683
|
+
const ye = {
|
|
677
684
|
ELEMENT: 1,
|
|
678
685
|
ATTRIBUTE: 2,
|
|
679
686
|
TEXT: 3,
|
|
@@ -687,7 +694,7 @@ const ge = {
|
|
|
687
694
|
DOCUMENT_FRAGMENT: 11,
|
|
688
695
|
NOTATION: 12
|
|
689
696
|
};
|
|
690
|
-
class
|
|
697
|
+
class fr {
|
|
691
698
|
/**
|
|
692
699
|
* XML DOM parser
|
|
693
700
|
* @constructor
|
|
@@ -712,56 +719,56 @@ class dr {
|
|
|
712
719
|
* @api
|
|
713
720
|
*/
|
|
714
721
|
getAllTextContent(t, n) {
|
|
715
|
-
return
|
|
722
|
+
return gn(t, n).join("");
|
|
716
723
|
}
|
|
717
724
|
}
|
|
718
|
-
function
|
|
719
|
-
return
|
|
725
|
+
function gn(e, t) {
|
|
726
|
+
return Gi(e, t, []).join("");
|
|
720
727
|
}
|
|
721
|
-
function
|
|
722
|
-
if (e.nodeType ===
|
|
728
|
+
function Gi(e, t, n) {
|
|
729
|
+
if (e.nodeType === ye.CDATA_SECTION || e.nodeType === ye.TEXT)
|
|
723
730
|
t ? n.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : n.push(e.nodeValue);
|
|
724
731
|
else {
|
|
725
732
|
var i;
|
|
726
733
|
for (i = e.firstChild; i; i = i.nextSibling)
|
|
727
|
-
|
|
734
|
+
Gi(i, t, n);
|
|
728
735
|
}
|
|
729
736
|
return n;
|
|
730
737
|
}
|
|
731
|
-
function
|
|
732
|
-
for (var o =
|
|
738
|
+
function gr(e, t, n, i) {
|
|
739
|
+
for (var o = mr(t); o; o = yr(o)) {
|
|
733
740
|
var r = o.namespaceURI || null, s = e[r];
|
|
734
|
-
if (
|
|
741
|
+
if (E(s)) {
|
|
735
742
|
var a = s[o.localName];
|
|
736
|
-
|
|
743
|
+
E(a) && a.call(i, o, n);
|
|
737
744
|
}
|
|
738
745
|
}
|
|
739
746
|
}
|
|
740
|
-
function
|
|
747
|
+
function mr(e) {
|
|
741
748
|
let t = e.firstElementChild || e.firstChild;
|
|
742
|
-
for (; t && t.nodeType !==
|
|
749
|
+
for (; t && t.nodeType !== ye.ELEMENT; )
|
|
743
750
|
t = t.nextSibling;
|
|
744
751
|
return t;
|
|
745
752
|
}
|
|
746
|
-
function
|
|
753
|
+
function yr(e) {
|
|
747
754
|
let t = e.nextElementSibling || e.nextSibling;
|
|
748
|
-
for (; t && t.nodeType !==
|
|
755
|
+
for (; t && t.nodeType !== ye.ELEMENT; )
|
|
749
756
|
t = t.nextSibling;
|
|
750
757
|
return t;
|
|
751
758
|
}
|
|
752
|
-
function
|
|
759
|
+
function Y(e, t, n) {
|
|
753
760
|
return (
|
|
754
761
|
/** @type {Object.<string, Object.<string, XMLParser.Parser>>} */
|
|
755
|
-
|
|
762
|
+
br(e, t, n)
|
|
756
763
|
);
|
|
757
764
|
}
|
|
758
|
-
function
|
|
759
|
-
var i =
|
|
765
|
+
function br(e, t, n) {
|
|
766
|
+
var i = E(n) ? n : {}, o, r;
|
|
760
767
|
for (o = 0, r = e.length; o < r; ++o)
|
|
761
768
|
i[e[o]] = t;
|
|
762
769
|
return i;
|
|
763
770
|
}
|
|
764
|
-
function
|
|
771
|
+
function Ji(e, t) {
|
|
765
772
|
return (
|
|
766
773
|
/**
|
|
767
774
|
* @param {Node} node Node.
|
|
@@ -769,19 +776,19 @@ function Xi(e, t) {
|
|
|
769
776
|
*/
|
|
770
777
|
function(n, i) {
|
|
771
778
|
var o = e.call(
|
|
772
|
-
|
|
779
|
+
E(t) ? t : this,
|
|
773
780
|
n,
|
|
774
781
|
i
|
|
775
782
|
);
|
|
776
|
-
if (
|
|
783
|
+
if (E(o)) {
|
|
777
784
|
var r = i[i.length - 1];
|
|
778
785
|
r.push(o);
|
|
779
786
|
}
|
|
780
787
|
}
|
|
781
788
|
);
|
|
782
789
|
}
|
|
783
|
-
function
|
|
784
|
-
return i.push(e),
|
|
790
|
+
function j(e, t, n, i, o) {
|
|
791
|
+
return i.push(e), gr(t, n, i, o), i.pop();
|
|
785
792
|
}
|
|
786
793
|
function m(e, t, n) {
|
|
787
794
|
return (
|
|
@@ -791,21 +798,21 @@ function m(e, t, n) {
|
|
|
791
798
|
*/
|
|
792
799
|
function(i, o) {
|
|
793
800
|
let r = e.call(
|
|
794
|
-
|
|
801
|
+
E(n) ? n : this,
|
|
795
802
|
i,
|
|
796
803
|
o
|
|
797
804
|
);
|
|
798
|
-
if (
|
|
805
|
+
if (E(r)) {
|
|
799
806
|
var s = (
|
|
800
807
|
/** @type {Object} */
|
|
801
808
|
o[o.length - 1]
|
|
802
|
-
), a =
|
|
809
|
+
), a = E(t) ? t : i.localName;
|
|
803
810
|
s[a] = r;
|
|
804
811
|
}
|
|
805
812
|
}
|
|
806
813
|
);
|
|
807
814
|
}
|
|
808
|
-
function
|
|
815
|
+
function nt(e, t, n) {
|
|
809
816
|
return (
|
|
810
817
|
/**
|
|
811
818
|
* @param {Node} node Node.
|
|
@@ -813,67 +820,67 @@ function et(e, t, n) {
|
|
|
813
820
|
*/
|
|
814
821
|
function(i, o) {
|
|
815
822
|
var r = e.call(
|
|
816
|
-
|
|
823
|
+
E(n) ? n : this,
|
|
817
824
|
i,
|
|
818
825
|
o
|
|
819
826
|
);
|
|
820
|
-
if (
|
|
827
|
+
if (E(r)) {
|
|
821
828
|
var s = (
|
|
822
829
|
/** @type {Object} */
|
|
823
830
|
o[o.length - 1]
|
|
824
|
-
), a =
|
|
831
|
+
), a = E(t) ? t : i.localName, l = Wi(s, a, []);
|
|
825
832
|
l.push(r);
|
|
826
833
|
}
|
|
827
834
|
}
|
|
828
835
|
);
|
|
829
836
|
}
|
|
830
|
-
const
|
|
831
|
-
function
|
|
832
|
-
return e.replace(
|
|
837
|
+
const vr = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
|
838
|
+
function wr(e) {
|
|
839
|
+
return e.replace(vr, "");
|
|
833
840
|
}
|
|
834
841
|
function Ht(e) {
|
|
835
842
|
const t = /^\s*(true|1)|(false|0)\s*$/.exec(e);
|
|
836
843
|
if (t)
|
|
837
|
-
return
|
|
844
|
+
return E(t[1]) || !1;
|
|
838
845
|
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
846
|
+
function zt(e) {
|
|
847
|
+
return gt(gn(e, !1));
|
|
841
848
|
}
|
|
842
|
-
function
|
|
849
|
+
function gt(e) {
|
|
843
850
|
const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(e);
|
|
844
851
|
if (t)
|
|
845
852
|
return parseFloat(t[1]);
|
|
846
853
|
}
|
|
847
|
-
function
|
|
848
|
-
return
|
|
854
|
+
function En(e) {
|
|
855
|
+
return ke(gn(e, !1));
|
|
849
856
|
}
|
|
850
|
-
function
|
|
857
|
+
function ke(e) {
|
|
851
858
|
const t = /^\s*(\d+)\s*$/.exec(e);
|
|
852
859
|
if (t)
|
|
853
860
|
return parseInt(t[1], 10);
|
|
854
861
|
}
|
|
855
|
-
function
|
|
856
|
-
return
|
|
862
|
+
function _(e) {
|
|
863
|
+
return wr(gn(e, !1));
|
|
857
864
|
}
|
|
858
|
-
const
|
|
859
|
-
function
|
|
860
|
-
return e.getAttributeNS(
|
|
865
|
+
const $r = "http://www.w3.org/1999/xlink";
|
|
866
|
+
function Kn(e) {
|
|
867
|
+
return e.getAttributeNS($r, "href");
|
|
861
868
|
}
|
|
862
|
-
function
|
|
863
|
-
return
|
|
869
|
+
function xr(e, t) {
|
|
870
|
+
return j({}, Wr, e, t);
|
|
864
871
|
}
|
|
865
|
-
function
|
|
872
|
+
function Ki(e) {
|
|
866
873
|
return [
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
874
|
+
gt(e.getAttribute("minx")),
|
|
875
|
+
gt(e.getAttribute("miny")),
|
|
876
|
+
gt(e.getAttribute("maxx")),
|
|
877
|
+
gt(e.getAttribute("maxy"))
|
|
871
878
|
];
|
|
872
879
|
}
|
|
873
|
-
function
|
|
874
|
-
const n =
|
|
875
|
-
|
|
876
|
-
|
|
880
|
+
function Er(e, t) {
|
|
881
|
+
const n = Ki(e), i = [
|
|
882
|
+
gt(e.getAttribute("resx")),
|
|
883
|
+
gt(e.getAttribute("resy"))
|
|
877
884
|
];
|
|
878
885
|
return {
|
|
879
886
|
crs: e.getAttribute("CRS") || e.getAttribute("SRS"),
|
|
@@ -881,23 +888,23 @@ function vr(e, t) {
|
|
|
881
888
|
res: i
|
|
882
889
|
};
|
|
883
890
|
}
|
|
884
|
-
function
|
|
885
|
-
const n =
|
|
886
|
-
if (!(!
|
|
891
|
+
function Sr(e, t) {
|
|
892
|
+
const n = Ki(e);
|
|
893
|
+
if (!(!E(n[0]) || !E(n[1]) || !E(n[2]) || !E(n[3])))
|
|
887
894
|
return n;
|
|
888
895
|
}
|
|
889
|
-
function
|
|
896
|
+
function Ar(e, t) {
|
|
890
897
|
const n = parseFloat(e.getAttribute("min")), i = parseFloat(e.getAttribute("max"));
|
|
891
898
|
return { min: n, max: i };
|
|
892
899
|
}
|
|
893
|
-
function
|
|
894
|
-
const n =
|
|
900
|
+
function _r(e, t) {
|
|
901
|
+
const n = j(
|
|
895
902
|
{},
|
|
896
|
-
|
|
903
|
+
Gr,
|
|
897
904
|
e,
|
|
898
905
|
t
|
|
899
906
|
);
|
|
900
|
-
if (!
|
|
907
|
+
if (!E(n)) return;
|
|
901
908
|
const i = (
|
|
902
909
|
/** @type {number|undefined} */
|
|
903
910
|
n.westBoundLongitude
|
|
@@ -911,7 +918,7 @@ function xr(e, t) {
|
|
|
911
918
|
/** @type {number|undefined} */
|
|
912
919
|
n.northBoundLatitude
|
|
913
920
|
);
|
|
914
|
-
if (!(!
|
|
921
|
+
if (!(!E(i) || !E(o) || !E(r) || !E(s)))
|
|
915
922
|
return [
|
|
916
923
|
i,
|
|
917
924
|
o,
|
|
@@ -919,88 +926,88 @@ function xr(e, t) {
|
|
|
919
926
|
s
|
|
920
927
|
];
|
|
921
928
|
}
|
|
922
|
-
function
|
|
923
|
-
return
|
|
929
|
+
function Cr(e, t) {
|
|
930
|
+
return j({}, jr, e, t);
|
|
924
931
|
}
|
|
925
|
-
function
|
|
926
|
-
return
|
|
932
|
+
function Tr(e, t) {
|
|
933
|
+
return j({}, Zr, e, t);
|
|
927
934
|
}
|
|
928
|
-
function
|
|
929
|
-
return
|
|
935
|
+
function Pr(e, t) {
|
|
936
|
+
return j(
|
|
930
937
|
{},
|
|
931
|
-
|
|
938
|
+
zr,
|
|
932
939
|
e,
|
|
933
940
|
t
|
|
934
941
|
);
|
|
935
942
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
943
|
+
function Dr(e, t) {
|
|
944
|
+
return j(
|
|
938
945
|
{},
|
|
939
|
-
|
|
946
|
+
Xr,
|
|
940
947
|
e,
|
|
941
948
|
t
|
|
942
949
|
);
|
|
943
950
|
}
|
|
944
|
-
function
|
|
945
|
-
return
|
|
951
|
+
function Or(e, t) {
|
|
952
|
+
return j(
|
|
946
953
|
{},
|
|
947
|
-
|
|
954
|
+
qr,
|
|
948
955
|
e,
|
|
949
956
|
t
|
|
950
957
|
);
|
|
951
958
|
}
|
|
952
|
-
function
|
|
953
|
-
return
|
|
959
|
+
function Rr(e, t) {
|
|
960
|
+
return j(
|
|
954
961
|
[],
|
|
955
|
-
|
|
962
|
+
Yr,
|
|
956
963
|
e,
|
|
957
964
|
t
|
|
958
965
|
);
|
|
959
966
|
}
|
|
960
|
-
function
|
|
967
|
+
function Lr(e, t) {
|
|
961
968
|
const n = Ht(e.getAttribute("queryable"));
|
|
962
|
-
return
|
|
969
|
+
return j(
|
|
963
970
|
{
|
|
964
|
-
queryable:
|
|
971
|
+
queryable: E(n) ? n : !1
|
|
965
972
|
},
|
|
966
|
-
|
|
973
|
+
eo,
|
|
967
974
|
e,
|
|
968
975
|
t
|
|
969
976
|
);
|
|
970
977
|
}
|
|
971
|
-
function
|
|
978
|
+
function Mr(e, t) {
|
|
972
979
|
var n = (
|
|
973
980
|
/** @type {Object.<string,*>} */
|
|
974
981
|
t[t.length - 1]
|
|
975
982
|
);
|
|
976
983
|
const i = (
|
|
977
984
|
/** @type {Object.<string,*>} */
|
|
978
|
-
|
|
985
|
+
j(
|
|
979
986
|
{},
|
|
980
|
-
|
|
987
|
+
eo,
|
|
981
988
|
e,
|
|
982
989
|
t
|
|
983
990
|
)
|
|
984
991
|
);
|
|
985
|
-
if (!
|
|
992
|
+
if (!E(i)) return;
|
|
986
993
|
let o = Ht(e.getAttribute("queryable"));
|
|
987
|
-
|
|
988
|
-
let r =
|
|
989
|
-
|
|
994
|
+
E(o) || (o = n.queryable), i.queryable = E(o) ? o : !1;
|
|
995
|
+
let r = ke(e.getAttribute("cascaded"));
|
|
996
|
+
E(r) || (r = n.cascaded), i.cascaded = r;
|
|
990
997
|
let s = Ht(e.getAttribute("opaque"));
|
|
991
|
-
|
|
998
|
+
E(s) || (s = n.opaque), i.opaque = E(s) ? s : !1;
|
|
992
999
|
let a = Ht(e.getAttribute("noSubsets"));
|
|
993
|
-
|
|
994
|
-
let l =
|
|
995
|
-
|
|
996
|
-
let u =
|
|
997
|
-
|
|
1000
|
+
E(a) || (a = n.noSubsets), i.noSubsets = E(a) ? a : !1;
|
|
1001
|
+
let l = gt(e.getAttribute("fixedWidth"));
|
|
1002
|
+
E(l) || (l = n.fixedWidth), i.fixedWidth = l;
|
|
1003
|
+
let u = gt(e.getAttribute("fixedHeight"));
|
|
1004
|
+
E(u) || (u = n.fixedHeight), i.fixedHeight = u;
|
|
998
1005
|
const c = ["Style", "CRS", "AuthorityURL"];
|
|
999
1006
|
for (let p = 0, f = c.length; p < f; p++) {
|
|
1000
1007
|
const g = c[p], y = n[g];
|
|
1001
|
-
if (
|
|
1002
|
-
let
|
|
1003
|
-
|
|
1008
|
+
if (E(y)) {
|
|
1009
|
+
let D = Wi(i, g, []);
|
|
1010
|
+
D = D.concat(y), i[g] = D;
|
|
1004
1011
|
}
|
|
1005
1012
|
}
|
|
1006
1013
|
const d = [
|
|
@@ -1013,14 +1020,14 @@ function Or(e, t) {
|
|
|
1013
1020
|
];
|
|
1014
1021
|
for (let p = 0, f = d.length; p < f; p++) {
|
|
1015
1022
|
const g = d[p], y = i[g];
|
|
1016
|
-
if (!
|
|
1017
|
-
const
|
|
1018
|
-
i[g] =
|
|
1023
|
+
if (!E(y)) {
|
|
1024
|
+
const D = n[g];
|
|
1025
|
+
i[g] = D;
|
|
1019
1026
|
}
|
|
1020
1027
|
}
|
|
1021
1028
|
return i;
|
|
1022
1029
|
}
|
|
1023
|
-
function
|
|
1030
|
+
function Ir(e, t) {
|
|
1024
1031
|
return {
|
|
1025
1032
|
name: e.getAttribute("name"),
|
|
1026
1033
|
units: e.getAttribute("units"),
|
|
@@ -1029,220 +1036,220 @@ function Dr(e, t) {
|
|
|
1029
1036
|
multipleValues: Ht(e.getAttribute("multipleValues")),
|
|
1030
1037
|
nearestValue: Ht(e.getAttribute("nearestValue")),
|
|
1031
1038
|
current: Ht(e.getAttribute("current")),
|
|
1032
|
-
values:
|
|
1039
|
+
values: _(e)
|
|
1033
1040
|
};
|
|
1034
1041
|
}
|
|
1035
|
-
function
|
|
1036
|
-
return
|
|
1042
|
+
function yt(e, t) {
|
|
1043
|
+
return j(
|
|
1037
1044
|
{},
|
|
1038
|
-
|
|
1045
|
+
ns,
|
|
1039
1046
|
e,
|
|
1040
1047
|
t
|
|
1041
1048
|
);
|
|
1042
1049
|
}
|
|
1043
|
-
function
|
|
1044
|
-
return
|
|
1050
|
+
function Nr(e, t) {
|
|
1051
|
+
return j({}, Jr, e, t);
|
|
1045
1052
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return
|
|
1053
|
+
function Hr(e, t) {
|
|
1054
|
+
return j({}, Qr, e, t);
|
|
1048
1055
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return
|
|
1056
|
+
function Vr(e, t) {
|
|
1057
|
+
return j({}, ts, e, t);
|
|
1051
1058
|
}
|
|
1052
|
-
function
|
|
1053
|
-
return
|
|
1059
|
+
function Sn(e, t) {
|
|
1060
|
+
return j({}, Kr, e, t);
|
|
1054
1061
|
}
|
|
1055
|
-
function
|
|
1056
|
-
var n =
|
|
1057
|
-
if (
|
|
1062
|
+
function Qi(e, t) {
|
|
1063
|
+
var n = yt(e, t);
|
|
1064
|
+
if (E(n)) {
|
|
1058
1065
|
const i = [
|
|
1059
|
-
|
|
1060
|
-
|
|
1066
|
+
ke(e.getAttribute("width")),
|
|
1067
|
+
ke(e.getAttribute("height"))
|
|
1061
1068
|
];
|
|
1062
1069
|
return n.size = i, n;
|
|
1063
1070
|
}
|
|
1064
1071
|
}
|
|
1065
|
-
function
|
|
1066
|
-
var n =
|
|
1067
|
-
if (
|
|
1072
|
+
function Br(e, t) {
|
|
1073
|
+
var n = yt(e, t);
|
|
1074
|
+
if (E(n))
|
|
1068
1075
|
return n.name = e.getAttribute("name"), n;
|
|
1069
1076
|
}
|
|
1070
|
-
function
|
|
1071
|
-
var n =
|
|
1072
|
-
if (
|
|
1077
|
+
function kr(e, t) {
|
|
1078
|
+
var n = yt(e, t);
|
|
1079
|
+
if (E(n))
|
|
1073
1080
|
return n.type = e.getAttribute("type"), n;
|
|
1074
1081
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1082
|
+
function Ur(e, t) {
|
|
1083
|
+
return j({}, es, e, t);
|
|
1077
1084
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
1085
|
+
function to(e, t) {
|
|
1086
|
+
return j(
|
|
1080
1087
|
[],
|
|
1081
|
-
|
|
1088
|
+
is,
|
|
1082
1089
|
e,
|
|
1083
1090
|
t
|
|
1084
1091
|
);
|
|
1085
1092
|
}
|
|
1086
|
-
const
|
|
1093
|
+
const W = [
|
|
1087
1094
|
null,
|
|
1088
1095
|
"http://www.opengis.net/wms"
|
|
1089
|
-
],
|
|
1090
|
-
|
|
1096
|
+
], Fr = Y(
|
|
1097
|
+
W,
|
|
1091
1098
|
{
|
|
1092
|
-
Service: m(
|
|
1093
|
-
Capability: m(
|
|
1099
|
+
Service: m(Tr),
|
|
1100
|
+
Capability: m(Cr)
|
|
1094
1101
|
}
|
|
1095
|
-
),
|
|
1096
|
-
|
|
1102
|
+
), jr = Y(
|
|
1103
|
+
W,
|
|
1097
1104
|
{
|
|
1098
|
-
Request: m(
|
|
1099
|
-
Exception: m(
|
|
1100
|
-
Layer: m(
|
|
1105
|
+
Request: m(Nr),
|
|
1106
|
+
Exception: m(Rr),
|
|
1107
|
+
Layer: m(Lr)
|
|
1101
1108
|
}
|
|
1102
|
-
),
|
|
1103
|
-
|
|
1109
|
+
), Zr = Y(
|
|
1110
|
+
W,
|
|
1104
1111
|
{
|
|
1105
|
-
Name: m(
|
|
1106
|
-
Title: m(
|
|
1107
|
-
Abstract: m(
|
|
1108
|
-
KeywordList: m(
|
|
1109
|
-
OnlineResource: m(
|
|
1110
|
-
ContactInformation: m(
|
|
1111
|
-
Fees: m(
|
|
1112
|
-
AccessConstraints: m(
|
|
1113
|
-
LayerLimit: m(
|
|
1114
|
-
MaxWidth: m(
|
|
1115
|
-
MaxHeight: m(
|
|
1116
|
-
}
|
|
1117
|
-
),
|
|
1118
|
-
|
|
1112
|
+
Name: m(_),
|
|
1113
|
+
Title: m(_),
|
|
1114
|
+
Abstract: m(_),
|
|
1115
|
+
KeywordList: m(to),
|
|
1116
|
+
OnlineResource: m(Kn),
|
|
1117
|
+
ContactInformation: m(Pr),
|
|
1118
|
+
Fees: m(_),
|
|
1119
|
+
AccessConstraints: m(_),
|
|
1120
|
+
LayerLimit: m(En),
|
|
1121
|
+
MaxWidth: m(En),
|
|
1122
|
+
MaxHeight: m(En)
|
|
1123
|
+
}
|
|
1124
|
+
), zr = Y(
|
|
1125
|
+
W,
|
|
1119
1126
|
{
|
|
1120
|
-
ContactPersonPrimary: m(
|
|
1121
|
-
ContactPosition: m(
|
|
1122
|
-
ContactAddress: m(
|
|
1123
|
-
ContactVoiceTelephone: m(
|
|
1124
|
-
ContactFacsimileTelephone: m(
|
|
1125
|
-
ContactElectronicMailAddress: m(
|
|
1126
|
-
}
|
|
1127
|
-
),
|
|
1128
|
-
|
|
1127
|
+
ContactPersonPrimary: m(Dr),
|
|
1128
|
+
ContactPosition: m(_),
|
|
1129
|
+
ContactAddress: m(Or),
|
|
1130
|
+
ContactVoiceTelephone: m(_),
|
|
1131
|
+
ContactFacsimileTelephone: m(_),
|
|
1132
|
+
ContactElectronicMailAddress: m(_)
|
|
1133
|
+
}
|
|
1134
|
+
), Xr = Y(
|
|
1135
|
+
W,
|
|
1129
1136
|
{
|
|
1130
|
-
ContactPerson: m(
|
|
1131
|
-
ContactOrganization: m(
|
|
1137
|
+
ContactPerson: m(_),
|
|
1138
|
+
ContactOrganization: m(_)
|
|
1132
1139
|
}
|
|
1133
|
-
),
|
|
1134
|
-
|
|
1140
|
+
), qr = Y(
|
|
1141
|
+
W,
|
|
1135
1142
|
{
|
|
1136
|
-
AddressType: m(
|
|
1137
|
-
Address: m(
|
|
1138
|
-
City: m(
|
|
1139
|
-
StateOrProvince: m(
|
|
1140
|
-
PostCode: m(
|
|
1141
|
-
Country: m(
|
|
1142
|
-
}
|
|
1143
|
-
),
|
|
1144
|
-
|
|
1143
|
+
AddressType: m(_),
|
|
1144
|
+
Address: m(_),
|
|
1145
|
+
City: m(_),
|
|
1146
|
+
StateOrProvince: m(_),
|
|
1147
|
+
PostCode: m(_),
|
|
1148
|
+
Country: m(_)
|
|
1149
|
+
}
|
|
1150
|
+
), Yr = Y(
|
|
1151
|
+
W,
|
|
1145
1152
|
{
|
|
1146
|
-
Format:
|
|
1153
|
+
Format: Ji(_)
|
|
1147
1154
|
}
|
|
1148
|
-
),
|
|
1149
|
-
|
|
1155
|
+
), eo = Y(
|
|
1156
|
+
W,
|
|
1150
1157
|
{
|
|
1151
|
-
Name: m(
|
|
1152
|
-
Title: m(
|
|
1153
|
-
Abstract: m(
|
|
1154
|
-
KeywordList: m(
|
|
1155
|
-
CRS:
|
|
1156
|
-
SRS:
|
|
1157
|
-
EX_GeographicBoundingBox: m(
|
|
1158
|
-
LatLonBoundingBox: m(
|
|
1159
|
-
BoundingBox:
|
|
1160
|
-
Dimension:
|
|
1161
|
-
Attribution: m(
|
|
1162
|
-
AuthorityURL:
|
|
1163
|
-
Identifier:
|
|
1164
|
-
MetadataURL:
|
|
1165
|
-
DataURL:
|
|
1166
|
-
FeatureListURL:
|
|
1167
|
-
Style:
|
|
1168
|
-
MinScaleDenominator: m(
|
|
1169
|
-
MaxScaleDenominator: m(
|
|
1170
|
-
ScaleHint: m(
|
|
1171
|
-
Layer:
|
|
1172
|
-
}
|
|
1173
|
-
),
|
|
1174
|
-
|
|
1158
|
+
Name: m(_),
|
|
1159
|
+
Title: m(_),
|
|
1160
|
+
Abstract: m(_),
|
|
1161
|
+
KeywordList: m(to),
|
|
1162
|
+
CRS: nt(_),
|
|
1163
|
+
SRS: nt(_),
|
|
1164
|
+
EX_GeographicBoundingBox: m(_r),
|
|
1165
|
+
LatLonBoundingBox: m(Sr),
|
|
1166
|
+
BoundingBox: nt(Er),
|
|
1167
|
+
Dimension: nt(Ir),
|
|
1168
|
+
Attribution: m(xr),
|
|
1169
|
+
AuthorityURL: nt(Br),
|
|
1170
|
+
Identifier: nt(_),
|
|
1171
|
+
MetadataURL: nt(kr),
|
|
1172
|
+
DataURL: nt(yt),
|
|
1173
|
+
FeatureListURL: nt(yt),
|
|
1174
|
+
Style: nt(Ur),
|
|
1175
|
+
MinScaleDenominator: m(zt),
|
|
1176
|
+
MaxScaleDenominator: m(zt),
|
|
1177
|
+
ScaleHint: m(Ar),
|
|
1178
|
+
Layer: nt(Mr)
|
|
1179
|
+
}
|
|
1180
|
+
), Wr = Y(
|
|
1181
|
+
W,
|
|
1175
1182
|
{
|
|
1176
|
-
Title: m(
|
|
1177
|
-
OnlineResource: m(
|
|
1178
|
-
LogoURL: m(
|
|
1179
|
-
}
|
|
1180
|
-
),
|
|
1181
|
-
westBoundLongitude: m(
|
|
1182
|
-
eastBoundLongitude: m(
|
|
1183
|
-
southBoundLatitude: m(
|
|
1184
|
-
northBoundLatitude: m(
|
|
1185
|
-
}),
|
|
1186
|
-
|
|
1183
|
+
Title: m(_),
|
|
1184
|
+
OnlineResource: m(Kn),
|
|
1185
|
+
LogoURL: m(Qi)
|
|
1186
|
+
}
|
|
1187
|
+
), Gr = Y(W, {
|
|
1188
|
+
westBoundLongitude: m(zt),
|
|
1189
|
+
eastBoundLongitude: m(zt),
|
|
1190
|
+
southBoundLatitude: m(zt),
|
|
1191
|
+
northBoundLatitude: m(zt)
|
|
1192
|
+
}), Jr = Y(
|
|
1193
|
+
W,
|
|
1187
1194
|
{
|
|
1188
1195
|
GetCapabilities: m(
|
|
1189
|
-
|
|
1196
|
+
Sn
|
|
1190
1197
|
),
|
|
1191
1198
|
GetMap: m(
|
|
1192
|
-
|
|
1199
|
+
Sn
|
|
1193
1200
|
),
|
|
1194
1201
|
GetFeatureInfo: m(
|
|
1195
|
-
|
|
1202
|
+
Sn
|
|
1196
1203
|
)
|
|
1197
1204
|
}
|
|
1198
|
-
),
|
|
1199
|
-
|
|
1205
|
+
), Kr = Y(
|
|
1206
|
+
W,
|
|
1200
1207
|
{
|
|
1201
|
-
Format:
|
|
1202
|
-
DCPType:
|
|
1203
|
-
|
|
1208
|
+
Format: nt(_),
|
|
1209
|
+
DCPType: nt(
|
|
1210
|
+
Hr
|
|
1204
1211
|
)
|
|
1205
1212
|
}
|
|
1206
|
-
),
|
|
1207
|
-
|
|
1213
|
+
), Qr = Y(
|
|
1214
|
+
W,
|
|
1208
1215
|
{
|
|
1209
1216
|
HTTP: m(
|
|
1210
|
-
|
|
1217
|
+
Vr
|
|
1211
1218
|
)
|
|
1212
1219
|
}
|
|
1213
|
-
),
|
|
1214
|
-
|
|
1220
|
+
), ts = Y(
|
|
1221
|
+
W,
|
|
1215
1222
|
{
|
|
1216
1223
|
Get: m(
|
|
1217
|
-
|
|
1224
|
+
yt
|
|
1218
1225
|
),
|
|
1219
1226
|
Post: m(
|
|
1220
|
-
|
|
1227
|
+
yt
|
|
1221
1228
|
)
|
|
1222
1229
|
}
|
|
1223
|
-
),
|
|
1224
|
-
|
|
1230
|
+
), es = Y(
|
|
1231
|
+
W,
|
|
1225
1232
|
{
|
|
1226
|
-
Name: m(
|
|
1227
|
-
Title: m(
|
|
1228
|
-
Abstract: m(
|
|
1229
|
-
LegendURL:
|
|
1230
|
-
StyleSheetURL: m(
|
|
1231
|
-
StyleURL: m(
|
|
1232
|
-
}
|
|
1233
|
-
),
|
|
1234
|
-
|
|
1233
|
+
Name: m(_),
|
|
1234
|
+
Title: m(_),
|
|
1235
|
+
Abstract: m(_),
|
|
1236
|
+
LegendURL: nt(Qi),
|
|
1237
|
+
StyleSheetURL: m(yt),
|
|
1238
|
+
StyleURL: m(yt)
|
|
1239
|
+
}
|
|
1240
|
+
), ns = Y(
|
|
1241
|
+
W,
|
|
1235
1242
|
{
|
|
1236
|
-
Format: m(
|
|
1237
|
-
OnlineResource: m(
|
|
1243
|
+
Format: m(_),
|
|
1244
|
+
OnlineResource: m(Kn)
|
|
1238
1245
|
}
|
|
1239
|
-
),
|
|
1240
|
-
|
|
1246
|
+
), is = Y(
|
|
1247
|
+
W,
|
|
1241
1248
|
{
|
|
1242
|
-
Keyword:
|
|
1249
|
+
Keyword: Ji(_)
|
|
1243
1250
|
}
|
|
1244
1251
|
);
|
|
1245
|
-
class
|
|
1252
|
+
class os {
|
|
1246
1253
|
/**
|
|
1247
1254
|
* WMS Capabilities parser
|
|
1248
1255
|
*
|
|
@@ -1250,7 +1257,7 @@ class ts {
|
|
|
1250
1257
|
* @constructor
|
|
1251
1258
|
*/
|
|
1252
1259
|
constructor(t, n) {
|
|
1253
|
-
!n && typeof window < "u" && (n = window.DOMParser), this.version = void 0, this._parser = new
|
|
1260
|
+
!n && typeof window < "u" && (n = window.DOMParser), this.version = void 0, this._parser = new fr(n), this._data = t;
|
|
1254
1261
|
}
|
|
1255
1262
|
/**
|
|
1256
1263
|
* @param {String} xmlString
|
|
@@ -1279,7 +1286,7 @@ class ts {
|
|
|
1279
1286
|
*/
|
|
1280
1287
|
readFromDocument(t) {
|
|
1281
1288
|
for (let n = t.firstChild; n; n = n.nextSibling)
|
|
1282
|
-
if (n.nodeType ==
|
|
1289
|
+
if (n.nodeType == ye.ELEMENT)
|
|
1283
1290
|
return this.readFromNode(n);
|
|
1284
1291
|
return null;
|
|
1285
1292
|
}
|
|
@@ -1288,44 +1295,44 @@ class ts {
|
|
|
1288
1295
|
* @return {Object}
|
|
1289
1296
|
*/
|
|
1290
1297
|
readFromNode(t) {
|
|
1291
|
-
return this.version = t.getAttribute("version"),
|
|
1298
|
+
return this.version = t.getAttribute("version"), j({
|
|
1292
1299
|
version: this.version
|
|
1293
|
-
},
|
|
1300
|
+
}, Fr, t, []) || null;
|
|
1294
1301
|
}
|
|
1295
1302
|
}
|
|
1296
|
-
async function
|
|
1303
|
+
async function rs(e) {
|
|
1297
1304
|
let t = new URL(e), n = t.searchParams;
|
|
1298
1305
|
n.set("SERVICE", "WMS"), n.set("REQUEST", "GetCapabilities");
|
|
1299
1306
|
let i = t.toString();
|
|
1300
1307
|
const o = await fetch(i);
|
|
1301
1308
|
if (o.ok) {
|
|
1302
1309
|
const r = await o.text();
|
|
1303
|
-
return new
|
|
1310
|
+
return new os(r).toJSON();
|
|
1304
1311
|
} else
|
|
1305
1312
|
throw new Error(`Error: ${o.status}`);
|
|
1306
1313
|
}
|
|
1307
|
-
function
|
|
1314
|
+
function Qn(e) {
|
|
1308
1315
|
const t = /\b(?:wms|ows)\b/i, n = /{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;
|
|
1309
1316
|
return t.test(e) ? "TileWMS" : n.test(e) ? "XYZ" : !1;
|
|
1310
1317
|
}
|
|
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 =
|
|
1318
|
+
function ss(e) {
|
|
1319
|
+
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 = Qn(e);
|
|
1313
1320
|
return !!(e && n && i);
|
|
1314
1321
|
}
|
|
1315
|
-
function
|
|
1322
|
+
function no(e) {
|
|
1316
1323
|
return e.replace(
|
|
1317
1324
|
/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,
|
|
1318
1325
|
'"$2": '
|
|
1319
1326
|
).replace(/,\s*}/g, "}").replace(/,\s*]/g, "]").replace(/\s*(\{|}|\[|\]|,)\s*/g, "$1").replaceAll('": //', "://");
|
|
1320
1327
|
}
|
|
1321
|
-
function
|
|
1328
|
+
function as(e) {
|
|
1322
1329
|
try {
|
|
1323
|
-
return JSON.parse(
|
|
1330
|
+
return JSON.parse(no(e)), !!e;
|
|
1324
1331
|
} catch {
|
|
1325
1332
|
return !1;
|
|
1326
1333
|
}
|
|
1327
1334
|
}
|
|
1328
|
-
function
|
|
1335
|
+
function ls(e, t) {
|
|
1329
1336
|
const n = new URL(e).searchParams;
|
|
1330
1337
|
Object.entries(t).forEach(([s, a]) => {
|
|
1331
1338
|
typeof a == "object" && !Array.isArray(a) && a !== null ? Object.keys(a).forEach((l) => {
|
|
@@ -1341,7 +1348,7 @@ function os(e, t) {
|
|
|
1341
1348
|
* @author owenm <owen23355@gmail.com>
|
|
1342
1349
|
* @license MIT
|
|
1343
1350
|
*/
|
|
1344
|
-
function
|
|
1351
|
+
function vi(e, t) {
|
|
1345
1352
|
var n = Object.keys(e);
|
|
1346
1353
|
if (Object.getOwnPropertySymbols) {
|
|
1347
1354
|
var i = Object.getOwnPropertySymbols(e);
|
|
@@ -1354,23 +1361,23 @@ function fi(e, t) {
|
|
|
1354
1361
|
function ct(e) {
|
|
1355
1362
|
for (var t = 1; t < arguments.length; t++) {
|
|
1356
1363
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
1357
|
-
t % 2 ?
|
|
1358
|
-
|
|
1359
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1364
|
+
t % 2 ? vi(Object(n), !0).forEach(function(i) {
|
|
1365
|
+
us(e, i, n[i]);
|
|
1366
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : vi(Object(n)).forEach(function(i) {
|
|
1360
1367
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i));
|
|
1361
1368
|
});
|
|
1362
1369
|
}
|
|
1363
1370
|
return e;
|
|
1364
1371
|
}
|
|
1365
|
-
function
|
|
1372
|
+
function Oe(e) {
|
|
1366
1373
|
"@babel/helpers - typeof";
|
|
1367
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
1374
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Oe = function(t) {
|
|
1368
1375
|
return typeof t;
|
|
1369
|
-
} :
|
|
1376
|
+
} : Oe = function(t) {
|
|
1370
1377
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1371
|
-
},
|
|
1378
|
+
}, Oe(e);
|
|
1372
1379
|
}
|
|
1373
|
-
function
|
|
1380
|
+
function us(e, t, n) {
|
|
1374
1381
|
return t in e ? Object.defineProperty(e, t, {
|
|
1375
1382
|
value: n,
|
|
1376
1383
|
enumerable: !0,
|
|
@@ -1378,26 +1385,26 @@ function rs(e, t, n) {
|
|
|
1378
1385
|
writable: !0
|
|
1379
1386
|
}) : e[t] = n, e;
|
|
1380
1387
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return
|
|
1388
|
+
function bt() {
|
|
1389
|
+
return bt = Object.assign || function(e) {
|
|
1383
1390
|
for (var t = 1; t < arguments.length; t++) {
|
|
1384
1391
|
var n = arguments[t];
|
|
1385
1392
|
for (var i in n)
|
|
1386
1393
|
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
1387
1394
|
}
|
|
1388
1395
|
return e;
|
|
1389
|
-
},
|
|
1396
|
+
}, bt.apply(this, arguments);
|
|
1390
1397
|
}
|
|
1391
|
-
function
|
|
1398
|
+
function ds(e, t) {
|
|
1392
1399
|
if (e == null) return {};
|
|
1393
1400
|
var n = {}, i = Object.keys(e), o, r;
|
|
1394
1401
|
for (r = 0; r < i.length; r++)
|
|
1395
1402
|
o = i[r], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
1396
1403
|
return n;
|
|
1397
1404
|
}
|
|
1398
|
-
function
|
|
1405
|
+
function cs(e, t) {
|
|
1399
1406
|
if (e == null) return {};
|
|
1400
|
-
var n =
|
|
1407
|
+
var n = ds(e, t), i, o;
|
|
1401
1408
|
if (Object.getOwnPropertySymbols) {
|
|
1402
1409
|
var r = Object.getOwnPropertySymbols(e);
|
|
1403
1410
|
for (o = 0; o < r.length; o++)
|
|
@@ -1405,22 +1412,22 @@ function as(e, t) {
|
|
|
1405
1412
|
}
|
|
1406
1413
|
return n;
|
|
1407
1414
|
}
|
|
1408
|
-
var
|
|
1409
|
-
function
|
|
1415
|
+
var hs = "1.15.3";
|
|
1416
|
+
function mt(e) {
|
|
1410
1417
|
if (typeof window < "u" && window.navigator)
|
|
1411
1418
|
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1412
1419
|
}
|
|
1413
|
-
var
|
|
1420
|
+
var vt = mt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), xe = mt(/Edge/i), wi = mt(/firefox/i), ue = mt(/safari/i) && !mt(/chrome/i) && !mt(/android/i), io = mt(/iP(ad|od|hone)/i), oo = mt(/chrome/i) && mt(/android/i), ro = {
|
|
1414
1421
|
capture: !1,
|
|
1415
1422
|
passive: !1
|
|
1416
1423
|
};
|
|
1417
|
-
function
|
|
1418
|
-
e.addEventListener(t, n, !
|
|
1424
|
+
function T(e, t, n) {
|
|
1425
|
+
e.addEventListener(t, n, !vt && ro);
|
|
1419
1426
|
}
|
|
1420
|
-
function
|
|
1421
|
-
e.removeEventListener(t, n, !
|
|
1427
|
+
function A(e, t, n) {
|
|
1428
|
+
e.removeEventListener(t, n, !vt && ro);
|
|
1422
1429
|
}
|
|
1423
|
-
function
|
|
1430
|
+
function Ue(e, t) {
|
|
1424
1431
|
if (t) {
|
|
1425
1432
|
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
1426
1433
|
try {
|
|
@@ -1436,28 +1443,28 @@ function Ve(e, t) {
|
|
|
1436
1443
|
return !1;
|
|
1437
1444
|
}
|
|
1438
1445
|
}
|
|
1439
|
-
function
|
|
1446
|
+
function so(e) {
|
|
1440
1447
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1441
1448
|
}
|
|
1442
1449
|
function ut(e, t, n, i) {
|
|
1443
1450
|
if (e) {
|
|
1444
1451
|
n = n || document;
|
|
1445
1452
|
do {
|
|
1446
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
1453
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Ue(e, t) : Ue(e, t)) || i && e === n)
|
|
1447
1454
|
return e;
|
|
1448
1455
|
if (e === n) break;
|
|
1449
|
-
} while (e =
|
|
1456
|
+
} while (e = so(e));
|
|
1450
1457
|
}
|
|
1451
1458
|
return null;
|
|
1452
1459
|
}
|
|
1453
|
-
var
|
|
1460
|
+
var $i = /\s+/g;
|
|
1454
1461
|
function ot(e, t, n) {
|
|
1455
1462
|
if (e && t)
|
|
1456
1463
|
if (e.classList)
|
|
1457
1464
|
e.classList[n ? "add" : "remove"](t);
|
|
1458
1465
|
else {
|
|
1459
|
-
var i = (" " + e.className + " ").replace(
|
|
1460
|
-
e.className = (i + (n ? " " + t : "")).replace(
|
|
1466
|
+
var i = (" " + e.className + " ").replace($i, " ").replace(" " + t + " ", " ");
|
|
1467
|
+
e.className = (i + (n ? " " + t : "")).replace($i, " ");
|
|
1461
1468
|
}
|
|
1462
1469
|
}
|
|
1463
1470
|
function v(e, t, n) {
|
|
@@ -1468,7 +1475,7 @@ function v(e, t, n) {
|
|
|
1468
1475
|
!(t in i) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), i[t] = n + (typeof n == "string" ? "" : "px");
|
|
1469
1476
|
}
|
|
1470
1477
|
}
|
|
1471
|
-
function
|
|
1478
|
+
function qt(e, t) {
|
|
1472
1479
|
var n = "";
|
|
1473
1480
|
if (typeof e == "string")
|
|
1474
1481
|
n = e;
|
|
@@ -1480,7 +1487,7 @@ function zt(e, t) {
|
|
|
1480
1487
|
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1481
1488
|
return o && new o(n);
|
|
1482
1489
|
}
|
|
1483
|
-
function
|
|
1490
|
+
function ao(e, t, n) {
|
|
1484
1491
|
if (e) {
|
|
1485
1492
|
var i = e.getElementsByTagName(t), o = 0, r = i.length;
|
|
1486
1493
|
if (n)
|
|
@@ -1497,7 +1504,7 @@ function dt() {
|
|
|
1497
1504
|
function k(e, t, n, i, o) {
|
|
1498
1505
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
1499
1506
|
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, !
|
|
1507
|
+
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, !vt))
|
|
1501
1508
|
do
|
|
1502
1509
|
if (o && o.getBoundingClientRect && (v(o, "transform") !== "none" || n && v(o, "position") !== "static")) {
|
|
1503
1510
|
var p = o.getBoundingClientRect();
|
|
@@ -1506,7 +1513,7 @@ function k(e, t, n, i, o) {
|
|
|
1506
1513
|
}
|
|
1507
1514
|
while (o = o.parentNode);
|
|
1508
1515
|
if (i && e !== window) {
|
|
1509
|
-
var f =
|
|
1516
|
+
var f = qt(o || e), g = f && f.a, y = f && f.d;
|
|
1510
1517
|
f && (s /= y, a /= g, d /= g, c /= y, l = s + c, u = a + d);
|
|
1511
1518
|
}
|
|
1512
1519
|
return {
|
|
@@ -1519,16 +1526,16 @@ function k(e, t, n, i, o) {
|
|
|
1519
1526
|
};
|
|
1520
1527
|
}
|
|
1521
1528
|
}
|
|
1522
|
-
function
|
|
1523
|
-
for (var i =
|
|
1529
|
+
function xi(e, t, n) {
|
|
1530
|
+
for (var i = _t(e, !0), o = k(e)[t]; i; ) {
|
|
1524
1531
|
var r = k(i)[n], s = void 0;
|
|
1525
1532
|
if (s = o >= r, !s) return i;
|
|
1526
1533
|
if (i === dt()) break;
|
|
1527
|
-
i =
|
|
1534
|
+
i = _t(i, !1);
|
|
1528
1535
|
}
|
|
1529
1536
|
return !1;
|
|
1530
1537
|
}
|
|
1531
|
-
function
|
|
1538
|
+
function Wt(e, t, n, i) {
|
|
1532
1539
|
for (var o = 0, r = 0, s = e.children; r < s.length; ) {
|
|
1533
1540
|
if (s[r].style.display !== "none" && s[r] !== w.ghost && (i || s[r] !== w.dragged) && ut(s[r], n.draggable, e, !1)) {
|
|
1534
1541
|
if (o === t)
|
|
@@ -1539,8 +1546,8 @@ function qt(e, t, n, i) {
|
|
|
1539
1546
|
}
|
|
1540
1547
|
return null;
|
|
1541
1548
|
}
|
|
1542
|
-
function
|
|
1543
|
-
for (var n = e.lastElementChild; n && (n === w.ghost || v(n, "display") === "none" || t && !
|
|
1549
|
+
function ti(e, t) {
|
|
1550
|
+
for (var n = e.lastElementChild; n && (n === w.ghost || v(n, "display") === "none" || t && !Ue(n, t)); )
|
|
1544
1551
|
n = n.previousElementSibling;
|
|
1545
1552
|
return n || null;
|
|
1546
1553
|
}
|
|
@@ -1549,19 +1556,19 @@ function st(e, t) {
|
|
|
1549
1556
|
if (!e || !e.parentNode)
|
|
1550
1557
|
return -1;
|
|
1551
1558
|
for (; e = e.previousElementSibling; )
|
|
1552
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== w.clone && (!t ||
|
|
1559
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== w.clone && (!t || Ue(e, t)) && n++;
|
|
1553
1560
|
return n;
|
|
1554
1561
|
}
|
|
1555
|
-
function
|
|
1562
|
+
function Ei(e) {
|
|
1556
1563
|
var t = 0, n = 0, i = dt();
|
|
1557
1564
|
if (e)
|
|
1558
1565
|
do {
|
|
1559
|
-
var o =
|
|
1566
|
+
var o = qt(e), r = o.a, s = o.d;
|
|
1560
1567
|
t += e.scrollLeft * r, n += e.scrollTop * s;
|
|
1561
1568
|
} while (e !== i && (e = e.parentNode));
|
|
1562
1569
|
return [t, n];
|
|
1563
1570
|
}
|
|
1564
|
-
function
|
|
1571
|
+
function ps(e, t) {
|
|
1565
1572
|
for (var n in e)
|
|
1566
1573
|
if (e.hasOwnProperty(n)) {
|
|
1567
1574
|
for (var i in t)
|
|
@@ -1569,7 +1576,7 @@ function us(e, t) {
|
|
|
1569
1576
|
}
|
|
1570
1577
|
return -1;
|
|
1571
1578
|
}
|
|
1572
|
-
function
|
|
1579
|
+
function _t(e, t) {
|
|
1573
1580
|
if (!e || !e.getBoundingClientRect) return dt();
|
|
1574
1581
|
var n = e, i = !1;
|
|
1575
1582
|
do
|
|
@@ -1584,37 +1591,37 @@ function At(e, t) {
|
|
|
1584
1591
|
while (n = n.parentNode);
|
|
1585
1592
|
return dt();
|
|
1586
1593
|
}
|
|
1587
|
-
function
|
|
1594
|
+
function fs(e, t) {
|
|
1588
1595
|
if (e && t)
|
|
1589
1596
|
for (var n in t)
|
|
1590
1597
|
t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1591
1598
|
return e;
|
|
1592
1599
|
}
|
|
1593
|
-
function
|
|
1600
|
+
function An(e, t) {
|
|
1594
1601
|
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
1602
|
}
|
|
1596
|
-
var
|
|
1597
|
-
function
|
|
1603
|
+
var de;
|
|
1604
|
+
function lo(e, t) {
|
|
1598
1605
|
return function() {
|
|
1599
|
-
if (!
|
|
1606
|
+
if (!de) {
|
|
1600
1607
|
var n = arguments, i = this;
|
|
1601
|
-
n.length === 1 ? e.call(i, n[0]) : e.apply(i, n),
|
|
1602
|
-
|
|
1608
|
+
n.length === 1 ? e.call(i, n[0]) : e.apply(i, n), de = setTimeout(function() {
|
|
1609
|
+
de = void 0;
|
|
1603
1610
|
}, t);
|
|
1604
1611
|
}
|
|
1605
1612
|
};
|
|
1606
1613
|
}
|
|
1607
|
-
function
|
|
1608
|
-
clearTimeout(
|
|
1614
|
+
function gs() {
|
|
1615
|
+
clearTimeout(de), de = void 0;
|
|
1609
1616
|
}
|
|
1610
|
-
function
|
|
1617
|
+
function uo(e, t, n) {
|
|
1611
1618
|
e.scrollLeft += t, e.scrollTop += n;
|
|
1612
1619
|
}
|
|
1613
|
-
function
|
|
1620
|
+
function co(e) {
|
|
1614
1621
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
1615
1622
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
1616
1623
|
}
|
|
1617
|
-
function
|
|
1624
|
+
function ho(e, t, n) {
|
|
1618
1625
|
var i = {};
|
|
1619
1626
|
return Array.from(e.children).forEach(function(o) {
|
|
1620
1627
|
var r, s, a, l;
|
|
@@ -1624,8 +1631,8 @@ function so(e, t, n) {
|
|
|
1624
1631
|
}
|
|
1625
1632
|
}), i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
|
|
1626
1633
|
}
|
|
1627
|
-
var
|
|
1628
|
-
function
|
|
1634
|
+
var it = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
1635
|
+
function ms() {
|
|
1629
1636
|
var e = [], t;
|
|
1630
1637
|
return {
|
|
1631
1638
|
captureAnimationState: function() {
|
|
@@ -1639,7 +1646,7 @@ function hs() {
|
|
|
1639
1646
|
});
|
|
1640
1647
|
var r = ct({}, e[e.length - 1].rect);
|
|
1641
1648
|
if (o.thisAnimationDuration) {
|
|
1642
|
-
var s =
|
|
1649
|
+
var s = qt(o, !0);
|
|
1643
1650
|
s && (r.top -= s.f, r.left -= s.e);
|
|
1644
1651
|
}
|
|
1645
1652
|
o.fromRect = r;
|
|
@@ -1651,7 +1658,7 @@ function hs() {
|
|
|
1651
1658
|
e.push(i);
|
|
1652
1659
|
},
|
|
1653
1660
|
removeAnimationState: function(i) {
|
|
1654
|
-
e.splice(
|
|
1661
|
+
e.splice(ps(e, {
|
|
1655
1662
|
target: i
|
|
1656
1663
|
}), 1);
|
|
1657
1664
|
},
|
|
@@ -1663,9 +1670,9 @@ function hs() {
|
|
|
1663
1670
|
}
|
|
1664
1671
|
var r = !1, s = 0;
|
|
1665
1672
|
e.forEach(function(a) {
|
|
1666
|
-
var l = 0, u = a.target, c = u.fromRect, d = k(u), p = u.prevFromRect, f = u.prevToRect, g = a.rect, y =
|
|
1667
|
-
y && (d.top -= y.f, d.left -= y.e), u.toRect = d, u.thisAnimationDuration &&
|
|
1668
|
-
(g.top - d.top) / (g.left - d.left) === (c.top - d.top) / (c.left - d.left) && (l =
|
|
1673
|
+
var l = 0, u = a.target, c = u.fromRect, d = k(u), p = u.prevFromRect, f = u.prevToRect, g = a.rect, y = qt(u, !0);
|
|
1674
|
+
y && (d.top -= y.f, d.left -= y.e), u.toRect = d, u.thisAnimationDuration && An(p, d) && !An(c, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1675
|
+
(g.top - d.top) / (g.left - d.left) === (c.top - d.top) / (c.left - d.left) && (l = bs(g, p, f, o.options)), An(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
1676
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
1670
1677
|
}, l), u.thisAnimationDuration = l);
|
|
1671
1678
|
}), clearTimeout(t), r ? t = setTimeout(function() {
|
|
@@ -1675,30 +1682,30 @@ function hs() {
|
|
|
1675
1682
|
animate: function(i, o, r, s) {
|
|
1676
1683
|
if (s) {
|
|
1677
1684
|
v(i, "transition", ""), v(i, "transform", "");
|
|
1678
|
-
var a =
|
|
1679
|
-
i.animatingX = !!c, i.animatingY = !!d, v(i, "transform", "translate3d(" + c + "px," + d + "px,0)"), this.forRepaintDummy =
|
|
1685
|
+
var a = qt(this.el), l = a && a.a, u = a && a.d, c = (o.left - r.left) / (l || 1), d = (o.top - r.top) / (u || 1);
|
|
1686
|
+
i.animatingX = !!c, i.animatingY = !!d, v(i, "transform", "translate3d(" + c + "px," + d + "px,0)"), this.forRepaintDummy = ys(i), v(i, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), v(i, "transform", "translate3d(0,0,0)"), typeof i.animated == "number" && clearTimeout(i.animated), i.animated = setTimeout(function() {
|
|
1680
1687
|
v(i, "transition", ""), v(i, "transform", ""), i.animated = !1, i.animatingX = !1, i.animatingY = !1;
|
|
1681
1688
|
}, s);
|
|
1682
1689
|
}
|
|
1683
1690
|
}
|
|
1684
1691
|
};
|
|
1685
1692
|
}
|
|
1686
|
-
function
|
|
1693
|
+
function ys(e) {
|
|
1687
1694
|
return e.offsetWidth;
|
|
1688
1695
|
}
|
|
1689
|
-
function
|
|
1696
|
+
function bs(e, t, n, i) {
|
|
1690
1697
|
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
1698
|
}
|
|
1692
|
-
var
|
|
1699
|
+
var Ut = [], _n = {
|
|
1693
1700
|
initializeByDefault: !0
|
|
1694
|
-
},
|
|
1701
|
+
}, Ee = {
|
|
1695
1702
|
mount: function(t) {
|
|
1696
|
-
for (var n in
|
|
1697
|
-
|
|
1698
|
-
|
|
1703
|
+
for (var n in _n)
|
|
1704
|
+
_n.hasOwnProperty(n) && !(n in t) && (t[n] = _n[n]);
|
|
1705
|
+
Ut.forEach(function(i) {
|
|
1699
1706
|
if (i.pluginName === t.pluginName)
|
|
1700
1707
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
1701
|
-
}),
|
|
1708
|
+
}), Ut.push(t);
|
|
1702
1709
|
},
|
|
1703
1710
|
pluginEvent: function(t, n, i) {
|
|
1704
1711
|
var o = this;
|
|
@@ -1706,7 +1713,7 @@ var Vt = [], Sn = {
|
|
|
1706
1713
|
o.eventCanceled = !0;
|
|
1707
1714
|
};
|
|
1708
1715
|
var r = t + "Global";
|
|
1709
|
-
|
|
1716
|
+
Ut.forEach(function(s) {
|
|
1710
1717
|
n[s.pluginName] && (n[s.pluginName][r] && n[s.pluginName][r](ct({
|
|
1711
1718
|
sortable: n
|
|
1712
1719
|
}, i)), n.options[s.pluginName] && n[s.pluginName][t] && n[s.pluginName][t](ct({
|
|
@@ -1715,11 +1722,11 @@ var Vt = [], Sn = {
|
|
|
1715
1722
|
});
|
|
1716
1723
|
},
|
|
1717
1724
|
initializePlugins: function(t, n, i, o) {
|
|
1718
|
-
|
|
1725
|
+
Ut.forEach(function(a) {
|
|
1719
1726
|
var l = a.pluginName;
|
|
1720
1727
|
if (!(!t.options[l] && !a.initializeByDefault)) {
|
|
1721
1728
|
var u = new a(t, n, t.options);
|
|
1722
|
-
u.sortable = t, u.options = t.options, t[l] = u,
|
|
1729
|
+
u.sortable = t, u.options = t.options, t[l] = u, bt(i, u.defaults);
|
|
1723
1730
|
}
|
|
1724
1731
|
});
|
|
1725
1732
|
for (var r in t.options)
|
|
@@ -1730,52 +1737,52 @@ var Vt = [], Sn = {
|
|
|
1730
1737
|
},
|
|
1731
1738
|
getEventProperties: function(t, n) {
|
|
1732
1739
|
var i = {};
|
|
1733
|
-
return
|
|
1734
|
-
typeof o.eventProperties == "function" &&
|
|
1740
|
+
return Ut.forEach(function(o) {
|
|
1741
|
+
typeof o.eventProperties == "function" && bt(i, o.eventProperties.call(n[o.pluginName], t));
|
|
1735
1742
|
}), i;
|
|
1736
1743
|
},
|
|
1737
1744
|
modifyOption: function(t, n, i) {
|
|
1738
1745
|
var o;
|
|
1739
|
-
return
|
|
1746
|
+
return Ut.forEach(function(r) {
|
|
1740
1747
|
t[r.pluginName] && r.optionListeners && typeof r.optionListeners[n] == "function" && (o = r.optionListeners[n].call(t[r.pluginName], i));
|
|
1741
1748
|
}), o;
|
|
1742
1749
|
}
|
|
1743
1750
|
};
|
|
1744
|
-
function
|
|
1751
|
+
function vs(e) {
|
|
1745
1752
|
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[
|
|
1747
|
-
var y,
|
|
1748
|
-
window.CustomEvent && !
|
|
1753
|
+
if (t = t || n && n[it], !!t) {
|
|
1754
|
+
var y, D = t.options, M = "on" + i.charAt(0).toUpperCase() + i.substr(1);
|
|
1755
|
+
window.CustomEvent && !vt && !xe ? y = new CustomEvent(i, {
|
|
1749
1756
|
bubbles: !0,
|
|
1750
1757
|
cancelable: !0
|
|
1751
1758
|
}) : (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 H = ct(ct({}, g),
|
|
1759
|
+
var H = ct(ct({}, g), Ee.getEventProperties(i, t));
|
|
1753
1760
|
for (var J in H)
|
|
1754
1761
|
y[J] = H[J];
|
|
1755
|
-
n && n.dispatchEvent(y),
|
|
1762
|
+
n && n.dispatchEvent(y), D[M] && D[M].call(t, y);
|
|
1756
1763
|
}
|
|
1757
1764
|
}
|
|
1758
|
-
var
|
|
1759
|
-
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r =
|
|
1760
|
-
|
|
1765
|
+
var ws = ["evt"], et = function(t, n) {
|
|
1766
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r = cs(i, ws);
|
|
1767
|
+
Ee.pluginEvent.bind(w)(t, n, ct({
|
|
1761
1768
|
dragEl: h,
|
|
1762
1769
|
parentEl: N,
|
|
1763
|
-
ghostEl:
|
|
1770
|
+
ghostEl: x,
|
|
1764
1771
|
rootEl: R,
|
|
1765
1772
|
nextEl: It,
|
|
1766
|
-
lastDownEl:
|
|
1767
|
-
cloneEl:
|
|
1773
|
+
lastDownEl: Re,
|
|
1774
|
+
cloneEl: L,
|
|
1768
1775
|
cloneHidden: St,
|
|
1769
|
-
dragStarted:
|
|
1770
|
-
putSortable:
|
|
1776
|
+
dragStarted: oe,
|
|
1777
|
+
putSortable: X,
|
|
1771
1778
|
activeSortable: w.active,
|
|
1772
1779
|
originalEvent: o,
|
|
1773
|
-
oldIndex:
|
|
1774
|
-
oldDraggableIndex:
|
|
1780
|
+
oldIndex: Xt,
|
|
1781
|
+
oldDraggableIndex: ce,
|
|
1775
1782
|
newIndex: rt,
|
|
1776
|
-
newDraggableIndex:
|
|
1777
|
-
hideGhostForTarget:
|
|
1778
|
-
unhideGhostForTarget:
|
|
1783
|
+
newDraggableIndex: Et,
|
|
1784
|
+
hideGhostForTarget: mo,
|
|
1785
|
+
unhideGhostForTarget: yo,
|
|
1779
1786
|
cloneNowHidden: function() {
|
|
1780
1787
|
St = !0;
|
|
1781
1788
|
},
|
|
@@ -1792,26 +1799,26 @@ var ms = ["evt"], tt = function(t, n) {
|
|
|
1792
1799
|
}, r));
|
|
1793
1800
|
};
|
|
1794
1801
|
function Q(e) {
|
|
1795
|
-
|
|
1796
|
-
putSortable:
|
|
1797
|
-
cloneEl:
|
|
1802
|
+
vs(ct({
|
|
1803
|
+
putSortable: X,
|
|
1804
|
+
cloneEl: L,
|
|
1798
1805
|
targetEl: h,
|
|
1799
1806
|
rootEl: R,
|
|
1800
|
-
oldIndex:
|
|
1801
|
-
oldDraggableIndex:
|
|
1807
|
+
oldIndex: Xt,
|
|
1808
|
+
oldDraggableIndex: ce,
|
|
1802
1809
|
newIndex: rt,
|
|
1803
|
-
newDraggableIndex:
|
|
1810
|
+
newDraggableIndex: Et
|
|
1804
1811
|
}, e));
|
|
1805
1812
|
}
|
|
1806
|
-
var h, N,
|
|
1807
|
-
if (
|
|
1808
|
-
if (
|
|
1813
|
+
var h, N, x, R, It, Re, L, St, Xt, rt, ce, Et, Ae, X, Zt = !1, Fe = !1, je = [], Lt, lt, Cn, Tn, Si, Ai, oe, Ft, he, pe = !1, _e = !1, Le, G, Pn = [], Hn = !1, Ze = [], mn = typeof document < "u", Ce = io, _i = xe || vt ? "cssFloat" : "float", $s = mn && !oo && !io && "draggable" in document.createElement("div"), po = function() {
|
|
1814
|
+
if (mn) {
|
|
1815
|
+
if (vt)
|
|
1809
1816
|
return !1;
|
|
1810
1817
|
var e = document.createElement("x");
|
|
1811
1818
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
1812
1819
|
}
|
|
1813
|
-
}(),
|
|
1814
|
-
var i = v(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r =
|
|
1820
|
+
}(), fo = function(t, n) {
|
|
1821
|
+
var i = v(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Wt(t, 0, n), s = Wt(t, 1, n), a = r && v(r), l = s && v(s), u = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + k(r).width, c = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + k(s).width;
|
|
1815
1822
|
if (i.display === "flex")
|
|
1816
1823
|
return i.flexDirection === "column" || i.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1817
1824
|
if (i.display === "grid")
|
|
@@ -1820,21 +1827,21 @@ var h, N, E, R, It, Oe, M, St, Zt, rt, ue, xt, $e, z, Ft = !1, ke = !1, Ue = [],
|
|
|
1820
1827
|
var d = a.float === "left" ? "left" : "right";
|
|
1821
1828
|
return s && (l.clear === "both" || l.clear === d) ? "vertical" : "horizontal";
|
|
1822
1829
|
}
|
|
1823
|
-
return r && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || u >= o && i[
|
|
1824
|
-
},
|
|
1830
|
+
return r && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || u >= o && i[_i] === "none" || s && i[_i] === "none" && u + c > o) ? "vertical" : "horizontal";
|
|
1831
|
+
}, xs = function(t, n, i) {
|
|
1825
1832
|
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
1833
|
return o === a || r === l || o + s / 2 === a + u / 2;
|
|
1827
|
-
},
|
|
1834
|
+
}, Es = function(t, n) {
|
|
1828
1835
|
var i;
|
|
1829
|
-
return
|
|
1830
|
-
var r = o[
|
|
1831
|
-
if (!(!r ||
|
|
1836
|
+
return je.some(function(o) {
|
|
1837
|
+
var r = o[it].options.emptyInsertThreshold;
|
|
1838
|
+
if (!(!r || ti(o))) {
|
|
1832
1839
|
var s = k(o), a = t >= s.left - r && t <= s.right + r, l = n >= s.top - r && n <= s.bottom + r;
|
|
1833
1840
|
if (a && l)
|
|
1834
1841
|
return i = o;
|
|
1835
1842
|
}
|
|
1836
1843
|
}), i;
|
|
1837
|
-
},
|
|
1844
|
+
}, go = function(t) {
|
|
1838
1845
|
function n(r, s) {
|
|
1839
1846
|
return function(a, l, u, c) {
|
|
1840
1847
|
var d = a.options.group.name && l.options.group.name && a.options.group.name === l.options.group.name;
|
|
@@ -1851,36 +1858,36 @@ var h, N, E, R, It, Oe, M, St, Zt, rt, ue, xt, $e, z, Ft = !1, ke = !1, Ue = [],
|
|
|
1851
1858
|
};
|
|
1852
1859
|
}
|
|
1853
1860
|
var i = {}, o = t.group;
|
|
1854
|
-
(!o ||
|
|
1861
|
+
(!o || Oe(o) != "object") && (o = {
|
|
1855
1862
|
name: o
|
|
1856
1863
|
}), 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
|
-
!
|
|
1864
|
+
}, mo = function() {
|
|
1865
|
+
!po && x && v(x, "display", "none");
|
|
1866
|
+
}, yo = function() {
|
|
1867
|
+
!po && x && v(x, "display", "");
|
|
1861
1868
|
};
|
|
1862
|
-
|
|
1863
|
-
if (
|
|
1864
|
-
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(),
|
|
1869
|
+
mn && !oo && document.addEventListener("click", function(e) {
|
|
1870
|
+
if (Fe)
|
|
1871
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Fe = !1, !1;
|
|
1865
1872
|
}, !0);
|
|
1866
1873
|
var Mt = function(t) {
|
|
1867
1874
|
if (h) {
|
|
1868
1875
|
t = t.touches ? t.touches[0] : t;
|
|
1869
|
-
var n =
|
|
1876
|
+
var n = Es(t.clientX, t.clientY);
|
|
1870
1877
|
if (n) {
|
|
1871
1878
|
var i = {};
|
|
1872
1879
|
for (var o in t)
|
|
1873
1880
|
t.hasOwnProperty(o) && (i[o] = t[o]);
|
|
1874
|
-
i.target = i.rootEl = n, i.preventDefault = void 0, i.stopPropagation = void 0, n[
|
|
1881
|
+
i.target = i.rootEl = n, i.preventDefault = void 0, i.stopPropagation = void 0, n[it]._onDragOver(i);
|
|
1875
1882
|
}
|
|
1876
1883
|
}
|
|
1877
|
-
},
|
|
1878
|
-
h && h.parentNode[
|
|
1884
|
+
}, Ss = function(t) {
|
|
1885
|
+
h && h.parentNode[it]._isOutsideThisEl(t.target);
|
|
1879
1886
|
};
|
|
1880
1887
|
function w(e, t) {
|
|
1881
1888
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
1882
1889
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
1883
|
-
this.el = e, this.options = t =
|
|
1890
|
+
this.el = e, this.options = t = bt({}, t), e[it] = this;
|
|
1884
1891
|
var n = {
|
|
1885
1892
|
group: null,
|
|
1886
1893
|
sort: !0,
|
|
@@ -1896,7 +1903,7 @@ function w(e, t) {
|
|
|
1896
1903
|
// will be set to same as swapThreshold if default
|
|
1897
1904
|
removeCloneOnHide: !0,
|
|
1898
1905
|
direction: function() {
|
|
1899
|
-
return
|
|
1906
|
+
return fo(e, this.options);
|
|
1900
1907
|
},
|
|
1901
1908
|
ghostClass: "sortable-ghost",
|
|
1902
1909
|
chosenClass: "sortable-chosen",
|
|
@@ -1923,22 +1930,22 @@ function w(e, t) {
|
|
|
1923
1930
|
x: 0,
|
|
1924
1931
|
y: 0
|
|
1925
1932
|
},
|
|
1926
|
-
supportPointer: w.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1933
|
+
supportPointer: w.supportPointer !== !1 && "PointerEvent" in window && !ue,
|
|
1927
1934
|
emptyInsertThreshold: 5
|
|
1928
1935
|
};
|
|
1929
|
-
|
|
1936
|
+
Ee.initializePlugins(this, e, n);
|
|
1930
1937
|
for (var i in n)
|
|
1931
1938
|
!(i in t) && (t[i] = n[i]);
|
|
1932
|
-
|
|
1939
|
+
go(t);
|
|
1933
1940
|
for (var o in this)
|
|
1934
1941
|
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
|
|
1935
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1942
|
+
this.nativeDraggable = t.forceFallback ? !1 : $s, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? T(e, "pointerdown", this._onTapStart) : (T(e, "mousedown", this._onTapStart), T(e, "touchstart", this._onTapStart)), this.nativeDraggable && (T(e, "dragover", this), T(e, "dragenter", this)), je.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), bt(this, ms());
|
|
1936
1943
|
}
|
|
1937
1944
|
w.prototype = /** @lends Sortable.prototype */
|
|
1938
1945
|
{
|
|
1939
1946
|
constructor: w,
|
|
1940
1947
|
_isOutsideThisEl: function(t) {
|
|
1941
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1948
|
+
!this.el.contains(t) && t !== this.el && (Ft = null);
|
|
1942
1949
|
},
|
|
1943
1950
|
_getDirection: function(t, n) {
|
|
1944
1951
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, n, h) : this.options.direction;
|
|
@@ -1946,8 +1953,8 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1946
1953
|
_onTapStart: function(t) {
|
|
1947
1954
|
if (t.cancelable) {
|
|
1948
1955
|
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 (
|
|
1950
|
-
if (
|
|
1956
|
+
if (Rs(i), !h && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || o.disabled) && !u.isContentEditable && !(!this.nativeDraggable && ue && l && l.tagName.toUpperCase() === "SELECT") && (l = ut(l, o.draggable, i, !1), !(l && l.animated) && Re !== l)) {
|
|
1957
|
+
if (Xt = st(l), ce = st(l, o.draggable), typeof c == "function") {
|
|
1951
1958
|
if (c.call(this, t, l, this)) {
|
|
1952
1959
|
Q({
|
|
1953
1960
|
sortable: n,
|
|
@@ -1956,7 +1963,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1956
1963
|
targetEl: l,
|
|
1957
1964
|
toEl: i,
|
|
1958
1965
|
fromEl: i
|
|
1959
|
-
}),
|
|
1966
|
+
}), et("filter", n, {
|
|
1960
1967
|
evt: t
|
|
1961
1968
|
}), r && t.cancelable && t.preventDefault();
|
|
1962
1969
|
return;
|
|
@@ -1970,7 +1977,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1970
1977
|
targetEl: l,
|
|
1971
1978
|
fromEl: i,
|
|
1972
1979
|
toEl: i
|
|
1973
|
-
}),
|
|
1980
|
+
}), et("filter", n, {
|
|
1974
1981
|
evt: t
|
|
1975
1982
|
}), !0;
|
|
1976
1983
|
}), c)) {
|
|
@@ -1985,32 +1992,32 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1985
1992
|
var o = this, r = o.el, s = o.options, a = r.ownerDocument, l;
|
|
1986
1993
|
if (i && !h && i.parentNode === r) {
|
|
1987
1994
|
var u = k(i);
|
|
1988
|
-
if (R = r, h = i, N = h.parentNode, It = h.nextSibling,
|
|
1995
|
+
if (R = r, h = i, N = h.parentNode, It = h.nextSibling, Re = i, Ae = s.group, w.dragged = h, Lt = {
|
|
1989
1996
|
target: h,
|
|
1990
1997
|
clientX: (n || t).clientX,
|
|
1991
1998
|
clientY: (n || t).clientY
|
|
1992
|
-
},
|
|
1993
|
-
if (
|
|
1999
|
+
}, Si = Lt.clientX - u.left, Ai = Lt.clientY - u.top, this._lastX = (n || t).clientX, this._lastY = (n || t).clientY, h.style["will-change"] = "all", l = function() {
|
|
2000
|
+
if (et("delayEnded", o, {
|
|
1994
2001
|
evt: t
|
|
1995
2002
|
}), w.eventCanceled) {
|
|
1996
2003
|
o._onDrop();
|
|
1997
2004
|
return;
|
|
1998
2005
|
}
|
|
1999
|
-
o._disableDelayedDragEvents(), !
|
|
2006
|
+
o._disableDelayedDragEvents(), !wi && o.nativeDraggable && (h.draggable = !0), o._triggerDragStart(t, n), Q({
|
|
2000
2007
|
sortable: o,
|
|
2001
2008
|
name: "choose",
|
|
2002
2009
|
originalEvent: t
|
|
2003
2010
|
}), ot(h, s.chosenClass, !0);
|
|
2004
2011
|
}, s.ignore.split(",").forEach(function(c) {
|
|
2005
|
-
|
|
2006
|
-
}),
|
|
2012
|
+
ao(h, c.trim(), Dn);
|
|
2013
|
+
}), T(a, "dragover", Mt), T(a, "mousemove", Mt), T(a, "touchmove", Mt), T(a, "mouseup", o._onDrop), T(a, "touchend", o._onDrop), T(a, "touchcancel", o._onDrop), wi && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), et("delayStart", this, {
|
|
2007
2014
|
evt: t
|
|
2008
|
-
}), s.delay && (!s.delayOnTouchOnly || n) && (!this.nativeDraggable || !(
|
|
2015
|
+
}), s.delay && (!s.delayOnTouchOnly || n) && (!this.nativeDraggable || !(xe || vt))) {
|
|
2009
2016
|
if (w.eventCanceled) {
|
|
2010
2017
|
this._onDrop();
|
|
2011
2018
|
return;
|
|
2012
2019
|
}
|
|
2013
|
-
|
|
2020
|
+
T(a, "mouseup", o._disableDelayedDrag), T(a, "touchend", o._disableDelayedDrag), T(a, "touchcancel", o._disableDelayedDrag), T(a, "mousemove", o._delayedDragTouchMoveHandler), T(a, "touchmove", o._delayedDragTouchMoveHandler), s.supportPointer && T(a, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(l, s.delay);
|
|
2014
2021
|
} else
|
|
2015
2022
|
l();
|
|
2016
2023
|
}
|
|
@@ -2020,26 +2027,26 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2020
2027
|
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
2028
|
},
|
|
2022
2029
|
_disableDelayedDrag: function() {
|
|
2023
|
-
h &&
|
|
2030
|
+
h && Dn(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2024
2031
|
},
|
|
2025
2032
|
_disableDelayedDragEvents: function() {
|
|
2026
2033
|
var t = this.el.ownerDocument;
|
|
2027
|
-
|
|
2034
|
+
A(t, "mouseup", this._disableDelayedDrag), A(t, "touchend", this._disableDelayedDrag), A(t, "touchcancel", this._disableDelayedDrag), A(t, "mousemove", this._delayedDragTouchMoveHandler), A(t, "touchmove", this._delayedDragTouchMoveHandler), A(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2028
2035
|
},
|
|
2029
2036
|
_triggerDragStart: function(t, n) {
|
|
2030
|
-
n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ?
|
|
2037
|
+
n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ? T(document, "pointermove", this._onTouchMove) : n ? T(document, "touchmove", this._onTouchMove) : T(document, "mousemove", this._onTouchMove) : (T(h, "dragend", this), T(R, "dragstart", this._onDragStart));
|
|
2031
2038
|
try {
|
|
2032
|
-
document.selection ?
|
|
2039
|
+
document.selection ? Me(function() {
|
|
2033
2040
|
document.selection.empty();
|
|
2034
2041
|
}) : window.getSelection().removeAllRanges();
|
|
2035
2042
|
} catch {
|
|
2036
2043
|
}
|
|
2037
2044
|
},
|
|
2038
2045
|
_dragStarted: function(t, n) {
|
|
2039
|
-
if (
|
|
2040
|
-
|
|
2046
|
+
if (Zt = !1, R && h) {
|
|
2047
|
+
et("dragStarted", this, {
|
|
2041
2048
|
evt: n
|
|
2042
|
-
}), this.nativeDraggable &&
|
|
2049
|
+
}), this.nativeDraggable && T(document, "dragover", Ss);
|
|
2043
2050
|
var i = this.options;
|
|
2044
2051
|
!t && ot(h, i.dragClass, !1), ot(h, i.ghostClass, !0), w.active = this, t && this._appendGhost(), Q({
|
|
2045
2052
|
sortable: this,
|
|
@@ -2051,14 +2058,14 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2051
2058
|
},
|
|
2052
2059
|
_emulateDragOver: function() {
|
|
2053
2060
|
if (lt) {
|
|
2054
|
-
this._lastX = lt.clientX, this._lastY = lt.clientY,
|
|
2061
|
+
this._lastX = lt.clientX, this._lastY = lt.clientY, mo();
|
|
2055
2062
|
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
2063
|
n = t;
|
|
2057
|
-
if (h.parentNode[
|
|
2064
|
+
if (h.parentNode[it]._isOutsideThisEl(t), n)
|
|
2058
2065
|
do {
|
|
2059
|
-
if (n[
|
|
2066
|
+
if (n[it]) {
|
|
2060
2067
|
var i = void 0;
|
|
2061
|
-
if (i = n[
|
|
2068
|
+
if (i = n[it]._onDragOver({
|
|
2062
2069
|
clientX: lt.clientX,
|
|
2063
2070
|
clientY: lt.clientY,
|
|
2064
2071
|
target: t,
|
|
@@ -2067,20 +2074,20 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2067
2074
|
break;
|
|
2068
2075
|
}
|
|
2069
2076
|
t = n;
|
|
2070
|
-
} while (n =
|
|
2071
|
-
|
|
2077
|
+
} while (n = so(n));
|
|
2078
|
+
yo();
|
|
2072
2079
|
}
|
|
2073
2080
|
},
|
|
2074
2081
|
_onTouchMove: function(t) {
|
|
2075
|
-
if (
|
|
2076
|
-
var n = this.options, i = n.fallbackTolerance, o = n.fallbackOffset, r = t.touches ? t.touches[0] : t, s =
|
|
2077
|
-
if (!w.active && !
|
|
2082
|
+
if (Lt) {
|
|
2083
|
+
var n = this.options, i = n.fallbackTolerance, o = n.fallbackOffset, r = t.touches ? t.touches[0] : t, s = x && qt(x, !0), a = x && s && s.a, l = x && s && s.d, u = Ce && G && Ei(G), c = (r.clientX - Lt.clientX + o.x) / (a || 1) + (u ? u[0] - Pn[0] : 0) / (a || 1), d = (r.clientY - Lt.clientY + o.y) / (l || 1) + (u ? u[1] - Pn[1] : 0) / (l || 1);
|
|
2084
|
+
if (!w.active && !Zt) {
|
|
2078
2085
|
if (i && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < i)
|
|
2079
2086
|
return;
|
|
2080
2087
|
this._onDragStart(t, !0);
|
|
2081
2088
|
}
|
|
2082
|
-
if (
|
|
2083
|
-
s ? (s.e += c - (
|
|
2089
|
+
if (x) {
|
|
2090
|
+
s ? (s.e += c - (Cn || 0), s.f += d - (Tn || 0)) : s = {
|
|
2084
2091
|
a: 1,
|
|
2085
2092
|
b: 0,
|
|
2086
2093
|
c: 0,
|
|
@@ -2089,43 +2096,43 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2089
2096
|
f: d
|
|
2090
2097
|
};
|
|
2091
2098
|
var p = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
2092
|
-
v(
|
|
2099
|
+
v(x, "webkitTransform", p), v(x, "mozTransform", p), v(x, "msTransform", p), v(x, "transform", p), Cn = c, Tn = d, lt = r;
|
|
2093
2100
|
}
|
|
2094
2101
|
t.cancelable && t.preventDefault();
|
|
2095
2102
|
}
|
|
2096
2103
|
},
|
|
2097
2104
|
_appendGhost: function() {
|
|
2098
|
-
if (!
|
|
2099
|
-
var t = this.options.fallbackOnBody ? document.body : R, n = k(h, !0,
|
|
2100
|
-
if (
|
|
2101
|
-
for (
|
|
2102
|
-
|
|
2103
|
-
|
|
2105
|
+
if (!x) {
|
|
2106
|
+
var t = this.options.fallbackOnBody ? document.body : R, n = k(h, !0, Ce, !0, t), i = this.options;
|
|
2107
|
+
if (Ce) {
|
|
2108
|
+
for (G = t; v(G, "position") === "static" && v(G, "transform") === "none" && G !== document; )
|
|
2109
|
+
G = G.parentNode;
|
|
2110
|
+
G !== document.body && G !== document.documentElement ? (G === document && (G = dt()), n.top += G.scrollTop, n.left += G.scrollLeft) : G = dt(), Pn = Ei(G);
|
|
2104
2111
|
}
|
|
2105
|
-
|
|
2112
|
+
x = h.cloneNode(!0), ot(x, i.ghostClass, !1), ot(x, i.fallbackClass, !0), ot(x, i.dragClass, !0), v(x, "transition", ""), v(x, "transform", ""), v(x, "box-sizing", "border-box"), v(x, "margin", 0), v(x, "top", n.top), v(x, "left", n.left), v(x, "width", n.width), v(x, "height", n.height), v(x, "opacity", "0.8"), v(x, "position", Ce ? "absolute" : "fixed"), v(x, "zIndex", "100000"), v(x, "pointerEvents", "none"), w.ghost = x, t.appendChild(x), v(x, "transform-origin", Si / parseInt(x.style.width) * 100 + "% " + Ai / parseInt(x.style.height) * 100 + "%");
|
|
2106
2113
|
}
|
|
2107
2114
|
},
|
|
2108
2115
|
_onDragStart: function(t, n) {
|
|
2109
2116
|
var i = this, o = t.dataTransfer, r = i.options;
|
|
2110
|
-
if (
|
|
2117
|
+
if (et("dragStart", this, {
|
|
2111
2118
|
evt: t
|
|
2112
2119
|
}), w.eventCanceled) {
|
|
2113
2120
|
this._onDrop();
|
|
2114
2121
|
return;
|
|
2115
2122
|
}
|
|
2116
|
-
|
|
2117
|
-
|
|
2123
|
+
et("setupClone", this), w.eventCanceled || (L = co(h), L.removeAttribute("id"), L.draggable = !1, L.style["will-change"] = "", this._hideClone(), ot(L, this.options.chosenClass, !1), w.clone = L), i.cloneId = Me(function() {
|
|
2124
|
+
et("clone", i), !w.eventCanceled && (i.options.removeCloneOnHide || R.insertBefore(L, h), i._hideClone(), Q({
|
|
2118
2125
|
sortable: i,
|
|
2119
2126
|
name: "clone"
|
|
2120
2127
|
}));
|
|
2121
|
-
}), !n && ot(h, r.dragClass, !0), n ? (
|
|
2128
|
+
}), !n && ot(h, r.dragClass, !0), n ? (Fe = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (A(document, "mouseup", i._onDrop), A(document, "touchend", i._onDrop), A(document, "touchcancel", i._onDrop), o && (o.effectAllowed = "move", r.setData && r.setData.call(i, o, h)), T(document, "drop", i), v(h, "transform", "translateZ(0)")), Zt = !0, i._dragStartId = Me(i._dragStarted.bind(i, n, t)), T(document, "selectstart", i), oe = !0, ue && v(document.body, "user-select", "none");
|
|
2122
2129
|
},
|
|
2123
2130
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
2124
2131
|
_onDragOver: function(t) {
|
|
2125
|
-
var n = this.el, i = t.target, o, r, s, a = this.options, l = a.group, u = w.active, c =
|
|
2126
|
-
if (
|
|
2127
|
-
function
|
|
2128
|
-
|
|
2132
|
+
var n = this.el, i = t.target, o, r, s, a = this.options, l = a.group, u = w.active, c = Ae === l, d = a.sort, p = X || u, f, g = this, y = !1;
|
|
2133
|
+
if (Hn) return;
|
|
2134
|
+
function D(ee, Xo) {
|
|
2135
|
+
et(ee, g, ct({
|
|
2129
2136
|
evt: t,
|
|
2130
2137
|
isOwner: c,
|
|
2131
2138
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2136,70 +2143,70 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2136
2143
|
fromSortable: p,
|
|
2137
2144
|
target: i,
|
|
2138
2145
|
completed: H,
|
|
2139
|
-
onMove: function(
|
|
2140
|
-
return
|
|
2146
|
+
onMove: function(ri, qo) {
|
|
2147
|
+
return Te(R, n, h, o, ri, k(ri), t, qo);
|
|
2141
2148
|
},
|
|
2142
2149
|
changed: J
|
|
2143
|
-
},
|
|
2150
|
+
}, Xo));
|
|
2144
2151
|
}
|
|
2145
|
-
function
|
|
2146
|
-
|
|
2152
|
+
function M() {
|
|
2153
|
+
D("dragOverAnimationCapture"), g.captureAnimationState(), g !== p && p.captureAnimationState();
|
|
2147
2154
|
}
|
|
2148
|
-
function H(
|
|
2149
|
-
return
|
|
2150
|
-
insertion:
|
|
2151
|
-
}),
|
|
2152
|
-
|
|
2153
|
-
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (i === h && !h.animated || i === n && !i.animated) && (
|
|
2155
|
+
function H(ee) {
|
|
2156
|
+
return D("dragOverCompleted", {
|
|
2157
|
+
insertion: ee
|
|
2158
|
+
}), ee && (c ? u._hideClone() : u._showClone(g), g !== p && (ot(h, X ? X.options.ghostClass : u.options.ghostClass, !1), ot(h, a.ghostClass, !0)), X !== g && g !== w.active ? X = g : g === w.active && X && (X = null), p === g && (g._ignoreWhileAnimating = i), g.animateAll(function() {
|
|
2159
|
+
D("dragOverAnimationComplete"), g._ignoreWhileAnimating = null;
|
|
2160
|
+
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (i === h && !h.animated || i === n && !i.animated) && (Ft = null), !a.dragoverBubble && !t.rootEl && i !== document && (h.parentNode[it]._isOutsideThisEl(t.target), !ee && Mt(t)), !a.dragoverBubble && t.stopPropagation && t.stopPropagation(), y = !0;
|
|
2154
2161
|
}
|
|
2155
2162
|
function J() {
|
|
2156
|
-
rt = st(h),
|
|
2163
|
+
rt = st(h), Et = st(h, a.draggable), Q({
|
|
2157
2164
|
sortable: g,
|
|
2158
2165
|
name: "change",
|
|
2159
2166
|
toEl: n,
|
|
2160
2167
|
newIndex: rt,
|
|
2161
|
-
newDraggableIndex:
|
|
2168
|
+
newDraggableIndex: Et,
|
|
2162
2169
|
originalEvent: t
|
|
2163
2170
|
});
|
|
2164
2171
|
}
|
|
2165
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = ut(i, a.draggable, n, !0),
|
|
2172
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = ut(i, a.draggable, n, !0), D("dragOver"), w.eventCanceled) return y;
|
|
2166
2173
|
if (h.contains(t.target) || i.animated && i.animatingX && i.animatingY || g._ignoreWhileAnimating === i)
|
|
2167
2174
|
return H(!1);
|
|
2168
|
-
if (
|
|
2169
|
-
if (f = this._getDirection(t, i) === "vertical", o = k(h),
|
|
2175
|
+
if (Fe = !1, u && !a.disabled && (c ? d || (s = N !== R) : X === this || (this.lastPutMode = Ae.checkPull(this, u, h, t)) && l.checkPut(this, u, h, t))) {
|
|
2176
|
+
if (f = this._getDirection(t, i) === "vertical", o = k(h), D("dragOverValid"), w.eventCanceled) return y;
|
|
2170
2177
|
if (s)
|
|
2171
|
-
return N = R,
|
|
2172
|
-
var
|
|
2173
|
-
if (!
|
|
2174
|
-
if (
|
|
2178
|
+
return N = R, M(), this._hideClone(), D("revert"), w.eventCanceled || (It ? R.insertBefore(h, It) : R.appendChild(h)), H(!0);
|
|
2179
|
+
var Z = ti(n, a.draggable);
|
|
2180
|
+
if (!Z || Ts(t, f, this) && !Z.animated) {
|
|
2181
|
+
if (Z === h)
|
|
2175
2182
|
return H(!1);
|
|
2176
|
-
if (
|
|
2177
|
-
return
|
|
2178
|
-
} else if (
|
|
2179
|
-
var K =
|
|
2183
|
+
if (Z && n === t.target && (i = Z), i && (r = k(i)), Te(R, n, h, o, i, r, t, !!i) !== !1)
|
|
2184
|
+
return M(), Z && Z.nextSibling ? n.insertBefore(h, Z.nextSibling) : n.appendChild(h), N = n, J(), H(!0);
|
|
2185
|
+
} else if (Z && Cs(t, f, this)) {
|
|
2186
|
+
var K = Wt(n, 0, a, !0);
|
|
2180
2187
|
if (K === h)
|
|
2181
2188
|
return H(!1);
|
|
2182
|
-
if (i = K, r = k(i),
|
|
2183
|
-
return
|
|
2189
|
+
if (i = K, r = k(i), Te(R, n, h, o, i, r, t, !1) !== !1)
|
|
2190
|
+
return M(), n.insertBefore(h, K), N = n, J(), H(!0);
|
|
2184
2191
|
} else if (i.parentNode === n) {
|
|
2185
2192
|
r = k(i);
|
|
2186
|
-
var b = 0,
|
|
2187
|
-
|
|
2193
|
+
var b = 0, O, z = h.parentNode !== n, U = !xs(h.animated && h.toRect || o, i.animated && i.toRect || r, f), Kt = f ? "top" : "left", wt = xi(i, "top", "top") || xi(h, "top", "top"), Qt = wt ? wt.scrollTop : void 0;
|
|
2194
|
+
Ft !== i && (O = r[Kt], pe = !1, _e = !U && a.invertSwap || z), b = Ps(t, i, r, f, U ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, _e, Ft === i);
|
|
2188
2195
|
var ht;
|
|
2189
2196
|
if (b !== 0) {
|
|
2190
|
-
var
|
|
2197
|
+
var Dt = st(h);
|
|
2191
2198
|
do
|
|
2192
|
-
|
|
2193
|
-
while (ht && (v(ht, "display") === "none" || ht ===
|
|
2199
|
+
Dt -= b, ht = N.children[Dt];
|
|
2200
|
+
while (ht && (v(ht, "display") === "none" || ht === x));
|
|
2194
2201
|
}
|
|
2195
2202
|
if (b === 0 || ht === i)
|
|
2196
2203
|
return H(!1);
|
|
2197
|
-
|
|
2198
|
-
var
|
|
2199
|
-
|
|
2200
|
-
var Se =
|
|
2204
|
+
Ft = i, he = b;
|
|
2205
|
+
var te = i.nextElementSibling, $t = !1;
|
|
2206
|
+
$t = b === 1;
|
|
2207
|
+
var Se = Te(R, n, h, o, i, r, t, $t);
|
|
2201
2208
|
if (Se !== !1)
|
|
2202
|
-
return (Se === 1 || Se === -1) && (
|
|
2209
|
+
return (Se === 1 || Se === -1) && ($t = Se === 1), Hn = !0, setTimeout(_s, 30), M(), $t && !te ? n.appendChild(h) : i.parentNode.insertBefore(h, $t ? te : i), wt && uo(wt, 0, Qt - wt.scrollTop), N = h.parentNode, O !== void 0 && !_e && (Le = Math.abs(O - k(i)[Kt])), J(), H(!0);
|
|
2203
2210
|
}
|
|
2204
2211
|
if (n.contains(h))
|
|
2205
2212
|
return H(!1);
|
|
@@ -2208,21 +2215,21 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2208
2215
|
},
|
|
2209
2216
|
_ignoreWhileAnimating: null,
|
|
2210
2217
|
_offMoveEvents: function() {
|
|
2211
|
-
|
|
2218
|
+
A(document, "mousemove", this._onTouchMove), A(document, "touchmove", this._onTouchMove), A(document, "pointermove", this._onTouchMove), A(document, "dragover", Mt), A(document, "mousemove", Mt), A(document, "touchmove", Mt);
|
|
2212
2219
|
},
|
|
2213
2220
|
_offUpEvents: function() {
|
|
2214
2221
|
var t = this.el.ownerDocument;
|
|
2215
|
-
|
|
2222
|
+
A(t, "mouseup", this._onDrop), A(t, "touchend", this._onDrop), A(t, "pointerup", this._onDrop), A(t, "touchcancel", this._onDrop), A(document, "selectstart", this);
|
|
2216
2223
|
},
|
|
2217
2224
|
_onDrop: function(t) {
|
|
2218
2225
|
var n = this.el, i = this.options;
|
|
2219
|
-
if (rt = st(h),
|
|
2226
|
+
if (rt = st(h), Et = st(h, i.draggable), et("drop", this, {
|
|
2220
2227
|
evt: t
|
|
2221
|
-
}), N = h && h.parentNode, rt = st(h),
|
|
2228
|
+
}), N = h && h.parentNode, rt = st(h), Et = st(h, i.draggable), w.eventCanceled) {
|
|
2222
2229
|
this._nulling();
|
|
2223
2230
|
return;
|
|
2224
2231
|
}
|
|
2225
|
-
|
|
2232
|
+
Zt = !1, _e = !1, pe = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Vn(this.cloneId), Vn(this._dragStartId), this.nativeDraggable && (A(document, "drop", this), A(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ue && v(document.body, "user-select", ""), v(h, "transform", ""), t && (oe && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()), x && x.parentNode && x.parentNode.removeChild(x), (R === N || X && X.lastPutMode !== "clone") && L && L.parentNode && L.parentNode.removeChild(L), h && (this.nativeDraggable && A(h, "dragend", this), Dn(h), h.style["will-change"] = "", oe && !Zt && ot(h, X ? X.options.ghostClass : this.options.ghostClass, !1), ot(h, this.options.chosenClass, !1), Q({
|
|
2226
2233
|
sortable: this,
|
|
2227
2234
|
name: "unchoose",
|
|
2228
2235
|
toEl: N,
|
|
@@ -2251,7 +2258,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2251
2258
|
name: "sort",
|
|
2252
2259
|
toEl: N,
|
|
2253
2260
|
originalEvent: t
|
|
2254
|
-
})),
|
|
2261
|
+
})), X && X.save()) : rt !== Xt && rt >= 0 && (Q({
|
|
2255
2262
|
sortable: this,
|
|
2256
2263
|
name: "update",
|
|
2257
2264
|
toEl: N,
|
|
@@ -2261,7 +2268,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2261
2268
|
name: "sort",
|
|
2262
2269
|
toEl: N,
|
|
2263
2270
|
originalEvent: t
|
|
2264
|
-
})), w.active && ((rt == null || rt === -1) && (rt =
|
|
2271
|
+
})), w.active && ((rt == null || rt === -1) && (rt = Xt, Et = ce), Q({
|
|
2265
2272
|
sortable: this,
|
|
2266
2273
|
name: "end",
|
|
2267
2274
|
toEl: N,
|
|
@@ -2269,9 +2276,9 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2269
2276
|
}), this.save()))), this._nulling();
|
|
2270
2277
|
},
|
|
2271
2278
|
_nulling: function() {
|
|
2272
|
-
|
|
2279
|
+
et("nulling", this), R = h = N = x = It = L = Re = St = Lt = lt = oe = rt = Et = Xt = ce = Ft = he = X = Ae = w.dragged = w.ghost = w.clone = w.active = null, Ze.forEach(function(t) {
|
|
2273
2280
|
t.checked = !0;
|
|
2274
|
-
}),
|
|
2281
|
+
}), Ze.length = Cn = Tn = 0;
|
|
2275
2282
|
},
|
|
2276
2283
|
handleEvent: function(t) {
|
|
2277
2284
|
switch (t.type) {
|
|
@@ -2281,7 +2288,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2281
2288
|
break;
|
|
2282
2289
|
case "dragenter":
|
|
2283
2290
|
case "dragover":
|
|
2284
|
-
h && (this._onDragOver(t),
|
|
2291
|
+
h && (this._onDragOver(t), As(t));
|
|
2285
2292
|
break;
|
|
2286
2293
|
case "selectstart":
|
|
2287
2294
|
t.preventDefault();
|
|
@@ -2294,7 +2301,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2294
2301
|
*/
|
|
2295
2302
|
toArray: function() {
|
|
2296
2303
|
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) ||
|
|
2304
|
+
n = i[o], ut(n, s.draggable, this.el, !1) && t.push(n.getAttribute(s.dataIdAttr) || Os(n));
|
|
2298
2305
|
return t;
|
|
2299
2306
|
},
|
|
2300
2307
|
/**
|
|
@@ -2336,23 +2343,23 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2336
2343
|
var i = this.options;
|
|
2337
2344
|
if (n === void 0)
|
|
2338
2345
|
return i[t];
|
|
2339
|
-
var o =
|
|
2340
|
-
typeof o < "u" ? i[t] = o : i[t] = n, t === "group" &&
|
|
2346
|
+
var o = Ee.modifyOption(this, t, n);
|
|
2347
|
+
typeof o < "u" ? i[t] = o : i[t] = n, t === "group" && go(i);
|
|
2341
2348
|
},
|
|
2342
2349
|
/**
|
|
2343
2350
|
* Destroy
|
|
2344
2351
|
*/
|
|
2345
2352
|
destroy: function() {
|
|
2346
|
-
|
|
2353
|
+
et("destroy", this);
|
|
2347
2354
|
var t = this.el;
|
|
2348
|
-
t[
|
|
2355
|
+
t[it] = null, A(t, "mousedown", this._onTapStart), A(t, "touchstart", this._onTapStart), A(t, "pointerdown", this._onTapStart), this.nativeDraggable && (A(t, "dragover", this), A(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(n) {
|
|
2349
2356
|
n.removeAttribute("draggable");
|
|
2350
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2357
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), je.splice(je.indexOf(this.el), 1), this.el = t = null;
|
|
2351
2358
|
},
|
|
2352
2359
|
_hideClone: function() {
|
|
2353
2360
|
if (!St) {
|
|
2354
|
-
if (
|
|
2355
|
-
v(
|
|
2361
|
+
if (et("hideClone", this), w.eventCanceled) return;
|
|
2362
|
+
v(L, "display", "none"), this.options.removeCloneOnHide && L.parentNode && L.parentNode.removeChild(L), St = !0;
|
|
2356
2363
|
}
|
|
2357
2364
|
},
|
|
2358
2365
|
_showClone: function(t) {
|
|
@@ -2361,94 +2368,94 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2361
2368
|
return;
|
|
2362
2369
|
}
|
|
2363
2370
|
if (St) {
|
|
2364
|
-
if (
|
|
2365
|
-
h.parentNode == R && !this.options.group.revertClone ? R.insertBefore(
|
|
2371
|
+
if (et("showClone", this), w.eventCanceled) return;
|
|
2372
|
+
h.parentNode == R && !this.options.group.revertClone ? R.insertBefore(L, h) : It ? R.insertBefore(L, It) : R.appendChild(L), this.options.group.revertClone && this.animate(h, L), v(L, "display", ""), St = !1;
|
|
2366
2373
|
}
|
|
2367
2374
|
}
|
|
2368
2375
|
};
|
|
2369
|
-
function
|
|
2376
|
+
function As(e) {
|
|
2370
2377
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2371
2378
|
}
|
|
2372
|
-
function
|
|
2373
|
-
var l, u = e[
|
|
2374
|
-
return window.CustomEvent && !
|
|
2379
|
+
function Te(e, t, n, i, o, r, s, a) {
|
|
2380
|
+
var l, u = e[it], c = u.options.onMove, d;
|
|
2381
|
+
return window.CustomEvent && !vt && !xe ? l = new CustomEvent("move", {
|
|
2375
2382
|
bubbles: !0,
|
|
2376
2383
|
cancelable: !0
|
|
2377
2384
|
}) : (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 || k(t), l.willInsertAfter = a, l.originalEvent = s, e.dispatchEvent(l), c && (d = c.call(u, l, s)), d;
|
|
2378
2385
|
}
|
|
2379
|
-
function
|
|
2386
|
+
function Dn(e) {
|
|
2380
2387
|
e.draggable = !1;
|
|
2381
2388
|
}
|
|
2382
|
-
function
|
|
2383
|
-
|
|
2389
|
+
function _s() {
|
|
2390
|
+
Hn = !1;
|
|
2384
2391
|
}
|
|
2385
|
-
function
|
|
2386
|
-
var i = k(
|
|
2392
|
+
function Cs(e, t, n) {
|
|
2393
|
+
var i = k(Wt(n.el, 0, n.options, !0)), o = ho(n.el, n.options, x), r = 10;
|
|
2387
2394
|
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
2395
|
}
|
|
2389
|
-
function
|
|
2390
|
-
var i = k(
|
|
2396
|
+
function Ts(e, t, n) {
|
|
2397
|
+
var i = k(ti(n.el, n.options.draggable)), o = ho(n.el, n.options, x), r = 10;
|
|
2391
2398
|
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
2399
|
}
|
|
2393
|
-
function
|
|
2400
|
+
function Ps(e, t, n, i, o, r, s, a) {
|
|
2394
2401
|
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
2402
|
if (!s) {
|
|
2396
|
-
if (a &&
|
|
2397
|
-
if (!
|
|
2403
|
+
if (a && Le < u * o) {
|
|
2404
|
+
if (!pe && (he === 1 ? l > c + u * r / 2 : l < d - u * r / 2) && (pe = !0), pe)
|
|
2398
2405
|
p = !0;
|
|
2399
|
-
else if (
|
|
2400
|
-
return -
|
|
2406
|
+
else if (he === 1 ? l < c + Le : l > d - Le)
|
|
2407
|
+
return -he;
|
|
2401
2408
|
} else if (l > c + u * (1 - o) / 2 && l < d - u * (1 - o) / 2)
|
|
2402
|
-
return
|
|
2409
|
+
return Ds(t);
|
|
2403
2410
|
}
|
|
2404
2411
|
return p = p || s, p && (l < c + u * r / 2 || l > d - u * r / 2) ? l > c + u / 2 ? 1 : -1 : 0;
|
|
2405
2412
|
}
|
|
2406
|
-
function
|
|
2413
|
+
function Ds(e) {
|
|
2407
2414
|
return st(h) < st(e) ? 1 : -1;
|
|
2408
2415
|
}
|
|
2409
|
-
function
|
|
2416
|
+
function Os(e) {
|
|
2410
2417
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, i = 0; n--; )
|
|
2411
2418
|
i += t.charCodeAt(n);
|
|
2412
2419
|
return i.toString(36);
|
|
2413
2420
|
}
|
|
2414
|
-
function
|
|
2415
|
-
|
|
2421
|
+
function Rs(e) {
|
|
2422
|
+
Ze.length = 0;
|
|
2416
2423
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--; ) {
|
|
2417
2424
|
var i = t[n];
|
|
2418
|
-
i.checked &&
|
|
2425
|
+
i.checked && Ze.push(i);
|
|
2419
2426
|
}
|
|
2420
2427
|
}
|
|
2421
|
-
function
|
|
2428
|
+
function Me(e) {
|
|
2422
2429
|
return setTimeout(e, 0);
|
|
2423
2430
|
}
|
|
2424
|
-
function
|
|
2431
|
+
function Vn(e) {
|
|
2425
2432
|
return clearTimeout(e);
|
|
2426
2433
|
}
|
|
2427
|
-
|
|
2428
|
-
(w.active ||
|
|
2434
|
+
mn && T(document, "touchmove", function(e) {
|
|
2435
|
+
(w.active || Zt) && e.cancelable && e.preventDefault();
|
|
2429
2436
|
});
|
|
2430
2437
|
w.utils = {
|
|
2431
|
-
on:
|
|
2432
|
-
off:
|
|
2438
|
+
on: T,
|
|
2439
|
+
off: A,
|
|
2433
2440
|
css: v,
|
|
2434
|
-
find:
|
|
2441
|
+
find: ao,
|
|
2435
2442
|
is: function(t, n) {
|
|
2436
2443
|
return !!ut(t, n, t, !1);
|
|
2437
2444
|
},
|
|
2438
|
-
extend:
|
|
2439
|
-
throttle:
|
|
2445
|
+
extend: fs,
|
|
2446
|
+
throttle: lo,
|
|
2440
2447
|
closest: ut,
|
|
2441
2448
|
toggleClass: ot,
|
|
2442
|
-
clone:
|
|
2449
|
+
clone: co,
|
|
2443
2450
|
index: st,
|
|
2444
|
-
nextTick:
|
|
2445
|
-
cancelNextTick:
|
|
2446
|
-
detectDirection:
|
|
2447
|
-
getChild:
|
|
2448
|
-
expando:
|
|
2451
|
+
nextTick: Me,
|
|
2452
|
+
cancelNextTick: Vn,
|
|
2453
|
+
detectDirection: fo,
|
|
2454
|
+
getChild: Wt,
|
|
2455
|
+
expando: it
|
|
2449
2456
|
};
|
|
2450
2457
|
w.get = function(e) {
|
|
2451
|
-
return e[
|
|
2458
|
+
return e[it];
|
|
2452
2459
|
};
|
|
2453
2460
|
w.mount = function() {
|
|
2454
2461
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
@@ -2456,15 +2463,15 @@ w.mount = function() {
|
|
|
2456
2463
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(i) {
|
|
2457
2464
|
if (!i.prototype || !i.prototype.constructor)
|
|
2458
2465
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));
|
|
2459
|
-
i.utils && (w.utils = ct(ct({}, w.utils), i.utils)),
|
|
2466
|
+
i.utils && (w.utils = ct(ct({}, w.utils), i.utils)), Ee.mount(i);
|
|
2460
2467
|
});
|
|
2461
2468
|
};
|
|
2462
2469
|
w.create = function(e, t) {
|
|
2463
2470
|
return new w(e, t);
|
|
2464
2471
|
};
|
|
2465
|
-
w.version =
|
|
2466
|
-
var
|
|
2467
|
-
function
|
|
2472
|
+
w.version = hs;
|
|
2473
|
+
var B = [], re, Bn, kn = !1, On, Rn, ze, se;
|
|
2474
|
+
function Ls() {
|
|
2468
2475
|
function e() {
|
|
2469
2476
|
this.defaults = {
|
|
2470
2477
|
scroll: !0,
|
|
@@ -2479,74 +2486,74 @@ function Ps() {
|
|
|
2479
2486
|
return e.prototype = {
|
|
2480
2487
|
dragStarted: function(n) {
|
|
2481
2488
|
var i = n.originalEvent;
|
|
2482
|
-
this.sortable.nativeDraggable ?
|
|
2489
|
+
this.sortable.nativeDraggable ? T(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? T(document, "pointermove", this._handleFallbackAutoScroll) : i.touches ? T(document, "touchmove", this._handleFallbackAutoScroll) : T(document, "mousemove", this._handleFallbackAutoScroll);
|
|
2483
2490
|
},
|
|
2484
2491
|
dragOverCompleted: function(n) {
|
|
2485
2492
|
var i = n.originalEvent;
|
|
2486
2493
|
!this.options.dragOverBubble && !i.rootEl && this._handleAutoScroll(i);
|
|
2487
2494
|
},
|
|
2488
2495
|
drop: function() {
|
|
2489
|
-
this.sortable.nativeDraggable ?
|
|
2496
|
+
this.sortable.nativeDraggable ? A(document, "dragover", this._handleAutoScroll) : (A(document, "pointermove", this._handleFallbackAutoScroll), A(document, "touchmove", this._handleFallbackAutoScroll), A(document, "mousemove", this._handleFallbackAutoScroll)), Ci(), Ie(), gs();
|
|
2490
2497
|
},
|
|
2491
2498
|
nulling: function() {
|
|
2492
|
-
|
|
2499
|
+
ze = Bn = re = kn = se = On = Rn = null, B.length = 0;
|
|
2493
2500
|
},
|
|
2494
2501
|
_handleFallbackAutoScroll: function(n) {
|
|
2495
2502
|
this._handleAutoScroll(n, !0);
|
|
2496
2503
|
},
|
|
2497
2504
|
_handleAutoScroll: function(n, i) {
|
|
2498
2505
|
var o = this, r = (n.touches ? n.touches[0] : n).clientX, s = (n.touches ? n.touches[0] : n).clientY, a = document.elementFromPoint(r, s);
|
|
2499
|
-
if (
|
|
2500
|
-
|
|
2501
|
-
var l =
|
|
2502
|
-
|
|
2503
|
-
var u =
|
|
2504
|
-
u !== l && (l = u,
|
|
2505
|
-
}, 10),
|
|
2506
|
+
if (ze = n, i || this.options.forceAutoScrollFallback || xe || vt || ue) {
|
|
2507
|
+
Ln(n, this.options, a, i);
|
|
2508
|
+
var l = _t(a, !0);
|
|
2509
|
+
kn && (!se || r !== On || s !== Rn) && (se && Ci(), se = setInterval(function() {
|
|
2510
|
+
var u = _t(document.elementFromPoint(r, s), !0);
|
|
2511
|
+
u !== l && (l = u, Ie()), Ln(n, o.options, u, i);
|
|
2512
|
+
}, 10), On = r, Rn = s);
|
|
2506
2513
|
} else {
|
|
2507
|
-
if (!this.options.bubbleScroll ||
|
|
2508
|
-
|
|
2514
|
+
if (!this.options.bubbleScroll || _t(a, !0) === dt()) {
|
|
2515
|
+
Ie();
|
|
2509
2516
|
return;
|
|
2510
2517
|
}
|
|
2511
|
-
|
|
2518
|
+
Ln(n, this.options, _t(a, !1), !1);
|
|
2512
2519
|
}
|
|
2513
2520
|
}
|
|
2514
|
-
},
|
|
2521
|
+
}, bt(e, {
|
|
2515
2522
|
pluginName: "scroll",
|
|
2516
2523
|
initializeByDefault: !0
|
|
2517
2524
|
});
|
|
2518
2525
|
}
|
|
2519
|
-
function
|
|
2520
|
-
|
|
2526
|
+
function Ie() {
|
|
2527
|
+
B.forEach(function(e) {
|
|
2521
2528
|
clearInterval(e.pid);
|
|
2522
|
-
}),
|
|
2529
|
+
}), B = [];
|
|
2523
2530
|
}
|
|
2524
|
-
function
|
|
2525
|
-
clearInterval(
|
|
2531
|
+
function Ci() {
|
|
2532
|
+
clearInterval(se);
|
|
2526
2533
|
}
|
|
2527
|
-
var
|
|
2534
|
+
var Ln = lo(function(e, t, n, i) {
|
|
2528
2535
|
if (t.scroll) {
|
|
2529
2536
|
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;
|
|
2530
|
-
|
|
2531
|
-
var d = 0, p =
|
|
2537
|
+
Bn !== n && (Bn = n, Ie(), re = t.scroll, c = t.scrollFn, re === !0 && (re = _t(n, !0)));
|
|
2538
|
+
var d = 0, p = re;
|
|
2532
2539
|
do {
|
|
2533
|
-
var f = p, g = k(f), y = g.top,
|
|
2534
|
-
f === l ? (K = J <
|
|
2535
|
-
var
|
|
2536
|
-
if (!
|
|
2537
|
-
for (var
|
|
2538
|
-
|
|
2539
|
-
(
|
|
2540
|
-
i && this.layer === 0 && w.active._onTouchMove(
|
|
2541
|
-
var
|
|
2542
|
-
typeof c == "function" && c.call(w.dragged.parentNode[
|
|
2540
|
+
var f = p, g = k(f), y = g.top, D = g.bottom, M = g.left, H = g.right, J = g.width, Z = g.height, K = void 0, b = void 0, O = f.scrollWidth, z = f.scrollHeight, U = v(f), Kt = f.scrollLeft, wt = f.scrollTop;
|
|
2541
|
+
f === l ? (K = J < O && (U.overflowX === "auto" || U.overflowX === "scroll" || U.overflowX === "visible"), b = Z < z && (U.overflowY === "auto" || U.overflowY === "scroll" || U.overflowY === "visible")) : (K = J < O && (U.overflowX === "auto" || U.overflowX === "scroll"), b = Z < z && (U.overflowY === "auto" || U.overflowY === "scroll"));
|
|
2542
|
+
var Qt = K && (Math.abs(H - o) <= s && Kt + J < O) - (Math.abs(M - o) <= s && !!Kt), ht = b && (Math.abs(D - r) <= s && wt + Z < z) - (Math.abs(y - r) <= s && !!wt);
|
|
2543
|
+
if (!B[d])
|
|
2544
|
+
for (var Dt = 0; Dt <= d; Dt++)
|
|
2545
|
+
B[Dt] || (B[Dt] = {});
|
|
2546
|
+
(B[d].vx != Qt || B[d].vy != ht || B[d].el !== f) && (B[d].el = f, B[d].vx = Qt, B[d].vy = ht, clearInterval(B[d].pid), (Qt != 0 || ht != 0) && (u = !0, B[d].pid = setInterval((function() {
|
|
2547
|
+
i && this.layer === 0 && w.active._onTouchMove(ze);
|
|
2548
|
+
var te = B[this.layer].vy ? B[this.layer].vy * a : 0, $t = B[this.layer].vx ? B[this.layer].vx * a : 0;
|
|
2549
|
+
typeof c == "function" && c.call(w.dragged.parentNode[it], $t, te, e, ze, B[this.layer].el) !== "continue" || uo(B[this.layer].el, $t, te);
|
|
2543
2550
|
}).bind({
|
|
2544
2551
|
layer: d
|
|
2545
2552
|
}), 24))), d++;
|
|
2546
|
-
} while (t.bubbleScroll && p !== l && (p =
|
|
2547
|
-
|
|
2553
|
+
} while (t.bubbleScroll && p !== l && (p = _t(p, !1)));
|
|
2554
|
+
kn = u;
|
|
2548
2555
|
}
|
|
2549
|
-
}, 30),
|
|
2556
|
+
}, 30), bo = function(t) {
|
|
2550
2557
|
var n = t.originalEvent, i = t.putSortable, o = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
2551
2558
|
if (n) {
|
|
2552
2559
|
var u = i || r;
|
|
@@ -2558,9 +2565,9 @@ var On = io(function(e, t, n, i) {
|
|
|
2558
2565
|
}));
|
|
2559
2566
|
}
|
|
2560
2567
|
};
|
|
2561
|
-
function
|
|
2568
|
+
function ei() {
|
|
2562
2569
|
}
|
|
2563
|
-
|
|
2570
|
+
ei.prototype = {
|
|
2564
2571
|
startIndex: null,
|
|
2565
2572
|
dragStart: function(t) {
|
|
2566
2573
|
var n = t.oldDraggableIndex;
|
|
@@ -2569,35 +2576,35 @@ Jn.prototype = {
|
|
|
2569
2576
|
onSpill: function(t) {
|
|
2570
2577
|
var n = t.dragEl, i = t.putSortable;
|
|
2571
2578
|
this.sortable.captureAnimationState(), i && i.captureAnimationState();
|
|
2572
|
-
var o =
|
|
2579
|
+
var o = Wt(this.sortable.el, this.startIndex, this.options);
|
|
2573
2580
|
o ? this.sortable.el.insertBefore(n, o) : this.sortable.el.appendChild(n), this.sortable.animateAll(), i && i.animateAll();
|
|
2574
2581
|
},
|
|
2575
|
-
drop:
|
|
2582
|
+
drop: bo
|
|
2576
2583
|
};
|
|
2577
|
-
|
|
2584
|
+
bt(ei, {
|
|
2578
2585
|
pluginName: "revertOnSpill"
|
|
2579
2586
|
});
|
|
2580
|
-
function
|
|
2587
|
+
function ni() {
|
|
2581
2588
|
}
|
|
2582
|
-
|
|
2589
|
+
ni.prototype = {
|
|
2583
2590
|
onSpill: function(t) {
|
|
2584
2591
|
var n = t.dragEl, i = t.putSortable, o = i || this.sortable;
|
|
2585
2592
|
o.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), o.animateAll();
|
|
2586
2593
|
},
|
|
2587
|
-
drop:
|
|
2594
|
+
drop: bo
|
|
2588
2595
|
};
|
|
2589
|
-
|
|
2596
|
+
bt(ni, {
|
|
2590
2597
|
pluginName: "removeOnSpill"
|
|
2591
2598
|
});
|
|
2592
|
-
w.mount(new
|
|
2593
|
-
w.mount(
|
|
2594
|
-
const
|
|
2599
|
+
w.mount(new Ls());
|
|
2600
|
+
w.mount(ni, ei);
|
|
2601
|
+
const Ms = (e) => {
|
|
2595
2602
|
const t = e.item;
|
|
2596
2603
|
let n = Array.prototype.slice.call(t.parentNode.childNodes);
|
|
2597
2604
|
return n = n.filter(
|
|
2598
2605
|
(i) => i.nodeType != Node.ELEMENT_NODE || !i.classList.contains("sortable-fallback")
|
|
2599
2606
|
), n;
|
|
2600
|
-
},
|
|
2607
|
+
}, Is = (e, t, n, i, o, r) => {
|
|
2601
2608
|
const a = e.item.parentNode;
|
|
2602
2609
|
for (const y of n)
|
|
2603
2610
|
a.appendChild(y);
|
|
@@ -2621,7 +2628,7 @@ const Os = (e) => {
|
|
|
2621
2628
|
}
|
|
2622
2629
|
t.requestUpdate();
|
|
2623
2630
|
};
|
|
2624
|
-
function
|
|
2631
|
+
function Ns(e, t, n, i) {
|
|
2625
2632
|
let o = [], r = null;
|
|
2626
2633
|
e._sortable = w.create(e, {
|
|
2627
2634
|
handle: ".drag-handle",
|
|
@@ -2629,14 +2636,14 @@ function Rs(e, t, n, i) {
|
|
|
2629
2636
|
swapThreshold: 0.5,
|
|
2630
2637
|
animation: 150,
|
|
2631
2638
|
easing: "cubic-bezier(1, 0, 0, 1)",
|
|
2632
|
-
onStart: (s) => o =
|
|
2639
|
+
onStart: (s) => o = Ms(s),
|
|
2633
2640
|
onMove: (s) => {
|
|
2634
2641
|
r = s.related;
|
|
2635
2642
|
},
|
|
2636
|
-
onEnd: (s) =>
|
|
2643
|
+
onEnd: (s) => Is(s, i, o, t, n, r)
|
|
2637
2644
|
});
|
|
2638
2645
|
}
|
|
2639
|
-
function
|
|
2646
|
+
function Hs(e, t, n, i) {
|
|
2640
2647
|
const o = e.getArray();
|
|
2641
2648
|
let r = !1;
|
|
2642
2649
|
o.forEach((s) => {
|
|
@@ -2644,7 +2651,7 @@ function Ms(e, t, n, i) {
|
|
|
2644
2651
|
s.get(t) || (s.set(t, a), r = !0), s.get(n) || (s.set(n, `layer ${a}`), r = !0), r && i.requestUpdate();
|
|
2645
2652
|
});
|
|
2646
2653
|
}
|
|
2647
|
-
function
|
|
2654
|
+
function ii(e, t, n) {
|
|
2648
2655
|
let i = [];
|
|
2649
2656
|
const o = (r, s, a) => {
|
|
2650
2657
|
i = [
|
|
@@ -2659,31 +2666,102 @@ function Qn(e, t, n) {
|
|
|
2659
2666
|
);
|
|
2660
2667
|
return l.length > 0 && l.forEach(
|
|
2661
2668
|
(u) => (
|
|
2662
|
-
// @ts-
|
|
2669
|
+
// @ts-expect-error TODO
|
|
2663
2670
|
o(u.getLayers().getArray(), s, a)
|
|
2664
2671
|
)
|
|
2665
2672
|
), i;
|
|
2666
2673
|
};
|
|
2667
2674
|
return o(e, t, n), i;
|
|
2668
2675
|
}
|
|
2669
|
-
function
|
|
2676
|
+
function Vs(e, t, n) {
|
|
2670
2677
|
if (!e || !t) return !1;
|
|
2671
|
-
if (!
|
|
2678
|
+
if (!vo(e, n)) return !0;
|
|
2672
2679
|
const i = e.get("minZoom"), o = e.get("maxZoom"), r = t.getView().getZoom();
|
|
2673
2680
|
return r > i && r < o;
|
|
2674
2681
|
}
|
|
2675
|
-
function
|
|
2682
|
+
function vo(e, t) {
|
|
2676
2683
|
const n = e.get("minZoom"), i = e.get("maxZoom");
|
|
2677
2684
|
return !!(t && (n !== -1 / 0 || i !== 1 / 0));
|
|
2678
2685
|
}
|
|
2679
|
-
function
|
|
2686
|
+
function Bs(e, t) {
|
|
2680
2687
|
var o, r, s;
|
|
2681
2688
|
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(
|
|
2682
|
-
// @ts-
|
|
2689
|
+
// @ts-expect-error TODO
|
|
2683
2690
|
e.getSource ? (r = e.getSource()) == null ? void 0 : r.ol_uid : void 0
|
|
2684
2691
|
)) ? "draw" : e.declutter_ !== void 0 ? "vector" : "raster";
|
|
2685
2692
|
}
|
|
2686
|
-
|
|
2693
|
+
const ks = (e, t, n) => {
|
|
2694
|
+
let i = t;
|
|
2695
|
+
return n.layer.getSource().getTileUrlFunction() && (i || (i = n.layer.getSource().getTileUrlFunction()), n.layer.getSource().setTileUrlFunction(
|
|
2696
|
+
(...o) => ls(i(...o), e)
|
|
2697
|
+
), n.layer.getSource().setKey(/* @__PURE__ */ new Date())), i;
|
|
2698
|
+
};
|
|
2699
|
+
function Us(e, t, n) {
|
|
2700
|
+
const i = "updateStyleVariables" in t, o = "setStyle" in t, r = i ? (
|
|
2701
|
+
/** @type {import('ol/layer/WebGLTile').default} */
|
|
2702
|
+
t.style_
|
|
2703
|
+
) : n.style;
|
|
2704
|
+
let s = r == null ? void 0 : r.variables;
|
|
2705
|
+
if (s) {
|
|
2706
|
+
const a = oi(e);
|
|
2707
|
+
if (r.variables = {
|
|
2708
|
+
...s,
|
|
2709
|
+
...a
|
|
2710
|
+
}, i)
|
|
2711
|
+
t.updateStyleVariables(a);
|
|
2712
|
+
else if (o) {
|
|
2713
|
+
const l = Fs(r);
|
|
2714
|
+
t.setStyle(
|
|
2715
|
+
l
|
|
2716
|
+
);
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
const oi = (e) => {
|
|
2721
|
+
const t = {};
|
|
2722
|
+
for (const n in e)
|
|
2723
|
+
if (typeof e[n] == "object" && e[n] !== null) {
|
|
2724
|
+
const i = oi(
|
|
2725
|
+
/** @type {Record<string,any>} */
|
|
2726
|
+
e[n]
|
|
2727
|
+
);
|
|
2728
|
+
for (const o in i)
|
|
2729
|
+
t[o] = i == null ? void 0 : i[o];
|
|
2730
|
+
} else
|
|
2731
|
+
t[n] = e == null ? void 0 : e[n];
|
|
2732
|
+
return t;
|
|
2733
|
+
};
|
|
2734
|
+
function Fs(e) {
|
|
2735
|
+
let t = e;
|
|
2736
|
+
if ("variables" in e) {
|
|
2737
|
+
let n = JSON.stringify(e);
|
|
2738
|
+
const { variables: i } = e;
|
|
2739
|
+
for (const o in i)
|
|
2740
|
+
typeof i[o] == "number" ? n = n.replaceAll(`["var","${o}"]`, i[o]) : n = n.replaceAll(
|
|
2741
|
+
`["var","${o}"]`,
|
|
2742
|
+
`"${i[o]}"`
|
|
2743
|
+
);
|
|
2744
|
+
t = JSON.parse(n);
|
|
2745
|
+
}
|
|
2746
|
+
return t;
|
|
2747
|
+
}
|
|
2748
|
+
const js = (e, t) => {
|
|
2749
|
+
var n;
|
|
2750
|
+
if (e)
|
|
2751
|
+
return !("domainProperties" in e) || "domain" in e ? { ...e } : (n = Object.keys(e)) == null ? void 0 : n.reduce(
|
|
2752
|
+
(i, o) => {
|
|
2753
|
+
if (o === "domainProperties") {
|
|
2754
|
+
const r = oi(t);
|
|
2755
|
+
i.domain = e[o].map((s) => r[s]);
|
|
2756
|
+
} else
|
|
2757
|
+
i[o] = e[o];
|
|
2758
|
+
return i;
|
|
2759
|
+
},
|
|
2760
|
+
/** @type {import("../components/layer-legend").LegendConfig} */
|
|
2761
|
+
{}
|
|
2762
|
+
);
|
|
2763
|
+
};
|
|
2764
|
+
function wo(e, t) {
|
|
2687
2765
|
var i;
|
|
2688
2766
|
let n = {};
|
|
2689
2767
|
for (const o in e) {
|
|
@@ -2691,7 +2769,7 @@ function go(e, t) {
|
|
|
2691
2769
|
if (r && r !== "object")
|
|
2692
2770
|
n[o] = r === "number" ? Number(t[o]) : t[o];
|
|
2693
2771
|
else if (typeof e[o] == "object" && ((i = e[o]) != null && i.properties)) {
|
|
2694
|
-
const s =
|
|
2772
|
+
const s = wo(
|
|
2695
2773
|
e[o].properties,
|
|
2696
2774
|
t
|
|
2697
2775
|
);
|
|
@@ -2700,7 +2778,7 @@ function go(e, t) {
|
|
|
2700
2778
|
}
|
|
2701
2779
|
return n;
|
|
2702
2780
|
}
|
|
2703
|
-
function
|
|
2781
|
+
function Zs(e, t) {
|
|
2704
2782
|
var r, s, a, l, u;
|
|
2705
2783
|
if (!t) return null;
|
|
2706
2784
|
let n = {}, i = "updateStyleVariables" in e ? (
|
|
@@ -2713,20 +2791,20 @@ function Hs(e, t) {
|
|
|
2713
2791
|
const c = new URL(e.getSource().getTileUrlFunction()([0, 0, 0]));
|
|
2714
2792
|
n = Object.fromEntries(c.searchParams.entries());
|
|
2715
2793
|
} else return null;
|
|
2716
|
-
const o =
|
|
2794
|
+
const o = wo(
|
|
2717
2795
|
((u = t.schema) == null ? void 0 : u.properties) || t.schema,
|
|
2718
2796
|
n
|
|
2719
2797
|
);
|
|
2720
2798
|
return Object.keys(o).length ? o : null;
|
|
2721
2799
|
}
|
|
2722
|
-
const
|
|
2800
|
+
const zs = (e, t) => e == null ? void 0 : e.filter(
|
|
2723
2801
|
(n) => ["remove", "sort"].filter((i) => t != null && t.get("layerControlDisable") ? i !== "sort" : !0).includes(n)
|
|
2724
|
-
),
|
|
2802
|
+
), Xs = (e, t) => e == null ? void 0 : e.filter((n) => {
|
|
2725
2803
|
let i = !0;
|
|
2726
|
-
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;
|
|
2727
|
-
}),
|
|
2728
|
-
<button slot="${e}-icon" class="icon">${t ? e :
|
|
2729
|
-
`,
|
|
2804
|
+
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")), n === "legend" && (i = t.get("layerLegend")), i;
|
|
2805
|
+
}), qs = (e, t) => $`
|
|
2806
|
+
<button slot="${e}-icon" class="icon">${t ? e : P}</button>
|
|
2807
|
+
`, Ys = (e) => $`
|
|
2730
2808
|
<button
|
|
2731
2809
|
class="remove-icon icon"
|
|
2732
2810
|
@click=${() => {
|
|
@@ -2739,13 +2817,13 @@ const Ls = (e, t) => e == null ? void 0 : e.filter(
|
|
|
2739
2817
|
);
|
|
2740
2818
|
}}
|
|
2741
2819
|
>
|
|
2742
|
-
${e.unstyled ? "x" :
|
|
2820
|
+
${e.unstyled ? "x" : P}
|
|
2743
2821
|
</button>
|
|
2744
|
-
`,
|
|
2822
|
+
`, Ws = (e) => $`
|
|
2745
2823
|
<span class="button sort-icon icon drag-handle">
|
|
2746
|
-
${e ? "═" :
|
|
2824
|
+
${e ? "═" : P}
|
|
2747
2825
|
</span>
|
|
2748
|
-
`,
|
|
2826
|
+
`, $o = (e) => {
|
|
2749
2827
|
var n;
|
|
2750
2828
|
const t = ["layerControlHide", "layerControlOptional"];
|
|
2751
2829
|
return (n = e == null ? void 0 : e.getArray()) == null ? void 0 : n.filter((i) => t.every((o) => !i.get(o)));
|
|
@@ -2755,23 +2833,23 @@ const Ls = (e, t) => e == null ? void 0 : e.filter(
|
|
|
2755
2833
|
* Copyright 2020 Google LLC
|
|
2756
2834
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2757
2835
|
*/
|
|
2758
|
-
const
|
|
2836
|
+
const xo = Gn(class extends Jn {
|
|
2759
2837
|
constructor(e) {
|
|
2760
|
-
if (super(e), e.type !==
|
|
2761
|
-
if (!
|
|
2838
|
+
if (super(e), e.type !== xt.PROPERTY && e.type !== xt.ATTRIBUTE && e.type !== xt.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
2839
|
+
if (!dr(e)) throw Error("`live` bindings can only contain a single expression");
|
|
2762
2840
|
}
|
|
2763
2841
|
render(e) {
|
|
2764
2842
|
return e;
|
|
2765
2843
|
}
|
|
2766
2844
|
update(e, [t]) {
|
|
2767
|
-
if (t === at || t ===
|
|
2845
|
+
if (t === at || t === P) return t;
|
|
2768
2846
|
const n = e.element, i = e.name;
|
|
2769
|
-
if (e.type ===
|
|
2847
|
+
if (e.type === xt.PROPERTY) {
|
|
2770
2848
|
if (t === n[i]) return at;
|
|
2771
|
-
} else if (e.type ===
|
|
2849
|
+
} else if (e.type === xt.BOOLEAN_ATTRIBUTE) {
|
|
2772
2850
|
if (!!t === n.hasAttribute(i)) return at;
|
|
2773
|
-
} else if (e.type ===
|
|
2774
|
-
return
|
|
2851
|
+
} else if (e.type === xt.ATTRIBUTE && n.getAttribute(i) === t + "") return at;
|
|
2852
|
+
return Yi(e), t;
|
|
2775
2853
|
}
|
|
2776
2854
|
});
|
|
2777
2855
|
/**
|
|
@@ -2779,12 +2857,12 @@ const yo = Xn(class extends qn {
|
|
|
2779
2857
|
* Copyright 2017 Google LLC
|
|
2780
2858
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2781
2859
|
*/
|
|
2782
|
-
class
|
|
2860
|
+
class Un extends Jn {
|
|
2783
2861
|
constructor(t) {
|
|
2784
|
-
if (super(t), this.it =
|
|
2862
|
+
if (super(t), this.it = P, t.type !== xt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
2785
2863
|
}
|
|
2786
2864
|
render(t) {
|
|
2787
|
-
if (t ===
|
|
2865
|
+
if (t === P || t == null) return this._t = void 0, this.it = t;
|
|
2788
2866
|
if (t === at) return t;
|
|
2789
2867
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
2790
2868
|
if (t === this.it) return this._t;
|
|
@@ -2793,106 +2871,51 @@ class Bn extends qn {
|
|
|
2793
2871
|
return n.raw = n, this._t = { _$litType$: this.constructor.resultType, strings: n, values: [] };
|
|
2794
2872
|
}
|
|
2795
2873
|
}
|
|
2796
|
-
|
|
2797
|
-
const
|
|
2874
|
+
Un.directiveName = "unsafeHTML", Un.resultType = 1;
|
|
2875
|
+
const Gs = Gn(Un);
|
|
2798
2876
|
/**
|
|
2799
2877
|
* @license
|
|
2800
2878
|
* Copyright 2021 Google LLC
|
|
2801
2879
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2802
2880
|
*/
|
|
2803
|
-
function*
|
|
2881
|
+
function* Ne(e, t) {
|
|
2804
2882
|
if (e !== void 0) {
|
|
2805
2883
|
let n = 0;
|
|
2806
2884
|
for (const i of e) yield t(i, n++);
|
|
2807
2885
|
}
|
|
2808
2886
|
}
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
return n.layer.getSource().getTileUrlFunction() && (i || (i = n.layer.getSource().getTileUrlFunction()), n.layer.getSource().setTileUrlFunction(
|
|
2812
|
-
(...o) => os(i(...o), e)
|
|
2813
|
-
), n.layer.getSource().setKey(/* @__PURE__ */ new Date())), i;
|
|
2814
|
-
};
|
|
2815
|
-
function Zs(e, t, n) {
|
|
2816
|
-
const i = "updateStyleVariables" in t, o = "setStyle" in t, r = i ? (
|
|
2817
|
-
/** @type {import('ol/layer/WebGLTile').default} */
|
|
2818
|
-
t.style_
|
|
2819
|
-
) : n.style;
|
|
2820
|
-
let s = r == null ? void 0 : r.variables;
|
|
2821
|
-
if (s) {
|
|
2822
|
-
const a = bo(e);
|
|
2823
|
-
if (r.variables = {
|
|
2824
|
-
...s,
|
|
2825
|
-
...a
|
|
2826
|
-
}, i)
|
|
2827
|
-
t.updateStyleVariables(a);
|
|
2828
|
-
else if (o) {
|
|
2829
|
-
const l = zs(r);
|
|
2830
|
-
t.setStyle(
|
|
2831
|
-
l
|
|
2832
|
-
);
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
}
|
|
2836
|
-
const bo = (e) => {
|
|
2837
|
-
const t = {};
|
|
2838
|
-
for (const n in e)
|
|
2839
|
-
if (typeof e[n] == "object" && e[n] !== null) {
|
|
2840
|
-
const i = bo(
|
|
2841
|
-
/** @type {Record<string,any>} */
|
|
2842
|
-
e[n]
|
|
2843
|
-
);
|
|
2844
|
-
for (const o in i)
|
|
2845
|
-
t[o] = i == null ? void 0 : i[o];
|
|
2846
|
-
} else
|
|
2847
|
-
t[n] = e == null ? void 0 : e[n];
|
|
2848
|
-
return t;
|
|
2849
|
-
};
|
|
2850
|
-
function zs(e) {
|
|
2851
|
-
let t = e;
|
|
2852
|
-
if ("variables" in e) {
|
|
2853
|
-
let n = JSON.stringify(e);
|
|
2854
|
-
const { variables: i } = e;
|
|
2855
|
-
for (const o in i)
|
|
2856
|
-
typeof i[o] == "number" ? n = n.replaceAll(`["var","${o}"]`, i[o]) : n = n.replaceAll(
|
|
2857
|
-
`["var","${o}"]`,
|
|
2858
|
-
`"${i[o]}"`
|
|
2859
|
-
);
|
|
2860
|
-
t = JSON.parse(n);
|
|
2861
|
-
}
|
|
2862
|
-
return t;
|
|
2863
|
-
}
|
|
2864
|
-
var _t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2865
|
-
function vo(e) {
|
|
2887
|
+
var Ct = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2888
|
+
function Eo(e) {
|
|
2866
2889
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2867
2890
|
}
|
|
2868
|
-
var
|
|
2869
|
-
return
|
|
2891
|
+
var So = "Expected a function", Ti = NaN, Js = "[object Symbol]", Ks = /^\s+|\s+$/g, Qs = /^[-+]0x[0-9a-f]+$/i, ta = /^0b[01]+$/i, ea = /^0o[0-7]+$/i, na = parseInt, ia = typeof Ct == "object" && Ct && Ct.Object === Object && Ct, oa = typeof self == "object" && self && self.Object === Object && self, ra = ia || oa || Function("return this")(), sa = Object.prototype, aa = sa.toString, la = Math.max, ua = Math.min, Mn = function() {
|
|
2892
|
+
return ra.Date.now();
|
|
2870
2893
|
};
|
|
2871
|
-
function
|
|
2894
|
+
function da(e, t, n) {
|
|
2872
2895
|
var i, o, r, s, a, l, u = 0, c = !1, d = !1, p = !0;
|
|
2873
2896
|
if (typeof e != "function")
|
|
2874
|
-
throw new TypeError(
|
|
2875
|
-
t =
|
|
2897
|
+
throw new TypeError(So);
|
|
2898
|
+
t = Pi(t) || 0, Xe(n) && (c = !!n.leading, d = "maxWait" in n, r = d ? la(Pi(n.maxWait) || 0, t) : r, p = "trailing" in n ? !!n.trailing : p);
|
|
2876
2899
|
function f(b) {
|
|
2877
|
-
var
|
|
2878
|
-
return i = o = void 0, u = b, s = e.apply(
|
|
2900
|
+
var O = i, z = o;
|
|
2901
|
+
return i = o = void 0, u = b, s = e.apply(z, O), s;
|
|
2879
2902
|
}
|
|
2880
2903
|
function g(b) {
|
|
2881
|
-
return u = b, a = setTimeout(
|
|
2904
|
+
return u = b, a = setTimeout(M, t), c ? f(b) : s;
|
|
2882
2905
|
}
|
|
2883
2906
|
function y(b) {
|
|
2884
|
-
var
|
|
2885
|
-
return d ?
|
|
2907
|
+
var O = b - l, z = b - u, U = t - O;
|
|
2908
|
+
return d ? ua(U, r - z) : U;
|
|
2886
2909
|
}
|
|
2887
|
-
function
|
|
2888
|
-
var
|
|
2889
|
-
return l === void 0 ||
|
|
2910
|
+
function D(b) {
|
|
2911
|
+
var O = b - l, z = b - u;
|
|
2912
|
+
return l === void 0 || O >= t || O < 0 || d && z >= r;
|
|
2890
2913
|
}
|
|
2891
|
-
function
|
|
2892
|
-
var b =
|
|
2893
|
-
if (
|
|
2914
|
+
function M() {
|
|
2915
|
+
var b = Mn();
|
|
2916
|
+
if (D(b))
|
|
2894
2917
|
return H(b);
|
|
2895
|
-
a = setTimeout(
|
|
2918
|
+
a = setTimeout(M, y(b));
|
|
2896
2919
|
}
|
|
2897
2920
|
function H(b) {
|
|
2898
2921
|
return a = void 0, p && i ? f(b) : (i = o = void 0, s);
|
|
@@ -2900,84 +2923,171 @@ function ra(e, t, n) {
|
|
|
2900
2923
|
function J() {
|
|
2901
2924
|
a !== void 0 && clearTimeout(a), u = 0, i = l = o = a = void 0;
|
|
2902
2925
|
}
|
|
2903
|
-
function
|
|
2904
|
-
return a === void 0 ? s : H(
|
|
2926
|
+
function Z() {
|
|
2927
|
+
return a === void 0 ? s : H(Mn());
|
|
2905
2928
|
}
|
|
2906
2929
|
function K() {
|
|
2907
|
-
var b =
|
|
2908
|
-
if (i = arguments, o = this, l = b,
|
|
2930
|
+
var b = Mn(), O = D(b);
|
|
2931
|
+
if (i = arguments, o = this, l = b, O) {
|
|
2909
2932
|
if (a === void 0)
|
|
2910
2933
|
return g(l);
|
|
2911
2934
|
if (d)
|
|
2912
|
-
return a = setTimeout(
|
|
2935
|
+
return a = setTimeout(M, t), f(l);
|
|
2913
2936
|
}
|
|
2914
|
-
return a === void 0 && (a = setTimeout(
|
|
2937
|
+
return a === void 0 && (a = setTimeout(M, t)), s;
|
|
2915
2938
|
}
|
|
2916
|
-
return K.cancel = J, K.flush =
|
|
2939
|
+
return K.cancel = J, K.flush = Z, K;
|
|
2917
2940
|
}
|
|
2918
|
-
function
|
|
2941
|
+
function ca(e, t, n) {
|
|
2919
2942
|
var i = !0, o = !0;
|
|
2920
2943
|
if (typeof e != "function")
|
|
2921
|
-
throw new TypeError(
|
|
2922
|
-
return
|
|
2944
|
+
throw new TypeError(So);
|
|
2945
|
+
return Xe(n) && (i = "leading" in n ? !!n.leading : i, o = "trailing" in n ? !!n.trailing : o), da(e, t, {
|
|
2923
2946
|
leading: i,
|
|
2924
2947
|
maxWait: t,
|
|
2925
2948
|
trailing: o
|
|
2926
2949
|
});
|
|
2927
2950
|
}
|
|
2928
|
-
function
|
|
2951
|
+
function Xe(e) {
|
|
2929
2952
|
var t = typeof e;
|
|
2930
2953
|
return !!e && (t == "object" || t == "function");
|
|
2931
2954
|
}
|
|
2932
|
-
function
|
|
2955
|
+
function ha(e) {
|
|
2933
2956
|
return !!e && typeof e == "object";
|
|
2934
2957
|
}
|
|
2935
|
-
function
|
|
2936
|
-
return typeof e == "symbol" ||
|
|
2958
|
+
function pa(e) {
|
|
2959
|
+
return typeof e == "symbol" || ha(e) && aa.call(e) == Js;
|
|
2937
2960
|
}
|
|
2938
|
-
function
|
|
2961
|
+
function Pi(e) {
|
|
2939
2962
|
if (typeof e == "number")
|
|
2940
2963
|
return e;
|
|
2941
|
-
if (
|
|
2942
|
-
return
|
|
2943
|
-
if (
|
|
2964
|
+
if (pa(e))
|
|
2965
|
+
return Ti;
|
|
2966
|
+
if (Xe(e)) {
|
|
2944
2967
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
2945
|
-
e =
|
|
2968
|
+
e = Xe(t) ? t + "" : t;
|
|
2946
2969
|
}
|
|
2947
2970
|
if (typeof e != "string")
|
|
2948
2971
|
return e === 0 ? e : +e;
|
|
2949
|
-
e = e.replace(
|
|
2950
|
-
var n =
|
|
2951
|
-
return n ||
|
|
2952
|
-
}
|
|
2953
|
-
var
|
|
2954
|
-
const
|
|
2955
|
-
|
|
2956
|
-
|
|
2972
|
+
e = e.replace(Ks, "");
|
|
2973
|
+
var n = ta.test(e);
|
|
2974
|
+
return n || ea.test(e) ? na(e.slice(2), n ? 2 : 8) : Qs.test(e) ? Ti : +e;
|
|
2975
|
+
}
|
|
2976
|
+
var fa = ca;
|
|
2977
|
+
const Di = /* @__PURE__ */ Eo(fa);
|
|
2978
|
+
/**
|
|
2979
|
+
* @license
|
|
2980
|
+
* Copyright 2018 Google LLC
|
|
2981
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2982
|
+
*/
|
|
2983
|
+
const Pe = (e) => e ?? P;
|
|
2984
|
+
var qe, Ye;
|
|
2985
|
+
class Ao extends tt {
|
|
2986
|
+
constructor() {
|
|
2987
|
+
super();
|
|
2988
|
+
C(this, qe, Hi`
|
|
2989
|
+
.legend-container {
|
|
2990
|
+
display: flex;
|
|
2991
|
+
justify-content: center;
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
color-legend {
|
|
2995
|
+
--cle-background: transparent;
|
|
2996
|
+
--cle-font-family: inherit;
|
|
2997
|
+
--cle-font-size: inherit;
|
|
2998
|
+
--cle-font-weight: inherit --cle-letter-spacing: inherit;
|
|
2999
|
+
--cle-letter-spacing-title: inherit;
|
|
3000
|
+
}
|
|
3001
|
+
`);
|
|
3002
|
+
C(this, Ye, "");
|
|
3003
|
+
this.unstyled = !1, this.noShadow = !1, this.layerLegend = null, this.layer = null;
|
|
3004
|
+
}
|
|
3005
|
+
/**
|
|
3006
|
+
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
3007
|
+
*/
|
|
3008
|
+
createRenderRoot() {
|
|
3009
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
3010
|
+
}
|
|
3011
|
+
/**
|
|
3012
|
+
* Renders a Time Control for datetime options of a layer.
|
|
3013
|
+
*/
|
|
3014
|
+
render() {
|
|
3015
|
+
return customElements.get("color-legend") || console.error(
|
|
3016
|
+
"Please import `color-legend-element` in order to use layerLegend"
|
|
3017
|
+
), $`
|
|
3018
|
+
<style>
|
|
3019
|
+
${S(this, qe)}
|
|
3020
|
+
${!this.unstyled && S(this, Ye)}
|
|
3021
|
+
</style>
|
|
3022
|
+
${F(
|
|
3023
|
+
this.layerLegend,
|
|
3024
|
+
() => $`
|
|
3025
|
+
<div class="legend-container">
|
|
3026
|
+
<!-- Render color-legend-->
|
|
3027
|
+
<color-legend
|
|
3028
|
+
id="${this.layer.get("id")}"
|
|
3029
|
+
width=${this.layerLegend.width ?? 325}
|
|
3030
|
+
scaleType="${Pe(this.layerLegend.scaleType)}"
|
|
3031
|
+
markType="${Pe(this.layerLegend.markType)}"
|
|
3032
|
+
titleText="${Pe(this.layerLegend.title)}"
|
|
3033
|
+
.range=${this.layerLegend.range}
|
|
3034
|
+
.domain=${this.layerLegend.domain}
|
|
3035
|
+
tickFormat="${Pe(this.layerLegend.tickFormat)}"
|
|
3036
|
+
.ticks=${this.layerLegend.ticks ?? 5}
|
|
3037
|
+
.tickValues=${this.layerLegend.tickValues}
|
|
3038
|
+
>
|
|
3039
|
+
</color-legend>
|
|
3040
|
+
</div>
|
|
3041
|
+
`
|
|
3042
|
+
)}
|
|
3043
|
+
`;
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
qe = new WeakMap(), Ye = new WeakMap(), // Define static properties for the component
|
|
3047
|
+
I(Ao, "properties", {
|
|
3048
|
+
unstyled: { type: Boolean },
|
|
3049
|
+
noShadow: { type: Boolean },
|
|
3050
|
+
layerLegend: { attribute: !1 },
|
|
3051
|
+
layer: { attribute: !1 }
|
|
3052
|
+
});
|
|
3053
|
+
customElements.define(
|
|
3054
|
+
"eox-layercontrol-layer-legend",
|
|
3055
|
+
Ao
|
|
3056
|
+
);
|
|
3057
|
+
var pt, Yt, be, ve, Fn, We, Ge;
|
|
3058
|
+
class _o extends tt {
|
|
2957
3059
|
constructor() {
|
|
2958
3060
|
super();
|
|
2959
|
-
|
|
3061
|
+
C(this, ve);
|
|
2960
3062
|
/**
|
|
2961
3063
|
* data input by the user
|
|
2962
3064
|
*
|
|
2963
3065
|
* @type {{[key: string]: any}}
|
|
2964
3066
|
*/
|
|
2965
|
-
|
|
3067
|
+
C(this, pt, {});
|
|
2966
3068
|
/**
|
|
2967
3069
|
* data input by the user
|
|
2968
3070
|
*
|
|
2969
3071
|
* @type {{[key: string]: any}}
|
|
2970
3072
|
*/
|
|
2971
|
-
|
|
3073
|
+
C(this, Yt, null);
|
|
2972
3074
|
/**
|
|
2973
3075
|
* Original tile url function, if it exist
|
|
2974
3076
|
*
|
|
2975
3077
|
* @type {Function}
|
|
2976
3078
|
*/
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
3079
|
+
C(this, be);
|
|
3080
|
+
C(this, We, Hi`
|
|
3081
|
+
color-legend {
|
|
3082
|
+
--cle-background: transparent;
|
|
3083
|
+
--cle-font-family: inherit;
|
|
3084
|
+
--cle-font-size: inherit;
|
|
3085
|
+
--cle-font-weight: inherit --cle-letter-spacing: inherit;
|
|
3086
|
+
--cle-letter-spacing-title: inherit;
|
|
3087
|
+
}
|
|
3088
|
+
`);
|
|
3089
|
+
C(this, Ge, "");
|
|
3090
|
+
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.throttleDataChange = Di(V(this, ve, Fn), 1e3);
|
|
2981
3091
|
}
|
|
2982
3092
|
/** Decide what type of throttling to do based on layerConfig type
|
|
2983
3093
|
*
|
|
@@ -2986,7 +3096,7 @@ class Eo extends it {
|
|
|
2986
3096
|
updated(n) {
|
|
2987
3097
|
if (n.has("layerConfig")) {
|
|
2988
3098
|
const i = this.layerConfig.type === "style" || this.layerConfig.style ? 100 : 1e3;
|
|
2989
|
-
this.throttleDataChange =
|
|
3099
|
+
this.throttleDataChange = Di(V(this, ve, Fn), i), this.requestUpdate();
|
|
2990
3100
|
}
|
|
2991
3101
|
}
|
|
2992
3102
|
/**
|
|
@@ -2999,24 +3109,38 @@ class Eo extends it {
|
|
|
2999
3109
|
* Renders a JSON form for configuration options of a layer.
|
|
3000
3110
|
*/
|
|
3001
3111
|
render() {
|
|
3002
|
-
|
|
3112
|
+
kt(this, Yt, Zs(this.layer, this.layerConfig)), Object.keys(S(this, pt)).length !== 0 && kt(this, Yt, S(this, pt)), customElements.get("eox-jsonform") || console.error("Please import @eox/jsonform in order to use layerconfig");
|
|
3003
3113
|
const n = {
|
|
3004
3114
|
disable_edit_json: !0,
|
|
3005
3115
|
disable_collapse: !0,
|
|
3006
3116
|
disable_properties: !0
|
|
3007
3117
|
};
|
|
3008
|
-
return
|
|
3118
|
+
return $`
|
|
3009
3119
|
<style>
|
|
3010
|
-
${
|
|
3011
|
-
${!this.unstyled &&
|
|
3120
|
+
${S(this, We)}
|
|
3121
|
+
${!this.unstyled && S(this, Ge)}
|
|
3012
3122
|
</style>
|
|
3013
|
-
${
|
|
3123
|
+
${F(
|
|
3014
3124
|
this.layerConfig,
|
|
3015
|
-
() =>
|
|
3125
|
+
() => $`
|
|
3126
|
+
${F(
|
|
3127
|
+
this.layerConfig.legend,
|
|
3128
|
+
() => $`
|
|
3129
|
+
<eox-layercontrol-layer-legend
|
|
3130
|
+
.noShadow=${!0}
|
|
3131
|
+
.unstyled=${this.unstyled}
|
|
3132
|
+
.layer=${this.layer}
|
|
3133
|
+
.layerLegend=${js(
|
|
3134
|
+
this.layerConfig.legend,
|
|
3135
|
+
S(this, pt)
|
|
3136
|
+
)}
|
|
3137
|
+
></eox-layercontrol-layer-legend>
|
|
3138
|
+
`
|
|
3139
|
+
)}
|
|
3016
3140
|
<!-- Render a JSON form for layer configuration -->
|
|
3017
3141
|
<eox-jsonform
|
|
3018
3142
|
.schema=${this.layerConfig.schema}
|
|
3019
|
-
.value=${
|
|
3143
|
+
.value=${S(this, Yt)}
|
|
3020
3144
|
.options=${n}
|
|
3021
3145
|
@change=${this.throttleDataChange}
|
|
3022
3146
|
></eox-jsonform>
|
|
@@ -3025,21 +3149,21 @@ class Eo extends it {
|
|
|
3025
3149
|
`;
|
|
3026
3150
|
}
|
|
3027
3151
|
}
|
|
3028
|
-
|
|
3152
|
+
pt = new WeakMap(), Yt = new WeakMap(), be = new WeakMap(), ve = new WeakSet(), /**
|
|
3029
3153
|
* Handles changes in eox-jsonform values.
|
|
3030
3154
|
*
|
|
3031
3155
|
* @param {{ detail: { value: string; }; }} e
|
|
3032
3156
|
*/
|
|
3033
|
-
|
|
3034
|
-
|
|
3157
|
+
Fn = function(n) {
|
|
3158
|
+
kt(this, pt, n.detail), this.layerConfig.type === "style" || this.layerConfig.style ? "setStyle" in this.layer || "updateStyleVariables" in this.layer ? Us(S(this, pt), this.layer, this.layerConfig) : console.error(
|
|
3035
3159
|
`Layer type ${this.layer.get("type") ?? ""} does not support styles configuration`
|
|
3036
|
-
) : (
|
|
3037
|
-
|
|
3038
|
-
|
|
3160
|
+
) : kt(this, be, ks(
|
|
3161
|
+
S(this, pt),
|
|
3162
|
+
S(this, be),
|
|
3039
3163
|
this
|
|
3040
|
-
)), this.requestUpdate()
|
|
3041
|
-
},
|
|
3042
|
-
|
|
3164
|
+
)), this.requestUpdate();
|
|
3165
|
+
}, We = new WeakMap(), Ge = new WeakMap(), // Define static properties for the component
|
|
3166
|
+
I(_o, "properties", {
|
|
3043
3167
|
layer: { attribute: !1 },
|
|
3044
3168
|
unstyled: { type: Boolean },
|
|
3045
3169
|
noShadow: { type: Boolean },
|
|
@@ -3047,15 +3171,15 @@ L(Eo, "properties", {
|
|
|
3047
3171
|
});
|
|
3048
3172
|
customElements.define(
|
|
3049
3173
|
"eox-layercontrol-layerconfig",
|
|
3050
|
-
|
|
3174
|
+
_o
|
|
3051
3175
|
);
|
|
3052
|
-
var
|
|
3053
|
-
class
|
|
3176
|
+
var Je, To, Ke, Qe;
|
|
3177
|
+
class Co extends tt {
|
|
3054
3178
|
constructor() {
|
|
3055
3179
|
super();
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3180
|
+
C(this, Je);
|
|
3181
|
+
C(this, Ke, "");
|
|
3182
|
+
C(this, Qe, "");
|
|
3059
3183
|
this.unstyled = !1, this.noShadow = !1, this.layerDatetime = null, this.layer = null;
|
|
3060
3184
|
}
|
|
3061
3185
|
/**
|
|
@@ -3070,14 +3194,14 @@ class xo extends it {
|
|
|
3070
3194
|
render() {
|
|
3071
3195
|
return customElements.get("eox-timecontrol") || console.error(
|
|
3072
3196
|
"Please import @eox/timecontrol in order to use layerDatetime"
|
|
3073
|
-
),
|
|
3197
|
+
), $`
|
|
3074
3198
|
<style>
|
|
3075
|
-
${
|
|
3076
|
-
${!this.unstyled &&
|
|
3199
|
+
${S(this, Ke)}
|
|
3200
|
+
${!this.unstyled && S(this, Qe)}
|
|
3077
3201
|
</style>
|
|
3078
|
-
${
|
|
3202
|
+
${F(
|
|
3079
3203
|
this.layerDatetime,
|
|
3080
|
-
() =>
|
|
3204
|
+
() => $`
|
|
3081
3205
|
<!-- Render a Timecontrol for layer date time -->
|
|
3082
3206
|
<eox-timecontrol
|
|
3083
3207
|
?unstyled=${this.unstyled}
|
|
@@ -3088,20 +3212,20 @@ class xo extends it {
|
|
|
3088
3212
|
.controlValues=${this.layerDatetime.controlValues}
|
|
3089
3213
|
.controlProperty=${void 0}
|
|
3090
3214
|
current-step=${this.layerDatetime.currentStep}
|
|
3091
|
-
@stepchange=${
|
|
3215
|
+
@stepchange=${V(this, Je, To)}
|
|
3092
3216
|
></eox-timecontrol>
|
|
3093
3217
|
`
|
|
3094
3218
|
)}
|
|
3095
3219
|
`;
|
|
3096
3220
|
}
|
|
3097
3221
|
}
|
|
3098
|
-
|
|
3222
|
+
Je = new WeakSet(), /**
|
|
3099
3223
|
* Handles timecontrol Stepchange &
|
|
3100
3224
|
* triggers `datetime:updated` event on step change
|
|
3101
3225
|
*
|
|
3102
3226
|
* @param {CustomEvent<{currentStep:string|number}>} evt
|
|
3103
3227
|
**/
|
|
3104
|
-
|
|
3228
|
+
To = function(n) {
|
|
3105
3229
|
this.dispatchEvent(
|
|
3106
3230
|
new CustomEvent("datetime:updated", {
|
|
3107
3231
|
bubbles: !0,
|
|
@@ -3111,8 +3235,8 @@ So = function(n) {
|
|
|
3111
3235
|
}
|
|
3112
3236
|
})
|
|
3113
3237
|
), this.layerDatetime.currentStep = n.detail.currentStep, this.requestUpdate();
|
|
3114
|
-
},
|
|
3115
|
-
|
|
3238
|
+
}, Ke = new WeakMap(), Qe = new WeakMap(), // Define static properties for the component
|
|
3239
|
+
I(Co, "properties", {
|
|
3116
3240
|
unstyled: { type: Boolean },
|
|
3117
3241
|
noShadow: { type: Boolean },
|
|
3118
3242
|
layerDatetime: { attribute: !1 },
|
|
@@ -3120,15 +3244,15 @@ L(xo, "properties", {
|
|
|
3120
3244
|
});
|
|
3121
3245
|
customElements.define(
|
|
3122
3246
|
"eox-layercontrol-layer-datetime",
|
|
3123
|
-
|
|
3247
|
+
Co
|
|
3124
3248
|
);
|
|
3125
|
-
var
|
|
3126
|
-
class
|
|
3249
|
+
var we, tn, en;
|
|
3250
|
+
class Po extends tt {
|
|
3127
3251
|
constructor() {
|
|
3128
3252
|
super();
|
|
3129
3253
|
/** @param {number} index */
|
|
3130
|
-
|
|
3131
|
-
|
|
3254
|
+
C(this, we, (n) => (this.selectedTab === n || this.toolsAsList) && "highlighted");
|
|
3255
|
+
C(this, tn, `
|
|
3132
3256
|
.tabbed figure {
|
|
3133
3257
|
margin: 0;
|
|
3134
3258
|
}
|
|
@@ -3149,7 +3273,7 @@ class $o extends it {
|
|
|
3149
3273
|
background: lightgrey;
|
|
3150
3274
|
}
|
|
3151
3275
|
`);
|
|
3152
|
-
|
|
3276
|
+
C(this, en, `
|
|
3153
3277
|
.listed {
|
|
3154
3278
|
background: #ffffff !important;
|
|
3155
3279
|
display: flex;
|
|
@@ -3190,45 +3314,45 @@ class $o extends it {
|
|
|
3190
3314
|
*/
|
|
3191
3315
|
render() {
|
|
3192
3316
|
const n = this.tabs, i = this.actions, o = i.length + n.length > 1;
|
|
3193
|
-
return
|
|
3317
|
+
return $`
|
|
3194
3318
|
<style>
|
|
3195
|
-
${
|
|
3196
|
-
${!this.unstyled &&
|
|
3319
|
+
${S(this, tn)}
|
|
3320
|
+
${!this.unstyled && S(this, en)}
|
|
3197
3321
|
</style>
|
|
3198
3322
|
<div class="tabbed">
|
|
3199
3323
|
<!-- Navigation for tabs and actions -->
|
|
3200
|
-
${
|
|
3324
|
+
${F(
|
|
3201
3325
|
o,
|
|
3202
|
-
() =>
|
|
3326
|
+
() => $`
|
|
3203
3327
|
<nav>
|
|
3204
|
-
${
|
|
3328
|
+
${F(
|
|
3205
3329
|
!this.toolsAsList,
|
|
3206
|
-
() =>
|
|
3330
|
+
() => $`
|
|
3207
3331
|
<div>
|
|
3208
3332
|
<!-- Labels for tabs -->
|
|
3209
|
-
${
|
|
3333
|
+
${Ne(
|
|
3210
3334
|
n,
|
|
3211
|
-
(r, s) =>
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3335
|
+
(r, s) => $`
|
|
3336
|
+
<label
|
|
3337
|
+
class=${S(this, we).call(this, s)}
|
|
3338
|
+
@click=${() => this.selectedTab = s}
|
|
3339
|
+
>
|
|
3340
|
+
<!-- Customizable icon for each tab -->
|
|
3341
|
+
<slot name=${`${r}-icon`}>${r}</slot>
|
|
3342
|
+
</label>
|
|
3343
|
+
`
|
|
3220
3344
|
)}
|
|
3221
3345
|
</div>
|
|
3222
3346
|
<div>
|
|
3223
3347
|
<!-- Icons for actions -->
|
|
3224
|
-
${
|
|
3348
|
+
${Ne(
|
|
3225
3349
|
i,
|
|
3226
|
-
(r) =>
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3350
|
+
(r) => $`
|
|
3351
|
+
<span>
|
|
3352
|
+
<!-- Customizable icon for each action -->
|
|
3353
|
+
<slot name=${`${r}-icon`}>${r}</slot>
|
|
3354
|
+
</span>
|
|
3355
|
+
`
|
|
3232
3356
|
)}
|
|
3233
3357
|
</div>
|
|
3234
3358
|
`
|
|
@@ -3238,19 +3362,19 @@ class $o extends it {
|
|
|
3238
3362
|
)}
|
|
3239
3363
|
<figure>
|
|
3240
3364
|
<!-- Content for each tab -->
|
|
3241
|
-
${
|
|
3365
|
+
${Ne(
|
|
3242
3366
|
n,
|
|
3243
|
-
(r, s) =>
|
|
3244
|
-
${
|
|
3367
|
+
(r, s) => $`
|
|
3368
|
+
${F(
|
|
3245
3369
|
this.toolsAsList,
|
|
3246
|
-
() =>
|
|
3370
|
+
() => $`
|
|
3247
3371
|
<label class="listed">
|
|
3248
3372
|
<!-- Customizable icon for each tab -->
|
|
3249
3373
|
<slot name=${`${r}-icon`}>${r}</slot>
|
|
3250
3374
|
</label>
|
|
3251
3375
|
`
|
|
3252
3376
|
)}
|
|
3253
|
-
<div class="tab ${
|
|
3377
|
+
<div class="tab ${S(this, we).call(this, s)}">
|
|
3254
3378
|
<!-- Content slot for each tab -->
|
|
3255
3379
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
3256
3380
|
</div>
|
|
@@ -3261,8 +3385,8 @@ class $o extends it {
|
|
|
3261
3385
|
`;
|
|
3262
3386
|
}
|
|
3263
3387
|
}
|
|
3264
|
-
|
|
3265
|
-
|
|
3388
|
+
we = new WeakMap(), tn = new WeakMap(), en = new WeakMap(), // Define static properties for the component
|
|
3389
|
+
I(Po, "properties", {
|
|
3266
3390
|
actions: { attribute: !1 },
|
|
3267
3391
|
selectedTab: { state: !0 },
|
|
3268
3392
|
tabs: { attribute: !1 },
|
|
@@ -3270,8 +3394,8 @@ L($o, "properties", {
|
|
|
3270
3394
|
noShadow: { type: Boolean },
|
|
3271
3395
|
toolsAsList: { type: Boolean }
|
|
3272
3396
|
});
|
|
3273
|
-
customElements.define("eox-layercontrol-tools-items",
|
|
3274
|
-
const
|
|
3397
|
+
customElements.define("eox-layercontrol-tools-items", Po);
|
|
3398
|
+
const ga = `
|
|
3275
3399
|
button,
|
|
3276
3400
|
.button {
|
|
3277
3401
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -3395,7 +3519,7 @@ button.smallest.icon::before {
|
|
|
3395
3519
|
width: 16px;
|
|
3396
3520
|
padding: 0px;
|
|
3397
3521
|
}
|
|
3398
|
-
`,
|
|
3522
|
+
`, ma = `
|
|
3399
3523
|
input[type=radio] {
|
|
3400
3524
|
appearance: none;
|
|
3401
3525
|
-webkit-appearance: none;
|
|
@@ -3423,7 +3547,7 @@ input[type=radio]:checked:after {
|
|
|
3423
3547
|
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");
|
|
3424
3548
|
|
|
3425
3549
|
}
|
|
3426
|
-
`,
|
|
3550
|
+
`, Do = `
|
|
3427
3551
|
input[type=checkbox] {
|
|
3428
3552
|
appearance: none;
|
|
3429
3553
|
-webkit-appearance: none;
|
|
@@ -3446,7 +3570,7 @@ input[type=checkbox]:checked:after {
|
|
|
3446
3570
|
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");
|
|
3447
3571
|
|
|
3448
3572
|
}
|
|
3449
|
-
`,
|
|
3573
|
+
`, ya = `
|
|
3450
3574
|
input[type="range"] {
|
|
3451
3575
|
-webkit-appearance: none;
|
|
3452
3576
|
width: 90%;
|
|
@@ -3524,14 +3648,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
3524
3648
|
border: 0;
|
|
3525
3649
|
}
|
|
3526
3650
|
`;
|
|
3527
|
-
var
|
|
3528
|
-
class
|
|
3651
|
+
var nn, on;
|
|
3652
|
+
class Oo extends tt {
|
|
3529
3653
|
constructor() {
|
|
3530
3654
|
super();
|
|
3531
3655
|
// Initializes '_removeButton' invoking 'removeButton' function with 'this' context.
|
|
3532
|
-
|
|
3656
|
+
I(this, "_removeButton", () => Ys(this));
|
|
3533
3657
|
// Initializes '_sortButton' invoking 'sortButton' function with 'unstyled' property as a parameter.
|
|
3534
|
-
|
|
3658
|
+
I(this, "_sortButton", () => Ws(this.unstyled));
|
|
3535
3659
|
/**
|
|
3536
3660
|
* Initializes '_button' as a function accepting 'tool' parameter to generate a Button.
|
|
3537
3661
|
* Uses 'this.unstyled' as a context parameter for Button generation.
|
|
@@ -3539,28 +3663,12 @@ class _o extends it {
|
|
|
3539
3663
|
* @param {string} tool - Tool parameter for Button generation.
|
|
3540
3664
|
* @returns {import("lit").HTMLTemplateResult} - The generated Button element.
|
|
3541
3665
|
*/
|
|
3542
|
-
|
|
3543
|
-
|
|
3666
|
+
I(this, "_button", (n) => qs(n, this.unstyled));
|
|
3667
|
+
I(this, "_getDefaultTools", () => {
|
|
3544
3668
|
var n;
|
|
3545
|
-
return
|
|
3669
|
+
return $`
|
|
3546
3670
|
<div slot="info-content">
|
|
3547
|
-
${
|
|
3548
|
-
</div>
|
|
3549
|
-
<div slot="datetime-content">
|
|
3550
|
-
<!-- Layer datetime -->
|
|
3551
|
-
${G(
|
|
3552
|
-
this.layer.get("layerDatetime"),
|
|
3553
|
-
() => x`
|
|
3554
|
-
<eox-layercontrol-layer-datetime
|
|
3555
|
-
slot="datetime-content"
|
|
3556
|
-
.noShadow=${!0}
|
|
3557
|
-
.layerDatetime=${this.layer.get("layerDatetime")}
|
|
3558
|
-
.layer=${this.layer}
|
|
3559
|
-
.unstyled=${this.unstyled}
|
|
3560
|
-
@changed=${() => this.requestUpdate()}
|
|
3561
|
-
></eox-layercontrol-layer-datetime>
|
|
3562
|
-
`
|
|
3563
|
-
)}
|
|
3671
|
+
${Gs(this.layer.get("description"))}
|
|
3564
3672
|
</div>
|
|
3565
3673
|
<div slot="opacity-content">
|
|
3566
3674
|
<!-- Input for opacity -->
|
|
@@ -3569,15 +3677,15 @@ class _o extends it {
|
|
|
3569
3677
|
min="0"
|
|
3570
3678
|
max="1"
|
|
3571
3679
|
step="0.01"
|
|
3572
|
-
value=${
|
|
3680
|
+
value=${xo((n = this.layer) == null ? void 0 : n.getOpacity())}
|
|
3573
3681
|
@input=${(i) => this.layer.setOpacity(parseFloat(i.target.value))}
|
|
3574
3682
|
/>
|
|
3575
3683
|
</div>
|
|
3576
3684
|
<div slot="config-content">
|
|
3577
3685
|
<!-- Layer configuration -->
|
|
3578
|
-
${
|
|
3686
|
+
${F(
|
|
3579
3687
|
this.layer.get("layerConfig"),
|
|
3580
|
-
() =>
|
|
3688
|
+
() => $`
|
|
3581
3689
|
<eox-layercontrol-layerconfig
|
|
3582
3690
|
slot="config-content"
|
|
3583
3691
|
.layer=${this.layer}
|
|
@@ -3589,16 +3697,48 @@ class _o extends it {
|
|
|
3589
3697
|
`
|
|
3590
3698
|
)}
|
|
3591
3699
|
</div>
|
|
3700
|
+
<div slot="datetime-content">
|
|
3701
|
+
<!-- Layer datetime -->
|
|
3702
|
+
${F(
|
|
3703
|
+
this.layer.get("layerDatetime"),
|
|
3704
|
+
() => $`
|
|
3705
|
+
<eox-layercontrol-layer-datetime
|
|
3706
|
+
slot="datetime-content"
|
|
3707
|
+
.noShadow=${!0}
|
|
3708
|
+
.layerDatetime=${this.layer.get("layerDatetime")}
|
|
3709
|
+
.layer=${this.layer}
|
|
3710
|
+
.unstyled=${this.unstyled}
|
|
3711
|
+
@changed=${() => this.requestUpdate()}
|
|
3712
|
+
></eox-layercontrol-layer-datetime>
|
|
3713
|
+
`
|
|
3714
|
+
)}
|
|
3715
|
+
</div>
|
|
3716
|
+
<div slot="legend-content">
|
|
3717
|
+
<!-- Layer legend -->
|
|
3718
|
+
${F(
|
|
3719
|
+
this.layer.get("layerLegend"),
|
|
3720
|
+
() => $`
|
|
3721
|
+
<eox-layercontrol-layer-legend
|
|
3722
|
+
slot="legend-content"
|
|
3723
|
+
.noShadow=${!0}
|
|
3724
|
+
.layerLegend=${this.layer.get("layerLegend")}
|
|
3725
|
+
.layer=${this.layer}
|
|
3726
|
+
.unstyled=${this.unstyled}
|
|
3727
|
+
@changed=${() => this.requestUpdate()}
|
|
3728
|
+
></eox-layercontrol-layer-legend>
|
|
3729
|
+
`
|
|
3730
|
+
)}
|
|
3731
|
+
</div>
|
|
3592
3732
|
<div slot="remove-icon">${this._removeButton()}</div>
|
|
3593
3733
|
<div slot="sort-icon">${this._sortButton()}</div>
|
|
3594
3734
|
`;
|
|
3595
3735
|
});
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
${
|
|
3599
|
-
${
|
|
3600
|
-
${
|
|
3601
|
-
${
|
|
3736
|
+
C(this, nn, "");
|
|
3737
|
+
C(this, on, `
|
|
3738
|
+
${ga}
|
|
3739
|
+
${ma}
|
|
3740
|
+
${Do}
|
|
3741
|
+
${ya}
|
|
3602
3742
|
.drag-handle {
|
|
3603
3743
|
cursor: n-resize;
|
|
3604
3744
|
}
|
|
@@ -3689,6 +3829,10 @@ class _o extends it {
|
|
|
3689
3829
|
button.icon[slot=datetime-icon]::before {
|
|
3690
3830
|
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");
|
|
3691
3831
|
}
|
|
3832
|
+
details.tools summary .legend-icon,
|
|
3833
|
+
button.icon[slot=legend-icon]::before {
|
|
3834
|
+
content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctitle%3Emap-legend%3C%2Ftitle%3E%3Cpath%20d%3D%22M9%2C3L3.36%2C4.9C3.15%2C4.97%203%2C5.15%203%2C5.38V20.5A0.5%2C0.5%200%200%2C0%203.5%2C21L3.66%2C20.97L9%2C18.9L15%2C21L20.64%2C19.1C20.85%2C19.03%2021%2C18.85%2021%2C18.62V3.5A0.5%2C0.5%200%200%2C0%2020.5%2C3L20.34%2C3.03L15%2C5.1L9%2C3M8%2C5.45V17.15L5%2C18.31V6.46L8%2C5.45M10%2C5.47L14%2C6.87V18.53L10%2C17.13V5.47M19%2C5.7V17.54L16%2C18.55V6.86L19%2C5.7M7.46%2C6.3L5.57%2C6.97V9.12L7.46%2C8.45V6.3M7.46%2C9.05L5.57%2C9.72V11.87L7.46%2C11.2V9.05M7.46%2C11.8L5.57%2C12.47V14.62L7.46%2C13.95V11.8M7.46%2C14.55L5.57%2C15.22V17.37L7.46%2C16.7V14.55Z%22%20%2F%3E%3C%2Fsvg%3E");
|
|
3835
|
+
}
|
|
3692
3836
|
.single-action .remove-icon::before,
|
|
3693
3837
|
[slot=remove-icon] button.icon::before {
|
|
3694
3838
|
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");
|
|
@@ -3712,29 +3856,29 @@ class _o extends it {
|
|
|
3712
3856
|
}
|
|
3713
3857
|
render() {
|
|
3714
3858
|
var l;
|
|
3715
|
-
const n =
|
|
3716
|
-
// @ts-
|
|
3859
|
+
const n = zs(this.tools, this.layer), i = Xs(this.tools, this.layer), o = this[`_${n == null ? void 0 : n[0]}Button`] ? (
|
|
3860
|
+
// @ts-expect-error TODO
|
|
3717
3861
|
this[`_${n == null ? void 0 : n[0]}Button`]()
|
|
3718
|
-
) :
|
|
3719
|
-
return
|
|
3862
|
+
) : P, 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;
|
|
3863
|
+
return $`
|
|
3720
3864
|
<style>
|
|
3721
|
-
${
|
|
3722
|
-
${!this.unstyled &&
|
|
3865
|
+
${S(this, nn)}
|
|
3866
|
+
${!this.unstyled && S(this, on)}
|
|
3723
3867
|
</style>
|
|
3724
|
-
${
|
|
3868
|
+
${F(
|
|
3725
3869
|
s + a > 0,
|
|
3726
|
-
() =>
|
|
3727
|
-
${
|
|
3870
|
+
() => $`
|
|
3871
|
+
${F(
|
|
3728
3872
|
s === 1 && a === 0,
|
|
3729
|
-
() =>
|
|
3873
|
+
() => $`
|
|
3730
3874
|
<div class="single-action-container">
|
|
3731
3875
|
<div class="single-action">${o}</div>
|
|
3732
3876
|
</div>
|
|
3733
3877
|
`,
|
|
3734
|
-
() =>
|
|
3878
|
+
() => $`
|
|
3735
3879
|
<details
|
|
3736
3880
|
class="tools"
|
|
3737
|
-
open=${this.layer.get("layerControlToolsExpand") ||
|
|
3881
|
+
open=${this.layer.get("layerControlToolsExpand") || P}
|
|
3738
3882
|
>
|
|
3739
3883
|
<summary>
|
|
3740
3884
|
<button class="icon ${r}">Tools</button>
|
|
@@ -3748,7 +3892,7 @@ class _o extends it {
|
|
|
3748
3892
|
.toolsAsList=${this.toolsAsList}
|
|
3749
3893
|
>
|
|
3750
3894
|
<!-- Rendering tabs and content -->
|
|
3751
|
-
${
|
|
3895
|
+
${Ne(i, (u) => this._button(u))}
|
|
3752
3896
|
<!-- Including default tools -->
|
|
3753
3897
|
${this._getDefaultTools()}
|
|
3754
3898
|
</eox-layercontrol-tools-items>
|
|
@@ -3760,8 +3904,8 @@ class _o extends it {
|
|
|
3760
3904
|
`;
|
|
3761
3905
|
}
|
|
3762
3906
|
}
|
|
3763
|
-
|
|
3764
|
-
|
|
3907
|
+
nn = new WeakMap(), on = new WeakMap(), // Define static properties for the component
|
|
3908
|
+
I(Oo, "properties", {
|
|
3765
3909
|
layer: { attribute: !1 },
|
|
3766
3910
|
tools: { attribute: !1 },
|
|
3767
3911
|
unstyled: { type: Boolean },
|
|
@@ -3770,11 +3914,11 @@ L(_o, "properties", {
|
|
|
3770
3914
|
});
|
|
3771
3915
|
customElements.define(
|
|
3772
3916
|
"eox-layercontrol-layer-tools",
|
|
3773
|
-
|
|
3917
|
+
Oo
|
|
3774
3918
|
);
|
|
3775
|
-
const
|
|
3919
|
+
const ba = (e) => {
|
|
3776
3920
|
const t = () => {
|
|
3777
|
-
const n =
|
|
3921
|
+
const n = Vs(
|
|
3778
3922
|
e.layer,
|
|
3779
3923
|
e.map,
|
|
3780
3924
|
e.showLayerZoomState
|
|
@@ -3784,11 +3928,11 @@ const pa = (e) => {
|
|
|
3784
3928
|
new CustomEvent("change:resolution", { bubbles: !0 })
|
|
3785
3929
|
));
|
|
3786
3930
|
};
|
|
3787
|
-
|
|
3931
|
+
vo(
|
|
3788
3932
|
e.layer,
|
|
3789
3933
|
e.showLayerZoomState
|
|
3790
3934
|
) && (t(), e.map.getView().on("change:resolution", () => t()));
|
|
3791
|
-
},
|
|
3935
|
+
}, va = (e, t) => {
|
|
3792
3936
|
const n = t.layer;
|
|
3793
3937
|
n.setVisible(e.target.checked), e.target.checked && n.get("layerControlExclusive") && t.closest(
|
|
3794
3938
|
".layers > ul"
|
|
@@ -3799,20 +3943,20 @@ const pa = (e) => {
|
|
|
3799
3943
|
new CustomEvent("changed", { bubbles: !0, detail: n })
|
|
3800
3944
|
), t.requestUpdate();
|
|
3801
3945
|
};
|
|
3802
|
-
var
|
|
3803
|
-
class
|
|
3946
|
+
var Pt, He, Lo, rn, sn;
|
|
3947
|
+
class Ro extends tt {
|
|
3804
3948
|
constructor() {
|
|
3805
3949
|
super();
|
|
3806
|
-
|
|
3950
|
+
C(this, Pt);
|
|
3807
3951
|
/**
|
|
3808
3952
|
* Represents the current layer visibility based on zoom level.
|
|
3809
3953
|
*
|
|
3810
3954
|
* @type {Boolean}
|
|
3811
3955
|
*/
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
${
|
|
3956
|
+
I(this, "currLayerVisibilityBasedOnZoom", !0);
|
|
3957
|
+
C(this, rn, "");
|
|
3958
|
+
C(this, sn, `
|
|
3959
|
+
${Do}
|
|
3816
3960
|
eox-layercontrol-layer {
|
|
3817
3961
|
width: 100%;
|
|
3818
3962
|
}
|
|
@@ -3866,7 +4010,7 @@ class Co extends it {
|
|
|
3866
4010
|
* and register "change:resolution" ones at the beginning if `showLayerZoomState` is present
|
|
3867
4011
|
*/
|
|
3868
4012
|
firstUpdated() {
|
|
3869
|
-
|
|
4013
|
+
ba(this);
|
|
3870
4014
|
}
|
|
3871
4015
|
/**
|
|
3872
4016
|
* Renders layer controls and tools with conditional display based on certain properties.
|
|
@@ -3875,30 +4019,30 @@ class Co extends it {
|
|
|
3875
4019
|
*/
|
|
3876
4020
|
render() {
|
|
3877
4021
|
var l;
|
|
3878
|
-
const n = this.layer.getVisible(), i = n ? "visible" : "", o = this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible", r =
|
|
3879
|
-
return
|
|
4022
|
+
const n = this.layer.getVisible(), i = n ? "visible" : "", o = this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible", r = V(this, Pt, He).call(this, "layerControlDisable") ? "disabled" : "", s = V(this, Pt, He).call(this, "layerControlExclusive") ? "radio" : "checkbox", a = ((l = this.tools) == null ? void 0 : l.length) > 0;
|
|
4023
|
+
return $`
|
|
3880
4024
|
<style>
|
|
3881
|
-
${
|
|
3882
|
-
${!this.unstyled &&
|
|
4025
|
+
${S(this, rn)}
|
|
4026
|
+
${!this.unstyled && S(this, sn)}
|
|
3883
4027
|
</style>
|
|
3884
|
-
${
|
|
4028
|
+
${F(
|
|
3885
4029
|
this.layer,
|
|
3886
|
-
() =>
|
|
4030
|
+
() => $`
|
|
3887
4031
|
<!-- Render the layer -->
|
|
3888
4032
|
<div class="layer ${i} ${o}">
|
|
3889
4033
|
<label class="drag-handle ${r}">
|
|
3890
4034
|
<!-- Input element for layer visibility -->
|
|
3891
4035
|
<input
|
|
3892
4036
|
type=${s}
|
|
3893
|
-
.checked=${
|
|
3894
|
-
@click=${
|
|
4037
|
+
.checked=${xo(n)}
|
|
4038
|
+
@click=${V(this, Pt, Lo)}
|
|
3895
4039
|
/>
|
|
3896
4040
|
|
|
3897
4041
|
<!-- Layer title -->
|
|
3898
|
-
<span class="title">${
|
|
3899
|
-
${
|
|
4042
|
+
<span class="title">${V(this, Pt, He).call(this, this.titleProperty)}</span>
|
|
4043
|
+
${F(
|
|
3900
4044
|
a,
|
|
3901
|
-
() =>
|
|
4045
|
+
() => $`<span class="tools-placeholder"></span>`
|
|
3902
4046
|
)}
|
|
3903
4047
|
</label>
|
|
3904
4048
|
</div>
|
|
@@ -3916,13 +4060,13 @@ class Co extends it {
|
|
|
3916
4060
|
`;
|
|
3917
4061
|
}
|
|
3918
4062
|
}
|
|
3919
|
-
|
|
4063
|
+
Pt = new WeakSet(), /**
|
|
3920
4064
|
* Private method to get layer property by key if available.
|
|
3921
4065
|
*
|
|
3922
4066
|
* @param {string} key - The key for the layer property.
|
|
3923
4067
|
* @returns {any} - The value of the layer property if exists, otherwise undefined.
|
|
3924
4068
|
*/
|
|
3925
|
-
|
|
4069
|
+
He = function(n) {
|
|
3926
4070
|
var i;
|
|
3927
4071
|
return (i = this.layer) == null ? void 0 : i.get(n);
|
|
3928
4072
|
}, /**
|
|
@@ -3930,10 +4074,10 @@ Ne = function(n) {
|
|
|
3930
4074
|
*
|
|
3931
4075
|
* @param {{target: { checked: boolean }}} evt - The input change event.
|
|
3932
4076
|
*/
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
},
|
|
3936
|
-
|
|
4077
|
+
Lo = function(n) {
|
|
4078
|
+
va(n, this);
|
|
4079
|
+
}, rn = new WeakMap(), sn = new WeakMap(), // Define static properties for the component
|
|
4080
|
+
I(Ro, "properties", {
|
|
3937
4081
|
layer: { attribute: !1 },
|
|
3938
4082
|
map: { attribute: !1, state: !0 },
|
|
3939
4083
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -3943,13 +4087,13 @@ L(Co, "properties", {
|
|
|
3943
4087
|
noShadow: { type: Boolean },
|
|
3944
4088
|
toolsAsList: { type: Boolean }
|
|
3945
4089
|
});
|
|
3946
|
-
customElements.define("eox-layercontrol-layer",
|
|
3947
|
-
var
|
|
3948
|
-
class
|
|
4090
|
+
customElements.define("eox-layercontrol-layer", Ro);
|
|
4091
|
+
var an, ln;
|
|
4092
|
+
class Mo extends tt {
|
|
3949
4093
|
constructor() {
|
|
3950
4094
|
super();
|
|
3951
|
-
|
|
3952
|
-
|
|
4095
|
+
C(this, an, "");
|
|
4096
|
+
C(this, ln, `
|
|
3953
4097
|
details summary {
|
|
3954
4098
|
cursor: pointer;
|
|
3955
4099
|
display: flex;
|
|
@@ -3989,20 +4133,20 @@ class Po extends it {
|
|
|
3989
4133
|
*/
|
|
3990
4134
|
render() {
|
|
3991
4135
|
var o, r;
|
|
3992
|
-
const n = !!((o = this.group) != null && o.get("layerControlExpand")), i = (r =
|
|
4136
|
+
const n = !!((o = this.group) != null && o.get("layerControlExpand")), i = (r = $o(
|
|
3993
4137
|
this.group.getLayers()
|
|
3994
4138
|
)) == null ? void 0 : r.length;
|
|
3995
|
-
return
|
|
4139
|
+
return $`
|
|
3996
4140
|
<style>
|
|
3997
|
-
${
|
|
3998
|
-
${!this.unstyled &&
|
|
4141
|
+
${S(this, an)}
|
|
4142
|
+
${!this.unstyled && S(this, ln)}
|
|
3999
4143
|
</style>
|
|
4000
|
-
${
|
|
4144
|
+
${F(
|
|
4001
4145
|
this.group,
|
|
4002
|
-
() =>
|
|
4146
|
+
() => $`
|
|
4003
4147
|
<!-- Render the details element with the layer control -->
|
|
4004
4148
|
<details
|
|
4005
|
-
open=${n ||
|
|
4149
|
+
open=${n || P}
|
|
4006
4150
|
data-children-length=${i}
|
|
4007
4151
|
>
|
|
4008
4152
|
<summary>
|
|
@@ -4039,8 +4183,8 @@ class Po extends it {
|
|
|
4039
4183
|
`;
|
|
4040
4184
|
}
|
|
4041
4185
|
}
|
|
4042
|
-
|
|
4043
|
-
|
|
4186
|
+
an = new WeakMap(), ln = new WeakMap(), // Define static properties for the component
|
|
4187
|
+
I(Mo, "properties", {
|
|
4044
4188
|
group: { attribute: !1 },
|
|
4045
4189
|
idProperty: { attribute: "id-property" },
|
|
4046
4190
|
map: { attribute: !1, state: !0 },
|
|
@@ -4053,36 +4197,36 @@ L(Po, "properties", {
|
|
|
4053
4197
|
});
|
|
4054
4198
|
customElements.define(
|
|
4055
4199
|
"eox-layercontrol-layer-group",
|
|
4056
|
-
|
|
4200
|
+
Mo
|
|
4057
4201
|
);
|
|
4058
|
-
var
|
|
4059
|
-
return
|
|
4202
|
+
var wa = "Expected a function", Oi = NaN, $a = "[object Symbol]", xa = /^\s+|\s+$/g, Ea = /^[-+]0x[0-9a-f]+$/i, Sa = /^0b[01]+$/i, Aa = /^0o[0-7]+$/i, _a = parseInt, Ca = typeof Ct == "object" && Ct && Ct.Object === Object && Ct, Ta = typeof self == "object" && self && self.Object === Object && self, Pa = Ca || Ta || Function("return this")(), Da = Object.prototype, Oa = Da.toString, Ra = Math.max, La = Math.min, In = function() {
|
|
4203
|
+
return Pa.Date.now();
|
|
4060
4204
|
};
|
|
4061
|
-
function
|
|
4205
|
+
function Ma(e, t, n) {
|
|
4062
4206
|
var i, o, r, s, a, l, u = 0, c = !1, d = !1, p = !0;
|
|
4063
4207
|
if (typeof e != "function")
|
|
4064
|
-
throw new TypeError(
|
|
4065
|
-
t =
|
|
4208
|
+
throw new TypeError(wa);
|
|
4209
|
+
t = Ri(t) || 0, jn(n) && (c = !!n.leading, d = "maxWait" in n, r = d ? Ra(Ri(n.maxWait) || 0, t) : r, p = "trailing" in n ? !!n.trailing : p);
|
|
4066
4210
|
function f(b) {
|
|
4067
|
-
var
|
|
4068
|
-
return i = o = void 0, u = b, s = e.apply(
|
|
4211
|
+
var O = i, z = o;
|
|
4212
|
+
return i = o = void 0, u = b, s = e.apply(z, O), s;
|
|
4069
4213
|
}
|
|
4070
4214
|
function g(b) {
|
|
4071
|
-
return u = b, a = setTimeout(
|
|
4215
|
+
return u = b, a = setTimeout(M, t), c ? f(b) : s;
|
|
4072
4216
|
}
|
|
4073
4217
|
function y(b) {
|
|
4074
|
-
var
|
|
4075
|
-
return d ?
|
|
4218
|
+
var O = b - l, z = b - u, U = t - O;
|
|
4219
|
+
return d ? La(U, r - z) : U;
|
|
4076
4220
|
}
|
|
4077
|
-
function
|
|
4078
|
-
var
|
|
4079
|
-
return l === void 0 ||
|
|
4221
|
+
function D(b) {
|
|
4222
|
+
var O = b - l, z = b - u;
|
|
4223
|
+
return l === void 0 || O >= t || O < 0 || d && z >= r;
|
|
4080
4224
|
}
|
|
4081
|
-
function
|
|
4082
|
-
var b =
|
|
4083
|
-
if (
|
|
4225
|
+
function M() {
|
|
4226
|
+
var b = In();
|
|
4227
|
+
if (D(b))
|
|
4084
4228
|
return H(b);
|
|
4085
|
-
a = setTimeout(
|
|
4229
|
+
a = setTimeout(M, y(b));
|
|
4086
4230
|
}
|
|
4087
4231
|
function H(b) {
|
|
4088
4232
|
return a = void 0, p && i ? f(b) : (i = o = void 0, s);
|
|
@@ -4090,69 +4234,69 @@ function Pa(e, t, n) {
|
|
|
4090
4234
|
function J() {
|
|
4091
4235
|
a !== void 0 && clearTimeout(a), u = 0, i = l = o = a = void 0;
|
|
4092
4236
|
}
|
|
4093
|
-
function
|
|
4094
|
-
return a === void 0 ? s : H(
|
|
4237
|
+
function Z() {
|
|
4238
|
+
return a === void 0 ? s : H(In());
|
|
4095
4239
|
}
|
|
4096
4240
|
function K() {
|
|
4097
|
-
var b =
|
|
4098
|
-
if (i = arguments, o = this, l = b,
|
|
4241
|
+
var b = In(), O = D(b);
|
|
4242
|
+
if (i = arguments, o = this, l = b, O) {
|
|
4099
4243
|
if (a === void 0)
|
|
4100
4244
|
return g(l);
|
|
4101
4245
|
if (d)
|
|
4102
|
-
return a = setTimeout(
|
|
4246
|
+
return a = setTimeout(M, t), f(l);
|
|
4103
4247
|
}
|
|
4104
|
-
return a === void 0 && (a = setTimeout(
|
|
4248
|
+
return a === void 0 && (a = setTimeout(M, t)), s;
|
|
4105
4249
|
}
|
|
4106
|
-
return K.cancel = J, K.flush =
|
|
4250
|
+
return K.cancel = J, K.flush = Z, K;
|
|
4107
4251
|
}
|
|
4108
|
-
function
|
|
4252
|
+
function jn(e) {
|
|
4109
4253
|
var t = typeof e;
|
|
4110
4254
|
return !!e && (t == "object" || t == "function");
|
|
4111
4255
|
}
|
|
4112
|
-
function
|
|
4256
|
+
function Ia(e) {
|
|
4113
4257
|
return !!e && typeof e == "object";
|
|
4114
4258
|
}
|
|
4115
|
-
function
|
|
4116
|
-
return typeof e == "symbol" ||
|
|
4259
|
+
function Na(e) {
|
|
4260
|
+
return typeof e == "symbol" || Ia(e) && Oa.call(e) == $a;
|
|
4117
4261
|
}
|
|
4118
|
-
function
|
|
4262
|
+
function Ri(e) {
|
|
4119
4263
|
if (typeof e == "number")
|
|
4120
4264
|
return e;
|
|
4121
|
-
if (
|
|
4122
|
-
return
|
|
4123
|
-
if (
|
|
4265
|
+
if (Na(e))
|
|
4266
|
+
return Oi;
|
|
4267
|
+
if (jn(e)) {
|
|
4124
4268
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
4125
|
-
e =
|
|
4269
|
+
e = jn(t) ? t + "" : t;
|
|
4126
4270
|
}
|
|
4127
4271
|
if (typeof e != "string")
|
|
4128
4272
|
return e === 0 ? e : +e;
|
|
4129
|
-
e = e.replace(
|
|
4130
|
-
var n =
|
|
4131
|
-
return n ||
|
|
4273
|
+
e = e.replace(xa, "");
|
|
4274
|
+
var n = Sa.test(e);
|
|
4275
|
+
return n || Aa.test(e) ? _a(e.slice(2), n ? 2 : 8) : Ea.test(e) ? Oi : +e;
|
|
4132
4276
|
}
|
|
4133
|
-
var
|
|
4134
|
-
const
|
|
4135
|
-
const { layers: t, idProperty: n, titleProperty: i, renderRoot: o } = e, r =
|
|
4277
|
+
var Ha = Ma;
|
|
4278
|
+
const Va = /* @__PURE__ */ Eo(Ha), Ba = (e) => {
|
|
4279
|
+
const { layers: t, idProperty: n, titleProperty: i, renderRoot: o } = e, r = Va(() => {
|
|
4136
4280
|
e.requestUpdate(), e.dispatchEvent(
|
|
4137
4281
|
new CustomEvent("changed", { bubbles: !0 })
|
|
4138
4282
|
);
|
|
4139
4283
|
}, 50), s = () => r();
|
|
4140
4284
|
if (t && (t.hasListener("change:length") && (t == null || t.un("change:length", s)), t.on("change:length", s), t)) {
|
|
4141
4285
|
const a = o.querySelector("ul");
|
|
4142
|
-
|
|
4286
|
+
Hs(
|
|
4143
4287
|
t,
|
|
4144
4288
|
n,
|
|
4145
4289
|
i,
|
|
4146
4290
|
e
|
|
4147
|
-
),
|
|
4291
|
+
), Ns(a, t, n, e);
|
|
4148
4292
|
}
|
|
4149
4293
|
};
|
|
4150
|
-
var
|
|
4151
|
-
class
|
|
4294
|
+
var un, dn;
|
|
4295
|
+
class Io extends tt {
|
|
4152
4296
|
constructor() {
|
|
4153
4297
|
super();
|
|
4154
|
-
|
|
4155
|
-
|
|
4298
|
+
C(this, un, "");
|
|
4299
|
+
C(this, dn, `
|
|
4156
4300
|
ul {
|
|
4157
4301
|
padding: 0;
|
|
4158
4302
|
margin: 0;
|
|
@@ -4185,7 +4329,7 @@ class Oo extends it {
|
|
|
4185
4329
|
* Executes specific logic after the initial render of the component.
|
|
4186
4330
|
*/
|
|
4187
4331
|
firstUpdated() {
|
|
4188
|
-
|
|
4332
|
+
Ba(this);
|
|
4189
4333
|
}
|
|
4190
4334
|
/**
|
|
4191
4335
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -4198,27 +4342,27 @@ class Oo extends it {
|
|
|
4198
4342
|
* layer groups or individual layers accordingly. Utilizes conditional rendering and iterates through available layers.
|
|
4199
4343
|
*/
|
|
4200
4344
|
render() {
|
|
4201
|
-
const n = this.layers ?
|
|
4202
|
-
return
|
|
4345
|
+
const n = this.layers ? $o(this.layers).reverse() : [];
|
|
4346
|
+
return $`
|
|
4203
4347
|
<style>
|
|
4204
|
-
${
|
|
4205
|
-
${!this.unstyled &&
|
|
4348
|
+
${S(this, un)}
|
|
4349
|
+
${!this.unstyled && S(this, dn)}
|
|
4206
4350
|
</style>
|
|
4207
4351
|
<ul>
|
|
4208
|
-
${
|
|
4352
|
+
${F(
|
|
4209
4353
|
this.layers,
|
|
4210
|
-
() =>
|
|
4211
|
-
${
|
|
4354
|
+
() => $`
|
|
4355
|
+
${pr(
|
|
4212
4356
|
n,
|
|
4213
4357
|
(i) => i,
|
|
4214
|
-
(i) =>
|
|
4358
|
+
(i) => $`
|
|
4215
4359
|
<li
|
|
4216
4360
|
data-layer="${i.get(this.idProperty)}"
|
|
4217
|
-
data-type="${
|
|
4361
|
+
data-type="${Bs(i, this.map)}"
|
|
4218
4362
|
>
|
|
4219
4363
|
${/** Checks if the layer is a group or individual layer and renders accordingly */
|
|
4220
4364
|
/** @type {import("ol/layer").Group} */
|
|
4221
|
-
i.getLayers ?
|
|
4365
|
+
i.getLayers ? $`
|
|
4222
4366
|
<eox-layercontrol-layer-group
|
|
4223
4367
|
.noShadow=${!0}
|
|
4224
4368
|
.group=${i}
|
|
@@ -4232,7 +4376,7 @@ class Oo extends it {
|
|
|
4232
4376
|
@changed=${() => this.requestUpdate()}
|
|
4233
4377
|
>
|
|
4234
4378
|
</eox-layercontrol-layer-group>
|
|
4235
|
-
` :
|
|
4379
|
+
` : $`
|
|
4236
4380
|
<eox-layercontrol-layer
|
|
4237
4381
|
.noShadow=${!0}
|
|
4238
4382
|
.layer=${i}
|
|
@@ -4254,8 +4398,8 @@ class Oo extends it {
|
|
|
4254
4398
|
`;
|
|
4255
4399
|
}
|
|
4256
4400
|
}
|
|
4257
|
-
|
|
4258
|
-
|
|
4401
|
+
un = new WeakMap(), dn = new WeakMap(), // Define static properties for the component
|
|
4402
|
+
I(Io, "properties", {
|
|
4259
4403
|
idProperty: { attribute: "id-property" },
|
|
4260
4404
|
layers: { attribute: !1 },
|
|
4261
4405
|
map: { attribute: !1, state: !0 },
|
|
@@ -4266,17 +4410,17 @@ L(Oo, "properties", {
|
|
|
4266
4410
|
noShadow: { type: Boolean },
|
|
4267
4411
|
toolsAsList: { type: Boolean }
|
|
4268
4412
|
});
|
|
4269
|
-
customElements.define("eox-layercontrol-layer-list",
|
|
4270
|
-
const
|
|
4413
|
+
customElements.define("eox-layercontrol-layer-list", Io);
|
|
4414
|
+
const ka = (e) => {
|
|
4271
4415
|
const t = e.querySelector(
|
|
4272
4416
|
"select[name=optional]"
|
|
4273
|
-
), n = t ? t.value : null, i =
|
|
4417
|
+
), n = t ? t.value : null, i = ii(
|
|
4274
4418
|
e.layers.getArray(),
|
|
4275
4419
|
"layerControlOptional",
|
|
4276
4420
|
!0
|
|
4277
4421
|
).find(
|
|
4278
4422
|
(o) => (
|
|
4279
|
-
// @ts-
|
|
4423
|
+
// @ts-expect-error TODO
|
|
4280
4424
|
(o.get(e.idProperty) || o.ol_uid) === n
|
|
4281
4425
|
)
|
|
4282
4426
|
);
|
|
@@ -4289,11 +4433,11 @@ const Na = (e) => {
|
|
|
4289
4433
|
)
|
|
4290
4434
|
), e.requestUpdate();
|
|
4291
4435
|
};
|
|
4292
|
-
var
|
|
4293
|
-
class
|
|
4436
|
+
var cn, Ho;
|
|
4437
|
+
class No extends tt {
|
|
4294
4438
|
constructor() {
|
|
4295
4439
|
super();
|
|
4296
|
-
|
|
4440
|
+
C(this, cn);
|
|
4297
4441
|
this.idProperty = "id", this.layers = null, this.titleProperty = "title", this.unstyled = !1, this.noShadow = !1;
|
|
4298
4442
|
}
|
|
4299
4443
|
/**
|
|
@@ -4308,12 +4452,12 @@ class Do extends it {
|
|
|
4308
4452
|
* Generates dropdown options based on the extracted layer information.
|
|
4309
4453
|
*/
|
|
4310
4454
|
render() {
|
|
4311
|
-
const n =
|
|
4455
|
+
const n = ii(
|
|
4312
4456
|
this.layers.getArray(),
|
|
4313
4457
|
"layerControlOptional",
|
|
4314
4458
|
!0
|
|
4315
4459
|
);
|
|
4316
|
-
return
|
|
4460
|
+
return $`
|
|
4317
4461
|
<!-- Label for the dropdown -->
|
|
4318
4462
|
<label for="optional">Optional layers</label>
|
|
4319
4463
|
|
|
@@ -4327,23 +4471,23 @@ class Do extends it {
|
|
|
4327
4471
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
4328
4472
|
${n.map((i) => {
|
|
4329
4473
|
const o = i.get(this.idProperty) || i.ol_uid, r = i.get(this.titleProperty), s = `layer ${i.get(this.idProperty)}`;
|
|
4330
|
-
return
|
|
4474
|
+
return $` <option value="${o}">${r || s}</option> `;
|
|
4331
4475
|
})}
|
|
4332
4476
|
</select>
|
|
4333
4477
|
|
|
4334
4478
|
<!-- Button to handle adding layers -->
|
|
4335
|
-
<button @click="${
|
|
4479
|
+
<button @click="${V(this, cn, Ho)}">add</button>
|
|
4336
4480
|
`;
|
|
4337
4481
|
}
|
|
4338
4482
|
}
|
|
4339
|
-
|
|
4483
|
+
cn = new WeakSet(), /**
|
|
4340
4484
|
* Handles the addition of selected layers to a list.
|
|
4341
4485
|
* Invokes the 'addToListMethod' with the current context.
|
|
4342
4486
|
*/
|
|
4343
|
-
|
|
4344
|
-
|
|
4487
|
+
Ho = function() {
|
|
4488
|
+
ka(this);
|
|
4345
4489
|
}, // Define static properties for the component
|
|
4346
|
-
|
|
4490
|
+
I(No, "properties", {
|
|
4347
4491
|
idProperty: { attribute: "id-property" },
|
|
4348
4492
|
layers: { attribute: !1 },
|
|
4349
4493
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -4352,27 +4496,27 @@ L(Do, "properties", {
|
|
|
4352
4496
|
});
|
|
4353
4497
|
customElements.define(
|
|
4354
4498
|
"eox-layercontrol-optional-list",
|
|
4355
|
-
|
|
4499
|
+
No
|
|
4356
4500
|
);
|
|
4357
|
-
const
|
|
4501
|
+
const Ua = (e, t) => {
|
|
4358
4502
|
t.jsonInput = e.target.value, t.requestUpdate();
|
|
4359
|
-
},
|
|
4503
|
+
}, Li = (e) => {
|
|
4360
4504
|
const t = JSON.parse(
|
|
4361
|
-
`{"data":${
|
|
4505
|
+
`{"data":${no(e.jsonInput)}}`
|
|
4362
4506
|
);
|
|
4363
4507
|
Array.isArray(t.data) ? t.data.forEach((n) => {
|
|
4364
4508
|
e.eoxMap.addOrUpdateLayer(n);
|
|
4365
4509
|
}) : e.eoxMap.addOrUpdateLayer(t.data), e.jsonInput = null, e.requestUpdate();
|
|
4366
|
-
},
|
|
4510
|
+
}, Fa = (e, t) => {
|
|
4367
4511
|
t.urlInput = e.target.value, t.requestUpdate();
|
|
4368
4512
|
};
|
|
4369
|
-
async function
|
|
4513
|
+
async function ja(e) {
|
|
4370
4514
|
const t = e.urlInput;
|
|
4371
4515
|
if (e.wmsCapabilities = null, e.searchLoad = !0, e.requestUpdate(), !t) return !1;
|
|
4372
|
-
if (
|
|
4516
|
+
if (Qn(t) === "XYZ")
|
|
4373
4517
|
return { Name: t };
|
|
4374
4518
|
try {
|
|
4375
|
-
const n = await
|
|
4519
|
+
const n = await rs(t);
|
|
4376
4520
|
e.wmsCapabilities = n;
|
|
4377
4521
|
} catch {
|
|
4378
4522
|
} finally {
|
|
@@ -4380,8 +4524,8 @@ async function Ba(e) {
|
|
|
4380
4524
|
}
|
|
4381
4525
|
return !1;
|
|
4382
4526
|
}
|
|
4383
|
-
const
|
|
4384
|
-
const { Name: n } = e, i =
|
|
4527
|
+
const Za = (e, t) => {
|
|
4528
|
+
const { Name: n } = e, i = Qn(t.urlInput) || "XYZ", o = {
|
|
4385
4529
|
type: "Tile",
|
|
4386
4530
|
properties: {
|
|
4387
4531
|
id: n,
|
|
@@ -4399,45 +4543,45 @@ const Va = (e, t) => {
|
|
|
4399
4543
|
}
|
|
4400
4544
|
};
|
|
4401
4545
|
t.jsonInput = JSON.stringify(o);
|
|
4402
|
-
},
|
|
4546
|
+
}, za = (e, t) => {
|
|
4403
4547
|
t.open = e || null, t.urlInput = null, t.jsonInput = null, t.wmsCapabilities = null, t.requestUpdate();
|
|
4404
4548
|
};
|
|
4405
|
-
var
|
|
4406
|
-
class
|
|
4549
|
+
var q, Bo, ko, Zn, Uo, Fo, Ve, hn, pn;
|
|
4550
|
+
class Vo extends tt {
|
|
4407
4551
|
constructor() {
|
|
4408
4552
|
super();
|
|
4409
|
-
|
|
4553
|
+
C(this, q);
|
|
4410
4554
|
/**
|
|
4411
4555
|
* State for URL Input for WMS/XYZ URLs
|
|
4412
4556
|
*
|
|
4413
4557
|
* @type {String}
|
|
4414
4558
|
*/
|
|
4415
|
-
|
|
4559
|
+
I(this, "urlInput", null);
|
|
4416
4560
|
/**
|
|
4417
4561
|
* State for JSON Textarea - For EOxMap JSON
|
|
4418
4562
|
*
|
|
4419
4563
|
* @type {String}
|
|
4420
4564
|
*/
|
|
4421
|
-
|
|
4565
|
+
I(this, "jsonInput", null);
|
|
4422
4566
|
/**
|
|
4423
4567
|
* State for add layer - consist of url/json
|
|
4424
4568
|
*
|
|
4425
4569
|
* @type {"url" | "json" | null}
|
|
4426
4570
|
*/
|
|
4427
|
-
|
|
4571
|
+
I(this, "open", null);
|
|
4428
4572
|
/**
|
|
4429
4573
|
* Loader state when search is triggered
|
|
4430
4574
|
*
|
|
4431
4575
|
* @type {Boolean}
|
|
4432
4576
|
*/
|
|
4433
|
-
|
|
4577
|
+
I(this, "searchLoad", !1);
|
|
4434
4578
|
/**
|
|
4435
4579
|
* State for `WMS Capabilities JSON`
|
|
4436
4580
|
*
|
|
4437
4581
|
* @type {import("wms-capabilities").WMSCapabilitiesJSON}
|
|
4438
4582
|
*/
|
|
4439
|
-
|
|
4440
|
-
|
|
4583
|
+
I(this, "wmsCapabilities", null);
|
|
4584
|
+
C(this, hn, `
|
|
4441
4585
|
.eox-add-layer-main .open {
|
|
4442
4586
|
position: relative;
|
|
4443
4587
|
}
|
|
@@ -4445,7 +4589,7 @@ class Mo extends it {
|
|
|
4445
4589
|
display: none;
|
|
4446
4590
|
}
|
|
4447
4591
|
`);
|
|
4448
|
-
|
|
4592
|
+
C(this, pn, `
|
|
4449
4593
|
.eox-add {
|
|
4450
4594
|
background: #f0f2f5;
|
|
4451
4595
|
border-top: 1px solid #0041701a;
|
|
@@ -4594,24 +4738,24 @@ class Mo extends it {
|
|
|
4594
4738
|
* Handles input fields, search, and addition of layers.
|
|
4595
4739
|
*/
|
|
4596
4740
|
render() {
|
|
4597
|
-
const n = this.open ? "open" : "close", i = this.open === "url", o = this.open === "json", r = !
|
|
4598
|
-
return
|
|
4741
|
+
const n = this.open ? "open" : "close", i = this.open === "url", o = this.open === "json", r = !ss(this.urlInput) || this.searchLoad ? !0 : P;
|
|
4742
|
+
return $`
|
|
4599
4743
|
<style>
|
|
4600
|
-
${
|
|
4601
|
-
${!this.unstyled &&
|
|
4744
|
+
${S(this, hn)}
|
|
4745
|
+
${!this.unstyled && S(this, pn)}
|
|
4602
4746
|
</style>
|
|
4603
4747
|
<div class="eox-add-layer-main">
|
|
4604
4748
|
<div class="eox-add-layer-col">
|
|
4605
4749
|
<!-- Tabbed interface for URL and JSON -->
|
|
4606
4750
|
<ul class="eox-add-layer-tab ${n}">
|
|
4607
4751
|
<li
|
|
4608
|
-
@click=${() =>
|
|
4752
|
+
@click=${() => V(this, q, Ve).call(this, "url")}
|
|
4609
4753
|
class="${i ? "active" : ""}"
|
|
4610
4754
|
>
|
|
4611
4755
|
URL
|
|
4612
4756
|
</li>
|
|
4613
4757
|
<li
|
|
4614
|
-
@click=${() =>
|
|
4758
|
+
@click=${() => V(this, q, Ve).call(this, "json")}
|
|
4615
4759
|
class="${o ? "active" : ""}"
|
|
4616
4760
|
>
|
|
4617
4761
|
JSON
|
|
@@ -4621,13 +4765,13 @@ class Mo extends it {
|
|
|
4621
4765
|
<!-- Button to toggle tabs -->
|
|
4622
4766
|
<button
|
|
4623
4767
|
class="add-icon icon"
|
|
4624
|
-
@click=${() =>
|
|
4768
|
+
@click=${() => V(this, q, Ve).call(this, this.open ? null : "url")}
|
|
4625
4769
|
>
|
|
4626
4770
|
${this.unstyled ? "Add Layer" : ""}
|
|
4627
4771
|
</button>
|
|
4628
4772
|
</div>
|
|
4629
4773
|
<div class="eox-add ${n}">
|
|
4630
|
-
${i ?
|
|
4774
|
+
${i ? $`
|
|
4631
4775
|
<!-- Input field for URL -->
|
|
4632
4776
|
<div class="eox-add-layer-col">
|
|
4633
4777
|
<input
|
|
@@ -4635,33 +4779,33 @@ class Mo extends it {
|
|
|
4635
4779
|
class="add-url"
|
|
4636
4780
|
placeholder="Add URL (WMS/XYZ)"
|
|
4637
4781
|
.value="${this.urlInput}"
|
|
4638
|
-
@input=${
|
|
4782
|
+
@input=${V(this, q, Bo)}
|
|
4639
4783
|
>
|
|
4640
4784
|
</input>
|
|
4641
4785
|
<!-- Search button for URL -->
|
|
4642
4786
|
<button
|
|
4643
4787
|
class="search-icon"
|
|
4644
4788
|
disabled=${r}
|
|
4645
|
-
@click=${
|
|
4789
|
+
@click=${V(this, q, ko)}
|
|
4646
4790
|
>
|
|
4647
4791
|
${this.unstyled ? "Search" : ""}
|
|
4648
4792
|
</button>
|
|
4649
4793
|
</div>
|
|
4650
4794
|
|
|
4651
4795
|
<!-- Display layers for WMS capabilities -->
|
|
4652
|
-
${this.wmsCapabilities ?
|
|
4796
|
+
${this.wmsCapabilities ? $`<ul class="search-lists">
|
|
4653
4797
|
${this.wmsCapabilities.Capability.Layer.Layer.map(
|
|
4654
4798
|
(s) => {
|
|
4655
4799
|
const a = s.Name;
|
|
4656
|
-
return
|
|
4800
|
+
return $`
|
|
4657
4801
|
<li class="search-list">
|
|
4658
4802
|
${a}
|
|
4659
4803
|
<!-- Button to add layer -->
|
|
4660
4804
|
<button
|
|
4661
4805
|
class="add-layer-icon icon"
|
|
4662
4806
|
@click=${() => (
|
|
4663
|
-
|
|
4664
|
-
|
|
4807
|
+
// @ts-expect-error TODO
|
|
4808
|
+
V(this, q, Zn).call(this, s)
|
|
4665
4809
|
)}
|
|
4666
4810
|
>
|
|
4667
4811
|
${this.unstyled ? "+" : ""}
|
|
@@ -4670,21 +4814,21 @@ class Mo extends it {
|
|
|
4670
4814
|
`;
|
|
4671
4815
|
}
|
|
4672
4816
|
)}
|
|
4673
|
-
</ul>` :
|
|
4674
|
-
` :
|
|
4817
|
+
</ul>` : P}
|
|
4818
|
+
` : $`
|
|
4675
4819
|
<!-- Textarea for JSON input -->
|
|
4676
4820
|
<textarea
|
|
4677
4821
|
class="add-layer-input"
|
|
4678
4822
|
placeholder="Please put a valid eox-map layer JSON."
|
|
4679
|
-
@input=${
|
|
4823
|
+
@input=${V(this, q, Fo)}
|
|
4680
4824
|
.value=${this.jsonInput}
|
|
4681
4825
|
></textarea>
|
|
4682
4826
|
|
|
4683
4827
|
<!-- Button to add JSON layer -->
|
|
4684
4828
|
<button
|
|
4685
4829
|
class="add-layer-icon json-add-layer"
|
|
4686
|
-
disabled=${
|
|
4687
|
-
@click=${
|
|
4830
|
+
disabled=${as(this.jsonInput) ? P : !0}
|
|
4831
|
+
@click=${V(this, q, Uo)}
|
|
4688
4832
|
>
|
|
4689
4833
|
${this.unstyled ? "Add JSON" : ""}
|
|
4690
4834
|
</button>
|
|
@@ -4694,78 +4838,78 @@ class Mo extends it {
|
|
|
4694
4838
|
`;
|
|
4695
4839
|
}
|
|
4696
4840
|
}
|
|
4697
|
-
|
|
4841
|
+
q = new WeakSet(), /**
|
|
4698
4842
|
* Handles changes in the input field by invoking the 'urlInputChangeMethod'.
|
|
4699
4843
|
* This method is triggered upon an @input change event.
|
|
4700
4844
|
*
|
|
4701
4845
|
* @param {Event} evt - The input change event triggering the method.
|
|
4702
4846
|
*/
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
},
|
|
4706
|
-
const n = await
|
|
4707
|
-
n &&
|
|
4847
|
+
Bo = function(n) {
|
|
4848
|
+
Fa(n, this);
|
|
4849
|
+
}, ko = async function() {
|
|
4850
|
+
const n = await ja(this);
|
|
4851
|
+
n && V(this, q, Zn).call(this, n);
|
|
4708
4852
|
}, /**
|
|
4709
4853
|
* Handles input field changes by triggering layer processing and adding layers.
|
|
4710
4854
|
*
|
|
4711
4855
|
* @param {{"Name": string}} layer - The layer information triggering the method.
|
|
4712
4856
|
*/
|
|
4713
|
-
|
|
4714
|
-
|
|
4857
|
+
Zn = function(n) {
|
|
4858
|
+
Za(n, this), Li(this);
|
|
4715
4859
|
}, /**
|
|
4716
4860
|
* Initiates the addition of layers, triggering the handleAddLayerMethod.
|
|
4717
4861
|
*/
|
|
4718
|
-
|
|
4719
|
-
|
|
4862
|
+
Uo = function() {
|
|
4863
|
+
Li(this);
|
|
4720
4864
|
}, /**
|
|
4721
4865
|
* Handles input field changes by invoking the 'handleJsonInputChangeMethod'.
|
|
4722
4866
|
*
|
|
4723
4867
|
* @param {{target: { value: string }}} evt - The input change event triggering the method.
|
|
4724
4868
|
*/
|
|
4725
|
-
|
|
4726
|
-
|
|
4869
|
+
Fo = function(n) {
|
|
4870
|
+
Ua(n, this);
|
|
4727
4871
|
}, /**
|
|
4728
4872
|
* Handles tab changes by invoking the 'openCloseTabMethod'.
|
|
4729
4873
|
*
|
|
4730
4874
|
* @param {"url" | "json" | null} tab - The tab identifier triggering the method.
|
|
4731
4875
|
*/
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
},
|
|
4735
|
-
|
|
4876
|
+
Ve = function(n) {
|
|
4877
|
+
za(n, this);
|
|
4878
|
+
}, hn = new WeakMap(), pn = new WeakMap(), // Define static properties for the component
|
|
4879
|
+
I(Vo, "properties", {
|
|
4736
4880
|
eoxMap: { attribute: !1, state: !0 },
|
|
4737
4881
|
unstyled: { type: Boolean },
|
|
4738
4882
|
noShadow: { type: Boolean }
|
|
4739
4883
|
});
|
|
4740
|
-
customElements.define("eox-layercontrol-add-layers",
|
|
4741
|
-
const
|
|
4884
|
+
customElements.define("eox-layercontrol-add-layers", Vo);
|
|
4885
|
+
const Xa = (e, t) => {
|
|
4742
4886
|
if (t.requestUpdate(), e.target.tagName === "EOX-LAYERCONTROL-LAYER-TOOLS") {
|
|
4743
4887
|
const n = t.renderRoot.querySelector(
|
|
4744
4888
|
"eox-layercontrol-optional-list"
|
|
4745
4889
|
);
|
|
4746
4890
|
n == null || n.requestUpdate();
|
|
4747
4891
|
}
|
|
4748
|
-
},
|
|
4892
|
+
}, qa = (e) => {
|
|
4749
4893
|
let t;
|
|
4750
4894
|
return typeof e == "string" ? t = /** @type {HTMLElement} */
|
|
4751
4895
|
document.querySelector(e) : t = e, t;
|
|
4752
|
-
},
|
|
4753
|
-
const t =
|
|
4896
|
+
}, Mi = (e) => {
|
|
4897
|
+
const t = qa(e.for);
|
|
4754
4898
|
return t && t.map !== e.map && (e.map = t.map), t;
|
|
4755
4899
|
};
|
|
4756
|
-
var
|
|
4757
|
-
class
|
|
4900
|
+
var At, Gt, Zo, zo, fn;
|
|
4901
|
+
class jo extends tt {
|
|
4758
4902
|
// Constructor to set default values for properties
|
|
4759
4903
|
constructor() {
|
|
4760
4904
|
super();
|
|
4761
|
-
|
|
4905
|
+
C(this, Gt);
|
|
4762
4906
|
/**
|
|
4763
4907
|
* Instance of `eox-map` which is a wrapper for the OL
|
|
4764
4908
|
*
|
|
4765
|
-
* @type {import("../../map/main").EOxMap}
|
|
4909
|
+
* @type {import("../../map/src/main").EOxMap}
|
|
4766
4910
|
*/
|
|
4767
|
-
|
|
4768
|
-
|
|
4911
|
+
C(this, At);
|
|
4912
|
+
C(this, fn, `
|
|
4769
4913
|
:host, :root {
|
|
4770
4914
|
font-family: Roboto, sans-serif;
|
|
4771
4915
|
--padding: 0.5rem;
|
|
@@ -4781,43 +4925,43 @@ class Bo extends it {
|
|
|
4781
4925
|
* Updated #eoxMap after first update.
|
|
4782
4926
|
*/
|
|
4783
4927
|
firstUpdated() {
|
|
4784
|
-
this.eoxMap =
|
|
4928
|
+
this.eoxMap = Mi(this);
|
|
4785
4929
|
}
|
|
4786
4930
|
updated(n) {
|
|
4787
|
-
n.has("for") && (this.eoxMap =
|
|
4931
|
+
n.has("for") && (this.eoxMap = Mi(this));
|
|
4788
4932
|
}
|
|
4789
4933
|
get eoxMap() {
|
|
4790
|
-
return
|
|
4934
|
+
return S(this, At);
|
|
4791
4935
|
}
|
|
4792
4936
|
set eoxMap(n) {
|
|
4793
|
-
const i =
|
|
4794
|
-
|
|
4937
|
+
const i = S(this, At);
|
|
4938
|
+
kt(this, At, n), this.requestUpdate("eoxMap", i);
|
|
4795
4939
|
}
|
|
4796
4940
|
render() {
|
|
4797
4941
|
var o, r, s;
|
|
4798
|
-
const n = (o = this.map) == null ? void 0 : o.getLayers().getArray(), i = n && ((r =
|
|
4799
|
-
return
|
|
4942
|
+
const n = (o = this.map) == null ? void 0 : o.getLayers().getArray(), i = n && ((r = ii(n, "layerControlOptional", !0)) == null ? void 0 : r.length) > 0;
|
|
4943
|
+
return $`
|
|
4800
4944
|
<style>
|
|
4801
|
-
${!this.unstyled &&
|
|
4945
|
+
${!this.unstyled && S(this, fn)}
|
|
4802
4946
|
${this.styleOverride}
|
|
4803
4947
|
</style>
|
|
4804
4948
|
|
|
4805
4949
|
<!-- Conditional rendering of add layers component -->
|
|
4806
|
-
${
|
|
4807
|
-
this.addExternalLayers && ((s =
|
|
4808
|
-
() =>
|
|
4950
|
+
${F(
|
|
4951
|
+
this.addExternalLayers && ((s = S(this, At)) == null ? void 0 : s.addOrUpdateLayer),
|
|
4952
|
+
() => $`
|
|
4809
4953
|
<eox-layercontrol-add-layers
|
|
4810
4954
|
.noShadow=${!0}
|
|
4811
|
-
.eoxMap=${
|
|
4955
|
+
.eoxMap=${S(this, At)}
|
|
4812
4956
|
.unstyled=${this.unstyled}
|
|
4813
4957
|
></eox-layercontrol-add-layers>
|
|
4814
4958
|
`
|
|
4815
4959
|
)}
|
|
4816
4960
|
|
|
4817
4961
|
<!-- Conditional rendering of layer list component -->
|
|
4818
|
-
${
|
|
4962
|
+
${F(
|
|
4819
4963
|
this.map,
|
|
4820
|
-
() =>
|
|
4964
|
+
() => $`
|
|
4821
4965
|
<eox-layercontrol-layer-list
|
|
4822
4966
|
.noShadow=${!0}
|
|
4823
4967
|
class="layers"
|
|
@@ -4829,16 +4973,16 @@ class Bo extends it {
|
|
|
4829
4973
|
.tools=${this.tools}
|
|
4830
4974
|
.unstyled=${this.unstyled}
|
|
4831
4975
|
.toolsAsList=${this.toolsAsList}
|
|
4832
|
-
@changed=${
|
|
4833
|
-
@datetime:updated=${
|
|
4976
|
+
@changed=${V(this, Gt, Zo)}
|
|
4977
|
+
@datetime:updated=${V(this, Gt, zo)}
|
|
4834
4978
|
></eox-layercontrol-layer-list>
|
|
4835
4979
|
`
|
|
4836
4980
|
)}
|
|
4837
4981
|
|
|
4838
4982
|
<!-- Conditional rendering of optional list component -->
|
|
4839
|
-
${
|
|
4983
|
+
${F(
|
|
4840
4984
|
i,
|
|
4841
|
-
() =>
|
|
4985
|
+
() => $`
|
|
4842
4986
|
<eox-layercontrol-optional-list
|
|
4843
4987
|
.noShadow=${!0}
|
|
4844
4988
|
.idProperty=${this.idProperty}
|
|
@@ -4851,23 +4995,23 @@ class Bo extends it {
|
|
|
4851
4995
|
`;
|
|
4852
4996
|
}
|
|
4853
4997
|
}
|
|
4854
|
-
|
|
4998
|
+
At = new WeakMap(), Gt = new WeakSet(), /**
|
|
4855
4999
|
* Event handler for changes in the layer list
|
|
4856
5000
|
*
|
|
4857
5001
|
* @param {CustomEvent & {target: Element}} evt
|
|
4858
5002
|
*/
|
|
4859
|
-
|
|
4860
|
-
|
|
5003
|
+
Zo = function(n) {
|
|
5004
|
+
Xa(n, this), this.dispatchEvent(new CustomEvent("layerchange", { detail: n.detail }));
|
|
4861
5005
|
}, /**
|
|
4862
5006
|
* Dispatches datetime updates from layer datetime to the layercontrol
|
|
4863
5007
|
* @param {CustomEvent} evt
|
|
4864
5008
|
*/
|
|
4865
|
-
|
|
5009
|
+
zo = function(n) {
|
|
4866
5010
|
this.dispatchEvent(
|
|
4867
5011
|
new CustomEvent("datetime:updated", { detail: n.detail })
|
|
4868
5012
|
);
|
|
4869
|
-
},
|
|
4870
|
-
|
|
5013
|
+
}, fn = new WeakMap(), // Define static properties for the component
|
|
5014
|
+
I(jo, "properties", {
|
|
4871
5015
|
for: { type: String },
|
|
4872
5016
|
idProperty: { attribute: "id-property" },
|
|
4873
5017
|
map: { attribute: !1, state: !0 },
|
|
@@ -4879,7 +5023,7 @@ L(Bo, "properties", {
|
|
|
4879
5023
|
styleOverride: { type: String },
|
|
4880
5024
|
toolsAsList: { type: Boolean }
|
|
4881
5025
|
});
|
|
4882
|
-
customElements.define("eox-layercontrol",
|
|
5026
|
+
customElements.define("eox-layercontrol", jo);
|
|
4883
5027
|
export {
|
|
4884
|
-
|
|
5028
|
+
jo as EOxLayerControl
|
|
4885
5029
|
};
|