@jasonshimmy/custom-elements-runtime 2.2.0 → 2.2.2

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