@eox/layercontrol 0.17.5 → 0.17.6-dev.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 +1207 -1146
- 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 To = Object.defineProperty;
|
|
2
|
+
var qn = (n) => {
|
|
3
|
+
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var H = (
|
|
7
|
-
var
|
|
5
|
+
var Po = (n, t, e) => t in n ? To(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
6
|
+
var H = (n, t, e) => Po(n, typeof t != "symbol" ? t + "" : t, e), cn = (n, t, e) => t.has(n) || qn("Cannot " + e);
|
|
7
|
+
var O = (n, t, e) => (cn(n, t, "read from private field"), e ? e.call(n) : t.get(n)), T = (n, t, e) => t.has(n) ? qn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), Kt = (n, t, e, i) => (cn(n, t, "write to private field"), i ? i.call(n, e) : t.set(n, e), e), k = (n, t, e) => (cn(n, t, "access private method"), e);
|
|
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 Oo = class {
|
|
15
|
+
constructor(t, e, 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 = e;
|
|
18
18
|
}
|
|
19
19
|
get styleSheet() {
|
|
20
20
|
let t = this.o;
|
|
21
|
-
const
|
|
21
|
+
const e = this.t;
|
|
22
22
|
if (Hn && t === void 0) {
|
|
23
|
-
const i =
|
|
24
|
-
i && (t = Wn.get(
|
|
23
|
+
const i = e !== void 0 && e.length === 1;
|
|
24
|
+
i && (t = Wn.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Wn.set(e, t));
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
27
|
}
|
|
@@ -29,51 +29,51 @@ let Po = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
if (Hn)
|
|
34
|
-
else for (const
|
|
32
|
+
const Ro = (n) => new Oo(typeof n == "string" ? n : n + "", void 0, wi), Do = (n, t) => {
|
|
33
|
+
if (Hn) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
|
+
else for (const e 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 = e.cssText, n.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
}, Gn = Hn ? (
|
|
39
|
-
let
|
|
40
|
-
for (const i of t.cssRules)
|
|
41
|
-
return
|
|
42
|
-
})(
|
|
38
|
+
}, Gn = Hn ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
39
|
+
let e = "";
|
|
40
|
+
for (const i of t.cssRules) e += i.cssText;
|
|
41
|
+
return Ro(e);
|
|
42
|
+
})(n) : n;
|
|
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: No, defineProperty: Mo, getOwnPropertyDescriptor: Io, getOwnPropertyNames: Ho, getOwnPropertySymbols: Bo, getPrototypeOf: Vo } = Object, _t = globalThis, Jn = _t.trustedTypes, Lo = Jn ? Jn.emptyScript : "", dn = _t.reactiveElementPolyfillSupport, oe = (n, t) => n, Tn = { toAttribute(n, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
n = n ? Lo : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
n = n == null ? n : JSON.stringify(n);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let
|
|
57
|
+
return n;
|
|
58
|
+
}, fromAttribute(n, t) {
|
|
59
|
+
let e = n;
|
|
60
60
|
switch (t) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
|
|
62
|
+
e = n !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
|
|
65
|
+
e = n === null ? null : Number(n);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
|
|
70
|
+
e = JSON.parse(n);
|
|
71
71
|
} catch {
|
|
72
|
-
|
|
72
|
+
e = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
} }, Ei = (
|
|
75
|
+
return e;
|
|
76
|
+
} }, Ei = (n, t) => !No(n, 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, e = Kn) {
|
|
86
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
|
+
const i = Symbol(), o = this.getPropertyDescriptor(t, i, e);
|
|
88
|
+
o !== void 0 && Mo(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, e, i) {
|
|
92
|
+
const { get: o, set: r } = Io(this.prototype, t) ?? { get() {
|
|
93
|
+
return this[e];
|
|
94
94
|
}, set(s) {
|
|
95
|
-
this[
|
|
95
|
+
this[e] = 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(oe("elementProperties"))) return;
|
|
109
|
+
const t = Vo(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(oe("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(oe("properties"))) {
|
|
115
|
+
const e = this.properties, i = [...Ho(e), ...Bo(e)];
|
|
116
|
+
for (const o of i) this.createProperty(o, e[o]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
119
119
|
if (t !== null) {
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
120
|
+
const e = litPropertyMetadata.get(t);
|
|
121
|
+
if (e !== void 0) for (const [i, o] of e) 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 [e, i] of this.elementProperties) {
|
|
125
|
+
const o = this._$Eu(e, i);
|
|
126
|
+
o !== void 0 && this._$Eh.set(o, e);
|
|
127
127
|
}
|
|
128
128
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
129
129
|
}
|
|
130
130
|
static finalizeStyles(t) {
|
|
131
|
-
const
|
|
131
|
+
const e = [];
|
|
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) e.unshift(Gn(o));
|
|
135
|
+
} else t !== void 0 && e.push(Gn(t));
|
|
136
|
+
return e;
|
|
137
137
|
}
|
|
138
|
-
static _$Eu(t,
|
|
139
|
-
const i =
|
|
138
|
+
static _$Eu(t, e) {
|
|
139
|
+
const i = e.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((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(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 e;
|
|
151
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
152
152
|
}
|
|
153
153
|
removeController(t) {
|
|
154
|
-
var
|
|
155
|
-
(
|
|
154
|
+
var e;
|
|
155
|
+
(e = this._$EO) == null || e.delete(t);
|
|
156
156
|
}
|
|
157
157
|
_$E_() {
|
|
158
|
-
const t = /* @__PURE__ */ new Map(),
|
|
159
|
-
for (const i of
|
|
158
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
159
|
+
for (const i of e.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 Do(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((e) => {
|
|
169
169
|
var i;
|
|
170
|
-
return (i =
|
|
170
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
|
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((e) => {
|
|
178
178
|
var i;
|
|
179
|
-
return (i =
|
|
179
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
attributeChangedCallback(t,
|
|
182
|
+
attributeChangedCallback(t, e, i) {
|
|
183
183
|
this._$AK(t, i);
|
|
184
184
|
}
|
|
185
|
-
_$EC(t,
|
|
185
|
+
_$EC(t, e) {
|
|
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(e, 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, e) {
|
|
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(e, s.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
requestUpdate(t,
|
|
201
|
+
requestUpdate(t, e, 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], e)) return;
|
|
204
|
+
this.P(t, e, 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, e, i) {
|
|
209
|
+
this._$AL.has(t) || this._$AL.set(t, e), 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 (e) {
|
|
216
|
+
Promise.reject(e);
|
|
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 e = this._$AL;
|
|
237
237
|
try {
|
|
238
|
-
t = this.shouldUpdate(
|
|
238
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (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(e)) : this._$EU();
|
|
242
242
|
} catch (o) {
|
|
243
243
|
throw t = !1, this._$EU(), o;
|
|
244
244
|
}
|
|
245
|
-
t && this._$AE(
|
|
245
|
+
t && this._$AE(e);
|
|
246
246
|
}
|
|
247
247
|
willUpdate(t) {
|
|
248
248
|
}
|
|
249
249
|
_$AE(t) {
|
|
250
|
-
var
|
|
251
|
-
(
|
|
250
|
+
var e;
|
|
251
|
+
(e = this._$EO) == null || e.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((e) => this._$EC(e, this[e]))), 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[oe("elementProperties")] = /* @__PURE__ */ new Map(), Lt[oe("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 re = globalThis, He = re.trustedTypes, Qn = He ? He.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Bn = "$lit$", pt = `lit$${(Math.random() + "").slice(9)}$`, Vn = "?" + pt, ko = `<${Vn}>`, It = document, de = () => It.createComment(""), he = (n) => n === null || typeof n != "object" && typeof n != "function", xi = Array.isArray, Si = (n) => xi(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", hn = `[
|
|
283
|
+
\f\r]`, Qt = /<(?:(!--|\/[^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, Uo = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), x = Uo(1), ot = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), oi = /* @__PURE__ */ new WeakMap(), Nt = It.createTreeWalker(It, 129);
|
|
285
|
+
function _i(n, t) {
|
|
286
|
+
if (!Array.isArray(n) || !n.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 = (n, t) => {
|
|
290
|
+
const e = n.length - 1, i = [];
|
|
291
|
+
let o, r = t === 2 ? "<svg>" : "", s = Qt;
|
|
292
|
+
for (let a = 0; a < e; a++) {
|
|
293
|
+
const l = n[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 === Qt ? 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 ?? Qt, 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 = Qt : (s = Tt, o = void 0);
|
|
296
|
+
const f = s === Tt && n[a + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
r += s === Qt ? l + ko : 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(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
302
|
-
constructor({ strings: t, _$litType$:
|
|
301
|
+
class pe {
|
|
302
|
+
constructor({ strings: t, _$litType$: e }, 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, e);
|
|
307
|
+
if (this.el = pe.createElement(u, i), Nt.currentNode = this.el.content, e === 2) {
|
|
308
308
|
const c = this.el.content.firstChild;
|
|
309
309
|
c.replaceWith(...c.childNodes);
|
|
310
310
|
}
|
|
@@ -318,8 +318,8 @@ class he {
|
|
|
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], de()), Nt.nextNode(), l.push({ type: 2, index: ++r });
|
|
322
|
+
o.append(c[p], de());
|
|
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 he {
|
|
|
330
330
|
r++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
static createElement(t,
|
|
333
|
+
static createElement(t, e) {
|
|
334
334
|
const i = It.createElement("template");
|
|
335
335
|
return i.innerHTML = t, i;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function Ht(
|
|
338
|
+
function Ht(n, t, e = n, 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 = e._$Co) == null ? void 0 : s[i] : e._$Cl;
|
|
342
|
+
const r = he(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(n), o._$AT(n, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = o : e._$Cl = o), o !== void 0 && (t = Ht(n, o._$AS(n, 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, e) {
|
|
347
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
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: e }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? It).importNode(e, !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 Yt(r, r.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (u = new 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 e = 0;
|
|
370
|
+
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class Yt {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var t;
|
|
376
376
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
377
377
|
}
|
|
378
|
-
constructor(t,
|
|
379
|
-
this.type = 2, this._$AH = C, this._$AN = void 0, this._$AA = t, this._$AB =
|
|
378
|
+
constructor(t, e, i, o) {
|
|
379
|
+
this.type = 2, this._$AH = C, this._$AN = void 0, this._$AA = t, this._$AB = e, 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 e = this._$AM;
|
|
384
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
385
385
|
}
|
|
386
386
|
get startNode() {
|
|
387
387
|
return this._$AA;
|
|
@@ -389,8 +389,8 @@ class Xt {
|
|
|
389
389
|
get endNode() {
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
|
-
_$AI(t,
|
|
393
|
-
t = Ht(this, t,
|
|
392
|
+
_$AI(t, e = this) {
|
|
393
|
+
t = Ht(this, t, e), he(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 Xt {
|
|
|
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 && he(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: e, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = pe.createElement(_i(i.h, i.h[0]), this.options)), i);
|
|
407
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === o) this._$AH.p(e);
|
|
408
408
|
else {
|
|
409
409
|
const s = new Ci(o, this), a = s.u(this.options);
|
|
410
|
-
s.p(
|
|
410
|
+
s.p(e), this.T(a), this._$AH = s;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(t) {
|
|
414
|
-
let
|
|
415
|
-
return
|
|
414
|
+
let e = oi.get(t.strings);
|
|
415
|
+
return e === void 0 && oi.set(t.strings, e = new pe(t)), e;
|
|
416
416
|
}
|
|
417
417
|
k(t) {
|
|
418
418
|
xi(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
|
-
const
|
|
419
|
+
const e = this._$AH;
|
|
420
420
|
let i, o = 0;
|
|
421
|
-
for (const r of t) o ===
|
|
422
|
-
o <
|
|
421
|
+
for (const r of t) o === e.length ? e.push(i = new Yt(this.S(de()), this.S(de()), this, this.options)) : i = e[o], i._$AI(r), o++;
|
|
422
|
+
o < e.length && (this._$AR(i && i._$AB.nextSibling, o), e.length = o);
|
|
423
423
|
}
|
|
424
|
-
_$AR(t = this._$AA.nextSibling,
|
|
424
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
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, e); 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 e;
|
|
433
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.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, e, i, o, r) {
|
|
444
|
+
this.type = 1, this._$AH = C, this._$AN = void 0, this.element = t, this.name = e, 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, e = 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, e, 0), s = !he(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], e, l), u === ot && (u = this._$AH[l]), s || (s = !he(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, e, i, o, r) {
|
|
479
|
+
super(t, e, i, o, r), this.type = 5;
|
|
480
480
|
}
|
|
481
|
-
_$AI(t,
|
|
482
|
-
if ((t = Ht(this, t,
|
|
481
|
+
_$AI(t, e = this) {
|
|
482
|
+
if ((t = Ht(this, t, e, 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 e;
|
|
488
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.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, e, i) {
|
|
493
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, 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 Fo = { P: Bn, A: pt, C: Vn, M: 1, L: Ai, R: Ci, D: Si, V: Ht, I: Yt, H: be, N: Pi, U: Oi, B: Ti, F: Ri }, pn = re.litHtmlPolyfillSupport;
|
|
503
|
+
pn == null || pn(pe, Yt), (re.litHtmlVersions ?? (re.litHtmlVersions = [])).push("3.1.2");
|
|
504
|
+
const jo = (n, t, e) => {
|
|
505
|
+
const i = (e == null ? void 0 : e.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 = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
509
|
+
i._$litPart$ = o = new Yt(t.insertBefore(de(), r), r, void 0, e ?? {});
|
|
510
510
|
}
|
|
511
|
-
return o._$AI(
|
|
511
|
+
return o._$AI(n), 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 e;
|
|
524
524
|
const t = super.createRenderRoot();
|
|
525
|
-
return (
|
|
525
|
+
return (e = this.renderOptions).renderBefore ?? (e.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 e = this.render();
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = jo(e, 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(n, t, e) {
|
|
554
|
+
return n ? t(n) : e == null ? void 0 : e(n);
|
|
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 = (n) => (...t) => ({ _$litDirective$: n, 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, e, i) {
|
|
569
|
+
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
|
570
570
|
}
|
|
571
|
-
_$AS(t,
|
|
572
|
-
return this.update(t,
|
|
571
|
+
_$AS(t, e) {
|
|
572
|
+
return this.update(t, e);
|
|
573
573
|
}
|
|
574
|
-
update(t,
|
|
575
|
-
return this.render(...
|
|
574
|
+
update(t, e) {
|
|
575
|
+
return this.render(...e);
|
|
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: zo } = Fo, Zo = (n) => n.strings === void 0, ri = () => document.createComment(""), te = (n, t, e) => {
|
|
584
584
|
var r;
|
|
585
|
-
const i =
|
|
586
|
-
if (
|
|
585
|
+
const i = n._$AA.parentNode, o = t === void 0 ? n._$AB : t._$AA;
|
|
586
|
+
if (e === void 0) {
|
|
587
587
|
const s = i.insertBefore(ri(), o), a = i.insertBefore(ri(), o);
|
|
588
|
-
|
|
588
|
+
e = new zo(s, a, n, n.options);
|
|
589
589
|
} else {
|
|
590
|
-
const s =
|
|
590
|
+
const s = e._$AB.nextSibling, a = e._$AM, l = a !== n;
|
|
591
591
|
if (l) {
|
|
592
592
|
let u;
|
|
593
|
-
(r =
|
|
593
|
+
(r = e._$AQ) == null || r.call(e, n), e._$AM = n, e._$AP !== void 0 && (u = n._$AU) !== a._$AU && e._$AP(u);
|
|
594
594
|
}
|
|
595
595
|
if (s !== o || l) {
|
|
596
|
-
let u =
|
|
596
|
+
let u = e._$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 e;
|
|
604
|
+
}, Pt = (n, t, e = n) => (n._$AI(t, e), n), Xo = {}, Di = (n, t = Xo) => n._$AH = t, Yo = (n) => n._$AH, gn = (n) => {
|
|
605
605
|
var i;
|
|
606
|
-
(i =
|
|
607
|
-
let t =
|
|
608
|
-
const
|
|
609
|
-
for (; t !==
|
|
606
|
+
(i = n._$AP) == null || i.call(n, !1, !0);
|
|
607
|
+
let t = n._$AA;
|
|
608
|
+
const e = n._$AB.nextSibling;
|
|
609
|
+
for (; t !== e; ) {
|
|
610
610
|
const o = t.nextSibling;
|
|
611
611
|
t.remove(), t = o;
|
|
612
612
|
}
|
|
@@ -616,27 +616,27 @@ const { I: jo } = Uo, zo = (e) => e.strings === void 0, ri = () => document.crea
|
|
|
616
616
|
* Copyright 2017 Google LLC
|
|
617
617
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
618
618
|
*/
|
|
619
|
-
const si = (
|
|
619
|
+
const si = (n, t, e) => {
|
|
620
620
|
const i = /* @__PURE__ */ new Map();
|
|
621
|
-
for (let o = t; o <=
|
|
621
|
+
for (let o = t; o <= e; o++) i.set(n[o], o);
|
|
622
622
|
return i;
|
|
623
|
-
},
|
|
624
|
-
constructor(
|
|
625
|
-
if (super(
|
|
623
|
+
}, qo = Ln(class extends kn {
|
|
624
|
+
constructor(n) {
|
|
625
|
+
if (super(n), n.type !== Et.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
626
626
|
}
|
|
627
|
-
dt(
|
|
627
|
+
dt(n, t, e) {
|
|
628
628
|
let i;
|
|
629
|
-
|
|
629
|
+
e === void 0 ? e = 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 n) o[s] = i ? i(a, s) : s, r[s] = e(a, s), s++;
|
|
633
633
|
return { values: r, keys: o };
|
|
634
634
|
}
|
|
635
|
-
render(
|
|
636
|
-
return this.dt(
|
|
635
|
+
render(n, t, e) {
|
|
636
|
+
return this.dt(n, t, e).values;
|
|
637
637
|
}
|
|
638
|
-
update(
|
|
639
|
-
const o =
|
|
638
|
+
update(n, [t, e, i]) {
|
|
639
|
+
const o = Yo(n), { values: r, keys: s } = this.dt(t, e, 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 = (e, t, n) => {
|
|
|
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]), te(n, l[g + 1], o[c]), c++, g--;
|
|
648
|
+
else if (a[p] === s[f]) l[f] = Pt(o[p], r[f]), te(n, 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 = te(n, 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]), te(n, 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 = te(n, 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(n, l), ot;
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
/**
|
|
@@ -672,8 +672,8 @@ const si = (e, t, n) => {
|
|
|
672
672
|
* @license BSD-2-Clause
|
|
673
673
|
* @preserve
|
|
674
674
|
*/
|
|
675
|
-
var E = (
|
|
676
|
-
const
|
|
675
|
+
var E = (n) => n !== void 0, Ni = (n, t, e) => t in n ? n[t] : n[t] = e;
|
|
676
|
+
const fe = {
|
|
677
677
|
ELEMENT: 1,
|
|
678
678
|
ATTRIBUTE: 2,
|
|
679
679
|
TEXT: 3,
|
|
@@ -687,7 +687,7 @@ const pe = {
|
|
|
687
687
|
DOCUMENT_FRAGMENT: 11,
|
|
688
688
|
NOTATION: 12
|
|
689
689
|
};
|
|
690
|
-
class
|
|
690
|
+
class Wo {
|
|
691
691
|
/**
|
|
692
692
|
* XML DOM parser
|
|
693
693
|
* @constructor
|
|
@@ -711,66 +711,66 @@ class qo {
|
|
|
711
711
|
* @return {string} All text content.
|
|
712
712
|
* @api
|
|
713
713
|
*/
|
|
714
|
-
getAllTextContent(t,
|
|
715
|
-
return ln(t,
|
|
714
|
+
getAllTextContent(t, e) {
|
|
715
|
+
return ln(t, e).join("");
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
function ln(
|
|
719
|
-
return Mi(
|
|
718
|
+
function ln(n, t) {
|
|
719
|
+
return Mi(n, t, []).join("");
|
|
720
720
|
}
|
|
721
|
-
function Mi(
|
|
722
|
-
if (
|
|
723
|
-
t ?
|
|
721
|
+
function Mi(n, t, e) {
|
|
722
|
+
if (n.nodeType === fe.CDATA_SECTION || n.nodeType === fe.TEXT)
|
|
723
|
+
t ? e.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : e.push(n.nodeValue);
|
|
724
724
|
else {
|
|
725
725
|
var i;
|
|
726
|
-
for (i =
|
|
727
|
-
Mi(i, t,
|
|
726
|
+
for (i = n.firstChild; i; i = i.nextSibling)
|
|
727
|
+
Mi(i, t, e);
|
|
728
728
|
}
|
|
729
|
-
return
|
|
729
|
+
return e;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
for (var o =
|
|
733
|
-
var r = o.namespaceURI || null, s =
|
|
731
|
+
function Go(n, t, e, i) {
|
|
732
|
+
for (var o = Jo(t); o; o = Ko(o)) {
|
|
733
|
+
var r = o.namespaceURI || null, s = n[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, e);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
let t =
|
|
742
|
-
for (; t && t.nodeType !==
|
|
740
|
+
function Jo(n) {
|
|
741
|
+
let t = n.firstElementChild || n.firstChild;
|
|
742
|
+
for (; t && t.nodeType !== fe.ELEMENT; )
|
|
743
743
|
t = t.nextSibling;
|
|
744
744
|
return t;
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
let t =
|
|
748
|
-
for (; t && t.nodeType !==
|
|
746
|
+
function Ko(n) {
|
|
747
|
+
let t = n.nextElementSibling || n.nextSibling;
|
|
748
|
+
for (; t && t.nodeType !== fe.ELEMENT; )
|
|
749
749
|
t = t.nextSibling;
|
|
750
750
|
return t;
|
|
751
751
|
}
|
|
752
|
-
function j(
|
|
752
|
+
function j(n, t, e) {
|
|
753
753
|
return (
|
|
754
754
|
/** @type {Object.<string, Object.<string, XMLParser.Parser>>} */
|
|
755
|
-
|
|
755
|
+
Qo(n, t, e)
|
|
756
756
|
);
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
var i = E(
|
|
760
|
-
for (o = 0, r =
|
|
761
|
-
i[
|
|
758
|
+
function Qo(n, t, e) {
|
|
759
|
+
var i = E(e) ? e : {}, o, r;
|
|
760
|
+
for (o = 0, r = n.length; o < r; ++o)
|
|
761
|
+
i[n[o]] = t;
|
|
762
762
|
return i;
|
|
763
763
|
}
|
|
764
|
-
function Ii(
|
|
764
|
+
function Ii(n, 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(e, i) {
|
|
771
|
+
var o = n.call(
|
|
772
772
|
E(t) ? t : this,
|
|
773
|
-
|
|
773
|
+
e,
|
|
774
774
|
i
|
|
775
775
|
);
|
|
776
776
|
if (E(o)) {
|
|
@@ -780,18 +780,18 @@ function Ii(e, t) {
|
|
|
780
780
|
}
|
|
781
781
|
);
|
|
782
782
|
}
|
|
783
|
-
function V(
|
|
784
|
-
return i.push(
|
|
783
|
+
function V(n, t, e, i, o) {
|
|
784
|
+
return i.push(n), Go(t, e, i, o), i.pop();
|
|
785
785
|
}
|
|
786
|
-
function m(
|
|
786
|
+
function m(n, t, e) {
|
|
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 = n.call(
|
|
794
|
+
E(e) ? e : this,
|
|
795
795
|
i,
|
|
796
796
|
o
|
|
797
797
|
);
|
|
@@ -805,15 +805,15 @@ function m(e, t, n) {
|
|
|
805
805
|
}
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
|
-
function J(
|
|
808
|
+
function J(n, t, e) {
|
|
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 = n.call(
|
|
816
|
+
E(e) ? e : this,
|
|
817
817
|
i,
|
|
818
818
|
o
|
|
819
819
|
);
|
|
@@ -827,89 +827,89 @@ function J(e, t, n) {
|
|
|
827
827
|
}
|
|
828
828
|
);
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
function
|
|
832
|
-
return
|
|
830
|
+
const tr = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
|
831
|
+
function er(n) {
|
|
832
|
+
return n.replace(tr, "");
|
|
833
833
|
}
|
|
834
|
-
function Mt(
|
|
835
|
-
const t = /^\s*(true|1)|(false|0)\s*$/.exec(
|
|
834
|
+
function Mt(n) {
|
|
835
|
+
const t = /^\s*(true|1)|(false|0)\s*$/.exec(n);
|
|
836
836
|
if (t)
|
|
837
837
|
return E(t[1]) || !1;
|
|
838
838
|
}
|
|
839
|
-
function Ut(
|
|
840
|
-
return ft(ln(
|
|
839
|
+
function Ut(n) {
|
|
840
|
+
return ft(ln(n, !1));
|
|
841
841
|
}
|
|
842
|
-
function ft(
|
|
843
|
-
const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(
|
|
842
|
+
function ft(n) {
|
|
843
|
+
const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);
|
|
844
844
|
if (t)
|
|
845
845
|
return parseFloat(t[1]);
|
|
846
846
|
}
|
|
847
|
-
function mn(
|
|
848
|
-
return Be(ln(
|
|
847
|
+
function mn(n) {
|
|
848
|
+
return Be(ln(n, !1));
|
|
849
849
|
}
|
|
850
|
-
function Be(
|
|
851
|
-
const t = /^\s*(\d+)\s*$/.exec(
|
|
850
|
+
function Be(n) {
|
|
851
|
+
const t = /^\s*(\d+)\s*$/.exec(n);
|
|
852
852
|
if (t)
|
|
853
853
|
return parseInt(t[1], 10);
|
|
854
854
|
}
|
|
855
|
-
function $(
|
|
856
|
-
return
|
|
855
|
+
function $(n) {
|
|
856
|
+
return er(ln(n, !1));
|
|
857
857
|
}
|
|
858
|
-
const
|
|
859
|
-
function Un(
|
|
860
|
-
return
|
|
858
|
+
const nr = "http://www.w3.org/1999/xlink";
|
|
859
|
+
function Un(n) {
|
|
860
|
+
return n.getAttributeNS(nr, "href");
|
|
861
861
|
}
|
|
862
|
-
function
|
|
863
|
-
return V({},
|
|
862
|
+
function ir(n, t) {
|
|
863
|
+
return V({}, Or, n, t);
|
|
864
864
|
}
|
|
865
|
-
function Hi(
|
|
865
|
+
function Hi(n) {
|
|
866
866
|
return [
|
|
867
|
-
ft(
|
|
868
|
-
ft(
|
|
869
|
-
ft(
|
|
870
|
-
ft(
|
|
867
|
+
ft(n.getAttribute("minx")),
|
|
868
|
+
ft(n.getAttribute("miny")),
|
|
869
|
+
ft(n.getAttribute("maxx")),
|
|
870
|
+
ft(n.getAttribute("maxy"))
|
|
871
871
|
];
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
const
|
|
875
|
-
ft(
|
|
876
|
-
ft(
|
|
873
|
+
function or(n, t) {
|
|
874
|
+
const e = Hi(n), i = [
|
|
875
|
+
ft(n.getAttribute("resx")),
|
|
876
|
+
ft(n.getAttribute("resy"))
|
|
877
877
|
];
|
|
878
878
|
return {
|
|
879
|
-
crs:
|
|
880
|
-
extent:
|
|
879
|
+
crs: n.getAttribute("CRS") || n.getAttribute("SRS"),
|
|
880
|
+
extent: e,
|
|
881
881
|
res: i
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
const
|
|
886
|
-
if (!(!E(
|
|
887
|
-
return
|
|
884
|
+
function rr(n, t) {
|
|
885
|
+
const e = Hi(n);
|
|
886
|
+
if (!(!E(e[0]) || !E(e[1]) || !E(e[2]) || !E(e[3])))
|
|
887
|
+
return e;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
const
|
|
891
|
-
return { min:
|
|
889
|
+
function sr(n, t) {
|
|
890
|
+
const e = parseFloat(n.getAttribute("min")), i = parseFloat(n.getAttribute("max"));
|
|
891
|
+
return { min: e, max: i };
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
const
|
|
893
|
+
function ar(n, t) {
|
|
894
|
+
const e = V(
|
|
895
895
|
{},
|
|
896
|
-
|
|
897
|
-
|
|
896
|
+
Rr,
|
|
897
|
+
n,
|
|
898
898
|
t
|
|
899
899
|
);
|
|
900
|
-
if (!E(
|
|
900
|
+
if (!E(e)) return;
|
|
901
901
|
const i = (
|
|
902
902
|
/** @type {number|undefined} */
|
|
903
|
-
|
|
903
|
+
e.westBoundLongitude
|
|
904
904
|
), o = (
|
|
905
905
|
/** @type {number|undefined} */
|
|
906
|
-
|
|
906
|
+
e.southBoundLatitude
|
|
907
907
|
), r = (
|
|
908
908
|
/** @type {number|undefined} */
|
|
909
|
-
|
|
909
|
+
e.eastBoundLongitude
|
|
910
910
|
), s = (
|
|
911
911
|
/** @type {number|undefined} */
|
|
912
|
-
|
|
912
|
+
e.northBoundLatitude
|
|
913
913
|
);
|
|
914
914
|
if (!(!E(i) || !E(o) || !E(r) || !E(s)))
|
|
915
915
|
return [
|
|
@@ -919,57 +919,57 @@ function sr(e, t) {
|
|
|
919
919
|
s
|
|
920
920
|
];
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return V({},
|
|
922
|
+
function lr(n, t) {
|
|
923
|
+
return V({}, $r, n, t);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
return V({},
|
|
925
|
+
function ur(n, t) {
|
|
926
|
+
return V({}, _r, n, t);
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function cr(n, t) {
|
|
929
929
|
return V(
|
|
930
930
|
{},
|
|
931
|
-
|
|
932
|
-
|
|
931
|
+
Ar,
|
|
932
|
+
n,
|
|
933
933
|
t
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function dr(n, t) {
|
|
937
937
|
return V(
|
|
938
938
|
{},
|
|
939
|
-
|
|
940
|
-
|
|
939
|
+
Cr,
|
|
940
|
+
n,
|
|
941
941
|
t
|
|
942
942
|
);
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function hr(n, t) {
|
|
945
945
|
return V(
|
|
946
946
|
{},
|
|
947
|
-
|
|
948
|
-
|
|
947
|
+
Tr,
|
|
948
|
+
n,
|
|
949
949
|
t
|
|
950
950
|
);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function pr(n, t) {
|
|
953
953
|
return V(
|
|
954
954
|
[],
|
|
955
|
-
|
|
956
|
-
|
|
955
|
+
Pr,
|
|
956
|
+
n,
|
|
957
957
|
t
|
|
958
958
|
);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
const
|
|
960
|
+
function fr(n, t) {
|
|
961
|
+
const e = Mt(n.getAttribute("queryable"));
|
|
962
962
|
return V(
|
|
963
963
|
{
|
|
964
|
-
queryable: E(
|
|
964
|
+
queryable: E(e) ? e : !1
|
|
965
965
|
},
|
|
966
966
|
Li,
|
|
967
|
-
|
|
967
|
+
n,
|
|
968
968
|
t
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
var
|
|
971
|
+
function gr(n, t) {
|
|
972
|
+
var e = (
|
|
973
973
|
/** @type {Object.<string,*>} */
|
|
974
974
|
t[t.length - 1]
|
|
975
975
|
);
|
|
@@ -978,26 +978,26 @@ function fr(e, t) {
|
|
|
978
978
|
V(
|
|
979
979
|
{},
|
|
980
980
|
Li,
|
|
981
|
-
|
|
981
|
+
n,
|
|
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(n.getAttribute("queryable"));
|
|
987
|
+
E(o) || (o = e.queryable), i.queryable = E(o) ? o : !1;
|
|
988
|
+
let r = Be(n.getAttribute("cascaded"));
|
|
989
|
+
E(r) || (r = e.cascaded), i.cascaded = r;
|
|
990
|
+
let s = Mt(n.getAttribute("opaque"));
|
|
991
|
+
E(s) || (s = e.opaque), i.opaque = E(s) ? s : !1;
|
|
992
|
+
let a = Mt(n.getAttribute("noSubsets"));
|
|
993
|
+
E(a) || (a = e.noSubsets), i.noSubsets = E(a) ? a : !1;
|
|
994
|
+
let l = ft(n.getAttribute("fixedWidth"));
|
|
995
|
+
E(l) || (l = e.fixedWidth), i.fixedWidth = l;
|
|
996
|
+
let u = ft(n.getAttribute("fixedHeight"));
|
|
997
|
+
E(u) || (u = e.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 = e[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 fr(e, 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 = e[g];
|
|
1018
1018
|
i[g] = P;
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
1021
|
return i;
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function mr(n, 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: n.getAttribute("name"),
|
|
1026
|
+
units: n.getAttribute("units"),
|
|
1027
|
+
unitSymbol: n.getAttribute("unitSymbol"),
|
|
1028
|
+
default: n.getAttribute("default"),
|
|
1029
|
+
multipleValues: Mt(n.getAttribute("multipleValues")),
|
|
1030
|
+
nearestValue: Mt(n.getAttribute("nearestValue")),
|
|
1031
|
+
current: Mt(n.getAttribute("current")),
|
|
1032
|
+
values: $(n)
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
|
-
function mt(
|
|
1035
|
+
function mt(n, t) {
|
|
1036
1036
|
return V(
|
|
1037
1037
|
{},
|
|
1038
|
-
|
|
1039
|
-
|
|
1038
|
+
Br,
|
|
1039
|
+
n,
|
|
1040
1040
|
t
|
|
1041
1041
|
);
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
return V({},
|
|
1043
|
+
function yr(n, t) {
|
|
1044
|
+
return V({}, Dr, n, t);
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return V({},
|
|
1046
|
+
function br(n, t) {
|
|
1047
|
+
return V({}, Mr, n, t);
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return V({},
|
|
1049
|
+
function vr(n, t) {
|
|
1050
|
+
return V({}, Ir, n, t);
|
|
1051
1051
|
}
|
|
1052
|
-
function yn(
|
|
1053
|
-
return V({},
|
|
1052
|
+
function yn(n, t) {
|
|
1053
|
+
return V({}, Nr, n, t);
|
|
1054
1054
|
}
|
|
1055
|
-
function Bi(
|
|
1056
|
-
var
|
|
1057
|
-
if (E(
|
|
1055
|
+
function Bi(n, t) {
|
|
1056
|
+
var e = mt(n, t);
|
|
1057
|
+
if (E(e)) {
|
|
1058
1058
|
const i = [
|
|
1059
|
-
Be(
|
|
1060
|
-
Be(
|
|
1059
|
+
Be(n.getAttribute("width")),
|
|
1060
|
+
Be(n.getAttribute("height"))
|
|
1061
1061
|
];
|
|
1062
|
-
return
|
|
1062
|
+
return e.size = i, e;
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
var
|
|
1067
|
-
if (E(
|
|
1068
|
-
return
|
|
1065
|
+
function wr(n, t) {
|
|
1066
|
+
var e = mt(n, t);
|
|
1067
|
+
if (E(e))
|
|
1068
|
+
return e.name = n.getAttribute("name"), e;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1071
|
-
var
|
|
1072
|
-
if (E(
|
|
1073
|
-
return
|
|
1070
|
+
function Er(n, t) {
|
|
1071
|
+
var e = mt(n, t);
|
|
1072
|
+
if (E(e))
|
|
1073
|
+
return e.type = n.getAttribute("type"), e;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return V({},
|
|
1075
|
+
function xr(n, t) {
|
|
1076
|
+
return V({}, Hr, n, t);
|
|
1077
1077
|
}
|
|
1078
|
-
function Vi(
|
|
1078
|
+
function Vi(n, t) {
|
|
1079
1079
|
return V(
|
|
1080
1080
|
[],
|
|
1081
|
-
|
|
1082
|
-
|
|
1081
|
+
Vr,
|
|
1082
|
+
n,
|
|
1083
1083
|
t
|
|
1084
1084
|
);
|
|
1085
1085
|
}
|
|
1086
1086
|
const z = [
|
|
1087
1087
|
null,
|
|
1088
1088
|
"http://www.opengis.net/wms"
|
|
1089
|
-
],
|
|
1089
|
+
], Sr = j(
|
|
1090
1090
|
z,
|
|
1091
1091
|
{
|
|
1092
|
-
Service: m(
|
|
1093
|
-
Capability: m(
|
|
1092
|
+
Service: m(ur),
|
|
1093
|
+
Capability: m(lr)
|
|
1094
1094
|
}
|
|
1095
|
-
),
|
|
1095
|
+
), $r = j(
|
|
1096
1096
|
z,
|
|
1097
1097
|
{
|
|
1098
|
-
Request: m(
|
|
1099
|
-
Exception: m(
|
|
1100
|
-
Layer: m(
|
|
1098
|
+
Request: m(yr),
|
|
1099
|
+
Exception: m(pr),
|
|
1100
|
+
Layer: m(fr)
|
|
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(cr),
|
|
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
|
+
), Ar = j(
|
|
1118
1118
|
z,
|
|
1119
1119
|
{
|
|
1120
|
-
ContactPersonPrimary: m(
|
|
1120
|
+
ContactPersonPrimary: m(dr),
|
|
1121
1121
|
ContactPosition: m($),
|
|
1122
|
-
ContactAddress: m(
|
|
1122
|
+
ContactAddress: m(hr),
|
|
1123
1123
|
ContactVoiceTelephone: m($),
|
|
1124
1124
|
ContactFacsimileTelephone: m($),
|
|
1125
1125
|
ContactElectronicMailAddress: m($)
|
|
1126
1126
|
}
|
|
1127
|
-
),
|
|
1127
|
+
), Cr = j(
|
|
1128
1128
|
z,
|
|
1129
1129
|
{
|
|
1130
1130
|
ContactPerson: m($),
|
|
1131
1131
|
ContactOrganization: m($)
|
|
1132
1132
|
}
|
|
1133
|
-
),
|
|
1133
|
+
), Tr = 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
|
+
), Pr = 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(ar),
|
|
1158
|
+
LatLonBoundingBox: m(rr),
|
|
1159
|
+
BoundingBox: J(or),
|
|
1160
|
+
Dimension: J(mr),
|
|
1161
|
+
Attribution: m(ir),
|
|
1162
|
+
AuthorityURL: J(wr),
|
|
1163
1163
|
Identifier: J($),
|
|
1164
|
-
MetadataURL: J(
|
|
1164
|
+
MetadataURL: J(Er),
|
|
1165
1165
|
DataURL: J(mt),
|
|
1166
1166
|
FeatureListURL: J(mt),
|
|
1167
|
-
Style: J(
|
|
1167
|
+
Style: J(xr),
|
|
1168
1168
|
MinScaleDenominator: m(Ut),
|
|
1169
1169
|
MaxScaleDenominator: m(Ut),
|
|
1170
|
-
ScaleHint: m(
|
|
1171
|
-
Layer: J(
|
|
1170
|
+
ScaleHint: m(sr),
|
|
1171
|
+
Layer: J(gr)
|
|
1172
1172
|
}
|
|
1173
|
-
),
|
|
1173
|
+
), Or = j(
|
|
1174
1174
|
z,
|
|
1175
1175
|
{
|
|
1176
1176
|
Title: m($),
|
|
1177
1177
|
OnlineResource: m(Un),
|
|
1178
1178
|
LogoURL: m(Bi)
|
|
1179
1179
|
}
|
|
1180
|
-
),
|
|
1180
|
+
), Rr = j(z, {
|
|
1181
1181
|
westBoundLongitude: m(Ut),
|
|
1182
1182
|
eastBoundLongitude: m(Ut),
|
|
1183
1183
|
southBoundLatitude: m(Ut),
|
|
1184
1184
|
northBoundLatitude: m(Ut)
|
|
1185
|
-
}),
|
|
1185
|
+
}), Dr = 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
|
+
), Nr = j(
|
|
1199
1199
|
z,
|
|
1200
1200
|
{
|
|
1201
1201
|
Format: J($),
|
|
1202
1202
|
DCPType: J(
|
|
1203
|
-
|
|
1203
|
+
br
|
|
1204
1204
|
)
|
|
1205
1205
|
}
|
|
1206
|
-
),
|
|
1206
|
+
), Mr = j(
|
|
1207
1207
|
z,
|
|
1208
1208
|
{
|
|
1209
1209
|
HTTP: m(
|
|
1210
|
-
|
|
1210
|
+
vr
|
|
1211
1211
|
)
|
|
1212
1212
|
}
|
|
1213
|
-
),
|
|
1213
|
+
), Ir = 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
|
+
), Hr = 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
|
+
), Br = j(
|
|
1234
1234
|
z,
|
|
1235
1235
|
{
|
|
1236
1236
|
Format: m($),
|
|
1237
1237
|
OnlineResource: m(Un)
|
|
1238
1238
|
}
|
|
1239
|
-
),
|
|
1239
|
+
), Vr = j(
|
|
1240
1240
|
z,
|
|
1241
1241
|
{
|
|
1242
1242
|
Keyword: Ii($)
|
|
1243
1243
|
}
|
|
1244
1244
|
);
|
|
1245
|
-
class
|
|
1245
|
+
class Lr {
|
|
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, e) {
|
|
1253
|
+
!e && typeof window < "u" && (e = window.DOMParser), this.version = void 0, this._parser = new Wo(e), this._data = t;
|
|
1254
1254
|
}
|
|
1255
1255
|
/**
|
|
1256
1256
|
* @param {String} xmlString
|
|
@@ -1278,9 +1278,9 @@ class Vr {
|
|
|
1278
1278
|
* @return {Object|null}
|
|
1279
1279
|
*/
|
|
1280
1280
|
readFromDocument(t) {
|
|
1281
|
-
for (let
|
|
1282
|
-
if (
|
|
1283
|
-
return this.readFromNode(
|
|
1281
|
+
for (let e = t.firstChild; e; e = e.nextSibling)
|
|
1282
|
+
if (e.nodeType == fe.ELEMENT)
|
|
1283
|
+
return this.readFromNode(e);
|
|
1284
1284
|
return null;
|
|
1285
1285
|
}
|
|
1286
1286
|
/**
|
|
@@ -1290,49 +1290,49 @@ class Vr {
|
|
|
1290
1290
|
readFromNode(t) {
|
|
1291
1291
|
return this.version = t.getAttribute("version"), V({
|
|
1292
1292
|
version: this.version
|
|
1293
|
-
},
|
|
1293
|
+
}, Sr, t, []) || null;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
async function
|
|
1297
|
-
let t = new URL(
|
|
1298
|
-
|
|
1296
|
+
async function kr(n) {
|
|
1297
|
+
let t = new URL(n), e = t.searchParams;
|
|
1298
|
+
e.set("SERVICE", "WMS"), e.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 Lr(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(n) {
|
|
1308
|
+
const t = /\b(?:wms|ows)\b/i, e = /{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;
|
|
1309
|
+
return t.test(n) ? "TileWMS" : e.test(n) ? "XYZ" : !1;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
const
|
|
1313
|
-
return !!(
|
|
1311
|
+
function Ur(n) {
|
|
1312
|
+
const e = /^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(n), i = Fn(n);
|
|
1313
|
+
return !!(n && e && i);
|
|
1314
1314
|
}
|
|
1315
|
-
function ki(
|
|
1316
|
-
return
|
|
1315
|
+
function ki(n) {
|
|
1316
|
+
return n.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 Fr(n) {
|
|
1322
1322
|
try {
|
|
1323
|
-
return JSON.parse(ki(
|
|
1323
|
+
return JSON.parse(ki(n)), !!n;
|
|
1324
1324
|
} catch {
|
|
1325
1325
|
return !1;
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
const
|
|
1328
|
+
function jr(n, t) {
|
|
1329
|
+
const e = new URL(n).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
|
+
e.set(l, a[l]);
|
|
1333
|
+
}) : e.set(s, a);
|
|
1334
1334
|
});
|
|
1335
|
-
const i =
|
|
1335
|
+
const i = n.split("?")[0], o = e.toString();
|
|
1336
1336
|
return `${i}?${o}`;
|
|
1337
1337
|
}
|
|
1338
1338
|
/**!
|
|
@@ -1341,172 +1341,172 @@ function Fr(e, t) {
|
|
|
1341
1341
|
* @author owenm <owen23355@gmail.com>
|
|
1342
1342
|
* @license MIT
|
|
1343
1343
|
*/
|
|
1344
|
-
function ai(
|
|
1345
|
-
var
|
|
1344
|
+
function ai(n, t) {
|
|
1345
|
+
var e = Object.keys(n);
|
|
1346
1346
|
if (Object.getOwnPropertySymbols) {
|
|
1347
|
-
var i = Object.getOwnPropertySymbols(
|
|
1347
|
+
var i = Object.getOwnPropertySymbols(n);
|
|
1348
1348
|
t && (i = i.filter(function(o) {
|
|
1349
|
-
return Object.getOwnPropertyDescriptor(
|
|
1350
|
-
})),
|
|
1349
|
+
return Object.getOwnPropertyDescriptor(n, o).enumerable;
|
|
1350
|
+
})), e.push.apply(e, i);
|
|
1351
1351
|
}
|
|
1352
|
-
return
|
|
1352
|
+
return e;
|
|
1353
1353
|
}
|
|
1354
|
-
function dt(
|
|
1354
|
+
function dt(n) {
|
|
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 e = arguments[t] != null ? arguments[t] : {};
|
|
1357
|
+
t % 2 ? ai(Object(e), !0).forEach(function(i) {
|
|
1358
|
+
zr(n, i, e[i]);
|
|
1359
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(e)) : ai(Object(e)).forEach(function(i) {
|
|
1360
|
+
Object.defineProperty(n, i, Object.getOwnPropertyDescriptor(e, i));
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
|
-
return
|
|
1363
|
+
return n;
|
|
1364
1364
|
}
|
|
1365
|
-
function Te(
|
|
1365
|
+
function Te(n) {
|
|
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(n);
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1374
|
-
return t in
|
|
1375
|
-
value:
|
|
1373
|
+
function zr(n, t, e) {
|
|
1374
|
+
return t in n ? Object.defineProperty(n, t, {
|
|
1375
|
+
value: e,
|
|
1376
1376
|
enumerable: !0,
|
|
1377
1377
|
configurable: !0,
|
|
1378
1378
|
writable: !0
|
|
1379
|
-
}) :
|
|
1379
|
+
}) : n[t] = e, n;
|
|
1380
1380
|
}
|
|
1381
1381
|
function yt() {
|
|
1382
|
-
return yt = Object.assign || function(
|
|
1382
|
+
return yt = Object.assign || function(n) {
|
|
1383
1383
|
for (var t = 1; t < arguments.length; t++) {
|
|
1384
|
-
var
|
|
1385
|
-
for (var i in
|
|
1386
|
-
Object.prototype.hasOwnProperty.call(
|
|
1384
|
+
var e = arguments[t];
|
|
1385
|
+
for (var i in e)
|
|
1386
|
+
Object.prototype.hasOwnProperty.call(e, i) && (n[i] = e[i]);
|
|
1387
1387
|
}
|
|
1388
|
-
return
|
|
1388
|
+
return n;
|
|
1389
1389
|
}, yt.apply(this, arguments);
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
if (
|
|
1393
|
-
var
|
|
1391
|
+
function Zr(n, t) {
|
|
1392
|
+
if (n == null) return {};
|
|
1393
|
+
var e = {}, i = Object.keys(n), 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) && (e[o] = n[o]);
|
|
1396
|
+
return e;
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1399
|
-
if (
|
|
1400
|
-
var
|
|
1398
|
+
function Xr(n, t) {
|
|
1399
|
+
if (n == null) return {};
|
|
1400
|
+
var e = Zr(n, t), i, o;
|
|
1401
1401
|
if (Object.getOwnPropertySymbols) {
|
|
1402
|
-
var r = Object.getOwnPropertySymbols(
|
|
1402
|
+
var r = Object.getOwnPropertySymbols(n);
|
|
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(n, i) && (e[i] = n[i]);
|
|
1405
1405
|
}
|
|
1406
|
-
return
|
|
1406
|
+
return e;
|
|
1407
1407
|
}
|
|
1408
|
-
var
|
|
1409
|
-
function gt(
|
|
1408
|
+
var Yr = "1.15.2";
|
|
1409
|
+
function gt(n) {
|
|
1410
1410
|
if (typeof window < "u" && window.navigator)
|
|
1411
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(
|
|
1411
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(n);
|
|
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), se = 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 _(n, t, e) {
|
|
1418
|
+
n.addEventListener(t, e, !bt && ji);
|
|
1419
1419
|
}
|
|
1420
|
-
function S(
|
|
1421
|
-
|
|
1420
|
+
function S(n, t, e) {
|
|
1421
|
+
n.removeEventListener(t, e, !bt && ji);
|
|
1422
1422
|
}
|
|
1423
|
-
function Ve(
|
|
1423
|
+
function Ve(n, t) {
|
|
1424
1424
|
if (t) {
|
|
1425
|
-
if (t[0] === ">" && (t = t.substring(1)),
|
|
1425
|
+
if (t[0] === ">" && (t = t.substring(1)), n)
|
|
1426
1426
|
try {
|
|
1427
|
-
if (
|
|
1428
|
-
return
|
|
1429
|
-
if (
|
|
1430
|
-
return
|
|
1431
|
-
if (
|
|
1432
|
-
return
|
|
1427
|
+
if (n.matches)
|
|
1428
|
+
return n.matches(t);
|
|
1429
|
+
if (n.msMatchesSelector)
|
|
1430
|
+
return n.msMatchesSelector(t);
|
|
1431
|
+
if (n.webkitMatchesSelector)
|
|
1432
|
+
return n.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 qr(n) {
|
|
1440
|
+
return n.host && n !== document && n.host.nodeType ? n.host : n.parentNode;
|
|
1441
1441
|
}
|
|
1442
|
-
function ut(
|
|
1443
|
-
if (
|
|
1444
|
-
|
|
1442
|
+
function ut(n, t, e, i) {
|
|
1443
|
+
if (n) {
|
|
1444
|
+
e = e || document;
|
|
1445
1445
|
do {
|
|
1446
|
-
if (t != null && (t[0] === ">" ?
|
|
1447
|
-
return
|
|
1448
|
-
if (
|
|
1449
|
-
} while (
|
|
1446
|
+
if (t != null && (t[0] === ">" ? n.parentNode === e && Ve(n, t) : Ve(n, t)) || i && n === e)
|
|
1447
|
+
return n;
|
|
1448
|
+
if (n === e) break;
|
|
1449
|
+
} while (n = qr(n));
|
|
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(n, t, e) {
|
|
1455
|
+
if (n && t)
|
|
1456
|
+
if (n.classList)
|
|
1457
|
+
n.classList[e ? "add" : "remove"](t);
|
|
1458
1458
|
else {
|
|
1459
|
-
var i = (" " +
|
|
1460
|
-
|
|
1459
|
+
var i = (" " + n.className + " ").replace(ui, " ").replace(" " + t + " ", " ");
|
|
1460
|
+
n.className = (i + (e ? " " + t : "")).replace(ui, " ");
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
function b(
|
|
1464
|
-
var i =
|
|
1463
|
+
function b(n, t, e) {
|
|
1464
|
+
var i = n && n.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 (e === void 0)
|
|
1467
|
+
return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(n, "") : n.currentStyle && (e = n.currentStyle), t === void 0 ? e : e[t];
|
|
1468
|
+
!(t in i) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), i[t] = e + (typeof e == "string" ? "" : "px");
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
|
-
function jt(
|
|
1472
|
-
var
|
|
1473
|
-
if (typeof
|
|
1474
|
-
|
|
1471
|
+
function jt(n, t) {
|
|
1472
|
+
var e = "";
|
|
1473
|
+
if (typeof n == "string")
|
|
1474
|
+
e = n;
|
|
1475
1475
|
else
|
|
1476
1476
|
do {
|
|
1477
|
-
var i = b(
|
|
1478
|
-
i && i !== "none" && (
|
|
1479
|
-
} while (!t && (
|
|
1477
|
+
var i = b(n, "transform");
|
|
1478
|
+
i && i !== "none" && (e = i + " " + e);
|
|
1479
|
+
} while (!t && (n = n.parentNode));
|
|
1480
1480
|
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1481
|
-
return o && new o(
|
|
1481
|
+
return o && new o(e);
|
|
1482
1482
|
}
|
|
1483
|
-
function zi(
|
|
1484
|
-
if (
|
|
1485
|
-
var i =
|
|
1486
|
-
if (
|
|
1483
|
+
function zi(n, t, e) {
|
|
1484
|
+
if (n) {
|
|
1485
|
+
var i = n.getElementsByTagName(t), o = 0, r = i.length;
|
|
1486
|
+
if (e)
|
|
1487
1487
|
for (; o < r; o++)
|
|
1488
|
-
|
|
1488
|
+
e(i[o], o);
|
|
1489
1489
|
return i;
|
|
1490
1490
|
}
|
|
1491
1491
|
return [];
|
|
1492
1492
|
}
|
|
1493
1493
|
function ct() {
|
|
1494
|
-
var
|
|
1495
|
-
return
|
|
1494
|
+
var n = document.scrollingElement;
|
|
1495
|
+
return n || document.documentElement;
|
|
1496
1496
|
}
|
|
1497
|
-
function I(
|
|
1498
|
-
if (!(!
|
|
1497
|
+
function I(n, t, e, i, o) {
|
|
1498
|
+
if (!(!n.getBoundingClientRect && n !== window)) {
|
|
1499
1499
|
var r, s, a, l, u, d, c;
|
|
1500
|
-
if (
|
|
1500
|
+
if (n !== window && n.parentNode && n !== ct() ? (r = n.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 || e) && n !== window && (o = o || n.parentNode, !bt))
|
|
1501
1501
|
do
|
|
1502
|
-
if (o && o.getBoundingClientRect && (b(o, "transform") !== "none" ||
|
|
1502
|
+
if (o && o.getBoundingClientRect && (b(o, "transform") !== "none" || e && 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 && n !== window) {
|
|
1509
|
+
var f = jt(o || n), 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(e, t, n, 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(n, t, e) {
|
|
1523
|
+
for (var i = $t(n, !0), o = I(n)[t]; i; ) {
|
|
1524
|
+
var r = I(i)[e], s = void 0;
|
|
1525
|
+
if (e === "top" || e === "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 Xt(n, t, e, i) {
|
|
1532
|
+
for (var o = 0, r = 0, s = n.children; r < s.length; ) {
|
|
1533
|
+
if (s[r].style.display !== "none" && s[r] !== v.ghost && (i || s[r] !== v.dragged) && ut(s[r], e.draggable, n, !1)) {
|
|
1534
1534
|
if (o === t)
|
|
1535
1535
|
return s[r];
|
|
1536
1536
|
o++;
|
|
@@ -1539,105 +1539,105 @@ function Zt(e, t, n, i) {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
return null;
|
|
1541
1541
|
}
|
|
1542
|
-
function jn(
|
|
1543
|
-
for (var
|
|
1544
|
-
|
|
1545
|
-
return
|
|
1542
|
+
function jn(n, t) {
|
|
1543
|
+
for (var e = n.lastElementChild; e && (e === v.ghost || b(e, "display") === "none" || t && !Ve(e, t)); )
|
|
1544
|
+
e = e.previousElementSibling;
|
|
1545
|
+
return e || null;
|
|
1546
1546
|
}
|
|
1547
|
-
function it(
|
|
1548
|
-
var
|
|
1549
|
-
if (!
|
|
1547
|
+
function it(n, t) {
|
|
1548
|
+
var e = 0;
|
|
1549
|
+
if (!n || !n.parentNode)
|
|
1550
1550
|
return -1;
|
|
1551
|
-
for (;
|
|
1552
|
-
|
|
1553
|
-
return
|
|
1551
|
+
for (; n = n.previousElementSibling; )
|
|
1552
|
+
n.nodeName.toUpperCase() !== "TEMPLATE" && n !== v.clone && (!t || Ve(n, t)) && e++;
|
|
1553
|
+
return e;
|
|
1554
1554
|
}
|
|
1555
|
-
function di(
|
|
1556
|
-
var t = 0,
|
|
1557
|
-
if (
|
|
1555
|
+
function di(n) {
|
|
1556
|
+
var t = 0, e = 0, i = ct();
|
|
1557
|
+
if (n)
|
|
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(n), r = o.a, s = o.d;
|
|
1560
|
+
t += n.scrollLeft * r, e += n.scrollTop * s;
|
|
1561
|
+
} while (n !== i && (n = n.parentNode));
|
|
1562
|
+
return [t, e];
|
|
1563
|
+
}
|
|
1564
|
+
function Wr(n, t) {
|
|
1565
|
+
for (var e in n)
|
|
1566
|
+
if (n.hasOwnProperty(e)) {
|
|
1567
1567
|
for (var i in t)
|
|
1568
|
-
if (t.hasOwnProperty(i) && t[i] === e
|
|
1568
|
+
if (t.hasOwnProperty(i) && t[i] === n[e][i]) return Number(e);
|
|
1569
1569
|
}
|
|
1570
1570
|
return -1;
|
|
1571
1571
|
}
|
|
1572
|
-
function $t(
|
|
1573
|
-
if (!
|
|
1574
|
-
var
|
|
1572
|
+
function $t(n, t) {
|
|
1573
|
+
if (!n || !n.getBoundingClientRect) return ct();
|
|
1574
|
+
var e = n, i = !1;
|
|
1575
1575
|
do
|
|
1576
|
-
if (
|
|
1577
|
-
var o = b(
|
|
1578
|
-
if (
|
|
1579
|
-
if (!
|
|
1580
|
-
if (i || t) return
|
|
1576
|
+
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
1577
|
+
var o = b(e);
|
|
1578
|
+
if (e.clientWidth < e.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
|
|
1579
|
+
if (!e.getBoundingClientRect || e === document.body) return ct();
|
|
1580
|
+
if (i || t) return e;
|
|
1581
1581
|
i = !0;
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
while (
|
|
1584
|
+
while (e = e.parentNode);
|
|
1585
1585
|
return ct();
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1588
|
-
if (
|
|
1589
|
-
for (var
|
|
1590
|
-
t.hasOwnProperty(
|
|
1591
|
-
return
|
|
1587
|
+
function Gr(n, t) {
|
|
1588
|
+
if (n && t)
|
|
1589
|
+
for (var e in t)
|
|
1590
|
+
t.hasOwnProperty(e) && (n[e] = t[e]);
|
|
1591
|
+
return n;
|
|
1592
1592
|
}
|
|
1593
|
-
function bn(
|
|
1594
|
-
return Math.round(
|
|
1593
|
+
function bn(n, t) {
|
|
1594
|
+
return Math.round(n.top) === Math.round(t.top) && Math.round(n.left) === Math.round(t.left) && Math.round(n.height) === Math.round(t.height) && Math.round(n.width) === Math.round(t.width);
|
|
1595
1595
|
}
|
|
1596
|
-
var
|
|
1597
|
-
function Zi(
|
|
1596
|
+
var ae;
|
|
1597
|
+
function Zi(n, t) {
|
|
1598
1598
|
return function() {
|
|
1599
|
-
if (!
|
|
1600
|
-
var
|
|
1601
|
-
|
|
1602
|
-
|
|
1599
|
+
if (!ae) {
|
|
1600
|
+
var e = arguments, i = this;
|
|
1601
|
+
e.length === 1 ? n.call(i, e[0]) : n.apply(i, e), ae = setTimeout(function() {
|
|
1602
|
+
ae = void 0;
|
|
1603
1603
|
}, t);
|
|
1604
1604
|
}
|
|
1605
1605
|
};
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1608
|
-
clearTimeout(
|
|
1607
|
+
function Jr() {
|
|
1608
|
+
clearTimeout(ae), ae = void 0;
|
|
1609
1609
|
}
|
|
1610
|
-
function Xi(
|
|
1611
|
-
|
|
1610
|
+
function Xi(n, t, e) {
|
|
1611
|
+
n.scrollLeft += t, n.scrollTop += e;
|
|
1612
1612
|
}
|
|
1613
|
-
function Yi(
|
|
1614
|
-
var t = window.Polymer,
|
|
1615
|
-
return t && t.dom ? t.dom(
|
|
1613
|
+
function Yi(n) {
|
|
1614
|
+
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
1615
|
+
return t && t.dom ? t.dom(n).cloneNode(!0) : e ? e(n).clone(!0)[0] : n.cloneNode(!0);
|
|
1616
1616
|
}
|
|
1617
|
-
function qi(
|
|
1617
|
+
function qi(n, t, e) {
|
|
1618
1618
|
var i = {};
|
|
1619
|
-
return Array.from(
|
|
1619
|
+
return Array.from(n.children).forEach(function(o) {
|
|
1620
1620
|
var r, s, a, l;
|
|
1621
|
-
if (!(!ut(o, t.draggable,
|
|
1621
|
+
if (!(!ut(o, t.draggable, n, !1) || o.animated || o === e)) {
|
|
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 Kr() {
|
|
1629
|
+
var n = [], t;
|
|
1630
1630
|
return {
|
|
1631
1631
|
captureAnimationState: function() {
|
|
1632
|
-
if (
|
|
1632
|
+
if (n = [], !!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
|
+
n.push({
|
|
1637
1637
|
target: o,
|
|
1638
1638
|
rect: I(o)
|
|
1639
1639
|
});
|
|
1640
|
-
var r = dt({},
|
|
1640
|
+
var r = dt({}, n[n.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 Jr() {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
},
|
|
1650
1650
|
addAnimationState: function(i) {
|
|
1651
|
-
|
|
1651
|
+
n.push(i);
|
|
1652
1652
|
},
|
|
1653
1653
|
removeAnimationState: function(i) {
|
|
1654
|
-
|
|
1654
|
+
n.splice(Wr(n, {
|
|
1655
1655
|
target: i
|
|
1656
1656
|
}), 1);
|
|
1657
1657
|
},
|
|
@@ -1662,63 +1662,63 @@ function Jr() {
|
|
|
1662
1662
|
return;
|
|
1663
1663
|
}
|
|
1664
1664
|
var r = !1, s = 0;
|
|
1665
|
-
|
|
1665
|
+
n.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 = ts(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(), n = [];
|
|
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 = Qr(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 Qr(n) {
|
|
1687
|
+
return n.offsetWidth;
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1690
|
-
return Math.sqrt(Math.pow(t.top -
|
|
1689
|
+
function ts(n, t, e, i) {
|
|
1690
|
+
return Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.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 e in vn)
|
|
1697
|
+
vn.hasOwnProperty(e) && !(e in t) && (t[e] = vn[e]);
|
|
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, e, 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
|
+
e[s.pluginName] && (e[s.pluginName][r] && e[s.pluginName][r](dt({
|
|
1711
|
+
sortable: e
|
|
1712
|
+
}, i)), e.options[s.pluginName] && e[s.pluginName][t] && e[s.pluginName][t](dt({
|
|
1713
|
+
sortable: e
|
|
1714
1714
|
}, i)));
|
|
1715
1715
|
});
|
|
1716
1716
|
},
|
|
1717
|
-
initializePlugins: function(t,
|
|
1717
|
+
initializePlugins: function(t, e, 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, e, 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, e) {
|
|
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(e[o.pluginName], t));
|
|
1735
1735
|
}), i;
|
|
1736
1736
|
},
|
|
1737
|
-
modifyOption: function(t,
|
|
1737
|
+
modifyOption: function(t, e, 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[e] == "function" && (o = r.optionListeners[e].call(t[r.pluginName], i));
|
|
1741
1741
|
}), o;
|
|
1742
1742
|
}
|
|
1743
1743
|
};
|
|
1744
|
-
function
|
|
1745
|
-
var t =
|
|
1746
|
-
if (t = t ||
|
|
1744
|
+
function es(n) {
|
|
1745
|
+
var t = n.sortable, e = n.rootEl, i = n.name, o = n.targetEl, r = n.cloneEl, s = n.toEl, a = n.fromEl, l = n.oldIndex, u = n.newIndex, d = n.oldDraggableIndex, c = n.newDraggableIndex, p = n.originalEvent, f = n.putSortable, g = n.extraEventProperties;
|
|
1746
|
+
if (t = t || e && e[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 || e, y.from = a || e, y.item = o || e, 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
|
+
e && e.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 ns = ["evt"], G = function(t, e) {
|
|
1759
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r = Xr(i, ns);
|
|
1760
|
+
we.pluginEvent.bind(v)(t, e, dt({
|
|
1761
1761
|
dragEl: h,
|
|
1762
1762
|
parentEl: N,
|
|
1763
1763
|
ghostEl: w,
|
|
1764
|
-
rootEl:
|
|
1764
|
+
rootEl: R,
|
|
1765
1765
|
nextEl: Dt,
|
|
1766
1766
|
lastDownEl: Pe,
|
|
1767
1767
|
cloneEl: D,
|
|
1768
1768
|
cloneHidden: St,
|
|
1769
|
-
dragStarted:
|
|
1769
|
+
dragStarted: ee,
|
|
1770
1770
|
putSortable: U,
|
|
1771
1771
|
activeSortable: v.active,
|
|
1772
1772
|
originalEvent: o,
|
|
1773
1773
|
oldIndex: Ft,
|
|
1774
|
-
oldDraggableIndex:
|
|
1774
|
+
oldDraggableIndex: le,
|
|
1775
1775
|
newIndex: tt,
|
|
1776
1776
|
newDraggableIndex: xt,
|
|
1777
1777
|
hideGhostForTarget: Ki,
|
|
@@ -1784,34 +1784,34 @@ var es = ["evt"], G = function(t, n) {
|
|
|
1784
1784
|
},
|
|
1785
1785
|
dispatchSortableEvent: function(a) {
|
|
1786
1786
|
W({
|
|
1787
|
-
sortable:
|
|
1787
|
+
sortable: e,
|
|
1788
1788
|
name: a,
|
|
1789
1789
|
originalEvent: o
|
|
1790
1790
|
});
|
|
1791
1791
|
}
|
|
1792
1792
|
}, r));
|
|
1793
1793
|
};
|
|
1794
|
-
function W(
|
|
1795
|
-
|
|
1794
|
+
function W(n) {
|
|
1795
|
+
es(dt({
|
|
1796
1796
|
putSortable: U,
|
|
1797
1797
|
cloneEl: D,
|
|
1798
1798
|
targetEl: h,
|
|
1799
|
-
rootEl:
|
|
1799
|
+
rootEl: R,
|
|
1800
1800
|
oldIndex: Ft,
|
|
1801
|
-
oldDraggableIndex:
|
|
1801
|
+
oldDraggableIndex: le,
|
|
1802
1802
|
newIndex: tt,
|
|
1803
1803
|
newDraggableIndex: xt
|
|
1804
|
-
},
|
|
1804
|
+
}, n));
|
|
1805
1805
|
}
|
|
1806
|
-
var h, N, w,
|
|
1806
|
+
var h, N, w, R, Dt, Pe, D, St, Ft, tt, le, xt, xe, U, kt = !1, Le = !1, ke = [], Ot, lt, wn, En, hi, pi, ee, Vt, ue, ce = !1, Se = !1, Oe, Y, xn = [], Pn = !1, Ue = [], un = typeof document < "u", $e = Ui, fi = ve || bt ? "cssFloat" : "float", is = 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 n = document.createElement("x");
|
|
1811
|
+
return n.style.cssText = "pointer-events:auto", n.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, e) {
|
|
1814
|
+
var i = b(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Xt(t, 0, e), s = Xt(t, 1, e), 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, O, Dt, Pe, D, St, Ft, tt, ae, 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
|
+
}, os = function(t, e, i) {
|
|
1825
|
+
var o = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, a = i ? e.left : e.top, l = i ? e.right : e.bottom, u = i ? e.width : e.height;
|
|
1826
1826
|
return o === a || r === l || o + s / 2 === a + u / 2;
|
|
1827
|
-
},
|
|
1827
|
+
}, rs = function(t, e) {
|
|
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 = e >= s.top - r && e <= 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 e(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, O, Dt, Pe, D, St, Ft, tt, ae, 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 e(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, O, Dt, Pe, D, St, Ft, tt, ae, 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 = e(o.pull, !0), i.checkPut = e(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(n) {
|
|
1863
1863
|
if (Le)
|
|
1864
|
-
return
|
|
1864
|
+
return n.preventDefault(), n.stopPropagation && n.stopPropagation(), n.stopImmediatePropagation && n.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 e = rs(t.clientX, t.clientY);
|
|
1870
|
+
if (e) {
|
|
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 = e, i.preventDefault = void 0, i.stopPropagation = void 0, e[et]._onDragOver(i);
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
},
|
|
1877
|
+
}, ss = 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(n, t) {
|
|
1881
|
+
if (!(n && n.nodeType && n.nodeType === 1))
|
|
1882
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));
|
|
1883
|
+
this.el = n, this.options = t = yt({}, t), n[et] = this;
|
|
1884
|
+
var e = {
|
|
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(n.nodeName) ? ">li" : ">*",
|
|
1891
1891
|
swapThreshold: 1,
|
|
1892
1892
|
// percentage; 0 <= x <= 1
|
|
1893
1893
|
invertSwap: !1,
|
|
@@ -1896,7 +1896,7 @@ function v(e, t) {
|
|
|
1896
1896
|
// will be set to same as swapThreshold if default
|
|
1897
1897
|
removeCloneOnHide: !0,
|
|
1898
1898
|
direction: function() {
|
|
1899
|
-
return Gi(
|
|
1899
|
+
return Gi(n, this.options);
|
|
1900
1900
|
},
|
|
1901
1901
|
ghostClass: "sortable-ghost",
|
|
1902
1902
|
chosenClass: "sortable-chosen",
|
|
@@ -1923,16 +1923,16 @@ function v(e, t) {
|
|
|
1923
1923
|
x: 0,
|
|
1924
1924
|
y: 0
|
|
1925
1925
|
},
|
|
1926
|
-
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1926
|
+
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !se,
|
|
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, n, e);
|
|
1930
|
+
for (var i in e)
|
|
1931
|
+
!(i in t) && (t[i] = e[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 : is, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? _(n, "pointerdown", this._onTapStart) : (_(n, "mousedown", this._onTapStart), _(n, "touchstart", this._onTapStart)), this.nativeDraggable && (_(n, "dragover", this), _(n, "dragenter", this)), ke.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), yt(this, Kr());
|
|
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, e) {
|
|
1944
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, 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 e = 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 (fs(i), !h && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || o.disabled) && !u.isContentEditable && !(!this.nativeDraggable && se && l && l.tagName.toUpperCase() === "SELECT") && (l = ut(l, o.draggable, i, !1), !(l && l.animated) && Pe !== l)) {
|
|
1950
|
+
if (Ft = it(l), le = it(l, o.draggable), typeof d == "function") {
|
|
1951
1951
|
if (d.call(this, t, l, this)) {
|
|
1952
1952
|
W({
|
|
1953
|
-
sortable:
|
|
1953
|
+
sortable: e,
|
|
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", e, {
|
|
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: e,
|
|
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", e, {
|
|
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, e, 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 (R = 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: (e || t).clientX,
|
|
1991
|
+
clientY: (e || t).clientY
|
|
1992
|
+
}, hi = Ot.clientX - u.left, pi = Ot.clientY - u.top, this._lastX = (e || t).clientX, this._lastY = (e || 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, e), 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 || e) && (!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 e = t.touches ? t.touches[0] : t;
|
|
2020
|
+
Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
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, e) {
|
|
2030
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? _(document, "pointermove", this._onTouchMove) : e ? _(document, "touchmove", this._onTouchMove) : _(document, "mousemove", this._onTouchMove) : (_(h, "dragend", this), _(R, "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, e) {
|
|
2039
|
+
if (kt = !1, R && h) {
|
|
2040
2040
|
G("dragStarted", this, {
|
|
2041
|
-
evt:
|
|
2042
|
-
}), this.nativeDraggable && _(document, "dragover",
|
|
2041
|
+
evt: e
|
|
2042
|
+
}), this.nativeDraggable && _(document, "dragover", ss);
|
|
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: e
|
|
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), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(lt.clientX, lt.clientY), t !== e); )
|
|
2056
|
+
e = t;
|
|
2057
|
+
if (h.parentNode[et]._isOutsideThisEl(t), e)
|
|
2058
2058
|
do {
|
|
2059
|
-
if (
|
|
2059
|
+
if (e[et]) {
|
|
2060
2060
|
var i = void 0;
|
|
2061
|
-
if (i =
|
|
2061
|
+
if (i = e[et]._onDragOver({
|
|
2062
2062
|
clientX: lt.clientX,
|
|
2063
2063
|
clientY: lt.clientY,
|
|
2064
2064
|
target: t,
|
|
2065
|
-
rootEl:
|
|
2065
|
+
rootEl: e
|
|
2066
2066
|
}), i && !this.options.dragoverBubble)
|
|
2067
2067
|
break;
|
|
2068
2068
|
}
|
|
2069
|
-
t =
|
|
2070
|
-
} while (
|
|
2069
|
+
t = e;
|
|
2070
|
+
} while (e = e.parentNode);
|
|
2071
2071
|
Qi();
|
|
2072
2072
|
}
|
|
2073
2073
|
},
|
|
2074
2074
|
_onTouchMove: function(t) {
|
|
2075
2075
|
if (Ot) {
|
|
2076
|
-
var
|
|
2076
|
+
var e = this.options, i = e.fallbackTolerance, o = e.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 : R, e = 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()), e.top += Y.scrollTop, e.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", e.top), b(w, "left", e.left), b(w, "width", e.width), b(w, "height", e.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, e) {
|
|
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 || R.insertBefore(D, h), i._hideClone(), W({
|
|
2118
2118
|
sortable: i,
|
|
2119
2119
|
name: "clone"
|
|
2120
2120
|
}));
|
|
2121
|
-
}), !
|
|
2121
|
+
}), !e && Q(h, r.dragClass, !0), e ? (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, e, t)), _(document, "selectstart", i), ee = !0, se && 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 e = 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(Jt, Ao) {
|
|
2128
|
+
G(Jt, 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, Co) {
|
|
2140
|
+
return _e(R, e, h, o, Yn, I(Yn), t, Co);
|
|
2141
2141
|
},
|
|
2142
2142
|
changed: K
|
|
2143
|
-
},
|
|
2143
|
+
}, Ao));
|
|
2144
2144
|
}
|
|
2145
2145
|
function L() {
|
|
2146
2146
|
P("dragOverAnimationCapture"), g.captureAnimationState(), g !== p && p.captureAnimationState();
|
|
2147
2147
|
}
|
|
2148
|
-
function B(
|
|
2148
|
+
function B(Jt) {
|
|
2149
2149
|
return P("dragOverCompleted", {
|
|
2150
|
-
insertion:
|
|
2151
|
-
}),
|
|
2150
|
+
insertion: Jt
|
|
2151
|
+
}), Jt && (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 === e && !i.animated) && (Vt = null), !a.dragoverBubble && !t.rootEl && i !== document && (h.parentNode[et]._isOutsideThisEl(t.target), !Jt && 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: e,
|
|
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, e, !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 !== R) : 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 = R, L(), this._hideClone(), P("revert"), v.eventCanceled || (Dt ? R.insertBefore(h, Dt) : R.appendChild(h)), B(!0);
|
|
2172
|
+
var q = jn(e, a.draggable);
|
|
2173
|
+
if (!q || cs(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 && e === t.target && (i = q), i && (r = I(i)), _e(R, e, h, o, i, r, t, !!i) !== !1)
|
|
2177
|
+
return L(), q && q.nextSibling ? e.insertBefore(h, q.nextSibling) : e.appendChild(h), N = e, K(), B(!0);
|
|
2178
|
+
} else if (q && us(t, f, this)) {
|
|
2179
|
+
var st = Xt(e, 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(R, e, h, o, i, r, t, !1) !== !1)
|
|
2183
|
+
return L(), e.insertBefore(h, st), N = e, K(), B(!0);
|
|
2184
|
+
} else if (i.parentNode === e) {
|
|
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 !== e, X = !os(h.animated && h.toRect || o, i.animated && i.toRect || r, f), qt = f ? "top" : "left", vt = ci(i, "top", "top") || ci(h, "top", "top"), Wt = vt ? vt.scrollTop : void 0;
|
|
2187
|
+
Vt !== i && (Z = r[qt], ce = !1, Se = !X && a.invertSwap || at), A = ds(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, ue = A;
|
|
2198
|
+
var Gt = i.nextElementSibling, wt = !1;
|
|
2199
2199
|
wt = A === 1;
|
|
2200
|
-
var Ee = _e(
|
|
2200
|
+
var Ee = _e(R, e, 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(ls, 30), L(), wt && !Gt ? e.appendChild(h) : i.parentNode.insertBefore(h, wt ? Gt : i), vt && Xi(vt, 0, Wt - vt.scrollTop), N = h.parentNode, Z !== void 0 && !Se && (Oe = Math.abs(Z - I(i)[qt])), K(), B(!0);
|
|
2203
2203
|
}
|
|
2204
|
-
if (
|
|
2204
|
+
if (e.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 e = 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, ce = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), On(this.cloneId), On(this._dragStartId), this.nativeDraggable && (S(document, "drop", this), S(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), se && b(document.body, "user-select", ""), b(h, "transform", ""), t && (ee && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()), w && w.parentNode && w.parentNode.removeChild(w), (R === 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"] = "", ee && !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
|
+
}), R !== N ? (tt >= 0 && (W({
|
|
2233
2233
|
rootEl: N,
|
|
2234
2234
|
name: "add",
|
|
2235
2235
|
toEl: N,
|
|
2236
|
-
fromEl:
|
|
2236
|
+
fromEl: R,
|
|
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: R,
|
|
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 = le), 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), R = h = N = w = Dt = D = Pe = St = Ot = lt = ee = tt = xt = Ft = le = Vt = ue = 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), as(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 = [], e, i = this.el.children, o = 0, r = i.length, s = this.options; o < r; o++)
|
|
2297
|
+
e = i[o], ut(e, s.draggable, this.el, !1) && t.push(e.getAttribute(s.dataIdAttr) || ps(e));
|
|
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, e) {
|
|
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), e && this.captureAnimationState(), t.forEach(function(r) {
|
|
2310
2310
|
i[r] && (o.removeChild(i[r]), o.appendChild(i[r]));
|
|
2311
|
-
}),
|
|
2311
|
+
}), e && 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, e) {
|
|
2327
|
+
return ut(t, e || 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, e) {
|
|
2336
2336
|
var i = this.options;
|
|
2337
|
-
if (
|
|
2337
|
+
if (e === 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, e);
|
|
2340
|
+
typeof o < "u" ? i[t] = o : i[t] = e, 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(e) {
|
|
2349
|
+
e.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 == R && !this.options.group.revertClone ? R.insertBefore(D, h) : Dt ? R.insertBefore(D, Dt) : R.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 as(n) {
|
|
2370
|
+
n.dataTransfer && (n.dataTransfer.dropEffect = "move"), n.cancelable && n.preventDefault();
|
|
2371
2371
|
}
|
|
2372
|
-
function _e(
|
|
2373
|
-
var l, u =
|
|
2372
|
+
function _e(n, t, e, i, o, r, s, a) {
|
|
2373
|
+
var l, u = n[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 = n, l.dragged = e, l.draggedRect = i, l.related = o || t, l.relatedRect = r || I(t), l.willInsertAfter = a, l.originalEvent = s, n.dispatchEvent(l), d && (c = d.call(u, l, s)), c;
|
|
2378
2378
|
}
|
|
2379
|
-
function Sn(
|
|
2380
|
-
|
|
2379
|
+
function Sn(n) {
|
|
2380
|
+
n.draggable = !1;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function ls() {
|
|
2383
2383
|
Pn = !1;
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2386
|
-
var i = I(
|
|
2387
|
-
return t ?
|
|
2385
|
+
function us(n, t, e) {
|
|
2386
|
+
var i = I(Xt(e.el, 0, e.options, !0)), o = qi(e.el, e.options, w), r = 10;
|
|
2387
|
+
return t ? n.clientX < o.left - r || n.clientY < i.top && n.clientX < i.right : n.clientY < o.top - r || n.clientY < i.bottom && n.clientX < i.left;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
var i = I(jn(
|
|
2391
|
-
return t ?
|
|
2389
|
+
function cs(n, t, e) {
|
|
2390
|
+
var i = I(jn(e.el, e.options.draggable)), o = qi(e.el, e.options, w), r = 10;
|
|
2391
|
+
return t ? n.clientX > o.right + r || n.clientY > i.bottom && n.clientX > i.left : n.clientY > o.bottom + r || n.clientX > i.right && n.clientY > i.top;
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2394
|
-
var l = i ?
|
|
2393
|
+
function ds(n, t, e, i, o, r, s, a) {
|
|
2394
|
+
var l = i ? n.clientY : n.clientX, u = i ? e.height : e.width, d = i ? e.top : e.left, c = i ? e.bottom : e.right, p = !1;
|
|
2395
2395
|
if (!s) {
|
|
2396
2396
|
if (a && Oe < u * o) {
|
|
2397
|
-
if (!
|
|
2397
|
+
if (!ce && (ue === 1 ? l > d + u * r / 2 : l < c - u * r / 2) && (ce = !0), ce)
|
|
2398
2398
|
p = !0;
|
|
2399
|
-
else if (
|
|
2400
|
-
return -
|
|
2399
|
+
else if (ue === 1 ? l < d + Oe : l > c - Oe)
|
|
2400
|
+
return -ue;
|
|
2401
2401
|
} else if (l > d + u * (1 - o) / 2 && l < c - u * (1 - o) / 2)
|
|
2402
|
-
return
|
|
2402
|
+
return hs(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 hs(n) {
|
|
2407
|
+
return it(h) < it(n) ? 1 : -1;
|
|
2408
2408
|
}
|
|
2409
|
-
function
|
|
2410
|
-
for (var t =
|
|
2411
|
-
i += t.charCodeAt(
|
|
2409
|
+
function ps(n) {
|
|
2410
|
+
for (var t = n.tagName + n.className + n.src + n.href + n.textContent, e = t.length, i = 0; e--; )
|
|
2411
|
+
i += t.charCodeAt(e);
|
|
2412
2412
|
return i.toString(36);
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function fs(n) {
|
|
2415
2415
|
Ue.length = 0;
|
|
2416
|
-
for (var t =
|
|
2417
|
-
var i = t[
|
|
2416
|
+
for (var t = n.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
2417
|
+
var i = t[e];
|
|
2418
2418
|
i.checked && Ue.push(i);
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
|
-
function Re(
|
|
2422
|
-
return setTimeout(
|
|
2421
|
+
function Re(n) {
|
|
2422
|
+
return setTimeout(n, 0);
|
|
2423
2423
|
}
|
|
2424
|
-
function On(
|
|
2425
|
-
return clearTimeout(
|
|
2424
|
+
function On(n) {
|
|
2425
|
+
return clearTimeout(n);
|
|
2426
2426
|
}
|
|
2427
|
-
un && _(document, "touchmove", function(
|
|
2428
|
-
(v.active || kt) &&
|
|
2427
|
+
un && _(document, "touchmove", function(n) {
|
|
2428
|
+
(v.active || kt) && n.cancelable && n.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, e) {
|
|
2436
|
+
return !!ut(t, e, t, !1);
|
|
2437
2437
|
},
|
|
2438
|
-
extend:
|
|
2438
|
+
extend: Gr,
|
|
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: Xt
|
|
2448
2448
|
};
|
|
2449
|
-
v.get = function(
|
|
2450
|
-
return
|
|
2449
|
+
v.get = function(n) {
|
|
2450
|
+
return n[et];
|
|
2451
2451
|
};
|
|
2452
2452
|
v.mount = function() {
|
|
2453
|
-
for (var
|
|
2454
|
-
t[
|
|
2453
|
+
for (var n = arguments.length, t = new Array(n), e = 0; e < n; e++)
|
|
2454
|
+
t[e] = arguments[e];
|
|
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(n, t) {
|
|
2462
|
+
return new v(n, t);
|
|
2463
2463
|
};
|
|
2464
|
-
v.version =
|
|
2465
|
-
var M = [],
|
|
2466
|
-
function
|
|
2467
|
-
function
|
|
2464
|
+
v.version = Yr;
|
|
2465
|
+
var M = [], ne, Rn, Dn = !1, $n, _n, Fe, ie;
|
|
2466
|
+
function gs() {
|
|
2467
|
+
function n() {
|
|
2468
2468
|
this.defaults = {
|
|
2469
2469
|
scroll: !0,
|
|
2470
2470
|
forceAutoScrollFallback: !1,
|
|
@@ -2475,70 +2475,70 @@ function fs() {
|
|
|
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 n.prototype = {
|
|
2479
|
+
dragStarted: function(e) {
|
|
2480
|
+
var i = e.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(e) {
|
|
2484
|
+
var i = e.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(), Jr();
|
|
2489
2489
|
},
|
|
2490
2490
|
nulling: function() {
|
|
2491
|
-
Fe = Rn =
|
|
2491
|
+
Fe = Rn = ne = Dn = ie = $n = _n = null, M.length = 0;
|
|
2492
2492
|
},
|
|
2493
|
-
_handleFallbackAutoScroll: function(
|
|
2494
|
-
this._handleAutoScroll(
|
|
2493
|
+
_handleFallbackAutoScroll: function(e) {
|
|
2494
|
+
this._handleAutoScroll(e, !0);
|
|
2495
2495
|
},
|
|
2496
|
-
_handleAutoScroll: function(
|
|
2497
|
-
var o = this, r = (
|
|
2498
|
-
if (Fe =
|
|
2499
|
-
An(
|
|
2496
|
+
_handleAutoScroll: function(e, i) {
|
|
2497
|
+
var o = this, r = (e.touches ? e.touches[0] : e).clientX, s = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, s);
|
|
2498
|
+
if (Fe = e, i || this.options.forceAutoScrollFallback || ve || bt || se) {
|
|
2499
|
+
An(e, this.options, a, i);
|
|
2500
2500
|
var l = $t(a, !0);
|
|
2501
|
-
Dn && (!
|
|
2501
|
+
Dn && (!ie || r !== $n || s !== _n) && (ie && gi(), ie = 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(e, 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(e, this.options, $t(a, !1), !1);
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
|
-
}, yt(
|
|
2513
|
+
}, yt(n, {
|
|
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(n) {
|
|
2520
|
+
clearInterval(n.pid);
|
|
2521
2521
|
}), M = [];
|
|
2522
2522
|
}
|
|
2523
2523
|
function gi() {
|
|
2524
|
-
clearInterval(
|
|
2524
|
+
clearInterval(ie);
|
|
2525
2525
|
}
|
|
2526
|
-
var An = Zi(function(
|
|
2526
|
+
var An = Zi(function(n, t, e, i) {
|
|
2527
2527
|
if (t.scroll) {
|
|
2528
|
-
var o = (
|
|
2529
|
-
Rn !==
|
|
2530
|
-
var c = 0, p =
|
|
2528
|
+
var o = (n.touches ? n.touches[0] : n).clientX, r = (n.touches ? n.touches[0] : n).clientY, s = t.scrollSensitivity, a = t.scrollSpeed, l = ct(), u = !1, d;
|
|
2529
|
+
Rn !== e && (Rn = e, De(), ne = t.scroll, d = t.scrollFn, ne === !0 && (ne = $t(e, !0)));
|
|
2530
|
+
var c = 0, p = ne;
|
|
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), qt = 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 Wt = st && (Math.abs(B - o) <= s && qt + K < Z) - (Math.abs(L - o) <= s && !!qt), 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 != Wt || M[c].vy != ht || M[c].el !== f) && (M[c].el = f, M[c].vx = Wt, M[c].vy = ht, clearInterval(M[c].pid), (Wt != 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 Gt = 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, Gt, n, Fe, M[this.layer].el) !== "continue" || Xi(M[this.layer].el, wt, Gt);
|
|
2542
2542
|
}).bind({
|
|
2543
2543
|
layer: c
|
|
2544
2544
|
}), 24))), c++;
|
|
@@ -2546,11 +2546,11 @@ var An = Zi(function(e, t, n, i) {
|
|
|
2546
2546
|
Dn = u;
|
|
2547
2547
|
}
|
|
2548
2548
|
}, 30), to = function(t) {
|
|
2549
|
-
var
|
|
2550
|
-
if (
|
|
2549
|
+
var e = t.originalEvent, i = t.putSortable, o = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
2550
|
+
if (e) {
|
|
2551
2551
|
var u = i || r;
|
|
2552
2552
|
a();
|
|
2553
|
-
var d =
|
|
2553
|
+
var d = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, 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 e = t.oldDraggableIndex;
|
|
2566
|
+
this.startIndex = e;
|
|
2567
2567
|
},
|
|
2568
2568
|
onSpill: function(t) {
|
|
2569
|
-
var
|
|
2569
|
+
var e = 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 = Xt(this.sortable.el, this.startIndex, this.options);
|
|
2572
|
+
o ? this.sortable.el.insertBefore(e, o) : this.sortable.el.appendChild(e), 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 e = t.dragEl, i = t.putSortable, o = i || this.sortable;
|
|
2584
|
+
o.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), 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 gs());
|
|
2592
2592
|
v.mount(Zn, zn);
|
|
2593
|
-
const
|
|
2594
|
-
const t =
|
|
2595
|
-
let
|
|
2596
|
-
return
|
|
2593
|
+
const ms = (n) => {
|
|
2594
|
+
const t = n.item;
|
|
2595
|
+
let e = Array.prototype.slice.call(t.parentNode.childNodes);
|
|
2596
|
+
return e = e.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
|
+
), e;
|
|
2599
|
+
}, ys = (n, t, e, i, o, r) => {
|
|
2600
|
+
const a = n.item.parentNode;
|
|
2601
|
+
for (const y of e)
|
|
2602
2602
|
a.appendChild(y);
|
|
2603
|
-
if (
|
|
2603
|
+
if (n.oldIndex == n.newIndex) return;
|
|
2604
2604
|
const l = i.getArray(), u = (
|
|
2605
2605
|
/** @type {Element & {layer: import("ol/layer").Layer}} */
|
|
2606
|
-
|
|
2606
|
+
n.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 gs = (e) => {
|
|
|
2620
2620
|
}
|
|
2621
2621
|
t.requestUpdate();
|
|
2622
2622
|
};
|
|
2623
|
-
function
|
|
2623
|
+
function bs(n, t, e, i) {
|
|
2624
2624
|
let o = [], r = null;
|
|
2625
|
-
|
|
2625
|
+
n._sortable = v.create(n, {
|
|
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 = ms(s),
|
|
2632
2632
|
onMove: (s) => {
|
|
2633
2633
|
r = s.related;
|
|
2634
2634
|
},
|
|
2635
|
-
onEnd: (s) =>
|
|
2635
|
+
onEnd: (s) => ys(s, i, o, t, e, r)
|
|
2636
2636
|
});
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2639
|
-
const o =
|
|
2638
|
+
function vs(n, t, e, i) {
|
|
2639
|
+
const o = n.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(e) || (s.set(e, `layer ${a}`), r = !0), r && i.requestUpdate();
|
|
2644
2644
|
});
|
|
2645
2645
|
}
|
|
2646
|
-
function Xn(
|
|
2646
|
+
function Xn(n, t, e) {
|
|
2647
2647
|
let i = [];
|
|
2648
2648
|
const o = (r, s, a) => {
|
|
2649
2649
|
i = [
|
|
@@ -2663,64 +2663,74 @@ function Xn(e, t, n) {
|
|
|
2663
2663
|
)
|
|
2664
2664
|
), i;
|
|
2665
2665
|
};
|
|
2666
|
-
return o(
|
|
2666
|
+
return o(n, t, e), i;
|
|
2667
2667
|
}
|
|
2668
|
-
function
|
|
2669
|
-
if (!
|
|
2670
|
-
if (!eo(
|
|
2671
|
-
const i =
|
|
2668
|
+
function ws(n, t, e) {
|
|
2669
|
+
if (!n || !t) return !1;
|
|
2670
|
+
if (!eo(n, e)) return !0;
|
|
2671
|
+
const i = n.get("minZoom"), o = n.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(n, t) {
|
|
2675
|
+
const e = n.get("minZoom"), i = n.get("maxZoom");
|
|
2676
|
+
return !!(t && (e !== -1 / 0 || i !== 1 / 0));
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2678
|
+
function Es(n, t) {
|
|
2679
2679
|
var o, r, s;
|
|
2680
|
-
return !
|
|
2680
|
+
return !n || !t ? void 0 : n.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
|
+
n.getSource ? (r = n.getSource()) == null ? void 0 : r.ol_uid : void 0
|
|
2683
|
+
)) ? "draw" : n.declutter_ !== void 0 ? "vector" : "raster";
|
|
2684
2684
|
}
|
|
2685
|
-
function no(
|
|
2685
|
+
function no(n, t) {
|
|
2686
2686
|
var i;
|
|
2687
|
-
let
|
|
2688
|
-
for (const o in
|
|
2689
|
-
const r =
|
|
2687
|
+
let e = {};
|
|
2688
|
+
for (const o in n) {
|
|
2689
|
+
const r = n[o].type;
|
|
2690
2690
|
if (r && r !== "object")
|
|
2691
|
-
|
|
2692
|
-
else if (typeof
|
|
2691
|
+
e[o] = r === "number" ? Number(t[o]) : t[o];
|
|
2692
|
+
else if (typeof n[o] == "object" && ((i = n[o]) != null && i.properties)) {
|
|
2693
2693
|
const s = no(
|
|
2694
|
-
|
|
2694
|
+
n[o].properties,
|
|
2695
2695
|
t
|
|
2696
2696
|
);
|
|
2697
|
-
Object.keys(s).length > 0 && (
|
|
2697
|
+
Object.keys(s).length > 0 && (e[o] = s);
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
2700
|
-
return
|
|
2700
|
+
return e;
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2703
|
-
var r;
|
|
2704
|
-
if (!t
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2702
|
+
function xs(n, t) {
|
|
2703
|
+
var r, s, a, l, u;
|
|
2704
|
+
if (!t) return null;
|
|
2705
|
+
let e = {}, i = n.get("type") === "WebGLTile" ? (
|
|
2706
|
+
/** @type {import("ol/layer/WebGLTile").default} */
|
|
2707
|
+
(r = n.style_) == null ? void 0 : r.variables
|
|
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
|
|
2708
2718
|
);
|
|
2709
2719
|
return Object.keys(o).length ? o : null;
|
|
2710
2720
|
}
|
|
2711
|
-
const
|
|
2712
|
-
(
|
|
2713
|
-
),
|
|
2721
|
+
const Ss = (n, t) => n == null ? void 0 : n.filter(
|
|
2722
|
+
(e) => ["remove", "sort"].filter((i) => t != null && t.get("layerControlDisable") ? i !== "sort" : !0).includes(e)
|
|
2723
|
+
), $s = (n, t) => n == null ? void 0 : n.filter((e) => {
|
|
2714
2724
|
let i = !0;
|
|
2715
|
-
return ["remove", "sort"].includes(
|
|
2716
|
-
}),
|
|
2717
|
-
<button slot="${
|
|
2718
|
-
`,
|
|
2725
|
+
return ["remove", "sort"].includes(e) && (i = !1), e === "info" && (i = t.get("description")), e === "config" && (i = t.get("layerConfig")), i;
|
|
2726
|
+
}), _s = (n, t) => x`
|
|
2727
|
+
<button slot="${n}-icon" class="icon">${t ? n : C}</button>
|
|
2728
|
+
`, As = (n) => x`
|
|
2719
2729
|
<button
|
|
2720
2730
|
class="remove-icon icon"
|
|
2721
2731
|
@click=${() => {
|
|
2722
|
-
const { layer: t } =
|
|
2723
|
-
t == null || t.set("layerControlOptional", !0), t == null || t.setVisible(!1),
|
|
2732
|
+
const { layer: t } = n;
|
|
2733
|
+
t == null || t.set("layerControlOptional", !0), t == null || t.setVisible(!1), n.dispatchEvent(
|
|
2724
2734
|
new CustomEvent("changed", {
|
|
2725
2735
|
detail: t,
|
|
2726
2736
|
bubbles: !0
|
|
@@ -2728,16 +2738,16 @@ const xs = (e, t) => e == null ? void 0 : e.filter(
|
|
|
2728
2738
|
);
|
|
2729
2739
|
}}
|
|
2730
2740
|
>
|
|
2731
|
-
${
|
|
2741
|
+
${n.unstyled ? "x" : C}
|
|
2732
2742
|
</button>
|
|
2733
|
-
`,
|
|
2743
|
+
`, Cs = (n) => x`
|
|
2734
2744
|
<span class="button sort-icon icon drag-handle">
|
|
2735
|
-
${
|
|
2745
|
+
${n ? "═" : C}
|
|
2736
2746
|
</span>
|
|
2737
|
-
`, io = (
|
|
2738
|
-
var
|
|
2747
|
+
`, io = (n) => {
|
|
2748
|
+
var e;
|
|
2739
2749
|
const t = ["layerControlHide", "layerControlOptional"];
|
|
2740
|
-
return (
|
|
2750
|
+
return (e = n == null ? void 0 : n.getArray()) == null ? void 0 : e.filter((i) => t.every((o) => !i.get(o)));
|
|
2741
2751
|
};
|
|
2742
2752
|
/**
|
|
2743
2753
|
* @license
|
|
@@ -2745,22 +2755,22 @@ const xs = (e, t) => e == null ? void 0 : e.filter(
|
|
|
2745
2755
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2746
2756
|
*/
|
|
2747
2757
|
const oo = Ln(class extends kn {
|
|
2748
|
-
constructor(
|
|
2749
|
-
if (super(
|
|
2750
|
-
if (!
|
|
2758
|
+
constructor(n) {
|
|
2759
|
+
if (super(n), n.type !== Et.PROPERTY && n.type !== Et.ATTRIBUTE && n.type !== Et.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
2760
|
+
if (!Zo(n)) throw Error("`live` bindings can only contain a single expression");
|
|
2751
2761
|
}
|
|
2752
|
-
render(
|
|
2753
|
-
return
|
|
2762
|
+
render(n) {
|
|
2763
|
+
return n;
|
|
2754
2764
|
}
|
|
2755
|
-
update(
|
|
2765
|
+
update(n, [t]) {
|
|
2756
2766
|
if (t === ot || t === C) return t;
|
|
2757
|
-
const
|
|
2758
|
-
if (
|
|
2759
|
-
if (t ===
|
|
2760
|
-
} else if (
|
|
2761
|
-
if (!!t ===
|
|
2762
|
-
} else if (
|
|
2763
|
-
return Di(
|
|
2767
|
+
const e = n.element, i = n.name;
|
|
2768
|
+
if (n.type === Et.PROPERTY) {
|
|
2769
|
+
if (t === e[i]) return ot;
|
|
2770
|
+
} else if (n.type === Et.BOOLEAN_ATTRIBUTE) {
|
|
2771
|
+
if (!!t === e.hasAttribute(i)) return ot;
|
|
2772
|
+
} else if (n.type === Et.ATTRIBUTE && e.getAttribute(i) === t + "") return ot;
|
|
2773
|
+
return Di(n), t;
|
|
2764
2774
|
}
|
|
2765
2775
|
});
|
|
2766
2776
|
/**
|
|
@@ -2778,51 +2788,98 @@ class Nn extends kn {
|
|
|
2778
2788
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
2779
2789
|
if (t === this.it) return this._t;
|
|
2780
2790
|
this.it = t;
|
|
2781
|
-
const
|
|
2782
|
-
return
|
|
2791
|
+
const e = [t];
|
|
2792
|
+
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
2783
2793
|
}
|
|
2784
2794
|
}
|
|
2785
2795
|
Nn.directiveName = "unsafeHTML", Nn.resultType = 1;
|
|
2786
|
-
const
|
|
2796
|
+
const Ts = Ln(Nn);
|
|
2787
2797
|
/**
|
|
2788
2798
|
* @license
|
|
2789
2799
|
* Copyright 2021 Google LLC
|
|
2790
2800
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2791
2801
|
*/
|
|
2792
|
-
function* Ne(
|
|
2793
|
-
if (
|
|
2794
|
-
let
|
|
2795
|
-
for (const i of
|
|
2802
|
+
function* Ne(n, t) {
|
|
2803
|
+
if (n !== void 0) {
|
|
2804
|
+
let e = 0;
|
|
2805
|
+
for (const i of n) yield t(i, e++);
|
|
2796
2806
|
}
|
|
2797
2807
|
}
|
|
2798
|
-
const
|
|
2808
|
+
const Ps = (n, t, e) => {
|
|
2799
2809
|
let i = t;
|
|
2800
|
-
return
|
|
2801
|
-
(...o) =>
|
|
2802
|
-
),
|
|
2810
|
+
return e.layer.getSource().getTileUrlFunction() && (i || (i = e.layer.getSource().getTileUrlFunction()), e.layer.getSource().setTileUrlFunction(
|
|
2811
|
+
(...o) => jr(i(...o), n)
|
|
2812
|
+
), e.layer.getSource().setKey(/* @__PURE__ */ new Date())), i;
|
|
2803
2813
|
};
|
|
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
|
+
}
|
|
2804
2861
|
var Ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2805
|
-
function
|
|
2806
|
-
return
|
|
2862
|
+
function Ds(n) {
|
|
2863
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2807
2864
|
}
|
|
2808
|
-
var
|
|
2809
|
-
return
|
|
2865
|
+
var Ns = "Expected a function", mi = NaN, Ms = "[object Symbol]", Is = /^\s+|\s+$/g, Hs = /^[-+]0x[0-9a-f]+$/i, Bs = /^0b[01]+$/i, Vs = /^0o[0-7]+$/i, Ls = parseInt, ks = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, Us = typeof self == "object" && self && self.Object === Object && self, Fs = ks || Us || Function("return this")(), js = Object.prototype, zs = js.toString, Zs = Math.max, Xs = Math.min, Cn = function() {
|
|
2866
|
+
return Fs.Date.now();
|
|
2810
2867
|
};
|
|
2811
|
-
function
|
|
2868
|
+
function Ys(n, t, e) {
|
|
2812
2869
|
var i, o, r, s, a, l, u = 0, d = !1, c = !1, p = !0;
|
|
2813
|
-
if (typeof
|
|
2814
|
-
throw new TypeError(
|
|
2815
|
-
t = yi(t) || 0, Mn(
|
|
2870
|
+
if (typeof n != "function")
|
|
2871
|
+
throw new TypeError(Ns);
|
|
2872
|
+
t = yi(t) || 0, Mn(e) && (d = !!e.leading, c = "maxWait" in e, r = c ? Zs(yi(e.maxWait) || 0, t) : r, p = "trailing" in e ? !!e.trailing : p);
|
|
2816
2873
|
function f(A) {
|
|
2817
2874
|
var Z = i, at = o;
|
|
2818
|
-
return i = o = void 0, u = A, s =
|
|
2875
|
+
return i = o = void 0, u = A, s = n.apply(at, Z), s;
|
|
2819
2876
|
}
|
|
2820
2877
|
function g(A) {
|
|
2821
2878
|
return u = A, a = setTimeout(L, t), d ? f(A) : s;
|
|
2822
2879
|
}
|
|
2823
2880
|
function y(A) {
|
|
2824
2881
|
var Z = A - l, at = A - u, X = t - Z;
|
|
2825
|
-
return c ?
|
|
2882
|
+
return c ? Xs(X, r - at) : X;
|
|
2826
2883
|
}
|
|
2827
2884
|
function P(A) {
|
|
2828
2885
|
var Z = A - l, at = A - u;
|
|
@@ -2855,35 +2912,35 @@ function zs(e, t, n) {
|
|
|
2855
2912
|
}
|
|
2856
2913
|
return st.cancel = K, st.flush = q, st;
|
|
2857
2914
|
}
|
|
2858
|
-
function Mn(
|
|
2859
|
-
var t = typeof
|
|
2860
|
-
return !!
|
|
2915
|
+
function Mn(n) {
|
|
2916
|
+
var t = typeof n;
|
|
2917
|
+
return !!n && (t == "object" || t == "function");
|
|
2861
2918
|
}
|
|
2862
|
-
function
|
|
2863
|
-
return !!
|
|
2919
|
+
function qs(n) {
|
|
2920
|
+
return !!n && typeof n == "object";
|
|
2864
2921
|
}
|
|
2865
|
-
function
|
|
2866
|
-
return typeof
|
|
2922
|
+
function Ws(n) {
|
|
2923
|
+
return typeof n == "symbol" || qs(n) && zs.call(n) == Ms;
|
|
2867
2924
|
}
|
|
2868
|
-
function yi(
|
|
2869
|
-
if (typeof
|
|
2870
|
-
return
|
|
2871
|
-
if (
|
|
2925
|
+
function yi(n) {
|
|
2926
|
+
if (typeof n == "number")
|
|
2927
|
+
return n;
|
|
2928
|
+
if (Ws(n))
|
|
2872
2929
|
return mi;
|
|
2873
|
-
if (Mn(
|
|
2874
|
-
var t = typeof
|
|
2875
|
-
|
|
2876
|
-
}
|
|
2877
|
-
if (typeof
|
|
2878
|
-
return
|
|
2879
|
-
|
|
2880
|
-
var
|
|
2881
|
-
return
|
|
2882
|
-
}
|
|
2883
|
-
var
|
|
2884
|
-
const
|
|
2885
|
-
var
|
|
2886
|
-
class
|
|
2930
|
+
if (Mn(n)) {
|
|
2931
|
+
var t = typeof n.valueOf == "function" ? n.valueOf() : n;
|
|
2932
|
+
n = Mn(t) ? t + "" : t;
|
|
2933
|
+
}
|
|
2934
|
+
if (typeof n != "string")
|
|
2935
|
+
return n === 0 ? n : +n;
|
|
2936
|
+
n = n.replace(Is, "");
|
|
2937
|
+
var e = Bs.test(n);
|
|
2938
|
+
return e || Vs.test(n) ? Ls(n.slice(2), e ? 2 : 8) : Hs.test(n) ? mi : +n;
|
|
2939
|
+
}
|
|
2940
|
+
var Gs = Ys;
|
|
2941
|
+
const so = /* @__PURE__ */ Ds(Gs);
|
|
2942
|
+
var zt, ge, me, je, lo, ze, Ze;
|
|
2943
|
+
class ao extends nt {
|
|
2887
2944
|
constructor() {
|
|
2888
2945
|
super();
|
|
2889
2946
|
T(this, je);
|
|
@@ -2892,7 +2949,7 @@ class so extends nt {
|
|
|
2892
2949
|
*
|
|
2893
2950
|
* @type {{[key: string]: any}}
|
|
2894
2951
|
*/
|
|
2895
|
-
T(this,
|
|
2952
|
+
T(this, zt, {});
|
|
2896
2953
|
/**
|
|
2897
2954
|
* data input by the user
|
|
2898
2955
|
*
|
|
@@ -2907,7 +2964,7 @@ class so extends nt {
|
|
|
2907
2964
|
T(this, me);
|
|
2908
2965
|
T(this, ze, "");
|
|
2909
2966
|
T(this, Ze, "");
|
|
2910
|
-
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.debouncedDataChange =
|
|
2967
|
+
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.debouncedDataChange = so(k(this, je, lo), 1e3, {
|
|
2911
2968
|
leading: !0
|
|
2912
2969
|
});
|
|
2913
2970
|
}
|
|
@@ -2921,16 +2978,16 @@ class so extends nt {
|
|
|
2921
2978
|
* Renders a JSON form for configuration options of a layer.
|
|
2922
2979
|
*/
|
|
2923
2980
|
render() {
|
|
2924
|
-
|
|
2925
|
-
const
|
|
2981
|
+
Kt(this, ge, xs(this.layer, this.layerConfig)), customElements.get("eox-jsonform") || console.error("Please import @eox/jsonform in order to use layerconfig");
|
|
2982
|
+
const e = {
|
|
2926
2983
|
disable_edit_json: !0,
|
|
2927
2984
|
disable_collapse: !0,
|
|
2928
2985
|
disable_properties: !0
|
|
2929
2986
|
};
|
|
2930
2987
|
return x`
|
|
2931
2988
|
<style>
|
|
2932
|
-
${
|
|
2933
|
-
${!this.unstyled &&
|
|
2989
|
+
${O(this, ze)}
|
|
2990
|
+
${!this.unstyled && O(this, Ze)}
|
|
2934
2991
|
</style>
|
|
2935
2992
|
${rt(
|
|
2936
2993
|
this.layerConfig,
|
|
@@ -2938,8 +2995,8 @@ class so extends nt {
|
|
|
2938
2995
|
<!-- Render a JSON form for layer configuration -->
|
|
2939
2996
|
<eox-jsonform
|
|
2940
2997
|
.schema=${this.layerConfig.schema}
|
|
2941
|
-
.value=${
|
|
2942
|
-
.options=${
|
|
2998
|
+
.value=${O(this, ge)}
|
|
2999
|
+
.options=${e}
|
|
2943
3000
|
@change=${this.debouncedDataChange}
|
|
2944
3001
|
></eox-jsonform>
|
|
2945
3002
|
`
|
|
@@ -2947,19 +3004,23 @@ class so extends nt {
|
|
|
2947
3004
|
`;
|
|
2948
3005
|
}
|
|
2949
3006
|
}
|
|
2950
|
-
|
|
3007
|
+
zt = new WeakMap(), ge = new WeakMap(), me = new WeakMap(), je = new WeakSet(), /**
|
|
2951
3008
|
* Handles changes in eox-jsonform values.
|
|
2952
3009
|
*
|
|
2953
3010
|
* @param {{ detail: { value: string; }; }} e
|
|
2954
3011
|
*/
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
3012
|
+
lo = function(e) {
|
|
3013
|
+
Kt(this, zt, e.detail), this.layerConfig.type === "style" ? ["Vector", "WebGLTile"].includes(this.layer.get("type")) ? Os(O(this, zt), this.layer) : console.error(
|
|
3014
|
+
`Layer type ${this.layer.get(
|
|
3015
|
+
"type"
|
|
3016
|
+
)} does not support styles configuration`
|
|
3017
|
+
) : (Kt(this, me, Ps(
|
|
3018
|
+
O(this, zt),
|
|
3019
|
+
O(this, me),
|
|
2959
3020
|
this
|
|
2960
|
-
)), this.requestUpdate();
|
|
3021
|
+
)), this.requestUpdate());
|
|
2961
3022
|
}, ze = new WeakMap(), Ze = new WeakMap(), // Define static properties for the component
|
|
2962
|
-
H(
|
|
3023
|
+
H(ao, "properties", {
|
|
2963
3024
|
layer: { attribute: !1 },
|
|
2964
3025
|
unstyled: { type: Boolean },
|
|
2965
3026
|
noShadow: { type: Boolean },
|
|
@@ -2967,14 +3028,14 @@ H(so, "properties", {
|
|
|
2967
3028
|
});
|
|
2968
3029
|
customElements.define(
|
|
2969
3030
|
"eox-layercontrol-layerconfig",
|
|
2970
|
-
|
|
3031
|
+
ao
|
|
2971
3032
|
);
|
|
2972
3033
|
var ye, Xe, Ye;
|
|
2973
|
-
class
|
|
3034
|
+
class uo extends nt {
|
|
2974
3035
|
constructor() {
|
|
2975
3036
|
super();
|
|
2976
3037
|
/** @param {number} index */
|
|
2977
|
-
T(this, ye, (
|
|
3038
|
+
T(this, ye, (e) => this.selectedTab === e && "highlighted");
|
|
2978
3039
|
T(this, Xe, `
|
|
2979
3040
|
.tabbed figure {
|
|
2980
3041
|
margin: 0;
|
|
@@ -3031,11 +3092,11 @@ class lo extends nt {
|
|
|
3031
3092
|
* It sets up navigation for switching between tabs and offers customizable icons for tabs and actions.
|
|
3032
3093
|
*/
|
|
3033
3094
|
render() {
|
|
3034
|
-
const
|
|
3095
|
+
const e = this.tabs, i = this.actions, o = i.length + e.length > 1;
|
|
3035
3096
|
return x`
|
|
3036
3097
|
<style>
|
|
3037
|
-
${
|
|
3038
|
-
${!this.unstyled &&
|
|
3098
|
+
${O(this, Xe)}
|
|
3099
|
+
${!this.unstyled && O(this, Ye)}
|
|
3039
3100
|
</style>
|
|
3040
3101
|
<div class="tabbed">
|
|
3041
3102
|
<!-- Navigation for tabs and actions -->
|
|
@@ -3046,10 +3107,10 @@ class lo extends nt {
|
|
|
3046
3107
|
<div>
|
|
3047
3108
|
<!-- Labels for tabs -->
|
|
3048
3109
|
${Ne(
|
|
3049
|
-
|
|
3110
|
+
e,
|
|
3050
3111
|
(r, s) => x`
|
|
3051
3112
|
<label
|
|
3052
|
-
class=${
|
|
3113
|
+
class=${O(this, ye).call(this, s)}
|
|
3053
3114
|
@click=${() => this.selectedTab = s}
|
|
3054
3115
|
>
|
|
3055
3116
|
<!-- Customizable icon for each tab -->
|
|
@@ -3076,9 +3137,9 @@ class lo extends nt {
|
|
|
3076
3137
|
<figure>
|
|
3077
3138
|
<!-- Content for each tab -->
|
|
3078
3139
|
${Ne(
|
|
3079
|
-
|
|
3140
|
+
e,
|
|
3080
3141
|
(r, s) => x`
|
|
3081
|
-
<div class="tab ${
|
|
3142
|
+
<div class="tab ${O(this, ye).call(this, s)}">
|
|
3082
3143
|
<!-- Content slot for each tab -->
|
|
3083
3144
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
3084
3145
|
</div>
|
|
@@ -3090,15 +3151,15 @@ class lo extends nt {
|
|
|
3090
3151
|
}
|
|
3091
3152
|
}
|
|
3092
3153
|
ye = new WeakMap(), Xe = new WeakMap(), Ye = new WeakMap(), // Define static properties for the component
|
|
3093
|
-
H(
|
|
3154
|
+
H(uo, "properties", {
|
|
3094
3155
|
actions: { attribute: !1 },
|
|
3095
3156
|
selectedTab: { state: !0 },
|
|
3096
3157
|
tabs: { attribute: !1 },
|
|
3097
3158
|
unstyled: { type: Boolean },
|
|
3098
3159
|
noShadow: { type: Boolean }
|
|
3099
3160
|
});
|
|
3100
|
-
customElements.define("eox-layercontrol-tabs",
|
|
3101
|
-
const
|
|
3161
|
+
customElements.define("eox-layercontrol-tabs", uo);
|
|
3162
|
+
const Js = `
|
|
3102
3163
|
button,
|
|
3103
3164
|
.button {
|
|
3104
3165
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -3222,7 +3283,7 @@ button.smallest.icon::before {
|
|
|
3222
3283
|
width: 16px;
|
|
3223
3284
|
padding: 0px;
|
|
3224
3285
|
}
|
|
3225
|
-
`,
|
|
3286
|
+
`, Ks = `
|
|
3226
3287
|
input[type=radio] {
|
|
3227
3288
|
appearance: none;
|
|
3228
3289
|
-webkit-appearance: none;
|
|
@@ -3250,7 +3311,7 @@ input[type=radio]:checked:after {
|
|
|
3250
3311
|
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");
|
|
3251
3312
|
|
|
3252
3313
|
}
|
|
3253
|
-
`,
|
|
3314
|
+
`, co = `
|
|
3254
3315
|
input[type=checkbox] {
|
|
3255
3316
|
appearance: none;
|
|
3256
3317
|
-webkit-appearance: none;
|
|
@@ -3273,7 +3334,7 @@ input[type=checkbox]:checked:after {
|
|
|
3273
3334
|
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");
|
|
3274
3335
|
|
|
3275
3336
|
}
|
|
3276
|
-
`,
|
|
3337
|
+
`, Qs = `
|
|
3277
3338
|
input[type="range"] {
|
|
3278
3339
|
-webkit-appearance: none;
|
|
3279
3340
|
width: 90%;
|
|
@@ -3352,13 +3413,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
3352
3413
|
}
|
|
3353
3414
|
`;
|
|
3354
3415
|
var qe, We;
|
|
3355
|
-
class
|
|
3416
|
+
class ho extends nt {
|
|
3356
3417
|
constructor() {
|
|
3357
3418
|
super();
|
|
3358
3419
|
// Initializes '_removeButton' invoking 'removeButton' function with 'this' context.
|
|
3359
|
-
H(this, "_removeButton", () =>
|
|
3420
|
+
H(this, "_removeButton", () => As(this));
|
|
3360
3421
|
// Initializes '_sortButton' invoking 'sortButton' function with 'unstyled' property as a parameter.
|
|
3361
|
-
H(this, "_sortButton", () =>
|
|
3422
|
+
H(this, "_sortButton", () => Cs(this.unstyled));
|
|
3362
3423
|
/**
|
|
3363
3424
|
* Initializes '_button' as a function accepting 'tool' parameter to generate a Button.
|
|
3364
3425
|
* Uses 'this.unstyled' as a context parameter for Button generation.
|
|
@@ -3366,13 +3427,13 @@ class co extends nt {
|
|
|
3366
3427
|
* @param {string} tool - Tool parameter for Button generation.
|
|
3367
3428
|
* @returns {import("lit").HTMLTemplateResult} - The generated Button element.
|
|
3368
3429
|
*/
|
|
3369
|
-
H(this, "_button", (
|
|
3430
|
+
H(this, "_button", (e) => _s(e, this.unstyled));
|
|
3370
3431
|
T(this, qe, "");
|
|
3371
3432
|
T(this, We, `
|
|
3372
|
-
${
|
|
3373
|
-
${
|
|
3374
|
-
${
|
|
3375
|
-
${
|
|
3433
|
+
${Js}
|
|
3434
|
+
${Ks}
|
|
3435
|
+
${co}
|
|
3436
|
+
${Qs}
|
|
3376
3437
|
.drag-handle {
|
|
3377
3438
|
cursor: n-resize;
|
|
3378
3439
|
}
|
|
@@ -3475,14 +3536,14 @@ class co extends nt {
|
|
|
3475
3536
|
}
|
|
3476
3537
|
render() {
|
|
3477
3538
|
var l;
|
|
3478
|
-
const
|
|
3539
|
+
const e = Ss(this.tools, this.layer), i = $s(this.tools, this.layer), o = this[`_${e == null ? void 0 : e[0]}Button`] ? (
|
|
3479
3540
|
// @ts-ignore
|
|
3480
|
-
this[`_${
|
|
3481
|
-
) : C, r = ((l = this.tools) == null ? void 0 : l.length) === 1 ? `${this.tools[0]}-icon` : "", s =
|
|
3541
|
+
this[`_${e == null ? void 0 : e[0]}Button`]()
|
|
3542
|
+
) : C, r = ((l = this.tools) == null ? void 0 : l.length) === 1 ? `${this.tools[0]}-icon` : "", s = e == null ? void 0 : e.length, a = i == null ? void 0 : i.length;
|
|
3482
3543
|
return x`
|
|
3483
3544
|
<style>
|
|
3484
|
-
${
|
|
3485
|
-
${!this.unstyled &&
|
|
3545
|
+
${O(this, qe)}
|
|
3546
|
+
${!this.unstyled && O(this, We)}
|
|
3486
3547
|
</style>
|
|
3487
3548
|
${rt(
|
|
3488
3549
|
s + a > 0,
|
|
@@ -3506,7 +3567,7 @@ class co extends nt {
|
|
|
3506
3567
|
</summary>
|
|
3507
3568
|
<eox-layercontrol-tabs
|
|
3508
3569
|
.noShadow=${!1}
|
|
3509
|
-
.actions=${
|
|
3570
|
+
.actions=${e}
|
|
3510
3571
|
.tabs=${i}
|
|
3511
3572
|
.unstyled=${this.unstyled}
|
|
3512
3573
|
>
|
|
@@ -3514,7 +3575,7 @@ class co extends nt {
|
|
|
3514
3575
|
${Ne(i, (d) => this._button(d))}
|
|
3515
3576
|
|
|
3516
3577
|
<div slot="info-content">
|
|
3517
|
-
${
|
|
3578
|
+
${Ts(this.layer.get("description"))}
|
|
3518
3579
|
</div>
|
|
3519
3580
|
<div slot="opacity-content">
|
|
3520
3581
|
<!-- Input for opacity -->
|
|
@@ -3556,7 +3617,7 @@ class co extends nt {
|
|
|
3556
3617
|
}
|
|
3557
3618
|
}
|
|
3558
3619
|
qe = new WeakMap(), We = new WeakMap(), // Define static properties for the component
|
|
3559
|
-
H(
|
|
3620
|
+
H(ho, "properties", {
|
|
3560
3621
|
layer: { attribute: !1 },
|
|
3561
3622
|
tools: { attribute: !1 },
|
|
3562
3623
|
unstyled: { type: Boolean },
|
|
@@ -3564,37 +3625,37 @@ H(co, "properties", {
|
|
|
3564
3625
|
});
|
|
3565
3626
|
customElements.define(
|
|
3566
3627
|
"eox-layercontrol-layer-tools",
|
|
3567
|
-
|
|
3628
|
+
ho
|
|
3568
3629
|
);
|
|
3569
|
-
const
|
|
3630
|
+
const ta = (n) => {
|
|
3570
3631
|
const t = () => {
|
|
3571
|
-
const
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3632
|
+
const e = ws(
|
|
3633
|
+
n.layer,
|
|
3634
|
+
n.map,
|
|
3635
|
+
n.showLayerZoomState
|
|
3575
3636
|
);
|
|
3576
3637
|
let i = !1;
|
|
3577
|
-
!
|
|
3638
|
+
!e && n.currLayerVisibilityBasedOnZoom ? (n.currLayerVisibilityBasedOnZoom = !1, i = !0) : e && !n.currLayerVisibilityBasedOnZoom && (n.currLayerVisibilityBasedOnZoom = !0, i = !0), i && (n.requestUpdate(), n.dispatchEvent(
|
|
3578
3639
|
new CustomEvent("change:resolution", { bubbles: !0 })
|
|
3579
3640
|
));
|
|
3580
3641
|
};
|
|
3581
3642
|
eo(
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
) && (t(),
|
|
3585
|
-
},
|
|
3586
|
-
const
|
|
3587
|
-
|
|
3643
|
+
n.layer,
|
|
3644
|
+
n.showLayerZoomState
|
|
3645
|
+
) && (t(), n.map.getView().on("change:resolution", () => t()));
|
|
3646
|
+
}, ea = (n, t) => {
|
|
3647
|
+
const e = t.layer;
|
|
3648
|
+
e.setVisible(n.target.checked), n.target.checked && e.get("layerControlExclusive") && t.closest(
|
|
3588
3649
|
".layers > ul"
|
|
3589
3650
|
).querySelectorAll("eox-layercontrol-layer").forEach((o) => {
|
|
3590
3651
|
var r;
|
|
3591
|
-
o.layer !==
|
|
3652
|
+
o.layer !== e && ((r = o.layer) != null && r.get("layerControlExclusive")) && (o.layer.setVisible(!1), o.requestUpdate());
|
|
3592
3653
|
}), t.dispatchEvent(
|
|
3593
|
-
new CustomEvent("changed", { bubbles: !0, detail:
|
|
3654
|
+
new CustomEvent("changed", { bubbles: !0, detail: e })
|
|
3594
3655
|
), t.requestUpdate();
|
|
3595
3656
|
};
|
|
3596
|
-
var At, Me,
|
|
3597
|
-
class
|
|
3657
|
+
var At, Me, fo, Ge, Je;
|
|
3658
|
+
class po extends nt {
|
|
3598
3659
|
constructor() {
|
|
3599
3660
|
super();
|
|
3600
3661
|
T(this, At);
|
|
@@ -3606,7 +3667,7 @@ class ho extends nt {
|
|
|
3606
3667
|
H(this, "currLayerVisibilityBasedOnZoom", !0);
|
|
3607
3668
|
T(this, Ge, "");
|
|
3608
3669
|
T(this, Je, `
|
|
3609
|
-
${
|
|
3670
|
+
${co}
|
|
3610
3671
|
eox-layercontrol-layer {
|
|
3611
3672
|
width: 100%;
|
|
3612
3673
|
}
|
|
@@ -3660,7 +3721,7 @@ class ho extends nt {
|
|
|
3660
3721
|
* and register "change:resolution" ones at the beginning if `showLayerZoomState` is present
|
|
3661
3722
|
*/
|
|
3662
3723
|
firstUpdated() {
|
|
3663
|
-
|
|
3724
|
+
ta(this);
|
|
3664
3725
|
}
|
|
3665
3726
|
/**
|
|
3666
3727
|
* Renders layer controls and tools with conditional display based on certain properties.
|
|
@@ -3669,11 +3730,11 @@ class ho extends nt {
|
|
|
3669
3730
|
*/
|
|
3670
3731
|
render() {
|
|
3671
3732
|
var l;
|
|
3672
|
-
const
|
|
3733
|
+
const e = this.layer.getVisible(), i = e ? "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;
|
|
3673
3734
|
return x`
|
|
3674
3735
|
<style>
|
|
3675
|
-
${
|
|
3676
|
-
${!this.unstyled &&
|
|
3736
|
+
${O(this, Ge)}
|
|
3737
|
+
${!this.unstyled && O(this, Je)}
|
|
3677
3738
|
</style>
|
|
3678
3739
|
${rt(
|
|
3679
3740
|
this.layer,
|
|
@@ -3684,8 +3745,8 @@ class ho extends nt {
|
|
|
3684
3745
|
<!-- Input element for layer visibility -->
|
|
3685
3746
|
<input
|
|
3686
3747
|
type=${s}
|
|
3687
|
-
.checked=${oo(
|
|
3688
|
-
@click=${k(this, At,
|
|
3748
|
+
.checked=${oo(e)}
|
|
3749
|
+
@click=${k(this, At, fo)}
|
|
3689
3750
|
/>
|
|
3690
3751
|
|
|
3691
3752
|
<!-- Layer title -->
|
|
@@ -3715,18 +3776,18 @@ At = new WeakSet(), /**
|
|
|
3715
3776
|
* @param {string} key - The key for the layer property.
|
|
3716
3777
|
* @returns {any} - The value of the layer property if exists, otherwise undefined.
|
|
3717
3778
|
*/
|
|
3718
|
-
Me = function(
|
|
3779
|
+
Me = function(e) {
|
|
3719
3780
|
var i;
|
|
3720
|
-
return (i = this.layer) == null ? void 0 : i.get(
|
|
3781
|
+
return (i = this.layer) == null ? void 0 : i.get(e);
|
|
3721
3782
|
}, /**
|
|
3722
3783
|
* Handles the click event on the input element triggering the method.
|
|
3723
3784
|
*
|
|
3724
3785
|
* @param {{target: { checked: boolean }}} evt - The input change event.
|
|
3725
3786
|
*/
|
|
3726
|
-
|
|
3727
|
-
|
|
3787
|
+
fo = function(e) {
|
|
3788
|
+
ea(e, this);
|
|
3728
3789
|
}, Ge = new WeakMap(), Je = new WeakMap(), // Define static properties for the component
|
|
3729
|
-
H(
|
|
3790
|
+
H(po, "properties", {
|
|
3730
3791
|
layer: { attribute: !1 },
|
|
3731
3792
|
map: { attribute: !1, state: !0 },
|
|
3732
3793
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -3735,9 +3796,9 @@ H(ho, "properties", {
|
|
|
3735
3796
|
unstyled: { type: Boolean },
|
|
3736
3797
|
noShadow: { type: Boolean }
|
|
3737
3798
|
});
|
|
3738
|
-
customElements.define("eox-layercontrol-layer",
|
|
3799
|
+
customElements.define("eox-layercontrol-layer", po);
|
|
3739
3800
|
var Ke, Qe;
|
|
3740
|
-
class
|
|
3801
|
+
class go extends nt {
|
|
3741
3802
|
constructor() {
|
|
3742
3803
|
super();
|
|
3743
3804
|
T(this, Ke, "");
|
|
@@ -3781,20 +3842,20 @@ class fo extends nt {
|
|
|
3781
3842
|
*/
|
|
3782
3843
|
render() {
|
|
3783
3844
|
var o, r;
|
|
3784
|
-
const
|
|
3845
|
+
const e = !!((o = this.group) != null && o.get("layerControlExpand")), i = (r = io(
|
|
3785
3846
|
this.group.getLayers()
|
|
3786
3847
|
)) == null ? void 0 : r.length;
|
|
3787
3848
|
return x`
|
|
3788
3849
|
<style>
|
|
3789
|
-
${
|
|
3790
|
-
${!this.unstyled &&
|
|
3850
|
+
${O(this, Ke)}
|
|
3851
|
+
${!this.unstyled && O(this, Qe)}
|
|
3791
3852
|
</style>
|
|
3792
3853
|
${rt(
|
|
3793
3854
|
this.group,
|
|
3794
3855
|
() => x`
|
|
3795
3856
|
<!-- Render the details element with the layer control -->
|
|
3796
3857
|
<details
|
|
3797
|
-
open=${
|
|
3858
|
+
open=${e || C}
|
|
3798
3859
|
data-children-length=${i}
|
|
3799
3860
|
>
|
|
3800
3861
|
<summary>
|
|
@@ -3830,7 +3891,7 @@ class fo extends nt {
|
|
|
3830
3891
|
}
|
|
3831
3892
|
}
|
|
3832
3893
|
Ke = new WeakMap(), Qe = new WeakMap(), // Define static properties for the component
|
|
3833
|
-
H(
|
|
3894
|
+
H(go, "properties", {
|
|
3834
3895
|
group: { attribute: !1 },
|
|
3835
3896
|
idProperty: { attribute: "id-property" },
|
|
3836
3897
|
map: { attribute: !1, state: !0 },
|
|
@@ -3842,26 +3903,26 @@ H(fo, "properties", {
|
|
|
3842
3903
|
});
|
|
3843
3904
|
customElements.define(
|
|
3844
3905
|
"eox-layercontrol-layer-group",
|
|
3845
|
-
|
|
3906
|
+
go
|
|
3846
3907
|
);
|
|
3847
|
-
const
|
|
3848
|
-
const { layers: t, idProperty:
|
|
3849
|
-
|
|
3908
|
+
const na = (n) => {
|
|
3909
|
+
const { layers: t, idProperty: e, titleProperty: i, renderRoot: o } = n, r = so(() => {
|
|
3910
|
+
n.requestUpdate(), n.dispatchEvent(
|
|
3850
3911
|
new CustomEvent("changed", { bubbles: !0 })
|
|
3851
3912
|
);
|
|
3852
3913
|
}, 50), s = () => r();
|
|
3853
3914
|
if (t && (t.hasListener("change:length") && (t == null || t.un("change:length", s)), t.on("change:length", s), t)) {
|
|
3854
3915
|
const a = o.querySelector("ul");
|
|
3855
|
-
|
|
3916
|
+
vs(
|
|
3856
3917
|
t,
|
|
3857
|
-
|
|
3918
|
+
e,
|
|
3858
3919
|
i,
|
|
3859
|
-
|
|
3860
|
-
),
|
|
3920
|
+
n
|
|
3921
|
+
), bs(a, t, e, n);
|
|
3861
3922
|
}
|
|
3862
3923
|
};
|
|
3863
3924
|
var tn, en;
|
|
3864
|
-
class
|
|
3925
|
+
class mo extends nt {
|
|
3865
3926
|
constructor() {
|
|
3866
3927
|
super();
|
|
3867
3928
|
T(this, tn, "");
|
|
@@ -3900,7 +3961,7 @@ class go extends nt {
|
|
|
3900
3961
|
* Executes specific logic after the initial render of the component.
|
|
3901
3962
|
*/
|
|
3902
3963
|
firstUpdated() {
|
|
3903
|
-
|
|
3964
|
+
na(this);
|
|
3904
3965
|
}
|
|
3905
3966
|
/**
|
|
3906
3967
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -3913,23 +3974,23 @@ class go extends nt {
|
|
|
3913
3974
|
* layer groups or individual layers accordingly. Utilizes conditional rendering and iterates through available layers.
|
|
3914
3975
|
*/
|
|
3915
3976
|
render() {
|
|
3916
|
-
const
|
|
3977
|
+
const e = this.layers ? io(this.layers).reverse() : [];
|
|
3917
3978
|
return x`
|
|
3918
3979
|
<style>
|
|
3919
|
-
${
|
|
3920
|
-
${!this.unstyled &&
|
|
3980
|
+
${O(this, tn)}
|
|
3981
|
+
${!this.unstyled && O(this, en)}
|
|
3921
3982
|
</style>
|
|
3922
3983
|
<ul>
|
|
3923
3984
|
${rt(
|
|
3924
3985
|
this.layers,
|
|
3925
3986
|
() => x`
|
|
3926
|
-
${
|
|
3927
|
-
|
|
3987
|
+
${qo(
|
|
3988
|
+
e,
|
|
3928
3989
|
(i) => i,
|
|
3929
3990
|
(i) => x`
|
|
3930
3991
|
<li
|
|
3931
3992
|
data-layer="${i.get(this.idProperty)}"
|
|
3932
|
-
data-type="${
|
|
3993
|
+
data-type="${Es(i, this.map)}"
|
|
3933
3994
|
>
|
|
3934
3995
|
${/** Checks if the layer is a group or individual layer and renders accordingly */
|
|
3935
3996
|
/** @type {import("ol/layer").Group} */
|
|
@@ -3968,7 +4029,7 @@ class go extends nt {
|
|
|
3968
4029
|
}
|
|
3969
4030
|
}
|
|
3970
4031
|
tn = new WeakMap(), en = new WeakMap(), // Define static properties for the component
|
|
3971
|
-
H(
|
|
4032
|
+
H(mo, "properties", {
|
|
3972
4033
|
idProperty: { attribute: "id-property" },
|
|
3973
4034
|
layers: { attribute: !1 },
|
|
3974
4035
|
map: { attribute: !1, state: !0 },
|
|
@@ -3978,31 +4039,31 @@ H(go, "properties", {
|
|
|
3978
4039
|
unstyled: { type: Boolean },
|
|
3979
4040
|
noShadow: { type: Boolean }
|
|
3980
4041
|
});
|
|
3981
|
-
customElements.define("eox-layercontrol-layer-list",
|
|
3982
|
-
const
|
|
3983
|
-
const t =
|
|
4042
|
+
customElements.define("eox-layercontrol-layer-list", mo);
|
|
4043
|
+
const ia = (n) => {
|
|
4044
|
+
const t = n.querySelector(
|
|
3984
4045
|
"select[name=optional]"
|
|
3985
|
-
),
|
|
3986
|
-
|
|
4046
|
+
), e = t ? t.value : null, i = Xn(
|
|
4047
|
+
n.layers.getArray(),
|
|
3987
4048
|
"layerControlOptional",
|
|
3988
4049
|
!0
|
|
3989
4050
|
).find(
|
|
3990
4051
|
(o) => (
|
|
3991
4052
|
// @ts-ignore
|
|
3992
|
-
(o.get(
|
|
4053
|
+
(o.get(n.idProperty) || o.ol_uid) === e
|
|
3993
4054
|
)
|
|
3994
4055
|
);
|
|
3995
|
-
i == null || i.set("layerControlOptional", !1), i == null || i.setVisible(!0),
|
|
4056
|
+
i == null || i.set("layerControlOptional", !1), i == null || i.setVisible(!0), n.dispatchEvent(
|
|
3996
4057
|
new CustomEvent("changed", { bubbles: !0 })
|
|
3997
|
-
),
|
|
4058
|
+
), n.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(
|
|
3998
4059
|
(o) => (
|
|
3999
4060
|
/** @type {import("lit").LitElement} */
|
|
4000
4061
|
o.requestUpdate()
|
|
4001
4062
|
)
|
|
4002
|
-
),
|
|
4063
|
+
), n.requestUpdate();
|
|
4003
4064
|
};
|
|
4004
|
-
var nn,
|
|
4005
|
-
class
|
|
4065
|
+
var nn, bo;
|
|
4066
|
+
class yo extends nt {
|
|
4006
4067
|
constructor() {
|
|
4007
4068
|
super();
|
|
4008
4069
|
T(this, nn);
|
|
@@ -4020,7 +4081,7 @@ class mo extends nt {
|
|
|
4020
4081
|
* Generates dropdown options based on the extracted layer information.
|
|
4021
4082
|
*/
|
|
4022
4083
|
render() {
|
|
4023
|
-
const
|
|
4084
|
+
const e = Xn(
|
|
4024
4085
|
this.layers.getArray(),
|
|
4025
4086
|
"layerControlOptional",
|
|
4026
4087
|
!0
|
|
@@ -4037,14 +4098,14 @@ class mo extends nt {
|
|
|
4037
4098
|
</option>
|
|
4038
4099
|
|
|
4039
4100
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
4040
|
-
${
|
|
4101
|
+
${e.map((i) => {
|
|
4041
4102
|
const o = i.get(this.idProperty) || i.ol_uid, r = i.get(this.titleProperty), s = `layer ${i.get(this.idProperty)}`;
|
|
4042
4103
|
return x` <option value="${o}">${r || s}</option> `;
|
|
4043
4104
|
})}
|
|
4044
4105
|
</select>
|
|
4045
4106
|
|
|
4046
4107
|
<!-- Button to handle adding layers -->
|
|
4047
|
-
<button @click="${k(this, nn,
|
|
4108
|
+
<button @click="${k(this, nn, bo)}">add</button>
|
|
4048
4109
|
`;
|
|
4049
4110
|
}
|
|
4050
4111
|
}
|
|
@@ -4052,10 +4113,10 @@ nn = new WeakSet(), /**
|
|
|
4052
4113
|
* Handles the addition of selected layers to a list.
|
|
4053
4114
|
* Invokes the 'addToListMethod' with the current context.
|
|
4054
4115
|
*/
|
|
4055
|
-
|
|
4056
|
-
|
|
4116
|
+
bo = function() {
|
|
4117
|
+
ia(this);
|
|
4057
4118
|
}, // Define static properties for the component
|
|
4058
|
-
H(
|
|
4119
|
+
H(yo, "properties", {
|
|
4059
4120
|
idProperty: { attribute: "id-property" },
|
|
4060
4121
|
layers: { attribute: !1 },
|
|
4061
4122
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -4064,40 +4125,40 @@ H(mo, "properties", {
|
|
|
4064
4125
|
});
|
|
4065
4126
|
customElements.define(
|
|
4066
4127
|
"eox-layercontrol-optional-list",
|
|
4067
|
-
|
|
4128
|
+
yo
|
|
4068
4129
|
);
|
|
4069
|
-
const
|
|
4070
|
-
t.jsonInput =
|
|
4071
|
-
}, bi = (
|
|
4130
|
+
const oa = (n, t) => {
|
|
4131
|
+
t.jsonInput = n.target.value, t.requestUpdate();
|
|
4132
|
+
}, bi = (n) => {
|
|
4072
4133
|
const t = JSON.parse(
|
|
4073
|
-
`{"data":${ki(
|
|
4134
|
+
`{"data":${ki(n.jsonInput)}}`
|
|
4074
4135
|
);
|
|
4075
|
-
Array.isArray(t.data) ? t.data.forEach((
|
|
4076
|
-
|
|
4077
|
-
}) :
|
|
4078
|
-
},
|
|
4079
|
-
t.urlInput =
|
|
4136
|
+
Array.isArray(t.data) ? t.data.forEach((e) => {
|
|
4137
|
+
n.eoxMap.addOrUpdateLayer(e);
|
|
4138
|
+
}) : n.eoxMap.addOrUpdateLayer(t.data), n.jsonInput = null, n.requestUpdate();
|
|
4139
|
+
}, ra = (n, t) => {
|
|
4140
|
+
t.urlInput = n.target.value, t.requestUpdate();
|
|
4080
4141
|
};
|
|
4081
|
-
async function
|
|
4082
|
-
const t =
|
|
4083
|
-
if (
|
|
4142
|
+
async function sa(n) {
|
|
4143
|
+
const t = n.urlInput;
|
|
4144
|
+
if (n.wmsCapabilities = null, n.searchLoad = !0, n.requestUpdate(), !t) return !1;
|
|
4084
4145
|
if (Fn(t) === "XYZ")
|
|
4085
4146
|
return { Name: t };
|
|
4086
4147
|
try {
|
|
4087
|
-
const
|
|
4088
|
-
|
|
4148
|
+
const e = await kr(t);
|
|
4149
|
+
n.wmsCapabilities = e;
|
|
4089
4150
|
} catch {
|
|
4090
4151
|
} finally {
|
|
4091
|
-
|
|
4152
|
+
n.searchLoad = !1, n.requestUpdate();
|
|
4092
4153
|
}
|
|
4093
4154
|
return !1;
|
|
4094
4155
|
}
|
|
4095
|
-
const
|
|
4096
|
-
const { Name:
|
|
4156
|
+
const aa = (n, t) => {
|
|
4157
|
+
const { Name: e } = n, i = Fn(t.urlInput) || "XYZ", o = {
|
|
4097
4158
|
type: "Tile",
|
|
4098
4159
|
properties: {
|
|
4099
|
-
id:
|
|
4100
|
-
title:
|
|
4160
|
+
id: e,
|
|
4161
|
+
title: e
|
|
4101
4162
|
// Set the title property to the same as id
|
|
4102
4163
|
},
|
|
4103
4164
|
source: {
|
|
@@ -4105,17 +4166,17 @@ const oa = (e, t) => {
|
|
|
4105
4166
|
url: t.urlInput,
|
|
4106
4167
|
// Set the URL from the instance
|
|
4107
4168
|
params: {
|
|
4108
|
-
LAYERS:
|
|
4169
|
+
LAYERS: e
|
|
4109
4170
|
// Set the 'LAYERS' parameter to the provided layer 'Name'
|
|
4110
4171
|
}
|
|
4111
4172
|
}
|
|
4112
4173
|
};
|
|
4113
4174
|
t.jsonInput = JSON.stringify(o);
|
|
4114
|
-
},
|
|
4115
|
-
t.open =
|
|
4175
|
+
}, la = (n, t) => {
|
|
4176
|
+
t.open = n || null, t.urlInput = null, t.jsonInput = null, t.wmsCapabilities = null, t.requestUpdate();
|
|
4116
4177
|
};
|
|
4117
|
-
var F,
|
|
4118
|
-
class
|
|
4178
|
+
var F, wo, Eo, In, xo, So, Ie, on, rn;
|
|
4179
|
+
class vo extends nt {
|
|
4119
4180
|
constructor() {
|
|
4120
4181
|
super();
|
|
4121
4182
|
T(this, F);
|
|
@@ -4306,16 +4367,16 @@ class bo extends nt {
|
|
|
4306
4367
|
* Handles input fields, search, and addition of layers.
|
|
4307
4368
|
*/
|
|
4308
4369
|
render() {
|
|
4309
|
-
const
|
|
4370
|
+
const e = this.open ? "open" : "close", i = this.open === "url", o = this.open === "json", r = !Ur(this.urlInput) || this.searchLoad ? !0 : C;
|
|
4310
4371
|
return x`
|
|
4311
4372
|
<style>
|
|
4312
|
-
${
|
|
4313
|
-
${!this.unstyled &&
|
|
4373
|
+
${O(this, on)}
|
|
4374
|
+
${!this.unstyled && O(this, rn)}
|
|
4314
4375
|
</style>
|
|
4315
4376
|
<div class="eox-add-layer-main">
|
|
4316
4377
|
<div class="eox-add-layer-col">
|
|
4317
4378
|
<!-- Tabbed interface for URL and JSON -->
|
|
4318
|
-
<ul class="eox-add-layer-tab ${
|
|
4379
|
+
<ul class="eox-add-layer-tab ${e}">
|
|
4319
4380
|
<li
|
|
4320
4381
|
@click=${() => k(this, F, Ie).call(this, "url")}
|
|
4321
4382
|
class="${i ? "active" : ""}"
|
|
@@ -4338,7 +4399,7 @@ class bo extends nt {
|
|
|
4338
4399
|
${this.unstyled ? "Add Layer" : ""}
|
|
4339
4400
|
</button>
|
|
4340
4401
|
</div>
|
|
4341
|
-
<div class="eox-add ${
|
|
4402
|
+
<div class="eox-add ${e}">
|
|
4342
4403
|
${i ? x`
|
|
4343
4404
|
<!-- Input field for URL -->
|
|
4344
4405
|
<div class="eox-add-layer-col">
|
|
@@ -4347,14 +4408,14 @@ class bo extends nt {
|
|
|
4347
4408
|
class="add-url"
|
|
4348
4409
|
placeholder="Add URL (WMS/XYZ)"
|
|
4349
4410
|
.value="${this.urlInput}"
|
|
4350
|
-
@input=${k(this, F,
|
|
4411
|
+
@input=${k(this, F, wo)}
|
|
4351
4412
|
>
|
|
4352
4413
|
</input>
|
|
4353
4414
|
<!-- Search button for URL -->
|
|
4354
4415
|
<button
|
|
4355
4416
|
class="search-icon"
|
|
4356
4417
|
disabled=${r}
|
|
4357
|
-
@click=${k(this, F,
|
|
4418
|
+
@click=${k(this, F, Eo)}
|
|
4358
4419
|
>
|
|
4359
4420
|
${this.unstyled ? "Search" : ""}
|
|
4360
4421
|
</button>
|
|
@@ -4388,15 +4449,15 @@ class bo extends nt {
|
|
|
4388
4449
|
<textarea
|
|
4389
4450
|
class="add-layer-input"
|
|
4390
4451
|
placeholder="Please put a valid eox-map layer JSON."
|
|
4391
|
-
@input=${k(this, F,
|
|
4452
|
+
@input=${k(this, F, So)}
|
|
4392
4453
|
.value=${this.jsonInput}
|
|
4393
4454
|
></textarea>
|
|
4394
4455
|
|
|
4395
4456
|
<!-- Button to add JSON layer -->
|
|
4396
4457
|
<button
|
|
4397
4458
|
class="add-layer-icon json-add-layer"
|
|
4398
|
-
disabled=${
|
|
4399
|
-
@click=${k(this, F,
|
|
4459
|
+
disabled=${Fr(this.jsonInput) ? C : !0}
|
|
4460
|
+
@click=${k(this, F, xo)}
|
|
4400
4461
|
>
|
|
4401
4462
|
${this.unstyled ? "Add JSON" : ""}
|
|
4402
4463
|
</button>
|
|
@@ -4412,57 +4473,57 @@ F = new WeakSet(), /**
|
|
|
4412
4473
|
*
|
|
4413
4474
|
* @param {Event} evt - The input change event triggering the method.
|
|
4414
4475
|
*/
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
},
|
|
4418
|
-
const
|
|
4419
|
-
|
|
4476
|
+
wo = function(e) {
|
|
4477
|
+
ra(e, this);
|
|
4478
|
+
}, Eo = async function() {
|
|
4479
|
+
const e = await sa(this);
|
|
4480
|
+
e && k(this, F, In).call(this, e);
|
|
4420
4481
|
}, /**
|
|
4421
4482
|
* Handles input field changes by triggering layer processing and adding layers.
|
|
4422
4483
|
*
|
|
4423
4484
|
* @param {{"Name": string}} layer - The layer information triggering the method.
|
|
4424
4485
|
*/
|
|
4425
|
-
In = function(
|
|
4426
|
-
|
|
4486
|
+
In = function(e) {
|
|
4487
|
+
aa(e, this), bi(this);
|
|
4427
4488
|
}, /**
|
|
4428
4489
|
* Initiates the addition of layers, triggering the handleAddLayerMethod.
|
|
4429
4490
|
*/
|
|
4430
|
-
|
|
4491
|
+
xo = function() {
|
|
4431
4492
|
bi(this);
|
|
4432
4493
|
}, /**
|
|
4433
4494
|
* Handles input field changes by invoking the 'handleJsonInputChangeMethod'.
|
|
4434
4495
|
*
|
|
4435
4496
|
* @param {{target: { value: string }}} evt - The input change event triggering the method.
|
|
4436
4497
|
*/
|
|
4437
|
-
|
|
4438
|
-
|
|
4498
|
+
So = function(e) {
|
|
4499
|
+
oa(e, this);
|
|
4439
4500
|
}, /**
|
|
4440
4501
|
* Handles tab changes by invoking the 'openCloseTabMethod'.
|
|
4441
4502
|
*
|
|
4442
4503
|
* @param {"url" | "json" | null} tab - The tab identifier triggering the method.
|
|
4443
4504
|
*/
|
|
4444
|
-
Ie = function(
|
|
4445
|
-
|
|
4505
|
+
Ie = function(e) {
|
|
4506
|
+
la(e, this);
|
|
4446
4507
|
}, on = new WeakMap(), rn = new WeakMap(), // Define static properties for the component
|
|
4447
|
-
H(
|
|
4508
|
+
H(vo, "properties", {
|
|
4448
4509
|
eoxMap: { attribute: !1, state: !0 },
|
|
4449
4510
|
unstyled: { type: Boolean },
|
|
4450
4511
|
noShadow: { type: Boolean }
|
|
4451
4512
|
});
|
|
4452
|
-
customElements.define("eox-layercontrol-add-layers",
|
|
4453
|
-
const
|
|
4454
|
-
if (t.requestUpdate(),
|
|
4455
|
-
const
|
|
4513
|
+
customElements.define("eox-layercontrol-add-layers", vo);
|
|
4514
|
+
const ua = (n, t) => {
|
|
4515
|
+
if (t.requestUpdate(), n.target.tagName === "EOX-LAYERCONTROL-LAYER-TOOLS") {
|
|
4516
|
+
const e = t.renderRoot.querySelector(
|
|
4456
4517
|
"eox-layercontrol-optional-list"
|
|
4457
4518
|
);
|
|
4458
|
-
|
|
4519
|
+
e == null || e.requestUpdate();
|
|
4459
4520
|
}
|
|
4460
|
-
},
|
|
4461
|
-
const t =
|
|
4462
|
-
return
|
|
4521
|
+
}, ca = (n) => {
|
|
4522
|
+
const t = n.for, e = document.querySelector(t);
|
|
4523
|
+
return e && e.map !== n.map && (n.map = e.map), e;
|
|
4463
4524
|
};
|
|
4464
|
-
var
|
|
4465
|
-
class
|
|
4525
|
+
var Zt, sn, _o, an;
|
|
4526
|
+
class $o extends nt {
|
|
4466
4527
|
// Constructor to set default values for properties
|
|
4467
4528
|
constructor() {
|
|
4468
4529
|
super();
|
|
@@ -4472,7 +4533,7 @@ class So extends nt {
|
|
|
4472
4533
|
*
|
|
4473
4534
|
* @type {import("../../map/main").EOxMap}
|
|
4474
4535
|
*/
|
|
4475
|
-
T(this,
|
|
4536
|
+
T(this, Zt);
|
|
4476
4537
|
T(this, an, "* { font-family: Roboto, sans-serif; }");
|
|
4477
4538
|
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 = "";
|
|
4478
4539
|
}
|
|
@@ -4481,24 +4542,24 @@ class So extends nt {
|
|
|
4481
4542
|
* Updated #eoxMap after first update.
|
|
4482
4543
|
*/
|
|
4483
4544
|
firstUpdated() {
|
|
4484
|
-
|
|
4545
|
+
Kt(this, Zt, ca(this));
|
|
4485
4546
|
}
|
|
4486
4547
|
render() {
|
|
4487
4548
|
var o, r, s;
|
|
4488
|
-
const
|
|
4549
|
+
const e = (o = this.map) == null ? void 0 : o.getLayers().getArray(), i = e && ((r = Xn(e, "layerControlOptional", !0)) == null ? void 0 : r.length) > 0;
|
|
4489
4550
|
return x`
|
|
4490
4551
|
<style>
|
|
4491
|
-
${!this.unstyled &&
|
|
4552
|
+
${!this.unstyled && O(this, an)}
|
|
4492
4553
|
${this.styleOverride}
|
|
4493
4554
|
</style>
|
|
4494
4555
|
|
|
4495
4556
|
<!-- Conditional rendering of add layers component -->
|
|
4496
4557
|
${rt(
|
|
4497
|
-
this.addExternalLayers && ((s =
|
|
4558
|
+
this.addExternalLayers && ((s = O(this, Zt)) == null ? void 0 : s.addOrUpdateLayer),
|
|
4498
4559
|
() => x`
|
|
4499
4560
|
<eox-layercontrol-add-layers
|
|
4500
4561
|
.noShadow=${!0}
|
|
4501
|
-
.eoxMap=${
|
|
4562
|
+
.eoxMap=${O(this, Zt)}
|
|
4502
4563
|
.unstyled=${this.unstyled}
|
|
4503
4564
|
></eox-layercontrol-add-layers>
|
|
4504
4565
|
`
|
|
@@ -4518,7 +4579,7 @@ class So extends nt {
|
|
|
4518
4579
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
4519
4580
|
.tools=${this.tools}
|
|
4520
4581
|
.unstyled=${this.unstyled}
|
|
4521
|
-
@changed=${k(this, sn,
|
|
4582
|
+
@changed=${k(this, sn, _o)}
|
|
4522
4583
|
></eox-layercontrol-layer-list>
|
|
4523
4584
|
`
|
|
4524
4585
|
)}
|
|
@@ -4539,15 +4600,15 @@ class So extends nt {
|
|
|
4539
4600
|
`;
|
|
4540
4601
|
}
|
|
4541
4602
|
}
|
|
4542
|
-
|
|
4603
|
+
Zt = new WeakMap(), sn = new WeakSet(), /**
|
|
4543
4604
|
* Event handler for changes in the layer list
|
|
4544
4605
|
*
|
|
4545
4606
|
* @param {CustomEvent & {target: Element}} evt
|
|
4546
4607
|
*/
|
|
4547
|
-
|
|
4548
|
-
|
|
4608
|
+
_o = function(e) {
|
|
4609
|
+
ua(e, this), this.dispatchEvent(new CustomEvent("layerchange", { detail: e.detail }));
|
|
4549
4610
|
}, an = new WeakMap(), // Define static properties for the component
|
|
4550
|
-
H(
|
|
4611
|
+
H($o, "properties", {
|
|
4551
4612
|
for: { type: String },
|
|
4552
4613
|
idProperty: { attribute: "id-property" },
|
|
4553
4614
|
map: { attribute: !1, state: !0 },
|
|
@@ -4558,7 +4619,7 @@ H(So, "properties", {
|
|
|
4558
4619
|
unstyled: { type: Boolean },
|
|
4559
4620
|
styleOverride: { type: String }
|
|
4560
4621
|
});
|
|
4561
|
-
customElements.define("eox-layercontrol",
|
|
4622
|
+
customElements.define("eox-layercontrol", $o);
|
|
4562
4623
|
export {
|
|
4563
|
-
|
|
4624
|
+
$o as EOxLayerControl
|
|
4564
4625
|
};
|