@mantou/gem 2.1.1 → 2.2.1

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