@jasonshimmy/custom-elements-runtime 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/custom-elements-runtime.cjs.js +12 -11
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1612 -1581
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.ssr.cjs.js +1 -1
- package/dist/custom-elements-runtime.ssr.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.ssr.es.js +29 -10
- package/dist/custom-elements-runtime.ssr.es.js.map +1 -1
- package/dist/custom-elements-runtime.transitions.cjs.js +1 -1
- package/dist/custom-elements-runtime.transitions.es.js +3 -3
- package/dist/runtime/prose.d.ts +15 -0
- package/dist/runtime/render.d.ts +10 -0
- package/dist/runtime/style.d.ts +19 -1
- package/dist/transitions-BAjG4ZyQ.cjs +290 -0
- package/dist/transitions-BAjG4ZyQ.cjs.map +1 -0
- package/dist/transitions-Dnvv4N7o.js +2108 -0
- package/dist/transitions-Dnvv4N7o.js.map +1 -0
- package/package.json +2 -3
- package/dist/prose.css +0 -1
- package/dist/transitions-DCIjMqzG.js +0 -1607
- package/dist/transitions-DCIjMqzG.js.map +0 -1
- package/dist/transitions-DHQuI3AY.cjs +0 -237
- package/dist/transitions-DHQuI3AY.cjs.map +0 -1
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { g as U, t as
|
|
2
|
-
import { c as
|
|
3
|
-
import { d as
|
|
4
|
-
import { j as
|
|
5
|
-
import {
|
|
6
|
-
function
|
|
1
|
+
import { g as U, t as J, i as P, s as Re, a as H, b as F, d as D, f as q, T as gt, h as Ze, S as bt, j as at, k as Xe, l as Ce, m as Qe, n as Et } from "./namespace-helpers-Vwt2Fzds.js";
|
|
2
|
+
import { c as En, r as Sn, u as vn, w as _n } from "./namespace-helpers-Vwt2Fzds.js";
|
|
3
|
+
import { d as W, a as Q } from "./logger-BpibrmKL.js";
|
|
4
|
+
import { j as St, g as vt, a as je, b as pe, m as ke, s as _t, c as et } from "./transitions-Dnvv4N7o.js";
|
|
5
|
+
import { d as kn } from "./transitions-Dnvv4N7o.js";
|
|
6
|
+
function Ct(e, n, t) {
|
|
7
7
|
if (t)
|
|
8
8
|
for (const [s, r] of Object.entries(t)) {
|
|
9
|
-
let
|
|
10
|
-
if (Array.isArray(r) ? (
|
|
11
|
-
callback:
|
|
12
|
-
options:
|
|
9
|
+
let i, o = {};
|
|
10
|
+
if (Array.isArray(r) ? (i = r[0], o = r[1] || {}) : i = r, n.set(s, {
|
|
11
|
+
callback: i,
|
|
12
|
+
options: o,
|
|
13
13
|
oldValue: U(e, s)
|
|
14
|
-
}),
|
|
14
|
+
}), o.immediate)
|
|
15
15
|
try {
|
|
16
16
|
const c = U(e, s);
|
|
17
|
-
|
|
17
|
+
i(c, void 0, e);
|
|
18
18
|
} catch (c) {
|
|
19
|
-
|
|
19
|
+
W(`Error in immediate watcher for "${s}":`, c);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const r = (
|
|
25
|
-
if (
|
|
26
|
-
if (typeof
|
|
27
|
-
if (Array.isArray(
|
|
28
|
-
return
|
|
29
|
-
const f =
|
|
30
|
-
return
|
|
31
|
-
},
|
|
32
|
-
if (
|
|
23
|
+
function kt(e, n, t, s) {
|
|
24
|
+
const r = (o, c) => {
|
|
25
|
+
if (o === c) return !0;
|
|
26
|
+
if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
|
|
27
|
+
if (Array.isArray(o) && Array.isArray(c))
|
|
28
|
+
return o.length !== c.length ? !1 : o.every((g, w) => r(g, c[w]));
|
|
29
|
+
const f = o, u = c, S = Object.keys(f || {}), E = Object.keys(u || {});
|
|
30
|
+
return S.length !== E.length ? !1 : S.every((g) => r(f[g], u[g]));
|
|
31
|
+
}, i = n.get(t);
|
|
32
|
+
if (i && !r(s, i.oldValue))
|
|
33
33
|
try {
|
|
34
|
-
|
|
35
|
-
} catch (
|
|
36
|
-
|
|
34
|
+
i.callback(s, i.oldValue, e), i.oldValue = s;
|
|
35
|
+
} catch (o) {
|
|
36
|
+
W(`Error in watcher for "${t}":`, o);
|
|
37
37
|
}
|
|
38
|
-
for (const [
|
|
39
|
-
if (c.options.deep && t.startsWith(
|
|
38
|
+
for (const [o, c] of n.entries())
|
|
39
|
+
if (c.options.deep && t.startsWith(o + "."))
|
|
40
40
|
try {
|
|
41
|
-
const f = U(e,
|
|
41
|
+
const f = U(e, o);
|
|
42
42
|
r(f, c.oldValue) || (c.callback(f, c.oldValue, e), c.oldValue = f);
|
|
43
43
|
} catch (f) {
|
|
44
|
-
|
|
44
|
+
W(`Error in deep watcher for "${o}":`, f);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function De(e, n) {
|
|
48
48
|
return n === Boolean ? e === "" || e === "true" : n === Number ? Number(e) : e;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function At(e, n, t) {
|
|
51
51
|
if (n)
|
|
52
52
|
for (const s in n) {
|
|
53
|
-
const r = n[s],
|
|
53
|
+
const r = n[s], i = J(s), o = e.getAttribute(i);
|
|
54
54
|
if (r.type === Function && typeof e[s] == "function")
|
|
55
55
|
t[s] = e[s];
|
|
56
|
-
else if (
|
|
57
|
-
t[s] =
|
|
56
|
+
else if (o !== null)
|
|
57
|
+
t[s] = De(o, r.type);
|
|
58
58
|
else if (typeof e[s] < "u")
|
|
59
59
|
try {
|
|
60
60
|
const c = e[s];
|
|
61
61
|
if (r.type === String && c && typeof c == "object")
|
|
62
62
|
try {
|
|
63
|
-
t[s] =
|
|
63
|
+
t[s] = De(String(c), r.type);
|
|
64
64
|
} catch {
|
|
65
65
|
t[s] = c;
|
|
66
66
|
}
|
|
67
|
-
else r.type === Boolean && typeof c == "boolean" || r.type === Number && typeof c == "number" || r.type === Function && typeof c == "function" ? t[s] = c : t[s] =
|
|
67
|
+
else r.type === Boolean && typeof c == "boolean" || r.type === Number && typeof c == "number" || r.type === Function && typeof c == "function" ? t[s] = c : t[s] = De(String(c), r.type);
|
|
68
68
|
} catch {
|
|
69
69
|
t[s] = e[s];
|
|
70
70
|
}
|
|
71
71
|
else "default" in r && r.default !== void 0 && (t[s] = r.default);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function wt(e, n, t) {
|
|
75
75
|
if (!n.props) {
|
|
76
76
|
try {
|
|
77
77
|
const s = t?._hookCallbacks?.props || {}, r = Array.from(
|
|
@@ -80,27 +80,27 @@ function St(e, n, t) {
|
|
|
80
80
|
...Object.keys(s || {})
|
|
81
81
|
])
|
|
82
82
|
);
|
|
83
|
-
for (const
|
|
84
|
-
if (typeof
|
|
85
|
-
const
|
|
83
|
+
for (const i of r) {
|
|
84
|
+
if (typeof i != "string" || i.startsWith("_")) continue;
|
|
85
|
+
const o = Object.getOwnPropertyDescriptor(t, i);
|
|
86
86
|
if (!(!Object.prototype.hasOwnProperty.call(
|
|
87
87
|
s,
|
|
88
|
-
|
|
89
|
-
) &&
|
|
88
|
+
i
|
|
89
|
+
) && o && (o.get || o.set || !o.configurable)))
|
|
90
90
|
try {
|
|
91
|
-
Object.defineProperty(t,
|
|
91
|
+
Object.defineProperty(t, i, {
|
|
92
92
|
enumerable: !0,
|
|
93
93
|
configurable: !0,
|
|
94
94
|
get() {
|
|
95
95
|
try {
|
|
96
|
-
const f =
|
|
96
|
+
const f = J(i), u = e.getAttribute(f);
|
|
97
97
|
if (u !== null)
|
|
98
98
|
return u;
|
|
99
|
-
const
|
|
99
|
+
const S = e[i];
|
|
100
100
|
let E;
|
|
101
|
-
return
|
|
101
|
+
return P(S) || S && typeof S == "object" && "value" in S && !(S instanceof Node) ? E = S.value : E = S, E;
|
|
102
102
|
} catch {
|
|
103
|
-
return e[
|
|
103
|
+
return e[i];
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
});
|
|
@@ -111,18 +111,18 @@ function St(e, n, t) {
|
|
|
111
111
|
}
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
At(e, n.props, t);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Tt(e, n, t, s) {
|
|
117
117
|
e.onConnected && !t && (e.onConnected(n), s(!0));
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(),
|
|
119
|
+
function Lt(e, n, t, s, r, i, o, c) {
|
|
120
|
+
e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(), i(!1), o(null), c(!1);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Nt(e, n, t, s, r) {
|
|
123
123
|
e.onAttributeChanged && e.onAttributeChanged(n, t, s, r);
|
|
124
124
|
}
|
|
125
|
-
class
|
|
125
|
+
class Ot {
|
|
126
126
|
static cache = /* @__PURE__ */ new Map();
|
|
127
127
|
static maxCacheSize = 1e3;
|
|
128
128
|
// Dangerous patterns to block
|
|
@@ -147,7 +147,7 @@ class At {
|
|
|
147
147
|
const s = this.cache.get(n);
|
|
148
148
|
if (s) {
|
|
149
149
|
if (!s.isSecure) {
|
|
150
|
-
|
|
150
|
+
Q("Blocked cached dangerous expression:", n);
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
try {
|
|
@@ -158,11 +158,11 @@ class At {
|
|
|
158
158
|
}
|
|
159
159
|
const r = this.createEvaluator(n);
|
|
160
160
|
if (this.cache.size >= this.maxCacheSize) {
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const i = this.cache.keys().next().value;
|
|
162
|
+
i && this.cache.delete(i);
|
|
163
163
|
}
|
|
164
164
|
if (this.cache.set(n, r), !r.isSecure) {
|
|
165
|
-
|
|
165
|
+
Q("Blocked dangerous expression:", n);
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
return r.evaluator(t);
|
|
@@ -177,7 +177,7 @@ class At {
|
|
|
177
177
|
try {
|
|
178
178
|
return { evaluator: this.createSafeEvaluator(n), isSecure: !0 };
|
|
179
179
|
} catch (t) {
|
|
180
|
-
return
|
|
180
|
+
return Q("Failed to create evaluator for expression:", n, t), { evaluator: () => {
|
|
181
181
|
}, isSecure: !1 };
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -197,26 +197,26 @@ class At {
|
|
|
197
197
|
static createObjectEvaluator(n) {
|
|
198
198
|
const t = n.trim().slice(1, -1), s = this.parseObjectProperties(t);
|
|
199
199
|
return (r) => {
|
|
200
|
-
const
|
|
201
|
-
for (const { key:
|
|
200
|
+
const i = {};
|
|
201
|
+
for (const { key: o, value: c } of s)
|
|
202
202
|
try {
|
|
203
203
|
if (c.startsWith("ctx.")) {
|
|
204
204
|
const f = c.slice(4);
|
|
205
|
-
o
|
|
205
|
+
i[o] = U(r, f);
|
|
206
206
|
} else
|
|
207
|
-
o
|
|
207
|
+
i[o] = this.evaluateSimpleValue(c, r);
|
|
208
208
|
} catch {
|
|
209
|
-
o
|
|
209
|
+
i[o] = void 0;
|
|
210
210
|
}
|
|
211
|
-
return
|
|
211
|
+
return i;
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
static parseObjectProperties(n) {
|
|
215
215
|
const t = [], s = n.split(",");
|
|
216
216
|
for (const r of s) {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
217
|
+
const i = r.indexOf(":");
|
|
218
|
+
if (i === -1) continue;
|
|
219
|
+
const o = r.slice(0, i).trim(), c = r.slice(i + 1).trim(), f = o.replace(/^['"]|['"]$/g, "");
|
|
220
220
|
t.push({ key: f, value: c });
|
|
221
221
|
}
|
|
222
222
|
return t;
|
|
@@ -230,37 +230,37 @@ class At {
|
|
|
230
230
|
/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,
|
|
231
231
|
(E) => `<<#${r.push(E) - 1}#>>`
|
|
232
232
|
);
|
|
233
|
-
const
|
|
234
|
-
for (const E of
|
|
235
|
-
const
|
|
236
|
-
if (
|
|
237
|
-
const p = r.push(JSON.stringify(
|
|
233
|
+
const i = s.match(/ctx\.[\w.]+/g) || [];
|
|
234
|
+
for (const E of i) {
|
|
235
|
+
const g = E.slice(4), w = U(t, g);
|
|
236
|
+
if (w === void 0) return;
|
|
237
|
+
const p = r.push(JSON.stringify(w)) - 1;
|
|
238
238
|
s = s.replace(
|
|
239
239
|
new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
240
240
|
`<<#${p}#>>`
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = s.match(o) || [];
|
|
244
244
|
for (const E of c) {
|
|
245
245
|
if (E.startsWith("ctx.")) continue;
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
246
|
+
const g = U(t, E);
|
|
247
|
+
if (g === void 0) return;
|
|
248
|
+
const w = r.push(JSON.stringify(g)) - 1;
|
|
249
249
|
s = s.replace(
|
|
250
250
|
new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
251
|
-
`<<#${
|
|
251
|
+
`<<#${w}#>>`
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
const f = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
255
255
|
let u;
|
|
256
|
-
const
|
|
256
|
+
const S = /* @__PURE__ */ new Set();
|
|
257
257
|
for (; (u = f.exec(s)) !== null; ) {
|
|
258
258
|
const E = u[1];
|
|
259
|
-
if (["true", "false", "null", "undefined"].includes(E) || /^[0-9]+$/.test(E) || E === "ctx" ||
|
|
260
|
-
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
263
|
-
const
|
|
259
|
+
if (["true", "false", "null", "undefined"].includes(E) || /^[0-9]+$/.test(E) || E === "ctx" || S.has(E)) continue;
|
|
260
|
+
S.add(E);
|
|
261
|
+
const g = U(t, E);
|
|
262
|
+
if (g === void 0) return;
|
|
263
|
+
const w = JSON.stringify(g), p = r.push(w) - 1;
|
|
264
264
|
E.includes(".") ? s = s.replace(
|
|
265
265
|
new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
266
266
|
`<<#${p}#>>`
|
|
@@ -274,7 +274,7 @@ class At {
|
|
|
274
274
|
}
|
|
275
275
|
s = s.replace(
|
|
276
276
|
/<<#(\d+)#>>/g,
|
|
277
|
-
(E,
|
|
277
|
+
(E, g) => r[Number(g)]
|
|
278
278
|
);
|
|
279
279
|
try {
|
|
280
280
|
return this.evaluateBasicExpression(s);
|
|
@@ -297,227 +297,227 @@ class At {
|
|
|
297
297
|
function r() {
|
|
298
298
|
return t[s];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
const
|
|
302
|
-
if (
|
|
303
|
-
throw new Error(`Unexpected token EOF, expected ${
|
|
304
|
-
if (
|
|
300
|
+
function i(y) {
|
|
301
|
+
const k = t[s++];
|
|
302
|
+
if (y && !k)
|
|
303
|
+
throw new Error(`Unexpected token EOF, expected ${y}`);
|
|
304
|
+
if (y && k && k.type !== y && k.value !== y)
|
|
305
305
|
throw new Error(
|
|
306
|
-
`Unexpected token ${
|
|
306
|
+
`Unexpected token ${k.type}/${k.value}, expected ${y}`
|
|
307
307
|
);
|
|
308
|
-
return
|
|
308
|
+
return k;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function o() {
|
|
311
311
|
return p();
|
|
312
312
|
}
|
|
313
|
-
function c(
|
|
314
|
-
if (typeof
|
|
315
|
-
if (
|
|
316
|
-
if (typeof
|
|
317
|
-
const
|
|
318
|
-
return Number.isNaN(
|
|
313
|
+
function c(y) {
|
|
314
|
+
if (typeof y == "number") return y;
|
|
315
|
+
if (y == null) return NaN;
|
|
316
|
+
if (typeof y == "boolean") return y ? 1 : 0;
|
|
317
|
+
const k = Number(y);
|
|
318
|
+
return Number.isNaN(k) ? NaN : k;
|
|
319
319
|
}
|
|
320
|
-
function f(
|
|
321
|
-
return typeof
|
|
320
|
+
function f(y, k) {
|
|
321
|
+
return typeof y == "string" || typeof k == "string" ? String(y) + String(k) : c(y) + c(k);
|
|
322
322
|
}
|
|
323
|
-
function u(
|
|
324
|
-
return c(
|
|
323
|
+
function u(y, k) {
|
|
324
|
+
return c(y) - c(k);
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
return c(
|
|
326
|
+
function S(y, k) {
|
|
327
|
+
return c(y) * c(k);
|
|
328
328
|
}
|
|
329
|
-
function E(
|
|
330
|
-
return c(
|
|
329
|
+
function E(y, k) {
|
|
330
|
+
return c(y) / c(k);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
return c(
|
|
332
|
+
function g(y, k) {
|
|
333
|
+
return c(y) % c(k);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
if (typeof
|
|
337
|
-
switch (
|
|
335
|
+
function w(y, k, l) {
|
|
336
|
+
if (typeof k == "number" && typeof l == "number")
|
|
337
|
+
switch (y) {
|
|
338
338
|
case ">":
|
|
339
|
-
return
|
|
339
|
+
return k > l;
|
|
340
340
|
case "<":
|
|
341
|
-
return
|
|
341
|
+
return k < l;
|
|
342
342
|
case ">=":
|
|
343
|
-
return
|
|
343
|
+
return k >= l;
|
|
344
344
|
case "<=":
|
|
345
|
-
return
|
|
345
|
+
return k <= l;
|
|
346
346
|
default:
|
|
347
347
|
return !1;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
switch (
|
|
349
|
+
const m = String(k), A = String(l);
|
|
350
|
+
switch (y) {
|
|
351
351
|
case ">":
|
|
352
|
-
return
|
|
352
|
+
return m > A;
|
|
353
353
|
case "<":
|
|
354
|
-
return
|
|
354
|
+
return m < A;
|
|
355
355
|
case ">=":
|
|
356
|
-
return
|
|
356
|
+
return m >= A;
|
|
357
357
|
case "<=":
|
|
358
|
-
return
|
|
358
|
+
return m <= A;
|
|
359
359
|
default:
|
|
360
360
|
return !1;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
function p() {
|
|
364
|
-
const
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
const
|
|
370
|
-
return
|
|
371
|
-
}
|
|
372
|
-
return
|
|
373
|
-
}
|
|
374
|
-
function
|
|
375
|
-
let
|
|
364
|
+
const y = v(), k = r();
|
|
365
|
+
if (k && k.value === "?") {
|
|
366
|
+
i("?");
|
|
367
|
+
const l = o();
|
|
368
|
+
i(":");
|
|
369
|
+
const m = o();
|
|
370
|
+
return y ? l : m;
|
|
371
|
+
}
|
|
372
|
+
return y;
|
|
373
|
+
}
|
|
374
|
+
function v() {
|
|
375
|
+
let y = a();
|
|
376
376
|
for (; ; ) {
|
|
377
|
-
const
|
|
378
|
-
if (!
|
|
379
|
-
|
|
380
|
-
const
|
|
381
|
-
|
|
377
|
+
const k = r();
|
|
378
|
+
if (!k || k.value !== "||") break;
|
|
379
|
+
i("OP");
|
|
380
|
+
const l = a();
|
|
381
|
+
y = y || l;
|
|
382
382
|
}
|
|
383
|
-
return
|
|
383
|
+
return y;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
let
|
|
385
|
+
function a() {
|
|
386
|
+
let y = C();
|
|
387
387
|
for (; ; ) {
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
390
|
-
|
|
391
|
-
const
|
|
392
|
-
|
|
388
|
+
const k = r();
|
|
389
|
+
if (!k || k.value !== "&&") break;
|
|
390
|
+
i("OP");
|
|
391
|
+
const l = C();
|
|
392
|
+
y = y && l;
|
|
393
393
|
}
|
|
394
|
-
return
|
|
394
|
+
return y;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
let
|
|
396
|
+
function C() {
|
|
397
|
+
let y = b();
|
|
398
398
|
for (; ; ) {
|
|
399
|
-
const
|
|
400
|
-
if (!
|
|
401
|
-
const
|
|
402
|
-
switch (
|
|
399
|
+
const k = r();
|
|
400
|
+
if (!k || !["==", "!=", "===", "!=="].includes(k.value)) break;
|
|
401
|
+
const l = i("OP").value, m = b();
|
|
402
|
+
switch (l) {
|
|
403
403
|
case "==":
|
|
404
|
-
|
|
404
|
+
y = y == m;
|
|
405
405
|
break;
|
|
406
406
|
case "!=":
|
|
407
|
-
|
|
407
|
+
y = y != m;
|
|
408
408
|
break;
|
|
409
409
|
case "===":
|
|
410
|
-
|
|
410
|
+
y = y === m;
|
|
411
411
|
break;
|
|
412
412
|
case "!==":
|
|
413
|
-
|
|
413
|
+
y = y !== m;
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
return
|
|
417
|
+
return y;
|
|
418
418
|
}
|
|
419
419
|
function b() {
|
|
420
|
-
let
|
|
420
|
+
let y = h();
|
|
421
421
|
for (; ; ) {
|
|
422
|
-
const
|
|
423
|
-
if (!
|
|
424
|
-
const
|
|
425
|
-
switch (
|
|
422
|
+
const k = r();
|
|
423
|
+
if (!k || ![">", "<", ">=", "<="].includes(k.value)) break;
|
|
424
|
+
const l = i("OP").value, m = h();
|
|
425
|
+
switch (l) {
|
|
426
426
|
case ">":
|
|
427
|
-
|
|
427
|
+
y = w(">", y, m);
|
|
428
428
|
break;
|
|
429
429
|
case "<":
|
|
430
|
-
|
|
430
|
+
y = w("<", y, m);
|
|
431
431
|
break;
|
|
432
432
|
case ">=":
|
|
433
|
-
|
|
433
|
+
y = w(">=", y, m);
|
|
434
434
|
break;
|
|
435
435
|
case "<=":
|
|
436
|
-
|
|
436
|
+
y = w("<=", y, m);
|
|
437
437
|
break;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return y;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
let
|
|
442
|
+
function h() {
|
|
443
|
+
let y = d();
|
|
444
444
|
for (; ; ) {
|
|
445
|
-
const
|
|
446
|
-
if (!
|
|
447
|
-
const
|
|
448
|
-
|
|
445
|
+
const k = r();
|
|
446
|
+
if (!k || k.value !== "+" && k.value !== "-") break;
|
|
447
|
+
const l = i("OP").value, m = d();
|
|
448
|
+
y = l === "+" ? f(y, m) : u(y, m);
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return y;
|
|
451
451
|
}
|
|
452
452
|
function d() {
|
|
453
|
-
let
|
|
453
|
+
let y = _();
|
|
454
454
|
for (; ; ) {
|
|
455
|
-
const
|
|
456
|
-
if (!
|
|
455
|
+
const k = r();
|
|
456
|
+
if (!k || k.value !== "*" && k.value !== "/" && k.value !== "%")
|
|
457
457
|
break;
|
|
458
|
-
const
|
|
459
|
-
switch (
|
|
458
|
+
const l = i("OP").value, m = _();
|
|
459
|
+
switch (l) {
|
|
460
460
|
case "*":
|
|
461
|
-
|
|
461
|
+
y = S(y, m);
|
|
462
462
|
break;
|
|
463
463
|
case "/":
|
|
464
|
-
|
|
464
|
+
y = E(y, m);
|
|
465
465
|
break;
|
|
466
466
|
case "%":
|
|
467
|
-
|
|
467
|
+
y = g(y, m);
|
|
468
468
|
break;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
return
|
|
472
|
-
}
|
|
473
|
-
function
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
return
|
|
477
|
-
if (
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
return u(0,
|
|
481
|
-
}
|
|
482
|
-
return
|
|
483
|
-
}
|
|
484
|
-
function
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
if (
|
|
488
|
-
return
|
|
489
|
-
if (
|
|
490
|
-
return
|
|
491
|
-
if (
|
|
492
|
-
return
|
|
493
|
-
if (
|
|
494
|
-
|
|
495
|
-
const
|
|
471
|
+
return y;
|
|
472
|
+
}
|
|
473
|
+
function _() {
|
|
474
|
+
const y = r();
|
|
475
|
+
if (y && y.value === "!")
|
|
476
|
+
return i("OP"), !_();
|
|
477
|
+
if (y && y.value === "-") {
|
|
478
|
+
i("OP");
|
|
479
|
+
const k = _();
|
|
480
|
+
return u(0, k);
|
|
481
|
+
}
|
|
482
|
+
return T();
|
|
483
|
+
}
|
|
484
|
+
function T() {
|
|
485
|
+
const y = r();
|
|
486
|
+
if (y) {
|
|
487
|
+
if (y.type === "NUMBER")
|
|
488
|
+
return i("NUMBER"), Number(y.value);
|
|
489
|
+
if (y.type === "STRING")
|
|
490
|
+
return i("STRING"), y.value.slice(1, -1);
|
|
491
|
+
if (y.type === "IDENT")
|
|
492
|
+
return i("IDENT"), y.value === "true" ? !0 : y.value === "false" ? !1 : y.value === "null" ? null : void 0;
|
|
493
|
+
if (y.value === "[") {
|
|
494
|
+
i("PUNC");
|
|
495
|
+
const k = [];
|
|
496
496
|
for (; ; ) {
|
|
497
|
-
const
|
|
498
|
-
if (!
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
497
|
+
const l = r();
|
|
498
|
+
if (!l || l.value === "]") break;
|
|
499
|
+
k.push(o());
|
|
500
|
+
const m = r();
|
|
501
|
+
m && m.value === "," && i("PUNC");
|
|
502
502
|
}
|
|
503
|
-
return
|
|
503
|
+
return i("PUNC"), k;
|
|
504
504
|
}
|
|
505
|
-
if (
|
|
506
|
-
|
|
507
|
-
const
|
|
508
|
-
return
|
|
505
|
+
if (y.value === "(") {
|
|
506
|
+
i("PUNC");
|
|
507
|
+
const k = o();
|
|
508
|
+
return i("PUNC"), k;
|
|
509
509
|
}
|
|
510
510
|
throw new Error("Unexpected token in expression");
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
return
|
|
513
|
+
return o();
|
|
514
514
|
}
|
|
515
515
|
static tokenize(n) {
|
|
516
516
|
const t = [], s = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
|
|
517
517
|
let r;
|
|
518
518
|
for (; (r = s.exec(n)) !== null; ) {
|
|
519
|
-
const
|
|
520
|
-
|
|
519
|
+
const i = r[1];
|
|
520
|
+
i && (/^\d/.test(i) ? t.push({ type: "NUMBER", value: i }) : /^"/.test(i) || /^'/.test(i) ? t.push({ type: "STRING", value: i }) : /^[a-zA-Z_]/.test(i) ? t.push({ type: "IDENT", value: i }) : /^[()?:,[\]]$/.test(i) ? t.push({ type: "PUNC", value: i }) : t.push({ type: "OP", value: i }));
|
|
521
521
|
}
|
|
522
522
|
return t;
|
|
523
523
|
}
|
|
@@ -538,14 +538,14 @@ class At {
|
|
|
538
538
|
return this.cache.size;
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
class
|
|
541
|
+
class te {
|
|
542
542
|
static cleanupFunctions = /* @__PURE__ */ new WeakMap();
|
|
543
543
|
/**
|
|
544
544
|
* Add an event listener with automatic cleanup tracking
|
|
545
545
|
*/
|
|
546
546
|
static addListener(n, t, s, r) {
|
|
547
547
|
n.addEventListener(t, s, r);
|
|
548
|
-
const
|
|
548
|
+
const o = {
|
|
549
549
|
event: t,
|
|
550
550
|
handler: s,
|
|
551
551
|
wrapper: s,
|
|
@@ -555,19 +555,19 @@ class Q {
|
|
|
555
555
|
};
|
|
556
556
|
this.cleanupFunctions.has(n) || this.cleanupFunctions.set(n, []);
|
|
557
557
|
const c = this.cleanupFunctions.get(n);
|
|
558
|
-
c.push(
|
|
558
|
+
c.push(o), c.__metaList = c;
|
|
559
559
|
}
|
|
560
560
|
/**
|
|
561
561
|
* Remove a specific event listener
|
|
562
562
|
*/
|
|
563
563
|
static removeListener(n, t, s, r) {
|
|
564
564
|
n.removeEventListener(t, s, r);
|
|
565
|
-
const
|
|
566
|
-
if (
|
|
567
|
-
for (let
|
|
568
|
-
const c = o
|
|
565
|
+
const i = this.cleanupFunctions.get(n);
|
|
566
|
+
if (i)
|
|
567
|
+
for (let o = 0; o < i.length; o++) {
|
|
568
|
+
const c = i[o];
|
|
569
569
|
if (c.event === t && c.handler === s) {
|
|
570
|
-
|
|
570
|
+
i.splice(o, 1), i.length === 0 && this.cleanupFunctions.delete(n);
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
573
573
|
}
|
|
@@ -617,43 +617,43 @@ class Q {
|
|
|
617
617
|
})) : [];
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function He(e, n) {
|
|
621
621
|
return Array.isArray(e) && Array.isArray(n) ? JSON.stringify([...e].sort()) !== JSON.stringify([...n].sort()) : e !== n;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function tt(e, n, t, s, r) {
|
|
624
624
|
if (e) {
|
|
625
|
-
const
|
|
626
|
-
if (r && typeof
|
|
627
|
-
const
|
|
628
|
-
|
|
625
|
+
const i = n.value;
|
|
626
|
+
if (r && typeof i == "object" && i !== null) {
|
|
627
|
+
const o = { ...i };
|
|
628
|
+
o[r] = t, n.value = o;
|
|
629
629
|
} else
|
|
630
630
|
n.value = t;
|
|
631
631
|
} else {
|
|
632
|
-
const
|
|
633
|
-
|
|
632
|
+
const i = s._state || s;
|
|
633
|
+
Re(i, n, t);
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function xe(e, n, t, s) {
|
|
637
637
|
if (typeof e._requestRender == "function" && e._requestRender(), typeof e._triggerWatchers == "function") {
|
|
638
638
|
const r = n ? "reactiveState" : t;
|
|
639
639
|
e._triggerWatchers(r, s);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
const s = `update:${
|
|
642
|
+
function Mt(e, n, t) {
|
|
643
|
+
const s = `update:${J(n)}`, r = `update:${n}`, i = new CustomEvent(s, {
|
|
644
644
|
detail: t,
|
|
645
645
|
bubbles: !0,
|
|
646
646
|
cancelable: !0
|
|
647
|
-
}),
|
|
647
|
+
}), o = new CustomEvent(r, {
|
|
648
648
|
detail: t,
|
|
649
649
|
bubbles: !0,
|
|
650
650
|
cancelable: !0
|
|
651
651
|
});
|
|
652
|
-
e.dispatchEvent(
|
|
652
|
+
e.dispatchEvent(i), e.dispatchEvent(o);
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function nt(e, n, t, s) {
|
|
655
655
|
const r = t;
|
|
656
|
-
if (
|
|
656
|
+
if (H(() => {
|
|
657
657
|
if (typeof e.setAttribute == "function")
|
|
658
658
|
try {
|
|
659
659
|
e[n] = r;
|
|
@@ -662,19 +662,19 @@ function Qe(e, n, t, s) {
|
|
|
662
662
|
else
|
|
663
663
|
e[n] = r;
|
|
664
664
|
}), r == null || typeof r == "string" || typeof r == "number" || typeof r == "boolean") {
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
typeof e.setAttribute == "function" &&
|
|
665
|
+
const i = F(r);
|
|
666
|
+
i !== null ? H(() => {
|
|
667
|
+
typeof e.setAttribute == "function" && D(
|
|
668
668
|
e,
|
|
669
|
-
|
|
670
|
-
String(
|
|
669
|
+
J(n),
|
|
670
|
+
String(i)
|
|
671
671
|
);
|
|
672
|
-
}) :
|
|
673
|
-
typeof e.removeAttribute == "function" &&
|
|
672
|
+
}) : H(() => {
|
|
673
|
+
typeof e.removeAttribute == "function" && q(e, J(n));
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function $t(e, n, t, s) {
|
|
678
678
|
if (e) {
|
|
679
679
|
const r = n.value;
|
|
680
680
|
return s && typeof r == "object" && r !== null ? r[s] : r;
|
|
@@ -683,170 +683,170 @@ function wt(e, n, t, s) {
|
|
|
683
683
|
return U(r, n);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function he(e) {
|
|
687
687
|
return e ? e.split(/\s+/).filter(Boolean) : [];
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function ye(e, n) {
|
|
690
690
|
if (n.length === 0) return;
|
|
691
691
|
const t = n.filter(
|
|
692
692
|
(s) => s && !e.classList.contains(s)
|
|
693
693
|
);
|
|
694
694
|
t.length > 0 && e.classList.add(...t);
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function de(e, n) {
|
|
697
697
|
if (n.length === 0) return;
|
|
698
698
|
const t = n.filter(Boolean);
|
|
699
699
|
t.length > 0 && e.classList.remove(...t);
|
|
700
700
|
}
|
|
701
|
-
let
|
|
702
|
-
async function
|
|
703
|
-
if (!
|
|
701
|
+
let We = !1;
|
|
702
|
+
async function Pt(e, n, t = 10) {
|
|
703
|
+
if (!We) {
|
|
704
704
|
if (!e.isConnected) {
|
|
705
|
-
|
|
705
|
+
Q("⚠️ Element not connected to DOM, skipping style wait");
|
|
706
706
|
return;
|
|
707
707
|
}
|
|
708
708
|
for (let s = 0; s < t; s++) {
|
|
709
|
-
const r = window.getComputedStyle(e),
|
|
710
|
-
if (
|
|
711
|
-
|
|
709
|
+
const r = window.getComputedStyle(e), i = r.transform && r.transform !== "", o = r.opacity && r.opacity !== "";
|
|
710
|
+
if (i || o) {
|
|
711
|
+
We = !0;
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
714
|
await new Promise(
|
|
715
715
|
(c) => requestAnimationFrame(() => c(void 0))
|
|
716
716
|
);
|
|
717
717
|
}
|
|
718
|
-
|
|
718
|
+
We = !0, Q("⚠️ Styles did not load in time for transition, continuing anyway");
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (
|
|
723
|
-
const
|
|
724
|
-
return
|
|
721
|
+
function jt(e) {
|
|
722
|
+
const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (i) => {
|
|
723
|
+
const o = parseFloat(i);
|
|
724
|
+
return i.includes("ms") ? o : o * 1e3;
|
|
725
725
|
};
|
|
726
726
|
return r(t) + r(s);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function lt(e, n) {
|
|
729
729
|
return new Promise((t) => {
|
|
730
|
-
const s = n ??
|
|
730
|
+
const s = n ?? jt(e);
|
|
731
731
|
if (s <= 0) {
|
|
732
732
|
t();
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
735
|
let r = !1;
|
|
736
|
-
const
|
|
737
|
-
r || (r = !0, e.removeEventListener("transitionend",
|
|
738
|
-
},
|
|
739
|
-
e.addEventListener("transitionend",
|
|
736
|
+
const i = () => {
|
|
737
|
+
r || (r = !0, e.removeEventListener("transitionend", o), e.removeEventListener("transitioncancel", o), t());
|
|
738
|
+
}, o = () => i();
|
|
739
|
+
e.addEventListener("transitionend", o), e.addEventListener("transitioncancel", o), setTimeout(i, s + 50);
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
|
-
async function
|
|
743
|
-
const { classes: t, hooks: s, css: r, duration:
|
|
742
|
+
async function Ae(e, n) {
|
|
743
|
+
const { classes: t, hooks: s, css: r, duration: i } = n;
|
|
744
744
|
if (s?.onBeforeEnter)
|
|
745
745
|
try {
|
|
746
746
|
s.onBeforeEnter(e);
|
|
747
747
|
} catch (p) {
|
|
748
|
-
|
|
748
|
+
W("Transition onBeforeEnter error:", p);
|
|
749
749
|
}
|
|
750
750
|
if (!r)
|
|
751
751
|
return s?.onEnter ? new Promise((p) => {
|
|
752
|
-
const
|
|
753
|
-
typeof
|
|
752
|
+
const v = s.onEnter;
|
|
753
|
+
typeof v == "function" ? v(e, () => {
|
|
754
754
|
if (s?.onAfterEnter)
|
|
755
755
|
try {
|
|
756
756
|
s.onAfterEnter(e);
|
|
757
|
-
} catch (
|
|
758
|
-
|
|
757
|
+
} catch (a) {
|
|
758
|
+
W("Transition onAfterEnter error:", a);
|
|
759
759
|
}
|
|
760
760
|
p();
|
|
761
761
|
}) : p();
|
|
762
762
|
}) : void 0;
|
|
763
|
-
const
|
|
764
|
-
|
|
763
|
+
const o = he(t?.enterFrom), c = he(t?.enterActive), f = he(t?.enterTo);
|
|
764
|
+
ye(e, o), e.offsetHeight, ye(e, c), e.offsetHeight;
|
|
765
765
|
let u;
|
|
766
766
|
if (s?.onEnter) {
|
|
767
|
-
const p = new Promise((
|
|
768
|
-
u =
|
|
767
|
+
const p = new Promise((v) => {
|
|
768
|
+
u = v;
|
|
769
769
|
});
|
|
770
770
|
try {
|
|
771
|
-
const
|
|
772
|
-
typeof
|
|
771
|
+
const v = s.onEnter;
|
|
772
|
+
typeof v == "function" && v(e, () => {
|
|
773
773
|
u && u();
|
|
774
774
|
});
|
|
775
|
-
} catch (
|
|
776
|
-
|
|
775
|
+
} catch (v) {
|
|
776
|
+
W("Transition onEnter error:", v);
|
|
777
777
|
}
|
|
778
778
|
u && await p;
|
|
779
779
|
}
|
|
780
780
|
await new Promise(
|
|
781
781
|
(p) => requestAnimationFrame(() => p(void 0))
|
|
782
782
|
), e.offsetHeight;
|
|
783
|
-
const
|
|
784
|
-
|
|
783
|
+
const S = window.getComputedStyle(e), E = S.transform, g = S.opacity;
|
|
784
|
+
de(e, o), E && E !== "none" && (e.style.transform = E), g && g !== "" && (e.style.opacity = g), e.offsetHeight, await new Promise(
|
|
785
785
|
(p) => requestAnimationFrame(() => p(void 0))
|
|
786
|
-
), e.style.transform = "", e.style.opacity = "",
|
|
786
|
+
), e.style.transform = "", e.style.opacity = "", ye(e, f), e.offsetHeight, await new Promise(
|
|
787
787
|
(p) => requestAnimationFrame(() => p(void 0))
|
|
788
788
|
);
|
|
789
|
-
let
|
|
790
|
-
if (typeof
|
|
789
|
+
let w;
|
|
790
|
+
if (typeof i == "number" ? w = i : i && typeof i == "object" && "enter" in i && (w = i.enter), await lt(e, w), de(e, c), s?.onAfterEnter)
|
|
791
791
|
try {
|
|
792
792
|
s.onAfterEnter(e);
|
|
793
793
|
} catch (p) {
|
|
794
|
-
|
|
794
|
+
W("Transition onAfterEnter error:", p);
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
|
-
async function
|
|
798
|
-
const { classes: t, hooks: s, css: r, duration:
|
|
797
|
+
async function ze(e, n) {
|
|
798
|
+
const { classes: t, hooks: s, css: r, duration: i } = n;
|
|
799
799
|
if (s?.onBeforeLeave)
|
|
800
800
|
try {
|
|
801
801
|
s.onBeforeLeave(e);
|
|
802
802
|
} catch (E) {
|
|
803
|
-
|
|
803
|
+
W("Transition onBeforeLeave error:", E);
|
|
804
804
|
}
|
|
805
805
|
if (!r)
|
|
806
806
|
return s?.onLeave ? new Promise((E) => {
|
|
807
|
-
const
|
|
808
|
-
typeof
|
|
807
|
+
const g = s.onLeave;
|
|
808
|
+
typeof g == "function" ? g(e, () => {
|
|
809
809
|
if (s?.onAfterLeave)
|
|
810
810
|
try {
|
|
811
811
|
s.onAfterLeave(e);
|
|
812
|
-
} catch (
|
|
813
|
-
|
|
812
|
+
} catch (w) {
|
|
813
|
+
W("Transition onAfterLeave error:", w);
|
|
814
814
|
}
|
|
815
815
|
E();
|
|
816
816
|
}) : E();
|
|
817
817
|
}) : void 0;
|
|
818
|
-
const
|
|
819
|
-
|
|
818
|
+
const o = he(t?.leaveFrom), c = he(t?.leaveActive), f = he(t?.leaveTo);
|
|
819
|
+
ye(e, o), e.offsetHeight, ye(e, c);
|
|
820
820
|
let u;
|
|
821
821
|
if (s?.onLeave) {
|
|
822
|
-
const E = new Promise((
|
|
823
|
-
u =
|
|
822
|
+
const E = new Promise((g) => {
|
|
823
|
+
u = g;
|
|
824
824
|
});
|
|
825
825
|
try {
|
|
826
|
-
const
|
|
827
|
-
typeof
|
|
826
|
+
const g = s.onLeave;
|
|
827
|
+
typeof g == "function" && g(e, () => {
|
|
828
828
|
u && u();
|
|
829
829
|
});
|
|
830
|
-
} catch (
|
|
831
|
-
|
|
830
|
+
} catch (g) {
|
|
831
|
+
W("Transition onLeave error:", g);
|
|
832
832
|
}
|
|
833
833
|
u && await E;
|
|
834
834
|
}
|
|
835
835
|
await new Promise(
|
|
836
836
|
(E) => requestAnimationFrame(() => E(void 0))
|
|
837
|
-
), await
|
|
838
|
-
let
|
|
839
|
-
if (typeof
|
|
837
|
+
), await Pt(e, [...o, ...c]), de(e, o), ye(e, f);
|
|
838
|
+
let S;
|
|
839
|
+
if (typeof i == "number" ? S = i : i && typeof i == "object" && "leave" in i && (S = i.leave), await lt(e, S), de(e, c), de(e, f), de(e, o), s?.onAfterLeave)
|
|
840
840
|
try {
|
|
841
841
|
s.onAfterLeave(e);
|
|
842
842
|
} catch (E) {
|
|
843
|
-
|
|
843
|
+
W("Transition onAfterLeave error:", E);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
const
|
|
847
|
-
function
|
|
846
|
+
const ft = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap();
|
|
847
|
+
function Ie(e) {
|
|
848
848
|
if (!e) return;
|
|
849
|
-
const n =
|
|
849
|
+
const n = ft.get(e);
|
|
850
850
|
if (n !== void 0) return n;
|
|
851
851
|
try {
|
|
852
852
|
const t = e;
|
|
@@ -858,9 +858,9 @@ function Pe(e) {
|
|
|
858
858
|
if (t) return t;
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function G(e, n) {
|
|
862
862
|
try {
|
|
863
|
-
|
|
863
|
+
ft.set(e, n);
|
|
864
864
|
} catch {
|
|
865
865
|
}
|
|
866
866
|
try {
|
|
@@ -869,15 +869,15 @@ function q(e, n) {
|
|
|
869
869
|
}
|
|
870
870
|
try {
|
|
871
871
|
if (e instanceof Element) {
|
|
872
|
-
const t =
|
|
873
|
-
t !== null &&
|
|
872
|
+
const t = F(n);
|
|
873
|
+
t !== null && D(e, "data-anchor-key", t);
|
|
874
874
|
}
|
|
875
875
|
} catch {
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function Ht(e) {
|
|
879
879
|
if (!e) return;
|
|
880
|
-
const n =
|
|
880
|
+
const n = ut.get(e);
|
|
881
881
|
if (n !== void 0) return n;
|
|
882
882
|
try {
|
|
883
883
|
const t = e;
|
|
@@ -886,9 +886,9 @@ function Ot(e) {
|
|
|
886
886
|
} catch {
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function xt(e, n) {
|
|
890
890
|
try {
|
|
891
|
-
|
|
891
|
+
ut.set(e, n);
|
|
892
892
|
} catch {
|
|
893
893
|
}
|
|
894
894
|
try {
|
|
@@ -896,255 +896,255 @@ function $t(e, n) {
|
|
|
896
896
|
} catch {
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function me(e) {
|
|
900
900
|
return e !== null && typeof e == "object" && "value" in e;
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function Fe(e) {
|
|
903
903
|
try {
|
|
904
|
-
if (
|
|
904
|
+
if (P(e)) return e.value;
|
|
905
905
|
} catch {
|
|
906
906
|
}
|
|
907
907
|
try {
|
|
908
|
-
if (
|
|
908
|
+
if (me(e)) return e.value;
|
|
909
909
|
} catch {
|
|
910
910
|
}
|
|
911
911
|
return e;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function se(e, n, t) {
|
|
914
914
|
try {
|
|
915
915
|
e && e.attrs && (e.attrs[n] = t);
|
|
916
916
|
} catch {
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function X(e) {
|
|
920
920
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ?
|
|
922
|
+
function ge(e) {
|
|
923
|
+
return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? P(e) || "value" in e ? !!e.value : !1 : !!e;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function ue(e, n) {
|
|
926
926
|
if (!n || !(e instanceof Element)) return;
|
|
927
|
-
|
|
927
|
+
te.cleanup(e);
|
|
928
928
|
for (const s in n)
|
|
929
929
|
n[s] === e && delete n[s];
|
|
930
930
|
const t = e.childNodes;
|
|
931
931
|
for (let s = 0; s < t.length; s++)
|
|
932
|
-
|
|
932
|
+
ue(t[s], n);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function we(e, n, t) {
|
|
935
935
|
if (typeof e == "string") return;
|
|
936
936
|
const s = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), r = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
937
937
|
if (s)
|
|
938
938
|
try {
|
|
939
|
-
if (
|
|
939
|
+
if (P(s) || typeof s == "object" && "value" in s)
|
|
940
940
|
s.value = n;
|
|
941
941
|
else if (typeof s == "function")
|
|
942
942
|
s(n);
|
|
943
943
|
else if (typeof s == "string" && t)
|
|
944
944
|
try {
|
|
945
|
-
const
|
|
946
|
-
t[
|
|
945
|
+
const i = String(s);
|
|
946
|
+
t[i] = n;
|
|
947
947
|
} catch {
|
|
948
948
|
}
|
|
949
949
|
} catch {
|
|
950
950
|
}
|
|
951
951
|
else if (r && t)
|
|
952
952
|
try {
|
|
953
|
-
const
|
|
954
|
-
t[
|
|
953
|
+
const i = String(r);
|
|
954
|
+
t[i] = n;
|
|
955
955
|
} catch {
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
|
-
function
|
|
959
|
-
if (!
|
|
960
|
-
const f = n.includes("lazy"), u = n.includes("trim"),
|
|
961
|
-
if (
|
|
958
|
+
function It(e, n, t, s, r, i, o, c) {
|
|
959
|
+
if (!i) return;
|
|
960
|
+
const f = n.includes("lazy"), u = n.includes("trim"), S = n.includes("number"), E = () => {
|
|
961
|
+
if (P(e)) {
|
|
962
962
|
const d = e.value;
|
|
963
|
-
return c &&
|
|
964
|
-
}
|
|
965
|
-
const
|
|
966
|
-
return U(
|
|
967
|
-
},
|
|
968
|
-
let
|
|
969
|
-
|
|
970
|
-
const p =
|
|
971
|
-
if (
|
|
972
|
-
if (Array.isArray(
|
|
973
|
-
t[
|
|
974
|
-
String(
|
|
963
|
+
return c && o && (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement) && typeof d == "object" && d !== null ? d[c] : d;
|
|
964
|
+
}
|
|
965
|
+
const h = i?._state || i;
|
|
966
|
+
return U(h, e);
|
|
967
|
+
}, g = E();
|
|
968
|
+
let w = "text";
|
|
969
|
+
o instanceof HTMLInputElement ? w = s?.type || o.type || "text" : o instanceof HTMLSelectElement ? w = "select" : o instanceof HTMLTextAreaElement && (w = "textarea");
|
|
970
|
+
const p = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, a = p ? w === "checkbox" || w === "radio" ? "checked" : "value" : c ?? "modelValue";
|
|
971
|
+
if (w === "checkbox")
|
|
972
|
+
if (Array.isArray(g))
|
|
973
|
+
t[a] = g.includes(
|
|
974
|
+
String(o?.getAttribute("value") ?? s?.value ?? "")
|
|
975
975
|
);
|
|
976
976
|
else {
|
|
977
|
-
const
|
|
978
|
-
t[
|
|
979
|
-
}
|
|
980
|
-
else if (
|
|
981
|
-
t[
|
|
982
|
-
else if (
|
|
983
|
-
if (
|
|
984
|
-
const
|
|
977
|
+
const h = o?.getAttribute("true-value") ?? !0;
|
|
978
|
+
t[a] = g === h;
|
|
979
|
+
}
|
|
980
|
+
else if (w === "radio")
|
|
981
|
+
t[a] = g === (s?.value ?? "");
|
|
982
|
+
else if (w === "select")
|
|
983
|
+
if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
|
|
984
|
+
const h = Array.isArray(g) ? g.map(String) : [];
|
|
985
985
|
setTimeout(() => {
|
|
986
|
-
Array.from(
|
|
987
|
-
d.selected =
|
|
986
|
+
Array.from(o.options).forEach((d) => {
|
|
987
|
+
d.selected = h.includes(d.value);
|
|
988
988
|
});
|
|
989
|
-
}, 0), t[
|
|
989
|
+
}, 0), t[a] = Array.isArray(g) ? g : [];
|
|
990
990
|
} else
|
|
991
|
-
t[
|
|
991
|
+
t[a] = g;
|
|
992
992
|
else {
|
|
993
|
-
!p &&
|
|
993
|
+
!p && P(e) ? t[a] = e : t[a] = g;
|
|
994
994
|
try {
|
|
995
|
-
const
|
|
996
|
-
s && (s[
|
|
995
|
+
const h = J(a);
|
|
996
|
+
s && (s[h] = g);
|
|
997
997
|
} catch {
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
const
|
|
1001
|
-
if (
|
|
1000
|
+
const C = f || w === "checkbox" || w === "radio" || w === "select" ? "change" : "input", b = (h) => {
|
|
1001
|
+
if (h.isComposing || r._isComposing)
|
|
1002
1002
|
return;
|
|
1003
|
-
const d = globalThis.process,
|
|
1004
|
-
if (
|
|
1003
|
+
const d = globalThis.process, _ = !!d && d.env?.NODE_ENV === "test" || typeof window < "u" && globalThis.__vitest__;
|
|
1004
|
+
if (h.isTrusted === !1 && !_)
|
|
1005
1005
|
return;
|
|
1006
|
-
const
|
|
1007
|
-
if (!
|
|
1006
|
+
const T = h.target;
|
|
1007
|
+
if (!T || T._modelUpdating)
|
|
1008
1008
|
return;
|
|
1009
|
-
let
|
|
1010
|
-
if (
|
|
1011
|
-
const
|
|
1012
|
-
if (Array.isArray(
|
|
1013
|
-
const
|
|
1014
|
-
if (
|
|
1015
|
-
|
|
1009
|
+
let L = T.value;
|
|
1010
|
+
if (w === "checkbox") {
|
|
1011
|
+
const l = E();
|
|
1012
|
+
if (Array.isArray(l)) {
|
|
1013
|
+
const m = T.getAttribute("value") ?? "", A = Array.from(l);
|
|
1014
|
+
if (T.checked)
|
|
1015
|
+
A.includes(m) || A.push(m);
|
|
1016
1016
|
else {
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1017
|
+
const N = A.indexOf(m);
|
|
1018
|
+
N > -1 && A.splice(N, 1);
|
|
1019
1019
|
}
|
|
1020
|
-
|
|
1020
|
+
L = A;
|
|
1021
1021
|
} else {
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
-
}
|
|
1025
|
-
} else if (
|
|
1026
|
-
|
|
1027
|
-
else if (
|
|
1028
|
-
|
|
1029
|
-
(
|
|
1022
|
+
const m = T.getAttribute("true-value") ?? !0, A = T.getAttribute("false-value") ?? !1;
|
|
1023
|
+
L = T.checked ? m : A;
|
|
1024
|
+
}
|
|
1025
|
+
} else if (w === "radio")
|
|
1026
|
+
L = T.getAttribute("value") ?? T.value;
|
|
1027
|
+
else if (w === "select" && T.multiple)
|
|
1028
|
+
L = Array.from(T.selectedOptions).map(
|
|
1029
|
+
(l) => l.value
|
|
1030
1030
|
);
|
|
1031
|
-
else if (u && typeof
|
|
1032
|
-
const
|
|
1033
|
-
isNaN(
|
|
1031
|
+
else if (u && typeof L == "string" && (L = L.trim()), S) {
|
|
1032
|
+
const l = Number(L);
|
|
1033
|
+
isNaN(l) || (L = l);
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1036
|
-
if (
|
|
1037
|
-
|
|
1035
|
+
const y = E();
|
|
1036
|
+
if (He(L, y)) {
|
|
1037
|
+
T._modelUpdating = !0;
|
|
1038
1038
|
try {
|
|
1039
|
-
|
|
1039
|
+
tt(P(e), e, L, i, c), xe(i, P(e), e, L), T && Mt(T, a, L);
|
|
1040
1040
|
} finally {
|
|
1041
1041
|
setTimeout(
|
|
1042
|
-
() =>
|
|
1042
|
+
() => T._modelUpdating = !1,
|
|
1043
1043
|
0
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
1047
|
};
|
|
1048
1048
|
if (p) {
|
|
1049
|
-
if (r[
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1049
|
+
if (r[C]) {
|
|
1050
|
+
const h = r[C];
|
|
1051
|
+
o && te.removeListener(o, C, h);
|
|
1052
1052
|
}
|
|
1053
|
-
r[
|
|
1053
|
+
r[C] = b;
|
|
1054
1054
|
} else {
|
|
1055
|
-
const
|
|
1056
|
-
if (r[
|
|
1057
|
-
const
|
|
1058
|
-
|
|
1055
|
+
const h = `update:${J(a)}`, d = `update:${a}`;
|
|
1056
|
+
if (r[h]) {
|
|
1057
|
+
const _ = r[h];
|
|
1058
|
+
o && te.removeListener(o, h, _);
|
|
1059
1059
|
}
|
|
1060
1060
|
if (r[d]) {
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1063
|
-
}
|
|
1064
|
-
if (r[
|
|
1065
|
-
const
|
|
1066
|
-
let
|
|
1067
|
-
if (
|
|
1068
|
-
const
|
|
1069
|
-
if (
|
|
1061
|
+
const _ = r[d];
|
|
1062
|
+
o && te.removeListener(o, d, _);
|
|
1063
|
+
}
|
|
1064
|
+
if (r[h] = (_) => {
|
|
1065
|
+
const T = _.detail;
|
|
1066
|
+
let L = T !== void 0 ? T : void 0;
|
|
1067
|
+
if (L === void 0) {
|
|
1068
|
+
const l = _.target;
|
|
1069
|
+
if (l && typeof l == "object" && "value" in l)
|
|
1070
1070
|
try {
|
|
1071
|
-
|
|
1071
|
+
L = l.value;
|
|
1072
1072
|
} catch {
|
|
1073
|
-
|
|
1073
|
+
L = void 0;
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1076
|
+
const y = $t(
|
|
1077
|
+
P(e),
|
|
1078
1078
|
e,
|
|
1079
|
-
|
|
1079
|
+
i,
|
|
1080
1080
|
c
|
|
1081
1081
|
);
|
|
1082
|
-
if (
|
|
1083
|
-
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1086
|
-
y,
|
|
1082
|
+
if (He(L, y)) {
|
|
1083
|
+
tt(P(e), e, L, i, c), xe(i, P(e), e, L);
|
|
1084
|
+
const l = _.target;
|
|
1085
|
+
l && nt(
|
|
1087
1086
|
l,
|
|
1088
|
-
|
|
1089
|
-
|
|
1087
|
+
a,
|
|
1088
|
+
P(e) ? e : L,
|
|
1089
|
+
P(e)
|
|
1090
1090
|
);
|
|
1091
1091
|
}
|
|
1092
|
-
},
|
|
1093
|
-
let
|
|
1092
|
+
}, P(e) && typeof e.value == "object" && e.value !== null) {
|
|
1093
|
+
let _ = [];
|
|
1094
1094
|
try {
|
|
1095
|
-
|
|
1095
|
+
_ = Reflect.ownKeys(e.value);
|
|
1096
1096
|
} catch {
|
|
1097
|
-
|
|
1097
|
+
_ = Object.keys(e.value);
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1100
|
-
(
|
|
1099
|
+
const T = _.filter(
|
|
1100
|
+
(L) => typeof L == "string" && !String(L).startsWith("_") && L !== "constructor"
|
|
1101
1101
|
);
|
|
1102
|
-
for (const
|
|
1103
|
-
const
|
|
1104
|
-
r[
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1102
|
+
for (const L of T) {
|
|
1103
|
+
const y = String(L), k = `update:${J(y)}`, l = `update:${y}`;
|
|
1104
|
+
r[k] || (r[k] = (m) => {
|
|
1105
|
+
const A = m.detail !== void 0 ? m.detail : m.target?.value, N = P(e) ? e.value[y] : U(
|
|
1106
|
+
i?._state || i,
|
|
1107
1107
|
e
|
|
1108
1108
|
);
|
|
1109
|
-
if (!
|
|
1110
|
-
if (
|
|
1111
|
-
const
|
|
1109
|
+
if (!He(A, N)) return;
|
|
1110
|
+
if (P(e)) {
|
|
1111
|
+
const R = {
|
|
1112
1112
|
...e.value
|
|
1113
1113
|
};
|
|
1114
|
-
|
|
1114
|
+
R[y] = A, e.value = R;
|
|
1115
1115
|
} else
|
|
1116
|
-
|
|
1117
|
-
|
|
1116
|
+
Re(
|
|
1117
|
+
i?._state || i,
|
|
1118
1118
|
e,
|
|
1119
|
-
|
|
1119
|
+
A
|
|
1120
1120
|
);
|
|
1121
|
-
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1121
|
+
xe(i, P(e), e, A);
|
|
1122
|
+
const $ = m.currentTarget || o || m.target;
|
|
1123
|
+
$ && nt(
|
|
1124
|
+
$,
|
|
1125
|
+
a,
|
|
1126
|
+
P(e) ? e : A,
|
|
1127
|
+
P(e)
|
|
1128
1128
|
);
|
|
1129
|
-
}, r[
|
|
1129
|
+
}, r[l] = r[k]);
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
r[d] = r[
|
|
1132
|
+
r[d] = r[h];
|
|
1133
1133
|
}
|
|
1134
|
-
(
|
|
1134
|
+
(w === "text" || w === "textarea") && (r.compositionstart = () => r._isComposing = !0, r.compositionend = (h) => {
|
|
1135
1135
|
r._isComposing = !1;
|
|
1136
|
-
const d =
|
|
1136
|
+
const d = h.target;
|
|
1137
1137
|
d && setTimeout(() => {
|
|
1138
|
-
const
|
|
1139
|
-
let
|
|
1140
|
-
if (u && (
|
|
1141
|
-
const
|
|
1142
|
-
isNaN(
|
|
1138
|
+
const _ = d.value, T = i?._state || i, L = U(T, e);
|
|
1139
|
+
let y = _;
|
|
1140
|
+
if (u && (y = y.trim()), S) {
|
|
1141
|
+
const l = Number(y);
|
|
1142
|
+
isNaN(l) || (y = l);
|
|
1143
1143
|
}
|
|
1144
|
-
if (
|
|
1144
|
+
if (He(y, L)) {
|
|
1145
1145
|
d._modelUpdating = !0;
|
|
1146
1146
|
try {
|
|
1147
|
-
|
|
1147
|
+
Re(T, e, y), xe(i, P(e), e, y);
|
|
1148
1148
|
} finally {
|
|
1149
1149
|
setTimeout(
|
|
1150
1150
|
() => d._modelUpdating = !1,
|
|
@@ -1155,97 +1155,97 @@ function jt(e, n, t, s, r, o, i, c) {
|
|
|
1155
1155
|
}, 0);
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function pt(e) {
|
|
1159
1159
|
const n = e.slice(2);
|
|
1160
1160
|
return n ? n.charAt(0).toLowerCase() + n.slice(1) : "";
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function Rt(e, n, t, s, r) {
|
|
1163
1163
|
if (typeof e == "object" && e !== null)
|
|
1164
|
-
for (const [
|
|
1165
|
-
if (
|
|
1166
|
-
t[
|
|
1167
|
-
else if (
|
|
1168
|
-
const c =
|
|
1164
|
+
for (const [i, o] of Object.entries(e))
|
|
1165
|
+
if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
|
|
1166
|
+
t[i] = o;
|
|
1167
|
+
else if (i === "disabled" && r && X(r)) {
|
|
1168
|
+
const c = o && typeof o == "object" && "value" in o;
|
|
1169
1169
|
(() => {
|
|
1170
1170
|
try {
|
|
1171
|
-
return
|
|
1171
|
+
return P(o);
|
|
1172
1172
|
} catch {
|
|
1173
1173
|
return !1;
|
|
1174
1174
|
}
|
|
1175
|
-
})() || c ? n[
|
|
1175
|
+
})() || c ? n[i] = o : t[i] = o;
|
|
1176
1176
|
} else
|
|
1177
|
-
n[
|
|
1177
|
+
n[i] = o;
|
|
1178
1178
|
else if (typeof e == "string") {
|
|
1179
1179
|
if (!s) return;
|
|
1180
1180
|
try {
|
|
1181
|
-
const
|
|
1182
|
-
if (typeof
|
|
1183
|
-
for (const [
|
|
1184
|
-
if (
|
|
1185
|
-
t[
|
|
1186
|
-
else if (
|
|
1181
|
+
const i = Me(e, s);
|
|
1182
|
+
if (typeof i == "object" && i !== null) {
|
|
1183
|
+
for (const [o, c] of Object.entries(i))
|
|
1184
|
+
if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
|
|
1185
|
+
t[o] = c;
|
|
1186
|
+
else if (o === "disabled" && r && X(r)) {
|
|
1187
1187
|
const f = c && typeof c == "object" && "value" in c;
|
|
1188
1188
|
(() => {
|
|
1189
1189
|
try {
|
|
1190
|
-
return
|
|
1190
|
+
return P(c);
|
|
1191
1191
|
} catch {
|
|
1192
1192
|
return !1;
|
|
1193
1193
|
}
|
|
1194
|
-
})() || f ? n[
|
|
1194
|
+
})() || f ? n[o] = c : t[o] = c;
|
|
1195
1195
|
} else
|
|
1196
|
-
n[
|
|
1196
|
+
n[o] = c;
|
|
1197
1197
|
return;
|
|
1198
1198
|
} else {
|
|
1199
|
-
t[e] =
|
|
1199
|
+
t[e] = i;
|
|
1200
1200
|
return;
|
|
1201
1201
|
}
|
|
1202
1202
|
} catch {
|
|
1203
|
-
const
|
|
1203
|
+
const i = U(
|
|
1204
1204
|
s,
|
|
1205
1205
|
e
|
|
1206
1206
|
);
|
|
1207
|
-
t[e] =
|
|
1207
|
+
t[e] = i;
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Bt(e, n, t) {
|
|
1212
1212
|
let s;
|
|
1213
1213
|
if (typeof e == "string") {
|
|
1214
1214
|
if (!t) return;
|
|
1215
|
-
s =
|
|
1215
|
+
s = Me(e, t);
|
|
1216
1216
|
} else
|
|
1217
1217
|
s = e;
|
|
1218
1218
|
const r = String(n.style || "");
|
|
1219
|
-
let
|
|
1219
|
+
let i = r;
|
|
1220
1220
|
if (s) {
|
|
1221
1221
|
if (r) {
|
|
1222
|
-
const
|
|
1222
|
+
const o = String(r).split(";").map((f) => f.trim()).filter(Boolean), c = o.findIndex(
|
|
1223
1223
|
(f) => f.startsWith("display:")
|
|
1224
1224
|
);
|
|
1225
|
-
c >= 0 &&
|
|
1225
|
+
c >= 0 && o[c] === "display: none" && (o.splice(c, 1), i = o.length > 0 ? o.join("; ") + ";" : "");
|
|
1226
1226
|
}
|
|
1227
1227
|
} else if (r) {
|
|
1228
|
-
const
|
|
1228
|
+
const o = String(r).split(";").filter(Boolean), c = o.findIndex(
|
|
1229
1229
|
(f) => f.trim().startsWith("display:")
|
|
1230
1230
|
);
|
|
1231
|
-
c >= 0 ?
|
|
1231
|
+
c >= 0 ? o[c] = "display: none" : o.push("display: none"), i = o.join("; ");
|
|
1232
1232
|
} else
|
|
1233
|
-
|
|
1234
|
-
|
|
1233
|
+
i = "display: none";
|
|
1234
|
+
i !== r && (i ? n.style = i : n.style = void 0);
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1237
|
-
return
|
|
1236
|
+
function Me(e, n) {
|
|
1237
|
+
return Ot.evaluate(e, n);
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function Dt(e, n, t, s) {
|
|
1240
1240
|
let r;
|
|
1241
1241
|
if (typeof e == "string") {
|
|
1242
1242
|
if (!t) return;
|
|
1243
|
-
r =
|
|
1243
|
+
r = Me(e, t);
|
|
1244
1244
|
} else
|
|
1245
1245
|
r = e;
|
|
1246
1246
|
try {
|
|
1247
1247
|
if (r && typeof r == "object") {
|
|
1248
|
-
if (
|
|
1248
|
+
if (P(r))
|
|
1249
1249
|
r = r.value;
|
|
1250
1250
|
else if ("value" in r && typeof r.value < "u") {
|
|
1251
1251
|
const u = r.value;
|
|
@@ -1254,18 +1254,18 @@ function xt(e, n, t, s) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
} catch {
|
|
1256
1256
|
}
|
|
1257
|
-
let
|
|
1257
|
+
let i = [];
|
|
1258
1258
|
if (typeof r == "string")
|
|
1259
|
-
|
|
1259
|
+
i = [r];
|
|
1260
1260
|
else if (Array.isArray(r))
|
|
1261
|
-
|
|
1261
|
+
i = r.filter(Boolean);
|
|
1262
1262
|
else if (typeof r == "object" && r !== null)
|
|
1263
|
-
for (const [u,
|
|
1264
|
-
|
|
1265
|
-
const
|
|
1263
|
+
for (const [u, S] of Object.entries(r))
|
|
1264
|
+
S && i.push(u);
|
|
1265
|
+
const o = i.join(" "), c = s && s.class || n.class || "", f = c ? `${c} ${o}`.trim() : o.trim();
|
|
1266
1266
|
f ? n.class = f : n.class = void 0;
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function Ve(e) {
|
|
1269
1269
|
if (e === !0 || e === !1) return !0;
|
|
1270
1270
|
if (e == null) return !1;
|
|
1271
1271
|
if (typeof e === "string") return e === "" || e === "true" || e === "false";
|
|
@@ -1278,24 +1278,24 @@ function Ue(e) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
return !1;
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function Wt(e, n, t) {
|
|
1282
1282
|
let s;
|
|
1283
1283
|
if (typeof e == "string") {
|
|
1284
1284
|
if (!t) return;
|
|
1285
|
-
s =
|
|
1285
|
+
s = Me(e, t);
|
|
1286
1286
|
} else
|
|
1287
1287
|
s = e;
|
|
1288
1288
|
let r = "";
|
|
1289
1289
|
if (typeof s == "string")
|
|
1290
1290
|
r = s;
|
|
1291
1291
|
else if (s && typeof s == "object") {
|
|
1292
|
-
const
|
|
1292
|
+
const o = [];
|
|
1293
1293
|
for (const [c, f] of Object.entries(s))
|
|
1294
1294
|
if (f != null && f !== "") {
|
|
1295
1295
|
const u = c.replace(
|
|
1296
1296
|
/[A-Z]/g,
|
|
1297
|
-
(
|
|
1298
|
-
),
|
|
1297
|
+
(g) => `-${g.toLowerCase()}`
|
|
1298
|
+
), S = [
|
|
1299
1299
|
"width",
|
|
1300
1300
|
"height",
|
|
1301
1301
|
"top",
|
|
@@ -1322,66 +1322,66 @@ function Ht(e, n, t) {
|
|
|
1322
1322
|
"max-height"
|
|
1323
1323
|
];
|
|
1324
1324
|
let E = String(f);
|
|
1325
|
-
typeof f == "number" &&
|
|
1325
|
+
typeof f == "number" && S.includes(u) && (E = `${f}px`), o.push(`${u}: ${E}`);
|
|
1326
1326
|
}
|
|
1327
|
-
r =
|
|
1327
|
+
r = o.join("; ") + (o.length > 0 ? ";" : "");
|
|
1328
1328
|
}
|
|
1329
|
-
const
|
|
1330
|
-
n.style =
|
|
1329
|
+
const i = String(n.style || "");
|
|
1330
|
+
n.style = i + (i && !i.endsWith(";") ? "; " : "") + r;
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function zt(e, n, t) {
|
|
1333
1333
|
let s = e;
|
|
1334
|
-
typeof e == "string" && t && (s =
|
|
1334
|
+
typeof e == "string" && t && (s = Me(e, t)), P(s) ? n.reactiveRef = s : n.ref = s;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1337
|
-
const r = {},
|
|
1336
|
+
function dt(e, n, t, s) {
|
|
1337
|
+
const r = {}, i = { ...s || {} }, o = {};
|
|
1338
1338
|
for (const [c, f] of Object.entries(e)) {
|
|
1339
|
-
const { value: u, modifiers:
|
|
1339
|
+
const { value: u, modifiers: S, arg: E } = f;
|
|
1340
1340
|
if (c === "model" || c.startsWith("model:")) {
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1341
|
+
const g = c.split(":"), w = g.length > 1 ? g[1] : E;
|
|
1342
|
+
It(
|
|
1343
1343
|
u,
|
|
1344
1344
|
// Pass the original value (could be string or reactive state object)
|
|
1345
|
-
|
|
1345
|
+
S,
|
|
1346
1346
|
r,
|
|
1347
|
-
o,
|
|
1348
1347
|
i,
|
|
1348
|
+
o,
|
|
1349
1349
|
n,
|
|
1350
1350
|
t,
|
|
1351
|
-
|
|
1351
|
+
w
|
|
1352
1352
|
);
|
|
1353
1353
|
continue;
|
|
1354
1354
|
}
|
|
1355
1355
|
switch (c) {
|
|
1356
1356
|
case "bind":
|
|
1357
|
-
|
|
1357
|
+
Rt(u, r, i, n, t);
|
|
1358
1358
|
break;
|
|
1359
1359
|
case "show":
|
|
1360
|
-
|
|
1360
|
+
Bt(u, i, n);
|
|
1361
1361
|
break;
|
|
1362
1362
|
case "class":
|
|
1363
|
-
|
|
1363
|
+
Dt(u, i, n, s);
|
|
1364
1364
|
break;
|
|
1365
1365
|
case "style":
|
|
1366
|
-
|
|
1366
|
+
Wt(u, i, n);
|
|
1367
1367
|
break;
|
|
1368
1368
|
case "ref":
|
|
1369
|
-
|
|
1369
|
+
zt(u, r, n);
|
|
1370
1370
|
break;
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
1373
|
try {
|
|
1374
|
-
if (Object.prototype.hasOwnProperty.call(r, "disabled") && t &&
|
|
1374
|
+
if (Object.prototype.hasOwnProperty.call(r, "disabled") && t && X(t)) {
|
|
1375
1375
|
const f = r.disabled, u = f && typeof f == "object" && "value" in f;
|
|
1376
|
-
let
|
|
1376
|
+
let S = !1;
|
|
1377
1377
|
try {
|
|
1378
|
-
|
|
1378
|
+
S = P(f);
|
|
1379
1379
|
} catch {
|
|
1380
|
-
|
|
1380
|
+
S = !1;
|
|
1381
1381
|
}
|
|
1382
|
-
if (!u && !
|
|
1382
|
+
if (!u && !S)
|
|
1383
1383
|
try {
|
|
1384
|
-
|
|
1384
|
+
i.disabled = f, delete r.disabled;
|
|
1385
1385
|
const E = globalThis;
|
|
1386
1386
|
E.__VDOM_DISABLED_PROMOTIONS || (E.__VDOM_DISABLED_PROMOTIONS = []), E.__VDOM_DISABLED_PROMOTIONS.push({
|
|
1387
1387
|
phase: "bind-directive:postfix-move",
|
|
@@ -1396,148 +1396,148 @@ function lt(e, n, t, s) {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
} catch {
|
|
1398
1398
|
}
|
|
1399
|
-
return { props: r, attrs:
|
|
1399
|
+
return { props: r, attrs: i, listeners: o };
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function qe(e, n) {
|
|
1402
1402
|
if (Array.isArray(e)) {
|
|
1403
|
-
const
|
|
1404
|
-
return e.map((
|
|
1405
|
-
if (!
|
|
1406
|
-
let c =
|
|
1403
|
+
const i = /* @__PURE__ */ new Set();
|
|
1404
|
+
return e.map((o) => {
|
|
1405
|
+
if (!o || typeof o != "object") return o;
|
|
1406
|
+
let c = o.props?.key ?? o.key;
|
|
1407
1407
|
if (!c) {
|
|
1408
|
-
const E =
|
|
1408
|
+
const E = o.tag || "node", w = [
|
|
1409
1409
|
// attrs (kebab-case)
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1410
|
+
o.props?.attrs?.id,
|
|
1411
|
+
o.props?.attrs?.name,
|
|
1412
|
+
o.props?.attrs?.["data-key"],
|
|
1413
1413
|
// promoted JS props (camelCase or original)
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1414
|
+
o.props?.props?.id,
|
|
1415
|
+
o.props?.props?.name,
|
|
1416
|
+
o.props?.props?.dataKey,
|
|
1417
|
+
o.props?.props?.["data-key"]
|
|
1418
1418
|
].find((p) => p != null) ?? "";
|
|
1419
|
-
c =
|
|
1419
|
+
c = w ? `${n}:${E}:${w}` : `${n}:${E}`;
|
|
1420
1420
|
}
|
|
1421
1421
|
let f = c, u = 1;
|
|
1422
|
-
for (;
|
|
1422
|
+
for (; i.has(f); )
|
|
1423
1423
|
f = `${c}#${u++}`;
|
|
1424
|
-
|
|
1425
|
-
let
|
|
1426
|
-
return Array.isArray(
|
|
1424
|
+
i.add(f);
|
|
1425
|
+
let S = o.children;
|
|
1426
|
+
return Array.isArray(S) && (S = qe(S, f)), { ...o, key: f, children: S };
|
|
1427
1427
|
});
|
|
1428
1428
|
}
|
|
1429
1429
|
const t = e, s = t.props?.key ?? t.key ?? n;
|
|
1430
1430
|
let r = t.children;
|
|
1431
|
-
return Array.isArray(r) && (r =
|
|
1431
|
+
return Array.isArray(r) && (r = qe(r, s)), { ...t, key: s, children: r };
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
const r = t.directives ?? {},
|
|
1433
|
+
function rt(e, n, t, s) {
|
|
1434
|
+
const r = t.directives ?? {}, i = dt(
|
|
1435
1435
|
r,
|
|
1436
1436
|
s,
|
|
1437
1437
|
e,
|
|
1438
1438
|
t.attrs
|
|
1439
|
-
),
|
|
1439
|
+
), o = {
|
|
1440
1440
|
...n.props || {},
|
|
1441
1441
|
...t.props || {},
|
|
1442
|
-
...
|
|
1442
|
+
...i.props || {}
|
|
1443
1443
|
}, c = {
|
|
1444
1444
|
...n.attrs || {},
|
|
1445
1445
|
...t.attrs || {},
|
|
1446
|
-
...
|
|
1447
|
-
}, f = n.props ?? {}, u =
|
|
1446
|
+
...i.attrs || {}
|
|
1447
|
+
}, f = n.props ?? {}, u = o, S = !!(t?.isCustomElement ?? n?.isCustomElement ?? !1);
|
|
1448
1448
|
let E = !1;
|
|
1449
1449
|
for (const p in { ...f, ...u }) {
|
|
1450
|
-
const
|
|
1451
|
-
let
|
|
1452
|
-
if (
|
|
1453
|
-
(
|
|
1454
|
-
}),
|
|
1455
|
-
(
|
|
1456
|
-
}), !(
|
|
1450
|
+
const v = f[p], a = u[p];
|
|
1451
|
+
let C = v, b = a;
|
|
1452
|
+
if (H(() => {
|
|
1453
|
+
(P(v) || me(v)) && (C = v.value);
|
|
1454
|
+
}), H(() => {
|
|
1455
|
+
(P(a) || me(a)) && (b = a.value);
|
|
1456
|
+
}), !(v === a && C === b))
|
|
1457
1457
|
if (E = !0, p === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
|
|
1458
|
-
const
|
|
1458
|
+
const h = Fe(a), d = h == null ? "" : String(h);
|
|
1459
1459
|
e.value !== d && (e.value = d);
|
|
1460
1460
|
} else if (p === "checked" && e instanceof HTMLInputElement) {
|
|
1461
|
-
const
|
|
1462
|
-
e.checked = !!
|
|
1463
|
-
} else if (p.startsWith("on") && typeof
|
|
1464
|
-
const
|
|
1465
|
-
typeof
|
|
1461
|
+
const h = Fe(a);
|
|
1462
|
+
e.checked = !!h;
|
|
1463
|
+
} else if (p.startsWith("on") && typeof a == "function") {
|
|
1464
|
+
const h = pt(p);
|
|
1465
|
+
typeof v == "function" && te.removeListener(e, h, v), typeof a == "function" && te.addListener(e, h, a);
|
|
1466
1466
|
try {
|
|
1467
|
-
if (
|
|
1468
|
-
const d =
|
|
1469
|
-
let
|
|
1467
|
+
if (h && h.startsWith("update:")) {
|
|
1468
|
+
const d = h.split(":", 2)[1], _ = u[d];
|
|
1469
|
+
let T = [];
|
|
1470
1470
|
try {
|
|
1471
|
-
if (
|
|
1472
|
-
const
|
|
1473
|
-
|
|
1474
|
-
} else
|
|
1471
|
+
if (P(_)) {
|
|
1472
|
+
const y = _.value;
|
|
1473
|
+
T = y && typeof y == "object" ? Object.keys(y) : [];
|
|
1474
|
+
} else _ && typeof _ == "object" && (T = Object.keys(_));
|
|
1475
1475
|
} catch {
|
|
1476
|
-
|
|
1476
|
+
T = [];
|
|
1477
1477
|
}
|
|
1478
|
-
const
|
|
1479
|
-
(
|
|
1478
|
+
const L = T.filter(
|
|
1479
|
+
(y) => typeof y == "string" && !y.startsWith("_") && y !== "constructor"
|
|
1480
1480
|
);
|
|
1481
|
-
for (const
|
|
1482
|
-
const
|
|
1483
|
-
const
|
|
1481
|
+
for (const y of L) {
|
|
1482
|
+
const k = `update:${y}`, l = (m) => {
|
|
1483
|
+
const A = m.detail !== void 0 ? m.detail : m.target instanceof HTMLInputElement || m.target instanceof HTMLTextAreaElement || m.target instanceof HTMLSelectElement ? m.target.value : void 0, O = { ...P(_) ? _.value || {} : u[d] || {}, [y]: A };
|
|
1484
1484
|
try {
|
|
1485
|
-
typeof
|
|
1485
|
+
typeof a == "function" && a({
|
|
1486
1486
|
detail: O
|
|
1487
1487
|
});
|
|
1488
1488
|
} catch {
|
|
1489
1489
|
}
|
|
1490
1490
|
};
|
|
1491
|
-
|
|
1492
|
-
|
|
1491
|
+
H(() => {
|
|
1492
|
+
te.addListener(e, k, l);
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
} catch {
|
|
1497
1497
|
}
|
|
1498
|
-
} else if (
|
|
1499
|
-
|
|
1498
|
+
} else if (a == null)
|
|
1499
|
+
q(e, p);
|
|
1500
1500
|
else {
|
|
1501
|
-
const
|
|
1502
|
-
if (
|
|
1501
|
+
const h = t?.isCustomElement ?? n?.isCustomElement ?? !1;
|
|
1502
|
+
if (h || p in e)
|
|
1503
1503
|
try {
|
|
1504
|
-
e[p] =
|
|
1504
|
+
e[p] = a, p === "disabled" && a === !1 && !h && X(e) && q(e, "disabled");
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
1507
|
else
|
|
1508
|
-
|
|
1508
|
+
a === !1 && q(e, p);
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
for (const [p,
|
|
1512
|
-
|
|
1511
|
+
for (const [p, v] of Object.entries(
|
|
1512
|
+
i.listeners || {}
|
|
1513
1513
|
)) {
|
|
1514
|
-
|
|
1514
|
+
te.addListener(e, p, v);
|
|
1515
1515
|
try {
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1518
|
-
|
|
1516
|
+
const a = e && e.parentElement;
|
|
1517
|
+
a && a !== e && te.addListener(
|
|
1518
|
+
a,
|
|
1519
1519
|
p,
|
|
1520
|
-
|
|
1520
|
+
v
|
|
1521
1521
|
);
|
|
1522
1522
|
} catch {
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1525
|
+
const g = { ...n.attrs ?? {} }, w = c;
|
|
1526
1526
|
try {
|
|
1527
|
-
const p =
|
|
1527
|
+
const p = i && i.attrs || {};
|
|
1528
1528
|
if (Object.prototype.hasOwnProperty.call(p, "class") && p.class === void 0 && typeof e.getAttribute == "function") {
|
|
1529
|
-
const
|
|
1530
|
-
|
|
1529
|
+
const v = e.getAttribute("class");
|
|
1530
|
+
v !== null && (g.class = v);
|
|
1531
1531
|
}
|
|
1532
1532
|
if (Object.prototype.hasOwnProperty.call(p, "style") && p.style === void 0 && typeof e.getAttribute == "function") {
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1533
|
+
const v = e.getAttribute("style");
|
|
1534
|
+
v !== null && (g.style = v);
|
|
1535
1535
|
}
|
|
1536
1536
|
try {
|
|
1537
1537
|
if (typeof e.getAttribute == "function") {
|
|
1538
|
-
const
|
|
1538
|
+
const v = e.getAttribute("class");
|
|
1539
1539
|
try {
|
|
1540
|
-
e instanceof HTMLInputElement && e.type === "text" &&
|
|
1540
|
+
e instanceof HTMLInputElement && e.type === "text" && v !== null && v !== g.class && (g.class = v);
|
|
1541
1541
|
} catch {
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
@@ -1545,544 +1545,544 @@ function et(e, n, t, s) {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
} catch {
|
|
1547
1547
|
}
|
|
1548
|
-
for (const p in { ...
|
|
1549
|
-
const
|
|
1550
|
-
let
|
|
1551
|
-
if (
|
|
1548
|
+
for (const p in { ...g, ...w }) {
|
|
1549
|
+
const v = g[p], a = w[p];
|
|
1550
|
+
let C = v, b = a;
|
|
1551
|
+
if (P(v) && (C = v.value), P(a) && (b = a.value), C !== b)
|
|
1552
1552
|
if (E = !0, b == null || b === !1)
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
}),
|
|
1553
|
+
H(() => {
|
|
1554
|
+
q(e, p);
|
|
1555
|
+
}), se(n, p, void 0), p === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? H(() => {
|
|
1556
1556
|
e.value = "";
|
|
1557
|
-
}) : e instanceof HTMLSelectElement ?
|
|
1557
|
+
}) : e instanceof HTMLSelectElement ? H(() => {
|
|
1558
1558
|
e.value = "";
|
|
1559
|
-
}) : e instanceof HTMLProgressElement &&
|
|
1559
|
+
}) : e instanceof HTMLProgressElement && H(() => {
|
|
1560
1560
|
e.value = 0;
|
|
1561
|
-
})), p === "checked" && e instanceof HTMLInputElement &&
|
|
1561
|
+
})), p === "checked" && e instanceof HTMLInputElement && H(() => {
|
|
1562
1562
|
e.checked = !1;
|
|
1563
|
-
}), p === "disabled" &&
|
|
1563
|
+
}), p === "disabled" && X(e) && H(() => {
|
|
1564
1564
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = !1);
|
|
1565
1565
|
});
|
|
1566
1566
|
else {
|
|
1567
1567
|
if (p === "value") {
|
|
1568
1568
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
1569
|
-
|
|
1569
|
+
H(() => {
|
|
1570
1570
|
e.value = b ?? "";
|
|
1571
1571
|
});
|
|
1572
1572
|
continue;
|
|
1573
1573
|
} else if (e instanceof HTMLSelectElement) {
|
|
1574
|
-
|
|
1574
|
+
H(() => {
|
|
1575
1575
|
e.value = b ?? "";
|
|
1576
1576
|
});
|
|
1577
1577
|
continue;
|
|
1578
1578
|
} else if (e instanceof HTMLProgressElement) {
|
|
1579
|
-
|
|
1579
|
+
H(() => {
|
|
1580
1580
|
e.value = Number(b);
|
|
1581
1581
|
});
|
|
1582
1582
|
continue;
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
1585
1585
|
if (p === "checked" && e instanceof HTMLInputElement) {
|
|
1586
|
-
|
|
1586
|
+
H(() => {
|
|
1587
1587
|
e.checked = !!b;
|
|
1588
1588
|
});
|
|
1589
1589
|
continue;
|
|
1590
1590
|
}
|
|
1591
1591
|
if (p === "style") {
|
|
1592
|
-
const d =
|
|
1593
|
-
d !== null &&
|
|
1592
|
+
const d = F(b);
|
|
1593
|
+
d !== null && D(e, p, String(d)), se(n, p, b);
|
|
1594
1594
|
continue;
|
|
1595
1595
|
}
|
|
1596
1596
|
if (p === "class") {
|
|
1597
|
-
const d =
|
|
1598
|
-
d !== null &&
|
|
1597
|
+
const d = F(b);
|
|
1598
|
+
d !== null && D(e, p, String(d)), se(n, p, b);
|
|
1599
1599
|
continue;
|
|
1600
1600
|
}
|
|
1601
|
-
if (p === "disabled" &&
|
|
1602
|
-
|
|
1603
|
-
const d =
|
|
1601
|
+
if (p === "disabled" && X(e)) {
|
|
1602
|
+
H(() => {
|
|
1603
|
+
const d = ge(b);
|
|
1604
1604
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = d);
|
|
1605
|
-
}),
|
|
1606
|
-
|
|
1607
|
-
}) :
|
|
1608
|
-
|
|
1605
|
+
}), ge(b) ? H(() => {
|
|
1606
|
+
D(e, p, "");
|
|
1607
|
+
}) : H(() => {
|
|
1608
|
+
q(e, p);
|
|
1609
1609
|
});
|
|
1610
1610
|
continue;
|
|
1611
1611
|
}
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1614
|
-
if (
|
|
1615
|
-
const d =
|
|
1612
|
+
const h = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1613
|
+
if (S && !h && p.includes("-"))
|
|
1614
|
+
if (at(p)) {
|
|
1615
|
+
const d = F(a ?? b);
|
|
1616
1616
|
if (d !== null) {
|
|
1617
1617
|
try {
|
|
1618
|
-
|
|
1618
|
+
D(e, p, String(d));
|
|
1619
1619
|
} catch {
|
|
1620
1620
|
}
|
|
1621
|
-
|
|
1621
|
+
se(n, p, b);
|
|
1622
1622
|
}
|
|
1623
1623
|
} else {
|
|
1624
|
-
const d =
|
|
1624
|
+
const d = Ze(p);
|
|
1625
1625
|
try {
|
|
1626
|
-
const
|
|
1627
|
-
|
|
1626
|
+
const _ = e;
|
|
1627
|
+
_[d] = P(a) ? a : b, se(n, p, b);
|
|
1628
1628
|
} catch {
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1629
|
+
const _ = F(a ?? b);
|
|
1630
|
+
_ !== null && D(e, p, String(_));
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
|
-
else if (!
|
|
1633
|
+
else if (!h && p in e)
|
|
1634
1634
|
try {
|
|
1635
1635
|
const d = e;
|
|
1636
|
-
d[p] =
|
|
1636
|
+
d[p] = P(a) ? a : b, se(n, p, b);
|
|
1637
1637
|
} catch {
|
|
1638
|
-
const d =
|
|
1639
|
-
d !== null && (
|
|
1638
|
+
const d = F(b);
|
|
1639
|
+
d !== null && (D(e, p, String(d)), se(n, p, b));
|
|
1640
1640
|
}
|
|
1641
1641
|
else {
|
|
1642
|
-
const d =
|
|
1643
|
-
d !== null && (
|
|
1642
|
+
const d = F(b);
|
|
1643
|
+
d !== null && (D(e, p, String(d)), se(n, p, b));
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
try {
|
|
1648
|
-
if (
|
|
1649
|
-
const p =
|
|
1650
|
-
let
|
|
1648
|
+
if (X(e)) {
|
|
1649
|
+
const p = o.disabled;
|
|
1650
|
+
let v;
|
|
1651
1651
|
try {
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1652
|
+
const C = Object.prototype.hasOwnProperty.call(
|
|
1653
|
+
i.props || {},
|
|
1654
1654
|
"disabled"
|
|
1655
1655
|
), b = p && typeof p == "object" && "value" in p;
|
|
1656
|
-
let
|
|
1657
|
-
|
|
1658
|
-
|
|
1656
|
+
let h = !1;
|
|
1657
|
+
H(() => {
|
|
1658
|
+
h = !!P(p);
|
|
1659
1659
|
});
|
|
1660
|
-
const d =
|
|
1661
|
-
|
|
1660
|
+
const d = Ve(p);
|
|
1661
|
+
h || b || C || d ? v = p : v = c.disabled;
|
|
1662
1662
|
} catch {
|
|
1663
|
-
|
|
1664
|
-
}
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1667
|
-
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled =
|
|
1668
|
-
}),
|
|
1669
|
-
|
|
1670
|
-
}) :
|
|
1671
|
-
|
|
1663
|
+
v = c.disabled;
|
|
1664
|
+
}
|
|
1665
|
+
const a = ge(v);
|
|
1666
|
+
H(() => {
|
|
1667
|
+
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = a);
|
|
1668
|
+
}), a ? H(() => {
|
|
1669
|
+
D(e, "disabled", "");
|
|
1670
|
+
}) : H(() => {
|
|
1671
|
+
q(e, "disabled");
|
|
1672
1672
|
});
|
|
1673
1673
|
}
|
|
1674
1674
|
} catch {
|
|
1675
1675
|
}
|
|
1676
|
-
if (
|
|
1676
|
+
if (S && E) {
|
|
1677
1677
|
const p = e;
|
|
1678
|
-
|
|
1678
|
+
H(() => {
|
|
1679
1679
|
p._applyProps?.(p._cfg);
|
|
1680
|
-
}),
|
|
1680
|
+
}), H(() => {
|
|
1681
1681
|
typeof p.requestRender == "function" ? p.requestRender() : typeof p._render == "function" && p._render?.(p._cfg);
|
|
1682
1682
|
});
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function Z(e, n, t, s = null) {
|
|
1686
1686
|
if (typeof e == "string")
|
|
1687
1687
|
return document.createTextNode(e);
|
|
1688
1688
|
if (e.tag === "#text") {
|
|
1689
|
-
const
|
|
1689
|
+
const a = document.createTextNode(
|
|
1690
1690
|
typeof e.children == "string" ? e.children : ""
|
|
1691
1691
|
);
|
|
1692
|
-
return e.key != null &&
|
|
1692
|
+
return e.key != null && G(a, e.key), a;
|
|
1693
1693
|
}
|
|
1694
1694
|
if (e.tag === "#raw") {
|
|
1695
|
-
const
|
|
1696
|
-
return document.createRange().createContextualFragment(
|
|
1695
|
+
const a = typeof e.children == "string" ? e.children : "";
|
|
1696
|
+
return document.createRange().createContextualFragment(a);
|
|
1697
1697
|
}
|
|
1698
1698
|
if (e.tag === "#anchor") {
|
|
1699
|
-
const
|
|
1700
|
-
|
|
1699
|
+
const a = e, C = Array.isArray(a.children) ? a.children : [], b = document.createTextNode(""), h = document.createTextNode("");
|
|
1700
|
+
a.key != null && (G(b, `${a.key}:start`), G(h, `${a.key}:end`)), a._startNode = b, a._endNode = h;
|
|
1701
1701
|
const d = document.createDocumentFragment();
|
|
1702
1702
|
d.appendChild(b);
|
|
1703
|
-
for (const
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1703
|
+
for (const _ of C) {
|
|
1704
|
+
const T = Z(
|
|
1705
|
+
_,
|
|
1706
1706
|
n,
|
|
1707
1707
|
t,
|
|
1708
1708
|
// propagate parent namespace (was previously a boolean)
|
|
1709
1709
|
s
|
|
1710
1710
|
);
|
|
1711
|
-
if (
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1711
|
+
if (a.key != null && T instanceof Element && !T.hasAttribute("data-anchor-key")) {
|
|
1712
|
+
const L = _;
|
|
1713
|
+
L && typeof L == "object" && L.key != null || G(T, String(a.key));
|
|
1714
1714
|
}
|
|
1715
|
-
d.appendChild(
|
|
1715
|
+
d.appendChild(T);
|
|
1716
1716
|
}
|
|
1717
|
-
return d.appendChild(
|
|
1717
|
+
return d.appendChild(h), d;
|
|
1718
1718
|
}
|
|
1719
|
-
const r = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0,
|
|
1720
|
-
e.key != null &&
|
|
1719
|
+
const r = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0, o = (r && typeof r.xmlns == "string" ? String(r.xmlns) : void 0) ?? s ?? gt[e.tag] ?? null, c = o ? document.createElementNS(o, e.tag) : document.createElement(e.tag);
|
|
1720
|
+
e.key != null && G(c, e.key), e.props && e.props?._transitionGroup && xt(
|
|
1721
1721
|
c,
|
|
1722
1722
|
e.props?._transitionGroup
|
|
1723
1723
|
);
|
|
1724
|
-
const { props: f = {}, attrs: u = {}, directives:
|
|
1725
|
-
|
|
1724
|
+
const { props: f = {}, attrs: u = {}, directives: S = {} } = e.props ?? {}, E = dt(
|
|
1725
|
+
S,
|
|
1726
1726
|
n,
|
|
1727
1727
|
c instanceof HTMLElement ? c : void 0,
|
|
1728
1728
|
u
|
|
1729
|
-
),
|
|
1729
|
+
), g = {
|
|
1730
1730
|
...f,
|
|
1731
1731
|
...E.props
|
|
1732
|
-
},
|
|
1732
|
+
}, w = {
|
|
1733
1733
|
...u,
|
|
1734
1734
|
...E.attrs
|
|
1735
1735
|
};
|
|
1736
1736
|
try {
|
|
1737
|
-
const
|
|
1738
|
-
if (
|
|
1739
|
-
const b = String(
|
|
1740
|
-
b &&
|
|
1737
|
+
const a = (w && w.class) ?? (g && g.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), C = F(a);
|
|
1738
|
+
if (C !== null) {
|
|
1739
|
+
const b = String(C).trim();
|
|
1740
|
+
b && D(c, "class", b);
|
|
1741
1741
|
}
|
|
1742
1742
|
} catch {
|
|
1743
1743
|
}
|
|
1744
1744
|
try {
|
|
1745
|
-
if (
|
|
1746
|
-
const
|
|
1745
|
+
if (g.disabled !== void 0 && c && X(c)) {
|
|
1746
|
+
const a = g.disabled, C = a && typeof a == "object" && "value" in a;
|
|
1747
1747
|
let b = !1;
|
|
1748
1748
|
try {
|
|
1749
|
-
b =
|
|
1749
|
+
b = P(a);
|
|
1750
1750
|
} catch {
|
|
1751
1751
|
b = !1;
|
|
1752
1752
|
}
|
|
1753
|
-
!
|
|
1754
|
-
|
|
1753
|
+
!C && !b && H(() => {
|
|
1754
|
+
w.disabled = a, delete g.disabled;
|
|
1755
1755
|
});
|
|
1756
1756
|
}
|
|
1757
1757
|
} catch {
|
|
1758
1758
|
}
|
|
1759
1759
|
const p = c.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1760
|
-
for (const
|
|
1761
|
-
const
|
|
1762
|
-
if (typeof
|
|
1760
|
+
for (const a in w) {
|
|
1761
|
+
const C = w[a];
|
|
1762
|
+
if (typeof a != "string" || /\[object Object\]/.test(a))
|
|
1763
1763
|
continue;
|
|
1764
|
-
const b =
|
|
1764
|
+
const b = Fe(C);
|
|
1765
1765
|
if (typeof b == "boolean")
|
|
1766
|
-
b ?
|
|
1767
|
-
|
|
1766
|
+
b ? D(c, a, "") : H(() => {
|
|
1767
|
+
q(c, a);
|
|
1768
1768
|
});
|
|
1769
1769
|
else if (b != null) {
|
|
1770
|
-
if (
|
|
1771
|
-
const
|
|
1772
|
-
|
|
1773
|
-
c.disabled =
|
|
1774
|
-
}),
|
|
1775
|
-
|
|
1776
|
-
}) :
|
|
1777
|
-
|
|
1770
|
+
if (a === "disabled" && X(c)) {
|
|
1771
|
+
const h = g.disabled, d = Ve(h) ? h : b, _ = ge(d);
|
|
1772
|
+
H(() => {
|
|
1773
|
+
c.disabled = _;
|
|
1774
|
+
}), _ ? H(() => {
|
|
1775
|
+
D(c, a, "");
|
|
1776
|
+
}) : H(() => {
|
|
1777
|
+
q(c, a);
|
|
1778
1778
|
});
|
|
1779
1779
|
continue;
|
|
1780
1780
|
}
|
|
1781
|
-
if (!p &&
|
|
1781
|
+
if (!p && a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement || c instanceof HTMLProgressElement))
|
|
1782
1782
|
try {
|
|
1783
1783
|
c instanceof HTMLProgressElement ? c.value = Number(b) : c.value = String(b ?? "");
|
|
1784
1784
|
} catch {
|
|
1785
|
-
const
|
|
1786
|
-
|
|
1785
|
+
const h = F(b);
|
|
1786
|
+
h !== null && D(c, a, String(h));
|
|
1787
1787
|
}
|
|
1788
|
-
else if (!p &&
|
|
1788
|
+
else if (!p && a === "checked" && c instanceof HTMLInputElement)
|
|
1789
1789
|
try {
|
|
1790
1790
|
c.checked = !!b;
|
|
1791
1791
|
} catch {
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1792
|
+
const h = F(b);
|
|
1793
|
+
h !== null && D(c, a, String(h));
|
|
1794
1794
|
}
|
|
1795
|
-
else if (!p &&
|
|
1795
|
+
else if (!p && a in c)
|
|
1796
1796
|
try {
|
|
1797
|
-
c[
|
|
1797
|
+
c[a] = b, a === "disabled" && b === !1 && X(c) && q(c, "disabled"), se(e.props, a, b);
|
|
1798
1798
|
} catch {
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1799
|
+
const h = F(b);
|
|
1800
|
+
h !== null && D(c, a, String(h));
|
|
1801
1801
|
}
|
|
1802
|
-
else if ((e.props?.isCustomElement ?? !1) && !p &&
|
|
1803
|
-
const d =
|
|
1802
|
+
else if ((e.props?.isCustomElement ?? !1) && !p && a.includes("-")) {
|
|
1803
|
+
const d = Ze(a);
|
|
1804
1804
|
try {
|
|
1805
1805
|
c[d] = b;
|
|
1806
1806
|
} catch {
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1807
|
+
const _ = F(b);
|
|
1808
|
+
_ !== null && D(c, a, String(_));
|
|
1809
1809
|
}
|
|
1810
1810
|
} else {
|
|
1811
|
-
const d =
|
|
1812
|
-
d !== null &&
|
|
1811
|
+
const d = F(b);
|
|
1812
|
+
d !== null && D(c, a, String(d));
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
for (const
|
|
1817
|
-
const
|
|
1818
|
-
if (!(typeof
|
|
1819
|
-
if (
|
|
1820
|
-
const b = typeof
|
|
1821
|
-
|
|
1816
|
+
for (const a in g) {
|
|
1817
|
+
const C = g[a];
|
|
1818
|
+
if (!(typeof a != "string" || /\[object Object\]/.test(a)))
|
|
1819
|
+
if (a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement)) {
|
|
1820
|
+
const b = typeof C == "object" && C !== null && me(C) ? C.value : C;
|
|
1821
|
+
H(() => {
|
|
1822
1822
|
c.value = String(b ?? "");
|
|
1823
1823
|
});
|
|
1824
|
-
} else if (
|
|
1825
|
-
const b =
|
|
1826
|
-
const d = b.split(":"),
|
|
1827
|
-
if (
|
|
1828
|
-
const
|
|
1829
|
-
(
|
|
1824
|
+
} else if (a.startsWith("on") && typeof C == "function") {
|
|
1825
|
+
const b = pt(a), h = b.includes(":") ? (() => {
|
|
1826
|
+
const d = b.split(":"), _ = d[1];
|
|
1827
|
+
if (_.includes("-")) {
|
|
1828
|
+
const T = _.split("-").map(
|
|
1829
|
+
(L, y) => y === 0 ? L : L.charAt(0).toUpperCase() + L.slice(1)
|
|
1830
1830
|
).join("");
|
|
1831
|
-
return `${d[0]}:${
|
|
1831
|
+
return `${d[0]}:${T}`;
|
|
1832
1832
|
} else {
|
|
1833
|
-
const
|
|
1834
|
-
return `${d[0]}:${
|
|
1833
|
+
const T = _.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1834
|
+
return `${d[0]}:${T}`;
|
|
1835
1835
|
}
|
|
1836
1836
|
})() : b;
|
|
1837
|
-
E.listeners && (E.listeners[b] || E.listeners[
|
|
1837
|
+
E.listeners && (E.listeners[b] || E.listeners[h]) || te.addListener(c, b, C);
|
|
1838
1838
|
} else {
|
|
1839
|
-
if (
|
|
1839
|
+
if (a.startsWith("on") && C === void 0)
|
|
1840
1840
|
continue;
|
|
1841
|
-
if (
|
|
1842
|
-
|
|
1841
|
+
if (C == null || C === !1)
|
|
1842
|
+
q(c, a);
|
|
1843
1843
|
else {
|
|
1844
|
-
const b = e.props?.isCustomElement ?? !1,
|
|
1845
|
-
if (
|
|
1844
|
+
const b = e.props?.isCustomElement ?? !1, h = typeof C == "object" && C !== null && P(C) ? C : me(C) && typeof C.value < "u" ? C.value : C;
|
|
1845
|
+
if (a === "class" || a === "style") {
|
|
1846
1846
|
try {
|
|
1847
|
-
const d =
|
|
1848
|
-
d !== null &&
|
|
1847
|
+
const d = F(h);
|
|
1848
|
+
d !== null && D(c, a, String(d));
|
|
1849
1849
|
} catch {
|
|
1850
1850
|
}
|
|
1851
1851
|
continue;
|
|
1852
1852
|
}
|
|
1853
|
-
if (b ||
|
|
1853
|
+
if (b || a in c)
|
|
1854
1854
|
try {
|
|
1855
|
-
const d = typeof
|
|
1856
|
-
if (
|
|
1857
|
-
const
|
|
1858
|
-
|
|
1859
|
-
c.disabled =
|
|
1860
|
-
}),
|
|
1861
|
-
|
|
1862
|
-
}) :
|
|
1863
|
-
|
|
1855
|
+
const d = typeof C == "object" && C !== null && P(C) ? C : me(C) ? C.value : C;
|
|
1856
|
+
if (a === "disabled" && X(c)) {
|
|
1857
|
+
const _ = g.disabled !== void 0 ? g.disabled : d, T = ge(_);
|
|
1858
|
+
H(() => {
|
|
1859
|
+
c.disabled = T;
|
|
1860
|
+
}), T ? H(() => {
|
|
1861
|
+
D(c, a, "");
|
|
1862
|
+
}) : H(() => {
|
|
1863
|
+
q(c, a);
|
|
1864
1864
|
});
|
|
1865
1865
|
continue;
|
|
1866
1866
|
}
|
|
1867
1867
|
try {
|
|
1868
|
-
if (typeof c[
|
|
1869
|
-
let
|
|
1870
|
-
typeof d == "string" ? d === "false" ?
|
|
1868
|
+
if (typeof c[a] == "boolean") {
|
|
1869
|
+
let T = d;
|
|
1870
|
+
typeof d == "string" ? d === "false" ? T = !1 : d === "true" ? T = !0 : T = !!d && d !== "" : T = !!d, c[a] = T;
|
|
1871
1871
|
} else
|
|
1872
|
-
c[
|
|
1872
|
+
c[a] = d;
|
|
1873
1873
|
} catch {
|
|
1874
|
-
c[
|
|
1874
|
+
c[a] = d;
|
|
1875
1875
|
}
|
|
1876
1876
|
} catch {
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
|
-
for (const [
|
|
1881
|
+
for (const [a, C] of Object.entries(
|
|
1882
1882
|
E.listeners || {}
|
|
1883
1883
|
))
|
|
1884
|
-
|
|
1885
|
-
const
|
|
1884
|
+
te.addListener(c, a, C);
|
|
1885
|
+
const v = {
|
|
1886
1886
|
...e,
|
|
1887
1887
|
props: {
|
|
1888
1888
|
...e.props,
|
|
1889
1889
|
...E.props
|
|
1890
1890
|
}
|
|
1891
1891
|
};
|
|
1892
|
-
|
|
1892
|
+
we(v, c, t);
|
|
1893
1893
|
try {
|
|
1894
|
-
const
|
|
1895
|
-
if (typeof
|
|
1894
|
+
const a = c;
|
|
1895
|
+
if (typeof a._applyProps == "function")
|
|
1896
1896
|
try {
|
|
1897
|
-
|
|
1897
|
+
a._applyProps(a._cfg);
|
|
1898
1898
|
} catch {
|
|
1899
1899
|
}
|
|
1900
|
-
typeof
|
|
1900
|
+
typeof a.requestRender == "function" ? a.requestRender() : typeof a._render == "function" && a._render(a._cfg);
|
|
1901
1901
|
} catch {
|
|
1902
1902
|
}
|
|
1903
1903
|
if (Array.isArray(e.children)) {
|
|
1904
|
-
const
|
|
1905
|
-
for (const
|
|
1906
|
-
c.appendChild(
|
|
1904
|
+
const a = e.tag === "foreignObject" && o === bt ? null : c.namespaceURI ?? null;
|
|
1905
|
+
for (const C of e.children)
|
|
1906
|
+
c.appendChild(Z(C, n, t, a));
|
|
1907
1907
|
} else typeof e.children == "string" && (c.textContent = e.children);
|
|
1908
1908
|
try {
|
|
1909
|
-
if (c instanceof HTMLSelectElement &&
|
|
1909
|
+
if (c instanceof HTMLSelectElement && w && Object.prototype.hasOwnProperty.call(w, "value"))
|
|
1910
1910
|
try {
|
|
1911
|
-
c.value = String(
|
|
1911
|
+
c.value = String(w.value ?? "");
|
|
1912
1912
|
} catch {
|
|
1913
1913
|
}
|
|
1914
1914
|
} catch {
|
|
1915
1915
|
}
|
|
1916
1916
|
try {
|
|
1917
|
-
if (
|
|
1918
|
-
const
|
|
1919
|
-
let
|
|
1917
|
+
if (X(c)) {
|
|
1918
|
+
const a = g.disabled, C = w.disabled, b = a && typeof a == "object" && "value" in a;
|
|
1919
|
+
let h = !1;
|
|
1920
1920
|
try {
|
|
1921
|
-
|
|
1921
|
+
h = !!P(a);
|
|
1922
1922
|
} catch {
|
|
1923
|
-
|
|
1924
|
-
}
|
|
1925
|
-
const
|
|
1926
|
-
|
|
1927
|
-
c.disabled =
|
|
1928
|
-
}),
|
|
1929
|
-
|
|
1930
|
-
}) :
|
|
1931
|
-
|
|
1923
|
+
h = !1;
|
|
1924
|
+
}
|
|
1925
|
+
const _ = h || b || Ve(a) ? a : C, T = ge(_);
|
|
1926
|
+
H(() => {
|
|
1927
|
+
c.disabled = T;
|
|
1928
|
+
}), T ? H(() => {
|
|
1929
|
+
D(c, "disabled", "");
|
|
1930
|
+
}) : H(() => {
|
|
1931
|
+
q(c, "disabled");
|
|
1932
1932
|
});
|
|
1933
1933
|
}
|
|
1934
1934
|
} catch {
|
|
1935
1935
|
}
|
|
1936
1936
|
return c;
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1938
|
+
function Kt(e, n, t, s, r) {
|
|
1939
1939
|
if (typeof t == "string") {
|
|
1940
1940
|
e.textContent !== t && (e.textContent = t);
|
|
1941
1941
|
return;
|
|
1942
1942
|
}
|
|
1943
1943
|
if (!Array.isArray(t)) return;
|
|
1944
|
-
const
|
|
1945
|
-
for (let
|
|
1946
|
-
|
|
1947
|
-
const c = Array.isArray(n) ? n : [], f =
|
|
1944
|
+
const i = e.childNodes, o = [];
|
|
1945
|
+
for (let v = 0; v < i.length; v++)
|
|
1946
|
+
o.push(i[v]);
|
|
1947
|
+
const c = Array.isArray(n) ? n : [], f = Ht(e);
|
|
1948
1948
|
if (f) {
|
|
1949
|
-
const
|
|
1950
|
-
if (typeof
|
|
1951
|
-
return
|
|
1952
|
-
if (typeof
|
|
1953
|
-
},
|
|
1954
|
-
for (const
|
|
1955
|
-
if (
|
|
1956
|
-
const d = Array.isArray(
|
|
1957
|
-
for (const
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1949
|
+
const v = (h) => {
|
|
1950
|
+
if (typeof h == "string")
|
|
1951
|
+
return h.startsWith("each-") ? h.substring(5) : h;
|
|
1952
|
+
if (typeof h == "number") return String(h);
|
|
1953
|
+
}, a = [], C = [];
|
|
1954
|
+
for (const h of t)
|
|
1955
|
+
if (h && h.tag === "#anchor") {
|
|
1956
|
+
const d = Array.isArray(h.children) ? h.children : [];
|
|
1957
|
+
for (const _ of d) {
|
|
1958
|
+
const T = v(
|
|
1959
|
+
_.key ?? h.key ?? "unknown"
|
|
1960
1960
|
);
|
|
1961
|
-
|
|
1961
|
+
a.push({ ..._, key: T });
|
|
1962
1962
|
}
|
|
1963
|
-
} else
|
|
1964
|
-
for (const
|
|
1965
|
-
if (
|
|
1966
|
-
const d = Array.isArray(
|
|
1967
|
-
for (const
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1963
|
+
} else h && a.push({ ...h, key: v(h.key) });
|
|
1964
|
+
for (const h of c)
|
|
1965
|
+
if (h && h.tag === "#anchor") {
|
|
1966
|
+
const d = Array.isArray(h.children) ? h.children : [];
|
|
1967
|
+
for (const _ of d) {
|
|
1968
|
+
const T = v(
|
|
1969
|
+
_.key ?? h.key ?? "unknown"
|
|
1970
1970
|
);
|
|
1971
|
-
|
|
1971
|
+
C.push({ ..._, key: T });
|
|
1972
1972
|
}
|
|
1973
|
-
} else
|
|
1974
|
-
...
|
|
1975
|
-
key:
|
|
1973
|
+
} else h && C.push({
|
|
1974
|
+
...h,
|
|
1975
|
+
key: v(h.key)
|
|
1976
1976
|
});
|
|
1977
|
-
if (
|
|
1978
|
-
const
|
|
1979
|
-
for (const
|
|
1980
|
-
if (
|
|
1981
|
-
const
|
|
1982
|
-
|
|
1977
|
+
if (a.some((h) => h && h.key != null) || C.some((h) => h && h.key != null)) {
|
|
1978
|
+
const h = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
1979
|
+
for (const l of C)
|
|
1980
|
+
if (l && l.key != null) {
|
|
1981
|
+
const m = String(l.key);
|
|
1982
|
+
h.set(m, l);
|
|
1983
1983
|
}
|
|
1984
|
-
for (let
|
|
1985
|
-
const
|
|
1986
|
-
let
|
|
1987
|
-
if (
|
|
1988
|
-
let
|
|
1989
|
-
|
|
1984
|
+
for (let l = 0; l < o.length; l++) {
|
|
1985
|
+
const m = o[l];
|
|
1986
|
+
let A = Ie(m);
|
|
1987
|
+
if (A = v(A), A != null && m instanceof Element && m.nodeType === Node.ELEMENT_NODE) {
|
|
1988
|
+
let N = typeof A == "string" && A.includes(":") ? A.substring(0, A.lastIndexOf(":")) : A;
|
|
1989
|
+
N = String(N), d.set(N, m);
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
const
|
|
1993
|
-
if (f.moveClass &&
|
|
1994
|
-
for (let
|
|
1995
|
-
const
|
|
1996
|
-
if (
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1992
|
+
const _ = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Map(), L = o.length > 0;
|
|
1993
|
+
if (f.moveClass && L)
|
|
1994
|
+
for (let l = 0; l < o.length; l++) {
|
|
1995
|
+
const m = o[l];
|
|
1996
|
+
if (m instanceof HTMLElement && m.parentElement) {
|
|
1997
|
+
const A = m.getBoundingClientRect();
|
|
1998
|
+
T.set(m, A);
|
|
1999
1999
|
}
|
|
2000
2000
|
}
|
|
2001
|
-
const
|
|
2002
|
-
for (const
|
|
2003
|
-
let
|
|
2004
|
-
if (
|
|
2005
|
-
|
|
2006
|
-
const
|
|
2007
|
-
let
|
|
2008
|
-
if (
|
|
2009
|
-
const O =
|
|
2010
|
-
|
|
2011
|
-
const
|
|
2012
|
-
|
|
2001
|
+
const y = [];
|
|
2002
|
+
for (const l of a) {
|
|
2003
|
+
let m = l.key;
|
|
2004
|
+
if (m == null) continue;
|
|
2005
|
+
m = String(m);
|
|
2006
|
+
const A = h.get(m);
|
|
2007
|
+
let N = d.get(m);
|
|
2008
|
+
if (N && A) {
|
|
2009
|
+
const O = Te(N, A, l, s);
|
|
2010
|
+
_.add(N);
|
|
2011
|
+
const $ = String(m);
|
|
2012
|
+
G(O, $), y.push({
|
|
2013
2013
|
node: O,
|
|
2014
|
-
key:
|
|
2015
|
-
newVNode:
|
|
2016
|
-
oldVNode:
|
|
2014
|
+
key: m,
|
|
2015
|
+
newVNode: l,
|
|
2016
|
+
oldVNode: A,
|
|
2017
2017
|
isNew: !1
|
|
2018
2018
|
});
|
|
2019
2019
|
} else {
|
|
2020
|
-
|
|
2021
|
-
|
|
2020
|
+
N = Z(
|
|
2021
|
+
l,
|
|
2022
2022
|
s,
|
|
2023
2023
|
void 0,
|
|
2024
2024
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2025
|
-
),
|
|
2026
|
-
const O =
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
}),
|
|
2025
|
+
), G(N, String(m)), e.appendChild(N);
|
|
2026
|
+
const O = L || f.appear === !0;
|
|
2027
|
+
N instanceof HTMLElement && O && Ae(N, f).catch(($) => {
|
|
2028
|
+
W("Enter transition error:", $);
|
|
2029
|
+
}), y.push({ node: N, key: m, newVNode: l, isNew: !0 });
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
|
-
const
|
|
2033
|
-
for (let
|
|
2034
|
-
const
|
|
2035
|
-
if (!
|
|
2036
|
-
const O =
|
|
2037
|
-
e.contains(
|
|
2038
|
-
}).catch((
|
|
2039
|
-
|
|
2032
|
+
const k = [];
|
|
2033
|
+
for (let l = 0; l < o.length; l++) {
|
|
2034
|
+
const m = o[l], A = Ie(m);
|
|
2035
|
+
if (!_.has(m) && A != null && m instanceof HTMLElement) {
|
|
2036
|
+
const O = ze(m, f).then(() => {
|
|
2037
|
+
e.contains(m) && e.removeChild(m);
|
|
2038
|
+
}).catch(($) => {
|
|
2039
|
+
W("Leave transition error:", $), e.contains(m) && e.removeChild(m);
|
|
2040
2040
|
});
|
|
2041
|
-
|
|
2041
|
+
k.push(O);
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
|
-
if (
|
|
2045
|
-
let
|
|
2046
|
-
for (const { node:
|
|
2047
|
-
|
|
2048
|
-
if (f.moveClass &&
|
|
2049
|
-
const
|
|
2050
|
-
for (const { node:
|
|
2051
|
-
if (
|
|
2052
|
-
const O =
|
|
2044
|
+
if (k.length === 0) {
|
|
2045
|
+
let l = e.firstChild;
|
|
2046
|
+
for (const { node: m } of y)
|
|
2047
|
+
m !== l && e.insertBefore(m, l), l = m.nextSibling;
|
|
2048
|
+
if (f.moveClass && T.size > 0) {
|
|
2049
|
+
const m = [];
|
|
2050
|
+
for (const { node: A, isNew: N } of y)
|
|
2051
|
+
if (!N && A instanceof HTMLElement) {
|
|
2052
|
+
const O = T.get(A);
|
|
2053
2053
|
if (O) {
|
|
2054
|
-
const
|
|
2055
|
-
if (
|
|
2056
|
-
const
|
|
2057
|
-
|
|
2054
|
+
const $ = A.getBoundingClientRect(), R = O.left - $.left, M = O.top - $.top;
|
|
2055
|
+
if (R !== 0 || M !== 0) {
|
|
2056
|
+
const K = f.moveClass.split(/\s+/).filter((I) => I);
|
|
2057
|
+
m.push({ node: A, deltaX: R, deltaY: M, moveClasses: K });
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
2060
|
}
|
|
2061
|
-
if (
|
|
2062
|
-
for (const { node:
|
|
2063
|
-
|
|
2061
|
+
if (m.length > 0) {
|
|
2062
|
+
for (const { node: A, deltaX: N, deltaY: O } of m)
|
|
2063
|
+
A.style.transform = `translate(${N}px, ${O}px)`, A.style.transitionProperty = "none";
|
|
2064
2064
|
e.offsetHeight, requestAnimationFrame(() => {
|
|
2065
2065
|
requestAnimationFrame(() => {
|
|
2066
|
-
for (const { node:
|
|
2067
|
-
for (const O of
|
|
2068
|
-
|
|
2066
|
+
for (const { node: A, moveClasses: N } of m)
|
|
2067
|
+
for (const O of N)
|
|
2068
|
+
A.classList.add(O);
|
|
2069
2069
|
requestAnimationFrame(() => {
|
|
2070
|
-
const
|
|
2070
|
+
const A = f.moveClass || "", N = A.match(/duration-(\d+)/), O = N ? `${N[1]}ms` : "300ms", $ = A.match(
|
|
2071
2071
|
/ease-(out|in|in-out|linear)/
|
|
2072
|
-
),
|
|
2073
|
-
for (const { node:
|
|
2074
|
-
|
|
2072
|
+
), R = $ ? `ease-${$[1]}` : "ease-out";
|
|
2073
|
+
for (const { node: M } of m)
|
|
2074
|
+
M.style.transition = `transform ${O} ${R}`;
|
|
2075
2075
|
requestAnimationFrame(() => {
|
|
2076
|
-
for (const { node:
|
|
2077
|
-
|
|
2078
|
-
const
|
|
2079
|
-
for (const
|
|
2080
|
-
|
|
2081
|
-
|
|
2076
|
+
for (const { node: M, moveClasses: K } of m) {
|
|
2077
|
+
M.style.removeProperty("transform");
|
|
2078
|
+
const I = () => {
|
|
2079
|
+
for (const ie of K)
|
|
2080
|
+
M.classList.remove(ie);
|
|
2081
|
+
M.style.removeProperty("transition"), M.removeEventListener("transitionend", I), M.removeEventListener("transitioncancel", I);
|
|
2082
2082
|
};
|
|
2083
|
-
|
|
2083
|
+
M.addEventListener("transitionend", I, {
|
|
2084
2084
|
once: !0
|
|
2085
|
-
}),
|
|
2085
|
+
}), M.addEventListener("transitioncancel", I, {
|
|
2086
2086
|
once: !0
|
|
2087
2087
|
});
|
|
2088
2088
|
}
|
|
@@ -2097,203 +2097,203 @@ function Rt(e, n, t, s, r) {
|
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
2099
|
const u = /* @__PURE__ */ new Map();
|
|
2100
|
-
for (const
|
|
2101
|
-
|
|
2102
|
-
const
|
|
2103
|
-
for (let
|
|
2104
|
-
const
|
|
2105
|
-
|
|
2100
|
+
for (const v of c)
|
|
2101
|
+
v && v.key != null && u.set(v.key, v);
|
|
2102
|
+
const S = /* @__PURE__ */ new Map();
|
|
2103
|
+
for (let v = 0; v < o.length; v++) {
|
|
2104
|
+
const a = o[v], C = Ie(a);
|
|
2105
|
+
C != null && S.set(C, a);
|
|
2106
2106
|
}
|
|
2107
2107
|
const E = /* @__PURE__ */ new Set();
|
|
2108
|
-
let
|
|
2109
|
-
function
|
|
2110
|
-
let
|
|
2111
|
-
for (;
|
|
2112
|
-
|
|
2113
|
-
}
|
|
2114
|
-
function p(
|
|
2115
|
-
const
|
|
2116
|
-
let
|
|
2117
|
-
for (;
|
|
2118
|
-
|
|
2119
|
-
const
|
|
2120
|
-
if (b.some((
|
|
2121
|
-
const
|
|
2122
|
-
for (const O of
|
|
2123
|
-
O && O.key != null &&
|
|
2124
|
-
for (const O of
|
|
2125
|
-
const
|
|
2126
|
-
|
|
2127
|
-
}
|
|
2128
|
-
const
|
|
2129
|
-
let
|
|
2108
|
+
let g = e.firstChild;
|
|
2109
|
+
function w(v, a) {
|
|
2110
|
+
let C = v;
|
|
2111
|
+
for (; C && (E.add(C), C !== a); )
|
|
2112
|
+
C = C.nextSibling;
|
|
2113
|
+
}
|
|
2114
|
+
function p(v, a, C, b, h, d = !0) {
|
|
2115
|
+
const _ = [];
|
|
2116
|
+
let T = v.nextSibling;
|
|
2117
|
+
for (; T && T !== a; )
|
|
2118
|
+
_.push(T), T = T.nextSibling;
|
|
2119
|
+
const L = Array.isArray(C) ? C : [];
|
|
2120
|
+
if (b.some((k) => k && k.key != null) || L.some((k) => k && k.key != null)) {
|
|
2121
|
+
const k = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
2122
|
+
for (const O of L)
|
|
2123
|
+
O && O.key != null && k.set(O.key, O);
|
|
2124
|
+
for (const O of _) {
|
|
2125
|
+
const $ = Ie(O);
|
|
2126
|
+
$ != null && l.set($, O);
|
|
2127
|
+
}
|
|
2128
|
+
const m = h && h.state === "visible" && L.length === 0 && b.length > 0, A = /* @__PURE__ */ new Set();
|
|
2129
|
+
let N = v.nextSibling;
|
|
2130
2130
|
for (const O of b) {
|
|
2131
|
-
let
|
|
2132
|
-
if (O.key != null &&
|
|
2133
|
-
const
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2131
|
+
let $;
|
|
2132
|
+
if (O.key != null && l.has(O.key)) {
|
|
2133
|
+
const R = k.get(O.key);
|
|
2134
|
+
$ = Te(
|
|
2135
|
+
l.get(O.key),
|
|
2136
|
+
R,
|
|
2137
2137
|
O,
|
|
2138
2138
|
s
|
|
2139
|
-
),
|
|
2140
|
-
|
|
2141
|
-
}),
|
|
2139
|
+
), A.add($), h && $ instanceof HTMLElement && m && h.appear && Ae($, h).catch((M) => {
|
|
2140
|
+
W("Transition enter error (appear):", M);
|
|
2141
|
+
}), $ !== N && e.contains($) && e.insertBefore($, N);
|
|
2142
2142
|
} else
|
|
2143
|
-
|
|
2143
|
+
$ = Z(
|
|
2144
2144
|
O,
|
|
2145
2145
|
s,
|
|
2146
2146
|
void 0,
|
|
2147
2147
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2148
|
-
), e.insertBefore(
|
|
2149
|
-
|
|
2148
|
+
), e.insertBefore($, N), A.add($), h && $ instanceof HTMLElement && d && Ae($, h).catch((R) => {
|
|
2149
|
+
W("Transition enter error:", R);
|
|
2150
2150
|
});
|
|
2151
|
-
|
|
2151
|
+
N = $.nextSibling;
|
|
2152
2152
|
}
|
|
2153
|
-
for (const O of
|
|
2154
|
-
!
|
|
2153
|
+
for (const O of _)
|
|
2154
|
+
!A.has(O) && e.contains(O) && (h && O instanceof HTMLElement && d ? ze(O, h).then(() => {
|
|
2155
2155
|
e.contains(O) && e.removeChild(O);
|
|
2156
|
-
}).catch((
|
|
2157
|
-
|
|
2156
|
+
}).catch(($) => {
|
|
2157
|
+
W("Transition leave error:", $), e.contains(O) && e.removeChild(O);
|
|
2158
2158
|
}) : e.removeChild(O));
|
|
2159
2159
|
} else {
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2160
|
+
const k = Math.min(
|
|
2161
|
+
L.length,
|
|
2162
2162
|
b.length
|
|
2163
2163
|
);
|
|
2164
|
-
for (let
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2164
|
+
for (let l = 0; l < k; l++) {
|
|
2165
|
+
const m = L[l], A = b[l], N = Te(_[l], m, A, s);
|
|
2166
|
+
N !== _[l] && (e.insertBefore(N, _[l]), e.removeChild(_[l]));
|
|
2167
2167
|
}
|
|
2168
|
-
for (let
|
|
2169
|
-
const
|
|
2170
|
-
b[
|
|
2168
|
+
for (let l = k; l < b.length; l++) {
|
|
2169
|
+
const m = Z(
|
|
2170
|
+
b[l],
|
|
2171
2171
|
s,
|
|
2172
2172
|
void 0,
|
|
2173
2173
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2174
2174
|
);
|
|
2175
|
-
e.insertBefore(
|
|
2176
|
-
|
|
2175
|
+
e.insertBefore(m, a), h && m instanceof HTMLElement && d && Ae(m, h).catch((A) => {
|
|
2176
|
+
W("Transition enter error:", A);
|
|
2177
2177
|
});
|
|
2178
2178
|
}
|
|
2179
|
-
for (let
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2182
|
-
e.contains(
|
|
2183
|
-
}).catch((
|
|
2184
|
-
|
|
2185
|
-
}) : e.removeChild(
|
|
2186
|
-
}
|
|
2187
|
-
}
|
|
2188
|
-
}
|
|
2189
|
-
for (const
|
|
2190
|
-
let
|
|
2191
|
-
if (
|
|
2192
|
-
const
|
|
2193
|
-
let d =
|
|
2194
|
-
const
|
|
2195
|
-
if (d || (d = document.createTextNode(""),
|
|
2196
|
-
e.insertBefore(d,
|
|
2197
|
-
const
|
|
2198
|
-
for (const
|
|
2199
|
-
const
|
|
2200
|
-
|
|
2179
|
+
for (let l = k; l < _.length; l++) {
|
|
2180
|
+
const m = _[l];
|
|
2181
|
+
h && m instanceof HTMLElement && d ? ze(m, h).then(() => {
|
|
2182
|
+
e.contains(m) && e.removeChild(m);
|
|
2183
|
+
}).catch((A) => {
|
|
2184
|
+
W("Transition leave error:", A), e.contains(m) && e.removeChild(m);
|
|
2185
|
+
}) : e.removeChild(m);
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
for (const v of t) {
|
|
2190
|
+
let a;
|
|
2191
|
+
if (v.tag === "#anchor") {
|
|
2192
|
+
const C = v.key, b = `${C}:start`, h = `${C}:end`;
|
|
2193
|
+
let d = S.get(b), _ = S.get(h);
|
|
2194
|
+
const T = Array.isArray(v.children) ? v.children : [];
|
|
2195
|
+
if (d || (d = document.createTextNode(""), G(d, b)), _ || (_ = document.createTextNode(""), G(_, h)), v._startNode = d, v._endNode = _, !e.contains(d) || !e.contains(_)) {
|
|
2196
|
+
e.insertBefore(d, g);
|
|
2197
|
+
const L = v._transition, k = !(L && L.state === "visible" && T.length > 0) || L.appear;
|
|
2198
|
+
for (const l of T) {
|
|
2199
|
+
const m = Z(
|
|
2200
|
+
l,
|
|
2201
2201
|
s,
|
|
2202
2202
|
r,
|
|
2203
2203
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2204
2204
|
);
|
|
2205
|
-
e.insertBefore(
|
|
2206
|
-
|
|
2205
|
+
e.insertBefore(m, g), L && m instanceof HTMLElement && k && Ae(m, L).catch((A) => {
|
|
2206
|
+
W("Transition enter error:", A);
|
|
2207
2207
|
});
|
|
2208
2208
|
}
|
|
2209
|
-
e.insertBefore(
|
|
2209
|
+
e.insertBefore(_, g);
|
|
2210
2210
|
} else {
|
|
2211
|
-
const
|
|
2211
|
+
const L = v._transition, k = u.get(C)._transition, l = k && k.state !== L?.state, m = L && L.state === "visible" && T.length > 0 && !l, A = l || !m || L?.appear === !0;
|
|
2212
2212
|
p(
|
|
2213
2213
|
d,
|
|
2214
|
-
|
|
2215
|
-
u.get(
|
|
2214
|
+
_,
|
|
2215
|
+
u.get(C)?.children,
|
|
2216
|
+
T,
|
|
2216
2217
|
L,
|
|
2217
|
-
|
|
2218
|
-
T
|
|
2218
|
+
A
|
|
2219
2219
|
);
|
|
2220
2220
|
}
|
|
2221
|
-
|
|
2221
|
+
w(d, _), g = _.nextSibling;
|
|
2222
2222
|
continue;
|
|
2223
2223
|
}
|
|
2224
|
-
if (
|
|
2225
|
-
const
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2224
|
+
if (v.key != null && S.has(v.key)) {
|
|
2225
|
+
const C = u.get(v.key);
|
|
2226
|
+
a = Te(
|
|
2227
|
+
S.get(v.key),
|
|
2228
|
+
C,
|
|
2229
|
+
v,
|
|
2230
2230
|
s,
|
|
2231
2231
|
r
|
|
2232
|
-
), E.add(
|
|
2232
|
+
), E.add(a), a !== g && e.contains(a) && (g && !e.contains(g) && (g = null), e.insertBefore(a, g));
|
|
2233
2233
|
} else
|
|
2234
|
-
|
|
2235
|
-
|
|
2234
|
+
a = Z(
|
|
2235
|
+
v,
|
|
2236
2236
|
s,
|
|
2237
2237
|
r,
|
|
2238
2238
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2239
|
-
),
|
|
2240
|
-
|
|
2239
|
+
), g && !e.contains(g) && (g = null), e.insertBefore(a, g), E.add(a);
|
|
2240
|
+
g = a.nextSibling;
|
|
2241
2241
|
}
|
|
2242
|
-
for (let
|
|
2243
|
-
const
|
|
2244
|
-
!E.has(
|
|
2242
|
+
for (let v = 0; v < o.length; v++) {
|
|
2243
|
+
const a = o[v];
|
|
2244
|
+
!E.has(a) && e.contains(a) && (ue(a, r), e.removeChild(a));
|
|
2245
2245
|
}
|
|
2246
2246
|
}
|
|
2247
|
-
function
|
|
2248
|
-
if (n && typeof n != "string" && n.props?.ref && r &&
|
|
2247
|
+
function Te(e, n, t, s, r) {
|
|
2248
|
+
if (n && typeof n != "string" && n.props?.ref && r && ue(e, r), n === t) return e;
|
|
2249
2249
|
if (typeof t == "string") {
|
|
2250
2250
|
if (e.nodeType === Node.TEXT_NODE)
|
|
2251
2251
|
return e.textContent !== t && (e.textContent = t), e;
|
|
2252
2252
|
{
|
|
2253
|
-
const
|
|
2254
|
-
return e.parentNode?.replaceChild(
|
|
2253
|
+
const o = document.createTextNode(t);
|
|
2254
|
+
return e.parentNode?.replaceChild(o, e), o;
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
2257
|
if (t && typeof t != "string" && t.tag === "#anchor") {
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2258
|
+
const o = t, c = Array.isArray(o.children) ? o.children : [], f = o._startNode ?? document.createTextNode(""), u = o._endNode ?? document.createTextNode("");
|
|
2259
|
+
o.key != null && (G(f, `${o.key}:start`), G(u, `${o.key}:end`)), o._startNode = f, o._endNode = u;
|
|
2260
|
+
const S = document.createDocumentFragment();
|
|
2261
|
+
S.appendChild(f);
|
|
2262
2262
|
for (const E of c) {
|
|
2263
|
-
const
|
|
2263
|
+
const g = Z(
|
|
2264
2264
|
E,
|
|
2265
2265
|
s,
|
|
2266
2266
|
r,
|
|
2267
2267
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2268
2268
|
);
|
|
2269
|
-
|
|
2269
|
+
S.appendChild(g);
|
|
2270
2270
|
}
|
|
2271
|
-
return
|
|
2271
|
+
return S.appendChild(u), e.parentNode?.replaceChild(S, e), f;
|
|
2272
2272
|
}
|
|
2273
2273
|
if (!t) {
|
|
2274
|
-
|
|
2275
|
-
const
|
|
2276
|
-
return e.parentNode?.replaceChild(
|
|
2274
|
+
ue(e, r);
|
|
2275
|
+
const o = document.createComment("removed");
|
|
2276
|
+
return e.parentNode?.replaceChild(o, e), o;
|
|
2277
2277
|
}
|
|
2278
2278
|
if (!n || typeof n == "string") {
|
|
2279
|
-
|
|
2280
|
-
const
|
|
2279
|
+
ue(e, r);
|
|
2280
|
+
const o = Z(
|
|
2281
2281
|
t,
|
|
2282
2282
|
s,
|
|
2283
2283
|
r,
|
|
2284
2284
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2285
2285
|
);
|
|
2286
|
-
return
|
|
2286
|
+
return we(t, o, r), e.parentNode?.replaceChild(o, e), o;
|
|
2287
2287
|
}
|
|
2288
2288
|
if (t.tag === "#anchor") {
|
|
2289
|
-
const
|
|
2290
|
-
t.key != null && (
|
|
2289
|
+
const o = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), f = t._endNode ?? document.createTextNode("");
|
|
2290
|
+
t.key != null && (G(c, `${t.key}:start`), G(f, `${t.key}:end`)), t._startNode = c, t._endNode = f;
|
|
2291
2291
|
const u = document.createDocumentFragment();
|
|
2292
2292
|
u.appendChild(c);
|
|
2293
|
-
for (const
|
|
2293
|
+
for (const S of o)
|
|
2294
2294
|
u.appendChild(
|
|
2295
|
-
|
|
2296
|
-
|
|
2295
|
+
Z(
|
|
2296
|
+
S,
|
|
2297
2297
|
s,
|
|
2298
2298
|
r,
|
|
2299
2299
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
@@ -2302,25 +2302,25 @@ function Ae(e, n, t, s, r) {
|
|
|
2302
2302
|
return u.appendChild(f), e.parentNode?.replaceChild(u, e), c;
|
|
2303
2303
|
}
|
|
2304
2304
|
if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && n.key === t.key) {
|
|
2305
|
-
const
|
|
2306
|
-
return
|
|
2305
|
+
const o = e;
|
|
2306
|
+
return rt(o, n.props || {}, t.props || {}, s), Kt(o, n.children, t.children, s, r), we(t, o, r), o;
|
|
2307
2307
|
}
|
|
2308
2308
|
if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && (n.tag && String(n.tag).includes("-") || t.props && t.props.isCustomElement || n.props && n.props.isCustomElement))
|
|
2309
2309
|
try {
|
|
2310
2310
|
const c = e;
|
|
2311
|
-
return
|
|
2311
|
+
return rt(c, n.props || {}, t.props || {}, s), we(t, c, r), c;
|
|
2312
2312
|
} catch {
|
|
2313
2313
|
}
|
|
2314
|
-
|
|
2315
|
-
const
|
|
2314
|
+
ue(e, r);
|
|
2315
|
+
const i = Z(
|
|
2316
2316
|
t,
|
|
2317
2317
|
s,
|
|
2318
2318
|
r,
|
|
2319
2319
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2320
2320
|
);
|
|
2321
|
-
return
|
|
2321
|
+
return we(t, i, r), e.parentNode?.replaceChild(i, e), i;
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function Ut(e, n, t, s) {
|
|
2324
2324
|
let r;
|
|
2325
2325
|
Array.isArray(n) ? n.length === 1 ? (r = n[0], r && typeof r == "object" && r.key == null && (r = { ...r, key: "__root__" })) : r = { tag: "div", key: "__root__", children: n } : (r = n, r && typeof r == "object" && r.key == null && (r = { ...r, key: "__root__" })), r && typeof r == "object" && r.tag === "#anchor" && (r = {
|
|
2326
2326
|
tag: "div",
|
|
@@ -2329,15 +2329,15 @@ function Bt(e, n, t, s) {
|
|
|
2329
2329
|
attrs: { "data-anchor-block-root": "", key: "__anchor_root__" }
|
|
2330
2330
|
},
|
|
2331
2331
|
children: [r]
|
|
2332
|
-
}), r =
|
|
2333
|
-
const
|
|
2332
|
+
}), r = qe(r, String(r.key ?? "root"));
|
|
2333
|
+
const i = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
|
|
2334
2334
|
let c;
|
|
2335
|
-
|
|
2335
|
+
i && o ? typeof i != "string" && typeof r != "string" && i.tag === r.tag && i.key === r.key ? c = Te(o, i, r, t, s) : (c = Z(
|
|
2336
2336
|
r,
|
|
2337
2337
|
t,
|
|
2338
2338
|
s,
|
|
2339
2339
|
e.host instanceof Element ? e.host.namespaceURI ?? null : null
|
|
2340
|
-
), e.replaceChild(c,
|
|
2340
|
+
), e.replaceChild(c, o)) : (c = Z(
|
|
2341
2341
|
r,
|
|
2342
2342
|
t,
|
|
2343
2343
|
s,
|
|
@@ -2345,43 +2345,50 @@ function Bt(e, n, t, s) {
|
|
|
2345
2345
|
), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
|
|
2346
2346
|
const f = [];
|
|
2347
2347
|
for (let u = 0; u < e.childNodes.length; u++) {
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2348
|
+
const S = e.childNodes[u];
|
|
2349
|
+
S !== c && S.nodeName !== "STYLE" && (ue(S, s), f.push(S));
|
|
2350
2350
|
}
|
|
2351
2351
|
f.forEach((u) => e.removeChild(u)), e._prevVNode = r, e._prevDom = c;
|
|
2352
2352
|
}
|
|
2353
|
-
const
|
|
2354
|
-
function
|
|
2353
|
+
const Le = [], st = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap();
|
|
2354
|
+
function Ft(e, n) {
|
|
2355
|
+
Ne.has(e) || Ne.set(e, /* @__PURE__ */ new Set()), Ne.get(e).add(n);
|
|
2356
|
+
}
|
|
2357
|
+
function Vt(e, n) {
|
|
2358
|
+
const t = Ne.get(e);
|
|
2359
|
+
t && t.delete(n);
|
|
2360
|
+
}
|
|
2361
|
+
function qt(e, n, t, s, r, i, o, c) {
|
|
2355
2362
|
if (e) {
|
|
2356
|
-
|
|
2363
|
+
Le.push(t);
|
|
2357
2364
|
try {
|
|
2358
2365
|
const f = n.render(t);
|
|
2359
2366
|
if (f instanceof Promise) {
|
|
2360
|
-
|
|
2361
|
-
|
|
2367
|
+
i(!0), f.then((u) => {
|
|
2368
|
+
i(!1), o(null), it(e, u, t, s, r), c(e.innerHTML);
|
|
2362
2369
|
}).catch((u) => {
|
|
2363
|
-
|
|
2370
|
+
i(!1), o(u);
|
|
2364
2371
|
});
|
|
2365
2372
|
return;
|
|
2366
2373
|
}
|
|
2367
|
-
|
|
2374
|
+
it(e, f, t, s, r), c(e.innerHTML);
|
|
2368
2375
|
} finally {
|
|
2369
|
-
|
|
2376
|
+
Le.pop();
|
|
2370
2377
|
}
|
|
2371
2378
|
}
|
|
2372
2379
|
}
|
|
2373
|
-
function
|
|
2374
|
-
e && (
|
|
2380
|
+
function it(e, n, t, s, r) {
|
|
2381
|
+
e && (Ut(
|
|
2375
2382
|
e,
|
|
2376
2383
|
Array.isArray(n) ? n : [n],
|
|
2377
2384
|
t,
|
|
2378
2385
|
s
|
|
2379
2386
|
), r(e.innerHTML));
|
|
2380
2387
|
}
|
|
2381
|
-
function
|
|
2382
|
-
if (
|
|
2388
|
+
function Gt(e, n, t, s, r, i, o) {
|
|
2389
|
+
if (i !== null && clearTimeout(i), Date.now() - n < 16) {
|
|
2383
2390
|
if (r(t + 1), t === 15)
|
|
2384
|
-
|
|
2391
|
+
Q(
|
|
2385
2392
|
`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
2386
2393
|
Common causes:
|
|
2387
2394
|
• Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
|
|
@@ -2390,149 +2397,157 @@ function Wt(e, n, t, s, r, o, i) {
|
|
|
2390
2397
|
Component rendering will be throttled to prevent browser freeze.`
|
|
2391
2398
|
);
|
|
2392
2399
|
else if (t > 20) {
|
|
2393
|
-
|
|
2400
|
+
W(
|
|
2394
2401
|
`🛑 Infinite loop detected in component render:
|
|
2395
2402
|
• This might be caused by state updates during render
|
|
2396
2403
|
• Ensure all state modifications are done in event handlers or effects
|
|
2397
2404
|
Stopping runaway component render to prevent browser freeze`
|
|
2398
|
-
),
|
|
2405
|
+
), o(null);
|
|
2399
2406
|
return;
|
|
2400
2407
|
}
|
|
2401
2408
|
} else
|
|
2402
2409
|
r(0);
|
|
2403
2410
|
const u = setTimeout(
|
|
2404
2411
|
() => {
|
|
2405
|
-
s(Date.now()), e(),
|
|
2412
|
+
s(Date.now()), e(), o(null);
|
|
2406
2413
|
},
|
|
2407
2414
|
t > 10 ? 100 : 0
|
|
2408
2415
|
);
|
|
2409
|
-
|
|
2416
|
+
o(u);
|
|
2410
2417
|
}
|
|
2411
|
-
function
|
|
2418
|
+
function Zt(e, n, t, s, r) {
|
|
2412
2419
|
if (!e) return;
|
|
2413
|
-
let
|
|
2420
|
+
let i = t || "";
|
|
2414
2421
|
try {
|
|
2415
|
-
|
|
2416
|
-
|
|
2422
|
+
const b = Ne.get(e);
|
|
2423
|
+
if (b && b.size > 0)
|
|
2424
|
+
for (const h of b)
|
|
2425
|
+
try {
|
|
2426
|
+
const d = h.lastHtmlStringForJitCSS;
|
|
2427
|
+
d && typeof d == "string" && d.trim() && (i += `
|
|
2428
|
+
` + d);
|
|
2429
|
+
} catch {
|
|
2430
|
+
}
|
|
2431
|
+
else {
|
|
2432
|
+
const h = Array.from(
|
|
2417
2433
|
e.querySelectorAll("*")
|
|
2418
2434
|
);
|
|
2419
|
-
for (const
|
|
2435
|
+
for (const d of h)
|
|
2420
2436
|
try {
|
|
2421
|
-
const
|
|
2422
|
-
|
|
2423
|
-
` +
|
|
2437
|
+
const _ = d.lastHtmlStringForJitCSS;
|
|
2438
|
+
_ && typeof _ == "string" && _.trim() && (i += `
|
|
2439
|
+
` + _);
|
|
2424
2440
|
} catch {
|
|
2425
2441
|
}
|
|
2426
2442
|
}
|
|
2427
2443
|
} catch {
|
|
2428
2444
|
}
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
];
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2445
|
+
if (st.get(e) === i)
|
|
2446
|
+
return;
|
|
2447
|
+
st.set(e, i);
|
|
2448
|
+
const c = St(i), f = vt();
|
|
2449
|
+
if ((!c || c.trim() === "") && !n._computedStyle && !f) {
|
|
2450
|
+
if (r(null), "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
|
|
2451
|
+
const h = [je(), pe()];
|
|
2452
|
+
e.adoptedStyleSheets = h;
|
|
2453
|
+
} else {
|
|
2454
|
+
const h = ke(et), d = pe();
|
|
2455
|
+
let _ = "";
|
|
2439
2456
|
try {
|
|
2440
|
-
|
|
2457
|
+
d && "cssRules" in d && (_ = Array.from(d.cssRules).map((y) => y.cssText).join(`
|
|
2441
2458
|
`));
|
|
2442
2459
|
} catch {
|
|
2443
|
-
|
|
2460
|
+
_ = "";
|
|
2444
2461
|
}
|
|
2445
|
-
const
|
|
2446
|
-
${
|
|
2447
|
-
let
|
|
2462
|
+
const T = ke(`${h}
|
|
2463
|
+
${_}`);
|
|
2464
|
+
let L = e.querySelector(
|
|
2448
2465
|
"style[data-cer-runtime]"
|
|
2449
2466
|
);
|
|
2450
|
-
|
|
2467
|
+
L || (L = document.createElement("style"), D(L, "data-cer-runtime", "true"), e.appendChild(L));
|
|
2451
2468
|
try {
|
|
2452
|
-
|
|
2469
|
+
L.textContent = T;
|
|
2453
2470
|
} catch {
|
|
2454
2471
|
}
|
|
2455
2472
|
try {
|
|
2456
|
-
|
|
2473
|
+
const y = [je(), pe()];
|
|
2474
|
+
e.adoptedStyleSheets = y;
|
|
2457
2475
|
} catch {
|
|
2458
2476
|
}
|
|
2459
2477
|
}
|
|
2460
2478
|
return;
|
|
2461
2479
|
}
|
|
2462
|
-
let
|
|
2463
|
-
n._computedStyle && (
|
|
2464
|
-
let
|
|
2465
|
-
${
|
|
2480
|
+
let u = "";
|
|
2481
|
+
n._computedStyle && (u = n._computedStyle ?? "");
|
|
2482
|
+
let S = _t(`${u}
|
|
2483
|
+
${c}
|
|
2466
2484
|
`);
|
|
2467
|
-
|
|
2468
|
-
let
|
|
2485
|
+
S = ke(S);
|
|
2486
|
+
let E = s;
|
|
2469
2487
|
if ("adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
if (
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
fe(),
|
|
2480
|
-
u
|
|
2481
|
-
], r(u);
|
|
2488
|
+
E || (E = new CSSStyleSheet());
|
|
2489
|
+
try {
|
|
2490
|
+
E.replaceSync(S);
|
|
2491
|
+
} catch {
|
|
2492
|
+
E = null;
|
|
2493
|
+
}
|
|
2494
|
+
if (E) {
|
|
2495
|
+
const b = [je(), pe()];
|
|
2496
|
+
f && b.push(f), b.push(E), e.adoptedStyleSheets = b, r(E);
|
|
2482
2497
|
return;
|
|
2483
2498
|
}
|
|
2484
2499
|
}
|
|
2485
|
-
const
|
|
2486
|
-
let
|
|
2500
|
+
const w = ke(et), p = pe();
|
|
2501
|
+
let v = "";
|
|
2487
2502
|
try {
|
|
2488
|
-
|
|
2503
|
+
p && "cssRules" in p && (v = Array.from(p.cssRules).map((b) => b.cssText).join(`
|
|
2489
2504
|
`));
|
|
2490
2505
|
} catch {
|
|
2491
|
-
|
|
2506
|
+
v = "";
|
|
2492
2507
|
}
|
|
2493
|
-
const
|
|
2494
|
-
${
|
|
2495
|
-
${
|
|
2496
|
-
let
|
|
2508
|
+
const a = ke(`${w}
|
|
2509
|
+
${v}
|
|
2510
|
+
${S}`);
|
|
2511
|
+
let C = e.querySelector(
|
|
2497
2512
|
"style[data-cer-runtime]"
|
|
2498
2513
|
);
|
|
2499
|
-
|
|
2514
|
+
C || (C = document.createElement("style"), D(C, "data-cer-runtime", "true"), e.appendChild(C));
|
|
2500
2515
|
try {
|
|
2501
|
-
|
|
2516
|
+
C.textContent = a;
|
|
2502
2517
|
} catch {
|
|
2503
2518
|
}
|
|
2504
2519
|
try {
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2507
|
-
|
|
2520
|
+
const b = [
|
|
2521
|
+
je(),
|
|
2522
|
+
pe()
|
|
2508
2523
|
];
|
|
2509
|
-
if (typeof CSSStyleSheet < "u")
|
|
2524
|
+
if (f && b.push(f), typeof CSSStyleSheet < "u")
|
|
2510
2525
|
try {
|
|
2511
|
-
const
|
|
2526
|
+
const h = new CSSStyleSheet();
|
|
2512
2527
|
try {
|
|
2513
|
-
|
|
2528
|
+
h.replaceSync(S), b.push(h);
|
|
2514
2529
|
} catch {
|
|
2515
|
-
|
|
2530
|
+
b.push({ cssRules: [], replaceSync: () => {
|
|
2516
2531
|
} });
|
|
2517
2532
|
}
|
|
2518
2533
|
} catch {
|
|
2519
2534
|
}
|
|
2520
|
-
e.adoptedStyleSheets =
|
|
2535
|
+
e.adoptedStyleSheets = b;
|
|
2521
2536
|
} catch {
|
|
2522
2537
|
}
|
|
2523
2538
|
r(null);
|
|
2524
2539
|
}
|
|
2525
|
-
let
|
|
2526
|
-
function
|
|
2527
|
-
|
|
2540
|
+
let B = null;
|
|
2541
|
+
function ot(e) {
|
|
2542
|
+
B = e;
|
|
2528
2543
|
}
|
|
2529
|
-
function
|
|
2530
|
-
|
|
2544
|
+
function Ke() {
|
|
2545
|
+
B = null;
|
|
2531
2546
|
}
|
|
2532
|
-
function
|
|
2533
|
-
if (!
|
|
2547
|
+
function an() {
|
|
2548
|
+
if (!B)
|
|
2534
2549
|
throw new Error("useEmit must be called during component render");
|
|
2535
|
-
const e =
|
|
2550
|
+
const e = B.emit;
|
|
2536
2551
|
if (typeof e != "function")
|
|
2537
2552
|
throw new Error(
|
|
2538
2553
|
"useEmit requires an emit function on the component context"
|
|
@@ -2540,7 +2555,7 @@ function en() {
|
|
|
2540
2555
|
const n = e;
|
|
2541
2556
|
return (t, s, r) => n(t, s, r);
|
|
2542
2557
|
}
|
|
2543
|
-
function
|
|
2558
|
+
function Ee(e) {
|
|
2544
2559
|
e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
|
|
2545
2560
|
value: {},
|
|
2546
2561
|
writable: !0,
|
|
@@ -2548,70 +2563,70 @@ function ge(e) {
|
|
|
2548
2563
|
configurable: !1
|
|
2549
2564
|
});
|
|
2550
2565
|
}
|
|
2551
|
-
function
|
|
2552
|
-
if (!
|
|
2566
|
+
function ln(e) {
|
|
2567
|
+
if (!B)
|
|
2553
2568
|
throw new Error("useOnConnected must be called during component render");
|
|
2554
|
-
|
|
2569
|
+
Ee(B), B._hookCallbacks.onConnected = e;
|
|
2555
2570
|
}
|
|
2556
|
-
function
|
|
2557
|
-
if (!
|
|
2571
|
+
function fn(e) {
|
|
2572
|
+
if (!B)
|
|
2558
2573
|
throw new Error("useOnDisconnected must be called during component render");
|
|
2559
|
-
|
|
2574
|
+
Ee(B), B._hookCallbacks.onDisconnected = e;
|
|
2560
2575
|
}
|
|
2561
|
-
function
|
|
2562
|
-
if (!
|
|
2576
|
+
function un(e) {
|
|
2577
|
+
if (!B)
|
|
2563
2578
|
throw new Error(
|
|
2564
2579
|
"useOnAttributeChanged must be called during component render"
|
|
2565
2580
|
);
|
|
2566
|
-
|
|
2581
|
+
Ee(B), B._hookCallbacks.onAttributeChanged = e;
|
|
2567
2582
|
}
|
|
2568
|
-
function
|
|
2569
|
-
if (!
|
|
2583
|
+
function pn(e) {
|
|
2584
|
+
if (!B)
|
|
2570
2585
|
throw new Error("useOnError must be called during component render");
|
|
2571
|
-
|
|
2586
|
+
Ee(B), B._hookCallbacks.onError = (n) => {
|
|
2572
2587
|
try {
|
|
2573
2588
|
n instanceof Error ? e(n) : e(new Error(String(n)));
|
|
2574
2589
|
} catch {
|
|
2575
2590
|
}
|
|
2576
2591
|
};
|
|
2577
2592
|
}
|
|
2578
|
-
function
|
|
2579
|
-
if (!
|
|
2593
|
+
function dn(e) {
|
|
2594
|
+
if (!B)
|
|
2580
2595
|
throw new Error("useProps must be called during component render");
|
|
2581
|
-
|
|
2582
|
-
const n =
|
|
2596
|
+
Ee(B);
|
|
2597
|
+
const n = B._hookCallbacks;
|
|
2583
2598
|
n.props = {
|
|
2584
2599
|
...n.props || {},
|
|
2585
2600
|
...e
|
|
2586
2601
|
};
|
|
2587
|
-
const t =
|
|
2602
|
+
const t = B;
|
|
2588
2603
|
try {
|
|
2589
2604
|
const r = Object.keys(e || {});
|
|
2590
|
-
for (const
|
|
2591
|
-
if (typeof
|
|
2592
|
-
const
|
|
2593
|
-
if (!(
|
|
2605
|
+
for (const i of r) {
|
|
2606
|
+
if (typeof i != "string" || i.startsWith("_")) continue;
|
|
2607
|
+
const o = Object.getOwnPropertyDescriptor(t, i);
|
|
2608
|
+
if (!(o && !o.configurable))
|
|
2594
2609
|
try {
|
|
2595
|
-
let f = Object.prototype.hasOwnProperty.call(t,
|
|
2596
|
-
Object.defineProperty(t,
|
|
2610
|
+
let f = Object.prototype.hasOwnProperty.call(t, i) ? t[i] : void 0;
|
|
2611
|
+
Object.defineProperty(t, i, {
|
|
2597
2612
|
configurable: !0,
|
|
2598
2613
|
enumerable: !0,
|
|
2599
2614
|
get() {
|
|
2600
2615
|
try {
|
|
2601
2616
|
const u = t && t._host;
|
|
2602
2617
|
if (u) {
|
|
2603
|
-
const
|
|
2618
|
+
const S = J(i), E = u.getAttribute(S);
|
|
2604
2619
|
if (E !== null) {
|
|
2605
|
-
const
|
|
2606
|
-
return
|
|
2620
|
+
const g = typeof e[i];
|
|
2621
|
+
return g === "boolean" ? E === "" || E === "true" : g === "number" ? Number(E) : E;
|
|
2607
2622
|
}
|
|
2608
|
-
if (typeof u[
|
|
2609
|
-
const
|
|
2610
|
-
if (
|
|
2611
|
-
return
|
|
2612
|
-
const
|
|
2613
|
-
if (!(
|
|
2614
|
-
return
|
|
2623
|
+
if (typeof u[i] < "u") {
|
|
2624
|
+
const g = u[i];
|
|
2625
|
+
if (P(g) || g && typeof g == "object" && "value" in g && !(g instanceof Node))
|
|
2626
|
+
return g.value;
|
|
2627
|
+
const w = typeof e[i];
|
|
2628
|
+
if (!(w === "string" && g && typeof g == "object"))
|
|
2629
|
+
return w === "boolean" && typeof g == "string" ? g === "" || g === "true" : g;
|
|
2615
2630
|
}
|
|
2616
2631
|
}
|
|
2617
2632
|
} catch {
|
|
@@ -2628,31 +2643,31 @@ function on(e) {
|
|
|
2628
2643
|
} catch {
|
|
2629
2644
|
}
|
|
2630
2645
|
return new Proxy({}, {
|
|
2631
|
-
get(r,
|
|
2632
|
-
if (typeof
|
|
2633
|
-
const
|
|
2646
|
+
get(r, i) {
|
|
2647
|
+
if (typeof i != "string") return;
|
|
2648
|
+
const o = e[i];
|
|
2634
2649
|
try {
|
|
2635
2650
|
const f = t && t._host;
|
|
2636
2651
|
if (f) {
|
|
2637
2652
|
if (f instanceof HTMLElement || typeof f.getAttribute == "function" && typeof f.hasAttribute == "function") {
|
|
2638
|
-
const
|
|
2653
|
+
const S = i.replace(/([A-Z])/g, "-$1").toLowerCase(), E = f.getAttribute(S);
|
|
2639
2654
|
if (E !== null)
|
|
2640
|
-
return typeof
|
|
2655
|
+
return typeof o == "boolean" ? E === "" || E === "true" : typeof o == "number" ? Number(E) : E;
|
|
2641
2656
|
}
|
|
2642
|
-
const u = f[
|
|
2657
|
+
const u = f[i];
|
|
2643
2658
|
if (typeof u < "u" && u !== "") {
|
|
2644
|
-
const
|
|
2645
|
-
if (!(typeof
|
|
2646
|
-
return typeof
|
|
2659
|
+
const S = u && typeof u == "object" && "value" in u && !(u instanceof Node);
|
|
2660
|
+
if (!(typeof o == "string" && u && typeof u == "object" && !S && !P(u)))
|
|
2661
|
+
return typeof o == "boolean" && o === !1 && u === "" ? o : P(u) || S ? u.value : typeof o == "boolean" && typeof u == "string" ? u === "true" || u !== "" && u !== "false" : typeof o == "number" && typeof u == "string" && !Number.isNaN(Number(u)) ? Number(u) : u;
|
|
2647
2662
|
}
|
|
2648
2663
|
}
|
|
2649
2664
|
} catch {
|
|
2650
2665
|
}
|
|
2651
|
-
const c = t[
|
|
2652
|
-
return typeof
|
|
2666
|
+
const c = t[i];
|
|
2667
|
+
return typeof o == "boolean" && c === "" ? o === !1 ? o : !0 : P(c) || c && typeof c == "object" && "value" in c && !(c instanceof Node) ? c.value : c != null && c !== "" ? typeof o == "boolean" && typeof c == "string" ? c === "true" : typeof o == "number" && typeof c == "string" && !Number.isNaN(Number(c)) ? Number(c) : c : o;
|
|
2653
2668
|
},
|
|
2654
|
-
has(r,
|
|
2655
|
-
return typeof
|
|
2669
|
+
has(r, i) {
|
|
2670
|
+
return typeof i == "string" && (i in t || i in e);
|
|
2656
2671
|
},
|
|
2657
2672
|
ownKeys() {
|
|
2658
2673
|
return Array.from(
|
|
@@ -2664,20 +2679,20 @@ function on(e) {
|
|
|
2664
2679
|
}
|
|
2665
2680
|
});
|
|
2666
2681
|
}
|
|
2667
|
-
function
|
|
2668
|
-
if (!
|
|
2682
|
+
function hn(e) {
|
|
2683
|
+
if (!B)
|
|
2669
2684
|
throw new Error("useStyle must be called during component render");
|
|
2670
|
-
|
|
2685
|
+
Ee(B);
|
|
2671
2686
|
try {
|
|
2672
2687
|
const n = e();
|
|
2673
|
-
Object.defineProperty(
|
|
2688
|
+
Object.defineProperty(B, "_computedStyle", {
|
|
2674
2689
|
value: n,
|
|
2675
2690
|
writable: !0,
|
|
2676
2691
|
enumerable: !1,
|
|
2677
2692
|
configurable: !0
|
|
2678
2693
|
});
|
|
2679
2694
|
} catch (n) {
|
|
2680
|
-
|
|
2695
|
+
Q("Error in useStyle callback:", n), Object.defineProperty(B, "_computedStyle", {
|
|
2681
2696
|
value: "",
|
|
2682
2697
|
writable: !0,
|
|
2683
2698
|
enumerable: !1,
|
|
@@ -2685,14 +2700,14 @@ function cn(e) {
|
|
|
2685
2700
|
});
|
|
2686
2701
|
}
|
|
2687
2702
|
}
|
|
2688
|
-
const
|
|
2689
|
-
function
|
|
2703
|
+
const be = /* @__PURE__ */ new Map(), ct = Symbol.for("cer.registry");
|
|
2704
|
+
function Jt() {
|
|
2690
2705
|
if (typeof window < "u") {
|
|
2691
2706
|
const e = globalThis;
|
|
2692
|
-
e[
|
|
2707
|
+
e[ct] || (e[ct] = be);
|
|
2693
2708
|
}
|
|
2694
2709
|
}
|
|
2695
|
-
function
|
|
2710
|
+
function Yt(e, n) {
|
|
2696
2711
|
if (!n.render)
|
|
2697
2712
|
throw new Error("Component must have a render function");
|
|
2698
2713
|
return typeof window > "u" ? class {
|
|
@@ -2735,9 +2750,9 @@ function zt(e, n) {
|
|
|
2735
2750
|
_templateLoading = !1;
|
|
2736
2751
|
_templateError = null;
|
|
2737
2752
|
constructor() {
|
|
2738
|
-
super(), this.attachShadow({ mode: "open" }), this._cfg =
|
|
2739
|
-
const t = this._initContext(n), s = (
|
|
2740
|
-
Object.defineProperty(
|
|
2753
|
+
super(), this.attachShadow({ mode: "open" }), this._cfg = be.get(e) || n, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2754
|
+
const t = this._initContext(n), s = (i, o, c) => {
|
|
2755
|
+
Object.defineProperty(i, o, {
|
|
2741
2756
|
value: c,
|
|
2742
2757
|
writable: !1,
|
|
2743
2758
|
enumerable: !1,
|
|
@@ -2755,47 +2770,47 @@ function zt(e, n) {
|
|
|
2755
2770
|
), s(t, "_componentId", this._componentId), s(
|
|
2756
2771
|
t,
|
|
2757
2772
|
"_triggerWatchers",
|
|
2758
|
-
(
|
|
2759
|
-
), this.context = t,
|
|
2773
|
+
(i, o) => this._triggerWatchers(i, o)
|
|
2774
|
+
), this.context = t, H(() => {
|
|
2760
2775
|
s(t, "_host", this);
|
|
2761
2776
|
}), s(
|
|
2762
2777
|
this.context,
|
|
2763
2778
|
"emit",
|
|
2764
|
-
(
|
|
2779
|
+
(i, o, c) => {
|
|
2765
2780
|
const f = {
|
|
2766
|
-
detail:
|
|
2781
|
+
detail: o,
|
|
2767
2782
|
bubbles: !0,
|
|
2768
2783
|
composed: !0,
|
|
2769
2784
|
...c || {}
|
|
2770
|
-
}, u = new CustomEvent(
|
|
2785
|
+
}, u = new CustomEvent(i, f);
|
|
2771
2786
|
this.dispatchEvent(u);
|
|
2772
|
-
const
|
|
2773
|
-
if (
|
|
2774
|
-
const E =
|
|
2775
|
-
(p,
|
|
2776
|
-
).join("")}` : `${E}:${
|
|
2777
|
-
|
|
2778
|
-
this.dispatchEvent(new CustomEvent(
|
|
2787
|
+
const S = i.indexOf(":");
|
|
2788
|
+
if (S > 0) {
|
|
2789
|
+
const E = i.substring(0, S), g = i.substring(S + 1), w = g.includes("-") ? `${E}:${g.split("-").map(
|
|
2790
|
+
(p, v) => v === 0 ? p : p.charAt(0).toUpperCase() + p.slice(1)
|
|
2791
|
+
).join("")}` : `${E}:${g.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
2792
|
+
w !== i && H(() => {
|
|
2793
|
+
this.dispatchEvent(new CustomEvent(w, f));
|
|
2779
2794
|
});
|
|
2780
2795
|
}
|
|
2781
2796
|
return !u.defaultPrevented;
|
|
2782
2797
|
}
|
|
2783
2798
|
);
|
|
2784
|
-
const r =
|
|
2785
|
-
for (const
|
|
2786
|
-
const
|
|
2787
|
-
typeof
|
|
2799
|
+
const r = be.get(e) || n;
|
|
2800
|
+
for (const i in r) {
|
|
2801
|
+
const o = r[i];
|
|
2802
|
+
typeof o == "function" && (this.context[i] = (...c) => o(...c, this.context));
|
|
2788
2803
|
}
|
|
2789
2804
|
if (r.props)
|
|
2790
|
-
for (const
|
|
2791
|
-
let
|
|
2792
|
-
Object.defineProperty(this,
|
|
2805
|
+
for (const i in r.props) {
|
|
2806
|
+
let o = this[i];
|
|
2807
|
+
Object.defineProperty(this, i, {
|
|
2793
2808
|
get() {
|
|
2794
|
-
return
|
|
2809
|
+
return o;
|
|
2795
2810
|
},
|
|
2796
2811
|
set(c) {
|
|
2797
|
-
const f =
|
|
2798
|
-
|
|
2812
|
+
const f = o;
|
|
2813
|
+
o = c, this.context[i] = c, this._initializing || (this._applyProps(r), f !== c && this._requestRender());
|
|
2799
2814
|
},
|
|
2800
2815
|
enumerable: !0,
|
|
2801
2816
|
configurable: !0
|
|
@@ -2805,14 +2820,16 @@ function zt(e, n) {
|
|
|
2805
2820
|
}
|
|
2806
2821
|
connectedCallback() {
|
|
2807
2822
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
2808
|
-
|
|
2809
|
-
|
|
2823
|
+
const t = this.getRootNode();
|
|
2824
|
+
t && t !== document && "host" in t && Ft(t, this), this._applyProps(n), this._requestRender(), Tt(n, this.context, this._mounted, (s) => {
|
|
2825
|
+
this._mounted = s;
|
|
2810
2826
|
});
|
|
2811
2827
|
});
|
|
2812
2828
|
}
|
|
2813
2829
|
disconnectedCallback() {
|
|
2814
2830
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
2815
|
-
|
|
2831
|
+
const t = this.getRootNode();
|
|
2832
|
+
t && t !== document && "host" in t && Vt(t, this), Lt(
|
|
2816
2833
|
n,
|
|
2817
2834
|
this.context,
|
|
2818
2835
|
this._listeners,
|
|
@@ -2822,30 +2839,30 @@ function zt(e, n) {
|
|
|
2822
2839
|
() => {
|
|
2823
2840
|
this._watchers.clear();
|
|
2824
2841
|
},
|
|
2825
|
-
(
|
|
2826
|
-
this._templateLoading =
|
|
2842
|
+
(s) => {
|
|
2843
|
+
this._templateLoading = s;
|
|
2827
2844
|
},
|
|
2828
|
-
(
|
|
2829
|
-
this._templateError =
|
|
2845
|
+
(s) => {
|
|
2846
|
+
this._templateError = s;
|
|
2830
2847
|
},
|
|
2831
|
-
(
|
|
2832
|
-
this._mounted =
|
|
2848
|
+
(s) => {
|
|
2849
|
+
this._mounted = s;
|
|
2833
2850
|
}
|
|
2834
2851
|
);
|
|
2835
2852
|
});
|
|
2836
2853
|
}
|
|
2837
2854
|
attributeChangedCallback(t, s, r) {
|
|
2838
2855
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
2839
|
-
this._applyProps(n), s !== r && this._requestRender(),
|
|
2856
|
+
this._applyProps(n), s !== r && this._requestRender(), Nt(n, t, s, r, this.context);
|
|
2840
2857
|
});
|
|
2841
2858
|
}
|
|
2842
2859
|
static get observedAttributes() {
|
|
2843
|
-
return n.props ? Object.keys(n.props).map(
|
|
2860
|
+
return n.props ? Object.keys(n.props).map(J) : [];
|
|
2844
2861
|
}
|
|
2845
2862
|
// --- Render ---
|
|
2846
2863
|
_render(t) {
|
|
2847
2864
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2848
|
-
|
|
2865
|
+
qt(
|
|
2849
2866
|
this.shadowRoot,
|
|
2850
2867
|
t,
|
|
2851
2868
|
this.context,
|
|
@@ -2868,8 +2885,8 @@ function zt(e, n) {
|
|
|
2868
2885
|
}
|
|
2869
2886
|
_requestRender() {
|
|
2870
2887
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
2871
|
-
|
|
2872
|
-
|
|
2888
|
+
Ce(() => {
|
|
2889
|
+
Gt(
|
|
2873
2890
|
() => this._render(this._cfg),
|
|
2874
2891
|
this._lastRenderTime,
|
|
2875
2892
|
this._renderCount,
|
|
@@ -2890,7 +2907,7 @@ function zt(e, n) {
|
|
|
2890
2907
|
// --- Style ---
|
|
2891
2908
|
_applyStyle(t, s) {
|
|
2892
2909
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2893
|
-
|
|
2910
|
+
Zt(
|
|
2894
2911
|
this.shadowRoot,
|
|
2895
2912
|
this.context,
|
|
2896
2913
|
s,
|
|
@@ -2909,7 +2926,7 @@ function zt(e, n) {
|
|
|
2909
2926
|
} catch (r) {
|
|
2910
2927
|
this._hasError = !0;
|
|
2911
2928
|
try {
|
|
2912
|
-
const
|
|
2929
|
+
const i = this.tagName?.toLowerCase?.() || "<unknown>", o = this._componentId || "<unknown-id>", c = {};
|
|
2913
2930
|
if (t && t.props)
|
|
2914
2931
|
for (const f of Object.keys(t.props))
|
|
2915
2932
|
try {
|
|
@@ -2918,7 +2935,7 @@ function zt(e, n) {
|
|
|
2918
2935
|
} catch {
|
|
2919
2936
|
c[f] = "[unreadable]";
|
|
2920
2937
|
}
|
|
2921
|
-
|
|
2938
|
+
W(`Error rendering component <${i}> (id=${o}):`, r), W("Component props snapshot:", c), Q(
|
|
2922
2939
|
"Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`)."
|
|
2923
2940
|
);
|
|
2924
2941
|
} catch {
|
|
@@ -2929,12 +2946,12 @@ function zt(e, n) {
|
|
|
2929
2946
|
// --- State, props, computed ---
|
|
2930
2947
|
_initContext(t) {
|
|
2931
2948
|
try {
|
|
2932
|
-
let s = function(
|
|
2933
|
-
if (Array.isArray(
|
|
2934
|
-
return new Proxy(
|
|
2949
|
+
let s = function(i, o = "") {
|
|
2950
|
+
if (Array.isArray(i))
|
|
2951
|
+
return new Proxy(i, {
|
|
2935
2952
|
get(c, f, u) {
|
|
2936
|
-
const
|
|
2937
|
-
return typeof
|
|
2953
|
+
const S = Reflect.get(c, f, u);
|
|
2954
|
+
return typeof S == "function" && typeof f == "string" && [
|
|
2938
2955
|
"push",
|
|
2939
2956
|
"pop",
|
|
2940
2957
|
"shift",
|
|
@@ -2942,63 +2959,63 @@ function zt(e, n) {
|
|
|
2942
2959
|
"splice",
|
|
2943
2960
|
"sort",
|
|
2944
2961
|
"reverse"
|
|
2945
|
-
].includes(f) ? function(...
|
|
2946
|
-
const
|
|
2962
|
+
].includes(f) ? function(...g) {
|
|
2963
|
+
const w = S.apply(c, g);
|
|
2947
2964
|
if (!r._initializing) {
|
|
2948
|
-
const p =
|
|
2949
|
-
r._triggerWatchers(p, c),
|
|
2965
|
+
const p = o || "root";
|
|
2966
|
+
r._triggerWatchers(p, c), Ce(
|
|
2950
2967
|
() => r._render(t),
|
|
2951
2968
|
r._componentId
|
|
2952
2969
|
);
|
|
2953
2970
|
}
|
|
2954
|
-
return
|
|
2955
|
-
} :
|
|
2971
|
+
return w;
|
|
2972
|
+
} : S;
|
|
2956
2973
|
},
|
|
2957
2974
|
set(c, f, u) {
|
|
2958
2975
|
if (c[String(f)] = u, !r._initializing) {
|
|
2959
|
-
const
|
|
2960
|
-
r._triggerWatchers(
|
|
2976
|
+
const S = o ? `${o}.${String(f)}` : String(f);
|
|
2977
|
+
r._triggerWatchers(S, u), Ce(() => r._render(t), r._componentId);
|
|
2961
2978
|
}
|
|
2962
2979
|
return !0;
|
|
2963
2980
|
},
|
|
2964
2981
|
deleteProperty(c, f) {
|
|
2965
2982
|
if (delete c[String(f)], !r._initializing) {
|
|
2966
|
-
const u =
|
|
2967
|
-
r._triggerWatchers(u, void 0),
|
|
2983
|
+
const u = o ? `${o}.${String(f)}` : String(f);
|
|
2984
|
+
r._triggerWatchers(u, void 0), Ce(() => r._render(t), r._componentId);
|
|
2968
2985
|
}
|
|
2969
2986
|
return !0;
|
|
2970
2987
|
}
|
|
2971
2988
|
});
|
|
2972
|
-
if (
|
|
2973
|
-
if (
|
|
2974
|
-
return
|
|
2975
|
-
for (const c in
|
|
2976
|
-
const f =
|
|
2977
|
-
|
|
2989
|
+
if (i && typeof i == "object") {
|
|
2990
|
+
if (P(i))
|
|
2991
|
+
return i;
|
|
2992
|
+
for (const c in i) {
|
|
2993
|
+
const f = o ? `${o}.${c}` : c;
|
|
2994
|
+
i[c] = s(i[c], f);
|
|
2978
2995
|
}
|
|
2979
|
-
return new Proxy(
|
|
2996
|
+
return new Proxy(i, {
|
|
2980
2997
|
set(c, f, u) {
|
|
2981
|
-
const
|
|
2982
|
-
return c[String(f)] = s(u,
|
|
2983
|
-
|
|
2998
|
+
const S = o ? `${o}.${String(f)}` : String(f);
|
|
2999
|
+
return c[String(f)] = s(u, S), r._initializing || (r._triggerWatchers(
|
|
3000
|
+
S,
|
|
2984
3001
|
c[String(f)]
|
|
2985
|
-
),
|
|
3002
|
+
), Ce(() => r._render(t), r._componentId)), !0;
|
|
2986
3003
|
},
|
|
2987
3004
|
get(c, f, u) {
|
|
2988
3005
|
return Reflect.get(c, f, u);
|
|
2989
3006
|
}
|
|
2990
3007
|
});
|
|
2991
3008
|
}
|
|
2992
|
-
return
|
|
3009
|
+
return i;
|
|
2993
3010
|
};
|
|
2994
3011
|
const r = this;
|
|
2995
3012
|
return s({
|
|
2996
3013
|
// For functional components, state is managed by state() function calls
|
|
2997
3014
|
// Include prop defaults in initial reactive context so prop updates trigger reactivity
|
|
2998
3015
|
...t.props ? Object.fromEntries(
|
|
2999
|
-
Object.entries(t.props).map(([
|
|
3000
|
-
|
|
3001
|
-
|
|
3016
|
+
Object.entries(t.props).map(([i, o]) => [
|
|
3017
|
+
i,
|
|
3018
|
+
o.default
|
|
3002
3019
|
])
|
|
3003
3020
|
) : {}
|
|
3004
3021
|
});
|
|
@@ -3008,7 +3025,7 @@ function zt(e, n) {
|
|
|
3008
3025
|
}
|
|
3009
3026
|
_initWatchers(t) {
|
|
3010
3027
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
3011
|
-
|
|
3028
|
+
Ct(
|
|
3012
3029
|
this.context,
|
|
3013
3030
|
this._watchers,
|
|
3014
3031
|
{}
|
|
@@ -3017,12 +3034,12 @@ function zt(e, n) {
|
|
|
3017
3034
|
});
|
|
3018
3035
|
}
|
|
3019
3036
|
_triggerWatchers(t, s) {
|
|
3020
|
-
|
|
3037
|
+
kt(this.context, this._watchers, t, s);
|
|
3021
3038
|
}
|
|
3022
3039
|
_applyProps(t) {
|
|
3023
3040
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
3024
3041
|
try {
|
|
3025
|
-
|
|
3042
|
+
wt(this, t, this.context);
|
|
3026
3043
|
} catch (s) {
|
|
3027
3044
|
this._hasError = !0, t.onError && t.onError(s, this.context);
|
|
3028
3045
|
}
|
|
@@ -3030,85 +3047,85 @@ function zt(e, n) {
|
|
|
3030
3047
|
}
|
|
3031
3048
|
};
|
|
3032
3049
|
}
|
|
3033
|
-
function
|
|
3034
|
-
|
|
3035
|
-
let t =
|
|
3050
|
+
function yn(e, n) {
|
|
3051
|
+
Jt();
|
|
3052
|
+
let t = J(e);
|
|
3036
3053
|
t.includes("-") || (t = `cer-${t}`);
|
|
3037
3054
|
const s = {}, r = {
|
|
3038
3055
|
// Props are accessed via useProps() hook
|
|
3039
3056
|
props: {},
|
|
3040
3057
|
// Add lifecycle hooks from the stored functions
|
|
3041
|
-
onConnected: (
|
|
3058
|
+
onConnected: (i) => {
|
|
3042
3059
|
if (s.onConnected)
|
|
3043
3060
|
try {
|
|
3044
|
-
s.onConnected(
|
|
3061
|
+
s.onConnected(i);
|
|
3045
3062
|
} catch {
|
|
3046
3063
|
}
|
|
3047
3064
|
},
|
|
3048
|
-
onDisconnected: (
|
|
3065
|
+
onDisconnected: (i) => {
|
|
3049
3066
|
if (s.onDisconnected)
|
|
3050
3067
|
try {
|
|
3051
|
-
s.onDisconnected(
|
|
3068
|
+
s.onDisconnected(i);
|
|
3052
3069
|
} catch {
|
|
3053
3070
|
}
|
|
3054
3071
|
},
|
|
3055
|
-
onAttributeChanged: (
|
|
3072
|
+
onAttributeChanged: (i, o, c, f) => {
|
|
3056
3073
|
if (s.onAttributeChanged)
|
|
3057
3074
|
try {
|
|
3058
|
-
s.onAttributeChanged(
|
|
3075
|
+
s.onAttributeChanged(i, o, c, f);
|
|
3059
3076
|
} catch {
|
|
3060
3077
|
}
|
|
3061
3078
|
},
|
|
3062
|
-
onError: (
|
|
3063
|
-
if (s.onError &&
|
|
3079
|
+
onError: (i, o) => {
|
|
3080
|
+
if (s.onError && i)
|
|
3064
3081
|
try {
|
|
3065
|
-
s.onError(
|
|
3082
|
+
s.onError(i, o);
|
|
3066
3083
|
} catch {
|
|
3067
3084
|
}
|
|
3068
3085
|
},
|
|
3069
|
-
render: (
|
|
3070
|
-
const
|
|
3071
|
-
|
|
3072
|
-
|
|
3086
|
+
render: (i) => {
|
|
3087
|
+
const o = i, c = o._componentId || `${t}-${Math.random().toString(36).substr(2, 9)}`;
|
|
3088
|
+
Xe.setCurrentComponent(c, () => {
|
|
3089
|
+
i.requestRender && i.requestRender();
|
|
3073
3090
|
});
|
|
3074
3091
|
try {
|
|
3075
|
-
|
|
3092
|
+
ot(i);
|
|
3076
3093
|
let f;
|
|
3077
3094
|
try {
|
|
3078
3095
|
f = n();
|
|
3079
3096
|
} catch (u) {
|
|
3080
3097
|
try {
|
|
3081
|
-
const
|
|
3082
|
-
if (
|
|
3098
|
+
const S = o._hookCallbacks;
|
|
3099
|
+
if (S && typeof S.onError == "function")
|
|
3083
3100
|
try {
|
|
3084
|
-
|
|
3101
|
+
S.onError(u);
|
|
3085
3102
|
} catch {
|
|
3086
3103
|
}
|
|
3087
3104
|
} catch {
|
|
3088
3105
|
}
|
|
3089
3106
|
throw u;
|
|
3090
3107
|
}
|
|
3091
|
-
if (
|
|
3092
|
-
const u =
|
|
3093
|
-
if (u.onConnected && (s.onConnected = u.onConnected), u.onDisconnected && (s.onDisconnected = u.onDisconnected), u.onAttributeChanged && (s.onAttributeChanged = u.onAttributeChanged), u.onError && (s.onError = u.onError), u.style && (
|
|
3094
|
-
const
|
|
3108
|
+
if (o._hookCallbacks) {
|
|
3109
|
+
const u = o._hookCallbacks;
|
|
3110
|
+
if (u.onConnected && (s.onConnected = u.onConnected), u.onDisconnected && (s.onDisconnected = u.onDisconnected), u.onAttributeChanged && (s.onAttributeChanged = u.onAttributeChanged), u.onError && (s.onError = u.onError), u.style && (o._styleCallback = u.style), u.props) {
|
|
3111
|
+
const S = u.props;
|
|
3095
3112
|
r.props = Object.fromEntries(
|
|
3096
|
-
Object.entries(
|
|
3113
|
+
Object.entries(S).map(([E, g]) => [
|
|
3097
3114
|
E,
|
|
3098
|
-
{ type: typeof
|
|
3115
|
+
{ type: typeof g == "boolean" ? Boolean : typeof g == "number" ? Number : typeof g == "string" ? String : Function, default: g }
|
|
3099
3116
|
])
|
|
3100
|
-
),
|
|
3117
|
+
), be.set(t, r);
|
|
3101
3118
|
}
|
|
3102
3119
|
}
|
|
3103
3120
|
return f;
|
|
3104
3121
|
} finally {
|
|
3105
|
-
|
|
3122
|
+
Ke(), Xe.clearCurrentComponent();
|
|
3106
3123
|
}
|
|
3107
3124
|
}
|
|
3108
3125
|
};
|
|
3109
|
-
if (
|
|
3126
|
+
if (be.set(t, r), typeof window < "u") {
|
|
3110
3127
|
try {
|
|
3111
|
-
const
|
|
3128
|
+
const i = {
|
|
3112
3129
|
_hookCallbacks: {},
|
|
3113
3130
|
requestRender: () => {
|
|
3114
3131
|
},
|
|
@@ -3118,45 +3135,45 @@ function an(e, n) {
|
|
|
3118
3135
|
// instances will have a proper emit implementation.
|
|
3119
3136
|
emit: () => !0
|
|
3120
3137
|
};
|
|
3121
|
-
|
|
3138
|
+
ot(i);
|
|
3122
3139
|
try {
|
|
3123
3140
|
n();
|
|
3124
|
-
} catch (
|
|
3141
|
+
} catch (o) {
|
|
3125
3142
|
try {
|
|
3126
|
-
const c =
|
|
3143
|
+
const c = i?._hookCallbacks;
|
|
3127
3144
|
if (c && typeof c.onError == "function")
|
|
3128
3145
|
try {
|
|
3129
|
-
c.onError(
|
|
3146
|
+
c.onError(o);
|
|
3130
3147
|
} catch {
|
|
3131
3148
|
}
|
|
3132
|
-
|
|
3149
|
+
W(
|
|
3133
3150
|
`Error during component discovery render <${t}>:`,
|
|
3134
|
-
|
|
3135
|
-
),
|
|
3151
|
+
o
|
|
3152
|
+
), Q(
|
|
3136
3153
|
"Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when()."
|
|
3137
3154
|
);
|
|
3138
3155
|
} catch {
|
|
3139
3156
|
}
|
|
3140
|
-
throw
|
|
3157
|
+
throw Ke(), o;
|
|
3141
3158
|
}
|
|
3142
|
-
if (
|
|
3143
|
-
const
|
|
3159
|
+
if (Ke(), i._hookCallbacks?.props) {
|
|
3160
|
+
const o = i._hookCallbacks.props;
|
|
3144
3161
|
r.props = Object.fromEntries(
|
|
3145
|
-
Object.entries(
|
|
3162
|
+
Object.entries(o).map(([c, f]) => [
|
|
3146
3163
|
c,
|
|
3147
3164
|
{ type: typeof f == "boolean" ? Boolean : typeof f == "number" ? Number : typeof f == "string" ? String : Function, default: f }
|
|
3148
3165
|
])
|
|
3149
|
-
),
|
|
3166
|
+
), be.set(t, r);
|
|
3150
3167
|
}
|
|
3151
3168
|
} catch {
|
|
3152
3169
|
}
|
|
3153
3170
|
customElements.get(t) || customElements.define(
|
|
3154
3171
|
t,
|
|
3155
|
-
|
|
3172
|
+
Yt(t, r)
|
|
3156
3173
|
);
|
|
3157
3174
|
}
|
|
3158
3175
|
}
|
|
3159
|
-
class
|
|
3176
|
+
class Xt {
|
|
3160
3177
|
map = /* @__PURE__ */ new Map();
|
|
3161
3178
|
maxSize;
|
|
3162
3179
|
constructor(n) {
|
|
@@ -3180,49 +3197,49 @@ class Ft {
|
|
|
3180
3197
|
this.map.clear();
|
|
3181
3198
|
}
|
|
3182
3199
|
}
|
|
3183
|
-
const
|
|
3184
|
-
function
|
|
3200
|
+
const Ue = new Xt(500);
|
|
3201
|
+
function Qt(e, n) {
|
|
3185
3202
|
if (e == null) {
|
|
3186
|
-
|
|
3203
|
+
Q(
|
|
3187
3204
|
`⚠️ Event handler for '@${n}' is ${e}. This will prevent the event from working. Use a function reference instead: @${n}="\${functionName}"`
|
|
3188
3205
|
);
|
|
3189
3206
|
return;
|
|
3190
3207
|
}
|
|
3191
|
-
typeof e != "function" &&
|
|
3208
|
+
typeof e != "function" && Q(
|
|
3192
3209
|
`🚨 Potential infinite loop detected! Event handler for '@${n}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${n}="\${functionName()}" to @${n}="\${functionName}" to pass the function reference instead of calling it immediately.`
|
|
3193
|
-
), e === void 0 && typeof e != "function" &&
|
|
3210
|
+
), e === void 0 && typeof e != "function" && Q(
|
|
3194
3211
|
`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${n}="\${fn}" not @${n}="\${fn()}"`
|
|
3195
3212
|
);
|
|
3196
3213
|
}
|
|
3197
|
-
function
|
|
3214
|
+
function oe(e, n = {}, t, s) {
|
|
3198
3215
|
const r = s ?? n.key;
|
|
3199
3216
|
return { tag: e, key: r, props: n, children: t };
|
|
3200
3217
|
}
|
|
3201
|
-
function
|
|
3218
|
+
function Oe(e) {
|
|
3202
3219
|
return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
|
|
3203
3220
|
}
|
|
3204
|
-
function
|
|
3205
|
-
return typeof e == "object" && e !== null && "tag" in e && !
|
|
3221
|
+
function fe(e) {
|
|
3222
|
+
return typeof e == "object" && e !== null && "tag" in e && !Oe(e);
|
|
3206
3223
|
}
|
|
3207
|
-
function
|
|
3224
|
+
function en(e, n) {
|
|
3208
3225
|
return e.key != null ? e : { ...e, key: n };
|
|
3209
3226
|
}
|
|
3210
|
-
function
|
|
3211
|
-
const s = {}, r = {},
|
|
3227
|
+
function tn(e, n = [], t = {}) {
|
|
3228
|
+
const s = {}, r = {}, i = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
|
|
3212
3229
|
let f;
|
|
3213
3230
|
for (; f = c.exec(e); ) {
|
|
3214
|
-
const u = f[1],
|
|
3231
|
+
const u = f[1], S = f[2];
|
|
3215
3232
|
let E = "";
|
|
3216
|
-
for (let
|
|
3217
|
-
if (f[
|
|
3218
|
-
E = f[
|
|
3233
|
+
for (let a = 3; a < f.length; a++)
|
|
3234
|
+
if (f[a] !== void 0) {
|
|
3235
|
+
E = f[a];
|
|
3219
3236
|
break;
|
|
3220
3237
|
}
|
|
3221
3238
|
E.length >= 2 && (E[0] === '"' && E[E.length - 1] === '"' || E[0] === "'" && E[E.length - 1] === "'") && (E = E.slice(1, -1));
|
|
3222
|
-
const
|
|
3223
|
-
let p =
|
|
3224
|
-
|
|
3225
|
-
const
|
|
3239
|
+
const g = !/=/.test(f[0]), w = E.match(/^{{(\d+)}}$/);
|
|
3240
|
+
let p = g ? !0 : w ? n[Number(w[1])] ?? null : E;
|
|
3241
|
+
w || (p === "true" ? p = !0 : p === "false" ? p = !1 : p === "null" ? p = null : isNaN(Number(p)) || (p = Number(p)));
|
|
3242
|
+
const v = [
|
|
3226
3243
|
"model",
|
|
3227
3244
|
"bind",
|
|
3228
3245
|
"show",
|
|
@@ -3232,71 +3249,71 @@ function Gt(e, n = [], t = {}) {
|
|
|
3232
3249
|
"when"
|
|
3233
3250
|
];
|
|
3234
3251
|
if (u === ":") {
|
|
3235
|
-
const [
|
|
3236
|
-
if (
|
|
3237
|
-
const d = [...
|
|
3238
|
-
|
|
3252
|
+
const [a, C] = S.split(":"), [b, ...h] = a.split(".");
|
|
3253
|
+
if (v.includes(b)) {
|
|
3254
|
+
const d = [...h], _ = b === "model" && C ? `model:${C}` : b;
|
|
3255
|
+
i[_] = {
|
|
3239
3256
|
value: p,
|
|
3240
3257
|
modifiers: d,
|
|
3241
|
-
arg:
|
|
3258
|
+
arg: C
|
|
3242
3259
|
};
|
|
3243
|
-
} else if (
|
|
3260
|
+
} else if (S === "disabled") {
|
|
3244
3261
|
let d = p;
|
|
3245
|
-
d &&
|
|
3246
|
-
const
|
|
3247
|
-
if (d === "" ||
|
|
3248
|
-
s[
|
|
3262
|
+
d && P(d) && (d = d.value);
|
|
3263
|
+
const _ = typeof d;
|
|
3264
|
+
if (d === "" || _ === "boolean" || _ === "string" && (d === "true" || d === "false") || d == null || _ === "number")
|
|
3265
|
+
s[S] = d;
|
|
3249
3266
|
else {
|
|
3250
|
-
let
|
|
3251
|
-
|
|
3267
|
+
let y = p;
|
|
3268
|
+
y && P(y) && (y = y.value), r[S] = y;
|
|
3252
3269
|
}
|
|
3253
|
-
|
|
3270
|
+
o.push(S);
|
|
3254
3271
|
} else {
|
|
3255
3272
|
let d = p;
|
|
3256
|
-
d &&
|
|
3273
|
+
d && P(d) && (d = d.value), r[S] = d, o.push(S);
|
|
3257
3274
|
}
|
|
3258
3275
|
} else if (u === "@") {
|
|
3259
|
-
const [
|
|
3260
|
-
|
|
3261
|
-
const
|
|
3262
|
-
if (
|
|
3263
|
-
const d = (
|
|
3264
|
-
if (b.includes("prevent") &&
|
|
3265
|
-
return b.includes("once") &&
|
|
3266
|
-
|
|
3276
|
+
const [a, ...C] = S.split("."), b = C;
|
|
3277
|
+
Qt(p, a);
|
|
3278
|
+
const h = typeof p == "function" ? p : typeof t[p] == "function" ? t[p] : void 0;
|
|
3279
|
+
if (h) {
|
|
3280
|
+
const d = (T) => {
|
|
3281
|
+
if (b.includes("prevent") && T.preventDefault(), b.includes("stop") && T.stopPropagation(), !(b.includes("self") && T.target !== T.currentTarget))
|
|
3282
|
+
return b.includes("once") && T.currentTarget?.removeEventListener(
|
|
3283
|
+
a,
|
|
3267
3284
|
d
|
|
3268
|
-
),
|
|
3269
|
-
},
|
|
3270
|
-
s[
|
|
3285
|
+
), h(T);
|
|
3286
|
+
}, _ = "on" + a.charAt(0).toUpperCase() + a.slice(1);
|
|
3287
|
+
s[_] = d;
|
|
3271
3288
|
}
|
|
3272
|
-
} else
|
|
3289
|
+
} else S === "ref" ? s.ref = p : r[S] = p;
|
|
3273
3290
|
}
|
|
3274
|
-
return { props: s, attrs: r, directives:
|
|
3291
|
+
return { props: s, attrs: r, directives: i, bound: o };
|
|
3275
3292
|
}
|
|
3276
|
-
function
|
|
3277
|
-
if (!
|
|
3293
|
+
function Ge(e) {
|
|
3294
|
+
if (!fe(e) || Oe(e))
|
|
3278
3295
|
return e;
|
|
3279
3296
|
const n = e.props?.directives;
|
|
3280
3297
|
if (n && n.when) {
|
|
3281
|
-
const t = n.when.value, s =
|
|
3298
|
+
const t = n.when.value, s = P(t) ? t.value : t, r = { ...n };
|
|
3282
3299
|
delete r.when;
|
|
3283
|
-
const
|
|
3284
|
-
Object.keys(r).length > 0 ?
|
|
3285
|
-
const
|
|
3300
|
+
const i = { ...e.props };
|
|
3301
|
+
Object.keys(r).length > 0 ? i.directives = r : delete i.directives;
|
|
3302
|
+
const o = {
|
|
3286
3303
|
...e,
|
|
3287
|
-
props:
|
|
3304
|
+
props: i
|
|
3288
3305
|
};
|
|
3289
|
-
return Array.isArray(
|
|
3290
|
-
(f) => typeof f == "object" && f !== null ?
|
|
3306
|
+
return Array.isArray(o.children) && (o.children = o.children.map(
|
|
3307
|
+
(f) => typeof f == "object" && f !== null ? Ge(f) : f
|
|
3291
3308
|
)), {
|
|
3292
3309
|
tag: "#anchor",
|
|
3293
3310
|
key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
|
|
3294
|
-
children: s ? [
|
|
3311
|
+
children: s ? [o] : []
|
|
3295
3312
|
};
|
|
3296
3313
|
}
|
|
3297
3314
|
if (Array.isArray(e.children)) {
|
|
3298
3315
|
const t = e.children.map(
|
|
3299
|
-
(s) => typeof s == "object" && s !== null ?
|
|
3316
|
+
(s) => typeof s == "object" && s !== null ? Ge(s) : s
|
|
3300
3317
|
);
|
|
3301
3318
|
return {
|
|
3302
3319
|
...e,
|
|
@@ -3305,87 +3322,101 @@ function Fe(e) {
|
|
|
3305
3322
|
}
|
|
3306
3323
|
return e;
|
|
3307
3324
|
}
|
|
3308
|
-
function
|
|
3309
|
-
const s =
|
|
3310
|
-
if (
|
|
3311
|
-
const
|
|
3312
|
-
if (
|
|
3325
|
+
function nn(e, n, t) {
|
|
3326
|
+
const s = Le.length > 0 ? Le[Le.length - 1] : void 0, r = t ?? s, i = !t && n.length === 0, o = i ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3327
|
+
if (i && o) {
|
|
3328
|
+
const l = Ue.get(o);
|
|
3329
|
+
if (l) return l;
|
|
3313
3330
|
}
|
|
3314
|
-
function c(
|
|
3315
|
-
return
|
|
3331
|
+
function c(l, m) {
|
|
3332
|
+
return oe("#text", {}, l, m);
|
|
3316
3333
|
}
|
|
3317
|
-
function f(
|
|
3318
|
-
let
|
|
3319
|
-
return typeof
|
|
3334
|
+
function f(l, m, A = !1) {
|
|
3335
|
+
let N = typeof l == "string" ? Et(l) : l;
|
|
3336
|
+
return !A && typeof N == "string" && /[\r\n]/.test(N) && (N = N.replace(/\s+/g, " ")), oe("#text", {}, N, m);
|
|
3320
3337
|
}
|
|
3321
3338
|
let u = "";
|
|
3322
|
-
for (let
|
|
3323
|
-
u += e[
|
|
3324
|
-
const
|
|
3325
|
-
let
|
|
3326
|
-
const b = []
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
+
for (let l = 0; l < e.length; l++)
|
|
3340
|
+
u += e[l], l < n.length && (u += `{{${l}}}`);
|
|
3341
|
+
const S = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, E = [];
|
|
3342
|
+
let g, w = [], p = null, v = {}, a, C = 0;
|
|
3343
|
+
const b = [], h = /* @__PURE__ */ new Set([
|
|
3344
|
+
"pre",
|
|
3345
|
+
"code",
|
|
3346
|
+
"textarea",
|
|
3347
|
+
"script",
|
|
3348
|
+
"style"
|
|
3349
|
+
]);
|
|
3350
|
+
function d() {
|
|
3351
|
+
if (p && h.has(p.toLowerCase()))
|
|
3352
|
+
return !0;
|
|
3353
|
+
for (const l of E)
|
|
3354
|
+
if (h.has(l.tag.toLowerCase()))
|
|
3355
|
+
return !0;
|
|
3356
|
+
return !1;
|
|
3357
|
+
}
|
|
3358
|
+
function _(l) {
|
|
3359
|
+
if (!l || typeof l != "object" || Oe(l)) return;
|
|
3360
|
+
const m = l, A = v;
|
|
3361
|
+
if (m.props || m.attrs) {
|
|
3362
|
+
const N = m;
|
|
3363
|
+
N.props && (A.props || (A.props = {}), Object.assign(A.props, N.props)), N.attrs && (A.attrs || (A.attrs = {}), Object.keys(N.attrs).forEach((O) => {
|
|
3364
|
+
if (O === "style" && A.attrs.style) {
|
|
3365
|
+
const $ = String(A.attrs.style).replace(/;?\s*$/, ""), R = String(N.attrs.style).replace(/^;?\s*/, "");
|
|
3366
|
+
A.attrs.style = $ + "; " + R;
|
|
3367
|
+
} else if (O === "class" && A.attrs.class) {
|
|
3368
|
+
const $ = String(A.attrs.class).trim().split(/\s+/).filter(Boolean), R = String(N.attrs.class).trim().split(/\s+/).filter(Boolean), M = [
|
|
3369
|
+
.../* @__PURE__ */ new Set([...$, ...R])
|
|
3339
3370
|
];
|
|
3340
|
-
|
|
3371
|
+
A.attrs.class = M.join(" ");
|
|
3341
3372
|
} else
|
|
3342
|
-
|
|
3373
|
+
A.attrs[O] = N.attrs[O];
|
|
3343
3374
|
}));
|
|
3344
3375
|
} else
|
|
3345
|
-
|
|
3346
|
-
}
|
|
3347
|
-
function
|
|
3348
|
-
const
|
|
3349
|
-
if (
|
|
3350
|
-
const
|
|
3351
|
-
|
|
3352
|
-
...
|
|
3353
|
-
key:
|
|
3354
|
-
children:
|
|
3376
|
+
A.props || (A.props = {}), Object.assign(A.props, m);
|
|
3377
|
+
}
|
|
3378
|
+
function T(l, m) {
|
|
3379
|
+
const A = p ? w : b;
|
|
3380
|
+
if (Oe(l)) {
|
|
3381
|
+
const N = l.key ?? m, O = l.children;
|
|
3382
|
+
A.push({
|
|
3383
|
+
...l,
|
|
3384
|
+
key: N,
|
|
3385
|
+
children: O
|
|
3355
3386
|
});
|
|
3356
3387
|
return;
|
|
3357
3388
|
}
|
|
3358
|
-
if (
|
|
3359
|
-
|
|
3389
|
+
if (fe(l)) {
|
|
3390
|
+
A.push(en(l, void 0));
|
|
3360
3391
|
return;
|
|
3361
3392
|
}
|
|
3362
|
-
if (Array.isArray(
|
|
3363
|
-
if (
|
|
3364
|
-
for (let
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3367
|
-
|
|
3393
|
+
if (Array.isArray(l)) {
|
|
3394
|
+
if (l.length === 0) return;
|
|
3395
|
+
for (let N = 0; N < l.length; N++) {
|
|
3396
|
+
const O = l[N];
|
|
3397
|
+
Oe(O) || fe(O) || Array.isArray(O) ? T(O, `${m}-${N}`) : O !== null && typeof O == "object" ? Qe(O) ? A.push(
|
|
3398
|
+
oe(
|
|
3368
3399
|
"#raw",
|
|
3369
3400
|
{},
|
|
3370
|
-
|
|
3371
|
-
`${
|
|
3401
|
+
O.__rawHTML,
|
|
3402
|
+
`${m}-${N}`
|
|
3372
3403
|
)
|
|
3373
|
-
) :
|
|
3404
|
+
) : _(O) : A.push(c(String(O), `${m}-${N}`));
|
|
3374
3405
|
}
|
|
3375
3406
|
return;
|
|
3376
3407
|
}
|
|
3377
|
-
if (
|
|
3378
|
-
if (
|
|
3379
|
-
const
|
|
3380
|
-
|
|
3408
|
+
if (l !== null && typeof l == "object") {
|
|
3409
|
+
if (Qe(l)) {
|
|
3410
|
+
const N = l.__rawHTML ?? "";
|
|
3411
|
+
A.push(oe("#raw", {}, N, m));
|
|
3381
3412
|
return;
|
|
3382
3413
|
}
|
|
3383
|
-
|
|
3414
|
+
_(l);
|
|
3384
3415
|
return;
|
|
3385
3416
|
}
|
|
3386
|
-
|
|
3417
|
+
A.push(c(String(l), m));
|
|
3387
3418
|
}
|
|
3388
|
-
const
|
|
3419
|
+
const L = /* @__PURE__ */ new Set([
|
|
3389
3420
|
"area",
|
|
3390
3421
|
"base",
|
|
3391
3422
|
"br",
|
|
@@ -3401,26 +3432,26 @@ function Zt(e, n, t) {
|
|
|
3401
3432
|
"track",
|
|
3402
3433
|
"wbr"
|
|
3403
3434
|
]);
|
|
3404
|
-
for (;
|
|
3405
|
-
if (!(
|
|
3406
|
-
if (
|
|
3407
|
-
const
|
|
3408
|
-
props:
|
|
3409
|
-
attrs:
|
|
3435
|
+
for (; g = S.exec(u); )
|
|
3436
|
+
if (!(g[0].startsWith("<!--") && g[0].endsWith("-->"))) {
|
|
3437
|
+
if (g[1]) {
|
|
3438
|
+
const l = g[1], m = g[0][1] === "/", A = g[0][g[0].length - 2] === "/" || L.has(l), {
|
|
3439
|
+
props: N,
|
|
3440
|
+
attrs: O,
|
|
3410
3441
|
directives: $,
|
|
3411
|
-
bound:
|
|
3412
|
-
} =
|
|
3413
|
-
|
|
3442
|
+
bound: R
|
|
3443
|
+
} = tn(
|
|
3444
|
+
g[2] || "",
|
|
3414
3445
|
n,
|
|
3415
3446
|
r ?? {}
|
|
3416
|
-
),
|
|
3417
|
-
for (const
|
|
3418
|
-
for (const
|
|
3419
|
-
|
|
3420
|
-
|
|
3447
|
+
), M = { props: {}, attrs: {} };
|
|
3448
|
+
for (const K in N) M.props[K] = N[K];
|
|
3449
|
+
for (const K in O) M.attrs[K] = O[K];
|
|
3450
|
+
M.attrs && Object.prototype.hasOwnProperty.call(M.attrs, "key") && !(M.props && Object.prototype.hasOwnProperty.call(M.props, "key")) && H(() => {
|
|
3451
|
+
M.props.key = M.attrs.key;
|
|
3421
3452
|
});
|
|
3422
3453
|
try {
|
|
3423
|
-
const
|
|
3454
|
+
const K = {
|
|
3424
3455
|
input: [
|
|
3425
3456
|
"value",
|
|
3426
3457
|
"checked",
|
|
@@ -3444,51 +3475,51 @@ function Zt(e, n, t) {
|
|
|
3444
3475
|
audio: ["muted", "autoplay", "controls", "loop"],
|
|
3445
3476
|
img: ["src", "alt", "width", "height"],
|
|
3446
3477
|
button: ["type", "name", "value", "autofocus", "form"]
|
|
3447
|
-
},
|
|
3448
|
-
if (
|
|
3449
|
-
for (const
|
|
3450
|
-
if (
|
|
3451
|
-
let
|
|
3452
|
-
if (
|
|
3453
|
-
|
|
3454
|
-
else if (
|
|
3478
|
+
}, I = l.toLowerCase(), ie = K[I] ?? [];
|
|
3479
|
+
if (M.attrs) {
|
|
3480
|
+
for (const x of ie)
|
|
3481
|
+
if (R && R.includes(x) && x in M.attrs && !(M.props && x in M.props)) {
|
|
3482
|
+
let j = M.attrs[x];
|
|
3483
|
+
if (j && P(j))
|
|
3484
|
+
j = j.value, M.props[x] = j, delete M.attrs[x];
|
|
3485
|
+
else if (j && typeof j == "object" && "value" in j && !(j instanceof Node))
|
|
3455
3486
|
try {
|
|
3456
|
-
const
|
|
3457
|
-
|
|
3487
|
+
const z = j.value;
|
|
3488
|
+
M.props[x] = (I === "select" || I === "option") && x === "value" ? String(z) : z, delete M.attrs[x];
|
|
3458
3489
|
} catch {
|
|
3459
3490
|
}
|
|
3460
3491
|
else {
|
|
3461
|
-
const
|
|
3462
|
-
if (
|
|
3463
|
-
(
|
|
3464
|
-
else if (
|
|
3465
|
-
const
|
|
3466
|
-
|
|
3492
|
+
const z = typeof j;
|
|
3493
|
+
if (x === "disabled")
|
|
3494
|
+
(j === "" || z === "boolean" || z === "string" && (j === "true" || j === "false") || j == null || z === "number") && (M.props[x] = j, delete M.attrs[x]);
|
|
3495
|
+
else if (j === "" || z === "string" || z === "number" || z === "boolean" || j == null) {
|
|
3496
|
+
const ee = (I === "select" || I === "option") && x === "value" ? String(j) : j;
|
|
3497
|
+
M.props[x] = ee, delete M.attrs[x];
|
|
3467
3498
|
}
|
|
3468
3499
|
}
|
|
3469
3500
|
}
|
|
3470
3501
|
}
|
|
3471
|
-
if (
|
|
3472
|
-
if (
|
|
3473
|
-
const
|
|
3474
|
-
for (const
|
|
3475
|
-
if (
|
|
3476
|
-
const
|
|
3477
|
-
if (
|
|
3502
|
+
if (l.includes("-") || !!r?.__customElements?.has?.(l)) {
|
|
3503
|
+
if (M.isCustomElement = !0, R && M.attrs) {
|
|
3504
|
+
const x = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
3505
|
+
for (const j of R)
|
|
3506
|
+
if (j in M.attrs && !(M.props && j in M.props)) {
|
|
3507
|
+
const z = j.includes("-") ? Ze(j) : j, ee = M.attrs[j];
|
|
3508
|
+
if (M.props[z] = ee, x.has(j) || at(j))
|
|
3478
3509
|
try {
|
|
3479
|
-
const
|
|
3480
|
-
|
|
3510
|
+
const Pe = F(M.attrs[j]);
|
|
3511
|
+
Pe === null ? delete M.attrs[j] : M.attrs[j] = Pe;
|
|
3481
3512
|
} catch {
|
|
3482
|
-
delete
|
|
3513
|
+
delete M.attrs[j];
|
|
3483
3514
|
}
|
|
3484
3515
|
else
|
|
3485
|
-
delete
|
|
3516
|
+
delete M.attrs[j];
|
|
3486
3517
|
}
|
|
3487
3518
|
}
|
|
3488
3519
|
try {
|
|
3489
|
-
if (
|
|
3490
|
-
const
|
|
3491
|
-
typeof
|
|
3520
|
+
if (M.attrs && !(M.props && "modelValue" in M.props)) {
|
|
3521
|
+
const x = M.attrs["model-value"] ?? M.attrs.modelValue;
|
|
3522
|
+
typeof x < "u" && (M.props.modelValue = x);
|
|
3492
3523
|
}
|
|
3493
3524
|
} catch {
|
|
3494
3525
|
}
|
|
@@ -3496,154 +3527,154 @@ function Zt(e, n, t) {
|
|
|
3496
3527
|
} catch {
|
|
3497
3528
|
}
|
|
3498
3529
|
if ($ && Object.keys($).some(
|
|
3499
|
-
(
|
|
3530
|
+
(K) => K === "model" || K.startsWith("model:")
|
|
3500
3531
|
))
|
|
3501
3532
|
try {
|
|
3502
|
-
const
|
|
3503
|
-
if (!!(
|
|
3504
|
-
for (const
|
|
3505
|
-
if (
|
|
3506
|
-
const
|
|
3507
|
-
let
|
|
3508
|
-
typeof
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
) :
|
|
3533
|
+
const K = Symbol.for("cer.registry"), I = globalThis[K], ie = !!(I && typeof I.has == "function" && I.has(l)), Y = r, x = !!(Y && (Y.__customElements instanceof Set && Y.__customElements.has(l) || Array.isArray(Y.__isCustomElements) && Y.__isCustomElements.includes(l)));
|
|
3534
|
+
if (!!(l.includes("-") || x || ie))
|
|
3535
|
+
for (const ee of Object.keys($)) {
|
|
3536
|
+
if (ee !== "model" && !ee.startsWith("model:")) continue;
|
|
3537
|
+
const $e = $[ee], Pe = $e.arg ?? (ee.includes(":") ? ee.split(":", 2)[1] : void 0), V = $e.value, Be = Pe ?? "modelValue", Je = U, ht = Re, Se = r?._state || r;
|
|
3538
|
+
let re;
|
|
3539
|
+
typeof V == "string" && Se ? re = Je(
|
|
3540
|
+
Se,
|
|
3541
|
+
V
|
|
3542
|
+
) : re = V, M.props[Be] = re;
|
|
3512
3543
|
try {
|
|
3513
|
-
const
|
|
3514
|
-
|
|
3544
|
+
const ce = J(Be);
|
|
3545
|
+
M.attrs || (M.attrs = {}), re != null && (typeof re == "string" || typeof re == "number" || typeof re == "boolean") && (M.attrs[ce] = re);
|
|
3515
3546
|
} catch {
|
|
3516
3547
|
}
|
|
3517
|
-
|
|
3518
|
-
const
|
|
3548
|
+
M.isCustomElement = !0;
|
|
3549
|
+
const Ye = `update:${J(Be)}`.replace(
|
|
3519
3550
|
/-([a-z])/g,
|
|
3520
|
-
(
|
|
3521
|
-
),
|
|
3522
|
-
|
|
3523
|
-
const
|
|
3524
|
-
if (
|
|
3525
|
-
if (
|
|
3526
|
-
const
|
|
3527
|
-
if (Array.isArray(
|
|
3528
|
-
|
|
3551
|
+
(ce, ne) => ne.toUpperCase()
|
|
3552
|
+
), yt = "on" + Ye.charAt(0).toUpperCase() + Ye.slice(1);
|
|
3553
|
+
M.props[yt] = function(ce) {
|
|
3554
|
+
const ne = ce.detail !== void 0 ? ce.detail : ce.target ? ce.target.value : void 0;
|
|
3555
|
+
if (Se)
|
|
3556
|
+
if (V && P(V)) {
|
|
3557
|
+
const ae = V.value;
|
|
3558
|
+
if (Array.isArray(ne) && Array.isArray(ae) ? JSON.stringify([...ne].sort()) !== JSON.stringify([...ae].sort()) : ne !== ae) {
|
|
3559
|
+
V.value = ne;
|
|
3529
3560
|
try {
|
|
3530
|
-
const
|
|
3531
|
-
if (
|
|
3532
|
-
const
|
|
3533
|
-
typeof
|
|
3561
|
+
const le = r;
|
|
3562
|
+
if (le) {
|
|
3563
|
+
const ve = le.requestRender, _e = le._requestRender;
|
|
3564
|
+
typeof ve == "function" ? ve() : typeof _e == "function" && _e();
|
|
3534
3565
|
}
|
|
3535
3566
|
} catch {
|
|
3536
3567
|
}
|
|
3537
3568
|
}
|
|
3538
3569
|
} else {
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3541
|
-
typeof
|
|
3570
|
+
const ae = Je(
|
|
3571
|
+
Se || {},
|
|
3572
|
+
typeof V == "string" ? V : String(V)
|
|
3542
3573
|
);
|
|
3543
|
-
if (Array.isArray(
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
typeof
|
|
3547
|
-
|
|
3574
|
+
if (Array.isArray(ne) && Array.isArray(ae) ? JSON.stringify([...ne].sort()) !== JSON.stringify([...ae].sort()) : ne !== ae) {
|
|
3575
|
+
ht(
|
|
3576
|
+
Se || {},
|
|
3577
|
+
typeof V == "string" ? V : String(V),
|
|
3578
|
+
ne
|
|
3548
3579
|
);
|
|
3549
3580
|
try {
|
|
3550
|
-
const
|
|
3551
|
-
if (
|
|
3552
|
-
const
|
|
3553
|
-
typeof
|
|
3581
|
+
const le = r;
|
|
3582
|
+
if (le) {
|
|
3583
|
+
const ve = le.requestRender, _e = le._requestRender;
|
|
3584
|
+
typeof ve == "function" ? ve() : typeof _e == "function" && _e();
|
|
3554
3585
|
}
|
|
3555
3586
|
} catch {
|
|
3556
3587
|
}
|
|
3557
3588
|
}
|
|
3558
3589
|
}
|
|
3559
|
-
}, delete $[
|
|
3590
|
+
}, delete $[ee];
|
|
3560
3591
|
}
|
|
3561
3592
|
} catch {
|
|
3562
3593
|
}
|
|
3563
|
-
if (Object.keys($).length > 0 && (
|
|
3564
|
-
const
|
|
3565
|
-
(
|
|
3594
|
+
if (Object.keys($).length > 0 && (M.directives = { ...$ }), m) {
|
|
3595
|
+
const K = w.some(
|
|
3596
|
+
(x) => typeof x == "object" && x.tag !== "#text"
|
|
3566
3597
|
);
|
|
3567
|
-
let
|
|
3568
|
-
if (
|
|
3569
|
-
let
|
|
3570
|
-
for (;
|
|
3571
|
-
const
|
|
3572
|
-
if (!
|
|
3598
|
+
let I = w;
|
|
3599
|
+
if (K && w.length > 0) {
|
|
3600
|
+
let x = 0;
|
|
3601
|
+
for (; x < w.length; ) {
|
|
3602
|
+
const z = w[x];
|
|
3603
|
+
if (!fe(z) || z.tag !== "#text" || typeof z.children != "string" || z.children.trim() !== "")
|
|
3573
3604
|
break;
|
|
3574
|
-
|
|
3605
|
+
x++;
|
|
3575
3606
|
}
|
|
3576
|
-
let
|
|
3577
|
-
for (;
|
|
3578
|
-
const
|
|
3579
|
-
if (!
|
|
3607
|
+
let j = w.length - 1;
|
|
3608
|
+
for (; j >= 0; ) {
|
|
3609
|
+
const z = w[j];
|
|
3610
|
+
if (!fe(z) || z.tag !== "#text" || typeof z.children != "string" || z.children.trim() !== "")
|
|
3580
3611
|
break;
|
|
3581
|
-
|
|
3612
|
+
j--;
|
|
3582
3613
|
}
|
|
3583
|
-
|
|
3614
|
+
x === 0 && j === w.length - 1 ? I = w : x > j ? I = [] : I = w.slice(x, j + 1);
|
|
3584
3615
|
}
|
|
3585
|
-
const
|
|
3616
|
+
const ie = oe(
|
|
3586
3617
|
p,
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
),
|
|
3591
|
-
|
|
3592
|
-
} else
|
|
3618
|
+
v,
|
|
3619
|
+
I.length === 1 && fe(I[0]) && I[0].tag === "#text" ? typeof I[0].children == "string" ? I[0].children : "" : I.length ? I : void 0,
|
|
3620
|
+
a
|
|
3621
|
+
), Y = E.pop();
|
|
3622
|
+
Y ? (p = Y.tag, v = Y.props, a = Y.key, w = Y.children, w.push(ie)) : (b.push(ie), p = null, v = {}, a = void 0, w = []);
|
|
3623
|
+
} else A ? p ? w.push(oe(l, M, void 0, void 0)) : b.push(oe(l, M, void 0, void 0)) : (p && E.push({
|
|
3593
3624
|
tag: p,
|
|
3594
|
-
props:
|
|
3595
|
-
children:
|
|
3596
|
-
key:
|
|
3597
|
-
}), p =
|
|
3598
|
-
} else if (typeof
|
|
3599
|
-
const
|
|
3600
|
-
|
|
3601
|
-
} else if (
|
|
3602
|
-
const
|
|
3603
|
-
for (const
|
|
3604
|
-
if (!
|
|
3605
|
-
const
|
|
3606
|
-
if (
|
|
3607
|
-
const $ = Number(
|
|
3608
|
-
|
|
3625
|
+
props: v,
|
|
3626
|
+
children: w,
|
|
3627
|
+
key: a
|
|
3628
|
+
}), p = l, v = M, w = []);
|
|
3629
|
+
} else if (typeof g[3] < "u") {
|
|
3630
|
+
const l = Number(g[3]), m = n[l], A = `interp-${l}`;
|
|
3631
|
+
T(m, A);
|
|
3632
|
+
} else if (g[4]) {
|
|
3633
|
+
const l = g[4], m = p ? w : b, A = l.split(/({{\d+}})/);
|
|
3634
|
+
for (const N of A) {
|
|
3635
|
+
if (!N) continue;
|
|
3636
|
+
const O = N.match(/^{{(\d+)}}$/);
|
|
3637
|
+
if (O) {
|
|
3638
|
+
const $ = Number(O[1]), R = n[$], M = `interp-${$}`;
|
|
3639
|
+
T(R, M);
|
|
3609
3640
|
} else {
|
|
3610
|
-
const $ = `text-${
|
|
3611
|
-
|
|
3641
|
+
const $ = `text-${C++}`, R = d();
|
|
3642
|
+
m.push(f(N, $, R));
|
|
3612
3643
|
}
|
|
3613
3644
|
}
|
|
3614
3645
|
}
|
|
3615
3646
|
}
|
|
3616
|
-
const
|
|
3617
|
-
(
|
|
3647
|
+
const k = b.filter((l) => fe(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0).map(
|
|
3648
|
+
(l) => Ge(l)
|
|
3618
3649
|
);
|
|
3619
|
-
if (
|
|
3620
|
-
const
|
|
3621
|
-
return
|
|
3622
|
-
} else if (
|
|
3623
|
-
const
|
|
3624
|
-
return
|
|
3650
|
+
if (k.length === 1) {
|
|
3651
|
+
const l = k[0];
|
|
3652
|
+
return i && o && Ue.set(o, l), l;
|
|
3653
|
+
} else if (k.length > 1) {
|
|
3654
|
+
const l = k;
|
|
3655
|
+
return i && o && Ue.set(o, l), l;
|
|
3625
3656
|
}
|
|
3626
|
-
return
|
|
3657
|
+
return oe("div", {}, "", "fallback-root");
|
|
3627
3658
|
}
|
|
3628
|
-
function
|
|
3659
|
+
function mn(e, ...n) {
|
|
3629
3660
|
const t = n[n.length - 1], s = typeof t == "object" && t && !Array.isArray(t) ? t : void 0;
|
|
3630
|
-
return
|
|
3661
|
+
return nn(e, n, s);
|
|
3631
3662
|
}
|
|
3632
3663
|
export {
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3664
|
+
yn as component,
|
|
3665
|
+
En as computed,
|
|
3666
|
+
kn as css,
|
|
3667
|
+
Et as decodeEntities,
|
|
3668
|
+
mn as html,
|
|
3669
|
+
Sn as ref,
|
|
3670
|
+
vn as unsafeHTML,
|
|
3671
|
+
an as useEmit,
|
|
3672
|
+
un as useOnAttributeChanged,
|
|
3673
|
+
ln as useOnConnected,
|
|
3674
|
+
fn as useOnDisconnected,
|
|
3675
|
+
pn as useOnError,
|
|
3676
|
+
dn as useProps,
|
|
3677
|
+
hn as useStyle,
|
|
3678
|
+
_n as watch
|
|
3648
3679
|
};
|
|
3649
3680
|
//# sourceMappingURL=custom-elements-runtime.es.js.map
|