@jasonshimmy/custom-elements-runtime 1.0.9 → 1.0.10

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,4 +1,4 @@
1
- class mt {
1
+ class yt {
2
2
  pendingUpdates = /* @__PURE__ */ new Map();
3
3
  isFlushScheduled = !1;
4
4
  /**
@@ -29,12 +29,12 @@ class mt {
29
29
  return this.pendingUpdates.size;
30
30
  }
31
31
  }
32
- const yt = new mt();
33
- function fe(e, t) {
34
- yt.schedule(e, t);
32
+ const bt = new yt();
33
+ function de(e, t) {
34
+ bt.schedule(e, t);
35
35
  }
36
- const Ke = /* @__PURE__ */ new WeakSet();
37
- class bt {
36
+ const Je = /* @__PURE__ */ new WeakSet();
37
+ class wt {
38
38
  static cache = /* @__PURE__ */ new WeakMap();
39
39
  static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
40
40
  static objectHandlerCache = /* @__PURE__ */ new WeakMap();
@@ -47,7 +47,7 @@ class bt {
47
47
  return i;
48
48
  const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
49
49
  try {
50
- ot.markAsProxy(o);
50
+ ct.markAsProxy(o);
51
51
  } catch {
52
52
  }
53
53
  return this.cache.set(t, o), o;
@@ -71,8 +71,8 @@ class bt {
71
71
  "fill",
72
72
  "copyWithin"
73
73
  ].includes(i) ? function(...a) {
74
- const p = o.apply(n, a);
75
- return t.triggerUpdate(), p;
74
+ const h = o.apply(n, a);
75
+ return t.triggerUpdate(), h;
76
76
  } : o;
77
77
  },
78
78
  set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
@@ -118,7 +118,7 @@ class bt {
118
118
  };
119
119
  }
120
120
  }
121
- class ot {
121
+ class ct {
122
122
  // Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
123
123
  // This allows handler caches in ReactiveProxyCache to reuse handlers
124
124
  // for identical reactive contexts instead of creating a new context object
@@ -129,7 +129,7 @@ class ot {
129
129
  */
130
130
  static createReactiveProxy(t, r, n) {
131
131
  try {
132
- if (Ke.has(t)) return t;
132
+ if (Je.has(t)) return t;
133
133
  } catch {
134
134
  }
135
135
  const i = Array.isArray(t);
@@ -139,7 +139,7 @@ class ot {
139
139
  return o || (o = {
140
140
  triggerUpdate: r,
141
141
  makeReactiveValue: n
142
- }, s.set(n, o)), bt.getOrCreateProxy(t, o, i);
142
+ }, s.set(n, o)), wt.getOrCreateProxy(t, o, i);
143
143
  }
144
144
  /**
145
145
  * Mark an object as a proxy (for optimization)
@@ -147,12 +147,12 @@ class ot {
147
147
  static markAsProxy(t) {
148
148
  if (t)
149
149
  try {
150
- Ke.add(t);
150
+ Je.add(t);
151
151
  } catch {
152
152
  }
153
153
  }
154
154
  }
155
- class wt {
155
+ class xt {
156
156
  currentComponent = null;
157
157
  componentDependencies = /* @__PURE__ */ new Map();
158
158
  componentRenderFunctions = /* @__PURE__ */ new Map();
@@ -218,11 +218,11 @@ class wt {
218
218
  */
219
219
  getOrCreateState(t) {
220
220
  if (!this.currentComponent)
221
- return new Ue(t);
221
+ return new Fe(t);
222
222
  const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
223
223
  if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
224
224
  return this.stateStorage.get(i);
225
- const s = new Ue(t);
225
+ const s = new Fe(t);
226
226
  return this.stateStorage.set(i, s), s;
227
227
  }
228
228
  /**
@@ -237,7 +237,7 @@ class wt {
237
237
  triggerUpdate(t) {
238
238
  t.getDependents().forEach((r) => {
239
239
  const n = this.componentRenderFunctions.get(r);
240
- n && fe(n, r);
240
+ n && de(n, r);
241
241
  });
242
242
  }
243
243
  /**
@@ -251,8 +251,8 @@ class wt {
251
251
  this.stateIndexCounter.delete(t);
252
252
  }
253
253
  }
254
- const F = new wt();
255
- class Ue {
254
+ const F = new xt();
255
+ class Fe {
256
256
  _value;
257
257
  dependents = /* @__PURE__ */ new Set();
258
258
  constructor(t) {
@@ -284,7 +284,7 @@ class Ue {
284
284
  return this.dependents;
285
285
  }
286
286
  makeReactive(t) {
287
- return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : ot.createReactiveProxy(
287
+ return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : ct.createReactiveProxy(
288
288
  t,
289
289
  () => F.triggerUpdate(this),
290
290
  (r) => this.makeReactive(r)
@@ -308,7 +308,7 @@ function ee(e) {
308
308
  }
309
309
  }
310
310
  function mr(e) {
311
- const t = new Ue(e());
311
+ const t = new Fe(e());
312
312
  return {
313
313
  get value() {
314
314
  return F.trackDependency(t), e();
@@ -327,23 +327,23 @@ function yr(e, t, r = {}) {
327
327
  F.cleanup(i);
328
328
  };
329
329
  }
330
- const $e = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), Fe = 500;
331
- function re(e) {
332
- if ($e.has(e))
333
- return $e.get(e);
334
- const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
335
- return $e.size < Fe && $e.set(e, t), t;
336
- }
337
- function at(e) {
330
+ const ke = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map(), Ve = 500;
331
+ function ie(e) {
338
332
  if (ke.has(e))
339
333
  return ke.get(e);
334
+ const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
335
+ return ke.size < Ve && ke.set(e, t), t;
336
+ }
337
+ function lt(e) {
338
+ if (Ce.has(e))
339
+ return Ce.get(e);
340
340
  const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
341
- return ke.size < Fe && ke.set(e, t), t;
341
+ return Ce.size < Ve && Ce.set(e, t), t;
342
342
  }
343
- function pe(e) {
343
+ function he(e) {
344
344
  if (typeof e == "string") {
345
- if (Ce.has(e))
346
- return Ce.get(e);
345
+ if (_e.has(e))
346
+ return _e.get(e);
347
347
  const t = e.replace(
348
348
  /[&<>"']/g,
349
349
  (r) => ({
@@ -354,102 +354,102 @@ function pe(e) {
354
354
  "'": "&#39;"
355
355
  })[r]
356
356
  );
357
- return t !== e && Ce.size < Fe && Ce.set(e, t), t;
357
+ return t !== e && _e.size < Ve && _e.set(e, t), t;
358
358
  }
359
359
  return e;
360
360
  }
361
- function B(e, t) {
361
+ function U(e, t) {
362
362
  if (typeof t == "string") {
363
363
  const r = t.split(".").reduce((n, i) => n?.[i], e);
364
364
  return ee(r) ? r.value : r;
365
365
  }
366
366
  return t;
367
367
  }
368
- function Se(e, t, r) {
368
+ function Ae(e, t, r) {
369
369
  const n = String(t).split("."), i = n.pop();
370
370
  if (!i) return;
371
371
  const s = n.reduce((o, c) => (o[c] == null && (o[c] = {}), o[c]), e);
372
372
  ee(s[i]) ? s[i].value = r : s[i] = r;
373
373
  }
374
- const ct = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
- function se(e, ...t) {
376
- ct && console.error(e, ...t);
374
+ const ut = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
+ function oe(e, ...t) {
376
+ ut && console.error(e, ...t);
377
377
  }
378
- function Le(e, ...t) {
379
- ct && console.warn(e, ...t);
378
+ function Pe(e, ...t) {
379
+ ut && console.warn(e, ...t);
380
380
  }
381
- function xt(e, t, r) {
381
+ function vt(e, t, r) {
382
382
  if (r)
383
383
  for (const [n, i] of Object.entries(r)) {
384
384
  let s, o = {};
385
385
  if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(n, {
386
386
  callback: s,
387
387
  options: o,
388
- oldValue: B(e, n)
388
+ oldValue: U(e, n)
389
389
  }), o.immediate)
390
390
  try {
391
- const c = B(e, n);
391
+ const c = U(e, n);
392
392
  s(c, void 0, e);
393
393
  } catch (c) {
394
- se(`Error in immediate watcher for "${n}":`, c);
394
+ oe(`Error in immediate watcher for "${n}":`, c);
395
395
  }
396
396
  }
397
397
  }
398
- function vt(e, t, r, n) {
398
+ function $t(e, t, r, n) {
399
399
  const i = (o, c) => {
400
400
  if (o === c) return !0;
401
401
  if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
402
402
  if (Array.isArray(o) && Array.isArray(c))
403
- return o.length !== c.length ? !1 : o.every((h, b) => i(h, c[b]));
404
- const a = Object.keys(o), p = Object.keys(c);
405
- return a.length !== p.length ? !1 : a.every((h) => i(o[h], c[h]));
403
+ return o.length !== c.length ? !1 : o.every((p, x) => i(p, c[x]));
404
+ const a = Object.keys(o), h = Object.keys(c);
405
+ return a.length !== h.length ? !1 : a.every((p) => i(o[p], c[p]));
406
406
  }, s = t.get(r);
407
407
  if (s && !i(n, s.oldValue))
408
408
  try {
409
409
  s.callback(n, s.oldValue, e), s.oldValue = n;
410
410
  } catch (o) {
411
- se(`Error in watcher for "${r}":`, o);
411
+ oe(`Error in watcher for "${r}":`, o);
412
412
  }
413
413
  for (const [o, c] of t.entries())
414
414
  if (c.options.deep && r.startsWith(o + "."))
415
415
  try {
416
- const a = B(e, o);
416
+ const a = U(e, o);
417
417
  i(a, c.oldValue) || (c.callback(a, c.oldValue, e), c.oldValue = a);
418
418
  } catch (a) {
419
- se(`Error in deep watcher for "${o}":`, a);
419
+ oe(`Error in deep watcher for "${o}":`, a);
420
420
  }
421
421
  }
422
- function Ve(e, t) {
422
+ function Ze(e, t) {
423
423
  return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
424
424
  }
425
- function $t(e, t, r) {
425
+ function kt(e, t, r) {
426
426
  t && Object.entries(t).forEach(([n, i]) => {
427
- const s = re(n), o = e.getAttribute(s);
427
+ const s = ie(n), o = e.getAttribute(s);
428
428
  if (i.type === Function && typeof e[n] == "function")
429
429
  r[n] = e[n];
430
430
  else if (typeof e[n] < "u")
431
431
  try {
432
432
  const c = e[n];
433
- i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ve(String(c), i.type);
433
+ i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ze(String(c), i.type);
434
434
  } catch {
435
435
  r[n] = e[n];
436
436
  }
437
- else o !== null ? r[n] = Ve(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
437
+ else o !== null ? r[n] = Ze(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
438
438
  });
439
439
  }
440
- function kt(e, t, r) {
441
- t.props && $t(e, t.props, r);
440
+ function Ct(e, t, r) {
441
+ t.props && kt(e, t.props, r);
442
442
  }
443
- function Ct(e, t, r, n) {
443
+ function _t(e, t, r, n) {
444
444
  e.onConnected && !r && (e.onConnected(t), n(!0));
445
445
  }
446
- function _t(e, t, r, n, i, s, o, c) {
446
+ function Et(e, t, r, n, i, s, o, c) {
447
447
  e.onDisconnected && e.onDisconnected(t), r.forEach((a) => a()), n(), i(), s(!1), o(null), c(!1);
448
448
  }
449
- function Et(e, t, r, n, i) {
449
+ function St(e, t, r, n, i) {
450
450
  e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
451
451
  }
452
- class St {
452
+ class At {
453
453
  static cache = /* @__PURE__ */ new Map();
454
454
  static maxCacheSize = 1e3;
455
455
  // Dangerous patterns to block
@@ -474,7 +474,7 @@ class St {
474
474
  const n = this.cache.get(t);
475
475
  if (n) {
476
476
  if (!n.isSecure) {
477
- Le("Blocked cached dangerous expression:", t);
477
+ Pe("Blocked cached dangerous expression:", t);
478
478
  return;
479
479
  }
480
480
  return n.evaluator(r);
@@ -485,7 +485,7 @@ class St {
485
485
  s && this.cache.delete(s);
486
486
  }
487
487
  if (this.cache.set(t, i), !i.isSecure) {
488
- Le("Blocked dangerous expression:", t);
488
+ Pe("Blocked dangerous expression:", t);
489
489
  return;
490
490
  }
491
491
  return i.evaluator(r);
@@ -500,7 +500,7 @@ class St {
500
500
  try {
501
501
  return { evaluator: this.createSafeEvaluator(t), isSecure: !0 };
502
502
  } catch (r) {
503
- return Le("Failed to create evaluator for expression:", t, r), { evaluator: () => {
503
+ return Pe("Failed to create evaluator for expression:", t, r), { evaluator: () => {
504
504
  }, isSecure: !1 };
505
505
  }
506
506
  }
@@ -512,9 +512,9 @@ class St {
512
512
  return this.createObjectEvaluator(t);
513
513
  if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
514
514
  const r = t.trim().slice(4);
515
- return (n) => B(n, r);
515
+ return (n) => U(n, r);
516
516
  }
517
- return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => B(r, t);
517
+ return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => U(r, t);
518
518
  }
519
519
  static createObjectEvaluator(t) {
520
520
  const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
@@ -524,7 +524,7 @@ class St {
524
524
  try {
525
525
  if (c.startsWith("ctx.")) {
526
526
  const a = c.slice(4);
527
- s[o] = B(i, a);
527
+ s[o] = U(i, a);
528
528
  } else
529
529
  s[o] = this.evaluateSimpleValue(c, i);
530
530
  } catch {
@@ -548,35 +548,35 @@ class St {
548
548
  try {
549
549
  let n = t;
550
550
  const i = [];
551
- n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
551
+ n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (x) => `<<#${i.push(x) - 1}#>>`);
552
552
  const s = n.match(/ctx\.[\w.]+/g) || [];
553
- for (const b of s) {
554
- const g = b.slice(4), u = B(r, g);
555
- if (u === void 0) return;
556
- const f = i.push(JSON.stringify(u)) - 1;
557
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`);
553
+ for (const x of s) {
554
+ const m = x.slice(4), d = U(r, m);
555
+ if (d === void 0) return;
556
+ const u = i.push(JSON.stringify(d)) - 1;
557
+ n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
558
558
  }
559
559
  const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = n.match(o) || [];
560
- for (const b of c) {
561
- if (b.startsWith("ctx.")) continue;
562
- const g = B(r, b);
563
- if (g === void 0) return;
564
- const u = i.push(JSON.stringify(g)) - 1;
565
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
560
+ for (const x of c) {
561
+ if (x.startsWith("ctx.")) continue;
562
+ const m = U(r, x);
563
+ if (m === void 0) return;
564
+ const d = i.push(JSON.stringify(m)) - 1;
565
+ n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
566
566
  }
567
567
  const a = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
568
- let p;
569
- const h = /* @__PURE__ */ new Set();
570
- for (; (p = a.exec(n)) !== null; ) {
571
- const b = p[1];
572
- if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || h.has(b)) continue;
573
- h.add(b);
574
- const g = B(r, b);
575
- if (g === void 0) return;
576
- const u = JSON.stringify(g), f = i.push(u) - 1;
577
- b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${f}#>>`);
568
+ let h;
569
+ const p = /* @__PURE__ */ new Set();
570
+ for (; (h = a.exec(n)) !== null; ) {
571
+ const x = h[1];
572
+ if (["true", "false", "null", "undefined"].includes(x) || /^[0-9]+$/.test(x) || x === "ctx" || p.has(x)) continue;
573
+ p.add(x);
574
+ const m = U(r, x);
575
+ if (m === void 0) return;
576
+ const d = JSON.stringify(m), u = i.push(d) - 1;
577
+ x.includes(".") ? n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`) : n = n.replace(new RegExp("\\b" + x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${u}#>>`);
578
578
  }
579
- n = n.replace(/<<#(\d+)#>>/g, (b, g) => i[Number(g)]);
579
+ n = n.replace(/<<#(\d+)#>>/g, (x, m) => i[Number(m)]);
580
580
  try {
581
581
  return this.evaluateBasicExpression(n);
582
582
  } catch {
@@ -599,12 +599,12 @@ class St {
599
599
  return r[n];
600
600
  }
601
601
  function s(l) {
602
- const d = r[n++];
603
- if (l && !d)
602
+ const f = r[n++];
603
+ if (l && !f)
604
604
  throw new Error(`Unexpected token EOF, expected ${l}`);
605
- if (l && d && d.type !== l && d.value !== l)
606
- throw new Error(`Unexpected token ${d.type}/${d.value}, expected ${l}`);
607
- return d;
605
+ if (l && f && f.type !== l && f.value !== l)
606
+ throw new Error(`Unexpected token ${f.type}/${f.value}, expected ${l}`);
607
+ return f;
608
608
  }
609
609
  function o() {
610
610
  return c();
@@ -613,101 +613,101 @@ class St {
613
613
  let l = a();
614
614
  if (i() && i().value === "?") {
615
615
  s("?");
616
- const d = o();
616
+ const f = o();
617
617
  s(":");
618
- const w = o();
619
- return l ? d : w;
618
+ const b = o();
619
+ return l ? f : b;
620
620
  }
621
621
  return l;
622
622
  }
623
623
  function a() {
624
- let l = p();
624
+ let l = h();
625
625
  for (; i() && i().value === "||"; ) {
626
626
  s("OP");
627
- const d = p();
628
- l = l || d;
627
+ const f = h();
628
+ l = l || f;
629
629
  }
630
630
  return l;
631
631
  }
632
- function p() {
633
- let l = h();
632
+ function h() {
633
+ let l = p();
634
634
  for (; i() && i().value === "&&"; ) {
635
635
  s("OP");
636
- const d = h();
637
- l = l && d;
636
+ const f = p();
637
+ l = l && f;
638
638
  }
639
639
  return l;
640
640
  }
641
- function h() {
642
- let l = b();
641
+ function p() {
642
+ let l = x();
643
643
  for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
644
- const d = s("OP").value, w = b();
645
- switch (d) {
644
+ const f = s("OP").value, b = x();
645
+ switch (f) {
646
646
  case "==":
647
- l = l == w;
647
+ l = l == b;
648
648
  break;
649
649
  case "!=":
650
- l = l != w;
650
+ l = l != b;
651
651
  break;
652
652
  case "===":
653
- l = l === w;
653
+ l = l === b;
654
654
  break;
655
655
  case "!==":
656
- l = l !== w;
656
+ l = l !== b;
657
657
  break;
658
658
  }
659
659
  }
660
660
  return l;
661
661
  }
662
- function b() {
663
- let l = g();
662
+ function x() {
663
+ let l = m();
664
664
  for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
665
- const d = s("OP").value, w = g();
666
- switch (d) {
665
+ const f = s("OP").value, b = m();
666
+ switch (f) {
667
667
  case ">":
668
- l = l > w;
668
+ l = l > b;
669
669
  break;
670
670
  case "<":
671
- l = l < w;
671
+ l = l < b;
672
672
  break;
673
673
  case ">=":
674
- l = l >= w;
674
+ l = l >= b;
675
675
  break;
676
676
  case "<=":
677
- l = l <= w;
677
+ l = l <= b;
678
678
  break;
679
679
  }
680
680
  }
681
681
  return l;
682
682
  }
683
- function g() {
684
- let l = u();
683
+ function m() {
684
+ let l = d();
685
685
  for (; i() && (i().value === "+" || i().value === "-"); ) {
686
- const d = s("OP").value, w = u();
687
- l = d === "+" ? l + w : l - w;
686
+ const f = s("OP").value, b = d();
687
+ l = f === "+" ? l + b : l - b;
688
688
  }
689
689
  return l;
690
690
  }
691
- function u() {
692
- let l = f();
691
+ function d() {
692
+ let l = u();
693
693
  for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
694
- const d = s("OP").value, w = f();
695
- switch (d) {
694
+ const f = s("OP").value, b = u();
695
+ switch (f) {
696
696
  case "*":
697
- l = l * w;
697
+ l = l * b;
698
698
  break;
699
699
  case "/":
700
- l = l / w;
700
+ l = l / b;
701
701
  break;
702
702
  case "%":
703
- l = l % w;
703
+ l = l % b;
704
704
  break;
705
705
  }
706
706
  }
707
707
  return l;
708
708
  }
709
- function f() {
710
- return i() && i().value === "!" ? (s("OP"), !f()) : i() && i().value === "-" ? (s("OP"), -f()) : y();
709
+ function u() {
710
+ return i() && i().value === "!" ? (s("OP"), !u()) : i() && i().value === "-" ? (s("OP"), -u()) : y();
711
711
  }
712
712
  function y() {
713
713
  const l = i();
@@ -720,15 +720,15 @@ class St {
720
720
  return s("IDENT"), l.value === "true" ? !0 : l.value === "false" ? !1 : l.value === "null" ? null : void 0;
721
721
  if (l.value === "[") {
722
722
  s("PUNC");
723
- const d = [];
723
+ const f = [];
724
724
  for (; i() && i().value !== "]"; )
725
- d.push(o()), i() && i().value === "," && s("PUNC");
726
- return s("PUNC"), d;
725
+ f.push(o()), i() && i().value === "," && s("PUNC");
726
+ return s("PUNC"), f;
727
727
  }
728
728
  if (l.value === "(") {
729
729
  s("PUNC");
730
- const d = o();
731
- return s("PUNC"), d;
730
+ const f = o();
731
+ return s("PUNC"), f;
732
732
  }
733
733
  throw new Error("Unexpected token in expression");
734
734
  }
@@ -750,7 +750,7 @@ class St {
750
750
  if (!isNaN(Number(t))) return Number(t);
751
751
  if (t.startsWith("ctx.")) {
752
752
  const n = t.slice(4);
753
- return B(r, n);
753
+ return U(r, n);
754
754
  }
755
755
  return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
756
756
  }
@@ -761,7 +761,7 @@ class St {
761
761
  return this.cache.size;
762
762
  }
763
763
  }
764
- class oe {
764
+ class ae {
765
765
  static cleanupFunctions = /* @__PURE__ */ new WeakMap();
766
766
  /**
767
767
  * Add an event listener with automatic cleanup tracking
@@ -835,13 +835,13 @@ class oe {
835
835
  return n ? n.length : 0;
836
836
  }
837
837
  }
838
- function ue(e, t) {
838
+ function fe(e, t) {
839
839
  if (t && e instanceof HTMLElement) {
840
- oe.cleanup(e);
840
+ ae.cleanup(e);
841
841
  for (const r in t)
842
842
  t[r] === e && delete t[r];
843
843
  for (const r of Array.from(e.childNodes))
844
- ue(r, t);
844
+ fe(r, t);
845
845
  }
846
846
  }
847
847
  function ye(e, t, r) {
@@ -849,149 +849,149 @@ function ye(e, t, r) {
849
849
  const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
850
  n ? n.value = t : i && r && (r[i] = t);
851
851
  }
852
- function At(e, t, r, n, i, s, o, c) {
852
+ function jt(e, t, r, n, i, s, o, c) {
853
853
  if (!s) return;
854
- const a = t.includes("lazy"), p = t.includes("trim"), h = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", g = () => {
855
- if (b) {
854
+ const a = t.includes("lazy"), h = t.includes("trim"), p = t.includes("number"), x = e && typeof e == "object" && "value" in e && typeof e.value < "u", m = () => {
855
+ if (x) {
856
856
  const k = e.value;
857
857
  return c && typeof k == "object" && k !== null ? k[c] : k;
858
858
  }
859
- return B(s._state || s, e);
860
- }, u = g();
861
- let f = "text";
862
- o instanceof HTMLInputElement ? f = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? f = "select" : o instanceof HTMLTextAreaElement && (f = "textarea");
863
- const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ? f === "checkbox" || f === "radio" ? "checked" : "value" : c ?? "modelValue";
864
- if (f === "checkbox")
865
- if (Array.isArray(u))
866
- r[l] = u.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
859
+ return U(s._state || s, e);
860
+ }, d = m();
861
+ let u = "text";
862
+ o instanceof HTMLInputElement ? u = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? u = "select" : o instanceof HTMLTextAreaElement && (u = "textarea");
863
+ const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ? u === "checkbox" || u === "radio" ? "checked" : "value" : c ?? "modelValue";
864
+ if (u === "checkbox")
865
+ if (Array.isArray(d))
866
+ r[l] = d.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
867
867
  else {
868
868
  const k = o?.getAttribute("true-value") ?? !0;
869
- r[l] = u === k;
869
+ r[l] = d === k;
870
870
  }
871
- else if (f === "radio")
872
- r[l] = u === (n?.value ?? "");
873
- else if (f === "select")
871
+ else if (u === "radio")
872
+ r[l] = d === (n?.value ?? "");
873
+ else if (u === "select")
874
874
  if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
875
- const k = Array.isArray(u) ? u.map(String) : [];
875
+ const k = Array.isArray(d) ? d.map(String) : [];
876
876
  setTimeout(() => {
877
877
  Array.from(o.options).forEach((C) => {
878
878
  C.selected = k.includes(C.value);
879
879
  });
880
- }, 0), r[l] = Array.isArray(u) ? u : [];
880
+ }, 0), r[l] = Array.isArray(d) ? d : [];
881
881
  } else
882
- r[l] = u;
882
+ r[l] = d;
883
883
  else {
884
- r[l] = u;
884
+ r[l] = d;
885
885
  try {
886
- const k = re(l);
887
- n && (n[k] = u);
886
+ const k = ie(l);
887
+ n && (n[k] = d);
888
888
  } catch {
889
889
  }
890
890
  }
891
- const d = a || f === "checkbox" || f === "radio" || f === "select" ? "change" : "input", w = (k) => {
891
+ const f = a || u === "checkbox" || u === "radio" || u === "select" ? "change" : "input", b = (k) => {
892
892
  if (k.isComposing || i._isComposing) return;
893
893
  const C = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
894
  if (k.isTrusted === !1 && !C) return;
895
- const m = k.target;
896
- if (!m || m._modelUpdating) return;
897
- let $ = m.value;
898
- if (f === "checkbox") {
899
- const j = g();
900
- if (Array.isArray(j)) {
901
- const N = m.getAttribute("value") ?? "", E = Array.from(j);
902
- if (m.checked)
903
- E.includes(N) || E.push(N);
895
+ const g = k.target;
896
+ if (!g || g._modelUpdating) return;
897
+ let $ = g.value;
898
+ if (u === "checkbox") {
899
+ const A = m();
900
+ if (Array.isArray(A)) {
901
+ const D = g.getAttribute("value") ?? "", S = Array.from(A);
902
+ if (g.checked)
903
+ S.includes(D) || S.push(D);
904
904
  else {
905
- const O = E.indexOf(N);
906
- O > -1 && E.splice(O, 1);
905
+ const O = S.indexOf(D);
906
+ O > -1 && S.splice(O, 1);
907
907
  }
908
- $ = E;
908
+ $ = S;
909
909
  } else {
910
- const N = m.getAttribute("true-value") ?? !0, E = m.getAttribute("false-value") ?? !1;
911
- $ = m.checked ? N : E;
910
+ const D = g.getAttribute("true-value") ?? !0, S = g.getAttribute("false-value") ?? !1;
911
+ $ = g.checked ? D : S;
912
912
  }
913
- } else if (f === "radio")
914
- $ = m.getAttribute("value") ?? m.value;
915
- else if (f === "select" && m.multiple)
916
- $ = Array.from(m.selectedOptions).map((j) => j.value);
917
- else if (p && typeof $ == "string" && ($ = $.trim()), h) {
918
- const j = Number($);
919
- isNaN(j) || ($ = j);
913
+ } else if (u === "radio")
914
+ $ = g.getAttribute("value") ?? g.value;
915
+ else if (u === "select" && g.multiple)
916
+ $ = Array.from(g.selectedOptions).map((A) => A.value);
917
+ else if (h && typeof $ == "string" && ($ = $.trim()), p) {
918
+ const A = Number($);
919
+ isNaN(A) || ($ = A);
920
920
  }
921
- const S = s._state || s, v = g();
921
+ const j = s._state || s, v = m();
922
922
  if (Array.isArray($) && Array.isArray(v) ? JSON.stringify([...$].sort()) !== JSON.stringify([...v].sort()) : $ !== v) {
923
- m._modelUpdating = !0;
923
+ g._modelUpdating = !0;
924
924
  try {
925
- if (b)
925
+ if (x)
926
926
  if (c && typeof e.value == "object" && e.value !== null) {
927
- const j = { ...e.value };
928
- j[c] = $, e.value = j;
927
+ const A = { ...e.value };
928
+ A[c] = $, e.value = A;
929
929
  } else
930
930
  e.value = $;
931
931
  else
932
- Se(S, e, $);
932
+ Ae(j, e, $);
933
933
  if (s._requestRender && s._requestRender(), s._triggerWatchers) {
934
- const j = b ? "reactiveState" : e;
935
- s._triggerWatchers(j, $);
934
+ const A = x ? "reactiveState" : e;
935
+ s._triggerWatchers(A, $);
936
936
  }
937
- if (m) {
938
- const j = `update:${re(l)}`, N = new CustomEvent(j, {
937
+ if (g) {
938
+ const A = `update:${ie(l)}`, D = new CustomEvent(A, {
939
939
  detail: $,
940
940
  bubbles: !0,
941
941
  composed: !0
942
942
  });
943
- m.dispatchEvent(N);
943
+ g.dispatchEvent(D);
944
944
  }
945
945
  } finally {
946
- setTimeout(() => m._modelUpdating = !1, 0);
946
+ setTimeout(() => g._modelUpdating = !1, 0);
947
947
  }
948
948
  }
949
949
  };
950
950
  if (y) {
951
- if (i[d]) {
952
- const k = i[d];
953
- o && oe.removeListener(o, d, k);
951
+ if (i[f]) {
952
+ const k = i[f];
953
+ o && ae.removeListener(o, f, k);
954
954
  }
955
- i[d] = w;
955
+ i[f] = b;
956
956
  } else {
957
- const k = `update:${re(l)}`;
957
+ const k = `update:${ie(l)}`;
958
958
  if (i[k]) {
959
959
  const C = i[k];
960
- o && oe.removeListener(o, k, C);
960
+ o && ae.removeListener(o, k, C);
961
961
  }
962
962
  i[k] = (C) => {
963
- const m = s._state || s, $ = C.detail !== void 0 ? C.detail : C.target?.value, S = B(m, e);
964
- if (Array.isArray($) && Array.isArray(S) ? JSON.stringify([...$].sort()) !== JSON.stringify([...S].sort()) : $ !== S) {
965
- Se(m, e, $), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, $);
966
- const A = C.target;
967
- if (A) {
968
- A[l] = $;
963
+ const g = s._state || s, $ = C.detail !== void 0 ? C.detail : C.target?.value, j = U(g, e);
964
+ if (Array.isArray($) && Array.isArray(j) ? JSON.stringify([...$].sort()) !== JSON.stringify([...j].sort()) : $ !== j) {
965
+ Ae(g, e, $), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, $);
966
+ const _ = C.target;
967
+ if (_) {
968
+ _[l] = $;
969
969
  try {
970
- const j = re(l);
971
- typeof $ == "boolean" ? $ ? A.setAttribute(j, "true") : A.setAttribute(j, "false") : A.setAttribute(j, String($));
970
+ const A = ie(l);
971
+ typeof $ == "boolean" ? $ ? _.setAttribute(A, "true") : _.setAttribute(A, "false") : _.setAttribute(A, String($));
972
972
  } catch {
973
973
  }
974
974
  queueMicrotask(() => {
975
- typeof A._applyProps == "function" && A._applyProps(A._cfg), typeof A._requestRender == "function" && A._requestRender();
975
+ typeof _._applyProps == "function" && _._applyProps(_._cfg), typeof _._requestRender == "function" && _._requestRender();
976
976
  });
977
977
  }
978
978
  }
979
979
  };
980
980
  }
981
- (f === "text" || f === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (k) => {
981
+ (u === "text" || u === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (k) => {
982
982
  i._isComposing = !1;
983
983
  const C = k.target;
984
984
  C && setTimeout(() => {
985
- const m = C.value, $ = s._state || s, S = B($, e);
986
- let v = m;
987
- if (p && (v = v.trim()), h) {
988
- const j = Number(v);
989
- isNaN(j) || (v = j);
985
+ const g = C.value, $ = s._state || s, j = U($, e);
986
+ let v = g;
987
+ if (h && (v = v.trim()), p) {
988
+ const A = Number(v);
989
+ isNaN(A) || (v = A);
990
990
  }
991
- if (Array.isArray(v) && Array.isArray(S) ? JSON.stringify([...v].sort()) !== JSON.stringify([...S].sort()) : v !== S) {
991
+ if (Array.isArray(v) && Array.isArray(j) ? JSON.stringify([...v].sort()) !== JSON.stringify([...j].sort()) : v !== j) {
992
992
  C._modelUpdating = !0;
993
993
  try {
994
- Se($, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
994
+ Ae($, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
995
995
  } finally {
996
996
  setTimeout(() => C._modelUpdating = !1, 0);
997
997
  }
@@ -999,11 +999,11 @@ function At(e, t, r, n, i, s, o, c) {
999
999
  }, 0);
1000
1000
  });
1001
1001
  }
1002
- function lt(e) {
1002
+ function ft(e) {
1003
1003
  const t = e.slice(2);
1004
1004
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
1005
1005
  }
1006
- function jt(e, t, r, n) {
1006
+ function Ot(e, t, r, n) {
1007
1007
  if (typeof e == "object" && e !== null)
1008
1008
  for (const [i, s] of Object.entries(e))
1009
1009
  i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
@@ -1020,12 +1020,12 @@ function jt(e, t, r, n) {
1020
1020
  return;
1021
1021
  }
1022
1022
  } catch {
1023
- const i = B(n, e);
1023
+ const i = U(n, e);
1024
1024
  r[e] = i;
1025
1025
  }
1026
1026
  }
1027
1027
  }
1028
- function Ot(e, t, r) {
1028
+ function Tt(e, t, r) {
1029
1029
  let n;
1030
1030
  if (typeof e == "string") {
1031
1031
  if (!r) return;
@@ -1051,9 +1051,9 @@ function Ot(e, t, r) {
1051
1051
  s !== i && (s ? t.style = s : delete t.style);
1052
1052
  }
1053
1053
  function we(e, t) {
1054
- return St.evaluate(e, t);
1054
+ return At.evaluate(e, t);
1055
1055
  }
1056
- function Tt(e, t, r) {
1056
+ function Rt(e, t, r) {
1057
1057
  let n;
1058
1058
  if (typeof e == "string") {
1059
1059
  if (!r) return;
@@ -1065,7 +1065,7 @@ function Tt(e, t, r) {
1065
1065
  const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
1066
1066
  o && (t.class = o);
1067
1067
  }
1068
- function Rt(e, t, r) {
1068
+ function Lt(e, t, r) {
1069
1069
  let n;
1070
1070
  if (typeof e == "string") {
1071
1071
  if (!r) return;
@@ -1079,10 +1079,10 @@ function Rt(e, t, r) {
1079
1079
  const o = [];
1080
1080
  for (const [c, a] of Object.entries(n))
1081
1081
  if (a != null && a !== "") {
1082
- const p = c.replace(
1082
+ const h = c.replace(
1083
1083
  /[A-Z]/g,
1084
- (g) => `-${g.toLowerCase()}`
1085
- ), h = [
1084
+ (m) => `-${m.toLowerCase()}`
1085
+ ), p = [
1086
1086
  "width",
1087
1087
  "height",
1088
1088
  "top",
@@ -1108,65 +1108,65 @@ function Rt(e, t, r) {
1108
1108
  "min-height",
1109
1109
  "max-height"
1110
1110
  ];
1111
- let b = String(a);
1112
- typeof a == "number" && h.includes(p) && (b = `${a}px`), o.push(`${p}: ${b}`);
1111
+ let x = String(a);
1112
+ typeof a == "number" && p.includes(h) && (x = `${a}px`), o.push(`${h}: ${x}`);
1113
1113
  }
1114
1114
  i = o.join("; ") + (o.length > 0 ? ";" : "");
1115
1115
  }
1116
1116
  const s = t.style || "";
1117
1117
  t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
1118
1118
  }
1119
- function Lt(e, t, r) {
1119
+ function Pt(e, t, r) {
1120
1120
  let n = e;
1121
1121
  typeof e == "string" && r && (n = we(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1122
1122
  }
1123
- function ut(e, t, r, n) {
1123
+ function dt(e, t, r, n) {
1124
1124
  const i = {}, s = { ...n || {} }, o = {};
1125
1125
  for (const [c, a] of Object.entries(e)) {
1126
- const { value: p, modifiers: h, arg: b } = a;
1126
+ const { value: h, modifiers: p, arg: x } = a;
1127
1127
  if (c === "model" || c.startsWith("model:")) {
1128
- const g = c.split(":"), u = g.length > 1 ? g[1] : b;
1129
- At(
1130
- p,
1131
- // Pass the original value (could be string or reactive state object)
1128
+ const m = c.split(":"), d = m.length > 1 ? m[1] : x;
1129
+ jt(
1132
1130
  h,
1131
+ // Pass the original value (could be string or reactive state object)
1132
+ p,
1133
1133
  i,
1134
1134
  s,
1135
1135
  o,
1136
1136
  t,
1137
1137
  r,
1138
- u
1138
+ d
1139
1139
  );
1140
1140
  continue;
1141
1141
  }
1142
1142
  switch (c) {
1143
1143
  case "bind":
1144
- jt(p, i, s, t);
1144
+ Ot(h, i, s, t);
1145
1145
  break;
1146
1146
  case "show":
1147
- Ot(p, s, t);
1147
+ Tt(h, s, t);
1148
1148
  break;
1149
1149
  case "class":
1150
- Tt(p, s, t);
1150
+ Rt(h, s, t);
1151
1151
  break;
1152
1152
  case "style":
1153
- Rt(p, s, t);
1153
+ Lt(h, s, t);
1154
1154
  break;
1155
1155
  case "ref":
1156
- Lt(p, i, t);
1156
+ Pt(h, i, t);
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
1160
  return { props: i, attrs: s, listeners: o };
1161
1161
  }
1162
- function qe(e, t) {
1162
+ function Ke(e, t) {
1163
1163
  if (Array.isArray(e)) {
1164
1164
  const s = /* @__PURE__ */ new Set();
1165
1165
  return e.map((o) => {
1166
1166
  if (!o || typeof o != "object") return o;
1167
1167
  let c = o.props?.key ?? o.key;
1168
1168
  if (!c) {
1169
- const b = o.tag || "node", u = [
1169
+ const x = o.tag || "node", d = [
1170
1170
  // attrs (kebab-case)
1171
1171
  o.props?.attrs?.id,
1172
1172
  o.props?.attrs?.name,
@@ -1176,23 +1176,23 @@ function qe(e, t) {
1176
1176
  o.props?.props?.name,
1177
1177
  o.props?.props?.dataKey,
1178
1178
  o.props?.props?.["data-key"]
1179
- ].find((f) => f != null) ?? "";
1180
- c = u ? `${t}:${b}:${u}` : `${t}:${b}`;
1179
+ ].find((u) => u != null) ?? "";
1180
+ c = d ? `${t}:${x}:${d}` : `${t}:${x}`;
1181
1181
  }
1182
- let a = c, p = 1;
1182
+ let a = c, h = 1;
1183
1183
  for (; s.has(a); )
1184
- a = `${c}#${p++}`;
1184
+ a = `${c}#${h++}`;
1185
1185
  s.add(a);
1186
- let h = o.children;
1187
- return Array.isArray(h) && (h = qe(h, a)), { ...o, key: a, children: h };
1186
+ let p = o.children;
1187
+ return Array.isArray(p) && (p = Ke(p, a)), { ...o, key: a, children: p };
1188
1188
  });
1189
1189
  }
1190
1190
  const r = e;
1191
1191
  let n = r.props?.key ?? r.key ?? t, i = r.children;
1192
- return Array.isArray(i) && (i = qe(i, n)), { ...r, key: n, children: i };
1192
+ return Array.isArray(i) && (i = Ke(i, n)), { ...r, key: n, children: i };
1193
1193
  }
1194
- function Je(e, t, r, n) {
1195
- const i = r.directives ?? {}, s = ut(
1194
+ function Ge(e, t, r, n) {
1195
+ const i = r.directives ?? {}, s = dt(
1196
1196
  i,
1197
1197
  n,
1198
1198
  e,
@@ -1205,39 +1205,39 @@ function Je(e, t, r, n) {
1205
1205
  ...t.attrs,
1206
1206
  ...r.attrs,
1207
1207
  ...s.attrs
1208
- }, a = t.props ?? {}, p = o, h = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
- let b = !1;
1210
- for (const f in { ...a, ...p }) {
1211
- const y = a[f], x = p[f];
1212
- if (y !== x)
1213
- if (b = !0, f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
- e.value !== x && (e.value = x ?? "");
1215
- else if (f === "checked" && e instanceof HTMLInputElement)
1216
- e.checked = !!x;
1217
- else if (f.startsWith("on") && typeof x == "function") {
1218
- const l = lt(f);
1219
- typeof y == "function" && oe.removeListener(e, l, y), oe.addListener(e, l, x);
1220
- } else if (x == null)
1221
- e.removeAttribute(f);
1222
- else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || f in e)
1208
+ }, a = t.props ?? {}, h = o, p = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
+ let x = !1;
1210
+ for (const u in { ...a, ...h }) {
1211
+ const y = a[u], w = h[u];
1212
+ if (y !== w)
1213
+ if (x = !0, u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
+ e.value !== w && (e.value = w ?? "");
1215
+ else if (u === "checked" && e instanceof HTMLInputElement)
1216
+ e.checked = !!w;
1217
+ else if (u.startsWith("on") && typeof w == "function") {
1218
+ const l = ft(u);
1219
+ typeof y == "function" && ae.removeListener(e, l, y), ae.addListener(e, l, w);
1220
+ } else if (w == null)
1221
+ e.removeAttribute(u);
1222
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || u in e)
1223
1223
  try {
1224
- e[f] = x;
1224
+ e[u] = w;
1225
1225
  } catch {
1226
1226
  }
1227
1227
  else
1228
- x === !1 && e.removeAttribute(f);
1228
+ w === !1 && e.removeAttribute(u);
1229
1229
  }
1230
- for (const [f, y] of Object.entries(
1230
+ for (const [u, y] of Object.entries(
1231
1231
  s.listeners || {}
1232
1232
  ))
1233
- oe.addListener(e, f, y);
1234
- const g = t.attrs ?? {}, u = c;
1235
- for (const f in { ...g, ...u }) {
1236
- const y = g[f], x = u[f];
1237
- let l = y, d = x;
1238
- if (ee(y) && (l = y.value), ee(x) && (d = x.value), l !== d)
1239
- if (b = !0, d == null || d === !1) {
1240
- if (e.removeAttribute(f), f === "value") {
1233
+ ae.addListener(e, u, y);
1234
+ const m = t.attrs ?? {}, d = c;
1235
+ for (const u in { ...m, ...d }) {
1236
+ const y = m[u], w = d[u];
1237
+ let l = y, f = w;
1238
+ if (ee(y) && (l = y.value), ee(w) && (f = w.value), l !== f)
1239
+ if (x = !0, f == null || f === !1) {
1240
+ if (e.removeAttribute(u), u === "value") {
1241
1241
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
1242
1242
  try {
1243
1243
  e.value = "";
@@ -1254,69 +1254,69 @@ function Je(e, t, r, n) {
1254
1254
  } catch {
1255
1255
  }
1256
1256
  }
1257
- if (f === "checked" && e instanceof HTMLInputElement)
1257
+ if (u === "checked" && e instanceof HTMLInputElement)
1258
1258
  try {
1259
1259
  e.checked = !1;
1260
1260
  } catch {
1261
1261
  }
1262
- if (f === "disabled")
1262
+ if (u === "disabled")
1263
1263
  try {
1264
1264
  e.disabled = !1;
1265
1265
  } catch {
1266
1266
  }
1267
1267
  } else {
1268
- if (f === "value") {
1268
+ if (u === "value") {
1269
1269
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1270
1270
  try {
1271
- e.value = d ?? "";
1271
+ e.value = f ?? "";
1272
1272
  } catch {
1273
- e.setAttribute(f, String(d));
1273
+ e.setAttribute(u, String(f));
1274
1274
  }
1275
1275
  continue;
1276
1276
  } else if (e instanceof HTMLSelectElement) {
1277
1277
  try {
1278
- e.value = d ?? "";
1278
+ e.value = f ?? "";
1279
1279
  } catch {
1280
1280
  }
1281
1281
  continue;
1282
1282
  } else if (e instanceof HTMLProgressElement) {
1283
1283
  try {
1284
- e.value = Number(d);
1284
+ e.value = Number(f);
1285
1285
  } catch {
1286
1286
  }
1287
1287
  continue;
1288
1288
  }
1289
1289
  }
1290
- if (f === "checked" && e instanceof HTMLInputElement) {
1290
+ if (u === "checked" && e instanceof HTMLInputElement) {
1291
1291
  try {
1292
- e.checked = !!d;
1292
+ e.checked = !!f;
1293
1293
  } catch {
1294
1294
  }
1295
1295
  continue;
1296
1296
  }
1297
- if (f === "style") {
1298
- e.setAttribute(f, String(d));
1297
+ if (u === "style") {
1298
+ e.setAttribute(u, String(f));
1299
1299
  continue;
1300
1300
  }
1301
- const w = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
- if (h && !w && f.includes("-")) {
1303
- const k = at(f);
1301
+ const b = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
+ if (p && !b && u.includes("-")) {
1303
+ const k = lt(u);
1304
1304
  try {
1305
- e[k] = d;
1305
+ e[k] = f;
1306
1306
  } catch {
1307
- e.setAttribute(f, String(d));
1307
+ e.setAttribute(u, String(f));
1308
1308
  }
1309
- } else if (!w && f in e)
1309
+ } else if (!b && u in e)
1310
1310
  try {
1311
- e[f] = d;
1311
+ e[u] = f;
1312
1312
  } catch {
1313
- e.setAttribute(f, String(d));
1313
+ e.setAttribute(u, String(f));
1314
1314
  }
1315
1315
  else
1316
- e.setAttribute(f, String(d));
1316
+ e.setAttribute(u, String(f));
1317
1317
  }
1318
1318
  }
1319
- if (h && b)
1319
+ if (p && x)
1320
1320
  try {
1321
1321
  if (typeof e._applyProps == "function")
1322
1322
  try {
@@ -1331,102 +1331,102 @@ function Z(e, t, r) {
1331
1331
  if (typeof e == "string")
1332
1332
  return document.createTextNode(e);
1333
1333
  if (e.tag === "#text") {
1334
- const g = document.createTextNode(
1334
+ const m = document.createTextNode(
1335
1335
  typeof e.children == "string" ? e.children : ""
1336
1336
  );
1337
- return e.key != null && (g.key = e.key), g;
1337
+ return e.key != null && (m.key = e.key), m;
1338
1338
  }
1339
1339
  if (e.tag === "#anchor") {
1340
- const g = e, u = Array.isArray(g.children) ? g.children : [], f = document.createTextNode(""), y = document.createTextNode("");
1341
- g.key != null && (f.key = `${g.key}:start`, y.key = `${g.key}:end`), g._startNode = f, g._endNode = y;
1342
- const x = document.createDocumentFragment();
1343
- x.appendChild(f);
1344
- for (const l of u) {
1345
- const d = Z(l, t);
1346
- x.appendChild(d);
1340
+ const m = e, d = Array.isArray(m.children) ? m.children : [], u = document.createTextNode(""), y = document.createTextNode("");
1341
+ m.key != null && (u.key = `${m.key}:start`, y.key = `${m.key}:end`), m._startNode = u, m._endNode = y;
1342
+ const w = document.createDocumentFragment();
1343
+ w.appendChild(u);
1344
+ for (const l of d) {
1345
+ const f = Z(l, t);
1346
+ w.appendChild(f);
1347
1347
  }
1348
- return x.appendChild(y), x;
1348
+ return w.appendChild(y), w;
1349
1349
  }
1350
1350
  const n = document.createElement(e.tag);
1351
1351
  e.key != null && (n.key = e.key);
1352
- const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = ut(o, t, n, s), a = {
1352
+ const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = dt(o, t, n, s), a = {
1353
1353
  ...i,
1354
1354
  ...c.props
1355
- }, p = {
1355
+ }, h = {
1356
1356
  ...s,
1357
1357
  ...c.attrs
1358
- }, h = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
- for (const g in p) {
1360
- const u = p[g];
1361
- if (!(typeof g != "string" || /\[object Object\]/.test(g))) {
1362
- if (typeof u == "boolean")
1363
- u && n.setAttribute(g, "");
1364
- else if (u != null)
1365
- if (!h && g === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1358
+ }, p = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
+ for (const m in h) {
1360
+ const d = h[m];
1361
+ if (!(typeof m != "string" || /\[object Object\]/.test(m))) {
1362
+ if (typeof d == "boolean")
1363
+ d && n.setAttribute(m, "");
1364
+ else if (d != null)
1365
+ if (!p && m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1366
1366
  try {
1367
- n instanceof HTMLProgressElement ? n.value = Number(u) : n.value = u ?? "";
1367
+ n instanceof HTMLProgressElement ? n.value = Number(d) : n.value = d ?? "";
1368
1368
  } catch {
1369
- n.setAttribute(g, String(u));
1369
+ n.setAttribute(m, String(d));
1370
1370
  }
1371
- else if (!h && g === "checked" && n instanceof HTMLInputElement)
1371
+ else if (!p && m === "checked" && n instanceof HTMLInputElement)
1372
1372
  try {
1373
- n.checked = !!u;
1373
+ n.checked = !!d;
1374
1374
  } catch {
1375
- n.setAttribute(g, String(u));
1375
+ n.setAttribute(m, String(d));
1376
1376
  }
1377
- else if (!h && g in n)
1377
+ else if (!p && m in n)
1378
1378
  try {
1379
- n[g] = u;
1379
+ n[m] = d;
1380
1380
  } catch {
1381
- n.setAttribute(g, String(u));
1381
+ n.setAttribute(m, String(d));
1382
1382
  }
1383
- else if ((e.props?.isCustomElement ?? !1) && !h && g.includes("-")) {
1384
- const y = at(g);
1383
+ else if ((e.props?.isCustomElement ?? !1) && !p && m.includes("-")) {
1384
+ const y = lt(m);
1385
1385
  try {
1386
- n[y] = u;
1386
+ n[y] = d;
1387
1387
  } catch {
1388
- n.setAttribute(g, String(u));
1388
+ n.setAttribute(m, String(d));
1389
1389
  }
1390
1390
  } else
1391
- n.setAttribute(g, String(u));
1391
+ n.setAttribute(m, String(d));
1392
1392
  }
1393
1393
  }
1394
- for (const g in a) {
1395
- const u = a[g];
1396
- if (!(typeof g != "string" || /\[object Object\]/.test(g)))
1397
- if (g === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
- const f = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1399
- n.value = f ?? "";
1400
- } else if (g === "checked" && n instanceof HTMLInputElement) {
1401
- const f = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1402
- n.checked = !!f;
1403
- } else if (g.startsWith("on") && typeof u == "function")
1404
- oe.addListener(n, lt(g), u);
1394
+ for (const m in a) {
1395
+ const d = a[m];
1396
+ if (!(typeof m != "string" || /\[object Object\]/.test(m)))
1397
+ if (m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
+ const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
1399
+ n.value = u ?? "";
1400
+ } else if (m === "checked" && n instanceof HTMLInputElement) {
1401
+ const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
1402
+ n.checked = !!u;
1403
+ } else if (m.startsWith("on") && typeof d == "function")
1404
+ ae.addListener(n, ft(m), d);
1405
1405
  else {
1406
- if (g.startsWith("on") && u === void 0)
1406
+ if (m.startsWith("on") && d === void 0)
1407
1407
  continue;
1408
- if (u == null || u === !1)
1409
- n.removeAttribute(g);
1410
- else if ((e.props?.isCustomElement ?? !1) || g in n)
1408
+ if (d == null || d === !1)
1409
+ n.removeAttribute(m);
1410
+ else if ((e.props?.isCustomElement ?? !1) || m in n)
1411
1411
  try {
1412
- const y = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1413
- n[g] = y;
1412
+ const y = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
1413
+ n[m] = y;
1414
1414
  } catch {
1415
1415
  }
1416
1416
  }
1417
1417
  }
1418
- for (const [g, u] of Object.entries(
1418
+ for (const [m, d] of Object.entries(
1419
1419
  c.listeners || {}
1420
1420
  ))
1421
- oe.addListener(n, g, u);
1422
- const b = {
1421
+ ae.addListener(n, m, d);
1422
+ const x = {
1423
1423
  ...e,
1424
1424
  props: {
1425
1425
  ...e.props,
1426
1426
  ...c.props
1427
1427
  }
1428
1428
  };
1429
- ye(b, n, r);
1429
+ ye(x, n, r);
1430
1430
  try {
1431
1431
  if (typeof n._applyProps == "function")
1432
1432
  try {
@@ -1437,126 +1437,126 @@ function Z(e, t, r) {
1437
1437
  } catch {
1438
1438
  }
1439
1439
  if (Array.isArray(e.children))
1440
- for (const g of e.children)
1441
- n.appendChild(Z(g, t, r));
1440
+ for (const m of e.children)
1441
+ n.appendChild(Z(m, t, r));
1442
1442
  else typeof e.children == "string" && (n.textContent = e.children);
1443
1443
  try {
1444
- if (n instanceof HTMLSelectElement && p && p.hasOwnProperty("value"))
1444
+ if (n instanceof HTMLSelectElement && h && h.hasOwnProperty("value"))
1445
1445
  try {
1446
- n.value = p.value ?? "";
1446
+ n.value = h.value ?? "";
1447
1447
  } catch {
1448
1448
  }
1449
1449
  } catch {
1450
1450
  }
1451
1451
  return n;
1452
1452
  }
1453
- function Pt(e, t, r, n, i) {
1453
+ function Mt(e, t, r, n, i) {
1454
1454
  if (typeof r == "string") {
1455
1455
  e.textContent !== r && (e.textContent = r);
1456
1456
  return;
1457
1457
  }
1458
1458
  if (!Array.isArray(r)) return;
1459
1459
  const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], c = /* @__PURE__ */ new Map();
1460
- for (const u of o)
1461
- u && u.key != null && c.set(u.key, u);
1460
+ for (const d of o)
1461
+ d && d.key != null && c.set(d.key, d);
1462
1462
  const a = /* @__PURE__ */ new Map();
1463
- for (const u of s) {
1464
- const f = u.key;
1465
- f != null && a.set(f, u);
1466
- }
1467
- const p = /* @__PURE__ */ new Set();
1468
- let h = e.firstChild;
1469
- function b(u, f) {
1470
- let y = u;
1471
- for (; y && (p.add(y), y !== f); )
1463
+ for (const d of s) {
1464
+ const u = d.key;
1465
+ u != null && a.set(u, d);
1466
+ }
1467
+ const h = /* @__PURE__ */ new Set();
1468
+ let p = e.firstChild;
1469
+ function x(d, u) {
1470
+ let y = d;
1471
+ for (; y && (h.add(y), y !== u); )
1472
1472
  y = y.nextSibling;
1473
1473
  }
1474
- function g(u, f, y, x) {
1474
+ function m(d, u, y, w) {
1475
1475
  const l = [];
1476
- let d = u.nextSibling;
1477
- for (; d && d !== f; )
1478
- l.push(d), d = d.nextSibling;
1479
- const w = Array.isArray(y) ? y : [];
1480
- if (x.some((C) => C && C.key != null) || w.some((C) => C && C.key != null)) {
1481
- const C = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
1482
- for (const v of w)
1476
+ let f = d.nextSibling;
1477
+ for (; f && f !== u; )
1478
+ l.push(f), f = f.nextSibling;
1479
+ const b = Array.isArray(y) ? y : [];
1480
+ if (w.some((C) => C && C.key != null) || b.some((C) => C && C.key != null)) {
1481
+ const C = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
1482
+ for (const v of b)
1483
1483
  v && v.key != null && C.set(v.key, v);
1484
1484
  for (const v of l) {
1485
- const A = v.key;
1486
- A != null && m.set(A, v);
1485
+ const _ = v.key;
1486
+ _ != null && g.set(_, v);
1487
1487
  }
1488
1488
  const $ = /* @__PURE__ */ new Set();
1489
- let S = u.nextSibling;
1490
- for (const v of x) {
1491
- let A;
1492
- if (v.key != null && m.has(v.key)) {
1493
- const j = C.get(v.key);
1494
- A = Ae(
1495
- m.get(v.key),
1496
- j,
1489
+ let j = d.nextSibling;
1490
+ for (const v of w) {
1491
+ let _;
1492
+ if (v.key != null && g.has(v.key)) {
1493
+ const A = C.get(v.key);
1494
+ _ = je(
1495
+ g.get(v.key),
1496
+ A,
1497
1497
  v,
1498
1498
  n
1499
- ), $.add(A), A !== S && e.contains(A) && e.insertBefore(A, S);
1499
+ ), $.add(_), _ !== j && e.contains(_) && e.insertBefore(_, j);
1500
1500
  } else
1501
- A = Z(v, n), e.insertBefore(A, S), $.add(A);
1502
- S = A.nextSibling;
1501
+ _ = Z(v, n), e.insertBefore(_, j), $.add(_);
1502
+ j = _.nextSibling;
1503
1503
  }
1504
1504
  for (const v of l)
1505
1505
  !$.has(v) && e.contains(v) && e.removeChild(v);
1506
1506
  } else {
1507
1507
  const C = Math.min(
1508
- w.length,
1509
- x.length
1508
+ b.length,
1509
+ w.length
1510
1510
  );
1511
- for (let m = 0; m < C; m++) {
1512
- const $ = w[m], S = x[m], v = Ae(l[m], $, S, n);
1513
- v !== l[m] && (e.insertBefore(v, l[m]), e.removeChild(l[m]));
1511
+ for (let g = 0; g < C; g++) {
1512
+ const $ = b[g], j = w[g], v = je(l[g], $, j, n);
1513
+ v !== l[g] && (e.insertBefore(v, l[g]), e.removeChild(l[g]));
1514
1514
  }
1515
- for (let m = C; m < x.length; m++)
1516
- e.insertBefore(Z(x[m], n), f);
1517
- for (let m = C; m < l.length; m++)
1518
- e.removeChild(l[m]);
1515
+ for (let g = C; g < w.length; g++)
1516
+ e.insertBefore(Z(w[g], n), u);
1517
+ for (let g = C; g < l.length; g++)
1518
+ e.removeChild(l[g]);
1519
1519
  }
1520
1520
  }
1521
- for (const u of r) {
1522
- let f;
1523
- if (u.tag === "#anchor") {
1524
- const y = u.key, x = `${y}:start`, l = `${y}:end`;
1525
- let d = a.get(x), w = a.get(l);
1526
- const k = Array.isArray(u.children) ? u.children : [];
1527
- if (d || (d = document.createTextNode(""), d.key = x), w || (w = document.createTextNode(""), w.key = l), u._startNode = d, u._endNode = w, !e.contains(d) || !e.contains(w)) {
1528
- e.insertBefore(d, h);
1521
+ for (const d of r) {
1522
+ let u;
1523
+ if (d.tag === "#anchor") {
1524
+ const y = d.key, w = `${y}:start`, l = `${y}:end`;
1525
+ let f = a.get(w), b = a.get(l);
1526
+ const k = Array.isArray(d.children) ? d.children : [];
1527
+ if (f || (f = document.createTextNode(""), f.key = w), b || (b = document.createTextNode(""), b.key = l), d._startNode = f, d._endNode = b, !e.contains(f) || !e.contains(b)) {
1528
+ e.insertBefore(f, p);
1529
1529
  for (const C of k)
1530
- e.insertBefore(Z(C, n), h);
1531
- e.insertBefore(w, h);
1530
+ e.insertBefore(Z(C, n), p);
1531
+ e.insertBefore(b, p);
1532
1532
  } else
1533
- g(
1534
- d,
1535
- w,
1533
+ m(
1534
+ f,
1535
+ b,
1536
1536
  c.get(y)?.children,
1537
1537
  k
1538
1538
  );
1539
- b(d, w), h = w.nextSibling;
1539
+ x(f, b), p = b.nextSibling;
1540
1540
  continue;
1541
1541
  }
1542
- if (u.key != null && a.has(u.key)) {
1543
- const y = c.get(u.key);
1544
- f = Ae(
1545
- a.get(u.key),
1542
+ if (d.key != null && a.has(d.key)) {
1543
+ const y = c.get(d.key);
1544
+ u = je(
1545
+ a.get(d.key),
1546
1546
  y,
1547
- u,
1547
+ d,
1548
1548
  n,
1549
1549
  i
1550
- ), p.add(f), f !== h && e.contains(f) && (h && !e.contains(h) && (h = null), e.insertBefore(f, h));
1550
+ ), h.add(u), u !== p && e.contains(u) && (p && !e.contains(p) && (p = null), e.insertBefore(u, p));
1551
1551
  } else
1552
- f = Z(u, n, i), h && !e.contains(h) && (h = null), e.insertBefore(f, h), p.add(f);
1553
- h = f.nextSibling;
1552
+ u = Z(d, n, i), p && !e.contains(p) && (p = null), e.insertBefore(u, p), h.add(u);
1553
+ p = u.nextSibling;
1554
1554
  }
1555
- for (const u of s)
1556
- !p.has(u) && e.contains(u) && (ue(u, i), e.removeChild(u));
1555
+ for (const d of s)
1556
+ !h.has(d) && e.contains(d) && (fe(d, i), e.removeChild(d));
1557
1557
  }
1558
- function Ae(e, t, r, n, i) {
1559
- if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === r) return e;
1558
+ function je(e, t, r, n, i) {
1559
+ if (t && typeof t != "string" && t.props?.ref && i && fe(e, i), t === r) return e;
1560
1560
  if (typeof r == "string") {
1561
1561
  if (e.nodeType === Node.TEXT_NODE)
1562
1562
  return e.textContent !== r && (e.textContent = r), e;
@@ -1566,97 +1566,97 @@ function Ae(e, t, r, n, i) {
1566
1566
  }
1567
1567
  }
1568
1568
  if (r && typeof r != "string" && r.tag === "#anchor") {
1569
- const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""), p = o._endNode ?? document.createTextNode("");
1570
- o.key != null && (a.key = `${o.key}:start`, p.key = `${o.key}:end`), o._startNode = a, o._endNode = p;
1571
- const h = document.createDocumentFragment();
1572
- h.appendChild(a);
1573
- for (const b of c) {
1574
- const g = Z(b, n);
1575
- h.appendChild(g);
1569
+ const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""), h = o._endNode ?? document.createTextNode("");
1570
+ o.key != null && (a.key = `${o.key}:start`, h.key = `${o.key}:end`), o._startNode = a, o._endNode = h;
1571
+ const p = document.createDocumentFragment();
1572
+ p.appendChild(a);
1573
+ for (const x of c) {
1574
+ const m = Z(x, n);
1575
+ p.appendChild(m);
1576
1576
  }
1577
- return h.appendChild(p), e.parentNode?.replaceChild(h, e), a;
1577
+ return p.appendChild(h), e.parentNode?.replaceChild(p, e), a;
1578
1578
  }
1579
1579
  if (!r) {
1580
- ue(e, i);
1580
+ fe(e, i);
1581
1581
  const o = document.createComment("removed");
1582
1582
  return e.parentNode?.replaceChild(o, e), o;
1583
1583
  }
1584
1584
  if (!t || typeof t == "string") {
1585
- ue(e, i);
1585
+ fe(e, i);
1586
1586
  const o = Z(r, n, i);
1587
1587
  return ye(r, o, i), e.parentNode?.replaceChild(o, e), o;
1588
1588
  }
1589
1589
  if (r.tag === "#anchor") {
1590
1590
  const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), a = r._endNode ?? document.createTextNode("");
1591
1591
  r.key != null && (c.key = `${r.key}:start`, a.key = `${r.key}:end`), r._startNode = c, r._endNode = a;
1592
- const p = document.createDocumentFragment();
1593
- p.appendChild(c);
1594
- for (const h of o)
1595
- p.appendChild(Z(h, n));
1596
- return p.appendChild(a), e.parentNode?.replaceChild(p, e), c;
1592
+ const h = document.createDocumentFragment();
1593
+ h.appendChild(c);
1594
+ for (const p of o)
1595
+ h.appendChild(Z(p, n));
1596
+ return h.appendChild(a), e.parentNode?.replaceChild(h, e), c;
1597
1597
  }
1598
1598
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
1599
1599
  const o = e;
1600
- return Je(o, t.props || {}, r.props || {}, n), Pt(o, t.children, r.children, n, i), ye(r, o, i), o;
1600
+ return Ge(o, t.props || {}, r.props || {}, n), Mt(o, t.children, r.children, n, i), ye(r, o, i), o;
1601
1601
  }
1602
1602
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
1603
1603
  try {
1604
1604
  const c = e;
1605
- return Je(c, t.props || {}, r.props || {}, n), ye(r, c, i), c;
1605
+ return Ge(c, t.props || {}, r.props || {}, n), ye(r, c, i), c;
1606
1606
  } catch {
1607
1607
  }
1608
- ue(e, i);
1608
+ fe(e, i);
1609
1609
  const s = Z(r, n, i);
1610
1610
  return ye(r, s, i), e.parentNode?.replaceChild(s, e), s;
1611
1611
  }
1612
- function Mt(e, t, r, n) {
1612
+ function Wt(e, t, r, n) {
1613
1613
  let i;
1614
1614
  Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })) : i = { tag: "div", key: "__root__", children: t } : (i = t, i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })), i && typeof i == "object" && i.tag === "#anchor" && (i = {
1615
1615
  tag: "div",
1616
1616
  key: "__anchor_root__",
1617
1617
  props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
1618
1618
  children: [i]
1619
- }), i = qe(i, String(i.key ?? "root"));
1619
+ }), i = Ke(i, String(i.key ?? "root"));
1620
1620
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
1621
1621
  let c;
1622
- s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = Ae(o, s, i, r, n) : (c = Z(i, r, n), e.replaceChild(c, o)) : (c = Z(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
1622
+ s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = je(o, s, i, r, n) : (c = Z(i, r, n), e.replaceChild(c, o)) : (c = Z(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
1623
1623
  const a = [];
1624
- for (let p = 0; p < e.childNodes.length; p++) {
1625
- const h = e.childNodes[p];
1626
- h !== c && h.nodeName !== "STYLE" && (ue(h, n), a.push(h));
1624
+ for (let h = 0; h < e.childNodes.length; h++) {
1625
+ const p = e.childNodes[h];
1626
+ p !== c && p.nodeName !== "STYLE" && (fe(p, n), a.push(p));
1627
1627
  }
1628
- a.forEach((p) => e.removeChild(p)), e._prevVNode = i, e._prevDom = c;
1628
+ a.forEach((h) => e.removeChild(h)), e._prevVNode = i, e._prevDom = c;
1629
1629
  }
1630
- function Pe(e) {
1631
- if (typeof e == "string") return pe(e);
1630
+ function Me(e) {
1631
+ if (typeof e == "string") return he(e);
1632
1632
  if (e.tag === "#text")
1633
- return typeof e.children == "string" ? pe(e.children) : "";
1633
+ return typeof e.children == "string" ? he(e.children) : "";
1634
1634
  if (e.tag === "#anchor")
1635
- return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Pe).join("");
1635
+ return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Me).join("");
1636
1636
  let t = "";
1637
- e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${pe(String(s))}"`).join(""));
1637
+ e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${he(String(s))}"`).join(""));
1638
1638
  let r = "";
1639
- e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${pe(String(s))}"`).join(""));
1640
- const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? pe(e.children) : e.children ? Pe(e.children) : "";
1639
+ e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${he(String(s))}"`).join(""));
1640
+ const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Me).join("") : typeof e.children == "string" ? he(e.children) : e.children ? Me(e.children) : "";
1641
1641
  return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
1642
1642
  }
1643
- function Wt(e, ...t) {
1643
+ function Dt(e, ...t) {
1644
1644
  let r = "";
1645
1645
  for (let n = 0; n < e.length; n++)
1646
1646
  r += e[n], n < t.length && (r += t[n]);
1647
1647
  return r;
1648
1648
  }
1649
- function ft(e) {
1649
+ function pt(e) {
1650
1650
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
1651
1651
  }
1652
- let _e = null;
1653
- function Ze() {
1654
- return _e || (_e = new CSSStyleSheet(), _e.replaceSync(ft(It))), _e;
1652
+ let Ee = null;
1653
+ function Xe() {
1654
+ return Ee || (Ee = new CSSStyleSheet(), Ee.replaceSync(pt(Nt))), Ee;
1655
1655
  }
1656
- function Dt(e) {
1656
+ function It(e) {
1657
1657
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
1658
1658
  }
1659
- const It = Wt`
1659
+ const Nt = Dt`
1660
1660
  :host,
1661
1661
  *,
1662
1662
  ::before,
@@ -1677,6 +1677,13 @@ const It = Wt`
1677
1677
  font: 16px/1.5 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
1678
1678
  -webkit-text-size-adjust: 100%;
1679
1679
  text-size-adjust: 100%;
1680
+ /* Default gradient variables to avoid undefined var() usage in generated utilities */
1681
+ --tw-gradient-from-position: 0%;
1682
+ --tw-gradient-to-position: 100%;
1683
+ --tw-gradient-via-position: 50%;
1684
+ --tw-gradient-from: rgba(255,255,255,0);
1685
+ --tw-gradient-to: rgba(255,255,255,0);
1686
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1680
1687
  }
1681
1688
  button,
1682
1689
  input,
@@ -1760,7 +1767,7 @@ const It = Wt`
1760
1767
  [hidden] {
1761
1768
  display: none;
1762
1769
  }
1763
- `, Nt = {
1770
+ `, Ht = {
1764
1771
  // Existing semantic colors
1765
1772
  neutral: {
1766
1773
  50: "#fafafa",
@@ -1858,8 +1865,8 @@ const It = Wt`
1858
1865
  black: { DEFAULT: "#000000" },
1859
1866
  transparent: { DEFAULT: "transparent" },
1860
1867
  current: { DEFAULT: "currentColor" }
1861
- }, dt = Object.fromEntries(
1862
- Object.entries(Nt).map(([e, t]) => [
1868
+ }, ht = Object.fromEntries(
1869
+ Object.entries(Ht).map(([e, t]) => [
1863
1870
  e,
1864
1871
  Object.fromEntries(
1865
1872
  Object.entries(t).map(([r, n]) => [
@@ -1868,7 +1875,7 @@ const It = Wt`
1868
1875
  ])
1869
1876
  )
1870
1877
  ])
1871
- ), le = "0.25rem", Ht = {
1878
+ ), ue = "0.25rem", Bt = {
1872
1879
  "3xs": 64,
1873
1880
  "2xs": 72,
1874
1881
  xs: 80,
@@ -1882,7 +1889,7 @@ const It = Wt`
1882
1889
  "5xl": 256,
1883
1890
  "6xl": 288,
1884
1891
  "7xl": 320
1885
- }, Ge = {
1892
+ }, Qe = {
1886
1893
  m: ["margin"],
1887
1894
  mx: ["margin-inline"],
1888
1895
  my: ["margin-block"],
@@ -2037,8 +2044,8 @@ const It = Wt`
2037
2044
  ["text-7xl", "4.5rem", "1"],
2038
2045
  ["text-8xl", "6rem", "1"],
2039
2046
  ["text-9xl", "8rem", "1"]
2040
- ].forEach(([a, p, h]) => {
2041
- e[a] = `font-size:${p};line-height:${h};`;
2047
+ ].forEach(([a, h, p]) => {
2048
+ e[a] = `font-size:${h};line-height:${p};`;
2042
2049
  }), [
2043
2050
  ["tracking-tighter", "-0.05em"],
2044
2051
  ["tracking-tight", "-0.025em"],
@@ -2046,8 +2053,8 @@ const It = Wt`
2046
2053
  ["tracking-wide", "0.025em"],
2047
2054
  ["tracking-wider", "0.05em"],
2048
2055
  ["tracking-widest", "0.1em"]
2049
- ].forEach(([a, p]) => {
2050
- e[a] = `letter-spacing:${p};`;
2056
+ ].forEach(([a, h]) => {
2057
+ e[a] = `letter-spacing:${h};`;
2051
2058
  }), [
2052
2059
  ["leading-3", "0.75rem"],
2053
2060
  ["leading-4", "1rem"],
@@ -2063,15 +2070,15 @@ const It = Wt`
2063
2070
  ["leading-normal", "1.5"],
2064
2071
  ["leading-relaxed", "1.625"],
2065
2072
  ["leading-loose", "2"]
2066
- ].forEach(([a, p]) => {
2067
- e[a] = `line-height:${p};`;
2073
+ ].forEach(([a, h]) => {
2074
+ e[a] = `line-height:${h};`;
2068
2075
  }), Object.assign(e, {
2069
2076
  "font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
2070
2077
  "font-serif": "font-family:var(--font-serif, ui-serif,Georgia,serif);",
2071
2078
  "font-mono": "font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);"
2072
2079
  }), [0, 1, 2, 4, 6, 8].forEach((a) => {
2073
- const p = `${a}px`;
2074
- e[`border-${a}`] = `border-width:${p};`, e[`border-t-${a}`] = `border-top-width:${p};`, e[`border-r-${a}`] = `border-right-width:${p};`, e[`border-b-${a}`] = `border-bottom-width:${p};`, e[`border-l-${a}`] = `border-left-width:${p};`, e[`border-x-${a}`] = `border-left-width:${p};border-right-width:${p};`, e[`border-y-${a}`] = `border-top-width:${p};border-bottom-width:${p};`;
2080
+ const h = `${a}px`;
2081
+ e[`border-${a}`] = `border-width:${h};`, e[`border-t-${a}`] = `border-top-width:${h};`, e[`border-r-${a}`] = `border-right-width:${h};`, e[`border-b-${a}`] = `border-bottom-width:${h};`, e[`border-l-${a}`] = `border-left-width:${h};`, e[`border-x-${a}`] = `border-left-width:${h};border-right-width:${h};`, e[`border-y-${a}`] = `border-top-width:${h};border-bottom-width:${h};`;
2075
2082
  }), e.border = "border-width:1px;", e["border-t"] = "border-top-width:1px;", e["border-r"] = "border-right-width:1px;", e["border-b"] = "border-bottom-width:1px;", e["border-l"] = "border-left-width:1px;", e["border-x"] = "border-left-width:1px;border-right-width:1px;", e["border-y"] = "border-top-width:1px;border-bottom-width:1px;", Object.assign(e, {
2076
2083
  "border-solid": "border-style:solid;",
2077
2084
  "border-dashed": "border-style:dashed;",
@@ -2089,9 +2096,9 @@ const It = Wt`
2089
2096
  "3xl": 24,
2090
2097
  "4xl": 32,
2091
2098
  full: 9999
2092
- }).forEach(([a, p]) => {
2093
- const h = p === 9999 ? "9999px" : `${p / 16}rem`;
2094
- e[`rounded-${a}`] = `border-radius:${h};`, e[`rounded-t-${a}`] = `border-top-left-radius:${h};border-top-right-radius:${h};`, e[`rounded-r-${a}`] = `border-top-right-radius:${h};border-bottom-right-radius:${h};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${h};border-bottom-right-radius:${h};`, e[`rounded-l-${a}`] = `border-top-left-radius:${h};border-bottom-left-radius:${h};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${h};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${h};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${h};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${h};`;
2099
+ }).forEach(([a, h]) => {
2100
+ const p = h === 9999 ? "9999px" : `${h / 16}rem`;
2101
+ e[`rounded-${a}`] = `border-radius:${p};`, e[`rounded-t-${a}`] = `border-top-left-radius:${p};border-top-right-radius:${p};`, e[`rounded-r-${a}`] = `border-top-right-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-l-${a}`] = `border-top-left-radius:${p};border-bottom-left-radius:${p};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${p};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${p};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${p};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${p};`;
2095
2102
  }), Object.assign(e, {
2096
2103
  "shadow-none": "--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
2097
2104
  "shadow-xs": "--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
@@ -2169,8 +2176,8 @@ const It = Wt`
2169
2176
  "m-auto": "margin:auto;",
2170
2177
  "mx-auto": "margin-inline:auto;",
2171
2178
  "my-auto": "margin-block:auto;"
2172
- }), Object.entries(Ht).forEach(([a, p]) => {
2173
- e[`max-w-${a}`] = `max-width:calc(${le} * ${p});`, e[`min-w-${a}`] = `min-width:calc(${le} * ${p});`, e[`w-${a}`] = `width:calc(${le} * ${p});`, e[`max-h-${a}`] = `max-height:calc(${le} * ${p});`, e[`min-h-${a}`] = `min-height:calc(${le} * ${p});`, e[`h-${a}`] = `height:calc(${le} * ${p});`;
2179
+ }), Object.entries(Bt).forEach(([a, h]) => {
2180
+ e[`max-w-${a}`] = `max-width:calc(${ue} * ${h});`, e[`min-w-${a}`] = `min-width:calc(${ue} * ${h});`, e[`w-${a}`] = `width:calc(${ue} * ${h});`, e[`max-h-${a}`] = `max-height:calc(${ue} * ${h});`, e[`min-h-${a}`] = `min-height:calc(${ue} * ${h});`, e[`h-${a}`] = `height:calc(${ue} * ${h});`;
2174
2181
  }), Object.assign(e, {
2175
2182
  transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
2176
2183
  "transition-none": "transition-property:none;",
@@ -2257,7 +2264,7 @@ const It = Wt`
2257
2264
  "bg-gradient-to-l": "background-image:linear-gradient(to left, var(--tw-gradient-stops));",
2258
2265
  "bg-gradient-to-tl": "background-image:linear-gradient(to top left, var(--tw-gradient-stops));"
2259
2266
  }), e;
2260
- }, Me = zt();
2267
+ }, We = zt();
2261
2268
  function J(e, t) {
2262
2269
  let r = 0;
2263
2270
  for (let n = 0; n < e.length; n++) {
@@ -2269,7 +2276,7 @@ function J(e, t) {
2269
2276
  }
2270
2277
  return e + t;
2271
2278
  }
2272
- const Bt = {
2279
+ const Ut = {
2273
2280
  before: (e, t) => `${e}::before{${t}}`,
2274
2281
  after: (e, t) => `${e}::after{${t}}`,
2275
2282
  hover: (e, t) => `${J(e, ":hover")}{${t}}`,
@@ -2292,14 +2299,14 @@ const Bt = {
2292
2299
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
2293
2300
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
2294
2301
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
2295
- }, Xe = {
2302
+ }, Ye = {
2296
2303
  sm: "(min-width:640px)",
2297
2304
  md: "(min-width:768px)",
2298
2305
  lg: "(min-width:1024px)",
2299
2306
  xl: "(min-width:1280px)",
2300
2307
  "2xl": "(min-width:1536px)",
2301
2308
  dark: "(prefers-color-scheme: dark)"
2302
- }, Ut = {
2309
+ }, qt = {
2303
2310
  xs: "(min-width:20rem)",
2304
2311
  sm: "(min-width:24rem)",
2305
2312
  md: "(min-width:28rem)",
@@ -2311,7 +2318,7 @@ const Bt = {
2311
2318
  "5xl": "(min-width:64rem)",
2312
2319
  "6xl": "(min-width:72rem)",
2313
2320
  "7xl": "(min-width:80rem)"
2314
- }, We = ["sm", "md", "lg", "xl", "2xl"], De = [
2321
+ }, De = ["sm", "md", "lg", "xl", "2xl"], Ie = [
2315
2322
  "xs",
2316
2323
  "sm",
2317
2324
  "md",
@@ -2324,19 +2331,19 @@ const Bt = {
2324
2331
  "6xl",
2325
2332
  "7xl"
2326
2333
  ];
2327
- function Ie(e) {
2334
+ function Ne(e) {
2328
2335
  const t = e.startsWith("-"), r = t ? e.slice(1) : e, n = r.lastIndexOf("-");
2329
2336
  if (n === -1) return null;
2330
2337
  const i = r.slice(0, n), s = r.slice(n + 1), o = parseFloat(s);
2331
- if (Number.isNaN(o) || !Ge[i]) return null;
2338
+ if (Number.isNaN(o) || !Qe[i]) return null;
2332
2339
  const c = t ? "-" : "";
2333
- return Ge[i].map((a) => `${a}:calc(${c}${le} * ${o});`).join("");
2340
+ return Qe[i].map((a) => `${a}:calc(${c}${ue} * ${o});`).join("");
2334
2341
  }
2335
- function Qe(e) {
2342
+ function et(e) {
2336
2343
  const t = e.replace("#", ""), r = parseInt(t, 16);
2337
2344
  return `${r >> 16 & 255} ${r >> 8 & 255} ${r & 255}`;
2338
2345
  }
2339
- const qt = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Ft = {
2346
+ const Ft = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Kt = {
2340
2347
  bg: "background-color",
2341
2348
  decoration: "text-decoration-color",
2342
2349
  text: "color",
@@ -2347,36 +2354,36 @@ const qt = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
2347
2354
  fill: "fill",
2348
2355
  stroke: "stroke"
2349
2356
  };
2350
- function Kt(e) {
2351
- const t = qt.exec(e);
2357
+ function Vt(e) {
2358
+ const t = Ft.exec(e);
2352
2359
  if (!t) return null;
2353
- const [, r, n, i = "DEFAULT"] = t, s = dt[n]?.[i];
2360
+ const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
2354
2361
  if (!s) return null;
2355
2362
  if (r === "shadow") return `--ce-shadow-color:${s};`;
2356
- const o = Ft[r];
2363
+ const o = Kt[r];
2357
2364
  return o ? `${o}:${s};` : null;
2358
2365
  }
2359
- function Vt(e) {
2366
+ function Jt(e) {
2360
2367
  const t = e.indexOf("/");
2361
2368
  if (t === -1) return { base: e };
2362
2369
  const r = e.slice(0, t), n = e.slice(t + 1), i = parseInt(n, 10);
2363
2370
  return isNaN(i) || i < 0 || i > 100 ? { base: r } : { base: r, opacity: i / 100 };
2364
2371
  }
2365
- function Ne(e) {
2366
- const { base: t, opacity: r } = Vt(e), n = Kt(t);
2372
+ function He(e) {
2373
+ const { base: t, opacity: r } = Jt(e), n = Vt(t);
2367
2374
  if (n && r !== void 0) {
2368
2375
  const s = /#([0-9a-f]{6})/i.exec(n);
2369
2376
  if (s) {
2370
- const o = Qe(s[0]);
2377
+ const o = et(s[0]);
2371
2378
  return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2372
2379
  }
2373
2380
  }
2374
2381
  if (n) return n;
2375
- const i = je(t);
2382
+ const i = Oe(t);
2376
2383
  if (i && r !== void 0) {
2377
2384
  const s = /#([0-9a-f]{6})/i.exec(i);
2378
2385
  if (s) {
2379
- const o = Qe(s[0]);
2386
+ const o = et(s[0]);
2380
2387
  return i.replace(
2381
2388
  /#([0-9a-f]{6})/i,
2382
2389
  `rgb(${o} / ${r})`
@@ -2385,10 +2392,10 @@ function Ne(e) {
2385
2392
  }
2386
2393
  return i;
2387
2394
  }
2388
- function Ye(e) {
2395
+ function Be(e) {
2389
2396
  const t = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2390
2397
  if (!t) return null;
2391
- const [, r, n, i = "DEFAULT"] = t, s = dt[n]?.[i];
2398
+ const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
2392
2399
  if (!s) return null;
2393
2400
  switch (r) {
2394
2401
  case "from":
@@ -2401,19 +2408,19 @@ function Ye(e) {
2401
2408
  return null;
2402
2409
  }
2403
2410
  }
2404
- function He(e) {
2411
+ function ze(e) {
2405
2412
  const t = /^opacity-(\d{1,3})$/.exec(e);
2406
2413
  if (!t) return null;
2407
2414
  const r = parseInt(t[1], 10);
2408
2415
  return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
2409
2416
  }
2410
- function je(e) {
2417
+ function Oe(e) {
2411
2418
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
2412
2419
  const o = e.slice(1, -1).trim(), c = o.indexOf(":");
2413
2420
  if (c === -1) return null;
2414
2421
  const a = o.slice(0, c).trim();
2415
- let p = o.slice(c + 1).trim();
2416
- return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (p = p.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), p = p.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${p};`) : null;
2422
+ let h = o.slice(c + 1).trim();
2423
+ return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (h = h.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), h = h.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${h};`) : null;
2417
2424
  }
2418
2425
  const t = e.indexOf("-[");
2419
2426
  if (t <= 0 || !e.endsWith("]")) return null;
@@ -2468,7 +2475,7 @@ function je(e) {
2468
2475
  const s = i[r] ?? r.replace(/_/g, "-");
2469
2476
  return s && n ? `${s}:${n};` : null;
2470
2477
  }
2471
- function Jt(e) {
2478
+ function Zt(e) {
2472
2479
  if (e.startsWith("[") && e.endsWith("]")) {
2473
2480
  const r = e.slice(1, -1);
2474
2481
  return r.includes("&") ? r : e;
@@ -2480,7 +2487,7 @@ function Jt(e) {
2480
2487
  }
2481
2488
  return null;
2482
2489
  }
2483
- function Zt(e) {
2490
+ function tt(e) {
2484
2491
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
2485
2492
  }
2486
2493
  function Gt(e) {
@@ -2492,31 +2499,31 @@ function Gt(e) {
2492
2499
  }
2493
2500
  return r;
2494
2501
  }
2495
- const ge = /* @__PURE__ */ new Map(), Xt = 16, et = 1e3;
2502
+ const ge = /* @__PURE__ */ new Map(), Xt = 16, rt = 1e3;
2496
2503
  function Qt(e) {
2497
2504
  const t = Date.now(), r = ge.get(e);
2498
2505
  if (r && t - r.timestamp < Xt) return r.css;
2499
2506
  const n = Gt(e);
2500
2507
  if (!n.length) return "";
2501
- const i = new Set(n), s = [[], [], [], []], o = {}, c = (u, f = !1) => {
2502
- const y = f ? `dark|${u}` : u;
2503
- if (y in o) return o[y];
2504
- const x = b(u, f);
2505
- return o[y] = x, x;
2508
+ const i = new Set(n), s = [[], [], [], []], o = {}, c = (u, y = !1) => {
2509
+ const w = y ? `dark|${u}` : u;
2510
+ if (w in o) return o[w];
2511
+ const l = x(u, y);
2512
+ return o[w] = l, l;
2506
2513
  }, a = (u) => {
2507
- const f = u.some((l) => We.includes(l)), y = u.some(
2508
- (l) => l.startsWith("@") && (De.includes(l.slice(1)) || l.match(/^@\[.+\]$/))
2509
- ), x = u.includes("dark");
2510
- return u.length ? !f && !x && !y ? 1 : x && (f || y) ? 3 : 2 : 0;
2511
- }, p = (u) => {
2512
- const f = [];
2513
- let y = "", x = 0;
2514
- for (let l = 0; l < u.length; l++) {
2515
- const d = u[l];
2516
- d === "[" || d === "(" ? x++ : (d === "]" || d === ")") && x--, d === ":" && x === 0 ? (f.push(y), y = "") : y += d;
2514
+ const y = u.some((f) => De.includes(f)), w = u.some(
2515
+ (f) => f.startsWith("@") && (Ie.includes(f.slice(1)) || f.match(/^@\[.+\]$/))
2516
+ ), l = u.includes("dark");
2517
+ return u.length ? !y && !l && !w ? 1 : l && (y || w) ? 3 : 2 : 0;
2518
+ }, h = (u) => {
2519
+ const y = [];
2520
+ let w = "", l = 0;
2521
+ for (let f = 0; f < u.length; f++) {
2522
+ const b = u[f];
2523
+ b === "[" || b === "(" ? l++ : (b === "]" || b === ")") && l--, b === ":" && l === 0 ? (y.push(w), w = "") : w += b;
2517
2524
  }
2518
- return y && f.push(y), f;
2519
- }, h = {
2525
+ return w && y.push(w), y;
2526
+ }, p = {
2520
2527
  hover: ":hover",
2521
2528
  focus: ":focus",
2522
2529
  active: ":active",
@@ -2529,128 +2536,135 @@ function Qt(e) {
2529
2536
  even: ":nth-child(even)",
2530
2537
  "focus-within": ":focus-within",
2531
2538
  "focus-visible": ":focus-visible"
2532
- }, b = (u, f = !1) => {
2533
- const y = p(u);
2534
- let x = "", l = !1;
2535
- for (const _ of y) {
2536
- let L = _;
2537
- if (L.startsWith("!") && (l = !0, L = L.slice(1)), Me[L] || Ie(L) || He(L) || Ne(L) || je(L)) {
2538
- x = _;
2539
+ }, x = (u, y = !1) => {
2540
+ const w = h(u);
2541
+ let l = "", f = !1;
2542
+ for (const E of w) {
2543
+ let T = E;
2544
+ if (T.startsWith("!") && (f = !0, T = T.slice(1)), We[T] || Ne(T) || ze(T) || He(T) || Be(T) || Oe(T)) {
2545
+ l = E;
2539
2546
  break;
2540
2547
  }
2541
2548
  }
2542
- if (!x) return null;
2543
- const d = x.replace(/^!/, ""), w = Me[d] ?? Ie(d) ?? He(d) ?? Ne(d) ?? Ye(d) ?? je(d);
2544
- if (!w) return null;
2545
- const k = y.indexOf(x);
2546
- let C = k >= 0 ? y.slice(0, k) : [];
2547
- f && (C = C.filter((_) => _ !== "dark"));
2548
- const m = `.${Zt(u)}`, $ = l ? w.replace(/;/g, " !important;") : w, S = "__SUBJECT__";
2549
- let v = S;
2549
+ if (!l) return null;
2550
+ const b = l.replace(/^!/, ""), k = We[b] ?? Ne(b) ?? ze(b) ?? He(b) ?? Be(b) ?? Oe(b);
2551
+ if (!k) return null;
2552
+ const C = w.indexOf(l);
2553
+ let g = C >= 0 ? w.slice(0, C) : [];
2554
+ y && (g = g.filter((E) => E !== "dark"));
2555
+ const $ = `.${tt(u)}`, j = f ? k.replace(/;/g, " !important;") : k, v = "__SUBJECT__";
2556
+ let _ = v;
2550
2557
  const A = [];
2551
- for (const _ of C)
2552
- _.startsWith("group-") ? (v = `.group:${_.slice(6)} ${v}`, A.push(_)) : _.startsWith("peer-") && (v = v.replace(
2553
- S,
2554
- `.peer:${_.slice(5)}~${S}`
2555
- ), A.push(_));
2556
- C = C.filter((_) => !A.includes(_));
2557
- const j = [], N = [];
2558
- let E = null;
2559
- for (const _ of C) {
2560
- if (_ === "dark" || We.includes(_) || _.startsWith("@") && (De.includes(_.slice(1)) || _.match(/^@\[.+\]$/)))
2558
+ for (const E of g)
2559
+ E.startsWith("group-") ? (_ = `.group:${E.slice(6)} ${_}`, A.push(E)) : E.startsWith("peer-") && (_ = _.replace(
2560
+ v,
2561
+ `.peer:${E.slice(5)}~${v}`
2562
+ ), A.push(E));
2563
+ g = g.filter((E) => !A.includes(E));
2564
+ const D = [], S = [];
2565
+ let O = null;
2566
+ for (const E of g) {
2567
+ if (E === "dark" || De.includes(E) || E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/)))
2561
2568
  continue;
2562
- const L = Jt(_);
2563
- if (L) {
2564
- E = L;
2569
+ const T = Zt(E);
2570
+ if (T) {
2571
+ O = T;
2565
2572
  continue;
2566
2573
  }
2567
- const M = h[_];
2568
- if (M) {
2569
- E ? N.push(M) : j.push(M);
2574
+ const R = p[E];
2575
+ if (R) {
2576
+ O ? S.push(R) : D.push(R);
2570
2577
  continue;
2571
2578
  }
2572
- const T = Bt[_];
2573
- typeof T == "function" && (v = T(v, $).split("{")[0]);
2579
+ const B = Ut[E];
2580
+ typeof B == "function" && (_ = B(_, j).split("{")[0]);
2574
2581
  }
2575
- const O = j.join(""), H = N.join("");
2576
- function he(_, L) {
2577
- if (!L) return _;
2578
- let M = 0, T = 0;
2579
- if (_.length && (_[0] === ">" || _[0] === "+" || _[0] === "~" || _[0] === " ")) {
2580
- let P = 1;
2581
- for (; P < _.length && _[P] === " "; ) P++;
2582
- for (; P < _.length; P++) {
2583
- const z = _[P];
2584
- if (z === "[" ? M++ : z === "]" && M > 0 ? M-- : z === "(" ? T++ : z === ")" && T > 0 && T--, M === 0 && T === 0 && (_[P] === ">" || _[P] === "+" || _[P] === "~" || _[P] === " "))
2585
- return _.slice(0, P) + L + _.slice(P);
2582
+ const H = D.join(""), te = S.join("");
2583
+ function $e(E, T) {
2584
+ if (!T) return E;
2585
+ let R = 0, B = 0;
2586
+ if (E.length && (E[0] === ">" || E[0] === "+" || E[0] === "~" || E[0] === " ")) {
2587
+ let L = 1;
2588
+ for (; L < E.length && E[L] === " "; ) L++;
2589
+ for (; L < E.length; L++) {
2590
+ const z = E[L];
2591
+ if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (E[L] === ">" || E[L] === "+" || E[L] === "~" || E[L] === " "))
2592
+ return E.slice(0, L) + T + E.slice(L);
2586
2593
  }
2587
- return _ + L;
2594
+ return E + T;
2588
2595
  }
2589
- for (let P = 0; P < _.length; P++) {
2590
- const z = _[P];
2591
- if (z === "[" ? M++ : z === "]" && M > 0 ? M-- : z === "(" ? T++ : z === ")" && T > 0 && T--, M === 0 && T === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
2592
- return _.slice(0, P) + L + _.slice(P);
2596
+ for (let L = 0; L < E.length; L++) {
2597
+ const z = E[L];
2598
+ if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
2599
+ return E.slice(0, L) + T + E.slice(L);
2593
2600
  }
2594
- return _ + L;
2601
+ return E + T;
2595
2602
  }
2596
- if (E)
2597
- if (E.includes("&")) {
2598
- const _ = E.indexOf("&"), L = E.slice(0, _), M = E.slice(_ + 1), T = S + O;
2599
- if (j.length === 0)
2600
- v = v.replace(
2601
- S,
2602
- L + T + H + M
2603
+ if (O)
2604
+ if (O.includes("&")) {
2605
+ const E = O.indexOf("&"), T = O.slice(0, E), R = O.slice(E + 1), B = v + H;
2606
+ if (D.length === 0)
2607
+ _ = _.replace(
2608
+ v,
2609
+ T + B + te + R
2603
2610
  );
2604
2611
  else {
2605
- const P = he(M, H);
2606
- v = v.replace(
2607
- S,
2608
- L + T + P
2612
+ const L = $e(R, te);
2613
+ _ = _.replace(
2614
+ v,
2615
+ T + B + L
2609
2616
  );
2610
2617
  }
2611
2618
  } else
2612
- v = v.replace(
2613
- S,
2614
- `${E}${S + O}`
2615
- ), H && (v = v.replace(S, `${S}${H}`));
2619
+ _ = _.replace(
2620
+ v,
2621
+ `${O}${v + H}`
2622
+ ), te && (_ = _.replace(v, `${v}${te}`));
2616
2623
  else
2617
- v = v.replace(
2618
- S,
2619
- S + O + H
2624
+ _ = _.replace(
2625
+ v,
2626
+ v + H + te
2620
2627
  );
2621
- v = v.replace(new RegExp(S, "g"), m);
2622
- let G = `${v}{${$}}`;
2623
- const K = C.filter(
2624
- (_) => We.includes(_)
2625
- ), I = C.filter(
2626
- (_) => _.startsWith("@") && (De.includes(_.slice(1)) || _.match(/^@\[.+\]$/))
2627
- ), V = K.length ? K[K.length - 1] : null, U = I.length ? I[I.length - 1] : null, ne = C.includes("dark");
2628
- let R = "", X = "";
2629
- if (ne && V ? R = `@media (prefers-color-scheme: dark) and ${Xe[V]}` : ne ? R = "@media (prefers-color-scheme: dark)" : V && (R = `@media ${Xe[V]}`), U)
2630
- if (U.startsWith("@[") && U.endsWith("]")) {
2631
- const _ = U.slice(2, -1);
2632
- if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(_))
2628
+ _ = _.replace(new RegExp(v, "g"), $);
2629
+ let N = `${_}{${j}}`;
2630
+ const W = g.filter(
2631
+ (E) => De.includes(E)
2632
+ ), V = g.filter(
2633
+ (E) => E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/))
2634
+ ), K = W.length ? W[W.length - 1] : null, G = V.length ? V[V.length - 1] : null, I = g.includes("dark");
2635
+ let X = "", re = "";
2636
+ if (I && K ? X = `@media (prefers-color-scheme: dark) and ${Ye[K]}` : I ? X = "@media (prefers-color-scheme: dark)" : K && (X = `@media ${Ye[K]}`), G)
2637
+ if (G.startsWith("@[") && G.endsWith("]")) {
2638
+ const E = G.slice(2, -1);
2639
+ if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(E))
2633
2640
  return null;
2634
- X = `@container (min-width:${_})`;
2641
+ re = `@container (min-width:${E})`;
2635
2642
  } else {
2636
- const _ = U.slice(1);
2637
- X = `@container ${Ut[_] || `(min-width:${_})`}`;
2643
+ const E = G.slice(1);
2644
+ re = `@container ${qt[E] || `(min-width:${E})`}`;
2638
2645
  }
2639
- return R && X ? G = `${R}${X}{${G}}` : R ? G = `${R}{${G}}` : X && (G = `${X}{${G}}`), G;
2646
+ return X && re ? N = `${X}${re}{${N}}` : X ? N = `${X}{${N}}` : re && (N = `${re}{${N}}`), N;
2640
2647
  };
2641
2648
  for (const u of i) {
2642
- const f = p(u), y = f.find(
2643
- (k) => Me[k.replace(/^!/, "")] || Ie(k.replace(/^!/, "")) || He(k.replace(/^!/, "")) || Ne(k.replace(/^!/, "")) || Ye(k.replace(/^!/, "")) || je(k.replace(/^!/, ""))
2649
+ const y = h(u), w = y.find(
2650
+ (C) => We[C.replace(/^!/, "")] || Ne(C.replace(/^!/, "")) || ze(C.replace(/^!/, "")) || He(C.replace(/^!/, "")) || Be(C.replace(/^!/, "")) || Oe(C.replace(/^!/, ""))
2644
2651
  );
2645
- if (!y) continue;
2646
- const x = f.indexOf(y), l = x >= 0 ? f.slice(0, x) : [], d = a(l), w = c(u);
2647
- w && s[d].push(w);
2648
- }
2649
- const g = s.flat().join("");
2650
- return ge.size >= et && Array.from(ge.keys()).slice(
2652
+ if (!w) continue;
2653
+ const l = y.indexOf(w), f = l >= 0 ? y.slice(0, l) : [], b = a(f), k = c(u);
2654
+ k && s[b].push(k);
2655
+ }
2656
+ const m = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
2657
+ for (const u of i)
2658
+ if (m.test(u)) {
2659
+ if (s.flat().join("").includes(`.${tt(u)}`)) continue;
2660
+ const w = c(u);
2661
+ w && s[0].push(w);
2662
+ }
2663
+ const d = s.flat().join("");
2664
+ return ge.size >= rt && Array.from(ge.keys()).slice(
2651
2665
  0,
2652
- Math.floor(et / 2)
2653
- ).forEach((f) => ge.delete(f)), ge.set(e, { css: g, timestamp: t }), g;
2666
+ Math.floor(rt / 2)
2667
+ ).forEach((y) => ge.delete(y)), ge.set(e, { css: d, timestamp: t }), d;
2654
2668
  }
2655
2669
  const be = [];
2656
2670
  function Yt(e, t, r, n, i, s, o, c) {
@@ -2659,21 +2673,21 @@ function Yt(e, t, r, n, i, s, o, c) {
2659
2673
  try {
2660
2674
  const a = t.render(r);
2661
2675
  if (a instanceof Promise) {
2662
- s(!0), a.then((p) => {
2663
- s(!1), o(null), tt(e, p, r, n, i), c(e.innerHTML);
2664
- }).catch((p) => {
2665
- s(!1), o(p);
2676
+ s(!0), a.then((h) => {
2677
+ s(!1), o(null), nt(e, h, r, n, i), c(e.innerHTML);
2678
+ }).catch((h) => {
2679
+ s(!1), o(h);
2666
2680
  });
2667
2681
  return;
2668
2682
  }
2669
- tt(e, a, r, n, i), c(e.innerHTML);
2683
+ nt(e, a, r, n, i), c(e.innerHTML);
2670
2684
  } finally {
2671
2685
  be.pop();
2672
2686
  }
2673
2687
  }
2674
2688
  }
2675
- function tt(e, t, r, n, i) {
2676
- e && (Mt(
2689
+ function nt(e, t, r, n, i) {
2690
+ e && (Wt(
2677
2691
  e,
2678
2692
  Array.isArray(t) ? t : [t],
2679
2693
  r,
@@ -2702,38 +2716,38 @@ Stopping runaway component render to prevent browser freeze`
2702
2716
  }
2703
2717
  } else
2704
2718
  i(0);
2705
- const p = setTimeout(() => {
2719
+ const h = setTimeout(() => {
2706
2720
  n(Date.now()), e(), o(null);
2707
2721
  }, r > 10 ? 100 : 0);
2708
- o(p);
2722
+ o(h);
2709
2723
  }
2710
2724
  function tr(e, t, r, n, i) {
2711
2725
  if (!e) return;
2712
2726
  const s = Qt(r);
2713
2727
  if ((!s || s.trim() === "") && !t._computedStyle) {
2714
- i(null), e.adoptedStyleSheets = [Ze()];
2728
+ i(null), e.adoptedStyleSheets = [Xe()];
2715
2729
  return;
2716
2730
  }
2717
2731
  let o = "";
2718
2732
  t._computedStyle && (o = t._computedStyle);
2719
- let c = Dt(`${o}
2733
+ let c = It(`${o}
2720
2734
  ${s}
2721
2735
  `);
2722
- c = ft(c);
2736
+ c = pt(c);
2723
2737
  let a = n;
2724
- a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Ze(), a], i(a);
2738
+ a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Xe(), a], i(a);
2725
2739
  }
2726
- let D = null;
2740
+ let M = null;
2727
2741
  function rr(e) {
2728
- D = e;
2742
+ M = e;
2729
2743
  }
2730
2744
  function nr() {
2731
- D = null;
2745
+ M = null;
2732
2746
  }
2733
2747
  function br() {
2734
- if (!D)
2748
+ if (!M)
2735
2749
  throw new Error("useEmit must be called during component render");
2736
- const e = D.emit;
2750
+ const e = M.emit;
2737
2751
  return (t, r) => e(t, r);
2738
2752
  }
2739
2753
  function xe(e) {
@@ -2745,39 +2759,39 @@ function xe(e) {
2745
2759
  });
2746
2760
  }
2747
2761
  function wr(e) {
2748
- if (!D)
2762
+ if (!M)
2749
2763
  throw new Error("useOnConnected must be called during component render");
2750
- xe(D), D._hookCallbacks.onConnected = e;
2764
+ xe(M), M._hookCallbacks.onConnected = e;
2751
2765
  }
2752
2766
  function xr(e) {
2753
- if (!D)
2767
+ if (!M)
2754
2768
  throw new Error("useOnDisconnected must be called during component render");
2755
- xe(D), D._hookCallbacks.onDisconnected = e;
2769
+ xe(M), M._hookCallbacks.onDisconnected = e;
2756
2770
  }
2757
2771
  function vr(e) {
2758
- if (!D)
2772
+ if (!M)
2759
2773
  throw new Error("useOnAttributeChanged must be called during component render");
2760
- xe(D), D._hookCallbacks.onAttributeChanged = e;
2774
+ xe(M), M._hookCallbacks.onAttributeChanged = e;
2761
2775
  }
2762
2776
  function $r(e) {
2763
- if (!D)
2777
+ if (!M)
2764
2778
  throw new Error("useOnError must be called during component render");
2765
- xe(D), D._hookCallbacks.onError = e;
2779
+ xe(M), M._hookCallbacks.onError = e;
2766
2780
  }
2767
2781
  function kr(e) {
2768
- if (!D)
2782
+ if (!M)
2769
2783
  throw new Error("useStyle must be called during component render");
2770
- xe(D);
2784
+ xe(M);
2771
2785
  try {
2772
2786
  const t = e();
2773
- Object.defineProperty(D, "_computedStyle", {
2787
+ Object.defineProperty(M, "_computedStyle", {
2774
2788
  value: t,
2775
2789
  writable: !0,
2776
2790
  enumerable: !1,
2777
2791
  configurable: !0
2778
2792
  });
2779
2793
  } catch (t) {
2780
- console.warn("Error in useStyle callback:", t), Object.defineProperty(D, "_computedStyle", {
2794
+ console.warn("Error in useStyle callback:", t), Object.defineProperty(M, "_computedStyle", {
2781
2795
  value: "",
2782
2796
  writable: !0,
2783
2797
  enumerable: !1,
@@ -2785,10 +2799,10 @@ function kr(e) {
2785
2799
  });
2786
2800
  }
2787
2801
  }
2788
- const Te = /* @__PURE__ */ new Map(), rt = Symbol.for("cer.registry");
2802
+ const Re = /* @__PURE__ */ new Map(), it = Symbol.for("cer.registry");
2789
2803
  if (typeof window < "u") {
2790
2804
  const e = globalThis;
2791
- e[rt] || (e[rt] = Te);
2805
+ e[it] || (e[it] = Re);
2792
2806
  }
2793
2807
  function ir(e, t) {
2794
2808
  if (!t.render)
@@ -2833,7 +2847,7 @@ function ir(e, t) {
2833
2847
  _templateLoading = !1;
2834
2848
  _templateError = null;
2835
2849
  constructor() {
2836
- super(), this.attachShadow({ mode: "open" }), this._cfg = Te.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2850
+ super(), this.attachShadow({ mode: "open" }), this._cfg = Re.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2837
2851
  const r = this._initContext(t);
2838
2852
  Object.defineProperty(r, "refs", {
2839
2853
  value: this._refs,
@@ -2874,7 +2888,7 @@ function ir(e, t) {
2874
2888
  enumerable: !1,
2875
2889
  configurable: !1
2876
2890
  });
2877
- const n = Te.get(e) || t;
2891
+ const n = Re.get(e) || t;
2878
2892
  Object.keys(n).forEach((i) => {
2879
2893
  const s = n[i];
2880
2894
  typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
@@ -2895,14 +2909,14 @@ function ir(e, t) {
2895
2909
  }
2896
2910
  connectedCallback() {
2897
2911
  this._runLogicWithinErrorBoundary(t, () => {
2898
- this._applyProps(t), this._requestRender(), Ct(t, this.context, this._mounted, (r) => {
2912
+ this._applyProps(t), this._requestRender(), _t(t, this.context, this._mounted, (r) => {
2899
2913
  this._mounted = r;
2900
2914
  });
2901
2915
  });
2902
2916
  }
2903
2917
  disconnectedCallback() {
2904
2918
  this._runLogicWithinErrorBoundary(t, () => {
2905
- _t(
2919
+ Et(
2906
2920
  t,
2907
2921
  this.context,
2908
2922
  this._listeners,
@@ -2926,11 +2940,11 @@ function ir(e, t) {
2926
2940
  }
2927
2941
  attributeChangedCallback(r, n, i) {
2928
2942
  this._runLogicWithinErrorBoundary(t, () => {
2929
- this._applyProps(t), n !== i && this._requestRender(), Et(t, r, n, i, this.context);
2943
+ this._applyProps(t), n !== i && this._requestRender(), St(t, r, n, i, this.context);
2930
2944
  });
2931
2945
  }
2932
2946
  static get observedAttributes() {
2933
- return t.props ? Object.keys(t.props).map(re) : [];
2947
+ return t.props ? Object.keys(t.props).map(ie) : [];
2934
2948
  }
2935
2949
  _applyComputed(r) {
2936
2950
  }
@@ -2960,7 +2974,7 @@ function ir(e, t) {
2960
2974
  }
2961
2975
  _requestRender() {
2962
2976
  this._runLogicWithinErrorBoundary(this._cfg, () => {
2963
- fe(() => {
2977
+ de(() => {
2964
2978
  er(
2965
2979
  () => this._render(this._cfg),
2966
2980
  this._lastRenderTime,
@@ -3007,9 +3021,9 @@ function ir(e, t) {
3007
3021
  try {
3008
3022
  let n = function(s, o = "") {
3009
3023
  return Array.isArray(s) ? new Proxy(s, {
3010
- get(c, a, p) {
3011
- const h = Reflect.get(c, a, p);
3012
- return typeof h == "function" && typeof a == "string" && [
3024
+ get(c, a, h) {
3025
+ const p = Reflect.get(c, a, h);
3026
+ return typeof p == "function" && typeof a == "string" && [
3013
3027
  "push",
3014
3028
  "pop",
3015
3029
  "shift",
@@ -3017,29 +3031,29 @@ function ir(e, t) {
3017
3031
  "splice",
3018
3032
  "sort",
3019
3033
  "reverse"
3020
- ].includes(a) ? function(...g) {
3021
- const u = h.apply(c, g);
3034
+ ].includes(a) ? function(...m) {
3035
+ const d = p.apply(c, m);
3022
3036
  if (!i._initializing) {
3023
- const f = o || "root";
3024
- i._triggerWatchers(f, c), fe(
3037
+ const u = o || "root";
3038
+ i._triggerWatchers(u, c), de(
3025
3039
  () => i._render(r),
3026
3040
  i._componentId
3027
3041
  );
3028
3042
  }
3029
- return u;
3030
- } : h;
3043
+ return d;
3044
+ } : p;
3031
3045
  },
3032
- set(c, a, p) {
3033
- if (c[a] = p, !i._initializing) {
3034
- const h = o ? `${o}.${String(a)}` : String(a);
3035
- i._triggerWatchers(h, p), fe(() => i._render(r), i._componentId);
3046
+ set(c, a, h) {
3047
+ if (c[a] = h, !i._initializing) {
3048
+ const p = o ? `${o}.${String(a)}` : String(a);
3049
+ i._triggerWatchers(p, h), de(() => i._render(r), i._componentId);
3036
3050
  }
3037
3051
  return !0;
3038
3052
  },
3039
3053
  deleteProperty(c, a) {
3040
3054
  if (delete c[a], !i._initializing) {
3041
- const p = o ? `${o}.${String(a)}` : String(a);
3042
- i._triggerWatchers(p, void 0), fe(() => i._render(r), i._componentId);
3055
+ const h = o ? `${o}.${String(a)}` : String(a);
3056
+ i._triggerWatchers(h, void 0), de(() => i._render(r), i._componentId);
3043
3057
  }
3044
3058
  return !0;
3045
3059
  }
@@ -3047,12 +3061,12 @@ function ir(e, t) {
3047
3061
  const a = o ? `${o}.${c}` : c;
3048
3062
  s[c] = n(s[c], a);
3049
3063
  }), new Proxy(s, {
3050
- set(c, a, p) {
3051
- const h = o ? `${o}.${String(a)}` : String(a);
3052
- return c[a] = n(p, h), i._initializing || (i._triggerWatchers(h, c[a]), fe(() => i._render(r), i._componentId)), !0;
3064
+ set(c, a, h) {
3065
+ const p = o ? `${o}.${String(a)}` : String(a);
3066
+ return c[a] = n(h, p), i._initializing || (i._triggerWatchers(p, c[a]), de(() => i._render(r), i._componentId)), !0;
3053
3067
  },
3054
- get(c, a, p) {
3055
- return Reflect.get(c, a, p);
3068
+ get(c, a, h) {
3069
+ return Reflect.get(c, a, h);
3056
3070
  }
3057
3071
  })) : s;
3058
3072
  };
@@ -3073,7 +3087,7 @@ function ir(e, t) {
3073
3087
  }
3074
3088
  _initWatchers(r) {
3075
3089
  this._runLogicWithinErrorBoundary(r, () => {
3076
- xt(
3090
+ vt(
3077
3091
  this.context,
3078
3092
  this._watchers,
3079
3093
  {}
@@ -3082,12 +3096,12 @@ function ir(e, t) {
3082
3096
  });
3083
3097
  }
3084
3098
  _triggerWatchers(r, n) {
3085
- vt(this.context, this._watchers, r, n);
3099
+ $t(this.context, this._watchers, r, n);
3086
3100
  }
3087
3101
  _applyProps(r) {
3088
3102
  this._runLogicWithinErrorBoundary(r, () => {
3089
3103
  try {
3090
- kt(this, r, this.context);
3104
+ Ct(this, r, this.context);
3091
3105
  } catch (n) {
3092
3106
  this._hasError = !0, r.onError && r.onError(n, this.context);
3093
3107
  }
@@ -3095,8 +3109,8 @@ function ir(e, t) {
3095
3109
  }
3096
3110
  };
3097
3111
  }
3098
- function nt(e, t) {
3099
- let r = re(e);
3112
+ function st(e, t) {
3113
+ let r = ie(e);
3100
3114
  r.includes("-") || (r = `cer-${r}`);
3101
3115
  let n = {};
3102
3116
  if (typeof window < "u")
@@ -3105,150 +3119,150 @@ function nt(e, t) {
3105
3119
  let c = null;
3106
3120
  const a = o.indexOf("({");
3107
3121
  if (a !== -1) {
3108
- let p = 0, h = !1, b = null, g = !1, u = -1;
3109
- for (let f = a + 2; f < o.length; f++) {
3110
- const y = o[f];
3111
- if (g) {
3112
- g = !1;
3122
+ let h = 0, p = !1, x = null, m = !1, d = -1;
3123
+ for (let u = a + 2; u < o.length; u++) {
3124
+ const y = o[u];
3125
+ if (m) {
3126
+ m = !1;
3113
3127
  continue;
3114
3128
  }
3115
3129
  if (y === "\\") {
3116
- g = !0;
3130
+ m = !0;
3117
3131
  continue;
3118
3132
  }
3119
- if (!h && (y === '"' || y === "'" || y === "`")) {
3120
- h = !0, b = y;
3133
+ if (!p && (y === '"' || y === "'" || y === "`")) {
3134
+ p = !0, x = y;
3121
3135
  continue;
3122
3136
  }
3123
- if (h && y === b) {
3124
- h = !1, b = null;
3137
+ if (p && y === x) {
3138
+ p = !1, x = null;
3125
3139
  continue;
3126
3140
  }
3127
- if (!h) {
3141
+ if (!p) {
3128
3142
  if (y === "{")
3129
- p++;
3143
+ h++;
3130
3144
  else if (y === "}") {
3131
- if (p === 0) {
3132
- u = f;
3145
+ if (h === 0) {
3146
+ d = u;
3133
3147
  break;
3134
3148
  }
3135
- p--;
3149
+ h--;
3136
3150
  }
3137
3151
  }
3138
3152
  }
3139
- if (u !== -1) {
3140
- const f = o.substring(a, u + 2), y = o.substring(a + 2, u).trim();
3141
- c = [f, y];
3153
+ if (d !== -1) {
3154
+ const u = o.substring(a, d + 2), y = o.substring(a + 2, d).trim();
3155
+ c = [u, y];
3142
3156
  }
3143
3157
  }
3144
3158
  if (c) {
3145
- const p = c[1];
3146
- let h = "", b = "", g = !0, u = 0, f = null, y = !1, x = 0;
3147
- for (; x < p.length; ) {
3148
- const l = p[x];
3159
+ const h = c[1];
3160
+ let p = "", x = "", m = !0, d = 0, u = null, y = !1, w = 0;
3161
+ for (; w < h.length; ) {
3162
+ const l = h[w];
3149
3163
  if (y) {
3150
- g ? h += l : b += l, y = !1, x++;
3164
+ m ? p += l : x += l, y = !1, w++;
3151
3165
  continue;
3152
3166
  }
3153
3167
  if (l === "\\") {
3154
- y = !0, g ? h += l : b += l, x++;
3168
+ y = !0, m ? p += l : x += l, w++;
3155
3169
  continue;
3156
3170
  }
3157
- if ((l === '"' || l === "'" || l === "`") && !f) {
3158
- f = l, g ? h += l : b += l, x++;
3171
+ if ((l === '"' || l === "'" || l === "`") && !u) {
3172
+ u = l, m ? p += l : x += l, w++;
3159
3173
  continue;
3160
3174
  }
3161
- if (l === f) {
3162
- f = null, g ? h += l : b += l, x++;
3175
+ if (l === u) {
3176
+ u = null, m ? p += l : x += l, w++;
3163
3177
  continue;
3164
3178
  }
3165
- if (f) {
3166
- g ? h += l : b += l, x++;
3179
+ if (u) {
3180
+ m ? p += l : x += l, w++;
3167
3181
  continue;
3168
3182
  }
3169
3183
  if (l === "{" || l === "[") {
3170
- u++, g ? h += l : b += l, x++;
3184
+ d++, m ? p += l : x += l, w++;
3171
3185
  continue;
3172
3186
  }
3173
3187
  if (l === "}" || l === "]") {
3174
- u--, g ? h += l : b += l, x++;
3188
+ d--, m ? p += l : x += l, w++;
3175
3189
  continue;
3176
3190
  }
3177
- if (l === "=" && u === 0 && g) {
3178
- g = !1, x++;
3191
+ if (l === "=" && d === 0 && m) {
3192
+ m = !1, w++;
3179
3193
  continue;
3180
3194
  }
3181
- if (l === "," && u === 0) {
3182
- if (h.trim() && b.trim()) {
3183
- const d = h.trim(), w = b.trim();
3195
+ if (l === "," && d === 0) {
3196
+ if (p.trim() && x.trim()) {
3197
+ const f = p.trim(), b = x.trim();
3184
3198
  try {
3185
- if (w === "true") n[d] = !0;
3186
- else if (w === "false") n[d] = !1;
3187
- else if (w === "[]") n[d] = [];
3188
- else if (w === "{}") n[d] = {};
3189
- else if (/^\d+$/.test(w))
3190
- n[d] = parseInt(w);
3191
- else if (/^'.*'$/s.test(w))
3192
- n[d] = w.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3193
- else if (/^".*"$/s.test(w))
3194
- n[d] = w.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3195
- else if (/^`.*`$/s.test(w)) {
3196
- const k = w.slice(1, -1);
3199
+ if (b === "true") n[f] = !0;
3200
+ else if (b === "false") n[f] = !1;
3201
+ else if (b === "[]") n[f] = [];
3202
+ else if (b === "{}") n[f] = {};
3203
+ else if (/^\d+$/.test(b))
3204
+ n[f] = parseInt(b);
3205
+ else if (/^'.*'$/s.test(b))
3206
+ n[f] = b.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3207
+ else if (/^".*"$/s.test(b))
3208
+ n[f] = b.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3209
+ else if (/^`.*`$/s.test(b)) {
3210
+ const k = b.slice(1, -1);
3197
3211
  if (k.includes("${"))
3198
3212
  try {
3199
- n[d] = new Function(
3213
+ n[f] = new Function(
3200
3214
  `return \`${k}\`;`
3201
3215
  )();
3202
3216
  } catch {
3203
- n[d] = k;
3217
+ n[f] = k;
3204
3218
  }
3205
3219
  else
3206
- n[d] = k;
3220
+ n[f] = k;
3207
3221
  } else
3208
- n[d] = w;
3222
+ n[f] = b;
3209
3223
  } catch {
3210
- n[d] = "";
3224
+ n[f] = "";
3211
3225
  }
3212
- } else if (h.trim()) {
3213
- const d = h.split(":")[0].trim();
3214
- d && !d.includes("}") && (n[d] = "");
3226
+ } else if (p.trim()) {
3227
+ const f = p.split(":")[0].trim();
3228
+ f && !f.includes("}") && (n[f] = "");
3215
3229
  }
3216
- h = "", b = "", g = !0, x++;
3230
+ p = "", x = "", m = !0, w++;
3217
3231
  continue;
3218
3232
  }
3219
- g ? h += l : b += l, x++;
3233
+ m ? p += l : x += l, w++;
3220
3234
  }
3221
- if (h.trim() && b.trim()) {
3222
- const l = h.trim(), d = b.trim();
3235
+ if (p.trim() && x.trim()) {
3236
+ const l = p.trim(), f = x.trim();
3223
3237
  try {
3224
- if (d === "true") n[l] = !0;
3225
- else if (d === "false") n[l] = !1;
3226
- else if (d === "[]") n[l] = [];
3227
- else if (d === "{}") n[l] = {};
3228
- else if (/^\d+$/.test(d)) n[l] = parseInt(d);
3229
- else if (/^'.*'$/s.test(d))
3230
- n[l] = d.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3231
- else if (/^".*"$/s.test(d))
3232
- n[l] = d.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3233
- else if (/^`.*`$/s.test(d)) {
3234
- const w = d.slice(1, -1);
3235
- if (w.includes("${"))
3238
+ if (f === "true") n[l] = !0;
3239
+ else if (f === "false") n[l] = !1;
3240
+ else if (f === "[]") n[l] = [];
3241
+ else if (f === "{}") n[l] = {};
3242
+ else if (/^\d+$/.test(f)) n[l] = parseInt(f);
3243
+ else if (/^'.*'$/s.test(f))
3244
+ n[l] = f.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3245
+ else if (/^".*"$/s.test(f))
3246
+ n[l] = f.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3247
+ else if (/^`.*`$/s.test(f)) {
3248
+ const b = f.slice(1, -1);
3249
+ if (b.includes("${"))
3236
3250
  try {
3237
3251
  n[l] = new Function(
3238
- `return \`${w}\`;`
3252
+ `return \`${b}\`;`
3239
3253
  )();
3240
3254
  } catch {
3241
- n[l] = w;
3255
+ n[l] = b;
3242
3256
  }
3243
3257
  else
3244
- n[l] = w;
3258
+ n[l] = b;
3245
3259
  } else
3246
- n[l] = d;
3260
+ n[l] = f;
3247
3261
  } catch {
3248
3262
  n[l] = "";
3249
3263
  }
3250
- } else if (h.trim()) {
3251
- const l = h.split(":")[0].trim();
3264
+ } else if (p.trim()) {
3265
+ const l = p.split(":")[0].trim();
3252
3266
  l && !l.includes("}") && (n[l] = "");
3253
3267
  }
3254
3268
  }
@@ -3267,7 +3281,7 @@ function nt(e, t) {
3267
3281
  onDisconnected: (o) => {
3268
3282
  i.onDisconnected && i.onDisconnected();
3269
3283
  },
3270
- onAttributeChanged: (o, c, a, p) => {
3284
+ onAttributeChanged: (o, c, a, h) => {
3271
3285
  i.onAttributeChanged && i.onAttributeChanged(o, c, a);
3272
3286
  },
3273
3287
  onError: (o, c) => {
@@ -3281,26 +3295,26 @@ function nt(e, t) {
3281
3295
  try {
3282
3296
  rr(o);
3283
3297
  const a = Object.keys(n).length > 0;
3284
- let p;
3298
+ let h;
3285
3299
  if (a) {
3286
- const h = {};
3287
- Object.keys(n).forEach((b) => {
3288
- const g = o[b], u = n[b];
3289
- h[b] = g != null && g !== "" ? g : u;
3290
- }), p = t(h);
3300
+ const p = {};
3301
+ Object.keys(n).forEach((x) => {
3302
+ const m = o[x], d = n[x];
3303
+ p[x] = m != null && m !== "" ? m : d;
3304
+ }), h = t(p);
3291
3305
  } else
3292
- p = t();
3306
+ h = t();
3293
3307
  if (o._hookCallbacks) {
3294
- const h = o._hookCallbacks;
3295
- h.onConnected && (i.onConnected = h.onConnected), h.onDisconnected && (i.onDisconnected = h.onDisconnected), h.onAttributeChanged && (i.onAttributeChanged = h.onAttributeChanged), h.onError && (i.onError = h.onError), h.style && (o._styleCallback = h.style);
3308
+ const p = o._hookCallbacks;
3309
+ p.onConnected && (i.onConnected = p.onConnected), p.onDisconnected && (i.onDisconnected = p.onDisconnected), p.onAttributeChanged && (i.onAttributeChanged = p.onAttributeChanged), p.onError && (i.onError = p.onError), p.style && (o._styleCallback = p.style);
3296
3310
  }
3297
- return p;
3311
+ return h;
3298
3312
  } finally {
3299
3313
  nr(), F.clearCurrentComponent();
3300
3314
  }
3301
3315
  }
3302
3316
  };
3303
- Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
3317
+ Re.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
3304
3318
  r,
3305
3319
  ir(r, s)
3306
3320
  ));
@@ -3329,7 +3343,7 @@ class sr {
3329
3343
  this.map.clear();
3330
3344
  }
3331
3345
  }
3332
- const ze = new sr(500);
3346
+ const Ue = new sr(500);
3333
3347
  function or(e, t) {
3334
3348
  if (e == null) {
3335
3349
  console.warn(
@@ -3347,11 +3361,11 @@ function me(e, t = {}, r, n) {
3347
3361
  const i = n ?? t.key;
3348
3362
  return { tag: e, key: i, props: t, children: r };
3349
3363
  }
3350
- function Oe(e) {
3364
+ function Te(e) {
3351
3365
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
3352
3366
  }
3353
- function Ee(e) {
3354
- return typeof e == "object" && e !== null && "tag" in e && !Oe(e);
3367
+ function Se(e) {
3368
+ return typeof e == "object" && e !== null && "tag" in e && !Te(e);
3355
3369
  }
3356
3370
  function ar(e, t) {
3357
3371
  return e.key != null ? e : { ...e, key: t };
@@ -3360,98 +3374,98 @@ function cr(e, t = [], r = {}) {
3360
3374
  const n = {}, i = {}, s = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3361
3375
  let a;
3362
3376
  for (; a = c.exec(e); ) {
3363
- const p = a[1], h = a[2], b = (a[4] || a[6]) ?? "", g = b.match(/^{{(\d+)}}$/);
3364
- let u = g ? t[Number(g[1])] ?? null : b;
3365
- g || (u === "true" ? u = !0 : u === "false" ? u = !1 : u === "null" ? u = null : isNaN(Number(u)) || (u = Number(u)));
3366
- const f = ["model", "bind", "show", "class", "style", "ref"];
3367
- if (p === ":") {
3368
- const [y, x] = h.split(":"), [l, ...d] = y.split(".");
3369
- if (f.includes(l)) {
3370
- const w = [...d], k = l === "model" && x ? `model:${x}` : l;
3377
+ const h = a[1], p = a[2], x = (a[4] || a[6]) ?? "", m = x.match(/^{{(\d+)}}$/);
3378
+ let d = m ? t[Number(m[1])] ?? null : x;
3379
+ m || (d === "true" ? d = !0 : d === "false" ? d = !1 : d === "null" ? d = null : isNaN(Number(d)) || (d = Number(d)));
3380
+ const u = ["model", "bind", "show", "class", "style", "ref"];
3381
+ if (h === ":") {
3382
+ const [y, w] = p.split(":"), [l, ...f] = y.split(".");
3383
+ if (u.includes(l)) {
3384
+ const b = [...f], k = l === "model" && w ? `model:${w}` : l;
3371
3385
  s[k] = {
3372
- value: u,
3373
- modifiers: w,
3374
- arg: x
3386
+ value: d,
3387
+ modifiers: b,
3388
+ arg: w
3375
3389
  };
3376
3390
  } else {
3377
- let w = u;
3378
- w && ee(w) && (w = w.value), i[h] = w, o.push(h);
3391
+ let b = d;
3392
+ b && ee(b) && (b = b.value), i[p] = b, o.push(p);
3379
3393
  }
3380
- } else if (p === "@") {
3381
- const [y, ...x] = h.split("."), l = x;
3382
- or(u, y);
3383
- const d = typeof u == "function" ? u : typeof r[u] == "function" ? r[u] : void 0;
3384
- if (d) {
3385
- const w = (C) => {
3394
+ } else if (h === "@") {
3395
+ const [y, ...w] = p.split("."), l = w;
3396
+ or(d, y);
3397
+ const f = typeof d == "function" ? d : typeof r[d] == "function" ? r[d] : void 0;
3398
+ if (f) {
3399
+ const b = (C) => {
3386
3400
  if (l.includes("prevent") && C.preventDefault(), l.includes("stop") && C.stopPropagation(), !(l.includes("self") && C.target !== C.currentTarget))
3387
- return l.includes("once") && C.currentTarget?.removeEventListener(y, w), d(C);
3401
+ return l.includes("once") && C.currentTarget?.removeEventListener(y, b), f(C);
3388
3402
  }, k = "on" + y.charAt(0).toUpperCase() + y.slice(1);
3389
- n[k] = w;
3403
+ n[k] = b;
3390
3404
  }
3391
- } else h === "ref" ? n.ref = u : i[h] = u;
3405
+ } else p === "ref" ? n.ref = d : i[p] = d;
3392
3406
  }
3393
3407
  return { props: n, attrs: i, directives: s, bound: o };
3394
3408
  }
3395
3409
  function lr(e, t, r) {
3396
3410
  const n = be.length > 0 ? be[be.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3397
3411
  if (s && o) {
3398
- const m = ze.get(o);
3399
- if (m) return m;
3412
+ const g = Ue.get(o);
3413
+ if (g) return g;
3400
3414
  }
3401
- function c(m, $) {
3402
- return me("#text", {}, m, $);
3415
+ function c(g, $) {
3416
+ return me("#text", {}, g, $);
3403
3417
  }
3404
3418
  let a = "";
3405
- for (let m = 0; m < e.length; m++)
3406
- a += e[m], m < t.length && (a += `{{${m}}}`);
3407
- const p = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, h = [];
3408
- let b, g = [], u = null, f = {}, y, x = 0, l = [];
3409
- function d(m) {
3410
- !m || typeof m != "object" || Oe(m) || (m.props || m.attrs ? (m.props && (f.props || (f.props = {}), Object.assign(f.props, m.props)), m.attrs && (f.attrs || (f.attrs = {}), Object.keys(m.attrs).forEach(($) => {
3411
- if ($ === "style" && f.attrs.style) {
3412
- const S = f.attrs.style.replace(
3419
+ for (let g = 0; g < e.length; g++)
3420
+ a += e[g], g < t.length && (a += `{{${g}}}`);
3421
+ const h = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, p = [];
3422
+ let x, m = [], d = null, u = {}, y, w = 0, l = [];
3423
+ function f(g) {
3424
+ !g || typeof g != "object" || Te(g) || (g.props || g.attrs ? (g.props && (u.props || (u.props = {}), Object.assign(u.props, g.props)), g.attrs && (u.attrs || (u.attrs = {}), Object.keys(g.attrs).forEach(($) => {
3425
+ if ($ === "style" && u.attrs.style) {
3426
+ const j = u.attrs.style.replace(
3413
3427
  /;?\s*$/,
3414
3428
  ""
3415
- ), v = m.attrs.style.replace(/^;?\s*/, "");
3416
- f.attrs.style = S + "; " + v;
3417
- } else if ($ === "class" && f.attrs.class) {
3418
- const S = f.attrs.class.trim().split(/\s+/).filter(Boolean), v = m.attrs.class.trim().split(/\s+/).filter(Boolean), A = [
3419
- .../* @__PURE__ */ new Set([...S, ...v])
3429
+ ), v = g.attrs.style.replace(/^;?\s*/, "");
3430
+ u.attrs.style = j + "; " + v;
3431
+ } else if ($ === "class" && u.attrs.class) {
3432
+ const j = u.attrs.class.trim().split(/\s+/).filter(Boolean), v = g.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
3433
+ .../* @__PURE__ */ new Set([...j, ...v])
3420
3434
  ];
3421
- f.attrs.class = A.join(" ");
3435
+ u.attrs.class = _.join(" ");
3422
3436
  } else
3423
- f.attrs[$] = m.attrs[$];
3424
- }))) : (f.props || (f.props = {}), Object.assign(f.props, m)));
3425
- }
3426
- function w(m, $) {
3427
- const S = u ? g : l;
3428
- if (Oe(m)) {
3429
- const v = m.key ?? $;
3430
- let A = m.children;
3431
- S.push({
3432
- ...m,
3437
+ u.attrs[$] = g.attrs[$];
3438
+ }))) : (u.props || (u.props = {}), Object.assign(u.props, g)));
3439
+ }
3440
+ function b(g, $) {
3441
+ const j = d ? m : l;
3442
+ if (Te(g)) {
3443
+ const v = g.key ?? $;
3444
+ let _ = g.children;
3445
+ j.push({
3446
+ ...g,
3433
3447
  key: v,
3434
- children: A
3448
+ children: _
3435
3449
  });
3436
3450
  return;
3437
3451
  }
3438
- if (Ee(m)) {
3439
- S.push(ar(m, void 0));
3452
+ if (Se(g)) {
3453
+ j.push(ar(g, void 0));
3440
3454
  return;
3441
3455
  }
3442
- if (Array.isArray(m)) {
3443
- if (m.length === 0) return;
3444
- for (let v = 0; v < m.length; v++) {
3445
- const A = m[v];
3446
- Oe(A) || Ee(A) || Array.isArray(A) ? w(A, `${$}-${v}`) : A !== null && typeof A == "object" ? d(A) : S.push(c(String(A), `${$}-${v}`));
3456
+ if (Array.isArray(g)) {
3457
+ if (g.length === 0) return;
3458
+ for (let v = 0; v < g.length; v++) {
3459
+ const _ = g[v];
3460
+ Te(_) || Se(_) || Array.isArray(_) ? b(_, `${$}-${v}`) : _ !== null && typeof _ == "object" ? f(_) : j.push(c(String(_), `${$}-${v}`));
3447
3461
  }
3448
3462
  return;
3449
3463
  }
3450
- if (m !== null && typeof m == "object") {
3451
- d(m);
3464
+ if (g !== null && typeof g == "object") {
3465
+ f(g);
3452
3466
  return;
3453
3467
  }
3454
- S.push(c(String(m), $));
3468
+ j.push(c(String(g), $));
3455
3469
  }
3456
3470
  const k = /* @__PURE__ */ new Set([
3457
3471
  "area",
@@ -3469,20 +3483,20 @@ function lr(e, t, r) {
3469
3483
  "track",
3470
3484
  "wbr"
3471
3485
  ]);
3472
- for (; b = p.exec(a); )
3473
- if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
3474
- if (b[1]) {
3475
- const m = b[1], $ = b[0][1] === "/", S = b[0][b[0].length - 2] === "/" || k.has(m), {
3486
+ for (; x = h.exec(a); )
3487
+ if (!(x[0].startsWith("<!--") && x[0].endsWith("-->"))) {
3488
+ if (x[1]) {
3489
+ const g = x[1], $ = x[0][1] === "/", j = x[0][x[0].length - 2] === "/" || k.has(g), {
3476
3490
  props: v,
3477
- attrs: A,
3478
- directives: j,
3479
- bound: N
3480
- } = cr(b[2] || "", t, i), E = { props: {}, attrs: {} };
3481
- for (const O in v) E.props[O] = v[O];
3482
- for (const O in A) E.attrs[O] = A[O];
3483
- if (E.attrs && Object.prototype.hasOwnProperty.call(E.attrs, "key") && !(E.props && Object.prototype.hasOwnProperty.call(E.props, "key")))
3491
+ attrs: _,
3492
+ directives: A,
3493
+ bound: D
3494
+ } = cr(x[2] || "", t, i), S = { props: {}, attrs: {} };
3495
+ for (const O in v) S.props[O] = v[O];
3496
+ for (const O in _) S.attrs[O] = _[O];
3497
+ if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
3484
3498
  try {
3485
- E.props.key = E.attrs.key;
3499
+ S.props.key = S.attrs.key;
3486
3500
  } catch {
3487
3501
  }
3488
3502
  try {
@@ -3495,108 +3509,108 @@ function lr(e, t, r) {
3495
3509
  audio: ["muted", "autoplay", "controls", "loop"],
3496
3510
  img: ["src", "alt", "width", "height"],
3497
3511
  button: ["type", "name", "value", "disabled", "autofocus", "form"]
3498
- }, H = m.toLowerCase(), he = O[H] ?? [];
3499
- if (E.attrs) {
3500
- for (const K of he)
3501
- if (N && N.includes(K) && K in E.attrs && !(E.props && K in E.props)) {
3502
- let I = E.attrs[K];
3503
- I && ee(I) && (I = I.value), E.props[K] = I, delete E.attrs[K];
3512
+ }, H = g.toLowerCase(), te = O[H] ?? [];
3513
+ if (S.attrs) {
3514
+ for (const N of te)
3515
+ if (D && D.includes(N) && N in S.attrs && !(S.props && N in S.props)) {
3516
+ let W = S.attrs[N];
3517
+ W && ee(W) && (W = W.value), S.props[N] = W, delete S.attrs[N];
3504
3518
  }
3505
3519
  }
3506
- if ((m.includes("-") || !!i?.__customElements?.has?.(m)) && (E.isCustomElement = !0, N && E.attrs)) {
3507
- const K = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3508
- for (const I of N)
3509
- if (I in E.attrs && !(E.props && I in E.props)) {
3510
- const V = I.includes("-") ? I.split("-").map((ne, R) => R === 0 ? ne : ne.charAt(0).toUpperCase() + ne.slice(1)).join("") : I;
3511
- let U = E.attrs[I];
3512
- U && ee(U) && (U = U.value), E.props[V] = U, K.has(I) || delete E.attrs[I];
3520
+ if ((g.includes("-") || !!i?.__customElements?.has?.(g)) && (S.isCustomElement = !0, D && S.attrs)) {
3521
+ const N = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3522
+ for (const W of D)
3523
+ if (W in S.attrs && !(S.props && W in S.props)) {
3524
+ const V = W.includes("-") ? W.split("-").map((G, I) => I === 0 ? G : G.charAt(0).toUpperCase() + G.slice(1)).join("") : W;
3525
+ let K = S.attrs[W];
3526
+ K && ee(K) && (K = K.value), S.props[V] = K, N.has(W) || delete S.attrs[W];
3513
3527
  }
3514
3528
  }
3515
3529
  } catch {
3516
3530
  }
3517
- if (j && Object.keys(j).some((O) => O === "model" || O.startsWith("model:")))
3531
+ if (A && Object.keys(A).some((O) => O === "model" || O.startsWith("model:")))
3518
3532
  try {
3519
- const O = Symbol.for("cer.registry"), H = globalThis[O], he = !!(H && typeof H.has == "function" && H.has(m)), G = !!(i && (i.__customElements instanceof Set && i.__customElements.has(m) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(m)));
3520
- if (!!(m.includes("-") || G || he))
3521
- for (const V of Object.keys(j)) {
3533
+ const O = Symbol.for("cer.registry"), H = globalThis[O], te = !!(H && typeof H.has == "function" && H.has(g)), $e = !!(i && (i.__customElements instanceof Set && i.__customElements.has(g) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(g)));
3534
+ if (!!(g.includes("-") || $e || te))
3535
+ for (const V of Object.keys(A)) {
3522
3536
  if (V !== "model" && !V.startsWith("model:")) continue;
3523
- const U = j[V], ne = U.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), R = U.value, X = ne ?? "modelValue", _ = B, L = Se, M = i ? i._state || i : void 0;
3524
- let T;
3525
- typeof R == "string" && i ? T = _(M, R) : (T = R, T && ee(T) && (T = T.value)), E.props[X] = T;
3537
+ const K = A[V], G = K.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), I = K.value, X = G ?? "modelValue", re = U, E = Ae, T = i ? i._state || i : void 0;
3538
+ let R;
3539
+ typeof I == "string" && i ? R = re(T, I) : (R = I, R && ee(R) && (R = R.value)), S.props[X] = R;
3526
3540
  try {
3527
- const ie = re(X);
3528
- E.attrs || (E.attrs = {}), T !== void 0 && (E.attrs[ie] = T);
3541
+ const se = ie(X);
3542
+ S.attrs || (S.attrs = {}), R !== void 0 && (S.attrs[se] = R);
3529
3543
  } catch {
3530
3544
  }
3531
- E.isCustomElement = !0;
3532
- const z = `update:${re(X)}`.replace(/-([a-z])/g, (ie, Q) => Q.toUpperCase()), pt = "on" + z.charAt(0).toUpperCase() + z.slice(1);
3533
- E.props[pt] = function(ie) {
3534
- const Q = ie.detail !== void 0 ? ie.detail : ie.target ? ie.target.value : void 0;
3535
- if (M)
3536
- if (R && ee(R)) {
3537
- const ae = R.value;
3538
- (Array.isArray(Q) && Array.isArray(ae) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ae].sort()) : Q !== ae) && (R.value = Q, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3545
+ S.isCustomElement = !0;
3546
+ const L = `update:${ie(X)}`.replace(/-([a-z])/g, (se, Q) => Q.toUpperCase()), z = "on" + L.charAt(0).toUpperCase() + L.slice(1);
3547
+ S.props[z] = function(se) {
3548
+ const Q = se.detail !== void 0 ? se.detail : se.target ? se.target.value : void 0;
3549
+ if (T)
3550
+ if (I && ee(I)) {
3551
+ const ce = I.value;
3552
+ (Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (I.value = Q, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3539
3553
  } else {
3540
- const ae = _(M, typeof R == "string" ? R : String(R));
3541
- (Array.isArray(Q) && Array.isArray(ae) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ae].sort()) : Q !== ae) && (L(M, typeof R == "string" ? R : String(R), Q), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3554
+ const ce = re(T, typeof I == "string" ? I : String(I));
3555
+ (Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (E(T, typeof I == "string" ? I : String(I), Q), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3542
3556
  }
3543
- }, delete j[V];
3557
+ }, delete A[V];
3544
3558
  }
3545
3559
  } catch {
3546
3560
  }
3547
- if (Object.keys(j).length > 0 && (E.directives = { ...j }), $) {
3561
+ if (Object.keys(A).length > 0 && (S.directives = { ...A }), $) {
3548
3562
  const O = me(
3563
+ d,
3549
3564
  u,
3550
- f,
3551
- g.length === 1 && Ee(g[0]) && g[0].tag === "#text" ? typeof g[0].children == "string" ? g[0].children : "" : g.length ? g : void 0,
3565
+ m.length === 1 && Se(m[0]) && m[0].tag === "#text" ? typeof m[0].children == "string" ? m[0].children : "" : m.length ? m : void 0,
3552
3566
  y
3553
- ), H = h.pop();
3554
- H ? (u = H.tag, f = H.props, y = H.key, g = H.children, g.push(O)) : (l.push(O), u = null, f = {}, y = void 0, g = []);
3555
- } else S ? u ? g.push(me(m, E, void 0, void 0)) : l.push(me(m, E, void 0, void 0)) : (u && h.push({
3556
- tag: u,
3557
- props: f,
3558
- children: g,
3567
+ ), H = p.pop();
3568
+ H ? (d = H.tag, u = H.props, y = H.key, m = H.children, m.push(O)) : (l.push(O), d = null, u = {}, y = void 0, m = []);
3569
+ } else j ? d ? m.push(me(g, S, void 0, void 0)) : l.push(me(g, S, void 0, void 0)) : (d && p.push({
3570
+ tag: d,
3571
+ props: u,
3572
+ children: m,
3559
3573
  key: y
3560
- }), u = m, f = E, g = []);
3561
- } else if (typeof b[3] < "u") {
3562
- const m = Number(b[3]), $ = t[m], S = `interp-${m}`;
3563
- w($, S);
3564
- } else if (b[4]) {
3565
- const m = b[4], $ = u ? g : l, S = m.split(/({{\d+}})/);
3566
- for (const v of S) {
3574
+ }), d = g, u = S, m = []);
3575
+ } else if (typeof x[3] < "u") {
3576
+ const g = Number(x[3]), $ = t[g], j = `interp-${g}`;
3577
+ b($, j);
3578
+ } else if (x[4]) {
3579
+ const g = x[4], $ = d ? m : l, j = g.split(/({{\d+}})/);
3580
+ for (const v of j) {
3567
3581
  if (!v) continue;
3568
- const A = v.match(/^{{(\d+)}}$/);
3569
- if (A) {
3570
- const j = Number(A[1]), N = t[j], E = `interp-${j}`;
3571
- w(N, E);
3582
+ const _ = v.match(/^{{(\d+)}}$/);
3583
+ if (_) {
3584
+ const A = Number(_[1]), D = t[A], S = `interp-${A}`;
3585
+ b(D, S);
3572
3586
  } else {
3573
- const j = `text-${x++}`;
3574
- $.push(c(v, j));
3587
+ const A = `text-${w++}`;
3588
+ $.push(c(v, A));
3575
3589
  }
3576
3590
  }
3577
3591
  }
3578
3592
  }
3579
- const C = l.filter((m) => Ee(m) && m.tag === "#text" ? typeof m.children == "string" && m.children.trim() !== "" : !0);
3593
+ const C = l.filter((g) => Se(g) && g.tag === "#text" ? typeof g.children == "string" && g.children.trim() !== "" : !0);
3580
3594
  if (C.length === 1) {
3581
- const m = C[0];
3582
- return s && o && ze.set(o, m), m;
3595
+ const g = C[0];
3596
+ return s && o && Ue.set(o, g), g;
3583
3597
  } else if (C.length > 1) {
3584
- const m = C;
3585
- return s && o && ze.set(o, m), m;
3598
+ const g = C;
3599
+ return s && o && Ue.set(o, g), g;
3586
3600
  }
3587
3601
  return me("div", {}, "", "fallback-root");
3588
3602
  }
3589
- function ce(e, ...t) {
3603
+ function le(e, ...t) {
3590
3604
  const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3591
3605
  return lr(e, t, n);
3592
3606
  }
3593
- function Re(e, t) {
3594
- return W(e ? t : [], "when-block");
3607
+ function Le(e, t) {
3608
+ return P(e ? t : [], "when-block");
3595
3609
  }
3596
3610
  function Cr(e, t) {
3597
3611
  return e.map((r, n) => {
3598
3612
  const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
3599
- return W(t(r, n), `each-${i}`);
3613
+ return P(t(r, n), `each-${i}`);
3600
3614
  });
3601
3615
  }
3602
3616
  function ur() {
@@ -3616,11 +3630,11 @@ function ur() {
3616
3630
  function fr(...e) {
3617
3631
  for (let t = 0; t < e.length; t++) {
3618
3632
  const [r, n] = e[t];
3619
- if (r) return [W(n, `whenChain-branch-${t}`)];
3633
+ if (r) return [P(n, `whenChain-branch-${t}`)];
3620
3634
  }
3621
- return [W([], "whenChain-empty")];
3635
+ return [P([], "whenChain-empty")];
3622
3636
  }
3623
- function W(e, t) {
3637
+ function P(e, t) {
3624
3638
  const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
3625
3639
  return {
3626
3640
  tag: "#anchor",
@@ -3629,15 +3643,15 @@ function W(e, t) {
3629
3643
  };
3630
3644
  }
3631
3645
  function _r(e, t) {
3632
- return Re(!e, t);
3646
+ return Le(!e, t);
3633
3647
  }
3634
3648
  function Er(e, t) {
3635
3649
  const r = !e || e.length === 0;
3636
- return Re(r, t);
3650
+ return Le(r, t);
3637
3651
  }
3638
3652
  function Sr(e, t) {
3639
3653
  const r = !!(e && e.length > 0);
3640
- return Re(r, t);
3654
+ return Le(r, t);
3641
3655
  }
3642
3656
  function Ar(e, t, r) {
3643
3657
  const n = [];
@@ -3645,19 +3659,19 @@ function Ar(e, t, r) {
3645
3659
  t(i, s) && n.push({ item: i, originalIndex: s });
3646
3660
  }), n.map(({ item: i, originalIndex: s }, o) => {
3647
3661
  const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
3648
- return W(r(i, s, o), `each-where-${c}`);
3662
+ return P(r(i, s, o), `each-where-${c}`);
3649
3663
  });
3650
3664
  }
3651
3665
  function jr(e, t) {
3652
3666
  const r = e?.length ?? 0;
3653
- return r === 0 && t.empty ? W(t.empty, "switch-length-empty") : r === 1 && t.one ? W(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? W(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? W(t.many(e), "switch-length-many") : W([], "switch-length-fallback");
3667
+ return r === 0 && t.empty ? P(t.empty, "switch-length-empty") : r === 1 && t.one ? P(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? P(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? P(t.many(e), "switch-length-many") : P([], "switch-length-fallback");
3654
3668
  }
3655
3669
  function Or(e, t, r) {
3656
3670
  const n = /* @__PURE__ */ new Map();
3657
3671
  return e.forEach((i) => {
3658
3672
  const s = t(i);
3659
3673
  n.has(s) || n.set(s, []), n.get(s).push(i);
3660
- }), Array.from(n.entries()).map(([i, s], o) => W(
3674
+ }), Array.from(n.entries()).map(([i, s], o) => P(
3661
3675
  r(i, s, o),
3662
3676
  `each-group-${i}`
3663
3677
  ));
@@ -3665,18 +3679,18 @@ function Or(e, t, r) {
3665
3679
  function Tr(e, t, r, n) {
3666
3680
  const i = r * t, s = Math.min(i + t, e.length);
3667
3681
  return e.slice(i, s).map((c, a) => {
3668
- const p = i + a, h = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${p}` : `page-${p}`;
3669
- return W(n(c, p, a), `each-page-${h}`);
3682
+ const h = i + a, p = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${h}` : `page-${h}`;
3683
+ return P(n(c, h, a), `each-page-${p}`);
3670
3684
  });
3671
3685
  }
3672
3686
  function Rr(e, t) {
3673
- return e.loading && t.loading ? W(t.loading, "promise-loading") : e.error && t.error ? W(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? W(t.success(e.data), "promise-success") : t.idle ? W(t.idle, "promise-idle") : W([], "promise-fallback");
3687
+ return e.loading && t.loading ? P(t.loading, "promise-loading") : e.error && t.error ? P(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? P(t.success(e.data), "promise-success") : t.idle ? P(t.idle, "promise-idle") : P([], "promise-fallback");
3674
3688
  }
3675
3689
  function q(e, t) {
3676
3690
  const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
3677
- return Re(!!r, t);
3691
+ return Le(!!r, t);
3678
3692
  }
3679
- const te = {
3693
+ const ne = {
3680
3694
  // Responsive breakpoints (matching style.ts)
3681
3695
  sm: "(min-width:640px)",
3682
3696
  md: "(min-width:768px)",
@@ -3685,15 +3699,15 @@ const te = {
3685
3699
  "2xl": "(min-width:1536px)",
3686
3700
  // Dark mode (matching style.ts)
3687
3701
  dark: "(prefers-color-scheme: dark)"
3688
- }, ht = ["sm", "md", "lg", "xl", "2xl"], dr = {
3702
+ }, gt = ["sm", "md", "lg", "xl", "2xl"], dr = {
3689
3703
  // Breakpoint-based rendering (matching style.ts exactly)
3690
- sm: (e) => q(te.sm, e),
3691
- md: (e) => q(te.md, e),
3692
- lg: (e) => q(te.lg, e),
3693
- xl: (e) => q(te.xl, e),
3694
- "2xl": (e) => q(te["2xl"], e),
3704
+ sm: (e) => q(ne.sm, e),
3705
+ md: (e) => q(ne.md, e),
3706
+ lg: (e) => q(ne.lg, e),
3707
+ xl: (e) => q(ne.xl, e),
3708
+ "2xl": (e) => q(ne["2xl"], e),
3695
3709
  // Dark mode (matching style.ts)
3696
- dark: (e) => q(te.dark, e),
3710
+ dark: (e) => q(ne.dark, e),
3697
3711
  light: (e) => q("(prefers-color-scheme: light)", e),
3698
3712
  // Accessibility and interaction preferences
3699
3713
  touch: (e) => q("(hover: none) and (pointer: coarse)", e),
@@ -3706,17 +3720,17 @@ const te = {
3706
3720
  };
3707
3721
  function Lr(e, t) {
3708
3722
  const r = [];
3709
- e.includes("dark") ? r.push(te.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3723
+ e.includes("dark") ? r.push(ne.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3710
3724
  const n = e.filter(
3711
- (o) => ht.includes(o)
3725
+ (o) => gt.includes(o)
3712
3726
  ), i = n[n.length - 1];
3713
- i && i in te && r.push(te[i]);
3727
+ i && i in ne && r.push(ne[i]);
3714
3728
  const s = r.length > 0 ? r.join(" and ") : "all";
3715
3729
  return q(s, t);
3716
3730
  }
3717
3731
  function Pr(e) {
3718
3732
  const t = [];
3719
- return e.base && t.push(W(e.base, "responsive-base")), ht.forEach((r) => {
3733
+ return e.base && t.push(P(e.base, "responsive-base")), gt.forEach((r) => {
3720
3734
  const n = e[r];
3721
3735
  n && t.push(dr[r](n));
3722
3736
  }), t;
@@ -3739,13 +3753,13 @@ function Mr(e) {
3739
3753
  for (let n = 0; n < t.length; n++) {
3740
3754
  const { condition: i, content: s } = t[n];
3741
3755
  if (i(e))
3742
- return W(s, `switch-case-${n}`);
3756
+ return P(s, `switch-case-${n}`);
3743
3757
  }
3744
- return W(r || [], "switch-otherwise");
3758
+ return P(r || [], "switch-otherwise");
3745
3759
  }
3746
3760
  };
3747
3761
  }
3748
- class de extends EventTarget {
3762
+ class pe extends EventTarget {
3749
3763
  handlers = {};
3750
3764
  static instance;
3751
3765
  eventCounters = /* @__PURE__ */ new Map();
@@ -3753,7 +3767,7 @@ class de extends EventTarget {
3753
3767
  * Returns the singleton instance of GlobalEventBus
3754
3768
  */
3755
3769
  static getInstance() {
3756
- return de.instance || (de.instance = new de()), de.instance;
3770
+ return pe.instance || (pe.instance = new pe()), pe.instance;
3757
3771
  }
3758
3772
  /**
3759
3773
  * Emit a global event with optional data. Includes event storm protection.
@@ -3777,7 +3791,7 @@ class de extends EventTarget {
3777
3791
  try {
3778
3792
  o(r);
3779
3793
  } catch (c) {
3780
- se(`Error in global event handler for "${t}":`, c);
3794
+ oe(`Error in global event handler for "${t}":`, c);
3781
3795
  }
3782
3796
  });
3783
3797
  }
@@ -3866,8 +3880,8 @@ class de extends EventTarget {
3866
3880
  this.eventCounters.clear();
3867
3881
  }
3868
3882
  }
3869
- const ve = de.getInstance(), Wr = (e, t) => ve.emit(e, t), Dr = (e, t) => ve.on(e, t), Ir = (e, t) => ve.off(e, t), Nr = (e, t) => ve.once(e, t), Hr = (e, t, r) => ve.listen(e, t, r);
3870
- function it(e) {
3883
+ const ve = pe.getInstance(), Wr = (e, t) => ve.emit(e, t), Dr = (e, t) => ve.on(e, t), Ir = (e, t) => ve.off(e, t), Nr = (e, t) => ve.once(e, t), Hr = (e, t, r) => ve.listen(e, t, r);
3884
+ function ot(e) {
3871
3885
  let t = { ...e };
3872
3886
  const r = [];
3873
3887
  function n(c) {
@@ -3885,264 +3899,264 @@ function it(e) {
3885
3899
  }
3886
3900
  return { subscribe: n, getState: i, setState: s };
3887
3901
  }
3888
- const st = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Y = (e, t) => {
3902
+ const at = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Y = (e, t) => {
3889
3903
  for (const r of e) {
3890
3904
  const n = [], i = r.path.replace(/:[^/]+/g, (c) => (n.push(c.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3891
3905
  if (o) {
3892
3906
  const c = {};
3893
- return n.forEach((a, p) => {
3894
- c[a] = o[p + 1];
3907
+ return n.forEach((a, h) => {
3908
+ c[a] = o[h + 1];
3895
3909
  }), { route: r, params: c };
3896
3910
  }
3897
3911
  }
3898
3912
  return { route: null, params: {} };
3899
- }, Be = {};
3900
- async function hr(e) {
3913
+ }, qe = {};
3914
+ async function pr(e) {
3901
3915
  if (e.component) return e.component;
3902
3916
  if (e.load) {
3903
- if (Be[e.path]) return Be[e.path];
3917
+ if (qe[e.path]) return qe[e.path];
3904
3918
  try {
3905
3919
  const t = await e.load();
3906
- return Be[e.path] = t.default, t.default;
3920
+ return qe[e.path] = t.default, t.default;
3907
3921
  } catch {
3908
3922
  throw new Error(`Failed to load component for route: ${e.path}`);
3909
3923
  }
3910
3924
  }
3911
3925
  throw new Error(`No component or loader defined for route: ${e.path}`);
3912
3926
  }
3913
- function pr(e) {
3927
+ function hr(e) {
3914
3928
  const { routes: t, base: r = "", initialUrl: n } = e;
3915
- let i, s, o, c, a, p, h;
3916
- const b = async (y, x) => {
3917
- const l = t.find((d) => Y([d], y.path).route !== null);
3929
+ let i, s, o, c, a, h, p;
3930
+ const x = async (y, w) => {
3931
+ const l = t.find((f) => Y([f], y.path).route !== null);
3918
3932
  if (l?.beforeEnter)
3919
3933
  try {
3920
- const d = await l.beforeEnter(y, x);
3921
- return typeof d == "string" ? (await f(d, !0), !1) : d !== !1;
3922
- } catch (d) {
3923
- return se("beforeEnter error", d), !1;
3934
+ const f = await l.beforeEnter(y, w);
3935
+ return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
3936
+ } catch (f) {
3937
+ return oe("beforeEnter error", f), !1;
3924
3938
  }
3925
3939
  return !0;
3926
- }, g = async (y, x) => {
3927
- const l = t.find((d) => Y([d], y.path).route !== null);
3940
+ }, m = async (y, w) => {
3941
+ const l = t.find((f) => Y([f], y.path).route !== null);
3928
3942
  if (l?.onEnter)
3929
3943
  try {
3930
- const d = await l.onEnter(y, x);
3931
- return typeof d == "string" ? (await f(d, !0), !1) : d !== !1;
3932
- } catch (d) {
3933
- return se("onEnter error", d), !1;
3944
+ const f = await l.onEnter(y, w);
3945
+ return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
3946
+ } catch (f) {
3947
+ return oe("onEnter error", f), !1;
3934
3948
  }
3935
3949
  return !0;
3936
- }, u = (y, x) => {
3937
- const l = t.find((d) => Y([d], y.path).route !== null);
3950
+ }, d = (y, w) => {
3951
+ const l = t.find((f) => Y([f], y.path).route !== null);
3938
3952
  if (l?.afterEnter)
3939
3953
  try {
3940
- l.afterEnter(y, x);
3941
- } catch (d) {
3942
- se("afterEnter error", d);
3954
+ l.afterEnter(y, w);
3955
+ } catch (f) {
3956
+ oe("afterEnter error", f);
3943
3957
  }
3944
- }, f = async (y, x = !1) => {
3958
+ }, u = async (y, w = !1) => {
3945
3959
  try {
3946
3960
  const l = {
3947
3961
  path: y.replace(r, "") || "/",
3948
3962
  query: {}
3949
- }, d = Y(t, l.path);
3950
- if (!d) throw new Error(`No route found for ${l.path}`);
3951
- const w = o.getState(), k = {
3963
+ }, f = Y(t, l.path);
3964
+ if (!f) throw new Error(`No route found for ${l.path}`);
3965
+ const b = o.getState(), k = {
3952
3966
  path: l.path,
3953
- params: d.params,
3967
+ params: f.params,
3954
3968
  query: l.query
3955
3969
  };
3956
- if (!await b(k, w) || !await g(k, w)) return;
3957
- typeof window < "u" && typeof document < "u" && (x ? window.history.replaceState({}, "", r + y) : window.history.pushState({}, "", r + y)), o.setState(k), u(k, w);
3970
+ if (!await x(k, b) || !await m(k, b)) return;
3971
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + y) : window.history.pushState({}, "", r + y)), o.setState(k), d(k, b);
3958
3972
  } catch (l) {
3959
- se("Navigation error:", l);
3973
+ oe("Navigation error:", l);
3960
3974
  }
3961
3975
  };
3962
3976
  if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
3963
3977
  i = () => {
3964
- const x = new URL(window.location.href), l = x.pathname.replace(r, "") || "/", d = st(x.search);
3965
- return { path: l, query: d };
3978
+ const w = new URL(window.location.href), l = w.pathname.replace(r, "") || "/", f = at(w.search);
3979
+ return { path: l, query: f };
3966
3980
  }, s = i();
3967
3981
  const y = Y(t, s.path);
3968
- o = it({
3982
+ o = ot({
3969
3983
  path: s.path,
3970
3984
  params: y.params,
3971
3985
  query: s.query
3972
- }), c = async (x = !1) => {
3986
+ }), c = async (w = !1) => {
3973
3987
  const l = i();
3974
- await f(l.path, x);
3975
- }, window.addEventListener("popstate", () => c(!0)), a = (x) => f(x, !1), p = (x) => f(x, !0), h = () => window.history.back();
3988
+ await u(l.path, w);
3989
+ }, window.addEventListener("popstate", () => c(!0)), a = (w) => u(w, !1), h = (w) => u(w, !0), p = () => window.history.back();
3976
3990
  } else {
3977
3991
  i = () => {
3978
- const l = new URL(n || "/", "http://localhost"), d = l.pathname.replace(r, "") || "/", w = st(l.search);
3979
- return { path: d, query: w };
3992
+ const l = new URL(n || "/", "http://localhost"), f = l.pathname.replace(r, "") || "/", b = at(l.search);
3993
+ return { path: f, query: b };
3980
3994
  }, s = i();
3981
3995
  const y = Y(t, s.path);
3982
- o = it({
3996
+ o = ot({
3983
3997
  path: s.path,
3984
3998
  params: y.params,
3985
3999
  query: s.query
3986
4000
  }), c = async () => {
3987
4001
  const l = i();
3988
- await x(l.path);
4002
+ await w(l.path);
3989
4003
  };
3990
- const x = async (l) => {
4004
+ const w = async (l) => {
3991
4005
  try {
3992
- const d = {
4006
+ const f = {
3993
4007
  path: l.replace(r, "") || "/",
3994
4008
  query: {}
3995
- }, w = Y(t, d.path);
3996
- if (!w) throw new Error(`No route found for ${d.path}`);
4009
+ }, b = Y(t, f.path);
4010
+ if (!b) throw new Error(`No route found for ${f.path}`);
3997
4011
  const k = o.getState(), C = {
3998
- path: d.path,
3999
- params: w.params,
4000
- query: d.query
4001
- }, m = t.find(($) => Y([$], C.path).route !== null);
4002
- if (m?.beforeEnter)
4012
+ path: f.path,
4013
+ params: b.params,
4014
+ query: f.query
4015
+ }, g = t.find(($) => Y([$], C.path).route !== null);
4016
+ if (g?.beforeEnter)
4003
4017
  try {
4004
- const $ = await m.beforeEnter(C, k);
4018
+ const $ = await g.beforeEnter(C, k);
4005
4019
  if (typeof $ == "string") {
4006
- await x($);
4020
+ await w($);
4007
4021
  return;
4008
4022
  }
4009
4023
  if ($ === !1) return;
4010
4024
  } catch {
4011
4025
  return;
4012
4026
  }
4013
- if (m?.onEnter)
4027
+ if (g?.onEnter)
4014
4028
  try {
4015
- const $ = await m.onEnter(C, k);
4029
+ const $ = await g.onEnter(C, k);
4016
4030
  if (typeof $ == "string") {
4017
- await x($);
4031
+ await w($);
4018
4032
  return;
4019
4033
  }
4020
4034
  if ($ === !1) return;
4021
4035
  } catch {
4022
4036
  return;
4023
4037
  }
4024
- if (o.setState(C), m?.afterEnter)
4038
+ if (o.setState(C), g?.afterEnter)
4025
4039
  try {
4026
- m.afterEnter(C, k);
4040
+ g.afterEnter(C, k);
4027
4041
  } catch {
4028
4042
  }
4029
4043
  } catch {
4030
4044
  }
4031
4045
  };
4032
- a = async (l) => x(l), p = async (l) => x(l), h = () => {
4046
+ a = async (l) => w(l), h = async (l) => w(l), p = () => {
4033
4047
  };
4034
4048
  }
4035
4049
  return {
4036
4050
  store: o,
4037
4051
  push: a,
4038
- replace: p,
4039
- back: h,
4052
+ replace: h,
4053
+ back: p,
4040
4054
  subscribe: o.subscribe,
4041
4055
  matchRoute: (y) => Y(t, y),
4042
4056
  getCurrent: () => o.getState(),
4043
- resolveRouteComponent: hr
4057
+ resolveRouteComponent: pr
4044
4058
  };
4045
4059
  }
4046
- function zr(e, t) {
4060
+ function Br(e, t) {
4047
4061
  return Y(e, t);
4048
4062
  }
4049
- function Br(e) {
4050
- const t = pr(e);
4051
- return nt("router-view", (r = {}, n = {}) => {
4063
+ function zr(e) {
4064
+ const t = hr(e);
4065
+ return st("router-view", (r = {}, n = {}) => {
4052
4066
  const { onConnected: i } = n;
4053
4067
  if (i && i(() => {
4054
4068
  t && typeof t.subscribe == "function" && t.subscribe(() => {
4055
4069
  });
4056
- }), !t) return ce`<div>Router not initialized.</div>`;
4070
+ }), !t) return le`<div>Router not initialized.</div>`;
4057
4071
  const s = t.getCurrent(), { path: o } = s, c = t.matchRoute(o);
4058
4072
  return c.route ? t.resolveRouteComponent(c.route).then((a) => {
4059
4073
  if (typeof a == "string")
4060
4074
  return { tag: a, props: {}, children: [] };
4061
4075
  if (typeof a == "function") {
4062
- const p = a();
4063
- return (p instanceof Promise ? p : Promise.resolve(p)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
4076
+ const h = a();
4077
+ return (h instanceof Promise ? h : Promise.resolve(h)).then((x) => typeof x == "string" ? { tag: x, props: {}, children: [] } : x);
4064
4078
  }
4065
- return ce`<div>Invalid route component</div>`;
4066
- }).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
4067
- }), nt("router-link", (r = {}, n = {}) => {
4079
+ return le`<div>Invalid route component</div>`;
4080
+ }).catch(() => le`<div>Invalid route component</div>`) : le`<div>Not found</div>`;
4081
+ }), st("router-link", (r = {}, n = {}) => {
4068
4082
  const {
4069
4083
  to: i = "",
4070
4084
  tag: s = "a",
4071
4085
  replace: o = !1,
4072
4086
  exact: c = !1,
4073
4087
  activeClass: a = "active",
4074
- exactActiveClass: p = "exact-active",
4075
- ariaCurrentValue: h = "page",
4076
- disabled: b = !1,
4077
- external: g = !1,
4078
- class: u = ""
4079
- } = r, f = t.getCurrent(), y = f.path === i, x = c ? y : f && typeof f.path == "string" ? f.path.startsWith(i) : !1, l = y ? `aria-current="${h}"` : "", d = (u || "").split(/\s+/).filter(Boolean), w = {};
4080
- for (const v of d) w[v] = !0;
4088
+ exactActiveClass: h = "exact-active",
4089
+ ariaCurrentValue: p = "page",
4090
+ disabled: x = !1,
4091
+ external: m = !1,
4092
+ class: d = ""
4093
+ } = r, u = t.getCurrent(), y = u.path === i, w = c ? y : u && typeof u.path == "string" ? u.path.startsWith(i) : !1, l = y ? `aria-current="${p}"` : "", f = (d || "").split(/\s+/).filter(Boolean), b = {};
4094
+ for (const v of f) b[v] = !0;
4081
4095
  const k = {
4082
- ...w,
4096
+ ...b,
4083
4097
  // Also include the configurable names (may duplicate the above)
4084
- [a]: x,
4085
- [p]: y
4086
- }, C = s === "button", m = b ? C ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", $ = g && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", S = (v) => {
4087
- if (b) {
4098
+ [a]: w,
4099
+ [h]: y
4100
+ }, C = s === "button", g = x ? C ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", $ = m && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", j = (v) => {
4101
+ if (x) {
4088
4102
  v.preventDefault();
4089
4103
  return;
4090
4104
  }
4091
- g && (s === "a" || !s) || (v.preventDefault(), o ? t.replace(i) : t.push(i));
4105
+ m && (s === "a" || !s) || (v.preventDefault(), o ? t.replace(i) : t.push(i));
4092
4106
  };
4093
- return ce`
4094
- ${ur().when(C, ce`
4107
+ return le`
4108
+ ${ur().when(C, le`
4095
4109
  <button
4096
4110
  part="button"
4097
4111
  :class="${k}"
4098
4112
  ${l}
4099
- ${m}
4113
+ ${g}
4100
4114
  ${$}
4101
- @click="${S}"
4115
+ @click="${j}"
4102
4116
  ><slot></slot></button>
4103
- `).otherwise(ce`
4117
+ `).otherwise(le`
4104
4118
  <a
4105
4119
  part="link"
4106
4120
  href="${i}"
4107
4121
  :class="${k}"
4108
4122
  ${l}
4109
- ${m}
4123
+ ${g}
4110
4124
  ${$}
4111
- @click="${S}"
4125
+ @click="${j}"
4112
4126
  ><slot></slot></a>
4113
4127
  `).done()}
4114
4128
  `;
4115
4129
  }), t;
4116
4130
  }
4117
4131
  export {
4118
- de as GlobalEventBus,
4119
- W as anchorBlock,
4120
- nt as component,
4132
+ pe as GlobalEventBus,
4133
+ P as anchorBlock,
4134
+ st as component,
4121
4135
  mr as computed,
4122
- it as createStore,
4123
- Wt as css,
4136
+ ot as createStore,
4137
+ Dt as css,
4124
4138
  Cr as each,
4125
4139
  Or as eachGroup,
4126
4140
  Tr as eachPage,
4127
4141
  Ar as eachWhere,
4128
4142
  Wr as emit,
4129
4143
  ve as eventBus,
4130
- ce as html,
4131
- Br as initRouter,
4144
+ le as html,
4145
+ zr as initRouter,
4132
4146
  Hr as listen,
4133
4147
  ur as match,
4134
4148
  Y as matchRoute,
4135
- zr as matchRouteSSR,
4136
- te as mediaVariants,
4149
+ Br as matchRouteSSR,
4150
+ ne as mediaVariants,
4137
4151
  Ir as off,
4138
4152
  Dr as on,
4139
4153
  Nr as once,
4140
- st as parseQuery,
4154
+ at as parseQuery,
4141
4155
  gr as ref,
4142
- Pe as renderToString,
4143
- hr as resolveRouteComponent,
4156
+ Me as renderToString,
4157
+ pr as resolveRouteComponent,
4144
4158
  dr as responsive,
4145
- ht as responsiveOrder,
4159
+ gt as responsiveOrder,
4146
4160
  Pr as responsiveSwitch,
4147
4161
  Mr as switchOn,
4148
4162
  jr as switchOnLength,
@@ -4153,10 +4167,10 @@ export {
4153
4167
  wr as useOnConnected,
4154
4168
  xr as useOnDisconnected,
4155
4169
  $r as useOnError,
4156
- pr as useRouter,
4170
+ hr as useRouter,
4157
4171
  kr as useStyle,
4158
4172
  yr as watch,
4159
- Re as when,
4173
+ Le as when,
4160
4174
  Er as whenEmpty,
4161
4175
  q as whenMedia,
4162
4176
  Sr as whenNotEmpty,