@eox/layercontrol 0.17.6-dev.0 → 0.17.6-dev.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +1146 -1207
- package/dist/eox-layercontrol.umd.cjs +69 -69
- package/package.json +3 -3
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var qn = (
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var Co = Object.defineProperty;
|
|
2
|
+
var qn = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var H = (
|
|
7
|
-
var
|
|
5
|
+
var To = (e, t, n) => t in e ? Co(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var H = (e, t, n) => To(e, typeof t != "symbol" ? t + "" : t, n), cn = (e, t, n) => t.has(e) || qn("Cannot " + n);
|
|
7
|
+
var R = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), T = (e, t, n) => t.has(e) ? qn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Jt = (e, t, n, i) => (cn(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), k = (e, t, n) => (cn(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
13
|
const Ce = globalThis, Hn = Ce.ShadowRoot && (Ce.ShadyCSS === void 0 || Ce.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, wi = Symbol(), Wn = /* @__PURE__ */ new WeakMap();
|
|
14
|
-
let
|
|
15
|
-
constructor(t,
|
|
14
|
+
let Po = class {
|
|
15
|
+
constructor(t, n, i) {
|
|
16
16
|
if (this._$cssResult$ = !0, i !== wi) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
17
|
-
this.cssText = t, this.t =
|
|
17
|
+
this.cssText = t, this.t = n;
|
|
18
18
|
}
|
|
19
19
|
get styleSheet() {
|
|
20
20
|
let t = this.o;
|
|
21
|
-
const
|
|
21
|
+
const n = this.t;
|
|
22
22
|
if (Hn && t === void 0) {
|
|
23
|
-
const i =
|
|
24
|
-
i && (t = Wn.get(
|
|
23
|
+
const i = n !== void 0 && n.length === 1;
|
|
24
|
+
i && (t = Wn.get(n)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Wn.set(n, t));
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
27
|
}
|
|
@@ -29,51 +29,51 @@ let Oo = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
if (Hn)
|
|
34
|
-
else for (const
|
|
32
|
+
const Oo = (e) => new Po(typeof e == "string" ? e : e + "", void 0, wi), Ro = (e, t) => {
|
|
33
|
+
if (Hn) e.adoptedStyleSheets = t.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
|
|
34
|
+
else for (const n of t) {
|
|
35
35
|
const i = document.createElement("style"), o = Ce.litNonce;
|
|
36
|
-
o !== void 0 && i.setAttribute("nonce", o), i.textContent =
|
|
36
|
+
o !== void 0 && i.setAttribute("nonce", o), i.textContent = n.cssText, e.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
}, Gn = Hn ? (
|
|
39
|
-
let
|
|
40
|
-
for (const i of t.cssRules)
|
|
41
|
-
return
|
|
42
|
-
})(
|
|
38
|
+
}, Gn = Hn ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
39
|
+
let n = "";
|
|
40
|
+
for (const i of t.cssRules) n += i.cssText;
|
|
41
|
+
return Oo(n);
|
|
42
|
+
})(e) : e;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Do, defineProperty: No, getOwnPropertyDescriptor: Mo, getOwnPropertyNames: Io, getOwnPropertySymbols: Ho, getPrototypeOf: Bo } = Object, _t = globalThis, Jn = _t.trustedTypes, Vo = Jn ? Jn.emptyScript : "", dn = _t.reactiveElementPolyfillSupport, ie = (e, t) => e, Tn = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
e = e ? Vo : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
e = e == null ? e : JSON.stringify(e);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let
|
|
57
|
+
return e;
|
|
58
|
+
}, fromAttribute(e, t) {
|
|
59
|
+
let n = e;
|
|
60
60
|
switch (t) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
|
|
62
|
+
n = e !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
|
|
65
|
+
n = e === null ? null : Number(e);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
|
|
70
|
+
n = JSON.parse(e);
|
|
71
71
|
} catch {
|
|
72
|
-
|
|
72
|
+
n = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
} }, Ei = (
|
|
75
|
+
return n;
|
|
76
|
+
} }, Ei = (e, t) => !Do(e, t), Kn = { attribute: !0, type: String, converter: Tn, reflect: !1, hasChanged: Ei };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _t.litPropertyMetadata ?? (_t.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
class Lt extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -82,17 +82,17 @@ class Lt extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t,
|
|
86
|
-
if (
|
|
87
|
-
const i = Symbol(), o = this.getPropertyDescriptor(t, i,
|
|
88
|
-
o !== void 0 &&
|
|
85
|
+
static createProperty(t, n = Kn) {
|
|
86
|
+
if (n.state && (n.attribute = !1), this._$Ei(), this.elementProperties.set(t, n), !n.noAccessor) {
|
|
87
|
+
const i = Symbol(), o = this.getPropertyDescriptor(t, i, n);
|
|
88
|
+
o !== void 0 && No(this.prototype, t, o);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static getPropertyDescriptor(t,
|
|
92
|
-
const { get: o, set: r } =
|
|
93
|
-
return this[
|
|
91
|
+
static getPropertyDescriptor(t, n, i) {
|
|
92
|
+
const { get: o, set: r } = Mo(this.prototype, t) ?? { get() {
|
|
93
|
+
return this[n];
|
|
94
94
|
}, set(s) {
|
|
95
|
-
this[
|
|
95
|
+
this[n] = s;
|
|
96
96
|
} };
|
|
97
97
|
return { get() {
|
|
98
98
|
return o == null ? void 0 : o.call(this);
|
|
@@ -105,38 +105,38 @@ class Lt extends HTMLElement {
|
|
|
105
105
|
return this.elementProperties.get(t) ?? Kn;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const t =
|
|
108
|
+
if (this.hasOwnProperty(ie("elementProperties"))) return;
|
|
109
|
+
const t = Bo(this);
|
|
110
110
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
115
|
-
const
|
|
116
|
-
for (const o of i) this.createProperty(o,
|
|
113
|
+
if (this.hasOwnProperty(ie("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ie("properties"))) {
|
|
115
|
+
const n = this.properties, i = [...Io(n), ...Ho(n)];
|
|
116
|
+
for (const o of i) this.createProperty(o, n[o]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
119
119
|
if (t !== null) {
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
120
|
+
const n = litPropertyMetadata.get(t);
|
|
121
|
+
if (n !== void 0) for (const [i, o] of n) this.elementProperties.set(i, o);
|
|
122
122
|
}
|
|
123
123
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
124
|
-
for (const [
|
|
125
|
-
const o = this._$Eu(
|
|
126
|
-
o !== void 0 && this._$Eh.set(o,
|
|
124
|
+
for (const [n, i] of this.elementProperties) {
|
|
125
|
+
const o = this._$Eu(n, i);
|
|
126
|
+
o !== void 0 && this._$Eh.set(o, n);
|
|
127
127
|
}
|
|
128
128
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
129
129
|
}
|
|
130
130
|
static finalizeStyles(t) {
|
|
131
|
-
const
|
|
131
|
+
const n = [];
|
|
132
132
|
if (Array.isArray(t)) {
|
|
133
133
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const o of i)
|
|
135
|
-
} else t !== void 0 &&
|
|
136
|
-
return
|
|
134
|
+
for (const o of i) n.unshift(Gn(o));
|
|
135
|
+
} else t !== void 0 && n.push(Gn(t));
|
|
136
|
+
return n;
|
|
137
137
|
}
|
|
138
|
-
static _$Eu(t,
|
|
139
|
-
const i =
|
|
138
|
+
static _$Eu(t, n) {
|
|
139
|
+
const i = n.attribute;
|
|
140
140
|
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
141
141
|
}
|
|
142
142
|
constructor() {
|
|
@@ -144,76 +144,76 @@ class Lt extends HTMLElement {
|
|
|
144
144
|
}
|
|
145
145
|
_$Ev() {
|
|
146
146
|
var t;
|
|
147
|
-
this._$ES = new Promise((
|
|
147
|
+
this._$ES = new Promise((n) => this.enableUpdating = n), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((n) => n(this));
|
|
148
148
|
}
|
|
149
149
|
addController(t) {
|
|
150
|
-
var
|
|
151
|
-
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((
|
|
150
|
+
var n;
|
|
151
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((n = t.hostConnected) == null || n.call(t));
|
|
152
152
|
}
|
|
153
153
|
removeController(t) {
|
|
154
|
-
var
|
|
155
|
-
(
|
|
154
|
+
var n;
|
|
155
|
+
(n = this._$EO) == null || n.delete(t);
|
|
156
156
|
}
|
|
157
157
|
_$E_() {
|
|
158
|
-
const t = /* @__PURE__ */ new Map(),
|
|
159
|
-
for (const i of
|
|
158
|
+
const t = /* @__PURE__ */ new Map(), n = this.constructor.elementProperties;
|
|
159
|
+
for (const i of n.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
160
160
|
t.size > 0 && (this._$Ep = t);
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return Ro(t, this.constructor.elementStyles), t;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var t;
|
|
168
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((
|
|
168
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((n) => {
|
|
169
169
|
var i;
|
|
170
|
-
return (i =
|
|
170
|
+
return (i = n.hostConnected) == null ? void 0 : i.call(n);
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
enableUpdating(t) {
|
|
174
174
|
}
|
|
175
175
|
disconnectedCallback() {
|
|
176
176
|
var t;
|
|
177
|
-
(t = this._$EO) == null || t.forEach((
|
|
177
|
+
(t = this._$EO) == null || t.forEach((n) => {
|
|
178
178
|
var i;
|
|
179
|
-
return (i =
|
|
179
|
+
return (i = n.hostDisconnected) == null ? void 0 : i.call(n);
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
attributeChangedCallback(t,
|
|
182
|
+
attributeChangedCallback(t, n, i) {
|
|
183
183
|
this._$AK(t, i);
|
|
184
184
|
}
|
|
185
|
-
_$EC(t,
|
|
185
|
+
_$EC(t, n) {
|
|
186
186
|
var r;
|
|
187
187
|
const i = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, i);
|
|
188
188
|
if (o !== void 0 && i.reflect === !0) {
|
|
189
|
-
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : Tn).toAttribute(
|
|
189
|
+
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : Tn).toAttribute(n, i.type);
|
|
190
190
|
this._$Em = t, s == null ? this.removeAttribute(o) : this.setAttribute(o, s), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
_$AK(t,
|
|
193
|
+
_$AK(t, n) {
|
|
194
194
|
var r;
|
|
195
195
|
const i = this.constructor, o = i._$Eh.get(t);
|
|
196
196
|
if (o !== void 0 && this._$Em !== o) {
|
|
197
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 : Tn;
|
|
198
|
-
this._$Em = o, this[o] = a.fromAttribute(
|
|
198
|
+
this._$Em = o, this[o] = a.fromAttribute(n, s.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
requestUpdate(t,
|
|
201
|
+
requestUpdate(t, n, i) {
|
|
202
202
|
if (t !== void 0) {
|
|
203
|
-
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Ei)(this[t],
|
|
204
|
-
this.P(t,
|
|
203
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Ei)(this[t], n)) return;
|
|
204
|
+
this.P(t, n, i);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
207
207
|
}
|
|
208
|
-
P(t,
|
|
209
|
-
this._$AL.has(t) || this._$AL.set(t,
|
|
208
|
+
P(t, n, i) {
|
|
209
|
+
this._$AL.has(t) || this._$AL.set(t, n), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
210
210
|
}
|
|
211
211
|
async _$ET() {
|
|
212
212
|
this.isUpdatePending = !0;
|
|
213
213
|
try {
|
|
214
214
|
await this._$ES;
|
|
215
|
-
} catch (
|
|
216
|
-
Promise.reject(
|
|
215
|
+
} catch (n) {
|
|
216
|
+
Promise.reject(n);
|
|
217
217
|
}
|
|
218
218
|
const t = this.scheduleUpdate();
|
|
219
219
|
return t != null && await t, !this.isUpdatePending;
|
|
@@ -233,22 +233,22 @@ class Lt extends HTMLElement {
|
|
|
233
233
|
if (o.size > 0) for (const [r, s] of o) s.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], s);
|
|
234
234
|
}
|
|
235
235
|
let t = !1;
|
|
236
|
-
const
|
|
236
|
+
const n = this._$AL;
|
|
237
237
|
try {
|
|
238
|
-
t = this.shouldUpdate(
|
|
238
|
+
t = this.shouldUpdate(n), t ? (this.willUpdate(n), (i = this._$EO) == null || i.forEach((o) => {
|
|
239
239
|
var r;
|
|
240
240
|
return (r = o.hostUpdate) == null ? void 0 : r.call(o);
|
|
241
|
-
}), this.update(
|
|
241
|
+
}), this.update(n)) : this._$EU();
|
|
242
242
|
} catch (o) {
|
|
243
243
|
throw t = !1, this._$EU(), o;
|
|
244
244
|
}
|
|
245
|
-
t && this._$AE(
|
|
245
|
+
t && this._$AE(n);
|
|
246
246
|
}
|
|
247
247
|
willUpdate(t) {
|
|
248
248
|
}
|
|
249
249
|
_$AE(t) {
|
|
250
|
-
var
|
|
251
|
-
(
|
|
250
|
+
var n;
|
|
251
|
+
(n = this._$EO) == null || n.forEach((i) => {
|
|
252
252
|
var o;
|
|
253
253
|
return (o = i.hostUpdated) == null ? void 0 : o.call(i);
|
|
254
254
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
@@ -266,45 +266,45 @@ class Lt extends HTMLElement {
|
|
|
266
266
|
return !0;
|
|
267
267
|
}
|
|
268
268
|
update(t) {
|
|
269
|
-
this._$Ej && (this._$Ej = this._$Ej.forEach((
|
|
269
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((n) => this._$EC(n, this[n]))), this._$EU();
|
|
270
270
|
}
|
|
271
271
|
updated(t) {
|
|
272
272
|
}
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
Lt.elementStyles = [], Lt.shadowRootOptions = { mode: "open" }, Lt[
|
|
276
|
+
Lt.elementStyles = [], Lt.shadowRootOptions = { mode: "open" }, Lt[ie("elementProperties")] = /* @__PURE__ */ new Map(), Lt[ie("finalized")] = /* @__PURE__ */ new Map(), dn == null || dn({ ReactiveElement: Lt }), (_t.reactiveElementVersions ?? (_t.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), ni = /'/g, ii = /"/g, $i = /^(?:script|style|textarea|title)$/i,
|
|
285
|
-
function _i(
|
|
286
|
-
if (!Array.isArray(
|
|
282
|
+
const oe = globalThis, He = oe.trustedTypes, Qn = He ? He.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Bn = "$lit$", pt = `lit$${(Math.random() + "").slice(9)}$`, Vn = "?" + pt, Lo = `<${Vn}>`, It = document, ce = () => It.createComment(""), de = (e) => e === null || typeof e != "object" && typeof e != "function", xi = Array.isArray, Si = (e) => xi(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", hn = `[
|
|
283
|
+
\f\r]`, Kt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ti = /-->/g, ei = />/g, Tt = RegExp(`>|${hn}(?:([^\\s"'>=/]+)(${hn}*=${hn}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ni = /'/g, ii = /"/g, $i = /^(?:script|style|textarea|title)$/i, ko = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), x = ko(1), ot = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), oi = /* @__PURE__ */ new WeakMap(), Nt = It.createTreeWalker(It, 129);
|
|
285
|
+
function _i(e, t) {
|
|
286
|
+
if (!Array.isArray(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return Qn !== void 0 ? Qn.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
|
-
const Ai = (
|
|
290
|
-
const
|
|
291
|
-
let o, r = t === 2 ? "<svg>" : "", s =
|
|
292
|
-
for (let a = 0; a <
|
|
293
|
-
const l =
|
|
289
|
+
const Ai = (e, t) => {
|
|
290
|
+
const n = e.length - 1, i = [];
|
|
291
|
+
let o, r = t === 2 ? "<svg>" : "", s = Kt;
|
|
292
|
+
for (let a = 0; a < n; a++) {
|
|
293
|
+
const l = e[a];
|
|
294
294
|
let u, d, c = -1, p = 0;
|
|
295
|
-
for (; p < l.length && (s.lastIndex = p, d = s.exec(l), d !== null); ) p = s.lastIndex, s ===
|
|
296
|
-
const f = s === Tt &&
|
|
297
|
-
r += s ===
|
|
295
|
+
for (; p < l.length && (s.lastIndex = p, d = s.exec(l), d !== null); ) p = s.lastIndex, s === Kt ? d[1] === "!--" ? s = ti : d[1] !== void 0 ? s = ei : d[2] !== void 0 ? ($i.test(d[2]) && (o = RegExp("</" + d[2], "g")), s = Tt) : d[3] !== void 0 && (s = Tt) : s === Tt ? d[0] === ">" ? (s = o ?? Kt, c = -1) : d[1] === void 0 ? c = -2 : (c = s.lastIndex - d[2].length, u = d[1], s = d[3] === void 0 ? Tt : d[3] === '"' ? ii : ni) : s === ii || s === ni ? s = Tt : s === ti || s === ei ? s = Kt : (s = Tt, o = void 0);
|
|
296
|
+
const f = s === Tt && e[a + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
r += s === Kt ? l + Lo : c >= 0 ? (i.push(u), l.slice(0, c) + Bn + l.slice(c) + pt + f) : l + pt + (c === -2 ? a : f);
|
|
298
298
|
}
|
|
299
|
-
return [_i(
|
|
299
|
+
return [_i(e, r + (e[n] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
302
|
-
constructor({ strings: t, _$litType$:
|
|
301
|
+
class he {
|
|
302
|
+
constructor({ strings: t, _$litType$: n }, i) {
|
|
303
303
|
let o;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let r = 0, s = 0;
|
|
306
|
-
const a = t.length - 1, l = this.parts, [u, d] = Ai(t,
|
|
307
|
-
if (this.el =
|
|
306
|
+
const a = t.length - 1, l = this.parts, [u, d] = Ai(t, n);
|
|
307
|
+
if (this.el = he.createElement(u, i), Nt.currentNode = this.el.content, n === 2) {
|
|
308
308
|
const c = this.el.content.firstChild;
|
|
309
309
|
c.replaceWith(...c.childNodes);
|
|
310
310
|
}
|
|
@@ -318,8 +318,8 @@ class pe {
|
|
|
318
318
|
const c = o.textContent.split(pt), p = c.length - 1;
|
|
319
319
|
if (p > 0) {
|
|
320
320
|
o.textContent = He ? He.emptyScript : "";
|
|
321
|
-
for (let f = 0; f < p; f++) o.append(c[f],
|
|
322
|
-
o.append(c[p],
|
|
321
|
+
for (let f = 0; f < p; f++) o.append(c[f], ce()), Nt.nextNode(), l.push({ type: 2, index: ++r });
|
|
322
|
+
o.append(c[p], ce());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
} else if (o.nodeType === 8) if (o.data === Vn) l.push({ type: 2, index: r });
|
|
@@ -330,21 +330,21 @@ class pe {
|
|
|
330
330
|
r++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
static createElement(t,
|
|
333
|
+
static createElement(t, n) {
|
|
334
334
|
const i = It.createElement("template");
|
|
335
335
|
return i.innerHTML = t, i;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function Ht(
|
|
338
|
+
function Ht(e, t, n = e, i) {
|
|
339
339
|
var s, a;
|
|
340
340
|
if (t === ot) return t;
|
|
341
|
-
let o = i !== void 0 ? (s =
|
|
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(
|
|
341
|
+
let o = i !== void 0 ? (s = n._$Co) == null ? void 0 : s[i] : n._$Cl;
|
|
342
|
+
const r = de(t) ? void 0 : t._$litDirective$;
|
|
343
|
+
return (o == null ? void 0 : o.constructor) !== r && ((a = o == null ? void 0 : o._$AO) == null || a.call(o, !1), r === void 0 ? o = void 0 : (o = new r(e), o._$AT(e, n, i)), i !== void 0 ? (n._$Co ?? (n._$Co = []))[i] = o : n._$Cl = o), o !== void 0 && (t = Ht(e, o._$AS(e, t.values), o, i)), t;
|
|
344
344
|
}
|
|
345
345
|
class Ci {
|
|
346
|
-
constructor(t,
|
|
347
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM =
|
|
346
|
+
constructor(t, n) {
|
|
347
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = n;
|
|
348
348
|
}
|
|
349
349
|
get parentNode() {
|
|
350
350
|
return this._$AM.parentNode;
|
|
@@ -353,35 +353,35 @@ class Ci {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(t) {
|
|
356
|
-
const { el: { content:
|
|
356
|
+
const { el: { content: n }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? It).importNode(n, !0);
|
|
357
357
|
Nt.currentNode = o;
|
|
358
358
|
let r = Nt.nextNode(), s = 0, a = 0, l = i[0];
|
|
359
359
|
for (; l !== void 0; ) {
|
|
360
360
|
if (s === l.index) {
|
|
361
361
|
let u;
|
|
362
|
-
l.type === 2 ? u = new
|
|
362
|
+
l.type === 2 ? u = new Xt(r, r.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (u = new Ri(r, this, t)), this._$AV.push(u), l = i[++a];
|
|
363
363
|
}
|
|
364
364
|
s !== (l == null ? void 0 : l.index) && (r = Nt.nextNode(), s++);
|
|
365
365
|
}
|
|
366
366
|
return Nt.currentNode = It, o;
|
|
367
367
|
}
|
|
368
368
|
p(t) {
|
|
369
|
-
let
|
|
370
|
-
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i,
|
|
369
|
+
let n = 0;
|
|
370
|
+
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, n), n += i.strings.length - 2) : i._$AI(t[n])), n++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class Xt {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var t;
|
|
376
376
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
377
377
|
}
|
|
378
|
-
constructor(t,
|
|
379
|
-
this.type = 2, this._$AH = C, this._$AN = void 0, this._$AA = t, this._$AB =
|
|
378
|
+
constructor(t, n, i, o) {
|
|
379
|
+
this.type = 2, this._$AH = C, 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
380
|
}
|
|
381
381
|
get parentNode() {
|
|
382
382
|
let t = this._$AA.parentNode;
|
|
383
|
-
const
|
|
384
|
-
return
|
|
383
|
+
const n = this._$AM;
|
|
384
|
+
return n !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = n.parentNode), t;
|
|
385
385
|
}
|
|
386
386
|
get startNode() {
|
|
387
387
|
return this._$AA;
|
|
@@ -389,8 +389,8 @@ class Yt {
|
|
|
389
389
|
get endNode() {
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
|
-
_$AI(t,
|
|
393
|
-
t = Ht(this, t,
|
|
392
|
+
_$AI(t, n = this) {
|
|
393
|
+
t = Ht(this, t, n), de(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== ot && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Si(t) ? this.k(t) : this._(t);
|
|
394
394
|
}
|
|
395
395
|
S(t) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -399,38 +399,38 @@ class Yt {
|
|
|
399
399
|
this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
|
|
400
400
|
}
|
|
401
401
|
_(t) {
|
|
402
|
-
this._$AH !== C &&
|
|
402
|
+
this._$AH !== C && de(this._$AH) ? this._$AA.nextSibling.data = t : this.T(It.createTextNode(t)), this._$AH = t;
|
|
403
403
|
}
|
|
404
404
|
$(t) {
|
|
405
405
|
var r;
|
|
406
|
-
const { values:
|
|
407
|
-
if (((r = this._$AH) == null ? void 0 : r._$AD) === o) this._$AH.p(
|
|
406
|
+
const { values: n, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = he.createElement(_i(i.h, i.h[0]), this.options)), i);
|
|
407
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === o) this._$AH.p(n);
|
|
408
408
|
else {
|
|
409
409
|
const s = new Ci(o, this), a = s.u(this.options);
|
|
410
|
-
s.p(
|
|
410
|
+
s.p(n), this.T(a), this._$AH = s;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(t) {
|
|
414
|
-
let
|
|
415
|
-
return
|
|
414
|
+
let n = oi.get(t.strings);
|
|
415
|
+
return n === void 0 && oi.set(t.strings, n = new he(t)), n;
|
|
416
416
|
}
|
|
417
417
|
k(t) {
|
|
418
418
|
xi(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
|
-
const
|
|
419
|
+
const n = this._$AH;
|
|
420
420
|
let i, o = 0;
|
|
421
|
-
for (const r of t) o ===
|
|
422
|
-
o <
|
|
421
|
+
for (const r of t) o === n.length ? n.push(i = new Xt(this.S(ce()), this.S(ce()), this, this.options)) : i = n[o], i._$AI(r), o++;
|
|
422
|
+
o < n.length && (this._$AR(i && i._$AB.nextSibling, o), n.length = o);
|
|
423
423
|
}
|
|
424
|
-
_$AR(t = this._$AA.nextSibling,
|
|
424
|
+
_$AR(t = this._$AA.nextSibling, n) {
|
|
425
425
|
var i;
|
|
426
|
-
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0,
|
|
426
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, n); t && t !== this._$AB; ) {
|
|
427
427
|
const o = t.nextSibling;
|
|
428
428
|
t.remove(), t = o;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
setConnected(t) {
|
|
432
|
-
var
|
|
433
|
-
this._$AM === void 0 && (this._$Cv = t, (
|
|
432
|
+
var n;
|
|
433
|
+
this._$AM === void 0 && (this._$Cv = t, (n = this._$AP) == null || n.call(this, t));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
class be {
|
|
@@ -440,17 +440,17 @@ class be {
|
|
|
440
440
|
get _$AU() {
|
|
441
441
|
return this._$AM._$AU;
|
|
442
442
|
}
|
|
443
|
-
constructor(t,
|
|
444
|
-
this.type = 1, this._$AH = C, this._$AN = void 0, this.element = t, this.name =
|
|
443
|
+
constructor(t, n, i, o, r) {
|
|
444
|
+
this.type = 1, this._$AH = C, 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 = C;
|
|
445
445
|
}
|
|
446
|
-
_$AI(t,
|
|
446
|
+
_$AI(t, n = this, i, o) {
|
|
447
447
|
const r = this.strings;
|
|
448
448
|
let s = !1;
|
|
449
|
-
if (r === void 0) t = Ht(this, t,
|
|
449
|
+
if (r === void 0) t = Ht(this, t, n, 0), s = !de(t) || t !== this._$AH && t !== ot, s && (this._$AH = t);
|
|
450
450
|
else {
|
|
451
451
|
const a = t;
|
|
452
452
|
let l, u;
|
|
453
|
-
for (t = r[0], l = 0; l < r.length - 1; l++) u = Ht(this, a[i + l],
|
|
453
|
+
for (t = r[0], l = 0; l < r.length - 1; l++) u = Ht(this, a[i + l], n, l), u === ot && (u = this._$AH[l]), s || (s = !de(u) || u !== this._$AH[l]), u === C ? t = C : t !== C && (t += (u ?? "") + r[l + 1]), this._$AH[l] = u;
|
|
454
454
|
}
|
|
455
455
|
s && !o && this.j(t);
|
|
456
456
|
}
|
|
@@ -475,22 +475,22 @@ class Pi extends be {
|
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
class Oi extends be {
|
|
478
|
-
constructor(t,
|
|
479
|
-
super(t,
|
|
478
|
+
constructor(t, n, i, o, r) {
|
|
479
|
+
super(t, n, i, o, r), this.type = 5;
|
|
480
480
|
}
|
|
481
|
-
_$AI(t,
|
|
482
|
-
if ((t = Ht(this, t,
|
|
481
|
+
_$AI(t, n = this) {
|
|
482
|
+
if ((t = Ht(this, t, n, 0) ?? C) === ot) return;
|
|
483
483
|
const i = this._$AH, o = t === C && i !== C || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== C && (i === C || o);
|
|
484
484
|
o && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(t) {
|
|
487
|
-
var
|
|
488
|
-
typeof this._$AH == "function" ? this._$AH.call(((
|
|
487
|
+
var n;
|
|
488
|
+
typeof this._$AH == "function" ? this._$AH.call(((n = this.options) == null ? void 0 : n.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
class Ri {
|
|
492
|
-
constructor(t,
|
|
493
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM =
|
|
492
|
+
constructor(t, n, i) {
|
|
493
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = i;
|
|
494
494
|
}
|
|
495
495
|
get _$AU() {
|
|
496
496
|
return this._$AM._$AU;
|
|
@@ -499,16 +499,16 @@ class Ri {
|
|
|
499
499
|
Ht(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
pn == null || pn(
|
|
504
|
-
const
|
|
505
|
-
const i = (
|
|
502
|
+
const Uo = { P: Bn, A: pt, C: Vn, M: 1, L: Ai, R: Ci, D: Si, V: Ht, I: Xt, H: be, N: Pi, U: Oi, B: Ti, F: Ri }, pn = oe.litHtmlPolyfillSupport;
|
|
503
|
+
pn == null || pn(he, Xt), (oe.litHtmlVersions ?? (oe.litHtmlVersions = [])).push("3.1.2");
|
|
504
|
+
const Fo = (e, t, n) => {
|
|
505
|
+
const i = (n == null ? void 0 : n.renderBefore) ?? t;
|
|
506
506
|
let o = i._$litPart$;
|
|
507
507
|
if (o === void 0) {
|
|
508
|
-
const r = (
|
|
509
|
-
i._$litPart$ = o = new
|
|
508
|
+
const r = (n == null ? void 0 : n.renderBefore) ?? null;
|
|
509
|
+
i._$litPart$ = o = new Xt(t.insertBefore(ce(), r), r, void 0, n ?? {});
|
|
510
510
|
}
|
|
511
|
-
return o._$AI(
|
|
511
|
+
return o._$AI(e), o;
|
|
512
512
|
};
|
|
513
513
|
/**
|
|
514
514
|
* @license
|
|
@@ -520,13 +520,13 @@ let nt = class extends Lt {
|
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
522
522
|
createRenderRoot() {
|
|
523
|
-
var
|
|
523
|
+
var n;
|
|
524
524
|
const t = super.createRenderRoot();
|
|
525
|
-
return (
|
|
525
|
+
return (n = this.renderOptions).renderBefore ?? (n.renderBefore = t.firstChild), t;
|
|
526
526
|
}
|
|
527
527
|
update(t) {
|
|
528
|
-
const
|
|
529
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
528
|
+
const n = this.render();
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Fo(n, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var t;
|
|
@@ -550,29 +550,29 @@ fn == null || fn({ LitElement: nt });
|
|
|
550
550
|
* Copyright 2021 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
function rt(
|
|
554
|
-
return
|
|
553
|
+
function rt(e, t, n) {
|
|
554
|
+
return e ? t(e) : n == null ? void 0 : n(e);
|
|
555
555
|
}
|
|
556
556
|
/**
|
|
557
557
|
* @license
|
|
558
558
|
* Copyright 2017 Google LLC
|
|
559
559
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
560
560
|
*/
|
|
561
|
-
const Et = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ln = (
|
|
561
|
+
const Et = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ln = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
562
562
|
class kn {
|
|
563
563
|
constructor(t) {
|
|
564
564
|
}
|
|
565
565
|
get _$AU() {
|
|
566
566
|
return this._$AM._$AU;
|
|
567
567
|
}
|
|
568
|
-
_$AT(t,
|
|
569
|
-
this._$Ct = t, this._$AM =
|
|
568
|
+
_$AT(t, n, i) {
|
|
569
|
+
this._$Ct = t, this._$AM = n, this._$Ci = i;
|
|
570
570
|
}
|
|
571
|
-
_$AS(t,
|
|
572
|
-
return this.update(t,
|
|
571
|
+
_$AS(t, n) {
|
|
572
|
+
return this.update(t, n);
|
|
573
573
|
}
|
|
574
|
-
update(t,
|
|
575
|
-
return this.render(...
|
|
574
|
+
update(t, n) {
|
|
575
|
+
return this.render(...n);
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
/**
|
|
@@ -580,33 +580,33 @@ class kn {
|
|
|
580
580
|
* Copyright 2020 Google LLC
|
|
581
581
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
582
582
|
*/
|
|
583
|
-
const { I:
|
|
583
|
+
const { I: jo } = Uo, zo = (e) => e.strings === void 0, ri = () => document.createComment(""), Qt = (e, t, n) => {
|
|
584
584
|
var r;
|
|
585
|
-
const i =
|
|
586
|
-
if (
|
|
585
|
+
const i = e._$AA.parentNode, o = t === void 0 ? e._$AB : t._$AA;
|
|
586
|
+
if (n === void 0) {
|
|
587
587
|
const s = i.insertBefore(ri(), o), a = i.insertBefore(ri(), o);
|
|
588
|
-
|
|
588
|
+
n = new jo(s, a, e, e.options);
|
|
589
589
|
} else {
|
|
590
|
-
const s =
|
|
590
|
+
const s = n._$AB.nextSibling, a = n._$AM, l = a !== e;
|
|
591
591
|
if (l) {
|
|
592
592
|
let u;
|
|
593
|
-
(r =
|
|
593
|
+
(r = n._$AQ) == null || r.call(n, e), n._$AM = e, n._$AP !== void 0 && (u = e._$AU) !== a._$AU && n._$AP(u);
|
|
594
594
|
}
|
|
595
595
|
if (s !== o || l) {
|
|
596
|
-
let u =
|
|
596
|
+
let u = n._$AA;
|
|
597
597
|
for (; u !== s; ) {
|
|
598
598
|
const d = u.nextSibling;
|
|
599
599
|
i.insertBefore(u, o), u = d;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
return
|
|
604
|
-
}, Pt = (
|
|
603
|
+
return n;
|
|
604
|
+
}, Pt = (e, t, n = e) => (e._$AI(t, n), e), Zo = {}, Di = (e, t = Zo) => e._$AH = t, Xo = (e) => e._$AH, gn = (e) => {
|
|
605
605
|
var i;
|
|
606
|
-
(i =
|
|
607
|
-
let t =
|
|
608
|
-
const
|
|
609
|
-
for (; t !==
|
|
606
|
+
(i = e._$AP) == null || i.call(e, !1, !0);
|
|
607
|
+
let t = e._$AA;
|
|
608
|
+
const n = e._$AB.nextSibling;
|
|
609
|
+
for (; t !== n; ) {
|
|
610
610
|
const o = t.nextSibling;
|
|
611
611
|
t.remove(), t = o;
|
|
612
612
|
}
|
|
@@ -616,27 +616,27 @@ const { I: zo } = Fo, Zo = (n) => n.strings === void 0, ri = () => document.crea
|
|
|
616
616
|
* Copyright 2017 Google LLC
|
|
617
617
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
618
618
|
*/
|
|
619
|
-
const si = (
|
|
619
|
+
const si = (e, t, n) => {
|
|
620
620
|
const i = /* @__PURE__ */ new Map();
|
|
621
|
-
for (let o = t; o <=
|
|
621
|
+
for (let o = t; o <= n; o++) i.set(e[o], o);
|
|
622
622
|
return i;
|
|
623
|
-
},
|
|
624
|
-
constructor(
|
|
625
|
-
if (super(
|
|
623
|
+
}, Yo = Ln(class extends kn {
|
|
624
|
+
constructor(e) {
|
|
625
|
+
if (super(e), e.type !== Et.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
626
626
|
}
|
|
627
|
-
dt(
|
|
627
|
+
dt(e, t, n) {
|
|
628
628
|
let i;
|
|
629
|
-
|
|
629
|
+
n === void 0 ? n = t : t !== void 0 && (i = t);
|
|
630
630
|
const o = [], r = [];
|
|
631
631
|
let s = 0;
|
|
632
|
-
for (const a of
|
|
632
|
+
for (const a of e) o[s] = i ? i(a, s) : s, r[s] = n(a, s), s++;
|
|
633
633
|
return { values: r, keys: o };
|
|
634
634
|
}
|
|
635
|
-
render(
|
|
636
|
-
return this.dt(
|
|
635
|
+
render(e, t, n) {
|
|
636
|
+
return this.dt(e, t, n).values;
|
|
637
637
|
}
|
|
638
|
-
update(
|
|
639
|
-
const o =
|
|
638
|
+
update(e, [t, n, i]) {
|
|
639
|
+
const o = Xo(e), { values: r, keys: s } = this.dt(t, n, i);
|
|
640
640
|
if (!Array.isArray(o)) return this.ut = s, r;
|
|
641
641
|
const a = this.ut ?? (this.ut = []), l = [];
|
|
642
642
|
let u, d, c = 0, p = o.length - 1, f = 0, g = r.length - 1;
|
|
@@ -644,26 +644,26 @@ const si = (n, t, e) => {
|
|
|
644
644
|
else if (o[p] === null) p--;
|
|
645
645
|
else if (a[c] === s[f]) l[f] = Pt(o[c], r[f]), c++, f++;
|
|
646
646
|
else if (a[p] === s[g]) l[g] = Pt(o[p], r[g]), p--, g--;
|
|
647
|
-
else if (a[c] === s[g]) l[g] = Pt(o[c], r[g]),
|
|
648
|
-
else if (a[p] === s[f]) l[f] = Pt(o[p], r[f]),
|
|
647
|
+
else if (a[c] === s[g]) l[g] = Pt(o[c], r[g]), Qt(e, l[g + 1], o[c]), c++, g--;
|
|
648
|
+
else if (a[p] === s[f]) l[f] = Pt(o[p], r[f]), Qt(e, o[c], o[p]), p--, f++;
|
|
649
649
|
else if (u === void 0 && (u = si(s, f, g), d = si(a, c, p)), u.has(a[c])) if (u.has(a[p])) {
|
|
650
650
|
const y = d.get(s[f]), P = y !== void 0 ? o[y] : null;
|
|
651
651
|
if (P === null) {
|
|
652
|
-
const L =
|
|
652
|
+
const L = Qt(e, o[c]);
|
|
653
653
|
Pt(L, r[f]), l[f] = L;
|
|
654
|
-
} else l[f] = Pt(P, r[f]),
|
|
654
|
+
} else l[f] = Pt(P, r[f]), Qt(e, o[c], P), o[y] = null;
|
|
655
655
|
f++;
|
|
656
656
|
} else gn(o[p]), p--;
|
|
657
657
|
else gn(o[c]), c++;
|
|
658
658
|
for (; f <= g; ) {
|
|
659
|
-
const y =
|
|
659
|
+
const y = Qt(e, l[g + 1]);
|
|
660
660
|
Pt(y, r[f]), l[f++] = y;
|
|
661
661
|
}
|
|
662
662
|
for (; c <= p; ) {
|
|
663
663
|
const y = o[c++];
|
|
664
664
|
y !== null && gn(y);
|
|
665
665
|
}
|
|
666
|
-
return this.ut = s, Di(
|
|
666
|
+
return this.ut = s, Di(e, l), ot;
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
/**
|
|
@@ -672,8 +672,8 @@ const si = (n, t, e) => {
|
|
|
672
672
|
* @license BSD-2-Clause
|
|
673
673
|
* @preserve
|
|
674
674
|
*/
|
|
675
|
-
var E = (
|
|
676
|
-
const
|
|
675
|
+
var E = (e) => e !== void 0, Ni = (e, t, n) => t in e ? e[t] : e[t] = n;
|
|
676
|
+
const pe = {
|
|
677
677
|
ELEMENT: 1,
|
|
678
678
|
ATTRIBUTE: 2,
|
|
679
679
|
TEXT: 3,
|
|
@@ -687,7 +687,7 @@ const fe = {
|
|
|
687
687
|
DOCUMENT_FRAGMENT: 11,
|
|
688
688
|
NOTATION: 12
|
|
689
689
|
};
|
|
690
|
-
class
|
|
690
|
+
class qo {
|
|
691
691
|
/**
|
|
692
692
|
* XML DOM parser
|
|
693
693
|
* @constructor
|
|
@@ -711,66 +711,66 @@ class Wo {
|
|
|
711
711
|
* @return {string} All text content.
|
|
712
712
|
* @api
|
|
713
713
|
*/
|
|
714
|
-
getAllTextContent(t,
|
|
715
|
-
return ln(t,
|
|
714
|
+
getAllTextContent(t, n) {
|
|
715
|
+
return ln(t, n).join("");
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
function ln(
|
|
719
|
-
return Mi(
|
|
718
|
+
function ln(e, t) {
|
|
719
|
+
return Mi(e, t, []).join("");
|
|
720
720
|
}
|
|
721
|
-
function Mi(
|
|
722
|
-
if (
|
|
723
|
-
t ?
|
|
721
|
+
function Mi(e, t, n) {
|
|
722
|
+
if (e.nodeType === pe.CDATA_SECTION || e.nodeType === pe.TEXT)
|
|
723
|
+
t ? n.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : n.push(e.nodeValue);
|
|
724
724
|
else {
|
|
725
725
|
var i;
|
|
726
|
-
for (i =
|
|
727
|
-
Mi(i, t,
|
|
726
|
+
for (i = e.firstChild; i; i = i.nextSibling)
|
|
727
|
+
Mi(i, t, n);
|
|
728
728
|
}
|
|
729
|
-
return
|
|
729
|
+
return n;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
for (var o =
|
|
733
|
-
var r = o.namespaceURI || null, s =
|
|
731
|
+
function Wo(e, t, n, i) {
|
|
732
|
+
for (var o = Go(t); o; o = Jo(o)) {
|
|
733
|
+
var r = o.namespaceURI || null, s = e[r];
|
|
734
734
|
if (E(s)) {
|
|
735
735
|
var a = s[o.localName];
|
|
736
|
-
E(a) && a.call(i, o,
|
|
736
|
+
E(a) && a.call(i, o, n);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
let t =
|
|
742
|
-
for (; t && t.nodeType !==
|
|
740
|
+
function Go(e) {
|
|
741
|
+
let t = e.firstElementChild || e.firstChild;
|
|
742
|
+
for (; t && t.nodeType !== pe.ELEMENT; )
|
|
743
743
|
t = t.nextSibling;
|
|
744
744
|
return t;
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
let t =
|
|
748
|
-
for (; t && t.nodeType !==
|
|
746
|
+
function Jo(e) {
|
|
747
|
+
let t = e.nextElementSibling || e.nextSibling;
|
|
748
|
+
for (; t && t.nodeType !== pe.ELEMENT; )
|
|
749
749
|
t = t.nextSibling;
|
|
750
750
|
return t;
|
|
751
751
|
}
|
|
752
|
-
function j(
|
|
752
|
+
function j(e, t, n) {
|
|
753
753
|
return (
|
|
754
754
|
/** @type {Object.<string, Object.<string, XMLParser.Parser>>} */
|
|
755
|
-
|
|
755
|
+
Ko(e, t, n)
|
|
756
756
|
);
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
var i = E(
|
|
760
|
-
for (o = 0, r =
|
|
761
|
-
i[
|
|
758
|
+
function Ko(e, t, n) {
|
|
759
|
+
var i = E(n) ? n : {}, o, r;
|
|
760
|
+
for (o = 0, r = e.length; o < r; ++o)
|
|
761
|
+
i[e[o]] = t;
|
|
762
762
|
return i;
|
|
763
763
|
}
|
|
764
|
-
function Ii(
|
|
764
|
+
function Ii(e, t) {
|
|
765
765
|
return (
|
|
766
766
|
/**
|
|
767
767
|
* @param {Node} node Node.
|
|
768
768
|
* @param {Array.<*>} objectStack Object stack.
|
|
769
769
|
*/
|
|
770
|
-
function(
|
|
771
|
-
var o =
|
|
770
|
+
function(n, i) {
|
|
771
|
+
var o = e.call(
|
|
772
772
|
E(t) ? t : this,
|
|
773
|
-
|
|
773
|
+
n,
|
|
774
774
|
i
|
|
775
775
|
);
|
|
776
776
|
if (E(o)) {
|
|
@@ -780,18 +780,18 @@ function Ii(n, t) {
|
|
|
780
780
|
}
|
|
781
781
|
);
|
|
782
782
|
}
|
|
783
|
-
function V(
|
|
784
|
-
return i.push(
|
|
783
|
+
function V(e, t, n, i, o) {
|
|
784
|
+
return i.push(e), Wo(t, n, i, o), i.pop();
|
|
785
785
|
}
|
|
786
|
-
function m(
|
|
786
|
+
function m(e, t, n) {
|
|
787
787
|
return (
|
|
788
788
|
/**
|
|
789
789
|
* @param {Node} node Node.
|
|
790
790
|
* @param {Array.<*>} objectStack Object stack.
|
|
791
791
|
*/
|
|
792
792
|
function(i, o) {
|
|
793
|
-
let r =
|
|
794
|
-
E(
|
|
793
|
+
let r = e.call(
|
|
794
|
+
E(n) ? n : this,
|
|
795
795
|
i,
|
|
796
796
|
o
|
|
797
797
|
);
|
|
@@ -805,15 +805,15 @@ function m(n, t, e) {
|
|
|
805
805
|
}
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
|
-
function J(
|
|
808
|
+
function J(e, t, n) {
|
|
809
809
|
return (
|
|
810
810
|
/**
|
|
811
811
|
* @param {Node} node Node.
|
|
812
812
|
* @param {Array.<*>} objectStack Object stack.
|
|
813
813
|
*/
|
|
814
814
|
function(i, o) {
|
|
815
|
-
var r =
|
|
816
|
-
E(
|
|
815
|
+
var r = e.call(
|
|
816
|
+
E(n) ? n : this,
|
|
817
817
|
i,
|
|
818
818
|
o
|
|
819
819
|
);
|
|
@@ -827,89 +827,89 @@ function J(n, t, e) {
|
|
|
827
827
|
}
|
|
828
828
|
);
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
function
|
|
832
|
-
return
|
|
830
|
+
const Qo = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
|
831
|
+
function tr(e) {
|
|
832
|
+
return e.replace(Qo, "");
|
|
833
833
|
}
|
|
834
|
-
function Mt(
|
|
835
|
-
const t = /^\s*(true|1)|(false|0)\s*$/.exec(
|
|
834
|
+
function Mt(e) {
|
|
835
|
+
const t = /^\s*(true|1)|(false|0)\s*$/.exec(e);
|
|
836
836
|
if (t)
|
|
837
837
|
return E(t[1]) || !1;
|
|
838
838
|
}
|
|
839
|
-
function Ut(
|
|
840
|
-
return ft(ln(
|
|
839
|
+
function Ut(e) {
|
|
840
|
+
return ft(ln(e, !1));
|
|
841
841
|
}
|
|
842
|
-
function ft(
|
|
843
|
-
const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(
|
|
842
|
+
function ft(e) {
|
|
843
|
+
const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(e);
|
|
844
844
|
if (t)
|
|
845
845
|
return parseFloat(t[1]);
|
|
846
846
|
}
|
|
847
|
-
function mn(
|
|
848
|
-
return Be(ln(
|
|
847
|
+
function mn(e) {
|
|
848
|
+
return Be(ln(e, !1));
|
|
849
849
|
}
|
|
850
|
-
function Be(
|
|
851
|
-
const t = /^\s*(\d+)\s*$/.exec(
|
|
850
|
+
function Be(e) {
|
|
851
|
+
const t = /^\s*(\d+)\s*$/.exec(e);
|
|
852
852
|
if (t)
|
|
853
853
|
return parseInt(t[1], 10);
|
|
854
854
|
}
|
|
855
|
-
function $(
|
|
856
|
-
return
|
|
855
|
+
function $(e) {
|
|
856
|
+
return tr(ln(e, !1));
|
|
857
857
|
}
|
|
858
|
-
const
|
|
859
|
-
function Un(
|
|
860
|
-
return
|
|
858
|
+
const er = "http://www.w3.org/1999/xlink";
|
|
859
|
+
function Un(e) {
|
|
860
|
+
return e.getAttributeNS(er, "href");
|
|
861
861
|
}
|
|
862
|
-
function
|
|
863
|
-
return V({},
|
|
862
|
+
function nr(e, t) {
|
|
863
|
+
return V({}, Pr, e, t);
|
|
864
864
|
}
|
|
865
|
-
function Hi(
|
|
865
|
+
function Hi(e) {
|
|
866
866
|
return [
|
|
867
|
-
ft(
|
|
868
|
-
ft(
|
|
869
|
-
ft(
|
|
870
|
-
ft(
|
|
867
|
+
ft(e.getAttribute("minx")),
|
|
868
|
+
ft(e.getAttribute("miny")),
|
|
869
|
+
ft(e.getAttribute("maxx")),
|
|
870
|
+
ft(e.getAttribute("maxy"))
|
|
871
871
|
];
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
const
|
|
875
|
-
ft(
|
|
876
|
-
ft(
|
|
873
|
+
function ir(e, t) {
|
|
874
|
+
const n = Hi(e), i = [
|
|
875
|
+
ft(e.getAttribute("resx")),
|
|
876
|
+
ft(e.getAttribute("resy"))
|
|
877
877
|
];
|
|
878
878
|
return {
|
|
879
|
-
crs:
|
|
880
|
-
extent:
|
|
879
|
+
crs: e.getAttribute("CRS") || e.getAttribute("SRS"),
|
|
880
|
+
extent: n,
|
|
881
881
|
res: i
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
const
|
|
886
|
-
if (!(!E(
|
|
887
|
-
return
|
|
884
|
+
function or(e, t) {
|
|
885
|
+
const n = Hi(e);
|
|
886
|
+
if (!(!E(n[0]) || !E(n[1]) || !E(n[2]) || !E(n[3])))
|
|
887
|
+
return n;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
const
|
|
891
|
-
return { min:
|
|
889
|
+
function rr(e, t) {
|
|
890
|
+
const n = parseFloat(e.getAttribute("min")), i = parseFloat(e.getAttribute("max"));
|
|
891
|
+
return { min: n, max: i };
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
const
|
|
893
|
+
function sr(e, t) {
|
|
894
|
+
const n = V(
|
|
895
895
|
{},
|
|
896
|
-
|
|
897
|
-
|
|
896
|
+
Or,
|
|
897
|
+
e,
|
|
898
898
|
t
|
|
899
899
|
);
|
|
900
|
-
if (!E(
|
|
900
|
+
if (!E(n)) return;
|
|
901
901
|
const i = (
|
|
902
902
|
/** @type {number|undefined} */
|
|
903
|
-
|
|
903
|
+
n.westBoundLongitude
|
|
904
904
|
), o = (
|
|
905
905
|
/** @type {number|undefined} */
|
|
906
|
-
|
|
906
|
+
n.southBoundLatitude
|
|
907
907
|
), r = (
|
|
908
908
|
/** @type {number|undefined} */
|
|
909
|
-
|
|
909
|
+
n.eastBoundLongitude
|
|
910
910
|
), s = (
|
|
911
911
|
/** @type {number|undefined} */
|
|
912
|
-
|
|
912
|
+
n.northBoundLatitude
|
|
913
913
|
);
|
|
914
914
|
if (!(!E(i) || !E(o) || !E(r) || !E(s)))
|
|
915
915
|
return [
|
|
@@ -919,57 +919,57 @@ function ar(n, t) {
|
|
|
919
919
|
s
|
|
920
920
|
];
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return V({},
|
|
922
|
+
function ar(e, t) {
|
|
923
|
+
return V({}, Sr, e, t);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
return V({},
|
|
925
|
+
function lr(e, t) {
|
|
926
|
+
return V({}, $r, e, t);
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function ur(e, t) {
|
|
929
929
|
return V(
|
|
930
930
|
{},
|
|
931
|
-
|
|
932
|
-
|
|
931
|
+
_r,
|
|
932
|
+
e,
|
|
933
933
|
t
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function cr(e, t) {
|
|
937
937
|
return V(
|
|
938
938
|
{},
|
|
939
|
-
|
|
940
|
-
|
|
939
|
+
Ar,
|
|
940
|
+
e,
|
|
941
941
|
t
|
|
942
942
|
);
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function dr(e, t) {
|
|
945
945
|
return V(
|
|
946
946
|
{},
|
|
947
|
-
|
|
948
|
-
|
|
947
|
+
Cr,
|
|
948
|
+
e,
|
|
949
949
|
t
|
|
950
950
|
);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function hr(e, t) {
|
|
953
953
|
return V(
|
|
954
954
|
[],
|
|
955
|
-
|
|
956
|
-
|
|
955
|
+
Tr,
|
|
956
|
+
e,
|
|
957
957
|
t
|
|
958
958
|
);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
const
|
|
960
|
+
function pr(e, t) {
|
|
961
|
+
const n = Mt(e.getAttribute("queryable"));
|
|
962
962
|
return V(
|
|
963
963
|
{
|
|
964
|
-
queryable: E(
|
|
964
|
+
queryable: E(n) ? n : !1
|
|
965
965
|
},
|
|
966
966
|
Li,
|
|
967
|
-
|
|
967
|
+
e,
|
|
968
968
|
t
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
var
|
|
971
|
+
function fr(e, t) {
|
|
972
|
+
var n = (
|
|
973
973
|
/** @type {Object.<string,*>} */
|
|
974
974
|
t[t.length - 1]
|
|
975
975
|
);
|
|
@@ -978,26 +978,26 @@ function gr(n, t) {
|
|
|
978
978
|
V(
|
|
979
979
|
{},
|
|
980
980
|
Li,
|
|
981
|
-
|
|
981
|
+
e,
|
|
982
982
|
t
|
|
983
983
|
)
|
|
984
984
|
);
|
|
985
985
|
if (!E(i)) return;
|
|
986
|
-
let o = Mt(
|
|
987
|
-
E(o) || (o =
|
|
988
|
-
let r = Be(
|
|
989
|
-
E(r) || (r =
|
|
990
|
-
let s = Mt(
|
|
991
|
-
E(s) || (s =
|
|
992
|
-
let a = Mt(
|
|
993
|
-
E(a) || (a =
|
|
994
|
-
let l = ft(
|
|
995
|
-
E(l) || (l =
|
|
996
|
-
let u = ft(
|
|
997
|
-
E(u) || (u =
|
|
986
|
+
let o = Mt(e.getAttribute("queryable"));
|
|
987
|
+
E(o) || (o = n.queryable), i.queryable = E(o) ? o : !1;
|
|
988
|
+
let r = Be(e.getAttribute("cascaded"));
|
|
989
|
+
E(r) || (r = n.cascaded), i.cascaded = r;
|
|
990
|
+
let s = Mt(e.getAttribute("opaque"));
|
|
991
|
+
E(s) || (s = n.opaque), i.opaque = E(s) ? s : !1;
|
|
992
|
+
let a = Mt(e.getAttribute("noSubsets"));
|
|
993
|
+
E(a) || (a = n.noSubsets), i.noSubsets = E(a) ? a : !1;
|
|
994
|
+
let l = ft(e.getAttribute("fixedWidth"));
|
|
995
|
+
E(l) || (l = n.fixedWidth), i.fixedWidth = l;
|
|
996
|
+
let u = ft(e.getAttribute("fixedHeight"));
|
|
997
|
+
E(u) || (u = n.fixedHeight), i.fixedHeight = u;
|
|
998
998
|
const d = ["Style", "CRS", "AuthorityURL"];
|
|
999
999
|
for (let p = 0, f = d.length; p < f; p++) {
|
|
1000
|
-
const g = d[p], y =
|
|
1000
|
+
const g = d[p], y = n[g];
|
|
1001
1001
|
if (E(y)) {
|
|
1002
1002
|
let P = Ni(i, g, []);
|
|
1003
1003
|
P = P.concat(y), i[g] = P;
|
|
@@ -1014,92 +1014,92 @@ function gr(n, t) {
|
|
|
1014
1014
|
for (let p = 0, f = c.length; p < f; p++) {
|
|
1015
1015
|
const g = c[p], y = i[g];
|
|
1016
1016
|
if (!E(y)) {
|
|
1017
|
-
const P =
|
|
1017
|
+
const P = n[g];
|
|
1018
1018
|
i[g] = P;
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
1021
|
return i;
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function gr(e, t) {
|
|
1024
1024
|
return {
|
|
1025
|
-
name:
|
|
1026
|
-
units:
|
|
1027
|
-
unitSymbol:
|
|
1028
|
-
default:
|
|
1029
|
-
multipleValues: Mt(
|
|
1030
|
-
nearestValue: Mt(
|
|
1031
|
-
current: Mt(
|
|
1032
|
-
values: $(
|
|
1025
|
+
name: e.getAttribute("name"),
|
|
1026
|
+
units: e.getAttribute("units"),
|
|
1027
|
+
unitSymbol: e.getAttribute("unitSymbol"),
|
|
1028
|
+
default: e.getAttribute("default"),
|
|
1029
|
+
multipleValues: Mt(e.getAttribute("multipleValues")),
|
|
1030
|
+
nearestValue: Mt(e.getAttribute("nearestValue")),
|
|
1031
|
+
current: Mt(e.getAttribute("current")),
|
|
1032
|
+
values: $(e)
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
|
-
function mt(
|
|
1035
|
+
function mt(e, t) {
|
|
1036
1036
|
return V(
|
|
1037
1037
|
{},
|
|
1038
|
-
|
|
1039
|
-
|
|
1038
|
+
Hr,
|
|
1039
|
+
e,
|
|
1040
1040
|
t
|
|
1041
1041
|
);
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
return V({},
|
|
1043
|
+
function mr(e, t) {
|
|
1044
|
+
return V({}, Rr, e, t);
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return V({},
|
|
1046
|
+
function yr(e, t) {
|
|
1047
|
+
return V({}, Nr, e, t);
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return V({},
|
|
1049
|
+
function br(e, t) {
|
|
1050
|
+
return V({}, Mr, e, t);
|
|
1051
1051
|
}
|
|
1052
|
-
function yn(
|
|
1053
|
-
return V({},
|
|
1052
|
+
function yn(e, t) {
|
|
1053
|
+
return V({}, Dr, e, t);
|
|
1054
1054
|
}
|
|
1055
|
-
function Bi(
|
|
1056
|
-
var
|
|
1057
|
-
if (E(
|
|
1055
|
+
function Bi(e, t) {
|
|
1056
|
+
var n = mt(e, t);
|
|
1057
|
+
if (E(n)) {
|
|
1058
1058
|
const i = [
|
|
1059
|
-
Be(
|
|
1060
|
-
Be(
|
|
1059
|
+
Be(e.getAttribute("width")),
|
|
1060
|
+
Be(e.getAttribute("height"))
|
|
1061
1061
|
];
|
|
1062
|
-
return
|
|
1062
|
+
return n.size = i, n;
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
var
|
|
1067
|
-
if (E(
|
|
1068
|
-
return
|
|
1065
|
+
function vr(e, t) {
|
|
1066
|
+
var n = mt(e, t);
|
|
1067
|
+
if (E(n))
|
|
1068
|
+
return n.name = e.getAttribute("name"), n;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1071
|
-
var
|
|
1072
|
-
if (E(
|
|
1073
|
-
return
|
|
1070
|
+
function wr(e, t) {
|
|
1071
|
+
var n = mt(e, t);
|
|
1072
|
+
if (E(n))
|
|
1073
|
+
return n.type = e.getAttribute("type"), n;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return V({},
|
|
1075
|
+
function Er(e, t) {
|
|
1076
|
+
return V({}, Ir, e, t);
|
|
1077
1077
|
}
|
|
1078
|
-
function Vi(
|
|
1078
|
+
function Vi(e, t) {
|
|
1079
1079
|
return V(
|
|
1080
1080
|
[],
|
|
1081
|
-
|
|
1082
|
-
|
|
1081
|
+
Br,
|
|
1082
|
+
e,
|
|
1083
1083
|
t
|
|
1084
1084
|
);
|
|
1085
1085
|
}
|
|
1086
1086
|
const z = [
|
|
1087
1087
|
null,
|
|
1088
1088
|
"http://www.opengis.net/wms"
|
|
1089
|
-
],
|
|
1089
|
+
], xr = j(
|
|
1090
1090
|
z,
|
|
1091
1091
|
{
|
|
1092
|
-
Service: m(
|
|
1093
|
-
Capability: m(
|
|
1092
|
+
Service: m(lr),
|
|
1093
|
+
Capability: m(ar)
|
|
1094
1094
|
}
|
|
1095
|
-
),
|
|
1095
|
+
), Sr = j(
|
|
1096
1096
|
z,
|
|
1097
1097
|
{
|
|
1098
|
-
Request: m(
|
|
1099
|
-
Exception: m(
|
|
1100
|
-
Layer: m(
|
|
1098
|
+
Request: m(mr),
|
|
1099
|
+
Exception: m(hr),
|
|
1100
|
+
Layer: m(pr)
|
|
1101
1101
|
}
|
|
1102
|
-
),
|
|
1102
|
+
), $r = j(
|
|
1103
1103
|
z,
|
|
1104
1104
|
{
|
|
1105
1105
|
Name: m($),
|
|
@@ -1107,30 +1107,30 @@ const z = [
|
|
|
1107
1107
|
Abstract: m($),
|
|
1108
1108
|
KeywordList: m(Vi),
|
|
1109
1109
|
OnlineResource: m(Un),
|
|
1110
|
-
ContactInformation: m(
|
|
1110
|
+
ContactInformation: m(ur),
|
|
1111
1111
|
Fees: m($),
|
|
1112
1112
|
AccessConstraints: m($),
|
|
1113
1113
|
LayerLimit: m(mn),
|
|
1114
1114
|
MaxWidth: m(mn),
|
|
1115
1115
|
MaxHeight: m(mn)
|
|
1116
1116
|
}
|
|
1117
|
-
),
|
|
1117
|
+
), _r = j(
|
|
1118
1118
|
z,
|
|
1119
1119
|
{
|
|
1120
|
-
ContactPersonPrimary: m(
|
|
1120
|
+
ContactPersonPrimary: m(cr),
|
|
1121
1121
|
ContactPosition: m($),
|
|
1122
|
-
ContactAddress: m(
|
|
1122
|
+
ContactAddress: m(dr),
|
|
1123
1123
|
ContactVoiceTelephone: m($),
|
|
1124
1124
|
ContactFacsimileTelephone: m($),
|
|
1125
1125
|
ContactElectronicMailAddress: m($)
|
|
1126
1126
|
}
|
|
1127
|
-
),
|
|
1127
|
+
), Ar = j(
|
|
1128
1128
|
z,
|
|
1129
1129
|
{
|
|
1130
1130
|
ContactPerson: m($),
|
|
1131
1131
|
ContactOrganization: m($)
|
|
1132
1132
|
}
|
|
1133
|
-
),
|
|
1133
|
+
), Cr = j(
|
|
1134
1134
|
z,
|
|
1135
1135
|
{
|
|
1136
1136
|
AddressType: m($),
|
|
@@ -1140,7 +1140,7 @@ const z = [
|
|
|
1140
1140
|
PostCode: m($),
|
|
1141
1141
|
Country: m($)
|
|
1142
1142
|
}
|
|
1143
|
-
),
|
|
1143
|
+
), Tr = j(
|
|
1144
1144
|
z,
|
|
1145
1145
|
{
|
|
1146
1146
|
Format: Ii($)
|
|
@@ -1154,35 +1154,35 @@ const z = [
|
|
|
1154
1154
|
KeywordList: m(Vi),
|
|
1155
1155
|
CRS: J($),
|
|
1156
1156
|
SRS: J($),
|
|
1157
|
-
EX_GeographicBoundingBox: m(
|
|
1158
|
-
LatLonBoundingBox: m(
|
|
1159
|
-
BoundingBox: J(
|
|
1160
|
-
Dimension: J(
|
|
1161
|
-
Attribution: m(
|
|
1162
|
-
AuthorityURL: J(
|
|
1157
|
+
EX_GeographicBoundingBox: m(sr),
|
|
1158
|
+
LatLonBoundingBox: m(or),
|
|
1159
|
+
BoundingBox: J(ir),
|
|
1160
|
+
Dimension: J(gr),
|
|
1161
|
+
Attribution: m(nr),
|
|
1162
|
+
AuthorityURL: J(vr),
|
|
1163
1163
|
Identifier: J($),
|
|
1164
|
-
MetadataURL: J(
|
|
1164
|
+
MetadataURL: J(wr),
|
|
1165
1165
|
DataURL: J(mt),
|
|
1166
1166
|
FeatureListURL: J(mt),
|
|
1167
|
-
Style: J(
|
|
1167
|
+
Style: J(Er),
|
|
1168
1168
|
MinScaleDenominator: m(Ut),
|
|
1169
1169
|
MaxScaleDenominator: m(Ut),
|
|
1170
|
-
ScaleHint: m(
|
|
1171
|
-
Layer: J(
|
|
1170
|
+
ScaleHint: m(rr),
|
|
1171
|
+
Layer: J(fr)
|
|
1172
1172
|
}
|
|
1173
|
-
),
|
|
1173
|
+
), Pr = j(
|
|
1174
1174
|
z,
|
|
1175
1175
|
{
|
|
1176
1176
|
Title: m($),
|
|
1177
1177
|
OnlineResource: m(Un),
|
|
1178
1178
|
LogoURL: m(Bi)
|
|
1179
1179
|
}
|
|
1180
|
-
),
|
|
1180
|
+
), Or = j(z, {
|
|
1181
1181
|
westBoundLongitude: m(Ut),
|
|
1182
1182
|
eastBoundLongitude: m(Ut),
|
|
1183
1183
|
southBoundLatitude: m(Ut),
|
|
1184
1184
|
northBoundLatitude: m(Ut)
|
|
1185
|
-
}),
|
|
1185
|
+
}), Rr = j(
|
|
1186
1186
|
z,
|
|
1187
1187
|
{
|
|
1188
1188
|
GetCapabilities: m(
|
|
@@ -1195,22 +1195,22 @@ const z = [
|
|
|
1195
1195
|
yn
|
|
1196
1196
|
)
|
|
1197
1197
|
}
|
|
1198
|
-
),
|
|
1198
|
+
), Dr = j(
|
|
1199
1199
|
z,
|
|
1200
1200
|
{
|
|
1201
1201
|
Format: J($),
|
|
1202
1202
|
DCPType: J(
|
|
1203
|
-
|
|
1203
|
+
yr
|
|
1204
1204
|
)
|
|
1205
1205
|
}
|
|
1206
|
-
),
|
|
1206
|
+
), Nr = j(
|
|
1207
1207
|
z,
|
|
1208
1208
|
{
|
|
1209
1209
|
HTTP: m(
|
|
1210
|
-
|
|
1210
|
+
br
|
|
1211
1211
|
)
|
|
1212
1212
|
}
|
|
1213
|
-
),
|
|
1213
|
+
), Mr = j(
|
|
1214
1214
|
z,
|
|
1215
1215
|
{
|
|
1216
1216
|
Get: m(
|
|
@@ -1220,7 +1220,7 @@ const z = [
|
|
|
1220
1220
|
mt
|
|
1221
1221
|
)
|
|
1222
1222
|
}
|
|
1223
|
-
),
|
|
1223
|
+
), Ir = j(
|
|
1224
1224
|
z,
|
|
1225
1225
|
{
|
|
1226
1226
|
Name: m($),
|
|
@@ -1230,27 +1230,27 @@ const z = [
|
|
|
1230
1230
|
StyleSheetURL: m(mt),
|
|
1231
1231
|
StyleURL: m(mt)
|
|
1232
1232
|
}
|
|
1233
|
-
),
|
|
1233
|
+
), Hr = j(
|
|
1234
1234
|
z,
|
|
1235
1235
|
{
|
|
1236
1236
|
Format: m($),
|
|
1237
1237
|
OnlineResource: m(Un)
|
|
1238
1238
|
}
|
|
1239
|
-
),
|
|
1239
|
+
), Br = j(
|
|
1240
1240
|
z,
|
|
1241
1241
|
{
|
|
1242
1242
|
Keyword: Ii($)
|
|
1243
1243
|
}
|
|
1244
1244
|
);
|
|
1245
|
-
class
|
|
1245
|
+
class Vr {
|
|
1246
1246
|
/**
|
|
1247
1247
|
* WMS Capabilities parser
|
|
1248
1248
|
*
|
|
1249
1249
|
* @param {String=} xmlString
|
|
1250
1250
|
* @constructor
|
|
1251
1251
|
*/
|
|
1252
|
-
constructor(t,
|
|
1253
|
-
!
|
|
1252
|
+
constructor(t, n) {
|
|
1253
|
+
!n && typeof window < "u" && (n = window.DOMParser), this.version = void 0, this._parser = new qo(n), this._data = t;
|
|
1254
1254
|
}
|
|
1255
1255
|
/**
|
|
1256
1256
|
* @param {String} xmlString
|
|
@@ -1278,9 +1278,9 @@ class Lr {
|
|
|
1278
1278
|
* @return {Object|null}
|
|
1279
1279
|
*/
|
|
1280
1280
|
readFromDocument(t) {
|
|
1281
|
-
for (let
|
|
1282
|
-
if (
|
|
1283
|
-
return this.readFromNode(
|
|
1281
|
+
for (let n = t.firstChild; n; n = n.nextSibling)
|
|
1282
|
+
if (n.nodeType == pe.ELEMENT)
|
|
1283
|
+
return this.readFromNode(n);
|
|
1284
1284
|
return null;
|
|
1285
1285
|
}
|
|
1286
1286
|
/**
|
|
@@ -1290,49 +1290,49 @@ class Lr {
|
|
|
1290
1290
|
readFromNode(t) {
|
|
1291
1291
|
return this.version = t.getAttribute("version"), V({
|
|
1292
1292
|
version: this.version
|
|
1293
|
-
},
|
|
1293
|
+
}, xr, t, []) || null;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
async function
|
|
1297
|
-
let t = new URL(
|
|
1298
|
-
|
|
1296
|
+
async function Lr(e) {
|
|
1297
|
+
let t = new URL(e), n = t.searchParams;
|
|
1298
|
+
n.set("SERVICE", "WMS"), n.set("REQUEST", "GetCapabilities");
|
|
1299
1299
|
let i = t.toString();
|
|
1300
1300
|
const o = await fetch(i);
|
|
1301
1301
|
if (o.ok) {
|
|
1302
1302
|
const r = await o.text();
|
|
1303
|
-
return new
|
|
1303
|
+
return new Vr(r).toJSON();
|
|
1304
1304
|
} else
|
|
1305
1305
|
throw new Error(`Error: ${o.status}`);
|
|
1306
1306
|
}
|
|
1307
|
-
function Fn(
|
|
1308
|
-
const t = /\b(?:wms|ows)\b/i,
|
|
1309
|
-
return t.test(
|
|
1307
|
+
function Fn(e) {
|
|
1308
|
+
const t = /\b(?:wms|ows)\b/i, n = /{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;
|
|
1309
|
+
return t.test(e) ? "TileWMS" : n.test(e) ? "XYZ" : !1;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
const
|
|
1313
|
-
return !!(
|
|
1311
|
+
function kr(e) {
|
|
1312
|
+
const n = /^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(e), i = Fn(e);
|
|
1313
|
+
return !!(e && n && i);
|
|
1314
1314
|
}
|
|
1315
|
-
function ki(
|
|
1316
|
-
return
|
|
1315
|
+
function ki(e) {
|
|
1316
|
+
return e.replace(
|
|
1317
1317
|
/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,
|
|
1318
1318
|
'"$2": '
|
|
1319
1319
|
).replace(/,\s*}/g, "}").replace(/,\s*]/g, "]").replace(/\s*(\{|}|\[|\]|,)\s*/g, "$1").replaceAll('": //', "://");
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Ur(e) {
|
|
1322
1322
|
try {
|
|
1323
|
-
return JSON.parse(ki(
|
|
1323
|
+
return JSON.parse(ki(e)), !!e;
|
|
1324
1324
|
} catch {
|
|
1325
1325
|
return !1;
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
const
|
|
1328
|
+
function Fr(e, t) {
|
|
1329
|
+
const n = new URL(e).searchParams;
|
|
1330
1330
|
Object.entries(t).forEach(([s, a]) => {
|
|
1331
1331
|
typeof a == "object" && !Array.isArray(a) && a !== null ? Object.keys(a).forEach((l) => {
|
|
1332
|
-
|
|
1333
|
-
}) :
|
|
1332
|
+
n.set(l, a[l]);
|
|
1333
|
+
}) : n.set(s, a);
|
|
1334
1334
|
});
|
|
1335
|
-
const i =
|
|
1335
|
+
const i = e.split("?")[0], o = n.toString();
|
|
1336
1336
|
return `${i}?${o}`;
|
|
1337
1337
|
}
|
|
1338
1338
|
/**!
|
|
@@ -1341,172 +1341,172 @@ function jr(n, t) {
|
|
|
1341
1341
|
* @author owenm <owen23355@gmail.com>
|
|
1342
1342
|
* @license MIT
|
|
1343
1343
|
*/
|
|
1344
|
-
function ai(
|
|
1345
|
-
var
|
|
1344
|
+
function ai(e, t) {
|
|
1345
|
+
var n = Object.keys(e);
|
|
1346
1346
|
if (Object.getOwnPropertySymbols) {
|
|
1347
|
-
var i = Object.getOwnPropertySymbols(
|
|
1347
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
1348
1348
|
t && (i = i.filter(function(o) {
|
|
1349
|
-
return Object.getOwnPropertyDescriptor(
|
|
1350
|
-
})),
|
|
1349
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
1350
|
+
})), n.push.apply(n, i);
|
|
1351
1351
|
}
|
|
1352
|
-
return
|
|
1352
|
+
return n;
|
|
1353
1353
|
}
|
|
1354
|
-
function dt(
|
|
1354
|
+
function dt(e) {
|
|
1355
1355
|
for (var t = 1; t < arguments.length; t++) {
|
|
1356
|
-
var
|
|
1357
|
-
t % 2 ? ai(Object(
|
|
1358
|
-
|
|
1359
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
1360
|
-
Object.defineProperty(
|
|
1356
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
1357
|
+
t % 2 ? ai(Object(n), !0).forEach(function(i) {
|
|
1358
|
+
jr(e, i, n[i]);
|
|
1359
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ai(Object(n)).forEach(function(i) {
|
|
1360
|
+
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i));
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
|
-
return
|
|
1363
|
+
return e;
|
|
1364
1364
|
}
|
|
1365
|
-
function Te(
|
|
1365
|
+
function Te(e) {
|
|
1366
1366
|
"@babel/helpers - typeof";
|
|
1367
1367
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Te = function(t) {
|
|
1368
1368
|
return typeof t;
|
|
1369
1369
|
} : Te = function(t) {
|
|
1370
1370
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1371
|
-
}, Te(
|
|
1371
|
+
}, Te(e);
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1374
|
-
return t in
|
|
1375
|
-
value:
|
|
1373
|
+
function jr(e, t, n) {
|
|
1374
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
1375
|
+
value: n,
|
|
1376
1376
|
enumerable: !0,
|
|
1377
1377
|
configurable: !0,
|
|
1378
1378
|
writable: !0
|
|
1379
|
-
}) :
|
|
1379
|
+
}) : e[t] = n, e;
|
|
1380
1380
|
}
|
|
1381
1381
|
function yt() {
|
|
1382
|
-
return yt = Object.assign || function(
|
|
1382
|
+
return yt = Object.assign || function(e) {
|
|
1383
1383
|
for (var t = 1; t < arguments.length; t++) {
|
|
1384
|
-
var
|
|
1385
|
-
for (var i in
|
|
1386
|
-
Object.prototype.hasOwnProperty.call(
|
|
1384
|
+
var n = arguments[t];
|
|
1385
|
+
for (var i in n)
|
|
1386
|
+
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
1387
1387
|
}
|
|
1388
|
-
return
|
|
1388
|
+
return e;
|
|
1389
1389
|
}, yt.apply(this, arguments);
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
if (
|
|
1393
|
-
var
|
|
1391
|
+
function zr(e, t) {
|
|
1392
|
+
if (e == null) return {};
|
|
1393
|
+
var n = {}, i = Object.keys(e), o, r;
|
|
1394
1394
|
for (r = 0; r < i.length; r++)
|
|
1395
|
-
o = i[r], !(t.indexOf(o) >= 0) && (
|
|
1396
|
-
return
|
|
1395
|
+
o = i[r], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
1396
|
+
return n;
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1399
|
-
if (
|
|
1400
|
-
var
|
|
1398
|
+
function Zr(e, t) {
|
|
1399
|
+
if (e == null) return {};
|
|
1400
|
+
var n = zr(e, t), i, o;
|
|
1401
1401
|
if (Object.getOwnPropertySymbols) {
|
|
1402
|
-
var r = Object.getOwnPropertySymbols(
|
|
1402
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
1403
1403
|
for (o = 0; o < r.length; o++)
|
|
1404
|
-
i = r[o], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(
|
|
1404
|
+
i = r[o], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(e, i) && (n[i] = e[i]);
|
|
1405
1405
|
}
|
|
1406
|
-
return
|
|
1406
|
+
return n;
|
|
1407
1407
|
}
|
|
1408
|
-
var
|
|
1409
|
-
function gt(
|
|
1408
|
+
var Xr = "1.15.2";
|
|
1409
|
+
function gt(e) {
|
|
1410
1410
|
if (typeof window < "u" && window.navigator)
|
|
1411
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(
|
|
1411
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1412
1412
|
}
|
|
1413
|
-
var bt = gt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ve = gt(/Edge/i), li = gt(/firefox/i),
|
|
1413
|
+
var bt = gt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ve = gt(/Edge/i), li = gt(/firefox/i), re = gt(/safari/i) && !gt(/chrome/i) && !gt(/android/i), Ui = gt(/iP(ad|od|hone)/i), Fi = gt(/chrome/i) && gt(/android/i), ji = {
|
|
1414
1414
|
capture: !1,
|
|
1415
1415
|
passive: !1
|
|
1416
1416
|
};
|
|
1417
|
-
function _(
|
|
1418
|
-
|
|
1417
|
+
function _(e, t, n) {
|
|
1418
|
+
e.addEventListener(t, n, !bt && ji);
|
|
1419
1419
|
}
|
|
1420
|
-
function S(
|
|
1421
|
-
|
|
1420
|
+
function S(e, t, n) {
|
|
1421
|
+
e.removeEventListener(t, n, !bt && ji);
|
|
1422
1422
|
}
|
|
1423
|
-
function Ve(
|
|
1423
|
+
function Ve(e, t) {
|
|
1424
1424
|
if (t) {
|
|
1425
|
-
if (t[0] === ">" && (t = t.substring(1)),
|
|
1425
|
+
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
1426
1426
|
try {
|
|
1427
|
-
if (
|
|
1428
|
-
return
|
|
1429
|
-
if (
|
|
1430
|
-
return
|
|
1431
|
-
if (
|
|
1432
|
-
return
|
|
1427
|
+
if (e.matches)
|
|
1428
|
+
return e.matches(t);
|
|
1429
|
+
if (e.msMatchesSelector)
|
|
1430
|
+
return e.msMatchesSelector(t);
|
|
1431
|
+
if (e.webkitMatchesSelector)
|
|
1432
|
+
return e.webkitMatchesSelector(t);
|
|
1433
1433
|
} catch {
|
|
1434
1434
|
return !1;
|
|
1435
1435
|
}
|
|
1436
1436
|
return !1;
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1440
|
-
return
|
|
1439
|
+
function Yr(e) {
|
|
1440
|
+
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1441
1441
|
}
|
|
1442
|
-
function ut(
|
|
1443
|
-
if (
|
|
1444
|
-
|
|
1442
|
+
function ut(e, t, n, i) {
|
|
1443
|
+
if (e) {
|
|
1444
|
+
n = n || document;
|
|
1445
1445
|
do {
|
|
1446
|
-
if (t != null && (t[0] === ">" ?
|
|
1447
|
-
return
|
|
1448
|
-
if (
|
|
1449
|
-
} while (
|
|
1446
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Ve(e, t) : Ve(e, t)) || i && e === n)
|
|
1447
|
+
return e;
|
|
1448
|
+
if (e === n) break;
|
|
1449
|
+
} while (e = Yr(e));
|
|
1450
1450
|
}
|
|
1451
1451
|
return null;
|
|
1452
1452
|
}
|
|
1453
1453
|
var ui = /\s+/g;
|
|
1454
|
-
function Q(
|
|
1455
|
-
if (
|
|
1456
|
-
if (
|
|
1457
|
-
|
|
1454
|
+
function Q(e, t, n) {
|
|
1455
|
+
if (e && t)
|
|
1456
|
+
if (e.classList)
|
|
1457
|
+
e.classList[n ? "add" : "remove"](t);
|
|
1458
1458
|
else {
|
|
1459
|
-
var i = (" " +
|
|
1460
|
-
|
|
1459
|
+
var i = (" " + e.className + " ").replace(ui, " ").replace(" " + t + " ", " ");
|
|
1460
|
+
e.className = (i + (n ? " " + t : "")).replace(ui, " ");
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
function b(
|
|
1464
|
-
var i =
|
|
1463
|
+
function b(e, t, n) {
|
|
1464
|
+
var i = e && e.style;
|
|
1465
1465
|
if (i) {
|
|
1466
|
-
if (
|
|
1467
|
-
return document.defaultView && document.defaultView.getComputedStyle ?
|
|
1468
|
-
!(t in i) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), i[t] =
|
|
1466
|
+
if (n === void 0)
|
|
1467
|
+
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
1468
|
+
!(t in i) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), i[t] = n + (typeof n == "string" ? "" : "px");
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
|
-
function jt(
|
|
1472
|
-
var
|
|
1473
|
-
if (typeof
|
|
1474
|
-
|
|
1471
|
+
function jt(e, t) {
|
|
1472
|
+
var n = "";
|
|
1473
|
+
if (typeof e == "string")
|
|
1474
|
+
n = e;
|
|
1475
1475
|
else
|
|
1476
1476
|
do {
|
|
1477
|
-
var i = b(
|
|
1478
|
-
i && i !== "none" && (
|
|
1479
|
-
} while (!t && (
|
|
1477
|
+
var i = b(e, "transform");
|
|
1478
|
+
i && i !== "none" && (n = i + " " + n);
|
|
1479
|
+
} while (!t && (e = e.parentNode));
|
|
1480
1480
|
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1481
|
-
return o && new o(
|
|
1481
|
+
return o && new o(n);
|
|
1482
1482
|
}
|
|
1483
|
-
function zi(
|
|
1484
|
-
if (
|
|
1485
|
-
var i =
|
|
1486
|
-
if (
|
|
1483
|
+
function zi(e, t, n) {
|
|
1484
|
+
if (e) {
|
|
1485
|
+
var i = e.getElementsByTagName(t), o = 0, r = i.length;
|
|
1486
|
+
if (n)
|
|
1487
1487
|
for (; o < r; o++)
|
|
1488
|
-
|
|
1488
|
+
n(i[o], o);
|
|
1489
1489
|
return i;
|
|
1490
1490
|
}
|
|
1491
1491
|
return [];
|
|
1492
1492
|
}
|
|
1493
1493
|
function ct() {
|
|
1494
|
-
var
|
|
1495
|
-
return
|
|
1494
|
+
var e = document.scrollingElement;
|
|
1495
|
+
return e || document.documentElement;
|
|
1496
1496
|
}
|
|
1497
|
-
function I(
|
|
1498
|
-
if (!(!
|
|
1497
|
+
function I(e, t, n, i, o) {
|
|
1498
|
+
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
1499
1499
|
var r, s, a, l, u, d, c;
|
|
1500
|
-
if (
|
|
1500
|
+
if (e !== window && e.parentNode && e !== ct() ? (r = e.getBoundingClientRect(), s = r.top, a = r.left, l = r.bottom, u = r.right, d = r.height, c = r.width) : (s = 0, a = 0, l = window.innerHeight, u = window.innerWidth, d = window.innerHeight, c = window.innerWidth), (t || n) && e !== window && (o = o || e.parentNode, !bt))
|
|
1501
1501
|
do
|
|
1502
|
-
if (o && o.getBoundingClientRect && (b(o, "transform") !== "none" ||
|
|
1502
|
+
if (o && o.getBoundingClientRect && (b(o, "transform") !== "none" || n && b(o, "position") !== "static")) {
|
|
1503
1503
|
var p = o.getBoundingClientRect();
|
|
1504
1504
|
s -= p.top + parseInt(b(o, "border-top-width")), a -= p.left + parseInt(b(o, "border-left-width")), l = s + r.height, u = a + r.width;
|
|
1505
1505
|
break;
|
|
1506
1506
|
}
|
|
1507
1507
|
while (o = o.parentNode);
|
|
1508
|
-
if (i &&
|
|
1509
|
-
var f = jt(o ||
|
|
1508
|
+
if (i && e !== window) {
|
|
1509
|
+
var f = jt(o || e), g = f && f.a, y = f && f.d;
|
|
1510
1510
|
f && (s /= y, a /= g, c /= g, d /= y, l = s + d, u = a + c);
|
|
1511
1511
|
}
|
|
1512
1512
|
return {
|
|
@@ -1519,18 +1519,18 @@ function I(n, t, e, i, o) {
|
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
|
-
function ci(
|
|
1523
|
-
for (var i = $t(
|
|
1524
|
-
var r = I(i)[
|
|
1525
|
-
if (
|
|
1522
|
+
function ci(e, t, n) {
|
|
1523
|
+
for (var i = $t(e, !0), o = I(e)[t]; i; ) {
|
|
1524
|
+
var r = I(i)[n], s = void 0;
|
|
1525
|
+
if (n === "top" || n === "left" ? s = o >= r : s = o <= r, !s) return i;
|
|
1526
1526
|
if (i === ct()) break;
|
|
1527
1527
|
i = $t(i, !1);
|
|
1528
1528
|
}
|
|
1529
1529
|
return !1;
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1532
|
-
for (var o = 0, r = 0, s =
|
|
1533
|
-
if (s[r].style.display !== "none" && s[r] !== v.ghost && (i || s[r] !== v.dragged) && ut(s[r],
|
|
1531
|
+
function Zt(e, t, n, i) {
|
|
1532
|
+
for (var o = 0, r = 0, s = e.children; r < s.length; ) {
|
|
1533
|
+
if (s[r].style.display !== "none" && s[r] !== v.ghost && (i || s[r] !== v.dragged) && ut(s[r], n.draggable, e, !1)) {
|
|
1534
1534
|
if (o === t)
|
|
1535
1535
|
return s[r];
|
|
1536
1536
|
o++;
|
|
@@ -1539,105 +1539,105 @@ function Xt(n, t, e, i) {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
return null;
|
|
1541
1541
|
}
|
|
1542
|
-
function jn(
|
|
1543
|
-
for (var
|
|
1544
|
-
|
|
1545
|
-
return
|
|
1542
|
+
function jn(e, t) {
|
|
1543
|
+
for (var n = e.lastElementChild; n && (n === v.ghost || b(n, "display") === "none" || t && !Ve(n, t)); )
|
|
1544
|
+
n = n.previousElementSibling;
|
|
1545
|
+
return n || null;
|
|
1546
1546
|
}
|
|
1547
|
-
function it(
|
|
1548
|
-
var
|
|
1549
|
-
if (!
|
|
1547
|
+
function it(e, t) {
|
|
1548
|
+
var n = 0;
|
|
1549
|
+
if (!e || !e.parentNode)
|
|
1550
1550
|
return -1;
|
|
1551
|
-
for (;
|
|
1552
|
-
|
|
1553
|
-
return
|
|
1551
|
+
for (; e = e.previousElementSibling; )
|
|
1552
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== v.clone && (!t || Ve(e, t)) && n++;
|
|
1553
|
+
return n;
|
|
1554
1554
|
}
|
|
1555
|
-
function di(
|
|
1556
|
-
var t = 0,
|
|
1557
|
-
if (
|
|
1555
|
+
function di(e) {
|
|
1556
|
+
var t = 0, n = 0, i = ct();
|
|
1557
|
+
if (e)
|
|
1558
1558
|
do {
|
|
1559
|
-
var o = jt(
|
|
1560
|
-
t +=
|
|
1561
|
-
} while (
|
|
1562
|
-
return [t,
|
|
1563
|
-
}
|
|
1564
|
-
function
|
|
1565
|
-
for (var
|
|
1566
|
-
if (
|
|
1559
|
+
var o = jt(e), r = o.a, s = o.d;
|
|
1560
|
+
t += e.scrollLeft * r, n += e.scrollTop * s;
|
|
1561
|
+
} while (e !== i && (e = e.parentNode));
|
|
1562
|
+
return [t, n];
|
|
1563
|
+
}
|
|
1564
|
+
function qr(e, t) {
|
|
1565
|
+
for (var n in e)
|
|
1566
|
+
if (e.hasOwnProperty(n)) {
|
|
1567
1567
|
for (var i in t)
|
|
1568
|
-
if (t.hasOwnProperty(i) && t[i] === n
|
|
1568
|
+
if (t.hasOwnProperty(i) && t[i] === e[n][i]) return Number(n);
|
|
1569
1569
|
}
|
|
1570
1570
|
return -1;
|
|
1571
1571
|
}
|
|
1572
|
-
function $t(
|
|
1573
|
-
if (!
|
|
1574
|
-
var
|
|
1572
|
+
function $t(e, t) {
|
|
1573
|
+
if (!e || !e.getBoundingClientRect) return ct();
|
|
1574
|
+
var n = e, i = !1;
|
|
1575
1575
|
do
|
|
1576
|
-
if (
|
|
1577
|
-
var o = b(
|
|
1578
|
-
if (
|
|
1579
|
-
if (!
|
|
1580
|
-
if (i || t) return
|
|
1576
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
1577
|
+
var o = b(n);
|
|
1578
|
+
if (n.clientWidth < n.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
|
|
1579
|
+
if (!n.getBoundingClientRect || n === document.body) return ct();
|
|
1580
|
+
if (i || t) return n;
|
|
1581
1581
|
i = !0;
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
while (
|
|
1584
|
+
while (n = n.parentNode);
|
|
1585
1585
|
return ct();
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1588
|
-
if (
|
|
1589
|
-
for (var
|
|
1590
|
-
t.hasOwnProperty(
|
|
1591
|
-
return
|
|
1587
|
+
function Wr(e, t) {
|
|
1588
|
+
if (e && t)
|
|
1589
|
+
for (var n in t)
|
|
1590
|
+
t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1591
|
+
return e;
|
|
1592
1592
|
}
|
|
1593
|
-
function bn(
|
|
1594
|
-
return Math.round(
|
|
1593
|
+
function bn(e, t) {
|
|
1594
|
+
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
1595
1595
|
}
|
|
1596
|
-
var
|
|
1597
|
-
function Zi(
|
|
1596
|
+
var se;
|
|
1597
|
+
function Zi(e, t) {
|
|
1598
1598
|
return function() {
|
|
1599
|
-
if (!
|
|
1600
|
-
var
|
|
1601
|
-
|
|
1602
|
-
|
|
1599
|
+
if (!se) {
|
|
1600
|
+
var n = arguments, i = this;
|
|
1601
|
+
n.length === 1 ? e.call(i, n[0]) : e.apply(i, n), se = setTimeout(function() {
|
|
1602
|
+
se = void 0;
|
|
1603
1603
|
}, t);
|
|
1604
1604
|
}
|
|
1605
1605
|
};
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1608
|
-
clearTimeout(
|
|
1607
|
+
function Gr() {
|
|
1608
|
+
clearTimeout(se), se = void 0;
|
|
1609
1609
|
}
|
|
1610
|
-
function Xi(
|
|
1611
|
-
|
|
1610
|
+
function Xi(e, t, n) {
|
|
1611
|
+
e.scrollLeft += t, e.scrollTop += n;
|
|
1612
1612
|
}
|
|
1613
|
-
function Yi(
|
|
1614
|
-
var t = window.Polymer,
|
|
1615
|
-
return t && t.dom ? t.dom(
|
|
1613
|
+
function Yi(e) {
|
|
1614
|
+
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
1615
|
+
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
1616
1616
|
}
|
|
1617
|
-
function qi(
|
|
1617
|
+
function qi(e, t, n) {
|
|
1618
1618
|
var i = {};
|
|
1619
|
-
return Array.from(
|
|
1619
|
+
return Array.from(e.children).forEach(function(o) {
|
|
1620
1620
|
var r, s, a, l;
|
|
1621
|
-
if (!(!ut(o, t.draggable,
|
|
1621
|
+
if (!(!ut(o, t.draggable, e, !1) || o.animated || o === n)) {
|
|
1622
1622
|
var u = I(o);
|
|
1623
1623
|
i.left = Math.min((r = i.left) !== null && r !== void 0 ? r : 1 / 0, u.left), i.top = Math.min((s = i.top) !== null && s !== void 0 ? s : 1 / 0, u.top), i.right = Math.max((a = i.right) !== null && a !== void 0 ? a : -1 / 0, u.right), i.bottom = Math.max((l = i.bottom) !== null && l !== void 0 ? l : -1 / 0, u.bottom);
|
|
1624
1624
|
}
|
|
1625
1625
|
}), i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
|
|
1626
1626
|
}
|
|
1627
1627
|
var et = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
1628
|
-
function
|
|
1629
|
-
var
|
|
1628
|
+
function Jr() {
|
|
1629
|
+
var e = [], t;
|
|
1630
1630
|
return {
|
|
1631
1631
|
captureAnimationState: function() {
|
|
1632
|
-
if (
|
|
1632
|
+
if (e = [], !!this.options.animation) {
|
|
1633
1633
|
var i = [].slice.call(this.el.children);
|
|
1634
1634
|
i.forEach(function(o) {
|
|
1635
1635
|
if (!(b(o, "display") === "none" || o === v.ghost)) {
|
|
1636
|
-
|
|
1636
|
+
e.push({
|
|
1637
1637
|
target: o,
|
|
1638
1638
|
rect: I(o)
|
|
1639
1639
|
});
|
|
1640
|
-
var r = dt({},
|
|
1640
|
+
var r = dt({}, e[e.length - 1].rect);
|
|
1641
1641
|
if (o.thisAnimationDuration) {
|
|
1642
1642
|
var s = jt(o, !0);
|
|
1643
1643
|
s && (r.top -= s.f, r.left -= s.e);
|
|
@@ -1648,10 +1648,10 @@ function Kr() {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
},
|
|
1650
1650
|
addAnimationState: function(i) {
|
|
1651
|
-
|
|
1651
|
+
e.push(i);
|
|
1652
1652
|
},
|
|
1653
1653
|
removeAnimationState: function(i) {
|
|
1654
|
-
|
|
1654
|
+
e.splice(qr(e, {
|
|
1655
1655
|
target: i
|
|
1656
1656
|
}), 1);
|
|
1657
1657
|
},
|
|
@@ -1662,63 +1662,63 @@ function Kr() {
|
|
|
1662
1662
|
return;
|
|
1663
1663
|
}
|
|
1664
1664
|
var r = !1, s = 0;
|
|
1665
|
-
|
|
1665
|
+
e.forEach(function(a) {
|
|
1666
1666
|
var l = 0, u = a.target, d = u.fromRect, c = I(u), p = u.prevFromRect, f = u.prevToRect, g = a.rect, y = jt(u, !0);
|
|
1667
1667
|
y && (c.top -= y.f, c.left -= y.e), u.toRect = c, u.thisAnimationDuration && bn(p, c) && !bn(d, c) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1668
|
-
(g.top - c.top) / (g.left - c.left) === (d.top - c.top) / (d.left - c.left) && (l =
|
|
1668
|
+
(g.top - c.top) / (g.left - c.left) === (d.top - c.top) / (d.left - c.left) && (l = Qr(g, p, f, o.options)), bn(c, d) || (u.prevFromRect = d, u.prevToRect = c, l || (l = o.options.animation), o.animate(u, g, c, l)), l && (r = !0, s = Math.max(s, l), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
1669
1669
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
1670
1670
|
}, l), u.thisAnimationDuration = l);
|
|
1671
1671
|
}), clearTimeout(t), r ? t = setTimeout(function() {
|
|
1672
1672
|
typeof i == "function" && i();
|
|
1673
|
-
}, s) : typeof i == "function" && i(),
|
|
1673
|
+
}, s) : typeof i == "function" && i(), e = [];
|
|
1674
1674
|
},
|
|
1675
1675
|
animate: function(i, o, r, s) {
|
|
1676
1676
|
if (s) {
|
|
1677
1677
|
b(i, "transition", ""), b(i, "transform", "");
|
|
1678
1678
|
var a = jt(this.el), l = a && a.a, u = a && a.d, d = (o.left - r.left) / (l || 1), c = (o.top - r.top) / (u || 1);
|
|
1679
|
-
i.animatingX = !!d, i.animatingY = !!c, b(i, "transform", "translate3d(" + d + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
1679
|
+
i.animatingX = !!d, i.animatingY = !!c, b(i, "transform", "translate3d(" + d + "px," + c + "px,0)"), this.forRepaintDummy = Kr(i), b(i, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), b(i, "transform", "translate3d(0,0,0)"), typeof i.animated == "number" && clearTimeout(i.animated), i.animated = setTimeout(function() {
|
|
1680
1680
|
b(i, "transition", ""), b(i, "transform", ""), i.animated = !1, i.animatingX = !1, i.animatingY = !1;
|
|
1681
1681
|
}, s);
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
1684
|
};
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1687
|
-
return
|
|
1686
|
+
function Kr(e) {
|
|
1687
|
+
return e.offsetWidth;
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1690
|
-
return Math.sqrt(Math.pow(t.top -
|
|
1689
|
+
function Qr(e, t, n, i) {
|
|
1690
|
+
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) * i.animation;
|
|
1691
1691
|
}
|
|
1692
1692
|
var Bt = [], vn = {
|
|
1693
1693
|
initializeByDefault: !0
|
|
1694
1694
|
}, we = {
|
|
1695
1695
|
mount: function(t) {
|
|
1696
|
-
for (var
|
|
1697
|
-
vn.hasOwnProperty(
|
|
1696
|
+
for (var n in vn)
|
|
1697
|
+
vn.hasOwnProperty(n) && !(n in t) && (t[n] = vn[n]);
|
|
1698
1698
|
Bt.forEach(function(i) {
|
|
1699
1699
|
if (i.pluginName === t.pluginName)
|
|
1700
1700
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
1701
1701
|
}), Bt.push(t);
|
|
1702
1702
|
},
|
|
1703
|
-
pluginEvent: function(t,
|
|
1703
|
+
pluginEvent: function(t, n, i) {
|
|
1704
1704
|
var o = this;
|
|
1705
1705
|
this.eventCanceled = !1, i.cancel = function() {
|
|
1706
1706
|
o.eventCanceled = !0;
|
|
1707
1707
|
};
|
|
1708
1708
|
var r = t + "Global";
|
|
1709
1709
|
Bt.forEach(function(s) {
|
|
1710
|
-
|
|
1711
|
-
sortable:
|
|
1712
|
-
}, i)),
|
|
1713
|
-
sortable:
|
|
1710
|
+
n[s.pluginName] && (n[s.pluginName][r] && n[s.pluginName][r](dt({
|
|
1711
|
+
sortable: n
|
|
1712
|
+
}, i)), n.options[s.pluginName] && n[s.pluginName][t] && n[s.pluginName][t](dt({
|
|
1713
|
+
sortable: n
|
|
1714
1714
|
}, i)));
|
|
1715
1715
|
});
|
|
1716
1716
|
},
|
|
1717
|
-
initializePlugins: function(t,
|
|
1717
|
+
initializePlugins: function(t, n, i, o) {
|
|
1718
1718
|
Bt.forEach(function(a) {
|
|
1719
1719
|
var l = a.pluginName;
|
|
1720
1720
|
if (!(!t.options[l] && !a.initializeByDefault)) {
|
|
1721
|
-
var u = new a(t,
|
|
1721
|
+
var u = new a(t, n, t.options);
|
|
1722
1722
|
u.sortable = t, u.options = t.options, t[l] = u, yt(i, u.defaults);
|
|
1723
1723
|
}
|
|
1724
1724
|
});
|
|
@@ -1728,50 +1728,50 @@ var Bt = [], vn = {
|
|
|
1728
1728
|
typeof s < "u" && (t.options[r] = s);
|
|
1729
1729
|
}
|
|
1730
1730
|
},
|
|
1731
|
-
getEventProperties: function(t,
|
|
1731
|
+
getEventProperties: function(t, n) {
|
|
1732
1732
|
var i = {};
|
|
1733
1733
|
return Bt.forEach(function(o) {
|
|
1734
|
-
typeof o.eventProperties == "function" && yt(i, o.eventProperties.call(
|
|
1734
|
+
typeof o.eventProperties == "function" && yt(i, o.eventProperties.call(n[o.pluginName], t));
|
|
1735
1735
|
}), i;
|
|
1736
1736
|
},
|
|
1737
|
-
modifyOption: function(t,
|
|
1737
|
+
modifyOption: function(t, n, i) {
|
|
1738
1738
|
var o;
|
|
1739
1739
|
return Bt.forEach(function(r) {
|
|
1740
|
-
t[r.pluginName] && r.optionListeners && typeof r.optionListeners[
|
|
1740
|
+
t[r.pluginName] && r.optionListeners && typeof r.optionListeners[n] == "function" && (o = r.optionListeners[n].call(t[r.pluginName], i));
|
|
1741
1741
|
}), o;
|
|
1742
1742
|
}
|
|
1743
1743
|
};
|
|
1744
|
-
function
|
|
1745
|
-
var t =
|
|
1746
|
-
if (t = t ||
|
|
1744
|
+
function ts(e) {
|
|
1745
|
+
var t = e.sortable, n = e.rootEl, i = e.name, o = e.targetEl, r = e.cloneEl, s = e.toEl, a = e.fromEl, l = e.oldIndex, u = e.newIndex, d = e.oldDraggableIndex, c = e.newDraggableIndex, p = e.originalEvent, f = e.putSortable, g = e.extraEventProperties;
|
|
1746
|
+
if (t = t || n && n[et], !!t) {
|
|
1747
1747
|
var y, P = t.options, L = "on" + i.charAt(0).toUpperCase() + i.substr(1);
|
|
1748
1748
|
window.CustomEvent && !bt && !ve ? y = new CustomEvent(i, {
|
|
1749
1749
|
bubbles: !0,
|
|
1750
1750
|
cancelable: !0
|
|
1751
|
-
}) : (y = document.createEvent("Event"), y.initEvent(i, !0, !0)), y.to = s ||
|
|
1751
|
+
}) : (y = document.createEvent("Event"), y.initEvent(i, !0, !0)), y.to = s || n, y.from = a || n, y.item = o || n, y.clone = r, y.oldIndex = l, y.newIndex = u, y.oldDraggableIndex = d, y.newDraggableIndex = c, y.originalEvent = p, y.pullMode = f ? f.lastPutMode : void 0;
|
|
1752
1752
|
var B = dt(dt({}, g), we.getEventProperties(i, t));
|
|
1753
1753
|
for (var K in B)
|
|
1754
1754
|
y[K] = B[K];
|
|
1755
|
-
|
|
1755
|
+
n && n.dispatchEvent(y), P[L] && P[L].call(t, y);
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
|
-
var
|
|
1759
|
-
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r =
|
|
1760
|
-
we.pluginEvent.bind(v)(t,
|
|
1758
|
+
var es = ["evt"], G = function(t, n) {
|
|
1759
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r = Zr(i, es);
|
|
1760
|
+
we.pluginEvent.bind(v)(t, n, dt({
|
|
1761
1761
|
dragEl: h,
|
|
1762
1762
|
parentEl: N,
|
|
1763
1763
|
ghostEl: w,
|
|
1764
|
-
rootEl:
|
|
1764
|
+
rootEl: O,
|
|
1765
1765
|
nextEl: Dt,
|
|
1766
1766
|
lastDownEl: Pe,
|
|
1767
1767
|
cloneEl: D,
|
|
1768
1768
|
cloneHidden: St,
|
|
1769
|
-
dragStarted:
|
|
1769
|
+
dragStarted: te,
|
|
1770
1770
|
putSortable: U,
|
|
1771
1771
|
activeSortable: v.active,
|
|
1772
1772
|
originalEvent: o,
|
|
1773
1773
|
oldIndex: Ft,
|
|
1774
|
-
oldDraggableIndex:
|
|
1774
|
+
oldDraggableIndex: ae,
|
|
1775
1775
|
newIndex: tt,
|
|
1776
1776
|
newDraggableIndex: xt,
|
|
1777
1777
|
hideGhostForTarget: Ki,
|
|
@@ -1784,34 +1784,34 @@ var ns = ["evt"], G = function(t, e) {
|
|
|
1784
1784
|
},
|
|
1785
1785
|
dispatchSortableEvent: function(a) {
|
|
1786
1786
|
W({
|
|
1787
|
-
sortable:
|
|
1787
|
+
sortable: n,
|
|
1788
1788
|
name: a,
|
|
1789
1789
|
originalEvent: o
|
|
1790
1790
|
});
|
|
1791
1791
|
}
|
|
1792
1792
|
}, r));
|
|
1793
1793
|
};
|
|
1794
|
-
function W(
|
|
1795
|
-
|
|
1794
|
+
function W(e) {
|
|
1795
|
+
ts(dt({
|
|
1796
1796
|
putSortable: U,
|
|
1797
1797
|
cloneEl: D,
|
|
1798
1798
|
targetEl: h,
|
|
1799
|
-
rootEl:
|
|
1799
|
+
rootEl: O,
|
|
1800
1800
|
oldIndex: Ft,
|
|
1801
|
-
oldDraggableIndex:
|
|
1801
|
+
oldDraggableIndex: ae,
|
|
1802
1802
|
newIndex: tt,
|
|
1803
1803
|
newDraggableIndex: xt
|
|
1804
|
-
},
|
|
1804
|
+
}, e));
|
|
1805
1805
|
}
|
|
1806
|
-
var h, N, w,
|
|
1806
|
+
var h, N, w, O, Dt, Pe, D, St, Ft, tt, ae, xt, xe, U, kt = !1, Le = !1, ke = [], Ot, lt, wn, En, hi, pi, te, Vt, le, ue = !1, Se = !1, Oe, Y, xn = [], Pn = !1, Ue = [], un = typeof document < "u", $e = Ui, fi = ve || bt ? "cssFloat" : "float", ns = un && !Fi && !Ui && "draggable" in document.createElement("div"), Wi = function() {
|
|
1807
1807
|
if (un) {
|
|
1808
1808
|
if (bt)
|
|
1809
1809
|
return !1;
|
|
1810
|
-
var
|
|
1811
|
-
return
|
|
1810
|
+
var e = document.createElement("x");
|
|
1811
|
+
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
1812
1812
|
}
|
|
1813
|
-
}(), Gi = function(t,
|
|
1814
|
-
var i = b(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r =
|
|
1813
|
+
}(), Gi = function(t, n) {
|
|
1814
|
+
var i = b(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Zt(t, 0, n), s = Zt(t, 1, n), a = r && b(r), l = s && b(s), u = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + I(r).width, d = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + I(s).width;
|
|
1815
1815
|
if (i.display === "flex")
|
|
1816
1816
|
return i.flexDirection === "column" || i.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1817
1817
|
if (i.display === "grid")
|
|
@@ -1821,21 +1821,21 @@ var h, N, w, R, Dt, Pe, D, St, Ft, tt, le, xt, xe, U, kt = !1, Le = !1, ke = [],
|
|
|
1821
1821
|
return s && (l.clear === "both" || l.clear === c) ? "vertical" : "horizontal";
|
|
1822
1822
|
}
|
|
1823
1823
|
return r && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || u >= o && i[fi] === "none" || s && i[fi] === "none" && u + d > o) ? "vertical" : "horizontal";
|
|
1824
|
-
},
|
|
1825
|
-
var o = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, a = i ?
|
|
1824
|
+
}, is = function(t, n, i) {
|
|
1825
|
+
var o = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, a = i ? n.left : n.top, l = i ? n.right : n.bottom, u = i ? n.width : n.height;
|
|
1826
1826
|
return o === a || r === l || o + s / 2 === a + u / 2;
|
|
1827
|
-
},
|
|
1827
|
+
}, os = function(t, n) {
|
|
1828
1828
|
var i;
|
|
1829
1829
|
return ke.some(function(o) {
|
|
1830
1830
|
var r = o[et].options.emptyInsertThreshold;
|
|
1831
1831
|
if (!(!r || jn(o))) {
|
|
1832
|
-
var s = I(o), a = t >= s.left - r && t <= s.right + r, l =
|
|
1832
|
+
var s = I(o), a = t >= s.left - r && t <= s.right + r, l = n >= s.top - r && n <= s.bottom + r;
|
|
1833
1833
|
if (a && l)
|
|
1834
1834
|
return i = o;
|
|
1835
1835
|
}
|
|
1836
1836
|
}), i;
|
|
1837
1837
|
}, Ji = function(t) {
|
|
1838
|
-
function
|
|
1838
|
+
function n(r, s) {
|
|
1839
1839
|
return function(a, l, u, d) {
|
|
1840
1840
|
var c = a.options.group.name && l.options.group.name && a.options.group.name === l.options.group.name;
|
|
1841
1841
|
if (r == null && (s || c))
|
|
@@ -1845,7 +1845,7 @@ var h, N, w, R, Dt, Pe, D, St, Ft, tt, le, xt, xe, U, kt = !1, Le = !1, ke = [],
|
|
|
1845
1845
|
if (s && r === "clone")
|
|
1846
1846
|
return r;
|
|
1847
1847
|
if (typeof r == "function")
|
|
1848
|
-
return
|
|
1848
|
+
return n(r(a, l, u, d), s)(a, l, u, d);
|
|
1849
1849
|
var p = (s ? a : l).options.group.name;
|
|
1850
1850
|
return r === !0 || typeof r == "string" && r === p || r.join && r.indexOf(p) > -1;
|
|
1851
1851
|
};
|
|
@@ -1853,41 +1853,41 @@ var h, N, w, R, Dt, Pe, D, St, Ft, tt, le, xt, xe, U, kt = !1, Le = !1, ke = [],
|
|
|
1853
1853
|
var i = {}, o = t.group;
|
|
1854
1854
|
(!o || Te(o) != "object") && (o = {
|
|
1855
1855
|
name: o
|
|
1856
|
-
}), i.name = o.name, i.checkPull =
|
|
1856
|
+
}), i.name = o.name, i.checkPull = n(o.pull, !0), i.checkPut = n(o.put), i.revertClone = o.revertClone, t.group = i;
|
|
1857
1857
|
}, Ki = function() {
|
|
1858
1858
|
!Wi && w && b(w, "display", "none");
|
|
1859
1859
|
}, Qi = function() {
|
|
1860
1860
|
!Wi && w && b(w, "display", "");
|
|
1861
1861
|
};
|
|
1862
|
-
un && !Fi && document.addEventListener("click", function(
|
|
1862
|
+
un && !Fi && document.addEventListener("click", function(e) {
|
|
1863
1863
|
if (Le)
|
|
1864
|
-
return
|
|
1864
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Le = !1, !1;
|
|
1865
1865
|
}, !0);
|
|
1866
1866
|
var Rt = function(t) {
|
|
1867
1867
|
if (h) {
|
|
1868
1868
|
t = t.touches ? t.touches[0] : t;
|
|
1869
|
-
var
|
|
1870
|
-
if (
|
|
1869
|
+
var n = os(t.clientX, t.clientY);
|
|
1870
|
+
if (n) {
|
|
1871
1871
|
var i = {};
|
|
1872
1872
|
for (var o in t)
|
|
1873
1873
|
t.hasOwnProperty(o) && (i[o] = t[o]);
|
|
1874
|
-
i.target = i.rootEl =
|
|
1874
|
+
i.target = i.rootEl = n, i.preventDefault = void 0, i.stopPropagation = void 0, n[et]._onDragOver(i);
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
},
|
|
1877
|
+
}, rs = function(t) {
|
|
1878
1878
|
h && h.parentNode[et]._isOutsideThisEl(t.target);
|
|
1879
1879
|
};
|
|
1880
|
-
function v(
|
|
1881
|
-
if (!(
|
|
1882
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(
|
|
1883
|
-
this.el =
|
|
1884
|
-
var
|
|
1880
|
+
function v(e, t) {
|
|
1881
|
+
if (!(e && e.nodeType && e.nodeType === 1))
|
|
1882
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
1883
|
+
this.el = e, this.options = t = yt({}, t), e[et] = this;
|
|
1884
|
+
var n = {
|
|
1885
1885
|
group: null,
|
|
1886
1886
|
sort: !0,
|
|
1887
1887
|
disabled: !1,
|
|
1888
1888
|
store: null,
|
|
1889
1889
|
handle: null,
|
|
1890
|
-
draggable: /^[uo]l$/i.test(
|
|
1890
|
+
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
1891
1891
|
swapThreshold: 1,
|
|
1892
1892
|
// percentage; 0 <= x <= 1
|
|
1893
1893
|
invertSwap: !1,
|
|
@@ -1896,7 +1896,7 @@ function v(n, t) {
|
|
|
1896
1896
|
// will be set to same as swapThreshold if default
|
|
1897
1897
|
removeCloneOnHide: !0,
|
|
1898
1898
|
direction: function() {
|
|
1899
|
-
return Gi(
|
|
1899
|
+
return Gi(e, this.options);
|
|
1900
1900
|
},
|
|
1901
1901
|
ghostClass: "sortable-ghost",
|
|
1902
1902
|
chosenClass: "sortable-chosen",
|
|
@@ -1923,16 +1923,16 @@ function v(n, t) {
|
|
|
1923
1923
|
x: 0,
|
|
1924
1924
|
y: 0
|
|
1925
1925
|
},
|
|
1926
|
-
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1926
|
+
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !re,
|
|
1927
1927
|
emptyInsertThreshold: 5
|
|
1928
1928
|
};
|
|
1929
|
-
we.initializePlugins(this,
|
|
1930
|
-
for (var i in
|
|
1931
|
-
!(i in t) && (t[i] =
|
|
1929
|
+
we.initializePlugins(this, e, n);
|
|
1930
|
+
for (var i in n)
|
|
1931
|
+
!(i in t) && (t[i] = n[i]);
|
|
1932
1932
|
Ji(t);
|
|
1933
1933
|
for (var o in this)
|
|
1934
1934
|
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
|
|
1935
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1935
|
+
this.nativeDraggable = t.forceFallback ? !1 : ns, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? _(e, "pointerdown", this._onTapStart) : (_(e, "mousedown", this._onTapStart), _(e, "touchstart", this._onTapStart)), this.nativeDraggable && (_(e, "dragover", this), _(e, "dragenter", this)), ke.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), yt(this, Jr());
|
|
1936
1936
|
}
|
|
1937
1937
|
v.prototype = /** @lends Sortable.prototype */
|
|
1938
1938
|
{
|
|
@@ -1940,23 +1940,23 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
1940
1940
|
_isOutsideThisEl: function(t) {
|
|
1941
1941
|
!this.el.contains(t) && t !== this.el && (Vt = null);
|
|
1942
1942
|
},
|
|
1943
|
-
_getDirection: function(t,
|
|
1944
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, t,
|
|
1943
|
+
_getDirection: function(t, n) {
|
|
1944
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, n, h) : this.options.direction;
|
|
1945
1945
|
},
|
|
1946
1946
|
_onTapStart: function(t) {
|
|
1947
1947
|
if (t.cancelable) {
|
|
1948
|
-
var
|
|
1949
|
-
if (
|
|
1950
|
-
if (Ft = it(l),
|
|
1948
|
+
var n = this, i = this.el, o = this.options, r = o.preventOnFilter, s = t.type, a = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (a || t).target, u = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, d = o.filter;
|
|
1949
|
+
if (ps(i), !h && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || o.disabled) && !u.isContentEditable && !(!this.nativeDraggable && re && l && l.tagName.toUpperCase() === "SELECT") && (l = ut(l, o.draggable, i, !1), !(l && l.animated) && Pe !== l)) {
|
|
1950
|
+
if (Ft = it(l), ae = it(l, o.draggable), typeof d == "function") {
|
|
1951
1951
|
if (d.call(this, t, l, this)) {
|
|
1952
1952
|
W({
|
|
1953
|
-
sortable:
|
|
1953
|
+
sortable: n,
|
|
1954
1954
|
rootEl: u,
|
|
1955
1955
|
name: "filter",
|
|
1956
1956
|
targetEl: l,
|
|
1957
1957
|
toEl: i,
|
|
1958
1958
|
fromEl: i
|
|
1959
|
-
}), G("filter",
|
|
1959
|
+
}), G("filter", n, {
|
|
1960
1960
|
evt: t
|
|
1961
1961
|
}), r && t.cancelable && t.preventDefault();
|
|
1962
1962
|
return;
|
|
@@ -1964,13 +1964,13 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
1964
1964
|
} else if (d && (d = d.split(",").some(function(c) {
|
|
1965
1965
|
if (c = ut(u, c.trim(), i, !1), c)
|
|
1966
1966
|
return W({
|
|
1967
|
-
sortable:
|
|
1967
|
+
sortable: n,
|
|
1968
1968
|
rootEl: c,
|
|
1969
1969
|
name: "filter",
|
|
1970
1970
|
targetEl: l,
|
|
1971
1971
|
fromEl: i,
|
|
1972
1972
|
toEl: i
|
|
1973
|
-
}), G("filter",
|
|
1973
|
+
}), G("filter", n, {
|
|
1974
1974
|
evt: t
|
|
1975
1975
|
}), !0;
|
|
1976
1976
|
}), d)) {
|
|
@@ -1981,22 +1981,22 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
1981
1981
|
}
|
|
1982
1982
|
}
|
|
1983
1983
|
},
|
|
1984
|
-
_prepareDragStart: function(t,
|
|
1984
|
+
_prepareDragStart: function(t, n, i) {
|
|
1985
1985
|
var o = this, r = o.el, s = o.options, a = r.ownerDocument, l;
|
|
1986
1986
|
if (i && !h && i.parentNode === r) {
|
|
1987
1987
|
var u = I(i);
|
|
1988
|
-
if (
|
|
1988
|
+
if (O = r, h = i, N = h.parentNode, Dt = h.nextSibling, Pe = i, xe = s.group, v.dragged = h, Ot = {
|
|
1989
1989
|
target: h,
|
|
1990
|
-
clientX: (
|
|
1991
|
-
clientY: (
|
|
1992
|
-
}, hi = Ot.clientX - u.left, pi = Ot.clientY - u.top, this._lastX = (
|
|
1990
|
+
clientX: (n || t).clientX,
|
|
1991
|
+
clientY: (n || t).clientY
|
|
1992
|
+
}, hi = Ot.clientX - u.left, pi = Ot.clientY - u.top, this._lastX = (n || t).clientX, this._lastY = (n || t).clientY, h.style["will-change"] = "all", l = function() {
|
|
1993
1993
|
if (G("delayEnded", o, {
|
|
1994
1994
|
evt: t
|
|
1995
1995
|
}), v.eventCanceled) {
|
|
1996
1996
|
o._onDrop();
|
|
1997
1997
|
return;
|
|
1998
1998
|
}
|
|
1999
|
-
o._disableDelayedDragEvents(), !li && o.nativeDraggable && (h.draggable = !0), o._triggerDragStart(t,
|
|
1999
|
+
o._disableDelayedDragEvents(), !li && o.nativeDraggable && (h.draggable = !0), o._triggerDragStart(t, n), W({
|
|
2000
2000
|
sortable: o,
|
|
2001
2001
|
name: "choose",
|
|
2002
2002
|
originalEvent: t
|
|
@@ -2005,7 +2005,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2005
2005
|
zi(h, d.trim(), Sn);
|
|
2006
2006
|
}), _(a, "dragover", Rt), _(a, "mousemove", Rt), _(a, "touchmove", Rt), _(a, "mouseup", o._onDrop), _(a, "touchend", o._onDrop), _(a, "touchcancel", o._onDrop), li && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), G("delayStart", this, {
|
|
2007
2007
|
evt: t
|
|
2008
|
-
}), s.delay && (!s.delayOnTouchOnly ||
|
|
2008
|
+
}), s.delay && (!s.delayOnTouchOnly || n) && (!this.nativeDraggable || !(ve || bt))) {
|
|
2009
2009
|
if (v.eventCanceled) {
|
|
2010
2010
|
this._onDrop();
|
|
2011
2011
|
return;
|
|
@@ -2016,8 +2016,8 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2016
2016
|
}
|
|
2017
2017
|
},
|
|
2018
2018
|
_delayedDragTouchMoveHandler: function(t) {
|
|
2019
|
-
var
|
|
2020
|
-
Math.max(Math.abs(
|
|
2019
|
+
var n = t.touches ? t.touches[0] : t;
|
|
2020
|
+
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
2021
2021
|
},
|
|
2022
2022
|
_disableDelayedDrag: function() {
|
|
2023
2023
|
h && Sn(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
@@ -2026,8 +2026,8 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2026
2026
|
var t = this.el.ownerDocument;
|
|
2027
2027
|
S(t, "mouseup", this._disableDelayedDrag), S(t, "touchend", this._disableDelayedDrag), S(t, "touchcancel", this._disableDelayedDrag), S(t, "mousemove", this._delayedDragTouchMoveHandler), S(t, "touchmove", this._delayedDragTouchMoveHandler), S(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2028
2028
|
},
|
|
2029
|
-
_triggerDragStart: function(t,
|
|
2030
|
-
|
|
2029
|
+
_triggerDragStart: function(t, n) {
|
|
2030
|
+
n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ? _(document, "pointermove", this._onTouchMove) : n ? _(document, "touchmove", this._onTouchMove) : _(document, "mousemove", this._onTouchMove) : (_(h, "dragend", this), _(O, "dragstart", this._onDragStart));
|
|
2031
2031
|
try {
|
|
2032
2032
|
document.selection ? Re(function() {
|
|
2033
2033
|
document.selection.empty();
|
|
@@ -2035,16 +2035,16 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2035
2035
|
} catch {
|
|
2036
2036
|
}
|
|
2037
2037
|
},
|
|
2038
|
-
_dragStarted: function(t,
|
|
2039
|
-
if (kt = !1,
|
|
2038
|
+
_dragStarted: function(t, n) {
|
|
2039
|
+
if (kt = !1, O && h) {
|
|
2040
2040
|
G("dragStarted", this, {
|
|
2041
|
-
evt:
|
|
2042
|
-
}), this.nativeDraggable && _(document, "dragover",
|
|
2041
|
+
evt: n
|
|
2042
|
+
}), this.nativeDraggable && _(document, "dragover", rs);
|
|
2043
2043
|
var i = this.options;
|
|
2044
2044
|
!t && Q(h, i.dragClass, !1), Q(h, i.ghostClass, !0), v.active = this, t && this._appendGhost(), W({
|
|
2045
2045
|
sortable: this,
|
|
2046
2046
|
name: "start",
|
|
2047
|
-
originalEvent:
|
|
2047
|
+
originalEvent: n
|
|
2048
2048
|
});
|
|
2049
2049
|
} else
|
|
2050
2050
|
this._nulling();
|
|
@@ -2052,28 +2052,28 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2052
2052
|
_emulateDragOver: function() {
|
|
2053
2053
|
if (lt) {
|
|
2054
2054
|
this._lastX = lt.clientX, this._lastY = lt.clientY, Ki();
|
|
2055
|
-
for (var t = document.elementFromPoint(lt.clientX, lt.clientY),
|
|
2056
|
-
|
|
2057
|
-
if (h.parentNode[et]._isOutsideThisEl(t),
|
|
2055
|
+
for (var t = document.elementFromPoint(lt.clientX, lt.clientY), n = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(lt.clientX, lt.clientY), t !== n); )
|
|
2056
|
+
n = t;
|
|
2057
|
+
if (h.parentNode[et]._isOutsideThisEl(t), n)
|
|
2058
2058
|
do {
|
|
2059
|
-
if (
|
|
2059
|
+
if (n[et]) {
|
|
2060
2060
|
var i = void 0;
|
|
2061
|
-
if (i =
|
|
2061
|
+
if (i = n[et]._onDragOver({
|
|
2062
2062
|
clientX: lt.clientX,
|
|
2063
2063
|
clientY: lt.clientY,
|
|
2064
2064
|
target: t,
|
|
2065
|
-
rootEl:
|
|
2065
|
+
rootEl: n
|
|
2066
2066
|
}), i && !this.options.dragoverBubble)
|
|
2067
2067
|
break;
|
|
2068
2068
|
}
|
|
2069
|
-
t =
|
|
2070
|
-
} while (
|
|
2069
|
+
t = n;
|
|
2070
|
+
} while (n = n.parentNode);
|
|
2071
2071
|
Qi();
|
|
2072
2072
|
}
|
|
2073
2073
|
},
|
|
2074
2074
|
_onTouchMove: function(t) {
|
|
2075
2075
|
if (Ot) {
|
|
2076
|
-
var
|
|
2076
|
+
var n = this.options, i = n.fallbackTolerance, o = n.fallbackOffset, r = t.touches ? t.touches[0] : t, s = w && jt(w, !0), a = w && s && s.a, l = w && s && s.d, u = $e && Y && di(Y), d = (r.clientX - Ot.clientX + o.x) / (a || 1) + (u ? u[0] - xn[0] : 0) / (a || 1), c = (r.clientY - Ot.clientY + o.y) / (l || 1) + (u ? u[1] - xn[1] : 0) / (l || 1);
|
|
2077
2077
|
if (!v.active && !kt) {
|
|
2078
2078
|
if (i && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < i)
|
|
2079
2079
|
return;
|
|
@@ -2096,16 +2096,16 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2096
2096
|
},
|
|
2097
2097
|
_appendGhost: function() {
|
|
2098
2098
|
if (!w) {
|
|
2099
|
-
var t = this.options.fallbackOnBody ? document.body :
|
|
2099
|
+
var t = this.options.fallbackOnBody ? document.body : O, n = I(h, !0, $e, !0, t), i = this.options;
|
|
2100
2100
|
if ($e) {
|
|
2101
2101
|
for (Y = t; b(Y, "position") === "static" && b(Y, "transform") === "none" && Y !== document; )
|
|
2102
2102
|
Y = Y.parentNode;
|
|
2103
|
-
Y !== document.body && Y !== document.documentElement ? (Y === document && (Y = ct()),
|
|
2103
|
+
Y !== document.body && Y !== document.documentElement ? (Y === document && (Y = ct()), n.top += Y.scrollTop, n.left += Y.scrollLeft) : Y = ct(), xn = di(Y);
|
|
2104
2104
|
}
|
|
2105
|
-
w = h.cloneNode(!0), Q(w, i.ghostClass, !1), Q(w, i.fallbackClass, !0), Q(w, i.dragClass, !0), b(w, "transition", ""), b(w, "transform", ""), b(w, "box-sizing", "border-box"), b(w, "margin", 0), b(w, "top",
|
|
2105
|
+
w = h.cloneNode(!0), Q(w, i.ghostClass, !1), Q(w, i.fallbackClass, !0), Q(w, i.dragClass, !0), b(w, "transition", ""), b(w, "transform", ""), b(w, "box-sizing", "border-box"), b(w, "margin", 0), b(w, "top", n.top), b(w, "left", n.left), b(w, "width", n.width), b(w, "height", n.height), b(w, "opacity", "0.8"), b(w, "position", $e ? "absolute" : "fixed"), b(w, "zIndex", "100000"), b(w, "pointerEvents", "none"), v.ghost = w, t.appendChild(w), b(w, "transform-origin", hi / parseInt(w.style.width) * 100 + "% " + pi / parseInt(w.style.height) * 100 + "%");
|
|
2106
2106
|
}
|
|
2107
2107
|
},
|
|
2108
|
-
_onDragStart: function(t,
|
|
2108
|
+
_onDragStart: function(t, n) {
|
|
2109
2109
|
var i = this, o = t.dataTransfer, r = i.options;
|
|
2110
2110
|
if (G("dragStart", this, {
|
|
2111
2111
|
evt: t
|
|
@@ -2114,18 +2114,18 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2114
2114
|
return;
|
|
2115
2115
|
}
|
|
2116
2116
|
G("setupClone", this), v.eventCanceled || (D = Yi(h), D.removeAttribute("id"), D.draggable = !1, D.style["will-change"] = "", this._hideClone(), Q(D, this.options.chosenClass, !1), v.clone = D), i.cloneId = Re(function() {
|
|
2117
|
-
G("clone", i), !v.eventCanceled && (i.options.removeCloneOnHide ||
|
|
2117
|
+
G("clone", i), !v.eventCanceled && (i.options.removeCloneOnHide || O.insertBefore(D, h), i._hideClone(), W({
|
|
2118
2118
|
sortable: i,
|
|
2119
2119
|
name: "clone"
|
|
2120
2120
|
}));
|
|
2121
|
-
}), !
|
|
2121
|
+
}), !n && Q(h, r.dragClass, !0), n ? (Le = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (S(document, "mouseup", i._onDrop), S(document, "touchend", i._onDrop), S(document, "touchcancel", i._onDrop), o && (o.effectAllowed = "move", r.setData && r.setData.call(i, o, h)), _(document, "drop", i), b(h, "transform", "translateZ(0)")), kt = !0, i._dragStartId = Re(i._dragStarted.bind(i, n, t)), _(document, "selectstart", i), te = !0, re && b(document.body, "user-select", "none");
|
|
2122
2122
|
},
|
|
2123
2123
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
2124
2124
|
_onDragOver: function(t) {
|
|
2125
|
-
var
|
|
2125
|
+
var n = this.el, i = t.target, o, r, s, a = this.options, l = a.group, u = v.active, d = xe === l, c = a.sort, p = U || u, f, g = this, y = !1;
|
|
2126
2126
|
if (Pn) return;
|
|
2127
|
-
function P(
|
|
2128
|
-
G(
|
|
2127
|
+
function P(Gt, _o) {
|
|
2128
|
+
G(Gt, g, dt({
|
|
2129
2129
|
evt: t,
|
|
2130
2130
|
isOwner: d,
|
|
2131
2131
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2136,55 +2136,55 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2136
2136
|
fromSortable: p,
|
|
2137
2137
|
target: i,
|
|
2138
2138
|
completed: B,
|
|
2139
|
-
onMove: function(Yn,
|
|
2140
|
-
return _e(
|
|
2139
|
+
onMove: function(Yn, Ao) {
|
|
2140
|
+
return _e(O, n, h, o, Yn, I(Yn), t, Ao);
|
|
2141
2141
|
},
|
|
2142
2142
|
changed: K
|
|
2143
|
-
},
|
|
2143
|
+
}, _o));
|
|
2144
2144
|
}
|
|
2145
2145
|
function L() {
|
|
2146
2146
|
P("dragOverAnimationCapture"), g.captureAnimationState(), g !== p && p.captureAnimationState();
|
|
2147
2147
|
}
|
|
2148
|
-
function B(
|
|
2148
|
+
function B(Gt) {
|
|
2149
2149
|
return P("dragOverCompleted", {
|
|
2150
|
-
insertion:
|
|
2151
|
-
}),
|
|
2150
|
+
insertion: Gt
|
|
2151
|
+
}), Gt && (d ? u._hideClone() : u._showClone(g), g !== p && (Q(h, U ? U.options.ghostClass : u.options.ghostClass, !1), Q(h, a.ghostClass, !0)), U !== g && g !== v.active ? U = g : g === v.active && U && (U = null), p === g && (g._ignoreWhileAnimating = i), g.animateAll(function() {
|
|
2152
2152
|
P("dragOverAnimationComplete"), g._ignoreWhileAnimating = null;
|
|
2153
|
-
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (i === h && !h.animated || i ===
|
|
2153
|
+
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (i === h && !h.animated || i === n && !i.animated) && (Vt = null), !a.dragoverBubble && !t.rootEl && i !== document && (h.parentNode[et]._isOutsideThisEl(t.target), !Gt && Rt(t)), !a.dragoverBubble && t.stopPropagation && t.stopPropagation(), y = !0;
|
|
2154
2154
|
}
|
|
2155
2155
|
function K() {
|
|
2156
2156
|
tt = it(h), xt = it(h, a.draggable), W({
|
|
2157
2157
|
sortable: g,
|
|
2158
2158
|
name: "change",
|
|
2159
|
-
toEl:
|
|
2159
|
+
toEl: n,
|
|
2160
2160
|
newIndex: tt,
|
|
2161
2161
|
newDraggableIndex: xt,
|
|
2162
2162
|
originalEvent: t
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = ut(i, a.draggable,
|
|
2165
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = ut(i, a.draggable, n, !0), P("dragOver"), v.eventCanceled) return y;
|
|
2166
2166
|
if (h.contains(t.target) || i.animated && i.animatingX && i.animatingY || g._ignoreWhileAnimating === i)
|
|
2167
2167
|
return B(!1);
|
|
2168
|
-
if (Le = !1, u && !a.disabled && (d ? c || (s = N !==
|
|
2168
|
+
if (Le = !1, u && !a.disabled && (d ? c || (s = N !== O) : U === this || (this.lastPutMode = xe.checkPull(this, u, h, t)) && l.checkPut(this, u, h, t))) {
|
|
2169
2169
|
if (f = this._getDirection(t, i) === "vertical", o = I(h), P("dragOverValid"), v.eventCanceled) return y;
|
|
2170
2170
|
if (s)
|
|
2171
|
-
return N =
|
|
2172
|
-
var q = jn(
|
|
2173
|
-
if (!q ||
|
|
2171
|
+
return N = O, L(), this._hideClone(), P("revert"), v.eventCanceled || (Dt ? O.insertBefore(h, Dt) : O.appendChild(h)), B(!0);
|
|
2172
|
+
var q = jn(n, a.draggable);
|
|
2173
|
+
if (!q || us(t, f, this) && !q.animated) {
|
|
2174
2174
|
if (q === h)
|
|
2175
2175
|
return B(!1);
|
|
2176
|
-
if (q &&
|
|
2177
|
-
return L(), q && q.nextSibling ?
|
|
2178
|
-
} else if (q &&
|
|
2179
|
-
var st =
|
|
2176
|
+
if (q && n === t.target && (i = q), i && (r = I(i)), _e(O, n, h, o, i, r, t, !!i) !== !1)
|
|
2177
|
+
return L(), q && q.nextSibling ? n.insertBefore(h, q.nextSibling) : n.appendChild(h), N = n, K(), B(!0);
|
|
2178
|
+
} else if (q && ls(t, f, this)) {
|
|
2179
|
+
var st = Zt(n, 0, a, !0);
|
|
2180
2180
|
if (st === h)
|
|
2181
2181
|
return B(!1);
|
|
2182
|
-
if (i = st, r = I(i), _e(
|
|
2183
|
-
return L(),
|
|
2184
|
-
} else if (i.parentNode ===
|
|
2182
|
+
if (i = st, r = I(i), _e(O, n, h, o, i, r, t, !1) !== !1)
|
|
2183
|
+
return L(), n.insertBefore(h, st), N = n, K(), B(!0);
|
|
2184
|
+
} else if (i.parentNode === n) {
|
|
2185
2185
|
r = I(i);
|
|
2186
|
-
var A = 0, Z, at = h.parentNode !==
|
|
2187
|
-
Vt !== i && (Z = r[
|
|
2186
|
+
var A = 0, Z, at = h.parentNode !== n, X = !is(h.animated && h.toRect || o, i.animated && i.toRect || r, f), Yt = f ? "top" : "left", vt = ci(i, "top", "top") || ci(h, "top", "top"), qt = vt ? vt.scrollTop : void 0;
|
|
2187
|
+
Vt !== i && (Z = r[Yt], ue = !1, Se = !X && a.invertSwap || at), A = cs(t, i, r, f, X ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, Se, Vt === i);
|
|
2188
2188
|
var ht;
|
|
2189
2189
|
if (A !== 0) {
|
|
2190
2190
|
var Ct = it(h);
|
|
@@ -2194,14 +2194,14 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2194
2194
|
}
|
|
2195
2195
|
if (A === 0 || ht === i)
|
|
2196
2196
|
return B(!1);
|
|
2197
|
-
Vt = i,
|
|
2198
|
-
var
|
|
2197
|
+
Vt = i, le = A;
|
|
2198
|
+
var Wt = i.nextElementSibling, wt = !1;
|
|
2199
2199
|
wt = A === 1;
|
|
2200
|
-
var Ee = _e(
|
|
2200
|
+
var Ee = _e(O, n, h, o, i, r, t, wt);
|
|
2201
2201
|
if (Ee !== !1)
|
|
2202
|
-
return (Ee === 1 || Ee === -1) && (wt = Ee === 1), Pn = !0, setTimeout(
|
|
2202
|
+
return (Ee === 1 || Ee === -1) && (wt = Ee === 1), Pn = !0, setTimeout(as, 30), L(), wt && !Wt ? n.appendChild(h) : i.parentNode.insertBefore(h, wt ? Wt : i), vt && Xi(vt, 0, qt - vt.scrollTop), N = h.parentNode, Z !== void 0 && !Se && (Oe = Math.abs(Z - I(i)[Yt])), K(), B(!0);
|
|
2203
2203
|
}
|
|
2204
|
-
if (
|
|
2204
|
+
if (n.contains(h))
|
|
2205
2205
|
return B(!1);
|
|
2206
2206
|
}
|
|
2207
2207
|
return !1;
|
|
@@ -2215,25 +2215,25 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2215
2215
|
S(t, "mouseup", this._onDrop), S(t, "touchend", this._onDrop), S(t, "pointerup", this._onDrop), S(t, "touchcancel", this._onDrop), S(document, "selectstart", this);
|
|
2216
2216
|
},
|
|
2217
2217
|
_onDrop: function(t) {
|
|
2218
|
-
var
|
|
2218
|
+
var n = this.el, i = this.options;
|
|
2219
2219
|
if (tt = it(h), xt = it(h, i.draggable), G("drop", this, {
|
|
2220
2220
|
evt: t
|
|
2221
2221
|
}), N = h && h.parentNode, tt = it(h), xt = it(h, i.draggable), v.eventCanceled) {
|
|
2222
2222
|
this._nulling();
|
|
2223
2223
|
return;
|
|
2224
2224
|
}
|
|
2225
|
-
kt = !1, Se = !1,
|
|
2225
|
+
kt = !1, Se = !1, ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), On(this.cloneId), On(this._dragStartId), this.nativeDraggable && (S(document, "drop", this), S(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), re && b(document.body, "user-select", ""), b(h, "transform", ""), t && (te && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()), w && w.parentNode && w.parentNode.removeChild(w), (O === N || U && U.lastPutMode !== "clone") && D && D.parentNode && D.parentNode.removeChild(D), h && (this.nativeDraggable && S(h, "dragend", this), Sn(h), h.style["will-change"] = "", te && !kt && Q(h, U ? U.options.ghostClass : this.options.ghostClass, !1), Q(h, this.options.chosenClass, !1), W({
|
|
2226
2226
|
sortable: this,
|
|
2227
2227
|
name: "unchoose",
|
|
2228
2228
|
toEl: N,
|
|
2229
2229
|
newIndex: null,
|
|
2230
2230
|
newDraggableIndex: null,
|
|
2231
2231
|
originalEvent: t
|
|
2232
|
-
}),
|
|
2232
|
+
}), O !== N ? (tt >= 0 && (W({
|
|
2233
2233
|
rootEl: N,
|
|
2234
2234
|
name: "add",
|
|
2235
2235
|
toEl: N,
|
|
2236
|
-
fromEl:
|
|
2236
|
+
fromEl: O,
|
|
2237
2237
|
originalEvent: t
|
|
2238
2238
|
}), W({
|
|
2239
2239
|
sortable: this,
|
|
@@ -2244,7 +2244,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2244
2244
|
rootEl: N,
|
|
2245
2245
|
name: "sort",
|
|
2246
2246
|
toEl: N,
|
|
2247
|
-
fromEl:
|
|
2247
|
+
fromEl: O,
|
|
2248
2248
|
originalEvent: t
|
|
2249
2249
|
}), W({
|
|
2250
2250
|
sortable: this,
|
|
@@ -2261,7 +2261,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2261
2261
|
name: "sort",
|
|
2262
2262
|
toEl: N,
|
|
2263
2263
|
originalEvent: t
|
|
2264
|
-
})), v.active && ((tt == null || tt === -1) && (tt = Ft, xt =
|
|
2264
|
+
})), v.active && ((tt == null || tt === -1) && (tt = Ft, xt = ae), W({
|
|
2265
2265
|
sortable: this,
|
|
2266
2266
|
name: "end",
|
|
2267
2267
|
toEl: N,
|
|
@@ -2269,7 +2269,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2269
2269
|
}), this.save()))), this._nulling();
|
|
2270
2270
|
},
|
|
2271
2271
|
_nulling: function() {
|
|
2272
|
-
G("nulling", this),
|
|
2272
|
+
G("nulling", this), O = h = N = w = Dt = D = Pe = St = Ot = lt = te = tt = xt = Ft = ae = Vt = le = U = xe = v.dragged = v.ghost = v.clone = v.active = null, Ue.forEach(function(t) {
|
|
2273
2273
|
t.checked = !0;
|
|
2274
2274
|
}), Ue.length = wn = En = 0;
|
|
2275
2275
|
},
|
|
@@ -2281,7 +2281,7 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2281
2281
|
break;
|
|
2282
2282
|
case "dragenter":
|
|
2283
2283
|
case "dragover":
|
|
2284
|
-
h && (this._onDragOver(t),
|
|
2284
|
+
h && (this._onDragOver(t), ss(t));
|
|
2285
2285
|
break;
|
|
2286
2286
|
case "selectstart":
|
|
2287
2287
|
t.preventDefault();
|
|
@@ -2293,22 +2293,22 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2293
2293
|
* @returns {String[]}
|
|
2294
2294
|
*/
|
|
2295
2295
|
toArray: function() {
|
|
2296
|
-
for (var t = [],
|
|
2297
|
-
|
|
2296
|
+
for (var t = [], n, i = this.el.children, o = 0, r = i.length, s = this.options; o < r; o++)
|
|
2297
|
+
n = i[o], ut(n, s.draggable, this.el, !1) && t.push(n.getAttribute(s.dataIdAttr) || hs(n));
|
|
2298
2298
|
return t;
|
|
2299
2299
|
},
|
|
2300
2300
|
/**
|
|
2301
2301
|
* Sorts the elements according to the array.
|
|
2302
2302
|
* @param {String[]} order order of the items
|
|
2303
2303
|
*/
|
|
2304
|
-
sort: function(t,
|
|
2304
|
+
sort: function(t, n) {
|
|
2305
2305
|
var i = {}, o = this.el;
|
|
2306
2306
|
this.toArray().forEach(function(r, s) {
|
|
2307
2307
|
var a = o.children[s];
|
|
2308
2308
|
ut(a, this.options.draggable, o, !1) && (i[r] = a);
|
|
2309
|
-
}, this),
|
|
2309
|
+
}, this), n && this.captureAnimationState(), t.forEach(function(r) {
|
|
2310
2310
|
i[r] && (o.removeChild(i[r]), o.appendChild(i[r]));
|
|
2311
|
-
}),
|
|
2311
|
+
}), n && this.animateAll();
|
|
2312
2312
|
},
|
|
2313
2313
|
/**
|
|
2314
2314
|
* Save the current sorting
|
|
@@ -2323,8 +2323,8 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2323
2323
|
* @param {String} [selector] default: `options.draggable`
|
|
2324
2324
|
* @returns {HTMLElement|null}
|
|
2325
2325
|
*/
|
|
2326
|
-
closest: function(t,
|
|
2327
|
-
return ut(t,
|
|
2326
|
+
closest: function(t, n) {
|
|
2327
|
+
return ut(t, n || this.options.draggable, this.el, !1);
|
|
2328
2328
|
},
|
|
2329
2329
|
/**
|
|
2330
2330
|
* Set/get option
|
|
@@ -2332,12 +2332,12 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2332
2332
|
* @param {*} [value]
|
|
2333
2333
|
* @returns {*}
|
|
2334
2334
|
*/
|
|
2335
|
-
option: function(t,
|
|
2335
|
+
option: function(t, n) {
|
|
2336
2336
|
var i = this.options;
|
|
2337
|
-
if (
|
|
2337
|
+
if (n === void 0)
|
|
2338
2338
|
return i[t];
|
|
2339
|
-
var o = we.modifyOption(this, t,
|
|
2340
|
-
typeof o < "u" ? i[t] = o : i[t] =
|
|
2339
|
+
var o = we.modifyOption(this, t, n);
|
|
2340
|
+
typeof o < "u" ? i[t] = o : i[t] = n, t === "group" && Ji(i);
|
|
2341
2341
|
},
|
|
2342
2342
|
/**
|
|
2343
2343
|
* Destroy
|
|
@@ -2345,8 +2345,8 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2345
2345
|
destroy: function() {
|
|
2346
2346
|
G("destroy", this);
|
|
2347
2347
|
var t = this.el;
|
|
2348
|
-
t[et] = null, S(t, "mousedown", this._onTapStart), S(t, "touchstart", this._onTapStart), S(t, "pointerdown", this._onTapStart), this.nativeDraggable && (S(t, "dragover", this), S(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(
|
|
2349
|
-
|
|
2348
|
+
t[et] = null, S(t, "mousedown", this._onTapStart), S(t, "touchstart", this._onTapStart), S(t, "pointerdown", this._onTapStart), this.nativeDraggable && (S(t, "dragover", this), S(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(n) {
|
|
2349
|
+
n.removeAttribute("draggable");
|
|
2350
2350
|
}), this._onDrop(), this._disableDelayedDragEvents(), ke.splice(ke.indexOf(this.el), 1), this.el = t = null;
|
|
2351
2351
|
},
|
|
2352
2352
|
_hideClone: function() {
|
|
@@ -2362,80 +2362,80 @@ v.prototype = /** @lends Sortable.prototype */
|
|
|
2362
2362
|
}
|
|
2363
2363
|
if (St) {
|
|
2364
2364
|
if (G("showClone", this), v.eventCanceled) return;
|
|
2365
|
-
h.parentNode ==
|
|
2365
|
+
h.parentNode == O && !this.options.group.revertClone ? O.insertBefore(D, h) : Dt ? O.insertBefore(D, Dt) : O.appendChild(D), this.options.group.revertClone && this.animate(h, D), b(D, "display", ""), St = !1;
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
2368
|
};
|
|
2369
|
-
function
|
|
2370
|
-
|
|
2369
|
+
function ss(e) {
|
|
2370
|
+
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2371
2371
|
}
|
|
2372
|
-
function _e(
|
|
2373
|
-
var l, u =
|
|
2372
|
+
function _e(e, t, n, i, o, r, s, a) {
|
|
2373
|
+
var l, u = e[et], d = u.options.onMove, c;
|
|
2374
2374
|
return window.CustomEvent && !bt && !ve ? l = new CustomEvent("move", {
|
|
2375
2375
|
bubbles: !0,
|
|
2376
2376
|
cancelable: !0
|
|
2377
|
-
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from =
|
|
2377
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = e, l.dragged = n, l.draggedRect = i, l.related = o || t, l.relatedRect = r || I(t), l.willInsertAfter = a, l.originalEvent = s, e.dispatchEvent(l), d && (c = d.call(u, l, s)), c;
|
|
2378
2378
|
}
|
|
2379
|
-
function Sn(
|
|
2380
|
-
|
|
2379
|
+
function Sn(e) {
|
|
2380
|
+
e.draggable = !1;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function as() {
|
|
2383
2383
|
Pn = !1;
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2386
|
-
var i = I(
|
|
2387
|
-
return t ?
|
|
2385
|
+
function ls(e, t, n) {
|
|
2386
|
+
var i = I(Zt(n.el, 0, n.options, !0)), o = qi(n.el, n.options, w), r = 10;
|
|
2387
|
+
return t ? e.clientX < o.left - r || e.clientY < i.top && e.clientX < i.right : e.clientY < o.top - r || e.clientY < i.bottom && e.clientX < i.left;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
var i = I(jn(
|
|
2391
|
-
return t ?
|
|
2389
|
+
function us(e, t, n) {
|
|
2390
|
+
var i = I(jn(n.el, n.options.draggable)), o = qi(n.el, n.options, w), r = 10;
|
|
2391
|
+
return t ? e.clientX > o.right + r || e.clientY > i.bottom && e.clientX > i.left : e.clientY > o.bottom + r || e.clientX > i.right && e.clientY > i.top;
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2394
|
-
var l = i ?
|
|
2393
|
+
function cs(e, t, n, i, o, r, s, a) {
|
|
2394
|
+
var l = i ? e.clientY : e.clientX, u = i ? n.height : n.width, d = i ? n.top : n.left, c = i ? n.bottom : n.right, p = !1;
|
|
2395
2395
|
if (!s) {
|
|
2396
2396
|
if (a && Oe < u * o) {
|
|
2397
|
-
if (!
|
|
2397
|
+
if (!ue && (le === 1 ? l > d + u * r / 2 : l < c - u * r / 2) && (ue = !0), ue)
|
|
2398
2398
|
p = !0;
|
|
2399
|
-
else if (
|
|
2400
|
-
return -
|
|
2399
|
+
else if (le === 1 ? l < d + Oe : l > c - Oe)
|
|
2400
|
+
return -le;
|
|
2401
2401
|
} else if (l > d + u * (1 - o) / 2 && l < c - u * (1 - o) / 2)
|
|
2402
|
-
return
|
|
2402
|
+
return ds(t);
|
|
2403
2403
|
}
|
|
2404
2404
|
return p = p || s, p && (l < d + u * r / 2 || l > c - u * r / 2) ? l > d + u / 2 ? 1 : -1 : 0;
|
|
2405
2405
|
}
|
|
2406
|
-
function
|
|
2407
|
-
return it(h) < it(
|
|
2406
|
+
function ds(e) {
|
|
2407
|
+
return it(h) < it(e) ? 1 : -1;
|
|
2408
2408
|
}
|
|
2409
|
-
function
|
|
2410
|
-
for (var t =
|
|
2411
|
-
i += t.charCodeAt(
|
|
2409
|
+
function hs(e) {
|
|
2410
|
+
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, i = 0; n--; )
|
|
2411
|
+
i += t.charCodeAt(n);
|
|
2412
2412
|
return i.toString(36);
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function ps(e) {
|
|
2415
2415
|
Ue.length = 0;
|
|
2416
|
-
for (var t =
|
|
2417
|
-
var i = t[
|
|
2416
|
+
for (var t = e.getElementsByTagName("input"), n = t.length; n--; ) {
|
|
2417
|
+
var i = t[n];
|
|
2418
2418
|
i.checked && Ue.push(i);
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
|
-
function Re(
|
|
2422
|
-
return setTimeout(
|
|
2421
|
+
function Re(e) {
|
|
2422
|
+
return setTimeout(e, 0);
|
|
2423
2423
|
}
|
|
2424
|
-
function On(
|
|
2425
|
-
return clearTimeout(
|
|
2424
|
+
function On(e) {
|
|
2425
|
+
return clearTimeout(e);
|
|
2426
2426
|
}
|
|
2427
|
-
un && _(document, "touchmove", function(
|
|
2428
|
-
(v.active || kt) &&
|
|
2427
|
+
un && _(document, "touchmove", function(e) {
|
|
2428
|
+
(v.active || kt) && e.cancelable && e.preventDefault();
|
|
2429
2429
|
});
|
|
2430
2430
|
v.utils = {
|
|
2431
2431
|
on: _,
|
|
2432
2432
|
off: S,
|
|
2433
2433
|
css: b,
|
|
2434
2434
|
find: zi,
|
|
2435
|
-
is: function(t,
|
|
2436
|
-
return !!ut(t,
|
|
2435
|
+
is: function(t, n) {
|
|
2436
|
+
return !!ut(t, n, t, !1);
|
|
2437
2437
|
},
|
|
2438
|
-
extend:
|
|
2438
|
+
extend: Wr,
|
|
2439
2439
|
throttle: Zi,
|
|
2440
2440
|
closest: ut,
|
|
2441
2441
|
toggleClass: Q,
|
|
@@ -2444,27 +2444,27 @@ v.utils = {
|
|
|
2444
2444
|
nextTick: Re,
|
|
2445
2445
|
cancelNextTick: On,
|
|
2446
2446
|
detectDirection: Gi,
|
|
2447
|
-
getChild:
|
|
2447
|
+
getChild: Zt
|
|
2448
2448
|
};
|
|
2449
|
-
v.get = function(
|
|
2450
|
-
return
|
|
2449
|
+
v.get = function(e) {
|
|
2450
|
+
return e[et];
|
|
2451
2451
|
};
|
|
2452
2452
|
v.mount = function() {
|
|
2453
|
-
for (var
|
|
2454
|
-
t[
|
|
2453
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
2454
|
+
t[n] = arguments[n];
|
|
2455
2455
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(i) {
|
|
2456
2456
|
if (!i.prototype || !i.prototype.constructor)
|
|
2457
2457
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));
|
|
2458
2458
|
i.utils && (v.utils = dt(dt({}, v.utils), i.utils)), we.mount(i);
|
|
2459
2459
|
});
|
|
2460
2460
|
};
|
|
2461
|
-
v.create = function(
|
|
2462
|
-
return new v(
|
|
2461
|
+
v.create = function(e, t) {
|
|
2462
|
+
return new v(e, t);
|
|
2463
2463
|
};
|
|
2464
|
-
v.version =
|
|
2465
|
-
var M = [],
|
|
2466
|
-
function
|
|
2467
|
-
function
|
|
2464
|
+
v.version = Xr;
|
|
2465
|
+
var M = [], ee, Rn, Dn = !1, $n, _n, Fe, ne;
|
|
2466
|
+
function fs() {
|
|
2467
|
+
function e() {
|
|
2468
2468
|
this.defaults = {
|
|
2469
2469
|
scroll: !0,
|
|
2470
2470
|
forceAutoScrollFallback: !1,
|
|
@@ -2475,70 +2475,70 @@ function gs() {
|
|
|
2475
2475
|
for (var t in this)
|
|
2476
2476
|
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
2477
2477
|
}
|
|
2478
|
-
return
|
|
2479
|
-
dragStarted: function(
|
|
2480
|
-
var i =
|
|
2478
|
+
return e.prototype = {
|
|
2479
|
+
dragStarted: function(n) {
|
|
2480
|
+
var i = n.originalEvent;
|
|
2481
2481
|
this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? _(document, "pointermove", this._handleFallbackAutoScroll) : i.touches ? _(document, "touchmove", this._handleFallbackAutoScroll) : _(document, "mousemove", this._handleFallbackAutoScroll);
|
|
2482
2482
|
},
|
|
2483
|
-
dragOverCompleted: function(
|
|
2484
|
-
var i =
|
|
2483
|
+
dragOverCompleted: function(n) {
|
|
2484
|
+
var i = n.originalEvent;
|
|
2485
2485
|
!this.options.dragOverBubble && !i.rootEl && this._handleAutoScroll(i);
|
|
2486
2486
|
},
|
|
2487
2487
|
drop: function() {
|
|
2488
|
-
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)), gi(), De(),
|
|
2488
|
+
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)), gi(), De(), Gr();
|
|
2489
2489
|
},
|
|
2490
2490
|
nulling: function() {
|
|
2491
|
-
Fe = Rn =
|
|
2491
|
+
Fe = Rn = ee = Dn = ne = $n = _n = null, M.length = 0;
|
|
2492
2492
|
},
|
|
2493
|
-
_handleFallbackAutoScroll: function(
|
|
2494
|
-
this._handleAutoScroll(
|
|
2493
|
+
_handleFallbackAutoScroll: function(n) {
|
|
2494
|
+
this._handleAutoScroll(n, !0);
|
|
2495
2495
|
},
|
|
2496
|
-
_handleAutoScroll: function(
|
|
2497
|
-
var o = this, r = (
|
|
2498
|
-
if (Fe =
|
|
2499
|
-
An(
|
|
2496
|
+
_handleAutoScroll: function(n, i) {
|
|
2497
|
+
var o = this, r = (n.touches ? n.touches[0] : n).clientX, s = (n.touches ? n.touches[0] : n).clientY, a = document.elementFromPoint(r, s);
|
|
2498
|
+
if (Fe = n, i || this.options.forceAutoScrollFallback || ve || bt || re) {
|
|
2499
|
+
An(n, this.options, a, i);
|
|
2500
2500
|
var l = $t(a, !0);
|
|
2501
|
-
Dn && (!
|
|
2501
|
+
Dn && (!ne || r !== $n || s !== _n) && (ne && gi(), ne = setInterval(function() {
|
|
2502
2502
|
var u = $t(document.elementFromPoint(r, s), !0);
|
|
2503
|
-
u !== l && (l = u, De()), An(
|
|
2503
|
+
u !== l && (l = u, De()), An(n, o.options, u, i);
|
|
2504
2504
|
}, 10), $n = r, _n = s);
|
|
2505
2505
|
} else {
|
|
2506
2506
|
if (!this.options.bubbleScroll || $t(a, !0) === ct()) {
|
|
2507
2507
|
De();
|
|
2508
2508
|
return;
|
|
2509
2509
|
}
|
|
2510
|
-
An(
|
|
2510
|
+
An(n, this.options, $t(a, !1), !1);
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
|
-
}, yt(
|
|
2513
|
+
}, yt(e, {
|
|
2514
2514
|
pluginName: "scroll",
|
|
2515
2515
|
initializeByDefault: !0
|
|
2516
2516
|
});
|
|
2517
2517
|
}
|
|
2518
2518
|
function De() {
|
|
2519
|
-
M.forEach(function(
|
|
2520
|
-
clearInterval(
|
|
2519
|
+
M.forEach(function(e) {
|
|
2520
|
+
clearInterval(e.pid);
|
|
2521
2521
|
}), M = [];
|
|
2522
2522
|
}
|
|
2523
2523
|
function gi() {
|
|
2524
|
-
clearInterval(
|
|
2524
|
+
clearInterval(ne);
|
|
2525
2525
|
}
|
|
2526
|
-
var An = Zi(function(
|
|
2526
|
+
var An = Zi(function(e, t, n, i) {
|
|
2527
2527
|
if (t.scroll) {
|
|
2528
|
-
var o = (
|
|
2529
|
-
Rn !==
|
|
2530
|
-
var c = 0, p =
|
|
2528
|
+
var o = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, s = t.scrollSensitivity, a = t.scrollSpeed, l = ct(), u = !1, d;
|
|
2529
|
+
Rn !== n && (Rn = n, De(), ee = t.scroll, d = t.scrollFn, ee === !0 && (ee = $t(n, !0)));
|
|
2530
|
+
var c = 0, p = ee;
|
|
2531
2531
|
do {
|
|
2532
|
-
var f = p, g = I(f), y = g.top, P = g.bottom, L = g.left, B = g.right, K = g.width, q = g.height, st = void 0, A = void 0, Z = f.scrollWidth, at = f.scrollHeight, X = b(f),
|
|
2532
|
+
var f = p, g = I(f), y = g.top, P = g.bottom, L = g.left, B = g.right, K = g.width, q = g.height, st = void 0, A = void 0, Z = f.scrollWidth, at = f.scrollHeight, X = b(f), Yt = f.scrollLeft, vt = f.scrollTop;
|
|
2533
2533
|
f === l ? (st = K < Z && (X.overflowX === "auto" || X.overflowX === "scroll" || X.overflowX === "visible"), A = q < at && (X.overflowY === "auto" || X.overflowY === "scroll" || X.overflowY === "visible")) : (st = K < Z && (X.overflowX === "auto" || X.overflowX === "scroll"), A = q < at && (X.overflowY === "auto" || X.overflowY === "scroll"));
|
|
2534
|
-
var
|
|
2534
|
+
var qt = st && (Math.abs(B - o) <= s && Yt + K < Z) - (Math.abs(L - o) <= s && !!Yt), ht = A && (Math.abs(P - r) <= s && vt + q < at) - (Math.abs(y - r) <= s && !!vt);
|
|
2535
2535
|
if (!M[c])
|
|
2536
2536
|
for (var Ct = 0; Ct <= c; Ct++)
|
|
2537
2537
|
M[Ct] || (M[Ct] = {});
|
|
2538
|
-
(M[c].vx !=
|
|
2538
|
+
(M[c].vx != qt || M[c].vy != ht || M[c].el !== f) && (M[c].el = f, M[c].vx = qt, M[c].vy = ht, clearInterval(M[c].pid), (qt != 0 || ht != 0) && (u = !0, M[c].pid = setInterval((function() {
|
|
2539
2539
|
i && this.layer === 0 && v.active._onTouchMove(Fe);
|
|
2540
|
-
var
|
|
2541
|
-
typeof d == "function" && d.call(v.dragged.parentNode[et], wt,
|
|
2540
|
+
var Wt = M[this.layer].vy ? M[this.layer].vy * a : 0, wt = M[this.layer].vx ? M[this.layer].vx * a : 0;
|
|
2541
|
+
typeof d == "function" && d.call(v.dragged.parentNode[et], wt, Wt, e, Fe, M[this.layer].el) !== "continue" || Xi(M[this.layer].el, wt, Wt);
|
|
2542
2542
|
}).bind({
|
|
2543
2543
|
layer: c
|
|
2544
2544
|
}), 24))), c++;
|
|
@@ -2546,11 +2546,11 @@ var An = Zi(function(n, t, e, i) {
|
|
|
2546
2546
|
Dn = u;
|
|
2547
2547
|
}
|
|
2548
2548
|
}, 30), to = function(t) {
|
|
2549
|
-
var
|
|
2550
|
-
if (
|
|
2549
|
+
var n = t.originalEvent, i = t.putSortable, o = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
2550
|
+
if (n) {
|
|
2551
2551
|
var u = i || r;
|
|
2552
2552
|
a();
|
|
2553
|
-
var d =
|
|
2553
|
+
var d = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, c = document.elementFromPoint(d.clientX, d.clientY);
|
|
2554
2554
|
l(), u && !u.el.contains(c) && (s("spill"), this.onSpill({
|
|
2555
2555
|
dragEl: o,
|
|
2556
2556
|
putSortable: i
|
|
@@ -2562,14 +2562,14 @@ function zn() {
|
|
|
2562
2562
|
zn.prototype = {
|
|
2563
2563
|
startIndex: null,
|
|
2564
2564
|
dragStart: function(t) {
|
|
2565
|
-
var
|
|
2566
|
-
this.startIndex =
|
|
2565
|
+
var n = t.oldDraggableIndex;
|
|
2566
|
+
this.startIndex = n;
|
|
2567
2567
|
},
|
|
2568
2568
|
onSpill: function(t) {
|
|
2569
|
-
var
|
|
2569
|
+
var n = t.dragEl, i = t.putSortable;
|
|
2570
2570
|
this.sortable.captureAnimationState(), i && i.captureAnimationState();
|
|
2571
|
-
var o =
|
|
2572
|
-
o ? this.sortable.el.insertBefore(
|
|
2571
|
+
var o = Zt(this.sortable.el, this.startIndex, this.options);
|
|
2572
|
+
o ? this.sortable.el.insertBefore(n, o) : this.sortable.el.appendChild(n), this.sortable.animateAll(), i && i.animateAll();
|
|
2573
2573
|
},
|
|
2574
2574
|
drop: to
|
|
2575
2575
|
};
|
|
@@ -2580,30 +2580,30 @@ function Zn() {
|
|
|
2580
2580
|
}
|
|
2581
2581
|
Zn.prototype = {
|
|
2582
2582
|
onSpill: function(t) {
|
|
2583
|
-
var
|
|
2584
|
-
o.captureAnimationState(),
|
|
2583
|
+
var n = t.dragEl, i = t.putSortable, o = i || this.sortable;
|
|
2584
|
+
o.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), o.animateAll();
|
|
2585
2585
|
},
|
|
2586
2586
|
drop: to
|
|
2587
2587
|
};
|
|
2588
2588
|
yt(Zn, {
|
|
2589
2589
|
pluginName: "removeOnSpill"
|
|
2590
2590
|
});
|
|
2591
|
-
v.mount(new
|
|
2591
|
+
v.mount(new fs());
|
|
2592
2592
|
v.mount(Zn, zn);
|
|
2593
|
-
const
|
|
2594
|
-
const t =
|
|
2595
|
-
let
|
|
2596
|
-
return
|
|
2593
|
+
const gs = (e) => {
|
|
2594
|
+
const t = e.item;
|
|
2595
|
+
let n = Array.prototype.slice.call(t.parentNode.childNodes);
|
|
2596
|
+
return n = n.filter(
|
|
2597
2597
|
(i) => i.nodeType != Node.ELEMENT_NODE || !i.classList.contains("sortable-fallback")
|
|
2598
|
-
),
|
|
2599
|
-
},
|
|
2600
|
-
const a =
|
|
2601
|
-
for (const y of
|
|
2598
|
+
), n;
|
|
2599
|
+
}, ms = (e, t, n, i, o, r) => {
|
|
2600
|
+
const a = e.item.parentNode;
|
|
2601
|
+
for (const y of n)
|
|
2602
2602
|
a.appendChild(y);
|
|
2603
|
-
if (
|
|
2603
|
+
if (e.oldIndex == e.newIndex) return;
|
|
2604
2604
|
const l = i.getArray(), u = (
|
|
2605
2605
|
/** @type {Element & {layer: import("ol/layer").Layer}} */
|
|
2606
|
-
|
|
2606
|
+
e.item.querySelector("eox-layercontrol-layer").layer.get(o)
|
|
2607
2607
|
), d = l.find((y) => y.get(o) === u), c = r.dataset.layer, p = l.find(
|
|
2608
2608
|
(y) => y.get(o) == c
|
|
2609
2609
|
);
|
|
@@ -2620,30 +2620,30 @@ const ms = (n) => {
|
|
|
2620
2620
|
}
|
|
2621
2621
|
t.requestUpdate();
|
|
2622
2622
|
};
|
|
2623
|
-
function
|
|
2623
|
+
function ys(e, t, n, i) {
|
|
2624
2624
|
let o = [], r = null;
|
|
2625
|
-
|
|
2625
|
+
e._sortable = v.create(e, {
|
|
2626
2626
|
handle: ".drag-handle",
|
|
2627
2627
|
filter: ".drag-handle.disabled",
|
|
2628
2628
|
swapThreshold: 0.5,
|
|
2629
2629
|
animation: 150,
|
|
2630
2630
|
easing: "cubic-bezier(1, 0, 0, 1)",
|
|
2631
|
-
onStart: (s) => o =
|
|
2631
|
+
onStart: (s) => o = gs(s),
|
|
2632
2632
|
onMove: (s) => {
|
|
2633
2633
|
r = s.related;
|
|
2634
2634
|
},
|
|
2635
|
-
onEnd: (s) =>
|
|
2635
|
+
onEnd: (s) => ms(s, i, o, t, n, r)
|
|
2636
2636
|
});
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2639
|
-
const o =
|
|
2638
|
+
function bs(e, t, n, i) {
|
|
2639
|
+
const o = e.getArray();
|
|
2640
2640
|
let r = !1;
|
|
2641
2641
|
o.forEach((s) => {
|
|
2642
2642
|
const a = s.ol_uid;
|
|
2643
|
-
s.get(t) || (s.set(t, a), r = !0), s.get(
|
|
2643
|
+
s.get(t) || (s.set(t, a), r = !0), s.get(n) || (s.set(n, `layer ${a}`), r = !0), r && i.requestUpdate();
|
|
2644
2644
|
});
|
|
2645
2645
|
}
|
|
2646
|
-
function Xn(
|
|
2646
|
+
function Xn(e, t, n) {
|
|
2647
2647
|
let i = [];
|
|
2648
2648
|
const o = (r, s, a) => {
|
|
2649
2649
|
i = [
|
|
@@ -2663,74 +2663,64 @@ function Xn(n, t, e) {
|
|
|
2663
2663
|
)
|
|
2664
2664
|
), i;
|
|
2665
2665
|
};
|
|
2666
|
-
return o(
|
|
2666
|
+
return o(e, t, n), i;
|
|
2667
2667
|
}
|
|
2668
|
-
function
|
|
2669
|
-
if (!
|
|
2670
|
-
if (!eo(
|
|
2671
|
-
const i =
|
|
2668
|
+
function vs(e, t, n) {
|
|
2669
|
+
if (!e || !t) return !1;
|
|
2670
|
+
if (!eo(e, n)) return !0;
|
|
2671
|
+
const i = e.get("minZoom"), o = e.get("maxZoom"), r = t.getView().getZoom();
|
|
2672
2672
|
return r > i && r < o;
|
|
2673
2673
|
}
|
|
2674
|
-
function eo(
|
|
2675
|
-
const
|
|
2676
|
-
return !!(t && (
|
|
2674
|
+
function eo(e, t) {
|
|
2675
|
+
const n = e.get("minZoom"), i = e.get("maxZoom");
|
|
2676
|
+
return !!(t && (n !== -1 / 0 || i !== 1 / 0));
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2678
|
+
function ws(e, t) {
|
|
2679
2679
|
var o, r, s;
|
|
2680
|
-
return !
|
|
2680
|
+
return !e || !t ? void 0 : e.getLayers ? "group" : ((s = (o = t.getInteractions().getArray().filter((a) => a.freehand_ !== void 0).map((a) => a.source_)) == null ? void 0 : o.ol_uid) == null ? void 0 : s.includes(
|
|
2681
2681
|
// @ts-ignore
|
|
2682
|
-
|
|
2683
|
-
)) ? "draw" :
|
|
2682
|
+
e.getSource ? (r = e.getSource()) == null ? void 0 : r.ol_uid : void 0
|
|
2683
|
+
)) ? "draw" : e.declutter_ !== void 0 ? "vector" : "raster";
|
|
2684
2684
|
}
|
|
2685
|
-
function no(
|
|
2685
|
+
function no(e, t) {
|
|
2686
2686
|
var i;
|
|
2687
|
-
let
|
|
2688
|
-
for (const o in
|
|
2689
|
-
const r =
|
|
2687
|
+
let n = {};
|
|
2688
|
+
for (const o in e) {
|
|
2689
|
+
const r = e[o].type;
|
|
2690
2690
|
if (r && r !== "object")
|
|
2691
|
-
|
|
2692
|
-
else if (typeof
|
|
2691
|
+
n[o] = r === "number" ? Number(t[o]) : t[o];
|
|
2692
|
+
else if (typeof e[o] == "object" && ((i = e[o]) != null && i.properties)) {
|
|
2693
2693
|
const s = no(
|
|
2694
|
-
|
|
2694
|
+
e[o].properties,
|
|
2695
2695
|
t
|
|
2696
2696
|
);
|
|
2697
|
-
Object.keys(s).length > 0 && (
|
|
2697
|
+
Object.keys(s).length > 0 && (n[o] = s);
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
2700
|
-
return
|
|
2700
|
+
return n;
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2703
|
-
var r
|
|
2704
|
-
if (!t) return null;
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
) : (s = n.get("styles")) == null ? void 0 : s.variables;
|
|
2709
|
-
if (t.type === "style" && i)
|
|
2710
|
-
e = i;
|
|
2711
|
-
else if ((l = (a = n.getSource()) == null ? void 0 : a.getTileUrlFunction) != null && l.call(a)) {
|
|
2712
|
-
const d = new URL(n.getSource().getTileUrlFunction()([0, 0, 0]));
|
|
2713
|
-
e = Object.fromEntries(d.searchParams.entries());
|
|
2714
|
-
} else return null;
|
|
2715
|
-
const o = no(
|
|
2716
|
-
((u = t.schema) == null ? void 0 : u.properties) || t.schema,
|
|
2717
|
-
e
|
|
2702
|
+
function Es(e, t) {
|
|
2703
|
+
var r;
|
|
2704
|
+
if (!t || !e.getSource().getTileUrlFunction()) return null;
|
|
2705
|
+
const n = new URL(e.getSource().getTileUrlFunction()([0, 0, 0])), i = Object.fromEntries(n.searchParams.entries()), o = no(
|
|
2706
|
+
((r = t.schema) == null ? void 0 : r.properties) || t.schema,
|
|
2707
|
+
i
|
|
2718
2708
|
);
|
|
2719
2709
|
return Object.keys(o).length ? o : null;
|
|
2720
2710
|
}
|
|
2721
|
-
const
|
|
2722
|
-
(
|
|
2723
|
-
),
|
|
2711
|
+
const xs = (e, t) => e == null ? void 0 : e.filter(
|
|
2712
|
+
(n) => ["remove", "sort"].filter((i) => t != null && t.get("layerControlDisable") ? i !== "sort" : !0).includes(n)
|
|
2713
|
+
), Ss = (e, t) => e == null ? void 0 : e.filter((n) => {
|
|
2724
2714
|
let i = !0;
|
|
2725
|
-
return ["remove", "sort"].includes(
|
|
2726
|
-
}),
|
|
2727
|
-
<button slot="${
|
|
2728
|
-
`,
|
|
2715
|
+
return ["remove", "sort"].includes(n) && (i = !1), n === "info" && (i = t.get("description")), n === "config" && (i = t.get("layerConfig")), i;
|
|
2716
|
+
}), $s = (e, t) => x`
|
|
2717
|
+
<button slot="${e}-icon" class="icon">${t ? e : C}</button>
|
|
2718
|
+
`, _s = (e) => x`
|
|
2729
2719
|
<button
|
|
2730
2720
|
class="remove-icon icon"
|
|
2731
2721
|
@click=${() => {
|
|
2732
|
-
const { layer: t } =
|
|
2733
|
-
t == null || t.set("layerControlOptional", !0), t == null || t.setVisible(!1),
|
|
2722
|
+
const { layer: t } = e;
|
|
2723
|
+
t == null || t.set("layerControlOptional", !0), t == null || t.setVisible(!1), e.dispatchEvent(
|
|
2734
2724
|
new CustomEvent("changed", {
|
|
2735
2725
|
detail: t,
|
|
2736
2726
|
bubbles: !0
|
|
@@ -2738,16 +2728,16 @@ const Ss = (n, t) => n == null ? void 0 : n.filter(
|
|
|
2738
2728
|
);
|
|
2739
2729
|
}}
|
|
2740
2730
|
>
|
|
2741
|
-
${
|
|
2731
|
+
${e.unstyled ? "x" : C}
|
|
2742
2732
|
</button>
|
|
2743
|
-
`,
|
|
2733
|
+
`, As = (e) => x`
|
|
2744
2734
|
<span class="button sort-icon icon drag-handle">
|
|
2745
|
-
${
|
|
2735
|
+
${e ? "═" : C}
|
|
2746
2736
|
</span>
|
|
2747
|
-
`, io = (
|
|
2748
|
-
var
|
|
2737
|
+
`, io = (e) => {
|
|
2738
|
+
var n;
|
|
2749
2739
|
const t = ["layerControlHide", "layerControlOptional"];
|
|
2750
|
-
return (
|
|
2740
|
+
return (n = e == null ? void 0 : e.getArray()) == null ? void 0 : n.filter((i) => t.every((o) => !i.get(o)));
|
|
2751
2741
|
};
|
|
2752
2742
|
/**
|
|
2753
2743
|
* @license
|
|
@@ -2755,22 +2745,22 @@ const Ss = (n, t) => n == null ? void 0 : n.filter(
|
|
|
2755
2745
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2756
2746
|
*/
|
|
2757
2747
|
const oo = Ln(class extends kn {
|
|
2758
|
-
constructor(
|
|
2759
|
-
if (super(
|
|
2760
|
-
if (!
|
|
2748
|
+
constructor(e) {
|
|
2749
|
+
if (super(e), e.type !== Et.PROPERTY && e.type !== Et.ATTRIBUTE && e.type !== Et.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
2750
|
+
if (!zo(e)) throw Error("`live` bindings can only contain a single expression");
|
|
2761
2751
|
}
|
|
2762
|
-
render(
|
|
2763
|
-
return
|
|
2752
|
+
render(e) {
|
|
2753
|
+
return e;
|
|
2764
2754
|
}
|
|
2765
|
-
update(
|
|
2755
|
+
update(e, [t]) {
|
|
2766
2756
|
if (t === ot || t === C) return t;
|
|
2767
|
-
const
|
|
2768
|
-
if (
|
|
2769
|
-
if (t ===
|
|
2770
|
-
} else if (
|
|
2771
|
-
if (!!t ===
|
|
2772
|
-
} else if (
|
|
2773
|
-
return Di(
|
|
2757
|
+
const n = e.element, i = e.name;
|
|
2758
|
+
if (e.type === Et.PROPERTY) {
|
|
2759
|
+
if (t === n[i]) return ot;
|
|
2760
|
+
} else if (e.type === Et.BOOLEAN_ATTRIBUTE) {
|
|
2761
|
+
if (!!t === n.hasAttribute(i)) return ot;
|
|
2762
|
+
} else if (e.type === Et.ATTRIBUTE && n.getAttribute(i) === t + "") return ot;
|
|
2763
|
+
return Di(e), t;
|
|
2774
2764
|
}
|
|
2775
2765
|
});
|
|
2776
2766
|
/**
|
|
@@ -2788,98 +2778,51 @@ class Nn extends kn {
|
|
|
2788
2778
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
2789
2779
|
if (t === this.it) return this._t;
|
|
2790
2780
|
this.it = t;
|
|
2791
|
-
const
|
|
2792
|
-
return
|
|
2781
|
+
const n = [t];
|
|
2782
|
+
return n.raw = n, this._t = { _$litType$: this.constructor.resultType, strings: n, values: [] };
|
|
2793
2783
|
}
|
|
2794
2784
|
}
|
|
2795
2785
|
Nn.directiveName = "unsafeHTML", Nn.resultType = 1;
|
|
2796
|
-
const
|
|
2786
|
+
const Cs = Ln(Nn);
|
|
2797
2787
|
/**
|
|
2798
2788
|
* @license
|
|
2799
2789
|
* Copyright 2021 Google LLC
|
|
2800
2790
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2801
2791
|
*/
|
|
2802
|
-
function* Ne(
|
|
2803
|
-
if (
|
|
2804
|
-
let
|
|
2805
|
-
for (const i of
|
|
2792
|
+
function* Ne(e, t) {
|
|
2793
|
+
if (e !== void 0) {
|
|
2794
|
+
let n = 0;
|
|
2795
|
+
for (const i of e) yield t(i, n++);
|
|
2806
2796
|
}
|
|
2807
2797
|
}
|
|
2808
|
-
const
|
|
2798
|
+
const Ts = (e, t, n) => {
|
|
2809
2799
|
let i = t;
|
|
2810
|
-
return
|
|
2811
|
-
(...o) =>
|
|
2812
|
-
),
|
|
2800
|
+
return n.layer.getSource().getTileUrlFunction() && (i || (i = n.layer.getSource().getTileUrlFunction()), n.layer.getSource().setTileUrlFunction(
|
|
2801
|
+
(...o) => Fr(i(...o), e)
|
|
2802
|
+
), n.layer.getSource().setKey(/* @__PURE__ */ new Date())), i;
|
|
2813
2803
|
};
|
|
2814
|
-
function Os(n, t) {
|
|
2815
|
-
const e = t.get("type") === "WebGLTile" ? (
|
|
2816
|
-
/** @type {import('ol/layer/WebGLTile').default} */
|
|
2817
|
-
t.style_
|
|
2818
|
-
) : t.get("styles");
|
|
2819
|
-
let i = e == null ? void 0 : e.variables;
|
|
2820
|
-
if (i) {
|
|
2821
|
-
const o = ro(n);
|
|
2822
|
-
if (e.variables = {
|
|
2823
|
-
...i,
|
|
2824
|
-
...o
|
|
2825
|
-
}, t.get("type") === "Vector") {
|
|
2826
|
-
const r = Rs(e);
|
|
2827
|
-
t.setStyle(
|
|
2828
|
-
r
|
|
2829
|
-
);
|
|
2830
|
-
} else t.get("type") === "WebGLTile" && t.updateStyleVariables(o);
|
|
2831
|
-
}
|
|
2832
|
-
}
|
|
2833
|
-
const ro = (n) => {
|
|
2834
|
-
const t = {};
|
|
2835
|
-
for (const e in n)
|
|
2836
|
-
if (typeof n[e] == "object" && n[e] !== null) {
|
|
2837
|
-
const i = ro(
|
|
2838
|
-
/** @type {Record<string,any>} */
|
|
2839
|
-
n[e]
|
|
2840
|
-
);
|
|
2841
|
-
for (const o in i)
|
|
2842
|
-
t[o] = i == null ? void 0 : i[o];
|
|
2843
|
-
} else
|
|
2844
|
-
t[e] = n == null ? void 0 : n[e];
|
|
2845
|
-
return t;
|
|
2846
|
-
};
|
|
2847
|
-
function Rs(n) {
|
|
2848
|
-
let t = n;
|
|
2849
|
-
if ("variables" in n) {
|
|
2850
|
-
let e = JSON.stringify(n);
|
|
2851
|
-
const { variables: i } = n;
|
|
2852
|
-
for (const o in i)
|
|
2853
|
-
typeof i[o] == "number" ? e = e.replaceAll(`["var","${o}"]`, i[o]) : e = e.replaceAll(
|
|
2854
|
-
`["var","${o}"]`,
|
|
2855
|
-
`"${i[o]}"`
|
|
2856
|
-
);
|
|
2857
|
-
t = JSON.parse(e);
|
|
2858
|
-
}
|
|
2859
|
-
return t;
|
|
2860
|
-
}
|
|
2861
2804
|
var Ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2862
|
-
function
|
|
2863
|
-
return
|
|
2805
|
+
function Ps(e) {
|
|
2806
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2864
2807
|
}
|
|
2865
|
-
var
|
|
2866
|
-
return
|
|
2808
|
+
var Os = "Expected a function", mi = NaN, Rs = "[object Symbol]", Ds = /^\s+|\s+$/g, Ns = /^[-+]0x[0-9a-f]+$/i, Ms = /^0b[01]+$/i, Is = /^0o[0-7]+$/i, Hs = parseInt, Bs = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, Vs = typeof self == "object" && self && self.Object === Object && self, Ls = Bs || Vs || Function("return this")(), ks = Object.prototype, Us = ks.toString, Fs = Math.max, js = Math.min, Cn = function() {
|
|
2809
|
+
return Ls.Date.now();
|
|
2867
2810
|
};
|
|
2868
|
-
function
|
|
2811
|
+
function zs(e, t, n) {
|
|
2869
2812
|
var i, o, r, s, a, l, u = 0, d = !1, c = !1, p = !0;
|
|
2870
|
-
if (typeof
|
|
2871
|
-
throw new TypeError(
|
|
2872
|
-
t = yi(t) || 0, Mn(
|
|
2813
|
+
if (typeof e != "function")
|
|
2814
|
+
throw new TypeError(Os);
|
|
2815
|
+
t = yi(t) || 0, Mn(n) && (d = !!n.leading, c = "maxWait" in n, r = c ? Fs(yi(n.maxWait) || 0, t) : r, p = "trailing" in n ? !!n.trailing : p);
|
|
2873
2816
|
function f(A) {
|
|
2874
2817
|
var Z = i, at = o;
|
|
2875
|
-
return i = o = void 0, u = A, s =
|
|
2818
|
+
return i = o = void 0, u = A, s = e.apply(at, Z), s;
|
|
2876
2819
|
}
|
|
2877
2820
|
function g(A) {
|
|
2878
2821
|
return u = A, a = setTimeout(L, t), d ? f(A) : s;
|
|
2879
2822
|
}
|
|
2880
2823
|
function y(A) {
|
|
2881
2824
|
var Z = A - l, at = A - u, X = t - Z;
|
|
2882
|
-
return c ?
|
|
2825
|
+
return c ? js(X, r - at) : X;
|
|
2883
2826
|
}
|
|
2884
2827
|
function P(A) {
|
|
2885
2828
|
var Z = A - l, at = A - u;
|
|
@@ -2912,35 +2855,35 @@ function Ys(n, t, e) {
|
|
|
2912
2855
|
}
|
|
2913
2856
|
return st.cancel = K, st.flush = q, st;
|
|
2914
2857
|
}
|
|
2915
|
-
function Mn(
|
|
2916
|
-
var t = typeof
|
|
2917
|
-
return !!
|
|
2858
|
+
function Mn(e) {
|
|
2859
|
+
var t = typeof e;
|
|
2860
|
+
return !!e && (t == "object" || t == "function");
|
|
2918
2861
|
}
|
|
2919
|
-
function
|
|
2920
|
-
return !!
|
|
2862
|
+
function Zs(e) {
|
|
2863
|
+
return !!e && typeof e == "object";
|
|
2921
2864
|
}
|
|
2922
|
-
function
|
|
2923
|
-
return typeof
|
|
2865
|
+
function Xs(e) {
|
|
2866
|
+
return typeof e == "symbol" || Zs(e) && Us.call(e) == Rs;
|
|
2924
2867
|
}
|
|
2925
|
-
function yi(
|
|
2926
|
-
if (typeof
|
|
2927
|
-
return
|
|
2928
|
-
if (
|
|
2868
|
+
function yi(e) {
|
|
2869
|
+
if (typeof e == "number")
|
|
2870
|
+
return e;
|
|
2871
|
+
if (Xs(e))
|
|
2929
2872
|
return mi;
|
|
2930
|
-
if (Mn(
|
|
2931
|
-
var t = typeof
|
|
2932
|
-
|
|
2933
|
-
}
|
|
2934
|
-
if (typeof
|
|
2935
|
-
return
|
|
2936
|
-
|
|
2937
|
-
var
|
|
2938
|
-
return
|
|
2939
|
-
}
|
|
2940
|
-
var
|
|
2941
|
-
const
|
|
2942
|
-
var
|
|
2943
|
-
class
|
|
2873
|
+
if (Mn(e)) {
|
|
2874
|
+
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
2875
|
+
e = Mn(t) ? t + "" : t;
|
|
2876
|
+
}
|
|
2877
|
+
if (typeof e != "string")
|
|
2878
|
+
return e === 0 ? e : +e;
|
|
2879
|
+
e = e.replace(Ds, "");
|
|
2880
|
+
var n = Ms.test(e);
|
|
2881
|
+
return n || Is.test(e) ? Hs(e.slice(2), n ? 2 : 8) : Ns.test(e) ? mi : +e;
|
|
2882
|
+
}
|
|
2883
|
+
var Ys = zs;
|
|
2884
|
+
const ro = /* @__PURE__ */ Ps(Ys);
|
|
2885
|
+
var fe, ge, me, je, ao, ze, Ze;
|
|
2886
|
+
class so extends nt {
|
|
2944
2887
|
constructor() {
|
|
2945
2888
|
super();
|
|
2946
2889
|
T(this, je);
|
|
@@ -2949,7 +2892,7 @@ class ao extends nt {
|
|
|
2949
2892
|
*
|
|
2950
2893
|
* @type {{[key: string]: any}}
|
|
2951
2894
|
*/
|
|
2952
|
-
T(this,
|
|
2895
|
+
T(this, fe, {});
|
|
2953
2896
|
/**
|
|
2954
2897
|
* data input by the user
|
|
2955
2898
|
*
|
|
@@ -2964,7 +2907,7 @@ class ao extends nt {
|
|
|
2964
2907
|
T(this, me);
|
|
2965
2908
|
T(this, ze, "");
|
|
2966
2909
|
T(this, Ze, "");
|
|
2967
|
-
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.debouncedDataChange =
|
|
2910
|
+
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.debouncedDataChange = ro(k(this, je, ao), 1e3, {
|
|
2968
2911
|
leading: !0
|
|
2969
2912
|
});
|
|
2970
2913
|
}
|
|
@@ -2978,16 +2921,16 @@ class ao extends nt {
|
|
|
2978
2921
|
* Renders a JSON form for configuration options of a layer.
|
|
2979
2922
|
*/
|
|
2980
2923
|
render() {
|
|
2981
|
-
|
|
2982
|
-
const
|
|
2924
|
+
Jt(this, ge, Es(this.layer, this.layerConfig)), customElements.get("eox-jsonform") || console.error("Please import @eox/jsonform in order to use layerconfig");
|
|
2925
|
+
const n = {
|
|
2983
2926
|
disable_edit_json: !0,
|
|
2984
2927
|
disable_collapse: !0,
|
|
2985
2928
|
disable_properties: !0
|
|
2986
2929
|
};
|
|
2987
2930
|
return x`
|
|
2988
2931
|
<style>
|
|
2989
|
-
${
|
|
2990
|
-
${!this.unstyled &&
|
|
2932
|
+
${R(this, ze)}
|
|
2933
|
+
${!this.unstyled && R(this, Ze)}
|
|
2991
2934
|
</style>
|
|
2992
2935
|
${rt(
|
|
2993
2936
|
this.layerConfig,
|
|
@@ -2995,8 +2938,8 @@ class ao extends nt {
|
|
|
2995
2938
|
<!-- Render a JSON form for layer configuration -->
|
|
2996
2939
|
<eox-jsonform
|
|
2997
2940
|
.schema=${this.layerConfig.schema}
|
|
2998
|
-
.value=${
|
|
2999
|
-
.options=${
|
|
2941
|
+
.value=${R(this, ge)}
|
|
2942
|
+
.options=${n}
|
|
3000
2943
|
@change=${this.debouncedDataChange}
|
|
3001
2944
|
></eox-jsonform>
|
|
3002
2945
|
`
|
|
@@ -3004,23 +2947,19 @@ class ao extends nt {
|
|
|
3004
2947
|
`;
|
|
3005
2948
|
}
|
|
3006
2949
|
}
|
|
3007
|
-
|
|
2950
|
+
fe = new WeakMap(), ge = new WeakMap(), me = new WeakMap(), je = new WeakSet(), /**
|
|
3008
2951
|
* Handles changes in eox-jsonform values.
|
|
3009
2952
|
*
|
|
3010
2953
|
* @param {{ detail: { value: string; }; }} e
|
|
3011
2954
|
*/
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
)} does not support styles configuration`
|
|
3017
|
-
) : (Kt(this, me, Ps(
|
|
3018
|
-
O(this, zt),
|
|
3019
|
-
O(this, me),
|
|
2955
|
+
ao = function(n) {
|
|
2956
|
+
Jt(this, fe, n.detail), Jt(this, me, Ts(
|
|
2957
|
+
R(this, fe),
|
|
2958
|
+
R(this, me),
|
|
3020
2959
|
this
|
|
3021
|
-
)), this.requestUpdate()
|
|
2960
|
+
)), this.requestUpdate();
|
|
3022
2961
|
}, ze = new WeakMap(), Ze = new WeakMap(), // Define static properties for the component
|
|
3023
|
-
H(
|
|
2962
|
+
H(so, "properties", {
|
|
3024
2963
|
layer: { attribute: !1 },
|
|
3025
2964
|
unstyled: { type: Boolean },
|
|
3026
2965
|
noShadow: { type: Boolean },
|
|
@@ -3028,14 +2967,14 @@ H(ao, "properties", {
|
|
|
3028
2967
|
});
|
|
3029
2968
|
customElements.define(
|
|
3030
2969
|
"eox-layercontrol-layerconfig",
|
|
3031
|
-
|
|
2970
|
+
so
|
|
3032
2971
|
);
|
|
3033
2972
|
var ye, Xe, Ye;
|
|
3034
|
-
class
|
|
2973
|
+
class lo extends nt {
|
|
3035
2974
|
constructor() {
|
|
3036
2975
|
super();
|
|
3037
2976
|
/** @param {number} index */
|
|
3038
|
-
T(this, ye, (
|
|
2977
|
+
T(this, ye, (n) => this.selectedTab === n && "highlighted");
|
|
3039
2978
|
T(this, Xe, `
|
|
3040
2979
|
.tabbed figure {
|
|
3041
2980
|
margin: 0;
|
|
@@ -3092,11 +3031,11 @@ class uo extends nt {
|
|
|
3092
3031
|
* It sets up navigation for switching between tabs and offers customizable icons for tabs and actions.
|
|
3093
3032
|
*/
|
|
3094
3033
|
render() {
|
|
3095
|
-
const
|
|
3034
|
+
const n = this.tabs, i = this.actions, o = i.length + n.length > 1;
|
|
3096
3035
|
return x`
|
|
3097
3036
|
<style>
|
|
3098
|
-
${
|
|
3099
|
-
${!this.unstyled &&
|
|
3037
|
+
${R(this, Xe)}
|
|
3038
|
+
${!this.unstyled && R(this, Ye)}
|
|
3100
3039
|
</style>
|
|
3101
3040
|
<div class="tabbed">
|
|
3102
3041
|
<!-- Navigation for tabs and actions -->
|
|
@@ -3107,10 +3046,10 @@ class uo extends nt {
|
|
|
3107
3046
|
<div>
|
|
3108
3047
|
<!-- Labels for tabs -->
|
|
3109
3048
|
${Ne(
|
|
3110
|
-
|
|
3049
|
+
n,
|
|
3111
3050
|
(r, s) => x`
|
|
3112
3051
|
<label
|
|
3113
|
-
class=${
|
|
3052
|
+
class=${R(this, ye).call(this, s)}
|
|
3114
3053
|
@click=${() => this.selectedTab = s}
|
|
3115
3054
|
>
|
|
3116
3055
|
<!-- Customizable icon for each tab -->
|
|
@@ -3137,9 +3076,9 @@ class uo extends nt {
|
|
|
3137
3076
|
<figure>
|
|
3138
3077
|
<!-- Content for each tab -->
|
|
3139
3078
|
${Ne(
|
|
3140
|
-
|
|
3079
|
+
n,
|
|
3141
3080
|
(r, s) => x`
|
|
3142
|
-
<div class="tab ${
|
|
3081
|
+
<div class="tab ${R(this, ye).call(this, s)}">
|
|
3143
3082
|
<!-- Content slot for each tab -->
|
|
3144
3083
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
3145
3084
|
</div>
|
|
@@ -3151,15 +3090,15 @@ class uo extends nt {
|
|
|
3151
3090
|
}
|
|
3152
3091
|
}
|
|
3153
3092
|
ye = new WeakMap(), Xe = new WeakMap(), Ye = new WeakMap(), // Define static properties for the component
|
|
3154
|
-
H(
|
|
3093
|
+
H(lo, "properties", {
|
|
3155
3094
|
actions: { attribute: !1 },
|
|
3156
3095
|
selectedTab: { state: !0 },
|
|
3157
3096
|
tabs: { attribute: !1 },
|
|
3158
3097
|
unstyled: { type: Boolean },
|
|
3159
3098
|
noShadow: { type: Boolean }
|
|
3160
3099
|
});
|
|
3161
|
-
customElements.define("eox-layercontrol-tabs",
|
|
3162
|
-
const
|
|
3100
|
+
customElements.define("eox-layercontrol-tabs", lo);
|
|
3101
|
+
const qs = `
|
|
3163
3102
|
button,
|
|
3164
3103
|
.button {
|
|
3165
3104
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -3283,7 +3222,7 @@ button.smallest.icon::before {
|
|
|
3283
3222
|
width: 16px;
|
|
3284
3223
|
padding: 0px;
|
|
3285
3224
|
}
|
|
3286
|
-
`,
|
|
3225
|
+
`, Ws = `
|
|
3287
3226
|
input[type=radio] {
|
|
3288
3227
|
appearance: none;
|
|
3289
3228
|
-webkit-appearance: none;
|
|
@@ -3311,7 +3250,7 @@ input[type=radio]:checked:after {
|
|
|
3311
3250
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
3312
3251
|
|
|
3313
3252
|
}
|
|
3314
|
-
`,
|
|
3253
|
+
`, uo = `
|
|
3315
3254
|
input[type=checkbox] {
|
|
3316
3255
|
appearance: none;
|
|
3317
3256
|
-webkit-appearance: none;
|
|
@@ -3334,7 +3273,7 @@ input[type=checkbox]:checked:after {
|
|
|
3334
3273
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
3335
3274
|
|
|
3336
3275
|
}
|
|
3337
|
-
`,
|
|
3276
|
+
`, Gs = `
|
|
3338
3277
|
input[type="range"] {
|
|
3339
3278
|
-webkit-appearance: none;
|
|
3340
3279
|
width: 90%;
|
|
@@ -3413,13 +3352,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
3413
3352
|
}
|
|
3414
3353
|
`;
|
|
3415
3354
|
var qe, We;
|
|
3416
|
-
class
|
|
3355
|
+
class co extends nt {
|
|
3417
3356
|
constructor() {
|
|
3418
3357
|
super();
|
|
3419
3358
|
// Initializes '_removeButton' invoking 'removeButton' function with 'this' context.
|
|
3420
|
-
H(this, "_removeButton", () =>
|
|
3359
|
+
H(this, "_removeButton", () => _s(this));
|
|
3421
3360
|
// Initializes '_sortButton' invoking 'sortButton' function with 'unstyled' property as a parameter.
|
|
3422
|
-
H(this, "_sortButton", () =>
|
|
3361
|
+
H(this, "_sortButton", () => As(this.unstyled));
|
|
3423
3362
|
/**
|
|
3424
3363
|
* Initializes '_button' as a function accepting 'tool' parameter to generate a Button.
|
|
3425
3364
|
* Uses 'this.unstyled' as a context parameter for Button generation.
|
|
@@ -3427,13 +3366,13 @@ class ho extends nt {
|
|
|
3427
3366
|
* @param {string} tool - Tool parameter for Button generation.
|
|
3428
3367
|
* @returns {import("lit").HTMLTemplateResult} - The generated Button element.
|
|
3429
3368
|
*/
|
|
3430
|
-
H(this, "_button", (
|
|
3369
|
+
H(this, "_button", (n) => $s(n, this.unstyled));
|
|
3431
3370
|
T(this, qe, "");
|
|
3432
3371
|
T(this, We, `
|
|
3433
|
-
${
|
|
3434
|
-
${
|
|
3435
|
-
${
|
|
3436
|
-
${
|
|
3372
|
+
${qs}
|
|
3373
|
+
${Ws}
|
|
3374
|
+
${uo}
|
|
3375
|
+
${Gs}
|
|
3437
3376
|
.drag-handle {
|
|
3438
3377
|
cursor: n-resize;
|
|
3439
3378
|
}
|
|
@@ -3536,14 +3475,14 @@ class ho extends nt {
|
|
|
3536
3475
|
}
|
|
3537
3476
|
render() {
|
|
3538
3477
|
var l;
|
|
3539
|
-
const
|
|
3478
|
+
const n = xs(this.tools, this.layer), i = Ss(this.tools, this.layer), o = this[`_${n == null ? void 0 : n[0]}Button`] ? (
|
|
3540
3479
|
// @ts-ignore
|
|
3541
|
-
this[`_${
|
|
3542
|
-
) : C, r = ((l = this.tools) == null ? void 0 : l.length) === 1 ? `${this.tools[0]}-icon` : "", s =
|
|
3480
|
+
this[`_${n == null ? void 0 : n[0]}Button`]()
|
|
3481
|
+
) : C, r = ((l = this.tools) == null ? void 0 : l.length) === 1 ? `${this.tools[0]}-icon` : "", s = n == null ? void 0 : n.length, a = i == null ? void 0 : i.length;
|
|
3543
3482
|
return x`
|
|
3544
3483
|
<style>
|
|
3545
|
-
${
|
|
3546
|
-
${!this.unstyled &&
|
|
3484
|
+
${R(this, qe)}
|
|
3485
|
+
${!this.unstyled && R(this, We)}
|
|
3547
3486
|
</style>
|
|
3548
3487
|
${rt(
|
|
3549
3488
|
s + a > 0,
|
|
@@ -3567,7 +3506,7 @@ class ho extends nt {
|
|
|
3567
3506
|
</summary>
|
|
3568
3507
|
<eox-layercontrol-tabs
|
|
3569
3508
|
.noShadow=${!1}
|
|
3570
|
-
.actions=${
|
|
3509
|
+
.actions=${n}
|
|
3571
3510
|
.tabs=${i}
|
|
3572
3511
|
.unstyled=${this.unstyled}
|
|
3573
3512
|
>
|
|
@@ -3575,7 +3514,7 @@ class ho extends nt {
|
|
|
3575
3514
|
${Ne(i, (d) => this._button(d))}
|
|
3576
3515
|
|
|
3577
3516
|
<div slot="info-content">
|
|
3578
|
-
${
|
|
3517
|
+
${Cs(this.layer.get("description"))}
|
|
3579
3518
|
</div>
|
|
3580
3519
|
<div slot="opacity-content">
|
|
3581
3520
|
<!-- Input for opacity -->
|
|
@@ -3617,7 +3556,7 @@ class ho extends nt {
|
|
|
3617
3556
|
}
|
|
3618
3557
|
}
|
|
3619
3558
|
qe = new WeakMap(), We = new WeakMap(), // Define static properties for the component
|
|
3620
|
-
H(
|
|
3559
|
+
H(co, "properties", {
|
|
3621
3560
|
layer: { attribute: !1 },
|
|
3622
3561
|
tools: { attribute: !1 },
|
|
3623
3562
|
unstyled: { type: Boolean },
|
|
@@ -3625,37 +3564,37 @@ H(ho, "properties", {
|
|
|
3625
3564
|
});
|
|
3626
3565
|
customElements.define(
|
|
3627
3566
|
"eox-layercontrol-layer-tools",
|
|
3628
|
-
|
|
3567
|
+
co
|
|
3629
3568
|
);
|
|
3630
|
-
const
|
|
3569
|
+
const Js = (e) => {
|
|
3631
3570
|
const t = () => {
|
|
3632
|
-
const
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3571
|
+
const n = vs(
|
|
3572
|
+
e.layer,
|
|
3573
|
+
e.map,
|
|
3574
|
+
e.showLayerZoomState
|
|
3636
3575
|
);
|
|
3637
3576
|
let i = !1;
|
|
3638
|
-
!
|
|
3577
|
+
!n && e.currLayerVisibilityBasedOnZoom ? (e.currLayerVisibilityBasedOnZoom = !1, i = !0) : n && !e.currLayerVisibilityBasedOnZoom && (e.currLayerVisibilityBasedOnZoom = !0, i = !0), i && (e.requestUpdate(), e.dispatchEvent(
|
|
3639
3578
|
new CustomEvent("change:resolution", { bubbles: !0 })
|
|
3640
3579
|
));
|
|
3641
3580
|
};
|
|
3642
3581
|
eo(
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
) && (t(),
|
|
3646
|
-
},
|
|
3647
|
-
const
|
|
3648
|
-
|
|
3582
|
+
e.layer,
|
|
3583
|
+
e.showLayerZoomState
|
|
3584
|
+
) && (t(), e.map.getView().on("change:resolution", () => t()));
|
|
3585
|
+
}, Ks = (e, t) => {
|
|
3586
|
+
const n = t.layer;
|
|
3587
|
+
n.setVisible(e.target.checked), e.target.checked && n.get("layerControlExclusive") && t.closest(
|
|
3649
3588
|
".layers > ul"
|
|
3650
3589
|
).querySelectorAll("eox-layercontrol-layer").forEach((o) => {
|
|
3651
3590
|
var r;
|
|
3652
|
-
o.layer !==
|
|
3591
|
+
o.layer !== n && ((r = o.layer) != null && r.get("layerControlExclusive")) && (o.layer.setVisible(!1), o.requestUpdate());
|
|
3653
3592
|
}), t.dispatchEvent(
|
|
3654
|
-
new CustomEvent("changed", { bubbles: !0, detail:
|
|
3593
|
+
new CustomEvent("changed", { bubbles: !0, detail: n })
|
|
3655
3594
|
), t.requestUpdate();
|
|
3656
3595
|
};
|
|
3657
|
-
var At, Me,
|
|
3658
|
-
class
|
|
3596
|
+
var At, Me, po, Ge, Je;
|
|
3597
|
+
class ho extends nt {
|
|
3659
3598
|
constructor() {
|
|
3660
3599
|
super();
|
|
3661
3600
|
T(this, At);
|
|
@@ -3667,7 +3606,7 @@ class po extends nt {
|
|
|
3667
3606
|
H(this, "currLayerVisibilityBasedOnZoom", !0);
|
|
3668
3607
|
T(this, Ge, "");
|
|
3669
3608
|
T(this, Je, `
|
|
3670
|
-
${
|
|
3609
|
+
${uo}
|
|
3671
3610
|
eox-layercontrol-layer {
|
|
3672
3611
|
width: 100%;
|
|
3673
3612
|
}
|
|
@@ -3721,7 +3660,7 @@ class po extends nt {
|
|
|
3721
3660
|
* and register "change:resolution" ones at the beginning if `showLayerZoomState` is present
|
|
3722
3661
|
*/
|
|
3723
3662
|
firstUpdated() {
|
|
3724
|
-
|
|
3663
|
+
Js(this);
|
|
3725
3664
|
}
|
|
3726
3665
|
/**
|
|
3727
3666
|
* Renders layer controls and tools with conditional display based on certain properties.
|
|
@@ -3730,11 +3669,11 @@ class po extends nt {
|
|
|
3730
3669
|
*/
|
|
3731
3670
|
render() {
|
|
3732
3671
|
var l;
|
|
3733
|
-
const
|
|
3672
|
+
const n = this.layer.getVisible(), i = n ? "visible" : "", o = this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible", r = k(this, At, Me).call(this, "layerControlDisable") ? "disabled" : "", s = k(this, At, Me).call(this, "layerControlExclusive") ? "radio" : "checkbox", a = ((l = this.tools) == null ? void 0 : l.length) > 0;
|
|
3734
3673
|
return x`
|
|
3735
3674
|
<style>
|
|
3736
|
-
${
|
|
3737
|
-
${!this.unstyled &&
|
|
3675
|
+
${R(this, Ge)}
|
|
3676
|
+
${!this.unstyled && R(this, Je)}
|
|
3738
3677
|
</style>
|
|
3739
3678
|
${rt(
|
|
3740
3679
|
this.layer,
|
|
@@ -3745,8 +3684,8 @@ class po extends nt {
|
|
|
3745
3684
|
<!-- Input element for layer visibility -->
|
|
3746
3685
|
<input
|
|
3747
3686
|
type=${s}
|
|
3748
|
-
.checked=${oo(
|
|
3749
|
-
@click=${k(this, At,
|
|
3687
|
+
.checked=${oo(n)}
|
|
3688
|
+
@click=${k(this, At, po)}
|
|
3750
3689
|
/>
|
|
3751
3690
|
|
|
3752
3691
|
<!-- Layer title -->
|
|
@@ -3776,18 +3715,18 @@ At = new WeakSet(), /**
|
|
|
3776
3715
|
* @param {string} key - The key for the layer property.
|
|
3777
3716
|
* @returns {any} - The value of the layer property if exists, otherwise undefined.
|
|
3778
3717
|
*/
|
|
3779
|
-
Me = function(
|
|
3718
|
+
Me = function(n) {
|
|
3780
3719
|
var i;
|
|
3781
|
-
return (i = this.layer) == null ? void 0 : i.get(
|
|
3720
|
+
return (i = this.layer) == null ? void 0 : i.get(n);
|
|
3782
3721
|
}, /**
|
|
3783
3722
|
* Handles the click event on the input element triggering the method.
|
|
3784
3723
|
*
|
|
3785
3724
|
* @param {{target: { checked: boolean }}} evt - The input change event.
|
|
3786
3725
|
*/
|
|
3787
|
-
|
|
3788
|
-
|
|
3726
|
+
po = function(n) {
|
|
3727
|
+
Ks(n, this);
|
|
3789
3728
|
}, Ge = new WeakMap(), Je = new WeakMap(), // Define static properties for the component
|
|
3790
|
-
H(
|
|
3729
|
+
H(ho, "properties", {
|
|
3791
3730
|
layer: { attribute: !1 },
|
|
3792
3731
|
map: { attribute: !1, state: !0 },
|
|
3793
3732
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -3796,9 +3735,9 @@ H(po, "properties", {
|
|
|
3796
3735
|
unstyled: { type: Boolean },
|
|
3797
3736
|
noShadow: { type: Boolean }
|
|
3798
3737
|
});
|
|
3799
|
-
customElements.define("eox-layercontrol-layer",
|
|
3738
|
+
customElements.define("eox-layercontrol-layer", ho);
|
|
3800
3739
|
var Ke, Qe;
|
|
3801
|
-
class
|
|
3740
|
+
class fo extends nt {
|
|
3802
3741
|
constructor() {
|
|
3803
3742
|
super();
|
|
3804
3743
|
T(this, Ke, "");
|
|
@@ -3842,20 +3781,20 @@ class go extends nt {
|
|
|
3842
3781
|
*/
|
|
3843
3782
|
render() {
|
|
3844
3783
|
var o, r;
|
|
3845
|
-
const
|
|
3784
|
+
const n = !!((o = this.group) != null && o.get("layerControlExpand")), i = (r = io(
|
|
3846
3785
|
this.group.getLayers()
|
|
3847
3786
|
)) == null ? void 0 : r.length;
|
|
3848
3787
|
return x`
|
|
3849
3788
|
<style>
|
|
3850
|
-
${
|
|
3851
|
-
${!this.unstyled &&
|
|
3789
|
+
${R(this, Ke)}
|
|
3790
|
+
${!this.unstyled && R(this, Qe)}
|
|
3852
3791
|
</style>
|
|
3853
3792
|
${rt(
|
|
3854
3793
|
this.group,
|
|
3855
3794
|
() => x`
|
|
3856
3795
|
<!-- Render the details element with the layer control -->
|
|
3857
3796
|
<details
|
|
3858
|
-
open=${
|
|
3797
|
+
open=${n || C}
|
|
3859
3798
|
data-children-length=${i}
|
|
3860
3799
|
>
|
|
3861
3800
|
<summary>
|
|
@@ -3891,7 +3830,7 @@ class go extends nt {
|
|
|
3891
3830
|
}
|
|
3892
3831
|
}
|
|
3893
3832
|
Ke = new WeakMap(), Qe = new WeakMap(), // Define static properties for the component
|
|
3894
|
-
H(
|
|
3833
|
+
H(fo, "properties", {
|
|
3895
3834
|
group: { attribute: !1 },
|
|
3896
3835
|
idProperty: { attribute: "id-property" },
|
|
3897
3836
|
map: { attribute: !1, state: !0 },
|
|
@@ -3903,26 +3842,26 @@ H(go, "properties", {
|
|
|
3903
3842
|
});
|
|
3904
3843
|
customElements.define(
|
|
3905
3844
|
"eox-layercontrol-layer-group",
|
|
3906
|
-
|
|
3845
|
+
fo
|
|
3907
3846
|
);
|
|
3908
|
-
const
|
|
3909
|
-
const { layers: t, idProperty:
|
|
3910
|
-
|
|
3847
|
+
const Qs = (e) => {
|
|
3848
|
+
const { layers: t, idProperty: n, titleProperty: i, renderRoot: o } = e, r = ro(() => {
|
|
3849
|
+
e.requestUpdate(), e.dispatchEvent(
|
|
3911
3850
|
new CustomEvent("changed", { bubbles: !0 })
|
|
3912
3851
|
);
|
|
3913
3852
|
}, 50), s = () => r();
|
|
3914
3853
|
if (t && (t.hasListener("change:length") && (t == null || t.un("change:length", s)), t.on("change:length", s), t)) {
|
|
3915
3854
|
const a = o.querySelector("ul");
|
|
3916
|
-
|
|
3855
|
+
bs(
|
|
3917
3856
|
t,
|
|
3918
|
-
|
|
3857
|
+
n,
|
|
3919
3858
|
i,
|
|
3920
|
-
|
|
3921
|
-
),
|
|
3859
|
+
e
|
|
3860
|
+
), ys(a, t, n, e);
|
|
3922
3861
|
}
|
|
3923
3862
|
};
|
|
3924
3863
|
var tn, en;
|
|
3925
|
-
class
|
|
3864
|
+
class go extends nt {
|
|
3926
3865
|
constructor() {
|
|
3927
3866
|
super();
|
|
3928
3867
|
T(this, tn, "");
|
|
@@ -3961,7 +3900,7 @@ class mo extends nt {
|
|
|
3961
3900
|
* Executes specific logic after the initial render of the component.
|
|
3962
3901
|
*/
|
|
3963
3902
|
firstUpdated() {
|
|
3964
|
-
|
|
3903
|
+
Qs(this);
|
|
3965
3904
|
}
|
|
3966
3905
|
/**
|
|
3967
3906
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -3974,23 +3913,23 @@ class mo extends nt {
|
|
|
3974
3913
|
* layer groups or individual layers accordingly. Utilizes conditional rendering and iterates through available layers.
|
|
3975
3914
|
*/
|
|
3976
3915
|
render() {
|
|
3977
|
-
const
|
|
3916
|
+
const n = this.layers ? io(this.layers).reverse() : [];
|
|
3978
3917
|
return x`
|
|
3979
3918
|
<style>
|
|
3980
|
-
${
|
|
3981
|
-
${!this.unstyled &&
|
|
3919
|
+
${R(this, tn)}
|
|
3920
|
+
${!this.unstyled && R(this, en)}
|
|
3982
3921
|
</style>
|
|
3983
3922
|
<ul>
|
|
3984
3923
|
${rt(
|
|
3985
3924
|
this.layers,
|
|
3986
3925
|
() => x`
|
|
3987
|
-
${
|
|
3988
|
-
|
|
3926
|
+
${Yo(
|
|
3927
|
+
n,
|
|
3989
3928
|
(i) => i,
|
|
3990
3929
|
(i) => x`
|
|
3991
3930
|
<li
|
|
3992
3931
|
data-layer="${i.get(this.idProperty)}"
|
|
3993
|
-
data-type="${
|
|
3932
|
+
data-type="${ws(i, this.map)}"
|
|
3994
3933
|
>
|
|
3995
3934
|
${/** Checks if the layer is a group or individual layer and renders accordingly */
|
|
3996
3935
|
/** @type {import("ol/layer").Group} */
|
|
@@ -4029,7 +3968,7 @@ class mo extends nt {
|
|
|
4029
3968
|
}
|
|
4030
3969
|
}
|
|
4031
3970
|
tn = new WeakMap(), en = new WeakMap(), // Define static properties for the component
|
|
4032
|
-
H(
|
|
3971
|
+
H(go, "properties", {
|
|
4033
3972
|
idProperty: { attribute: "id-property" },
|
|
4034
3973
|
layers: { attribute: !1 },
|
|
4035
3974
|
map: { attribute: !1, state: !0 },
|
|
@@ -4039,31 +3978,31 @@ H(mo, "properties", {
|
|
|
4039
3978
|
unstyled: { type: Boolean },
|
|
4040
3979
|
noShadow: { type: Boolean }
|
|
4041
3980
|
});
|
|
4042
|
-
customElements.define("eox-layercontrol-layer-list",
|
|
4043
|
-
const
|
|
4044
|
-
const t =
|
|
3981
|
+
customElements.define("eox-layercontrol-layer-list", go);
|
|
3982
|
+
const ta = (e) => {
|
|
3983
|
+
const t = e.querySelector(
|
|
4045
3984
|
"select[name=optional]"
|
|
4046
|
-
),
|
|
4047
|
-
|
|
3985
|
+
), n = t ? t.value : null, i = Xn(
|
|
3986
|
+
e.layers.getArray(),
|
|
4048
3987
|
"layerControlOptional",
|
|
4049
3988
|
!0
|
|
4050
3989
|
).find(
|
|
4051
3990
|
(o) => (
|
|
4052
3991
|
// @ts-ignore
|
|
4053
|
-
(o.get(
|
|
3992
|
+
(o.get(e.idProperty) || o.ol_uid) === n
|
|
4054
3993
|
)
|
|
4055
3994
|
);
|
|
4056
|
-
i == null || i.set("layerControlOptional", !1), i == null || i.setVisible(!0),
|
|
3995
|
+
i == null || i.set("layerControlOptional", !1), i == null || i.setVisible(!0), e.dispatchEvent(
|
|
4057
3996
|
new CustomEvent("changed", { bubbles: !0 })
|
|
4058
|
-
),
|
|
3997
|
+
), e.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(
|
|
4059
3998
|
(o) => (
|
|
4060
3999
|
/** @type {import("lit").LitElement} */
|
|
4061
4000
|
o.requestUpdate()
|
|
4062
4001
|
)
|
|
4063
|
-
),
|
|
4002
|
+
), e.requestUpdate();
|
|
4064
4003
|
};
|
|
4065
|
-
var nn,
|
|
4066
|
-
class
|
|
4004
|
+
var nn, yo;
|
|
4005
|
+
class mo extends nt {
|
|
4067
4006
|
constructor() {
|
|
4068
4007
|
super();
|
|
4069
4008
|
T(this, nn);
|
|
@@ -4081,7 +4020,7 @@ class yo extends nt {
|
|
|
4081
4020
|
* Generates dropdown options based on the extracted layer information.
|
|
4082
4021
|
*/
|
|
4083
4022
|
render() {
|
|
4084
|
-
const
|
|
4023
|
+
const n = Xn(
|
|
4085
4024
|
this.layers.getArray(),
|
|
4086
4025
|
"layerControlOptional",
|
|
4087
4026
|
!0
|
|
@@ -4098,14 +4037,14 @@ class yo extends nt {
|
|
|
4098
4037
|
</option>
|
|
4099
4038
|
|
|
4100
4039
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
4101
|
-
${
|
|
4040
|
+
${n.map((i) => {
|
|
4102
4041
|
const o = i.get(this.idProperty) || i.ol_uid, r = i.get(this.titleProperty), s = `layer ${i.get(this.idProperty)}`;
|
|
4103
4042
|
return x` <option value="${o}">${r || s}</option> `;
|
|
4104
4043
|
})}
|
|
4105
4044
|
</select>
|
|
4106
4045
|
|
|
4107
4046
|
<!-- Button to handle adding layers -->
|
|
4108
|
-
<button @click="${k(this, nn,
|
|
4047
|
+
<button @click="${k(this, nn, yo)}">add</button>
|
|
4109
4048
|
`;
|
|
4110
4049
|
}
|
|
4111
4050
|
}
|
|
@@ -4113,10 +4052,10 @@ nn = new WeakSet(), /**
|
|
|
4113
4052
|
* Handles the addition of selected layers to a list.
|
|
4114
4053
|
* Invokes the 'addToListMethod' with the current context.
|
|
4115
4054
|
*/
|
|
4116
|
-
|
|
4117
|
-
|
|
4055
|
+
yo = function() {
|
|
4056
|
+
ta(this);
|
|
4118
4057
|
}, // Define static properties for the component
|
|
4119
|
-
H(
|
|
4058
|
+
H(mo, "properties", {
|
|
4120
4059
|
idProperty: { attribute: "id-property" },
|
|
4121
4060
|
layers: { attribute: !1 },
|
|
4122
4061
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -4125,40 +4064,40 @@ H(yo, "properties", {
|
|
|
4125
4064
|
});
|
|
4126
4065
|
customElements.define(
|
|
4127
4066
|
"eox-layercontrol-optional-list",
|
|
4128
|
-
|
|
4067
|
+
mo
|
|
4129
4068
|
);
|
|
4130
|
-
const
|
|
4131
|
-
t.jsonInput =
|
|
4132
|
-
}, bi = (
|
|
4069
|
+
const ea = (e, t) => {
|
|
4070
|
+
t.jsonInput = e.target.value, t.requestUpdate();
|
|
4071
|
+
}, bi = (e) => {
|
|
4133
4072
|
const t = JSON.parse(
|
|
4134
|
-
`{"data":${ki(
|
|
4073
|
+
`{"data":${ki(e.jsonInput)}}`
|
|
4135
4074
|
);
|
|
4136
|
-
Array.isArray(t.data) ? t.data.forEach((
|
|
4137
|
-
|
|
4138
|
-
}) :
|
|
4139
|
-
},
|
|
4140
|
-
t.urlInput =
|
|
4075
|
+
Array.isArray(t.data) ? t.data.forEach((n) => {
|
|
4076
|
+
e.eoxMap.addOrUpdateLayer(n);
|
|
4077
|
+
}) : e.eoxMap.addOrUpdateLayer(t.data), e.jsonInput = null, e.requestUpdate();
|
|
4078
|
+
}, na = (e, t) => {
|
|
4079
|
+
t.urlInput = e.target.value, t.requestUpdate();
|
|
4141
4080
|
};
|
|
4142
|
-
async function
|
|
4143
|
-
const t =
|
|
4144
|
-
if (
|
|
4081
|
+
async function ia(e) {
|
|
4082
|
+
const t = e.urlInput;
|
|
4083
|
+
if (e.wmsCapabilities = null, e.searchLoad = !0, e.requestUpdate(), !t) return !1;
|
|
4145
4084
|
if (Fn(t) === "XYZ")
|
|
4146
4085
|
return { Name: t };
|
|
4147
4086
|
try {
|
|
4148
|
-
const
|
|
4149
|
-
|
|
4087
|
+
const n = await Lr(t);
|
|
4088
|
+
e.wmsCapabilities = n;
|
|
4150
4089
|
} catch {
|
|
4151
4090
|
} finally {
|
|
4152
|
-
|
|
4091
|
+
e.searchLoad = !1, e.requestUpdate();
|
|
4153
4092
|
}
|
|
4154
4093
|
return !1;
|
|
4155
4094
|
}
|
|
4156
|
-
const
|
|
4157
|
-
const { Name:
|
|
4095
|
+
const oa = (e, t) => {
|
|
4096
|
+
const { Name: n } = e, i = Fn(t.urlInput) || "XYZ", o = {
|
|
4158
4097
|
type: "Tile",
|
|
4159
4098
|
properties: {
|
|
4160
|
-
id:
|
|
4161
|
-
title:
|
|
4099
|
+
id: n,
|
|
4100
|
+
title: n
|
|
4162
4101
|
// Set the title property to the same as id
|
|
4163
4102
|
},
|
|
4164
4103
|
source: {
|
|
@@ -4166,17 +4105,17 @@ const aa = (n, t) => {
|
|
|
4166
4105
|
url: t.urlInput,
|
|
4167
4106
|
// Set the URL from the instance
|
|
4168
4107
|
params: {
|
|
4169
|
-
LAYERS:
|
|
4108
|
+
LAYERS: n
|
|
4170
4109
|
// Set the 'LAYERS' parameter to the provided layer 'Name'
|
|
4171
4110
|
}
|
|
4172
4111
|
}
|
|
4173
4112
|
};
|
|
4174
4113
|
t.jsonInput = JSON.stringify(o);
|
|
4175
|
-
},
|
|
4176
|
-
t.open =
|
|
4114
|
+
}, ra = (e, t) => {
|
|
4115
|
+
t.open = e || null, t.urlInput = null, t.jsonInput = null, t.wmsCapabilities = null, t.requestUpdate();
|
|
4177
4116
|
};
|
|
4178
|
-
var F,
|
|
4179
|
-
class
|
|
4117
|
+
var F, vo, wo, In, Eo, xo, Ie, on, rn;
|
|
4118
|
+
class bo extends nt {
|
|
4180
4119
|
constructor() {
|
|
4181
4120
|
super();
|
|
4182
4121
|
T(this, F);
|
|
@@ -4367,16 +4306,16 @@ class vo extends nt {
|
|
|
4367
4306
|
* Handles input fields, search, and addition of layers.
|
|
4368
4307
|
*/
|
|
4369
4308
|
render() {
|
|
4370
|
-
const
|
|
4309
|
+
const n = this.open ? "open" : "close", i = this.open === "url", o = this.open === "json", r = !kr(this.urlInput) || this.searchLoad ? !0 : C;
|
|
4371
4310
|
return x`
|
|
4372
4311
|
<style>
|
|
4373
|
-
${
|
|
4374
|
-
${!this.unstyled &&
|
|
4312
|
+
${R(this, on)}
|
|
4313
|
+
${!this.unstyled && R(this, rn)}
|
|
4375
4314
|
</style>
|
|
4376
4315
|
<div class="eox-add-layer-main">
|
|
4377
4316
|
<div class="eox-add-layer-col">
|
|
4378
4317
|
<!-- Tabbed interface for URL and JSON -->
|
|
4379
|
-
<ul class="eox-add-layer-tab ${
|
|
4318
|
+
<ul class="eox-add-layer-tab ${n}">
|
|
4380
4319
|
<li
|
|
4381
4320
|
@click=${() => k(this, F, Ie).call(this, "url")}
|
|
4382
4321
|
class="${i ? "active" : ""}"
|
|
@@ -4399,7 +4338,7 @@ class vo extends nt {
|
|
|
4399
4338
|
${this.unstyled ? "Add Layer" : ""}
|
|
4400
4339
|
</button>
|
|
4401
4340
|
</div>
|
|
4402
|
-
<div class="eox-add ${
|
|
4341
|
+
<div class="eox-add ${n}">
|
|
4403
4342
|
${i ? x`
|
|
4404
4343
|
<!-- Input field for URL -->
|
|
4405
4344
|
<div class="eox-add-layer-col">
|
|
@@ -4408,14 +4347,14 @@ class vo extends nt {
|
|
|
4408
4347
|
class="add-url"
|
|
4409
4348
|
placeholder="Add URL (WMS/XYZ)"
|
|
4410
4349
|
.value="${this.urlInput}"
|
|
4411
|
-
@input=${k(this, F,
|
|
4350
|
+
@input=${k(this, F, vo)}
|
|
4412
4351
|
>
|
|
4413
4352
|
</input>
|
|
4414
4353
|
<!-- Search button for URL -->
|
|
4415
4354
|
<button
|
|
4416
4355
|
class="search-icon"
|
|
4417
4356
|
disabled=${r}
|
|
4418
|
-
@click=${k(this, F,
|
|
4357
|
+
@click=${k(this, F, wo)}
|
|
4419
4358
|
>
|
|
4420
4359
|
${this.unstyled ? "Search" : ""}
|
|
4421
4360
|
</button>
|
|
@@ -4449,15 +4388,15 @@ class vo extends nt {
|
|
|
4449
4388
|
<textarea
|
|
4450
4389
|
class="add-layer-input"
|
|
4451
4390
|
placeholder="Please put a valid eox-map layer JSON."
|
|
4452
|
-
@input=${k(this, F,
|
|
4391
|
+
@input=${k(this, F, xo)}
|
|
4453
4392
|
.value=${this.jsonInput}
|
|
4454
4393
|
></textarea>
|
|
4455
4394
|
|
|
4456
4395
|
<!-- Button to add JSON layer -->
|
|
4457
4396
|
<button
|
|
4458
4397
|
class="add-layer-icon json-add-layer"
|
|
4459
|
-
disabled=${
|
|
4460
|
-
@click=${k(this, F,
|
|
4398
|
+
disabled=${Ur(this.jsonInput) ? C : !0}
|
|
4399
|
+
@click=${k(this, F, Eo)}
|
|
4461
4400
|
>
|
|
4462
4401
|
${this.unstyled ? "Add JSON" : ""}
|
|
4463
4402
|
</button>
|
|
@@ -4473,57 +4412,57 @@ F = new WeakSet(), /**
|
|
|
4473
4412
|
*
|
|
4474
4413
|
* @param {Event} evt - The input change event triggering the method.
|
|
4475
4414
|
*/
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
},
|
|
4479
|
-
const
|
|
4480
|
-
|
|
4415
|
+
vo = function(n) {
|
|
4416
|
+
na(n, this);
|
|
4417
|
+
}, wo = async function() {
|
|
4418
|
+
const n = await ia(this);
|
|
4419
|
+
n && k(this, F, In).call(this, n);
|
|
4481
4420
|
}, /**
|
|
4482
4421
|
* Handles input field changes by triggering layer processing and adding layers.
|
|
4483
4422
|
*
|
|
4484
4423
|
* @param {{"Name": string}} layer - The layer information triggering the method.
|
|
4485
4424
|
*/
|
|
4486
|
-
In = function(
|
|
4487
|
-
|
|
4425
|
+
In = function(n) {
|
|
4426
|
+
oa(n, this), bi(this);
|
|
4488
4427
|
}, /**
|
|
4489
4428
|
* Initiates the addition of layers, triggering the handleAddLayerMethod.
|
|
4490
4429
|
*/
|
|
4491
|
-
|
|
4430
|
+
Eo = function() {
|
|
4492
4431
|
bi(this);
|
|
4493
4432
|
}, /**
|
|
4494
4433
|
* Handles input field changes by invoking the 'handleJsonInputChangeMethod'.
|
|
4495
4434
|
*
|
|
4496
4435
|
* @param {{target: { value: string }}} evt - The input change event triggering the method.
|
|
4497
4436
|
*/
|
|
4498
|
-
|
|
4499
|
-
|
|
4437
|
+
xo = function(n) {
|
|
4438
|
+
ea(n, this);
|
|
4500
4439
|
}, /**
|
|
4501
4440
|
* Handles tab changes by invoking the 'openCloseTabMethod'.
|
|
4502
4441
|
*
|
|
4503
4442
|
* @param {"url" | "json" | null} tab - The tab identifier triggering the method.
|
|
4504
4443
|
*/
|
|
4505
|
-
Ie = function(
|
|
4506
|
-
|
|
4444
|
+
Ie = function(n) {
|
|
4445
|
+
ra(n, this);
|
|
4507
4446
|
}, on = new WeakMap(), rn = new WeakMap(), // Define static properties for the component
|
|
4508
|
-
H(
|
|
4447
|
+
H(bo, "properties", {
|
|
4509
4448
|
eoxMap: { attribute: !1, state: !0 },
|
|
4510
4449
|
unstyled: { type: Boolean },
|
|
4511
4450
|
noShadow: { type: Boolean }
|
|
4512
4451
|
});
|
|
4513
|
-
customElements.define("eox-layercontrol-add-layers",
|
|
4514
|
-
const
|
|
4515
|
-
if (t.requestUpdate(),
|
|
4516
|
-
const
|
|
4452
|
+
customElements.define("eox-layercontrol-add-layers", bo);
|
|
4453
|
+
const sa = (e, t) => {
|
|
4454
|
+
if (t.requestUpdate(), e.target.tagName === "EOX-LAYERCONTROL-LAYER-TOOLS") {
|
|
4455
|
+
const n = t.renderRoot.querySelector(
|
|
4517
4456
|
"eox-layercontrol-optional-list"
|
|
4518
4457
|
);
|
|
4519
|
-
|
|
4458
|
+
n == null || n.requestUpdate();
|
|
4520
4459
|
}
|
|
4521
|
-
},
|
|
4522
|
-
const t =
|
|
4523
|
-
return
|
|
4460
|
+
}, aa = (e) => {
|
|
4461
|
+
const t = e.for, n = document.querySelector(t);
|
|
4462
|
+
return n && n.map !== e.map && (e.map = n.map), n;
|
|
4524
4463
|
};
|
|
4525
|
-
var
|
|
4526
|
-
class
|
|
4464
|
+
var zt, sn, $o, an;
|
|
4465
|
+
class So extends nt {
|
|
4527
4466
|
// Constructor to set default values for properties
|
|
4528
4467
|
constructor() {
|
|
4529
4468
|
super();
|
|
@@ -4533,7 +4472,7 @@ class $o extends nt {
|
|
|
4533
4472
|
*
|
|
4534
4473
|
* @type {import("../../map/main").EOxMap}
|
|
4535
4474
|
*/
|
|
4536
|
-
T(this,
|
|
4475
|
+
T(this, zt);
|
|
4537
4476
|
T(this, an, "* { font-family: Roboto, sans-serif; }");
|
|
4538
4477
|
this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = ["info", "opacity", "config", "remove", "sort"], this.addExternalLayers = !1, this.unstyled = !1, this.styleOverride = "";
|
|
4539
4478
|
}
|
|
@@ -4542,24 +4481,24 @@ class $o extends nt {
|
|
|
4542
4481
|
* Updated #eoxMap after first update.
|
|
4543
4482
|
*/
|
|
4544
4483
|
firstUpdated() {
|
|
4545
|
-
|
|
4484
|
+
Jt(this, zt, aa(this));
|
|
4546
4485
|
}
|
|
4547
4486
|
render() {
|
|
4548
4487
|
var o, r, s;
|
|
4549
|
-
const
|
|
4488
|
+
const n = (o = this.map) == null ? void 0 : o.getLayers().getArray(), i = n && ((r = Xn(n, "layerControlOptional", !0)) == null ? void 0 : r.length) > 0;
|
|
4550
4489
|
return x`
|
|
4551
4490
|
<style>
|
|
4552
|
-
${!this.unstyled &&
|
|
4491
|
+
${!this.unstyled && R(this, an)}
|
|
4553
4492
|
${this.styleOverride}
|
|
4554
4493
|
</style>
|
|
4555
4494
|
|
|
4556
4495
|
<!-- Conditional rendering of add layers component -->
|
|
4557
4496
|
${rt(
|
|
4558
|
-
this.addExternalLayers && ((s =
|
|
4497
|
+
this.addExternalLayers && ((s = R(this, zt)) == null ? void 0 : s.addOrUpdateLayer),
|
|
4559
4498
|
() => x`
|
|
4560
4499
|
<eox-layercontrol-add-layers
|
|
4561
4500
|
.noShadow=${!0}
|
|
4562
|
-
.eoxMap=${
|
|
4501
|
+
.eoxMap=${R(this, zt)}
|
|
4563
4502
|
.unstyled=${this.unstyled}
|
|
4564
4503
|
></eox-layercontrol-add-layers>
|
|
4565
4504
|
`
|
|
@@ -4579,7 +4518,7 @@ class $o extends nt {
|
|
|
4579
4518
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
4580
4519
|
.tools=${this.tools}
|
|
4581
4520
|
.unstyled=${this.unstyled}
|
|
4582
|
-
@changed=${k(this, sn,
|
|
4521
|
+
@changed=${k(this, sn, $o)}
|
|
4583
4522
|
></eox-layercontrol-layer-list>
|
|
4584
4523
|
`
|
|
4585
4524
|
)}
|
|
@@ -4600,15 +4539,15 @@ class $o extends nt {
|
|
|
4600
4539
|
`;
|
|
4601
4540
|
}
|
|
4602
4541
|
}
|
|
4603
|
-
|
|
4542
|
+
zt = new WeakMap(), sn = new WeakSet(), /**
|
|
4604
4543
|
* Event handler for changes in the layer list
|
|
4605
4544
|
*
|
|
4606
4545
|
* @param {CustomEvent & {target: Element}} evt
|
|
4607
4546
|
*/
|
|
4608
|
-
|
|
4609
|
-
|
|
4547
|
+
$o = function(n) {
|
|
4548
|
+
sa(n, this), this.dispatchEvent(new CustomEvent("layerchange", { detail: n.detail }));
|
|
4610
4549
|
}, an = new WeakMap(), // Define static properties for the component
|
|
4611
|
-
H(
|
|
4550
|
+
H(So, "properties", {
|
|
4612
4551
|
for: { type: String },
|
|
4613
4552
|
idProperty: { attribute: "id-property" },
|
|
4614
4553
|
map: { attribute: !1, state: !0 },
|
|
@@ -4619,7 +4558,7 @@ H($o, "properties", {
|
|
|
4619
4558
|
unstyled: { type: Boolean },
|
|
4620
4559
|
styleOverride: { type: String }
|
|
4621
4560
|
});
|
|
4622
|
-
customElements.define("eox-layercontrol",
|
|
4561
|
+
customElements.define("eox-layercontrol", So);
|
|
4623
4562
|
export {
|
|
4624
|
-
|
|
4563
|
+
So as EOxLayerControl
|
|
4625
4564
|
};
|