@eox/layercontrol 0.9.0 → 0.10.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 +823 -736
- package/dist/eox-layercontrol.umd.cjs +82 -68
- package/package.json +2 -2
- package/test/_mockMap.js +20 -2
- package/test/layersUpdate.cy.js +57 -4
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var no = Object.defineProperty;
|
|
2
|
+
var ro = (o, t, e) => t in o ? no(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var N = (o, t, e) => (ro(o, typeof t != "symbol" ? t + "" : t, e), e), so = (o, t, e) => {
|
|
4
4
|
if (!t.has(o))
|
|
5
5
|
throw TypeError("Cannot " + e);
|
|
6
6
|
};
|
|
7
|
-
var H = (o, t, e) => (
|
|
7
|
+
var H = (o, t, e) => (so(o, t, "read from private field"), e ? e.call(o) : t.get(o)), M = (o, t, e) => {
|
|
8
8
|
if (t.has(o))
|
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
|
10
10
|
t instanceof WeakSet ? t.add(o) : t.set(o, e);
|
|
@@ -14,19 +14,19 @@ var H = (o, t, e) => (lo(o, t, "read from private field"), e ? e.call(o) : t.get
|
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
18
|
-
let
|
|
17
|
+
const ie = globalThis, Ke = ie.ShadowRoot && (ie.ShadyCSS === void 0 || ie.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Si = Symbol(), ri = /* @__PURE__ */ new WeakMap();
|
|
18
|
+
let ao = class {
|
|
19
19
|
constructor(t, e, i) {
|
|
20
|
-
if (this._$cssResult$ = !0, i !==
|
|
20
|
+
if (this._$cssResult$ = !0, i !== Si)
|
|
21
21
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
22
22
|
this.cssText = t, this.t = e;
|
|
23
23
|
}
|
|
24
24
|
get styleSheet() {
|
|
25
25
|
let t = this.o;
|
|
26
26
|
const e = this.t;
|
|
27
|
-
if (
|
|
27
|
+
if (Ke && t === void 0) {
|
|
28
28
|
const i = e !== void 0 && e.length === 1;
|
|
29
|
-
i && (t =
|
|
29
|
+
i && (t = ri.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ri.set(e, t));
|
|
30
30
|
}
|
|
31
31
|
return t;
|
|
32
32
|
}
|
|
@@ -34,27 +34,29 @@ let uo = class {
|
|
|
34
34
|
return this.cssText;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const lo = (o) => new ao(typeof o == "string" ? o : o + "", void 0, Si), ho = (o, t) => {
|
|
38
|
+
if (Ke)
|
|
39
|
+
o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
40
|
+
else
|
|
41
|
+
for (const e of t) {
|
|
42
|
+
const i = document.createElement("style"), n = ie.litNonce;
|
|
43
|
+
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, o.appendChild(i);
|
|
44
|
+
}
|
|
45
|
+
}, si = Ke ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
|
|
43
46
|
let e = "";
|
|
44
47
|
for (const i of t.cssRules)
|
|
45
48
|
e += i.cssText;
|
|
46
|
-
return
|
|
49
|
+
return lo(e);
|
|
47
50
|
})(o) : o;
|
|
48
51
|
/**
|
|
49
52
|
* @license
|
|
50
53
|
* Copyright 2017 Google LLC
|
|
51
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
55
|
*/
|
|
53
|
-
|
|
54
|
-
const ae = window, ui = ae.trustedTypes, po = ui ? ui.emptyScript : "", hi = ae.reactiveElementPolyfillSupport, Ye = { toAttribute(o, t) {
|
|
56
|
+
const { is: uo, defineProperty: co, getOwnPropertyDescriptor: po, getOwnPropertyNames: fo, getOwnPropertySymbols: go, getPrototypeOf: mo } = Object, dt = globalThis, ai = dt.trustedTypes, yo = ai ? ai.emptyScript : "", Pe = dt.reactiveElementPolyfillSupport, Vt = (o, t) => o, ze = { toAttribute(o, t) {
|
|
55
57
|
switch (t) {
|
|
56
58
|
case Boolean:
|
|
57
|
-
o = o ?
|
|
59
|
+
o = o ? yo : null;
|
|
58
60
|
break;
|
|
59
61
|
case Object:
|
|
60
62
|
case Array:
|
|
@@ -79,131 +81,154 @@ const ae = window, ui = ae.trustedTypes, po = ui ? ui.emptyScript : "", hi = ae.
|
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
return e;
|
|
82
|
-
} },
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
86
|
-
}
|
|
84
|
+
} }, Ai = (o, t) => !uo(o, t), li = { attribute: !0, type: String, converter: ze, reflect: !1, hasChanged: Ai };
|
|
85
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), dt.litPropertyMetadata ?? (dt.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
86
|
+
class $t extends HTMLElement {
|
|
87
87
|
static addInitializer(t) {
|
|
88
|
-
|
|
89
|
-
this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
|
|
88
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
90
89
|
}
|
|
91
90
|
static get observedAttributes() {
|
|
92
|
-
this.finalize();
|
|
93
|
-
const t = [];
|
|
94
|
-
return this.elementProperties.forEach((e, i) => {
|
|
95
|
-
const n = this._$Ep(i, e);
|
|
96
|
-
n !== void 0 && (this._$Ev.set(n, i), t.push(n));
|
|
97
|
-
}), t;
|
|
91
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
98
92
|
}
|
|
99
|
-
static createProperty(t, e =
|
|
100
|
-
if (e.state && (e.attribute = !1), this.
|
|
101
|
-
const i =
|
|
102
|
-
n !== void 0 &&
|
|
93
|
+
static createProperty(t, e = li) {
|
|
94
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
95
|
+
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
|
96
|
+
n !== void 0 && co(this.prototype, t, n);
|
|
103
97
|
}
|
|
104
98
|
}
|
|
105
99
|
static getPropertyDescriptor(t, e, i) {
|
|
106
|
-
|
|
100
|
+
const { get: n, set: r } = po(this.prototype, t) ?? { get() {
|
|
107
101
|
return this[e];
|
|
108
|
-
}, set(
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
}, set(s) {
|
|
103
|
+
this[e] = s;
|
|
104
|
+
} };
|
|
105
|
+
return { get() {
|
|
106
|
+
return n == null ? void 0 : n.call(this);
|
|
107
|
+
}, set(s) {
|
|
108
|
+
const l = n == null ? void 0 : n.call(this);
|
|
109
|
+
r.call(this, s), this.requestUpdate(t, l, i);
|
|
111
110
|
}, configurable: !0, enumerable: !0 };
|
|
112
111
|
}
|
|
113
112
|
static getPropertyOptions(t) {
|
|
114
|
-
return this.elementProperties.get(t)
|
|
113
|
+
return this.elementProperties.get(t) ?? li;
|
|
114
|
+
}
|
|
115
|
+
static _$Ei() {
|
|
116
|
+
if (this.hasOwnProperty(Vt("elementProperties")))
|
|
117
|
+
return;
|
|
118
|
+
const t = mo(this);
|
|
119
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
115
120
|
}
|
|
116
121
|
static finalize() {
|
|
117
|
-
if (this.hasOwnProperty(
|
|
118
|
-
return
|
|
119
|
-
this
|
|
120
|
-
|
|
121
|
-
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
122
|
-
const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
122
|
+
if (this.hasOwnProperty(Vt("finalized")))
|
|
123
|
+
return;
|
|
124
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Vt("properties"))) {
|
|
125
|
+
const e = this.properties, i = [...fo(e), ...go(e)];
|
|
123
126
|
for (const n of i)
|
|
124
127
|
this.createProperty(n, e[n]);
|
|
125
128
|
}
|
|
126
|
-
|
|
129
|
+
const t = this[Symbol.metadata];
|
|
130
|
+
if (t !== null) {
|
|
131
|
+
const e = litPropertyMetadata.get(t);
|
|
132
|
+
if (e !== void 0)
|
|
133
|
+
for (const [i, n] of e)
|
|
134
|
+
this.elementProperties.set(i, n);
|
|
135
|
+
}
|
|
136
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
137
|
+
for (const [e, i] of this.elementProperties) {
|
|
138
|
+
const n = this._$Eu(e, i);
|
|
139
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
140
|
+
}
|
|
141
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
142
|
}
|
|
128
143
|
static finalizeStyles(t) {
|
|
129
144
|
const e = [];
|
|
130
145
|
if (Array.isArray(t)) {
|
|
131
146
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
132
147
|
for (const n of i)
|
|
133
|
-
e.unshift(
|
|
148
|
+
e.unshift(si(n));
|
|
134
149
|
} else
|
|
135
|
-
t !== void 0 && e.push(
|
|
150
|
+
t !== void 0 && e.push(si(t));
|
|
136
151
|
return e;
|
|
137
152
|
}
|
|
138
|
-
static _$
|
|
153
|
+
static _$Eu(t, e) {
|
|
139
154
|
const i = e.attribute;
|
|
140
155
|
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
141
156
|
}
|
|
142
|
-
|
|
157
|
+
constructor() {
|
|
158
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
159
|
+
}
|
|
160
|
+
_$Ev() {
|
|
143
161
|
var t;
|
|
144
|
-
this._$
|
|
162
|
+
this._$Eg = 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));
|
|
145
163
|
}
|
|
146
164
|
addController(t) {
|
|
147
|
-
var e
|
|
148
|
-
(
|
|
165
|
+
var e;
|
|
166
|
+
(this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
149
167
|
}
|
|
150
168
|
removeController(t) {
|
|
151
169
|
var e;
|
|
152
|
-
(e = this._$ES)
|
|
170
|
+
(e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
153
171
|
}
|
|
154
|
-
_$
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
172
|
+
_$E_() {
|
|
173
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
174
|
+
for (const i of e.keys())
|
|
175
|
+
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
176
|
+
t.size > 0 && (this._$Ep = t);
|
|
158
177
|
}
|
|
159
178
|
createRenderRoot() {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return co(e, this.constructor.elementStyles), e;
|
|
179
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
180
|
+
return ho(t, this.constructor.elementStyles), t;
|
|
163
181
|
}
|
|
164
182
|
connectedCallback() {
|
|
165
183
|
var t;
|
|
166
|
-
this.renderRoot
|
|
184
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
|
|
167
185
|
var i;
|
|
168
|
-
return (i = e.hostConnected)
|
|
186
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
|
169
187
|
});
|
|
170
188
|
}
|
|
171
189
|
enableUpdating(t) {
|
|
172
190
|
}
|
|
173
191
|
disconnectedCallback() {
|
|
174
192
|
var t;
|
|
175
|
-
(t = this._$ES)
|
|
193
|
+
(t = this._$ES) == null || t.forEach((e) => {
|
|
176
194
|
var i;
|
|
177
|
-
return (i = e.hostDisconnected)
|
|
195
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
|
178
196
|
});
|
|
179
197
|
}
|
|
180
198
|
attributeChangedCallback(t, e, i) {
|
|
181
199
|
this._$AK(t, i);
|
|
182
200
|
}
|
|
183
|
-
_$EO(t, e
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const s = (((
|
|
188
|
-
this._$
|
|
201
|
+
_$EO(t, e) {
|
|
202
|
+
var r;
|
|
203
|
+
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
|
204
|
+
if (n !== void 0 && i.reflect === !0) {
|
|
205
|
+
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : ze).toAttribute(e, i.type);
|
|
206
|
+
this._$Em = t, s == null ? this.removeAttribute(n) : this.setAttribute(n, s), this._$Em = null;
|
|
189
207
|
}
|
|
190
208
|
}
|
|
191
209
|
_$AK(t, e) {
|
|
192
|
-
var
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
const s =
|
|
196
|
-
this._$
|
|
210
|
+
var r;
|
|
211
|
+
const i = this.constructor, n = i._$Eh.get(t);
|
|
212
|
+
if (n !== void 0 && this._$Em !== n) {
|
|
213
|
+
const s = i.getPropertyOptions(n), l = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((r = s.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? s.converter : ze;
|
|
214
|
+
this._$Em = n, this[n] = l.fromAttribute(e, s.type), this._$Em = null;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
requestUpdate(t, e, i, n = !1, r) {
|
|
218
|
+
if (t !== void 0) {
|
|
219
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Ai)(n ? r : this[t], e))
|
|
220
|
+
return;
|
|
221
|
+
this.C(t, e, i);
|
|
197
222
|
}
|
|
223
|
+
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
|
198
224
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Pi)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
|
|
225
|
+
C(t, e, i) {
|
|
226
|
+
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
202
227
|
}
|
|
203
|
-
async _$
|
|
228
|
+
async _$EP() {
|
|
204
229
|
this.isUpdatePending = !0;
|
|
205
230
|
try {
|
|
206
|
-
await this._$
|
|
231
|
+
await this._$Eg;
|
|
207
232
|
} catch (e) {
|
|
208
233
|
Promise.reject(e);
|
|
209
234
|
}
|
|
@@ -214,139 +239,141 @@ let _t = class extends HTMLElement {
|
|
|
214
239
|
return this.performUpdate();
|
|
215
240
|
}
|
|
216
241
|
performUpdate() {
|
|
217
|
-
var
|
|
242
|
+
var i;
|
|
218
243
|
if (!this.isUpdatePending)
|
|
219
244
|
return;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
245
|
+
if (!this.hasUpdated) {
|
|
246
|
+
if (this._$Ep) {
|
|
247
|
+
for (const [r, s] of this._$Ep)
|
|
248
|
+
this[r] = s;
|
|
249
|
+
this._$Ep = void 0;
|
|
250
|
+
}
|
|
251
|
+
const n = this.constructor.elementProperties;
|
|
252
|
+
if (n.size > 0)
|
|
253
|
+
for (const [r, s] of n)
|
|
254
|
+
s.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.C(r, this[r], s);
|
|
255
|
+
}
|
|
256
|
+
let t = !1;
|
|
257
|
+
const e = this._$AL;
|
|
223
258
|
try {
|
|
224
|
-
|
|
259
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$ES) == null || i.forEach((n) => {
|
|
225
260
|
var r;
|
|
226
|
-
return (r = n.hostUpdate)
|
|
227
|
-
}), this.update(
|
|
261
|
+
return (r = n.hostUpdate) == null ? void 0 : r.call(n);
|
|
262
|
+
}), this.update(e)) : this._$ET();
|
|
228
263
|
} catch (n) {
|
|
229
|
-
throw
|
|
264
|
+
throw t = !1, this._$ET(), n;
|
|
230
265
|
}
|
|
231
|
-
|
|
266
|
+
t && this._$AE(e);
|
|
232
267
|
}
|
|
233
268
|
willUpdate(t) {
|
|
234
269
|
}
|
|
235
270
|
_$AE(t) {
|
|
236
271
|
var e;
|
|
237
|
-
(e = this._$ES)
|
|
272
|
+
(e = this._$ES) == null || e.forEach((i) => {
|
|
238
273
|
var n;
|
|
239
|
-
return (n = i.hostUpdated)
|
|
274
|
+
return (n = i.hostUpdated) == null ? void 0 : n.call(i);
|
|
240
275
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
241
276
|
}
|
|
242
|
-
_$
|
|
277
|
+
_$ET() {
|
|
243
278
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
244
279
|
}
|
|
245
280
|
get updateComplete() {
|
|
246
281
|
return this.getUpdateComplete();
|
|
247
282
|
}
|
|
248
283
|
getUpdateComplete() {
|
|
249
|
-
return this._$
|
|
284
|
+
return this._$Eg;
|
|
250
285
|
}
|
|
251
286
|
shouldUpdate(t) {
|
|
252
287
|
return !0;
|
|
253
288
|
}
|
|
254
289
|
update(t) {
|
|
255
|
-
this._$
|
|
290
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
|
256
291
|
}
|
|
257
292
|
updated(t) {
|
|
258
293
|
}
|
|
259
294
|
firstUpdated(t) {
|
|
260
295
|
}
|
|
261
|
-
}
|
|
262
|
-
|
|
296
|
+
}
|
|
297
|
+
$t.elementStyles = [], $t.shadowRootOptions = { mode: "open" }, $t[Vt("elementProperties")] = /* @__PURE__ */ new Map(), $t[Vt("finalized")] = /* @__PURE__ */ new Map(), Pe == null || Pe({ ReactiveElement: $t }), (dt.reactiveElementVersions ?? (dt.reactiveElementVersions = [])).push("2.0.1");
|
|
263
298
|
/**
|
|
264
299
|
* @license
|
|
265
300
|
* Copyright 2017 Google LLC
|
|
266
301
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
267
302
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
\f\r]
|
|
271
|
-
|
|
272
|
-
function Ni(o, t) {
|
|
303
|
+
const Rt = globalThis, he = Rt.trustedTypes, hi = he ? he.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Ci = "$lit$", at = `lit$${(Math.random() + "").slice(9)}$`, Ti = "?" + at, vo = `<${Ti}>`, wt = document, Xt = () => wt.createComment(""), Yt = (o) => o === null || typeof o != "object" && typeof o != "function", Di = Array.isArray, bo = (o) => Di(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", He = `[
|
|
304
|
+
\f\r]`, Lt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, di = /-->/g, ui = />/g, ft = RegExp(`>|${He}(?:([^\\s"'>=/]+)(${He}*=${He}*(?:[^
|
|
305
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ci = /'/g, pi = /"/g, Oi = /^(?:script|style|textarea|title)$/i, wo = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), _ = wo(1), q = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), fi = /* @__PURE__ */ new WeakMap(), bt = wt.createTreeWalker(wt, 129);
|
|
306
|
+
function Pi(o, t) {
|
|
273
307
|
if (!Array.isArray(o) || !o.hasOwnProperty("raw"))
|
|
274
308
|
throw Error("invalid template strings array");
|
|
275
|
-
return
|
|
309
|
+
return hi !== void 0 ? hi.createHTML(t) : t;
|
|
276
310
|
}
|
|
277
|
-
const
|
|
311
|
+
const Eo = (o, t) => {
|
|
278
312
|
const e = o.length - 1, i = [];
|
|
279
|
-
let n, r = t === 2 ? "<svg>" : "", s =
|
|
313
|
+
let n, r = t === 2 ? "<svg>" : "", s = Lt;
|
|
280
314
|
for (let l = 0; l < e; l++) {
|
|
281
315
|
const a = o[l];
|
|
282
|
-
let
|
|
283
|
-
for (;
|
|
284
|
-
|
|
285
|
-
const v = s ===
|
|
286
|
-
r += s ===
|
|
316
|
+
let h, c, d = -1, g = 0;
|
|
317
|
+
for (; g < a.length && (s.lastIndex = g, c = s.exec(a), c !== null); )
|
|
318
|
+
g = s.lastIndex, s === Lt ? c[1] === "!--" ? s = di : c[1] !== void 0 ? s = ui : c[2] !== void 0 ? (Oi.test(c[2]) && (n = RegExp("</" + c[2], "g")), s = ft) : c[3] !== void 0 && (s = ft) : s === ft ? c[0] === ">" ? (s = n ?? Lt, d = -1) : c[1] === void 0 ? d = -2 : (d = s.lastIndex - c[2].length, h = c[1], s = c[3] === void 0 ? ft : c[3] === '"' ? pi : ci) : s === pi || s === ci ? s = ft : s === di || s === ui ? s = Lt : (s = ft, n = void 0);
|
|
319
|
+
const v = s === ft && o[l + 1].startsWith("/>") ? " " : "";
|
|
320
|
+
r += s === Lt ? a + vo : d >= 0 ? (i.push(h), a.slice(0, d) + Ci + a.slice(d) + at + v) : a + at + (d === -2 ? l : v);
|
|
287
321
|
}
|
|
288
|
-
return [
|
|
322
|
+
return [Pi(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
|
289
323
|
};
|
|
290
|
-
class
|
|
324
|
+
class qt {
|
|
291
325
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
292
326
|
let n;
|
|
293
327
|
this.parts = [];
|
|
294
328
|
let r = 0, s = 0;
|
|
295
|
-
const l = t.length - 1, a = this.parts, [
|
|
296
|
-
if (this.el =
|
|
297
|
-
const
|
|
298
|
-
|
|
329
|
+
const l = t.length - 1, a = this.parts, [h, c] = Eo(t, e);
|
|
330
|
+
if (this.el = qt.createElement(h, i), bt.currentNode = this.el.content, e === 2) {
|
|
331
|
+
const d = this.el.content.firstChild;
|
|
332
|
+
d.replaceWith(...d.childNodes);
|
|
299
333
|
}
|
|
300
|
-
for (; (n =
|
|
334
|
+
for (; (n = bt.nextNode()) !== null && a.length < l; ) {
|
|
301
335
|
if (n.nodeType === 1) {
|
|
302
|
-
if (n.hasAttributes())
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
if (Mi.test(n.tagName)) {
|
|
317
|
-
const u = n.textContent.split(at), p = u.length - 1;
|
|
318
|
-
if (p > 0) {
|
|
319
|
-
n.textContent = Ct ? Ct.emptyScript : "";
|
|
320
|
-
for (let v = 0; v < p; v++)
|
|
321
|
-
n.append(u[v], zt()), yt.nextNode(), a.push({ type: 2, index: ++r });
|
|
322
|
-
n.append(u[p], zt());
|
|
336
|
+
if (n.hasAttributes())
|
|
337
|
+
for (const d of n.getAttributeNames())
|
|
338
|
+
if (d.endsWith(Ci)) {
|
|
339
|
+
const g = c[s++], v = n.getAttribute(d).split(at), y = /([.?@])?(.*)/.exec(g);
|
|
340
|
+
a.push({ type: 1, index: r, name: y[2], strings: v, ctor: y[1] === "." ? $o : y[1] === "?" ? xo : y[1] === "@" ? So : De }), n.removeAttribute(d);
|
|
341
|
+
} else
|
|
342
|
+
d.startsWith(at) && (a.push({ type: 6, index: r }), n.removeAttribute(d));
|
|
343
|
+
if (Oi.test(n.tagName)) {
|
|
344
|
+
const d = n.textContent.split(at), g = d.length - 1;
|
|
345
|
+
if (g > 0) {
|
|
346
|
+
n.textContent = he ? he.emptyScript : "";
|
|
347
|
+
for (let v = 0; v < g; v++)
|
|
348
|
+
n.append(d[v], Xt()), bt.nextNode(), a.push({ type: 2, index: ++r });
|
|
349
|
+
n.append(d[g], Xt());
|
|
323
350
|
}
|
|
324
351
|
}
|
|
325
352
|
} else if (n.nodeType === 8)
|
|
326
|
-
if (n.data ===
|
|
353
|
+
if (n.data === Ti)
|
|
327
354
|
a.push({ type: 2, index: r });
|
|
328
355
|
else {
|
|
329
|
-
let
|
|
330
|
-
for (; (
|
|
331
|
-
a.push({ type: 7, index: r }),
|
|
356
|
+
let d = -1;
|
|
357
|
+
for (; (d = n.data.indexOf(at, d + 1)) !== -1; )
|
|
358
|
+
a.push({ type: 7, index: r }), d += at.length - 1;
|
|
332
359
|
}
|
|
333
360
|
r++;
|
|
334
361
|
}
|
|
335
362
|
}
|
|
336
363
|
static createElement(t, e) {
|
|
337
|
-
const i =
|
|
364
|
+
const i = wt.createElement("template");
|
|
338
365
|
return i.innerHTML = t, i;
|
|
339
366
|
}
|
|
340
367
|
}
|
|
341
|
-
function
|
|
342
|
-
var
|
|
368
|
+
function Ct(o, t, e = o, i) {
|
|
369
|
+
var s, l;
|
|
343
370
|
if (t === q)
|
|
344
371
|
return t;
|
|
345
|
-
let
|
|
346
|
-
const
|
|
347
|
-
return (
|
|
372
|
+
let n = i !== void 0 ? (s = e._$Co) == null ? void 0 : s[i] : e._$Cl;
|
|
373
|
+
const r = Yt(t) ? void 0 : t._$litDirective$;
|
|
374
|
+
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(o), n._$AT(o, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = Ct(o, n._$AS(o, t.values), n, i)), t;
|
|
348
375
|
}
|
|
349
|
-
class
|
|
376
|
+
class _o {
|
|
350
377
|
constructor(t, e) {
|
|
351
378
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
352
379
|
}
|
|
@@ -357,33 +384,31 @@ class yo {
|
|
|
357
384
|
return this._$AM._$AU;
|
|
358
385
|
}
|
|
359
386
|
u(t) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
d.type === 2 ? c = new jt(s, s.nextSibling, this, t) : d.type === 1 ? c = new d.ctor(s, d.name, d.strings, this, t) : d.type === 6 && (c = new $o(s, this, t)), this._$AV.push(c), d = n[++a];
|
|
387
|
+
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? wt).importNode(e, !0);
|
|
388
|
+
bt.currentNode = n;
|
|
389
|
+
let r = bt.nextNode(), s = 0, l = 0, a = i[0];
|
|
390
|
+
for (; a !== void 0; ) {
|
|
391
|
+
if (s === a.index) {
|
|
392
|
+
let h;
|
|
393
|
+
a.type === 2 ? h = new Wt(r, r.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (h = new Ao(r, this, t)), this._$AV.push(h), a = i[++l];
|
|
368
394
|
}
|
|
369
|
-
|
|
395
|
+
s !== (a == null ? void 0 : a.index) && (r = bt.nextNode(), s++);
|
|
370
396
|
}
|
|
371
|
-
return
|
|
397
|
+
return bt.currentNode = wt, n;
|
|
372
398
|
}
|
|
373
|
-
|
|
399
|
+
p(t) {
|
|
374
400
|
let e = 0;
|
|
375
401
|
for (const i of this._$AV)
|
|
376
402
|
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
377
403
|
}
|
|
378
404
|
}
|
|
379
|
-
class
|
|
380
|
-
constructor(t, e, i, n) {
|
|
381
|
-
var r;
|
|
382
|
-
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
|
|
383
|
-
}
|
|
405
|
+
class Wt {
|
|
384
406
|
get _$AU() {
|
|
385
|
-
var t
|
|
386
|
-
return (
|
|
407
|
+
var t;
|
|
408
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
409
|
+
}
|
|
410
|
+
constructor(t, e, i, n) {
|
|
411
|
+
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
|
387
412
|
}
|
|
388
413
|
get parentNode() {
|
|
389
414
|
let t = this._$AA.parentNode;
|
|
@@ -397,7 +422,7 @@ class jt {
|
|
|
397
422
|
return this._$AB;
|
|
398
423
|
}
|
|
399
424
|
_$AI(t, e = this) {
|
|
400
|
-
t =
|
|
425
|
+
t = Ct(this, t, e), Yt(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== q && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : bo(t) ? this.T(t) : this._(t);
|
|
401
426
|
}
|
|
402
427
|
k(t) {
|
|
403
428
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -406,103 +431,101 @@ class jt {
|
|
|
406
431
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
407
432
|
}
|
|
408
433
|
_(t) {
|
|
409
|
-
this._$AH !== $ &&
|
|
434
|
+
this._$AH !== $ && Yt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(wt.createTextNode(t)), this._$AH = t;
|
|
410
435
|
}
|
|
411
436
|
g(t) {
|
|
412
|
-
var
|
|
413
|
-
const { values:
|
|
414
|
-
if (((
|
|
415
|
-
this._$AH.
|
|
437
|
+
var r;
|
|
438
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = qt.createElement(Pi(i.h, i.h[0]), this.options)), i);
|
|
439
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === n)
|
|
440
|
+
this._$AH.p(e);
|
|
416
441
|
else {
|
|
417
|
-
const s = new
|
|
418
|
-
s.
|
|
442
|
+
const s = new _o(n, this), l = s.u(this.options);
|
|
443
|
+
s.p(e), this.$(l), this._$AH = s;
|
|
419
444
|
}
|
|
420
445
|
}
|
|
421
446
|
_$AC(t) {
|
|
422
|
-
let e =
|
|
423
|
-
return e === void 0 &&
|
|
447
|
+
let e = fi.get(t.strings);
|
|
448
|
+
return e === void 0 && fi.set(t.strings, e = new qt(t)), e;
|
|
424
449
|
}
|
|
425
450
|
T(t) {
|
|
426
|
-
|
|
451
|
+
Di(this._$AH) || (this._$AH = [], this._$AR());
|
|
427
452
|
const e = this._$AH;
|
|
428
453
|
let i, n = 0;
|
|
429
454
|
for (const r of t)
|
|
430
|
-
n === e.length ? e.push(i = new
|
|
455
|
+
n === e.length ? e.push(i = new Wt(this.k(Xt()), this.k(Xt()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
|
431
456
|
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
|
432
457
|
}
|
|
433
458
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
434
459
|
var i;
|
|
435
|
-
for ((i = this._$AP)
|
|
460
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
436
461
|
const n = t.nextSibling;
|
|
437
462
|
t.remove(), t = n;
|
|
438
463
|
}
|
|
439
464
|
}
|
|
440
465
|
setConnected(t) {
|
|
441
466
|
var e;
|
|
442
|
-
this._$AM === void 0 && (this._$
|
|
467
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
443
468
|
}
|
|
444
469
|
}
|
|
445
|
-
class
|
|
446
|
-
constructor(t, e, i, n, r) {
|
|
447
|
-
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = $;
|
|
448
|
-
}
|
|
470
|
+
class De {
|
|
449
471
|
get tagName() {
|
|
450
472
|
return this.element.tagName;
|
|
451
473
|
}
|
|
452
474
|
get _$AU() {
|
|
453
475
|
return this._$AM._$AU;
|
|
454
476
|
}
|
|
477
|
+
constructor(t, e, i, n, r) {
|
|
478
|
+
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = $;
|
|
479
|
+
}
|
|
455
480
|
_$AI(t, e = this, i, n) {
|
|
456
481
|
const r = this.strings;
|
|
457
482
|
let s = !1;
|
|
458
483
|
if (r === void 0)
|
|
459
|
-
t =
|
|
484
|
+
t = Ct(this, t, e, 0), s = !Yt(t) || t !== this._$AH && t !== q, s && (this._$AH = t);
|
|
460
485
|
else {
|
|
461
486
|
const l = t;
|
|
462
|
-
let a,
|
|
487
|
+
let a, h;
|
|
463
488
|
for (t = r[0], a = 0; a < r.length - 1; a++)
|
|
464
|
-
|
|
489
|
+
h = Ct(this, l[i + a], e, a), h === q && (h = this._$AH[a]), s || (s = !Yt(h) || h !== this._$AH[a]), h === $ ? t = $ : t !== $ && (t += (h ?? "") + r[a + 1]), this._$AH[a] = h;
|
|
465
490
|
}
|
|
466
|
-
s && !n && this.
|
|
491
|
+
s && !n && this.O(t);
|
|
467
492
|
}
|
|
468
|
-
|
|
493
|
+
O(t) {
|
|
469
494
|
t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
470
495
|
}
|
|
471
496
|
}
|
|
472
|
-
class
|
|
497
|
+
class $o extends De {
|
|
473
498
|
constructor() {
|
|
474
499
|
super(...arguments), this.type = 3;
|
|
475
500
|
}
|
|
476
|
-
|
|
501
|
+
O(t) {
|
|
477
502
|
this.element[this.name] = t === $ ? void 0 : t;
|
|
478
503
|
}
|
|
479
504
|
}
|
|
480
|
-
|
|
481
|
-
class wo extends Te {
|
|
505
|
+
class xo extends De {
|
|
482
506
|
constructor() {
|
|
483
507
|
super(...arguments), this.type = 4;
|
|
484
508
|
}
|
|
485
|
-
|
|
486
|
-
|
|
509
|
+
O(t) {
|
|
510
|
+
this.element.toggleAttribute(this.name, !!t && t !== $);
|
|
487
511
|
}
|
|
488
512
|
}
|
|
489
|
-
class
|
|
513
|
+
class So extends De {
|
|
490
514
|
constructor(t, e, i, n, r) {
|
|
491
515
|
super(t, e, i, n, r), this.type = 5;
|
|
492
516
|
}
|
|
493
517
|
_$AI(t, e = this) {
|
|
494
|
-
|
|
495
|
-
if ((t = (i = St(this, t, e, 0)) !== null && i !== void 0 ? i : $) === q)
|
|
518
|
+
if ((t = Ct(this, t, e, 0) ?? $) === q)
|
|
496
519
|
return;
|
|
497
|
-
const
|
|
498
|
-
|
|
520
|
+
const i = this._$AH, n = t === $ && i !== $ || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== $ && (i === $ || n);
|
|
521
|
+
n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
499
522
|
}
|
|
500
523
|
handleEvent(t) {
|
|
501
|
-
var e
|
|
502
|
-
typeof this._$AH == "function" ? this._$AH.call((
|
|
524
|
+
var e;
|
|
525
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
503
526
|
}
|
|
504
527
|
}
|
|
505
|
-
class
|
|
528
|
+
class Ao {
|
|
506
529
|
constructor(t, e, i) {
|
|
507
530
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
508
531
|
}
|
|
@@ -510,71 +533,70 @@ class $o {
|
|
|
510
533
|
return this._$AM._$AU;
|
|
511
534
|
}
|
|
512
535
|
_$AI(t) {
|
|
513
|
-
|
|
536
|
+
Ct(this, t);
|
|
514
537
|
}
|
|
515
538
|
}
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
r._$litPart$ = s = new jt(t.insertBefore(zt(), l), l, void 0, e ?? {});
|
|
539
|
+
const Me = Rt.litHtmlPolyfillSupport;
|
|
540
|
+
Me == null || Me(qt, Wt), (Rt.litHtmlVersions ?? (Rt.litHtmlVersions = [])).push("3.0.2");
|
|
541
|
+
const Co = (o, t, e) => {
|
|
542
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
543
|
+
let n = i._$litPart$;
|
|
544
|
+
if (n === void 0) {
|
|
545
|
+
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
546
|
+
i._$litPart$ = n = new Wt(t.insertBefore(Xt(), r), r, void 0, e ?? {});
|
|
525
547
|
}
|
|
526
|
-
return
|
|
548
|
+
return n._$AI(o), n;
|
|
527
549
|
};
|
|
528
550
|
/**
|
|
529
551
|
* @license
|
|
530
552
|
* Copyright 2017 Google LLC
|
|
531
553
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
532
554
|
*/
|
|
533
|
-
|
|
534
|
-
let z = class extends _t {
|
|
555
|
+
class F extends $t {
|
|
535
556
|
constructor() {
|
|
536
557
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
537
558
|
}
|
|
538
559
|
createRenderRoot() {
|
|
539
|
-
var
|
|
540
|
-
const
|
|
541
|
-
return (
|
|
560
|
+
var e;
|
|
561
|
+
const t = super.createRenderRoot();
|
|
562
|
+
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
|
542
563
|
}
|
|
543
564
|
update(t) {
|
|
544
565
|
const e = this.render();
|
|
545
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
566
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Co(e, this.renderRoot, this.renderOptions);
|
|
546
567
|
}
|
|
547
568
|
connectedCallback() {
|
|
548
569
|
var t;
|
|
549
|
-
super.connectedCallback(), (t = this._$Do)
|
|
570
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
|
550
571
|
}
|
|
551
572
|
disconnectedCallback() {
|
|
552
573
|
var t;
|
|
553
|
-
super.disconnectedCallback(), (t = this._$Do)
|
|
574
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
554
575
|
}
|
|
555
576
|
render() {
|
|
556
577
|
return q;
|
|
557
578
|
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
579
|
+
}
|
|
580
|
+
var xi;
|
|
581
|
+
F._$litElement$ = !0, F.finalized = !0, (xi = globalThis.litElementHydrateSupport) == null || xi.call(globalThis, { LitElement: F });
|
|
582
|
+
const Le = globalThis.litElementPolyfillSupport;
|
|
583
|
+
Le == null || Le({ LitElement: F });
|
|
584
|
+
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
|
563
585
|
/**
|
|
564
586
|
* @license
|
|
565
587
|
* Copyright 2021 Google LLC
|
|
566
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
567
589
|
*/
|
|
568
590
|
function et(o, t, e) {
|
|
569
|
-
return o ? t() : e == null ? void 0 : e();
|
|
591
|
+
return o ? t(o) : e == null ? void 0 : e(o);
|
|
570
592
|
}
|
|
571
593
|
/**
|
|
572
594
|
* @license
|
|
573
595
|
* Copyright 2017 Google LLC
|
|
574
596
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
575
597
|
*/
|
|
576
|
-
const
|
|
577
|
-
let
|
|
598
|
+
const yt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Je = (o) => (...t) => ({ _$litDirective$: o, values: t });
|
|
599
|
+
let Qe = class {
|
|
578
600
|
constructor(t) {
|
|
579
601
|
}
|
|
580
602
|
get _$AU() {
|
|
@@ -595,13 +617,13 @@ let ii = class {
|
|
|
595
617
|
* Copyright 2020 Google LLC
|
|
596
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
597
619
|
*/
|
|
598
|
-
const
|
|
620
|
+
const To = (o) => o.strings === void 0, Do = {}, Hi = (o, t = Do) => o._$AH = t;
|
|
599
621
|
/**
|
|
600
622
|
* @license
|
|
601
623
|
* Copyright 2021 Google LLC
|
|
602
624
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
603
625
|
*/
|
|
604
|
-
const
|
|
626
|
+
const Oo = Je(class extends Qe {
|
|
605
627
|
constructor() {
|
|
606
628
|
super(...arguments), this.key = $;
|
|
607
629
|
}
|
|
@@ -609,7 +631,7 @@ const So = ei(class extends ii {
|
|
|
609
631
|
return this.key = o, t;
|
|
610
632
|
}
|
|
611
633
|
update(o, [t, e]) {
|
|
612
|
-
return t !== this.key && (
|
|
634
|
+
return t !== this.key && (Hi(o), this.key = t), e;
|
|
613
635
|
}
|
|
614
636
|
});
|
|
615
637
|
/**!
|
|
@@ -618,7 +640,7 @@ const So = ei(class extends ii {
|
|
|
618
640
|
* @author owenm <owen23355@gmail.com>
|
|
619
641
|
* @license MIT
|
|
620
642
|
*/
|
|
621
|
-
function
|
|
643
|
+
function gi(o, t) {
|
|
622
644
|
var e = Object.keys(o);
|
|
623
645
|
if (Object.getOwnPropertySymbols) {
|
|
624
646
|
var i = Object.getOwnPropertySymbols(o);
|
|
@@ -631,23 +653,23 @@ function Ei(o, t) {
|
|
|
631
653
|
function K(o) {
|
|
632
654
|
for (var t = 1; t < arguments.length; t++) {
|
|
633
655
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
634
|
-
t % 2 ?
|
|
635
|
-
|
|
636
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) :
|
|
656
|
+
t % 2 ? gi(Object(e), !0).forEach(function(i) {
|
|
657
|
+
Po(o, i, e[i]);
|
|
658
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : gi(Object(e)).forEach(function(i) {
|
|
637
659
|
Object.defineProperty(o, i, Object.getOwnPropertyDescriptor(e, i));
|
|
638
660
|
});
|
|
639
661
|
}
|
|
640
662
|
return o;
|
|
641
663
|
}
|
|
642
|
-
function
|
|
664
|
+
function oe(o) {
|
|
643
665
|
"@babel/helpers - typeof";
|
|
644
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
666
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? oe = function(t) {
|
|
645
667
|
return typeof t;
|
|
646
|
-
} :
|
|
668
|
+
} : oe = function(t) {
|
|
647
669
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
648
|
-
},
|
|
670
|
+
}, oe(o);
|
|
649
671
|
}
|
|
650
|
-
function
|
|
672
|
+
function Po(o, t, e) {
|
|
651
673
|
return t in o ? Object.defineProperty(o, t, {
|
|
652
674
|
value: e,
|
|
653
675
|
enumerable: !0,
|
|
@@ -665,7 +687,7 @@ function it() {
|
|
|
665
687
|
return o;
|
|
666
688
|
}, it.apply(this, arguments);
|
|
667
689
|
}
|
|
668
|
-
function
|
|
690
|
+
function Ho(o, t) {
|
|
669
691
|
if (o == null)
|
|
670
692
|
return {};
|
|
671
693
|
var e = {}, i = Object.keys(o), n, r;
|
|
@@ -673,10 +695,10 @@ function Do(o, t) {
|
|
|
673
695
|
n = i[r], !(t.indexOf(n) >= 0) && (e[n] = o[n]);
|
|
674
696
|
return e;
|
|
675
697
|
}
|
|
676
|
-
function
|
|
698
|
+
function Mo(o, t) {
|
|
677
699
|
if (o == null)
|
|
678
700
|
return {};
|
|
679
|
-
var e =
|
|
701
|
+
var e = Ho(o, t), i, n;
|
|
680
702
|
if (Object.getOwnPropertySymbols) {
|
|
681
703
|
var r = Object.getOwnPropertySymbols(o);
|
|
682
704
|
for (n = 0; n < r.length; n++)
|
|
@@ -684,20 +706,20 @@ function Po(o, t) {
|
|
|
684
706
|
}
|
|
685
707
|
return e;
|
|
686
708
|
}
|
|
687
|
-
var
|
|
709
|
+
var Lo = "1.15.0";
|
|
688
710
|
function tt(o) {
|
|
689
711
|
if (typeof window < "u" && window.navigator)
|
|
690
712
|
return !!/* @__PURE__ */ navigator.userAgent.match(o);
|
|
691
713
|
}
|
|
692
|
-
var ot = tt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),
|
|
714
|
+
var ot = tt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), jt = tt(/Edge/i), mi = tt(/firefox/i), Bt = tt(/safari/i) && !tt(/chrome/i) && !tt(/android/i), Mi = tt(/iP(ad|od|hone)/i), Li = tt(/chrome/i) && tt(/android/i), Ni = {
|
|
693
715
|
capture: !1,
|
|
694
716
|
passive: !1
|
|
695
717
|
};
|
|
696
718
|
function w(o, t, e) {
|
|
697
|
-
o.addEventListener(t, e, !ot &&
|
|
719
|
+
o.addEventListener(t, e, !ot && Ni);
|
|
698
720
|
}
|
|
699
|
-
function
|
|
700
|
-
o.removeEventListener(t, e, !ot &&
|
|
721
|
+
function b(o, t, e) {
|
|
722
|
+
o.removeEventListener(t, e, !ot && Ni);
|
|
701
723
|
}
|
|
702
724
|
function de(o, t) {
|
|
703
725
|
if (t) {
|
|
@@ -715,10 +737,10 @@ function de(o, t) {
|
|
|
715
737
|
return !1;
|
|
716
738
|
}
|
|
717
739
|
}
|
|
718
|
-
function
|
|
740
|
+
function No(o) {
|
|
719
741
|
return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
|
|
720
742
|
}
|
|
721
|
-
function
|
|
743
|
+
function j(o, t, e, i) {
|
|
722
744
|
if (o) {
|
|
723
745
|
e = e || document;
|
|
724
746
|
do {
|
|
@@ -726,21 +748,21 @@ function Z(o, t, e, i) {
|
|
|
726
748
|
return o;
|
|
727
749
|
if (o === e)
|
|
728
750
|
break;
|
|
729
|
-
} while (o =
|
|
751
|
+
} while (o = No(o));
|
|
730
752
|
}
|
|
731
753
|
return null;
|
|
732
754
|
}
|
|
733
|
-
var
|
|
734
|
-
function
|
|
755
|
+
var yi = /\s+/g;
|
|
756
|
+
function R(o, t, e) {
|
|
735
757
|
if (o && t)
|
|
736
758
|
if (o.classList)
|
|
737
759
|
o.classList[e ? "add" : "remove"](t);
|
|
738
760
|
else {
|
|
739
|
-
var i = (" " + o.className + " ").replace(
|
|
740
|
-
o.className = (i + (e ? " " + t : "")).replace(
|
|
761
|
+
var i = (" " + o.className + " ").replace(yi, " ").replace(" " + t + " ", " ");
|
|
762
|
+
o.className = (i + (e ? " " + t : "")).replace(yi, " ");
|
|
741
763
|
}
|
|
742
764
|
}
|
|
743
|
-
function
|
|
765
|
+
function p(o, t, e) {
|
|
744
766
|
var i = o && o.style;
|
|
745
767
|
if (i) {
|
|
746
768
|
if (e === void 0)
|
|
@@ -754,13 +776,13 @@ function At(o, t) {
|
|
|
754
776
|
e = o;
|
|
755
777
|
else
|
|
756
778
|
do {
|
|
757
|
-
var i =
|
|
779
|
+
var i = p(o, "transform");
|
|
758
780
|
i && i !== "none" && (e = i + " " + e);
|
|
759
781
|
} while (!t && (o = o.parentNode));
|
|
760
782
|
var n = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
761
783
|
return n && new n(e);
|
|
762
784
|
}
|
|
763
|
-
function
|
|
785
|
+
function ki(o, t, e) {
|
|
764
786
|
if (o) {
|
|
765
787
|
var i = o.getElementsByTagName(t), n = 0, r = i.length;
|
|
766
788
|
if (e)
|
|
@@ -776,43 +798,43 @@ function G() {
|
|
|
776
798
|
}
|
|
777
799
|
function T(o, t, e, i, n) {
|
|
778
800
|
if (!(!o.getBoundingClientRect && o !== window)) {
|
|
779
|
-
var r, s, l, a,
|
|
780
|
-
if (o !== window && o.parentNode && o !== G() ? (r = o.getBoundingClientRect(), s = r.top, l = r.left, a = r.bottom,
|
|
801
|
+
var r, s, l, a, h, c, d;
|
|
802
|
+
if (o !== window && o.parentNode && o !== G() ? (r = o.getBoundingClientRect(), s = r.top, l = r.left, a = r.bottom, h = r.right, c = r.height, d = r.width) : (s = 0, l = 0, a = window.innerHeight, h = window.innerWidth, c = window.innerHeight, d = window.innerWidth), (t || e) && o !== window && (n = n || o.parentNode, !ot))
|
|
781
803
|
do
|
|
782
|
-
if (n && n.getBoundingClientRect && (
|
|
783
|
-
var
|
|
784
|
-
s -=
|
|
804
|
+
if (n && n.getBoundingClientRect && (p(n, "transform") !== "none" || e && p(n, "position") !== "static")) {
|
|
805
|
+
var g = n.getBoundingClientRect();
|
|
806
|
+
s -= g.top + parseInt(p(n, "border-top-width")), l -= g.left + parseInt(p(n, "border-left-width")), a = s + r.height, h = l + r.width;
|
|
785
807
|
break;
|
|
786
808
|
}
|
|
787
809
|
while (n = n.parentNode);
|
|
788
810
|
if (i && o !== window) {
|
|
789
|
-
var v = At(n || o), y = v && v.a,
|
|
790
|
-
v && (s /=
|
|
811
|
+
var v = At(n || o), y = v && v.a, E = v && v.d;
|
|
812
|
+
v && (s /= E, l /= y, d /= y, c /= E, a = s + c, h = l + d);
|
|
791
813
|
}
|
|
792
814
|
return {
|
|
793
815
|
top: s,
|
|
794
816
|
left: l,
|
|
795
817
|
bottom: a,
|
|
796
|
-
right:
|
|
797
|
-
width:
|
|
818
|
+
right: h,
|
|
819
|
+
width: d,
|
|
798
820
|
height: c
|
|
799
821
|
};
|
|
800
822
|
}
|
|
801
823
|
}
|
|
802
|
-
function
|
|
803
|
-
for (var i =
|
|
824
|
+
function vi(o, t, e) {
|
|
825
|
+
for (var i = ht(o, !0), n = T(o)[t]; i; ) {
|
|
804
826
|
var r = T(i)[e], s = void 0;
|
|
805
827
|
if (e === "top" || e === "left" ? s = n >= r : s = n <= r, !s)
|
|
806
828
|
return i;
|
|
807
829
|
if (i === G())
|
|
808
830
|
break;
|
|
809
|
-
i =
|
|
831
|
+
i = ht(i, !1);
|
|
810
832
|
}
|
|
811
833
|
return !1;
|
|
812
834
|
}
|
|
813
835
|
function Tt(o, t, e, i) {
|
|
814
836
|
for (var n = 0, r = 0, s = o.children; r < s.length; ) {
|
|
815
|
-
if (s[r].style.display !== "none" && s[r] !==
|
|
837
|
+
if (s[r].style.display !== "none" && s[r] !== f.ghost && (i || s[r] !== f.dragged) && j(s[r], e.draggable, o, !1)) {
|
|
816
838
|
if (n === t)
|
|
817
839
|
return s[r];
|
|
818
840
|
n++;
|
|
@@ -821,20 +843,20 @@ function Tt(o, t, e, i) {
|
|
|
821
843
|
}
|
|
822
844
|
return null;
|
|
823
845
|
}
|
|
824
|
-
function
|
|
825
|
-
for (var e = o.lastElementChild; e && (e ===
|
|
846
|
+
function ti(o, t) {
|
|
847
|
+
for (var e = o.lastElementChild; e && (e === f.ghost || p(e, "display") === "none" || t && !de(e, t)); )
|
|
826
848
|
e = e.previousElementSibling;
|
|
827
849
|
return e || null;
|
|
828
850
|
}
|
|
829
|
-
function
|
|
851
|
+
function Z(o, t) {
|
|
830
852
|
var e = 0;
|
|
831
853
|
if (!o || !o.parentNode)
|
|
832
854
|
return -1;
|
|
833
855
|
for (; o = o.previousElementSibling; )
|
|
834
|
-
o.nodeName.toUpperCase() !== "TEMPLATE" && o !==
|
|
856
|
+
o.nodeName.toUpperCase() !== "TEMPLATE" && o !== f.clone && (!t || de(o, t)) && e++;
|
|
835
857
|
return e;
|
|
836
858
|
}
|
|
837
|
-
function
|
|
859
|
+
function bi(o) {
|
|
838
860
|
var t = 0, e = 0, i = G();
|
|
839
861
|
if (o)
|
|
840
862
|
do {
|
|
@@ -843,7 +865,7 @@ function xi(o) {
|
|
|
843
865
|
} while (o !== i && (o = o.parentNode));
|
|
844
866
|
return [t, e];
|
|
845
867
|
}
|
|
846
|
-
function
|
|
868
|
+
function ko(o, t) {
|
|
847
869
|
for (var e in o)
|
|
848
870
|
if (o.hasOwnProperty(e)) {
|
|
849
871
|
for (var i in t)
|
|
@@ -852,13 +874,13 @@ function Mo(o, t) {
|
|
|
852
874
|
}
|
|
853
875
|
return -1;
|
|
854
876
|
}
|
|
855
|
-
function
|
|
877
|
+
function ht(o, t) {
|
|
856
878
|
if (!o || !o.getBoundingClientRect)
|
|
857
879
|
return G();
|
|
858
880
|
var e = o, i = !1;
|
|
859
881
|
do
|
|
860
882
|
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
861
|
-
var n =
|
|
883
|
+
var n = p(e);
|
|
862
884
|
if (e.clientWidth < e.scrollWidth && (n.overflowX == "auto" || n.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (n.overflowY == "auto" || n.overflowY == "scroll")) {
|
|
863
885
|
if (!e.getBoundingClientRect || e === document.body)
|
|
864
886
|
return G();
|
|
@@ -870,45 +892,45 @@ function dt(o, t) {
|
|
|
870
892
|
while (e = e.parentNode);
|
|
871
893
|
return G();
|
|
872
894
|
}
|
|
873
|
-
function
|
|
895
|
+
function Io(o, t) {
|
|
874
896
|
if (o && t)
|
|
875
897
|
for (var e in t)
|
|
876
898
|
t.hasOwnProperty(e) && (o[e] = t[e]);
|
|
877
899
|
return o;
|
|
878
900
|
}
|
|
879
|
-
function
|
|
901
|
+
function Ne(o, t) {
|
|
880
902
|
return Math.round(o.top) === Math.round(t.top) && Math.round(o.left) === Math.round(t.left) && Math.round(o.height) === Math.round(t.height) && Math.round(o.width) === Math.round(t.width);
|
|
881
903
|
}
|
|
882
|
-
var
|
|
883
|
-
function
|
|
904
|
+
var Ut;
|
|
905
|
+
function Ii(o, t) {
|
|
884
906
|
return function() {
|
|
885
|
-
if (!
|
|
907
|
+
if (!Ut) {
|
|
886
908
|
var e = arguments, i = this;
|
|
887
|
-
e.length === 1 ? o.call(i, e[0]) : o.apply(i, e),
|
|
888
|
-
|
|
909
|
+
e.length === 1 ? o.call(i, e[0]) : o.apply(i, e), Ut = setTimeout(function() {
|
|
910
|
+
Ut = void 0;
|
|
889
911
|
}, t);
|
|
890
912
|
}
|
|
891
913
|
};
|
|
892
914
|
}
|
|
893
|
-
function
|
|
894
|
-
clearTimeout(
|
|
915
|
+
function Vo() {
|
|
916
|
+
clearTimeout(Ut), Ut = void 0;
|
|
895
917
|
}
|
|
896
|
-
function
|
|
918
|
+
function Vi(o, t, e) {
|
|
897
919
|
o.scrollLeft += t, o.scrollTop += e;
|
|
898
920
|
}
|
|
899
|
-
function
|
|
921
|
+
function Ri(o) {
|
|
900
922
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
901
923
|
return t && t.dom ? t.dom(o).cloneNode(!0) : e ? e(o).clone(!0)[0] : o.cloneNode(!0);
|
|
902
924
|
}
|
|
903
925
|
var U = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
904
|
-
function
|
|
926
|
+
function Ro() {
|
|
905
927
|
var o = [], t;
|
|
906
928
|
return {
|
|
907
929
|
captureAnimationState: function() {
|
|
908
930
|
if (o = [], !!this.options.animation) {
|
|
909
931
|
var i = [].slice.call(this.el.children);
|
|
910
932
|
i.forEach(function(n) {
|
|
911
|
-
if (!(
|
|
933
|
+
if (!(p(n, "display") === "none" || n === f.ghost)) {
|
|
912
934
|
o.push({
|
|
913
935
|
target: n,
|
|
914
936
|
rect: T(n)
|
|
@@ -927,7 +949,7 @@ function Io() {
|
|
|
927
949
|
o.push(i);
|
|
928
950
|
},
|
|
929
951
|
removeAnimationState: function(i) {
|
|
930
|
-
o.splice(
|
|
952
|
+
o.splice(ko(o, {
|
|
931
953
|
target: i
|
|
932
954
|
}), 1);
|
|
933
955
|
},
|
|
@@ -939,38 +961,38 @@ function Io() {
|
|
|
939
961
|
}
|
|
940
962
|
var r = !1, s = 0;
|
|
941
963
|
o.forEach(function(l) {
|
|
942
|
-
var a = 0,
|
|
943
|
-
|
|
944
|
-
(y.top -
|
|
945
|
-
|
|
946
|
-
}, a),
|
|
964
|
+
var a = 0, h = l.target, c = h.fromRect, d = T(h), g = h.prevFromRect, v = h.prevToRect, y = l.rect, E = At(h, !0);
|
|
965
|
+
E && (d.top -= E.f, d.left -= E.e), h.toRect = d, h.thisAnimationDuration && Ne(g, d) && !Ne(c, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
966
|
+
(y.top - d.top) / (y.left - d.left) === (c.top - d.top) / (c.left - d.left) && (a = Uo(y, g, v, n.options)), Ne(d, c) || (h.prevFromRect = c, h.prevToRect = d, a || (a = n.options.animation), n.animate(h, y, d, a)), a && (r = !0, s = Math.max(s, a), clearTimeout(h.animationResetTimer), h.animationResetTimer = setTimeout(function() {
|
|
967
|
+
h.animationTime = 0, h.prevFromRect = null, h.fromRect = null, h.prevToRect = null, h.thisAnimationDuration = null;
|
|
968
|
+
}, a), h.thisAnimationDuration = a);
|
|
947
969
|
}), clearTimeout(t), r ? t = setTimeout(function() {
|
|
948
970
|
typeof i == "function" && i();
|
|
949
971
|
}, s) : typeof i == "function" && i(), o = [];
|
|
950
972
|
},
|
|
951
973
|
animate: function(i, n, r, s) {
|
|
952
974
|
if (s) {
|
|
953
|
-
|
|
954
|
-
var l = At(this.el), a = l && l.a,
|
|
955
|
-
i.animatingX = !!c, i.animatingY = !!
|
|
956
|
-
|
|
975
|
+
p(i, "transition", ""), p(i, "transform", "");
|
|
976
|
+
var l = At(this.el), a = l && l.a, h = l && l.d, c = (n.left - r.left) / (a || 1), d = (n.top - r.top) / (h || 1);
|
|
977
|
+
i.animatingX = !!c, i.animatingY = !!d, p(i, "transform", "translate3d(" + c + "px," + d + "px,0)"), this.forRepaintDummy = Bo(i), p(i, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), p(i, "transform", "translate3d(0,0,0)"), typeof i.animated == "number" && clearTimeout(i.animated), i.animated = setTimeout(function() {
|
|
978
|
+
p(i, "transition", ""), p(i, "transform", ""), i.animated = !1, i.animatingX = !1, i.animatingY = !1;
|
|
957
979
|
}, s);
|
|
958
980
|
}
|
|
959
981
|
}
|
|
960
982
|
};
|
|
961
983
|
}
|
|
962
|
-
function
|
|
984
|
+
function Bo(o) {
|
|
963
985
|
return o.offsetWidth;
|
|
964
986
|
}
|
|
965
|
-
function
|
|
987
|
+
function Uo(o, t, e, i) {
|
|
966
988
|
return Math.sqrt(Math.pow(t.top - o.top, 2) + Math.pow(t.left - o.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * i.animation;
|
|
967
989
|
}
|
|
968
|
-
var Et = [],
|
|
990
|
+
var Et = [], ke = {
|
|
969
991
|
initializeByDefault: !0
|
|
970
|
-
},
|
|
992
|
+
}, Gt = {
|
|
971
993
|
mount: function(t) {
|
|
972
|
-
for (var e in
|
|
973
|
-
|
|
994
|
+
for (var e in ke)
|
|
995
|
+
ke.hasOwnProperty(e) && !(e in t) && (t[e] = ke[e]);
|
|
974
996
|
Et.forEach(function(i) {
|
|
975
997
|
if (i.pluginName === t.pluginName)
|
|
976
998
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
@@ -994,8 +1016,8 @@ var Et = [], Ve = {
|
|
|
994
1016
|
Et.forEach(function(l) {
|
|
995
1017
|
var a = l.pluginName;
|
|
996
1018
|
if (!(!t.options[a] && !l.initializeByDefault)) {
|
|
997
|
-
var
|
|
998
|
-
|
|
1019
|
+
var h = new l(t, e, t.options);
|
|
1020
|
+
h.sortable = t, h.options = t.options, t[a] = h, it(i, h.defaults);
|
|
999
1021
|
}
|
|
1000
1022
|
});
|
|
1001
1023
|
for (var r in t.options)
|
|
@@ -1017,41 +1039,41 @@ var Et = [], Ve = {
|
|
|
1017
1039
|
}), n;
|
|
1018
1040
|
}
|
|
1019
1041
|
};
|
|
1020
|
-
function
|
|
1021
|
-
var t = o.sortable, e = o.rootEl, i = o.name, n = o.targetEl, r = o.cloneEl, s = o.toEl, l = o.fromEl, a = o.oldIndex,
|
|
1042
|
+
function Zo(o) {
|
|
1043
|
+
var t = o.sortable, e = o.rootEl, i = o.name, n = o.targetEl, r = o.cloneEl, s = o.toEl, l = o.fromEl, a = o.oldIndex, h = o.newIndex, c = o.oldDraggableIndex, d = o.newDraggableIndex, g = o.originalEvent, v = o.putSortable, y = o.extraEventProperties;
|
|
1022
1044
|
if (t = t || e && e[U], !!t) {
|
|
1023
|
-
var
|
|
1024
|
-
window.CustomEvent && !ot && !
|
|
1045
|
+
var E, z = t.options, J = "on" + i.charAt(0).toUpperCase() + i.substr(1);
|
|
1046
|
+
window.CustomEvent && !ot && !jt ? E = new CustomEvent(i, {
|
|
1025
1047
|
bubbles: !0,
|
|
1026
1048
|
cancelable: !0
|
|
1027
|
-
}) : (
|
|
1028
|
-
var
|
|
1029
|
-
for (var
|
|
1030
|
-
|
|
1031
|
-
e && e.dispatchEvent(
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
var
|
|
1035
|
-
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.evt, r =
|
|
1036
|
-
|
|
1037
|
-
dragEl:
|
|
1038
|
-
parentEl:
|
|
1049
|
+
}) : (E = document.createEvent("Event"), E.initEvent(i, !0, !0)), E.to = s || e, E.from = l || e, E.item = n || e, E.clone = r, E.oldIndex = a, E.newIndex = h, E.oldDraggableIndex = c, E.newDraggableIndex = d, E.originalEvent = g, E.pullMode = v ? v.lastPutMode : void 0;
|
|
1050
|
+
var P = K(K({}, y), Gt.getEventProperties(i, t));
|
|
1051
|
+
for (var X in P)
|
|
1052
|
+
E[X] = P[X];
|
|
1053
|
+
e && e.dispatchEvent(E), z[J] && z[J].call(t, E);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
var Fo = ["evt"], k = function(t, e) {
|
|
1057
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.evt, r = Mo(i, Fo);
|
|
1058
|
+
Gt.pluginEvent.bind(f)(t, e, K({
|
|
1059
|
+
dragEl: u,
|
|
1060
|
+
parentEl: A,
|
|
1039
1061
|
ghostEl: m,
|
|
1040
1062
|
rootEl: x,
|
|
1041
1063
|
nextEl: vt,
|
|
1042
|
-
lastDownEl:
|
|
1043
|
-
cloneEl:
|
|
1064
|
+
lastDownEl: ne,
|
|
1065
|
+
cloneEl: S,
|
|
1044
1066
|
cloneHidden: lt,
|
|
1045
|
-
dragStarted:
|
|
1067
|
+
dragStarted: Nt,
|
|
1046
1068
|
putSortable: D,
|
|
1047
|
-
activeSortable:
|
|
1069
|
+
activeSortable: f.active,
|
|
1048
1070
|
originalEvent: n,
|
|
1049
|
-
oldIndex:
|
|
1050
|
-
oldDraggableIndex:
|
|
1051
|
-
newIndex:
|
|
1071
|
+
oldIndex: St,
|
|
1072
|
+
oldDraggableIndex: Zt,
|
|
1073
|
+
newIndex: B,
|
|
1052
1074
|
newDraggableIndex: st,
|
|
1053
|
-
hideGhostForTarget:
|
|
1054
|
-
unhideGhostForTarget:
|
|
1075
|
+
hideGhostForTarget: Fi,
|
|
1076
|
+
unhideGhostForTarget: zi,
|
|
1055
1077
|
cloneNowHidden: function() {
|
|
1056
1078
|
lt = !0;
|
|
1057
1079
|
},
|
|
@@ -1059,7 +1081,7 @@ var Lo = ["evt"], k = function(t, e) {
|
|
|
1059
1081
|
lt = !1;
|
|
1060
1082
|
},
|
|
1061
1083
|
dispatchSortableEvent: function(l) {
|
|
1062
|
-
|
|
1084
|
+
L({
|
|
1063
1085
|
sortable: e,
|
|
1064
1086
|
name: l,
|
|
1065
1087
|
originalEvent: n
|
|
@@ -1067,82 +1089,82 @@ var Lo = ["evt"], k = function(t, e) {
|
|
|
1067
1089
|
}
|
|
1068
1090
|
}, r));
|
|
1069
1091
|
};
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1092
|
+
function L(o) {
|
|
1093
|
+
Zo(K({
|
|
1072
1094
|
putSortable: D,
|
|
1073
|
-
cloneEl:
|
|
1074
|
-
targetEl:
|
|
1095
|
+
cloneEl: S,
|
|
1096
|
+
targetEl: u,
|
|
1075
1097
|
rootEl: x,
|
|
1076
|
-
oldIndex:
|
|
1077
|
-
oldDraggableIndex:
|
|
1078
|
-
newIndex:
|
|
1098
|
+
oldIndex: St,
|
|
1099
|
+
oldDraggableIndex: Zt,
|
|
1100
|
+
newIndex: B,
|
|
1079
1101
|
newDraggableIndex: st
|
|
1080
1102
|
}, o));
|
|
1081
1103
|
}
|
|
1082
|
-
var
|
|
1083
|
-
if (
|
|
1104
|
+
var u, A, m, x, vt, ne, S, lt, St, B, Zt, st, Jt, D, xt = !1, ue = !1, ce = [], gt, Y, Ie, Ve, wi, Ei, Nt, _t, Ft, zt = !1, Qt = !1, re, O, Re = [], Xe = !1, pe = [], Oe = typeof document < "u", te = Mi, _i = jt || ot ? "cssFloat" : "float", zo = Oe && !Li && !Mi && "draggable" in document.createElement("div"), Bi = function() {
|
|
1105
|
+
if (Oe) {
|
|
1084
1106
|
if (ot)
|
|
1085
1107
|
return !1;
|
|
1086
1108
|
var o = document.createElement("x");
|
|
1087
1109
|
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
|
|
1088
1110
|
}
|
|
1089
|
-
}(),
|
|
1090
|
-
var i =
|
|
1111
|
+
}(), Ui = function(t, e) {
|
|
1112
|
+
var i = p(t), n = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Tt(t, 0, e), s = Tt(t, 1, e), l = r && p(r), a = s && p(s), h = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(r).width, c = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + T(s).width;
|
|
1091
1113
|
if (i.display === "flex")
|
|
1092
1114
|
return i.flexDirection === "column" || i.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1093
1115
|
if (i.display === "grid")
|
|
1094
1116
|
return i.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1095
1117
|
if (r && l.float && l.float !== "none") {
|
|
1096
|
-
var
|
|
1097
|
-
return s && (a.clear === "both" || a.clear ===
|
|
1098
|
-
}
|
|
1099
|
-
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" ||
|
|
1100
|
-
},
|
|
1101
|
-
var n = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, l = i ? e.left : e.top, a = i ? e.right : e.bottom,
|
|
1102
|
-
return n === l || r === a || n + s / 2 === l +
|
|
1103
|
-
},
|
|
1118
|
+
var d = l.float === "left" ? "left" : "right";
|
|
1119
|
+
return s && (a.clear === "both" || a.clear === d) ? "vertical" : "horizontal";
|
|
1120
|
+
}
|
|
1121
|
+
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || h >= n && i[_i] === "none" || s && i[_i] === "none" && h + c > n) ? "vertical" : "horizontal";
|
|
1122
|
+
}, Xo = function(t, e, i) {
|
|
1123
|
+
var n = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, l = i ? e.left : e.top, a = i ? e.right : e.bottom, h = i ? e.width : e.height;
|
|
1124
|
+
return n === l || r === a || n + s / 2 === l + h / 2;
|
|
1125
|
+
}, Yo = function(t, e) {
|
|
1104
1126
|
var i;
|
|
1105
|
-
return
|
|
1127
|
+
return ce.some(function(n) {
|
|
1106
1128
|
var r = n[U].options.emptyInsertThreshold;
|
|
1107
|
-
if (!(!r ||
|
|
1129
|
+
if (!(!r || ti(n))) {
|
|
1108
1130
|
var s = T(n), l = t >= s.left - r && t <= s.right + r, a = e >= s.top - r && e <= s.bottom + r;
|
|
1109
1131
|
if (l && a)
|
|
1110
1132
|
return i = n;
|
|
1111
1133
|
}
|
|
1112
1134
|
}), i;
|
|
1113
|
-
},
|
|
1135
|
+
}, Zi = function(t) {
|
|
1114
1136
|
function e(r, s) {
|
|
1115
|
-
return function(l, a,
|
|
1116
|
-
var
|
|
1117
|
-
if (r == null && (s ||
|
|
1137
|
+
return function(l, a, h, c) {
|
|
1138
|
+
var d = l.options.group.name && a.options.group.name && l.options.group.name === a.options.group.name;
|
|
1139
|
+
if (r == null && (s || d))
|
|
1118
1140
|
return !0;
|
|
1119
1141
|
if (r == null || r === !1)
|
|
1120
1142
|
return !1;
|
|
1121
1143
|
if (s && r === "clone")
|
|
1122
1144
|
return r;
|
|
1123
1145
|
if (typeof r == "function")
|
|
1124
|
-
return e(r(l, a,
|
|
1125
|
-
var
|
|
1126
|
-
return r === !0 || typeof r == "string" && r ===
|
|
1146
|
+
return e(r(l, a, h, c), s)(l, a, h, c);
|
|
1147
|
+
var g = (s ? l : a).options.group.name;
|
|
1148
|
+
return r === !0 || typeof r == "string" && r === g || r.join && r.indexOf(g) > -1;
|
|
1127
1149
|
};
|
|
1128
1150
|
}
|
|
1129
1151
|
var i = {}, n = t.group;
|
|
1130
|
-
(!n ||
|
|
1152
|
+
(!n || oe(n) != "object") && (n = {
|
|
1131
1153
|
name: n
|
|
1132
1154
|
}), i.name = n.name, i.checkPull = e(n.pull, !0), i.checkPut = e(n.put), i.revertClone = n.revertClone, t.group = i;
|
|
1133
|
-
},
|
|
1134
|
-
!
|
|
1135
|
-
},
|
|
1136
|
-
!
|
|
1155
|
+
}, Fi = function() {
|
|
1156
|
+
!Bi && m && p(m, "display", "none");
|
|
1157
|
+
}, zi = function() {
|
|
1158
|
+
!Bi && m && p(m, "display", "");
|
|
1137
1159
|
};
|
|
1138
|
-
|
|
1160
|
+
Oe && !Li && document.addEventListener("click", function(o) {
|
|
1139
1161
|
if (ue)
|
|
1140
1162
|
return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), ue = !1, !1;
|
|
1141
1163
|
}, !0);
|
|
1142
|
-
var
|
|
1143
|
-
if (
|
|
1164
|
+
var mt = function(t) {
|
|
1165
|
+
if (u) {
|
|
1144
1166
|
t = t.touches ? t.touches[0] : t;
|
|
1145
|
-
var e =
|
|
1167
|
+
var e = Yo(t.clientX, t.clientY);
|
|
1146
1168
|
if (e) {
|
|
1147
1169
|
var i = {};
|
|
1148
1170
|
for (var n in t)
|
|
@@ -1150,10 +1172,10 @@ var gt = function(t) {
|
|
|
1150
1172
|
i.target = i.rootEl = e, i.preventDefault = void 0, i.stopPropagation = void 0, e[U]._onDragOver(i);
|
|
1151
1173
|
}
|
|
1152
1174
|
}
|
|
1153
|
-
},
|
|
1154
|
-
|
|
1175
|
+
}, qo = function(t) {
|
|
1176
|
+
u && u.parentNode[U]._isOutsideThisEl(t.target);
|
|
1155
1177
|
};
|
|
1156
|
-
function
|
|
1178
|
+
function f(o, t) {
|
|
1157
1179
|
if (!(o && o.nodeType && o.nodeType === 1))
|
|
1158
1180
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
|
|
1159
1181
|
this.el = o, this.options = t = it({}, t), o[U] = this;
|
|
@@ -1172,7 +1194,7 @@ function g(o, t) {
|
|
|
1172
1194
|
// will be set to same as swapThreshold if default
|
|
1173
1195
|
removeCloneOnHide: !0,
|
|
1174
1196
|
direction: function() {
|
|
1175
|
-
return
|
|
1197
|
+
return Ui(o, this.options);
|
|
1176
1198
|
},
|
|
1177
1199
|
ghostClass: "sortable-ghost",
|
|
1178
1200
|
chosenClass: "sortable-chosen",
|
|
@@ -1199,35 +1221,35 @@ function g(o, t) {
|
|
|
1199
1221
|
x: 0,
|
|
1200
1222
|
y: 0
|
|
1201
1223
|
},
|
|
1202
|
-
supportPointer:
|
|
1224
|
+
supportPointer: f.supportPointer !== !1 && "PointerEvent" in window && !Bt,
|
|
1203
1225
|
emptyInsertThreshold: 5
|
|
1204
1226
|
};
|
|
1205
|
-
|
|
1227
|
+
Gt.initializePlugins(this, o, e);
|
|
1206
1228
|
for (var i in e)
|
|
1207
1229
|
!(i in t) && (t[i] = e[i]);
|
|
1208
|
-
|
|
1230
|
+
Zi(t);
|
|
1209
1231
|
for (var n in this)
|
|
1210
1232
|
n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
|
|
1211
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1233
|
+
this.nativeDraggable = t.forceFallback ? !1 : zo, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? w(o, "pointerdown", this._onTapStart) : (w(o, "mousedown", this._onTapStart), w(o, "touchstart", this._onTapStart)), this.nativeDraggable && (w(o, "dragover", this), w(o, "dragenter", this)), ce.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), it(this, Ro());
|
|
1212
1234
|
}
|
|
1213
|
-
|
|
1235
|
+
f.prototype = /** @lends Sortable.prototype */
|
|
1214
1236
|
{
|
|
1215
|
-
constructor:
|
|
1237
|
+
constructor: f,
|
|
1216
1238
|
_isOutsideThisEl: function(t) {
|
|
1217
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1239
|
+
!this.el.contains(t) && t !== this.el && (_t = null);
|
|
1218
1240
|
},
|
|
1219
1241
|
_getDirection: function(t, e) {
|
|
1220
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e,
|
|
1242
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, u) : this.options.direction;
|
|
1221
1243
|
},
|
|
1222
1244
|
_onTapStart: function(t) {
|
|
1223
1245
|
if (t.cancelable) {
|
|
1224
|
-
var e = this, i = this.el, n = this.options, r = n.preventOnFilter, s = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, a = (l || t).target,
|
|
1225
|
-
if (
|
|
1226
|
-
if (
|
|
1246
|
+
var e = this, i = this.el, n = this.options, r = n.preventOnFilter, s = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, a = (l || t).target, h = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || a, c = n.filter;
|
|
1247
|
+
if (en(i), !u && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || n.disabled) && !h.isContentEditable && !(!this.nativeDraggable && Bt && a && a.tagName.toUpperCase() === "SELECT") && (a = j(a, n.draggable, i, !1), !(a && a.animated) && ne !== a)) {
|
|
1248
|
+
if (St = Z(a), Zt = Z(a, n.draggable), typeof c == "function") {
|
|
1227
1249
|
if (c.call(this, t, a, this)) {
|
|
1228
|
-
|
|
1250
|
+
L({
|
|
1229
1251
|
sortable: e,
|
|
1230
|
-
rootEl:
|
|
1252
|
+
rootEl: h,
|
|
1231
1253
|
name: "filter",
|
|
1232
1254
|
targetEl: a,
|
|
1233
1255
|
toEl: i,
|
|
@@ -1237,11 +1259,11 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1237
1259
|
}), r && t.cancelable && t.preventDefault();
|
|
1238
1260
|
return;
|
|
1239
1261
|
}
|
|
1240
|
-
} else if (c && (c = c.split(",").some(function(
|
|
1241
|
-
if (
|
|
1242
|
-
return
|
|
1262
|
+
} else if (c && (c = c.split(",").some(function(d) {
|
|
1263
|
+
if (d = j(h, d.trim(), i, !1), d)
|
|
1264
|
+
return L({
|
|
1243
1265
|
sortable: e,
|
|
1244
|
-
rootEl:
|
|
1266
|
+
rootEl: d,
|
|
1245
1267
|
name: "filter",
|
|
1246
1268
|
targetEl: a,
|
|
1247
1269
|
fromEl: i,
|
|
@@ -1253,36 +1275,36 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1253
1275
|
r && t.cancelable && t.preventDefault();
|
|
1254
1276
|
return;
|
|
1255
1277
|
}
|
|
1256
|
-
n.handle && !
|
|
1278
|
+
n.handle && !j(h, n.handle, i, !1) || this._prepareDragStart(t, l, a);
|
|
1257
1279
|
}
|
|
1258
1280
|
}
|
|
1259
1281
|
},
|
|
1260
1282
|
_prepareDragStart: function(t, e, i) {
|
|
1261
1283
|
var n = this, r = n.el, s = n.options, l = r.ownerDocument, a;
|
|
1262
|
-
if (i && !
|
|
1263
|
-
var
|
|
1264
|
-
if (x = r,
|
|
1265
|
-
target:
|
|
1284
|
+
if (i && !u && i.parentNode === r) {
|
|
1285
|
+
var h = T(i);
|
|
1286
|
+
if (x = r, u = i, A = u.parentNode, vt = u.nextSibling, ne = i, Jt = s.group, f.dragged = u, gt = {
|
|
1287
|
+
target: u,
|
|
1266
1288
|
clientX: (e || t).clientX,
|
|
1267
1289
|
clientY: (e || t).clientY
|
|
1268
|
-
},
|
|
1290
|
+
}, wi = gt.clientX - h.left, Ei = gt.clientY - h.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, u.style["will-change"] = "all", a = function() {
|
|
1269
1291
|
if (k("delayEnded", n, {
|
|
1270
1292
|
evt: t
|
|
1271
|
-
}),
|
|
1293
|
+
}), f.eventCanceled) {
|
|
1272
1294
|
n._onDrop();
|
|
1273
1295
|
return;
|
|
1274
1296
|
}
|
|
1275
|
-
n._disableDelayedDragEvents(), !
|
|
1297
|
+
n._disableDelayedDragEvents(), !mi && n.nativeDraggable && (u.draggable = !0), n._triggerDragStart(t, e), L({
|
|
1276
1298
|
sortable: n,
|
|
1277
1299
|
name: "choose",
|
|
1278
1300
|
originalEvent: t
|
|
1279
|
-
}),
|
|
1301
|
+
}), R(u, s.chosenClass, !0);
|
|
1280
1302
|
}, s.ignore.split(",").forEach(function(c) {
|
|
1281
|
-
|
|
1282
|
-
}), w(l, "dragover",
|
|
1303
|
+
ki(u, c.trim(), Be);
|
|
1304
|
+
}), w(l, "dragover", mt), w(l, "mousemove", mt), w(l, "touchmove", mt), w(l, "mouseup", n._onDrop), w(l, "touchend", n._onDrop), w(l, "touchcancel", n._onDrop), mi && this.nativeDraggable && (this.options.touchStartThreshold = 4, u.draggable = !0), k("delayStart", this, {
|
|
1283
1305
|
evt: t
|
|
1284
|
-
}), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(
|
|
1285
|
-
if (
|
|
1306
|
+
}), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(jt || ot))) {
|
|
1307
|
+
if (f.eventCanceled) {
|
|
1286
1308
|
this._onDrop();
|
|
1287
1309
|
return;
|
|
1288
1310
|
}
|
|
@@ -1296,28 +1318,28 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1296
1318
|
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();
|
|
1297
1319
|
},
|
|
1298
1320
|
_disableDelayedDrag: function() {
|
|
1299
|
-
|
|
1321
|
+
u && Be(u), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1300
1322
|
},
|
|
1301
1323
|
_disableDelayedDragEvents: function() {
|
|
1302
1324
|
var t = this.el.ownerDocument;
|
|
1303
|
-
|
|
1325
|
+
b(t, "mouseup", this._disableDelayedDrag), b(t, "touchend", this._disableDelayedDrag), b(t, "touchcancel", this._disableDelayedDrag), b(t, "mousemove", this._delayedDragTouchMoveHandler), b(t, "touchmove", this._delayedDragTouchMoveHandler), b(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1304
1326
|
},
|
|
1305
1327
|
_triggerDragStart: function(t, e) {
|
|
1306
|
-
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? w(document, "pointermove", this._onTouchMove) : e ? w(document, "touchmove", this._onTouchMove) : w(document, "mousemove", this._onTouchMove) : (w(
|
|
1328
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? w(document, "pointermove", this._onTouchMove) : e ? w(document, "touchmove", this._onTouchMove) : w(document, "mousemove", this._onTouchMove) : (w(u, "dragend", this), w(x, "dragstart", this._onDragStart));
|
|
1307
1329
|
try {
|
|
1308
|
-
document.selection ?
|
|
1330
|
+
document.selection ? se(function() {
|
|
1309
1331
|
document.selection.empty();
|
|
1310
1332
|
}) : window.getSelection().removeAllRanges();
|
|
1311
1333
|
} catch {
|
|
1312
1334
|
}
|
|
1313
1335
|
},
|
|
1314
1336
|
_dragStarted: function(t, e) {
|
|
1315
|
-
if (
|
|
1337
|
+
if (xt = !1, x && u) {
|
|
1316
1338
|
k("dragStarted", this, {
|
|
1317
1339
|
evt: e
|
|
1318
|
-
}), this.nativeDraggable && w(document, "dragover",
|
|
1340
|
+
}), this.nativeDraggable && w(document, "dragover", qo);
|
|
1319
1341
|
var i = this.options;
|
|
1320
|
-
!t &&
|
|
1342
|
+
!t && R(u, i.dragClass, !1), R(u, i.ghostClass, !0), f.active = this, t && this._appendGhost(), L({
|
|
1321
1343
|
sortable: this,
|
|
1322
1344
|
name: "start",
|
|
1323
1345
|
originalEvent: e
|
|
@@ -1326,17 +1348,17 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1326
1348
|
this._nulling();
|
|
1327
1349
|
},
|
|
1328
1350
|
_emulateDragOver: function() {
|
|
1329
|
-
if (
|
|
1330
|
-
this._lastX =
|
|
1331
|
-
for (var t = document.elementFromPoint(
|
|
1351
|
+
if (Y) {
|
|
1352
|
+
this._lastX = Y.clientX, this._lastY = Y.clientY, Fi();
|
|
1353
|
+
for (var t = document.elementFromPoint(Y.clientX, Y.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(Y.clientX, Y.clientY), t !== e); )
|
|
1332
1354
|
e = t;
|
|
1333
|
-
if (
|
|
1355
|
+
if (u.parentNode[U]._isOutsideThisEl(t), e)
|
|
1334
1356
|
do {
|
|
1335
1357
|
if (e[U]) {
|
|
1336
1358
|
var i = void 0;
|
|
1337
1359
|
if (i = e[U]._onDragOver({
|
|
1338
|
-
clientX:
|
|
1339
|
-
clientY:
|
|
1360
|
+
clientX: Y.clientX,
|
|
1361
|
+
clientY: Y.clientY,
|
|
1340
1362
|
target: t,
|
|
1341
1363
|
rootEl: e
|
|
1342
1364
|
}), i && !this.options.dragoverBubble)
|
|
@@ -1344,64 +1366,64 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1344
1366
|
}
|
|
1345
1367
|
t = e;
|
|
1346
1368
|
} while (e = e.parentNode);
|
|
1347
|
-
|
|
1369
|
+
zi();
|
|
1348
1370
|
}
|
|
1349
1371
|
},
|
|
1350
1372
|
_onTouchMove: function(t) {
|
|
1351
|
-
if (
|
|
1352
|
-
var e = this.options, i = e.fallbackTolerance, n = e.fallbackOffset, r = t.touches ? t.touches[0] : t, s = m && At(m, !0), l = m && s && s.a, a = m && s && s.d,
|
|
1353
|
-
if (!
|
|
1373
|
+
if (gt) {
|
|
1374
|
+
var e = this.options, i = e.fallbackTolerance, n = e.fallbackOffset, r = t.touches ? t.touches[0] : t, s = m && At(m, !0), l = m && s && s.a, a = m && s && s.d, h = te && O && bi(O), c = (r.clientX - gt.clientX + n.x) / (l || 1) + (h ? h[0] - Re[0] : 0) / (l || 1), d = (r.clientY - gt.clientY + n.y) / (a || 1) + (h ? h[1] - Re[1] : 0) / (a || 1);
|
|
1375
|
+
if (!f.active && !xt) {
|
|
1354
1376
|
if (i && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < i)
|
|
1355
1377
|
return;
|
|
1356
1378
|
this._onDragStart(t, !0);
|
|
1357
1379
|
}
|
|
1358
1380
|
if (m) {
|
|
1359
|
-
s ? (s.e += c - (
|
|
1381
|
+
s ? (s.e += c - (Ie || 0), s.f += d - (Ve || 0)) : s = {
|
|
1360
1382
|
a: 1,
|
|
1361
1383
|
b: 0,
|
|
1362
1384
|
c: 0,
|
|
1363
1385
|
d: 1,
|
|
1364
1386
|
e: c,
|
|
1365
|
-
f:
|
|
1387
|
+
f: d
|
|
1366
1388
|
};
|
|
1367
|
-
var
|
|
1368
|
-
|
|
1389
|
+
var g = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
1390
|
+
p(m, "webkitTransform", g), p(m, "mozTransform", g), p(m, "msTransform", g), p(m, "transform", g), Ie = c, Ve = d, Y = r;
|
|
1369
1391
|
}
|
|
1370
1392
|
t.cancelable && t.preventDefault();
|
|
1371
1393
|
}
|
|
1372
1394
|
},
|
|
1373
1395
|
_appendGhost: function() {
|
|
1374
1396
|
if (!m) {
|
|
1375
|
-
var t = this.options.fallbackOnBody ? document.body : x, e = T(
|
|
1376
|
-
if (
|
|
1377
|
-
for (
|
|
1378
|
-
|
|
1379
|
-
|
|
1397
|
+
var t = this.options.fallbackOnBody ? document.body : x, e = T(u, !0, te, !0, t), i = this.options;
|
|
1398
|
+
if (te) {
|
|
1399
|
+
for (O = t; p(O, "position") === "static" && p(O, "transform") === "none" && O !== document; )
|
|
1400
|
+
O = O.parentNode;
|
|
1401
|
+
O !== document.body && O !== document.documentElement ? (O === document && (O = G()), e.top += O.scrollTop, e.left += O.scrollLeft) : O = G(), Re = bi(O);
|
|
1380
1402
|
}
|
|
1381
|
-
m =
|
|
1403
|
+
m = u.cloneNode(!0), R(m, i.ghostClass, !1), R(m, i.fallbackClass, !0), R(m, i.dragClass, !0), p(m, "transition", ""), p(m, "transform", ""), p(m, "box-sizing", "border-box"), p(m, "margin", 0), p(m, "top", e.top), p(m, "left", e.left), p(m, "width", e.width), p(m, "height", e.height), p(m, "opacity", "0.8"), p(m, "position", te ? "absolute" : "fixed"), p(m, "zIndex", "100000"), p(m, "pointerEvents", "none"), f.ghost = m, t.appendChild(m), p(m, "transform-origin", wi / parseInt(m.style.width) * 100 + "% " + Ei / parseInt(m.style.height) * 100 + "%");
|
|
1382
1404
|
}
|
|
1383
1405
|
},
|
|
1384
1406
|
_onDragStart: function(t, e) {
|
|
1385
1407
|
var i = this, n = t.dataTransfer, r = i.options;
|
|
1386
1408
|
if (k("dragStart", this, {
|
|
1387
1409
|
evt: t
|
|
1388
|
-
}),
|
|
1410
|
+
}), f.eventCanceled) {
|
|
1389
1411
|
this._onDrop();
|
|
1390
1412
|
return;
|
|
1391
1413
|
}
|
|
1392
|
-
k("setupClone", this),
|
|
1393
|
-
k("clone", i), !
|
|
1414
|
+
k("setupClone", this), f.eventCanceled || (S = Ri(u), S.removeAttribute("id"), S.draggable = !1, S.style["will-change"] = "", this._hideClone(), R(S, this.options.chosenClass, !1), f.clone = S), i.cloneId = se(function() {
|
|
1415
|
+
k("clone", i), !f.eventCanceled && (i.options.removeCloneOnHide || x.insertBefore(S, u), i._hideClone(), L({
|
|
1394
1416
|
sortable: i,
|
|
1395
1417
|
name: "clone"
|
|
1396
1418
|
}));
|
|
1397
|
-
}), !e &&
|
|
1419
|
+
}), !e && R(u, r.dragClass, !0), e ? (ue = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (b(document, "mouseup", i._onDrop), b(document, "touchend", i._onDrop), b(document, "touchcancel", i._onDrop), n && (n.effectAllowed = "move", r.setData && r.setData.call(i, n, u)), w(document, "drop", i), p(u, "transform", "translateZ(0)")), xt = !0, i._dragStartId = se(i._dragStarted.bind(i, e, t)), w(document, "selectstart", i), Nt = !0, Bt && p(document.body, "user-select", "none");
|
|
1398
1420
|
},
|
|
1399
1421
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1400
1422
|
_onDragOver: function(t) {
|
|
1401
|
-
var e = this.el, i = t.target, n, r, s, l = this.options, a = l.group,
|
|
1402
|
-
if (
|
|
1423
|
+
var e = this.el, i = t.target, n, r, s, l = this.options, a = l.group, h = f.active, c = Jt === a, d = l.sort, g = D || h, v, y = this, E = !1;
|
|
1424
|
+
if (Xe)
|
|
1403
1425
|
return;
|
|
1404
|
-
function
|
|
1426
|
+
function z(Mt, io) {
|
|
1405
1427
|
k(Mt, y, K({
|
|
1406
1428
|
evt: t,
|
|
1407
1429
|
isOwner: c,
|
|
@@ -1409,148 +1431,148 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1409
1431
|
revert: s,
|
|
1410
1432
|
dragRect: n,
|
|
1411
1433
|
targetRect: r,
|
|
1412
|
-
canSort:
|
|
1413
|
-
fromSortable:
|
|
1434
|
+
canSort: d,
|
|
1435
|
+
fromSortable: g,
|
|
1414
1436
|
target: i,
|
|
1415
|
-
completed:
|
|
1416
|
-
onMove: function(
|
|
1417
|
-
return
|
|
1437
|
+
completed: P,
|
|
1438
|
+
onMove: function(ni, oo) {
|
|
1439
|
+
return ee(x, e, u, n, ni, T(ni), t, oo);
|
|
1418
1440
|
},
|
|
1419
|
-
changed:
|
|
1420
|
-
},
|
|
1441
|
+
changed: X
|
|
1442
|
+
}, io));
|
|
1421
1443
|
}
|
|
1422
1444
|
function J() {
|
|
1423
|
-
|
|
1445
|
+
z("dragOverAnimationCapture"), y.captureAnimationState(), y !== g && g.captureAnimationState();
|
|
1424
1446
|
}
|
|
1425
|
-
function
|
|
1426
|
-
return
|
|
1447
|
+
function P(Mt) {
|
|
1448
|
+
return z("dragOverCompleted", {
|
|
1427
1449
|
insertion: Mt
|
|
1428
|
-
}), Mt && (c ?
|
|
1429
|
-
|
|
1430
|
-
}), y !==
|
|
1450
|
+
}), Mt && (c ? h._hideClone() : h._showClone(y), y !== g && (R(u, D ? D.options.ghostClass : h.options.ghostClass, !1), R(u, l.ghostClass, !0)), D !== y && y !== f.active ? D = y : y === f.active && D && (D = null), g === y && (y._ignoreWhileAnimating = i), y.animateAll(function() {
|
|
1451
|
+
z("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
1452
|
+
}), y !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (i === u && !u.animated || i === e && !i.animated) && (_t = null), !l.dragoverBubble && !t.rootEl && i !== document && (u.parentNode[U]._isOutsideThisEl(t.target), !Mt && mt(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), E = !0;
|
|
1431
1453
|
}
|
|
1432
|
-
function
|
|
1433
|
-
|
|
1454
|
+
function X() {
|
|
1455
|
+
B = Z(u), st = Z(u, l.draggable), L({
|
|
1434
1456
|
sortable: y,
|
|
1435
1457
|
name: "change",
|
|
1436
1458
|
toEl: e,
|
|
1437
|
-
newIndex:
|
|
1459
|
+
newIndex: B,
|
|
1438
1460
|
newDraggableIndex: st,
|
|
1439
1461
|
originalEvent: t
|
|
1440
1462
|
});
|
|
1441
1463
|
}
|
|
1442
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i =
|
|
1443
|
-
return
|
|
1444
|
-
if (
|
|
1445
|
-
return
|
|
1446
|
-
if (ue = !1,
|
|
1447
|
-
if (v = this._getDirection(t, i) === "vertical", n = T(
|
|
1448
|
-
return
|
|
1464
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = j(i, l.draggable, e, !0), z("dragOver"), f.eventCanceled)
|
|
1465
|
+
return E;
|
|
1466
|
+
if (u.contains(t.target) || i.animated && i.animatingX && i.animatingY || y._ignoreWhileAnimating === i)
|
|
1467
|
+
return P(!1);
|
|
1468
|
+
if (ue = !1, h && !l.disabled && (c ? d || (s = A !== x) : D === this || (this.lastPutMode = Jt.checkPull(this, h, u, t)) && a.checkPut(this, h, u, t))) {
|
|
1469
|
+
if (v = this._getDirection(t, i) === "vertical", n = T(u), z("dragOverValid"), f.eventCanceled)
|
|
1470
|
+
return E;
|
|
1449
1471
|
if (s)
|
|
1450
|
-
return
|
|
1451
|
-
var I =
|
|
1452
|
-
if (!I ||
|
|
1453
|
-
if (I ===
|
|
1454
|
-
return
|
|
1455
|
-
if (I && e === t.target && (i = I), i && (r = T(i)),
|
|
1456
|
-
return J(), I && I.nextSibling ? e.insertBefore(
|
|
1457
|
-
} else if (I &&
|
|
1472
|
+
return A = x, J(), this._hideClone(), z("revert"), f.eventCanceled || (vt ? x.insertBefore(u, vt) : x.appendChild(u)), P(!0);
|
|
1473
|
+
var I = ti(e, l.draggable);
|
|
1474
|
+
if (!I || Ko(t, v, this) && !I.animated) {
|
|
1475
|
+
if (I === u)
|
|
1476
|
+
return P(!1);
|
|
1477
|
+
if (I && e === t.target && (i = I), i && (r = T(i)), ee(x, e, u, n, i, r, t, !!i) !== !1)
|
|
1478
|
+
return J(), I && I.nextSibling ? e.insertBefore(u, I.nextSibling) : e.appendChild(u), A = e, X(), P(!0);
|
|
1479
|
+
} else if (I && Go(t, v, this)) {
|
|
1458
1480
|
var ut = Tt(e, 0, l, !0);
|
|
1459
|
-
if (ut ===
|
|
1460
|
-
return
|
|
1461
|
-
if (i = ut, r = T(i),
|
|
1462
|
-
return J(), e.insertBefore(
|
|
1481
|
+
if (ut === u)
|
|
1482
|
+
return P(!1);
|
|
1483
|
+
if (i = ut, r = T(i), ee(x, e, u, n, i, r, t, !1) !== !1)
|
|
1484
|
+
return J(), e.insertBefore(u, ut), A = e, X(), P(!0);
|
|
1463
1485
|
} else if (i.parentNode === e) {
|
|
1464
1486
|
r = T(i);
|
|
1465
|
-
var W = 0,
|
|
1466
|
-
|
|
1487
|
+
var W = 0, ct, Dt = u.parentNode !== e, V = !Xo(u.animated && u.toRect || n, i.animated && i.toRect || r, v), Ot = v ? "top" : "left", nt = vi(i, "top", "top") || vi(u, "top", "top"), Pt = nt ? nt.scrollTop : void 0;
|
|
1488
|
+
_t !== i && (ct = r[Ot], zt = !1, Qt = !V && l.invertSwap || Dt), W = Jo(t, i, r, v, V ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Qt, _t === i);
|
|
1467
1489
|
var Q;
|
|
1468
1490
|
if (W !== 0) {
|
|
1469
|
-
var
|
|
1491
|
+
var pt = Z(u);
|
|
1470
1492
|
do
|
|
1471
|
-
|
|
1472
|
-
while (Q && (
|
|
1493
|
+
pt -= W, Q = A.children[pt];
|
|
1494
|
+
while (Q && (p(Q, "display") === "none" || Q === m));
|
|
1473
1495
|
}
|
|
1474
1496
|
if (W === 0 || Q === i)
|
|
1475
|
-
return
|
|
1476
|
-
|
|
1497
|
+
return P(!1);
|
|
1498
|
+
_t = i, Ft = W;
|
|
1477
1499
|
var Ht = i.nextElementSibling, rt = !1;
|
|
1478
1500
|
rt = W === 1;
|
|
1479
|
-
var
|
|
1480
|
-
if (
|
|
1481
|
-
return (
|
|
1501
|
+
var Kt = ee(x, e, u, n, i, r, t, rt);
|
|
1502
|
+
if (Kt !== !1)
|
|
1503
|
+
return (Kt === 1 || Kt === -1) && (rt = Kt === 1), Xe = !0, setTimeout(jo, 30), J(), rt && !Ht ? e.appendChild(u) : i.parentNode.insertBefore(u, rt ? Ht : i), nt && Vi(nt, 0, Pt - nt.scrollTop), A = u.parentNode, ct !== void 0 && !Qt && (re = Math.abs(ct - T(i)[Ot])), X(), P(!0);
|
|
1482
1504
|
}
|
|
1483
|
-
if (e.contains(
|
|
1484
|
-
return
|
|
1505
|
+
if (e.contains(u))
|
|
1506
|
+
return P(!1);
|
|
1485
1507
|
}
|
|
1486
1508
|
return !1;
|
|
1487
1509
|
},
|
|
1488
1510
|
_ignoreWhileAnimating: null,
|
|
1489
1511
|
_offMoveEvents: function() {
|
|
1490
|
-
|
|
1512
|
+
b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover", mt), b(document, "mousemove", mt), b(document, "touchmove", mt);
|
|
1491
1513
|
},
|
|
1492
1514
|
_offUpEvents: function() {
|
|
1493
1515
|
var t = this.el.ownerDocument;
|
|
1494
|
-
|
|
1516
|
+
b(t, "mouseup", this._onDrop), b(t, "touchend", this._onDrop), b(t, "pointerup", this._onDrop), b(t, "touchcancel", this._onDrop), b(document, "selectstart", this);
|
|
1495
1517
|
},
|
|
1496
1518
|
_onDrop: function(t) {
|
|
1497
1519
|
var e = this.el, i = this.options;
|
|
1498
|
-
if (
|
|
1520
|
+
if (B = Z(u), st = Z(u, i.draggable), k("drop", this, {
|
|
1499
1521
|
evt: t
|
|
1500
|
-
}),
|
|
1522
|
+
}), A = u && u.parentNode, B = Z(u), st = Z(u, i.draggable), f.eventCanceled) {
|
|
1501
1523
|
this._nulling();
|
|
1502
1524
|
return;
|
|
1503
1525
|
}
|
|
1504
|
-
|
|
1526
|
+
xt = !1, Qt = !1, zt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ye(this.cloneId), Ye(this._dragStartId), this.nativeDraggable && (b(document, "drop", this), b(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Bt && p(document.body, "user-select", ""), p(u, "transform", ""), t && (Nt && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (x === A || D && D.lastPutMode !== "clone") && S && S.parentNode && S.parentNode.removeChild(S), u && (this.nativeDraggable && b(u, "dragend", this), Be(u), u.style["will-change"] = "", Nt && !xt && R(u, D ? D.options.ghostClass : this.options.ghostClass, !1), R(u, this.options.chosenClass, !1), L({
|
|
1505
1527
|
sortable: this,
|
|
1506
1528
|
name: "unchoose",
|
|
1507
|
-
toEl:
|
|
1529
|
+
toEl: A,
|
|
1508
1530
|
newIndex: null,
|
|
1509
1531
|
newDraggableIndex: null,
|
|
1510
1532
|
originalEvent: t
|
|
1511
|
-
}), x !==
|
|
1512
|
-
rootEl:
|
|
1533
|
+
}), x !== A ? (B >= 0 && (L({
|
|
1534
|
+
rootEl: A,
|
|
1513
1535
|
name: "add",
|
|
1514
|
-
toEl:
|
|
1536
|
+
toEl: A,
|
|
1515
1537
|
fromEl: x,
|
|
1516
1538
|
originalEvent: t
|
|
1517
|
-
}),
|
|
1539
|
+
}), L({
|
|
1518
1540
|
sortable: this,
|
|
1519
1541
|
name: "remove",
|
|
1520
|
-
toEl:
|
|
1542
|
+
toEl: A,
|
|
1521
1543
|
originalEvent: t
|
|
1522
|
-
}),
|
|
1523
|
-
rootEl:
|
|
1544
|
+
}), L({
|
|
1545
|
+
rootEl: A,
|
|
1524
1546
|
name: "sort",
|
|
1525
|
-
toEl:
|
|
1547
|
+
toEl: A,
|
|
1526
1548
|
fromEl: x,
|
|
1527
1549
|
originalEvent: t
|
|
1528
|
-
}),
|
|
1550
|
+
}), L({
|
|
1529
1551
|
sortable: this,
|
|
1530
1552
|
name: "sort",
|
|
1531
|
-
toEl:
|
|
1553
|
+
toEl: A,
|
|
1532
1554
|
originalEvent: t
|
|
1533
|
-
})), D && D.save()) :
|
|
1555
|
+
})), D && D.save()) : B !== St && B >= 0 && (L({
|
|
1534
1556
|
sortable: this,
|
|
1535
1557
|
name: "update",
|
|
1536
|
-
toEl:
|
|
1558
|
+
toEl: A,
|
|
1537
1559
|
originalEvent: t
|
|
1538
|
-
}),
|
|
1560
|
+
}), L({
|
|
1539
1561
|
sortable: this,
|
|
1540
1562
|
name: "sort",
|
|
1541
|
-
toEl:
|
|
1563
|
+
toEl: A,
|
|
1542
1564
|
originalEvent: t
|
|
1543
|
-
})),
|
|
1565
|
+
})), f.active && ((B == null || B === -1) && (B = St, st = Zt), L({
|
|
1544
1566
|
sortable: this,
|
|
1545
1567
|
name: "end",
|
|
1546
|
-
toEl:
|
|
1568
|
+
toEl: A,
|
|
1547
1569
|
originalEvent: t
|
|
1548
1570
|
}), this.save()))), this._nulling();
|
|
1549
1571
|
},
|
|
1550
1572
|
_nulling: function() {
|
|
1551
|
-
k("nulling", this), x =
|
|
1573
|
+
k("nulling", this), x = u = A = m = vt = S = ne = lt = gt = Y = Nt = B = st = St = Zt = _t = Ft = D = Jt = f.dragged = f.ghost = f.clone = f.active = null, pe.forEach(function(t) {
|
|
1552
1574
|
t.checked = !0;
|
|
1553
|
-
}),
|
|
1575
|
+
}), pe.length = Ie = Ve = 0;
|
|
1554
1576
|
},
|
|
1555
1577
|
handleEvent: function(t) {
|
|
1556
1578
|
switch (t.type) {
|
|
@@ -1560,7 +1582,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1560
1582
|
break;
|
|
1561
1583
|
case "dragenter":
|
|
1562
1584
|
case "dragover":
|
|
1563
|
-
|
|
1585
|
+
u && (this._onDragOver(t), Wo(t));
|
|
1564
1586
|
break;
|
|
1565
1587
|
case "selectstart":
|
|
1566
1588
|
t.preventDefault();
|
|
@@ -1573,7 +1595,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1573
1595
|
*/
|
|
1574
1596
|
toArray: function() {
|
|
1575
1597
|
for (var t = [], e, i = this.el.children, n = 0, r = i.length, s = this.options; n < r; n++)
|
|
1576
|
-
e = i[n],
|
|
1598
|
+
e = i[n], j(e, s.draggable, this.el, !1) && t.push(e.getAttribute(s.dataIdAttr) || tn(e));
|
|
1577
1599
|
return t;
|
|
1578
1600
|
},
|
|
1579
1601
|
/**
|
|
@@ -1584,7 +1606,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1584
1606
|
var i = {}, n = this.el;
|
|
1585
1607
|
this.toArray().forEach(function(r, s) {
|
|
1586
1608
|
var l = n.children[s];
|
|
1587
|
-
|
|
1609
|
+
j(l, this.options.draggable, n, !1) && (i[r] = l);
|
|
1588
1610
|
}, this), e && this.captureAnimationState(), t.forEach(function(r) {
|
|
1589
1611
|
i[r] && (n.removeChild(i[r]), n.appendChild(i[r]));
|
|
1590
1612
|
}), e && this.animateAll();
|
|
@@ -1603,7 +1625,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1603
1625
|
* @returns {HTMLElement|null}
|
|
1604
1626
|
*/
|
|
1605
1627
|
closest: function(t, e) {
|
|
1606
|
-
return
|
|
1628
|
+
return j(t, e || this.options.draggable, this.el, !1);
|
|
1607
1629
|
},
|
|
1608
1630
|
/**
|
|
1609
1631
|
* Set/get option
|
|
@@ -1615,8 +1637,8 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1615
1637
|
var i = this.options;
|
|
1616
1638
|
if (e === void 0)
|
|
1617
1639
|
return i[t];
|
|
1618
|
-
var n =
|
|
1619
|
-
typeof n < "u" ? i[t] = n : i[t] = e, t === "group" &&
|
|
1640
|
+
var n = Gt.modifyOption(this, t, e);
|
|
1641
|
+
typeof n < "u" ? i[t] = n : i[t] = e, t === "group" && Zi(i);
|
|
1620
1642
|
},
|
|
1621
1643
|
/**
|
|
1622
1644
|
* Destroy
|
|
@@ -1624,15 +1646,15 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1624
1646
|
destroy: function() {
|
|
1625
1647
|
k("destroy", this);
|
|
1626
1648
|
var t = this.el;
|
|
1627
|
-
t[U] = null,
|
|
1649
|
+
t[U] = null, b(t, "mousedown", this._onTapStart), b(t, "touchstart", this._onTapStart), b(t, "pointerdown", this._onTapStart), this.nativeDraggable && (b(t, "dragover", this), b(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
|
|
1628
1650
|
e.removeAttribute("draggable");
|
|
1629
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1651
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ce.splice(ce.indexOf(this.el), 1), this.el = t = null;
|
|
1630
1652
|
},
|
|
1631
1653
|
_hideClone: function() {
|
|
1632
1654
|
if (!lt) {
|
|
1633
|
-
if (k("hideClone", this),
|
|
1655
|
+
if (k("hideClone", this), f.eventCanceled)
|
|
1634
1656
|
return;
|
|
1635
|
-
|
|
1657
|
+
p(S, "display", "none"), this.options.removeCloneOnHide && S.parentNode && S.parentNode.removeChild(S), lt = !0;
|
|
1636
1658
|
}
|
|
1637
1659
|
},
|
|
1638
1660
|
_showClone: function(t) {
|
|
@@ -1641,110 +1663,110 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1641
1663
|
return;
|
|
1642
1664
|
}
|
|
1643
1665
|
if (lt) {
|
|
1644
|
-
if (k("showClone", this),
|
|
1666
|
+
if (k("showClone", this), f.eventCanceled)
|
|
1645
1667
|
return;
|
|
1646
|
-
|
|
1668
|
+
u.parentNode == x && !this.options.group.revertClone ? x.insertBefore(S, u) : vt ? x.insertBefore(S, vt) : x.appendChild(S), this.options.group.revertClone && this.animate(u, S), p(S, "display", ""), lt = !1;
|
|
1647
1669
|
}
|
|
1648
1670
|
}
|
|
1649
1671
|
};
|
|
1650
|
-
function
|
|
1672
|
+
function Wo(o) {
|
|
1651
1673
|
o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
|
|
1652
1674
|
}
|
|
1653
|
-
function
|
|
1654
|
-
var a,
|
|
1655
|
-
return window.CustomEvent && !ot && !
|
|
1675
|
+
function ee(o, t, e, i, n, r, s, l) {
|
|
1676
|
+
var a, h = o[U], c = h.options.onMove, d;
|
|
1677
|
+
return window.CustomEvent && !ot && !jt ? a = new CustomEvent("move", {
|
|
1656
1678
|
bubbles: !0,
|
|
1657
1679
|
cancelable: !0
|
|
1658
|
-
}) : (a = document.createEvent("Event"), a.initEvent("move", !0, !0)), a.to = t, a.from = o, a.dragged = e, a.draggedRect = i, a.related = n || t, a.relatedRect = r || T(t), a.willInsertAfter = l, a.originalEvent = s, o.dispatchEvent(a), c && (
|
|
1680
|
+
}) : (a = document.createEvent("Event"), a.initEvent("move", !0, !0)), a.to = t, a.from = o, a.dragged = e, a.draggedRect = i, a.related = n || t, a.relatedRect = r || T(t), a.willInsertAfter = l, a.originalEvent = s, o.dispatchEvent(a), c && (d = c.call(h, a, s)), d;
|
|
1659
1681
|
}
|
|
1660
|
-
function
|
|
1682
|
+
function Be(o) {
|
|
1661
1683
|
o.draggable = !1;
|
|
1662
1684
|
}
|
|
1663
1685
|
function jo() {
|
|
1664
|
-
|
|
1686
|
+
Xe = !1;
|
|
1665
1687
|
}
|
|
1666
|
-
function
|
|
1688
|
+
function Go(o, t, e) {
|
|
1667
1689
|
var i = T(Tt(e.el, 0, e.options, !0)), n = 10;
|
|
1668
1690
|
return t ? o.clientX < i.left - n || o.clientY < i.top && o.clientX < i.right : o.clientY < i.top - n || o.clientY < i.bottom && o.clientX < i.left;
|
|
1669
1691
|
}
|
|
1670
|
-
function
|
|
1671
|
-
var i = T(
|
|
1692
|
+
function Ko(o, t, e) {
|
|
1693
|
+
var i = T(ti(e.el, e.options.draggable)), n = 10;
|
|
1672
1694
|
return t ? o.clientX > i.right + n || o.clientX <= i.right && o.clientY > i.bottom && o.clientX >= i.left : o.clientX > i.right && o.clientY > i.top || o.clientX <= i.right && o.clientY > i.bottom + n;
|
|
1673
1695
|
}
|
|
1674
|
-
function
|
|
1675
|
-
var a = i ? o.clientY : o.clientX,
|
|
1696
|
+
function Jo(o, t, e, i, n, r, s, l) {
|
|
1697
|
+
var a = i ? o.clientY : o.clientX, h = i ? e.height : e.width, c = i ? e.top : e.left, d = i ? e.bottom : e.right, g = !1;
|
|
1676
1698
|
if (!s) {
|
|
1677
|
-
if (l &&
|
|
1678
|
-
if (!
|
|
1679
|
-
|
|
1680
|
-
else if (
|
|
1681
|
-
return -
|
|
1682
|
-
} else if (a > c +
|
|
1683
|
-
return
|
|
1699
|
+
if (l && re < h * n) {
|
|
1700
|
+
if (!zt && (Ft === 1 ? a > c + h * r / 2 : a < d - h * r / 2) && (zt = !0), zt)
|
|
1701
|
+
g = !0;
|
|
1702
|
+
else if (Ft === 1 ? a < c + re : a > d - re)
|
|
1703
|
+
return -Ft;
|
|
1704
|
+
} else if (a > c + h * (1 - n) / 2 && a < d - h * (1 - n) / 2)
|
|
1705
|
+
return Qo(t);
|
|
1684
1706
|
}
|
|
1685
|
-
return
|
|
1707
|
+
return g = g || s, g && (a < c + h * r / 2 || a > d - h * r / 2) ? a > c + h / 2 ? 1 : -1 : 0;
|
|
1686
1708
|
}
|
|
1687
|
-
function
|
|
1688
|
-
return
|
|
1709
|
+
function Qo(o) {
|
|
1710
|
+
return Z(u) < Z(o) ? 1 : -1;
|
|
1689
1711
|
}
|
|
1690
|
-
function
|
|
1712
|
+
function tn(o) {
|
|
1691
1713
|
for (var t = o.tagName + o.className + o.src + o.href + o.textContent, e = t.length, i = 0; e--; )
|
|
1692
1714
|
i += t.charCodeAt(e);
|
|
1693
1715
|
return i.toString(36);
|
|
1694
1716
|
}
|
|
1695
|
-
function
|
|
1696
|
-
|
|
1717
|
+
function en(o) {
|
|
1718
|
+
pe.length = 0;
|
|
1697
1719
|
for (var t = o.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1698
1720
|
var i = t[e];
|
|
1699
|
-
i.checked &&
|
|
1721
|
+
i.checked && pe.push(i);
|
|
1700
1722
|
}
|
|
1701
1723
|
}
|
|
1702
|
-
function
|
|
1724
|
+
function se(o) {
|
|
1703
1725
|
return setTimeout(o, 0);
|
|
1704
1726
|
}
|
|
1705
|
-
function
|
|
1727
|
+
function Ye(o) {
|
|
1706
1728
|
return clearTimeout(o);
|
|
1707
1729
|
}
|
|
1708
|
-
|
|
1709
|
-
(
|
|
1730
|
+
Oe && w(document, "touchmove", function(o) {
|
|
1731
|
+
(f.active || xt) && o.cancelable && o.preventDefault();
|
|
1710
1732
|
});
|
|
1711
|
-
|
|
1733
|
+
f.utils = {
|
|
1712
1734
|
on: w,
|
|
1713
|
-
off:
|
|
1714
|
-
css:
|
|
1715
|
-
find:
|
|
1735
|
+
off: b,
|
|
1736
|
+
css: p,
|
|
1737
|
+
find: ki,
|
|
1716
1738
|
is: function(t, e) {
|
|
1717
|
-
return !!
|
|
1739
|
+
return !!j(t, e, t, !1);
|
|
1718
1740
|
},
|
|
1719
|
-
extend:
|
|
1720
|
-
throttle:
|
|
1721
|
-
closest:
|
|
1722
|
-
toggleClass:
|
|
1723
|
-
clone:
|
|
1724
|
-
index:
|
|
1725
|
-
nextTick:
|
|
1726
|
-
cancelNextTick:
|
|
1727
|
-
detectDirection:
|
|
1741
|
+
extend: Io,
|
|
1742
|
+
throttle: Ii,
|
|
1743
|
+
closest: j,
|
|
1744
|
+
toggleClass: R,
|
|
1745
|
+
clone: Ri,
|
|
1746
|
+
index: Z,
|
|
1747
|
+
nextTick: se,
|
|
1748
|
+
cancelNextTick: Ye,
|
|
1749
|
+
detectDirection: Ui,
|
|
1728
1750
|
getChild: Tt
|
|
1729
1751
|
};
|
|
1730
|
-
|
|
1752
|
+
f.get = function(o) {
|
|
1731
1753
|
return o[U];
|
|
1732
1754
|
};
|
|
1733
|
-
|
|
1755
|
+
f.mount = function() {
|
|
1734
1756
|
for (var o = arguments.length, t = new Array(o), e = 0; e < o; e++)
|
|
1735
1757
|
t[e] = arguments[e];
|
|
1736
1758
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(i) {
|
|
1737
1759
|
if (!i.prototype || !i.prototype.constructor)
|
|
1738
1760
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));
|
|
1739
|
-
i.utils && (
|
|
1761
|
+
i.utils && (f.utils = K(K({}, f.utils), i.utils)), Gt.mount(i);
|
|
1740
1762
|
});
|
|
1741
1763
|
};
|
|
1742
|
-
|
|
1743
|
-
return new
|
|
1764
|
+
f.create = function(o, t) {
|
|
1765
|
+
return new f(o, t);
|
|
1744
1766
|
};
|
|
1745
|
-
|
|
1746
|
-
var
|
|
1747
|
-
function
|
|
1767
|
+
f.version = Lo;
|
|
1768
|
+
var C = [], kt, qe, We = !1, Ue, Ze, fe, It;
|
|
1769
|
+
function on() {
|
|
1748
1770
|
function o() {
|
|
1749
1771
|
this.defaults = {
|
|
1750
1772
|
scroll: !0,
|
|
@@ -1766,29 +1788,29 @@ function Qo() {
|
|
|
1766
1788
|
!this.options.dragOverBubble && !i.rootEl && this._handleAutoScroll(i);
|
|
1767
1789
|
},
|
|
1768
1790
|
drop: function() {
|
|
1769
|
-
this.sortable.nativeDraggable ?
|
|
1791
|
+
this.sortable.nativeDraggable ? b(document, "dragover", this._handleAutoScroll) : (b(document, "pointermove", this._handleFallbackAutoScroll), b(document, "touchmove", this._handleFallbackAutoScroll), b(document, "mousemove", this._handleFallbackAutoScroll)), $i(), ae(), Vo();
|
|
1770
1792
|
},
|
|
1771
1793
|
nulling: function() {
|
|
1772
|
-
|
|
1794
|
+
fe = qe = kt = We = It = Ue = Ze = null, C.length = 0;
|
|
1773
1795
|
},
|
|
1774
1796
|
_handleFallbackAutoScroll: function(e) {
|
|
1775
1797
|
this._handleAutoScroll(e, !0);
|
|
1776
1798
|
},
|
|
1777
1799
|
_handleAutoScroll: function(e, i) {
|
|
1778
1800
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, s = (e.touches ? e.touches[0] : e).clientY, l = document.elementFromPoint(r, s);
|
|
1779
|
-
if (
|
|
1780
|
-
|
|
1781
|
-
var a =
|
|
1782
|
-
|
|
1783
|
-
var
|
|
1784
|
-
|
|
1785
|
-
}, 10),
|
|
1801
|
+
if (fe = e, i || this.options.forceAutoScrollFallback || jt || ot || Bt) {
|
|
1802
|
+
Fe(e, this.options, l, i);
|
|
1803
|
+
var a = ht(l, !0);
|
|
1804
|
+
We && (!It || r !== Ue || s !== Ze) && (It && $i(), It = setInterval(function() {
|
|
1805
|
+
var h = ht(document.elementFromPoint(r, s), !0);
|
|
1806
|
+
h !== a && (a = h, ae()), Fe(e, n.options, h, i);
|
|
1807
|
+
}, 10), Ue = r, Ze = s);
|
|
1786
1808
|
} else {
|
|
1787
|
-
if (!this.options.bubbleScroll ||
|
|
1788
|
-
|
|
1809
|
+
if (!this.options.bubbleScroll || ht(l, !0) === G()) {
|
|
1810
|
+
ae();
|
|
1789
1811
|
return;
|
|
1790
1812
|
}
|
|
1791
|
-
|
|
1813
|
+
Fe(e, this.options, ht(l, !1), !1);
|
|
1792
1814
|
}
|
|
1793
1815
|
}
|
|
1794
1816
|
}, it(o, {
|
|
@@ -1796,51 +1818,51 @@ function Qo() {
|
|
|
1796
1818
|
initializeByDefault: !0
|
|
1797
1819
|
});
|
|
1798
1820
|
}
|
|
1799
|
-
function
|
|
1800
|
-
|
|
1821
|
+
function ae() {
|
|
1822
|
+
C.forEach(function(o) {
|
|
1801
1823
|
clearInterval(o.pid);
|
|
1802
|
-
}),
|
|
1824
|
+
}), C = [];
|
|
1803
1825
|
}
|
|
1804
|
-
function
|
|
1805
|
-
clearInterval(
|
|
1826
|
+
function $i() {
|
|
1827
|
+
clearInterval(It);
|
|
1806
1828
|
}
|
|
1807
|
-
var
|
|
1829
|
+
var Fe = Ii(function(o, t, e, i) {
|
|
1808
1830
|
if (t.scroll) {
|
|
1809
|
-
var n = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, s = t.scrollSensitivity, l = t.scrollSpeed, a = G(),
|
|
1810
|
-
|
|
1811
|
-
var
|
|
1831
|
+
var n = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, s = t.scrollSensitivity, l = t.scrollSpeed, a = G(), h = !1, c;
|
|
1832
|
+
qe !== e && (qe = e, ae(), kt = t.scroll, c = t.scrollFn, kt === !0 && (kt = ht(e, !0)));
|
|
1833
|
+
var d = 0, g = kt;
|
|
1812
1834
|
do {
|
|
1813
|
-
var v =
|
|
1814
|
-
v === a ? (ut =
|
|
1815
|
-
var
|
|
1816
|
-
if (!
|
|
1817
|
-
for (var
|
|
1818
|
-
|
|
1819
|
-
(
|
|
1820
|
-
i && this.layer === 0 &&
|
|
1821
|
-
var Ht =
|
|
1822
|
-
typeof c == "function" && c.call(
|
|
1835
|
+
var v = g, y = T(v), E = y.top, z = y.bottom, J = y.left, P = y.right, X = y.width, I = y.height, ut = void 0, W = void 0, ct = v.scrollWidth, Dt = v.scrollHeight, V = p(v), Ot = v.scrollLeft, nt = v.scrollTop;
|
|
1836
|
+
v === a ? (ut = X < ct && (V.overflowX === "auto" || V.overflowX === "scroll" || V.overflowX === "visible"), W = I < Dt && (V.overflowY === "auto" || V.overflowY === "scroll" || V.overflowY === "visible")) : (ut = X < ct && (V.overflowX === "auto" || V.overflowX === "scroll"), W = I < Dt && (V.overflowY === "auto" || V.overflowY === "scroll"));
|
|
1837
|
+
var Pt = ut && (Math.abs(P - n) <= s && Ot + X < ct) - (Math.abs(J - n) <= s && !!Ot), Q = W && (Math.abs(z - r) <= s && nt + I < Dt) - (Math.abs(E - r) <= s && !!nt);
|
|
1838
|
+
if (!C[d])
|
|
1839
|
+
for (var pt = 0; pt <= d; pt++)
|
|
1840
|
+
C[pt] || (C[pt] = {});
|
|
1841
|
+
(C[d].vx != Pt || C[d].vy != Q || C[d].el !== v) && (C[d].el = v, C[d].vx = Pt, C[d].vy = Q, clearInterval(C[d].pid), (Pt != 0 || Q != 0) && (h = !0, C[d].pid = setInterval((function() {
|
|
1842
|
+
i && this.layer === 0 && f.active._onTouchMove(fe);
|
|
1843
|
+
var Ht = C[this.layer].vy ? C[this.layer].vy * l : 0, rt = C[this.layer].vx ? C[this.layer].vx * l : 0;
|
|
1844
|
+
typeof c == "function" && c.call(f.dragged.parentNode[U], rt, Ht, o, fe, C[this.layer].el) !== "continue" || Vi(C[this.layer].el, rt, Ht);
|
|
1823
1845
|
}).bind({
|
|
1824
|
-
layer:
|
|
1825
|
-
}), 24))),
|
|
1826
|
-
} while (t.bubbleScroll &&
|
|
1827
|
-
|
|
1846
|
+
layer: d
|
|
1847
|
+
}), 24))), d++;
|
|
1848
|
+
} while (t.bubbleScroll && g !== a && (g = ht(g, !1)));
|
|
1849
|
+
We = h;
|
|
1828
1850
|
}
|
|
1829
|
-
}, 30),
|
|
1851
|
+
}, 30), Xi = function(t) {
|
|
1830
1852
|
var e = t.originalEvent, i = t.putSortable, n = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, l = t.hideGhostForTarget, a = t.unhideGhostForTarget;
|
|
1831
1853
|
if (e) {
|
|
1832
|
-
var
|
|
1854
|
+
var h = i || r;
|
|
1833
1855
|
l();
|
|
1834
|
-
var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e,
|
|
1835
|
-
a(),
|
|
1856
|
+
var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, d = document.elementFromPoint(c.clientX, c.clientY);
|
|
1857
|
+
a(), h && !h.el.contains(d) && (s("spill"), this.onSpill({
|
|
1836
1858
|
dragEl: n,
|
|
1837
1859
|
putSortable: i
|
|
1838
1860
|
}));
|
|
1839
1861
|
}
|
|
1840
1862
|
};
|
|
1841
|
-
function
|
|
1863
|
+
function ei() {
|
|
1842
1864
|
}
|
|
1843
|
-
|
|
1865
|
+
ei.prototype = {
|
|
1844
1866
|
startIndex: null,
|
|
1845
1867
|
dragStart: function(t) {
|
|
1846
1868
|
var e = t.oldDraggableIndex;
|
|
@@ -1852,28 +1874,28 @@ ni.prototype = {
|
|
|
1852
1874
|
var n = Tt(this.sortable.el, this.startIndex, this.options);
|
|
1853
1875
|
n ? this.sortable.el.insertBefore(e, n) : this.sortable.el.appendChild(e), this.sortable.animateAll(), i && i.animateAll();
|
|
1854
1876
|
},
|
|
1855
|
-
drop:
|
|
1877
|
+
drop: Xi
|
|
1856
1878
|
};
|
|
1857
|
-
it(
|
|
1879
|
+
it(ei, {
|
|
1858
1880
|
pluginName: "revertOnSpill"
|
|
1859
1881
|
});
|
|
1860
|
-
function
|
|
1882
|
+
function ii() {
|
|
1861
1883
|
}
|
|
1862
|
-
|
|
1884
|
+
ii.prototype = {
|
|
1863
1885
|
onSpill: function(t) {
|
|
1864
1886
|
var e = t.dragEl, i = t.putSortable, n = i || this.sortable;
|
|
1865
1887
|
n.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), n.animateAll();
|
|
1866
1888
|
},
|
|
1867
|
-
drop:
|
|
1889
|
+
drop: Xi
|
|
1868
1890
|
};
|
|
1869
|
-
it(
|
|
1891
|
+
it(ii, {
|
|
1870
1892
|
pluginName: "removeOnSpill"
|
|
1871
1893
|
});
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
const
|
|
1894
|
+
f.mount(new on());
|
|
1895
|
+
f.mount(ii, ei);
|
|
1896
|
+
const nn = (o, t, e) => {
|
|
1875
1897
|
let i = [];
|
|
1876
|
-
o._sortable =
|
|
1898
|
+
o._sortable = f.create(o, {
|
|
1877
1899
|
handle: ".drag-handle",
|
|
1878
1900
|
filter: ".drag-handle.disabled",
|
|
1879
1901
|
swapThreshold: 0.5,
|
|
@@ -1901,17 +1923,17 @@ const tn = (o, t, e) => {
|
|
|
1901
1923
|
t.remove(l), t.insertAt(t.getLength() - n.newIndex, l), e.requestUpdate();
|
|
1902
1924
|
}
|
|
1903
1925
|
});
|
|
1904
|
-
},
|
|
1926
|
+
}, je = (o, t, e) => {
|
|
1905
1927
|
let i = [];
|
|
1906
1928
|
const n = (r, s, l) => {
|
|
1907
|
-
i = [...i, ...r.filter((
|
|
1908
|
-
const a = r.filter((
|
|
1929
|
+
i = [...i, ...r.filter((h) => h.get(s) === l)];
|
|
1930
|
+
const a = r.filter((h) => h.getLayers);
|
|
1909
1931
|
return a.length > 0 && a.forEach(
|
|
1910
|
-
(
|
|
1932
|
+
(h) => n(h.getLayers().getArray(), s, l)
|
|
1911
1933
|
), i;
|
|
1912
1934
|
};
|
|
1913
1935
|
return n(o, t, e), i;
|
|
1914
|
-
},
|
|
1936
|
+
}, rn = (o, t) => {
|
|
1915
1937
|
var e, i, n;
|
|
1916
1938
|
if (!(!o || !t))
|
|
1917
1939
|
return (
|
|
@@ -1924,17 +1946,27 @@ const tn = (o, t, e) => {
|
|
|
1924
1946
|
o.declutter_ !== void 0 ? "vector" : "raster"
|
|
1925
1947
|
)
|
|
1926
1948
|
);
|
|
1949
|
+
}, Yi = (o, t) => {
|
|
1950
|
+
const e = o.get("minZoom"), i = o.get("maxZoom");
|
|
1951
|
+
return !!(t && (e !== -1 / 0 || i !== 1 / 0));
|
|
1952
|
+
}, sn = (o, t, e) => {
|
|
1953
|
+
if (!o || !t)
|
|
1954
|
+
return !1;
|
|
1955
|
+
if (!Yi(o, e))
|
|
1956
|
+
return !0;
|
|
1957
|
+
const i = o.get("minZoom"), n = o.get("maxZoom"), r = t.getView().getZoom();
|
|
1958
|
+
return r > i && r < n;
|
|
1927
1959
|
};
|
|
1928
1960
|
/**
|
|
1929
1961
|
* @license
|
|
1930
1962
|
* Copyright 2020 Google LLC
|
|
1931
1963
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1932
1964
|
*/
|
|
1933
|
-
const
|
|
1965
|
+
const oi = Je(class extends Qe {
|
|
1934
1966
|
constructor(o) {
|
|
1935
|
-
if (super(o), o.type !==
|
|
1967
|
+
if (super(o), o.type !== yt.PROPERTY && o.type !== yt.ATTRIBUTE && o.type !== yt.BOOLEAN_ATTRIBUTE)
|
|
1936
1968
|
throw Error("The `live` directive is not allowed on child or event bindings");
|
|
1937
|
-
if (!
|
|
1969
|
+
if (!To(o))
|
|
1938
1970
|
throw Error("`live` bindings can only contain a single expression");
|
|
1939
1971
|
}
|
|
1940
1972
|
render(o) {
|
|
@@ -1944,15 +1976,15 @@ const si = ei(class extends ii {
|
|
|
1944
1976
|
if (t === q || t === $)
|
|
1945
1977
|
return t;
|
|
1946
1978
|
const e = o.element, i = o.name;
|
|
1947
|
-
if (o.type ===
|
|
1979
|
+
if (o.type === yt.PROPERTY) {
|
|
1948
1980
|
if (t === e[i])
|
|
1949
1981
|
return q;
|
|
1950
|
-
} else if (o.type ===
|
|
1982
|
+
} else if (o.type === yt.BOOLEAN_ATTRIBUTE) {
|
|
1951
1983
|
if (!!t === e.hasAttribute(i))
|
|
1952
1984
|
return q;
|
|
1953
|
-
} else if (o.type ===
|
|
1985
|
+
} else if (o.type === yt.ATTRIBUTE && e.getAttribute(i) === t + "")
|
|
1954
1986
|
return q;
|
|
1955
|
-
return
|
|
1987
|
+
return Hi(o), t;
|
|
1956
1988
|
}
|
|
1957
1989
|
});
|
|
1958
1990
|
/**
|
|
@@ -1960,45 +1992,45 @@ const si = ei(class extends ii {
|
|
|
1960
1992
|
* Copyright 2017 Google LLC
|
|
1961
1993
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1962
1994
|
*/
|
|
1963
|
-
class
|
|
1995
|
+
class Ge extends Qe {
|
|
1964
1996
|
constructor(t) {
|
|
1965
|
-
if (super(t), this.et = $, t.type !==
|
|
1997
|
+
if (super(t), this.et = $, t.type !== yt.CHILD)
|
|
1966
1998
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
1967
1999
|
}
|
|
1968
2000
|
render(t) {
|
|
1969
2001
|
if (t === $ || t == null)
|
|
1970
|
-
return this.
|
|
2002
|
+
return this.vt = void 0, this.et = t;
|
|
1971
2003
|
if (t === q)
|
|
1972
2004
|
return t;
|
|
1973
2005
|
if (typeof t != "string")
|
|
1974
2006
|
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
1975
2007
|
if (t === this.et)
|
|
1976
|
-
return this.
|
|
2008
|
+
return this.vt;
|
|
1977
2009
|
this.et = t;
|
|
1978
2010
|
const e = [t];
|
|
1979
|
-
return e.raw = e, this.
|
|
2011
|
+
return e.raw = e, this.vt = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
1980
2012
|
}
|
|
1981
2013
|
}
|
|
1982
|
-
|
|
1983
|
-
const
|
|
2014
|
+
Ge.directiveName = "unsafeHTML", Ge.resultType = 1;
|
|
2015
|
+
const an = Je(Ge);
|
|
1984
2016
|
/**
|
|
1985
2017
|
* @license
|
|
1986
2018
|
* Copyright 2021 Google LLC
|
|
1987
2019
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1988
2020
|
*/
|
|
1989
|
-
function*
|
|
2021
|
+
function* le(o, t) {
|
|
1990
2022
|
if (o !== void 0) {
|
|
1991
2023
|
let e = 0;
|
|
1992
2024
|
for (const i of o)
|
|
1993
2025
|
yield t(i, e++);
|
|
1994
2026
|
}
|
|
1995
2027
|
}
|
|
1996
|
-
var
|
|
1997
|
-
class
|
|
2028
|
+
var ge, me;
|
|
2029
|
+
class qi extends F {
|
|
1998
2030
|
constructor() {
|
|
1999
2031
|
super();
|
|
2000
|
-
M(this, fe, "");
|
|
2001
2032
|
M(this, ge, "");
|
|
2033
|
+
M(this, me, "");
|
|
2002
2034
|
this.layer = null, this.unstyled = !1, this.noShadow = !0;
|
|
2003
2035
|
}
|
|
2004
2036
|
createRenderRoot() {
|
|
@@ -2008,15 +2040,15 @@ class Zi extends z {
|
|
|
2008
2040
|
var e;
|
|
2009
2041
|
return _`
|
|
2010
2042
|
<style>
|
|
2011
|
-
${H(this,
|
|
2012
|
-
${!this.unstyled && H(this,
|
|
2043
|
+
${H(this, ge)}
|
|
2044
|
+
${!this.unstyled && H(this, me)}
|
|
2013
2045
|
</style>
|
|
2014
2046
|
<input
|
|
2015
2047
|
type="range"
|
|
2016
2048
|
min="0"
|
|
2017
2049
|
max="1"
|
|
2018
2050
|
step="0.01"
|
|
2019
|
-
value=${
|
|
2051
|
+
value=${oi((e = this.layer) == null ? void 0 : e.getOpacity())}
|
|
2020
2052
|
@input=${(i) => this.layer.setOpacity(parseFloat(i.target.value))}
|
|
2021
2053
|
/>
|
|
2022
2054
|
<button
|
|
@@ -2033,20 +2065,20 @@ class Zi extends z {
|
|
|
2033
2065
|
`;
|
|
2034
2066
|
}
|
|
2035
2067
|
}
|
|
2036
|
-
|
|
2068
|
+
ge = new WeakMap(), me = new WeakMap(), N(qi, "properties", {
|
|
2037
2069
|
layer: { attribute: !1 },
|
|
2038
2070
|
unstyled: { type: Boolean },
|
|
2039
2071
|
noShadow: { type: Boolean }
|
|
2040
2072
|
});
|
|
2041
2073
|
customElements.define(
|
|
2042
2074
|
"eox-layercontrol-layerconfig",
|
|
2043
|
-
|
|
2075
|
+
qi
|
|
2044
2076
|
);
|
|
2045
|
-
var
|
|
2046
|
-
class
|
|
2077
|
+
var ye, ve;
|
|
2078
|
+
class Wi extends F {
|
|
2047
2079
|
constructor() {
|
|
2048
2080
|
super();
|
|
2049
|
-
M(this,
|
|
2081
|
+
M(this, ye, `
|
|
2050
2082
|
.tabbed figure {
|
|
2051
2083
|
margin: 0;
|
|
2052
2084
|
}
|
|
@@ -2096,7 +2128,7 @@ class Gi extends z {
|
|
|
2096
2128
|
render() {
|
|
2097
2129
|
return _`
|
|
2098
2130
|
<style>
|
|
2099
|
-
${H(this,
|
|
2131
|
+
${H(this, ye)}
|
|
2100
2132
|
${!this.unstyled && H(this, ve)}
|
|
2101
2133
|
</style>
|
|
2102
2134
|
<div class="tabbed">
|
|
@@ -2105,7 +2137,7 @@ class Gi extends z {
|
|
|
2105
2137
|
() => _`
|
|
2106
2138
|
<nav>
|
|
2107
2139
|
<div>
|
|
2108
|
-
${
|
|
2140
|
+
${le(
|
|
2109
2141
|
this.tabs,
|
|
2110
2142
|
(e, i) => _`
|
|
2111
2143
|
<label
|
|
@@ -2118,7 +2150,7 @@ class Gi extends z {
|
|
|
2118
2150
|
)}
|
|
2119
2151
|
</div>
|
|
2120
2152
|
<div>
|
|
2121
|
-
${
|
|
2153
|
+
${le(
|
|
2122
2154
|
this.actions,
|
|
2123
2155
|
(e) => _`
|
|
2124
2156
|
<span>
|
|
@@ -2131,7 +2163,7 @@ class Gi extends z {
|
|
|
2131
2163
|
`
|
|
2132
2164
|
)}
|
|
2133
2165
|
<figure>
|
|
2134
|
-
${
|
|
2166
|
+
${le(
|
|
2135
2167
|
this.tabs,
|
|
2136
2168
|
(e, i) => _`
|
|
2137
2169
|
<div class="tab ${this.selectedTab === i && "highlighted"}">
|
|
@@ -2144,15 +2176,15 @@ class Gi extends z {
|
|
|
2144
2176
|
`;
|
|
2145
2177
|
}
|
|
2146
2178
|
}
|
|
2147
|
-
|
|
2179
|
+
ye = new WeakMap(), ve = new WeakMap(), N(Wi, "properties", {
|
|
2148
2180
|
actions: { attribute: !1 },
|
|
2149
2181
|
selectedTab: { state: !0 },
|
|
2150
2182
|
tabs: { attribute: !1 },
|
|
2151
2183
|
unstyled: { type: Boolean },
|
|
2152
2184
|
noShadow: { type: Boolean }
|
|
2153
2185
|
});
|
|
2154
|
-
customElements.define("eox-layercontrol-tabs",
|
|
2155
|
-
const
|
|
2186
|
+
customElements.define("eox-layercontrol-tabs", Wi);
|
|
2187
|
+
const ln = `
|
|
2156
2188
|
button {
|
|
2157
2189
|
/* TODO: why does this only work here and not from :root? */
|
|
2158
2190
|
--primary-color: #004170;
|
|
@@ -2241,7 +2273,7 @@ button.small {
|
|
|
2241
2273
|
padding: 12.4px;
|
|
2242
2274
|
font-size: .75rem;
|
|
2243
2275
|
}
|
|
2244
|
-
`,
|
|
2276
|
+
`, hn = `
|
|
2245
2277
|
input[type=radio] {
|
|
2246
2278
|
appearance: none;
|
|
2247
2279
|
-webkit-appearance: none;
|
|
@@ -2269,7 +2301,7 @@ input[type=radio]:checked:after {
|
|
|
2269
2301
|
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");
|
|
2270
2302
|
|
|
2271
2303
|
}
|
|
2272
|
-
`,
|
|
2304
|
+
`, ji = `
|
|
2273
2305
|
input[type=checkbox] {
|
|
2274
2306
|
appearance: none;
|
|
2275
2307
|
-webkit-appearance: none;
|
|
@@ -2292,7 +2324,7 @@ input[type=checkbox]:checked:after {
|
|
|
2292
2324
|
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");
|
|
2293
2325
|
|
|
2294
2326
|
}
|
|
2295
|
-
`,
|
|
2327
|
+
`, dn = `
|
|
2296
2328
|
input[type="range"] {
|
|
2297
2329
|
-webkit-appearance: none;
|
|
2298
2330
|
width: 90%;
|
|
@@ -2370,15 +2402,15 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
2370
2402
|
border: 0;
|
|
2371
2403
|
}
|
|
2372
2404
|
`;
|
|
2373
|
-
var
|
|
2374
|
-
class
|
|
2405
|
+
var be, we;
|
|
2406
|
+
class Gi extends F {
|
|
2375
2407
|
constructor() {
|
|
2376
2408
|
super();
|
|
2377
2409
|
/**
|
|
2378
2410
|
*
|
|
2379
2411
|
* @param {Array<string>} tools
|
|
2380
2412
|
*/
|
|
2381
|
-
|
|
2413
|
+
N(this, "_parseActions", (e) => e == null ? void 0 : e.filter(
|
|
2382
2414
|
(i) => ["remove", "sort"].filter(
|
|
2383
2415
|
(n) => {
|
|
2384
2416
|
var r;
|
|
@@ -2390,12 +2422,12 @@ class Ji extends z {
|
|
|
2390
2422
|
*
|
|
2391
2423
|
* @param {Array<string>} tools
|
|
2392
2424
|
*/
|
|
2393
|
-
|
|
2425
|
+
N(this, "_parseTools", (e) => e == null ? void 0 : e.filter((i) => {
|
|
2394
2426
|
var r;
|
|
2395
2427
|
let n = !0;
|
|
2396
2428
|
return ["remove", "sort"].includes(i) && (n = !1), i === "info" && (n = this.layer.get("description")), i === "config" && (n = (r = this.layer.style_) == null ? void 0 : r.color), n;
|
|
2397
2429
|
}));
|
|
2398
|
-
|
|
2430
|
+
N(this, "_removeButton", _`
|
|
2399
2431
|
<button
|
|
2400
2432
|
class="remove-icon icon"
|
|
2401
2433
|
@click=${() => {
|
|
@@ -2411,17 +2443,17 @@ class Ji extends z {
|
|
|
2411
2443
|
${this.unstyled ? "x" : $}
|
|
2412
2444
|
</button>
|
|
2413
2445
|
`);
|
|
2414
|
-
|
|
2446
|
+
N(this, "_sortButton", _`
|
|
2415
2447
|
<button class="sort-icon icon drag-handle">
|
|
2416
2448
|
${this.unstyled ? "sort" : $}
|
|
2417
2449
|
</button>
|
|
2418
2450
|
`);
|
|
2419
|
-
M(this,
|
|
2420
|
-
M(this,
|
|
2421
|
-
${
|
|
2422
|
-
${
|
|
2423
|
-
${
|
|
2424
|
-
${
|
|
2451
|
+
M(this, be, "");
|
|
2452
|
+
M(this, we, `
|
|
2453
|
+
${ln}
|
|
2454
|
+
${hn}
|
|
2455
|
+
${ji}
|
|
2456
|
+
${dn}
|
|
2425
2457
|
button.icon.drag-handle {
|
|
2426
2458
|
cursor: n-resize;
|
|
2427
2459
|
}
|
|
@@ -2521,8 +2553,8 @@ class Ji extends z {
|
|
|
2521
2553
|
var e, i;
|
|
2522
2554
|
return _`
|
|
2523
2555
|
<style>
|
|
2524
|
-
${H(this,
|
|
2525
|
-
${!this.unstyled && H(this,
|
|
2556
|
+
${H(this, be)}
|
|
2557
|
+
${!this.unstyled && H(this, we)}
|
|
2526
2558
|
</style>
|
|
2527
2559
|
${et(
|
|
2528
2560
|
((e = this._parseActions(this.tools)) == null ? void 0 : e.length) + ((i = this._parseTools(this.tools)) == null ? void 0 : i.length) > 0,
|
|
@@ -2559,7 +2591,7 @@ class Ji extends z {
|
|
|
2559
2591
|
.tabs=${this._parseTools(this.tools)}
|
|
2560
2592
|
.unstyled=${this.unstyled}
|
|
2561
2593
|
>
|
|
2562
|
-
${
|
|
2594
|
+
${le(
|
|
2563
2595
|
this._parseTools(this.tools),
|
|
2564
2596
|
(l) => _`
|
|
2565
2597
|
<button slot="${l}-icon" class="icon">
|
|
@@ -2569,7 +2601,7 @@ class Ji extends z {
|
|
|
2569
2601
|
)}
|
|
2570
2602
|
|
|
2571
2603
|
<div slot="info-content">
|
|
2572
|
-
${
|
|
2604
|
+
${an(this.layer.get("description"))}
|
|
2573
2605
|
</div>
|
|
2574
2606
|
<div slot="opacity-content">
|
|
2575
2607
|
<input
|
|
@@ -2577,7 +2609,7 @@ class Ji extends z {
|
|
|
2577
2609
|
min="0"
|
|
2578
2610
|
max="1"
|
|
2579
2611
|
step="0.01"
|
|
2580
|
-
value=${
|
|
2612
|
+
value=${oi((s = this.layer) == null ? void 0 : s.getOpacity())}
|
|
2581
2613
|
@input=${(l) => this.layer.setOpacity(parseFloat(l.target.value))}
|
|
2582
2614
|
/>
|
|
2583
2615
|
</div>
|
|
@@ -2601,7 +2633,7 @@ class Ji extends z {
|
|
|
2601
2633
|
`;
|
|
2602
2634
|
}
|
|
2603
2635
|
}
|
|
2604
|
-
|
|
2636
|
+
be = new WeakMap(), we = new WeakMap(), N(Gi, "properties", {
|
|
2605
2637
|
layer: { attribute: !1 },
|
|
2606
2638
|
tools: { attribute: !1 },
|
|
2607
2639
|
unstyled: { type: Boolean },
|
|
@@ -2609,18 +2641,26 @@ ye = new WeakMap(), be = new WeakMap(), R(Ji, "properties", {
|
|
|
2609
2641
|
});
|
|
2610
2642
|
customElements.define(
|
|
2611
2643
|
"eox-layercontrol-layer-tools",
|
|
2612
|
-
|
|
2644
|
+
Gi
|
|
2613
2645
|
);
|
|
2614
|
-
var Ee,
|
|
2615
|
-
class
|
|
2646
|
+
var Ee, _e;
|
|
2647
|
+
class Ki extends F {
|
|
2616
2648
|
constructor() {
|
|
2617
2649
|
super();
|
|
2650
|
+
/**
|
|
2651
|
+
* @type Boolean
|
|
2652
|
+
*/
|
|
2653
|
+
N(this, "currLayerVisibilityBasedOnZoom", !0);
|
|
2618
2654
|
M(this, Ee, "");
|
|
2619
|
-
M(this,
|
|
2620
|
-
${
|
|
2655
|
+
M(this, _e, `
|
|
2656
|
+
${ji}
|
|
2621
2657
|
eox-layercontrol-layer {
|
|
2622
2658
|
width: 100%;
|
|
2623
2659
|
}
|
|
2660
|
+
.layer.zoom-state-invisible {
|
|
2661
|
+
background: #d2e2ee;
|
|
2662
|
+
opacity: 0.3;
|
|
2663
|
+
}
|
|
2624
2664
|
.layer {
|
|
2625
2665
|
width: 100%;
|
|
2626
2666
|
align-items: center;
|
|
@@ -2654,7 +2694,29 @@ class Qi extends z {
|
|
|
2654
2694
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
|
|
2655
2695
|
}
|
|
2656
2696
|
`);
|
|
2657
|
-
this.layer = null, this.titleProperty = "title", this.tools = [], this.unstyled = !1, this.noShadow = !0;
|
|
2697
|
+
this.layer = null, this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = [], this.unstyled = !1, this.noShadow = !0;
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* Check and update layer visibility based on zoom level
|
|
2701
|
+
* and only update DOM if visibility gets updated
|
|
2702
|
+
*/
|
|
2703
|
+
updateLayerZoomVisibility() {
|
|
2704
|
+
const e = sn(
|
|
2705
|
+
this.layer,
|
|
2706
|
+
this.map,
|
|
2707
|
+
this.showLayerZoomState
|
|
2708
|
+
);
|
|
2709
|
+
let i = !1;
|
|
2710
|
+
!e && this.currLayerVisibilityBasedOnZoom ? (this.currLayerVisibilityBasedOnZoom = !1, i = !0) : e && !this.currLayerVisibilityBasedOnZoom && (this.currLayerVisibilityBasedOnZoom = !0, i = !0), i && (this.requestUpdate(), this.dispatchEvent(
|
|
2711
|
+
new CustomEvent("change:resolution", { bubbles: !0 })
|
|
2712
|
+
));
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Check and update layer zoom visibility at beginning
|
|
2716
|
+
* and register "change:resolution" ones at the beginning if `showLayerZoomState` is present
|
|
2717
|
+
*/
|
|
2718
|
+
firstUpdated() {
|
|
2719
|
+
Yi(this.layer, this.showLayerZoomState) && (this.updateLayerZoomVisibility(), this.map.getView().on("change:resolution", () => this.updateLayerZoomVisibility()));
|
|
2658
2720
|
}
|
|
2659
2721
|
createRenderRoot() {
|
|
2660
2722
|
return this.noShadow ? this : super.createRenderRoot();
|
|
@@ -2663,20 +2725,23 @@ class Qi extends z {
|
|
|
2663
2725
|
return _`
|
|
2664
2726
|
<style>
|
|
2665
2727
|
${H(this, Ee)}
|
|
2666
|
-
${!this.unstyled && H(this,
|
|
2728
|
+
${!this.unstyled && H(this, _e)}
|
|
2667
2729
|
</style>
|
|
2668
2730
|
${et(
|
|
2669
2731
|
this.layer,
|
|
2670
2732
|
() => {
|
|
2671
2733
|
var e;
|
|
2672
2734
|
return _`
|
|
2673
|
-
<div
|
|
2735
|
+
<div
|
|
2736
|
+
class="layer ${this.layer.getVisible() ? "visible" : ""}
|
|
2737
|
+
${this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible"}"
|
|
2738
|
+
>
|
|
2674
2739
|
<label
|
|
2675
2740
|
class="${this.layer.get("layerControlDisable") ? "disabled" : ""}"
|
|
2676
2741
|
>
|
|
2677
2742
|
<input
|
|
2678
2743
|
type=${this.layer.get("layerControlExclusive") ? "radio" : "checkbox"}
|
|
2679
|
-
.checked=${
|
|
2744
|
+
.checked=${oi(this.layer.getVisible())}
|
|
2680
2745
|
@click=${(i) => {
|
|
2681
2746
|
this.layer.setVisible(i.target.checked), i.target.checked && this.layer.get("layerControlExclusive") && this.parentNode.parentNode.querySelectorAll(
|
|
2682
2747
|
"li > eox-layercontrol-layer"
|
|
@@ -2707,20 +2772,22 @@ class Qi extends z {
|
|
|
2707
2772
|
`;
|
|
2708
2773
|
}
|
|
2709
2774
|
}
|
|
2710
|
-
Ee = new WeakMap(),
|
|
2775
|
+
Ee = new WeakMap(), _e = new WeakMap(), N(Ki, "properties", {
|
|
2711
2776
|
layer: { attribute: !1 },
|
|
2777
|
+
map: { attribute: !1, state: !0 },
|
|
2712
2778
|
titleProperty: { attribute: "title-property", type: String },
|
|
2779
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
2713
2780
|
tools: { attribute: !1 },
|
|
2714
2781
|
unstyled: { type: Boolean },
|
|
2715
2782
|
noShadow: { type: Boolean }
|
|
2716
2783
|
});
|
|
2717
|
-
customElements.define("eox-layercontrol-layer",
|
|
2718
|
-
var
|
|
2719
|
-
class
|
|
2784
|
+
customElements.define("eox-layercontrol-layer", Ki);
|
|
2785
|
+
var $e, xe;
|
|
2786
|
+
class Ji extends F {
|
|
2720
2787
|
constructor() {
|
|
2721
2788
|
super();
|
|
2722
|
-
M(this,
|
|
2723
|
-
M(this,
|
|
2789
|
+
M(this, $e, "");
|
|
2790
|
+
M(this, xe, `
|
|
2724
2791
|
details summary {
|
|
2725
2792
|
cursor: pointer;
|
|
2726
2793
|
display: flex;
|
|
@@ -2742,7 +2809,7 @@ class to extends z {
|
|
|
2742
2809
|
transform: rotate(90deg);
|
|
2743
2810
|
}
|
|
2744
2811
|
`);
|
|
2745
|
-
this.group = null, this.idProperty = "id", this.map = null, this.titleProperty = "title", this.tools = [], this.unstyled = !1, this.noShadow = !0;
|
|
2812
|
+
this.group = null, this.idProperty = "id", this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = [], this.unstyled = !1, this.noShadow = !0;
|
|
2746
2813
|
}
|
|
2747
2814
|
createRenderRoot() {
|
|
2748
2815
|
return this.noShadow ? this : super.createRenderRoot();
|
|
@@ -2750,8 +2817,8 @@ class to extends z {
|
|
|
2750
2817
|
render() {
|
|
2751
2818
|
return _`
|
|
2752
2819
|
<style>
|
|
2753
|
-
${H(this,
|
|
2754
|
-
${!this.unstyled && H(this,
|
|
2820
|
+
${H(this, $e)}
|
|
2821
|
+
${!this.unstyled && H(this, xe)}
|
|
2755
2822
|
</style>
|
|
2756
2823
|
${et(
|
|
2757
2824
|
this.group,
|
|
@@ -2761,7 +2828,9 @@ class to extends z {
|
|
|
2761
2828
|
<eox-layercontrol-layer
|
|
2762
2829
|
.noShadow=${!0}
|
|
2763
2830
|
.layer=${this.group}
|
|
2831
|
+
.map=${this.map}
|
|
2764
2832
|
.titleProperty=${this.titleProperty}
|
|
2833
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2765
2834
|
.tools=${this.tools}
|
|
2766
2835
|
.unstyled=${this.unstyled}
|
|
2767
2836
|
@changed=${() => this.requestUpdate()}
|
|
@@ -2773,6 +2842,7 @@ class to extends z {
|
|
|
2773
2842
|
.layers=${this.group.getLayers()}
|
|
2774
2843
|
.map=${this.map}
|
|
2775
2844
|
.titleProperty=${this.titleProperty}
|
|
2845
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2776
2846
|
.tools=${this.tools}
|
|
2777
2847
|
.unstyled=${this.unstyled}
|
|
2778
2848
|
@changed=${() => this.requestUpdate()}
|
|
@@ -2783,24 +2853,25 @@ class to extends z {
|
|
|
2783
2853
|
`;
|
|
2784
2854
|
}
|
|
2785
2855
|
}
|
|
2786
|
-
|
|
2856
|
+
$e = new WeakMap(), xe = new WeakMap(), N(Ji, "properties", {
|
|
2787
2857
|
group: { attribute: !1 },
|
|
2788
2858
|
idProperty: { attribute: "id-property" },
|
|
2789
2859
|
map: { attribute: !1, state: !0 },
|
|
2790
2860
|
titleProperty: { attribute: "title-property", type: String },
|
|
2861
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
2791
2862
|
tools: { attribute: !1 },
|
|
2792
2863
|
unstyled: { type: Boolean },
|
|
2793
2864
|
noShadow: { type: Boolean }
|
|
2794
2865
|
});
|
|
2795
2866
|
customElements.define(
|
|
2796
2867
|
"eox-layercontrol-layer-group",
|
|
2797
|
-
|
|
2868
|
+
Ji
|
|
2798
2869
|
);
|
|
2799
|
-
var
|
|
2800
|
-
class
|
|
2870
|
+
var Se, Ae;
|
|
2871
|
+
class Qi extends F {
|
|
2801
2872
|
constructor() {
|
|
2802
2873
|
super();
|
|
2803
|
-
M(this,
|
|
2874
|
+
M(this, Se, "");
|
|
2804
2875
|
M(this, Ae, `
|
|
2805
2876
|
ul {
|
|
2806
2877
|
padding: 0;
|
|
@@ -2829,12 +2900,12 @@ class eo extends z {
|
|
|
2829
2900
|
li.sortable-ghost {
|
|
2830
2901
|
}
|
|
2831
2902
|
`);
|
|
2832
|
-
this.idProperty = "id", this.layers = null, this.map = null, this.tools = void 0, this.titleProperty = "title", this.unstyled = !1, this.noShadow = !0;
|
|
2903
|
+
this.idProperty = "id", this.layers = null, this.map = null, this.tools = void 0, this.titleProperty = "title", this.showLayerZoomState = !1, this.unstyled = !1, this.noShadow = !0;
|
|
2833
2904
|
}
|
|
2834
2905
|
updated() {
|
|
2835
2906
|
this.layers && (this.layers.on("change:length", () => {
|
|
2836
2907
|
this.requestUpdate(), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
|
|
2837
|
-
}),
|
|
2908
|
+
}), nn(this.renderRoot.querySelector("ul"), this.layers, this));
|
|
2838
2909
|
}
|
|
2839
2910
|
createRenderRoot() {
|
|
2840
2911
|
return this.noShadow ? this : super.createRenderRoot();
|
|
@@ -2842,7 +2913,7 @@ class eo extends z {
|
|
|
2842
2913
|
render() {
|
|
2843
2914
|
return _`
|
|
2844
2915
|
<style>
|
|
2845
|
-
${H(this,
|
|
2916
|
+
${H(this, Se)}
|
|
2846
2917
|
${!this.unstyled && H(this, Ae)}
|
|
2847
2918
|
</style>
|
|
2848
2919
|
<ul>
|
|
@@ -2852,12 +2923,12 @@ class eo extends z {
|
|
|
2852
2923
|
${this.layers.getArray().filter(
|
|
2853
2924
|
(e) => !e.get("layerControlHide") && !e.get("layerControlOptional")
|
|
2854
2925
|
).reverse().map(
|
|
2855
|
-
(e) =>
|
|
2926
|
+
(e) => Oo(
|
|
2856
2927
|
e.get(this.idProperty),
|
|
2857
2928
|
_`
|
|
2858
2929
|
<li
|
|
2859
2930
|
data-layer="${e.get(this.idProperty)}"
|
|
2860
|
-
data-type="${
|
|
2931
|
+
data-type="${rn(e, this.map)}"
|
|
2861
2932
|
>
|
|
2862
2933
|
${/** @type {import("ol/layer").Group} */
|
|
2863
2934
|
e.getLayers ? _`
|
|
@@ -2867,6 +2938,7 @@ class eo extends z {
|
|
|
2867
2938
|
.idProperty=${this.idProperty}
|
|
2868
2939
|
.map=${this.map}
|
|
2869
2940
|
.titleProperty=${this.titleProperty}
|
|
2941
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2870
2942
|
.tools=${this.tools}
|
|
2871
2943
|
.unstyled=${this.unstyled}
|
|
2872
2944
|
@changed=${() => this.requestUpdate()}
|
|
@@ -2876,7 +2948,9 @@ class eo extends z {
|
|
|
2876
2948
|
<eox-layercontrol-layer
|
|
2877
2949
|
.noShadow=${!0}
|
|
2878
2950
|
.layer=${e}
|
|
2951
|
+
.map=${this.map}
|
|
2879
2952
|
.titleProperty=${this.titleProperty}
|
|
2953
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2880
2954
|
.tools=${this.tools}
|
|
2881
2955
|
.unstyled=${this.unstyled}
|
|
2882
2956
|
@changed=${() => {
|
|
@@ -2894,17 +2968,18 @@ class eo extends z {
|
|
|
2894
2968
|
`;
|
|
2895
2969
|
}
|
|
2896
2970
|
}
|
|
2897
|
-
|
|
2971
|
+
Se = new WeakMap(), Ae = new WeakMap(), N(Qi, "properties", {
|
|
2898
2972
|
idProperty: { attribute: "id-property" },
|
|
2899
2973
|
layers: { attribute: !1 },
|
|
2900
2974
|
map: { attribute: !1, state: !0 },
|
|
2901
2975
|
titleProperty: { attribute: "title-property", type: String },
|
|
2976
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
2902
2977
|
tools: { attribute: !1 },
|
|
2903
2978
|
unstyled: { type: Boolean },
|
|
2904
2979
|
noShadow: { type: Boolean }
|
|
2905
2980
|
});
|
|
2906
|
-
customElements.define("eox-layercontrol-layer-list",
|
|
2907
|
-
class
|
|
2981
|
+
customElements.define("eox-layercontrol-layer-list", Qi);
|
|
2982
|
+
class to extends F {
|
|
2908
2983
|
constructor() {
|
|
2909
2984
|
super(), this.idProperty = "id", this.layers = null, this.titleProperty = "title", this.unstyled = !1, this.noShadow = !0;
|
|
2910
2985
|
}
|
|
@@ -2919,7 +2994,7 @@ class io extends z {
|
|
|
2919
2994
|
<option disabled selected value>
|
|
2920
2995
|
-- select an optional layer to add --
|
|
2921
2996
|
</option>
|
|
2922
|
-
${
|
|
2997
|
+
${je(
|
|
2923
2998
|
this.layers.getArray(),
|
|
2924
2999
|
"layerControlOptional",
|
|
2925
3000
|
!0
|
|
@@ -2936,7 +3011,7 @@ class io extends z {
|
|
|
2936
3011
|
</select>
|
|
2937
3012
|
<button
|
|
2938
3013
|
@click="${() => {
|
|
2939
|
-
const t =
|
|
3014
|
+
const t = je(
|
|
2940
3015
|
this.layers.getArray(),
|
|
2941
3016
|
"layerControlOptional",
|
|
2942
3017
|
!0
|
|
@@ -2958,7 +3033,7 @@ class io extends z {
|
|
|
2958
3033
|
`;
|
|
2959
3034
|
}
|
|
2960
3035
|
}
|
|
2961
|
-
|
|
3036
|
+
N(to, "properties", {
|
|
2962
3037
|
idProperty: { attribute: "id-property" },
|
|
2963
3038
|
layers: { attribute: !1 },
|
|
2964
3039
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -2967,19 +3042,19 @@ R(io, "properties", {
|
|
|
2967
3042
|
});
|
|
2968
3043
|
customElements.define(
|
|
2969
3044
|
"eox-layercontrol-optional-list",
|
|
2970
|
-
|
|
3045
|
+
to
|
|
2971
3046
|
);
|
|
2972
|
-
var Ce,
|
|
2973
|
-
class
|
|
3047
|
+
var Ce, Te;
|
|
3048
|
+
class eo extends F {
|
|
2974
3049
|
constructor() {
|
|
2975
3050
|
super();
|
|
2976
3051
|
M(this, Ce, "");
|
|
2977
|
-
M(this,
|
|
3052
|
+
M(this, Te, `
|
|
2978
3053
|
* {
|
|
2979
3054
|
font-family: Roboto, sans-serif;
|
|
2980
3055
|
}
|
|
2981
3056
|
`);
|
|
2982
|
-
this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.tools = ["info", "opacity", "remove", "sort"], this.unstyled = !1, this.styleOverride = "";
|
|
3057
|
+
this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = ["info", "opacity", "remove", "sort"], this.unstyled = !1, this.styleOverride = "";
|
|
2983
3058
|
}
|
|
2984
3059
|
updated() {
|
|
2985
3060
|
const e = document.querySelector(this.for);
|
|
@@ -2990,7 +3065,7 @@ class oo extends z {
|
|
|
2990
3065
|
return _`
|
|
2991
3066
|
<style>
|
|
2992
3067
|
${H(this, Ce)}
|
|
2993
|
-
${!this.unstyled && H(this,
|
|
3068
|
+
${!this.unstyled && H(this, Te)}
|
|
2994
3069
|
${this.styleOverride}
|
|
2995
3070
|
</style>
|
|
2996
3071
|
${et(
|
|
@@ -3003,14 +3078,25 @@ class oo extends z {
|
|
|
3003
3078
|
.layers=${this.map.getLayers()}
|
|
3004
3079
|
.map=${this.map}
|
|
3005
3080
|
.titleProperty=${this.titleProperty}
|
|
3081
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
3006
3082
|
.tools=${this.tools}
|
|
3007
3083
|
.unstyled=${this.unstyled}
|
|
3008
|
-
@changed=${
|
|
3084
|
+
@changed=${/**
|
|
3085
|
+
* @param {CustomEvent & {target: Element}} e
|
|
3086
|
+
*/
|
|
3087
|
+
(i) => {
|
|
3088
|
+
if (this.requestUpdate(), i.target.tagName === "EOX-LAYERCONTROL-LAYER-TOOLS") {
|
|
3089
|
+
const n = this.renderRoot.querySelector(
|
|
3090
|
+
"eox-layercontrol-optional-list"
|
|
3091
|
+
);
|
|
3092
|
+
n == null || n.requestUpdate();
|
|
3093
|
+
}
|
|
3094
|
+
}}
|
|
3009
3095
|
></eox-layercontrol-layer-list>
|
|
3010
3096
|
`
|
|
3011
3097
|
)}
|
|
3012
3098
|
${et(
|
|
3013
|
-
this.map && ((e =
|
|
3099
|
+
this.map && ((e = je(
|
|
3014
3100
|
// @ts-ignore
|
|
3015
3101
|
this.map.getLayers().getArray(),
|
|
3016
3102
|
"layerControlOptional",
|
|
@@ -3029,16 +3115,17 @@ class oo extends z {
|
|
|
3029
3115
|
`;
|
|
3030
3116
|
}
|
|
3031
3117
|
}
|
|
3032
|
-
Ce = new WeakMap(),
|
|
3118
|
+
Ce = new WeakMap(), Te = new WeakMap(), N(eo, "properties", {
|
|
3033
3119
|
for: { type: String },
|
|
3034
3120
|
idProperty: { attribute: "id-property" },
|
|
3035
3121
|
map: { attribute: !1, state: !0 },
|
|
3036
3122
|
titleProperty: { attribute: "title-property", type: String },
|
|
3123
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
3037
3124
|
tools: { attribute: !1 },
|
|
3038
3125
|
unstyled: { type: Boolean },
|
|
3039
3126
|
styleOverride: { type: String }
|
|
3040
3127
|
});
|
|
3041
|
-
customElements.define("eox-layercontrol",
|
|
3128
|
+
customElements.define("eox-layercontrol", eo);
|
|
3042
3129
|
export {
|
|
3043
|
-
|
|
3130
|
+
eo as EOxLayerControl
|
|
3044
3131
|
};
|