@mantou/gem 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gem.es.js +1845 -1904
- package/dist/gem.umd.js +34 -191
- package/elements/base/dialog.d.ts +0 -4
- package/elements/base/dialog.d.ts.map +1 -1
- package/elements/base/dialog.js +0 -4
- package/elements/base/dialog.js.map +1 -1
- package/elements/base/gesture.d.ts +4 -14
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +34 -37
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts +2 -19
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +29 -42
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +32 -33
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/reflect.d.ts +0 -3
- package/elements/base/reflect.d.ts.map +1 -1
- package/elements/base/reflect.js +0 -3
- package/elements/base/reflect.js.map +1 -1
- package/elements/base/route.d.ts +0 -10
- package/elements/base/route.d.ts.map +1 -1
- package/elements/base/route.js +10 -22
- package/elements/base/route.js.map +1 -1
- package/elements/base/title.d.ts +0 -6
- package/elements/base/title.d.ts.map +1 -1
- package/elements/base/title.js +13 -8
- package/elements/base/title.js.map +1 -1
- package/elements/base/unsafe.d.ts +1 -6
- package/elements/base/unsafe.d.ts.map +1 -1
- package/elements/base/unsafe.js +12 -12
- package/elements/base/unsafe.js.map +1 -1
- package/elements/base/use.d.ts +0 -4
- package/elements/base/use.d.ts.map +1 -1
- package/elements/base/use.js +15 -13
- package/elements/base/use.js.map +1 -1
- package/helper/theme.d.ts +3 -3
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +3 -3
- package/helper/theme.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/lib/decorators.d.ts +7 -6
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +48 -33
- package/lib/decorators.js.map +1 -1
- package/lib/directive.d.ts +83 -0
- package/lib/directive.d.ts.map +1 -0
- package/lib/directive.js +59 -0
- package/lib/directive.js.map +1 -0
- package/lib/element.d.ts +9 -23
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +61 -56
- package/lib/element.js.map +1 -1
- package/lib/lit-html.d.ts +331 -0
- package/lib/lit-html.d.ts.map +1 -0
- package/lib/lit-html.js +941 -0
- package/lib/lit-html.js.map +1 -0
- package/lib/ref.d.ts +1 -0
- package/lib/ref.d.ts.map +1 -0
- package/lib/ref.js +2 -0
- package/lib/ref.js.map +1 -0
- package/lib/repeat.d.ts +126 -0
- package/lib/repeat.d.ts.map +1 -0
- package/lib/repeat.js +533 -0
- package/lib/repeat.js.map +1 -0
- package/lib/store.d.ts +1 -1
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +4 -4
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +1 -4
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +6 -15
- package/lib/utils.js.map +1 -1
- package/package.json +7 -9
- package/src/elements/base/dialog.ts +0 -4
- package/src/elements/base/gesture.ts +32 -35
- package/src/elements/base/link.ts +21 -41
- package/src/elements/base/reflect.ts +0 -3
- package/src/elements/base/route.ts +11 -21
- package/src/elements/base/title.ts +3 -7
- package/src/elements/base/unsafe.ts +9 -11
- package/src/elements/base/use.ts +8 -14
- package/src/helper/theme.ts +4 -4
- package/src/index.ts +0 -1
- package/src/lib/decorators.ts +53 -40
- package/src/lib/directive.ts +139 -0
- package/src/lib/element.ts +70 -79
- package/src/lib/lit-html.ts +1217 -0
- package/src/lib/repeat.ts +580 -0
- package/src/lib/store.ts +4 -4
- package/src/lib/utils.ts +6 -16
- package/src/test/elements/link.test.ts +1 -2
- package/src/test/elements/reflect.test.ts +13 -3
- package/src/test/elements/title.test.ts +1 -2
- package/src/test/gem-element/advance.test.ts +15 -8
- package/src/test/gem-element/basic.test.ts +22 -10
- package/src/test/gem-element/decorators.test.ts +6 -9
- package/src/test/gem-element/multi.test.ts +20 -11
- package/src/test/history.test.ts +2 -2
- package/src/test/store.test.ts +3 -3
- package/src/test/utils.test.ts +9 -10
- package/src/test/utils.ts +22 -0
- package/LICENSE +0 -21
- package/src/lib/directives.ts +0 -6
package/dist/gem.es.js
CHANGED
|
@@ -1,659 +1,586 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var Ha = Object.defineProperty;
|
|
2
|
+
var bi = (n) => {
|
|
3
|
+
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
5
|
+
var Wa = (n, t, e) => t in n ? Ha(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
6
|
+
var $ = (n, t, e) => Wa(n, typeof t != "symbol" ? t + "" : t, e), qn = (n, t, e) => t.has(n) || bi("Cannot " + e);
|
|
7
|
+
var _ = (n, t, e) => (qn(n, t, "read from private field"), e ? e.call(n) : t.get(n)), E = (n, t, e) => t.has(n) ? bi("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), O = (n, t, e, s) => (qn(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), Fn = (n, t, e) => (qn(n, t, "access private method"), e);
|
|
8
|
+
const za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9
9
|
__proto__: null,
|
|
10
10
|
get adoptedStyle() {
|
|
11
|
-
return
|
|
11
|
+
return Hn;
|
|
12
12
|
},
|
|
13
13
|
get aria() {
|
|
14
|
-
return
|
|
14
|
+
return zn;
|
|
15
15
|
},
|
|
16
16
|
get async() {
|
|
17
|
-
return
|
|
17
|
+
return Gc;
|
|
18
18
|
},
|
|
19
19
|
get attribute() {
|
|
20
|
-
return
|
|
20
|
+
return D;
|
|
21
21
|
},
|
|
22
22
|
get boolattribute() {
|
|
23
|
-
return
|
|
23
|
+
return Rn;
|
|
24
24
|
},
|
|
25
25
|
get connectStore() {
|
|
26
|
-
return
|
|
26
|
+
return Wn;
|
|
27
27
|
},
|
|
28
28
|
get customElement() {
|
|
29
|
-
return
|
|
29
|
+
return Uc;
|
|
30
30
|
},
|
|
31
31
|
get effect() {
|
|
32
|
-
return
|
|
32
|
+
return wt;
|
|
33
33
|
},
|
|
34
34
|
get emitter() {
|
|
35
|
-
return
|
|
35
|
+
return be;
|
|
36
36
|
},
|
|
37
37
|
get fallback() {
|
|
38
|
-
return
|
|
38
|
+
return Wc;
|
|
39
39
|
},
|
|
40
40
|
get globalemitter() {
|
|
41
|
-
return
|
|
41
|
+
return Dc;
|
|
42
42
|
},
|
|
43
43
|
get light() {
|
|
44
|
-
return
|
|
44
|
+
return Wr;
|
|
45
45
|
},
|
|
46
46
|
get memo() {
|
|
47
|
-
return
|
|
47
|
+
return Nr;
|
|
48
48
|
},
|
|
49
49
|
get mounted() {
|
|
50
|
-
return
|
|
50
|
+
return Qe;
|
|
51
51
|
},
|
|
52
52
|
get numattribute() {
|
|
53
|
-
return
|
|
53
|
+
return Ic;
|
|
54
54
|
},
|
|
55
55
|
get part() {
|
|
56
|
-
return
|
|
56
|
+
return Ir;
|
|
57
57
|
},
|
|
58
58
|
get property() {
|
|
59
|
-
return
|
|
59
|
+
return F;
|
|
60
60
|
},
|
|
61
61
|
get shadow() {
|
|
62
|
-
return
|
|
62
|
+
return Vt;
|
|
63
63
|
},
|
|
64
64
|
get slot() {
|
|
65
|
-
return
|
|
65
|
+
return Vc;
|
|
66
66
|
},
|
|
67
67
|
get state() {
|
|
68
|
-
return
|
|
68
|
+
return In;
|
|
69
69
|
},
|
|
70
70
|
get template() {
|
|
71
|
-
return
|
|
71
|
+
return le;
|
|
72
72
|
},
|
|
73
73
|
get unmounted() {
|
|
74
|
-
return
|
|
74
|
+
return Hc;
|
|
75
75
|
},
|
|
76
76
|
get willMount() {
|
|
77
|
-
return
|
|
77
|
+
return Ds;
|
|
78
78
|
}
|
|
79
79
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
80
80
|
/**
|
|
81
81
|
* @license
|
|
82
|
-
* Copyright
|
|
83
|
-
*
|
|
84
|
-
* http://polymer.github.io/LICENSE.txt
|
|
85
|
-
* The complete set of authors may be found at
|
|
86
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
87
|
-
* The complete set of contributors may be found at
|
|
88
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
89
|
-
* Code distributed by Google as part of the polymer project is also
|
|
90
|
-
* subject to an additional IP rights grant found at
|
|
91
|
-
* http://polymer.github.io/PATENTS.txt
|
|
82
|
+
* Copyright 2017 Google LLC
|
|
83
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
84
|
*/
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
85
|
+
const Va = globalThis, qe = Va.trustedTypes, Pi = qe == null ? void 0 : qe.createPolicy("lit-html", {
|
|
86
|
+
createHTML: (n) => n
|
|
87
|
+
}), vr = "$lit$", mt = `lit$${Math.random().toFixed(9).slice(2)}$`, wr = "?" + mt, Da = `<${wr}>`, Ht = document, Be = () => Ht.createComment(""), Ke = (n) => n === null || typeof n != "object" && typeof n != "function", jt = (n) => n == null, Ga = (n) => Symbol.iterator in n, Bn = `[
|
|
88
|
+
\f\r]`, Ua = `[^
|
|
89
|
+
\f\r"'\`<>=]`, qa = `[^\\s"'>=/]`, we = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ti = 1, Kn = 2, Fa = 3, ki = /-->/g, Oi = />/g, Ct = new RegExp(
|
|
90
|
+
`>|${Bn}(?:(${qa}+)(${Bn}*=${Bn}*(?:${Ua}|("|')|))|$)`,
|
|
91
|
+
"g"
|
|
92
|
+
), Ba = 0, Mi = 1, Ka = 2, xi = 3, Ai = /'/g, Li = /"/g, yr = /^(?:script|style|textarea|title)$/i, Ps = 1, vn = 2, ja = 3, Ja = 4, Qa = 5, Ts = 6, Ya = 7;
|
|
93
|
+
class ks {
|
|
94
|
+
constructor(t, e, s) {
|
|
95
|
+
$(this, "type");
|
|
96
|
+
$(this, "strings");
|
|
97
|
+
$(this, "values");
|
|
98
|
+
this.type = t, this.strings = e, this.values = s;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const Os = (n) => (t, ...e) => new ks(n, t, e), ht = Os(
|
|
102
|
+
0
|
|
103
|
+
/* HTML */
|
|
104
|
+
), Za = Os(
|
|
105
|
+
1
|
|
106
|
+
/* SVG */
|
|
107
|
+
), Xa = Os(
|
|
108
|
+
2
|
|
109
|
+
/* MATHML */
|
|
110
|
+
), Ms = Symbol.for("lit-noChange"), Ni = /* @__PURE__ */ new WeakMap(), Mt = Ht.createTreeWalker(
|
|
111
|
+
Ht,
|
|
112
|
+
129
|
|
113
|
+
/* NodeFilter.SHOW_{ELEMENT|COMMENT} */
|
|
114
|
+
);
|
|
115
|
+
function tc(n, t) {
|
|
116
|
+
if (!Array.isArray(n)) throw new Error("invalid template");
|
|
117
|
+
return Pi !== void 0 ? Pi.createHTML(t) : t;
|
|
118
|
+
}
|
|
119
|
+
const ec = (n, t) => {
|
|
120
|
+
const e = n.length - 1, s = [];
|
|
121
|
+
let i = t === 1 ? "<svg>" : t === 2 ? "<math>" : "", r, a = we;
|
|
122
|
+
for (let l = 0; l < e; l++) {
|
|
123
|
+
const d = n[l];
|
|
124
|
+
let f = -1, o, m = 0, h;
|
|
125
|
+
for (; m < d.length && (a.lastIndex = m, h = a.exec(d), h !== null); )
|
|
126
|
+
m = a.lastIndex, a === we ? h[Ti] === "!--" ? a = ki : h[Ti] !== void 0 ? a = Oi : h[Kn] !== void 0 ? (yr.test(h[Kn]) && (r = new RegExp(`</${h[Kn]}`, "g")), a = Ct) : h[Fa] !== void 0 && (a = Ct) : a === Ct ? h[Ba] === ">" ? (a = r ?? we, f = -1) : h[Mi] === void 0 ? f = -2 : (f = a.lastIndex - h[Ka].length, o = h[Mi], a = h[xi] === void 0 ? Ct : h[xi] === '"' ? Li : Ai) : a === Li || a === Ai ? a = Ct : a === ki || a === Oi ? a = we : (a = Ct, r = void 0);
|
|
127
|
+
const g = a === Ct && n[l + 1].startsWith("/>") ? " " : "";
|
|
128
|
+
i += a === we ? d + Da : f >= 0 ? (s.push(o), d.slice(0, f) + vr + d.slice(f) + mt + g) : d + mt + (f === -2 ? l : g);
|
|
129
|
+
}
|
|
130
|
+
const c = i + (n[e] || "<?>") + (t === 1 ? "</svg>" : t === 2 ? "</math>" : "");
|
|
131
|
+
return [tc(n, c), s];
|
|
120
132
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const o = r.nextNode();
|
|
157
|
-
if (o === null) {
|
|
158
|
-
r.currentNode = i.pop();
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
if (a++, o.nodeType === 1) {
|
|
162
|
-
if (o.hasAttributes()) {
|
|
163
|
-
const _ = o.attributes, { length: l } = _;
|
|
164
|
-
let m = 0;
|
|
165
|
-
for (let v = 0; v < l; v++)
|
|
166
|
-
yi(_[v].name, ge) && m++;
|
|
167
|
-
for (; m-- > 0; ) {
|
|
168
|
-
const v = f[d], y = Kn.exec(v)[2], $ = y.toLowerCase() + ge, u = o.getAttribute($);
|
|
169
|
-
o.removeAttribute($);
|
|
170
|
-
const S = u.split(wi);
|
|
171
|
-
this.parts.push({ type: "attribute", index: a, name: y, strings: S }), d += S.length - 1;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
o.tagName === "TEMPLATE" && (i.push(o), r.currentNode = o.content);
|
|
175
|
-
} else if (o.nodeType === 3) {
|
|
176
|
-
const _ = o.data;
|
|
177
|
-
if (_.indexOf(yt) >= 0) {
|
|
178
|
-
const l = o.parentNode, m = _.split(wi), v = m.length - 1;
|
|
179
|
-
for (let y = 0; y < v; y++) {
|
|
180
|
-
let $, u = m[y];
|
|
181
|
-
if (u === "")
|
|
182
|
-
$ = ot();
|
|
183
|
-
else {
|
|
184
|
-
const S = Kn.exec(u);
|
|
185
|
-
S !== null && yi(S[2], ge) && (u = u.slice(0, S.index) + S[1] + S[2].slice(0, -ge.length) + S[3]), $ = document.createTextNode(u);
|
|
186
|
-
}
|
|
187
|
-
l.insertBefore($, o), this.parts.push({ type: "node", index: ++a });
|
|
133
|
+
class xs {
|
|
134
|
+
constructor({ strings: t, type: e }, s) {
|
|
135
|
+
/** @internal */
|
|
136
|
+
$(this, "el");
|
|
137
|
+
$(this, "parts", []);
|
|
138
|
+
let i, r = 0, a = 0;
|
|
139
|
+
const c = t.length - 1, l = this.parts, [d, f] = ec(t, e);
|
|
140
|
+
if (this.el = xs.createElement(d, s), Mt.currentNode = this.el.content, e === 1 || e === 2) {
|
|
141
|
+
const o = this.el.content.firstChild;
|
|
142
|
+
o.replaceWith(...o.childNodes);
|
|
143
|
+
}
|
|
144
|
+
for (; (i = Mt.nextNode()) !== null && l.length < c; ) {
|
|
145
|
+
if (i.nodeType === 1) {
|
|
146
|
+
if (i.hasAttributes())
|
|
147
|
+
for (const o of i.getAttributeNames())
|
|
148
|
+
if (o.endsWith(vr)) {
|
|
149
|
+
const m = f[a++], g = i.getAttribute(o).split(mt), v = /([.?@])?(.*)/.exec(m);
|
|
150
|
+
l.push({
|
|
151
|
+
type: Ps,
|
|
152
|
+
index: r,
|
|
153
|
+
name: v[2],
|
|
154
|
+
strings: g,
|
|
155
|
+
ctor: v[1] === "." ? sc : v[1] === "?" ? ic : v[1] === "@" ? rc : On
|
|
156
|
+
}), i.removeAttribute(o);
|
|
157
|
+
} else o.startsWith(mt) && (l.push({
|
|
158
|
+
type: Ts,
|
|
159
|
+
index: r
|
|
160
|
+
}), i.removeAttribute(o));
|
|
161
|
+
if (yr.test(i.tagName)) {
|
|
162
|
+
const o = i.textContent.split(mt), m = o.length - 1;
|
|
163
|
+
if (m > 0) {
|
|
164
|
+
i.textContent = qe ? qe.emptyScript : "";
|
|
165
|
+
for (let h = 0; h < m; h++)
|
|
166
|
+
i.append(o[h], Be()), Mt.nextNode(), l.push({ type: vn, index: ++r });
|
|
167
|
+
i.append(o[m], Be());
|
|
188
168
|
}
|
|
189
|
-
m[v] === "" ? (l.insertBefore(ot(), o), s.push(o)) : o.data = m[v], d += v;
|
|
190
169
|
}
|
|
191
|
-
} else if (
|
|
192
|
-
if (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
this.parts.push({ type: "node", index: -1 }), d++;
|
|
170
|
+
} else if (i.nodeType === 8)
|
|
171
|
+
if (i.data === wr)
|
|
172
|
+
l.push({ type: vn, index: r });
|
|
173
|
+
else {
|
|
174
|
+
let m = -1;
|
|
175
|
+
for (; (m = i.data.indexOf(mt, m + 1)) !== -1; )
|
|
176
|
+
l.push({ type: Ya, index: r }), m += mt.length - 1;
|
|
199
177
|
}
|
|
178
|
+
r++;
|
|
200
179
|
}
|
|
201
|
-
for (const o of s)
|
|
202
|
-
o.parentNode.removeChild(o);
|
|
203
180
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
)
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
181
|
+
// Overridden via `litHtmlPolyfillSupport` to provide platform support.
|
|
182
|
+
/** @nocollapse */
|
|
183
|
+
static createElement(t, e) {
|
|
184
|
+
const s = Ht.createElement("template");
|
|
185
|
+
return s.innerHTML = t, s;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function re(n, t, e = n, s) {
|
|
189
|
+
var a, c;
|
|
190
|
+
if (t === Ms)
|
|
191
|
+
return t;
|
|
192
|
+
let i = s !== void 0 ? (a = e.__directives) == null ? void 0 : a[s] : e.__directive;
|
|
193
|
+
const r = Ke(t) ? void 0 : (
|
|
194
|
+
// This property needs to remain unminified.
|
|
195
|
+
t._$litDirective$
|
|
196
|
+
);
|
|
197
|
+
return (i == null ? void 0 : i.constructor) !== r && ((c = i == null ? void 0 : i._$notifyDirectiveConnectionChanged) == null || c.call(i, !1), r === void 0 ? i = void 0 : (i = new r(n), i._$initialize(n, e, s)), s !== void 0 ? (e.__directives ?? (e.__directives = []))[s] = i : e.__directive = i), i !== void 0 && (t = re(
|
|
198
|
+
n,
|
|
199
|
+
i._$resolve(n, t.values),
|
|
200
|
+
i,
|
|
201
|
+
s
|
|
202
|
+
)), t;
|
|
203
|
+
}
|
|
204
|
+
class nc {
|
|
205
|
+
constructor(t, e) {
|
|
206
|
+
$(this, "_$template");
|
|
207
|
+
$(this, "_$parts", []);
|
|
208
|
+
/** @internal */
|
|
209
|
+
$(this, "_$parent");
|
|
210
|
+
/** @internal */
|
|
211
|
+
$(this, "_$disconnectableChildren");
|
|
212
|
+
this._$template = t, this._$parent = e;
|
|
213
|
+
}
|
|
214
|
+
// Called by ChildPart parentNode getter
|
|
215
|
+
get parentNode() {
|
|
216
|
+
return this._$parent.parentNode;
|
|
217
|
+
}
|
|
218
|
+
// See comment in Disconnectable interface for why this is a getter
|
|
219
|
+
get _$isConnected() {
|
|
220
|
+
return this._$parent._$isConnected;
|
|
221
|
+
}
|
|
222
|
+
// This method is separate from the constructor because we need to return a
|
|
223
|
+
// DocumentFragment and we don't want to hold onto it with an instance field.
|
|
224
|
+
_clone(t) {
|
|
225
|
+
const {
|
|
226
|
+
el: { content: e },
|
|
227
|
+
parts: s
|
|
228
|
+
} = this._$template, i = ((t == null ? void 0 : t.creationScope) ?? Ht).importNode(e, !0);
|
|
229
|
+
Mt.currentNode = i;
|
|
230
|
+
let r = Mt.nextNode(), a = 0, c = 0, l = s[0];
|
|
231
|
+
for (; l !== void 0; ) {
|
|
232
|
+
if (a === l.index) {
|
|
233
|
+
let d;
|
|
234
|
+
l.type === vn ? d = new on(r, r.nextSibling, this, t) : l.type === Ps ? d = new l.ctor(r, l.name, l.strings, this, t) : l.type === Ts && (d = new oc(r, this, t)), this._$parts.push(d), l = s[++c];
|
|
243
235
|
}
|
|
244
|
-
|
|
245
|
-
c++, d.nodeName === "TEMPLATE" && (n.push(d), i.currentNode = d.content), (d = i.nextNode()) === null && (i.currentNode = n.pop(), d = i.nextNode());
|
|
246
|
-
if (a.type === "node") {
|
|
247
|
-
const f = this.processor.handleTextExpression(this.options);
|
|
248
|
-
f.insertAfterNode(d.previousSibling), this.__parts.push(f);
|
|
249
|
-
} else
|
|
250
|
-
this.__parts.push(...this.processor.handleAttributeExpressions(d, a.name, a.strings, this.options));
|
|
251
|
-
r++;
|
|
236
|
+
a !== (l == null ? void 0 : l.index) && (r = Mt.nextNode(), a++);
|
|
252
237
|
}
|
|
253
|
-
return
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
*/
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
238
|
+
return Mt.currentNode = Ht, i;
|
|
239
|
+
}
|
|
240
|
+
_update(t) {
|
|
241
|
+
let e = 0;
|
|
242
|
+
for (const s of this._$parts)
|
|
243
|
+
s !== void 0 && (s.strings !== void 0 ? (s._$setValue(t, s, e), e += s.strings.length - 2) : s._$setValue(t[e])), e++;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
class on {
|
|
247
|
+
constructor(t, e, s, i) {
|
|
248
|
+
$(this, "type", vn);
|
|
249
|
+
$(this, "options");
|
|
250
|
+
$(this, "_$committedValue");
|
|
251
|
+
/** @internal */
|
|
252
|
+
$(this, "__directive");
|
|
253
|
+
/** @internal */
|
|
254
|
+
$(this, "_$startNode");
|
|
255
|
+
/** @internal */
|
|
256
|
+
$(this, "_$endNode");
|
|
257
|
+
/** @internal */
|
|
258
|
+
$(this, "_$parent");
|
|
259
|
+
/**
|
|
260
|
+
* Connection state for RootParts only (i.e. ChildPart without _$parent
|
|
261
|
+
* returned from top-level `render`). This field is unused otherwise. The
|
|
262
|
+
* intention would be clearer if we made `RootPart` a subclass of `ChildPart`
|
|
263
|
+
* with this field (and a different _$isConnected getter), but the subclass
|
|
264
|
+
* caused a perf regression, possibly due to making call sites polymorphic.
|
|
265
|
+
* @internal
|
|
266
|
+
*/
|
|
267
|
+
$(this, "__isConnected");
|
|
268
|
+
// The following fields will be patched onto ChildParts when required by
|
|
269
|
+
// AsyncDirective
|
|
270
|
+
/** @internal */
|
|
271
|
+
$(this, "_$disconnectableChildren");
|
|
272
|
+
this._$startNode = t, this._$endNode = e, this._$parent = s, this.options = i, this.__isConnected = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
273
|
+
}
|
|
274
|
+
// See comment in Disconnectable interface for why this is a getter
|
|
275
|
+
get _$isConnected() {
|
|
276
|
+
var t;
|
|
277
|
+
return ((t = this._$parent) == null ? void 0 : t._$isConnected) ?? this.__isConnected;
|
|
273
278
|
}
|
|
274
279
|
/**
|
|
275
|
-
*
|
|
280
|
+
* The parent node into which the part renders its content.
|
|
281
|
+
*
|
|
282
|
+
* A ChildPart's content consists of a range of adjacent child nodes of
|
|
283
|
+
* `.parentNode`, possibly bordered by 'marker nodes' (`.startNode` and
|
|
284
|
+
* `.endNode`).
|
|
285
|
+
*
|
|
286
|
+
* - If both `.startNode` and `.endNode` are non-null, then the part's content
|
|
287
|
+
* consists of all siblings between `.startNode` and `.endNode`, exclusively.
|
|
288
|
+
*
|
|
289
|
+
* - If `.startNode` is non-null but `.endNode` is null, then the part's
|
|
290
|
+
* content consists of all siblings following `.startNode`, up to and
|
|
291
|
+
* including the last child of `.parentNode`. If `.endNode` is non-null, then
|
|
292
|
+
* `.startNode` will always be non-null.
|
|
293
|
+
*
|
|
294
|
+
* - If both `.endNode` and `.startNode` are null, then the part's content
|
|
295
|
+
* consists of all child nodes of `.parentNode`.
|
|
276
296
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const r = this.strings[i], c = r.lastIndexOf("<!--");
|
|
282
|
-
s = (c > -1 || s) && r.indexOf("-->", c + 1) === -1;
|
|
283
|
-
const a = Kn.exec(r);
|
|
284
|
-
a === null ? n += r + (s ? Ma : ur) : n += r.substr(0, a.index) + a[1] + a[2] + ge + a[3] + yt;
|
|
285
|
-
}
|
|
286
|
-
return n += this.strings[t], n;
|
|
287
|
-
}
|
|
288
|
-
getTemplateElement() {
|
|
289
|
-
const t = document.createElement("template");
|
|
290
|
-
let n = this.getHTML();
|
|
291
|
-
return $i !== void 0 && (n = $i.createHTML(n)), t.innerHTML = n, t;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
class dr extends yn {
|
|
295
|
-
getHTML() {
|
|
296
|
-
return `<svg>${super.getHTML()}</svg>`;
|
|
297
|
-
}
|
|
298
|
-
getTemplateElement() {
|
|
299
|
-
const t = super.getTemplateElement(), n = t.content, s = n.firstChild;
|
|
300
|
-
return n.removeChild(s), hr(n, s.firstChild), t;
|
|
297
|
+
get parentNode() {
|
|
298
|
+
let t = this._$startNode.parentNode;
|
|
299
|
+
const e = this._$parent;
|
|
300
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
* The complete set of authors may be found at
|
|
309
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
310
|
-
* The complete set of contributors may be found at
|
|
311
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
312
|
-
* Code distributed by Google as part of the polymer project is also
|
|
313
|
-
* subject to an additional IP rights grant found at
|
|
314
|
-
* http://polymer.github.io/PATENTS.txt
|
|
315
|
-
*/
|
|
316
|
-
const $s = (e) => e === null || !(typeof e == "object" || typeof e == "function"), jn = (e) => Array.isArray(e) || // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
317
|
-
!!(e && e[Symbol.iterator]);
|
|
318
|
-
class pr {
|
|
319
|
-
constructor(t, n, s) {
|
|
320
|
-
this.dirty = !0, this.element = t, this.name = n, this.strings = s, this.parts = [];
|
|
321
|
-
for (let i = 0; i < s.length - 1; i++)
|
|
322
|
-
this.parts[i] = this._createPart();
|
|
302
|
+
/**
|
|
303
|
+
* The part's leading marker node, if any. See `.parentNode` for more
|
|
304
|
+
* information.
|
|
305
|
+
*/
|
|
306
|
+
get startNode() {
|
|
307
|
+
return this._$startNode;
|
|
323
308
|
}
|
|
324
309
|
/**
|
|
325
|
-
*
|
|
310
|
+
* The part's trailing marker node, if any. See `.parentNode` for more
|
|
311
|
+
* information.
|
|
326
312
|
*/
|
|
327
|
-
|
|
328
|
-
return
|
|
329
|
-
}
|
|
330
|
-
_getValue() {
|
|
331
|
-
const t = this.strings, n = t.length - 1, s = this.parts;
|
|
332
|
-
if (n === 1 && t[0] === "" && t[1] === "") {
|
|
333
|
-
const r = s[0].value;
|
|
334
|
-
if (typeof r == "symbol")
|
|
335
|
-
return String(r);
|
|
336
|
-
if (typeof r == "string" || !jn(r))
|
|
337
|
-
return r;
|
|
338
|
-
}
|
|
339
|
-
let i = "";
|
|
340
|
-
for (let r = 0; r < n; r++) {
|
|
341
|
-
i += t[r];
|
|
342
|
-
const c = s[r];
|
|
343
|
-
if (c !== void 0) {
|
|
344
|
-
const a = c.value;
|
|
345
|
-
if ($s(a) || !jn(a))
|
|
346
|
-
i += typeof a == "string" ? a : String(a);
|
|
347
|
-
else
|
|
348
|
-
for (const d of a)
|
|
349
|
-
i += typeof d == "string" ? d : String(d);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
return i += t[n], i;
|
|
313
|
+
get endNode() {
|
|
314
|
+
return this._$endNode;
|
|
353
315
|
}
|
|
354
|
-
|
|
355
|
-
this.
|
|
316
|
+
_$setValue(t, e = this) {
|
|
317
|
+
this.parentNode && (t = re(this, t, e), Ke(t) ? jt(t) || t === "" ? (jt(this._$committedValue) || this._$clear(), this._$committedValue = void 0) : t !== this._$committedValue && t !== Ms && this._commitText(t) : t instanceof ks ? this._commitTemplateResult(t) : t.nodeType !== void 0 ? this._commitNode(t) : Ga(t) ? this._commitIterable(t) : this._commitText(t));
|
|
356
318
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
constructor(t) {
|
|
360
|
-
this.value = void 0, this.committer = t;
|
|
319
|
+
_insert(t) {
|
|
320
|
+
return this._$startNode.parentNode.insertBefore(t, this._$endNode);
|
|
361
321
|
}
|
|
362
|
-
|
|
363
|
-
|
|
322
|
+
_commitNode(t) {
|
|
323
|
+
this._$committedValue !== t && (this._$clear(), this._$committedValue = this._insert(t));
|
|
364
324
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
|
|
325
|
+
_commitText(t) {
|
|
326
|
+
if (!jt(this._$committedValue) && Ke(this._$committedValue)) {
|
|
327
|
+
const e = this._$startNode.nextSibling;
|
|
328
|
+
e.data = t;
|
|
329
|
+
} else
|
|
330
|
+
this._commitNode(Ht.createTextNode(t));
|
|
331
|
+
this._$committedValue = t;
|
|
332
|
+
}
|
|
333
|
+
_commitTemplateResult(t) {
|
|
334
|
+
var i;
|
|
335
|
+
const { values: e } = t, s = this._$getTemplate(t);
|
|
336
|
+
if (((i = this._$committedValue) == null ? void 0 : i._$template) === s)
|
|
337
|
+
this._$committedValue._update(e);
|
|
338
|
+
else {
|
|
339
|
+
const r = new nc(s, this), a = r._clone(this.options);
|
|
340
|
+
r._update(e), this._commitNode(a), this._$committedValue = r;
|
|
369
341
|
}
|
|
370
|
-
this.value !== it && this.committer.commit();
|
|
371
342
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
343
|
+
// Overridden via `litHtmlPolyfillSupport` to provide platform support.
|
|
344
|
+
/** @internal */
|
|
345
|
+
_$getTemplate(t) {
|
|
346
|
+
let e = Ni.get(t.strings);
|
|
347
|
+
return e === void 0 && Ni.set(t.strings, e = new xs(t)), e;
|
|
376
348
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
349
|
+
_commitIterable(t) {
|
|
350
|
+
Array.isArray(this._$committedValue) || (this._$committedValue = [], this._$clear());
|
|
351
|
+
const e = this._$committedValue;
|
|
352
|
+
let s = 0, i;
|
|
353
|
+
for (const r of t)
|
|
354
|
+
s === e.length ? e.push(
|
|
355
|
+
i = new on(this._insert(Be()), this._insert(Be()), this, this.options)
|
|
356
|
+
) : i = e[s], i._$setValue(r), s++;
|
|
357
|
+
s < e.length && (this._$clear(i && i._$endNode.nextSibling, s), e.length = s);
|
|
384
358
|
}
|
|
385
359
|
/**
|
|
386
|
-
*
|
|
387
|
-
* sibling). Both `ref` and its next sibling must be static, unchanging nodes
|
|
388
|
-
* such as those that appear in a literal section of a template.
|
|
360
|
+
* Removes the nodes contained within this Part from the DOM.
|
|
389
361
|
*
|
|
390
|
-
*
|
|
362
|
+
* @param start Start node to clear from, for clearing a subset of the part's
|
|
363
|
+
* DOM (used when truncating iterables)
|
|
364
|
+
* @param from When `start` is specified, the index within the iterable from
|
|
365
|
+
* which ChildParts are being removed, used for disconnecting directives in
|
|
366
|
+
* those Parts.
|
|
367
|
+
*
|
|
368
|
+
* @internal
|
|
391
369
|
*/
|
|
392
|
-
|
|
393
|
-
|
|
370
|
+
_$clear(t = this._$startNode.nextSibling, e) {
|
|
371
|
+
var s;
|
|
372
|
+
for ((s = this._$notifyConnectionChanged) == null || s.call(this, !1, !0, e); t && t !== this._$endNode; ) {
|
|
373
|
+
const i = t.nextSibling;
|
|
374
|
+
t.remove(), t = i;
|
|
375
|
+
}
|
|
394
376
|
}
|
|
395
377
|
/**
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
378
|
+
* Implementation of RootPart's `isConnected`. Note that this method
|
|
379
|
+
* should only be called on `RootPart`s (the `ChildPart` returned from a
|
|
380
|
+
* top-level `render()` call). It has no effect on non-root ChildParts.
|
|
381
|
+
* @param isConnected Whether to set
|
|
382
|
+
* @internal
|
|
399
383
|
*/
|
|
400
|
-
|
|
401
|
-
|
|
384
|
+
setConnected(t) {
|
|
385
|
+
var e;
|
|
386
|
+
this._$parent === void 0 && (this.__isConnected = t, (e = this._$notifyConnectionChanged) == null || e.call(this, t));
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
class On {
|
|
390
|
+
constructor(t, e, s, i, r) {
|
|
391
|
+
$(this, "type", Ps);
|
|
392
|
+
$(this, "element");
|
|
393
|
+
$(this, "name");
|
|
394
|
+
$(this, "options");
|
|
395
|
+
/**
|
|
396
|
+
* If this attribute part represents an interpolation, this contains the
|
|
397
|
+
* static strings of the interpolation. For single-value, complete bindings,
|
|
398
|
+
* this is undefined.
|
|
399
|
+
*/
|
|
400
|
+
$(this, "strings");
|
|
401
|
+
/** @internal */
|
|
402
|
+
$(this, "_$committedValue");
|
|
403
|
+
/** @internal */
|
|
404
|
+
$(this, "__directives");
|
|
405
|
+
/** @internal */
|
|
406
|
+
$(this, "_$parent");
|
|
407
|
+
/** @internal */
|
|
408
|
+
$(this, "_$disconnectableChildren");
|
|
409
|
+
this.element = t, this.name = e, this._$parent = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$committedValue = new Array(s.length - 1).fill(new String()), this.strings = s) : this._$committedValue = void 0;
|
|
410
|
+
}
|
|
411
|
+
get tagName() {
|
|
412
|
+
return this.element.tagName;
|
|
413
|
+
}
|
|
414
|
+
// See comment in Disconnectable interface for why this is a getter
|
|
415
|
+
get _$isConnected() {
|
|
416
|
+
return this._$parent._$isConnected;
|
|
402
417
|
}
|
|
403
418
|
/**
|
|
404
|
-
*
|
|
419
|
+
* Sets the value of this part by resolving the value from possibly multiple
|
|
420
|
+
* values and static strings and committing it to the DOM.
|
|
421
|
+
* If this part is single-valued, `this._strings` will be undefined, and the
|
|
422
|
+
* method will be called with a single value argument. If this part is
|
|
423
|
+
* multi-value, `this._strings` will be defined, and the method is called
|
|
424
|
+
* with the value array of the part's owning TemplateInstance, and an offset
|
|
425
|
+
* into the value array from which the values should be read.
|
|
426
|
+
* This method is overloaded this way to eliminate short-lived array slices
|
|
427
|
+
* of the template instance values, and allow a fast-path for single-valued
|
|
428
|
+
* parts.
|
|
429
|
+
*
|
|
430
|
+
* @param value The part value, or an array of values for multi-valued parts
|
|
431
|
+
* @param valueIndex the index to start reading values from. `undefined` for
|
|
432
|
+
* single-valued parts
|
|
433
|
+
* @param noCommit causes the part to not commit its value to the DOM. Used
|
|
434
|
+
* in hydration to prime attribute parts with their first-rendered value,
|
|
435
|
+
* but not set the attribute, and in SSR to no-op the DOM operation and
|
|
436
|
+
* capture the value for serialization.
|
|
405
437
|
*
|
|
406
|
-
*
|
|
438
|
+
* @internal
|
|
407
439
|
*/
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
commit() {
|
|
415
|
-
if (this.startNode.parentNode === null)
|
|
416
|
-
return;
|
|
417
|
-
for (; ze(this.__pendingValue); ) {
|
|
418
|
-
const n = this.__pendingValue;
|
|
419
|
-
this.__pendingValue = it, n(this);
|
|
420
|
-
}
|
|
421
|
-
const t = this.__pendingValue;
|
|
422
|
-
t !== it && ($s(t) ? t !== this.value && this.__commitText(t) : t instanceof yn ? this.__commitTemplateResult(t) : t instanceof Node ? this.__commitNode(t) : jn(t) ? this.__commitIterable(t) : t === vi ? (this.value = vi, this.clear()) : this.__commitText(t));
|
|
423
|
-
}
|
|
424
|
-
__insert(t) {
|
|
425
|
-
this.endNode.parentNode.insertBefore(t, this.endNode);
|
|
426
|
-
}
|
|
427
|
-
__commitNode(t) {
|
|
428
|
-
this.value !== t && (this.clear(), this.__insert(t), this.value = t);
|
|
429
|
-
}
|
|
430
|
-
__commitText(t) {
|
|
431
|
-
const n = this.startNode.nextSibling;
|
|
432
|
-
t = t ?? "";
|
|
433
|
-
const s = typeof t == "string" ? t : String(t);
|
|
434
|
-
n === this.endNode.previousSibling && n.nodeType === 3 ? n.data = s : this.__commitNode(document.createTextNode(s)), this.value = t;
|
|
435
|
-
}
|
|
436
|
-
__commitTemplateResult(t) {
|
|
437
|
-
const n = this.options.templateFactory(t);
|
|
438
|
-
if (this.value instanceof Si && this.value.template === n)
|
|
439
|
-
this.value.update(t.values);
|
|
440
|
+
_$setValue(t, e = this, s, i) {
|
|
441
|
+
const r = this.strings;
|
|
442
|
+
let a = !1;
|
|
443
|
+
if (r === void 0)
|
|
444
|
+
t = re(this, t, e, 0), a = !Ke(t) || t !== this._$committedValue, a && (this._$committedValue = t);
|
|
440
445
|
else {
|
|
441
|
-
const
|
|
442
|
-
|
|
446
|
+
const c = t;
|
|
447
|
+
t = r[0];
|
|
448
|
+
let l, d;
|
|
449
|
+
for (l = 0; l < r.length - 1; l++)
|
|
450
|
+
d = re(this, c[s + l], e, l), a || (a = !Ke(d) || d !== this._$committedValue[l]), jt(d) ? t = void 0 : jt(t) || (t += d + r[l + 1]), this._$committedValue[l] = d;
|
|
443
451
|
}
|
|
452
|
+
a && !i && this._commitValue(t);
|
|
444
453
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
let s = 0, i;
|
|
449
|
-
for (const r of t)
|
|
450
|
-
i = n[s], i === void 0 && (i = new se(this.options), n.push(i), s === 0 ? i.appendIntoPart(this) : i.insertAfterPart(n[s - 1])), i.setValue(r), i.commit(), s++;
|
|
451
|
-
s < n.length && (n.length = s, this.clear(i && i.endNode));
|
|
452
|
-
}
|
|
453
|
-
clear(t = this.startNode) {
|
|
454
|
-
Ss(this.startNode.parentNode, t.nextSibling, this.endNode);
|
|
454
|
+
/** @internal */
|
|
455
|
+
_commitValue(t) {
|
|
456
|
+
jt(t) ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t);
|
|
455
457
|
}
|
|
456
458
|
}
|
|
457
|
-
class
|
|
458
|
-
constructor(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
this.element = t, this.name = n, this.strings = s;
|
|
462
|
-
}
|
|
463
|
-
setValue(t) {
|
|
464
|
-
this.__pendingValue = t;
|
|
459
|
+
class sc extends On {
|
|
460
|
+
constructor() {
|
|
461
|
+
super(...arguments);
|
|
462
|
+
$(this, "type", ja);
|
|
465
463
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
this.__pendingValue = it, n(this);
|
|
470
|
-
}
|
|
471
|
-
if (this.__pendingValue === it)
|
|
472
|
-
return;
|
|
473
|
-
const t = !!this.__pendingValue;
|
|
474
|
-
this.value !== t && (t ? this.element.setAttribute(this.name, "") : this.element.removeAttribute(this.name), this.value = t), this.__pendingValue = it;
|
|
464
|
+
/** @internal */
|
|
465
|
+
_commitValue(e) {
|
|
466
|
+
this.element[this.name] = e;
|
|
475
467
|
}
|
|
476
468
|
}
|
|
477
|
-
class
|
|
478
|
-
constructor(
|
|
479
|
-
super(
|
|
480
|
-
|
|
481
|
-
_createPart() {
|
|
482
|
-
return new Aa(this);
|
|
483
|
-
}
|
|
484
|
-
_getValue() {
|
|
485
|
-
return this.single ? this.parts[0].value : super._getValue();
|
|
469
|
+
class ic extends On {
|
|
470
|
+
constructor() {
|
|
471
|
+
super(...arguments);
|
|
472
|
+
$(this, "type", Ja);
|
|
486
473
|
}
|
|
487
|
-
|
|
488
|
-
|
|
474
|
+
/** @internal */
|
|
475
|
+
_commitValue(e) {
|
|
476
|
+
this.element.toggleAttribute(this.name, !!e);
|
|
489
477
|
}
|
|
490
478
|
}
|
|
491
|
-
class
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
(
|
|
495
|
-
try {
|
|
496
|
-
const e = {
|
|
497
|
-
get capture() {
|
|
498
|
-
return fr = !0, !1;
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
window.addEventListener("test", e, e), window.removeEventListener("test", e, e);
|
|
502
|
-
} catch {
|
|
503
|
-
}
|
|
504
|
-
})();
|
|
505
|
-
class Ia {
|
|
506
|
-
constructor(t, n, s) {
|
|
507
|
-
this.value = void 0, this.__pendingValue = void 0, this.element = t, this.eventName = n, this.eventContext = s, this.__boundHandleEvent = (i) => this.handleEvent(i);
|
|
479
|
+
class rc extends On {
|
|
480
|
+
constructor(e, s, i, r, a) {
|
|
481
|
+
super(e, s, i, r, a);
|
|
482
|
+
$(this, "type", Qa);
|
|
508
483
|
}
|
|
509
|
-
|
|
510
|
-
|
|
484
|
+
/** @internal */
|
|
485
|
+
_$setValue(e, s = this) {
|
|
486
|
+
e = re(this, e, s, 0);
|
|
487
|
+
const i = this._$committedValue, r = i && (!e || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive), a = e && (!i || r);
|
|
488
|
+
r && this.element.removeEventListener(this.name, this, i), a && this.element.addEventListener(this.name, this, e), this._$committedValue = e;
|
|
511
489
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
490
|
+
handleEvent(e) {
|
|
491
|
+
var s;
|
|
492
|
+
typeof this._$committedValue == "function" ? this._$committedValue.call(((s = this.options) == null ? void 0 : s.host) ?? this.element, e) : this._$committedValue.handleEvent(e);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
class oc {
|
|
496
|
+
constructor(t, e, s) {
|
|
497
|
+
$(this, "type", Ts);
|
|
498
|
+
/** @internal */
|
|
499
|
+
$(this, "__directive");
|
|
500
|
+
// This is to ensure that every Part has a _$committedValue
|
|
501
|
+
$(this, "_$committedValue");
|
|
502
|
+
/** @internal */
|
|
503
|
+
$(this, "_$parent");
|
|
504
|
+
/** @internal */
|
|
505
|
+
$(this, "_$disconnectableChildren");
|
|
506
|
+
$(this, "_$props");
|
|
507
|
+
$(this, "options");
|
|
508
|
+
this.element = t, this._$parent = e, this.options = s;
|
|
509
|
+
}
|
|
510
|
+
// See comment in Disconnectable interface for why this is a getter
|
|
511
|
+
get _$isConnected() {
|
|
512
|
+
return this._$parent._$isConnected;
|
|
513
|
+
}
|
|
514
|
+
_$setValue(t) {
|
|
515
|
+
if (t)
|
|
516
|
+
if (t instanceof Sr)
|
|
517
|
+
t.value = this.element;
|
|
518
|
+
else if (t._$litDirective$)
|
|
519
|
+
re(this, t);
|
|
520
|
+
else {
|
|
521
|
+
if (this._$props)
|
|
522
|
+
for (const e in this._$props)
|
|
523
|
+
Reflect.set(this.element, e, void 0);
|
|
524
|
+
Object.assign(this.element, t), this._$props = t;
|
|
525
|
+
}
|
|
524
526
|
}
|
|
525
527
|
}
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
* name, and string literals.
|
|
544
|
-
*
|
|
545
|
-
* @param element The element containing the binding
|
|
546
|
-
* @param name The attribute name
|
|
547
|
-
* @param strings The string literals. There are always at least two strings,
|
|
548
|
-
* event for fully-controlled bindings with a single expression.
|
|
549
|
-
*/
|
|
550
|
-
handleAttributeExpressions(t, n, s, i) {
|
|
551
|
-
const r = n[0];
|
|
552
|
-
return r === "." ? new Na(t, n.slice(1), s).parts : r === "@" ? [new Ia(t, n.slice(1), i.eventContext)] : r === "?" ? [new La(t, n.slice(1), s)] : new pr(t, n, s).parts;
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Create parts for a text-position binding.
|
|
556
|
-
* @param templateFactory
|
|
557
|
-
*/
|
|
558
|
-
handleTextExpression(t) {
|
|
559
|
-
return new se(t);
|
|
528
|
+
const ac = () => new Sr();
|
|
529
|
+
class Sr {
|
|
530
|
+
constructor() {
|
|
531
|
+
$(this, "value");
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
const As = (n, t, e) => {
|
|
535
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
536
|
+
let i = s._$litPart$;
|
|
537
|
+
if (i === void 0) {
|
|
538
|
+
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
539
|
+
s._$litPart$ = i = new on(
|
|
540
|
+
t.insertBefore(Be(), r),
|
|
541
|
+
r,
|
|
542
|
+
void 0,
|
|
543
|
+
e ?? {}
|
|
544
|
+
);
|
|
560
545
|
}
|
|
546
|
+
return i._$setValue(n), i;
|
|
547
|
+
}, { assign: cc, fromEntries: hc, entries: lc, keys: dc } = Object, jn = /* @__PURE__ */ new Set();
|
|
548
|
+
function xt(n) {
|
|
549
|
+
jn.has(n) || (queueMicrotask(() => {
|
|
550
|
+
jn.delete(n), n();
|
|
551
|
+
}), jn.add(n));
|
|
561
552
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
*/
|
|
576
|
-
function Wa(e) {
|
|
577
|
-
let t = Ei.get(e.type);
|
|
578
|
-
t === void 0 && (t = {
|
|
579
|
-
stringsArray: /* @__PURE__ */ new WeakMap(),
|
|
580
|
-
keyString: /* @__PURE__ */ new Map()
|
|
581
|
-
}, Ei.set(e.type, t));
|
|
582
|
-
let n = t.stringsArray.get(e.strings);
|
|
583
|
-
if (n !== void 0)
|
|
584
|
-
return n;
|
|
585
|
-
const s = e.strings.join(yt);
|
|
586
|
-
return n = t.keyString.get(s), n === void 0 && (n = new Ta(e, e.getTemplateElement()), t.keyString.set(s, n)), t.stringsArray.set(e.strings, n), n;
|
|
587
|
-
}
|
|
588
|
-
const Ei = /* @__PURE__ */ new Map();
|
|
589
|
-
/**
|
|
590
|
-
* @license
|
|
591
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
592
|
-
* This code may only be used under the BSD style license found at
|
|
593
|
-
* http://polymer.github.io/LICENSE.txt
|
|
594
|
-
* The complete set of authors may be found at
|
|
595
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
596
|
-
* The complete set of contributors may be found at
|
|
597
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
598
|
-
* Code distributed by Google as part of the polymer project is also
|
|
599
|
-
* subject to an additional IP rights grant found at
|
|
600
|
-
* http://polymer.github.io/PATENTS.txt
|
|
601
|
-
*/
|
|
602
|
-
const bi = /* @__PURE__ */ new WeakMap(), bs = (e, t, n) => {
|
|
603
|
-
let s = bi.get(t);
|
|
604
|
-
s === void 0 && (Ss(t, t.firstChild), bi.set(t, s = new se(Object.assign({ templateFactory: Wa }, n))), s.appendInto(t)), s.setValue(e), s.commit();
|
|
605
|
-
};
|
|
606
|
-
/**
|
|
607
|
-
* @license
|
|
608
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
609
|
-
* This code may only be used under the BSD style license found at
|
|
610
|
-
* http://polymer.github.io/LICENSE.txt
|
|
611
|
-
* The complete set of authors may be found at
|
|
612
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
613
|
-
* The complete set of contributors may be found at
|
|
614
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
615
|
-
* Code distributed by Google as part of the polymer project is also
|
|
616
|
-
* subject to an additional IP rights grant found at
|
|
617
|
-
* http://polymer.github.io/PATENTS.txt
|
|
618
|
-
*/
|
|
619
|
-
typeof window < "u" && (window.litHtmlVersions || (window.litHtmlVersions = [])).push("1.4.1");
|
|
620
|
-
const at = (e, ...t) => new yn(e, t, "html", _r), za = (e, ...t) => new dr(e, t, "svg", _r), { assign: Ga, setPrototypeOf: Va, fromEntries: Da, entries: Fa, keys: qa } = Object, Rn = /* @__PURE__ */ new Set();
|
|
621
|
-
function Tt(e) {
|
|
622
|
-
Rn.has(e) || (queueMicrotask(() => {
|
|
623
|
-
Rn.delete(e), e();
|
|
624
|
-
}), Rn.add(e));
|
|
625
|
-
}
|
|
626
|
-
function Sn(e, t) {
|
|
627
|
-
const n = t;
|
|
628
|
-
return Va(n, null), delete n.name, delete n.length, Ga(n, e), n;
|
|
629
|
-
}
|
|
630
|
-
function gr(e = "", t = "") {
|
|
631
|
-
const { pathname: n, search: s, hash: i } = new URL(t, location.origin + e);
|
|
632
|
-
return n + s + decodeURIComponent(i);
|
|
633
|
-
}
|
|
634
|
-
function mr(e, t, n, s) {
|
|
635
|
-
return e.addEventListener(t, n, s), () => e.removeEventListener(t, n, s);
|
|
636
|
-
}
|
|
637
|
-
var vt, lt, wt, Ue, Jn;
|
|
638
|
-
class Ua extends EventTarget {
|
|
553
|
+
function Mn(n, t) {
|
|
554
|
+
const e = t;
|
|
555
|
+
return delete e.name, delete e.length, cc(e, n), e;
|
|
556
|
+
}
|
|
557
|
+
function Er(n = "", t = "") {
|
|
558
|
+
const { pathname: e, search: s, hash: i } = new URL(t, location.origin + n);
|
|
559
|
+
return e + s + decodeURIComponent(i);
|
|
560
|
+
}
|
|
561
|
+
function Cr(n, t, e, s) {
|
|
562
|
+
return n.addEventListener(t, e, s), () => n.removeEventListener(t, e, s);
|
|
563
|
+
}
|
|
564
|
+
var gt, lt, $t, Xe, ts;
|
|
565
|
+
class uc extends EventTarget {
|
|
639
566
|
constructor() {
|
|
640
567
|
super(...arguments);
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
568
|
+
E(this, Xe);
|
|
569
|
+
E(this, gt, /* @__PURE__ */ new Map());
|
|
570
|
+
E(this, lt);
|
|
571
|
+
E(this, $t);
|
|
645
572
|
}
|
|
646
573
|
get size() {
|
|
647
|
-
return
|
|
574
|
+
return _(this, gt).size;
|
|
648
575
|
}
|
|
649
576
|
get first() {
|
|
650
|
-
return
|
|
577
|
+
return _(this, lt);
|
|
651
578
|
}
|
|
652
579
|
get last() {
|
|
653
|
-
return
|
|
580
|
+
return _(this, $t);
|
|
654
581
|
}
|
|
655
|
-
isSuperLinkOf(
|
|
656
|
-
let s =
|
|
582
|
+
isSuperLinkOf(e) {
|
|
583
|
+
let s = e.first;
|
|
657
584
|
if (!s) return !0;
|
|
658
585
|
let i = this.find(s.value);
|
|
659
586
|
for (; i && i.value === s.value; ) {
|
|
@@ -662,359 +589,503 @@ class Ua extends EventTarget {
|
|
|
662
589
|
}
|
|
663
590
|
return !1;
|
|
664
591
|
}
|
|
665
|
-
find(
|
|
666
|
-
return
|
|
592
|
+
find(e) {
|
|
593
|
+
return _(this, gt).get(e);
|
|
667
594
|
}
|
|
668
595
|
// 添加到尾部,已存在时会删除老的项目
|
|
669
596
|
// 如果是添加第一个,start 事件会在添加前触发,避免处理事件重复的逻辑
|
|
670
|
-
add(
|
|
671
|
-
|
|
672
|
-
const s =
|
|
673
|
-
s.prev =
|
|
597
|
+
add(e) {
|
|
598
|
+
_(this, $t) || this.dispatchEvent(new CustomEvent("start"));
|
|
599
|
+
const s = Fn(this, Xe, ts).call(this, e) || { value: e };
|
|
600
|
+
s.prev = _(this, $t), s.prev && (s.prev.next = s), s.next = void 0, O(this, $t, s), _(this, lt) || O(this, lt, s), _(this, gt).set(e, s);
|
|
674
601
|
}
|
|
675
602
|
// 删除这个元素后没有其他元素时立即出发 end 事件
|
|
676
|
-
delete(
|
|
677
|
-
const s =
|
|
678
|
-
return
|
|
603
|
+
delete(e) {
|
|
604
|
+
const s = Fn(this, Xe, ts).call(this, e);
|
|
605
|
+
return _(this, lt) || this.dispatchEvent(new CustomEvent("end")), s;
|
|
679
606
|
}
|
|
680
607
|
// 获取头部元素
|
|
681
608
|
// 会从链表删除
|
|
682
609
|
get() {
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
return this.delete(
|
|
610
|
+
const e = _(this, lt);
|
|
611
|
+
if (e)
|
|
612
|
+
return this.delete(e.value), e.value;
|
|
686
613
|
}
|
|
687
614
|
}
|
|
688
|
-
|
|
689
|
-
const s =
|
|
690
|
-
return s && (s.prev ? s.prev.next = s.next :
|
|
615
|
+
gt = new WeakMap(), lt = new WeakMap(), $t = new WeakMap(), Xe = new WeakSet(), ts = function(e) {
|
|
616
|
+
const s = _(this, gt).get(e);
|
|
617
|
+
return s && (s.prev ? s.prev.next = s.next : O(this, lt, s.next), s.next ? s.next.prev = s.prev : O(this, $t, s.prev), _(this, gt).delete(e)), s;
|
|
691
618
|
};
|
|
692
|
-
class
|
|
619
|
+
class _c extends WeakMap {
|
|
693
620
|
get(t) {
|
|
694
|
-
let
|
|
695
|
-
return
|
|
621
|
+
let e = super.get(t);
|
|
622
|
+
return e || (e = {}, this.set(t, e)), e;
|
|
696
623
|
}
|
|
697
624
|
}
|
|
698
|
-
var
|
|
699
|
-
class
|
|
700
|
-
constructor(
|
|
701
|
-
super(
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
if (!
|
|
625
|
+
var Jt, Cn;
|
|
626
|
+
class je extends URLSearchParams {
|
|
627
|
+
constructor(e) {
|
|
628
|
+
super(e);
|
|
629
|
+
E(this, Jt, (e) => typeof e == "string" ? e : JSON.stringify(e));
|
|
630
|
+
E(this, Cn, (e) => {
|
|
631
|
+
if (!e) return null;
|
|
705
632
|
try {
|
|
706
|
-
return JSON.parse(
|
|
633
|
+
return JSON.parse(e);
|
|
707
634
|
} catch {
|
|
708
635
|
return null;
|
|
709
636
|
}
|
|
710
637
|
});
|
|
711
638
|
}
|
|
712
639
|
// support `{ key: ObjectValue }`
|
|
713
|
-
concat(
|
|
640
|
+
concat(e) {
|
|
714
641
|
let s;
|
|
715
|
-
typeof
|
|
716
|
-
this.append(i,
|
|
642
|
+
typeof e == "string" ? s = hc(new URLSearchParams(e).entries()) : s = e, lc(s).forEach(([i, r]) => {
|
|
643
|
+
this.append(i, _(this, Jt).call(this, r));
|
|
717
644
|
});
|
|
718
645
|
}
|
|
719
|
-
setAny(
|
|
646
|
+
setAny(e, s) {
|
|
720
647
|
if (Array.isArray(s))
|
|
721
|
-
this.delete(
|
|
648
|
+
this.delete(e), s.forEach((i) => this.append(e, _(this, Jt).call(this, i)));
|
|
722
649
|
else {
|
|
723
|
-
const i =
|
|
724
|
-
i ? this.set(
|
|
650
|
+
const i = _(this, Jt).call(this, s);
|
|
651
|
+
i ? this.set(e, i) : this.delete(e);
|
|
725
652
|
}
|
|
726
653
|
}
|
|
727
|
-
getAny(
|
|
728
|
-
return this.getAnyAll(
|
|
654
|
+
getAny(e) {
|
|
655
|
+
return this.getAnyAll(e)[0];
|
|
729
656
|
}
|
|
730
|
-
getAnyAll(
|
|
731
|
-
return this.getAll(
|
|
657
|
+
getAnyAll(e) {
|
|
658
|
+
return this.getAll(e).filter((s) => s !== "").map((s) => _(this, Cn).call(this, s));
|
|
732
659
|
}
|
|
733
660
|
toString() {
|
|
734
|
-
const
|
|
735
|
-
return
|
|
661
|
+
const e = super.toString();
|
|
662
|
+
return e ? `?${e}` : "";
|
|
736
663
|
}
|
|
737
664
|
toJSON() {
|
|
738
665
|
return this.toString();
|
|
739
666
|
}
|
|
740
667
|
}
|
|
741
|
-
|
|
742
|
-
function
|
|
743
|
-
return
|
|
668
|
+
Jt = new WeakMap(), Cn = new WeakMap();
|
|
669
|
+
function br(n, ...t) {
|
|
670
|
+
return n.reduce((e, s, i) => e + (t[i - 1] ?? "") + s);
|
|
744
671
|
}
|
|
745
|
-
const
|
|
746
|
-
function
|
|
747
|
-
const t = Math.random().toString(36).slice(2, 2 +
|
|
748
|
-
return t.length <
|
|
672
|
+
const ul = br;
|
|
673
|
+
function Ls(n = 5) {
|
|
674
|
+
const t = Math.random().toString(36).slice(2, 2 + n);
|
|
675
|
+
return t.length < n ? t + Ls(n - t.length) : t;
|
|
749
676
|
}
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
return e.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase());
|
|
677
|
+
function ce(n) {
|
|
678
|
+
return n.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase());
|
|
753
679
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
680
|
+
function _l(n) {
|
|
681
|
+
return n.replace(/-(.)/g, (t, e) => e.toUpperCase());
|
|
756
682
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
759
|
-
delete
|
|
760
|
-
}),
|
|
683
|
+
function Ns(n) {
|
|
684
|
+
return dc(n).forEach((t) => {
|
|
685
|
+
delete n[t];
|
|
686
|
+
}), n;
|
|
761
687
|
}
|
|
762
|
-
class
|
|
688
|
+
class vt extends Error {
|
|
763
689
|
constructor(t) {
|
|
764
690
|
super(t), this.message = `gem: ${this.message}`;
|
|
765
691
|
}
|
|
766
692
|
}
|
|
767
|
-
function
|
|
768
|
-
const
|
|
769
|
-
if (t.length !==
|
|
770
|
-
for (let s = 0; s <
|
|
771
|
-
if (
|
|
693
|
+
function pc(n, t) {
|
|
694
|
+
const e = n.length;
|
|
695
|
+
if (t.length !== e) return !0;
|
|
696
|
+
for (let s = 0; s < e; s++)
|
|
697
|
+
if (n[s] !== t[s]) return !0;
|
|
772
698
|
return !1;
|
|
773
699
|
}
|
|
774
|
-
function
|
|
700
|
+
function Rs(n, t, e) {
|
|
775
701
|
let s = t;
|
|
776
|
-
for (const i in
|
|
777
|
-
const r =
|
|
702
|
+
for (const i in n) {
|
|
703
|
+
const r = e(i, n[i]);
|
|
778
704
|
s += r ? r + t : "";
|
|
779
705
|
}
|
|
780
706
|
return s;
|
|
781
707
|
}
|
|
782
|
-
function
|
|
783
|
-
return
|
|
784
|
-
|
|
708
|
+
function pl(n) {
|
|
709
|
+
return Rs(
|
|
710
|
+
n,
|
|
785
711
|
";",
|
|
786
|
-
(t,
|
|
712
|
+
(t, e) => e || e === 0 ? `${ce(t)}:${e}` : ""
|
|
787
713
|
);
|
|
788
714
|
}
|
|
789
|
-
function
|
|
790
|
-
return
|
|
715
|
+
function fc(n) {
|
|
716
|
+
return Rs(n, " ", (t, e) => e ? t : "");
|
|
791
717
|
}
|
|
792
|
-
const
|
|
793
|
-
function
|
|
794
|
-
return
|
|
795
|
-
|
|
718
|
+
const fl = fc;
|
|
719
|
+
function ml(n) {
|
|
720
|
+
return Rs(
|
|
721
|
+
n,
|
|
796
722
|
",",
|
|
797
|
-
(t,
|
|
723
|
+
(t, e) => e === !0 || t === e ? t : e ? `${t}:${e}` : ""
|
|
798
724
|
);
|
|
799
725
|
}
|
|
800
|
-
const
|
|
801
|
-
function
|
|
802
|
-
const t =
|
|
726
|
+
const wn = /* @__PURE__ */ new WeakMap();
|
|
727
|
+
function zt(n) {
|
|
728
|
+
const t = Mn(n, (e) => {
|
|
803
729
|
var s;
|
|
804
|
-
Object.assign(t,
|
|
730
|
+
Object.assign(t, e), (s = wn.get(t)) == null || s.forEach((i) => xt(i));
|
|
805
731
|
});
|
|
806
|
-
return
|
|
732
|
+
return wn.set(t, /* @__PURE__ */ new Set()), t;
|
|
807
733
|
}
|
|
808
|
-
function
|
|
809
|
-
const
|
|
810
|
-
return
|
|
734
|
+
function ut(n, t) {
|
|
735
|
+
const e = wn.get(n);
|
|
736
|
+
return e == null || e.add(t), () => e == null ? void 0 : e.delete(t);
|
|
811
737
|
}
|
|
812
|
-
const
|
|
738
|
+
const mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
813
739
|
__proto__: null,
|
|
814
|
-
|
|
815
|
-
connect:
|
|
816
|
-
createStore:
|
|
817
|
-
}, Symbol.toStringTag, { value: "Module" }))
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
740
|
+
_StoreListenerMap: wn,
|
|
741
|
+
connect: ut,
|
|
742
|
+
createStore: zt
|
|
743
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
744
|
+
/**
|
|
745
|
+
* @license
|
|
746
|
+
* Copyright 2017 Google LLC
|
|
747
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
748
|
+
*/
|
|
749
|
+
const gc = {
|
|
750
|
+
ATTRIBUTE: 1,
|
|
751
|
+
CHILD: 2,
|
|
752
|
+
PROPERTY: 3,
|
|
753
|
+
BOOLEAN_ATTRIBUTE: 4,
|
|
754
|
+
EVENT: 5,
|
|
755
|
+
ELEMENT: 6
|
|
756
|
+
}, Pr = (n) => (...t) => ({
|
|
757
|
+
// This property needs to remain unminified.
|
|
758
|
+
_$litDirective$: n,
|
|
759
|
+
values: t
|
|
760
|
+
});
|
|
761
|
+
class $c {
|
|
821
762
|
constructor(t) {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
763
|
+
//@internal
|
|
764
|
+
$(this, "__part");
|
|
765
|
+
//@internal
|
|
766
|
+
$(this, "__attributeIndex");
|
|
767
|
+
//@internal
|
|
768
|
+
$(this, "__directive");
|
|
769
|
+
//@internal
|
|
770
|
+
$(this, "_$parent");
|
|
771
|
+
// These will only exist on the AsyncDirective subclass
|
|
772
|
+
//@internal
|
|
773
|
+
$(this, "_$disconnectableChildren");
|
|
774
|
+
}
|
|
775
|
+
// See comment in Disconnectable interface for why this is a getter
|
|
776
|
+
get _$isConnected() {
|
|
777
|
+
return this._$parent._$isConnected;
|
|
778
|
+
}
|
|
779
|
+
/** @internal */
|
|
780
|
+
_$initialize(t, e, s) {
|
|
781
|
+
this.__part = t, this._$parent = e, this.__attributeIndex = s;
|
|
782
|
+
}
|
|
783
|
+
/** @internal */
|
|
784
|
+
_$resolve(t, e) {
|
|
785
|
+
return this.update(t, e);
|
|
786
|
+
}
|
|
787
|
+
update(t, e) {
|
|
788
|
+
return this.render(...e);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
const Ri = () => document.createComment(""), ye = (n, t, e) => {
|
|
792
|
+
var r;
|
|
793
|
+
const s = n._$startNode.parentNode, i = t === void 0 ? n._$endNode : t._$startNode;
|
|
794
|
+
if (e === void 0) {
|
|
795
|
+
const a = s.insertBefore(Ri(), i), c = s.insertBefore(Ri(), i);
|
|
796
|
+
e = new on(a, c, n, n.options);
|
|
797
|
+
} else {
|
|
798
|
+
const a = e._$endNode.nextSibling, c = e._$parent, l = c !== n;
|
|
799
|
+
if (l) {
|
|
800
|
+
(r = e._$reparentDisconnectables) == null || r.call(e, n), e._$parent = n;
|
|
801
|
+
let d;
|
|
802
|
+
e._$notifyConnectionChanged !== void 0 && (d = n._$isConnected) !== c._$isConnected && e._$notifyConnectionChanged(d);
|
|
803
|
+
}
|
|
804
|
+
if (a !== i || l) {
|
|
805
|
+
let d = e._$startNode;
|
|
806
|
+
for (; d !== a; ) {
|
|
807
|
+
const f = d.nextSibling;
|
|
808
|
+
s.insertBefore(d, i), d = f;
|
|
809
|
+
}
|
|
832
810
|
}
|
|
833
811
|
}
|
|
834
|
-
|
|
835
|
-
|
|
812
|
+
return e;
|
|
813
|
+
}, bt = (n, t, e = n) => (n._$setValue(t, e), n), vc = {}, wc = (n, t = vc) => n._$committedValue = t, yc = (n) => n._$committedValue, Jn = (n) => {
|
|
814
|
+
var s;
|
|
815
|
+
(s = n._$notifyConnectionChanged) == null || s.call(n, !1, !0);
|
|
816
|
+
let t = n._$startNode;
|
|
817
|
+
const e = n._$endNode.nextSibling;
|
|
818
|
+
for (; t !== e; ) {
|
|
819
|
+
const i = t.nextSibling;
|
|
820
|
+
t.remove(), t = i;
|
|
836
821
|
}
|
|
837
|
-
|
|
838
|
-
|
|
822
|
+
}, Ii = (n, t, e) => {
|
|
823
|
+
const s = /* @__PURE__ */ new Map();
|
|
824
|
+
for (let i = t; i <= e; i++)
|
|
825
|
+
s.set(n[i], i);
|
|
826
|
+
return s;
|
|
827
|
+
};
|
|
828
|
+
class Sc extends $c {
|
|
829
|
+
constructor(e) {
|
|
830
|
+
super(e);
|
|
831
|
+
$(this, "_itemKeys");
|
|
832
|
+
if (e.type !== gc.CHILD)
|
|
833
|
+
throw new Error("repeat() can only be used in text expressions");
|
|
834
|
+
}
|
|
835
|
+
_getValuesAndKeys(e, s, i) {
|
|
836
|
+
let r;
|
|
837
|
+
i === void 0 ? i = s : s !== void 0 && (r = s);
|
|
838
|
+
const a = [], c = [];
|
|
839
|
+
let l = 0;
|
|
840
|
+
for (const d of e)
|
|
841
|
+
a[l] = r ? r(d, l) : l, c[l] = i(d, l), l++;
|
|
842
|
+
return {
|
|
843
|
+
values: c,
|
|
844
|
+
keys: a
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
render(e, s, i) {
|
|
848
|
+
return this._getValuesAndKeys(e, s, i).values;
|
|
849
|
+
}
|
|
850
|
+
update(e, [s, i, r]) {
|
|
851
|
+
const a = yc(e), { values: c, keys: l } = this._getValuesAndKeys(s, i, r);
|
|
852
|
+
if (!Array.isArray(a))
|
|
853
|
+
return this._itemKeys = l, c;
|
|
854
|
+
const d = this._itemKeys ?? (this._itemKeys = []), f = [];
|
|
855
|
+
let o, m, h = 0, g = a.length - 1, v = 0, S = c.length - 1;
|
|
856
|
+
for (; h <= g && v <= S; )
|
|
857
|
+
if (a[h] === null)
|
|
858
|
+
h++;
|
|
859
|
+
else if (a[g] === null)
|
|
860
|
+
g--;
|
|
861
|
+
else if (d[h] === l[v])
|
|
862
|
+
f[v] = bt(a[h], c[v]), h++, v++;
|
|
863
|
+
else if (d[g] === l[S])
|
|
864
|
+
f[S] = bt(a[g], c[S]), g--, S--;
|
|
865
|
+
else if (d[h] === l[S])
|
|
866
|
+
f[S] = bt(a[h], c[S]), ye(e, f[S + 1], a[h]), h++, S--;
|
|
867
|
+
else if (d[g] === l[v])
|
|
868
|
+
f[v] = bt(a[g], c[v]), ye(e, a[h], a[g]), g--, v++;
|
|
869
|
+
else if (o === void 0 && (o = Ii(l, v, S), m = Ii(d, h, g)), !o.has(d[h]))
|
|
870
|
+
Jn(a[h]), h++;
|
|
871
|
+
else if (!o.has(d[g]))
|
|
872
|
+
Jn(a[g]), g--;
|
|
873
|
+
else {
|
|
874
|
+
const T = m.get(l[v]), p = T !== void 0 ? a[T] : null;
|
|
875
|
+
if (p === null) {
|
|
876
|
+
const b = ye(e, a[h]);
|
|
877
|
+
bt(b, c[v]), f[v] = b;
|
|
878
|
+
} else
|
|
879
|
+
f[v] = bt(p, c[v]), ye(e, a[h], p), a[T] = null;
|
|
880
|
+
v++;
|
|
881
|
+
}
|
|
882
|
+
for (; v <= S; ) {
|
|
883
|
+
const T = ye(e, f[S + 1]);
|
|
884
|
+
bt(T, c[v]), f[v++] = T;
|
|
885
|
+
}
|
|
886
|
+
for (; h <= g; ) {
|
|
887
|
+
const T = a[h++];
|
|
888
|
+
T !== null && Jn(T);
|
|
889
|
+
}
|
|
890
|
+
return this._itemKeys = l, wc(e, f), Ms;
|
|
839
891
|
}
|
|
840
892
|
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
893
|
+
const Ec = Pr(Sc), { assign: Hi, defineProperty: Cc } = Object;
|
|
894
|
+
Cc(Symbol, "metadata", { value: Symbol.for("Symbol.metadata") });
|
|
895
|
+
const Tr = (n) => typeof n == "function" && n(), Wt = Symbol.for("gem@sheetToken"), xn = Symbol.for("gem@update"), kr = "gem-style-boundary", Is = "gem@render-error", bc = xn, Qn = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap();
|
|
896
|
+
var at;
|
|
897
|
+
class Pc extends CSSStyleSheet {
|
|
844
898
|
constructor() {
|
|
845
899
|
super(...arguments);
|
|
846
|
-
|
|
847
|
-
|
|
900
|
+
E(this, at);
|
|
901
|
+
$(this, "cssText", "");
|
|
848
902
|
}
|
|
849
903
|
get element() {
|
|
850
|
-
return
|
|
904
|
+
return _(this, at) || (O(this, at, document.createElement("style")), _(this, at).textContent = this.cssText, _(this, at).dataset.gemStyle = ""), _(this, at);
|
|
851
905
|
}
|
|
852
|
-
replaceSync(
|
|
853
|
-
this.cssText =
|
|
906
|
+
replaceSync(e) {
|
|
907
|
+
this.cssText = e, _(this, at) && (_(this, at).textContent = e), super.replaceSync(e);
|
|
854
908
|
}
|
|
855
909
|
}
|
|
856
|
-
|
|
857
|
-
var
|
|
858
|
-
class
|
|
910
|
+
at = new WeakMap();
|
|
911
|
+
var At, tn, Qt, Yt;
|
|
912
|
+
class Tc {
|
|
859
913
|
constructor(t = "") {
|
|
860
|
-
|
|
861
|
-
|
|
914
|
+
E(this, At, "");
|
|
915
|
+
E(this, tn, "");
|
|
862
916
|
// 不需要 GC
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
917
|
+
E(this, Qt, /* @__PURE__ */ new Map());
|
|
918
|
+
E(this, Yt, /* @__PURE__ */ new Map());
|
|
919
|
+
O(this, tn, t);
|
|
866
920
|
}
|
|
867
921
|
setContent(t) {
|
|
868
|
-
|
|
922
|
+
O(this, At, t);
|
|
869
923
|
}
|
|
870
924
|
getStyle(t) {
|
|
871
925
|
var r;
|
|
872
|
-
const
|
|
873
|
-
if (!
|
|
874
|
-
const
|
|
875
|
-
|
|
926
|
+
const e = t && !((r = t.internals) != null && r.shadowRoot), s = e ? t.constructor : this;
|
|
927
|
+
if (!_(this, Qt).has(s)) {
|
|
928
|
+
const a = new Pc({ media: _(this, tn) });
|
|
929
|
+
_(this, Qt).set(s, a);
|
|
876
930
|
}
|
|
877
|
-
const i =
|
|
878
|
-
if (!
|
|
879
|
-
let
|
|
880
|
-
|
|
931
|
+
const i = _(this, Qt).get(s);
|
|
932
|
+
if (!_(this, Yt).has(i)) {
|
|
933
|
+
let a = _(this, At), c = "";
|
|
934
|
+
e && (c = `@scope (${t.tagName}) to (:state(${kr}) > *)`, a = `${c}{ ${a} }`), i.replaceSync(a), _(this, Yt).set(i, c);
|
|
881
935
|
}
|
|
882
936
|
return i;
|
|
883
937
|
}
|
|
884
|
-
//
|
|
938
|
+
// 一般用于主题更新
|
|
885
939
|
updateStyle() {
|
|
886
|
-
|
|
887
|
-
|
|
940
|
+
_(this, Yt).forEach((t, e) => {
|
|
941
|
+
e.replaceSync(t ? `${t}{${_(this, At)}}` : _(this, At));
|
|
888
942
|
});
|
|
889
943
|
}
|
|
890
944
|
}
|
|
891
|
-
|
|
892
|
-
function
|
|
893
|
-
|
|
945
|
+
At = new WeakMap(), tn = new WeakMap(), Qt = new WeakMap(), Yt = new WeakMap();
|
|
946
|
+
function an(n, ...t) {
|
|
947
|
+
let e = "", s = "";
|
|
948
|
+
const i = t.at(0);
|
|
949
|
+
Array.isArray(n) ? s = br(n, ...t) : i !== void 0 ? (e = n, s = i) : s = n;
|
|
950
|
+
const r = new Tc(e), a = { [Wt]: r };
|
|
894
951
|
let c = "";
|
|
895
|
-
return typeof s == "string" ? c = s : Object.keys(s).forEach((
|
|
896
|
-
const d =
|
|
897
|
-
|
|
898
|
-
}),
|
|
952
|
+
return typeof s == "string" ? c = s : Object.keys(s).forEach((l) => {
|
|
953
|
+
const d = l === "$";
|
|
954
|
+
a[l] = d || l.includes("-") ? l : `${l}-${Ls()}`, c += `${d ? ":where(:scope:not([hidden])),:host(:where(:not([hidden])))" : `.${a[l]}`} {${s[l]}}`;
|
|
955
|
+
}), r.setContent(c), a;
|
|
899
956
|
}
|
|
900
|
-
const
|
|
957
|
+
const Wi = (n, t, e) => {
|
|
901
958
|
let s = !1;
|
|
902
959
|
t.forEach((i) => {
|
|
903
|
-
const r =
|
|
904
|
-
s || (s =
|
|
905
|
-
}), s &&
|
|
906
|
-
},
|
|
907
|
-
const
|
|
908
|
-
if (!
|
|
960
|
+
const r = n.get(i) || 0;
|
|
961
|
+
s || (s = e === 1 && r === 0 || e === -1 && r === 1), n.set(i, r + e);
|
|
962
|
+
}), s && xt(Or.get(n));
|
|
963
|
+
}, kc = (n, t) => {
|
|
964
|
+
const e = n.getRootNode();
|
|
965
|
+
if (!Qn.has(e)) {
|
|
909
966
|
const i = /* @__PURE__ */ new Map();
|
|
910
|
-
|
|
911
|
-
const r =
|
|
912
|
-
i.forEach((
|
|
967
|
+
Qn.set(e, i), Or.set(i, () => {
|
|
968
|
+
const r = e.adoptedStyleSheets.filter((a) => !i.has(a));
|
|
969
|
+
i.forEach((a, c) => a && r.push(c)), e.adoptedStyleSheets = r.reverse();
|
|
913
970
|
});
|
|
914
971
|
}
|
|
915
|
-
const s =
|
|
916
|
-
return
|
|
972
|
+
const s = Qn.get(e);
|
|
973
|
+
return Wi(s, t, 1), () => Wi(s, t, -1);
|
|
917
974
|
};
|
|
918
|
-
let
|
|
919
|
-
function
|
|
920
|
-
|
|
921
|
-
const { callback:
|
|
922
|
-
(!s || !i ||
|
|
975
|
+
let Hs;
|
|
976
|
+
function zi(n) {
|
|
977
|
+
n == null || n.forEach((t) => {
|
|
978
|
+
const { callback: e, getDep: s, values: i, preCallback: r } = t, a = s == null ? void 0 : s();
|
|
979
|
+
(!s || !i || pc(i, a)) && (Tr(r), t.preCallback = e(a, i), t.values = a, t.initialized = !0);
|
|
923
980
|
});
|
|
924
981
|
}
|
|
925
|
-
function
|
|
926
|
-
return
|
|
982
|
+
function Vi(n) {
|
|
983
|
+
return n.filter((t) => (Tr(t.preCallback), t.initialized = !1, t.values = void 0, t.fixed));
|
|
927
984
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
985
|
+
const Oc = ht`
|
|
986
|
+
<style>
|
|
987
|
+
:host {
|
|
988
|
+
display: none !important;
|
|
989
|
+
}
|
|
990
|
+
@scope {
|
|
991
|
+
:scope {
|
|
992
|
+
display: none !important;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
</style>
|
|
996
|
+
`;
|
|
997
|
+
let Ws;
|
|
998
|
+
const Bt = new uc(), es = (n = performance.now()) => {
|
|
999
|
+
if (performance.now() > n + 16) return requestAnimationFrame(es);
|
|
1000
|
+
const t = Bt.get();
|
|
1001
|
+
t && (t(), es(n));
|
|
933
1002
|
};
|
|
934
|
-
|
|
935
|
-
let
|
|
936
|
-
var
|
|
937
|
-
const
|
|
1003
|
+
Bt.addEventListener("start", () => xt(es));
|
|
1004
|
+
let Di;
|
|
1005
|
+
var Zt, Xt, J, ct, Lt, dt, te, it, ee, ne, Nt, ot, qt, ns, bn, Pn, en, se, Rt, nn, Tn, kn, sn, ie;
|
|
1006
|
+
const Kt = class Kt extends HTMLElement {
|
|
938
1007
|
constructor() {
|
|
939
1008
|
super();
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1009
|
+
E(this, ot);
|
|
1010
|
+
E(this, Xt);
|
|
1011
|
+
E(this, J);
|
|
1012
|
+
E(this, ct, []);
|
|
1013
|
+
E(this, Lt, []);
|
|
1014
|
+
E(this, dt, []);
|
|
1015
|
+
E(this, te);
|
|
1016
|
+
E(this, it);
|
|
948
1017
|
// not in constructor 的近似值
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1018
|
+
E(this, ee);
|
|
1019
|
+
E(this, ne);
|
|
1020
|
+
E(this, Nt);
|
|
952
1021
|
/**
|
|
953
1022
|
* 每次更新完检查依赖,执行对应的副作用回调
|
|
954
1023
|
* */
|
|
955
|
-
|
|
956
|
-
|
|
1024
|
+
E(this, bn, () => {
|
|
1025
|
+
zi(_(this, ct));
|
|
957
1026
|
});
|
|
958
|
-
|
|
959
|
-
|
|
1027
|
+
E(this, Pn, () => {
|
|
1028
|
+
zi(_(this, Lt));
|
|
960
1029
|
});
|
|
961
1030
|
/**
|
|
962
1031
|
* - 条件渲染
|
|
963
|
-
* -
|
|
964
|
-
* - 返回 `null` 时渲染空的子内容
|
|
1032
|
+
* - 没有 `render` 时显示子内容
|
|
965
1033
|
* - 返回 `undefined` 时不会更新现有内容
|
|
1034
|
+
* - 返回 `null` 时渲染空内容
|
|
1035
|
+
* - 返回 html`` 时渲染空的子内容
|
|
966
1036
|
* */
|
|
967
|
-
|
|
1037
|
+
E(this, en, (e) => {
|
|
968
1038
|
try {
|
|
969
|
-
|
|
970
|
-
const s =
|
|
971
|
-
if (
|
|
972
|
-
|
|
1039
|
+
O(this, ne, !0), _(this, Pn).call(this);
|
|
1040
|
+
const s = _(this, Xt) === this, i = e ? e.render() : s ? void 0 : ht`<slot></slot>`;
|
|
1041
|
+
if (O(this, ne, !1), i === void 0) return;
|
|
1042
|
+
As(i === null ? Oc : i, _(this, Xt));
|
|
973
1043
|
} catch (s) {
|
|
974
|
-
this.dispatchEvent(new CustomEvent(
|
|
1044
|
+
throw this.dispatchEvent(new CustomEvent(Is, { bubbles: !0, composed: !0, detail: s })), s;
|
|
975
1045
|
}
|
|
976
1046
|
});
|
|
977
|
-
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
(
|
|
1047
|
+
E(this, se, () => {
|
|
1048
|
+
const e = _(this, ot, ns);
|
|
1049
|
+
_(this, it) && // 当有渲染函数,但是没一个符合条件时跳过
|
|
1050
|
+
(e || !_(this, dt).length) && (_(this, en).call(this, e), xt(_(this, bn)));
|
|
981
1051
|
});
|
|
982
|
-
|
|
983
|
-
|
|
1052
|
+
E(this, Rt, () => {
|
|
1053
|
+
_(this, ot, qt).noBlocking ? Bt.add(_(this, se)) : _(this, se).call(this);
|
|
984
1054
|
});
|
|
985
|
-
|
|
986
|
-
const { adoptedStyleSheets:
|
|
1055
|
+
E(this, nn, () => {
|
|
1056
|
+
const { adoptedStyleSheets: e = [] } = _(this, ot, qt), { shadowRoot: s, sheets: i } = _(this, J), r = e.map((a) => a[Wt].getStyle(this));
|
|
987
1057
|
if (s)
|
|
988
1058
|
s.adoptedStyleSheets = r.concat(i);
|
|
989
1059
|
else
|
|
990
|
-
return this.prepend(...i.map((
|
|
1060
|
+
return this.prepend(...i.map((a) => a.element)), kc(this, r);
|
|
991
1061
|
});
|
|
992
1062
|
/**
|
|
993
1063
|
* 元素挂载后执行还未初始化的副作用
|
|
994
1064
|
* */
|
|
995
|
-
|
|
996
|
-
var
|
|
997
|
-
(
|
|
998
|
-
const { callback: i, getDep: r, initialized:
|
|
999
|
-
|
|
1065
|
+
E(this, Tn, () => {
|
|
1066
|
+
var e;
|
|
1067
|
+
(e = _(this, ct)) == null || e.forEach((s) => {
|
|
1068
|
+
const { callback: i, getDep: r, initialized: a } = s;
|
|
1069
|
+
a || (s.values = r == null ? void 0 : r(), s.preCallback = i(s.values), s.initialized = !0);
|
|
1000
1070
|
});
|
|
1001
1071
|
});
|
|
1002
|
-
|
|
1003
|
-
var
|
|
1072
|
+
E(this, kn, () => {
|
|
1073
|
+
var e;
|
|
1004
1074
|
this.willMount && this.memo(this.willMount.bind(this), () => []), this.mounted && this.effect(this.mounted.bind(this), () => []), this.updated && this.effect((s, i) => i && this.updated.apply(this)), this.unmounted && this.effect(
|
|
1005
1075
|
() => this.unmounted.bind(this),
|
|
1006
1076
|
() => []
|
|
1007
|
-
), !
|
|
1077
|
+
), !_(this, dt).length && this.render && _(this, dt).push({ render: this.render.bind(this), condition: (e = this.shouldUpdate) == null ? void 0 : e.bind(this) });
|
|
1008
1078
|
});
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1079
|
+
E(this, sn);
|
|
1080
|
+
E(this, ie, async () => {
|
|
1081
|
+
var r;
|
|
1082
|
+
if (_(this, te)) {
|
|
1083
|
+
O(this, te, !1), (r = _(this, Nt)) == null || r.call(this), O(this, Nt, _(this, nn).call(this));
|
|
1013
1084
|
return;
|
|
1014
1085
|
}
|
|
1015
|
-
|
|
1016
|
-
const { observedStores:
|
|
1017
|
-
!s &&
|
|
1086
|
+
O(this, ee, !0), _(this, kn).call(this);
|
|
1087
|
+
const { observedStores: e, mode: s, penetrable: i } = _(this, ot, qt);
|
|
1088
|
+
!s && _(this, dt).length && !i && _(this, J).states.add(kr), O(this, sn, e == null ? void 0 : e.map((a) => ut(a, _(this, Rt)))), _(this, en).call(this, _(this, ot, ns)), O(this, it, !0), O(this, Nt, _(this, nn).call(this)), await Promise.resolve(), _(this, Tn).call(this);
|
|
1018
1089
|
});
|
|
1019
1090
|
/**
|
|
1020
1091
|
* @helper
|
|
@@ -1030,14 +1101,14 @@ const qt = class qt extends HTMLElement {
|
|
|
1030
1101
|
* }
|
|
1031
1102
|
* ```
|
|
1032
1103
|
* */
|
|
1033
|
-
|
|
1104
|
+
$(this, "effect", (e, s) => {
|
|
1034
1105
|
const i = {
|
|
1035
|
-
callback:
|
|
1106
|
+
callback: e,
|
|
1036
1107
|
getDep: s,
|
|
1037
|
-
initialized:
|
|
1038
|
-
fixed: !
|
|
1108
|
+
initialized: _(this, it),
|
|
1109
|
+
fixed: !_(this, ee)
|
|
1039
1110
|
};
|
|
1040
|
-
|
|
1111
|
+
_(this, it) && (i.values = s == null ? void 0 : s(), i.preCallback = e(i.values)), _(this, ct).push(i);
|
|
1041
1112
|
});
|
|
1042
1113
|
/**
|
|
1043
1114
|
* @helper
|
|
@@ -1056,38 +1127,38 @@ const qt = class qt extends HTMLElement {
|
|
|
1056
1127
|
* }
|
|
1057
1128
|
* ```
|
|
1058
1129
|
* */
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
callback:
|
|
1130
|
+
$(this, "memo", (e, s) => {
|
|
1131
|
+
_(this, Lt).push({
|
|
1132
|
+
callback: e,
|
|
1062
1133
|
getDep: s,
|
|
1063
|
-
fixed: !
|
|
1134
|
+
fixed: !_(this, ee)
|
|
1064
1135
|
});
|
|
1065
1136
|
});
|
|
1066
1137
|
/**
|
|
1067
1138
|
* @helper
|
|
1068
1139
|
* async
|
|
1069
1140
|
*/
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
const { mode:
|
|
1073
|
-
|
|
1074
|
-
let
|
|
1075
|
-
|
|
1141
|
+
$(this, "update", () => xt(_(this, Rt)));
|
|
1142
|
+
Di = this;
|
|
1143
|
+
const { mode: e, serializable: s, delegatesFocus: i, slotAssignment: r, aria: a } = _(this, ot, qt), { focusable: c, ...l } = a || {};
|
|
1144
|
+
O(this, Xt, e ? this.attachShadow({ mode: e, serializable: s, delegatesFocus: i, slotAssignment: r }) : this), O(this, J, this.attachInternals()), _(this, J).stateList = [], _(this, J).sheets = [], Hi(_(this, J), l);
|
|
1145
|
+
let d;
|
|
1146
|
+
_(this, ct).push({
|
|
1076
1147
|
fixed: !0,
|
|
1077
1148
|
getDep: () => [this.disabled],
|
|
1078
|
-
callback: ([
|
|
1079
|
-
if (
|
|
1080
|
-
return
|
|
1149
|
+
callback: ([f = !1]) => {
|
|
1150
|
+
if (d === void 0 && (d = this.hasAttribute("tabindex")), _(this, J).ariaDisabled = String(f), c && !d && (this.tabIndex = -Number(f)), (c || i) && f)
|
|
1151
|
+
return Cr(this, "click", (o) => o.isTrusted && o.stopImmediatePropagation(), {
|
|
1081
1152
|
capture: !0
|
|
1082
1153
|
});
|
|
1083
1154
|
}
|
|
1084
1155
|
});
|
|
1085
1156
|
}
|
|
1086
|
-
[
|
|
1087
|
-
|
|
1157
|
+
[bc]() {
|
|
1158
|
+
_(this, it) && xt(_(this, Rt));
|
|
1088
1159
|
}
|
|
1089
1160
|
get internals() {
|
|
1090
|
-
return
|
|
1161
|
+
return _(this, J);
|
|
1091
1162
|
}
|
|
1092
1163
|
/**
|
|
1093
1164
|
* @private
|
|
@@ -1095,14 +1166,14 @@ const qt = class qt extends HTMLElement {
|
|
|
1095
1166
|
* use `mounted`
|
|
1096
1167
|
*/
|
|
1097
1168
|
connectedCallback() {
|
|
1098
|
-
return
|
|
1169
|
+
return _(this, ot, qt).noBlocking ? Bt.add(_(this, ie)) : _(this, ie).call(this), _(Kt, Zt);
|
|
1099
1170
|
}
|
|
1100
1171
|
/**
|
|
1101
1172
|
* @private
|
|
1102
1173
|
* @final
|
|
1103
1174
|
*/
|
|
1104
1175
|
adoptedCallback() {
|
|
1105
|
-
return
|
|
1176
|
+
return _(Kt, Zt);
|
|
1106
1177
|
}
|
|
1107
1178
|
/**
|
|
1108
1179
|
* @private
|
|
@@ -1110,791 +1181,668 @@ const qt = class qt extends HTMLElement {
|
|
|
1110
1181
|
* use `unmounted`
|
|
1111
1182
|
*/
|
|
1112
1183
|
disconnectedCallback() {
|
|
1113
|
-
var
|
|
1184
|
+
var e, s;
|
|
1114
1185
|
if (this.isConnected) {
|
|
1115
|
-
|
|
1186
|
+
O(this, te, !0);
|
|
1116
1187
|
return;
|
|
1117
1188
|
}
|
|
1118
|
-
return
|
|
1189
|
+
return Bt.delete(_(this, ie)), Bt.delete(_(this, se)), O(this, it, !1), (e = _(this, sn)) == null || e.forEach((i) => i()), O(this, ct, Vi(_(this, ct))), O(this, Lt, Vi(_(this, Lt))), (s = _(this, Nt)) == null || s.call(this), _(Kt, Zt);
|
|
1119
1190
|
}
|
|
1120
1191
|
};
|
|
1121
|
-
|
|
1192
|
+
Zt = new WeakMap(), Xt = new WeakMap(), J = new WeakMap(), ct = new WeakMap(), Lt = new WeakMap(), dt = new WeakMap(), te = new WeakMap(), it = new WeakMap(), ee = new WeakMap(), ne = new WeakMap(), Nt = new WeakMap(), ot = new WeakSet(), qt = function() {
|
|
1122
1193
|
return this.constructor[Symbol.metadata];
|
|
1123
|
-
},
|
|
1124
|
-
return
|
|
1125
|
-
},
|
|
1194
|
+
}, ns = function() {
|
|
1195
|
+
return _(this, dt).findLast((e) => !e.condition || e.condition());
|
|
1196
|
+
}, bn = new WeakMap(), Pn = new WeakMap(), en = new WeakMap(), se = new WeakMap(), Rt = new WeakMap(), nn = new WeakMap(), Tn = new WeakMap(), kn = new WeakMap(), sn = new WeakMap(), ie = new WeakMap(), // 禁止覆盖自定义元素原生生命周期方法
|
|
1126
1197
|
// https://github.com/microsoft/TypeScript/issues/21388#issuecomment-934345226
|
|
1127
|
-
|
|
1128
|
-
const s =
|
|
1129
|
-
|
|
1198
|
+
E(Kt, Zt, Symbol()), Hs = (e) => {
|
|
1199
|
+
const s = Di, i = Mn(e, (r) => {
|
|
1200
|
+
const a = _(s, ct).at(0);
|
|
1201
|
+
if (_(s, it) && a && !a.initialized)
|
|
1202
|
+
throw new vt("Do't set state sync before insert the DOM");
|
|
1203
|
+
Hi(i, r), !_(s, ne) && _(s, it) && xt(_(s, Rt));
|
|
1130
1204
|
});
|
|
1131
|
-
return
|
|
1132
|
-
},
|
|
1133
|
-
let B =
|
|
1134
|
-
const
|
|
1205
|
+
return _(s, J).stateList.push(i), i;
|
|
1206
|
+
}, Ws = (e, s) => _(e, dt).push(s);
|
|
1207
|
+
let B = Kt;
|
|
1208
|
+
const Mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1135
1209
|
__proto__: null,
|
|
1136
1210
|
GemElement: B,
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
get createRef() {
|
|
1144
|
-
return Sr;
|
|
1211
|
+
SheetToken: Wt,
|
|
1212
|
+
TemplateResult: ks,
|
|
1213
|
+
UpdateToken: xn,
|
|
1214
|
+
_RenderErrorEvent: Is,
|
|
1215
|
+
get _createTemplate() {
|
|
1216
|
+
return Ws;
|
|
1145
1217
|
},
|
|
1218
|
+
createRef: ac,
|
|
1146
1219
|
get createState() {
|
|
1147
|
-
return
|
|
1220
|
+
return Hs;
|
|
1148
1221
|
},
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
svg:
|
|
1156
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1222
|
+
css: an,
|
|
1223
|
+
directive: Pr,
|
|
1224
|
+
html: ht,
|
|
1225
|
+
mathml: Xa,
|
|
1226
|
+
render: As,
|
|
1227
|
+
repeat: Ec,
|
|
1228
|
+
svg: Za
|
|
1229
|
+
}, Symbol.toStringTag, { value: "Module" })), xc = "0.0.0", Ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1157
1230
|
__proto__: null,
|
|
1158
|
-
version:
|
|
1159
|
-
}, Symbol.toStringTag, { value: "Module" })), { deleteProperty:
|
|
1160
|
-
function
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
i.
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
}
|
|
1174
|
-
const Ve = /* @__PURE__ */ new WeakMap(), { setAttribute: br, toggleAttribute: oc, removeAttribute: Cr } = Element.prototype;
|
|
1175
|
-
B.prototype.setAttribute = function(e, t) {
|
|
1231
|
+
version: xc
|
|
1232
|
+
}, Symbol.toStringTag, { value: "Module" })), { deleteProperty: Lc, getOwnPropertyDescriptor: Mr, defineProperty: An } = Reflect, { getPrototypeOf: he, assign: xr } = Object, Gi = new _c();
|
|
1233
|
+
function yt(n, t, e) {
|
|
1234
|
+
var i;
|
|
1235
|
+
const s = n.metadata;
|
|
1236
|
+
Mr(s, t) || An(s, t, {
|
|
1237
|
+
value: ((i = s[t]) == null ? void 0 : i.filter((r) => r !== e)) || []
|
|
1238
|
+
}), s[t].push(e);
|
|
1239
|
+
}
|
|
1240
|
+
function Ln(n, t) {
|
|
1241
|
+
const { value: e } = Mr(n, t);
|
|
1242
|
+
Lc(n, t), n[t] = e;
|
|
1243
|
+
}
|
|
1244
|
+
const Je = /* @__PURE__ */ new WeakMap(), { setAttribute: Ar, toggleAttribute: Nc, removeAttribute: Lr } = Element.prototype;
|
|
1245
|
+
B.prototype.setAttribute = function(n, t) {
|
|
1176
1246
|
var s;
|
|
1177
|
-
const
|
|
1178
|
-
if (!
|
|
1179
|
-
this[
|
|
1247
|
+
const e = (s = Je.get(he(this))) == null ? void 0 : s.get(n);
|
|
1248
|
+
if (!e) return Ar.call(this, n, t);
|
|
1249
|
+
this[e] = t;
|
|
1180
1250
|
};
|
|
1181
|
-
B.prototype.removeAttribute = function(
|
|
1182
|
-
var
|
|
1183
|
-
const t = (
|
|
1184
|
-
if (!t) return
|
|
1251
|
+
B.prototype.removeAttribute = function(n) {
|
|
1252
|
+
var e;
|
|
1253
|
+
const t = (e = Je.get(he(this))) == null ? void 0 : e.get(n);
|
|
1254
|
+
if (!t) return Lr.call(this, n);
|
|
1185
1255
|
this[t] = null;
|
|
1186
1256
|
};
|
|
1187
|
-
B.prototype.toggleAttribute = function(
|
|
1257
|
+
B.prototype.toggleAttribute = function(n, t) {
|
|
1188
1258
|
var s;
|
|
1189
|
-
const
|
|
1190
|
-
return
|
|
1259
|
+
const e = (s = Je.get(he(this))) == null ? void 0 : s.get(n);
|
|
1260
|
+
return e ? this[e] = t ?? !this.hasAttribute(n) : Nc.call(this, n, t);
|
|
1191
1261
|
};
|
|
1192
|
-
function
|
|
1262
|
+
function Rc() {
|
|
1193
1263
|
}
|
|
1194
|
-
const
|
|
1195
|
-
function
|
|
1196
|
-
|
|
1264
|
+
const Ui = Symbol("event handle");
|
|
1265
|
+
function zs(n, t, { attr: e, attrType: s, event: i, eventOptions: r } = {}) {
|
|
1266
|
+
An(n, t, {
|
|
1197
1267
|
configurable: !0,
|
|
1198
1268
|
get() {
|
|
1199
|
-
const
|
|
1200
|
-
return i && !
|
|
1269
|
+
const a = Gi.get(this)[t];
|
|
1270
|
+
return i && !a ? (this[t] = Rc, this[t]) : a;
|
|
1201
1271
|
},
|
|
1202
|
-
set(
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1272
|
+
set(a) {
|
|
1273
|
+
const c = this, l = Gi.get(c);
|
|
1274
|
+
e && (a = s === Boolean && a === "" ? !0 : s(a || ""), a ? Ar.call(this, e, s === Boolean ? "" : a) : Lr.call(this, e)), a !== l[t] && (i ? (l[t] = a != null && a[Ui] ? a : async (d, f) => {
|
|
1275
|
+
await Promise.resolve();
|
|
1276
|
+
const o = new CustomEvent(i, { ...f, ...r, detail: d });
|
|
1277
|
+
c.dispatchEvent(o), await a(d, f);
|
|
1278
|
+
}, l[t][Ui] = !0) : (l[t] = a, this[xn]()));
|
|
1208
1279
|
}
|
|
1209
1280
|
});
|
|
1210
1281
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1282
|
+
const qi = /* @__PURE__ */ new WeakMap();
|
|
1283
|
+
function Nn(n, { metadata: t }) {
|
|
1284
|
+
const e = qi.get(t);
|
|
1285
|
+
if (e) return e;
|
|
1286
|
+
let s = n;
|
|
1287
|
+
do
|
|
1288
|
+
s = he(s);
|
|
1289
|
+
while (s.constructor[Symbol.metadata] !== t);
|
|
1290
|
+
return qi.set(t, s), s;
|
|
1291
|
+
}
|
|
1292
|
+
function Vs(n, t) {
|
|
1293
|
+
const e = n.name, s = ce(e);
|
|
1294
|
+
return n.addInitializer(function() {
|
|
1295
|
+
const i = Nn(this, n);
|
|
1296
|
+
i.hasOwnProperty(e) || (yt(n, "observedAttributes", s), zs(i, e, { attr: s, attrType: t })), Ln(this, e);
|
|
1297
|
+
const r = he(this), a = Je.get(r) || /* @__PURE__ */ new Map();
|
|
1298
|
+
a.set(s, e), Je.set(r, a);
|
|
1221
1299
|
}), function(i) {
|
|
1222
1300
|
return this.getAttribute(s) ?? i;
|
|
1223
1301
|
};
|
|
1224
1302
|
}
|
|
1225
|
-
function
|
|
1226
|
-
return
|
|
1303
|
+
function D(n, t) {
|
|
1304
|
+
return Vs(t, String);
|
|
1227
1305
|
}
|
|
1228
|
-
function
|
|
1229
|
-
return
|
|
1306
|
+
function Rn(n, t) {
|
|
1307
|
+
return Vs(t, Boolean);
|
|
1230
1308
|
}
|
|
1231
|
-
function
|
|
1232
|
-
return
|
|
1309
|
+
function Ic(n, t) {
|
|
1310
|
+
return Vs(t, Number);
|
|
1233
1311
|
}
|
|
1234
|
-
function
|
|
1235
|
-
const
|
|
1312
|
+
function F(n, t) {
|
|
1313
|
+
const e = t.name;
|
|
1236
1314
|
return t.addInitializer(function() {
|
|
1237
|
-
const s =
|
|
1238
|
-
s.hasOwnProperty(
|
|
1315
|
+
const s = Nn(this, t);
|
|
1316
|
+
s.hasOwnProperty(e) || (yt(t, "observedProperties", e), zs(s, e)), Ln(this, e);
|
|
1239
1317
|
}), function(s) {
|
|
1240
|
-
return this[
|
|
1318
|
+
return this[e] ?? s;
|
|
1241
1319
|
};
|
|
1242
1320
|
}
|
|
1243
|
-
function
|
|
1244
|
-
return function(t,
|
|
1245
|
-
const { addInitializer: s, name: i, access: r, kind:
|
|
1321
|
+
function Nr(n) {
|
|
1322
|
+
return function(t, e) {
|
|
1323
|
+
const { addInitializer: s, name: i, access: r, kind: a } = e;
|
|
1246
1324
|
s(function() {
|
|
1247
|
-
const
|
|
1248
|
-
if (
|
|
1249
|
-
if (
|
|
1250
|
-
this.memo(() =>
|
|
1325
|
+
const c = n && (() => n(this));
|
|
1326
|
+
if (a === "getter") {
|
|
1327
|
+
if (e.private) throw new vt("not support");
|
|
1328
|
+
this.memo(() => An(this, i, { configurable: !0, value: r.get(this) }), c);
|
|
1251
1329
|
} else
|
|
1252
|
-
this.memo(r.get(this).bind(this),
|
|
1330
|
+
this.memo(r.get(this).bind(this), c);
|
|
1253
1331
|
});
|
|
1254
1332
|
};
|
|
1255
1333
|
}
|
|
1256
|
-
function
|
|
1257
|
-
return function(t, { addInitializer:
|
|
1258
|
-
|
|
1259
|
-
this.effect(s.get(this).bind(this),
|
|
1334
|
+
function wt(n) {
|
|
1335
|
+
return function(t, { addInitializer: e, access: s }) {
|
|
1336
|
+
e(function() {
|
|
1337
|
+
this.effect(s.get(this).bind(this), n && (() => n(this)));
|
|
1260
1338
|
});
|
|
1261
1339
|
};
|
|
1262
1340
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return function(
|
|
1341
|
+
function Hc() {
|
|
1342
|
+
return function(n, { addInitializer: t, access: e }) {
|
|
1265
1343
|
t(function() {
|
|
1266
1344
|
this.effect(
|
|
1267
|
-
() =>
|
|
1345
|
+
() => e.get(this).bind(this),
|
|
1268
1346
|
() => []
|
|
1269
1347
|
);
|
|
1270
1348
|
});
|
|
1271
1349
|
};
|
|
1272
1350
|
}
|
|
1273
|
-
function
|
|
1274
|
-
return
|
|
1351
|
+
function Ds() {
|
|
1352
|
+
return Nr(() => []);
|
|
1275
1353
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return
|
|
1354
|
+
function Qe() {
|
|
1355
|
+
return wt(() => []);
|
|
1278
1356
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return function(t, { addInitializer:
|
|
1281
|
-
|
|
1282
|
-
|
|
1357
|
+
function le(n) {
|
|
1358
|
+
return function(t, { addInitializer: e, access: s }) {
|
|
1359
|
+
e(function() {
|
|
1360
|
+
Ws(this, {
|
|
1283
1361
|
render: s.get(this).bind(this),
|
|
1284
|
-
condition:
|
|
1362
|
+
condition: n && (() => n(this))
|
|
1285
1363
|
});
|
|
1286
1364
|
});
|
|
1287
1365
|
};
|
|
1288
1366
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return function(
|
|
1367
|
+
function Wc() {
|
|
1368
|
+
return function(n, { addInitializer: t, access: e }) {
|
|
1291
1369
|
t(function() {
|
|
1292
|
-
this.addEventListener(
|
|
1293
|
-
|
|
1370
|
+
this.addEventListener(Is, ({ detail: s }) => {
|
|
1371
|
+
As(e.get(this).apply(this, [s]), this.internals.shadowRoot || this);
|
|
1294
1372
|
});
|
|
1295
1373
|
});
|
|
1296
1374
|
};
|
|
1297
1375
|
}
|
|
1298
|
-
function
|
|
1299
|
-
|
|
1376
|
+
function zc(n, t, e) {
|
|
1377
|
+
An(n, t, {
|
|
1300
1378
|
configurable: !0,
|
|
1301
1379
|
get() {
|
|
1302
1380
|
const s = this, { states: i } = s.internals;
|
|
1303
|
-
return i == null ? void 0 : i.has(
|
|
1381
|
+
return i == null ? void 0 : i.has(e);
|
|
1304
1382
|
},
|
|
1305
1383
|
set(s) {
|
|
1306
1384
|
const i = this, { states: r } = i.internals;
|
|
1307
|
-
s ? r == null || r.add(
|
|
1385
|
+
s ? r == null || r.add(e) : r == null || r.delete(e);
|
|
1308
1386
|
}
|
|
1309
1387
|
});
|
|
1310
1388
|
}
|
|
1311
|
-
function
|
|
1389
|
+
function In(n, t) {
|
|
1390
|
+
const e = t.name, s = ce(e);
|
|
1312
1391
|
t.addInitializer(function() {
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1315
|
-
const i = ie(s);
|
|
1316
|
-
$t(t, "definedCSSStates", i), uc(n, s, i);
|
|
1317
|
-
}
|
|
1318
|
-
Pn(this, s);
|
|
1392
|
+
const i = Nn(this, t);
|
|
1393
|
+
i.hasOwnProperty(e) || (yt(t, "definedCSSStates", s), zc(i, e, s)), Ln(this, e);
|
|
1319
1394
|
});
|
|
1320
1395
|
}
|
|
1321
|
-
function
|
|
1322
|
-
const i =
|
|
1323
|
-
if (
|
|
1324
|
-
|
|
1396
|
+
function Rr(n, t, e, s) {
|
|
1397
|
+
const i = n.name, r = ce(i);
|
|
1398
|
+
if (n.static)
|
|
1399
|
+
yt(n, e, r);
|
|
1325
1400
|
else {
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1401
|
+
const a = he(t);
|
|
1402
|
+
a[i] || (a[i] = r, yt(n, e, r));
|
|
1328
1403
|
}
|
|
1329
1404
|
return s || r;
|
|
1330
1405
|
}
|
|
1331
|
-
function
|
|
1332
|
-
return function(
|
|
1333
|
-
return
|
|
1406
|
+
function Vc(n, t) {
|
|
1407
|
+
return function(e) {
|
|
1408
|
+
return Rr(t, this, "definedSlots", e);
|
|
1334
1409
|
};
|
|
1335
1410
|
}
|
|
1336
|
-
function
|
|
1337
|
-
return function(
|
|
1338
|
-
return
|
|
1411
|
+
function Ir(n, t) {
|
|
1412
|
+
return function(e) {
|
|
1413
|
+
return Rr(t, this, "definedParts", e);
|
|
1339
1414
|
};
|
|
1340
1415
|
}
|
|
1341
|
-
function
|
|
1342
|
-
t
|
|
1343
|
-
Or(t, this, t.name);
|
|
1344
|
-
});
|
|
1416
|
+
function be(n, t) {
|
|
1417
|
+
Hr(t);
|
|
1345
1418
|
}
|
|
1346
|
-
function
|
|
1347
|
-
t
|
|
1348
|
-
Or(t, this, t.name, { bubbles: !0, composed: !0 });
|
|
1349
|
-
});
|
|
1419
|
+
function Dc(n, t) {
|
|
1420
|
+
Hr(t, { bubbles: !0, composed: !0 });
|
|
1350
1421
|
}
|
|
1351
|
-
function
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1356
|
-
}
|
|
1357
|
-
Pn(t, n);
|
|
1422
|
+
function Hr(n, t) {
|
|
1423
|
+
const e = n.name, s = ce(e);
|
|
1424
|
+
n.addInitializer(function() {
|
|
1425
|
+
const i = Nn(this, n);
|
|
1426
|
+
i.hasOwnProperty(e) || (yt(n, "definedEvents", s), zs(i, e, { event: s, eventOptions: t })), Ln(this, e);
|
|
1427
|
+
});
|
|
1358
1428
|
}
|
|
1359
|
-
function
|
|
1360
|
-
return function(t,
|
|
1361
|
-
|
|
1429
|
+
function Hn(n) {
|
|
1430
|
+
return function(t, e) {
|
|
1431
|
+
yt(e, "adoptedStyleSheets", n);
|
|
1362
1432
|
};
|
|
1363
1433
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return function(t,
|
|
1366
|
-
|
|
1434
|
+
function Wn(n) {
|
|
1435
|
+
return function(t, e) {
|
|
1436
|
+
yt(e, "observedStores", n);
|
|
1367
1437
|
};
|
|
1368
1438
|
}
|
|
1369
|
-
function
|
|
1370
|
-
mode:
|
|
1439
|
+
function Vt({
|
|
1440
|
+
mode: n = "open",
|
|
1371
1441
|
serializable: t = !0,
|
|
1372
|
-
delegatesFocus:
|
|
1442
|
+
delegatesFocus: e,
|
|
1373
1443
|
slotAssignment: s
|
|
1374
1444
|
} = {}) {
|
|
1375
1445
|
return function(i, r) {
|
|
1376
|
-
const
|
|
1377
|
-
|
|
1446
|
+
const a = r.metadata;
|
|
1447
|
+
xr(a, { mode: n, serializable: t, delegatesFocus: e, slotAssignment: s });
|
|
1378
1448
|
};
|
|
1379
1449
|
}
|
|
1380
|
-
function
|
|
1381
|
-
return function(t,
|
|
1382
|
-
const s =
|
|
1383
|
-
s.penetrable =
|
|
1450
|
+
function Wr({ penetrable: n }) {
|
|
1451
|
+
return function(t, e) {
|
|
1452
|
+
const s = e.metadata;
|
|
1453
|
+
s.penetrable = n;
|
|
1384
1454
|
};
|
|
1385
1455
|
}
|
|
1386
|
-
function
|
|
1387
|
-
return function(
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1456
|
+
function Gc() {
|
|
1457
|
+
return function(n, t) {
|
|
1458
|
+
const e = t.metadata;
|
|
1459
|
+
e.noBlocking = !0;
|
|
1390
1460
|
};
|
|
1391
1461
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return function(t,
|
|
1394
|
-
const s =
|
|
1395
|
-
s.aria = { ...s.aria, ...
|
|
1462
|
+
function zn(n) {
|
|
1463
|
+
return function(t, e) {
|
|
1464
|
+
const s = e.metadata;
|
|
1465
|
+
s.aria = { ...s.aria, ...n };
|
|
1396
1466
|
};
|
|
1397
1467
|
}
|
|
1398
|
-
function
|
|
1399
|
-
return function(t, { addInitializer:
|
|
1400
|
-
|
|
1401
|
-
customElements.define(
|
|
1468
|
+
function Uc(n) {
|
|
1469
|
+
return function(t, { addInitializer: e }) {
|
|
1470
|
+
e(function() {
|
|
1471
|
+
customElements.define(n, t);
|
|
1402
1472
|
});
|
|
1403
1473
|
};
|
|
1404
1474
|
}
|
|
1405
|
-
window.__GEM_DEVTOOLS__HOOK__ && !window.__GEM_DEVTOOLS__HOOK__.GemElement &&
|
|
1406
|
-
...
|
|
1407
|
-
...
|
|
1408
|
-
...
|
|
1409
|
-
...
|
|
1475
|
+
window.__GEM_DEVTOOLS__HOOK__ && !window.__GEM_DEVTOOLS__HOOK__.GemElement && xr(window.__GEM_DEVTOOLS__HOOK__, {
|
|
1476
|
+
...Mc,
|
|
1477
|
+
...za,
|
|
1478
|
+
...mc,
|
|
1479
|
+
...Ac
|
|
1410
1480
|
});
|
|
1411
|
-
const
|
|
1412
|
-
let
|
|
1413
|
-
const
|
|
1481
|
+
const Q = window.history, zr = Q.pushState.bind(Q), Vr = Q.replaceState.bind(Q);
|
|
1482
|
+
let qc = 0;
|
|
1483
|
+
const Gs = () => `${performance.now()}-${++qc}`, M = zt({
|
|
1414
1484
|
$hasCloseHandle: !1,
|
|
1415
1485
|
$hasOpenHandle: !1,
|
|
1416
1486
|
$hasShouldCloseHandle: !1,
|
|
1417
1487
|
$key: ""
|
|
1418
1488
|
}), q = /* @__PURE__ */ new Map();
|
|
1419
|
-
function
|
|
1420
|
-
const { $key: t, $hasCloseHandle:
|
|
1421
|
-
if (
|
|
1422
|
-
if (t) throw new
|
|
1423
|
-
if (
|
|
1424
|
-
if (s) throw new
|
|
1425
|
-
if (i) throw new
|
|
1489
|
+
function Dr(n) {
|
|
1490
|
+
const { $key: t, $hasCloseHandle: e, $hasOpenHandle: s, $hasShouldCloseHandle: i } = n || {};
|
|
1491
|
+
if (M.$key !== t) {
|
|
1492
|
+
if (t) throw new vt("`$key` is not allowed");
|
|
1493
|
+
if (e) throw new vt("`$hasCloseHandle` is not allowed");
|
|
1494
|
+
if (s) throw new vt("`$hasOpenHandle` is not allowed");
|
|
1495
|
+
if (i) throw new vt("`$hasShouldCloseHandle` is not allowed");
|
|
1426
1496
|
}
|
|
1427
1497
|
}
|
|
1428
|
-
function
|
|
1429
|
-
return Y.basePath ? Y.basePath +
|
|
1498
|
+
function Gr(n) {
|
|
1499
|
+
return Y.basePath ? Y.basePath + n : n;
|
|
1430
1500
|
}
|
|
1431
|
-
function
|
|
1432
|
-
return
|
|
1501
|
+
function ss(n) {
|
|
1502
|
+
return n === Y.basePath ? "/" : n.replace(new RegExp(`^${Y.basePath}/`), "/");
|
|
1433
1503
|
}
|
|
1434
|
-
function
|
|
1504
|
+
function Us() {
|
|
1435
1505
|
Y.dispatchEvent(new CustomEvent("beforechange"));
|
|
1436
1506
|
}
|
|
1437
|
-
function
|
|
1438
|
-
const t = q.get(
|
|
1439
|
-
return { ...
|
|
1440
|
-
}
|
|
1441
|
-
function
|
|
1442
|
-
|
|
1443
|
-
const
|
|
1444
|
-
$hasCloseHandle: !!
|
|
1445
|
-
$hasOpenHandle: !!
|
|
1446
|
-
$hasShouldCloseHandle: !!
|
|
1447
|
-
$key:
|
|
1507
|
+
function yn(n) {
|
|
1508
|
+
const t = q.get(M.$key) || { path: ss(location.pathname), query: new je() }, e = n.path ? Er(t.path, n.path) : ss(location.pathname), s = new je(n.query ?? (n.path ? "" : location.search)), i = String(s) !== String(t.query), r = i ? s : t.query, a = e !== t.path || i, c = n.title || (a ? "" : document.title), l = n.close || n.data || n.open || n.shouldClose, d = decodeURIComponent(n.hash ?? (!a && l ? location.hash : ""));
|
|
1509
|
+
return { ...n, title: c, path: e, query: r, hash: d };
|
|
1510
|
+
}
|
|
1511
|
+
function Fi(n, t) {
|
|
1512
|
+
Dr(n.data);
|
|
1513
|
+
const e = yn(n), { title: s, path: i, query: r, hash: a, close: c, open: l, shouldClose: d, data: f } = e, o = {
|
|
1514
|
+
$hasCloseHandle: !!c,
|
|
1515
|
+
$hasOpenHandle: !!l,
|
|
1516
|
+
$hasShouldCloseHandle: !!d,
|
|
1517
|
+
$key: Gs(),
|
|
1448
1518
|
$title: s,
|
|
1449
|
-
...
|
|
1519
|
+
...f
|
|
1450
1520
|
};
|
|
1451
|
-
q.set(o.$key,
|
|
1452
|
-
const
|
|
1453
|
-
t(o, s,
|
|
1521
|
+
q.set(o.$key, e), Us(), Ns(M), M(o);
|
|
1522
|
+
const m = Gr(i) + new je(r) + a, h = decodeURIComponent(location.hash);
|
|
1523
|
+
t(o, s, m), h !== a && window.dispatchEvent(new CustomEvent("hashchange"));
|
|
1454
1524
|
}
|
|
1455
|
-
function
|
|
1456
|
-
|
|
1525
|
+
function Bi(n, t, e, s) {
|
|
1526
|
+
Dr(n);
|
|
1457
1527
|
const i = {
|
|
1458
|
-
$key:
|
|
1528
|
+
$key: Gs(),
|
|
1459
1529
|
$title: t,
|
|
1460
|
-
...
|
|
1461
|
-
}, { pathname: r, search:
|
|
1462
|
-
q.set(i.$key,
|
|
1463
|
-
const
|
|
1464
|
-
s(i, t,
|
|
1530
|
+
...n || {}
|
|
1531
|
+
}, { pathname: r, search: a, hash: c } = new URL(e, location.origin + location.pathname), l = yn({ path: r, query: new je(a), hash: c, title: t, data: n });
|
|
1532
|
+
q.set(i.$key, l), Us(), Ns(M), M(i);
|
|
1533
|
+
const d = Gr(r) + l.query + c, f = location.hash;
|
|
1534
|
+
s(i, t, d), f !== c && window.dispatchEvent(new CustomEvent("hashchange"));
|
|
1465
1535
|
}
|
|
1466
|
-
const
|
|
1536
|
+
const is = zt({
|
|
1467
1537
|
basePath: ""
|
|
1468
1538
|
});
|
|
1469
|
-
class
|
|
1539
|
+
class Fc extends EventTarget {
|
|
1470
1540
|
get store() {
|
|
1471
|
-
return
|
|
1541
|
+
return M;
|
|
1472
1542
|
}
|
|
1473
1543
|
get currentKey() {
|
|
1474
|
-
return
|
|
1544
|
+
return M.$key;
|
|
1475
1545
|
}
|
|
1476
1546
|
get basePath() {
|
|
1477
|
-
return
|
|
1547
|
+
return is.basePath;
|
|
1478
1548
|
}
|
|
1479
1549
|
set basePath(t) {
|
|
1480
|
-
|
|
1550
|
+
is({ basePath: t }), Object.assign(q.get(M.$key), { path: ss(location.pathname) });
|
|
1481
1551
|
}
|
|
1482
1552
|
getParams() {
|
|
1483
|
-
return q.get(
|
|
1553
|
+
return q.get(M.$key);
|
|
1484
1554
|
}
|
|
1485
1555
|
updateParams(t) {
|
|
1486
|
-
Object.assign(q.get(
|
|
1556
|
+
Object.assign(q.get(M.$key), t), M();
|
|
1487
1557
|
}
|
|
1488
1558
|
push(t) {
|
|
1489
|
-
|
|
1559
|
+
Fi(t, zr);
|
|
1490
1560
|
}
|
|
1491
1561
|
replace(t) {
|
|
1492
|
-
|
|
1562
|
+
Fi(t, Vr);
|
|
1493
1563
|
}
|
|
1494
1564
|
pushIgnoreCloseHandle(t) {
|
|
1495
|
-
var
|
|
1496
|
-
|
|
1565
|
+
var e, s;
|
|
1566
|
+
M.$hasCloseHandle ? ((s = (e = q.get(M.$key)) == null ? void 0 : e.close) == null || s.call(e), this.replace(t)) : this.push(t);
|
|
1497
1567
|
}
|
|
1498
1568
|
forward() {
|
|
1499
|
-
|
|
1569
|
+
Q.forward();
|
|
1500
1570
|
}
|
|
1501
1571
|
back() {
|
|
1502
|
-
|
|
1572
|
+
Q.back();
|
|
1503
1573
|
}
|
|
1504
1574
|
}
|
|
1505
|
-
const Y = new
|
|
1575
|
+
const Y = new Fc(), Pe = zt({ defaultTitle: document.title, url: "", title: "" }), Bc = { history: Y, titleStore: Pe, basePathStore: is };
|
|
1506
1576
|
if (!window._GEMHISTORY) {
|
|
1507
|
-
if (window._GEMHISTORY =
|
|
1508
|
-
|
|
1509
|
-
},
|
|
1510
|
-
|
|
1577
|
+
if (window._GEMHISTORY = Bc, Q.pushState = function(t, e, s) {
|
|
1578
|
+
Bi(t, e, s, zr);
|
|
1579
|
+
}, Q.replaceState = function(t, e, s) {
|
|
1580
|
+
Bi(t, e, s, Vr);
|
|
1511
1581
|
}, window.addEventListener("hashchange", ({ isTrusted: t }) => {
|
|
1512
1582
|
t && Y.replace({ hash: location.hash });
|
|
1513
|
-
}),
|
|
1514
|
-
if (
|
|
1515
|
-
|
|
1516
|
-
const t =
|
|
1517
|
-
q.set(
|
|
1583
|
+
}), Q.state)
|
|
1584
|
+
if (Q.state.$hasCloseHandle) {
|
|
1585
|
+
M(Q.state);
|
|
1586
|
+
const t = yn({ title: document.title });
|
|
1587
|
+
q.set(M.$key, t), Y.back();
|
|
1518
1588
|
} else {
|
|
1519
|
-
const t =
|
|
1520
|
-
|
|
1521
|
-
$key:
|
|
1522
|
-
...
|
|
1523
|
-
}), q.set(
|
|
1589
|
+
const t = yn({ title: document.title, hash: location.hash });
|
|
1590
|
+
M({
|
|
1591
|
+
$key: Gs(),
|
|
1592
|
+
...Q.state || {}
|
|
1593
|
+
}), q.set(M.$key, t);
|
|
1524
1594
|
}
|
|
1525
1595
|
else {
|
|
1526
|
-
const { protocol: t, pathname:
|
|
1527
|
-
t.startsWith("http") && Y.replace({ path:
|
|
1596
|
+
const { protocol: t, pathname: e, search: s, hash: i } = location;
|
|
1597
|
+
t.startsWith("http") && Y.replace({ path: e, query: s, hash: i });
|
|
1528
1598
|
}
|
|
1529
|
-
|
|
1530
|
-
const t = q.get(
|
|
1531
|
-
t && (t.title =
|
|
1532
|
-
}),
|
|
1599
|
+
ut(Pe, () => {
|
|
1600
|
+
const t = q.get(M.$key);
|
|
1601
|
+
t && (t.title = Pe.title);
|
|
1602
|
+
}), ut(M, () => {
|
|
1533
1603
|
const { title: t } = Y.getParams();
|
|
1534
|
-
t !==
|
|
1604
|
+
t !== Pe.title && Pe({ title: t });
|
|
1535
1605
|
});
|
|
1536
|
-
let
|
|
1606
|
+
let n = !1;
|
|
1537
1607
|
window.addEventListener("popstate", (t) => {
|
|
1538
|
-
var r,
|
|
1539
|
-
const
|
|
1540
|
-
if (!(
|
|
1608
|
+
var r, a;
|
|
1609
|
+
const e = t.state;
|
|
1610
|
+
if (!(e != null && e.$key))
|
|
1541
1611
|
return;
|
|
1542
|
-
if (
|
|
1543
|
-
|
|
1612
|
+
if (n) {
|
|
1613
|
+
n = !1;
|
|
1544
1614
|
return;
|
|
1545
1615
|
}
|
|
1546
|
-
if (!q.has(
|
|
1547
|
-
const { pathname:
|
|
1548
|
-
q.set(
|
|
1549
|
-
path:
|
|
1550
|
-
query: new
|
|
1551
|
-
hash: decodeURIComponent(
|
|
1552
|
-
title:
|
|
1616
|
+
if (!q.has(e.$key)) {
|
|
1617
|
+
const { pathname: c, search: l, hash: d } = location;
|
|
1618
|
+
q.set(e.$key, {
|
|
1619
|
+
path: c,
|
|
1620
|
+
query: new je(l),
|
|
1621
|
+
hash: decodeURIComponent(d),
|
|
1622
|
+
title: e.$title,
|
|
1553
1623
|
// document.title 是导航前的
|
|
1554
|
-
data:
|
|
1624
|
+
data: e
|
|
1555
1625
|
});
|
|
1556
1626
|
}
|
|
1557
|
-
const s =
|
|
1558
|
-
if (parseFloat(
|
|
1559
|
-
(
|
|
1627
|
+
const s = M;
|
|
1628
|
+
if (parseFloat(e.$key) > parseFloat(s.$key) && e.$hasOpenHandle)
|
|
1629
|
+
(a = (r = q.get(e.$key)) == null ? void 0 : r.open) == null || a.call(r);
|
|
1560
1630
|
else if (s.$hasCloseHandle) {
|
|
1561
|
-
const
|
|
1562
|
-
if (
|
|
1563
|
-
|
|
1631
|
+
const c = q.get(s.$key), l = c == null ? void 0 : c.close, d = c == null ? void 0 : c.shouldClose;
|
|
1632
|
+
if (d && !d()) {
|
|
1633
|
+
n = !0, Y.forward();
|
|
1564
1634
|
return;
|
|
1565
1635
|
} else
|
|
1566
|
-
|
|
1636
|
+
l ? l() : e.$hasCloseHandle && (n = !0, Y.back());
|
|
1567
1637
|
}
|
|
1568
|
-
|
|
1638
|
+
Us(), Ns(M), M(e);
|
|
1569
1639
|
});
|
|
1570
1640
|
}
|
|
1571
|
-
const { history:
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
* http://polymer.github.io/LICENSE.txt
|
|
1577
|
-
* The complete set of authors may be found at
|
|
1578
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
1579
|
-
* The complete set of contributors may be found at
|
|
1580
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
1581
|
-
* Code distributed by Google as part of the polymer project is also
|
|
1582
|
-
* subject to an additional IP rights grant found at
|
|
1583
|
-
* http://polymer.github.io/PATENTS.txt
|
|
1584
|
-
*/
|
|
1585
|
-
const Ai = (e, t) => {
|
|
1586
|
-
const n = e.startNode.parentNode, s = t === void 0 ? e.endNode : t.startNode, i = n.insertBefore(ot(), s);
|
|
1587
|
-
n.insertBefore(ot(), s);
|
|
1588
|
-
const r = new se(e.options);
|
|
1589
|
-
return r.insertAfterNode(i), r;
|
|
1590
|
-
}, Pt = (e, t) => (e.setValue(t), e.commit(), e), zn = (e, t, n) => {
|
|
1591
|
-
const s = e.startNode.parentNode, i = n ? n.startNode : e.endNode, r = t.endNode.nextSibling;
|
|
1592
|
-
r !== i && hr(s, t.startNode, r, i);
|
|
1593
|
-
}, Gn = (e) => {
|
|
1594
|
-
Ss(e.startNode.parentNode, e.startNode, e.endNode.nextSibling);
|
|
1595
|
-
}, Ii = (e, t, n) => {
|
|
1596
|
-
const s = /* @__PURE__ */ new Map();
|
|
1597
|
-
for (let i = t; i <= n; i++)
|
|
1598
|
-
s.set(e[i], i);
|
|
1641
|
+
const { history: x, titleStore: It, basePathStore: Kc } = window._GEMHISTORY;
|
|
1642
|
+
var jc = Object.create, qs = Object.defineProperty, Jc = Object.getOwnPropertyDescriptor, Ur = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), de = (n) => {
|
|
1643
|
+
throw TypeError(n);
|
|
1644
|
+
}, qr = (n, t, e) => t in n ? qs(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, Ki = (n, t) => qs(n, "name", { value: t, configurable: !0 }), Fr = (n) => [, , , jc((n == null ? void 0 : n[Ur("metadata")]) ?? null)], Br = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Te = (n) => n !== void 0 && typeof n != "function" ? de("Function expected") : n, Qc = (n, t, e, s, i) => ({ kind: Br[n], name: t, metadata: s, addInitializer: (r) => e._ ? de("Already initialized") : i.push(Te(r || null)) }), Yc = (n, t) => qr(t, Ur("metadata"), n[3]), P = (n, t, e, s) => {
|
|
1645
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
1599
1646
|
return s;
|
|
1600
|
-
},
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
else if (r[m] === null)
|
|
1614
|
-
m--;
|
|
1615
|
-
else if (c[l] === f[v])
|
|
1616
|
-
a[v] = Pt(r[l], d[v]), l++, v++;
|
|
1617
|
-
else if (c[m] === f[y])
|
|
1618
|
-
a[y] = Pt(r[m], d[y]), m--, y--;
|
|
1619
|
-
else if (c[l] === f[y])
|
|
1620
|
-
a[y] = Pt(r[l], d[y]), zn(i, r[l], a[y + 1]), l++, y--;
|
|
1621
|
-
else if (c[m] === f[v])
|
|
1622
|
-
a[v] = Pt(r[m], d[v]), zn(i, r[m], r[l]), m--, v++;
|
|
1623
|
-
else if (o === void 0 && (o = Ii(f, v, y), _ = Ii(c, l, m)), !o.has(c[l]))
|
|
1624
|
-
Gn(r[l]), l++;
|
|
1625
|
-
else if (!o.has(c[m]))
|
|
1626
|
-
Gn(r[m]), m--;
|
|
1627
|
-
else {
|
|
1628
|
-
const $ = _.get(f[v]), u = $ !== void 0 ? r[$] : null;
|
|
1629
|
-
if (u === null) {
|
|
1630
|
-
const S = Ai(i, r[l]);
|
|
1631
|
-
Pt(S, d[v]), a[v] = S;
|
|
1632
|
-
} else
|
|
1633
|
-
a[v] = Pt(u, d[v]), zn(i, u, r[l]), r[$] = null;
|
|
1634
|
-
v++;
|
|
1635
|
-
}
|
|
1636
|
-
for (; v <= y; ) {
|
|
1637
|
-
const $ = Ai(i, a[y + 1]);
|
|
1638
|
-
Pt($, d[v]), a[v++] = $;
|
|
1639
|
-
}
|
|
1640
|
-
for (; l <= m; ) {
|
|
1641
|
-
const $ = r[l++];
|
|
1642
|
-
$ !== null && Gn($);
|
|
1643
|
-
}
|
|
1644
|
-
Ri.set(i, a), Hi.set(i, f);
|
|
1645
|
-
};
|
|
1646
|
-
});
|
|
1647
|
-
/**
|
|
1648
|
-
* @license
|
|
1649
|
-
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
1650
|
-
* This code may only be used under the BSD style license found at
|
|
1651
|
-
* http://polymer.github.io/LICENSE.txt
|
|
1652
|
-
* The complete set of authors may be found at
|
|
1653
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
1654
|
-
* The complete set of contributors may be found at
|
|
1655
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
1656
|
-
* Code distributed by Google as part of the polymer project is also
|
|
1657
|
-
* subject to an additional IP rights grant found at
|
|
1658
|
-
* http://polymer.github.io/PATENTS.txt
|
|
1659
|
-
*/
|
|
1660
|
-
const Vn = /* @__PURE__ */ new WeakMap(), ql = wn((e, t) => (n) => {
|
|
1661
|
-
const s = Vn.get(n);
|
|
1662
|
-
if (Array.isArray(e)) {
|
|
1663
|
-
if (Array.isArray(s) && s.length === e.length && e.every((i, r) => i === s[r]))
|
|
1664
|
-
return;
|
|
1665
|
-
} else if (s === e && (e !== void 0 || Vn.has(n)))
|
|
1666
|
-
return;
|
|
1667
|
-
n.setValue(t()), Vn.set(n, Array.isArray(e) ? Array.from(e) : e);
|
|
1668
|
-
});
|
|
1669
|
-
/**
|
|
1670
|
-
* @license
|
|
1671
|
-
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
1672
|
-
* This code may only be used under the BSD style license found at
|
|
1673
|
-
* http://polymer.github.io/LICENSE.txt
|
|
1674
|
-
* The complete set of authors may be found at
|
|
1675
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
1676
|
-
* The complete set of contributors may be found at
|
|
1677
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
1678
|
-
* Code distributed by Google as part of the polymer project is also
|
|
1679
|
-
* subject to an additional IP rights grant found at
|
|
1680
|
-
* http://polymer.github.io/PATENTS.txt
|
|
1681
|
-
*/
|
|
1682
|
-
const Dn = /* @__PURE__ */ new WeakMap(), yc = wn((e) => (t) => {
|
|
1683
|
-
const n = Dn.get(t);
|
|
1684
|
-
if (e === void 0 && t instanceof Es) {
|
|
1685
|
-
if (n !== void 0 || !Dn.has(t)) {
|
|
1686
|
-
const s = t.committer.name;
|
|
1687
|
-
t.committer.element.removeAttribute(s);
|
|
1688
|
-
}
|
|
1689
|
-
} else e !== n && t.setValue(e);
|
|
1690
|
-
Dn.set(t, e);
|
|
1691
|
-
});
|
|
1692
|
-
var Sc = Object.create, Ws = Object.defineProperty, $c = Object.getOwnPropertyDescriptor, Rr = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), re = (e) => {
|
|
1693
|
-
throw TypeError(e);
|
|
1694
|
-
}, Hr = (e, t, n) => t in e ? Ws(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Wi = (e, t) => Ws(e, "name", { value: t, configurable: !0 }), Wr = (e) => [, , , Sc((e == null ? void 0 : e[Rr("metadata")]) ?? null)], zr = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], we = (e) => e !== void 0 && typeof e != "function" ? re("Function expected") : e, Ec = (e, t, n, s, i) => ({ kind: zr[e], name: t, metadata: s, addInitializer: (r) => n._ ? re("Already initialized") : i.push(we(r || null)) }), bc = (e, t) => Hr(t, Rr("metadata"), e[3]), P = (e, t, n, s) => {
|
|
1695
|
-
for (var i = 0, r = e[t >> 1], c = r && r.length; i < c; i++) t & 1 ? r[i].call(n) : s = r[i].call(n, s);
|
|
1696
|
-
return s;
|
|
1697
|
-
}, W = (e, t, n, s, i, r) => {
|
|
1698
|
-
var c, a, d, f, g, o = t & 7, _ = !!(t & 8), l = !!(t & 16), m = o > 3 ? e.length + 1 : o ? _ ? 1 : 2 : 0, v = zr[o + 5], y = o > 3 && (e[m - 1] = []), $ = e[m] || (e[m] = []), u = o && (!l && !_ && (i = i.prototype), o < 5 && (o > 3 || !l) && $c(o < 4 ? i : { get [n]() {
|
|
1699
|
-
return R(this, r);
|
|
1700
|
-
}, set [n](h) {
|
|
1701
|
-
return un(this, r, h);
|
|
1702
|
-
} }, n));
|
|
1703
|
-
o ? l && o < 4 && Wi(r, (o > 2 ? "set " : o > 1 ? "get " : "") + n) : Wi(i, n);
|
|
1704
|
-
for (var S = s.length - 1; S >= 0; S--)
|
|
1705
|
-
f = Ec(o, n, d = {}, e[3], $), o && (f.static = _, f.private = l, g = f.access = { has: l ? (h) => Cc(i, h) : (h) => n in h }, o ^ 3 && (g.get = l ? (h) => (o ^ 1 ? R : Pc)(h, i, o ^ 4 ? r : u.get) : (h) => h[n]), o > 2 && (g.set = l ? (h, k) => un(h, i, k, o ^ 4 ? r : u.set) : (h, k) => h[n] = k)), a = (0, s[S])(o ? o < 4 ? l ? r : u[v] : o > 4 ? void 0 : { get: u.get, set: u.set } : i, f), d._ = 1, o ^ 4 || a === void 0 ? we(a) && (o > 4 ? y.unshift(a) : o ? l ? r = a : u[v] = a : i = a) : typeof a != "object" || a === null ? re("Object expected") : (we(c = a.get) && (u.get = c), we(c = a.set) && (u.set = c), we(c = a.init) && y.unshift(c));
|
|
1706
|
-
return o || bc(e, i), u && Ws(i, n, u), l ? o ^ 4 ? r : u : i;
|
|
1707
|
-
}, z = (e, t, n) => Hr(e, typeof t != "symbol" ? t + "" : t, n), zs = (e, t, n) => t.has(e) || re("Cannot " + n), Cc = (e, t) => Object(t) !== t ? re('Cannot use the "in" operator on this value') : e.has(t), R = (e, t, n) => (zs(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Z = (e, t, n) => t.has(e) ? re("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), un = (e, t, n, s) => (zs(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n), Pc = (e, t, n) => (zs(e, t, "access private method"), n), Gr, Vr, Dr, Fr, qr, Ur, Br, Kr, jr, Jr, Yr, Qr, Xr, Zr, to, ts, eo, w, kt, Vt, ye, nn, es, Se, sn, Gs, Vs, ns, Ds, Fs, no, qs, so;
|
|
1708
|
-
const io = "_";
|
|
1709
|
-
class kc extends RegExp {
|
|
1647
|
+
}, z = (n, t, e, s, i, r) => {
|
|
1648
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = Br[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && Jc(o < 4 ? i : { get [e]() {
|
|
1649
|
+
return H(this, r);
|
|
1650
|
+
}, set [e](u) {
|
|
1651
|
+
return Sn(this, r, u);
|
|
1652
|
+
} }, e));
|
|
1653
|
+
o ? h && o < 4 && Ki(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : Ki(i, e);
|
|
1654
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
1655
|
+
d = Qc(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => Zc(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? H : Xc)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => Sn(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? Te(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? de("Object expected") : (Te(a = c.get) && (p.get = a), Te(a = c.set) && (p.set = a), Te(a = c.init) && S.unshift(a));
|
|
1656
|
+
return o || Yc(n, i), p && qs(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
1657
|
+
}, V = (n, t, e) => qr(n, typeof t != "symbol" ? t + "" : t, e), Fs = (n, t, e) => t.has(n) || de("Cannot " + e), Zc = (n, t) => Object(t) !== t ? de('Cannot use the "in" operator on this value') : n.has(t), H = (n, t, e) => (Fs(n, t, "read from private field"), e ? e.call(n) : t.get(n)), et = (n, t, e) => t.has(n) ? de("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), Sn = (n, t, e, s) => (Fs(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), Xc = (n, t, e) => (Fs(n, t, "access private method"), e), Kr, jr, Jr, Qr, Yr, Zr, Xr, to, eo, no, so, io, ro, oo, ao, rs, co, w, Pt, Ft, ke, un, os, Oe, _n, Bs, Ks, as, js, Js, ho, Qs, lo;
|
|
1658
|
+
const uo = "_";
|
|
1659
|
+
class th extends RegExp {
|
|
1710
1660
|
constructor(t) {
|
|
1711
|
-
let
|
|
1661
|
+
let e = 0;
|
|
1712
1662
|
super(
|
|
1713
|
-
`^${t.replace(/((:[^/$]+)|(\*))/g, (s, i) => i === "*" ? `(?<${
|
|
1663
|
+
`^${t.replace(/((:[^/$]+)|(\*))/g, (s, i) => i === "*" ? `(?<${uo}${e++}>.*)` : `(?<${i.slice(1)}>[^/]+)`)}$`
|
|
1714
1664
|
);
|
|
1715
1665
|
}
|
|
1716
1666
|
}
|
|
1717
|
-
function
|
|
1667
|
+
function _o(n, t) {
|
|
1718
1668
|
if (window.URLPattern) {
|
|
1719
|
-
const r = new window.URLPattern({ pathname:
|
|
1720
|
-
return
|
|
1669
|
+
const r = new window.URLPattern({ pathname: n }), a = r.exec({ pathname: t }) || r.exec({ pathname: `${t}/` });
|
|
1670
|
+
return a ? a.pathname.groups : null;
|
|
1721
1671
|
}
|
|
1722
|
-
const
|
|
1672
|
+
const e = new th(n), s = t.match(e) || `${t}/`.match(e);
|
|
1723
1673
|
if (!s) return null;
|
|
1724
1674
|
const i = {};
|
|
1725
|
-
return s.groups && Object.entries(s.groups).forEach(([r,
|
|
1726
|
-
i[r.startsWith(
|
|
1675
|
+
return s.groups && Object.entries(s.groups).forEach(([r, a]) => {
|
|
1676
|
+
i[r.startsWith(uo) ? r.slice(1) : r] = a;
|
|
1727
1677
|
}), i;
|
|
1728
1678
|
}
|
|
1729
|
-
function
|
|
1730
|
-
let
|
|
1679
|
+
function Ys(n, t) {
|
|
1680
|
+
let e = 0, s = n.pattern.replaceAll("*", () => `:${e++}`);
|
|
1731
1681
|
const i = t == null ? void 0 : t.params;
|
|
1732
1682
|
return i && Object.keys(i).forEach((r) => {
|
|
1733
1683
|
s = s.replace(new RegExp(`:${r}`, "g"), i[r]);
|
|
1734
1684
|
}), s;
|
|
1735
1685
|
}
|
|
1736
|
-
function
|
|
1686
|
+
function eh(n, t) {
|
|
1737
1687
|
return {
|
|
1738
|
-
path:
|
|
1688
|
+
path: Ys(n, t),
|
|
1739
1689
|
...t
|
|
1740
1690
|
};
|
|
1741
1691
|
}
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1744
|
-
class
|
|
1745
|
-
var
|
|
1746
|
-
return
|
|
1747
|
-
})],
|
|
1692
|
+
const Yn = ht``, ji = /* @__PURE__ */ new Map();
|
|
1693
|
+
co = [Wr({ penetrable: !0 })];
|
|
1694
|
+
class I extends (rs = B, ao = [Rn], oo = [F], ro = [F], io = [F], so = [be], no = [be], eo = [be], to = [be], Xr = [F], Zr = [F], Yr = [F], Qr = [wt((t) => [t.scrollContainer])], Jr = [wt((t) => [t.scrollContainer])], jr = [wt((t) => {
|
|
1695
|
+
var e;
|
|
1696
|
+
return H(e = t, as).call(e);
|
|
1697
|
+
})], Kr = [le((t) => !t.inert)], rs) {
|
|
1748
1698
|
constructor() {
|
|
1749
|
-
super(...arguments),
|
|
1699
|
+
super(...arguments), et(this, Pt), V(this, "transition", P(w, 8, this)), P(w, 11, this), V(this, "routes", P(w, 12, this)), P(w, 15, this), V(this, "locationStore", P(w, 16, this)), P(w, 19, this), V(this, "key", P(w, 20, this)), P(w, 23, this), V(this, "loading", P(w, 24, this)), P(w, 27, this), V(this, "beforeroutechange", P(w, 28, this)), P(w, 31, this), V(this, "routechange", P(w, 32, this)), P(w, 35, this), V(this, "error", P(w, 36, this)), P(w, 39, this), V(this, "scrollContainer", P(w, 40, this)), P(w, 43, this), V(this, "scrollIgnoreHash", P(w, 44, this)), P(w, 47, this), V(this, "trigger", P(w, 48, this, x)), P(w, 51, this), V(this, "currentRoute"), V(this, "currentParams", {}), et(this, ke, Hs({ content: Yn })), et(this, un, () => {
|
|
1750
1700
|
if (!this.locationStore) return;
|
|
1751
|
-
const { path: t, query:
|
|
1701
|
+
const { path: t, query: e, hash: s, data: i } = x.getParams();
|
|
1752
1702
|
this.locationStore({
|
|
1753
1703
|
path: t,
|
|
1754
1704
|
params: this.currentParams,
|
|
1755
|
-
query:
|
|
1705
|
+
query: e,
|
|
1756
1706
|
hash: s,
|
|
1757
1707
|
data: i
|
|
1758
1708
|
});
|
|
1759
|
-
}),
|
|
1760
|
-
if (!
|
|
1761
|
-
const t =
|
|
1762
|
-
t ?
|
|
1763
|
-
}),
|
|
1764
|
-
this.beforeroutechange(t),
|
|
1709
|
+
}), et(this, os, () => {
|
|
1710
|
+
if (!H(this, Pt, Ft)) return;
|
|
1711
|
+
const t = ji.get(x.currentKey);
|
|
1712
|
+
t ? H(this, Pt, Ft).scroll(0, t) : (this.scrollIgnoreHash || !x.getParams().hash) && H(this, Pt, Ft).scroll(0, 0);
|
|
1713
|
+
}), et(this, Oe), et(this, _n, (t, e, s) => {
|
|
1714
|
+
this.beforeroutechange(t), Sn(this, Oe, void 0), this.currentRoute = t, this.currentParams = e;
|
|
1765
1715
|
const i = async () => {
|
|
1766
|
-
|
|
1716
|
+
H(this, ke).call(this, { content: s }), H(this, un).call(this), await Promise.resolve(), H(this, os).call(this), this.routechange(this.currentRoute);
|
|
1767
1717
|
};
|
|
1768
1718
|
this.transition && "startViewTransition" in document ? document.startViewTransition(() => i()) : i();
|
|
1769
|
-
}),
|
|
1770
|
-
if (
|
|
1771
|
-
return
|
|
1772
|
-
|
|
1719
|
+
}), et(this, Bs, P(w, 52, this, () => {
|
|
1720
|
+
if (H(this, Pt, Ft))
|
|
1721
|
+
return Cr(
|
|
1722
|
+
x,
|
|
1773
1723
|
"beforechange",
|
|
1774
|
-
() =>
|
|
1724
|
+
() => ji.set(x.currentKey, H(this, Pt, Ft).scrollTop)
|
|
1775
1725
|
);
|
|
1776
|
-
})), P(w, 55, this),
|
|
1777
|
-
const { path: t, query:
|
|
1778
|
-
return [this.key, t,
|
|
1779
|
-
}),
|
|
1780
|
-
if (s && t === s[0] &&
|
|
1781
|
-
|
|
1726
|
+
})), P(w, 55, this), et(this, Ks, P(w, 56, this, () => this.trigger.store && ut(this.trigger.store, () => H(this, ke).call(this)))), P(w, 59, this), et(this, as, () => {
|
|
1727
|
+
const { path: t, query: e, hash: s } = this.trigger.getParams();
|
|
1728
|
+
return [this.key, t, e, s];
|
|
1729
|
+
}), et(this, js, P(w, 60, this, ([t, e], s) => {
|
|
1730
|
+
if (s && t === s[0] && e === s[1]) {
|
|
1731
|
+
H(this, un).call(this);
|
|
1782
1732
|
return;
|
|
1783
1733
|
}
|
|
1784
1734
|
this.update();
|
|
1785
|
-
})), P(w, 63, this),
|
|
1786
|
-
const { content: t } =
|
|
1735
|
+
})), P(w, 63, this), et(this, Js, P(w, 64, this, () => {
|
|
1736
|
+
const { content: t } = H(this, ke);
|
|
1787
1737
|
if (t !== void 0)
|
|
1788
|
-
return this.shadowRoot ?
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
display: contents;
|
|
1793
|
-
}
|
|
1794
|
-
</style>
|
|
1795
|
-
${t === Fn ? at`<slot></slot>` : t}
|
|
1796
|
-
` : t === Fn ? void 0 : at`${t}`;
|
|
1797
|
-
})), P(w, 67, this), z(this, "update", () => {
|
|
1798
|
-
const { path: t, hash: n, query: s } = this.trigger.getParams(), { route: i, params: r = {} } = Fe.findRoute(this.routes, t), { redirect: c, content: a, getContent: d } = i || {};
|
|
1799
|
-
if (c) {
|
|
1738
|
+
return this.shadowRoot ? t === Yn ? ht`<slot></slot>` : t : t === Yn ? void 0 : ht`${t}`;
|
|
1739
|
+
})), P(w, 67, this), V(this, "update", () => {
|
|
1740
|
+
const { path: t, hash: e, query: s } = this.trigger.getParams(), { route: i, params: r = {} } = Ye.findRoute(this.routes, t), { redirect: a, content: c, getContent: l } = i || {};
|
|
1741
|
+
if (a) {
|
|
1800
1742
|
this.trigger.replace({
|
|
1801
|
-
path:
|
|
1743
|
+
path: Ys({ pattern: a }, { params: r }),
|
|
1802
1744
|
query: s,
|
|
1803
|
-
hash:
|
|
1745
|
+
hash: e
|
|
1804
1746
|
});
|
|
1805
1747
|
return;
|
|
1806
1748
|
}
|
|
1807
|
-
this.trigger ===
|
|
1808
|
-
const
|
|
1809
|
-
if (this.loading(i),
|
|
1810
|
-
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1813
|
-
|
|
1749
|
+
this.trigger === x && (location.href !== It.url || i != null && i.title) && It({ url: location.href, title: i == null ? void 0 : i.title });
|
|
1750
|
+
const d = c || (l == null ? void 0 : l(r, this.shadowRoot || this));
|
|
1751
|
+
if (this.loading(i), d instanceof Promise) {
|
|
1752
|
+
Sn(this, Oe, d);
|
|
1753
|
+
const f = () => H(this, Oe) === d;
|
|
1754
|
+
d.then((o) => {
|
|
1755
|
+
f() && H(this, _n).call(this, i, r, o);
|
|
1814
1756
|
}).catch((o) => {
|
|
1815
|
-
|
|
1757
|
+
f() && this.error(o);
|
|
1816
1758
|
});
|
|
1817
1759
|
return;
|
|
1818
1760
|
}
|
|
1819
|
-
|
|
1761
|
+
H(this, _n).call(this, i, r, d);
|
|
1820
1762
|
});
|
|
1821
1763
|
}
|
|
1822
1764
|
}
|
|
1823
|
-
w =
|
|
1824
|
-
|
|
1825
|
-
|
|
1765
|
+
w = Fr(rs);
|
|
1766
|
+
Pt = /* @__PURE__ */ new WeakSet();
|
|
1767
|
+
Ft = function() {
|
|
1826
1768
|
return typeof this.scrollContainer == "function" ? this.scrollContainer() : this.scrollContainer;
|
|
1827
1769
|
};
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
const { path:
|
|
1856
|
-
return
|
|
1770
|
+
ke = /* @__PURE__ */ new WeakMap();
|
|
1771
|
+
un = /* @__PURE__ */ new WeakMap();
|
|
1772
|
+
os = /* @__PURE__ */ new WeakMap();
|
|
1773
|
+
Oe = /* @__PURE__ */ new WeakMap();
|
|
1774
|
+
_n = /* @__PURE__ */ new WeakMap();
|
|
1775
|
+
Bs = /* @__PURE__ */ new WeakMap();
|
|
1776
|
+
Ks = /* @__PURE__ */ new WeakMap();
|
|
1777
|
+
as = /* @__PURE__ */ new WeakMap();
|
|
1778
|
+
js = /* @__PURE__ */ new WeakMap();
|
|
1779
|
+
Js = /* @__PURE__ */ new WeakMap();
|
|
1780
|
+
z(w, 5, "transition", ao, I);
|
|
1781
|
+
z(w, 5, "routes", oo, I);
|
|
1782
|
+
z(w, 5, "locationStore", ro, I);
|
|
1783
|
+
z(w, 5, "key", io, I);
|
|
1784
|
+
z(w, 5, "loading", so, I);
|
|
1785
|
+
z(w, 5, "beforeroutechange", no, I);
|
|
1786
|
+
z(w, 5, "routechange", eo, I);
|
|
1787
|
+
z(w, 5, "error", to, I);
|
|
1788
|
+
z(w, 5, "scrollContainer", Xr, I);
|
|
1789
|
+
z(w, 5, "scrollIgnoreHash", Zr, I);
|
|
1790
|
+
z(w, 5, "trigger", Yr, I);
|
|
1791
|
+
z(w, 21, "#rememberScrollPosition", Qr, Bs);
|
|
1792
|
+
z(w, 21, "#connectTriggerStore", Jr, Ks);
|
|
1793
|
+
z(w, 21, "#updateContent", jr, js);
|
|
1794
|
+
z(w, 21, "#content", Kr, Js);
|
|
1795
|
+
I = z(w, 0, "GemLightRouteElement", co, I);
|
|
1796
|
+
V(I, "createLocationStore", () => {
|
|
1797
|
+
const { path: n, query: t, hash: e, data: s } = x.getParams();
|
|
1798
|
+
return zt({ path: n, query: t, hash: e, data: s, params: {} });
|
|
1857
1799
|
});
|
|
1858
|
-
|
|
1859
|
-
let
|
|
1860
|
-
|
|
1800
|
+
V(I, "findRoute", (n = [], t) => {
|
|
1801
|
+
let e = null, s;
|
|
1802
|
+
n instanceof Array ? s = n : s = Object.values(n);
|
|
1861
1803
|
for (const i of s)
|
|
1862
1804
|
if (i.pattern === "*")
|
|
1863
|
-
|
|
1805
|
+
e = i;
|
|
1864
1806
|
else {
|
|
1865
|
-
const r =
|
|
1807
|
+
const r = _o(i.pattern, t);
|
|
1866
1808
|
if (r)
|
|
1867
1809
|
return { route: i, params: r };
|
|
1868
1810
|
}
|
|
1869
|
-
return { route:
|
|
1811
|
+
return { route: e };
|
|
1870
1812
|
});
|
|
1871
|
-
P(w, 1,
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1813
|
+
P(w, 1, I);
|
|
1814
|
+
const nh = an`
|
|
1815
|
+
:host(:where(:not([hidden]))),
|
|
1816
|
+
:not(:defined) {
|
|
1817
|
+
display: contents;
|
|
1818
|
+
}
|
|
1819
|
+
`;
|
|
1820
|
+
ho = [Vt(), Hn(nh)];
|
|
1821
|
+
class Ye extends (lo = I) {
|
|
1822
|
+
}
|
|
1823
|
+
Qs = Fr(lo);
|
|
1824
|
+
Ye = z(Qs, 0, "GemRouteElement", ho, Ye);
|
|
1825
|
+
P(Qs, 1, Ye);
|
|
1826
|
+
var sh = Object.create, Zs = Object.defineProperty, ih = Object.getOwnPropertyDescriptor, po = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), ue = (n) => {
|
|
1827
|
+
throw TypeError(n);
|
|
1828
|
+
}, fo = (n, t, e) => t in n ? Zs(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, Ji = (n, t) => Zs(n, "name", { value: t, configurable: !0 }), mo = (n) => [, , , sh((n == null ? void 0 : n[po("metadata")]) ?? null)], go = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Me = (n) => n !== void 0 && typeof n != "function" ? ue("Function expected") : n, rh = (n, t, e, s, i) => ({ kind: go[n], name: t, metadata: s, addInitializer: (r) => e._ ? ue("Already initialized") : i.push(Me(r || null)) }), oh = (n, t) => fo(t, po("metadata"), n[3]), C = (n, t, e, s) => {
|
|
1829
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
1882
1830
|
return s;
|
|
1883
|
-
},
|
|
1884
|
-
var c,
|
|
1885
|
-
return
|
|
1886
|
-
}, set [
|
|
1887
|
-
return
|
|
1888
|
-
} },
|
|
1889
|
-
o ?
|
|
1890
|
-
for (var
|
|
1891
|
-
|
|
1892
|
-
return o ||
|
|
1893
|
-
},
|
|
1894
|
-
function
|
|
1895
|
-
return !
|
|
1896
|
-
}
|
|
1897
|
-
const
|
|
1831
|
+
}, N = (n, t, e, s, i, r) => {
|
|
1832
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = go[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && ih(o < 4 ? i : { get [e]() {
|
|
1833
|
+
return rt(this, r);
|
|
1834
|
+
}, set [e](u) {
|
|
1835
|
+
return Qi(this, r, u);
|
|
1836
|
+
} }, e));
|
|
1837
|
+
o ? h && o < 4 && Ji(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : Ji(i, e);
|
|
1838
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
1839
|
+
d = rh(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => ah(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? rt : ch)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => Qi(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? Me(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? ue("Object expected") : (Me(a = c.get) && (p.get = a), Me(a = c.set) && (p.set = a), Me(a = c.init) && S.unshift(a));
|
|
1840
|
+
return o || oh(n, i), p && Zs(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
1841
|
+
}, G = (n, t, e) => fo(n, typeof t != "symbol" ? t + "" : t, e), Xs = (n, t, e) => t.has(n) || ue("Cannot " + e), ah = (n, t) => Object(t) !== t ? ue('Cannot use the "in" operator on this value') : n.has(t), rt = (n, t, e) => (Xs(n, t, "read from private field"), e ? e.call(n) : t.get(n)), Tt = (n, t, e) => t.has(n) ? ue("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), Qi = (n, t, e, s) => (Xs(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), ch = (n, t, e) => (Xs(n, t, "access private method"), e), $o, vo, wo, yo, So, Eo, Co, bo, Po, To, ko, Oo, Mo, xo, cs, Ao, y, pt, xe, Lo, ti, hs, ls, ei, ds, ni, No, Ro, Io, us, Ho, Z, si;
|
|
1842
|
+
function Yi(n) {
|
|
1843
|
+
return !n.startsWith("/");
|
|
1844
|
+
}
|
|
1845
|
+
const hh = an`
|
|
1898
1846
|
:host {
|
|
1899
1847
|
/* link default style */
|
|
1900
1848
|
cursor: pointer;
|
|
@@ -1908,15 +1856,15 @@ const Ic = bn(vr`
|
|
|
1908
1856
|
a:visited {
|
|
1909
1857
|
color: unset;
|
|
1910
1858
|
}
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
class
|
|
1859
|
+
`;
|
|
1860
|
+
Ao = [Wn(Kc), Hn(hh), Vt(), zn({ focusable: !0 })];
|
|
1861
|
+
class W extends (cs = B, xo = [D], Mo = [D], Oo = [D], ko = [D], To = [D], Po = [D], bo = [Rn], Co = [F], Eo = [F], So = [F], yo = [F], wo = [Ir], vo = [Qe()], $o = [le()], cs) {
|
|
1914
1862
|
constructor() {
|
|
1915
|
-
super(...arguments), C(
|
|
1863
|
+
super(...arguments), C(y, 5, this), Tt(this, pt), G(this, "href", C(y, 8, this)), C(y, 11, this), G(this, "target", C(y, 12, this)), C(y, 15, this), G(this, "path", C(y, 16, this)), C(y, 19, this), G(this, "query", C(y, 20, this)), C(y, 23, this), G(this, "hash", C(y, 24, this)), C(y, 27, this), G(this, "hint", C(y, 28, this)), C(y, 31, this), G(this, "preload", C(y, 32, this)), C(y, 35, this), G(this, "route", C(y, 36, this)), C(y, 39, this), G(this, "options", C(y, 40, this)), C(y, 43, this), G(this, "routeOptions", C(y, 44, this)), C(y, 47, this), G(this, "prepare", C(y, 48, this)), C(y, 51, this), G(this, "link", C(y, 52, this)), C(y, 55, this), Tt(this, ti, async () => {
|
|
1916
1864
|
var r;
|
|
1917
|
-
const t = this.
|
|
1865
|
+
const t = this._getLocationString();
|
|
1918
1866
|
if (!t) return;
|
|
1919
|
-
if (
|
|
1867
|
+
if (Yi(t))
|
|
1920
1868
|
switch (this.target) {
|
|
1921
1869
|
case "_self":
|
|
1922
1870
|
window.location.href = t;
|
|
@@ -1931,178 +1879,174 @@ class H extends (ss = B, Eo = [V], $o = [V], So = [V], yo = [V], wo = [V], vo =
|
|
|
1931
1879
|
window.open(t);
|
|
1932
1880
|
return;
|
|
1933
1881
|
}
|
|
1934
|
-
const { path:
|
|
1935
|
-
if (
|
|
1882
|
+
const { path: e, query: s, hash: i } = x.getParams();
|
|
1883
|
+
if (e + s + i !== t)
|
|
1936
1884
|
if (await ((r = this.prepare) == null ? void 0 : r.call(this)), this.route)
|
|
1937
|
-
|
|
1885
|
+
x.pushIgnoreCloseHandle(eh(this.route, rt(this, pt, xe)));
|
|
1938
1886
|
else if (this.href) {
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1941
|
-
path:
|
|
1942
|
-
query:
|
|
1943
|
-
hash:
|
|
1887
|
+
const a = new URL(t, location.origin);
|
|
1888
|
+
x.pushIgnoreCloseHandle({
|
|
1889
|
+
path: a.pathname,
|
|
1890
|
+
query: a.search,
|
|
1891
|
+
hash: a.hash
|
|
1944
1892
|
});
|
|
1945
1893
|
} else
|
|
1946
|
-
|
|
1894
|
+
x.pushIgnoreCloseHandle({
|
|
1947
1895
|
path: this.path,
|
|
1948
1896
|
query: this.query,
|
|
1949
1897
|
hash: this.hash
|
|
1950
1898
|
});
|
|
1951
|
-
}),
|
|
1952
|
-
t.
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
part=${this.link}
|
|
1965
|
-
@click=${nt(this, is)}
|
|
1966
|
-
href=${yc(nt(this, gt, Co) === "off" ? void 0 : nt(this, rs).call(this))}
|
|
1967
|
-
tabindex="-1"
|
|
1968
|
-
>
|
|
1969
|
-
<slot></slot>
|
|
1970
|
-
</a>
|
|
1971
|
-
`;
|
|
1899
|
+
}), Tt(this, hs, (t) => t.preventDefault()), Tt(this, ls, () => {
|
|
1900
|
+
const t = this._getLocationString();
|
|
1901
|
+
return Yi(t) ? t : new URL(x.basePath + t, location.origin).toString();
|
|
1902
|
+
}), Tt(this, ei, () => {
|
|
1903
|
+
var t, e, s;
|
|
1904
|
+
(t = this.route) == null || t.content, (s = (e = this.route) == null ? void 0 : e.getContent) == null || s.call(e, {}, this.shadowRoot);
|
|
1905
|
+
}), Tt(this, ni, C(y, 56, this, () => ht`<a
|
|
1906
|
+
part=${this.link}
|
|
1907
|
+
@click=${rt(this, hs)}
|
|
1908
|
+
href=${rt(this, pt, Lo) === "off" ? null : rt(this, ls).call(this)}
|
|
1909
|
+
tabindex="-1"
|
|
1910
|
+
><slot></slot
|
|
1911
|
+
></a>`)), C(y, 59, this);
|
|
1972
1912
|
}
|
|
1973
1913
|
/**
|
|
1974
1914
|
* 如果该元素是外部链接返回 URL,否则返回路径(不包含 basePath)
|
|
1975
1915
|
*/
|
|
1976
|
-
|
|
1977
|
-
var t,
|
|
1916
|
+
_getLocationString() {
|
|
1917
|
+
var t, e;
|
|
1978
1918
|
if (this.route) {
|
|
1979
|
-
const s = ((t =
|
|
1980
|
-
return
|
|
1919
|
+
const s = ((t = rt(this, pt, xe)) == null ? void 0 : t.query) || "", i = ((e = rt(this, pt, xe)) == null ? void 0 : e.hash) || "";
|
|
1920
|
+
return Ys(this.route, rt(this, pt, xe)) + s + i;
|
|
1981
1921
|
} else {
|
|
1982
|
-
const s = this.href || this.path + this.query + this.hash, { path: i, query: r } =
|
|
1983
|
-
return s.startsWith("#") ? `${i}${r}${s}` : s.startsWith("?") ? `${i}${s}` : s.startsWith(".") ?
|
|
1922
|
+
const s = this.href || this.path + this.query + this.hash, { path: i, query: r } = x.getParams();
|
|
1923
|
+
return s.startsWith("#") ? `${i}${r}${s}` : s.startsWith("?") ? `${i}${s}` : s.startsWith(".") ? Er(i, s) : s;
|
|
1984
1924
|
}
|
|
1985
1925
|
}
|
|
1986
1926
|
}
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1927
|
+
y = mo(cs);
|
|
1928
|
+
pt = /* @__PURE__ */ new WeakSet();
|
|
1929
|
+
xe = function() {
|
|
1990
1930
|
return this.routeOptions || this.options;
|
|
1991
1931
|
};
|
|
1992
|
-
|
|
1932
|
+
Lo = function() {
|
|
1993
1933
|
return this.hint || "on";
|
|
1994
1934
|
};
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
this.addEventListener("click",
|
|
1935
|
+
ti = /* @__PURE__ */ new WeakMap();
|
|
1936
|
+
hs = /* @__PURE__ */ new WeakMap();
|
|
1937
|
+
ls = /* @__PURE__ */ new WeakMap();
|
|
1938
|
+
ei = /* @__PURE__ */ new WeakMap();
|
|
1939
|
+
ds = function() {
|
|
1940
|
+
this.addEventListener("click", rt(this, ti)), this.addEventListener("pointerenter", rt(this, ei));
|
|
2001
1941
|
};
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
1942
|
+
ni = /* @__PURE__ */ new WeakMap();
|
|
1943
|
+
ds = N(y, 17, "#init", vo, pt, ds);
|
|
1944
|
+
N(y, 5, "href", xo, W);
|
|
1945
|
+
N(y, 5, "target", Mo, W);
|
|
1946
|
+
N(y, 5, "path", Oo, W);
|
|
1947
|
+
N(y, 5, "query", ko, W);
|
|
1948
|
+
N(y, 5, "hash", To, W);
|
|
1949
|
+
N(y, 5, "hint", Po, W);
|
|
1950
|
+
N(y, 5, "preload", bo, W);
|
|
1951
|
+
N(y, 5, "route", Co, W);
|
|
1952
|
+
N(y, 5, "options", Eo, W);
|
|
1953
|
+
N(y, 5, "routeOptions", So, W);
|
|
1954
|
+
N(y, 5, "prepare", yo, W);
|
|
1955
|
+
N(y, 5, "link", wo, W);
|
|
1956
|
+
N(y, 21, "#content", $o, ni);
|
|
1957
|
+
W = N(y, 0, "GemLinkElement", Ao, W);
|
|
1958
|
+
C(y, 1, W);
|
|
1959
|
+
Ho = [Wn(x.store)];
|
|
1960
|
+
class oe extends (us = W, Io = [D], Ro = [In], No = [wt()], us) {
|
|
2019
1961
|
constructor() {
|
|
2020
|
-
super(...arguments),
|
|
2021
|
-
const { path: t, query:
|
|
2022
|
-
this.active = !!i || t +
|
|
2023
|
-
})), C(
|
|
2024
|
-
}
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
C(
|
|
2033
|
-
customElements.define("gem-link",
|
|
2034
|
-
customElements.define("gem-active-link",
|
|
2035
|
-
customElements.define("gem-route",
|
|
2036
|
-
customElements.define("gem-light-route",
|
|
2037
|
-
var
|
|
2038
|
-
throw TypeError(
|
|
2039
|
-
},
|
|
2040
|
-
for (var i = 0, r =
|
|
1962
|
+
super(...arguments), G(this, "pattern", C(Z, 8, this)), C(Z, 11, this), G(this, "active", C(Z, 12, this)), C(Z, 15, this), Tt(this, si, C(Z, 16, this, () => {
|
|
1963
|
+
const { path: t, query: e, hash: s } = x.getParams(), i = this.pattern && _o(this.pattern, t);
|
|
1964
|
+
this.active = !!i || t + e + s === this._getLocationString();
|
|
1965
|
+
})), C(Z, 19, this);
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
Z = mo(us);
|
|
1969
|
+
si = /* @__PURE__ */ new WeakMap();
|
|
1970
|
+
N(Z, 5, "pattern", Io, oe);
|
|
1971
|
+
N(Z, 5, "active", Ro, oe);
|
|
1972
|
+
N(Z, 21, "#updateState", No, si);
|
|
1973
|
+
oe = N(Z, 0, "GemActiveLinkElement", Ho, oe);
|
|
1974
|
+
C(Z, 1, oe);
|
|
1975
|
+
customElements.define("gem-link", W);
|
|
1976
|
+
customElements.define("gem-active-link", oe);
|
|
1977
|
+
customElements.define("gem-route", Ye);
|
|
1978
|
+
customElements.define("gem-light-route", I);
|
|
1979
|
+
var lh = Object.create, ii = Object.defineProperty, dh = Object.getOwnPropertyDescriptor, Wo = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), _e = (n) => {
|
|
1980
|
+
throw TypeError(n);
|
|
1981
|
+
}, zo = (n, t, e) => t in n ? ii(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, Zi = (n, t) => ii(n, "name", { value: t, configurable: !0 }), uh = (n) => [, , , lh((n == null ? void 0 : n[Wo("metadata")]) ?? null)], Vo = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ae = (n) => n !== void 0 && typeof n != "function" ? _e("Function expected") : n, _h = (n, t, e, s, i) => ({ kind: Vo[n], name: t, metadata: s, addInitializer: (r) => e._ ? _e("Already initialized") : i.push(Ae(r || null)) }), ph = (n, t) => zo(t, Wo("metadata"), n[3]), j = (n, t, e, s) => {
|
|
1982
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
2041
1983
|
return s;
|
|
2042
|
-
},
|
|
2043
|
-
var c,
|
|
2044
|
-
return
|
|
2045
|
-
}, set [
|
|
2046
|
-
return
|
|
2047
|
-
} },
|
|
2048
|
-
o ?
|
|
2049
|
-
for (var
|
|
2050
|
-
|
|
2051
|
-
return o ||
|
|
2052
|
-
},
|
|
2053
|
-
let
|
|
2054
|
-
const
|
|
2055
|
-
clearTimeout(
|
|
1984
|
+
}, Dt = (n, t, e, s, i, r) => {
|
|
1985
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = Vo[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && dh(o < 4 ? i : { get [e]() {
|
|
1986
|
+
return _s(this, r);
|
|
1987
|
+
}, set [e](u) {
|
|
1988
|
+
return Xi(this, r, u);
|
|
1989
|
+
} }, e));
|
|
1990
|
+
o ? h && o < 4 && Zi(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : Zi(i, e);
|
|
1991
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
1992
|
+
d = _h(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => fh(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? _s : mh)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => Xi(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? Ae(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? _e("Object expected") : (Ae(a = c.get) && (p.get = a), Ae(a = c.set) && (p.set = a), Ae(a = c.init) && S.unshift(a));
|
|
1993
|
+
return o || ph(n, i), p && ii(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
1994
|
+
}, pn = (n, t, e) => zo(n, typeof t != "symbol" ? t + "" : t, e), ri = (n, t, e) => t.has(n) || _e("Cannot " + e), fh = (n, t) => Object(t) !== t ? _e('Cannot use the "in" operator on this value') : n.has(t), _s = (n, t, e) => (ri(n, t, "read from private field"), e ? e.call(n) : t.get(n)), cn = (n, t, e) => t.has(n) ? _e("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), Xi = (n, t, e, s) => (ri(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), mh = (n, t, e) => (ri(n, t, "access private method"), e), Do, Go, Uo, qo, Fo, Bo, ps, Ko, A, oi, fs, ai, ci;
|
|
1995
|
+
let tr = 0;
|
|
1996
|
+
const er = (n) => {
|
|
1997
|
+
clearTimeout(tr), tr = window.setTimeout(() => document.title = n);
|
|
2056
1998
|
};
|
|
2057
|
-
function
|
|
2058
|
-
const s =
|
|
2059
|
-
s && s !==
|
|
1999
|
+
function gh(n, t = "", e = "") {
|
|
2000
|
+
const s = It.title || n;
|
|
2001
|
+
s && s !== It.defaultTitle ? (Le.title = s, er(t + Le.title + e)) : (Le.title = It.defaultTitle, er(Le.title));
|
|
2060
2002
|
}
|
|
2061
|
-
|
|
2062
|
-
let
|
|
2003
|
+
Ko = [Vt()];
|
|
2004
|
+
let St = class jo extends (ps = B, Bo = [D], Fo = [D], qo = [Rn], Uo = [wt((t) => [t.inert])], Go = [Qe()], Do = [le()], ps) {
|
|
2063
2005
|
constructor() {
|
|
2064
|
-
super(...arguments),
|
|
2065
|
-
|
|
2066
|
-
})),
|
|
2006
|
+
super(...arguments), pn(this, "prefix", j(A, 8, this)), j(A, 11, this), pn(this, "suffix", j(A, 12, this)), j(A, 15, this), pn(this, "inert", j(A, 16, this)), j(A, 19, this), cn(this, oi, j(A, 20, this, () => !this.inert && ut(It, this.update))), j(A, 23, this), cn(this, fs, new MutationObserver(() => this.update())), cn(this, ai, j(A, 24, this, () => {
|
|
2007
|
+
_s(this, fs).observe(this, { characterData: !0, childList: !0, subtree: !0 });
|
|
2008
|
+
})), j(A, 27, this), cn(this, ci, j(A, 28, this, () => {
|
|
2067
2009
|
var t;
|
|
2068
|
-
return
|
|
2069
|
-
});
|
|
2010
|
+
return gh((t = this.textContent) == null ? void 0 : t.trim(), this.prefix, this.suffix), ht`${jo.title}`;
|
|
2011
|
+
})), j(A, 31, this);
|
|
2070
2012
|
}
|
|
2071
2013
|
static setTitle(t) {
|
|
2072
|
-
|
|
2014
|
+
It({ title: t });
|
|
2073
2015
|
}
|
|
2074
2016
|
};
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2017
|
+
A = uh(ps);
|
|
2018
|
+
oi = /* @__PURE__ */ new WeakMap();
|
|
2019
|
+
fs = /* @__PURE__ */ new WeakMap();
|
|
2020
|
+
ai = /* @__PURE__ */ new WeakMap();
|
|
2021
|
+
ci = /* @__PURE__ */ new WeakMap();
|
|
2022
|
+
Dt(A, 5, "prefix", Bo, St);
|
|
2023
|
+
Dt(A, 5, "suffix", Fo, St);
|
|
2024
|
+
Dt(A, 5, "inert", qo, St);
|
|
2025
|
+
Dt(A, 21, "#connectStore", Uo, oi);
|
|
2026
|
+
Dt(A, 21, "#obTextContent", Go, ai);
|
|
2027
|
+
Dt(A, 21, "#content", Do, ci);
|
|
2028
|
+
St = Dt(A, 0, "GemTitleElement", Ko, St);
|
|
2029
|
+
pn(St, "title", document.title);
|
|
2030
|
+
j(A, 1, St);
|
|
2031
|
+
let Le = St;
|
|
2032
|
+
customElements.define("gem-title", Le);
|
|
2033
|
+
var $h = Object.create, hi = Object.defineProperty, vh = Object.getOwnPropertyDescriptor, Jo = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), pe = (n) => {
|
|
2034
|
+
throw TypeError(n);
|
|
2035
|
+
}, Qo = (n, t, e) => t in n ? hi(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, nr = (n, t) => hi(n, "name", { value: t, configurable: !0 }), wh = (n) => [, , , $h((n == null ? void 0 : n[Jo("metadata")]) ?? null)], Yo = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ne = (n) => n !== void 0 && typeof n != "function" ? pe("Function expected") : n, yh = (n, t, e, s, i) => ({ kind: Yo[n], name: t, metadata: s, addInitializer: (r) => e._ ? pe("Already initialized") : i.push(Ne(r || null)) }), Sh = (n, t) => Qo(t, Jo("metadata"), n[3]), nt = (n, t, e, s) => {
|
|
2036
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
2093
2037
|
return s;
|
|
2094
|
-
},
|
|
2095
|
-
var c,
|
|
2096
|
-
return
|
|
2097
|
-
}, set [
|
|
2098
|
-
return
|
|
2099
|
-
} },
|
|
2100
|
-
o ?
|
|
2101
|
-
for (var
|
|
2102
|
-
|
|
2103
|
-
return o ||
|
|
2104
|
-
},
|
|
2105
|
-
const
|
|
2038
|
+
}, fe = (n, t, e, s, i, r) => {
|
|
2039
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = Yo[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && vh(o < 4 ? i : { get [e]() {
|
|
2040
|
+
return ms(this, r);
|
|
2041
|
+
}, set [e](u) {
|
|
2042
|
+
return ir(this, r, u);
|
|
2043
|
+
} }, e));
|
|
2044
|
+
o ? h && o < 4 && nr(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : nr(i, e);
|
|
2045
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
2046
|
+
d = yh(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => Eh(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? ms : Ch)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => ir(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? Ne(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? pe("Object expected") : (Ne(a = c.get) && (p.get = a), Ne(a = c.set) && (p.set = a), Ne(a = c.init) && S.unshift(a));
|
|
2047
|
+
return o || Sh(n, i), p && hi(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
2048
|
+
}, hn = (n, t, e) => Qo(n, typeof t != "symbol" ? t + "" : t, e), li = (n, t, e) => t.has(n) || pe("Cannot " + e), Eh = (n, t) => Object(t) !== t ? pe('Cannot use the "in" operator on this value') : n.has(t), ms = (n, t, e) => (li(n, t, "read from private field"), e ? e.call(n) : t.get(n)), sr = (n, t, e) => t.has(n) ? pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), ir = (n, t, e, s) => (li(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), Ch = (n, t, e) => (li(n, t, "access private method"), e), Zo, Xo, ta, ea, na, gs, sa, R, $s, di;
|
|
2049
|
+
const bh = an`
|
|
2106
2050
|
:host(:where(:not([hidden]))) {
|
|
2107
2051
|
position: relative;
|
|
2108
2052
|
display: inline-flex;
|
|
@@ -2112,185 +2056,185 @@ const Xc = bn(vr`
|
|
|
2112
2056
|
width: 100%;
|
|
2113
2057
|
height: 100%;
|
|
2114
2058
|
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
class
|
|
2059
|
+
`, rr = /* @__PURE__ */ new Map();
|
|
2060
|
+
sa = [Vt(), Hn(bh)];
|
|
2061
|
+
class Et extends (gs = B, na = [D], ea = [F], ta = [F], Xo = [In], Zo = [le()], gs) {
|
|
2118
2062
|
constructor() {
|
|
2119
|
-
super(...arguments),
|
|
2063
|
+
super(...arguments), hn(this, "selector", nt(R, 8, this)), nt(R, 11, this), hn(this, "root", nt(R, 12, this)), nt(R, 15, this), hn(this, "element", nt(R, 16, this)), nt(R, 19, this), hn(this, "active", nt(R, 20, this)), nt(R, 23, this), sr(this, $s, () => {
|
|
2120
2064
|
const t = this.element || (this.selector ? (this.root || document).querySelector(this.selector) : null);
|
|
2121
2065
|
if (typeof t == "string") {
|
|
2122
|
-
let
|
|
2123
|
-
return
|
|
2066
|
+
let e = rr.get(t);
|
|
2067
|
+
return e || (e = document.createElement("template"), e.innerHTML = t, rr.set(t, e)), e.content.cloneNode(!0);
|
|
2124
2068
|
} else return t instanceof HTMLTemplateElement ? t.content.cloneNode(!0) : t == null ? void 0 : t.cloneNode(!0);
|
|
2125
|
-
});
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
var Zc = Object.create, si = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, jo = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), Xe = (e) => {
|
|
2144
|
-
throw TypeError(e);
|
|
2145
|
-
}, Jo = (e, t, n) => t in e ? si(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Yi = (e, t) => si(e, "name", { value: t, configurable: !0 }), el = (e) => [, , , Zc((e == null ? void 0 : e[jo("metadata")]) ?? null)], Yo = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], xe = (e) => e !== void 0 && typeof e != "function" ? Xe("Function expected") : e, nl = (e, t, n, s, i) => ({ kind: Yo[e], name: t, metadata: s, addInitializer: (r) => n._ ? Xe("Already initialized") : i.push(xe(r || null)) }), sl = (e, t) => Jo(t, jo("metadata"), e[3]), Te = (e, t, n, s) => {
|
|
2146
|
-
for (var i = 0, r = e[t >> 1], c = r && r.length; i < c; i++) t & 1 ? r[i].call(n) : s = r[i].call(n, s);
|
|
2069
|
+
}), sr(this, di, nt(R, 24, this, () => ht`${ms(this, $s).call(this)}<slot></slot>`)), nt(R, 27, this);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
R = wh(gs);
|
|
2073
|
+
$s = /* @__PURE__ */ new WeakMap();
|
|
2074
|
+
di = /* @__PURE__ */ new WeakMap();
|
|
2075
|
+
fe(R, 5, "selector", na, Et);
|
|
2076
|
+
fe(R, 5, "root", ea, Et);
|
|
2077
|
+
fe(R, 5, "element", ta, Et);
|
|
2078
|
+
fe(R, 5, "active", Xo, Et);
|
|
2079
|
+
fe(R, 21, "#content", Zo, di);
|
|
2080
|
+
Et = fe(R, 0, "GemUseElement", sa, Et);
|
|
2081
|
+
nt(R, 1, Et);
|
|
2082
|
+
customElements.define("gem-use", Et);
|
|
2083
|
+
var Ph = Object.create, ui = Object.defineProperty, Th = Object.getOwnPropertyDescriptor, ia = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), me = (n) => {
|
|
2084
|
+
throw TypeError(n);
|
|
2085
|
+
}, ra = (n, t, e) => t in n ? ui(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, or = (n, t) => ui(n, "name", { value: t, configurable: !0 }), kh = (n) => [, , , Ph((n == null ? void 0 : n[ia("metadata")]) ?? null)], oa = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Re = (n) => n !== void 0 && typeof n != "function" ? me("Function expected") : n, Oh = (n, t, e, s, i) => ({ kind: oa[n], name: t, metadata: s, addInitializer: (r) => e._ ? me("Already initialized") : i.push(Re(r || null)) }), Mh = (n, t) => ra(t, ia("metadata"), n[3]), kt = (n, t, e, s) => {
|
|
2086
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
2147
2087
|
return s;
|
|
2148
|
-
},
|
|
2149
|
-
var c,
|
|
2150
|
-
return
|
|
2151
|
-
}, set [
|
|
2152
|
-
return
|
|
2153
|
-
} },
|
|
2154
|
-
o ?
|
|
2155
|
-
for (var
|
|
2156
|
-
|
|
2157
|
-
return o ||
|
|
2158
|
-
},
|
|
2159
|
-
|
|
2160
|
-
class
|
|
2088
|
+
}, Vn = (n, t, e, s, i, r) => {
|
|
2089
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = oa[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && Th(o < 4 ? i : { get [e]() {
|
|
2090
|
+
return cr(this, r);
|
|
2091
|
+
}, set [e](u) {
|
|
2092
|
+
return hr(this, r, u);
|
|
2093
|
+
} }, e));
|
|
2094
|
+
o ? h && o < 4 && or(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : or(i, e);
|
|
2095
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
2096
|
+
d = Oh(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => xh(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? cr : Lh)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => hr(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? Re(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? me("Object expected") : (Re(a = c.get) && (p.get = a), Re(a = c.set) && (p.set = a), Re(a = c.init) && S.unshift(a));
|
|
2097
|
+
return o || Mh(n, i), p && ui(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
2098
|
+
}, ar = (n, t, e) => ra(n, typeof t != "symbol" ? t + "" : t, e), _i = (n, t, e) => t.has(n) || me("Cannot " + e), xh = (n, t) => Object(t) !== t ? me('Cannot use the "in" operator on this value') : n.has(t), cr = (n, t, e) => (_i(n, t, "read from private field"), e ? e.call(n) : t.get(n)), Ah = (n, t, e) => t.has(n) ? me("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), hr = (n, t, e, s) => (_i(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), Lh = (n, t, e) => (_i(n, t, "access private method"), e), aa, ca, ha, vs, la, X, pi;
|
|
2099
|
+
la = [Vt()];
|
|
2100
|
+
class ae extends (vs = B, ha = [D], ca = [D], aa = [le()], vs) {
|
|
2161
2101
|
constructor() {
|
|
2162
|
-
super(...arguments),
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2102
|
+
super(...arguments), ar(this, "content", kt(X, 8, this)), kt(X, 11, this), ar(this, "contentcss", kt(X, 12, this)), kt(X, 15, this), Ah(this, pi, kt(X, 16, this, () => {
|
|
2103
|
+
const t = (
|
|
2104
|
+
/*html*/
|
|
2105
|
+
`
|
|
2166
2106
|
<style>
|
|
2167
2107
|
:host(:where(:not([hidden]))) {
|
|
2168
2108
|
display: contents;
|
|
2169
2109
|
}
|
|
2170
2110
|
${this.contentcss}
|
|
2171
2111
|
</style>
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2112
|
+
`
|
|
2113
|
+
);
|
|
2114
|
+
this.shadowRoot.innerHTML = this.content + t.trim();
|
|
2115
|
+
})), kt(X, 19, this);
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
X = kh(vs);
|
|
2119
|
+
pi = /* @__PURE__ */ new WeakMap();
|
|
2120
|
+
Vn(X, 5, "content", ha, ae);
|
|
2121
|
+
Vn(X, 5, "contentcss", ca, ae);
|
|
2122
|
+
Vn(X, 21, "#content", aa, pi);
|
|
2123
|
+
ae = Vn(X, 0, "GemUnsafeElement", la, ae);
|
|
2124
|
+
kt(X, 1, ae);
|
|
2125
|
+
customElements.define("gem-unsafe", ae);
|
|
2126
|
+
var Nh = Object.create, fi = Object.defineProperty, Rh = Object.getOwnPropertyDescriptor, da = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), ge = (n) => {
|
|
2127
|
+
throw TypeError(n);
|
|
2128
|
+
}, ua = (n, t, e) => t in n ? fi(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, lr = (n, t) => fi(n, "name", { value: t, configurable: !0 }), Ih = (n) => [, , , Nh((n == null ? void 0 : n[da("metadata")]) ?? null)], _a = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ie = (n) => n !== void 0 && typeof n != "function" ? ge("Function expected") : n, Hh = (n, t, e, s, i) => ({ kind: _a[n], name: t, metadata: s, addInitializer: (r) => e._ ? ge("Already initialized") : i.push(Ie(r || null)) }), pa = (n, t) => ua(t, da("metadata"), n[3]), _t = (n, t, e, s) => {
|
|
2129
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
2186
2130
|
return s;
|
|
2187
|
-
},
|
|
2188
|
-
var c,
|
|
2189
|
-
return
|
|
2190
|
-
}, set [
|
|
2191
|
-
return
|
|
2192
|
-
} },
|
|
2193
|
-
o ?
|
|
2194
|
-
for (var
|
|
2195
|
-
|
|
2196
|
-
return o ||
|
|
2197
|
-
},
|
|
2198
|
-
const
|
|
2131
|
+
}, Dn = (n, t, e, s, i, r) => {
|
|
2132
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = _a[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && Rh(o < 4 ? i : { get [e]() {
|
|
2133
|
+
return ft(this, r);
|
|
2134
|
+
}, set [e](u) {
|
|
2135
|
+
return ws(this, r, u);
|
|
2136
|
+
} }, e));
|
|
2137
|
+
o ? h && o < 4 && lr(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : lr(i, e);
|
|
2138
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
2139
|
+
d = Hh(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => Wh(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? ft : zh)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => ws(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? Ie(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? ge("Object expected") : (Ie(a = c.get) && (p.get = a), Ie(a = c.set) && (p.set = a), Ie(a = c.init) && S.unshift(a));
|
|
2140
|
+
return o || pa(n, i), p && fi(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
2141
|
+
}, dr = (n, t, e) => ua(n, typeof t != "symbol" ? t + "" : t, e), mi = (n, t, e) => t.has(n) || ge("Cannot " + e), Wh = (n, t) => Object(t) !== t ? ge('Cannot use the "in" operator on this value') : n.has(t), ft = (n, t, e) => (mi(n, t, "read from private field"), e ? e.call(n) : t.get(n)), Gt = (n, t, e) => t.has(n) ? ge("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), ws = (n, t, e, s) => (mi(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), zh = (n, t, e) => (mi(n, t, "access private method"), e), fa, ma, ga, $a, ys, U, Ss, va, gi, fn, Es, He, $i;
|
|
2142
|
+
const Vh = "gem-reflect-start", wa = "gem-reflect-end", ur = (n) => new Comment(n), Dh = (n) => {
|
|
2199
2143
|
const t = [];
|
|
2200
|
-
let
|
|
2201
|
-
for (;
|
|
2202
|
-
|
|
2144
|
+
let e = n;
|
|
2145
|
+
for (; e && (t.push(e), e.nodeValue !== wa); )
|
|
2146
|
+
e = e.nextSibling;
|
|
2203
2147
|
return t;
|
|
2204
2148
|
};
|
|
2205
|
-
class
|
|
2149
|
+
class Gn extends (ys = B, $a = [D], ga = [F], ma = [Ds()], fa = [wt((t) => [t.target])], ys) {
|
|
2206
2150
|
constructor() {
|
|
2207
|
-
super(...arguments),
|
|
2151
|
+
super(...arguments), Gt(this, Ss), dr(this, "method", _t(U, 8, this)), _t(U, 11, this), dr(this, "target", _t(U, 12, this, document.head)), _t(U, 15, this), Gt(this, gi, _t(U, 16, this, () => {
|
|
2208
2152
|
this.hidden = !0, this.dataset.gemReflect = "";
|
|
2209
|
-
})), _t(
|
|
2210
|
-
const i = s[
|
|
2211
|
-
i ? i.after(t) : this.target[
|
|
2153
|
+
})), _t(U, 19, this), Gt(this, fn, ur(Vh)), Gt(this, Es, ur(wa)), Gt(this, He), Gt(this, $i, _t(U, 20, this, () => ((ft(this, He) || [ft(this, fn), ...this.childNodes, ft(this, Es)]).forEach((t, e, s) => {
|
|
2154
|
+
const i = s[e - 1];
|
|
2155
|
+
i ? i.after(t) : this.target[ft(this, Ss, va)](t);
|
|
2212
2156
|
}), () => {
|
|
2213
|
-
|
|
2214
|
-
}))), _t(
|
|
2157
|
+
ws(this, He, Dh(ft(this, fn))), ft(this, He).forEach((t) => t.remove());
|
|
2158
|
+
}))), _t(U, 23, this);
|
|
2215
2159
|
}
|
|
2216
2160
|
}
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2161
|
+
U = Ih(ys);
|
|
2162
|
+
Ss = /* @__PURE__ */ new WeakSet();
|
|
2163
|
+
va = function() {
|
|
2220
2164
|
return this.method || "append";
|
|
2221
2165
|
};
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
customElements.define("gem-reflect",
|
|
2233
|
-
var
|
|
2234
|
-
throw TypeError(
|
|
2235
|
-
},
|
|
2236
|
-
for (var i = 0, r =
|
|
2166
|
+
gi = /* @__PURE__ */ new WeakMap();
|
|
2167
|
+
fn = /* @__PURE__ */ new WeakMap();
|
|
2168
|
+
Es = /* @__PURE__ */ new WeakMap();
|
|
2169
|
+
He = /* @__PURE__ */ new WeakMap();
|
|
2170
|
+
$i = /* @__PURE__ */ new WeakMap();
|
|
2171
|
+
Dn(U, 5, "method", $a, Gn);
|
|
2172
|
+
Dn(U, 5, "target", ga, Gn);
|
|
2173
|
+
Dn(U, 21, "#init", ma, gi);
|
|
2174
|
+
Dn(U, 21, "#changeTarget", fa, $i);
|
|
2175
|
+
pa(U, Gn);
|
|
2176
|
+
customElements.define("gem-reflect", Gn);
|
|
2177
|
+
var Gh = Object.create, vi = Object.defineProperty, Uh = Object.getOwnPropertyDescriptor, ya = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), $e = (n) => {
|
|
2178
|
+
throw TypeError(n);
|
|
2179
|
+
}, Sa = (n, t, e) => t in n ? vi(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, _r = (n, t) => vi(n, "name", { value: t, configurable: !0 }), qh = (n) => [, , , Gh((n == null ? void 0 : n[ya("metadata")]) ?? null)], Ea = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], We = (n) => n !== void 0 && typeof n != "function" ? $e("Function expected") : n, Fh = (n, t, e, s, i) => ({ kind: Ea[n], name: t, metadata: s, addInitializer: (r) => e._ ? $e("Already initialized") : i.push(We(r || null)) }), Bh = (n, t) => Sa(t, ya("metadata"), n[3]), Se = (n, t, e, s) => {
|
|
2180
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
2237
2181
|
return s;
|
|
2238
|
-
},
|
|
2239
|
-
var c,
|
|
2240
|
-
return
|
|
2241
|
-
}, set [
|
|
2242
|
-
return
|
|
2243
|
-
} },
|
|
2244
|
-
o ?
|
|
2245
|
-
for (var
|
|
2246
|
-
|
|
2247
|
-
return o ||
|
|
2248
|
-
},
|
|
2249
|
-
const
|
|
2250
|
-
function
|
|
2251
|
-
var t,
|
|
2252
|
-
const
|
|
2253
|
-
i = [
|
|
2254
|
-
let
|
|
2182
|
+
}, Zn = (n, t, e, s, i, r) => {
|
|
2183
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = Ea[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && Uh(o < 4 ? i : { get [e]() {
|
|
2184
|
+
return pr(this, r);
|
|
2185
|
+
}, set [e](u) {
|
|
2186
|
+
return mr(this, r, u);
|
|
2187
|
+
} }, e));
|
|
2188
|
+
o ? h && o < 4 && _r(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : _r(i, e);
|
|
2189
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
2190
|
+
d = Fh(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => Kh(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? pr : jh)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => mr(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? We(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? $e("Object expected") : (We(a = c.get) && (p.get = a), We(a = c.set) && (p.set = a), We(a = c.init) && S.unshift(a));
|
|
2191
|
+
return o || Bh(n, i), p && vi(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
2192
|
+
}, ln = (n, t, e) => Sa(n, typeof t != "symbol" ? t + "" : t, e), wi = (n, t, e) => t.has(n) || $e("Cannot " + e), Kh = (n, t) => Object(t) !== t ? $e('Cannot use the "in" operator on this value') : n.has(t), pr = (n, t, e) => (wi(n, t, "read from private field"), e ? e.call(n) : t.get(n)), fr = (n, t, e) => t.has(n) ? $e("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), mr = (n, t, e, s) => (wi(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), jh = (n, t, e) => (wi(n, t, "access private method"), e);
|
|
2193
|
+
const dn = Symbol("open mark");
|
|
2194
|
+
function gl(n) {
|
|
2195
|
+
var t, e, s, i, r, a, c;
|
|
2196
|
+
const l = Symbol();
|
|
2197
|
+
i = [Vt(), zn({ role: "alertdialog", ariaModal: "true" })];
|
|
2198
|
+
let d = class Ca extends (s = B, e = [Qe()], t = [Qe()], s) {
|
|
2255
2199
|
constructor() {
|
|
2256
|
-
super(...arguments),
|
|
2200
|
+
super(...arguments), ln(this, "label", ""), fr(this, a, Se(r, 8, this, () => ut(x.store, this.update))), Se(r, 11, this), fr(this, c, Se(r, 12, this, () => ut(Ca.store, this.update))), Se(r, 15, this);
|
|
2257
2201
|
}
|
|
2258
2202
|
/**@final */
|
|
2259
2203
|
static get isOpen() {
|
|
2260
|
-
return this.store[
|
|
2204
|
+
return this.store[dn];
|
|
2261
2205
|
}
|
|
2262
2206
|
/**
|
|
2263
2207
|
* @final
|
|
2264
2208
|
* 自带 100ms 延迟,以允许在其他 Dialog 的 `shouldClose` 中调用此方法;
|
|
2265
2209
|
* 浏览器 history 为异步 API,需要设置较长延迟;
|
|
2266
2210
|
*/
|
|
2267
|
-
static open(
|
|
2268
|
-
const
|
|
2269
|
-
this.instance =
|
|
2270
|
-
const
|
|
2211
|
+
static open(m) {
|
|
2212
|
+
const h = new this();
|
|
2213
|
+
this.instance = h, this.inertStore = [...document.body.children].filter((v) => !v.inert), this.inertStore.forEach((v) => v.inert = !0), document.body.append(h);
|
|
2214
|
+
const g = () => this.store({ [dn]: !0, ...m });
|
|
2271
2215
|
return setTimeout(() => {
|
|
2272
|
-
|
|
2273
|
-
title:
|
|
2274
|
-
open:
|
|
2216
|
+
g(), x.push({
|
|
2217
|
+
title: h.label,
|
|
2218
|
+
open: g,
|
|
2275
2219
|
close: this.closeHandle.bind(this),
|
|
2276
2220
|
shouldClose: this.shouldClose.bind(this)
|
|
2277
2221
|
});
|
|
2278
|
-
}, 100),
|
|
2222
|
+
}, 100), l;
|
|
2279
2223
|
}
|
|
2280
2224
|
/**
|
|
2281
2225
|
* @final
|
|
2282
2226
|
* UI 中执行关闭
|
|
2283
2227
|
*/
|
|
2284
2228
|
static close() {
|
|
2285
|
-
return
|
|
2229
|
+
return x.back(), l;
|
|
2286
2230
|
}
|
|
2287
2231
|
/**
|
|
2288
2232
|
* @final
|
|
2289
2233
|
* history 中自动调用
|
|
2290
2234
|
*/
|
|
2291
2235
|
static closeHandle() {
|
|
2292
|
-
var
|
|
2293
|
-
return this.inertStore.forEach((
|
|
2236
|
+
var m;
|
|
2237
|
+
return this.inertStore.forEach((h) => h.inert = !1), (m = this.instance) == null || m.remove(), this.store({ [dn]: !1, ...n }), l;
|
|
2294
2238
|
}
|
|
2295
2239
|
/**
|
|
2296
2240
|
* 由于要操作浏览器历史记录,所以没有设计为 Promise;
|
|
@@ -2299,124 +2243,124 @@ function Ul(e) {
|
|
|
2299
2243
|
return !0;
|
|
2300
2244
|
}
|
|
2301
2245
|
};
|
|
2302
|
-
return r =
|
|
2303
|
-
[
|
|
2304
|
-
...
|
|
2305
|
-
})),
|
|
2306
|
-
}
|
|
2307
|
-
var
|
|
2308
|
-
throw TypeError(
|
|
2309
|
-
},
|
|
2310
|
-
for (var i = 0, r =
|
|
2246
|
+
return r = qh(s), a = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), Zn(r, 21, "#connectHistory", e, a), Zn(r, 21, "#connectStore", t, c), d = Zn(r, 0, "ModalElement", i, d), ln(d, "inertStore", []), ln(d, "instance", null), ln(d, "store", zt({
|
|
2247
|
+
[dn]: !1,
|
|
2248
|
+
...n
|
|
2249
|
+
})), Se(r, 1, d), d;
|
|
2250
|
+
}
|
|
2251
|
+
var Jh = Object.create, yi = Object.defineProperty, Qh = Object.getOwnPropertyDescriptor, ba = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), ve = (n) => {
|
|
2252
|
+
throw TypeError(n);
|
|
2253
|
+
}, Pa = (n, t, e) => t in n ? yi(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, gr = (n, t) => yi(n, "name", { value: t, configurable: !0 }), Yh = (n) => [, , , Jh((n == null ? void 0 : n[ba("metadata")]) ?? null)], Ta = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], ze = (n) => n !== void 0 && typeof n != "function" ? ve("Function expected") : n, Zh = (n, t, e, s, i) => ({ kind: Ta[n], name: t, metadata: s, addInitializer: (r) => e._ ? ve("Already initialized") : i.push(ze(r || null)) }), Xh = (n, t) => Pa(t, ba("metadata"), n[3]), Ot = (n, t, e, s) => {
|
|
2254
|
+
for (var i = 0, r = n[t >> 1], a = r && r.length; i < a; i++) t & 1 ? r[i].call(e) : s = r[i].call(e, s);
|
|
2311
2255
|
return s;
|
|
2312
|
-
},
|
|
2313
|
-
var c,
|
|
2314
|
-
return
|
|
2315
|
-
}, set [
|
|
2316
|
-
return
|
|
2317
|
-
} },
|
|
2318
|
-
o ?
|
|
2319
|
-
for (var
|
|
2320
|
-
|
|
2321
|
-
return o ||
|
|
2322
|
-
},
|
|
2323
|
-
const
|
|
2324
|
-
|
|
2325
|
-
class
|
|
2256
|
+
}, Un = (n, t, e, s, i, r) => {
|
|
2257
|
+
var a, c, l, d, f, o = t & 7, m = !!(t & 8), h = !!(t & 16), g = o > 3 ? n.length + 1 : o ? m ? 1 : 2 : 0, v = Ta[o + 5], S = o > 3 && (n[g - 1] = []), T = n[g] || (n[g] = []), p = o && (!h && !m && (i = i.prototype), o < 5 && (o > 3 || !h) && Qh(o < 4 ? i : { get [e]() {
|
|
2258
|
+
return st(this, r);
|
|
2259
|
+
}, set [e](u) {
|
|
2260
|
+
return Fe(this, r, u);
|
|
2261
|
+
} }, e));
|
|
2262
|
+
o ? h && o < 4 && gr(r, (o > 2 ? "set " : o > 1 ? "get " : "") + e) : gr(i, e);
|
|
2263
|
+
for (var b = s.length - 1; b >= 0; b--)
|
|
2264
|
+
d = Zh(o, e, l = {}, n[3], T), o && (d.static = m, d.private = h, f = d.access = { has: h ? (u) => tl(i, u) : (u) => e in u }, o ^ 3 && (f.get = h ? (u) => (o ^ 1 ? st : el)(u, i, o ^ 4 ? r : p.get) : (u) => u[e]), o > 2 && (f.set = h ? (u, k) => Fe(u, i, k, o ^ 4 ? r : p.set) : (u, k) => u[e] = k)), c = (0, s[b])(o ? o < 4 ? h ? r : p[v] : o > 4 ? void 0 : { get: p.get, set: p.set } : i, d), l._ = 1, o ^ 4 || c === void 0 ? ze(c) && (o > 4 ? S.unshift(c) : o ? h ? r = c : p[v] = c : i = c) : typeof c != "object" || c === null ? ve("Object expected") : (ze(a = c.get) && (p.get = a), ze(a = c.set) && (p.set = a), ze(a = c.init) && S.unshift(a));
|
|
2265
|
+
return o || Xh(n, i), p && yi(i, e, p), h ? o ^ 4 ? r : p : i;
|
|
2266
|
+
}, Ee = (n, t, e) => Pa(n, typeof t != "symbol" ? t + "" : t, e), Si = (n, t, e) => t.has(n) || ve("Cannot " + e), tl = (n, t) => Object(t) !== t ? ve('Cannot use the "in" operator on this value') : n.has(t), st = (n, t, e) => (Si(n, t, "read from private field"), e ? e.call(n) : t.get(n)), Ut = (n, t, e) => t.has(n) ? ve("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), Fe = (n, t, e, s) => (Si(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), el = (n, t, e) => (Si(n, t, "access private method"), e), ka, Oa, Ma, Cs, xa, tt, Ve, De, Ge, bs, mn, Ei;
|
|
2267
|
+
const Xn = Symbol();
|
|
2268
|
+
xa = [Wn(x.store), zn({ role: "dialog", ariaModal: "true" })];
|
|
2269
|
+
class Ze extends (Cs = B, Ma = [D], Oa = [In], ka = [Ds()], Cs) {
|
|
2326
2270
|
constructor() {
|
|
2327
|
-
super(...arguments),
|
|
2271
|
+
super(...arguments), Ee(this, "label", Ot(tt, 8, this)), Ot(tt, 11, this), Ee(this, "opened", Ot(tt, 12, this)), Ot(tt, 15, this), Ut(this, Ve), Ut(this, De), Ut(this, Ge, []), Ut(this, bs, () => {
|
|
2328
2272
|
var t;
|
|
2329
|
-
this.inert = !0,
|
|
2330
|
-
}),
|
|
2331
|
-
this.hidden = !1, this.inert = !1,
|
|
2332
|
-
}),
|
|
2273
|
+
this.inert = !0, st(this, Ge).forEach((e) => e.inert = !1), st(this, Ve) ? st(this, Ve).before(this) : st(this, De) && ((t = st(this, De)) == null || t.appendChild(this)), this.dispatchEvent(new CustomEvent("close")), this.opened = !1;
|
|
2274
|
+
}), Ut(this, mn, () => {
|
|
2275
|
+
this.hidden = !1, this.inert = !1, Fe(this, Ve, this.nextSibling), Fe(this, De, this.parentElement || this.getRootNode()), Fe(this, Ge, [...document.body.children].filter((t) => !t.inert)), st(this, Ge).forEach((t) => t.inert = !0), document.body.append(this), this.dispatchEvent(new CustomEvent("open")), this.opened = !0;
|
|
2276
|
+
}), Ut(this, Ei, Ot(tt, 16, this, () => this.inert = !0)), Ot(tt, 19, this), Ee(this, "open", () => {
|
|
2333
2277
|
if (!this.opened)
|
|
2334
|
-
return
|
|
2278
|
+
return st(this, mn).call(this), x.push({
|
|
2335
2279
|
title: this.label,
|
|
2336
|
-
open:
|
|
2337
|
-
close:
|
|
2280
|
+
open: st(this, mn),
|
|
2281
|
+
close: st(this, bs),
|
|
2338
2282
|
shouldClose: this.shouldClose
|
|
2339
|
-
}),
|
|
2340
|
-
}),
|
|
2283
|
+
}), Xn;
|
|
2284
|
+
}), Ee(this, "close", () => (x.back(), Xn)), Ee(this, "forceClose", () => (this.opened = !1, setTimeout(this.close, 100), Xn));
|
|
2341
2285
|
}
|
|
2342
2286
|
shouldClose() {
|
|
2343
2287
|
return !0;
|
|
2344
2288
|
}
|
|
2345
2289
|
}
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
class
|
|
2290
|
+
tt = Yh(Cs);
|
|
2291
|
+
Ve = /* @__PURE__ */ new WeakMap();
|
|
2292
|
+
De = /* @__PURE__ */ new WeakMap();
|
|
2293
|
+
Ge = /* @__PURE__ */ new WeakMap();
|
|
2294
|
+
bs = /* @__PURE__ */ new WeakMap();
|
|
2295
|
+
mn = /* @__PURE__ */ new WeakMap();
|
|
2296
|
+
Ei = /* @__PURE__ */ new WeakMap();
|
|
2297
|
+
Un(tt, 5, "label", Ma, Ze);
|
|
2298
|
+
Un(tt, 5, "opened", Oa, Ze);
|
|
2299
|
+
Un(tt, 21, "#init", ka, Ei);
|
|
2300
|
+
Ze = Un(tt, 0, "GemDialogBaseElement", xa, Ze);
|
|
2301
|
+
Ot(tt, 1, Ze);
|
|
2302
|
+
class nl {
|
|
2359
2303
|
constructor(t) {
|
|
2360
|
-
|
|
2361
|
-
|
|
2304
|
+
$(this, "_type");
|
|
2305
|
+
$(this, "info", (...t) => {
|
|
2362
2306
|
console.log(`[${this._type}]:`, ...t);
|
|
2363
2307
|
});
|
|
2364
|
-
|
|
2308
|
+
$(this, "warn", (...t) => {
|
|
2365
2309
|
console.warn(`[${this._type}]:`, ...t);
|
|
2366
2310
|
});
|
|
2367
|
-
|
|
2311
|
+
$(this, "error", (...t) => {
|
|
2368
2312
|
console.error(`[${this._type}]:`, ...t);
|
|
2369
2313
|
});
|
|
2370
2314
|
this._type = t;
|
|
2371
2315
|
}
|
|
2372
2316
|
}
|
|
2373
|
-
const
|
|
2374
|
-
function
|
|
2375
|
-
const
|
|
2317
|
+
const sl = new nl("GEM"), il = /\$\d(?:<[^>]*>)?/, rl = /\$(\d)(<([^>]*)>)?/g, ol = 3;
|
|
2318
|
+
function al(n, ...t) {
|
|
2319
|
+
const e = n.split(il), s = [];
|
|
2376
2320
|
let i;
|
|
2377
|
-
for (; i =
|
|
2378
|
-
const r = i[
|
|
2379
|
-
s.push(typeof
|
|
2321
|
+
for (; i = rl.exec(n); ) {
|
|
2322
|
+
const r = i[ol], a = Number(i[1]) - 1, c = t[a];
|
|
2323
|
+
s.push(typeof c == "function" ? c(r) : c);
|
|
2380
2324
|
}
|
|
2381
|
-
return
|
|
2325
|
+
return ht(e, ...s);
|
|
2382
2326
|
}
|
|
2383
|
-
const
|
|
2384
|
-
var L,
|
|
2385
|
-
const
|
|
2327
|
+
const Ce = /* @__PURE__ */ new Set();
|
|
2328
|
+
var L, gn, Aa, La, Ue, $n, rn;
|
|
2329
|
+
const Ci = class Ci {
|
|
2386
2330
|
constructor(t) {
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2331
|
+
E(this, L);
|
|
2332
|
+
$(this, "resources");
|
|
2333
|
+
$(this, "fallbackLanguage");
|
|
2334
|
+
$(this, "currentLanguage");
|
|
2335
|
+
$(this, "cache");
|
|
2336
|
+
$(this, "cachePrefix", "gem-i18n");
|
|
2337
|
+
$(this, "urlParamsType");
|
|
2338
|
+
$(this, "urlParamsName");
|
|
2339
|
+
$(this, "onChange");
|
|
2396
2340
|
// 兼容 `<gem-route>`
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2341
|
+
$(this, "replace", ({ path: t }) => this.setLanguage(t));
|
|
2342
|
+
$(this, "getParams", () => ({ path: this.currentLanguage }));
|
|
2343
|
+
E(this, rn, !0);
|
|
2400
2344
|
if (!t.resources[t.fallbackLanguage])
|
|
2401
|
-
throw new
|
|
2345
|
+
throw new vt("i18n: fallbackLanguage invalid");
|
|
2402
2346
|
Object.assign(this, t);
|
|
2403
|
-
let
|
|
2347
|
+
let e = _(this, L, Aa) || this.currentLanguage || _(this, L, La);
|
|
2404
2348
|
const s = document.querySelector(`[type*=${this.cachePrefix}]`);
|
|
2405
2349
|
if (s)
|
|
2406
2350
|
try {
|
|
2407
2351
|
const i = JSON.parse(s.textContent || "");
|
|
2408
|
-
|
|
2352
|
+
e = i.currentLanguage, this.resources[i.currentLanguage] = i.currentLanguagePack;
|
|
2409
2353
|
} catch {
|
|
2410
2354
|
}
|
|
2411
|
-
|
|
2355
|
+
e ? (O(this, L, e, $n), this.setLanguage(e)) : this.resetLanguage(), O(this, rn, !1);
|
|
2412
2356
|
}
|
|
2413
|
-
get(t, ...
|
|
2414
|
-
const s = this.resources[this.currentLanguage], i = this.resources[this.fallbackLanguage], r = s[t] || i[t],
|
|
2415
|
-
return
|
|
2357
|
+
get(t, ...e) {
|
|
2358
|
+
const s = this.resources[this.currentLanguage], i = this.resources[this.fallbackLanguage], r = s[t] || i[t], a = (r == null ? void 0 : r.message) || r || `[${t}]`;
|
|
2359
|
+
return e.length ? al(a, ...e) : a;
|
|
2416
2360
|
}
|
|
2417
2361
|
detectLanguage() {
|
|
2418
|
-
const t = Object.keys(this.resources),
|
|
2419
|
-
for (const s of
|
|
2362
|
+
const t = Object.keys(this.resources), e = navigator.languages.map((s) => s.replace(/-(.*)/, (i) => i.toUpperCase()));
|
|
2363
|
+
for (const s of e) {
|
|
2420
2364
|
const i = t.find((r) => r === s || s.startsWith(`${r}-`));
|
|
2421
2365
|
if (i) return i;
|
|
2422
2366
|
}
|
|
@@ -2424,58 +2368,58 @@ const _i = class _i {
|
|
|
2424
2368
|
}
|
|
2425
2369
|
async setLanguage(t) {
|
|
2426
2370
|
var i, r;
|
|
2427
|
-
|
|
2428
|
-
let
|
|
2371
|
+
_(this, L, Ue) && Ce.forEach(async (a) => await a.setLanguage(t));
|
|
2372
|
+
let e;
|
|
2429
2373
|
const s = this.resources[t];
|
|
2430
2374
|
if (!s)
|
|
2431
|
-
return
|
|
2375
|
+
return sl.warn(`${this.cachePrefix}: not found \`${t}\``), this.resetLanguage();
|
|
2432
2376
|
if (typeof s == "string") {
|
|
2433
|
-
const
|
|
2434
|
-
const
|
|
2377
|
+
const a = `${this.cachePrefix}:`, c = `${a}${s}`, l = localStorage.getItem(c), d = async () => {
|
|
2378
|
+
const f = await (await fetch(s)).json();
|
|
2435
2379
|
if (this.cache) {
|
|
2436
2380
|
for (let o = 0; o < localStorage.length; o++) {
|
|
2437
|
-
const
|
|
2438
|
-
|
|
2381
|
+
const m = localStorage.key(o);
|
|
2382
|
+
m.startsWith(a) && localStorage.removeItem(m);
|
|
2439
2383
|
}
|
|
2440
|
-
localStorage.setItem(
|
|
2384
|
+
localStorage.setItem(c, JSON.stringify(f));
|
|
2441
2385
|
}
|
|
2442
|
-
return
|
|
2386
|
+
return f;
|
|
2443
2387
|
};
|
|
2444
|
-
if (
|
|
2388
|
+
if (l)
|
|
2445
2389
|
try {
|
|
2446
|
-
|
|
2390
|
+
e = JSON.parse(l);
|
|
2447
2391
|
} catch {
|
|
2448
|
-
|
|
2392
|
+
e = await d();
|
|
2449
2393
|
}
|
|
2450
2394
|
else
|
|
2451
|
-
|
|
2395
|
+
e = await d();
|
|
2452
2396
|
} else
|
|
2453
|
-
|
|
2454
|
-
if (this.resources[t] =
|
|
2455
|
-
const
|
|
2456
|
-
for (;
|
|
2457
|
-
const
|
|
2458
|
-
(i =
|
|
2397
|
+
e = s;
|
|
2398
|
+
if (this.resources[t] = e, !_(this, rn)) {
|
|
2399
|
+
const a = [document.documentElement];
|
|
2400
|
+
for (; a.length; ) {
|
|
2401
|
+
const c = a.pop();
|
|
2402
|
+
(i = c[xn]) == null || i.call(c), a.push(...[...c.children, ...((r = c.shadowRoot) == null ? void 0 : r.children) || []].reverse());
|
|
2459
2403
|
}
|
|
2460
2404
|
}
|
|
2461
|
-
return t !== this.currentLanguage &&
|
|
2405
|
+
return t !== this.currentLanguage && O(this, L, t, $n), this.cache === !0 && this.setCache(), t;
|
|
2462
2406
|
}
|
|
2463
2407
|
resetLanguage() {
|
|
2464
|
-
return
|
|
2408
|
+
return _(this, L, Ue) && Ce.forEach((t) => t.resetLanguage()), O(this, L, this.fallbackLanguage, $n), this.cache && localStorage.removeItem(_(this, L, gn)), this.setLanguage(this.detectLanguage());
|
|
2465
2409
|
}
|
|
2466
2410
|
// 一般用在 `onChange` 中
|
|
2467
2411
|
setCache() {
|
|
2468
|
-
|
|
2412
|
+
_(this, L, Ue) && Ce.forEach((t) => t.setCache()), localStorage.setItem(_(this, L, gn), this.currentLanguage);
|
|
2469
2413
|
}
|
|
2470
|
-
createSubModule(t,
|
|
2471
|
-
const s = new
|
|
2472
|
-
resources:
|
|
2414
|
+
createSubModule(t, e) {
|
|
2415
|
+
const s = new Ci({
|
|
2416
|
+
resources: e,
|
|
2473
2417
|
cachePrefix: `${this.cachePrefix}-${t}`,
|
|
2474
2418
|
currentLanguage: this.currentLanguage,
|
|
2475
2419
|
fallbackLanguage: this.fallbackLanguage,
|
|
2476
2420
|
cache: this.cache
|
|
2477
2421
|
});
|
|
2478
|
-
return
|
|
2422
|
+
return Ce.add(s), s;
|
|
2479
2423
|
}
|
|
2480
2424
|
/**
|
|
2481
2425
|
* @example
|
|
@@ -2493,31 +2437,31 @@ const _i = class _i {
|
|
|
2493
2437
|
};
|
|
2494
2438
|
}
|
|
2495
2439
|
};
|
|
2496
|
-
L = new WeakSet(),
|
|
2440
|
+
L = new WeakSet(), gn = function() {
|
|
2497
2441
|
return `${this.cachePrefix}:current`;
|
|
2498
|
-
},
|
|
2499
|
-
const { hostname: t, pathname:
|
|
2442
|
+
}, Aa = function() {
|
|
2443
|
+
const { hostname: t, pathname: e, search: s } = location, i = t.split(".");
|
|
2500
2444
|
switch (this.urlParamsType) {
|
|
2501
2445
|
case "ccTLD":
|
|
2502
2446
|
return i.pop();
|
|
2503
2447
|
case "gTLD":
|
|
2504
2448
|
return i.shift();
|
|
2505
2449
|
case "path":
|
|
2506
|
-
return
|
|
2450
|
+
return e.split("/")[1];
|
|
2507
2451
|
default:
|
|
2508
2452
|
const r = this.urlParamsName && new URLSearchParams(s).get(this.urlParamsName) || "";
|
|
2509
2453
|
return r in this.resources ? r : "";
|
|
2510
2454
|
}
|
|
2511
|
-
},
|
|
2512
|
-
return this.cache && localStorage.getItem(
|
|
2513
|
-
},
|
|
2514
|
-
return !
|
|
2515
|
-
},
|
|
2516
|
-
var
|
|
2517
|
-
|
|
2518
|
-
},
|
|
2519
|
-
let
|
|
2520
|
-
const K = (
|
|
2455
|
+
}, La = function() {
|
|
2456
|
+
return this.cache && localStorage.getItem(_(this, L, gn)) || "";
|
|
2457
|
+
}, Ue = function() {
|
|
2458
|
+
return !Ce.has(this);
|
|
2459
|
+
}, $n = function(t) {
|
|
2460
|
+
var e;
|
|
2461
|
+
_(this, L, Ue) && (document.documentElement.lang = t), this.currentLanguage = t, (e = this.onChange) == null || e.call(this, t);
|
|
2462
|
+
}, rn = new WeakMap();
|
|
2463
|
+
let $r = Ci;
|
|
2464
|
+
const K = (n) => window.matchMedia(n).matches, $l = {
|
|
2521
2465
|
PRINT: "print",
|
|
2522
2466
|
get isPrint() {
|
|
2523
2467
|
return K(this.PRINT);
|
|
@@ -2577,227 +2521,224 @@ const K = (e) => window.matchMedia(e).matches, Bl = {
|
|
|
2577
2521
|
get isWidthScreen() {
|
|
2578
2522
|
return K(this.WIDTHSCREEN);
|
|
2579
2523
|
}
|
|
2580
|
-
},
|
|
2581
|
-
function
|
|
2524
|
+
}, cl = Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array())).constructor;
|
|
2525
|
+
function hl(n = {}) {
|
|
2582
2526
|
const {
|
|
2583
2527
|
origin: t = location.origin,
|
|
2584
|
-
base:
|
|
2528
|
+
base: e = "",
|
|
2585
2529
|
appendHeaders: s = () => ({}),
|
|
2586
2530
|
transformInput: i = (o) => o,
|
|
2587
2531
|
transformOutput: r = (o) => o,
|
|
2588
|
-
...
|
|
2589
|
-
} =
|
|
2532
|
+
...a
|
|
2533
|
+
} = n, c = (o) => o instanceof FormData || o instanceof Blob || o instanceof cl || o instanceof URLSearchParams || o instanceof ReadableStream || o instanceof ArrayBuffer ? o : typeof o == "object" ? JSON.stringify(o) : o, l = (o, m) => {
|
|
2590
2534
|
if (new URL(o, location.origin).pathname !== o)
|
|
2591
|
-
throw new
|
|
2592
|
-
const
|
|
2593
|
-
return `${t}${
|
|
2594
|
-
},
|
|
2535
|
+
throw new vt("`path` format is incorrect");
|
|
2536
|
+
const h = new URLSearchParams(m).toString();
|
|
2537
|
+
return `${t}${e}${o}${h ? "?" : ""}${h}`;
|
|
2538
|
+
}, d = (o) => {
|
|
2595
2539
|
if (!o) return {};
|
|
2596
2540
|
if (o instanceof Headers) return Object.fromEntries(o);
|
|
2597
|
-
const
|
|
2598
|
-
return Object.fromEntries(
|
|
2599
|
-
},
|
|
2600
|
-
const
|
|
2601
|
-
...
|
|
2602
|
-
...
|
|
2541
|
+
const m = Array.isArray(o) ? o : Object.entries(o);
|
|
2542
|
+
return Object.fromEntries(m.map(([h, g]) => [h.toLowerCase(), g]));
|
|
2543
|
+
}, f = async (o, m = {}) => {
|
|
2544
|
+
const h = new Request(o, {
|
|
2545
|
+
...a,
|
|
2546
|
+
...m,
|
|
2603
2547
|
headers: new Headers({
|
|
2604
2548
|
"content-type": "application/json",
|
|
2605
|
-
...
|
|
2606
|
-
...
|
|
2549
|
+
...d(a.headers),
|
|
2550
|
+
...d(m.headers)
|
|
2607
2551
|
})
|
|
2608
|
-
}),
|
|
2609
|
-
if (
|
|
2610
|
-
if (
|
|
2611
|
-
const v =
|
|
2552
|
+
}), g = await fetch(h);
|
|
2553
|
+
if (g.status === 0) throw new Error("Request fail");
|
|
2554
|
+
if (g.status >= 500) throw new Error(g.statusText);
|
|
2555
|
+
const v = h.headers.get("content-type"), S = g.status >= 400;
|
|
2612
2556
|
try {
|
|
2613
|
-
let
|
|
2614
|
-
if (v.includes("json") ?
|
|
2615
|
-
return r(
|
|
2557
|
+
let T;
|
|
2558
|
+
if (v.includes("json") ? T = await g.json() : v.includes("octet-stream") ? T = await g.arrayBuffer() : T = await g.text(), S) throw new Error(g.statusText, { cause: T });
|
|
2559
|
+
return r(T, h);
|
|
2616
2560
|
} catch {
|
|
2617
2561
|
throw new Error("Parse error");
|
|
2618
2562
|
}
|
|
2619
2563
|
};
|
|
2620
2564
|
return {
|
|
2621
|
-
request:
|
|
2622
|
-
get(o,
|
|
2623
|
-
const
|
|
2624
|
-
return
|
|
2565
|
+
request: f,
|
|
2566
|
+
get(o, m) {
|
|
2567
|
+
const h = i(m);
|
|
2568
|
+
return f(l(o, h), {
|
|
2625
2569
|
method: "GET",
|
|
2626
|
-
headers: s(
|
|
2570
|
+
headers: s(h)
|
|
2627
2571
|
});
|
|
2628
2572
|
},
|
|
2629
|
-
del(o,
|
|
2630
|
-
const
|
|
2631
|
-
return
|
|
2573
|
+
del(o, m) {
|
|
2574
|
+
const h = i(m);
|
|
2575
|
+
return f(l(o, h), {
|
|
2632
2576
|
method: "DELETE",
|
|
2633
|
-
headers: s(
|
|
2577
|
+
headers: s(h)
|
|
2634
2578
|
});
|
|
2635
2579
|
},
|
|
2636
|
-
put(o,
|
|
2637
|
-
const
|
|
2638
|
-
return
|
|
2580
|
+
put(o, m) {
|
|
2581
|
+
const h = i(m);
|
|
2582
|
+
return f(l(o), {
|
|
2639
2583
|
method: "PUT",
|
|
2640
|
-
headers: s(
|
|
2641
|
-
body:
|
|
2584
|
+
headers: s(h),
|
|
2585
|
+
body: c(h)
|
|
2642
2586
|
});
|
|
2643
2587
|
},
|
|
2644
|
-
post(o,
|
|
2645
|
-
const
|
|
2646
|
-
return
|
|
2588
|
+
post(o, m) {
|
|
2589
|
+
const h = i(m);
|
|
2590
|
+
return f(l(o), {
|
|
2647
2591
|
method: "POST",
|
|
2648
|
-
headers: s(
|
|
2649
|
-
body:
|
|
2592
|
+
headers: s(h),
|
|
2593
|
+
body: c(h)
|
|
2650
2594
|
});
|
|
2651
2595
|
}
|
|
2652
2596
|
};
|
|
2653
2597
|
}
|
|
2654
|
-
const { request:
|
|
2655
|
-
function
|
|
2656
|
-
return
|
|
2598
|
+
const { request: vl, del: wl, get: yl, post: Sl, put: El } = hl(), Na = /* @__PURE__ */ new WeakMap(), Ra = /* @__PURE__ */ new WeakMap();
|
|
2599
|
+
function Cl(n) {
|
|
2600
|
+
return Na.get(n);
|
|
2657
2601
|
}
|
|
2658
|
-
function
|
|
2659
|
-
return
|
|
2602
|
+
function Ia(n) {
|
|
2603
|
+
return Ra.get(n);
|
|
2660
2604
|
}
|
|
2661
|
-
function
|
|
2662
|
-
const
|
|
2663
|
-
|
|
2605
|
+
function En(n, t = {}) {
|
|
2606
|
+
const e = Ls(), s = an({})[Wt], i = zt(n), r = new Proxy(
|
|
2607
|
+
Mn({ [Wt]: s }, (c) => i(c)),
|
|
2664
2608
|
{
|
|
2665
|
-
get(
|
|
2666
|
-
if (!
|
|
2667
|
-
const [
|
|
2668
|
-
|
|
2609
|
+
get(c, l) {
|
|
2610
|
+
if (!c[l]) {
|
|
2611
|
+
const [d, f, o] = l.match(/^(\w*Color)(\d+)$/) || [];
|
|
2612
|
+
f && (c[l] = `oklch(from ${c[f]} calc(l - ${(Number(o) - 400) / 1e3}) c h)`);
|
|
2669
2613
|
}
|
|
2670
|
-
return
|
|
2614
|
+
return c[l];
|
|
2671
2615
|
}
|
|
2672
2616
|
}
|
|
2673
2617
|
);
|
|
2674
|
-
|
|
2675
|
-
const
|
|
2676
|
-
let
|
|
2677
|
-
Object.keys(i).forEach((
|
|
2678
|
-
t[
|
|
2679
|
-
}), s.setContent(`:scope,:host{${
|
|
2618
|
+
Ra.set(r, t), Na.set(r, i);
|
|
2619
|
+
const a = () => {
|
|
2620
|
+
let c = "";
|
|
2621
|
+
Object.keys(i).forEach((l) => {
|
|
2622
|
+
t[l] || (t[l] = `--${ce(l)}-${e}`, r[l] = `var(${t[l]})`), c += `${t[l]}:${i[l]};`;
|
|
2623
|
+
}), s.setContent(`:scope,:host{${c}}`);
|
|
2680
2624
|
};
|
|
2681
|
-
return
|
|
2682
|
-
|
|
2625
|
+
return a(), ut(i, () => {
|
|
2626
|
+
a(), s.updateStyle();
|
|
2683
2627
|
}), r;
|
|
2684
2628
|
}
|
|
2685
|
-
function
|
|
2686
|
-
return
|
|
2629
|
+
function ll(n) {
|
|
2630
|
+
return En(n);
|
|
2687
2631
|
}
|
|
2688
|
-
function
|
|
2689
|
-
const t =
|
|
2690
|
-
return document.adoptedStyleSheets.push(t[
|
|
2632
|
+
function bl(n) {
|
|
2633
|
+
const t = ll(n);
|
|
2634
|
+
return document.adoptedStyleSheets.push(t[Wt].getStyle()), t;
|
|
2691
2635
|
}
|
|
2692
|
-
function
|
|
2693
|
-
return
|
|
2636
|
+
function Pl(n, t) {
|
|
2637
|
+
return En(t, Ia(n));
|
|
2694
2638
|
}
|
|
2695
|
-
function
|
|
2696
|
-
const t =
|
|
2697
|
-
return
|
|
2698
|
-
|
|
2699
|
-
const
|
|
2700
|
-
this.internals.sheets.push(
|
|
2639
|
+
function Tl(n) {
|
|
2640
|
+
const t = En(n), e = Ia(t);
|
|
2641
|
+
return Mn(t, (i) => (r, { addInitializer: a, access: c }) => {
|
|
2642
|
+
a(function() {
|
|
2643
|
+
const l = En({ ...n }, e);
|
|
2644
|
+
this.internals.sheets.push(l[Wt].getStyle(this)), this.memo(() => l(c.get(this).apply(this)), i && (() => i(this)));
|
|
2701
2645
|
});
|
|
2702
2646
|
});
|
|
2703
2647
|
}
|
|
2704
2648
|
export {
|
|
2705
|
-
|
|
2706
|
-
|
|
2649
|
+
oe as GemActiveLinkElement,
|
|
2650
|
+
Ze as GemDialogBaseElement,
|
|
2707
2651
|
B as GemElement,
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
eh as
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
lc as unmounted,
|
|
2801
|
-
sc as version,
|
|
2802
|
-
As as willMount
|
|
2652
|
+
vt as GemError,
|
|
2653
|
+
I as GemLightRouteElement,
|
|
2654
|
+
W as GemLinkElement,
|
|
2655
|
+
Gn as GemReflectElement,
|
|
2656
|
+
Ye as GemRouteElement,
|
|
2657
|
+
Le as GemTitleElement,
|
|
2658
|
+
ae as GemUnsafeElement,
|
|
2659
|
+
Et as GemUseElement,
|
|
2660
|
+
$r as I18n,
|
|
2661
|
+
uc as LinkedList,
|
|
2662
|
+
nl as Logger,
|
|
2663
|
+
_c as PropProxyMap,
|
|
2664
|
+
je as QueryString,
|
|
2665
|
+
Wt as SheetToken,
|
|
2666
|
+
ks as TemplateResult,
|
|
2667
|
+
xn as UpdateToken,
|
|
2668
|
+
Is as _RenderErrorEvent,
|
|
2669
|
+
wn as _StoreListenerMap,
|
|
2670
|
+
Ws as _createTemplate,
|
|
2671
|
+
Er as absoluteLocation,
|
|
2672
|
+
Cr as addListener,
|
|
2673
|
+
xt as addMicrotask,
|
|
2674
|
+
Hn as adoptedStyle,
|
|
2675
|
+
zn as aria,
|
|
2676
|
+
Gc as async,
|
|
2677
|
+
D as attribute,
|
|
2678
|
+
Kc as basePathStore,
|
|
2679
|
+
Rn as boolattribute,
|
|
2680
|
+
ce as camelToKebabCase,
|
|
2681
|
+
fc as classMap,
|
|
2682
|
+
Ns as cleanObject,
|
|
2683
|
+
ut as connect,
|
|
2684
|
+
Wn as connectStore,
|
|
2685
|
+
Tl as createDecoratorTheme,
|
|
2686
|
+
eh as createHistoryParams,
|
|
2687
|
+
gl as createModalClass,
|
|
2688
|
+
Pl as createOverrideTheme,
|
|
2689
|
+
Ys as createPath,
|
|
2690
|
+
ac as createRef,
|
|
2691
|
+
ll as createScopedTheme,
|
|
2692
|
+
Hs as createState,
|
|
2693
|
+
zt as createStore,
|
|
2694
|
+
bl as createTheme,
|
|
2695
|
+
Mn as createUpdater,
|
|
2696
|
+
an as css,
|
|
2697
|
+
Uc as customElement,
|
|
2698
|
+
wl as del,
|
|
2699
|
+
Pr as directive,
|
|
2700
|
+
wt as effect,
|
|
2701
|
+
be as emitter,
|
|
2702
|
+
ml as exportPartsMap,
|
|
2703
|
+
Wc as fallback,
|
|
2704
|
+
yl as get,
|
|
2705
|
+
Ia as getThemeProps,
|
|
2706
|
+
Cl as getThemeStore,
|
|
2707
|
+
Dc as globalemitter,
|
|
2708
|
+
x as history,
|
|
2709
|
+
ht as html,
|
|
2710
|
+
hl as initRequest,
|
|
2711
|
+
pc as isArrayChange,
|
|
2712
|
+
_l as kebabToCamelCase,
|
|
2713
|
+
Wr as light,
|
|
2714
|
+
sl as logger,
|
|
2715
|
+
_o as matchPath,
|
|
2716
|
+
Xa as mathml,
|
|
2717
|
+
$l as mediaQuery,
|
|
2718
|
+
Nr as memo,
|
|
2719
|
+
Qe as mounted,
|
|
2720
|
+
Ic as numattribute,
|
|
2721
|
+
Rs as objectMapToString,
|
|
2722
|
+
Ir as part,
|
|
2723
|
+
fl as partMap,
|
|
2724
|
+
Sl as post,
|
|
2725
|
+
F as property,
|
|
2726
|
+
El as put,
|
|
2727
|
+
Ls as randomStr,
|
|
2728
|
+
br as raw,
|
|
2729
|
+
As as render,
|
|
2730
|
+
Ec as repeat,
|
|
2731
|
+
vl as request,
|
|
2732
|
+
Vt as shadow,
|
|
2733
|
+
Vc as slot,
|
|
2734
|
+
al as splice,
|
|
2735
|
+
In as state,
|
|
2736
|
+
pl as styleMap,
|
|
2737
|
+
ul as styled,
|
|
2738
|
+
Za as svg,
|
|
2739
|
+
le as template,
|
|
2740
|
+
It as titleStore,
|
|
2741
|
+
Hc as unmounted,
|
|
2742
|
+
xc as version,
|
|
2743
|
+
Ds as willMount
|
|
2803
2744
|
};
|