@mantou/gem 1.7.11 → 1.7.12
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/gem.es.js +1164 -1136
- package/dist/gem.umd.js +23 -24
- package/elements/base/modal-factory.d.ts +3 -1
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/helper/request.d.ts +17 -7
- package/helper/request.d.ts.map +1 -1
- package/helper/request.js +103 -53
- package/helper/request.js.map +1 -1
- package/lib/decorators.d.ts +1 -0
- package/lib/decorators.d.ts.map +1 -1
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +16 -18
- package/lib/element.js.map +1 -1
- package/lib/utils.d.ts +5 -5
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +18 -29
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/helper/request.ts +122 -53
- package/src/lib/decorators.ts +1 -1
- package/src/lib/element.ts +18 -17
- package/src/lib/utils.ts +27 -34
- package/src/lib/version.ts +1 -1
- package/src/test/utils.test.ts +12 -4
package/dist/gem.es.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
var be = (
|
|
2
|
-
if (!t.has(
|
|
1
|
+
var be = (s, t, e) => {
|
|
2
|
+
if (!t.has(s))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (t.has(
|
|
5
|
+
var y = (s, t, e) => (be(s, t, "read from private field"), e ? e.call(s) : t.get(s)), P = (s, t, e) => {
|
|
6
|
+
if (t.has(s))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
t instanceof WeakSet ? t.add(
|
|
9
|
-
}, F = (
|
|
10
|
-
var
|
|
11
|
-
const
|
|
8
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
9
|
+
}, F = (s, t, e, n) => (be(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e);
|
|
10
|
+
var xe = (s, t, e) => (be(s, t, "access private method"), e);
|
|
11
|
+
const Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
12
|
__proto__: null,
|
|
13
13
|
get GemElement() {
|
|
14
|
-
return
|
|
14
|
+
return R;
|
|
15
15
|
},
|
|
16
16
|
get SVGTemplateResult() {
|
|
17
|
-
return
|
|
17
|
+
return qs;
|
|
18
18
|
},
|
|
19
19
|
get TemplateResult() {
|
|
20
20
|
return _e;
|
|
21
21
|
},
|
|
22
22
|
get defineAttribute() {
|
|
23
|
-
return
|
|
23
|
+
return es;
|
|
24
24
|
},
|
|
25
25
|
get defineCSSState() {
|
|
26
|
-
return
|
|
26
|
+
return ns;
|
|
27
27
|
},
|
|
28
28
|
get defineProperty() {
|
|
29
29
|
return Dt;
|
|
30
30
|
},
|
|
31
31
|
get defineRef() {
|
|
32
|
-
return
|
|
32
|
+
return ss;
|
|
33
33
|
},
|
|
34
34
|
get directive() {
|
|
35
35
|
return we;
|
|
36
36
|
},
|
|
37
37
|
get guard() {
|
|
38
|
-
return
|
|
38
|
+
return Bn;
|
|
39
39
|
},
|
|
40
40
|
get html() {
|
|
41
|
-
return
|
|
41
|
+
return j;
|
|
42
42
|
},
|
|
43
43
|
get ifDefined() {
|
|
44
|
-
return
|
|
44
|
+
return Js;
|
|
45
45
|
},
|
|
46
46
|
get nativeDefineElement() {
|
|
47
|
-
return
|
|
47
|
+
return rs;
|
|
48
48
|
},
|
|
49
49
|
get render() {
|
|
50
|
-
return
|
|
50
|
+
return Fs;
|
|
51
51
|
},
|
|
52
52
|
get repeat() {
|
|
53
|
-
return
|
|
53
|
+
return Fn;
|
|
54
54
|
},
|
|
55
55
|
get svg() {
|
|
56
|
-
return
|
|
56
|
+
return Hn;
|
|
57
57
|
}
|
|
58
58
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
59
59
|
/**
|
|
@@ -69,10 +69,10 @@ const Ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
69
69
|
* subject to an additional IP rights grant found at
|
|
70
70
|
* http://polymer.github.io/PATENTS.txt
|
|
71
71
|
*/
|
|
72
|
-
const
|
|
73
|
-
const e =
|
|
74
|
-
return
|
|
75
|
-
}, Wt = (
|
|
72
|
+
const Is = /* @__PURE__ */ new WeakMap(), we = (s) => (...t) => {
|
|
73
|
+
const e = s(...t);
|
|
74
|
+
return Is.set(e, !0), e;
|
|
75
|
+
}, Wt = (s) => typeof s == "function" && Is.has(s);
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -86,15 +86,15 @@ const Dn = /* @__PURE__ */ new WeakMap(), we = (n) => (...t) => {
|
|
|
86
86
|
* subject to an additional IP rights grant found at
|
|
87
87
|
* http://polymer.github.io/PATENTS.txt
|
|
88
88
|
*/
|
|
89
|
-
const
|
|
89
|
+
const ms = typeof window < "u" && window.customElements != null && window.customElements.polyfillWrapFlushCallback !== void 0, Vs = (s, t, e = null, n = null) => {
|
|
90
90
|
for (; t !== e; ) {
|
|
91
|
-
const
|
|
92
|
-
|
|
91
|
+
const r = t.nextSibling;
|
|
92
|
+
s.insertBefore(t, n), t = r;
|
|
93
93
|
}
|
|
94
|
-
},
|
|
94
|
+
}, Je = (s, t, e = null) => {
|
|
95
95
|
for (; t !== e; ) {
|
|
96
|
-
const
|
|
97
|
-
|
|
96
|
+
const n = t.nextSibling;
|
|
97
|
+
s.removeChild(t), t = n;
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
/**
|
|
@@ -110,7 +110,7 @@ const wn = typeof window < "u" && window.customElements != null && window.custom
|
|
|
110
110
|
* subject to an additional IP rights grant found at
|
|
111
111
|
* http://polymer.github.io/PATENTS.txt
|
|
112
112
|
*/
|
|
113
|
-
const V = {},
|
|
113
|
+
const V = {}, ys = {};
|
|
114
114
|
/**
|
|
115
115
|
* @license
|
|
116
116
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -124,67 +124,67 @@ const V = {}, _n = {};
|
|
|
124
124
|
* subject to an additional IP rights grant found at
|
|
125
125
|
* http://polymer.github.io/PATENTS.txt
|
|
126
126
|
*/
|
|
127
|
-
const et = `{{lit-${String(Math.random()).slice(2)}}}`,
|
|
128
|
-
class
|
|
127
|
+
const et = `{{lit-${String(Math.random()).slice(2)}}}`, Ds = `<!--${et}-->`, ws = new RegExp(`${et}|${Ds}`), xt = "$lit$";
|
|
128
|
+
class Pn {
|
|
129
129
|
constructor(t, e) {
|
|
130
130
|
this.parts = [], this.element = e;
|
|
131
|
-
const
|
|
131
|
+
const n = [], r = [], i = document.createTreeWalker(e.content, 133, null, !1);
|
|
132
132
|
let o = 0, a = -1, c = 0;
|
|
133
|
-
const { strings:
|
|
134
|
-
for (; c <
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
137
|
-
|
|
133
|
+
const { strings: l, values: { length: f } } = t;
|
|
134
|
+
for (; c < f; ) {
|
|
135
|
+
const h = i.nextNode();
|
|
136
|
+
if (h === null) {
|
|
137
|
+
i.currentNode = r.pop();
|
|
138
138
|
continue;
|
|
139
139
|
}
|
|
140
|
-
if (a++,
|
|
141
|
-
if (
|
|
142
|
-
const
|
|
143
|
-
let
|
|
144
|
-
for (let
|
|
145
|
-
|
|
146
|
-
for (;
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
this.parts.push({ type: "attribute", index: a, name: _, strings:
|
|
140
|
+
if (a++, h.nodeType === 1) {
|
|
141
|
+
if (h.hasAttributes()) {
|
|
142
|
+
const g = h.attributes, { length: u } = g;
|
|
143
|
+
let p = 0;
|
|
144
|
+
for (let m = 0; m < u; m++)
|
|
145
|
+
_s(g[m].name, xt) && p++;
|
|
146
|
+
for (; p-- > 0; ) {
|
|
147
|
+
const m = l[c], _ = Me.exec(m)[2], w = _.toLowerCase() + xt, H = h.getAttribute(w);
|
|
148
|
+
h.removeAttribute(w);
|
|
149
|
+
const O = H.split(ws);
|
|
150
|
+
this.parts.push({ type: "attribute", index: a, name: _, strings: O }), c += O.length - 1;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
} else if (
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
for (let _ = 0; _ <
|
|
159
|
-
let
|
|
153
|
+
h.tagName === "TEMPLATE" && (r.push(h), i.currentNode = h.content);
|
|
154
|
+
} else if (h.nodeType === 3) {
|
|
155
|
+
const g = h.data;
|
|
156
|
+
if (g.indexOf(et) >= 0) {
|
|
157
|
+
const u = h.parentNode, p = g.split(ws), m = p.length - 1;
|
|
158
|
+
for (let _ = 0; _ < m; _++) {
|
|
159
|
+
let w, H = p[_];
|
|
160
160
|
if (H === "")
|
|
161
|
-
|
|
161
|
+
w = U();
|
|
162
162
|
else {
|
|
163
|
-
const
|
|
164
|
-
|
|
163
|
+
const O = Me.exec(H);
|
|
164
|
+
O !== null && _s(O[2], xt) && (H = H.slice(0, O.index) + O[1] + O[2].slice(0, -xt.length) + O[3]), w = document.createTextNode(H);
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
u.insertBefore(w, h), this.parts.push({ type: "node", index: ++a });
|
|
167
167
|
}
|
|
168
|
-
m
|
|
168
|
+
p[m] === "" ? (u.insertBefore(U(), h), n.push(h)) : h.data = p[m], c += m;
|
|
169
169
|
}
|
|
170
|
-
} else if (
|
|
171
|
-
if (
|
|
172
|
-
const
|
|
173
|
-
(
|
|
170
|
+
} else if (h.nodeType === 8)
|
|
171
|
+
if (h.data === et) {
|
|
172
|
+
const g = h.parentNode;
|
|
173
|
+
(h.previousSibling === null || a === o) && (a++, g.insertBefore(U(), h)), o = a, this.parts.push({ type: "node", index: a }), h.nextSibling === null ? h.data = "" : (n.push(h), a--), c++;
|
|
174
174
|
} else {
|
|
175
|
-
let
|
|
176
|
-
for (; (
|
|
175
|
+
let g = -1;
|
|
176
|
+
for (; (g = h.data.indexOf(et, g + 1)) !== -1; )
|
|
177
177
|
this.parts.push({ type: "node", index: -1 }), c++;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
for (const
|
|
181
|
-
|
|
180
|
+
for (const h of n)
|
|
181
|
+
h.parentNode.removeChild(h);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
const
|
|
185
|
-
const e =
|
|
186
|
-
return e >= 0 &&
|
|
187
|
-
},
|
|
184
|
+
const _s = (s, t) => {
|
|
185
|
+
const e = s.length - t.length;
|
|
186
|
+
return e >= 0 && s.slice(e) === t;
|
|
187
|
+
}, $n = (s) => s.index !== -1, U = () => document.createComment(""), Me = (
|
|
188
188
|
// eslint-disable-next-line no-control-regex
|
|
189
189
|
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/
|
|
190
190
|
);
|
|
@@ -201,35 +201,35 @@ const Sn = (n, t) => {
|
|
|
201
201
|
* subject to an additional IP rights grant found at
|
|
202
202
|
* http://polymer.github.io/PATENTS.txt
|
|
203
203
|
*/
|
|
204
|
-
class
|
|
205
|
-
constructor(t, e,
|
|
206
|
-
this.__parts = [], this.template = t, this.processor = e, this.options =
|
|
204
|
+
class vs {
|
|
205
|
+
constructor(t, e, n) {
|
|
206
|
+
this.__parts = [], this.template = t, this.processor = e, this.options = n;
|
|
207
207
|
}
|
|
208
208
|
update(t) {
|
|
209
209
|
let e = 0;
|
|
210
|
-
for (const
|
|
211
|
-
|
|
212
|
-
for (const
|
|
213
|
-
|
|
210
|
+
for (const n of this.__parts)
|
|
211
|
+
n !== void 0 && n.setValue(t[e]), e++;
|
|
212
|
+
for (const n of this.__parts)
|
|
213
|
+
n !== void 0 && n.commit();
|
|
214
214
|
}
|
|
215
215
|
_clone() {
|
|
216
|
-
const t =
|
|
217
|
-
let
|
|
218
|
-
for (;
|
|
219
|
-
if (a =
|
|
220
|
-
this.__parts.push(void 0),
|
|
216
|
+
const t = ms ? this.template.element.content.cloneNode(!0) : document.importNode(this.template.element.content, !0), e = [], n = this.template.parts, r = document.createTreeWalker(t, 133, null, !1);
|
|
217
|
+
let i = 0, o = 0, a, c = r.nextNode();
|
|
218
|
+
for (; i < n.length; ) {
|
|
219
|
+
if (a = n[i], !$n(a)) {
|
|
220
|
+
this.__parts.push(void 0), i++;
|
|
221
221
|
continue;
|
|
222
222
|
}
|
|
223
223
|
for (; o < a.index; )
|
|
224
|
-
o++, c.nodeName === "TEMPLATE" && (e.push(c),
|
|
224
|
+
o++, c.nodeName === "TEMPLATE" && (e.push(c), r.currentNode = c.content), (c = r.nextNode()) === null && (r.currentNode = e.pop(), c = r.nextNode());
|
|
225
225
|
if (a.type === "node") {
|
|
226
|
-
const
|
|
227
|
-
|
|
226
|
+
const l = this.processor.handleTextExpression(this.options);
|
|
227
|
+
l.insertAfterNode(c.previousSibling), this.__parts.push(l);
|
|
228
228
|
} else
|
|
229
229
|
this.__parts.push(...this.processor.handleAttributeExpressions(c, a.name, a.strings, this.options));
|
|
230
|
-
|
|
230
|
+
i++;
|
|
231
231
|
}
|
|
232
|
-
return
|
|
232
|
+
return ms && (document.adoptNode(t), customElements.upgrade(t)), t;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
@@ -245,38 +245,38 @@ class En {
|
|
|
245
245
|
* subject to an additional IP rights grant found at
|
|
246
246
|
* http://polymer.github.io/PATENTS.txt
|
|
247
247
|
*/
|
|
248
|
-
const
|
|
248
|
+
const Ss = window.trustedTypes && trustedTypes.createPolicy("lit-html", { createHTML: (s) => s }), Tn = ` ${et} `;
|
|
249
249
|
class _e {
|
|
250
|
-
constructor(t, e,
|
|
251
|
-
this.strings = t, this.values = e, this.type =
|
|
250
|
+
constructor(t, e, n, r) {
|
|
251
|
+
this.strings = t, this.values = e, this.type = n, this.processor = r;
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
254
254
|
* Returns a string of HTML used to create a `<template>` element.
|
|
255
255
|
*/
|
|
256
256
|
getHTML() {
|
|
257
257
|
const t = this.strings.length - 1;
|
|
258
|
-
let e = "",
|
|
259
|
-
for (let
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
const a =
|
|
263
|
-
a === null ? e +=
|
|
258
|
+
let e = "", n = !1;
|
|
259
|
+
for (let r = 0; r < t; r++) {
|
|
260
|
+
const i = this.strings[r], o = i.lastIndexOf("<!--");
|
|
261
|
+
n = (o > -1 || n) && i.indexOf("-->", o + 1) === -1;
|
|
262
|
+
const a = Me.exec(i);
|
|
263
|
+
a === null ? e += i + (n ? Tn : Ds) : e += i.substr(0, a.index) + a[1] + a[2] + xt + a[3] + et;
|
|
264
264
|
}
|
|
265
265
|
return e += this.strings[t], e;
|
|
266
266
|
}
|
|
267
267
|
getTemplateElement() {
|
|
268
268
|
const t = document.createElement("template");
|
|
269
269
|
let e = this.getHTML();
|
|
270
|
-
return
|
|
270
|
+
return Ss !== void 0 && (e = Ss.createHTML(e)), t.innerHTML = e, t;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
class
|
|
273
|
+
class qs extends _e {
|
|
274
274
|
getHTML() {
|
|
275
275
|
return `<svg>${super.getHTML()}</svg>`;
|
|
276
276
|
}
|
|
277
277
|
getTemplateElement() {
|
|
278
|
-
const t = super.getTemplateElement(), e = t.content,
|
|
279
|
-
return e.removeChild(
|
|
278
|
+
const t = super.getTemplateElement(), e = t.content, n = e.firstChild;
|
|
279
|
+
return e.removeChild(n), Vs(e, n.firstChild), t;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -292,54 +292,54 @@ class Gn extends _e {
|
|
|
292
292
|
* subject to an additional IP rights grant found at
|
|
293
293
|
* http://polymer.github.io/PATENTS.txt
|
|
294
294
|
*/
|
|
295
|
-
const
|
|
296
|
-
!!(
|
|
297
|
-
class
|
|
298
|
-
constructor(t, e,
|
|
299
|
-
this.dirty = !0, this.element = t, this.name = e, this.strings =
|
|
300
|
-
for (let
|
|
301
|
-
this.parts[
|
|
295
|
+
const Ye = (s) => s === null || !(typeof s == "object" || typeof s == "function"), Ae = (s) => Array.isArray(s) || // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
296
|
+
!!(s && s[Symbol.iterator]);
|
|
297
|
+
class Us {
|
|
298
|
+
constructor(t, e, n) {
|
|
299
|
+
this.dirty = !0, this.element = t, this.name = e, this.strings = n, this.parts = [];
|
|
300
|
+
for (let r = 0; r < n.length - 1; r++)
|
|
301
|
+
this.parts[r] = this._createPart();
|
|
302
302
|
}
|
|
303
303
|
/**
|
|
304
304
|
* Creates a single part. Override this to create a differnt type of part.
|
|
305
305
|
*/
|
|
306
306
|
_createPart() {
|
|
307
|
-
return new
|
|
307
|
+
return new Qe(this);
|
|
308
308
|
}
|
|
309
309
|
_getValue() {
|
|
310
|
-
const t = this.strings, e = t.length - 1,
|
|
310
|
+
const t = this.strings, e = t.length - 1, n = this.parts;
|
|
311
311
|
if (e === 1 && t[0] === "" && t[1] === "") {
|
|
312
|
-
const
|
|
313
|
-
if (typeof
|
|
314
|
-
return String(
|
|
315
|
-
if (typeof
|
|
316
|
-
return
|
|
312
|
+
const i = n[0].value;
|
|
313
|
+
if (typeof i == "symbol")
|
|
314
|
+
return String(i);
|
|
315
|
+
if (typeof i == "string" || !Ae(i))
|
|
316
|
+
return i;
|
|
317
317
|
}
|
|
318
|
-
let
|
|
319
|
-
for (let
|
|
320
|
-
|
|
321
|
-
const o =
|
|
318
|
+
let r = "";
|
|
319
|
+
for (let i = 0; i < e; i++) {
|
|
320
|
+
r += t[i];
|
|
321
|
+
const o = n[i];
|
|
322
322
|
if (o !== void 0) {
|
|
323
323
|
const a = o.value;
|
|
324
|
-
if (
|
|
325
|
-
|
|
324
|
+
if (Ye(a) || !Ae(a))
|
|
325
|
+
r += typeof a == "string" ? a : String(a);
|
|
326
326
|
else
|
|
327
327
|
for (const c of a)
|
|
328
|
-
|
|
328
|
+
r += typeof c == "string" ? c : String(c);
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
return
|
|
331
|
+
return r += t[e], r;
|
|
332
332
|
}
|
|
333
333
|
commit() {
|
|
334
334
|
this.dirty && (this.dirty = !1, this.element.setAttribute(this.name, this._getValue()));
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class Qe {
|
|
338
338
|
constructor(t) {
|
|
339
339
|
this.value = void 0, this.committer = t;
|
|
340
340
|
}
|
|
341
341
|
setValue(t) {
|
|
342
|
-
t !== V && (!
|
|
342
|
+
t !== V && (!Ye(t) || t !== this.value) && (this.value = t, Wt(t) || (this.committer.dirty = !0));
|
|
343
343
|
}
|
|
344
344
|
commit() {
|
|
345
345
|
for (; Wt(this.value); ) {
|
|
@@ -398,7 +398,7 @@ class wt {
|
|
|
398
398
|
this.__pendingValue = V, e(this);
|
|
399
399
|
}
|
|
400
400
|
const t = this.__pendingValue;
|
|
401
|
-
t !== V && (
|
|
401
|
+
t !== V && (Ye(t) ? t !== this.value && this.__commitText(t) : t instanceof _e ? this.__commitTemplateResult(t) : t instanceof Node ? this.__commitNode(t) : Ae(t) ? this.__commitIterable(t) : t === ys ? (this.value = ys, this.clear()) : this.__commitText(t));
|
|
402
402
|
}
|
|
403
403
|
__insert(t) {
|
|
404
404
|
this.endNode.parentNode.insertBefore(t, this.endNode);
|
|
@@ -409,35 +409,35 @@ class wt {
|
|
|
409
409
|
__commitText(t) {
|
|
410
410
|
const e = this.startNode.nextSibling;
|
|
411
411
|
t = t ?? "";
|
|
412
|
-
const
|
|
413
|
-
e === this.endNode.previousSibling && e.nodeType === 3 ? e.data =
|
|
412
|
+
const n = typeof t == "string" ? t : String(t);
|
|
413
|
+
e === this.endNode.previousSibling && e.nodeType === 3 ? e.data = n : this.__commitNode(document.createTextNode(n)), this.value = t;
|
|
414
414
|
}
|
|
415
415
|
__commitTemplateResult(t) {
|
|
416
416
|
const e = this.options.templateFactory(t);
|
|
417
|
-
if (this.value instanceof
|
|
417
|
+
if (this.value instanceof vs && this.value.template === e)
|
|
418
418
|
this.value.update(t.values);
|
|
419
419
|
else {
|
|
420
|
-
const
|
|
421
|
-
|
|
420
|
+
const n = new vs(e, t.processor, this.options), r = n._clone();
|
|
421
|
+
n.update(t.values), this.__commitNode(r), this.value = n;
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
__commitIterable(t) {
|
|
425
425
|
Array.isArray(this.value) || (this.value = [], this.clear());
|
|
426
426
|
const e = this.value;
|
|
427
|
-
let
|
|
428
|
-
for (const
|
|
429
|
-
|
|
430
|
-
|
|
427
|
+
let n = 0, r;
|
|
428
|
+
for (const i of t)
|
|
429
|
+
r = e[n], r === void 0 && (r = new wt(this.options), e.push(r), n === 0 ? r.appendIntoPart(this) : r.insertAfterPart(e[n - 1])), r.setValue(i), r.commit(), n++;
|
|
430
|
+
n < e.length && (e.length = n, this.clear(r && r.endNode));
|
|
431
431
|
}
|
|
432
432
|
clear(t = this.startNode) {
|
|
433
|
-
|
|
433
|
+
Je(this.startNode.parentNode, t.nextSibling, this.endNode);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
class
|
|
437
|
-
constructor(t, e,
|
|
438
|
-
if (this.value = void 0, this.__pendingValue = void 0,
|
|
436
|
+
class Ln {
|
|
437
|
+
constructor(t, e, n) {
|
|
438
|
+
if (this.value = void 0, this.__pendingValue = void 0, n.length !== 2 || n[0] !== "" || n[1] !== "")
|
|
439
439
|
throw new Error("Boolean attributes can only contain a single expression");
|
|
440
|
-
this.element = t, this.name = e, this.strings =
|
|
440
|
+
this.element = t, this.name = e, this.strings = n;
|
|
441
441
|
}
|
|
442
442
|
setValue(t) {
|
|
443
443
|
this.__pendingValue = t;
|
|
@@ -453,12 +453,12 @@ class Ms {
|
|
|
453
453
|
this.value !== t && (t ? this.element.setAttribute(this.name, "") : this.element.removeAttribute(this.name), this.value = t), this.__pendingValue = V;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
class
|
|
457
|
-
constructor(t, e,
|
|
458
|
-
super(t, e,
|
|
456
|
+
class kn extends Us {
|
|
457
|
+
constructor(t, e, n) {
|
|
458
|
+
super(t, e, n), this.single = n.length === 2 && n[0] === "" && n[1] === "";
|
|
459
459
|
}
|
|
460
460
|
_createPart() {
|
|
461
|
-
return new
|
|
461
|
+
return new Nn(this);
|
|
462
462
|
}
|
|
463
463
|
_getValue() {
|
|
464
464
|
return this.single ? this.parts[0].value : super._getValue();
|
|
@@ -467,42 +467,42 @@ class Os extends jn {
|
|
|
467
467
|
this.dirty && (this.dirty = !1, this.element[this.name] = this._getValue());
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
class
|
|
470
|
+
class Nn extends Qe {
|
|
471
471
|
}
|
|
472
|
-
let
|
|
472
|
+
let js = !1;
|
|
473
473
|
(() => {
|
|
474
474
|
try {
|
|
475
|
-
const
|
|
475
|
+
const s = {
|
|
476
476
|
get capture() {
|
|
477
|
-
return
|
|
477
|
+
return js = !0, !1;
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
|
-
window.addEventListener("test",
|
|
480
|
+
window.addEventListener("test", s, s), window.removeEventListener("test", s, s);
|
|
481
481
|
} catch {
|
|
482
482
|
}
|
|
483
483
|
})();
|
|
484
|
-
class
|
|
485
|
-
constructor(t, e,
|
|
486
|
-
this.value = void 0, this.__pendingValue = void 0, this.element = t, this.eventName = e, this.eventContext =
|
|
484
|
+
class On {
|
|
485
|
+
constructor(t, e, n) {
|
|
486
|
+
this.value = void 0, this.__pendingValue = void 0, this.element = t, this.eventName = e, this.eventContext = n, this.__boundHandleEvent = (r) => this.handleEvent(r);
|
|
487
487
|
}
|
|
488
488
|
setValue(t) {
|
|
489
489
|
this.__pendingValue = t;
|
|
490
490
|
}
|
|
491
491
|
commit() {
|
|
492
492
|
for (; Wt(this.__pendingValue); ) {
|
|
493
|
-
const
|
|
494
|
-
this.__pendingValue = V,
|
|
493
|
+
const i = this.__pendingValue;
|
|
494
|
+
this.__pendingValue = V, i(this);
|
|
495
495
|
}
|
|
496
496
|
if (this.__pendingValue === V)
|
|
497
497
|
return;
|
|
498
|
-
const t = this.__pendingValue, e = this.value,
|
|
499
|
-
|
|
498
|
+
const t = this.__pendingValue, e = this.value, n = t == null || e != null && (t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive), r = t != null && (e == null || n);
|
|
499
|
+
n && this.element.removeEventListener(this.eventName, this.__boundHandleEvent, this.__options), r && (this.__options = Mn(t), this.element.addEventListener(this.eventName, this.__boundHandleEvent, this.__options)), this.value = t, this.__pendingValue = V;
|
|
500
500
|
}
|
|
501
501
|
handleEvent(t) {
|
|
502
502
|
typeof this.value == "function" ? this.value.call(this.eventContext || this.element, t) : this.value.handleEvent(t);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
505
|
+
const Mn = (s) => s && (js ? { capture: s.capture, passive: s.passive, once: s.once } : s.capture);
|
|
506
506
|
/**
|
|
507
507
|
* @license
|
|
508
508
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -516,7 +516,7 @@ const Hs = (n) => n && (Fn ? { capture: n.capture, passive: n.passive, once: n.o
|
|
|
516
516
|
* subject to an additional IP rights grant found at
|
|
517
517
|
* http://polymer.github.io/PATENTS.txt
|
|
518
518
|
*/
|
|
519
|
-
class
|
|
519
|
+
class An {
|
|
520
520
|
/**
|
|
521
521
|
* Create parts for an attribute-position binding, given the event, attribute
|
|
522
522
|
* name, and string literals.
|
|
@@ -526,9 +526,9 @@ class Ws {
|
|
|
526
526
|
* @param strings The string literals. There are always at least two strings,
|
|
527
527
|
* event for fully-controlled bindings with a single expression.
|
|
528
528
|
*/
|
|
529
|
-
handleAttributeExpressions(t, e,
|
|
530
|
-
const
|
|
531
|
-
return
|
|
529
|
+
handleAttributeExpressions(t, e, n, r) {
|
|
530
|
+
const i = e[0];
|
|
531
|
+
return i === "." ? new kn(t, e.slice(1), n).parts : i === "@" ? [new On(t, e.slice(1), r.eventContext)] : i === "?" ? [new Ln(t, e.slice(1), n)] : new Us(t, e, n).parts;
|
|
532
532
|
}
|
|
533
533
|
/**
|
|
534
534
|
* Create parts for a text-position binding.
|
|
@@ -538,7 +538,7 @@ class Ws {
|
|
|
538
538
|
return new wt(t);
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
const
|
|
541
|
+
const Gs = new An();
|
|
542
542
|
/**
|
|
543
543
|
* @license
|
|
544
544
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -552,19 +552,19 @@ const Bn = new Ws();
|
|
|
552
552
|
* subject to an additional IP rights grant found at
|
|
553
553
|
* http://polymer.github.io/PATENTS.txt
|
|
554
554
|
*/
|
|
555
|
-
function
|
|
556
|
-
let t =
|
|
555
|
+
function Rn(s) {
|
|
556
|
+
let t = Es.get(s.type);
|
|
557
557
|
t === void 0 && (t = {
|
|
558
558
|
stringsArray: /* @__PURE__ */ new WeakMap(),
|
|
559
559
|
keyString: /* @__PURE__ */ new Map()
|
|
560
|
-
},
|
|
561
|
-
let e = t.stringsArray.get(
|
|
560
|
+
}, Es.set(s.type, t));
|
|
561
|
+
let e = t.stringsArray.get(s.strings);
|
|
562
562
|
if (e !== void 0)
|
|
563
563
|
return e;
|
|
564
|
-
const
|
|
565
|
-
return e = t.keyString.get(
|
|
564
|
+
const n = s.strings.join(et);
|
|
565
|
+
return e = t.keyString.get(n), e === void 0 && (e = new Pn(s, s.getTemplateElement()), t.keyString.set(n, e)), t.stringsArray.set(s.strings, e), e;
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const Es = /* @__PURE__ */ new Map();
|
|
568
568
|
/**
|
|
569
569
|
* @license
|
|
570
570
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -578,9 +578,9 @@ const bn = /* @__PURE__ */ new Map();
|
|
|
578
578
|
* subject to an additional IP rights grant found at
|
|
579
579
|
* http://polymer.github.io/PATENTS.txt
|
|
580
580
|
*/
|
|
581
|
-
const
|
|
582
|
-
let
|
|
583
|
-
|
|
581
|
+
const bs = /* @__PURE__ */ new WeakMap(), Fs = (s, t, e) => {
|
|
582
|
+
let n = bs.get(t);
|
|
583
|
+
n === void 0 && (Je(t, t.firstChild), bs.set(t, n = new wt(Object.assign({ templateFactory: Rn }, e))), n.appendInto(t)), n.setValue(s), n.commit();
|
|
584
584
|
};
|
|
585
585
|
/**
|
|
586
586
|
* @license
|
|
@@ -596,86 +596,86 @@ const Cn = /* @__PURE__ */ new WeakMap(), Kn = (n, t, e) => {
|
|
|
596
596
|
* http://polymer.github.io/PATENTS.txt
|
|
597
597
|
*/
|
|
598
598
|
typeof window < "u" && (window.litHtmlVersions || (window.litHtmlVersions = [])).push("1.4.1");
|
|
599
|
-
const
|
|
600
|
-
function I(
|
|
601
|
-
typeof
|
|
599
|
+
const j = (s, ...t) => new _e(s, t, "html", Gs), Hn = (s, ...t) => new qs(s, t, "svg", Gs), _t = /* @__PURE__ */ new Set();
|
|
600
|
+
function I(s) {
|
|
601
|
+
typeof s == "function" && (_t.size || globalThis.queueMicrotask(() => {
|
|
602
602
|
_t.forEach((t) => t()), _t.clear();
|
|
603
|
-
}), _t.delete(
|
|
603
|
+
}), _t.delete(s), _t.add(s));
|
|
604
604
|
}
|
|
605
605
|
const Ht = [];
|
|
606
|
-
function
|
|
607
|
-
for (let
|
|
608
|
-
Ht[
|
|
606
|
+
function Wn() {
|
|
607
|
+
for (let s = Ht.length - 1; s >= 0; s--)
|
|
608
|
+
Ht[s]();
|
|
609
609
|
Ht.length = 0;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
Ht.length || I(
|
|
611
|
+
function Hr(s) {
|
|
612
|
+
Ht.length || I(Wn), Ht.push(s);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
615
|
-
const { pathname: e, search:
|
|
616
|
-
return e +
|
|
614
|
+
function Bs(s = "", t = "") {
|
|
615
|
+
const { pathname: e, search: n, hash: r } = new URL(t, location.origin + s);
|
|
616
|
+
return e + n + decodeURIComponent(r);
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
return
|
|
618
|
+
function Ks(s, t, e, n) {
|
|
619
|
+
return s.addEventListener(t, e, n), () => s.removeEventListener(t, e, n);
|
|
620
620
|
}
|
|
621
|
-
var
|
|
622
|
-
class
|
|
621
|
+
var Z, z, tt, jt, Re;
|
|
622
|
+
class In extends EventTarget {
|
|
623
623
|
constructor() {
|
|
624
624
|
super(...arguments);
|
|
625
|
-
P(this,
|
|
626
|
-
P(this,
|
|
625
|
+
P(this, jt);
|
|
626
|
+
P(this, Z, /* @__PURE__ */ new Map());
|
|
627
627
|
P(this, z, void 0);
|
|
628
|
-
P(this,
|
|
628
|
+
P(this, tt, void 0);
|
|
629
629
|
}
|
|
630
630
|
get size() {
|
|
631
|
-
return
|
|
631
|
+
return y(this, Z).size;
|
|
632
632
|
}
|
|
633
633
|
get first() {
|
|
634
|
-
return
|
|
634
|
+
return y(this, z);
|
|
635
635
|
}
|
|
636
636
|
get last() {
|
|
637
|
-
return
|
|
637
|
+
return y(this, tt);
|
|
638
638
|
}
|
|
639
639
|
isSuperLinkOf(e) {
|
|
640
|
-
let
|
|
641
|
-
if (!
|
|
640
|
+
let n = e.first;
|
|
641
|
+
if (!n)
|
|
642
642
|
return !0;
|
|
643
|
-
let
|
|
644
|
-
for (;
|
|
645
|
-
if (
|
|
643
|
+
let r = this.find(n.value);
|
|
644
|
+
for (; r && r.value === n.value; ) {
|
|
645
|
+
if (n = n.next, !n)
|
|
646
646
|
return !0;
|
|
647
|
-
|
|
647
|
+
r = r.next;
|
|
648
648
|
}
|
|
649
649
|
return !1;
|
|
650
650
|
}
|
|
651
651
|
find(e) {
|
|
652
|
-
return
|
|
652
|
+
return y(this, Z).get(e);
|
|
653
653
|
}
|
|
654
654
|
// 添加到尾部,已存在时会删除老的项目
|
|
655
655
|
// 如果是添加第一个,start 事件会在添加前触发,避免处理事件重复的逻辑
|
|
656
656
|
add(e) {
|
|
657
|
-
|
|
658
|
-
const
|
|
659
|
-
|
|
657
|
+
y(this, tt) || this.dispatchEvent(new CustomEvent("start"));
|
|
658
|
+
const n = xe(this, jt, Re).call(this, e) || { value: e };
|
|
659
|
+
n.prev = y(this, tt), n.prev && (n.prev.next = n), n.next = void 0, F(this, tt, n), y(this, z) || F(this, z, n), y(this, Z).set(e, n);
|
|
660
660
|
}
|
|
661
661
|
// 删除这个元素后没有其他元素时立即出发 end 事件
|
|
662
662
|
delete(e) {
|
|
663
|
-
const
|
|
664
|
-
return
|
|
663
|
+
const n = xe(this, jt, Re).call(this, e);
|
|
664
|
+
return y(this, z) || this.dispatchEvent(new CustomEvent("end")), n;
|
|
665
665
|
}
|
|
666
666
|
// 获取头部元素
|
|
667
667
|
// 会从链表删除
|
|
668
668
|
get() {
|
|
669
|
-
const e =
|
|
669
|
+
const e = y(this, z);
|
|
670
670
|
if (e)
|
|
671
671
|
return this.delete(e.value), e.value;
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
return
|
|
674
|
+
Z = new WeakMap(), z = new WeakMap(), tt = new WeakMap(), jt = new WeakSet(), Re = function(e) {
|
|
675
|
+
const n = y(this, Z).get(e);
|
|
676
|
+
return n && (n.prev ? n.prev.next = n.next : F(this, z, n.next), n.next ? n.next.prev = n.prev : F(this, tt, n.prev), y(this, Z).delete(e)), n;
|
|
677
677
|
};
|
|
678
|
-
class
|
|
678
|
+
class Vn extends WeakMap {
|
|
679
679
|
get(t) {
|
|
680
680
|
let e = super.get(t);
|
|
681
681
|
return e || (e = {}, this.set(t, e)), e;
|
|
@@ -698,24 +698,24 @@ class It extends URLSearchParams {
|
|
|
698
698
|
}
|
|
699
699
|
// support `{ key: ObjectValue }`
|
|
700
700
|
concat(e) {
|
|
701
|
-
let
|
|
702
|
-
typeof e == "string" ?
|
|
703
|
-
this.append(
|
|
701
|
+
let n;
|
|
702
|
+
typeof e == "string" ? n = Object.fromEntries(new URLSearchParams(e).entries()) : n = e, Object.entries(n).forEach(([r, i]) => {
|
|
703
|
+
this.append(r, y(this, gt).call(this, i));
|
|
704
704
|
});
|
|
705
705
|
}
|
|
706
|
-
setAny(e,
|
|
707
|
-
if (Array.isArray(
|
|
708
|
-
this.delete(e),
|
|
706
|
+
setAny(e, n) {
|
|
707
|
+
if (Array.isArray(n))
|
|
708
|
+
this.delete(e), n.forEach((r) => this.append(e, y(this, gt).call(this, r)));
|
|
709
709
|
else {
|
|
710
|
-
const
|
|
711
|
-
|
|
710
|
+
const r = y(this, gt).call(this, n);
|
|
711
|
+
r ? this.set(e, r) : this.delete(e);
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
getAny(e) {
|
|
715
715
|
return this.getAnyAll(e)[0];
|
|
716
716
|
}
|
|
717
717
|
getAnyAll(e) {
|
|
718
|
-
return this.getAll(e).filter((
|
|
718
|
+
return this.getAll(e).filter((n) => n !== "").map((n) => y(this, pe).call(this, n));
|
|
719
719
|
}
|
|
720
720
|
toString() {
|
|
721
721
|
const e = super.toString();
|
|
@@ -726,128 +726,123 @@ class It extends URLSearchParams {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
gt = new WeakMap(), pe = new WeakMap();
|
|
729
|
-
function Jt(
|
|
730
|
-
return
|
|
731
|
-
}
|
|
732
|
-
function
|
|
733
|
-
return Jt(
|
|
734
|
-
}
|
|
735
|
-
const
|
|
736
|
-
function
|
|
737
|
-
const e = new CSSStyleSheet(),
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
760
|
-
id: (n, ...t) => {
|
|
761
|
-
const e = Jt(n, ...t);
|
|
762
|
-
return Pn(e, "id");
|
|
763
|
-
},
|
|
764
|
-
keyframes: (n, ...t) => ({ styledContent: `@keyframes & {${Jt(n, ...t)}}`, type: "keyframes" })
|
|
729
|
+
function Jt(s, ...t) {
|
|
730
|
+
return s.reduce((e, n, r) => e + (t[r - 1] ?? "") + n);
|
|
731
|
+
}
|
|
732
|
+
function Wr(s, ...t) {
|
|
733
|
+
return Jt(s, ...t);
|
|
734
|
+
}
|
|
735
|
+
const zs = Symbol.for("gem@sheetToken");
|
|
736
|
+
function Ir(s, t) {
|
|
737
|
+
const e = new CSSStyleSheet({ media: t }), n = {};
|
|
738
|
+
let r = "";
|
|
739
|
+
return typeof s == "string" ? r = s : Object.keys(s).forEach((i) => {
|
|
740
|
+
switch (n[i] = `${i}-${ve()}`, s[i].type) {
|
|
741
|
+
case "class":
|
|
742
|
+
r += `.${n[i]} {${s[i].styledContent}}`;
|
|
743
|
+
break;
|
|
744
|
+
case "id":
|
|
745
|
+
r += `#${n[i]} {${s[i].styledContent}}`;
|
|
746
|
+
break;
|
|
747
|
+
default:
|
|
748
|
+
r += `@keyframes ${i} {${s[i].styledContent}}`;
|
|
749
|
+
}
|
|
750
|
+
}), e.replaceSync(r), n[zs] = e, n;
|
|
751
|
+
}
|
|
752
|
+
function ve(s = 5) {
|
|
753
|
+
const t = Math.random().toString(36).slice(2).slice(0, s);
|
|
754
|
+
return t.length < s ? t + ve(s - t.length) : t;
|
|
755
|
+
}
|
|
756
|
+
const Vr = {
|
|
757
|
+
class: (s, ...t) => ({ styledContent: Jt(s, ...t), type: "class" }),
|
|
758
|
+
id: (s, ...t) => ({ styledContent: Jt(s, ...t), type: "id" }),
|
|
759
|
+
keyframes: (s, ...t) => ({ styledContent: Jt(s, ...t), type: "keyframes" })
|
|
765
760
|
};
|
|
766
|
-
function
|
|
767
|
-
return
|
|
761
|
+
function G(s) {
|
|
762
|
+
return s.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase());
|
|
768
763
|
}
|
|
769
|
-
function ot(
|
|
770
|
-
return
|
|
764
|
+
function ot(s) {
|
|
765
|
+
return s.replace(/-(.)/g, (t, e) => e.toUpperCase());
|
|
771
766
|
}
|
|
772
|
-
function
|
|
773
|
-
return Object.keys(
|
|
767
|
+
function Xe(s) {
|
|
768
|
+
return Object.keys(s).forEach((t) => {
|
|
774
769
|
const e = t;
|
|
775
|
-
delete
|
|
776
|
-
}),
|
|
770
|
+
delete s[e];
|
|
771
|
+
}), s;
|
|
777
772
|
}
|
|
778
|
-
class
|
|
773
|
+
class J extends Error {
|
|
779
774
|
constructor(t) {
|
|
780
775
|
super(t), this.message = `gem: ${this.message}`;
|
|
781
776
|
}
|
|
782
777
|
}
|
|
783
|
-
function
|
|
784
|
-
const e =
|
|
778
|
+
function Dn(s, t) {
|
|
779
|
+
const e = s.length;
|
|
785
780
|
if (t.length !== e)
|
|
786
781
|
return !0;
|
|
787
|
-
for (let
|
|
788
|
-
if (n
|
|
782
|
+
for (let n = 0; n < e; n++)
|
|
783
|
+
if (s[n] !== t[n])
|
|
789
784
|
return !0;
|
|
790
785
|
return !1;
|
|
791
786
|
}
|
|
792
|
-
function
|
|
787
|
+
function qn(s, t) {
|
|
793
788
|
const e = new Set(t);
|
|
794
|
-
return
|
|
789
|
+
return s.filter((n) => e.has(n) ? (e.delete(n), !1) : !0);
|
|
795
790
|
}
|
|
796
|
-
function
|
|
797
|
-
let
|
|
798
|
-
for (const
|
|
799
|
-
const
|
|
800
|
-
|
|
791
|
+
function Ze(s, t, e) {
|
|
792
|
+
let n = t;
|
|
793
|
+
for (const r in s) {
|
|
794
|
+
const i = e(r, s[r]);
|
|
795
|
+
n += i ? i + t : "";
|
|
801
796
|
}
|
|
802
|
-
return
|
|
797
|
+
return n;
|
|
803
798
|
}
|
|
804
|
-
function
|
|
805
|
-
return
|
|
806
|
-
|
|
799
|
+
function Dr(s) {
|
|
800
|
+
return Ze(
|
|
801
|
+
s,
|
|
807
802
|
";",
|
|
808
|
-
(t, e) => e || e === 0 ? `${
|
|
803
|
+
(t, e) => e || e === 0 ? `${G(t)}:${e}` : ""
|
|
809
804
|
);
|
|
810
805
|
}
|
|
811
|
-
function
|
|
812
|
-
return
|
|
806
|
+
function Un(s) {
|
|
807
|
+
return Ze(s, " ", (t, e) => e ? t : "");
|
|
813
808
|
}
|
|
814
|
-
const
|
|
815
|
-
function
|
|
816
|
-
return
|
|
817
|
-
|
|
809
|
+
const qr = Un;
|
|
810
|
+
function Ur(s) {
|
|
811
|
+
return Ze(
|
|
812
|
+
s,
|
|
818
813
|
",",
|
|
819
814
|
(t, e) => e === !0 || t === e ? t : e ? `${t}:${e}` : ""
|
|
820
815
|
);
|
|
821
816
|
}
|
|
822
817
|
const Vt = /* @__PURE__ */ new WeakMap();
|
|
823
|
-
function Ft(
|
|
824
|
-
if (Vt.has(
|
|
825
|
-
throw new
|
|
826
|
-
return Vt.set(
|
|
818
|
+
function Ft(s) {
|
|
819
|
+
if (Vt.has(s))
|
|
820
|
+
throw new J("argument error");
|
|
821
|
+
return Vt.set(s, /* @__PURE__ */ new Set()), s;
|
|
827
822
|
}
|
|
828
|
-
function
|
|
823
|
+
function st(s, t) {
|
|
829
824
|
var e;
|
|
830
|
-
Object.assign(
|
|
831
|
-
I(
|
|
825
|
+
Object.assign(s, t), (e = Vt.get(s)) == null || e.forEach((n) => {
|
|
826
|
+
I(n);
|
|
832
827
|
});
|
|
833
828
|
}
|
|
834
|
-
function
|
|
835
|
-
const t = Ft(
|
|
836
|
-
return [t, (e) =>
|
|
829
|
+
function ts(s) {
|
|
830
|
+
const t = Ft(s);
|
|
831
|
+
return [t, (e) => st(t, e)];
|
|
837
832
|
}
|
|
838
|
-
function ct(
|
|
839
|
-
const e = Vt.get(
|
|
833
|
+
function ct(s, t) {
|
|
834
|
+
const e = Vt.get(s);
|
|
840
835
|
return e == null || e.add(t), () => {
|
|
841
836
|
e == null || e.delete(t);
|
|
842
837
|
};
|
|
843
838
|
}
|
|
844
|
-
function
|
|
845
|
-
const e = Vt.get(
|
|
839
|
+
function jr(s, t) {
|
|
840
|
+
const e = Vt.get(s);
|
|
846
841
|
e == null || e.delete(t);
|
|
847
842
|
}
|
|
848
|
-
const
|
|
843
|
+
const jn = "1.7.12", Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
849
844
|
__proto__: null,
|
|
850
|
-
version:
|
|
845
|
+
version: jn
|
|
851
846
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
852
847
|
/**
|
|
853
848
|
* @license
|
|
@@ -862,66 +857,66 @@ const Ks = "1.7.11", zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
862
857
|
* subject to an additional IP rights grant found at
|
|
863
858
|
* http://polymer.github.io/PATENTS.txt
|
|
864
859
|
*/
|
|
865
|
-
const
|
|
866
|
-
const e =
|
|
867
|
-
e.insertBefore(U(),
|
|
868
|
-
const
|
|
869
|
-
return
|
|
870
|
-
},
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
},
|
|
874
|
-
|
|
875
|
-
},
|
|
876
|
-
const
|
|
877
|
-
for (let
|
|
878
|
-
|
|
879
|
-
return
|
|
880
|
-
},
|
|
881
|
-
let
|
|
882
|
-
return e === void 0 ? e = t : t !== void 0 && (
|
|
883
|
-
if (!(
|
|
860
|
+
const xs = (s, t) => {
|
|
861
|
+
const e = s.startNode.parentNode, n = t === void 0 ? s.endNode : t.startNode, r = e.insertBefore(U(), n);
|
|
862
|
+
e.insertBefore(U(), n);
|
|
863
|
+
const i = new wt(s.options);
|
|
864
|
+
return i.insertAfterNode(r), i;
|
|
865
|
+
}, nt = (s, t) => (s.setValue(t), s.commit(), s), Ce = (s, t, e) => {
|
|
866
|
+
const n = s.startNode.parentNode, r = e ? e.startNode : s.endNode, i = t.endNode.nextSibling;
|
|
867
|
+
i !== r && Vs(n, t.startNode, i, r);
|
|
868
|
+
}, Pe = (s) => {
|
|
869
|
+
Je(s.startNode.parentNode, s.startNode, s.endNode.nextSibling);
|
|
870
|
+
}, Cs = (s, t, e) => {
|
|
871
|
+
const n = /* @__PURE__ */ new Map();
|
|
872
|
+
for (let r = t; r <= e; r++)
|
|
873
|
+
n.set(s[r], r);
|
|
874
|
+
return n;
|
|
875
|
+
}, Ps = /* @__PURE__ */ new WeakMap(), $s = /* @__PURE__ */ new WeakMap(), Fn = we((s, t, e) => {
|
|
876
|
+
let n;
|
|
877
|
+
return e === void 0 ? e = t : t !== void 0 && (n = t), (r) => {
|
|
878
|
+
if (!(r instanceof wt))
|
|
884
879
|
throw new Error("repeat can only be used in text bindings");
|
|
885
|
-
const
|
|
886
|
-
let
|
|
887
|
-
for (const
|
|
888
|
-
|
|
889
|
-
let
|
|
890
|
-
for (;
|
|
891
|
-
if (
|
|
892
|
-
|
|
893
|
-
else if (
|
|
894
|
-
|
|
895
|
-
else if (o[
|
|
896
|
-
a[
|
|
897
|
-
else if (o[
|
|
898
|
-
a[_] =
|
|
899
|
-
else if (o[
|
|
900
|
-
a[_] =
|
|
901
|
-
else if (o[
|
|
902
|
-
a[
|
|
903
|
-
else if (
|
|
904
|
-
|
|
905
|
-
else if (!
|
|
906
|
-
|
|
880
|
+
const i = Ps.get(r) || [], o = $s.get(r) || [], a = [], c = [], l = [];
|
|
881
|
+
let f = 0;
|
|
882
|
+
for (const w of s)
|
|
883
|
+
l[f] = n ? n(w, f) : f, c[f] = e(w, f), f++;
|
|
884
|
+
let h, g, u = 0, p = i.length - 1, m = 0, _ = c.length - 1;
|
|
885
|
+
for (; u <= p && m <= _; )
|
|
886
|
+
if (i[u] === null)
|
|
887
|
+
u++;
|
|
888
|
+
else if (i[p] === null)
|
|
889
|
+
p--;
|
|
890
|
+
else if (o[u] === l[m])
|
|
891
|
+
a[m] = nt(i[u], c[m]), u++, m++;
|
|
892
|
+
else if (o[p] === l[_])
|
|
893
|
+
a[_] = nt(i[p], c[_]), p--, _--;
|
|
894
|
+
else if (o[u] === l[_])
|
|
895
|
+
a[_] = nt(i[u], c[_]), Ce(r, i[u], a[_ + 1]), u++, _--;
|
|
896
|
+
else if (o[p] === l[m])
|
|
897
|
+
a[m] = nt(i[p], c[m]), Ce(r, i[p], i[u]), p--, m++;
|
|
898
|
+
else if (h === void 0 && (h = Cs(l, m, _), g = Cs(o, u, p)), !h.has(o[u]))
|
|
899
|
+
Pe(i[u]), u++;
|
|
900
|
+
else if (!h.has(o[p]))
|
|
901
|
+
Pe(i[p]), p--;
|
|
907
902
|
else {
|
|
908
|
-
const
|
|
903
|
+
const w = g.get(l[m]), H = w !== void 0 ? i[w] : null;
|
|
909
904
|
if (H === null) {
|
|
910
|
-
const
|
|
911
|
-
|
|
905
|
+
const O = xs(r, i[u]);
|
|
906
|
+
nt(O, c[m]), a[m] = O;
|
|
912
907
|
} else
|
|
913
|
-
a[
|
|
914
|
-
|
|
908
|
+
a[m] = nt(H, c[m]), Ce(r, H, i[u]), i[w] = null;
|
|
909
|
+
m++;
|
|
915
910
|
}
|
|
916
|
-
for (;
|
|
917
|
-
const
|
|
918
|
-
|
|
911
|
+
for (; m <= _; ) {
|
|
912
|
+
const w = xs(r, a[_ + 1]);
|
|
913
|
+
nt(w, c[m]), a[m++] = w;
|
|
919
914
|
}
|
|
920
|
-
for (;
|
|
921
|
-
const
|
|
922
|
-
|
|
915
|
+
for (; u <= p; ) {
|
|
916
|
+
const w = i[u++];
|
|
917
|
+
w !== null && Pe(w);
|
|
923
918
|
}
|
|
924
|
-
|
|
919
|
+
Ps.set(r, a), $s.set(r, l);
|
|
925
920
|
};
|
|
926
921
|
});
|
|
927
922
|
/**
|
|
@@ -937,14 +932,14 @@ const $n = (n, t) => {
|
|
|
937
932
|
* subject to an additional IP rights grant found at
|
|
938
933
|
* http://polymer.github.io/PATENTS.txt
|
|
939
934
|
*/
|
|
940
|
-
const
|
|
941
|
-
const
|
|
942
|
-
if (Array.isArray(
|
|
943
|
-
if (Array.isArray(
|
|
935
|
+
const $e = /* @__PURE__ */ new WeakMap(), Bn = we((s, t) => (e) => {
|
|
936
|
+
const n = $e.get(e);
|
|
937
|
+
if (Array.isArray(s)) {
|
|
938
|
+
if (Array.isArray(n) && n.length === s.length && s.every((r, i) => r === n[i]))
|
|
944
939
|
return;
|
|
945
|
-
} else if (
|
|
940
|
+
} else if (n === s && (s !== void 0 || $e.has(e)))
|
|
946
941
|
return;
|
|
947
|
-
e.setValue(t()),
|
|
942
|
+
e.setValue(t()), $e.set(e, Array.isArray(s) ? Array.from(s) : s);
|
|
948
943
|
});
|
|
949
944
|
/**
|
|
950
945
|
* @license
|
|
@@ -959,121 +954,121 @@ const Te = /* @__PURE__ */ new WeakMap(), Ys = we((n, t) => (e) => {
|
|
|
959
954
|
* subject to an additional IP rights grant found at
|
|
960
955
|
* http://polymer.github.io/PATENTS.txt
|
|
961
956
|
*/
|
|
962
|
-
const
|
|
963
|
-
const e =
|
|
964
|
-
if (
|
|
965
|
-
if (e !== void 0 || !
|
|
966
|
-
const
|
|
967
|
-
t.committer.element.removeAttribute(
|
|
957
|
+
const Te = /* @__PURE__ */ new WeakMap(), Js = we((s) => (t) => {
|
|
958
|
+
const e = Te.get(t);
|
|
959
|
+
if (s === void 0 && t instanceof Qe) {
|
|
960
|
+
if (e !== void 0 || !Te.has(t)) {
|
|
961
|
+
const n = t.committer.name;
|
|
962
|
+
t.committer.element.removeAttribute(n);
|
|
968
963
|
}
|
|
969
964
|
} else
|
|
970
|
-
|
|
971
|
-
|
|
965
|
+
s !== e && t.setValue(s);
|
|
966
|
+
Te.set(t, s);
|
|
972
967
|
});
|
|
973
|
-
var
|
|
974
|
-
if (!t.has(
|
|
968
|
+
var Ys = (s, t, e) => {
|
|
969
|
+
if (!t.has(s))
|
|
975
970
|
throw TypeError("Cannot " + e);
|
|
976
|
-
},
|
|
977
|
-
if (t.has(
|
|
971
|
+
}, d = (s, t, e) => (Ys(s, t, "read from private field"), e ? e.call(s) : t.get(s)), S = (s, t, e) => {
|
|
972
|
+
if (t.has(s))
|
|
978
973
|
throw TypeError("Cannot add the same private member more than once");
|
|
979
|
-
t instanceof WeakSet ? t.add(
|
|
980
|
-
},
|
|
981
|
-
function
|
|
974
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
975
|
+
}, L = (s, t, e, n) => (Ys(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e), ft, Ct, Q, Pt, B, $t, K, X, Yt, Qt, He, We, Ie, Xt, Ve, Zt, rt, De, te, ee, se;
|
|
976
|
+
function Kn() {
|
|
982
977
|
}
|
|
983
|
-
function Le(
|
|
984
|
-
typeof
|
|
978
|
+
function Le(s) {
|
|
979
|
+
typeof s == "function" && s();
|
|
985
980
|
}
|
|
986
|
-
const ce = new
|
|
987
|
-
if (performance.now() >
|
|
988
|
-
return requestAnimationFrame(
|
|
981
|
+
const ce = new In(), qe = (s = performance.now()) => {
|
|
982
|
+
if (performance.now() > s + 16)
|
|
983
|
+
return requestAnimationFrame(qe);
|
|
989
984
|
const t = ce.get();
|
|
990
|
-
t && (t(),
|
|
985
|
+
t && (t(), qe(s));
|
|
991
986
|
};
|
|
992
|
-
ce.addEventListener("start", () => I(
|
|
993
|
-
const Kt = Symbol("constructor"), he = Symbol("init"),
|
|
987
|
+
ce.addEventListener("start", () => I(qe));
|
|
988
|
+
const Kt = Symbol("constructor"), he = Symbol("init"), Qs = Symbol("update"), Xs = class Tt extends HTMLElement {
|
|
994
989
|
constructor(t = {}) {
|
|
995
|
-
super(),
|
|
990
|
+
super(), S(this, Ct, void 0), S(this, Q, void 0), S(this, Pt, void 0), S(this, B, void 0), S(this, $t, void 0), S(this, K, void 0), S(this, X, void 0), S(this, Yt, void 0), this.setState = (r) => {
|
|
996
991
|
if (!this.state)
|
|
997
|
-
throw new
|
|
998
|
-
Object.assign(this.state,
|
|
999
|
-
},
|
|
1000
|
-
|
|
1001
|
-
const { callback: o, getDep: a, values: c, preCallback:
|
|
1002
|
-
(!a || !c ||
|
|
992
|
+
throw new J("`state` not initialized");
|
|
993
|
+
Object.assign(this.state, r), I(d(this, rt));
|
|
994
|
+
}, S(this, Qt, (r) => {
|
|
995
|
+
r == null || r.forEach((i) => {
|
|
996
|
+
const { callback: o, getDep: a, values: c, preCallback: l } = i, f = a == null ? void 0 : a();
|
|
997
|
+
(!a || !c || Dn(c, f)) && (Le(l), i.preCallback = o(f, c), i.values = f);
|
|
1003
998
|
});
|
|
1004
|
-
}),
|
|
1005
|
-
|
|
1006
|
-
}),
|
|
1007
|
-
|
|
1008
|
-
}), this.effect = (
|
|
1009
|
-
|
|
999
|
+
}), S(this, He, () => {
|
|
1000
|
+
d(this, Qt).call(this, d(this, K));
|
|
1001
|
+
}), S(this, We, () => {
|
|
1002
|
+
d(this, Qt).call(this, d(this, X));
|
|
1003
|
+
}), this.effect = (r, i) => {
|
|
1004
|
+
d(this, K) || L(this, K, []);
|
|
1010
1005
|
const o = {
|
|
1011
|
-
callback:
|
|
1012
|
-
getDep:
|
|
1013
|
-
initialized:
|
|
1006
|
+
callback: r,
|
|
1007
|
+
getDep: i,
|
|
1008
|
+
initialized: d(this, B),
|
|
1014
1009
|
inConstructor: this[Kt]
|
|
1015
1010
|
};
|
|
1016
|
-
|
|
1017
|
-
}, this.memo = (
|
|
1018
|
-
|
|
1019
|
-
callback:
|
|
1020
|
-
getDep:
|
|
1011
|
+
d(this, B) && (o.values = i == null ? void 0 : i(), o.preCallback = r(o.values)), d(this, K).push(o);
|
|
1012
|
+
}, this.memo = (r, i) => {
|
|
1013
|
+
d(this, X) || L(this, X, []), d(this, X).push({
|
|
1014
|
+
callback: r,
|
|
1015
|
+
getDep: i,
|
|
1021
1016
|
inConstructor: this[Kt]
|
|
1022
1017
|
});
|
|
1023
|
-
},
|
|
1024
|
-
var
|
|
1025
|
-
(
|
|
1026
|
-
const { callback: o, getDep: a, initialized: c } =
|
|
1027
|
-
c || (
|
|
1018
|
+
}, S(this, Ie, () => {
|
|
1019
|
+
var r;
|
|
1020
|
+
(r = d(this, K)) == null || r.forEach((i) => {
|
|
1021
|
+
const { callback: o, getDep: a, initialized: c } = i;
|
|
1022
|
+
c || (i.values = a == null ? void 0 : a(), i.preCallback = o(i.values), i.initialized = !0);
|
|
1028
1023
|
});
|
|
1029
|
-
}),
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1033
|
-
}),
|
|
1034
|
-
|
|
1035
|
-
}),
|
|
1036
|
-
|
|
1024
|
+
}), S(this, Xt, () => {
|
|
1025
|
+
d(this, We).call(this);
|
|
1026
|
+
const r = d(this, Ct) === this, i = this.render ? this.render() : r ? void 0 : j`<slot></slot>`;
|
|
1027
|
+
i !== void 0 && Fs(i, d(this, Ct));
|
|
1028
|
+
}), S(this, Ve, () => this.shouldUpdate ? this.shouldUpdate() : !0), S(this, Zt, () => {
|
|
1029
|
+
d(this, B) && d(this, Ve).call(this) && (d(this, Xt).call(this), I(d(this, De)), I(d(this, He)));
|
|
1030
|
+
}), S(this, rt, () => {
|
|
1031
|
+
d(this, $t) ? ce.add(d(this, Zt)) : d(this, Zt).call(this);
|
|
1037
1032
|
}), this.update = () => {
|
|
1038
|
-
I(
|
|
1039
|
-
},
|
|
1040
|
-
var
|
|
1041
|
-
(
|
|
1042
|
-
}),
|
|
1033
|
+
I(d(this, rt));
|
|
1034
|
+
}, S(this, De, () => {
|
|
1035
|
+
var r;
|
|
1036
|
+
(r = this.updated) == null || r.call(this);
|
|
1037
|
+
}), S(this, te, void 0), S(this, ee, () => {
|
|
1043
1038
|
var o, a, c;
|
|
1044
|
-
if (
|
|
1045
|
-
|
|
1039
|
+
if (d(this, Pt)) {
|
|
1040
|
+
L(this, Pt, !1);
|
|
1046
1041
|
return;
|
|
1047
1042
|
}
|
|
1048
1043
|
Reflect.set(this, Kt, !1), (o = this.willMount) == null || o.call(this);
|
|
1049
|
-
const { observedStores:
|
|
1050
|
-
if (
|
|
1051
|
-
throw new
|
|
1052
|
-
}),
|
|
1053
|
-
|
|
1054
|
-
}),
|
|
1044
|
+
const { observedStores: r, rootElement: i } = this.constructor;
|
|
1045
|
+
if (L(this, te, r == null ? void 0 : r.map((l) => ct(l, d(this, rt)))), d(this, Xt).call(this), L(this, B, !0), L(this, Yt, (a = this.mounted) == null ? void 0 : a.call(this)), d(this, Ie).call(this), i && this.isConnected && ((c = this.getRootNode().host) == null ? void 0 : c.tagName) !== i.toUpperCase())
|
|
1046
|
+
throw new J("not allow current root type");
|
|
1047
|
+
}), S(this, se, (r) => r == null ? void 0 : r.filter((i) => (Le(i.preCallback), i.initialized = !1, i.inConstructor))), I(() => Reflect.set(this, he, !1)), Reflect.set(this, Kt, !0), Reflect.set(this, he, !0), Reflect.set(this, Qs, () => {
|
|
1048
|
+
d(this, B) && I(d(this, rt));
|
|
1049
|
+
}), L(this, $t, t.isAsync), L(this, Ct, t.isLight ? this : this.attachShadow({
|
|
1055
1050
|
mode: t.mode || "open",
|
|
1056
1051
|
delegatesFocus: t.delegatesFocus,
|
|
1057
1052
|
slotAssignment: t.slotAssignment
|
|
1058
1053
|
}));
|
|
1059
1054
|
let e;
|
|
1060
1055
|
this.effect(
|
|
1061
|
-
([
|
|
1062
|
-
if (e === void 0 && (e = this.hasAttribute("tabindex")), this.internals.ariaDisabled = String(
|
|
1063
|
-
return
|
|
1056
|
+
([r = !1]) => {
|
|
1057
|
+
if (e === void 0 && (e = this.hasAttribute("tabindex")), this.internals.ariaDisabled = String(r), t.focusable && !e && (this.tabIndex = -Number(r)), (t.focusable || t.delegatesFocus) && r)
|
|
1058
|
+
return Ks(this, "click", (i) => i.isTrusted && i.stopImmediatePropagation(), {
|
|
1064
1059
|
capture: !0
|
|
1065
1060
|
});
|
|
1066
1061
|
},
|
|
1067
1062
|
() => [Reflect.get(this, "disabled")]
|
|
1068
1063
|
);
|
|
1069
|
-
const { adoptedStyleSheets:
|
|
1070
|
-
if (
|
|
1071
|
-
const
|
|
1072
|
-
this.shadowRoot ? this.shadowRoot.adoptedStyleSheets =
|
|
1064
|
+
const { adoptedStyleSheets: n } = new.target;
|
|
1065
|
+
if (n) {
|
|
1066
|
+
const r = n.map((i) => i[zs] || i);
|
|
1067
|
+
this.shadowRoot ? this.shadowRoot.adoptedStyleSheets = r : this.effect(
|
|
1073
1068
|
() => {
|
|
1074
|
-
const
|
|
1075
|
-
return
|
|
1076
|
-
|
|
1069
|
+
const i = this.getRootNode();
|
|
1070
|
+
return i.adoptedStyleSheets = [...i.adoptedStyleSheets, ...r], () => {
|
|
1071
|
+
i.adoptedStyleSheets = qn(i.adoptedStyleSheets, r);
|
|
1077
1072
|
};
|
|
1078
1073
|
},
|
|
1079
1074
|
() => []
|
|
@@ -1081,12 +1076,12 @@ const Kt = Symbol("constructor"), he = Symbol("init"), Zn = Symbol("update"), ts
|
|
|
1081
1076
|
}
|
|
1082
1077
|
}
|
|
1083
1078
|
get internals() {
|
|
1084
|
-
if (!
|
|
1085
|
-
|
|
1079
|
+
if (!d(this, Q)) {
|
|
1080
|
+
L(this, Q, this.attachInternals());
|
|
1086
1081
|
try {
|
|
1087
|
-
|
|
1082
|
+
d(this, Q).states.add("foo"), d(this, Q).states.delete("foo");
|
|
1088
1083
|
} catch {
|
|
1089
|
-
Reflect.defineProperty(
|
|
1084
|
+
Reflect.defineProperty(d(this, Q), "states", {
|
|
1090
1085
|
value: {
|
|
1091
1086
|
has: (t) => ot(t) in this.dataset,
|
|
1092
1087
|
add: (t) => this.dataset[ot(t)] = "",
|
|
@@ -1095,7 +1090,7 @@ const Kt = Symbol("constructor"), he = Symbol("init"), Zn = Symbol("update"), ts
|
|
|
1095
1090
|
});
|
|
1096
1091
|
}
|
|
1097
1092
|
}
|
|
1098
|
-
return
|
|
1093
|
+
return d(this, Q);
|
|
1099
1094
|
}
|
|
1100
1095
|
/**
|
|
1101
1096
|
* @private
|
|
@@ -1103,21 +1098,14 @@ const Kt = Symbol("constructor"), he = Symbol("init"), Zn = Symbol("update"), ts
|
|
|
1103
1098
|
* use `effect`
|
|
1104
1099
|
*/
|
|
1105
1100
|
attributeChangedCallback() {
|
|
1106
|
-
return
|
|
1101
|
+
return d(this, B) && I(d(this, rt)), d(Tt, ft);
|
|
1107
1102
|
}
|
|
1108
1103
|
closestElement(t) {
|
|
1109
|
-
const e = typeof t == "function",
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
if (o.constructor === t)
|
|
1115
|
-
return o;
|
|
1116
|
-
} else if (o.tagName === s)
|
|
1117
|
-
return o;
|
|
1118
|
-
return i(o);
|
|
1119
|
-
};
|
|
1120
|
-
return i(this);
|
|
1104
|
+
const e = typeof t == "function", n = typeof t == "string" && t.toUpperCase(), r = (o) => e ? o.constructor === t : o.tagName === n;
|
|
1105
|
+
let i = this;
|
|
1106
|
+
for (; i && !r(i); )
|
|
1107
|
+
i = i.parentElement || i.getRootNode().host;
|
|
1108
|
+
return i;
|
|
1121
1109
|
}
|
|
1122
1110
|
/**
|
|
1123
1111
|
* @private
|
|
@@ -1125,14 +1113,14 @@ const Kt = Symbol("constructor"), he = Symbol("init"), Zn = Symbol("update"), ts
|
|
|
1125
1113
|
* use `mounted`; 允许手动调用 `connectedCallback` 以清除装饰器定义的字段
|
|
1126
1114
|
*/
|
|
1127
1115
|
connectedCallback() {
|
|
1128
|
-
return this.isConnected &&
|
|
1116
|
+
return this.isConnected && d(this, $t) ? ce.add(d(this, ee)) : d(this, ee).call(this), d(Tt, ft);
|
|
1129
1117
|
}
|
|
1130
1118
|
/**
|
|
1131
1119
|
* @private
|
|
1132
1120
|
* @final
|
|
1133
1121
|
*/
|
|
1134
1122
|
adoptedCallback() {
|
|
1135
|
-
return
|
|
1123
|
+
return d(Tt, ft);
|
|
1136
1124
|
}
|
|
1137
1125
|
/**
|
|
1138
1126
|
* @private
|
|
@@ -1142,254 +1130,258 @@ const Kt = Symbol("constructor"), he = Symbol("init"), Zn = Symbol("update"), ts
|
|
|
1142
1130
|
disconnectedCallback() {
|
|
1143
1131
|
var t, e;
|
|
1144
1132
|
if (this.isConnected) {
|
|
1145
|
-
|
|
1133
|
+
L(this, Pt, !0);
|
|
1146
1134
|
return;
|
|
1147
1135
|
}
|
|
1148
|
-
return
|
|
1136
|
+
return L(this, B, !1), (t = d(this, te)) == null || t.forEach((n) => n()), Le(d(this, Yt)), (e = this.unmounted) == null || e.call(this), L(this, K, d(this, se).call(this, d(this, K))), L(this, X, d(this, se).call(this, d(this, X))), d(Tt, ft);
|
|
1149
1137
|
}
|
|
1150
1138
|
};
|
|
1151
1139
|
ft = /* @__PURE__ */ new WeakMap();
|
|
1152
1140
|
Ct = /* @__PURE__ */ new WeakMap();
|
|
1153
|
-
|
|
1141
|
+
Q = /* @__PURE__ */ new WeakMap();
|
|
1154
1142
|
Pt = /* @__PURE__ */ new WeakMap();
|
|
1155
1143
|
B = /* @__PURE__ */ new WeakMap();
|
|
1156
1144
|
$t = /* @__PURE__ */ new WeakMap();
|
|
1157
1145
|
K = /* @__PURE__ */ new WeakMap();
|
|
1158
|
-
|
|
1146
|
+
X = /* @__PURE__ */ new WeakMap();
|
|
1159
1147
|
Yt = /* @__PURE__ */ new WeakMap();
|
|
1160
1148
|
Qt = /* @__PURE__ */ new WeakMap();
|
|
1149
|
+
He = /* @__PURE__ */ new WeakMap();
|
|
1161
1150
|
We = /* @__PURE__ */ new WeakMap();
|
|
1162
1151
|
Ie = /* @__PURE__ */ new WeakMap();
|
|
1163
|
-
Ve = /* @__PURE__ */ new WeakMap();
|
|
1164
1152
|
Xt = /* @__PURE__ */ new WeakMap();
|
|
1165
|
-
|
|
1153
|
+
Ve = /* @__PURE__ */ new WeakMap();
|
|
1166
1154
|
Zt = /* @__PURE__ */ new WeakMap();
|
|
1167
|
-
|
|
1168
|
-
|
|
1155
|
+
rt = /* @__PURE__ */ new WeakMap();
|
|
1156
|
+
De = /* @__PURE__ */ new WeakMap();
|
|
1169
1157
|
te = /* @__PURE__ */ new WeakMap();
|
|
1170
1158
|
ee = /* @__PURE__ */ new WeakMap();
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
let
|
|
1174
|
-
const le = new
|
|
1175
|
-
function
|
|
1176
|
-
const { booleanAttributes:
|
|
1177
|
-
Object.defineProperty(
|
|
1159
|
+
se = /* @__PURE__ */ new WeakMap();
|
|
1160
|
+
S(Xs, ft, Symbol());
|
|
1161
|
+
let R = Xs;
|
|
1162
|
+
const le = new Vn();
|
|
1163
|
+
function es(s, t, e) {
|
|
1164
|
+
const { booleanAttributes: n, numberAttributes: r } = s.constructor;
|
|
1165
|
+
Object.defineProperty(s, t, {
|
|
1178
1166
|
configurable: !0,
|
|
1179
1167
|
get() {
|
|
1180
1168
|
if (!(he in this))
|
|
1181
1169
|
return;
|
|
1182
1170
|
const o = this.getAttribute(e);
|
|
1183
|
-
return
|
|
1171
|
+
return n != null && n.has(e) ? o !== null : r != null && r.has(e) ? Number(o) : o || "";
|
|
1184
1172
|
},
|
|
1185
|
-
set(
|
|
1186
|
-
const o = this, a = le.get(this), c = a[t],
|
|
1187
|
-
if (this[he] &&
|
|
1173
|
+
set(i) {
|
|
1174
|
+
const o = this, a = le.get(this), c = a[t], l = o.getAttribute(e);
|
|
1175
|
+
if (this[he] && l !== null && !c)
|
|
1188
1176
|
return;
|
|
1189
1177
|
a[t] = !0;
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1178
|
+
const f = n == null ? void 0 : n.has(e);
|
|
1179
|
+
i == null ? o.removeAttribute(e) : f ? o.toggleAttribute(e, !!i) : l !== String(i) && o.setAttribute(e, String(i));
|
|
1192
1180
|
}
|
|
1193
1181
|
});
|
|
1194
1182
|
}
|
|
1195
|
-
const
|
|
1196
|
-
function Dt(
|
|
1197
|
-
Object.defineProperty(
|
|
1183
|
+
const Ts = Symbol("event handle");
|
|
1184
|
+
function Dt(s, t, e, n) {
|
|
1185
|
+
Object.defineProperty(s, t, {
|
|
1198
1186
|
configurable: !0,
|
|
1199
1187
|
get() {
|
|
1200
|
-
const
|
|
1201
|
-
return
|
|
1188
|
+
const r = le.get(this)[t];
|
|
1189
|
+
return r || !e ? r : (this[t] = Kn, this[t]);
|
|
1202
1190
|
},
|
|
1203
|
-
set(
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1208
|
-
}, Reflect.set(o[t],
|
|
1191
|
+
set(r) {
|
|
1192
|
+
const i = this, o = le.get(i);
|
|
1193
|
+
r !== o[t] && (e ? (o[t] = r != null && r[Ts] ? r : (a, c) => {
|
|
1194
|
+
const l = new CustomEvent(e, { ...c, ...n, detail: a });
|
|
1195
|
+
i.dispatchEvent(l), r(a, c);
|
|
1196
|
+
}, Reflect.set(o[t], Ts, !0)) : (o[t] = r, this[Qs]()));
|
|
1209
1197
|
}
|
|
1210
1198
|
});
|
|
1211
1199
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1200
|
+
const Ls = (s) => [...s.querySelectorAll("[data-gem-reflect]")].map((t) => t.target);
|
|
1201
|
+
function ss(s, t, e) {
|
|
1202
|
+
const n = `[ref=${e}]`;
|
|
1203
|
+
Object.defineProperty(s, t, {
|
|
1214
1204
|
configurable: !0,
|
|
1215
1205
|
get() {
|
|
1216
|
-
const
|
|
1217
|
-
let i =
|
|
1206
|
+
const r = le.get(this);
|
|
1207
|
+
let i = r[t];
|
|
1218
1208
|
if (!i) {
|
|
1219
|
-
const
|
|
1209
|
+
const o = this, a = o.shadowRoot || o;
|
|
1220
1210
|
i = {
|
|
1221
1211
|
get ref() {
|
|
1222
1212
|
return e;
|
|
1223
1213
|
},
|
|
1224
1214
|
get element() {
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
return h;
|
|
1215
|
+
for (const c of [a, ...Ls(a)]) {
|
|
1216
|
+
const l = c.querySelector(n);
|
|
1217
|
+
if (l)
|
|
1218
|
+
return l;
|
|
1230
1219
|
}
|
|
1220
|
+
},
|
|
1221
|
+
get elements() {
|
|
1222
|
+
return [a, ...Ls(a)].map((c) => [...c.querySelectorAll(n)]).flat();
|
|
1231
1223
|
}
|
|
1232
|
-
},
|
|
1224
|
+
}, r[t] = i;
|
|
1233
1225
|
}
|
|
1234
1226
|
return i;
|
|
1235
1227
|
}
|
|
1236
1228
|
});
|
|
1237
1229
|
}
|
|
1238
|
-
function
|
|
1239
|
-
Object.defineProperty(
|
|
1230
|
+
function ns(s, t, e) {
|
|
1231
|
+
Object.defineProperty(s, t, {
|
|
1240
1232
|
configurable: !0,
|
|
1241
1233
|
get() {
|
|
1242
|
-
const
|
|
1243
|
-
return
|
|
1234
|
+
const n = this, { states: r } = n.internals;
|
|
1235
|
+
return r == null ? void 0 : r.has(e);
|
|
1244
1236
|
},
|
|
1245
|
-
set(
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1237
|
+
set(n) {
|
|
1238
|
+
const r = this, { states: i } = r.internals;
|
|
1239
|
+
n ? i == null || i.add(e) : i == null || i.delete(e);
|
|
1248
1240
|
}
|
|
1249
1241
|
});
|
|
1250
1242
|
}
|
|
1251
|
-
const
|
|
1252
|
-
customElements.define = (
|
|
1253
|
-
if (t.prototype instanceof
|
|
1254
|
-
const { observedAttributes:
|
|
1255
|
-
|
|
1243
|
+
const rs = customElements.define.bind(customElements);
|
|
1244
|
+
customElements.define = (s, t, e) => {
|
|
1245
|
+
if (t.prototype instanceof R) {
|
|
1246
|
+
const { observedAttributes: n, observedProperties: r, defineEvents: i, defineCSSStates: o, defineRefs: a } = t;
|
|
1247
|
+
n == null || n.forEach((c) => es(t.prototype, ot(c), c)), r == null || r.forEach((c) => Dt(t.prototype, c)), i == null || i.forEach((c) => Dt(t.prototype, ot(c), c)), o == null || o.forEach((c) => ns(t.prototype, ot(c), c)), a == null || a.forEach((c) => ss(t.prototype, ot(c), c));
|
|
1256
1248
|
}
|
|
1257
|
-
|
|
1249
|
+
rs(s, t, e);
|
|
1258
1250
|
};
|
|
1259
|
-
window.__GEM_DEVTOOLS__HOOK__ && Object.assign(window.__GEM_DEVTOOLS__HOOK__, { ...
|
|
1260
|
-
function D(
|
|
1261
|
-
const
|
|
1262
|
-
|
|
1263
|
-
value:
|
|
1264
|
-
}),
|
|
1251
|
+
window.__GEM_DEVTOOLS__HOOK__ && Object.assign(window.__GEM_DEVTOOLS__HOOK__, { ...Cn, ...Gn });
|
|
1252
|
+
function D(s, t, e, n = !1) {
|
|
1253
|
+
const r = s.constructor, i = r[t];
|
|
1254
|
+
r.hasOwnProperty(t) || Object.defineProperty(r, t, {
|
|
1255
|
+
value: n ? new Set(i) : i ? Array.from(i) : []
|
|
1256
|
+
}), r[t][n ? "add" : "push"](e);
|
|
1265
1257
|
}
|
|
1266
|
-
function
|
|
1267
|
-
const e = `${
|
|
1268
|
-
D(
|
|
1258
|
+
function Gr(s, t) {
|
|
1259
|
+
const e = `${G(t)}-${ve()}`;
|
|
1260
|
+
D(s, "defineRefs", e), ss(s, t, e);
|
|
1269
1261
|
}
|
|
1270
|
-
function
|
|
1271
|
-
D(
|
|
1262
|
+
function is(s, t, e) {
|
|
1263
|
+
D(s, "observedAttributes", e), es(s, t, e);
|
|
1272
1264
|
}
|
|
1273
|
-
function C(
|
|
1274
|
-
|
|
1265
|
+
function C(s, t) {
|
|
1266
|
+
is(s, t, G(t));
|
|
1275
1267
|
}
|
|
1276
|
-
function
|
|
1277
|
-
const e =
|
|
1278
|
-
D(
|
|
1268
|
+
function Zs(s, t) {
|
|
1269
|
+
const e = G(t);
|
|
1270
|
+
D(s, "booleanAttributes", e, !0), is(s, t, e);
|
|
1279
1271
|
}
|
|
1280
|
-
function
|
|
1281
|
-
const e =
|
|
1282
|
-
D(
|
|
1272
|
+
function Fr(s, t) {
|
|
1273
|
+
const e = G(t);
|
|
1274
|
+
D(s, "numberAttributes", e, !0), is(s, t, e);
|
|
1283
1275
|
}
|
|
1284
|
-
function N(
|
|
1285
|
-
D(
|
|
1276
|
+
function N(s, t) {
|
|
1277
|
+
D(s, "observedProperties", t), Dt(s, t);
|
|
1286
1278
|
}
|
|
1287
|
-
function
|
|
1288
|
-
const e =
|
|
1289
|
-
D(
|
|
1279
|
+
function os(s, t) {
|
|
1280
|
+
const e = G(t);
|
|
1281
|
+
D(s, "defineCSSStates", e), ns(s, t, e);
|
|
1290
1282
|
}
|
|
1291
|
-
function
|
|
1292
|
-
const e =
|
|
1293
|
-
|
|
1283
|
+
function Br(s, t) {
|
|
1284
|
+
const e = G(s[t] || t);
|
|
1285
|
+
s[t] = e, D(s instanceof R ? s : s.prototype, "defineSlots", e);
|
|
1294
1286
|
}
|
|
1295
|
-
function
|
|
1296
|
-
const e =
|
|
1297
|
-
|
|
1287
|
+
function zn(s, t) {
|
|
1288
|
+
const e = G(s[t] || t);
|
|
1289
|
+
s[t] = e, D(s instanceof R ? s : s.prototype, "defineParts", e);
|
|
1298
1290
|
}
|
|
1299
|
-
function Se(
|
|
1300
|
-
|
|
1291
|
+
function Se(s, t) {
|
|
1292
|
+
tn(s, t);
|
|
1301
1293
|
}
|
|
1302
|
-
function
|
|
1303
|
-
|
|
1294
|
+
function Kr(s, t) {
|
|
1295
|
+
tn(s, t, { bubbles: !0, composed: !0 });
|
|
1304
1296
|
}
|
|
1305
|
-
function
|
|
1306
|
-
const
|
|
1307
|
-
D(
|
|
1297
|
+
function tn(s, t, e) {
|
|
1298
|
+
const n = G(t);
|
|
1299
|
+
D(s, "defineEvents", n), Dt(s, t, n, e);
|
|
1308
1300
|
}
|
|
1309
|
-
function
|
|
1301
|
+
function zr(s) {
|
|
1310
1302
|
return function(t) {
|
|
1311
|
-
D(t.prototype, "adoptedStyleSheets",
|
|
1303
|
+
D(t.prototype, "adoptedStyleSheets", s);
|
|
1312
1304
|
};
|
|
1313
1305
|
}
|
|
1314
|
-
function
|
|
1306
|
+
function as(s) {
|
|
1315
1307
|
return function(t) {
|
|
1316
|
-
D(t.prototype, "observedStores",
|
|
1308
|
+
D(t.prototype, "observedStores", s);
|
|
1317
1309
|
};
|
|
1318
1310
|
}
|
|
1319
|
-
function
|
|
1311
|
+
function Jr(s) {
|
|
1320
1312
|
return function(t) {
|
|
1321
1313
|
const e = t;
|
|
1322
|
-
e.rootElement =
|
|
1314
|
+
e.rootElement = s;
|
|
1323
1315
|
};
|
|
1324
1316
|
}
|
|
1325
|
-
function
|
|
1317
|
+
function Yr(s) {
|
|
1326
1318
|
return function(t) {
|
|
1327
|
-
|
|
1319
|
+
rs(s, t);
|
|
1328
1320
|
};
|
|
1329
1321
|
}
|
|
1330
|
-
const
|
|
1331
|
-
let
|
|
1332
|
-
const
|
|
1322
|
+
const M = window.history, en = M.pushState.bind(M), sn = M.replaceState.bind(M);
|
|
1323
|
+
let Jn = 0;
|
|
1324
|
+
const cs = () => `${performance.now()}-${++Jn}`, [E, pt] = ts({
|
|
1333
1325
|
$hasCloseHandle: !1,
|
|
1334
1326
|
$hasOpenHandle: !1,
|
|
1335
1327
|
$hasShouldCloseHandle: !1,
|
|
1336
1328
|
$key: ""
|
|
1337
1329
|
}), $ = /* @__PURE__ */ new Map();
|
|
1338
|
-
function
|
|
1339
|
-
const { $key: t, $hasCloseHandle: e, $hasOpenHandle:
|
|
1330
|
+
function nn(s) {
|
|
1331
|
+
const { $key: t, $hasCloseHandle: e, $hasOpenHandle: n, $hasShouldCloseHandle: r } = s || {};
|
|
1340
1332
|
if (E.$key !== t) {
|
|
1341
1333
|
if (t)
|
|
1342
|
-
throw new
|
|
1334
|
+
throw new J("`$key` is not allowed");
|
|
1343
1335
|
if (e)
|
|
1344
|
-
throw new
|
|
1345
|
-
if (
|
|
1346
|
-
throw new
|
|
1347
|
-
if (
|
|
1348
|
-
throw new
|
|
1336
|
+
throw new J("`$hasCloseHandle` is not allowed");
|
|
1337
|
+
if (n)
|
|
1338
|
+
throw new J("`$hasOpenHandle` is not allowed");
|
|
1339
|
+
if (r)
|
|
1340
|
+
throw new J("`$hasShouldCloseHandle` is not allowed");
|
|
1349
1341
|
}
|
|
1350
1342
|
}
|
|
1351
|
-
function
|
|
1352
|
-
return
|
|
1343
|
+
function rn(s) {
|
|
1344
|
+
return A.basePath ? A.basePath + s : s;
|
|
1353
1345
|
}
|
|
1354
|
-
function
|
|
1355
|
-
return
|
|
1346
|
+
function Ue(s) {
|
|
1347
|
+
return s === A.basePath ? "/" : s.replace(new RegExp(`^${A.basePath}/`), "/");
|
|
1356
1348
|
}
|
|
1357
|
-
function
|
|
1358
|
-
|
|
1349
|
+
function hs() {
|
|
1350
|
+
A.dispatchEvent(new CustomEvent("beforechange"));
|
|
1359
1351
|
}
|
|
1360
|
-
function ue(
|
|
1361
|
-
const t = $.get(E.$key) || { path:
|
|
1362
|
-
return { ...
|
|
1352
|
+
function ue(s) {
|
|
1353
|
+
const t = $.get(E.$key) || { path: Ue(location.pathname), query: new It() }, e = s.path ? Bs(t.path, s.path) : Ue(location.pathname), n = new It(s.query ?? (s.path ? "" : location.search)), r = String(n) !== String(t.query), i = r ? n : t.query, o = e !== t.path || r, a = s.title || (o ? "" : document.title), c = s.close || s.data || s.open || s.shouldClose, l = decodeURIComponent(s.hash ?? (!o && c ? location.hash : ""));
|
|
1354
|
+
return { ...s, title: a, path: e, query: i, hash: l };
|
|
1363
1355
|
}
|
|
1364
|
-
function
|
|
1365
|
-
|
|
1366
|
-
const e = ue(
|
|
1356
|
+
function ks(s, t) {
|
|
1357
|
+
nn(s.data);
|
|
1358
|
+
const e = ue(s), { title: n, path: r, query: i, hash: o, close: a, open: c, shouldClose: l, data: f } = e, h = {
|
|
1367
1359
|
$hasCloseHandle: !!a,
|
|
1368
1360
|
$hasOpenHandle: !!c,
|
|
1369
|
-
$hasShouldCloseHandle: !!
|
|
1370
|
-
$key:
|
|
1371
|
-
$title:
|
|
1372
|
-
...
|
|
1361
|
+
$hasShouldCloseHandle: !!l,
|
|
1362
|
+
$key: cs(),
|
|
1363
|
+
$title: n,
|
|
1364
|
+
...f
|
|
1373
1365
|
};
|
|
1374
|
-
$.set(
|
|
1375
|
-
const
|
|
1376
|
-
t(
|
|
1377
|
-
}
|
|
1378
|
-
function
|
|
1379
|
-
|
|
1380
|
-
const
|
|
1381
|
-
$key:
|
|
1366
|
+
$.set(h.$key, e), hs(), Xe(E), pt(h);
|
|
1367
|
+
const g = rn(r) + new It(i) + o, u = decodeURIComponent(location.hash);
|
|
1368
|
+
t(h, n, g), u !== o && window.dispatchEvent(new CustomEvent("hashchange"));
|
|
1369
|
+
}
|
|
1370
|
+
function Ns(s, t, e, n) {
|
|
1371
|
+
nn(s);
|
|
1372
|
+
const r = {
|
|
1373
|
+
$key: cs(),
|
|
1382
1374
|
$title: t,
|
|
1383
|
-
...
|
|
1384
|
-
}, { pathname:
|
|
1385
|
-
$.set(
|
|
1386
|
-
const
|
|
1387
|
-
|
|
1375
|
+
...s || {}
|
|
1376
|
+
}, { pathname: i, search: o, hash: a } = new URL(e, location.origin + location.pathname), c = ue({ path: i, query: new It(o), hash: a, title: t, data: s });
|
|
1377
|
+
$.set(r.$key, c), hs(), Xe(E), pt(r);
|
|
1378
|
+
const l = rn(i) + c.query + a, f = location.hash;
|
|
1379
|
+
n(r, t, l), f !== a && window.dispatchEvent(new CustomEvent("hashchange"));
|
|
1388
1380
|
}
|
|
1389
|
-
const [
|
|
1381
|
+
const [on, Yn] = ts({
|
|
1390
1382
|
basePath: ""
|
|
1391
1383
|
});
|
|
1392
|
-
class
|
|
1384
|
+
class Qn extends EventTarget {
|
|
1393
1385
|
get store() {
|
|
1394
1386
|
return E;
|
|
1395
1387
|
}
|
|
@@ -1397,10 +1389,10 @@ class ei extends EventTarget {
|
|
|
1397
1389
|
return E.$key;
|
|
1398
1390
|
}
|
|
1399
1391
|
get basePath() {
|
|
1400
|
-
return
|
|
1392
|
+
return on.basePath;
|
|
1401
1393
|
}
|
|
1402
1394
|
set basePath(t) {
|
|
1403
|
-
|
|
1395
|
+
Yn({ basePath: t }), Object.assign($.get(E.$key), { path: Ue(location.pathname) });
|
|
1404
1396
|
}
|
|
1405
1397
|
getParams() {
|
|
1406
1398
|
return $.get(E.$key);
|
|
@@ -1409,195 +1401,195 @@ class ei extends EventTarget {
|
|
|
1409
1401
|
Object.assign($.get(E.$key), t), pt();
|
|
1410
1402
|
}
|
|
1411
1403
|
push(t) {
|
|
1412
|
-
|
|
1404
|
+
ks(t, en);
|
|
1413
1405
|
}
|
|
1414
1406
|
replace(t) {
|
|
1415
|
-
|
|
1407
|
+
ks(t, sn);
|
|
1416
1408
|
}
|
|
1417
1409
|
pushIgnoreCloseHandle(t) {
|
|
1418
|
-
var e,
|
|
1419
|
-
E.$hasCloseHandle ? ((
|
|
1410
|
+
var e, n;
|
|
1411
|
+
E.$hasCloseHandle ? ((n = (e = $.get(E.$key)) == null ? void 0 : e.close) == null || n.call(e), this.replace(t)) : this.push(t);
|
|
1420
1412
|
}
|
|
1421
1413
|
forward() {
|
|
1422
|
-
|
|
1414
|
+
M.forward();
|
|
1423
1415
|
}
|
|
1424
1416
|
back() {
|
|
1425
|
-
|
|
1417
|
+
M.back();
|
|
1426
1418
|
}
|
|
1427
1419
|
}
|
|
1428
|
-
const
|
|
1420
|
+
const A = new Qn(), [ne, Xn] = ts({ title: "" }), Zn = { history: A, titleStore: ne, basePathStore: on };
|
|
1429
1421
|
if (!window._GEMHISTORY) {
|
|
1430
|
-
if (window._GEMHISTORY =
|
|
1431
|
-
|
|
1432
|
-
},
|
|
1433
|
-
|
|
1422
|
+
if (window._GEMHISTORY = Zn, M.pushState = function(t, e, n) {
|
|
1423
|
+
Ns(t, e, n, en);
|
|
1424
|
+
}, M.replaceState = function(t, e, n) {
|
|
1425
|
+
Ns(t, e, n, sn);
|
|
1434
1426
|
}, window.addEventListener("hashchange", ({ isTrusted: t }) => {
|
|
1435
|
-
t &&
|
|
1436
|
-
}),
|
|
1437
|
-
if (
|
|
1438
|
-
pt(
|
|
1427
|
+
t && A.replace({ hash: location.hash });
|
|
1428
|
+
}), M.state)
|
|
1429
|
+
if (M.state.$hasCloseHandle) {
|
|
1430
|
+
pt(M.state);
|
|
1439
1431
|
const t = ue({ title: document.title });
|
|
1440
|
-
$.set(E.$key, t),
|
|
1432
|
+
$.set(E.$key, t), A.back();
|
|
1441
1433
|
} else {
|
|
1442
1434
|
const t = ue({ title: document.title, hash: location.hash });
|
|
1443
1435
|
pt({
|
|
1444
|
-
$key:
|
|
1445
|
-
...
|
|
1436
|
+
$key: cs(),
|
|
1437
|
+
...M.state || {}
|
|
1446
1438
|
}), $.set(E.$key, t);
|
|
1447
1439
|
}
|
|
1448
1440
|
else {
|
|
1449
|
-
const { pathname: t, search: e, hash:
|
|
1450
|
-
|
|
1441
|
+
const { pathname: t, search: e, hash: n } = location;
|
|
1442
|
+
A.replace({ path: t, query: e, hash: n });
|
|
1451
1443
|
}
|
|
1452
|
-
ct(
|
|
1444
|
+
ct(ne, () => {
|
|
1453
1445
|
const t = $.get(E.$key);
|
|
1454
|
-
t && (t.title =
|
|
1446
|
+
t && (t.title = ne.title);
|
|
1455
1447
|
}), ct(E, () => {
|
|
1456
|
-
const { title: t } =
|
|
1457
|
-
t !==
|
|
1448
|
+
const { title: t } = A.getParams();
|
|
1449
|
+
t !== ne.title && Xn({ title: t });
|
|
1458
1450
|
});
|
|
1459
|
-
let
|
|
1451
|
+
let s = !1;
|
|
1460
1452
|
window.addEventListener("popstate", (t) => {
|
|
1461
|
-
var
|
|
1453
|
+
var i, o;
|
|
1462
1454
|
const e = t.state;
|
|
1463
1455
|
if (!(e != null && e.$key))
|
|
1464
1456
|
return;
|
|
1465
|
-
if (
|
|
1466
|
-
|
|
1457
|
+
if (s) {
|
|
1458
|
+
s = !1;
|
|
1467
1459
|
return;
|
|
1468
1460
|
}
|
|
1469
1461
|
if (!$.has(e.$key)) {
|
|
1470
|
-
const { pathname: a, search: c, hash:
|
|
1462
|
+
const { pathname: a, search: c, hash: l } = location;
|
|
1471
1463
|
$.set(e.$key, {
|
|
1472
1464
|
path: a,
|
|
1473
1465
|
query: new It(c),
|
|
1474
|
-
hash: decodeURIComponent(
|
|
1466
|
+
hash: decodeURIComponent(l),
|
|
1475
1467
|
title: e.$title,
|
|
1476
1468
|
// document.title 是导航前的
|
|
1477
1469
|
data: e
|
|
1478
1470
|
});
|
|
1479
1471
|
}
|
|
1480
|
-
const
|
|
1481
|
-
if (parseFloat(e.$key) > parseFloat(
|
|
1482
|
-
(o = (
|
|
1483
|
-
else if (
|
|
1484
|
-
const a = $.get(
|
|
1485
|
-
if (
|
|
1486
|
-
|
|
1472
|
+
const n = E;
|
|
1473
|
+
if (parseFloat(e.$key) > parseFloat(n.$key) && e.$hasOpenHandle)
|
|
1474
|
+
(o = (i = $.get(e.$key)) == null ? void 0 : i.open) == null || o.call(i);
|
|
1475
|
+
else if (n.$hasCloseHandle) {
|
|
1476
|
+
const a = $.get(n.$key), c = a == null ? void 0 : a.close, l = a == null ? void 0 : a.shouldClose;
|
|
1477
|
+
if (l && !l()) {
|
|
1478
|
+
s = !0, A.forward();
|
|
1487
1479
|
return;
|
|
1488
1480
|
} else
|
|
1489
|
-
c ? c() : e.$hasCloseHandle && (
|
|
1481
|
+
c ? c() : e.$hasCloseHandle && (s = !0, A.back());
|
|
1490
1482
|
}
|
|
1491
|
-
|
|
1483
|
+
hs(), Xe(E), pt(e);
|
|
1492
1484
|
});
|
|
1493
1485
|
}
|
|
1494
|
-
const { history:
|
|
1495
|
-
var
|
|
1496
|
-
for (var
|
|
1497
|
-
(o =
|
|
1498
|
-
return
|
|
1499
|
-
},
|
|
1500
|
-
if (!t.has(
|
|
1486
|
+
const { history: v, titleStore: qt, basePathStore: tr } = window._GEMHISTORY;
|
|
1487
|
+
var er = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, q = (s, t, e, n) => {
|
|
1488
|
+
for (var r = n > 1 ? void 0 : n ? sr(t, e) : t, i = s.length - 1, o; i >= 0; i--)
|
|
1489
|
+
(o = s[i]) && (r = (n ? o(t, e, r) : o(r)) || r);
|
|
1490
|
+
return n && r && er(t, e, r), r;
|
|
1491
|
+
}, an = (s, t, e) => {
|
|
1492
|
+
if (!t.has(s))
|
|
1501
1493
|
throw TypeError("Cannot " + e);
|
|
1502
|
-
}, W = (
|
|
1503
|
-
if (t.has(
|
|
1494
|
+
}, W = (s, t, e) => (an(s, t, "read from private field"), e ? e.call(s) : t.get(s)), vt = (s, t, e) => {
|
|
1495
|
+
if (t.has(s))
|
|
1504
1496
|
throw TypeError("Cannot add the same private member more than once");
|
|
1505
|
-
t instanceof WeakSet ? t.add(
|
|
1506
|
-
},
|
|
1507
|
-
const
|
|
1508
|
-
class
|
|
1497
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
1498
|
+
}, Os = (s, t, e, n) => (an(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e), Lt, it, ut, re, je, ie;
|
|
1499
|
+
const cn = "_";
|
|
1500
|
+
class nr extends RegExp {
|
|
1509
1501
|
constructor(t) {
|
|
1510
1502
|
let e = 0;
|
|
1511
1503
|
super(
|
|
1512
|
-
`^${t.replace(/((:[^/$]+)|(\*))/g, (
|
|
1504
|
+
`^${t.replace(/((:[^/$]+)|(\*))/g, (n, r) => r === "*" ? `(?<${cn}${e++}>.*)` : `(?<${r.slice(1)}>[^/]+)`)}$`
|
|
1513
1505
|
);
|
|
1514
1506
|
}
|
|
1515
1507
|
}
|
|
1516
|
-
function
|
|
1508
|
+
function hn(s, t) {
|
|
1517
1509
|
if (window.URLPattern) {
|
|
1518
|
-
const
|
|
1510
|
+
const i = new window.URLPattern({ pathname: s }), o = i.exec({ pathname: t }) || i.exec({ pathname: `${t}/` });
|
|
1519
1511
|
return o ? o.pathname.groups : null;
|
|
1520
1512
|
}
|
|
1521
|
-
const e = new
|
|
1522
|
-
if (!
|
|
1513
|
+
const e = new nr(s), n = t.match(e) || `${t}/`.match(e);
|
|
1514
|
+
if (!n)
|
|
1523
1515
|
return null;
|
|
1524
|
-
const
|
|
1525
|
-
return
|
|
1526
|
-
i
|
|
1527
|
-
}),
|
|
1528
|
-
}
|
|
1529
|
-
function
|
|
1530
|
-
let e = 0,
|
|
1531
|
-
const
|
|
1532
|
-
return
|
|
1533
|
-
|
|
1534
|
-
}),
|
|
1516
|
+
const r = {};
|
|
1517
|
+
return n.groups && Object.entries(n.groups).forEach(([i, o]) => {
|
|
1518
|
+
r[i.startsWith(cn) ? i.slice(1) : i] = o;
|
|
1519
|
+
}), r;
|
|
1520
|
+
}
|
|
1521
|
+
function ls(s, t) {
|
|
1522
|
+
let e = 0, n = s.pattern.replaceAll("*", () => `:${e++}`);
|
|
1523
|
+
const r = t == null ? void 0 : t.params;
|
|
1524
|
+
return r && Object.keys(r).forEach((i) => {
|
|
1525
|
+
n = n.replace(new RegExp(`:${i}`, "g"), r[i]);
|
|
1526
|
+
}), n;
|
|
1535
1527
|
}
|
|
1536
|
-
function
|
|
1528
|
+
function rr(s, t) {
|
|
1537
1529
|
return {
|
|
1538
|
-
path:
|
|
1530
|
+
path: ls(s, t),
|
|
1539
1531
|
...t
|
|
1540
1532
|
};
|
|
1541
1533
|
}
|
|
1542
|
-
const
|
|
1534
|
+
const ke = j``, Ms = /* @__PURE__ */ new Map(), T = class ln extends R {
|
|
1543
1535
|
constructor({ isLight: t, routes: e } = {}) {
|
|
1544
|
-
super({ isLight: t }), vt(this,
|
|
1545
|
-
content:
|
|
1546
|
-
}, vt(this,
|
|
1536
|
+
super({ isLight: t }), vt(this, it), this.trigger = v, this.currentParams = {}, vt(this, Lt, void 0), this.state = {
|
|
1537
|
+
content: ke
|
|
1538
|
+
}, vt(this, re, () => {
|
|
1547
1539
|
if (!this.locationStore)
|
|
1548
1540
|
return;
|
|
1549
|
-
const { path:
|
|
1550
|
-
|
|
1551
|
-
path:
|
|
1541
|
+
const { path: n, query: r, hash: i, data: o } = v.getParams();
|
|
1542
|
+
st(this.locationStore, {
|
|
1543
|
+
path: n,
|
|
1552
1544
|
params: this.currentParams,
|
|
1553
|
-
query:
|
|
1554
|
-
hash:
|
|
1545
|
+
query: r,
|
|
1546
|
+
hash: i,
|
|
1555
1547
|
data: o
|
|
1556
1548
|
});
|
|
1557
1549
|
}), vt(this, je, () => {
|
|
1558
|
-
if (!W(this,
|
|
1550
|
+
if (!W(this, it, ut))
|
|
1559
1551
|
return;
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1562
|
-
}), vt(this,
|
|
1563
|
-
this.beforeroutechange(
|
|
1552
|
+
const n = Ms.get(v.currentKey);
|
|
1553
|
+
n ? W(this, it, ut).scroll(0, n) : (this.scrollIgnoreHash || !v.getParams().hash) && W(this, it, ut).scroll(0, 0);
|
|
1554
|
+
}), vt(this, ie, (n, r, i) => {
|
|
1555
|
+
this.beforeroutechange(n), Os(this, Lt, void 0), this.currentRoute = n, this.currentParams = r;
|
|
1564
1556
|
const o = async () => {
|
|
1565
|
-
this.setState({ content:
|
|
1557
|
+
this.setState({ content: i }), W(this, re).call(this), await Promise.resolve(), W(this, je).call(this), this.routechange(this.currentRoute);
|
|
1566
1558
|
};
|
|
1567
1559
|
this.transition && "startViewTransition" in document ? document.startViewTransition(() => o()) : o();
|
|
1568
1560
|
}), this.update = () => {
|
|
1569
|
-
const { path:
|
|
1561
|
+
const { path: n, hash: r, query: i } = this.trigger.getParams(), { route: o, params: a = {} } = ln.findRoute(this.routes, n), { redirect: c, content: l, getContent: f } = o || {};
|
|
1570
1562
|
if (c) {
|
|
1571
1563
|
this.trigger.replace({
|
|
1572
|
-
path:
|
|
1573
|
-
query:
|
|
1574
|
-
hash:
|
|
1564
|
+
path: ls({ pattern: c }, { params: a }),
|
|
1565
|
+
query: i,
|
|
1566
|
+
hash: r
|
|
1575
1567
|
});
|
|
1576
1568
|
return;
|
|
1577
1569
|
}
|
|
1578
|
-
this.trigger ===
|
|
1579
|
-
const
|
|
1580
|
-
if (this.loading(o),
|
|
1581
|
-
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
}).catch((
|
|
1586
|
-
|
|
1570
|
+
this.trigger === v && st(qt, { title: o == null ? void 0 : o.title });
|
|
1571
|
+
const h = l || (f == null ? void 0 : f(a, this.shadowRoot || this));
|
|
1572
|
+
if (this.loading(o), h instanceof Promise) {
|
|
1573
|
+
Os(this, Lt, h);
|
|
1574
|
+
const g = () => W(this, Lt) === h;
|
|
1575
|
+
h.then((u) => {
|
|
1576
|
+
g() && W(this, ie).call(this, o, a, u);
|
|
1577
|
+
}).catch((u) => {
|
|
1578
|
+
g() && this.error(u);
|
|
1587
1579
|
});
|
|
1588
1580
|
return;
|
|
1589
1581
|
}
|
|
1590
|
-
W(this,
|
|
1582
|
+
W(this, ie).call(this, o, a, h);
|
|
1591
1583
|
}, this.routes = this.routes || e;
|
|
1592
1584
|
}
|
|
1593
1585
|
mounted() {
|
|
1594
1586
|
this.effect(
|
|
1595
1587
|
() => {
|
|
1596
|
-
if (W(this,
|
|
1597
|
-
return
|
|
1598
|
-
|
|
1588
|
+
if (W(this, it, ut))
|
|
1589
|
+
return Ks(
|
|
1590
|
+
v,
|
|
1599
1591
|
"beforechange",
|
|
1600
|
-
() =>
|
|
1592
|
+
() => Ms.set(v.currentKey, W(this, it, ut).scrollTop)
|
|
1601
1593
|
);
|
|
1602
1594
|
},
|
|
1603
1595
|
() => [this.scrollContainer]
|
|
@@ -1606,16 +1598,16 @@ const Ne = G``, An = /* @__PURE__ */ new Map(), T = class us extends A {
|
|
|
1606
1598
|
() => ct(this.trigger.store, () => this.setState({})),
|
|
1607
1599
|
() => [this.trigger]
|
|
1608
1600
|
), this.effect(
|
|
1609
|
-
([t, e],
|
|
1610
|
-
if (
|
|
1611
|
-
W(this,
|
|
1601
|
+
([t, e], n) => {
|
|
1602
|
+
if (n && t === n[0] && e === n[1]) {
|
|
1603
|
+
W(this, re).call(this);
|
|
1612
1604
|
return;
|
|
1613
1605
|
}
|
|
1614
1606
|
this.update();
|
|
1615
1607
|
},
|
|
1616
1608
|
() => {
|
|
1617
|
-
const { path: t, query: e, hash:
|
|
1618
|
-
return [this.key, t, e,
|
|
1609
|
+
const { path: t, query: e, hash: n } = this.trigger.getParams();
|
|
1610
|
+
return [this.key, t, e, n];
|
|
1619
1611
|
}
|
|
1620
1612
|
);
|
|
1621
1613
|
}
|
|
@@ -1625,44 +1617,44 @@ const Ne = G``, An = /* @__PURE__ */ new Map(), T = class us extends A {
|
|
|
1625
1617
|
render() {
|
|
1626
1618
|
const { content: t } = this.state;
|
|
1627
1619
|
if (t !== void 0)
|
|
1628
|
-
return this.shadowRoot ?
|
|
1620
|
+
return this.shadowRoot ? j`
|
|
1629
1621
|
<style>
|
|
1630
1622
|
:host(:where(:not([hidden]))),
|
|
1631
1623
|
:not(:defined) {
|
|
1632
1624
|
display: contents;
|
|
1633
1625
|
}
|
|
1634
1626
|
</style>
|
|
1635
|
-
${t ===
|
|
1636
|
-
` : t ===
|
|
1627
|
+
${t === ke ? j`<slot></slot>` : t}
|
|
1628
|
+
` : t === ke ? void 0 : j`${t}`;
|
|
1637
1629
|
}
|
|
1638
1630
|
};
|
|
1639
|
-
|
|
1640
|
-
|
|
1631
|
+
Lt = /* @__PURE__ */ new WeakMap();
|
|
1632
|
+
it = /* @__PURE__ */ new WeakSet();
|
|
1641
1633
|
ut = function() {
|
|
1642
1634
|
return typeof this.scrollContainer == "function" ? this.scrollContainer() : this.scrollContainer;
|
|
1643
1635
|
};
|
|
1644
|
-
ie = /* @__PURE__ */ new WeakMap();
|
|
1645
|
-
je = /* @__PURE__ */ new WeakMap();
|
|
1646
1636
|
re = /* @__PURE__ */ new WeakMap();
|
|
1637
|
+
je = /* @__PURE__ */ new WeakMap();
|
|
1638
|
+
ie = /* @__PURE__ */ new WeakMap();
|
|
1647
1639
|
T.createLocationStore = () => {
|
|
1648
|
-
const { path:
|
|
1649
|
-
return Ft({ path:
|
|
1640
|
+
const { path: s, query: t, hash: e, data: n } = v.getParams();
|
|
1641
|
+
return Ft({ path: s, query: t, hash: e, data: n, params: {} });
|
|
1650
1642
|
};
|
|
1651
|
-
T.findRoute = (
|
|
1652
|
-
let e = null,
|
|
1653
|
-
|
|
1654
|
-
for (const
|
|
1655
|
-
if (
|
|
1656
|
-
e =
|
|
1643
|
+
T.findRoute = (s = [], t) => {
|
|
1644
|
+
let e = null, n;
|
|
1645
|
+
s instanceof Array ? n = s : n = Object.values(s);
|
|
1646
|
+
for (const r of n)
|
|
1647
|
+
if (r.pattern === "*")
|
|
1648
|
+
e = r;
|
|
1657
1649
|
else {
|
|
1658
|
-
const
|
|
1659
|
-
if (
|
|
1660
|
-
return { route:
|
|
1650
|
+
const i = hn(r.pattern, t);
|
|
1651
|
+
if (i)
|
|
1652
|
+
return { route: r, params: i };
|
|
1661
1653
|
}
|
|
1662
1654
|
return { route: e };
|
|
1663
1655
|
};
|
|
1664
1656
|
q([
|
|
1665
|
-
|
|
1657
|
+
Zs
|
|
1666
1658
|
], T.prototype, "transition", 2);
|
|
1667
1659
|
q([
|
|
1668
1660
|
N
|
|
@@ -1694,80 +1686,80 @@ q([
|
|
|
1694
1686
|
q([
|
|
1695
1687
|
N
|
|
1696
1688
|
], T.prototype, "trigger", 2);
|
|
1697
|
-
let
|
|
1698
|
-
class
|
|
1689
|
+
let un = T;
|
|
1690
|
+
class ir extends un {
|
|
1699
1691
|
constructor(t = {}) {
|
|
1700
1692
|
super({ ...t, isLight: !0 });
|
|
1701
1693
|
}
|
|
1702
1694
|
}
|
|
1703
|
-
var
|
|
1704
|
-
for (var
|
|
1705
|
-
(o =
|
|
1706
|
-
return
|
|
1707
|
-
},
|
|
1708
|
-
if (!t.has(
|
|
1695
|
+
var or = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, x = (s, t, e, n) => {
|
|
1696
|
+
for (var r = n > 1 ? void 0 : n ? ar(t, e) : t, i = s.length - 1, o; i >= 0; i--)
|
|
1697
|
+
(o = s[i]) && (r = (n ? o(t, e, r) : o(r)) || r);
|
|
1698
|
+
return n && r && or(t, e, r), r;
|
|
1699
|
+
}, cr = (s, t, e) => {
|
|
1700
|
+
if (!t.has(s))
|
|
1709
1701
|
throw TypeError("Cannot " + e);
|
|
1710
|
-
},
|
|
1711
|
-
if (t.has(
|
|
1702
|
+
}, Y = (s, t, e) => (cr(s, t, "read from private field"), e ? e.call(s) : t.get(s)), St = (s, t, e) => {
|
|
1703
|
+
if (t.has(s))
|
|
1712
1704
|
throw TypeError("Cannot add the same private member more than once");
|
|
1713
|
-
t instanceof WeakSet ? t.add(
|
|
1714
|
-
}, dt,
|
|
1715
|
-
function
|
|
1716
|
-
return !
|
|
1705
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
1706
|
+
}, dt, kt, Ge, dn, Fe, Be, Ke;
|
|
1707
|
+
function As(s) {
|
|
1708
|
+
return !s.startsWith("/");
|
|
1717
1709
|
}
|
|
1718
|
-
let
|
|
1710
|
+
let b = class extends R {
|
|
1719
1711
|
constructor() {
|
|
1720
|
-
super({ focusable: !0 }), St(this, dt), St(this,
|
|
1721
|
-
var
|
|
1722
|
-
const
|
|
1723
|
-
if (!
|
|
1712
|
+
super({ focusable: !0 }), St(this, dt), St(this, Ge), St(this, Fe, async () => {
|
|
1713
|
+
var r;
|
|
1714
|
+
const s = this.getLocationString();
|
|
1715
|
+
if (!s)
|
|
1724
1716
|
return;
|
|
1725
|
-
if (
|
|
1717
|
+
if (As(s))
|
|
1726
1718
|
switch (this.target) {
|
|
1727
1719
|
case "_self":
|
|
1728
|
-
window.location.href =
|
|
1720
|
+
window.location.href = s;
|
|
1729
1721
|
return;
|
|
1730
1722
|
case "_parent":
|
|
1731
|
-
window.parent.location.href =
|
|
1723
|
+
window.parent.location.href = s;
|
|
1732
1724
|
return;
|
|
1733
1725
|
case "_top":
|
|
1734
|
-
window.top.location.href =
|
|
1726
|
+
window.top.location.href = s;
|
|
1735
1727
|
return;
|
|
1736
1728
|
default:
|
|
1737
|
-
window.open(
|
|
1729
|
+
window.open(s);
|
|
1738
1730
|
return;
|
|
1739
1731
|
}
|
|
1740
|
-
const { path: t, query: e, hash:
|
|
1741
|
-
if (t + e +
|
|
1742
|
-
if (await ((
|
|
1743
|
-
|
|
1744
|
-
...
|
|
1732
|
+
const { path: t, query: e, hash: n } = v.getParams();
|
|
1733
|
+
if (t + e + n !== s)
|
|
1734
|
+
if (await ((r = this.prepare) == null ? void 0 : r.call(this)), this.route)
|
|
1735
|
+
v.pushIgnoreCloseHandle({
|
|
1736
|
+
...rr(this.route, Y(this, dt, kt)),
|
|
1745
1737
|
title: this.route.title || this.docTitle
|
|
1746
1738
|
});
|
|
1747
1739
|
else if (this.href) {
|
|
1748
|
-
const { pathname:
|
|
1749
|
-
|
|
1750
|
-
path:
|
|
1740
|
+
const { pathname: i, search: o, hash: a } = new URL(s, location.origin);
|
|
1741
|
+
v.pushIgnoreCloseHandle({
|
|
1742
|
+
path: i,
|
|
1751
1743
|
query: o,
|
|
1752
1744
|
hash: a,
|
|
1753
1745
|
title: this.docTitle
|
|
1754
1746
|
});
|
|
1755
1747
|
} else
|
|
1756
|
-
|
|
1748
|
+
v.pushIgnoreCloseHandle({
|
|
1757
1749
|
path: this.path,
|
|
1758
1750
|
query: this.query,
|
|
1759
1751
|
hash: this.hash,
|
|
1760
1752
|
title: this.docTitle
|
|
1761
1753
|
});
|
|
1762
|
-
}), St(this,
|
|
1763
|
-
|
|
1764
|
-
}), St(this,
|
|
1765
|
-
const
|
|
1766
|
-
return
|
|
1767
|
-
}), this.addEventListener("click",
|
|
1754
|
+
}), St(this, Be, (s) => {
|
|
1755
|
+
s.preventDefault();
|
|
1756
|
+
}), St(this, Ke, () => {
|
|
1757
|
+
const s = this.getLocationString();
|
|
1758
|
+
return As(s) ? s : new URL(v.basePath + s, location.origin).toString();
|
|
1759
|
+
}), this.addEventListener("click", Y(this, Fe));
|
|
1768
1760
|
}
|
|
1769
1761
|
render() {
|
|
1770
|
-
return
|
|
1762
|
+
return j`
|
|
1771
1763
|
<style>
|
|
1772
1764
|
:host {
|
|
1773
1765
|
/* link default style */
|
|
@@ -1785,8 +1777,8 @@ let x = class extends A {
|
|
|
1785
1777
|
</style>
|
|
1786
1778
|
<a
|
|
1787
1779
|
part=${this.link}
|
|
1788
|
-
@click=${
|
|
1789
|
-
href=${
|
|
1780
|
+
@click=${Y(this, Be)}
|
|
1781
|
+
href=${Js(Y(this, Ge, dn) === "off" ? void 0 : Y(this, Ke).call(this))}
|
|
1790
1782
|
>
|
|
1791
1783
|
<slot></slot>
|
|
1792
1784
|
</a>
|
|
@@ -1796,101 +1788,101 @@ let x = class extends A {
|
|
|
1796
1788
|
* 如果该元素是外部链接返回 URL,否则返回路径(不包含 basePath)
|
|
1797
1789
|
*/
|
|
1798
1790
|
getLocationString() {
|
|
1799
|
-
var
|
|
1791
|
+
var s, t;
|
|
1800
1792
|
if (this.route) {
|
|
1801
|
-
const e = ((
|
|
1802
|
-
return
|
|
1793
|
+
const e = ((s = Y(this, dt, kt)) == null ? void 0 : s.query) || "", n = ((t = Y(this, dt, kt)) == null ? void 0 : t.hash) || "";
|
|
1794
|
+
return ls(this.route, Y(this, dt, kt)) + e + n;
|
|
1803
1795
|
} else {
|
|
1804
|
-
const e = this.href || this.path + this.query + this.hash, { path:
|
|
1805
|
-
return e.startsWith("#") ? `${
|
|
1796
|
+
const e = this.href || this.path + this.query + this.hash, { path: n, query: r } = v.getParams();
|
|
1797
|
+
return e.startsWith("#") ? `${n}${r}${e}` : e.startsWith("?") ? `${n}${e}` : e.startsWith(".") ? Bs(n, e) : e;
|
|
1806
1798
|
}
|
|
1807
1799
|
}
|
|
1808
1800
|
};
|
|
1809
1801
|
dt = /* @__PURE__ */ new WeakSet();
|
|
1810
|
-
|
|
1802
|
+
kt = function() {
|
|
1811
1803
|
return this.routeOptions || this.options;
|
|
1812
1804
|
};
|
|
1813
|
-
|
|
1814
|
-
|
|
1805
|
+
Ge = /* @__PURE__ */ new WeakSet();
|
|
1806
|
+
dn = function() {
|
|
1815
1807
|
return this.hint || "on";
|
|
1816
1808
|
};
|
|
1809
|
+
Fe = /* @__PURE__ */ new WeakMap();
|
|
1817
1810
|
Be = /* @__PURE__ */ new WeakMap();
|
|
1818
1811
|
Ke = /* @__PURE__ */ new WeakMap();
|
|
1819
|
-
|
|
1820
|
-
b([
|
|
1812
|
+
x([
|
|
1821
1813
|
C
|
|
1822
|
-
],
|
|
1823
|
-
|
|
1814
|
+
], b.prototype, "href", 2);
|
|
1815
|
+
x([
|
|
1824
1816
|
C
|
|
1825
|
-
],
|
|
1826
|
-
|
|
1817
|
+
], b.prototype, "target", 2);
|
|
1818
|
+
x([
|
|
1827
1819
|
C
|
|
1828
|
-
],
|
|
1829
|
-
|
|
1820
|
+
], b.prototype, "path", 2);
|
|
1821
|
+
x([
|
|
1830
1822
|
C
|
|
1831
|
-
],
|
|
1832
|
-
|
|
1823
|
+
], b.prototype, "query", 2);
|
|
1824
|
+
x([
|
|
1833
1825
|
C
|
|
1834
|
-
],
|
|
1835
|
-
|
|
1826
|
+
], b.prototype, "hash", 2);
|
|
1827
|
+
x([
|
|
1836
1828
|
C
|
|
1837
|
-
],
|
|
1838
|
-
|
|
1829
|
+
], b.prototype, "docTitle", 2);
|
|
1830
|
+
x([
|
|
1839
1831
|
C
|
|
1840
|
-
],
|
|
1841
|
-
|
|
1832
|
+
], b.prototype, "hint", 2);
|
|
1833
|
+
x([
|
|
1842
1834
|
N
|
|
1843
|
-
],
|
|
1844
|
-
|
|
1835
|
+
], b.prototype, "route", 2);
|
|
1836
|
+
x([
|
|
1845
1837
|
N
|
|
1846
|
-
],
|
|
1847
|
-
|
|
1838
|
+
], b.prototype, "options", 2);
|
|
1839
|
+
x([
|
|
1848
1840
|
N
|
|
1849
|
-
],
|
|
1850
|
-
|
|
1841
|
+
], b.prototype, "routeOptions", 2);
|
|
1842
|
+
x([
|
|
1851
1843
|
N
|
|
1852
|
-
],
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
],
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
],
|
|
1859
|
-
let Ut = class extends
|
|
1844
|
+
], b.prototype, "prepare", 2);
|
|
1845
|
+
x([
|
|
1846
|
+
zn
|
|
1847
|
+
], b.prototype, "link", 2);
|
|
1848
|
+
b = x([
|
|
1849
|
+
as(tr)
|
|
1850
|
+
], b);
|
|
1851
|
+
let Ut = class extends b {
|
|
1860
1852
|
constructor() {
|
|
1861
1853
|
super(), this.effect(() => {
|
|
1862
|
-
const { path:
|
|
1863
|
-
this.active = !!
|
|
1854
|
+
const { path: s, query: t, hash: e } = v.getParams(), n = this.pattern && hn(this.pattern, s);
|
|
1855
|
+
this.active = !!n || s + t + e === this.getLocationString();
|
|
1864
1856
|
});
|
|
1865
1857
|
}
|
|
1866
1858
|
};
|
|
1867
|
-
|
|
1859
|
+
x([
|
|
1868
1860
|
C
|
|
1869
1861
|
], Ut.prototype, "pattern", 2);
|
|
1870
|
-
|
|
1871
|
-
|
|
1862
|
+
x([
|
|
1863
|
+
os
|
|
1872
1864
|
], Ut.prototype, "active", 2);
|
|
1873
|
-
Ut =
|
|
1874
|
-
|
|
1865
|
+
Ut = x([
|
|
1866
|
+
as(v.store)
|
|
1875
1867
|
], Ut);
|
|
1876
|
-
customElements.define("gem-link",
|
|
1868
|
+
customElements.define("gem-link", b);
|
|
1877
1869
|
customElements.define("gem-active-link", Ut);
|
|
1878
|
-
customElements.define("gem-route",
|
|
1879
|
-
customElements.define("gem-light-route",
|
|
1880
|
-
var
|
|
1881
|
-
for (var
|
|
1882
|
-
(o =
|
|
1883
|
-
return
|
|
1870
|
+
customElements.define("gem-route", un);
|
|
1871
|
+
customElements.define("gem-light-route", ir);
|
|
1872
|
+
var hr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, us = (s, t, e, n) => {
|
|
1873
|
+
for (var r = n > 1 ? void 0 : n ? lr(t, e) : t, i = s.length - 1, o; i >= 0; i--)
|
|
1874
|
+
(o = s[i]) && (r = (n ? o(t, e, r) : o(r)) || r);
|
|
1875
|
+
return n && r && hr(t, e, r), r;
|
|
1884
1876
|
};
|
|
1885
1877
|
const de = document.title;
|
|
1886
|
-
let
|
|
1887
|
-
const
|
|
1888
|
-
function
|
|
1889
|
-
const
|
|
1890
|
-
|
|
1891
|
-
}
|
|
1892
|
-
ct(qt,
|
|
1893
|
-
const
|
|
1878
|
+
let ze = "";
|
|
1879
|
+
const ur = () => document.title = ze;
|
|
1880
|
+
function fn(s, t = "", e = "") {
|
|
1881
|
+
const n = qt.title || s;
|
|
1882
|
+
n && n !== de ? (Nt.title = n, ze = t + Nt.title + e) : (Nt.title = de, ze = Nt.title), I(ur);
|
|
1883
|
+
}
|
|
1884
|
+
ct(qt, fn);
|
|
1885
|
+
const dr = `${de} | `, fr = ` - ${de}`, ht = class pn extends R {
|
|
1894
1886
|
constructor() {
|
|
1895
1887
|
super(), this.mounted = () => {
|
|
1896
1888
|
this.effect(
|
|
@@ -1904,49 +1896,49 @@ const mi = `${de} | `, yi = ` - ${de}`, ht = class gs extends A {
|
|
|
1904
1896
|
});
|
|
1905
1897
|
}
|
|
1906
1898
|
static setTitle(t) {
|
|
1907
|
-
|
|
1899
|
+
st(qt, { title: t });
|
|
1908
1900
|
}
|
|
1909
1901
|
render() {
|
|
1910
1902
|
var t;
|
|
1911
|
-
return
|
|
1903
|
+
return fn((t = this.textContent) == null ? void 0 : t.trim(), this.prefix, this.suffix), j`${pn.title}`;
|
|
1912
1904
|
}
|
|
1913
1905
|
};
|
|
1914
1906
|
ht.title = document.title;
|
|
1915
|
-
ht.defaultPrefix =
|
|
1916
|
-
ht.defaultSuffix =
|
|
1917
|
-
|
|
1907
|
+
ht.defaultPrefix = dr;
|
|
1908
|
+
ht.defaultSuffix = fr;
|
|
1909
|
+
us([
|
|
1918
1910
|
C
|
|
1919
1911
|
], ht.prototype, "prefix", 2);
|
|
1920
|
-
|
|
1912
|
+
us([
|
|
1921
1913
|
C
|
|
1922
1914
|
], ht.prototype, "suffix", 2);
|
|
1923
|
-
|
|
1924
|
-
|
|
1915
|
+
us([
|
|
1916
|
+
Zs
|
|
1925
1917
|
], ht.prototype, "inert", 2);
|
|
1926
1918
|
let Nt = ht;
|
|
1927
1919
|
customElements.define("gem-title", Nt);
|
|
1928
|
-
var
|
|
1929
|
-
for (var
|
|
1930
|
-
(o =
|
|
1931
|
-
return
|
|
1920
|
+
var pr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, Ee = (s, t, e, n) => {
|
|
1921
|
+
for (var r = n > 1 ? void 0 : n ? gr(t, e) : t, i = s.length - 1, o; i >= 0; i--)
|
|
1922
|
+
(o = s[i]) && (r = (n ? o(t, e, r) : o(r)) || r);
|
|
1923
|
+
return n && r && pr(t, e, r), r;
|
|
1932
1924
|
};
|
|
1933
|
-
const
|
|
1934
|
-
var
|
|
1935
|
-
class Bt extends
|
|
1925
|
+
const Rs = /* @__PURE__ */ new Map();
|
|
1926
|
+
var Gt;
|
|
1927
|
+
class Bt extends R {
|
|
1936
1928
|
constructor() {
|
|
1937
1929
|
super(...arguments);
|
|
1938
|
-
P(this,
|
|
1939
|
-
F(this,
|
|
1930
|
+
P(this, Gt, void 0);
|
|
1931
|
+
F(this, Gt, () => {
|
|
1940
1932
|
const e = this.element || (this.selector ? (this.root || document).querySelector(this.selector) : null);
|
|
1941
1933
|
if (typeof e == "string") {
|
|
1942
|
-
let
|
|
1943
|
-
return
|
|
1934
|
+
let n = Rs.get(e);
|
|
1935
|
+
return n || (n = document.createElement("template"), n.innerHTML = e, Rs.set(e, n)), n.content.cloneNode(!0);
|
|
1944
1936
|
} else
|
|
1945
1937
|
return e instanceof HTMLTemplateElement ? e.content.cloneNode(!0) : e == null ? void 0 : e.cloneNode(!0);
|
|
1946
1938
|
});
|
|
1947
1939
|
}
|
|
1948
1940
|
render() {
|
|
1949
|
-
return
|
|
1941
|
+
return j`
|
|
1950
1942
|
<style>
|
|
1951
1943
|
:host(:where(:not([hidden]))) {
|
|
1952
1944
|
position: relative;
|
|
@@ -1958,12 +1950,12 @@ class Bt extends A {
|
|
|
1958
1950
|
height: 100%;
|
|
1959
1951
|
}
|
|
1960
1952
|
</style>
|
|
1961
|
-
${
|
|
1953
|
+
${y(this, Gt).call(this)}
|
|
1962
1954
|
<slot></slot>
|
|
1963
1955
|
`;
|
|
1964
1956
|
}
|
|
1965
1957
|
}
|
|
1966
|
-
|
|
1958
|
+
Gt = new WeakMap();
|
|
1967
1959
|
Ee([
|
|
1968
1960
|
C
|
|
1969
1961
|
], Bt.prototype, "selector", 2);
|
|
@@ -1974,15 +1966,15 @@ Ee([
|
|
|
1974
1966
|
N
|
|
1975
1967
|
], Bt.prototype, "element", 2);
|
|
1976
1968
|
Ee([
|
|
1977
|
-
|
|
1969
|
+
os
|
|
1978
1970
|
], Bt.prototype, "active", 2);
|
|
1979
1971
|
customElements.define("gem-use", Bt);
|
|
1980
|
-
var
|
|
1981
|
-
for (var
|
|
1982
|
-
(o =
|
|
1983
|
-
return
|
|
1972
|
+
var mr = Object.defineProperty, yr = Object.getOwnPropertyDescriptor, gn = (s, t, e, n) => {
|
|
1973
|
+
for (var r = n > 1 ? void 0 : n ? yr(t, e) : t, i = s.length - 1, o; i >= 0; i--)
|
|
1974
|
+
(o = s[i]) && (r = (n ? o(t, e, r) : o(r)) || r);
|
|
1975
|
+
return n && r && mr(t, e, r), r;
|
|
1984
1976
|
};
|
|
1985
|
-
class
|
|
1977
|
+
class ds extends R {
|
|
1986
1978
|
constructor() {
|
|
1987
1979
|
super(), this.effect(
|
|
1988
1980
|
() => {
|
|
@@ -2002,27 +1994,27 @@ class pn extends A {
|
|
|
2002
1994
|
render() {
|
|
2003
1995
|
}
|
|
2004
1996
|
}
|
|
2005
|
-
|
|
1997
|
+
gn([
|
|
2006
1998
|
C
|
|
2007
|
-
],
|
|
2008
|
-
|
|
1999
|
+
], ds.prototype, "content", 2);
|
|
2000
|
+
gn([
|
|
2009
2001
|
C
|
|
2010
|
-
],
|
|
2011
|
-
customElements.define("gem-unsafe",
|
|
2012
|
-
var
|
|
2013
|
-
for (var
|
|
2014
|
-
(o =
|
|
2015
|
-
return
|
|
2002
|
+
], ds.prototype, "contentcss", 2);
|
|
2003
|
+
customElements.define("gem-unsafe", ds);
|
|
2004
|
+
var wr = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, mn = (s, t, e, n) => {
|
|
2005
|
+
for (var r = n > 1 ? void 0 : n ? _r(t, e) : t, i = s.length - 1, o; i >= 0; i--)
|
|
2006
|
+
(o = s[i]) && (r = (n ? o(t, e, r) : o(r)) || r);
|
|
2007
|
+
return n && r && wr(t, e, r), r;
|
|
2016
2008
|
};
|
|
2017
|
-
const
|
|
2009
|
+
const vr = "gem-reflect-start", yn = "gem-reflect-end", Hs = (s) => new Comment(s), Sr = (s) => {
|
|
2018
2010
|
const t = [];
|
|
2019
|
-
let e =
|
|
2020
|
-
for (; e && (t.push(e), e.nodeValue !==
|
|
2011
|
+
let e = s;
|
|
2012
|
+
for (; e && (t.push(e), e.nodeValue !== yn); )
|
|
2021
2013
|
e = e.nextSibling;
|
|
2022
2014
|
return t;
|
|
2023
2015
|
};
|
|
2024
|
-
var ge,
|
|
2025
|
-
class
|
|
2016
|
+
var ge, wn;
|
|
2017
|
+
class fs extends R {
|
|
2026
2018
|
constructor() {
|
|
2027
2019
|
super({ isLight: !0 });
|
|
2028
2020
|
P(this, ge);
|
|
@@ -2032,34 +2024,34 @@ class gn extends A {
|
|
|
2032
2024
|
},
|
|
2033
2025
|
() => []
|
|
2034
2026
|
);
|
|
2035
|
-
const e =
|
|
2036
|
-
let
|
|
2027
|
+
const e = Hs(vr), n = Hs(yn);
|
|
2028
|
+
let r;
|
|
2037
2029
|
this.effect(
|
|
2038
|
-
() => ((
|
|
2030
|
+
() => ((r || [e, ...this.childNodes, n]).forEach((i, o, a) => {
|
|
2039
2031
|
const c = a[o - 1];
|
|
2040
|
-
c ? c.after(
|
|
2032
|
+
c ? c.after(i) : this.target[y(this, ge, wn)](i);
|
|
2041
2033
|
}), () => {
|
|
2042
|
-
|
|
2034
|
+
r = Sr(e), r.forEach((i) => i.remove());
|
|
2043
2035
|
}),
|
|
2044
2036
|
() => [this.target]
|
|
2045
2037
|
);
|
|
2046
2038
|
}
|
|
2047
2039
|
}
|
|
2048
|
-
ge = new WeakSet(),
|
|
2040
|
+
ge = new WeakSet(), wn = function() {
|
|
2049
2041
|
return this.method || "append";
|
|
2050
2042
|
};
|
|
2051
|
-
|
|
2043
|
+
mn([
|
|
2052
2044
|
C
|
|
2053
|
-
],
|
|
2054
|
-
|
|
2045
|
+
], fs.prototype, "method", 2);
|
|
2046
|
+
mn([
|
|
2055
2047
|
N
|
|
2056
|
-
],
|
|
2057
|
-
customElements.define("gem-reflect",
|
|
2048
|
+
], fs.prototype, "target", 2);
|
|
2049
|
+
customElements.define("gem-reflect", fs);
|
|
2058
2050
|
const zt = Symbol("open mark");
|
|
2059
|
-
function
|
|
2051
|
+
function Qr(s) {
|
|
2060
2052
|
var t;
|
|
2061
2053
|
const e = Symbol();
|
|
2062
|
-
return t = class extends
|
|
2054
|
+
return t = class extends R {
|
|
2063
2055
|
constructor() {
|
|
2064
2056
|
super(), this.label = "", this.internals.role = "alertdialog", this.internals.ariaModal = "true";
|
|
2065
2057
|
}
|
|
@@ -2069,21 +2061,21 @@ function er(n) {
|
|
|
2069
2061
|
}
|
|
2070
2062
|
/**@final */
|
|
2071
2063
|
static get observedStores() {
|
|
2072
|
-
return [
|
|
2064
|
+
return [v.store, this.store];
|
|
2073
2065
|
}
|
|
2074
2066
|
/**
|
|
2075
2067
|
* @final
|
|
2076
2068
|
* 自带 100ms 延迟,以允许在其他 Dialog 的 `shouldClose` 中调用此方法;
|
|
2077
2069
|
* 浏览器 history 为异步 API,需要设置较长延迟;
|
|
2078
2070
|
*/
|
|
2079
|
-
static open(
|
|
2080
|
-
const
|
|
2081
|
-
this.instance =
|
|
2082
|
-
const
|
|
2071
|
+
static open(n) {
|
|
2072
|
+
const r = new this();
|
|
2073
|
+
this.instance = r, this.inertStore = [...document.body.children].filter((o) => !o.inert), this.inertStore.forEach((o) => o.inert = !0), document.body.append(r);
|
|
2074
|
+
const i = () => st(this.store, { [zt]: !0, ...n });
|
|
2083
2075
|
return setTimeout(() => {
|
|
2084
|
-
|
|
2085
|
-
title:
|
|
2086
|
-
open:
|
|
2076
|
+
i(), v.push({
|
|
2077
|
+
title: r.label,
|
|
2078
|
+
open: i,
|
|
2087
2079
|
close: this.closeHandle.bind(this),
|
|
2088
2080
|
shouldClose: this.shouldClose.bind(this)
|
|
2089
2081
|
});
|
|
@@ -2094,15 +2086,15 @@ function er(n) {
|
|
|
2094
2086
|
* UI 中执行关闭
|
|
2095
2087
|
*/
|
|
2096
2088
|
static close() {
|
|
2097
|
-
return
|
|
2089
|
+
return v.back(), e;
|
|
2098
2090
|
}
|
|
2099
2091
|
/**
|
|
2100
2092
|
* @final
|
|
2101
2093
|
* history 中自动调用
|
|
2102
2094
|
*/
|
|
2103
2095
|
static closeHandle() {
|
|
2104
|
-
var
|
|
2105
|
-
return this.inertStore.forEach((
|
|
2096
|
+
var n;
|
|
2097
|
+
return this.inertStore.forEach((r) => r.inert = !1), (n = this.instance) == null || n.remove(), st(this.store, { [zt]: !1, ...s }), e;
|
|
2106
2098
|
}
|
|
2107
2099
|
/**
|
|
2108
2100
|
* 由于要操作浏览器历史记录,所以没有设计为 Promise;
|
|
@@ -2116,36 +2108,36 @@ function er(n) {
|
|
|
2116
2108
|
*/
|
|
2117
2109
|
t.store = Ft({
|
|
2118
2110
|
[zt]: !1,
|
|
2119
|
-
...
|
|
2111
|
+
...s
|
|
2120
2112
|
}), t;
|
|
2121
2113
|
}
|
|
2122
|
-
var
|
|
2123
|
-
for (var
|
|
2124
|
-
(o =
|
|
2125
|
-
return
|
|
2126
|
-
},
|
|
2127
|
-
if (!t.has(
|
|
2114
|
+
var Er = Object.defineProperty, br = Object.getOwnPropertyDescriptor, ps = (s, t, e, n) => {
|
|
2115
|
+
for (var r = n > 1 ? void 0 : n ? br(t, e) : t, i = s.length - 1, o; i >= 0; i--)
|
|
2116
|
+
(o = s[i]) && (r = (n ? o(t, e, r) : o(r)) || r);
|
|
2117
|
+
return n && r && Er(t, e, r), r;
|
|
2118
|
+
}, _n = (s, t, e) => {
|
|
2119
|
+
if (!t.has(s))
|
|
2128
2120
|
throw TypeError("Cannot " + e);
|
|
2129
|
-
}, lt = (
|
|
2130
|
-
if (t.has(
|
|
2121
|
+
}, lt = (s, t, e) => (_n(s, t, "read from private field"), e ? e.call(s) : t.get(s)), Ne = (s, t, e) => {
|
|
2122
|
+
if (t.has(s))
|
|
2131
2123
|
throw TypeError("Cannot add the same private member more than once");
|
|
2132
|
-
t instanceof WeakSet ? t.add(
|
|
2133
|
-
}, Oe = (
|
|
2124
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
2125
|
+
}, Oe = (s, t, e, n) => (_n(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e), Ot, Mt, At;
|
|
2134
2126
|
const Et = Symbol();
|
|
2135
|
-
let fe = class extends
|
|
2127
|
+
let fe = class extends R {
|
|
2136
2128
|
constructor() {
|
|
2137
|
-
super(),
|
|
2138
|
-
var
|
|
2139
|
-
return this.inert = !0, lt(this,
|
|
2140
|
-
}, this.openHandle = () => (this.hidden = !1, this.inert = !1, Oe(this,
|
|
2129
|
+
super(), Ne(this, Ot, void 0), Ne(this, Mt, void 0), Ne(this, At, []), this.closeHandle = () => {
|
|
2130
|
+
var s;
|
|
2131
|
+
return this.inert = !0, lt(this, At).forEach((t) => t.inert = !1), lt(this, Ot) ? lt(this, Ot).before(this) : lt(this, Mt) && ((s = lt(this, Mt)) == null || s.appendChild(this)), this.dispatchEvent(new CustomEvent("close")), this.opened = !1, Et;
|
|
2132
|
+
}, this.openHandle = () => (this.hidden = !1, this.inert = !1, Oe(this, Ot, this.nextSibling), Oe(this, Mt, this.parentElement || this.getRootNode()), Oe(this, At, [...document.body.children].filter((s) => !s.inert)), lt(this, At).forEach((s) => s.inert = !0), document.body.append(this), this.dispatchEvent(new CustomEvent("open")), this.opened = !0, Et), this.open = () => {
|
|
2141
2133
|
if (!this.opened)
|
|
2142
|
-
return this.openHandle(),
|
|
2134
|
+
return this.openHandle(), v.push({
|
|
2143
2135
|
title: this.label,
|
|
2144
2136
|
open: this.openHandle,
|
|
2145
2137
|
close: this.closeHandle,
|
|
2146
2138
|
shouldClose: this.shouldClose
|
|
2147
2139
|
}), Et;
|
|
2148
|
-
}, this.close = () => (
|
|
2140
|
+
}, this.close = () => (v.back(), Et), this.forceClose = () => (this.opened = !1, setTimeout(this.close, 100), Et), this.effect(
|
|
2149
2141
|
() => this.inert = !0,
|
|
2150
2142
|
() => []
|
|
2151
2143
|
), this.internals.role = "dialog", this.internals.ariaModal = "true";
|
|
@@ -2154,45 +2146,45 @@ let fe = class extends A {
|
|
|
2154
2146
|
return !0;
|
|
2155
2147
|
}
|
|
2156
2148
|
};
|
|
2157
|
-
Mt = /* @__PURE__ */ new WeakMap();
|
|
2158
2149
|
Ot = /* @__PURE__ */ new WeakMap();
|
|
2159
|
-
|
|
2160
|
-
|
|
2150
|
+
Mt = /* @__PURE__ */ new WeakMap();
|
|
2151
|
+
At = /* @__PURE__ */ new WeakMap();
|
|
2152
|
+
ps([
|
|
2161
2153
|
C
|
|
2162
2154
|
], fe.prototype, "label", 2);
|
|
2163
|
-
|
|
2164
|
-
|
|
2155
|
+
ps([
|
|
2156
|
+
os
|
|
2165
2157
|
], fe.prototype, "opened", 2);
|
|
2166
|
-
fe =
|
|
2167
|
-
|
|
2158
|
+
fe = ps([
|
|
2159
|
+
as(v.store)
|
|
2168
2160
|
], fe);
|
|
2169
|
-
const
|
|
2170
|
-
function
|
|
2171
|
-
return
|
|
2172
|
-
}
|
|
2173
|
-
const
|
|
2174
|
-
function
|
|
2175
|
-
return
|
|
2176
|
-
}
|
|
2177
|
-
const
|
|
2178
|
-
function
|
|
2179
|
-
const t = ve(), e = document.createElement("style"),
|
|
2180
|
-
|
|
2181
|
-
const o = () => Object.keys(
|
|
2182
|
-
|
|
2161
|
+
const vn = /* @__PURE__ */ new WeakMap();
|
|
2162
|
+
function xr(s) {
|
|
2163
|
+
return vn.get(s);
|
|
2164
|
+
}
|
|
2165
|
+
const Sn = /* @__PURE__ */ new WeakMap();
|
|
2166
|
+
function Xr(s) {
|
|
2167
|
+
return Sn.get(s);
|
|
2168
|
+
}
|
|
2169
|
+
const En = /* @__PURE__ */ new WeakMap();
|
|
2170
|
+
function Cr(s) {
|
|
2171
|
+
const t = ve(), e = document.createElement("style"), n = Ft(s), r = {}, i = {};
|
|
2172
|
+
Sn.set(r, i), vn.set(r, n);
|
|
2173
|
+
const o = () => Object.keys(n).forEach((l) => {
|
|
2174
|
+
i[l] || (i[l] = `--${G(l)}-${t}`, r[l] = `var(${i[l]})`);
|
|
2183
2175
|
});
|
|
2184
|
-
|
|
2185
|
-
const a = () => `:root, :host {${Object.keys(
|
|
2186
|
-
return ct(
|
|
2176
|
+
En.set(r, o), o();
|
|
2177
|
+
const a = () => `:root, :host {${Object.keys(n).reduce((l, f) => l + `${i[f]}:${n[f]};`, "")}}`, c = () => e.textContent = a();
|
|
2178
|
+
return ct(n, c), c(), (document.head || document.documentElement).append(e), r;
|
|
2187
2179
|
}
|
|
2188
|
-
function
|
|
2189
|
-
|
|
2180
|
+
function Pr(s, t) {
|
|
2181
|
+
st(xr(s), t), En.get(s)();
|
|
2190
2182
|
}
|
|
2191
|
-
function
|
|
2192
|
-
const t =
|
|
2193
|
-
return [t, (e) =>
|
|
2183
|
+
function Zr(s) {
|
|
2184
|
+
const t = Cr(s);
|
|
2185
|
+
return [t, (e) => Pr(t, e)];
|
|
2194
2186
|
}
|
|
2195
|
-
class
|
|
2187
|
+
class $r {
|
|
2196
2188
|
constructor(t) {
|
|
2197
2189
|
this.info = (...e) => {
|
|
2198
2190
|
console.log(`[${this._type}]:`, ...e);
|
|
@@ -2203,66 +2195,66 @@ class Ni {
|
|
|
2203
2195
|
}, this._type = t;
|
|
2204
2196
|
}
|
|
2205
2197
|
}
|
|
2206
|
-
const
|
|
2207
|
-
function
|
|
2208
|
-
const e =
|
|
2209
|
-
let
|
|
2210
|
-
for (;
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2198
|
+
const Tr = new $r("GEM"), Lr = /\$\d(?:<[^>]*>)?/, kr = /\$(\d)(<([^>]*)>)?/g, Nr = 3;
|
|
2199
|
+
function Or(s, ...t) {
|
|
2200
|
+
const e = s.split(Lr), n = [];
|
|
2201
|
+
let r;
|
|
2202
|
+
for (; r = kr.exec(s); ) {
|
|
2203
|
+
const i = r[Nr], o = Number(r[1]) - 1, a = t[o];
|
|
2204
|
+
n.push(typeof a == "function" ? a(i) : a);
|
|
2213
2205
|
}
|
|
2214
|
-
return
|
|
2206
|
+
return j(e, ...n);
|
|
2215
2207
|
}
|
|
2216
|
-
const
|
|
2217
|
-
var mt, oe, me,
|
|
2218
|
-
const
|
|
2208
|
+
const bt = /* @__PURE__ */ new Set();
|
|
2209
|
+
var mt, oe, me, bn, ye, xn, at, Rt, yt, ae;
|
|
2210
|
+
const gs = class gs {
|
|
2219
2211
|
constructor(t) {
|
|
2220
2212
|
P(this, mt);
|
|
2221
2213
|
P(this, me);
|
|
2222
2214
|
P(this, ye);
|
|
2223
2215
|
P(this, at);
|
|
2224
2216
|
P(this, yt);
|
|
2225
|
-
if (this.cachePrefix = "gem-i18n", this.replace = ({ path:
|
|
2226
|
-
throw new
|
|
2217
|
+
if (this.cachePrefix = "gem-i18n", this.replace = ({ path: r }) => this.setLanguage(r), this.getParams = () => ({ path: this.currentLanguage }), !t.resources[t.fallbackLanguage])
|
|
2218
|
+
throw new J("i18n: fallbackLanguage invalid");
|
|
2227
2219
|
this.store = Ft(this), Object.assign(this, t);
|
|
2228
|
-
let e =
|
|
2229
|
-
const
|
|
2230
|
-
if (
|
|
2220
|
+
let e = y(this, me, bn) || this.currentLanguage || y(this, ye, xn);
|
|
2221
|
+
const n = document.querySelector(`[type*=${this.cachePrefix}]`);
|
|
2222
|
+
if (n)
|
|
2231
2223
|
try {
|
|
2232
|
-
const
|
|
2233
|
-
e =
|
|
2224
|
+
const r = JSON.parse(n.textContent || "");
|
|
2225
|
+
e = r.currentLanguage, this.resources[r.currentLanguage] = r.currentLanguagePack;
|
|
2234
2226
|
} catch {
|
|
2235
2227
|
}
|
|
2236
2228
|
e ? (F(this, yt, e, ae), this.setLanguage(e)) : this.resetLanguage();
|
|
2237
2229
|
}
|
|
2238
2230
|
get(t, ...e) {
|
|
2239
|
-
const
|
|
2240
|
-
return e.length ?
|
|
2231
|
+
const n = this.resources[this.currentLanguage], r = this.resources[this.fallbackLanguage], i = n[t] || r[t], o = (i == null ? void 0 : i.message) || i || `[${t}]`;
|
|
2232
|
+
return e.length ? Or(o, ...e) : o;
|
|
2241
2233
|
}
|
|
2242
2234
|
detectLanguage() {
|
|
2243
|
-
const t = Object.keys(this.resources), e = navigator.languages.map((
|
|
2244
|
-
for (const
|
|
2245
|
-
const
|
|
2246
|
-
if (
|
|
2247
|
-
return
|
|
2235
|
+
const t = Object.keys(this.resources), e = navigator.languages.map((n) => n.replace(/-(.*)/, (r) => r.toUpperCase()));
|
|
2236
|
+
for (const n of e) {
|
|
2237
|
+
const r = t.find((i) => i === n || n.startsWith(`${i}-`));
|
|
2238
|
+
if (r)
|
|
2239
|
+
return r;
|
|
2248
2240
|
}
|
|
2249
2241
|
return this.fallbackLanguage;
|
|
2250
2242
|
}
|
|
2251
2243
|
async setLanguage(t) {
|
|
2252
|
-
|
|
2244
|
+
y(this, at, Rt) && bt.forEach(async (r) => await r.setLanguage(t));
|
|
2253
2245
|
let e;
|
|
2254
|
-
const
|
|
2255
|
-
if (!
|
|
2256
|
-
return
|
|
2257
|
-
if (typeof
|
|
2258
|
-
const
|
|
2259
|
-
const c = await (await fetch(
|
|
2246
|
+
const n = this.resources[t];
|
|
2247
|
+
if (!n)
|
|
2248
|
+
return Tr.warn(`${this.cachePrefix}: not found \`${t}\``), this.resetLanguage();
|
|
2249
|
+
if (typeof n == "string") {
|
|
2250
|
+
const r = `${this.cachePrefix}:`, i = `${r}${n}`, o = localStorage.getItem(i), a = async () => {
|
|
2251
|
+
const c = await (await fetch(n)).json();
|
|
2260
2252
|
if (this.cache) {
|
|
2261
|
-
for (let
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2253
|
+
for (let l = 0; l < localStorage.length; l++) {
|
|
2254
|
+
const f = localStorage.key(l);
|
|
2255
|
+
f.startsWith(r) && localStorage.removeItem(f);
|
|
2264
2256
|
}
|
|
2265
|
-
localStorage.setItem(
|
|
2257
|
+
localStorage.setItem(i, JSON.stringify(c));
|
|
2266
2258
|
}
|
|
2267
2259
|
return c;
|
|
2268
2260
|
};
|
|
@@ -2275,25 +2267,25 @@ const yn = class yn {
|
|
|
2275
2267
|
else
|
|
2276
2268
|
e = await a();
|
|
2277
2269
|
} else
|
|
2278
|
-
e =
|
|
2279
|
-
return this.resources[t] = e,
|
|
2270
|
+
e = n;
|
|
2271
|
+
return this.resources[t] = e, st(this.store), t !== this.currentLanguage && F(this, yt, t, ae), this.cache === !0 && this.setCache(), t;
|
|
2280
2272
|
}
|
|
2281
2273
|
resetLanguage() {
|
|
2282
|
-
return
|
|
2274
|
+
return y(this, at, Rt) && bt.forEach((t) => t.resetLanguage()), F(this, yt, this.fallbackLanguage, ae), this.cache && localStorage.removeItem(y(this, mt, oe)), this.setLanguage(this.detectLanguage());
|
|
2283
2275
|
}
|
|
2284
2276
|
// 一般用在 `onChange` 中
|
|
2285
2277
|
setCache() {
|
|
2286
|
-
|
|
2278
|
+
y(this, at, Rt) && bt.forEach((t) => t.setCache()), localStorage.setItem(y(this, mt, oe), this.currentLanguage);
|
|
2287
2279
|
}
|
|
2288
2280
|
createSubModule(t, e) {
|
|
2289
|
-
const
|
|
2281
|
+
const n = new gs({
|
|
2290
2282
|
resources: e,
|
|
2291
2283
|
cachePrefix: `${this.cachePrefix}-${t}`,
|
|
2292
2284
|
currentLanguage: this.currentLanguage,
|
|
2293
2285
|
fallbackLanguage: this.fallbackLanguage,
|
|
2294
2286
|
cache: this.cache
|
|
2295
2287
|
});
|
|
2296
|
-
return
|
|
2288
|
+
return bt.add(n), n;
|
|
2297
2289
|
}
|
|
2298
2290
|
/**
|
|
2299
2291
|
* prepare: @connectStore(i18n.store)
|
|
@@ -2315,223 +2307,259 @@ const yn = class yn {
|
|
|
2315
2307
|
};
|
|
2316
2308
|
mt = new WeakSet(), oe = function() {
|
|
2317
2309
|
return `${this.cachePrefix}:current`;
|
|
2318
|
-
}, me = new WeakSet(),
|
|
2319
|
-
const { hostname: t, pathname: e, search:
|
|
2310
|
+
}, me = new WeakSet(), bn = function() {
|
|
2311
|
+
const { hostname: t, pathname: e, search: n } = location, r = t.split(".");
|
|
2320
2312
|
switch (this.urlParamsType) {
|
|
2321
2313
|
case "ccTLD":
|
|
2322
|
-
return
|
|
2314
|
+
return r.pop();
|
|
2323
2315
|
case "gTLD":
|
|
2324
|
-
return
|
|
2316
|
+
return r.shift();
|
|
2325
2317
|
case "path":
|
|
2326
2318
|
return e.split("/")[1];
|
|
2327
2319
|
default:
|
|
2328
|
-
const
|
|
2329
|
-
return
|
|
2320
|
+
const i = this.urlParamsName && new URLSearchParams(n).get(this.urlParamsName) || "";
|
|
2321
|
+
return i in this.resources ? i : "";
|
|
2330
2322
|
}
|
|
2331
|
-
}, ye = new WeakSet(),
|
|
2332
|
-
return this.cache && localStorage.getItem(
|
|
2333
|
-
}, at = new WeakSet(),
|
|
2334
|
-
return !
|
|
2323
|
+
}, ye = new WeakSet(), xn = function() {
|
|
2324
|
+
return this.cache && localStorage.getItem(y(this, mt, oe)) || "";
|
|
2325
|
+
}, at = new WeakSet(), Rt = function() {
|
|
2326
|
+
return !bt.has(this);
|
|
2335
2327
|
}, yt = new WeakSet(), ae = function(t) {
|
|
2336
2328
|
var e;
|
|
2337
|
-
|
|
2329
|
+
y(this, at, Rt) && (document.documentElement.lang = t), this.currentLanguage = t, (e = this.onChange) == null || e.call(this, t);
|
|
2338
2330
|
};
|
|
2339
|
-
let
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
...
|
|
2349
|
-
})
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
}
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
|
|
2331
|
+
let Ws = gs;
|
|
2332
|
+
const Mr = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array())).constructor;
|
|
2333
|
+
function Ar(s = {}) {
|
|
2334
|
+
const {
|
|
2335
|
+
origin: t = location.origin,
|
|
2336
|
+
base: e = "",
|
|
2337
|
+
appendHeaders: n = () => ({}),
|
|
2338
|
+
transformInput: r = (h) => h,
|
|
2339
|
+
transformOutput: i = (h) => h,
|
|
2340
|
+
...o
|
|
2341
|
+
} = s, a = (h) => h instanceof FormData || h instanceof Blob || h instanceof Mr || h instanceof URLSearchParams || h instanceof ReadableStream || h instanceof ArrayBuffer ? h : typeof h == "object" ? JSON.stringify(h) : h, c = (h, g) => {
|
|
2342
|
+
if (new URL(h, location.origin).pathname !== h)
|
|
2343
|
+
throw new J("`path` format is incorrect");
|
|
2344
|
+
const u = new URLSearchParams(g).toString();
|
|
2345
|
+
return `${t}${e}${h}${u ? "?" : ""}${u}`;
|
|
2346
|
+
}, l = (h) => {
|
|
2347
|
+
if (!h)
|
|
2348
|
+
return {};
|
|
2349
|
+
if (h instanceof Headers)
|
|
2350
|
+
return Object.fromEntries(h);
|
|
2351
|
+
const g = Array.isArray(h) ? h : Object.entries(h);
|
|
2352
|
+
return Object.fromEntries(g.map(([u, p]) => [u.toLowerCase(), p]));
|
|
2353
|
+
}, f = async (h, g = {}) => {
|
|
2354
|
+
const u = new Request(h, {
|
|
2355
|
+
...o,
|
|
2356
|
+
...g,
|
|
2357
|
+
headers: new Headers({
|
|
2358
|
+
"content-type": "application/json",
|
|
2359
|
+
...l(o.headers),
|
|
2360
|
+
...l(g.headers)
|
|
2361
|
+
})
|
|
2362
|
+
}), p = await fetch(u);
|
|
2363
|
+
if (p.status === 0)
|
|
2364
|
+
throw new Error("Request fail");
|
|
2365
|
+
if (p.status >= 500)
|
|
2366
|
+
throw new Error(p.statusText);
|
|
2367
|
+
const m = u.headers.get("content-type"), _ = p.status >= 400;
|
|
2368
|
+
try {
|
|
2369
|
+
let w;
|
|
2370
|
+
if (m.includes("json") ? w = await p.json() : m.includes("octet-stream") ? w = await p.arrayBuffer() : w = await p.text(), _)
|
|
2371
|
+
throw new Error(p.statusText, { cause: w });
|
|
2372
|
+
return i(w, u);
|
|
2373
|
+
} catch {
|
|
2374
|
+
throw new Error("Parse error");
|
|
2375
|
+
}
|
|
2376
|
+
};
|
|
2377
|
+
return {
|
|
2378
|
+
request: f,
|
|
2379
|
+
get(h, g) {
|
|
2380
|
+
const u = r(g);
|
|
2381
|
+
return f(c(h, u), {
|
|
2382
|
+
method: "GET",
|
|
2383
|
+
headers: n(u)
|
|
2384
|
+
});
|
|
2385
|
+
},
|
|
2386
|
+
del(h, g) {
|
|
2387
|
+
const u = r(g);
|
|
2388
|
+
return f(c(h, u), {
|
|
2389
|
+
method: "DELETE",
|
|
2390
|
+
headers: n(u)
|
|
2391
|
+
});
|
|
2392
|
+
},
|
|
2393
|
+
put(h, g) {
|
|
2394
|
+
const u = r(g);
|
|
2395
|
+
return f(c(h), {
|
|
2396
|
+
method: "PUT",
|
|
2397
|
+
headers: n(u),
|
|
2398
|
+
body: a(u)
|
|
2399
|
+
});
|
|
2400
|
+
},
|
|
2401
|
+
post(h, g) {
|
|
2402
|
+
const u = r(g);
|
|
2403
|
+
return f(c(h), {
|
|
2404
|
+
method: "POST",
|
|
2405
|
+
headers: n(u),
|
|
2406
|
+
body: a(u)
|
|
2407
|
+
});
|
|
2408
|
+
}
|
|
2409
|
+
};
|
|
2382
2410
|
}
|
|
2383
|
-
const
|
|
2411
|
+
const { request: ti, del: ei, get: si, post: ni, put: ri } = Ar(), k = (s) => window.matchMedia(s).matches, ii = {
|
|
2384
2412
|
PRINT: "print",
|
|
2385
2413
|
get isPrint() {
|
|
2386
|
-
return
|
|
2414
|
+
return k(this.PRINT);
|
|
2387
2415
|
},
|
|
2388
2416
|
HOVER: "(hover: hover)",
|
|
2389
2417
|
get isHover() {
|
|
2390
|
-
return
|
|
2418
|
+
return k(this.HOVER);
|
|
2391
2419
|
},
|
|
2392
2420
|
PWA: "(display-mode: standalone)",
|
|
2393
2421
|
// PWA: '(display-mode: browser)', // debugging
|
|
2394
2422
|
get isPWA() {
|
|
2395
|
-
return
|
|
2423
|
+
return k(this.PWA);
|
|
2396
2424
|
},
|
|
2397
2425
|
MOTION_REDUCE: "(prefers-reduced-motion: reduce)",
|
|
2398
2426
|
get isMotionReduce() {
|
|
2399
|
-
return
|
|
2427
|
+
return k(this.MOTION_REDUCE);
|
|
2400
2428
|
},
|
|
2401
2429
|
DATA_REDUCE: "(prefers-reduced-data: reduce)",
|
|
2402
2430
|
get isDataReduce() {
|
|
2403
|
-
return
|
|
2431
|
+
return k(this.DATA_REDUCE);
|
|
2404
2432
|
},
|
|
2405
2433
|
WATCH: "(width < 320px)",
|
|
2406
2434
|
get isWatch() {
|
|
2407
|
-
return
|
|
2435
|
+
return k(this.WATCH);
|
|
2408
2436
|
},
|
|
2409
2437
|
SMALL_PHONE: "(320px <= width <= 480px) and (height <= 640px)",
|
|
2410
2438
|
get isSmallPhone() {
|
|
2411
|
-
return
|
|
2439
|
+
return k(this.SMALL_PHONE);
|
|
2412
2440
|
},
|
|
2413
2441
|
PHONE: "(320px <= width <= 480px)",
|
|
2414
2442
|
get isPhone() {
|
|
2415
|
-
return
|
|
2443
|
+
return k(this.PHONE);
|
|
2416
2444
|
},
|
|
2417
2445
|
PHONE_LANDSCAPE: "(480px < width < 960px) and (orientation: landscape)",
|
|
2418
2446
|
// PHONE_LANDSCAPE: '(480px < width < 960px)',
|
|
2419
2447
|
get isPhoneLandscape() {
|
|
2420
|
-
return
|
|
2448
|
+
return k(this.PHONE_LANDSCAPE);
|
|
2421
2449
|
},
|
|
2422
2450
|
// Widget
|
|
2423
2451
|
SHORT: "(width >= 480px) and (height <= 320px)",
|
|
2424
2452
|
get isShort() {
|
|
2425
|
-
return
|
|
2453
|
+
return k(this.SHORT);
|
|
2426
2454
|
},
|
|
2427
2455
|
// 1280 x 850
|
|
2428
2456
|
// 1024 x 768
|
|
2429
2457
|
TABLET: "(480px < width <= 1280px)",
|
|
2430
2458
|
get isTablet() {
|
|
2431
|
-
return
|
|
2459
|
+
return k(this.TABLET);
|
|
2432
2460
|
},
|
|
2433
2461
|
// 1366x768
|
|
2434
2462
|
DESKTOP: "(width > 1280px) and (orientation: landscape)",
|
|
2435
2463
|
get isDesktop() {
|
|
2436
|
-
return
|
|
2464
|
+
return k(this.DESKTOP);
|
|
2437
2465
|
},
|
|
2438
2466
|
// 1920x1080
|
|
2439
2467
|
WIDTHSCREEN: "(width >= 1920px) and (orientation: landscape)",
|
|
2440
2468
|
get isWidthScreen() {
|
|
2441
|
-
return
|
|
2469
|
+
return k(this.WIDTHSCREEN);
|
|
2442
2470
|
}
|
|
2443
2471
|
};
|
|
2444
2472
|
export {
|
|
2445
2473
|
Ut as GemActiveLinkElement,
|
|
2446
2474
|
fe as GemDialogBaseElement,
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2475
|
+
R as GemElement,
|
|
2476
|
+
J as GemError,
|
|
2477
|
+
ir as GemLightRouteElement,
|
|
2478
|
+
b as GemLinkElement,
|
|
2479
|
+
fs as GemReflectElement,
|
|
2480
|
+
un as GemRouteElement,
|
|
2453
2481
|
Nt as GemTitleElement,
|
|
2454
|
-
|
|
2482
|
+
ds as GemUnsafeElement,
|
|
2455
2483
|
Bt as GemUseElement,
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2484
|
+
Ws as I18n,
|
|
2485
|
+
In as LinkedList,
|
|
2486
|
+
dr as PREFIX,
|
|
2487
|
+
Vn as PropProxyMap,
|
|
2460
2488
|
It as QueryString,
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2489
|
+
fr as SUFFIX,
|
|
2490
|
+
qs as SVGTemplateResult,
|
|
2491
|
+
zs as SheetToken,
|
|
2464
2492
|
Vt as StoreListenerMap,
|
|
2465
2493
|
_e as TemplateResult,
|
|
2466
|
-
|
|
2467
|
-
|
|
2494
|
+
Bs as absoluteLocation,
|
|
2495
|
+
Ks as addListener,
|
|
2468
2496
|
I as addMicrotask,
|
|
2469
|
-
|
|
2470
|
-
|
|
2497
|
+
Hr as addMicrotaskToStack,
|
|
2498
|
+
zr as adoptedStyle,
|
|
2471
2499
|
C as attribute,
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2500
|
+
tr as basePathStore,
|
|
2501
|
+
Zs as boolattribute,
|
|
2502
|
+
G as camelToKebabCase,
|
|
2503
|
+
Un as classMap,
|
|
2504
|
+
Xe as cleanObject,
|
|
2477
2505
|
ct as connect,
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2506
|
+
as as connectStore,
|
|
2507
|
+
Ir as createCSSSheet,
|
|
2508
|
+
rr as createHistoryParams,
|
|
2509
|
+
Qr as createModalClass,
|
|
2510
|
+
ls as createPath,
|
|
2483
2511
|
Ft as createStore,
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
rn as defineCSSState,
|
|
2512
|
+
Cr as createTheme,
|
|
2513
|
+
Wr as css,
|
|
2514
|
+
Yr as customElement,
|
|
2515
|
+
es as defineAttribute,
|
|
2516
|
+
ns as defineCSSState,
|
|
2490
2517
|
Dt as defineProperty,
|
|
2491
|
-
|
|
2492
|
-
|
|
2518
|
+
ss as defineRef,
|
|
2519
|
+
ei as del,
|
|
2493
2520
|
we as directive,
|
|
2494
|
-
|
|
2521
|
+
jr as disconnect,
|
|
2495
2522
|
Se as emitter,
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2523
|
+
Ur as exportPartsMap,
|
|
2524
|
+
si as get,
|
|
2525
|
+
Xr as getThemeProps,
|
|
2526
|
+
xr as getThemeStore,
|
|
2527
|
+
Kr as globalemitter,
|
|
2528
|
+
Bn as guard,
|
|
2529
|
+
v as history,
|
|
2530
|
+
j as html,
|
|
2531
|
+
Js as ifDefined,
|
|
2532
|
+
Ar as initRequest,
|
|
2533
|
+
Dn as isArrayChange,
|
|
2506
2534
|
ot as kebabToCamelCase,
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2535
|
+
hn as matchPath,
|
|
2536
|
+
ii as mediaQuery,
|
|
2537
|
+
rs as nativeDefineElement,
|
|
2538
|
+
Fr as numattribute,
|
|
2539
|
+
Ze as objectMapToString,
|
|
2540
|
+
zn as part,
|
|
2541
|
+
qr as partMap,
|
|
2542
|
+
ni as post,
|
|
2515
2543
|
N as property,
|
|
2516
|
-
|
|
2544
|
+
ri as put,
|
|
2517
2545
|
ve as randomStr,
|
|
2518
2546
|
Jt as raw,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2547
|
+
Gr as refobject,
|
|
2548
|
+
qn as removeItems,
|
|
2549
|
+
Fs as render,
|
|
2550
|
+
Fn as repeat,
|
|
2551
|
+
ti as request,
|
|
2552
|
+
Jr as rootElement,
|
|
2553
|
+
Br as slot,
|
|
2554
|
+
Or as splice,
|
|
2555
|
+
os as state,
|
|
2556
|
+
Dr as styleMap,
|
|
2557
|
+
Vr as styled,
|
|
2558
|
+
Hn as svg,
|
|
2531
2559
|
qt as titleStore,
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2560
|
+
st as updateStore,
|
|
2561
|
+
Pr as updateTheme,
|
|
2562
|
+
ts as useStore,
|
|
2563
|
+
Zr as useTheme,
|
|
2564
|
+
jn as version
|
|
2537
2565
|
};
|