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