@jasonshimmy/custom-elements-runtime 1.0.6 → 1.0.8

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.
@@ -6,8 +6,8 @@ class dt {
6
6
  * Uses component identity to deduplicate multiple render requests for the same component
7
7
  */
8
8
  schedule(t, r) {
9
- const i = r || t.toString();
10
- this.pendingUpdates.set(i, t), this.isFlushScheduled || (this.isFlushScheduled = !0, typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && (window.__vitest__ || window.Cypress) ? this.flush() : queueMicrotask(() => this.flush()));
9
+ const n = r || t.toString();
10
+ this.pendingUpdates.set(n, t), this.isFlushScheduled || (this.isFlushScheduled = !0, typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && (window.__vitest__ || window.Cypress) ? this.flush() : queueMicrotask(() => this.flush()));
11
11
  }
12
12
  /**
13
13
  * Execute all pending updates
@@ -18,8 +18,8 @@ class dt {
18
18
  for (const r of t)
19
19
  try {
20
20
  r();
21
- } catch (i) {
22
- typeof console < "u" && console.error && console.error("Error in batched update:", i);
21
+ } catch (n) {
22
+ typeof console < "u" && console.error && console.error("Error in batched update:", n);
23
23
  }
24
24
  }
25
25
  /**
@@ -30,7 +30,7 @@ class dt {
30
30
  }
31
31
  }
32
32
  const ht = new dt();
33
- function fe(e, t) {
33
+ function ue(e, t) {
34
34
  ht.schedule(e, t);
35
35
  }
36
36
  const Fe = /* @__PURE__ */ new WeakSet();
@@ -41,11 +41,11 @@ class pt {
41
41
  /**
42
42
  * Get or create a reactive proxy for an object
43
43
  */
44
- static getOrCreateProxy(t, r, i = !1) {
45
- const n = this.cache.get(t);
46
- if (n)
47
- return n;
48
- const s = i ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
44
+ static getOrCreateProxy(t, r, n = !1) {
45
+ const i = this.cache.get(t);
46
+ if (i)
47
+ return i;
48
+ const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
49
49
  try {
50
50
  nt.markAsProxy(o);
51
51
  } catch {
@@ -58,9 +58,9 @@ class pt {
58
58
  static getOrCreateArrayHandler(t) {
59
59
  if (!this.arrayHandlerCache.has(t)) {
60
60
  const r = {
61
- get: (i, n, s) => {
62
- const o = Reflect.get(i, n, s);
63
- return typeof o == "function" && typeof n == "string" && [
61
+ get: (n, i, s) => {
62
+ const o = Reflect.get(n, i, s);
63
+ return typeof o == "function" && typeof i == "string" && [
64
64
  "push",
65
65
  "pop",
66
66
  "shift",
@@ -70,13 +70,13 @@ class pt {
70
70
  "reverse",
71
71
  "fill",
72
72
  "copyWithin"
73
- ].includes(n) ? function(...u) {
74
- const m = o.apply(i, u);
73
+ ].includes(i) ? function(...u) {
74
+ const m = o.apply(n, u);
75
75
  return t.triggerUpdate(), m;
76
76
  } : o;
77
77
  },
78
- set: (i, n, s) => (i[n] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
79
- deleteProperty: (i, n) => (delete i[n], t.triggerUpdate(), !0)
78
+ set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
79
+ deleteProperty: (n, i) => (delete n[i], t.triggerUpdate(), !0)
80
80
  };
81
81
  this.arrayHandlerCache.set(t, r);
82
82
  }
@@ -88,9 +88,9 @@ class pt {
88
88
  static getOrCreateObjectHandler(t) {
89
89
  if (!this.objectHandlerCache.has(t)) {
90
90
  const r = {
91
- get: (i, n, s) => Reflect.get(i, n, s),
92
- set: (i, n, s) => (i[n] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
93
- deleteProperty: (i, n) => (delete i[n], t.triggerUpdate(), !0)
91
+ get: (n, i, s) => Reflect.get(n, i, s),
92
+ set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
93
+ deleteProperty: (n, i) => (delete n[i], t.triggerUpdate(), !0)
94
94
  };
95
95
  this.objectHandlerCache.set(t, r);
96
96
  }
@@ -127,19 +127,19 @@ class nt {
127
127
  /**
128
128
  * Create an optimized reactive proxy with minimal overhead
129
129
  */
130
- static createReactiveProxy(t, r, i) {
130
+ static createReactiveProxy(t, r, n) {
131
131
  try {
132
132
  if (Fe.has(t)) return t;
133
133
  } catch {
134
134
  }
135
- const n = Array.isArray(t);
135
+ const i = Array.isArray(t);
136
136
  let s = this.contextCache.get(r);
137
137
  s || (s = /* @__PURE__ */ new WeakMap(), this.contextCache.set(r, s));
138
- let o = s.get(i);
138
+ let o = s.get(n);
139
139
  return o || (o = {
140
140
  triggerUpdate: r,
141
- makeReactiveValue: i
142
- }, s.set(i, o)), pt.getOrCreateProxy(t, o, n);
141
+ makeReactiveValue: n
142
+ }, s.set(n, o)), pt.getOrCreateProxy(t, o, i);
143
143
  }
144
144
  /**
145
145
  * Mark an object as a proxy (for optimization)
@@ -198,8 +198,8 @@ class gt {
198
198
  */
199
199
  shouldEmitRenderWarning() {
200
200
  if (!this.currentComponent) return !0;
201
- const t = this.currentComponent, r = this.lastWarningTime.get(t) || 0, i = Date.now();
202
- return i - r < 1e3 ? !1 : (this.lastWarningTime.set(t, i), !0);
201
+ const t = this.currentComponent, r = this.lastWarningTime.get(t) || 0, n = Date.now();
202
+ return n - r < 1e3 ? !1 : (this.lastWarningTime.set(t, n), !0);
203
203
  }
204
204
  /**
205
205
  * Execute a function with tracking disabled
@@ -219,11 +219,11 @@ class gt {
219
219
  getOrCreateState(t) {
220
220
  if (!this.currentComponent)
221
221
  return new He(t);
222
- const r = this.currentComponent, i = this.stateIndexCounter.get(r) || 0, n = `${r}:${i}`;
223
- if (this.stateIndexCounter.set(r, i + 1), this.stateStorage.has(n))
224
- return this.stateStorage.get(n);
222
+ const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
223
+ if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
224
+ return this.stateStorage.get(i);
225
225
  const s = new He(t);
226
- return this.stateStorage.set(n, s), s;
226
+ return this.stateStorage.set(i, s), s;
227
227
  }
228
228
  /**
229
229
  * Track a dependency for the current component
@@ -236,8 +236,8 @@ class gt {
236
236
  */
237
237
  triggerUpdate(t) {
238
238
  t.getDependents().forEach((r) => {
239
- const i = this.componentRenderFunctions.get(r);
240
- i && fe(i, r);
239
+ const n = this.componentRenderFunctions.get(r);
240
+ n && ue(n, r);
241
241
  });
242
242
  }
243
243
  /**
@@ -245,9 +245,9 @@ class gt {
245
245
  */
246
246
  cleanup(t) {
247
247
  const r = this.componentDependencies.get(t);
248
- r && (r.forEach((i) => i.removeDependent(t)), this.componentDependencies.delete(t)), this.componentRenderFunctions.delete(t);
249
- for (const i of Array.from(this.stateStorage.keys()))
250
- i.startsWith(t + ":") && this.stateStorage.delete(i);
248
+ r && (r.forEach((n) => n.removeDependent(t)), this.componentDependencies.delete(t)), this.componentRenderFunctions.delete(t);
249
+ for (const n of Array.from(this.stateStorage.keys()))
250
+ n.startsWith(t + ":") && this.stateStorage.delete(n);
251
251
  this.stateIndexCounter.delete(t);
252
252
  }
253
253
  }
@@ -316,31 +316,31 @@ function hr(e) {
316
316
  };
317
317
  }
318
318
  function pr(e, t, r = {}) {
319
- let i = e();
320
- r.immediate && t(i, i);
321
- const n = `watch-${Math.random().toString(36).substr(2, 9)}`, s = () => {
322
- F.setCurrentComponent(n, s);
319
+ let n = e();
320
+ r.immediate && t(n, n);
321
+ const i = `watch-${Math.random().toString(36).substr(2, 9)}`, s = () => {
322
+ F.setCurrentComponent(i, s);
323
323
  const o = e();
324
- F.clearCurrentComponent(), o !== i && (t(o, i), i = o);
324
+ F.clearCurrentComponent(), o !== n && (t(o, n), n = o);
325
325
  };
326
- return F.setCurrentComponent(n, s), e(), F.clearCurrentComponent(), () => {
327
- F.cleanup(n);
326
+ return F.setCurrentComponent(i, s), e(), F.clearCurrentComponent(), () => {
327
+ F.cleanup(i);
328
328
  };
329
329
  }
330
- const xe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map(), Ue = 500;
330
+ const ve = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map(), Ue = 500;
331
331
  function re(e) {
332
- if (xe.has(e))
333
- return xe.get(e);
334
- const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
335
- return xe.size < Ue && xe.set(e, t), t;
336
- }
337
- function it(e) {
338
332
  if (ve.has(e))
339
333
  return ve.get(e);
340
- const t = e.replace(/-([a-z])/g, (r, i) => i.toUpperCase());
334
+ const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
341
335
  return ve.size < Ue && ve.set(e, t), t;
342
336
  }
343
- function ie(e) {
337
+ function it(e) {
338
+ if (xe.has(e))
339
+ return xe.get(e);
340
+ const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
341
+ return xe.size < Ue && xe.set(e, t), t;
342
+ }
343
+ function de(e) {
344
344
  if (typeof e == "string") {
345
345
  if ($e.has(e))
346
346
  return $e.get(e);
@@ -360,19 +360,19 @@ function ie(e) {
360
360
  }
361
361
  function H(e, t) {
362
362
  if (typeof t == "string") {
363
- const r = t.split(".").reduce((i, n) => i?.[n], e);
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
368
  function _e(e, t, r) {
369
- const i = String(t).split("."), n = i.pop();
370
- if (!n) return;
371
- const s = i.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
372
- ee(s[n]) ? s[n].value = r : s[n] = r;
369
+ const n = String(t).split("."), i = n.pop();
370
+ if (!i) return;
371
+ const s = n.reduce((o, c) => (o[c] == null && (o[c] = {}), o[c]), e);
372
+ ee(s[i]) ? s[i].value = r : s[i] = r;
373
373
  }
374
374
  const st = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
- function se(e, ...t) {
375
+ function ie(e, ...t) {
376
376
  st && console.error(e, ...t);
377
377
  }
378
378
  function Oe(e, ...t) {
@@ -380,74 +380,74 @@ function Oe(e, ...t) {
380
380
  }
381
381
  function mt(e, t, r) {
382
382
  if (r)
383
- for (const [i, n] of Object.entries(r)) {
383
+ for (const [n, i] of Object.entries(r)) {
384
384
  let s, o = {};
385
- if (Array.isArray(n) ? (s = n[0], o = n[1] || {}) : s = n, t.set(i, {
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: H(e, i)
388
+ oldValue: H(e, n)
389
389
  }), o.immediate)
390
390
  try {
391
- const a = H(e, i);
392
- s(a, void 0, e);
393
- } catch (a) {
394
- se(`Error in immediate watcher for "${i}":`, a);
391
+ const c = H(e, n);
392
+ s(c, void 0, e);
393
+ } catch (c) {
394
+ ie(`Error in immediate watcher for "${n}":`, c);
395
395
  }
396
396
  }
397
397
  }
398
- function yt(e, t, r, i) {
399
- const n = (o, a) => {
400
- if (o === a) return !0;
401
- if (typeof o != typeof a || typeof o != "object" || o === null || a === null) return !1;
402
- if (Array.isArray(o) && Array.isArray(a))
403
- return o.length !== a.length ? !1 : o.every((g, b) => n(g, a[b]));
404
- const u = Object.keys(o), m = Object.keys(a);
405
- return u.length !== m.length ? !1 : u.every((g) => n(o[g], a[g]));
398
+ function yt(e, t, r, n) {
399
+ const i = (o, c) => {
400
+ if (o === c) return !0;
401
+ if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
402
+ if (Array.isArray(o) && Array.isArray(c))
403
+ return o.length !== c.length ? !1 : o.every((g, b) => i(g, c[b]));
404
+ const u = Object.keys(o), m = Object.keys(c);
405
+ return u.length !== m.length ? !1 : u.every((g) => i(o[g], c[g]));
406
406
  }, s = t.get(r);
407
- if (s && !n(i, s.oldValue))
407
+ if (s && !i(n, s.oldValue))
408
408
  try {
409
- s.callback(i, s.oldValue, e), s.oldValue = i;
409
+ s.callback(n, s.oldValue, e), s.oldValue = n;
410
410
  } catch (o) {
411
- se(`Error in watcher for "${r}":`, o);
411
+ ie(`Error in watcher for "${r}":`, o);
412
412
  }
413
- for (const [o, a] of t.entries())
414
- if (a.options.deep && r.startsWith(o + "."))
413
+ for (const [o, c] of t.entries())
414
+ if (c.options.deep && r.startsWith(o + "."))
415
415
  try {
416
416
  const u = H(e, o);
417
- n(u, a.oldValue) || (a.callback(u, a.oldValue, e), a.oldValue = u);
417
+ i(u, c.oldValue) || (c.callback(u, c.oldValue, e), c.oldValue = u);
418
418
  } catch (u) {
419
- se(`Error in deep watcher for "${o}":`, u);
419
+ ie(`Error in deep watcher for "${o}":`, u);
420
420
  }
421
421
  }
422
422
  function Ke(e, t) {
423
423
  return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
424
424
  }
425
425
  function bt(e, t, r) {
426
- t && Object.entries(t).forEach(([i, n]) => {
427
- const s = re(i), o = e.getAttribute(s);
428
- if (n.type === Function && typeof e[i] == "function")
429
- r[i] = e[i];
430
- else if (typeof e[i] < "u")
426
+ t && Object.entries(t).forEach(([n, i]) => {
427
+ const s = re(n), o = e.getAttribute(s);
428
+ if (i.type === Function && typeof e[n] == "function")
429
+ r[n] = e[n];
430
+ else if (typeof e[n] < "u")
431
431
  try {
432
- const a = e[i];
433
- n.type === Boolean && typeof a == "boolean" || n.type === Number && typeof a == "number" || n.type === Function && typeof a == "function" ? r[i] = a : r[i] = ie(Ke(String(a), n.type));
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] = Ke(String(c), i.type);
434
434
  } catch {
435
- r[i] = e[i];
435
+ r[n] = e[n];
436
436
  }
437
- else o !== null ? r[i] = ie(Ke(o, n.type)) : "default" in n && n.default !== void 0 && (r[i] = ie(n.default));
437
+ else o !== null ? r[n] = Ke(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
438
438
  });
439
439
  }
440
440
  function wt(e, t, r) {
441
441
  t.props && bt(e, t.props, r);
442
442
  }
443
- function xt(e, t, r, i) {
444
- e.onConnected && !r && (e.onConnected(t), i(!0));
443
+ function vt(e, t, r, n) {
444
+ e.onConnected && !r && (e.onConnected(t), n(!0));
445
445
  }
446
- function vt(e, t, r, i, n, s, o, a) {
447
- e.onDisconnected && e.onDisconnected(t), r.forEach((u) => u()), i(), n(), s(!1), o(null), a(!1);
446
+ function xt(e, t, r, n, i, s, o, c) {
447
+ e.onDisconnected && e.onDisconnected(t), r.forEach((u) => u()), n(), i(), s(!1), o(null), c(!1);
448
448
  }
449
- function $t(e, t, r, i, n) {
450
- e.onAttributeChanged && e.onAttributeChanged(t, r, i, n);
449
+ function $t(e, t, r, n, i) {
450
+ e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
451
451
  }
452
452
  class kt {
453
453
  static cache = /* @__PURE__ */ new Map();
@@ -471,24 +471,24 @@ class kt {
471
471
  /XMLHttpRequest/i
472
472
  ];
473
473
  static evaluate(t, r) {
474
- const i = this.cache.get(t);
475
- if (i) {
476
- if (!i.isSecure) {
474
+ const n = this.cache.get(t);
475
+ if (n) {
476
+ if (!n.isSecure) {
477
477
  Oe("Blocked cached dangerous expression:", t);
478
478
  return;
479
479
  }
480
- return i.evaluator(r);
480
+ return n.evaluator(r);
481
481
  }
482
- const n = this.createEvaluator(t);
482
+ const i = this.createEvaluator(t);
483
483
  if (this.cache.size >= this.maxCacheSize) {
484
484
  const s = this.cache.keys().next().value;
485
485
  s && this.cache.delete(s);
486
486
  }
487
- if (this.cache.set(t, n), !n.isSecure) {
487
+ if (this.cache.set(t, i), !i.isSecure) {
488
488
  Oe("Blocked dangerous expression:", t);
489
489
  return;
490
490
  }
491
- return n.evaluator(r);
491
+ return i.evaluator(r);
492
492
  }
493
493
  static createEvaluator(t) {
494
494
  if (this.hasDangerousPatterns(t))
@@ -512,21 +512,21 @@ class kt {
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 (i) => H(i, r);
515
+ return (n) => H(n, r);
516
516
  }
517
517
  return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => H(r, t);
518
518
  }
519
519
  static createObjectEvaluator(t) {
520
- const r = t.trim().slice(1, -1), i = this.parseObjectProperties(r);
521
- return (n) => {
520
+ const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
521
+ return (i) => {
522
522
  const s = {};
523
- for (const { key: o, value: a } of i)
523
+ for (const { key: o, value: c } of n)
524
524
  try {
525
- if (a.startsWith("ctx.")) {
526
- const u = a.slice(4);
527
- s[o] = H(n, u);
525
+ if (c.startsWith("ctx.")) {
526
+ const u = c.slice(4);
527
+ s[o] = H(i, u);
528
528
  } else
529
- s[o] = this.evaluateSimpleValue(a, n);
529
+ s[o] = this.evaluateSimpleValue(c, i);
530
530
  } catch {
531
531
  s[o] = void 0;
532
532
  }
@@ -534,51 +534,51 @@ class kt {
534
534
  };
535
535
  }
536
536
  static parseObjectProperties(t) {
537
- const r = [], i = t.split(",");
538
- for (const n of i) {
539
- const s = n.indexOf(":");
537
+ const r = [], n = t.split(",");
538
+ for (const i of n) {
539
+ const s = i.indexOf(":");
540
540
  if (s === -1) continue;
541
- const o = n.slice(0, s).trim(), a = n.slice(s + 1).trim(), u = o.replace(/^['"]|['"]$/g, "");
542
- r.push({ key: u, value: a });
541
+ const o = i.slice(0, s).trim(), c = i.slice(s + 1).trim(), u = o.replace(/^['"]|['"]$/g, "");
542
+ r.push({ key: u, value: c });
543
543
  }
544
544
  return r;
545
545
  }
546
546
  static createSimpleEvaluator(t) {
547
547
  return (r) => {
548
548
  try {
549
- let i = t;
550
- const n = [];
551
- i = i.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${n.push(b) - 1}#>>`);
552
- const s = i.match(/ctx\.[\w.]+/g) || [];
549
+ let n = t;
550
+ const i = [];
551
+ n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
552
+ const s = n.match(/ctx\.[\w.]+/g) || [];
553
553
  for (const b of s) {
554
- const p = b.slice(4), l = H(r, p);
555
- if (l === void 0) return;
556
- const d = n.push(JSON.stringify(l)) - 1;
557
- i = i.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
554
+ const p = b.slice(4), f = H(r, p);
555
+ if (f === void 0) return;
556
+ const h = i.push(JSON.stringify(f)) - 1;
557
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${h}#>>`);
558
558
  }
559
- const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, a = i.match(o) || [];
560
- for (const b of a) {
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
561
  if (b.startsWith("ctx.")) continue;
562
562
  const p = H(r, b);
563
563
  if (p === void 0) return;
564
- const l = n.push(JSON.stringify(p)) - 1;
565
- i = i.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
564
+ const f = i.push(JSON.stringify(p)) - 1;
565
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`);
566
566
  }
567
567
  const u = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
568
568
  let m;
569
569
  const g = /* @__PURE__ */ new Set();
570
- for (; (m = u.exec(i)) !== null; ) {
570
+ for (; (m = u.exec(n)) !== null; ) {
571
571
  const b = m[1];
572
572
  if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || g.has(b)) continue;
573
573
  g.add(b);
574
574
  const p = H(r, b);
575
575
  if (p === void 0) return;
576
- const l = JSON.stringify(p), d = n.push(l) - 1;
577
- b.includes(".") ? i = i.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`) : i = i.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${d}#>>`);
576
+ const f = JSON.stringify(p), h = i.push(f) - 1;
577
+ b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${h}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${h}#>>`);
578
578
  }
579
- i = i.replace(/<<#(\d+)#>>/g, (b, p) => n[Number(p)]);
579
+ n = n.replace(/<<#(\d+)#>>/g, (b, p) => i[Number(p)]);
580
580
  try {
581
- return this.evaluateBasicExpression(i);
581
+ return this.evaluateBasicExpression(n);
582
582
  } catch {
583
583
  return;
584
584
  }
@@ -594,141 +594,141 @@ class kt {
594
594
  */
595
595
  static evaluateBasicExpression(t) {
596
596
  const r = this.tokenize(t);
597
- let i = 0;
598
- function n() {
599
- return r[i];
600
- }
601
- function s(c) {
602
- const h = r[i++];
603
- if (c && !h)
604
- throw new Error(`Unexpected token EOF, expected ${c}`);
605
- if (c && h && h.type !== c && h.value !== c)
606
- throw new Error(`Unexpected token ${h.type}/${h.value}, expected ${c}`);
607
- return h;
597
+ let n = 0;
598
+ function i() {
599
+ return r[n];
600
+ }
601
+ function s(a) {
602
+ const l = r[n++];
603
+ if (a && !l)
604
+ throw new Error(`Unexpected token EOF, expected ${a}`);
605
+ if (a && l && l.type !== a && l.value !== a)
606
+ throw new Error(`Unexpected token ${l.type}/${l.value}, expected ${a}`);
607
+ return l;
608
608
  }
609
609
  function o() {
610
- return a();
610
+ return c();
611
611
  }
612
- function a() {
613
- let c = u();
614
- if (n() && n().value === "?") {
612
+ function c() {
613
+ let a = u();
614
+ if (i() && i().value === "?") {
615
615
  s("?");
616
- const h = o();
616
+ const l = o();
617
617
  s(":");
618
618
  const y = o();
619
- return c ? h : y;
619
+ return a ? l : y;
620
620
  }
621
- return c;
621
+ return a;
622
622
  }
623
623
  function u() {
624
- let c = m();
625
- for (; n() && n().value === "||"; ) {
624
+ let a = m();
625
+ for (; i() && i().value === "||"; ) {
626
626
  s("OP");
627
- const h = m();
628
- c = c || h;
627
+ const l = m();
628
+ a = a || l;
629
629
  }
630
- return c;
630
+ return a;
631
631
  }
632
632
  function m() {
633
- let c = g();
634
- for (; n() && n().value === "&&"; ) {
633
+ let a = g();
634
+ for (; i() && i().value === "&&"; ) {
635
635
  s("OP");
636
- const h = g();
637
- c = c && h;
636
+ const l = g();
637
+ a = a && l;
638
638
  }
639
- return c;
639
+ return a;
640
640
  }
641
641
  function g() {
642
- let c = b();
643
- for (; n() && ["==", "!=", "===", "!=="].includes(n().value); ) {
644
- const h = s("OP").value, y = b();
645
- switch (h) {
642
+ let a = b();
643
+ for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
644
+ const l = s("OP").value, y = b();
645
+ switch (l) {
646
646
  case "==":
647
- c = c == y;
647
+ a = a == y;
648
648
  break;
649
649
  case "!=":
650
- c = c != y;
650
+ a = a != y;
651
651
  break;
652
652
  case "===":
653
- c = c === y;
653
+ a = a === y;
654
654
  break;
655
655
  case "!==":
656
- c = c !== y;
656
+ a = a !== y;
657
657
  break;
658
658
  }
659
659
  }
660
- return c;
660
+ return a;
661
661
  }
662
662
  function b() {
663
- let c = p();
664
- for (; n() && [">", "<", ">=", "<="].includes(n().value); ) {
665
- const h = s("OP").value, y = p();
666
- switch (h) {
663
+ let a = p();
664
+ for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
665
+ const l = s("OP").value, y = p();
666
+ switch (l) {
667
667
  case ">":
668
- c = c > y;
668
+ a = a > y;
669
669
  break;
670
670
  case "<":
671
- c = c < y;
671
+ a = a < y;
672
672
  break;
673
673
  case ">=":
674
- c = c >= y;
674
+ a = a >= y;
675
675
  break;
676
676
  case "<=":
677
- c = c <= y;
677
+ a = a <= y;
678
678
  break;
679
679
  }
680
680
  }
681
- return c;
681
+ return a;
682
682
  }
683
683
  function p() {
684
- let c = l();
685
- for (; n() && (n().value === "+" || n().value === "-"); ) {
686
- const h = s("OP").value, y = l();
687
- c = h === "+" ? c + y : c - y;
684
+ let a = f();
685
+ for (; i() && (i().value === "+" || i().value === "-"); ) {
686
+ const l = s("OP").value, y = f();
687
+ a = l === "+" ? a + y : a - y;
688
688
  }
689
- return c;
689
+ return a;
690
690
  }
691
- function l() {
692
- let c = d();
693
- for (; n() && (n().value === "*" || n().value === "/" || n().value === "%"); ) {
694
- const h = s("OP").value, y = d();
695
- switch (h) {
691
+ function f() {
692
+ let a = h();
693
+ for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
694
+ const l = s("OP").value, y = h();
695
+ switch (l) {
696
696
  case "*":
697
- c = c * y;
697
+ a = a * y;
698
698
  break;
699
699
  case "/":
700
- c = c / y;
700
+ a = a / y;
701
701
  break;
702
702
  case "%":
703
- c = c % y;
703
+ a = a % y;
704
704
  break;
705
705
  }
706
706
  }
707
- return c;
707
+ return a;
708
708
  }
709
- function d() {
710
- return n() && n().value === "!" ? (s("OP"), !d()) : n() && n().value === "-" ? (s("OP"), -d()) : x();
709
+ function h() {
710
+ return i() && i().value === "!" ? (s("OP"), !h()) : i() && i().value === "-" ? (s("OP"), -h()) : v();
711
711
  }
712
- function x() {
713
- const c = n();
714
- if (c) {
715
- if (c.type === "NUMBER")
716
- return s("NUMBER"), Number(c.value);
717
- if (c.type === "STRING")
718
- return s("STRING"), c.value.slice(1, -1);
719
- if (c.type === "IDENT")
720
- return s("IDENT"), c.value === "true" ? !0 : c.value === "false" ? !1 : c.value === "null" ? null : void 0;
721
- if (c.value === "[") {
712
+ function v() {
713
+ const a = i();
714
+ if (a) {
715
+ if (a.type === "NUMBER")
716
+ return s("NUMBER"), Number(a.value);
717
+ if (a.type === "STRING")
718
+ return s("STRING"), a.value.slice(1, -1);
719
+ if (a.type === "IDENT")
720
+ return s("IDENT"), a.value === "true" ? !0 : a.value === "false" ? !1 : a.value === "null" ? null : void 0;
721
+ if (a.value === "[") {
722
722
  s("PUNC");
723
- const h = [];
724
- for (; n() && n().value !== "]"; )
725
- h.push(o()), n() && n().value === "," && s("PUNC");
726
- return s("PUNC"), h;
723
+ const l = [];
724
+ for (; i() && i().value !== "]"; )
725
+ l.push(o()), i() && i().value === "," && s("PUNC");
726
+ return s("PUNC"), l;
727
727
  }
728
- if (c.value === "(") {
728
+ if (a.value === "(") {
729
729
  s("PUNC");
730
- const h = o();
731
- return s("PUNC"), h;
730
+ const l = o();
731
+ return s("PUNC"), l;
732
732
  }
733
733
  throw new Error("Unexpected token in expression");
734
734
  }
@@ -736,10 +736,10 @@ class kt {
736
736
  return o();
737
737
  }
738
738
  static tokenize(t) {
739
- const r = [], i = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
740
- let n;
741
- for (; (n = i.exec(t)) !== null; ) {
742
- const s = n[1];
739
+ const r = [], n = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
740
+ let i;
741
+ for (; (i = n.exec(t)) !== null; ) {
742
+ const s = i[1];
743
743
  s && (/^\d/.test(s) ? r.push({ type: "NUMBER", value: s }) : /^"/.test(s) || /^'/.test(s) ? r.push({ type: "STRING", value: s }) : /^[a-zA-Z_]/.test(s) ? r.push({ type: "IDENT", value: s }) : /^[()?:,\[\]]$/.test(s) ? r.push({ type: "PUNC", value: s }) : r.push({ type: "OP", value: s }));
744
744
  }
745
745
  return r;
@@ -749,8 +749,8 @@ class kt {
749
749
  if (t === "false") return !1;
750
750
  if (!isNaN(Number(t))) return Number(t);
751
751
  if (t.startsWith("ctx.")) {
752
- const i = t.slice(4);
753
- return H(r, i);
752
+ const n = t.slice(4);
753
+ return H(r, n);
754
754
  }
755
755
  return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
756
756
  }
@@ -761,39 +761,39 @@ class kt {
761
761
  return this.cache.size;
762
762
  }
763
763
  }
764
- class oe {
764
+ class se {
765
765
  static cleanupFunctions = /* @__PURE__ */ new WeakMap();
766
766
  /**
767
767
  * Add an event listener with automatic cleanup tracking
768
768
  */
769
- static addListener(t, r, i, n) {
770
- t.addEventListener(r, i, n);
771
- const o = { event: r, handler: i, options: n, cleanup: () => t.removeEventListener(r, i, n), addedAt: Date.now() };
769
+ static addListener(t, r, n, i) {
770
+ t.addEventListener(r, n, i);
771
+ const o = { event: r, handler: n, options: i, cleanup: () => t.removeEventListener(r, n, i), addedAt: Date.now() };
772
772
  this.cleanupFunctions.has(t) || this.cleanupFunctions.set(t, []);
773
- const a = this.cleanupFunctions.get(t);
774
- a.push(o), this.cleanupFunctions.get(t).__metaList = a;
773
+ const c = this.cleanupFunctions.get(t);
774
+ c.push(o), this.cleanupFunctions.get(t).__metaList = c;
775
775
  }
776
776
  /**
777
777
  * Remove a specific event listener
778
778
  */
779
- static removeListener(t, r, i, n) {
780
- t.removeEventListener(r, i, n);
779
+ static removeListener(t, r, n, i) {
780
+ t.removeEventListener(r, n, i);
781
781
  const s = this.cleanupFunctions.get(t);
782
782
  if (s) {
783
783
  const o = s.__metaList || null;
784
784
  if (o) {
785
- const a = o.findIndex((u) => u.event === r && u.handler === i && JSON.stringify(u.options) === JSON.stringify(n));
786
- if (a >= 0) {
785
+ const c = o.findIndex((u) => u.event === r && u.handler === n && JSON.stringify(u.options) === JSON.stringify(i));
786
+ if (c >= 0) {
787
787
  try {
788
- o[a].cleanup();
788
+ o[c].cleanup();
789
789
  } catch {
790
790
  }
791
- o.splice(a, 1);
791
+ o.splice(c, 1);
792
792
  }
793
793
  o.length === 0 && this.cleanupFunctions.delete(t);
794
794
  } else {
795
- const a = s.findIndex(() => !0);
796
- a >= 0 && (s.splice(a, 1), s.length === 0 && this.cleanupFunctions.delete(t));
795
+ const c = s.findIndex(() => !0);
796
+ c >= 0 && (s.splice(c, 1), s.length === 0 && this.cleanupFunctions.delete(t));
797
797
  }
798
798
  }
799
799
  }
@@ -802,9 +802,9 @@ class oe {
802
802
  */
803
803
  static cleanup(t) {
804
804
  const r = this.cleanupFunctions.get(t);
805
- r && ((r.__metaList || r).forEach((n) => {
805
+ r && ((r.__metaList || r).forEach((i) => {
806
806
  try {
807
- typeof n == "function" ? n() : n && typeof n.cleanup == "function" && n.cleanup();
807
+ typeof i == "function" ? i() : i && typeof i.cleanup == "function" && i.cleanup();
808
808
  } catch (s) {
809
809
  console.error("Error during event cleanup:", s);
810
810
  }
@@ -824,151 +824,151 @@ class oe {
824
824
  * Check if an element has any tracked event listeners
825
825
  */
826
826
  static hasListeners(t) {
827
- const r = this.cleanupFunctions.get(t), i = r ? r.__metaList || r : void 0;
828
- return !!(i && i.length > 0);
827
+ const r = this.cleanupFunctions.get(t), n = r ? r.__metaList || r : void 0;
828
+ return !!(n && n.length > 0);
829
829
  }
830
830
  /**
831
831
  * Get the number of tracked event listeners for an element
832
832
  */
833
833
  static getListenerCount(t) {
834
- const r = this.cleanupFunctions.get(t), i = r ? r.__metaList || r : void 0;
835
- return i ? i.length : 0;
834
+ const r = this.cleanupFunctions.get(t), n = r ? r.__metaList || r : void 0;
835
+ return n ? n.length : 0;
836
836
  }
837
837
  }
838
- function ue(e, t) {
838
+ function le(e, t) {
839
839
  if (t && e instanceof HTMLElement) {
840
- oe.cleanup(e);
840
+ se.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
+ le(r, t);
845
845
  }
846
846
  }
847
847
  function pe(e, t, r) {
848
848
  if (typeof e == "string") return;
849
- const i = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), n = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
- i ? i.value = t : n && r && (r[n] = t);
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
+ n ? n.value = t : i && r && (r[i] = t);
851
851
  }
852
- function Ct(e, t, r, i, n, s, o, a) {
852
+ function Ct(e, t, r, n, i, s, o, c) {
853
853
  if (!s) return;
854
854
  const u = t.includes("lazy"), m = t.includes("trim"), g = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", p = () => {
855
855
  if (b) {
856
- const k = e.value;
857
- return a && typeof k == "object" && k !== null ? k[a] : k;
856
+ const $ = e.value;
857
+ return c && typeof $ == "object" && $ !== null ? $[c] : $;
858
858
  }
859
859
  return H(s._state || s, e);
860
- }, l = p();
861
- let d = "text";
862
- o instanceof HTMLInputElement ? d = i?.type || o.type || "text" : o instanceof HTMLSelectElement ? d = "select" : o instanceof HTMLTextAreaElement && (d = "textarea");
863
- const x = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, c = x ? d === "checkbox" || d === "radio" ? "checked" : "value" : a ?? "modelValue";
864
- if (d === "checkbox")
865
- if (Array.isArray(l))
866
- r[c] = l.includes(String(o?.getAttribute("value") ?? i?.value ?? ""));
860
+ }, f = p();
861
+ let h = "text";
862
+ o instanceof HTMLInputElement ? h = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? h = "select" : o instanceof HTMLTextAreaElement && (h = "textarea");
863
+ const v = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, a = v ? h === "checkbox" || h === "radio" ? "checked" : "value" : c ?? "modelValue";
864
+ if (h === "checkbox")
865
+ if (Array.isArray(f))
866
+ r[a] = f.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
867
867
  else {
868
- const k = o?.getAttribute("true-value") ?? !0;
869
- r[c] = l === k;
868
+ const $ = o?.getAttribute("true-value") ?? !0;
869
+ r[a] = f === $;
870
870
  }
871
- else if (d === "radio")
872
- r[c] = l === (i?.value ?? "");
873
- else if (d === "select")
871
+ else if (h === "radio")
872
+ r[a] = f === (n?.value ?? "");
873
+ else if (h === "select")
874
874
  if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
875
- const k = Array.isArray(l) ? l.map(String) : [];
875
+ const $ = Array.isArray(f) ? f.map(String) : [];
876
876
  setTimeout(() => {
877
- Array.from(o.options).forEach(($) => {
878
- $.selected = k.includes($.value);
877
+ Array.from(o.options).forEach((k) => {
878
+ k.selected = $.includes(k.value);
879
879
  });
880
- }, 0), r[c] = Array.isArray(l) ? l : [];
880
+ }, 0), r[a] = Array.isArray(f) ? f : [];
881
881
  } else
882
- r[c] = l;
882
+ r[a] = f;
883
883
  else {
884
- r[c] = l;
884
+ r[a] = f;
885
885
  try {
886
- const k = re(c);
887
- i && (i[k] = l);
886
+ const $ = re(a);
887
+ n && (n[$] = f);
888
888
  } catch {
889
889
  }
890
890
  }
891
- const h = u || d === "checkbox" || d === "radio" || d === "select" ? "change" : "input", y = (k) => {
892
- if (k.isComposing || n._isComposing) return;
893
- const $ = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
- if (k.isTrusted === !1 && !$) return;
895
- const f = k.target;
896
- if (!f || f._modelUpdating) return;
897
- let v = f.value;
898
- if (d === "checkbox") {
891
+ const l = u || h === "checkbox" || h === "radio" || h === "select" ? "change" : "input", y = ($) => {
892
+ if ($.isComposing || i._isComposing) return;
893
+ const k = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
+ if ($.isTrusted === !1 && !k) return;
895
+ const d = $.target;
896
+ if (!d || d._modelUpdating) return;
897
+ let x = d.value;
898
+ if (h === "checkbox") {
899
899
  const T = p();
900
900
  if (Array.isArray(T)) {
901
- const R = f.getAttribute("value") ?? "", S = Array.from(T);
902
- if (f.checked)
901
+ const R = d.getAttribute("value") ?? "", S = Array.from(T);
902
+ if (d.checked)
903
903
  S.includes(R) || S.push(R);
904
904
  else {
905
905
  const P = S.indexOf(R);
906
906
  P > -1 && S.splice(P, 1);
907
907
  }
908
- v = S;
908
+ x = S;
909
909
  } else {
910
- const R = f.getAttribute("true-value") ?? !0, S = f.getAttribute("false-value") ?? !1;
911
- v = f.checked ? R : S;
910
+ const R = d.getAttribute("true-value") ?? !0, S = d.getAttribute("false-value") ?? !1;
911
+ x = d.checked ? R : S;
912
912
  }
913
- } else if (d === "radio")
914
- v = f.getAttribute("value") ?? f.value;
915
- else if (d === "select" && f.multiple)
916
- v = Array.from(f.selectedOptions).map((T) => T.value);
917
- else if (m && typeof v == "string" && (v = v.trim()), g) {
918
- const T = Number(v);
919
- isNaN(T) || (v = T);
913
+ } else if (h === "radio")
914
+ x = d.getAttribute("value") ?? d.value;
915
+ else if (h === "select" && d.multiple)
916
+ x = Array.from(d.selectedOptions).map((T) => T.value);
917
+ else if (m && typeof x == "string" && (x = x.trim()), g) {
918
+ const T = Number(x);
919
+ isNaN(T) || (x = T);
920
920
  }
921
921
  const A = s._state || s, C = p();
922
- if (Array.isArray(v) && Array.isArray(C) ? JSON.stringify([...v].sort()) !== JSON.stringify([...C].sort()) : v !== C) {
923
- f._modelUpdating = !0;
922
+ if (Array.isArray(x) && Array.isArray(C) ? JSON.stringify([...x].sort()) !== JSON.stringify([...C].sort()) : x !== C) {
923
+ d._modelUpdating = !0;
924
924
  try {
925
925
  if (b)
926
- if (a && typeof e.value == "object" && e.value !== null) {
926
+ if (c && typeof e.value == "object" && e.value !== null) {
927
927
  const T = { ...e.value };
928
- T[a] = v, e.value = T;
928
+ T[c] = x, e.value = T;
929
929
  } else
930
- e.value = v;
930
+ e.value = x;
931
931
  else
932
- _e(A, e, v);
932
+ _e(A, e, x);
933
933
  if (s._requestRender && s._requestRender(), s._triggerWatchers) {
934
934
  const T = b ? "reactiveState" : e;
935
- s._triggerWatchers(T, v);
935
+ s._triggerWatchers(T, x);
936
936
  }
937
- if (f) {
938
- const T = `update:${re(c)}`, R = new CustomEvent(T, {
939
- detail: v,
937
+ if (d) {
938
+ const T = `update:${re(a)}`, R = new CustomEvent(T, {
939
+ detail: x,
940
940
  bubbles: !0,
941
941
  composed: !0
942
942
  });
943
- f.dispatchEvent(R);
943
+ d.dispatchEvent(R);
944
944
  }
945
945
  } finally {
946
- setTimeout(() => f._modelUpdating = !1, 0);
946
+ setTimeout(() => d._modelUpdating = !1, 0);
947
947
  }
948
948
  }
949
949
  };
950
- if (x) {
951
- if (n[h]) {
952
- const k = n[h];
953
- o && oe.removeListener(o, h, k);
950
+ if (v) {
951
+ if (i[l]) {
952
+ const $ = i[l];
953
+ o && se.removeListener(o, l, $);
954
954
  }
955
- n[h] = y;
955
+ i[l] = y;
956
956
  } else {
957
- const k = `update:${re(c)}`;
958
- if (n[k]) {
959
- const $ = n[k];
960
- o && oe.removeListener(o, k, $);
961
- }
962
- n[k] = ($) => {
963
- const f = s._state || s, v = $.detail !== void 0 ? $.detail : $.target?.value, A = H(f, e);
964
- if (Array.isArray(v) && Array.isArray(A) ? JSON.stringify([...v].sort()) !== JSON.stringify([...A].sort()) : v !== A) {
965
- _e(f, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
966
- const E = $.target;
957
+ const $ = `update:${re(a)}`;
958
+ if (i[$]) {
959
+ const k = i[$];
960
+ o && se.removeListener(o, $, k);
961
+ }
962
+ i[$] = (k) => {
963
+ const d = s._state || s, x = k.detail !== void 0 ? k.detail : k.target?.value, A = H(d, e);
964
+ if (Array.isArray(x) && Array.isArray(A) ? JSON.stringify([...x].sort()) !== JSON.stringify([...A].sort()) : x !== A) {
965
+ _e(d, e, x), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, x);
966
+ const E = k.target;
967
967
  if (E) {
968
- E[c] = v;
968
+ E[a] = x;
969
969
  try {
970
- const T = re(c);
971
- typeof v == "boolean" ? v ? E.setAttribute(T, "true") : E.setAttribute(T, "false") : E.setAttribute(T, String(v));
970
+ const T = re(a);
971
+ typeof x == "boolean" ? x ? E.setAttribute(T, "true") : E.setAttribute(T, "false") : E.setAttribute(T, String(x));
972
972
  } catch {
973
973
  }
974
974
  queueMicrotask(() => {
@@ -978,22 +978,22 @@ function Ct(e, t, r, i, n, s, o, a) {
978
978
  }
979
979
  };
980
980
  }
981
- (d === "text" || d === "textarea") && (n.compositionstart = (() => n._isComposing = !0), n.compositionend = (k) => {
982
- n._isComposing = !1;
983
- const $ = k.target;
984
- $ && setTimeout(() => {
985
- const f = $.value, v = s._state || s, A = H(v, e);
986
- let C = f;
981
+ (h === "text" || h === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = ($) => {
982
+ i._isComposing = !1;
983
+ const k = $.target;
984
+ k && setTimeout(() => {
985
+ const d = k.value, x = s._state || s, A = H(x, e);
986
+ let C = d;
987
987
  if (m && (C = C.trim()), g) {
988
988
  const T = Number(C);
989
989
  isNaN(T) || (C = T);
990
990
  }
991
991
  if (Array.isArray(C) && Array.isArray(A) ? JSON.stringify([...C].sort()) !== JSON.stringify([...A].sort()) : C !== A) {
992
- $._modelUpdating = !0;
992
+ k._modelUpdating = !0;
993
993
  try {
994
- _e(v, e, C), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, C);
994
+ _e(x, e, C), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, C);
995
995
  } finally {
996
- setTimeout(() => $._modelUpdating = !1, 0);
996
+ setTimeout(() => k._modelUpdating = !1, 0);
997
997
  }
998
998
  }
999
999
  }, 0);
@@ -1003,83 +1003,83 @@ function ot(e) {
1003
1003
  const t = e.slice(2);
1004
1004
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
1005
1005
  }
1006
- function _t(e, t, r, i) {
1006
+ function _t(e, t, r, n) {
1007
1007
  if (typeof e == "object" && e !== null)
1008
- for (const [n, s] of Object.entries(e))
1009
- n.startsWith("data-") || n.startsWith("aria-") || n === "class" ? r[n] = s : t[n] = s;
1008
+ for (const [i, s] of Object.entries(e))
1009
+ i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
1010
1010
  else if (typeof e == "string") {
1011
- if (!i) return;
1011
+ if (!n) return;
1012
1012
  try {
1013
- const n = me(e, i);
1014
- if (typeof n == "object" && n !== null) {
1015
- for (const [s, o] of Object.entries(n))
1013
+ const i = me(e, n);
1014
+ if (typeof i == "object" && i !== null) {
1015
+ for (const [s, o] of Object.entries(i))
1016
1016
  s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? r[s] = o : t[s] = o;
1017
1017
  return;
1018
1018
  } else {
1019
- r[e] = n;
1019
+ r[e] = i;
1020
1020
  return;
1021
1021
  }
1022
1022
  } catch {
1023
- const n = H(i, e);
1024
- r[e] = n;
1023
+ const i = H(n, e);
1024
+ r[e] = i;
1025
1025
  }
1026
1026
  }
1027
1027
  }
1028
1028
  function Et(e, t, r) {
1029
- let i;
1029
+ let n;
1030
1030
  if (typeof e == "string") {
1031
1031
  if (!r) return;
1032
- i = me(e, r);
1032
+ n = me(e, r);
1033
1033
  } else
1034
- i = e;
1035
- const n = t.style || "";
1036
- let s = n;
1037
- if (i) {
1038
- if (n) {
1039
- const o = n.split(";").map((u) => u.trim()).filter(Boolean), a = o.findIndex(
1034
+ n = e;
1035
+ const i = t.style || "";
1036
+ let s = i;
1037
+ if (n) {
1038
+ if (i) {
1039
+ const o = i.split(";").map((u) => u.trim()).filter(Boolean), c = o.findIndex(
1040
1040
  (u) => u.startsWith("display:")
1041
1041
  );
1042
- a >= 0 && o[a] === "display: none" && (o.splice(a, 1), s = o.length > 0 ? o.join("; ") + ";" : "");
1042
+ c >= 0 && o[c] === "display: none" && (o.splice(c, 1), s = o.length > 0 ? o.join("; ") + ";" : "");
1043
1043
  }
1044
- } else if (n) {
1045
- const o = n.split(";").filter(Boolean), a = o.findIndex(
1044
+ } else if (i) {
1045
+ const o = i.split(";").filter(Boolean), c = o.findIndex(
1046
1046
  (u) => u.trim().startsWith("display:")
1047
1047
  );
1048
- a >= 0 ? o[a] = "display: none" : o.push("display: none"), s = o.join("; ");
1048
+ c >= 0 ? o[c] = "display: none" : o.push("display: none"), s = o.join("; ");
1049
1049
  } else
1050
1050
  s = "display: none";
1051
- s !== n && (s ? t.style = s : delete t.style);
1051
+ s !== i && (s ? t.style = s : delete t.style);
1052
1052
  }
1053
1053
  function me(e, t) {
1054
1054
  return kt.evaluate(e, t);
1055
1055
  }
1056
1056
  function St(e, t, r) {
1057
- let i;
1057
+ let n;
1058
1058
  if (typeof e == "string") {
1059
1059
  if (!r) return;
1060
- i = me(e, r);
1060
+ n = me(e, r);
1061
1061
  } else
1062
- i = e;
1063
- let n = [];
1064
- typeof i == "string" ? n = [i] : Array.isArray(i) ? n = i.filter(Boolean) : typeof i == "object" && i !== null && (n = Object.entries(i).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
1065
- const s = t.class || "", o = s ? `${s} ${n.join(" ")}`.trim() : n.join(" ");
1062
+ n = e;
1063
+ let i = [];
1064
+ typeof n == "string" ? i = [n] : Array.isArray(n) ? i = n.filter(Boolean) : typeof n == "object" && n !== null && (i = Object.entries(n).filter(([, c]) => !!c).flatMap(([c]) => c.split(/\s+/).filter(Boolean)));
1065
+ const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
1066
1066
  o && (t.class = o);
1067
1067
  }
1068
1068
  function At(e, t, r) {
1069
- let i;
1069
+ let n;
1070
1070
  if (typeof e == "string") {
1071
1071
  if (!r) return;
1072
- i = me(e, r);
1072
+ n = me(e, r);
1073
1073
  } else
1074
- i = e;
1075
- let n = "";
1076
- if (typeof i == "string")
1077
- n = i;
1078
- else if (i && typeof i == "object") {
1074
+ n = e;
1075
+ let i = "";
1076
+ if (typeof n == "string")
1077
+ i = n;
1078
+ else if (n && typeof n == "object") {
1079
1079
  const o = [];
1080
- for (const [a, u] of Object.entries(i))
1080
+ for (const [c, u] of Object.entries(n))
1081
1081
  if (u != null && u !== "") {
1082
- const m = a.replace(
1082
+ const m = c.replace(
1083
1083
  /[A-Z]/g,
1084
1084
  (p) => `-${p.toLowerCase()}`
1085
1085
  ), g = [
@@ -1111,37 +1111,37 @@ function At(e, t, r) {
1111
1111
  let b = String(u);
1112
1112
  typeof u == "number" && g.includes(m) && (b = `${u}px`), o.push(`${m}: ${b}`);
1113
1113
  }
1114
- n = o.join("; ") + (o.length > 0 ? ";" : "");
1114
+ i = o.join("; ") + (o.length > 0 ? ";" : "");
1115
1115
  }
1116
1116
  const s = t.style || "";
1117
- t.style = s + (s && !s.endsWith(";") ? "; " : "") + n;
1117
+ t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
1118
1118
  }
1119
1119
  function Tt(e, t, r) {
1120
- let i = e;
1121
- typeof e == "string" && r && (i = me(e, r)), ee(i) ? t.reactiveRef = i : t.ref = i;
1120
+ let n = e;
1121
+ typeof e == "string" && r && (n = me(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1122
1122
  }
1123
- function at(e, t, r, i) {
1124
- const n = {}, s = { ...i || {} }, o = {};
1125
- for (const [a, u] of Object.entries(e)) {
1123
+ function at(e, t, r, n) {
1124
+ const i = {}, s = { ...n || {} }, o = {};
1125
+ for (const [c, u] of Object.entries(e)) {
1126
1126
  const { value: m, modifiers: g, arg: b } = u;
1127
- if (a === "model" || a.startsWith("model:")) {
1128
- const p = a.split(":"), l = p.length > 1 ? p[1] : b;
1127
+ if (c === "model" || c.startsWith("model:")) {
1128
+ const p = c.split(":"), f = p.length > 1 ? p[1] : b;
1129
1129
  Ct(
1130
1130
  m,
1131
1131
  // Pass the original value (could be string or reactive state object)
1132
1132
  g,
1133
- n,
1133
+ i,
1134
1134
  s,
1135
1135
  o,
1136
1136
  t,
1137
1137
  r,
1138
- l
1138
+ f
1139
1139
  );
1140
1140
  continue;
1141
1141
  }
1142
- switch (a) {
1142
+ switch (c) {
1143
1143
  case "bind":
1144
- _t(m, n, s, t);
1144
+ _t(m, i, s, t);
1145
1145
  break;
1146
1146
  case "show":
1147
1147
  Et(m, s, t);
@@ -1153,20 +1153,20 @@ function at(e, t, r, i) {
1153
1153
  At(m, s, t);
1154
1154
  break;
1155
1155
  case "ref":
1156
- Tt(m, n, t);
1156
+ Tt(m, i, t);
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
- return { props: n, attrs: s, listeners: o };
1160
+ return { props: i, attrs: s, listeners: o };
1161
1161
  }
1162
1162
  function Be(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
- let a = o.props?.key ?? o.key;
1168
- if (!a) {
1169
- const b = o.tag || "node", l = [
1167
+ let c = o.props?.key ?? o.key;
1168
+ if (!c) {
1169
+ const b = o.tag || "node", f = [
1170
1170
  // attrs (kebab-case)
1171
1171
  o.props?.attrs?.id,
1172
1172
  o.props?.attrs?.name,
@@ -1176,68 +1176,68 @@ function Be(e, t) {
1176
1176
  o.props?.props?.name,
1177
1177
  o.props?.props?.dataKey,
1178
1178
  o.props?.props?.["data-key"]
1179
- ].find((d) => d != null) ?? "";
1180
- a = l ? `${t}:${b}:${l}` : `${t}:${b}`;
1179
+ ].find((h) => h != null) ?? "";
1180
+ c = f ? `${t}:${b}:${f}` : `${t}:${b}`;
1181
1181
  }
1182
- let u = a, m = 1;
1182
+ let u = c, m = 1;
1183
1183
  for (; s.has(u); )
1184
- u = `${a}#${m++}`;
1184
+ u = `${c}#${m++}`;
1185
1185
  s.add(u);
1186
1186
  let g = o.children;
1187
1187
  return Array.isArray(g) && (g = Be(g, u)), { ...o, key: u, children: g };
1188
1188
  });
1189
1189
  }
1190
1190
  const r = e;
1191
- let i = r.props?.key ?? r.key ?? t, n = r.children;
1192
- return Array.isArray(n) && (n = Be(n, i)), { ...r, key: i, children: n };
1191
+ let n = r.props?.key ?? r.key ?? t, i = r.children;
1192
+ return Array.isArray(i) && (i = Be(i, n)), { ...r, key: n, children: i };
1193
1193
  }
1194
- function Ve(e, t, r, i) {
1195
- const n = r.directives ?? {}, s = at(
1196
- n,
1194
+ function Ve(e, t, r, n) {
1195
+ const i = r.directives ?? {}, s = at(
1197
1196
  i,
1197
+ n,
1198
1198
  e,
1199
1199
  r.attrs
1200
1200
  ), o = {
1201
1201
  ...t.props,
1202
1202
  ...r.props,
1203
1203
  ...s.props
1204
- }, a = {
1204
+ }, c = {
1205
1205
  ...t.attrs,
1206
1206
  ...r.attrs,
1207
1207
  ...s.attrs
1208
1208
  }, u = t.props ?? {}, m = o, g = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
1209
  let b = !1;
1210
- for (const d in { ...u, ...m }) {
1211
- const x = u[d], w = m[d];
1212
- if (x !== w)
1213
- if (b = !0, d === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1210
+ for (const h in { ...u, ...m }) {
1211
+ const v = u[h], w = m[h];
1212
+ if (v !== w)
1213
+ if (b = !0, h === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
1214
  e.value !== w && (e.value = w ?? "");
1215
- else if (d === "checked" && e instanceof HTMLInputElement)
1215
+ else if (h === "checked" && e instanceof HTMLInputElement)
1216
1216
  e.checked = !!w;
1217
- else if (d.startsWith("on") && typeof w == "function") {
1218
- const c = ot(d);
1219
- typeof x == "function" && oe.removeListener(e, c, x), oe.addListener(e, c, w);
1217
+ else if (h.startsWith("on") && typeof w == "function") {
1218
+ const a = ot(h);
1219
+ typeof v == "function" && se.removeListener(e, a, v), se.addListener(e, a, w);
1220
1220
  } else if (w == null)
1221
- e.removeAttribute(d);
1222
- else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || d in e)
1221
+ e.removeAttribute(h);
1222
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || h in e)
1223
1223
  try {
1224
- e[d] = w;
1224
+ e[h] = w;
1225
1225
  } catch {
1226
1226
  }
1227
1227
  else
1228
- w === !1 && e.removeAttribute(d);
1228
+ w === !1 && e.removeAttribute(h);
1229
1229
  }
1230
- for (const [d, x] of Object.entries(
1230
+ for (const [h, v] of Object.entries(
1231
1231
  s.listeners || {}
1232
1232
  ))
1233
- oe.addListener(e, d, x);
1234
- const p = t.attrs ?? {}, l = a;
1235
- for (const d in { ...p, ...l }) {
1236
- const x = p[d], w = l[d];
1237
- let c = x, h = w;
1238
- if (ee(x) && (c = x.value), ee(w) && (h = w.value), c !== h)
1239
- if (b = !0, h == null || h === !1) {
1240
- if (e.removeAttribute(d), d === "value") {
1233
+ se.addListener(e, h, v);
1234
+ const p = t.attrs ?? {}, f = c;
1235
+ for (const h in { ...p, ...f }) {
1236
+ const v = p[h], w = f[h];
1237
+ let a = v, l = w;
1238
+ if (ee(v) && (a = v.value), ee(w) && (l = w.value), a !== l)
1239
+ if (b = !0, l == null || l === !1) {
1240
+ if (e.removeAttribute(h), h === "value") {
1241
1241
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
1242
1242
  try {
1243
1243
  e.value = "";
@@ -1254,66 +1254,66 @@ function Ve(e, t, r, i) {
1254
1254
  } catch {
1255
1255
  }
1256
1256
  }
1257
- if (d === "checked" && e instanceof HTMLInputElement)
1257
+ if (h === "checked" && e instanceof HTMLInputElement)
1258
1258
  try {
1259
1259
  e.checked = !1;
1260
1260
  } catch {
1261
1261
  }
1262
- if (d === "disabled")
1262
+ if (h === "disabled")
1263
1263
  try {
1264
1264
  e.disabled = !1;
1265
1265
  } catch {
1266
1266
  }
1267
1267
  } else {
1268
- if (d === "value") {
1268
+ if (h === "value") {
1269
1269
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1270
1270
  try {
1271
- e.value = h ?? "";
1271
+ e.value = l ?? "";
1272
1272
  } catch {
1273
- e.setAttribute(d, String(h));
1273
+ e.setAttribute(h, String(l));
1274
1274
  }
1275
1275
  continue;
1276
1276
  } else if (e instanceof HTMLSelectElement) {
1277
1277
  try {
1278
- e.value = h ?? "";
1278
+ e.value = l ?? "";
1279
1279
  } catch {
1280
1280
  }
1281
1281
  continue;
1282
1282
  } else if (e instanceof HTMLProgressElement) {
1283
1283
  try {
1284
- e.value = Number(h);
1284
+ e.value = Number(l);
1285
1285
  } catch {
1286
1286
  }
1287
1287
  continue;
1288
1288
  }
1289
1289
  }
1290
- if (d === "checked" && e instanceof HTMLInputElement) {
1290
+ if (h === "checked" && e instanceof HTMLInputElement) {
1291
1291
  try {
1292
- e.checked = !!h;
1292
+ e.checked = !!l;
1293
1293
  } catch {
1294
1294
  }
1295
1295
  continue;
1296
1296
  }
1297
- if (d === "style") {
1298
- e.setAttribute(d, String(h));
1297
+ if (h === "style") {
1298
+ e.setAttribute(h, String(l));
1299
1299
  continue;
1300
1300
  }
1301
1301
  const y = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
- if (g && !y && d.includes("-")) {
1303
- const k = it(d);
1302
+ if (g && !y && h.includes("-")) {
1303
+ const $ = it(h);
1304
1304
  try {
1305
- e[k] = h;
1305
+ e[$] = l;
1306
1306
  } catch {
1307
- e.setAttribute(d, String(h));
1307
+ e.setAttribute(h, String(l));
1308
1308
  }
1309
- } else if (!y && d in e)
1309
+ } else if (!y && h in e)
1310
1310
  try {
1311
- e[d] = h;
1311
+ e[h] = l;
1312
1312
  } catch {
1313
- e.setAttribute(d, String(h));
1313
+ e.setAttribute(h, String(l));
1314
1314
  }
1315
1315
  else
1316
- e.setAttribute(d, String(h));
1316
+ e.setAttribute(h, String(l));
1317
1317
  }
1318
1318
  }
1319
1319
  if (g && b)
@@ -1337,226 +1337,226 @@ function X(e, t, r) {
1337
1337
  return e.key != null && (p.key = e.key), p;
1338
1338
  }
1339
1339
  if (e.tag === "#anchor") {
1340
- const p = e, l = Array.isArray(p.children) ? p.children : [], d = document.createTextNode(""), x = document.createTextNode("");
1341
- p.key != null && (d.key = `${p.key}:start`, x.key = `${p.key}:end`), p._startNode = d, p._endNode = x;
1340
+ const p = e, f = Array.isArray(p.children) ? p.children : [], h = document.createTextNode(""), v = document.createTextNode("");
1341
+ p.key != null && (h.key = `${p.key}:start`, v.key = `${p.key}:end`), p._startNode = h, p._endNode = v;
1342
1342
  const w = document.createDocumentFragment();
1343
- w.appendChild(d);
1344
- for (const c of l) {
1345
- const h = X(c, t);
1346
- w.appendChild(h);
1347
- }
1348
- return w.appendChild(x), w;
1349
- }
1350
- const i = document.createElement(e.tag);
1351
- e.key != null && (i.key = e.key);
1352
- const { props: n = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = at(o, t, i, s), u = {
1353
- ...n,
1354
- ...a.props
1343
+ w.appendChild(h);
1344
+ for (const a of f) {
1345
+ const l = X(a, t);
1346
+ w.appendChild(l);
1347
+ }
1348
+ return w.appendChild(v), w;
1349
+ }
1350
+ const n = document.createElement(e.tag);
1351
+ e.key != null && (n.key = e.key);
1352
+ const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = at(o, t, n, s), u = {
1353
+ ...i,
1354
+ ...c.props
1355
1355
  }, m = {
1356
1356
  ...s,
1357
- ...a.attrs
1358
- }, g = i.namespaceURI === "http://www.w3.org/2000/svg";
1357
+ ...c.attrs
1358
+ }, g = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
1359
  for (const p in m) {
1360
- const l = m[p];
1360
+ const f = m[p];
1361
1361
  if (!(typeof p != "string" || /\[object Object\]/.test(p))) {
1362
- if (typeof l == "boolean")
1363
- l && i.setAttribute(p, "");
1364
- else if (l != null)
1365
- if (!g && p === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement || i instanceof HTMLProgressElement))
1362
+ if (typeof f == "boolean")
1363
+ f && n.setAttribute(p, "");
1364
+ else if (f != null)
1365
+ if (!g && p === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1366
1366
  try {
1367
- i instanceof HTMLProgressElement ? i.value = Number(l) : i.value = l ?? "";
1367
+ n instanceof HTMLProgressElement ? n.value = Number(f) : n.value = f ?? "";
1368
1368
  } catch {
1369
- i.setAttribute(p, String(l));
1369
+ n.setAttribute(p, String(f));
1370
1370
  }
1371
- else if (!g && p === "checked" && i instanceof HTMLInputElement)
1371
+ else if (!g && p === "checked" && n instanceof HTMLInputElement)
1372
1372
  try {
1373
- i.checked = !!l;
1373
+ n.checked = !!f;
1374
1374
  } catch {
1375
- i.setAttribute(p, String(l));
1375
+ n.setAttribute(p, String(f));
1376
1376
  }
1377
- else if (!g && p in i)
1377
+ else if (!g && p in n)
1378
1378
  try {
1379
- i[p] = l;
1379
+ n[p] = f;
1380
1380
  } catch {
1381
- i.setAttribute(p, String(l));
1381
+ n.setAttribute(p, String(f));
1382
1382
  }
1383
1383
  else if ((e.props?.isCustomElement ?? !1) && !g && p.includes("-")) {
1384
- const x = it(p);
1384
+ const v = it(p);
1385
1385
  try {
1386
- i[x] = l;
1386
+ n[v] = f;
1387
1387
  } catch {
1388
- i.setAttribute(p, String(l));
1388
+ n.setAttribute(p, String(f));
1389
1389
  }
1390
1390
  } else
1391
- i.setAttribute(p, String(l));
1391
+ n.setAttribute(p, String(f));
1392
1392
  }
1393
1393
  }
1394
1394
  for (const p in u) {
1395
- const l = u[p];
1395
+ const f = u[p];
1396
1396
  if (!(typeof p != "string" || /\[object Object\]/.test(p)))
1397
- if (p === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement)) {
1398
- const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1399
- i.value = d ?? "";
1400
- } else if (p === "checked" && i instanceof HTMLInputElement) {
1401
- const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1402
- i.checked = !!d;
1403
- } else if (p.startsWith("on") && typeof l == "function")
1404
- oe.addListener(i, ot(p), l);
1397
+ if (p === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
+ const h = typeof f == "object" && f !== null && typeof f.value < "u" ? f.value : f;
1399
+ n.value = h ?? "";
1400
+ } else if (p === "checked" && n instanceof HTMLInputElement) {
1401
+ const h = typeof f == "object" && f !== null && typeof f.value < "u" ? f.value : f;
1402
+ n.checked = !!h;
1403
+ } else if (p.startsWith("on") && typeof f == "function")
1404
+ se.addListener(n, ot(p), f);
1405
1405
  else {
1406
- if (p.startsWith("on") && l === void 0)
1406
+ if (p.startsWith("on") && f === void 0)
1407
1407
  continue;
1408
- if (l == null || l === !1)
1409
- i.removeAttribute(p);
1410
- else if ((e.props?.isCustomElement ?? !1) || p in i)
1408
+ if (f == null || f === !1)
1409
+ n.removeAttribute(p);
1410
+ else if ((e.props?.isCustomElement ?? !1) || p in n)
1411
1411
  try {
1412
- const x = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1413
- i[p] = x;
1412
+ const v = typeof f == "object" && f !== null && typeof f.value < "u" ? f.value : f;
1413
+ n[p] = v;
1414
1414
  } catch {
1415
1415
  }
1416
1416
  }
1417
1417
  }
1418
- for (const [p, l] of Object.entries(
1419
- a.listeners || {}
1418
+ for (const [p, f] of Object.entries(
1419
+ c.listeners || {}
1420
1420
  ))
1421
- oe.addListener(i, p, l);
1421
+ se.addListener(n, p, f);
1422
1422
  const b = {
1423
1423
  ...e,
1424
1424
  props: {
1425
1425
  ...e.props,
1426
- ...a.props
1426
+ ...c.props
1427
1427
  }
1428
1428
  };
1429
- pe(b, i, r);
1429
+ pe(b, n, r);
1430
1430
  try {
1431
- if (typeof i._applyProps == "function")
1431
+ if (typeof n._applyProps == "function")
1432
1432
  try {
1433
- i._applyProps(i._cfg);
1433
+ n._applyProps(n._cfg);
1434
1434
  } catch {
1435
1435
  }
1436
- typeof i.requestRender == "function" ? i.requestRender() : typeof i._render == "function" && i._render(i._cfg);
1436
+ typeof n.requestRender == "function" ? n.requestRender() : typeof n._render == "function" && n._render(n._cfg);
1437
1437
  } catch {
1438
1438
  }
1439
1439
  if (Array.isArray(e.children))
1440
1440
  for (const p of e.children)
1441
- i.appendChild(X(p, t, r));
1442
- else typeof e.children == "string" && (i.textContent = e.children);
1441
+ n.appendChild(X(p, t, r));
1442
+ else typeof e.children == "string" && (n.textContent = e.children);
1443
1443
  try {
1444
- if (i instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1444
+ if (n instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1445
1445
  try {
1446
- i.value = m.value ?? "";
1446
+ n.value = m.value ?? "";
1447
1447
  } catch {
1448
1448
  }
1449
1449
  } catch {
1450
1450
  }
1451
- return i;
1451
+ return n;
1452
1452
  }
1453
- function Rt(e, t, r, i, n) {
1453
+ function Rt(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
- const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
1460
- for (const l of o)
1461
- l && l.key != null && a.set(l.key, l);
1459
+ const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], c = /* @__PURE__ */ new Map();
1460
+ for (const f of o)
1461
+ f && f.key != null && c.set(f.key, f);
1462
1462
  const u = /* @__PURE__ */ new Map();
1463
- for (const l of s) {
1464
- const d = l.key;
1465
- d != null && u.set(d, l);
1463
+ for (const f of s) {
1464
+ const h = f.key;
1465
+ h != null && u.set(h, f);
1466
1466
  }
1467
1467
  const m = /* @__PURE__ */ new Set();
1468
1468
  let g = e.firstChild;
1469
- function b(l, d) {
1470
- let x = l;
1471
- for (; x && (m.add(x), x !== d); )
1472
- x = x.nextSibling;
1473
- }
1474
- function p(l, d, x, w) {
1475
- const c = [];
1476
- let h = l.nextSibling;
1477
- for (; h && h !== d; )
1478
- c.push(h), h = h.nextSibling;
1479
- const y = Array.isArray(x) ? x : [];
1480
- if (w.some(($) => $ && $.key != null) || y.some(($) => $ && $.key != null)) {
1481
- const $ = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1469
+ function b(f, h) {
1470
+ let v = f;
1471
+ for (; v && (m.add(v), v !== h); )
1472
+ v = v.nextSibling;
1473
+ }
1474
+ function p(f, h, v, w) {
1475
+ const a = [];
1476
+ let l = f.nextSibling;
1477
+ for (; l && l !== h; )
1478
+ a.push(l), l = l.nextSibling;
1479
+ const y = Array.isArray(v) ? v : [];
1480
+ if (w.some((k) => k && k.key != null) || y.some((k) => k && k.key != null)) {
1481
+ const k = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
1482
1482
  for (const C of y)
1483
- C && C.key != null && $.set(C.key, C);
1484
- for (const C of c) {
1483
+ C && C.key != null && k.set(C.key, C);
1484
+ for (const C of a) {
1485
1485
  const E = C.key;
1486
- E != null && f.set(E, C);
1486
+ E != null && d.set(E, C);
1487
1487
  }
1488
- const v = /* @__PURE__ */ new Set();
1489
- let A = l.nextSibling;
1488
+ const x = /* @__PURE__ */ new Set();
1489
+ let A = f.nextSibling;
1490
1490
  for (const C of w) {
1491
1491
  let E;
1492
- if (C.key != null && f.has(C.key)) {
1493
- const T = $.get(C.key);
1492
+ if (C.key != null && d.has(C.key)) {
1493
+ const T = k.get(C.key);
1494
1494
  E = Ee(
1495
- f.get(C.key),
1495
+ d.get(C.key),
1496
1496
  T,
1497
1497
  C,
1498
- i
1499
- ), v.add(E), E !== A && e.contains(E) && e.insertBefore(E, A);
1498
+ n
1499
+ ), x.add(E), E !== A && e.contains(E) && e.insertBefore(E, A);
1500
1500
  } else
1501
- E = X(C, i), e.insertBefore(E, A), v.add(E);
1501
+ E = X(C, n), e.insertBefore(E, A), x.add(E);
1502
1502
  A = E.nextSibling;
1503
1503
  }
1504
- for (const C of c)
1505
- !v.has(C) && e.contains(C) && e.removeChild(C);
1504
+ for (const C of a)
1505
+ !x.has(C) && e.contains(C) && e.removeChild(C);
1506
1506
  } else {
1507
- const $ = Math.min(
1507
+ const k = Math.min(
1508
1508
  y.length,
1509
1509
  w.length
1510
1510
  );
1511
- for (let f = 0; f < $; f++) {
1512
- const v = y[f], A = w[f], C = Ee(c[f], v, A, i);
1513
- C !== c[f] && (e.insertBefore(C, c[f]), e.removeChild(c[f]));
1511
+ for (let d = 0; d < k; d++) {
1512
+ const x = y[d], A = w[d], C = Ee(a[d], x, A, n);
1513
+ C !== a[d] && (e.insertBefore(C, a[d]), e.removeChild(a[d]));
1514
1514
  }
1515
- for (let f = $; f < w.length; f++)
1516
- e.insertBefore(X(w[f], i), d);
1517
- for (let f = $; f < c.length; f++)
1518
- e.removeChild(c[f]);
1519
- }
1520
- }
1521
- for (const l of r) {
1522
- let d;
1523
- if (l.tag === "#anchor") {
1524
- const x = l.key, w = `${x}:start`, c = `${x}:end`;
1525
- let h = u.get(w), y = u.get(c);
1526
- const k = Array.isArray(l.children) ? l.children : [];
1527
- if (h || (h = document.createTextNode(""), h.key = w), y || (y = document.createTextNode(""), y.key = c), l._startNode = h, l._endNode = y, !e.contains(h) || !e.contains(y)) {
1528
- e.insertBefore(h, g);
1529
- for (const $ of k)
1530
- e.insertBefore(X($, i), g);
1515
+ for (let d = k; d < w.length; d++)
1516
+ e.insertBefore(X(w[d], n), h);
1517
+ for (let d = k; d < a.length; d++)
1518
+ e.removeChild(a[d]);
1519
+ }
1520
+ }
1521
+ for (const f of r) {
1522
+ let h;
1523
+ if (f.tag === "#anchor") {
1524
+ const v = f.key, w = `${v}:start`, a = `${v}:end`;
1525
+ let l = u.get(w), y = u.get(a);
1526
+ const $ = Array.isArray(f.children) ? f.children : [];
1527
+ if (l || (l = document.createTextNode(""), l.key = w), y || (y = document.createTextNode(""), y.key = a), f._startNode = l, f._endNode = y, !e.contains(l) || !e.contains(y)) {
1528
+ e.insertBefore(l, g);
1529
+ for (const k of $)
1530
+ e.insertBefore(X(k, n), g);
1531
1531
  e.insertBefore(y, g);
1532
1532
  } else
1533
1533
  p(
1534
- h,
1534
+ l,
1535
1535
  y,
1536
- a.get(x)?.children,
1537
- k
1536
+ c.get(v)?.children,
1537
+ $
1538
1538
  );
1539
- b(h, y), g = y.nextSibling;
1539
+ b(l, y), g = y.nextSibling;
1540
1540
  continue;
1541
1541
  }
1542
- if (l.key != null && u.has(l.key)) {
1543
- const x = a.get(l.key);
1544
- d = Ee(
1545
- u.get(l.key),
1546
- x,
1547
- l,
1548
- i,
1549
- n
1550
- ), m.add(d), d !== g && e.contains(d) && (g && !e.contains(g) && (g = null), e.insertBefore(d, g));
1542
+ if (f.key != null && u.has(f.key)) {
1543
+ const v = c.get(f.key);
1544
+ h = Ee(
1545
+ u.get(f.key),
1546
+ v,
1547
+ f,
1548
+ n,
1549
+ i
1550
+ ), m.add(h), h !== g && e.contains(h) && (g && !e.contains(g) && (g = null), e.insertBefore(h, g));
1551
1551
  } else
1552
- d = X(l, i, n), g && !e.contains(g) && (g = null), e.insertBefore(d, g), m.add(d);
1553
- g = d.nextSibling;
1552
+ h = X(f, n, i), g && !e.contains(g) && (g = null), e.insertBefore(h, g), m.add(h);
1553
+ g = h.nextSibling;
1554
1554
  }
1555
- for (const l of s)
1556
- !m.has(l) && e.contains(l) && (ue(l, n), e.removeChild(l));
1555
+ for (const f of s)
1556
+ !m.has(f) && e.contains(f) && (le(f, i), e.removeChild(f));
1557
1557
  }
1558
- function Ee(e, t, r, i, n) {
1559
- if (t && typeof t != "string" && t.props?.ref && n && ue(e, n), t === r) return e;
1558
+ function Ee(e, t, r, n, i) {
1559
+ if (t && typeof t != "string" && t.props?.ref && i && le(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,84 +1566,84 @@ function Ee(e, t, r, i, n) {
1566
1566
  }
1567
1567
  }
1568
1568
  if (r && typeof r != "string" && r.tag === "#anchor") {
1569
- const o = r, a = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""), m = o._endNode ?? document.createTextNode("");
1569
+ const o = r, c = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""), m = o._endNode ?? document.createTextNode("");
1570
1570
  o.key != null && (u.key = `${o.key}:start`, m.key = `${o.key}:end`), o._startNode = u, o._endNode = m;
1571
1571
  const g = document.createDocumentFragment();
1572
1572
  g.appendChild(u);
1573
- for (const b of a) {
1574
- const p = X(b, i);
1573
+ for (const b of c) {
1574
+ const p = X(b, n);
1575
1575
  g.appendChild(p);
1576
1576
  }
1577
1577
  return g.appendChild(m), e.parentNode?.replaceChild(g, e), u;
1578
1578
  }
1579
1579
  if (!r) {
1580
- ue(e, n);
1580
+ le(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, n);
1586
- const o = X(r, i, n);
1587
- return pe(r, o, n), e.parentNode?.replaceChild(o, e), o;
1585
+ le(e, i);
1586
+ const o = X(r, n, i);
1587
+ return pe(r, o, i), e.parentNode?.replaceChild(o, e), o;
1588
1588
  }
1589
1589
  if (r.tag === "#anchor") {
1590
- const o = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), u = r._endNode ?? document.createTextNode("");
1591
- r.key != null && (a.key = `${r.key}:start`, u.key = `${r.key}:end`), r._startNode = a, r._endNode = u;
1590
+ const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), u = r._endNode ?? document.createTextNode("");
1591
+ r.key != null && (c.key = `${r.key}:start`, u.key = `${r.key}:end`), r._startNode = c, r._endNode = u;
1592
1592
  const m = document.createDocumentFragment();
1593
- m.appendChild(a);
1593
+ m.appendChild(c);
1594
1594
  for (const g of o)
1595
- m.appendChild(X(g, i));
1596
- return m.appendChild(u), e.parentNode?.replaceChild(m, e), a;
1595
+ m.appendChild(X(g, n));
1596
+ return m.appendChild(u), e.parentNode?.replaceChild(m, 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 Ve(o, t.props || {}, r.props || {}, i), Rt(o, t.children, r.children, i, n), pe(r, o, n), o;
1600
+ return Ve(o, t.props || {}, r.props || {}, n), Rt(o, t.children, r.children, n, i), pe(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
- const a = e;
1605
- return Ve(a, t.props || {}, r.props || {}, i), pe(r, a, n), a;
1604
+ const c = e;
1605
+ return Ve(c, t.props || {}, r.props || {}, n), pe(r, c, i), c;
1606
1606
  } catch {
1607
1607
  }
1608
- ue(e, n);
1609
- const s = X(r, i, n);
1610
- return pe(r, s, n), e.parentNode?.replaceChild(s, e), s;
1608
+ le(e, i);
1609
+ const s = X(r, n, i);
1610
+ return pe(r, s, i), e.parentNode?.replaceChild(s, e), s;
1611
1611
  }
1612
- function Ot(e, t, r, i) {
1613
- let n;
1614
- Array.isArray(t) ? t.length === 1 ? (n = t[0], n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })) : n = { tag: "div", key: "__root__", children: t } : (n = t, n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })), n && typeof n == "object" && n.tag === "#anchor" && (n = {
1612
+ function Ot(e, t, r, n) {
1613
+ let i;
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
- children: [n]
1619
- }), n = Be(n, String(n.key ?? "root"));
1618
+ children: [i]
1619
+ }), i = Be(i, String(i.key ?? "root"));
1620
1620
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
1621
- let a;
1622
- s && o ? typeof s != "string" && typeof n != "string" && s.tag === n.tag && s.key === n.key ? a = Ee(o, s, n, r, i) : (a = X(n, r, i), e.replaceChild(a, o)) : (a = X(n, r, i), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
1621
+ let c;
1622
+ s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = Ee(o, s, i, r, n) : (c = X(i, r, n), e.replaceChild(c, o)) : (c = X(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
1623
1623
  const u = [];
1624
1624
  for (let m = 0; m < e.childNodes.length; m++) {
1625
1625
  const g = e.childNodes[m];
1626
- g !== a && g.nodeName !== "STYLE" && (ue(g, i), u.push(g));
1626
+ g !== c && g.nodeName !== "STYLE" && (le(g, n), u.push(g));
1627
1627
  }
1628
- u.forEach((m) => e.removeChild(m)), e._prevVNode = n, e._prevDom = a;
1628
+ u.forEach((m) => e.removeChild(m)), e._prevVNode = i, e._prevDom = c;
1629
1629
  }
1630
1630
  function Pe(e) {
1631
- if (typeof e == "string") return ie(e);
1631
+ if (typeof e == "string") return de(e);
1632
1632
  if (e.tag === "#text")
1633
- return typeof e.children == "string" ? ie(e.children) : "";
1633
+ return typeof e.children == "string" ? de(e.children) : "";
1634
1634
  if (e.tag === "#anchor")
1635
1635
  return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Pe).join("");
1636
1636
  let t = "";
1637
- e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([n, s]) => ` ${n}="${ie(String(s))}"`).join(""));
1637
+ e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${de(String(s))}"`).join(""));
1638
1638
  let r = "";
1639
- e.props && (r = Object.entries(e.props).filter(([n]) => n !== "attrs" && n !== "directives" && n !== "ref" && n !== "key").map(([n, s]) => ` ${n}="${ie(String(s))}"`).join(""));
1640
- const i = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? ie(e.children) : e.children ? Pe(e.children) : "";
1641
- return `<${e.tag}${t}${r}>${i}</${e.tag}>`;
1639
+ e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${de(String(s))}"`).join(""));
1640
+ const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? de(e.children) : e.children ? Pe(e.children) : "";
1641
+ return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
1642
1642
  }
1643
1643
  function Pt(e, ...t) {
1644
1644
  let r = "";
1645
- for (let i = 0; i < e.length; i++)
1646
- r += e[i], i < t.length && (r += t[i]);
1645
+ for (let n = 0; n < e.length; n++)
1646
+ r += e[n], n < t.length && (r += t[n]);
1647
1647
  return r;
1648
1648
  }
1649
1649
  function ct(e) {
@@ -1671,7 +1671,7 @@ const Mt = Pt`
1671
1671
  }
1672
1672
  :host {
1673
1673
  display: contents;
1674
- font: 16px/1.5 ui-sans-serif, system-ui, sans-serif;
1674
+ font: 16px/1.5 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
1675
1675
  -webkit-text-size-adjust: 100%;
1676
1676
  text-size-adjust: 100%;
1677
1677
  }
@@ -1814,13 +1814,13 @@ const Mt = Pt`
1814
1814
  Object.entries(jt).map(([e, t]) => [
1815
1815
  e,
1816
1816
  Object.fromEntries(
1817
- Object.entries(t).map(([r, i]) => [
1817
+ Object.entries(t).map(([r, n]) => [
1818
1818
  r,
1819
- `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${i})`
1819
+ `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${n})`
1820
1820
  ])
1821
1821
  )
1822
1822
  ])
1823
- ), le = "0.25rem", Nt = {
1823
+ ), ce = "0.25rem", Nt = {
1824
1824
  // Tailwind container widths
1825
1825
  // 3xs: 16rem => 16 / 0.25 = 64
1826
1826
  "3xs": 64,
@@ -1851,18 +1851,18 @@ const Mt = Pt`
1851
1851
  }, zt = () => {
1852
1852
  const e = {};
1853
1853
  for (const [t, r] of Object.entries(Nt))
1854
- e[`max-w-${t}`] = `max-width:calc(${le} * ${r});`, e[`min-w-${t}`] = `min-width:calc(${le} * ${r});`, e[`w-${t}`] = `width:calc(${le} * ${r});`, e[`max-h-${t}`] = `max-height:calc(${le} * ${r});`, e[`min-h-${t}`] = `min-height:calc(${le} * ${r});`, e[`h-${t}`] = `height:calc(${le} * ${r});`;
1854
+ e[`max-w-${t}`] = `max-width:calc(${ce} * ${r});`, e[`min-w-${t}`] = `min-width:calc(${ce} * ${r});`, e[`w-${t}`] = `width:calc(${ce} * ${r});`, e[`max-h-${t}`] = `max-height:calc(${ce} * ${r});`, e[`min-h-${t}`] = `min-height:calc(${ce} * ${r});`, e[`h-${t}`] = `height:calc(${ce} * ${r});`;
1855
1855
  return e;
1856
- }, Dt = () => {
1856
+ }, It = () => {
1857
1857
  const e = {}, t = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
1858
1858
  for (const r of t)
1859
1859
  e[`grid-cols-${r}`] = `grid-template-columns:repeat(${r},minmax(0,1fr));`, e[`grid-rows-${r}`] = `grid-template-rows:repeat(${r},minmax(0,1fr));`, e[`col-span-${r}`] = `grid-column:span ${r} / span ${r};`, e[`row-span-${r}`] = `grid-row:span ${r} / span ${r};`, e[`col-start-${r}`] = `grid-column-start:${r};`, e[`col-end-${r}`] = `grid-column-end:${r};`, e[`row-start-${r}`] = `grid-row-start:${r};`, e[`row-end-${r}`] = `grid-row-end:${r};`;
1860
1860
  return e["grid-cols-none"] = "grid-template-columns:none;", e["grid-rows-none"] = "grid-template-rows:none;", e["col-span-full"] = "grid-column:1 / -1;", e["row-span-full"] = "grid-row:1 / -1;", e["auto-cols-auto"] = "grid-auto-columns:auto;", e["auto-cols-min"] = "grid-auto-columns:min-content;", e["auto-cols-max"] = "grid-auto-columns:max-content;", e["auto-cols-fr"] = "grid-auto-columns:1fr;", e["auto-rows-auto"] = "grid-auto-rows:auto;", e["auto-rows-min"] = "grid-auto-rows:min-content;", e["auto-rows-max"] = "grid-auto-rows:max-content;", e["auto-rows-fr"] = "grid-auto-rows:1fr;", e["grid-flow-row"] = "grid-auto-flow:row;", e["grid-flow-col"] = "grid-auto-flow:column;", e["grid-flow-row-dense"] = "grid-auto-flow:row dense;", e["grid-flow-col-dense"] = "grid-auto-flow:column dense;", e;
1861
- }, It = () => {
1861
+ }, Dt = () => {
1862
1862
  const e = {}, t = [0, 1, 2, 4, 6, 8];
1863
1863
  for (const r of t) {
1864
- const i = `${r}px`;
1865
- e[`border-${r}`] = `border-width:${i};`, e[`border-s-${r}`] = `border-inline-start-width:${i};`, e[`border-e-${r}`] = `border-inline-end-width:${i};`, e[`border-bs-${r}`] = `border-block-start-width:${i};`, e[`border-be-${r}`] = `border-block-end-width:${i};`, e[`border-x-${r}`] = `border-inline-width:${i};`, e[`border-y-${r}`] = `border-block-width:${i};`, e[`border-t-${r}`] = `border-top-width:${i};`, e[`border-r-${r}`] = `border-right-width:${i};`, e[`border-b-${r}`] = `border-bottom-width:${i};`, e[`border-l-${r}`] = `border-left-width:${i};`;
1864
+ const n = `${r}px`;
1865
+ e[`border-${r}`] = `border-width:${n};`, e[`border-s-${r}`] = `border-inline-start-width:${n};`, e[`border-e-${r}`] = `border-inline-end-width:${n};`, e[`border-bs-${r}`] = `border-block-start-width:${n};`, e[`border-be-${r}`] = `border-block-end-width:${n};`, e[`border-x-${r}`] = `border-inline-width:${n};`, e[`border-y-${r}`] = `border-block-width:${n};`, e[`border-t-${r}`] = `border-top-width:${n};`, e[`border-r-${r}`] = `border-right-width:${n};`, e[`border-b-${r}`] = `border-bottom-width:${n};`, e[`border-l-${r}`] = `border-left-width:${n};`;
1866
1866
  }
1867
1867
  return 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;", e["border-s"] = "border-inline-start-width:1px;", e["border-e"] = "border-inline-end-width:1px;", e["border-bs"] = "border-block-start-width:1px;", e["border-be"] = "border-block-end-width:1px;", e;
1868
1868
  }, Ht = () => {
@@ -1878,9 +1878,9 @@ const Mt = Pt`
1878
1878
  "4xl": 32,
1879
1879
  full: 9999
1880
1880
  };
1881
- for (const [r, i] of Object.entries(t)) {
1882
- const n = i === 9999 ? "9999px" : `${i / 16}rem`;
1883
- e[`rounded-${r}`] = `border-radius:${n};`, e[`rounded-s-${r}`] = `border-start-start-radius:${n};border-end-start-radius:${n};`, e[`rounded-e-${r}`] = `border-start-end-radius:${n};border-end-end-radius:${n};`, e[`rounded-t-${r}`] = `border-top-left-radius:${n};border-top-right-radius:${n};`, e[`rounded-r-${r}`] = `border-top-right-radius:${n};border-bottom-right-radius:${n};`, e[`rounded-b-${r}`] = `border-bottom-left-radius:${n};border-bottom-right-radius:${n};`, e[`rounded-l-${r}`] = `border-top-left-radius:${n};border-bottom-left-radius:${n};`, e[`rounded-x-${r}`] = `border-top-left-radius:${n};border-bottom-left-radius:${n};border-top-right-radius:${n};border-bottom-right-radius:${n};`, e[`rounded-y-${r}`] = `border-top-left-radius:${n};border-top-right-radius:${n};border-bottom-left-radius:${n};border-bottom-right-radius:${n};`;
1881
+ for (const [r, n] of Object.entries(t)) {
1882
+ const i = n === 9999 ? "9999px" : `${n / 16}rem`;
1883
+ e[`rounded-${r}`] = `border-radius:${i};`, e[`rounded-s-${r}`] = `border-start-start-radius:${i};border-end-start-radius:${i};`, e[`rounded-e-${r}`] = `border-start-end-radius:${i};border-end-end-radius:${i};`, e[`rounded-t-${r}`] = `border-top-left-radius:${i};border-top-right-radius:${i};`, e[`rounded-r-${r}`] = `border-top-right-radius:${i};border-bottom-right-radius:${i};`, e[`rounded-b-${r}`] = `border-bottom-left-radius:${i};border-bottom-right-radius:${i};`, e[`rounded-l-${r}`] = `border-top-left-radius:${i};border-bottom-left-radius:${i};`, e[`rounded-x-${r}`] = `border-top-left-radius:${i};border-bottom-left-radius:${i};border-top-right-radius:${i};border-bottom-right-radius:${i};`, e[`rounded-y-${r}`] = `border-top-left-radius:${i};border-top-right-radius:${i};border-bottom-left-radius:${i};border-bottom-right-radius:${i};`;
1884
1884
  }
1885
1885
  return e;
1886
1886
  }, Le = {
@@ -1929,7 +1929,7 @@ const Mt = Pt`
1929
1929
  "sr-only": "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",
1930
1930
  "not-sr-only": "position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;",
1931
1931
  /* Grid Layout & Placement */
1932
- ...Dt(),
1932
+ ...It(),
1933
1933
  /* Positioning */
1934
1934
  absolute: "position:absolute;",
1935
1935
  relative: "position:relative;",
@@ -1966,7 +1966,7 @@ const Mt = Pt`
1966
1966
  "text-7xl": "font-size:4.5rem;line-height:1",
1967
1967
  "text-8xl": "font-size:6rem;line-height:1",
1968
1968
  /* Borders */
1969
- ...It(),
1969
+ ...Dt(),
1970
1970
  ...Ht(),
1971
1971
  /* Shadow and effects */
1972
1972
  // Shadows use a CSS variable for color so color utilities can modify --ce-shadow-color
@@ -2019,9 +2019,9 @@ const Mt = Pt`
2019
2019
  "grow-0": "flex-grow:0;",
2020
2020
  "shrink-0": "flex-shrink:0;",
2021
2021
  /* Font Family */
2022
- "font-sans": "font-family:ui-sans-serif,system-ui,sans-serif;",
2023
- "font-serif": "font-family:ui-serif,Georgia,serif;",
2024
- "font-mono": "font-family:ui-monospace,SFMono-Regular,monospace;",
2022
+ "font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
2023
+ "font-serif": "font-family:var(--font-serif, ui-serif,Georgia,serif);",
2024
+ "font-mono": "font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",
2025
2025
  /* Line Clamp (for webkit) */
2026
2026
  "line-clamp-1": "display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;",
2027
2027
  "line-clamp-2": "display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;",
@@ -2084,15 +2084,15 @@ const Mt = Pt`
2084
2084
  "gap-y": ["row-gap"]
2085
2085
  };
2086
2086
  function G(e, t) {
2087
- let r = 0, i = 0;
2088
- for (let n = 0; n < e.length; n++) {
2089
- const s = e[n];
2087
+ let r = 0, n = 0;
2088
+ for (let i = 0; i < e.length; i++) {
2089
+ const s = e[i];
2090
2090
  if (s === "[") r++;
2091
2091
  else if (s === "]" && r > 0) r--;
2092
- else if (s === "(") i++;
2093
- else if (s === ")" && i > 0) i--;
2094
- else if (r === 0 && i === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2095
- return e.slice(0, n) + t + e.slice(n);
2092
+ else if (s === "(") n++;
2093
+ else if (s === ")" && n > 0) n--;
2094
+ else if (r === 0 && n === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2095
+ return e.slice(0, i) + t + e.slice(i);
2096
2096
  }
2097
2097
  return e + t;
2098
2098
  }
@@ -2130,24 +2130,24 @@ const Bt = {
2130
2130
  dark: "(prefers-color-scheme: dark)"
2131
2131
  }, je = ["sm", "md", "lg", "xl", "2xl"];
2132
2132
  function We(e) {
2133
- const t = e.startsWith("-"), i = (t ? e.slice(1) : e).split("-");
2134
- if (i.length < 2) return null;
2135
- const n = i.slice(0, -1).join("-"), s = i[i.length - 1], o = parseFloat(s);
2136
- if (Number.isNaN(o) || !Ze[n]) return null;
2137
- const a = t ? "-" : "";
2138
- return Ze[n].map((u) => `${u}:calc(${a}${le} * ${o});`).join("");
2133
+ const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
2134
+ if (n.length < 2) return null;
2135
+ const i = n.slice(0, -1).join("-"), s = n[n.length - 1], o = parseFloat(s);
2136
+ if (Number.isNaN(o) || !Ze[i]) return null;
2137
+ const c = t ? "-" : "";
2138
+ return Ze[i].map((u) => `${u}:calc(${c}${ce} * ${o});`).join("");
2139
2139
  }
2140
2140
  function Ge(e) {
2141
- const t = e.replace("#", ""), r = parseInt(t, 16), i = r >> 16 & 255, n = r >> 8 & 255, s = r & 255;
2142
- return `${i} ${n} ${s}`;
2141
+ const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, i = r >> 8 & 255, s = r & 255;
2142
+ return `${n} ${i} ${s}`;
2143
2143
  }
2144
2144
  function Ut(e) {
2145
2145
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2146
2146
  if (!t) return null;
2147
- const [, r, i, n = "DEFAULT"] = t, s = Wt[i]?.[n];
2147
+ const [, r, n, i = "DEFAULT"] = t, s = Wt[n]?.[i];
2148
2148
  if (!s) return null;
2149
2149
  if (r === "shadow") return `--ce-shadow-color:${s};`;
2150
- const a = {
2150
+ const c = {
2151
2151
  bg: "background-color",
2152
2152
  decoration: "text-decoration-color",
2153
2153
  text: "color",
@@ -2158,35 +2158,35 @@ function Ut(e) {
2158
2158
  fill: "fill",
2159
2159
  stroke: "stroke"
2160
2160
  }[r];
2161
- return a ? `${a}:${s};` : null;
2161
+ return c ? `${c}:${s};` : null;
2162
2162
  }
2163
2163
  function qt(e) {
2164
2164
  const [t, r] = e.split("/");
2165
2165
  if (!r) return { base: t };
2166
- const i = parseInt(r, 10);
2167
- return isNaN(i) || i < 0 || i > 100 ? { base: t } : { base: t, opacity: i / 100 };
2166
+ const n = parseInt(r, 10);
2167
+ return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
2168
2168
  }
2169
2169
  function Ne(e) {
2170
- const { base: t, opacity: r } = qt(e), i = Ut(t);
2171
- if (i) {
2170
+ const { base: t, opacity: r } = qt(e), n = Ut(t);
2171
+ if (n) {
2172
2172
  if (r !== void 0) {
2173
- const s = /#([0-9a-f]{6})/i.exec(i);
2173
+ const s = /#([0-9a-f]{6})/i.exec(n);
2174
2174
  if (s) {
2175
2175
  const o = Ge(s[0]);
2176
- return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2176
+ return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2177
2177
  }
2178
2178
  }
2179
- return i;
2179
+ return n;
2180
2180
  }
2181
- const n = Se(t);
2182
- if (n && r !== void 0) {
2183
- const s = /#([0-9a-f]{6})/i.exec(n);
2181
+ const i = Se(t);
2182
+ if (i && r !== void 0) {
2183
+ const s = /#([0-9a-f]{6})/i.exec(i);
2184
2184
  if (s) {
2185
2185
  const o = Ge(s[0]);
2186
- return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2186
+ return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2187
2187
  }
2188
2188
  }
2189
- return n;
2189
+ return i;
2190
2190
  }
2191
2191
  function ze(e) {
2192
2192
  const t = /^opacity-(\d{1,3})$/.exec(e);
@@ -2196,19 +2196,19 @@ function ze(e) {
2196
2196
  }
2197
2197
  function Se(e) {
2198
2198
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
2199
- const n = e.slice(1, -1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);
2200
- if (n) {
2201
- const s = n[1].trim();
2202
- let o = n[2].trim();
2199
+ const i = e.slice(1, -1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);
2200
+ if (i) {
2201
+ const s = i[1].trim();
2202
+ let o = i[2].trim();
2203
2203
  return o = o.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), o = o.replace(/^'([^']*)'$/g, '"$1"'), `${s}:${o};`;
2204
2204
  }
2205
2205
  return null;
2206
2206
  }
2207
2207
  const t = e.indexOf("-["), r = e.endsWith("]");
2208
2208
  if (t > 0 && r) {
2209
- const i = e.slice(0, t);
2210
- let n = e.slice(t + 2, -1);
2211
- n = n.replace(/_/g, " ");
2209
+ const n = e.slice(0, t);
2210
+ let i = e.slice(t + 2, -1);
2211
+ i = i.replace(/_/g, " ");
2212
2212
  const s = {
2213
2213
  bg: "background-color",
2214
2214
  text: "color",
@@ -2253,10 +2253,10 @@ function Se(e) {
2253
2253
  leading: "line-height",
2254
2254
  z: "z-index"
2255
2255
  };
2256
- if (i === "rotate")
2257
- return `transform:rotate(${n});`;
2258
- const o = s[i] ?? i.replace(/_/g, "-");
2259
- if (o && n) return `${o}:${n};`;
2256
+ if (n === "rotate")
2257
+ return `transform:rotate(${i});`;
2258
+ const o = s[n] ?? n.replace(/_/g, "-");
2259
+ if (o && i) return `${o}:${i};`;
2260
2260
  }
2261
2261
  return null;
2262
2262
  }
@@ -2277,10 +2277,10 @@ function Kt(e) {
2277
2277
  }
2278
2278
  function Vt(e) {
2279
2279
  const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
2280
- let i;
2281
- for (; i = t.exec(e); ) {
2282
- const n = i[2].split(/\s+/).filter(Boolean);
2283
- n.length && r.push(...n);
2280
+ let n;
2281
+ for (; n = t.exec(e); ) {
2282
+ const i = n[2].split(/\s+/).filter(Boolean);
2283
+ i.length && r.push(...i);
2284
2284
  }
2285
2285
  return r.filter(Boolean);
2286
2286
  }
@@ -2288,27 +2288,27 @@ const Xe = /* @__PURE__ */ new Map(), Jt = 16;
2288
2288
  function Zt(e) {
2289
2289
  const t = Date.now(), r = Xe.get(e);
2290
2290
  if (r && t - r.timestamp < Jt) return r.css;
2291
- const i = Vt(e), n = new Set(i), s = [], o = [], a = [], u = [], m = {};
2292
- function g(w, c = !1) {
2293
- const h = (c ? "dark|" : "") + w;
2294
- if (h in m) return m[h];
2295
- const y = d(w, c);
2296
- return m[h] = y, y;
2291
+ const n = Vt(e), i = new Set(n), s = [], o = [], c = [], u = [], m = {};
2292
+ function g(w, a = !1) {
2293
+ const l = (a ? "dark|" : "") + w;
2294
+ if (l in m) return m[l];
2295
+ const y = h(w, a);
2296
+ return m[l] = y, y;
2297
2297
  }
2298
2298
  function b(w) {
2299
- const c = w.some((y) => je.includes(y)), h = w.includes("dark");
2300
- return w.length === 0 ? 1 : !c && !h ? 2 : c && !h ? 3 : 4;
2299
+ const a = w.some((y) => je.includes(y)), l = w.includes("dark");
2300
+ return w.length === 0 ? 1 : !a && !l ? 2 : a && !l ? 3 : 4;
2301
2301
  }
2302
2302
  function p(w) {
2303
- const c = [];
2304
- let h = "", y = 0, k = 0;
2305
- for (let $ = 0; $ < w.length; $++) {
2306
- const f = w[$];
2307
- f === "[" ? y++ : f === "]" && y > 0 ? y-- : f === "(" ? k++ : f === ")" && k > 0 && k--, f === ":" && y === 0 && k === 0 ? (c.push(h), h = "") : h += f;
2303
+ const a = [];
2304
+ let l = "", y = 0, $ = 0;
2305
+ for (let k = 0; k < w.length; k++) {
2306
+ const d = w[k];
2307
+ d === "[" ? y++ : d === "]" && y > 0 ? y-- : d === "(" ? $++ : d === ")" && $ > 0 && $--, d === ":" && y === 0 && $ === 0 ? (a.push(l), l = "") : l += d;
2308
2308
  }
2309
- return h && c.push(h), c;
2309
+ return l && a.push(l), a;
2310
2310
  }
2311
- function l(w) {
2311
+ function f(w) {
2312
2312
  switch (w) {
2313
2313
  case "hover":
2314
2314
  return ":hover";
@@ -2338,17 +2338,17 @@ function Zt(e) {
2338
2338
  return null;
2339
2339
  }
2340
2340
  }
2341
- function d(w, c = !1) {
2342
- const h = p(w);
2341
+ function h(w, a = !1) {
2342
+ const l = p(w);
2343
2343
  let y = !1;
2344
- const k = h.find((_) => (_.startsWith("!") && (y = !0, _ = _.slice(1)), Le[_] || We(_) || ze(_) || Ne(_) || Se(_)));
2345
- if (!k) return null;
2346
- const $ = k.replace(/^!/, ""), f = Le[$] ?? We($) ?? ze($) ?? Ne($) ?? Se($);
2347
- if (!f) return null;
2348
- const v = h.indexOf(k);
2349
- let A = v >= 0 ? h.slice(0, v) : [];
2350
- c && (A = A.filter((_) => _ !== "dark"));
2351
- const C = `.${Kt(w)}`, E = "__SUBJECT__", T = y ? f.replace(/;$/, " !important;") : f;
2344
+ const $ = l.find((_) => (_.startsWith("!") && (y = !0, _ = _.slice(1)), Le[_] || We(_) || ze(_) || Ne(_) || Se(_)));
2345
+ if (!$) return null;
2346
+ const k = $.replace(/^!/, ""), d = Le[k] ?? We(k) ?? ze(k) ?? Ne(k) ?? Se(k);
2347
+ if (!d) return null;
2348
+ const x = l.indexOf($);
2349
+ let A = x >= 0 ? l.slice(0, x) : [];
2350
+ a && (A = A.filter((_) => _ !== "dark"));
2351
+ const C = `.${Kt(w)}`, E = "__SUBJECT__", T = y ? d.replace(/;$/, " !important;") : d;
2352
2352
  let R = E;
2353
2353
  const S = [];
2354
2354
  for (const _ of A)
@@ -2363,9 +2363,9 @@ function Zt(e) {
2363
2363
  V = U;
2364
2364
  continue;
2365
2365
  }
2366
- const D = l(_);
2367
- if (D) {
2368
- V ? B.push(D) : P.push(D);
2366
+ const I = f(_);
2367
+ if (I) {
2368
+ V ? B.push(I) : P.push(I);
2369
2369
  continue;
2370
2370
  }
2371
2371
  const N = Bt[_];
@@ -2373,20 +2373,20 @@ function Zt(e) {
2373
2373
  }
2374
2374
  function we(_, U) {
2375
2375
  if (!U) return _;
2376
- let D = 0, N = 0;
2376
+ let I = 0, N = 0;
2377
2377
  if (_.length && (_[0] === ">" || _[0] === "+" || _[0] === "~" || _[0] === " ")) {
2378
2378
  let O = 1;
2379
2379
  for (; O < _.length && _[O] === " "; ) O++;
2380
2380
  for (; O < _.length; O++) {
2381
- const I = _[O];
2382
- if (I === "[" ? D++ : I === "]" && D > 0 ? D-- : I === "(" ? N++ : I === ")" && N > 0 && N--, D === 0 && N === 0 && (_[O] === ">" || _[O] === "+" || _[O] === "~" || _[O] === " "))
2381
+ const D = _[O];
2382
+ if (D === "[" ? I++ : D === "]" && I > 0 ? I-- : D === "(" ? N++ : D === ")" && N > 0 && N--, I === 0 && N === 0 && (_[O] === ">" || _[O] === "+" || _[O] === "~" || _[O] === " "))
2383
2383
  return _.slice(0, O) + U + _.slice(O);
2384
2384
  }
2385
2385
  return _ + U;
2386
2386
  }
2387
2387
  for (let O = 0; O < _.length; O++) {
2388
- const I = _[O];
2389
- if (I === "[" ? D++ : I === "]" && D > 0 ? D-- : I === "(" ? N++ : I === ")" && N > 0 && N--, D === 0 && N === 0 && (I === ">" || I === "+" || I === "~" || I === " "))
2388
+ const D = _[O];
2389
+ if (D === "[" ? I++ : D === "]" && I > 0 ? I-- : D === "(" ? N++ : D === ")" && N > 0 && N--, I === 0 && N === 0 && (D === ">" || D === "+" || D === "~" || D === " "))
2390
2390
  return _.slice(0, O) + U + _.slice(O);
2391
2391
  }
2392
2392
  return _ + U;
@@ -2394,12 +2394,12 @@ function Zt(e) {
2394
2394
  const K = P.join(""), L = B.join("");
2395
2395
  if (V)
2396
2396
  if (V.includes("&")) {
2397
- const _ = V.indexOf("&"), U = V.slice(0, _), D = V.slice(_ + 1), N = E + K, O = R;
2397
+ const _ = V.indexOf("&"), U = V.slice(0, _), I = V.slice(_ + 1), N = E + K, O = R;
2398
2398
  if (P.length === 0)
2399
- R = O.replace(E, U + N + L + D);
2399
+ R = O.replace(E, U + N + L + I);
2400
2400
  else {
2401
- const I = we(D, L);
2402
- R = O.replace(E, U + N + I);
2401
+ const D = we(I, L);
2402
+ R = O.replace(E, U + N + D);
2403
2403
  }
2404
2404
  } else
2405
2405
  R = R.replace(E, `${V}${E + K}`), L && (R = R.replace(E, `${E}${L}`));
@@ -2408,56 +2408,56 @@ function Zt(e) {
2408
2408
  R = R.replace(new RegExp(E, "g"), C);
2409
2409
  let M = `${R}{${T}}`;
2410
2410
  const J = A.filter((_) => je.includes(_)), Z = J.length ? J[J.length - 1] : null, z = A.includes("dark");
2411
- return c && Z ? M = `@media (prefers-color-scheme: dark) and ${Me[Z]}{${M}}` : c ? M = `@media (prefers-color-scheme: dark){${M}}` : z && Z ? M = `@media (prefers-color-scheme: dark) and ${Me[Z]}{${M}}` : z ? M = `@media (prefers-color-scheme: dark){${M}}` : Z && (M = `@media ${Me[Z]}{${M}}`), M;
2411
+ return a && Z ? M = `@media (prefers-color-scheme: dark) and ${Me[Z]}{${M}}` : a ? M = `@media (prefers-color-scheme: dark){${M}}` : z && Z ? M = `@media (prefers-color-scheme: dark) and ${Me[Z]}{${M}}` : z ? M = `@media (prefers-color-scheme: dark){${M}}` : Z && (M = `@media ${Me[Z]}{${M}}`), M;
2412
2412
  }
2413
- for (const w of n) {
2414
- const c = p(w), h = c.find(
2415
- (f) => Le[f] || We(f) || ze(f) || Ne(f) || Se(f)
2413
+ for (const w of i) {
2414
+ const a = p(w), l = a.find(
2415
+ (d) => Le[d] || We(d) || ze(d) || Ne(d) || Se(d)
2416
2416
  );
2417
- if (!h) continue;
2418
- const y = c.indexOf(h), k = y >= 0 ? c.slice(0, y) : [], $ = b(k);
2419
- if ($ === 4) {
2420
- const f = g(w, !0);
2421
- f && u.push(f);
2417
+ if (!l) continue;
2418
+ const y = a.indexOf(l), $ = y >= 0 ? a.slice(0, y) : [], k = b($);
2419
+ if (k === 4) {
2420
+ const d = g(w, !0);
2421
+ d && u.push(d);
2422
2422
  } else {
2423
- const f = g(w);
2424
- f && ($ === 1 ? s.push(f) : $ === 2 ? o.push(f) : $ === 3 && a.push(f));
2423
+ const d = g(w);
2424
+ d && (k === 1 ? s.push(d) : k === 2 ? o.push(d) : k === 3 && c.push(d));
2425
2425
  }
2426
2426
  }
2427
- const x = [...s, ...o, ...a, ...u].join("");
2428
- return Xe.set(e, { css: x, timestamp: t }), x;
2427
+ const v = [...s, ...o, ...c, ...u].join("");
2428
+ return Xe.set(e, { css: v, timestamp: t }), v;
2429
2429
  }
2430
2430
  const ge = [];
2431
- function Gt(e, t, r, i, n, s, o, a) {
2431
+ function Gt(e, t, r, n, i, s, o, c) {
2432
2432
  if (e) {
2433
2433
  ge.push(r);
2434
2434
  try {
2435
2435
  const u = t.render(r);
2436
2436
  if (u instanceof Promise) {
2437
2437
  s(!0), u.then((m) => {
2438
- s(!1), o(null), Ye(e, m, r, i, n), a(e.innerHTML);
2438
+ s(!1), o(null), Ye(e, m, r, n, i), c(e.innerHTML);
2439
2439
  }).catch((m) => {
2440
2440
  s(!1), o(m);
2441
2441
  });
2442
2442
  return;
2443
2443
  }
2444
- Ye(e, u, r, i, n), a(e.innerHTML);
2444
+ Ye(e, u, r, n, i), c(e.innerHTML);
2445
2445
  } finally {
2446
2446
  ge.pop();
2447
2447
  }
2448
2448
  }
2449
2449
  }
2450
- function Ye(e, t, r, i, n) {
2450
+ function Ye(e, t, r, n, i) {
2451
2451
  e && (Ot(
2452
2452
  e,
2453
2453
  Array.isArray(t) ? t : [t],
2454
2454
  r,
2455
- i
2456
- ), n(e.innerHTML));
2455
+ n
2456
+ ), i(e.innerHTML));
2457
2457
  }
2458
- function Xt(e, t, r, i, n, s, o) {
2458
+ function Xt(e, t, r, n, i, s, o) {
2459
2459
  if (s !== null && clearTimeout(s), Date.now() - t < 16) {
2460
- if (n(r + 1), r === 15)
2460
+ if (i(r + 1), r === 15)
2461
2461
  console.warn(
2462
2462
  `⚠️ Component is re-rendering rapidly. This might indicate:
2463
2463
  Common causes:
@@ -2476,27 +2476,27 @@ Stopping runaway component render to prevent browser freeze`
2476
2476
  return;
2477
2477
  }
2478
2478
  } else
2479
- n(0);
2479
+ i(0);
2480
2480
  const m = setTimeout(() => {
2481
- i(Date.now()), e(), o(null);
2481
+ n(Date.now()), e(), o(null);
2482
2482
  }, r > 10 ? 100 : 0);
2483
2483
  o(m);
2484
2484
  }
2485
- function Yt(e, t, r, i, n) {
2485
+ function Yt(e, t, r, n, i) {
2486
2486
  if (!e) return;
2487
2487
  const s = Zt(r);
2488
2488
  if ((!s || s.trim() === "") && !t._computedStyle) {
2489
- n(null), e.adoptedStyleSheets = [Je()];
2489
+ i(null), e.adoptedStyleSheets = [Je()];
2490
2490
  return;
2491
2491
  }
2492
2492
  let o = "";
2493
2493
  t._computedStyle && (o = t._computedStyle);
2494
- let a = Lt(`${o}
2494
+ let c = Lt(`${o}
2495
2495
  ${s}
2496
2496
  `);
2497
- a = ct(a);
2498
- let u = i;
2499
- u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== a) && u.replaceSync(a), e.adoptedStyleSheets = [Je(), u], n(u);
2497
+ c = ct(c);
2498
+ let u = n;
2499
+ u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== c) && u.replaceSync(c), e.adoptedStyleSheets = [Je(), u], i(u);
2500
2500
  }
2501
2501
  let W = null;
2502
2502
  function Qt(e) {
@@ -2539,7 +2539,7 @@ function wr(e) {
2539
2539
  throw new Error("useOnError must be called during component render");
2540
2540
  ye(W), W._hookCallbacks.onError = e;
2541
2541
  }
2542
- function xr(e) {
2542
+ function vr(e) {
2543
2543
  if (!W)
2544
2544
  throw new Error("useStyle must be called during component render");
2545
2545
  ye(W);
@@ -2567,9 +2567,7 @@ if (typeof window < "u") {
2567
2567
  }
2568
2568
  function tr(e, t) {
2569
2569
  if (!t.render)
2570
- throw new Error(
2571
- "Component must have a render function"
2572
- );
2570
+ throw new Error("Component must have a render function");
2573
2571
  return typeof window > "u" ? class {
2574
2572
  constructor() {
2575
2573
  }
@@ -2633,58 +2631,53 @@ function tr(e, t) {
2633
2631
  enumerable: !1,
2634
2632
  configurable: !1
2635
2633
  }), Object.defineProperty(r, "_triggerWatchers", {
2636
- value: (n, s) => this._triggerWatchers(n, s),
2634
+ value: (i, s) => this._triggerWatchers(i, s),
2637
2635
  writable: !1,
2638
2636
  enumerable: !1,
2639
2637
  configurable: !1
2640
2638
  }), this.context = r, Object.defineProperty(this.context, "emit", {
2641
- value: (n, s, o) => {
2642
- const a = new CustomEvent(n, {
2639
+ value: (i, s, o) => {
2640
+ const c = new CustomEvent(i, {
2643
2641
  detail: s,
2644
2642
  bubbles: !0,
2645
2643
  composed: !0,
2646
2644
  ...o || {}
2647
2645
  });
2648
- return this.dispatchEvent(a), !a.defaultPrevented;
2646
+ return this.dispatchEvent(c), !c.defaultPrevented;
2649
2647
  },
2650
2648
  writable: !1,
2651
2649
  enumerable: !1,
2652
2650
  configurable: !1
2653
2651
  });
2654
- const i = Te.get(e) || t;
2655
- Object.keys(i).forEach((n) => {
2656
- const s = i[n];
2657
- typeof s == "function" && (this.context[n] = (...o) => s(...o, this.context));
2658
- }), this._applyComputed(i), i.props && Object.keys(i.props).forEach((n) => {
2659
- let s = this[n];
2660
- Object.defineProperty(this, n, {
2652
+ const n = Te.get(e) || t;
2653
+ Object.keys(n).forEach((i) => {
2654
+ const s = n[i];
2655
+ typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
2656
+ }), this._applyComputed(n), n.props && Object.keys(n.props).forEach((i) => {
2657
+ let s = this[i];
2658
+ Object.defineProperty(this, i, {
2661
2659
  get() {
2662
2660
  return s;
2663
2661
  },
2664
2662
  set(o) {
2665
- const a = s;
2666
- s = o, this.context[n] = o, this._initializing || (this._applyProps(i), a !== o && this._requestRender());
2663
+ const c = s;
2664
+ s = o, this.context[i] = o, this._initializing || (this._applyProps(n), c !== o && this._requestRender());
2667
2665
  },
2668
2666
  enumerable: !0,
2669
2667
  configurable: !0
2670
2668
  });
2671
- }), this._initializing = !1, this._initWatchers(i), this._applyProps(i), this._render(i);
2669
+ }), this._initializing = !1, this._initWatchers(n), this._applyProps(n), this._render(n);
2672
2670
  }
2673
2671
  connectedCallback() {
2674
2672
  this._runLogicWithinErrorBoundary(t, () => {
2675
- this._applyProps(t), this._requestRender(), xt(
2676
- t,
2677
- this.context,
2678
- this._mounted,
2679
- (r) => {
2680
- this._mounted = r;
2681
- }
2682
- );
2673
+ this._applyProps(t), this._requestRender(), vt(t, this.context, this._mounted, (r) => {
2674
+ this._mounted = r;
2675
+ });
2683
2676
  });
2684
2677
  }
2685
2678
  disconnectedCallback() {
2686
2679
  this._runLogicWithinErrorBoundary(t, () => {
2687
- vt(
2680
+ xt(
2688
2681
  t,
2689
2682
  this.context,
2690
2683
  this._listeners,
@@ -2706,15 +2699,9 @@ function tr(e, t) {
2706
2699
  );
2707
2700
  });
2708
2701
  }
2709
- attributeChangedCallback(r, i, n) {
2702
+ attributeChangedCallback(r, n, i) {
2710
2703
  this._runLogicWithinErrorBoundary(t, () => {
2711
- this._applyProps(t), i !== n && this._requestRender(), $t(
2712
- t,
2713
- r,
2714
- i,
2715
- n,
2716
- this.context
2717
- );
2704
+ this._applyProps(t), n !== i && this._requestRender(), $t(t, r, n, i, this.context);
2718
2705
  });
2719
2706
  }
2720
2707
  static get observedAttributes() {
@@ -2730,16 +2717,16 @@ function tr(e, t) {
2730
2717
  r,
2731
2718
  this.context,
2732
2719
  this._refs,
2733
- (i) => {
2734
- this._lastHtmlStringForJitCSS = i, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(i);
2720
+ (n) => {
2721
+ this._lastHtmlStringForJitCSS = n, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(n);
2735
2722
  },
2736
- (i) => {
2737
- this._templateLoading = i, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(i);
2723
+ (n) => {
2724
+ this._templateLoading = n, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(n);
2738
2725
  },
2739
- (i) => {
2740
- this._templateError = i, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(i);
2726
+ (n) => {
2727
+ this._templateError = n, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(n);
2741
2728
  },
2742
- (i) => this._applyStyle(r, i)
2729
+ (n) => this._applyStyle(r, n)
2743
2730
  );
2744
2731
  });
2745
2732
  }
@@ -2748,7 +2735,7 @@ function tr(e, t) {
2748
2735
  }
2749
2736
  _requestRender() {
2750
2737
  this._runLogicWithinErrorBoundary(this._cfg, () => {
2751
- fe(() => {
2738
+ ue(() => {
2752
2739
  Xt(
2753
2740
  () => this._render(this._cfg),
2754
2741
  this._lastRenderTime,
@@ -2768,35 +2755,35 @@ function tr(e, t) {
2768
2755
  });
2769
2756
  }
2770
2757
  // --- Style ---
2771
- _applyStyle(r, i) {
2758
+ _applyStyle(r, n) {
2772
2759
  this._runLogicWithinErrorBoundary(r, () => {
2773
2760
  Yt(
2774
2761
  this.shadowRoot,
2775
2762
  this.context,
2776
- i,
2763
+ n,
2777
2764
  this._styleSheet,
2778
- (n) => {
2779
- this._styleSheet = n;
2765
+ (i) => {
2766
+ this._styleSheet = i;
2780
2767
  }
2781
2768
  );
2782
2769
  });
2783
2770
  }
2784
2771
  // --- Error Boundary function ---
2785
- _runLogicWithinErrorBoundary(r, i) {
2772
+ _runLogicWithinErrorBoundary(r, n) {
2786
2773
  this._hasError && (this._hasError = !1);
2787
2774
  try {
2788
- i();
2789
- } catch (n) {
2790
- this._hasError = !0, r.onError && r.onError(n, this.context);
2775
+ n();
2776
+ } catch (i) {
2777
+ this._hasError = !0, r.onError && r.onError(i, this.context);
2791
2778
  }
2792
2779
  }
2793
2780
  // --- State, props, computed ---
2794
2781
  _initContext(r) {
2795
2782
  try {
2796
- let i = function(s, o = "") {
2783
+ let n = function(s, o = "") {
2797
2784
  return Array.isArray(s) ? new Proxy(s, {
2798
- get(a, u, m) {
2799
- const g = Reflect.get(a, u, m);
2785
+ get(c, u, m) {
2786
+ const g = Reflect.get(c, u, m);
2800
2787
  return typeof g == "function" && typeof u == "string" && [
2801
2788
  "push",
2802
2789
  "pop",
@@ -2806,50 +2793,53 @@ function tr(e, t) {
2806
2793
  "sort",
2807
2794
  "reverse"
2808
2795
  ].includes(u) ? function(...p) {
2809
- const l = g.apply(a, p);
2810
- if (!n._initializing) {
2811
- const d = o || "root";
2812
- n._triggerWatchers(d, a), fe(() => n._render(r), n._componentId);
2796
+ const f = g.apply(c, p);
2797
+ if (!i._initializing) {
2798
+ const h = o || "root";
2799
+ i._triggerWatchers(h, c), ue(
2800
+ () => i._render(r),
2801
+ i._componentId
2802
+ );
2813
2803
  }
2814
- return l;
2804
+ return f;
2815
2805
  } : g;
2816
2806
  },
2817
- set(a, u, m) {
2818
- if (a[u] = m, !n._initializing) {
2807
+ set(c, u, m) {
2808
+ if (c[u] = m, !i._initializing) {
2819
2809
  const g = o ? `${o}.${String(u)}` : String(u);
2820
- n._triggerWatchers(g, m), fe(() => n._render(r), n._componentId);
2810
+ i._triggerWatchers(g, m), ue(() => i._render(r), i._componentId);
2821
2811
  }
2822
2812
  return !0;
2823
2813
  },
2824
- deleteProperty(a, u) {
2825
- if (delete a[u], !n._initializing) {
2814
+ deleteProperty(c, u) {
2815
+ if (delete c[u], !i._initializing) {
2826
2816
  const m = o ? `${o}.${String(u)}` : String(u);
2827
- n._triggerWatchers(m, void 0), fe(() => n._render(r), n._componentId);
2817
+ i._triggerWatchers(m, void 0), ue(() => i._render(r), i._componentId);
2828
2818
  }
2829
2819
  return !0;
2830
2820
  }
2831
- }) : s && typeof s == "object" ? s.constructor && s.constructor.name === "ReactiveState" ? s : (Object.keys(s).forEach((a) => {
2832
- const u = o ? `${o}.${a}` : a;
2833
- s[a] = i(s[a], u);
2821
+ }) : s && typeof s == "object" ? s.constructor && s.constructor.name === "ReactiveState" ? s : (Object.keys(s).forEach((c) => {
2822
+ const u = o ? `${o}.${c}` : c;
2823
+ s[c] = n(s[c], u);
2834
2824
  }), new Proxy(s, {
2835
- set(a, u, m) {
2825
+ set(c, u, m) {
2836
2826
  const g = o ? `${o}.${String(u)}` : String(u);
2837
- return a[u] = i(m, g), n._initializing || (n._triggerWatchers(
2838
- g,
2839
- a[u]
2840
- ), fe(() => n._render(r), n._componentId)), !0;
2827
+ return c[u] = n(m, g), i._initializing || (i._triggerWatchers(g, c[u]), ue(() => i._render(r), i._componentId)), !0;
2841
2828
  },
2842
- get(a, u, m) {
2843
- return Reflect.get(a, u, m);
2829
+ get(c, u, m) {
2830
+ return Reflect.get(c, u, m);
2844
2831
  }
2845
2832
  })) : s;
2846
2833
  };
2847
- const n = this;
2848
- return i({
2834
+ const i = this;
2835
+ return n({
2849
2836
  // For functional components, state is managed by state() function calls
2850
2837
  // Include prop defaults in initial reactive context so prop updates trigger reactivity
2851
2838
  ...r.props ? Object.fromEntries(
2852
- Object.entries(r.props).map(([s, o]) => [s, o.default])
2839
+ Object.entries(r.props).map(([s, o]) => [
2840
+ s,
2841
+ o.default
2842
+ ])
2853
2843
  ) : {}
2854
2844
  });
2855
2845
  } catch {
@@ -2866,15 +2856,15 @@ function tr(e, t) {
2866
2856
  );
2867
2857
  });
2868
2858
  }
2869
- _triggerWatchers(r, i) {
2870
- yt(this.context, this._watchers, r, i);
2859
+ _triggerWatchers(r, n) {
2860
+ yt(this.context, this._watchers, r, n);
2871
2861
  }
2872
2862
  _applyProps(r) {
2873
2863
  this._runLogicWithinErrorBoundary(r, () => {
2874
2864
  try {
2875
2865
  wt(this, r, this.context);
2876
- } catch (i) {
2877
- this._hasError = !0, r.onError && r.onError(i, this.context);
2866
+ } catch (n) {
2867
+ this._hasError = !0, r.onError && r.onError(n, this.context);
2878
2868
  }
2879
2869
  });
2880
2870
  }
@@ -2883,67 +2873,201 @@ function tr(e, t) {
2883
2873
  function et(e, t) {
2884
2874
  let r = re(e);
2885
2875
  r.includes("-") || (r = `cer-${r}`);
2886
- let i = {};
2876
+ let n = {};
2887
2877
  if (typeof window < "u")
2888
2878
  try {
2889
- const a = t.toString().match(/\(\s*{\s*([^}]+)\s*}/);
2890
- if (a) {
2891
- const m = a[1].split(",").map((g) => g.trim());
2892
- for (const g of m) {
2893
- const b = g.indexOf("=");
2894
- if (b !== -1) {
2895
- const p = g.substring(0, b).trim(), l = g.substring(b + 1).trim();
2896
- try {
2897
- l === "true" ? i[p] = !0 : l === "false" ? i[p] = !1 : l === "[]" ? i[p] = [] : l === "{}" ? i[p] = {} : /^\d+$/.test(l) ? i[p] = parseInt(l) : /^'.*'$/.test(l) || /^".*"$/.test(l) ? i[p] = l.slice(1, -1) : i[p] = l;
2898
- } catch {
2899
- i[p] = "";
2879
+ const o = t.toString();
2880
+ let c = null;
2881
+ const u = o.indexOf("({");
2882
+ if (u !== -1) {
2883
+ let m = 0, g = !1, b = null, p = !1, f = -1;
2884
+ for (let h = u + 2; h < o.length; h++) {
2885
+ const v = o[h];
2886
+ if (p) {
2887
+ p = !1;
2888
+ continue;
2889
+ }
2890
+ if (v === "\\") {
2891
+ p = !0;
2892
+ continue;
2893
+ }
2894
+ if (!g && (v === '"' || v === "'" || v === "`")) {
2895
+ g = !0, b = v;
2896
+ continue;
2897
+ }
2898
+ if (g && v === b) {
2899
+ g = !1, b = null;
2900
+ continue;
2901
+ }
2902
+ if (!g) {
2903
+ if (v === "{")
2904
+ m++;
2905
+ else if (v === "}") {
2906
+ if (m === 0) {
2907
+ f = h;
2908
+ break;
2909
+ }
2910
+ m--;
2900
2911
  }
2901
- } else {
2902
- const p = g.split(":")[0].trim();
2903
- p && !p.includes("}") && (i[p] = "");
2904
2912
  }
2905
2913
  }
2914
+ if (f !== -1) {
2915
+ const h = o.substring(u, f + 2), v = o.substring(u + 2, f).trim();
2916
+ c = [h, v];
2917
+ }
2918
+ }
2919
+ if (c) {
2920
+ const m = c[1];
2921
+ let g = "", b = "", p = !0, f = 0, h = null, v = !1, w = 0;
2922
+ for (; w < m.length; ) {
2923
+ const a = m[w];
2924
+ if (v) {
2925
+ p ? g += a : b += a, v = !1, w++;
2926
+ continue;
2927
+ }
2928
+ if (a === "\\") {
2929
+ v = !0, p ? g += a : b += a, w++;
2930
+ continue;
2931
+ }
2932
+ if ((a === '"' || a === "'" || a === "`") && !h) {
2933
+ h = a, p ? g += a : b += a, w++;
2934
+ continue;
2935
+ }
2936
+ if (a === h) {
2937
+ h = null, p ? g += a : b += a, w++;
2938
+ continue;
2939
+ }
2940
+ if (h) {
2941
+ p ? g += a : b += a, w++;
2942
+ continue;
2943
+ }
2944
+ if (a === "{" || a === "[") {
2945
+ f++, p ? g += a : b += a, w++;
2946
+ continue;
2947
+ }
2948
+ if (a === "}" || a === "]") {
2949
+ f--, p ? g += a : b += a, w++;
2950
+ continue;
2951
+ }
2952
+ if (a === "=" && f === 0 && p) {
2953
+ p = !1, w++;
2954
+ continue;
2955
+ }
2956
+ if (a === "," && f === 0) {
2957
+ if (g.trim() && b.trim()) {
2958
+ const l = g.trim(), y = b.trim();
2959
+ try {
2960
+ if (y === "true") n[l] = !0;
2961
+ else if (y === "false") n[l] = !1;
2962
+ else if (y === "[]") n[l] = [];
2963
+ else if (y === "{}") n[l] = {};
2964
+ else if (/^\d+$/.test(y))
2965
+ n[l] = parseInt(y);
2966
+ else if (/^'.*'$/s.test(y))
2967
+ n[l] = y.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
2968
+ else if (/^".*"$/s.test(y))
2969
+ n[l] = y.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
2970
+ else if (/^`.*`$/s.test(y)) {
2971
+ const $ = y.slice(1, -1);
2972
+ if ($.includes("${"))
2973
+ try {
2974
+ n[l] = new Function(
2975
+ `return \`${$}\`;`
2976
+ )();
2977
+ } catch {
2978
+ n[l] = $;
2979
+ }
2980
+ else
2981
+ n[l] = $;
2982
+ } else
2983
+ n[l] = y;
2984
+ } catch {
2985
+ n[l] = "";
2986
+ }
2987
+ } else if (g.trim()) {
2988
+ const l = g.split(":")[0].trim();
2989
+ l && !l.includes("}") && (n[l] = "");
2990
+ }
2991
+ g = "", b = "", p = !0, w++;
2992
+ continue;
2993
+ }
2994
+ p ? g += a : b += a, w++;
2995
+ }
2996
+ if (g.trim() && b.trim()) {
2997
+ const a = g.trim(), l = b.trim();
2998
+ try {
2999
+ if (l === "true") n[a] = !0;
3000
+ else if (l === "false") n[a] = !1;
3001
+ else if (l === "[]") n[a] = [];
3002
+ else if (l === "{}") n[a] = {};
3003
+ else if (/^\d+$/.test(l)) n[a] = parseInt(l);
3004
+ else if (/^'.*'$/s.test(l))
3005
+ n[a] = l.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3006
+ else if (/^".*"$/s.test(l))
3007
+ n[a] = l.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3008
+ else if (/^`.*`$/s.test(l)) {
3009
+ const y = l.slice(1, -1);
3010
+ if (y.includes("${"))
3011
+ try {
3012
+ n[a] = new Function(
3013
+ `return \`${y}\`;`
3014
+ )();
3015
+ } catch {
3016
+ n[a] = y;
3017
+ }
3018
+ else
3019
+ n[a] = y;
3020
+ } else
3021
+ n[a] = l;
3022
+ } catch {
3023
+ n[a] = "";
3024
+ }
3025
+ } else if (g.trim()) {
3026
+ const a = g.split(":")[0].trim();
3027
+ a && !a.includes("}") && (n[a] = "");
3028
+ }
2906
3029
  }
2907
3030
  } catch {
2908
3031
  }
2909
- let n = {};
3032
+ let i = {};
2910
3033
  const s = {
2911
3034
  // Generate props config from defaults
2912
3035
  props: Object.fromEntries(
2913
- Object.entries(i).map(([o, a]) => [o, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
3036
+ Object.entries(n).map(([o, c]) => [o, { type: typeof c == "boolean" ? Boolean : typeof c == "number" ? Number : typeof c == "string" ? String : Function, default: c }])
2914
3037
  ),
2915
3038
  // Add lifecycle hooks from the stored functions
2916
3039
  onConnected: (o) => {
2917
- n.onConnected && n.onConnected();
3040
+ i.onConnected && i.onConnected();
2918
3041
  },
2919
3042
  onDisconnected: (o) => {
2920
- n.onDisconnected && n.onDisconnected();
3043
+ i.onDisconnected && i.onDisconnected();
2921
3044
  },
2922
- onAttributeChanged: (o, a, u, m) => {
2923
- n.onAttributeChanged && n.onAttributeChanged(o, a, u);
3045
+ onAttributeChanged: (o, c, u, m) => {
3046
+ i.onAttributeChanged && i.onAttributeChanged(o, c, u);
2924
3047
  },
2925
- onError: (o, a) => {
2926
- n.onError && o && n.onError(o);
3048
+ onError: (o, c) => {
3049
+ i.onError && o && i.onError(o);
2927
3050
  },
2928
3051
  render: (o) => {
2929
- const a = o._componentId || `${r}-${Math.random().toString(36).substr(2, 9)}`;
2930
- F.setCurrentComponent(a, () => {
3052
+ const c = o._componentId || `${r}-${Math.random().toString(36).substr(2, 9)}`;
3053
+ F.setCurrentComponent(c, () => {
2931
3054
  o.requestRender && o.requestRender();
2932
3055
  });
2933
3056
  try {
2934
3057
  Qt(o);
2935
- const u = Object.keys(i).length > 0;
3058
+ const u = Object.keys(n).length > 0;
2936
3059
  let m;
2937
3060
  if (u) {
2938
3061
  const g = {};
2939
- Object.keys(i).forEach((b) => {
2940
- g[b] = o[b] ?? i[b];
3062
+ Object.keys(n).forEach((b) => {
3063
+ const p = o[b], f = n[b];
3064
+ g[b] = p != null && p !== "" ? p : f;
2941
3065
  }), m = t(g);
2942
3066
  } else
2943
3067
  m = t();
2944
3068
  if (o._hookCallbacks) {
2945
3069
  const g = o._hookCallbacks;
2946
- g.onConnected && (n.onConnected = g.onConnected), g.onDisconnected && (n.onDisconnected = g.onDisconnected), g.onAttributeChanged && (n.onAttributeChanged = g.onAttributeChanged), g.onError && (n.onError = g.onError), g.style && (o._styleCallback = g.style);
3070
+ g.onConnected && (i.onConnected = g.onConnected), g.onDisconnected && (i.onDisconnected = g.onDisconnected), g.onAttributeChanged && (i.onAttributeChanged = g.onAttributeChanged), g.onError && (i.onError = g.onError), g.style && (o._styleCallback = g.style);
2947
3071
  }
2948
3072
  return m;
2949
3073
  } finally {
@@ -2951,7 +3075,10 @@ function et(e, t) {
2951
3075
  }
2952
3076
  }
2953
3077
  };
2954
- Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(r, tr(r, s)));
3078
+ Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
3079
+ r,
3080
+ tr(r, s)
3081
+ ));
2955
3082
  }
2956
3083
  class rr {
2957
3084
  map = /* @__PURE__ */ new Map();
@@ -2966,8 +3093,8 @@ class rr {
2966
3093
  }
2967
3094
  set(t, r) {
2968
3095
  if (this.map.has(t) && this.map.delete(t), this.map.set(t, r), this.map.size > this.maxSize) {
2969
- const i = this.map.keys().next().value;
2970
- i !== void 0 && this.map.delete(i);
3096
+ const n = this.map.keys().next().value;
3097
+ n !== void 0 && this.map.delete(n);
2971
3098
  }
2972
3099
  }
2973
3100
  has(t) {
@@ -2977,7 +3104,7 @@ class rr {
2977
3104
  this.map.clear();
2978
3105
  }
2979
3106
  }
2980
- const De = new rr(500);
3107
+ const Ie = new rr(500);
2981
3108
  function nr(e, t) {
2982
3109
  if (e == null) {
2983
3110
  console.warn(
@@ -2991,9 +3118,9 @@ function nr(e, t) {
2991
3118
  `💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`
2992
3119
  );
2993
3120
  }
2994
- function he(e, t = {}, r, i) {
2995
- const n = i ?? t.key;
2996
- return { tag: e, key: n, props: t, children: r };
3121
+ function he(e, t = {}, r, n) {
3122
+ const i = n ?? t.key;
3123
+ return { tag: e, key: i, props: t, children: r };
2997
3124
  }
2998
3125
  function Ae(e) {
2999
3126
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
@@ -3005,103 +3132,103 @@ function ir(e, t) {
3005
3132
  return e.key != null ? e : { ...e, key: t };
3006
3133
  }
3007
3134
  function sr(e, t = [], r = {}) {
3008
- const i = {}, n = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3135
+ const n = {}, i = {}, s = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3009
3136
  let u;
3010
- for (; u = a.exec(e); ) {
3137
+ for (; u = c.exec(e); ) {
3011
3138
  const m = u[1], g = u[2], b = (u[4] || u[6]) ?? "", p = b.match(/^{{(\d+)}}$/);
3012
- let l = p ? t[Number(p[1])] ?? null : b;
3013
- p || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
3014
- const d = ["model", "bind", "show", "class", "style", "ref"];
3139
+ let f = p ? t[Number(p[1])] ?? null : b;
3140
+ p || (f === "true" ? f = !0 : f === "false" ? f = !1 : f === "null" ? f = null : isNaN(Number(f)) || (f = Number(f)));
3141
+ const h = ["model", "bind", "show", "class", "style", "ref"];
3015
3142
  if (m === ":") {
3016
- const [x, w] = g.split(":"), [c, ...h] = x.split(".");
3017
- if (d.includes(c)) {
3018
- const y = [...h], k = c === "model" && w ? `model:${w}` : c;
3019
- s[k] = {
3020
- value: l,
3143
+ const [v, w] = g.split(":"), [a, ...l] = v.split(".");
3144
+ if (h.includes(a)) {
3145
+ const y = [...l], $ = a === "model" && w ? `model:${w}` : a;
3146
+ s[$] = {
3147
+ value: f,
3021
3148
  modifiers: y,
3022
3149
  arg: w
3023
3150
  };
3024
3151
  } else {
3025
- let y = l;
3026
- y && ee(y) && (y = y.value), n[g] = y, o.push(g);
3152
+ let y = f;
3153
+ y && ee(y) && (y = y.value), i[g] = y, o.push(g);
3027
3154
  }
3028
3155
  } else if (m === "@") {
3029
- const [x, ...w] = g.split("."), c = w;
3030
- nr(l, x);
3031
- const h = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
3032
- if (h) {
3033
- const y = ($) => {
3034
- if (c.includes("prevent") && $.preventDefault(), c.includes("stop") && $.stopPropagation(), !(c.includes("self") && $.target !== $.currentTarget))
3035
- return c.includes("once") && $.currentTarget?.removeEventListener(x, y), h($);
3036
- }, k = "on" + x.charAt(0).toUpperCase() + x.slice(1);
3037
- i[k] = y;
3156
+ const [v, ...w] = g.split("."), a = w;
3157
+ nr(f, v);
3158
+ const l = typeof f == "function" ? f : typeof r[f] == "function" ? r[f] : void 0;
3159
+ if (l) {
3160
+ const y = (k) => {
3161
+ if (a.includes("prevent") && k.preventDefault(), a.includes("stop") && k.stopPropagation(), !(a.includes("self") && k.target !== k.currentTarget))
3162
+ return a.includes("once") && k.currentTarget?.removeEventListener(v, y), l(k);
3163
+ }, $ = "on" + v.charAt(0).toUpperCase() + v.slice(1);
3164
+ n[$] = y;
3038
3165
  }
3039
- } else g === "ref" ? i.ref = l : n[g] = l;
3166
+ } else g === "ref" ? n.ref = f : i[g] = f;
3040
3167
  }
3041
- return { props: i, attrs: n, directives: s, bound: o };
3168
+ return { props: n, attrs: i, directives: s, bound: o };
3042
3169
  }
3043
3170
  function or(e, t, r) {
3044
- const i = ge.length > 0 ? ge[ge.length - 1] : void 0, n = r ?? i, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3171
+ const n = ge.length > 0 ? ge[ge.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3045
3172
  if (s && o) {
3046
- const f = De.get(o);
3047
- if (f) return f;
3173
+ const d = Ie.get(o);
3174
+ if (d) return d;
3048
3175
  }
3049
- function a(f, v) {
3050
- return he("#text", {}, f, v);
3176
+ function c(d, x) {
3177
+ return he("#text", {}, d, x);
3051
3178
  }
3052
3179
  let u = "";
3053
- for (let f = 0; f < e.length; f++)
3054
- u += e[f], f < t.length && (u += `{{${f}}}`);
3180
+ for (let d = 0; d < e.length; d++)
3181
+ u += e[d], d < t.length && (u += `{{${d}}}`);
3055
3182
  const m = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, g = [];
3056
- let b, p = [], l = null, d = {}, x, w = 0, c = [];
3057
- function h(f) {
3058
- !f || typeof f != "object" || Ae(f) || (f.props || f.attrs ? (f.props && (d.props || (d.props = {}), Object.assign(d.props, f.props)), f.attrs && (d.attrs || (d.attrs = {}), Object.keys(f.attrs).forEach((v) => {
3059
- if (v === "style" && d.attrs.style) {
3060
- const A = d.attrs.style.replace(
3183
+ let b, p = [], f = null, h = {}, v, w = 0, a = [];
3184
+ function l(d) {
3185
+ !d || typeof d != "object" || Ae(d) || (d.props || d.attrs ? (d.props && (h.props || (h.props = {}), Object.assign(h.props, d.props)), d.attrs && (h.attrs || (h.attrs = {}), Object.keys(d.attrs).forEach((x) => {
3186
+ if (x === "style" && h.attrs.style) {
3187
+ const A = h.attrs.style.replace(
3061
3188
  /;?\s*$/,
3062
3189
  ""
3063
- ), C = f.attrs.style.replace(/^;?\s*/, "");
3064
- d.attrs.style = A + "; " + C;
3065
- } else if (v === "class" && d.attrs.class) {
3066
- const A = d.attrs.class.trim().split(/\s+/).filter(Boolean), C = f.attrs.class.trim().split(/\s+/).filter(Boolean), E = [
3190
+ ), C = d.attrs.style.replace(/^;?\s*/, "");
3191
+ h.attrs.style = A + "; " + C;
3192
+ } else if (x === "class" && h.attrs.class) {
3193
+ const A = h.attrs.class.trim().split(/\s+/).filter(Boolean), C = d.attrs.class.trim().split(/\s+/).filter(Boolean), E = [
3067
3194
  .../* @__PURE__ */ new Set([...A, ...C])
3068
3195
  ];
3069
- d.attrs.class = E.join(" ");
3196
+ h.attrs.class = E.join(" ");
3070
3197
  } else
3071
- d.attrs[v] = f.attrs[v];
3072
- }))) : (d.props || (d.props = {}), Object.assign(d.props, f)));
3073
- }
3074
- function y(f, v) {
3075
- const A = l ? p : c;
3076
- if (Ae(f)) {
3077
- const C = f.key ?? v;
3078
- let E = f.children;
3198
+ h.attrs[x] = d.attrs[x];
3199
+ }))) : (h.props || (h.props = {}), Object.assign(h.props, d)));
3200
+ }
3201
+ function y(d, x) {
3202
+ const A = f ? p : a;
3203
+ if (Ae(d)) {
3204
+ const C = d.key ?? x;
3205
+ let E = d.children;
3079
3206
  A.push({
3080
- ...f,
3207
+ ...d,
3081
3208
  key: C,
3082
3209
  children: E
3083
3210
  });
3084
3211
  return;
3085
3212
  }
3086
- if (Ce(f)) {
3087
- A.push(ir(f, void 0));
3213
+ if (Ce(d)) {
3214
+ A.push(ir(d, void 0));
3088
3215
  return;
3089
3216
  }
3090
- if (Array.isArray(f)) {
3091
- if (f.length === 0) return;
3092
- for (let C = 0; C < f.length; C++) {
3093
- const E = f[C];
3094
- Ae(E) || Ce(E) || Array.isArray(E) ? y(E, `${v}-${C}`) : E !== null && typeof E == "object" ? h(E) : A.push(a(String(E), `${v}-${C}`));
3217
+ if (Array.isArray(d)) {
3218
+ if (d.length === 0) return;
3219
+ for (let C = 0; C < d.length; C++) {
3220
+ const E = d[C];
3221
+ Ae(E) || Ce(E) || Array.isArray(E) ? y(E, `${x}-${C}`) : E !== null && typeof E == "object" ? l(E) : A.push(c(String(E), `${x}-${C}`));
3095
3222
  }
3096
3223
  return;
3097
3224
  }
3098
- if (f !== null && typeof f == "object") {
3099
- h(f);
3225
+ if (d !== null && typeof d == "object") {
3226
+ l(d);
3100
3227
  return;
3101
3228
  }
3102
- A.push(a(String(f), v));
3229
+ A.push(c(String(d), x));
3103
3230
  }
3104
- const k = /* @__PURE__ */ new Set([
3231
+ const $ = /* @__PURE__ */ new Set([
3105
3232
  "area",
3106
3233
  "base",
3107
3234
  "br",
@@ -3120,12 +3247,12 @@ function or(e, t, r) {
3120
3247
  for (; b = m.exec(u); )
3121
3248
  if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
3122
3249
  if (b[1]) {
3123
- const f = b[1], v = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || k.has(f), {
3250
+ const d = b[1], x = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || $.has(d), {
3124
3251
  props: C,
3125
3252
  attrs: E,
3126
3253
  directives: T,
3127
3254
  bound: R
3128
- } = sr(b[2] || "", t, n), S = { props: {}, attrs: {} };
3255
+ } = sr(b[2] || "", t, i), S = { props: {}, attrs: {} };
3129
3256
  for (const P in C) S.props[P] = C[P];
3130
3257
  for (const P in E) S.attrs[P] = E[P];
3131
3258
  if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
@@ -3143,7 +3270,7 @@ function or(e, t, r) {
3143
3270
  audio: ["muted", "autoplay", "controls", "loop"],
3144
3271
  img: ["src", "alt", "width", "height"],
3145
3272
  button: ["type", "name", "value", "disabled", "autofocus", "form"]
3146
- }, B = f.toLowerCase(), V = P[B] ?? [];
3273
+ }, B = d.toLowerCase(), V = P[B] ?? [];
3147
3274
  if (S.attrs) {
3148
3275
  for (const K of V)
3149
3276
  if (R && R.includes(K) && K in S.attrs && !(S.props && K in S.props)) {
@@ -3151,7 +3278,7 @@ function or(e, t, r) {
3151
3278
  L && ee(L) && (L = L.value), S.props[K] = L, delete S.attrs[K];
3152
3279
  }
3153
3280
  }
3154
- if ((f.includes("-") || !!n?.__customElements?.has?.(f)) && (S.isCustomElement = !0, R && S.attrs)) {
3281
+ if ((d.includes("-") || !!i?.__customElements?.has?.(d)) && (S.isCustomElement = !0, R && S.attrs)) {
3155
3282
  const K = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3156
3283
  for (const L of R)
3157
3284
  if (L in S.attrs && !(S.props && L in S.props)) {
@@ -3164,13 +3291,13 @@ function or(e, t, r) {
3164
3291
  }
3165
3292
  if (T && Object.keys(T).some((P) => P === "model" || P.startsWith("model:")))
3166
3293
  try {
3167
- const P = Symbol.for("cer.registry"), B = globalThis[P], V = !!(B && typeof B.has == "function" && B.has(f)), we = !!(n && (n.__customElements instanceof Set && n.__customElements.has(f) || Array.isArray(n.__isCustomElements) && n.__isCustomElements.includes(f)));
3168
- if (!!(f.includes("-") || we || V))
3294
+ const P = Symbol.for("cer.registry"), B = globalThis[P], V = !!(B && typeof B.has == "function" && B.has(d)), we = !!(i && (i.__customElements instanceof Set && i.__customElements.has(d) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(d)));
3295
+ if (!!(d.includes("-") || we || V))
3169
3296
  for (const M of Object.keys(T)) {
3170
3297
  if (M !== "model" && !M.startsWith("model:")) continue;
3171
- const J = T[M], Z = J.arg ?? (M.includes(":") ? M.split(":", 2)[1] : void 0), z = J.value, _ = Z ?? "modelValue", U = H, D = _e, N = n ? n._state || n : void 0;
3298
+ const J = T[M], Z = J.arg ?? (M.includes(":") ? M.split(":", 2)[1] : void 0), z = J.value, _ = Z ?? "modelValue", U = H, I = _e, N = i ? i._state || i : void 0;
3172
3299
  let O;
3173
- typeof z == "string" && n ? O = U(N, z) : (O = z, O && ee(O) && (O = O.value)), S.props[_] = O;
3300
+ typeof z == "string" && i ? O = U(N, z) : (O = z, O && ee(O) && (O = O.value)), S.props[_] = O;
3174
3301
  try {
3175
3302
  const ne = re(_);
3176
3303
  S.attrs || (S.attrs = {}), O !== void 0 && (S.attrs[ne] = O);
@@ -3182,35 +3309,35 @@ function or(e, t, r) {
3182
3309
  const Y = ne.detail !== void 0 ? ne.detail : ne.target ? ne.target.value : void 0;
3183
3310
  if (N)
3184
3311
  if (z && ee(z)) {
3185
- const ae = z.value;
3186
- (Array.isArray(Y) && Array.isArray(ae) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...ae].sort()) : Y !== ae) && (z.value = Y, n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
3312
+ const oe = z.value;
3313
+ (Array.isArray(Y) && Array.isArray(oe) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...oe].sort()) : Y !== oe) && (z.value = Y, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3187
3314
  } else {
3188
- const ae = U(N, typeof z == "string" ? z : String(z));
3189
- (Array.isArray(Y) && Array.isArray(ae) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...ae].sort()) : Y !== ae) && (D(N, typeof z == "string" ? z : String(z), Y), n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
3315
+ const oe = U(N, typeof z == "string" ? z : String(z));
3316
+ (Array.isArray(Y) && Array.isArray(oe) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...oe].sort()) : Y !== oe) && (I(N, typeof z == "string" ? z : String(z), Y), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3190
3317
  }
3191
3318
  }, delete T[M];
3192
3319
  }
3193
3320
  } catch {
3194
3321
  }
3195
- if (Object.keys(T).length > 0 && (S.directives = { ...T }), v) {
3322
+ if (Object.keys(T).length > 0 && (S.directives = { ...T }), x) {
3196
3323
  const P = he(
3197
- l,
3198
- d,
3324
+ f,
3325
+ h,
3199
3326
  p.length === 1 && Ce(p[0]) && p[0].tag === "#text" ? typeof p[0].children == "string" ? p[0].children : "" : p.length ? p : void 0,
3200
- x
3327
+ v
3201
3328
  ), B = g.pop();
3202
- B ? (l = B.tag, d = B.props, x = B.key, p = B.children, p.push(P)) : (c.push(P), l = null, d = {}, x = void 0, p = []);
3203
- } else A ? l ? p.push(he(f, S, void 0, void 0)) : c.push(he(f, S, void 0, void 0)) : (l && g.push({
3204
- tag: l,
3205
- props: d,
3329
+ B ? (f = B.tag, h = B.props, v = B.key, p = B.children, p.push(P)) : (a.push(P), f = null, h = {}, v = void 0, p = []);
3330
+ } else A ? f ? p.push(he(d, S, void 0, void 0)) : a.push(he(d, S, void 0, void 0)) : (f && g.push({
3331
+ tag: f,
3332
+ props: h,
3206
3333
  children: p,
3207
- key: x
3208
- }), l = f, d = S, p = []);
3334
+ key: v
3335
+ }), f = d, h = S, p = []);
3209
3336
  } else if (typeof b[3] < "u") {
3210
- const f = Number(b[3]), v = t[f], A = `interp-${f}`;
3211
- y(v, A);
3337
+ const d = Number(b[3]), x = t[d], A = `interp-${d}`;
3338
+ y(x, A);
3212
3339
  } else if (b[4]) {
3213
- const f = b[4], v = l ? p : c, A = f.split(/({{\d+}})/);
3340
+ const d = b[4], x = f ? p : a, A = d.split(/({{\d+}})/);
3214
3341
  for (const C of A) {
3215
3342
  if (!C) continue;
3216
3343
  const E = C.match(/^{{(\d+)}}$/);
@@ -3219,32 +3346,32 @@ function or(e, t, r) {
3219
3346
  y(R, S);
3220
3347
  } else {
3221
3348
  const T = `text-${w++}`;
3222
- v.push(a(C, T));
3349
+ x.push(c(C, T));
3223
3350
  }
3224
3351
  }
3225
3352
  }
3226
3353
  }
3227
- const $ = c.filter((f) => Ce(f) && f.tag === "#text" ? typeof f.children == "string" && f.children.trim() !== "" : !0);
3228
- if ($.length === 1) {
3229
- const f = $[0];
3230
- return s && o && De.set(o, f), f;
3231
- } else if ($.length > 1) {
3232
- const f = $;
3233
- return s && o && De.set(o, f), f;
3354
+ const k = a.filter((d) => Ce(d) && d.tag === "#text" ? typeof d.children == "string" && d.children.trim() !== "" : !0);
3355
+ if (k.length === 1) {
3356
+ const d = k[0];
3357
+ return s && o && Ie.set(o, d), d;
3358
+ } else if (k.length > 1) {
3359
+ const d = k;
3360
+ return s && o && Ie.set(o, d), d;
3234
3361
  }
3235
3362
  return he("div", {}, "", "fallback-root");
3236
3363
  }
3237
- function ce(e, ...t) {
3238
- const r = t[t.length - 1], i = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3239
- return or(e, t, i);
3364
+ function ae(e, ...t) {
3365
+ const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3366
+ return or(e, t, n);
3240
3367
  }
3241
3368
  function Re(e, t) {
3242
3369
  return j(e ? t : [], "when-block");
3243
3370
  }
3244
- function vr(e, t) {
3245
- return e.map((r, i) => {
3246
- const n = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${i}` : String(r);
3247
- return j(t(r, i), `each-${n}`);
3371
+ function xr(e, t) {
3372
+ return e.map((r, n) => {
3373
+ const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
3374
+ return j(t(r, n), `each-${i}`);
3248
3375
  });
3249
3376
  }
3250
3377
  function ar() {
@@ -3263,8 +3390,8 @@ function ar() {
3263
3390
  }
3264
3391
  function cr(...e) {
3265
3392
  for (let t = 0; t < e.length; t++) {
3266
- const [r, i] = e[t];
3267
- if (r) return [j(i, `whenChain-branch-${t}`)];
3393
+ const [r, n] = e[t];
3394
+ if (r) return [j(n, `whenChain-branch-${t}`)];
3268
3395
  }
3269
3396
  return [j([], "whenChain-empty")];
3270
3397
  }
@@ -3288,12 +3415,12 @@ function Cr(e, t) {
3288
3415
  return Re(r, t);
3289
3416
  }
3290
3417
  function _r(e, t, r) {
3291
- const i = [];
3292
- return e.forEach((n, s) => {
3293
- t(n, s) && i.push({ item: n, originalIndex: s });
3294
- }), i.map(({ item: n, originalIndex: s }, o) => {
3295
- const a = typeof n == "object" && n != null ? n?.key ?? n?.id ?? `filtered-${s}` : `filtered-${s}`;
3296
- return j(r(n, s, o), `each-where-${a}`);
3418
+ const n = [];
3419
+ return e.forEach((i, s) => {
3420
+ t(i, s) && n.push({ item: i, originalIndex: s });
3421
+ }), n.map(({ item: i, originalIndex: s }, o) => {
3422
+ const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
3423
+ return j(r(i, s, o), `each-where-${c}`);
3297
3424
  });
3298
3425
  }
3299
3426
  function Er(e, t) {
@@ -3301,20 +3428,20 @@ function Er(e, t) {
3301
3428
  return r === 0 && t.empty ? j(t.empty, "switch-length-empty") : r === 1 && t.one ? j(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? j(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? j(t.many(e), "switch-length-many") : j([], "switch-length-fallback");
3302
3429
  }
3303
3430
  function Sr(e, t, r) {
3304
- const i = /* @__PURE__ */ new Map();
3305
- return e.forEach((n) => {
3306
- const s = t(n);
3307
- i.has(s) || i.set(s, []), i.get(s).push(n);
3308
- }), Array.from(i.entries()).map(([n, s], o) => j(
3309
- r(n, s, o),
3310
- `each-group-${n}`
3431
+ const n = /* @__PURE__ */ new Map();
3432
+ return e.forEach((i) => {
3433
+ const s = t(i);
3434
+ n.has(s) || n.set(s, []), n.get(s).push(i);
3435
+ }), Array.from(n.entries()).map(([i, s], o) => j(
3436
+ r(i, s, o),
3437
+ `each-group-${i}`
3311
3438
  ));
3312
3439
  }
3313
- function Ar(e, t, r, i) {
3314
- const n = r * t, s = Math.min(n + t, e.length);
3315
- return e.slice(n, s).map((a, u) => {
3316
- const m = n + u, g = typeof a == "object" && a != null ? a?.key ?? a?.id ?? `page-${m}` : `page-${m}`;
3317
- return j(i(a, m, u), `each-page-${g}`);
3440
+ function Ar(e, t, r, n) {
3441
+ const i = r * t, s = Math.min(i + t, e.length);
3442
+ return e.slice(i, s).map((c, u) => {
3443
+ const m = i + u, g = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${m}` : `page-${m}`;
3444
+ return j(n(c, m, u), `each-page-${g}`);
3318
3445
  });
3319
3446
  }
3320
3447
  function Tr(e, t) {
@@ -3355,45 +3482,45 @@ const te = {
3355
3482
  function Rr(e, t) {
3356
3483
  const r = [];
3357
3484
  e.includes("dark") ? r.push(te.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3358
- const i = e.filter(
3485
+ const n = e.filter(
3359
3486
  (o) => lt.includes(o)
3360
- ), n = i[i.length - 1];
3361
- n && n in te && r.push(te[n]);
3487
+ ), i = n[n.length - 1];
3488
+ i && i in te && r.push(te[i]);
3362
3489
  const s = r.length > 0 ? r.join(" and ") : "all";
3363
3490
  return q(s, t);
3364
3491
  }
3365
3492
  function Or(e) {
3366
3493
  const t = [];
3367
3494
  return e.base && t.push(j(e.base, "responsive-base")), lt.forEach((r) => {
3368
- const i = e[r];
3369
- i && t.push(lr[r](i));
3495
+ const n = e[r];
3496
+ n && t.push(lr[r](n));
3370
3497
  }), t;
3371
3498
  }
3372
3499
  function Pr(e) {
3373
3500
  const t = [];
3374
3501
  let r = null;
3375
3502
  return {
3376
- case(i, n) {
3377
- const s = typeof i == "function" ? i : (o) => o === i;
3378
- return t.push({ condition: s, content: n }), this;
3503
+ case(n, i) {
3504
+ const s = typeof n == "function" ? n : (o) => o === n;
3505
+ return t.push({ condition: s, content: i }), this;
3379
3506
  },
3380
- when(i, n) {
3381
- return t.push({ condition: i, content: n }), this;
3507
+ when(n, i) {
3508
+ return t.push({ condition: n, content: i }), this;
3382
3509
  },
3383
- otherwise(i) {
3384
- return r = i, this;
3510
+ otherwise(n) {
3511
+ return r = n, this;
3385
3512
  },
3386
3513
  done() {
3387
- for (let i = 0; i < t.length; i++) {
3388
- const { condition: n, content: s } = t[i];
3389
- if (n(e))
3390
- return j(s, `switch-case-${i}`);
3514
+ for (let n = 0; n < t.length; n++) {
3515
+ const { condition: i, content: s } = t[n];
3516
+ if (i(e))
3517
+ return j(s, `switch-case-${n}`);
3391
3518
  }
3392
3519
  return j(r || [], "switch-otherwise");
3393
3520
  }
3394
3521
  };
3395
3522
  }
3396
- class de extends EventTarget {
3523
+ class fe extends EventTarget {
3397
3524
  handlers = {};
3398
3525
  static instance;
3399
3526
  eventCounters = /* @__PURE__ */ new Map();
@@ -3401,7 +3528,7 @@ class de extends EventTarget {
3401
3528
  * Returns the singleton instance of GlobalEventBus
3402
3529
  */
3403
3530
  static getInstance() {
3404
- return de.instance || (de.instance = new de()), de.instance;
3531
+ return fe.instance || (fe.instance = new fe()), fe.instance;
3405
3532
  }
3406
3533
  /**
3407
3534
  * Emit a global event with optional data. Includes event storm protection.
@@ -3409,10 +3536,10 @@ class de extends EventTarget {
3409
3536
  * @param data - Optional event payload
3410
3537
  */
3411
3538
  emit(t, r) {
3412
- const i = Date.now(), n = this.eventCounters.get(t);
3413
- if (!n || i - n.window > 1e3)
3414
- this.eventCounters.set(t, { count: 1, window: i });
3415
- else if (n.count++, n.count > 50 && n.count > 100)
3539
+ const n = Date.now(), i = this.eventCounters.get(t);
3540
+ if (!i || n - i.window > 1e3)
3541
+ this.eventCounters.set(t, { count: 1, window: n });
3542
+ else if (i.count++, i.count > 50 && i.count > 100)
3416
3543
  return;
3417
3544
  this.dispatchEvent(new CustomEvent(t, {
3418
3545
  detail: r,
@@ -3424,8 +3551,8 @@ class de extends EventTarget {
3424
3551
  s && s.forEach((o) => {
3425
3552
  try {
3426
3553
  o(r);
3427
- } catch (a) {
3428
- se(`Error in global event handler for "${t}":`, a);
3554
+ } catch (c) {
3555
+ ie(`Error in global event handler for "${t}":`, c);
3429
3556
  }
3430
3557
  });
3431
3558
  }
@@ -3443,8 +3570,8 @@ class de extends EventTarget {
3443
3570
  * @param handler - Handler function to remove
3444
3571
  */
3445
3572
  off(t, r) {
3446
- const i = this.handlers[t];
3447
- i && i.delete(r);
3573
+ const n = this.handlers[t];
3574
+ n && n.delete(r);
3448
3575
  }
3449
3576
  /**
3450
3577
  * Remove all handlers for a specific event.
@@ -3459,8 +3586,8 @@ class de extends EventTarget {
3459
3586
  * @param handler - CustomEvent handler
3460
3587
  * @param options - AddEventListener options
3461
3588
  */
3462
- listen(t, r, i) {
3463
- return this.addEventListener(t, r, i), () => this.removeEventListener(t, r);
3589
+ listen(t, r, n) {
3590
+ return this.addEventListener(t, r, n), () => this.removeEventListener(t, r);
3464
3591
  }
3465
3592
  /**
3466
3593
  * Register a one-time event handler. Returns a promise that resolves with the event data.
@@ -3468,9 +3595,9 @@ class de extends EventTarget {
3468
3595
  * @param handler - Handler function
3469
3596
  */
3470
3597
  once(t, r) {
3471
- return new Promise((i) => {
3472
- const n = this.on(t, (s) => {
3473
- n(), r(s), i(s);
3598
+ return new Promise((n) => {
3599
+ const i = this.on(t, (s) => {
3600
+ i(), r(s), n(s);
3474
3601
  });
3475
3602
  });
3476
3603
  }
@@ -3500,9 +3627,9 @@ class de extends EventTarget {
3500
3627
  */
3501
3628
  getEventStats() {
3502
3629
  const t = {};
3503
- for (const [r, i] of this.eventCounters.entries())
3630
+ for (const [r, n] of this.eventCounters.entries())
3504
3631
  t[r] = {
3505
- count: i.count,
3632
+ count: n.count,
3506
3633
  handlersCount: this.getHandlerCount(r)
3507
3634
  };
3508
3635
  return t;
@@ -3514,44 +3641,44 @@ class de extends EventTarget {
3514
3641
  this.eventCounters.clear();
3515
3642
  }
3516
3643
  }
3517
- const be = de.getInstance(), Lr = (e, t) => be.emit(e, t), Mr = (e, t) => be.on(e, t), jr = (e, t) => be.off(e, t), Wr = (e, t) => be.once(e, t), Nr = (e, t, r) => be.listen(e, t, r);
3644
+ const be = fe.getInstance(), Lr = (e, t) => be.emit(e, t), Mr = (e, t) => be.on(e, t), jr = (e, t) => be.off(e, t), Wr = (e, t) => be.once(e, t), Nr = (e, t, r) => be.listen(e, t, r);
3518
3645
  function tt(e) {
3519
3646
  let t = { ...e };
3520
3647
  const r = [];
3521
- function i(a) {
3522
- r.push(a), a(t);
3648
+ function n(c) {
3649
+ r.push(c), c(t);
3523
3650
  }
3524
- function n() {
3651
+ function i() {
3525
3652
  return t;
3526
3653
  }
3527
- function s(a) {
3528
- const u = typeof a == "function" ? a(t) : a;
3654
+ function s(c) {
3655
+ const u = typeof c == "function" ? c(t) : c;
3529
3656
  t = { ...t, ...u }, o();
3530
3657
  }
3531
3658
  function o() {
3532
- r.forEach((a) => a(t));
3659
+ r.forEach((c) => c(t));
3533
3660
  }
3534
- return { subscribe: i, getState: n, setState: s };
3661
+ return { subscribe: n, getState: i, setState: s };
3535
3662
  }
3536
3663
  const rt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Q = (e, t) => {
3537
3664
  for (const r of e) {
3538
- const i = [], n = r.path.replace(/:[^/]+/g, (a) => (i.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${n}$`), o = t.match(s);
3665
+ const n = [], i = r.path.replace(/:[^/]+/g, (c) => (n.push(c.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3539
3666
  if (o) {
3540
- const a = {};
3541
- return i.forEach((u, m) => {
3542
- a[u] = o[m + 1];
3543
- }), { route: r, params: a };
3667
+ const c = {};
3668
+ return n.forEach((u, m) => {
3669
+ c[u] = o[m + 1];
3670
+ }), { route: r, params: c };
3544
3671
  }
3545
3672
  }
3546
3673
  return { route: null, params: {} };
3547
- }, Ie = {};
3674
+ }, De = {};
3548
3675
  async function ur(e) {
3549
3676
  if (e.component) return e.component;
3550
3677
  if (e.load) {
3551
- if (Ie[e.path]) return Ie[e.path];
3678
+ if (De[e.path]) return De[e.path];
3552
3679
  try {
3553
3680
  const t = await e.load();
3554
- return Ie[e.path] = t.default, t.default;
3681
+ return De[e.path] = t.default, t.default;
3555
3682
  } catch {
3556
3683
  throw new Error(`Failed to load component for route: ${e.path}`);
3557
3684
  }
@@ -3559,125 +3686,125 @@ async function ur(e) {
3559
3686
  throw new Error(`No component or loader defined for route: ${e.path}`);
3560
3687
  }
3561
3688
  function fr(e) {
3562
- const { routes: t, base: r = "", initialUrl: i } = e;
3563
- let n, s, o, a, u, m, g;
3564
- const b = async (x, w) => {
3565
- const c = t.find((h) => Q([h], x.path).route !== null);
3566
- if (c?.beforeEnter)
3689
+ const { routes: t, base: r = "", initialUrl: n } = e;
3690
+ let i, s, o, c, u, m, g;
3691
+ const b = async (v, w) => {
3692
+ const a = t.find((l) => Q([l], v.path).route !== null);
3693
+ if (a?.beforeEnter)
3567
3694
  try {
3568
- const h = await c.beforeEnter(x, w);
3569
- return typeof h == "string" ? (await d(h, !0), !1) : h !== !1;
3570
- } catch (h) {
3571
- return se("beforeEnter error", h), !1;
3695
+ const l = await a.beforeEnter(v, w);
3696
+ return typeof l == "string" ? (await h(l, !0), !1) : l !== !1;
3697
+ } catch (l) {
3698
+ return ie("beforeEnter error", l), !1;
3572
3699
  }
3573
3700
  return !0;
3574
- }, p = async (x, w) => {
3575
- const c = t.find((h) => Q([h], x.path).route !== null);
3576
- if (c?.onEnter)
3701
+ }, p = async (v, w) => {
3702
+ const a = t.find((l) => Q([l], v.path).route !== null);
3703
+ if (a?.onEnter)
3577
3704
  try {
3578
- const h = await c.onEnter(x, w);
3579
- return typeof h == "string" ? (await d(h, !0), !1) : h !== !1;
3580
- } catch (h) {
3581
- return se("onEnter error", h), !1;
3705
+ const l = await a.onEnter(v, w);
3706
+ return typeof l == "string" ? (await h(l, !0), !1) : l !== !1;
3707
+ } catch (l) {
3708
+ return ie("onEnter error", l), !1;
3582
3709
  }
3583
3710
  return !0;
3584
- }, l = (x, w) => {
3585
- const c = t.find((h) => Q([h], x.path).route !== null);
3586
- if (c?.afterEnter)
3711
+ }, f = (v, w) => {
3712
+ const a = t.find((l) => Q([l], v.path).route !== null);
3713
+ if (a?.afterEnter)
3587
3714
  try {
3588
- c.afterEnter(x, w);
3589
- } catch (h) {
3590
- se("afterEnter error", h);
3715
+ a.afterEnter(v, w);
3716
+ } catch (l) {
3717
+ ie("afterEnter error", l);
3591
3718
  }
3592
- }, d = async (x, w = !1) => {
3719
+ }, h = async (v, w = !1) => {
3593
3720
  try {
3594
- const c = {
3595
- path: x.replace(r, "") || "/",
3721
+ const a = {
3722
+ path: v.replace(r, "") || "/",
3596
3723
  query: {}
3597
- }, h = Q(t, c.path);
3598
- if (!h) throw new Error(`No route found for ${c.path}`);
3599
- const y = o.getState(), k = {
3600
- path: c.path,
3601
- params: h.params,
3602
- query: c.query
3724
+ }, l = Q(t, a.path);
3725
+ if (!l) throw new Error(`No route found for ${a.path}`);
3726
+ const y = o.getState(), $ = {
3727
+ path: a.path,
3728
+ params: l.params,
3729
+ query: a.query
3603
3730
  };
3604
- if (!await b(k, y) || !await p(k, y)) return;
3605
- typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + x) : window.history.pushState({}, "", r + x)), o.setState(k), l(k, y);
3606
- } catch (c) {
3607
- se("Navigation error:", c);
3731
+ if (!await b($, y) || !await p($, y)) return;
3732
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + v) : window.history.pushState({}, "", r + v)), o.setState($), f($, y);
3733
+ } catch (a) {
3734
+ ie("Navigation error:", a);
3608
3735
  }
3609
3736
  };
3610
- if (typeof window < "u" && typeof document < "u" && typeof i > "u") {
3611
- n = () => {
3612
- const w = new URL(window.location.href), c = w.pathname.replace(r, "") || "/", h = rt(w.search);
3613
- return { path: c, query: h };
3614
- }, s = n();
3615
- const x = Q(t, s.path);
3737
+ if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
3738
+ i = () => {
3739
+ const w = new URL(window.location.href), a = w.pathname.replace(r, "") || "/", l = rt(w.search);
3740
+ return { path: a, query: l };
3741
+ }, s = i();
3742
+ const v = Q(t, s.path);
3616
3743
  o = tt({
3617
3744
  path: s.path,
3618
- params: x.params,
3745
+ params: v.params,
3619
3746
  query: s.query
3620
- }), a = async (w = !1) => {
3621
- const c = n();
3622
- await d(c.path, w);
3623
- }, window.addEventListener("popstate", () => a(!0)), u = (w) => d(w, !1), m = (w) => d(w, !0), g = () => window.history.back();
3747
+ }), c = async (w = !1) => {
3748
+ const a = i();
3749
+ await h(a.path, w);
3750
+ }, window.addEventListener("popstate", () => c(!0)), u = (w) => h(w, !1), m = (w) => h(w, !0), g = () => window.history.back();
3624
3751
  } else {
3625
- n = () => {
3626
- const c = new URL(i || "/", "http://localhost"), h = c.pathname.replace(r, "") || "/", y = rt(c.search);
3627
- return { path: h, query: y };
3628
- }, s = n();
3629
- const x = Q(t, s.path);
3752
+ i = () => {
3753
+ const a = new URL(n || "/", "http://localhost"), l = a.pathname.replace(r, "") || "/", y = rt(a.search);
3754
+ return { path: l, query: y };
3755
+ }, s = i();
3756
+ const v = Q(t, s.path);
3630
3757
  o = tt({
3631
3758
  path: s.path,
3632
- params: x.params,
3759
+ params: v.params,
3633
3760
  query: s.query
3634
- }), a = async () => {
3635
- const c = n();
3636
- await w(c.path);
3761
+ }), c = async () => {
3762
+ const a = i();
3763
+ await w(a.path);
3637
3764
  };
3638
- const w = async (c) => {
3765
+ const w = async (a) => {
3639
3766
  try {
3640
- const h = {
3641
- path: c.replace(r, "") || "/",
3767
+ const l = {
3768
+ path: a.replace(r, "") || "/",
3642
3769
  query: {}
3643
- }, y = Q(t, h.path);
3644
- if (!y) throw new Error(`No route found for ${h.path}`);
3645
- const k = o.getState(), $ = {
3646
- path: h.path,
3770
+ }, y = Q(t, l.path);
3771
+ if (!y) throw new Error(`No route found for ${l.path}`);
3772
+ const $ = o.getState(), k = {
3773
+ path: l.path,
3647
3774
  params: y.params,
3648
- query: h.query
3649
- }, f = t.find((v) => Q([v], $.path).route !== null);
3650
- if (f?.beforeEnter)
3775
+ query: l.query
3776
+ }, d = t.find((x) => Q([x], k.path).route !== null);
3777
+ if (d?.beforeEnter)
3651
3778
  try {
3652
- const v = await f.beforeEnter($, k);
3653
- if (typeof v == "string") {
3654
- await w(v);
3779
+ const x = await d.beforeEnter(k, $);
3780
+ if (typeof x == "string") {
3781
+ await w(x);
3655
3782
  return;
3656
3783
  }
3657
- if (v === !1) return;
3784
+ if (x === !1) return;
3658
3785
  } catch {
3659
3786
  return;
3660
3787
  }
3661
- if (f?.onEnter)
3788
+ if (d?.onEnter)
3662
3789
  try {
3663
- const v = await f.onEnter($, k);
3664
- if (typeof v == "string") {
3665
- await w(v);
3790
+ const x = await d.onEnter(k, $);
3791
+ if (typeof x == "string") {
3792
+ await w(x);
3666
3793
  return;
3667
3794
  }
3668
- if (v === !1) return;
3795
+ if (x === !1) return;
3669
3796
  } catch {
3670
3797
  return;
3671
3798
  }
3672
- if (o.setState($), f?.afterEnter)
3799
+ if (o.setState(k), d?.afterEnter)
3673
3800
  try {
3674
- f.afterEnter($, k);
3801
+ d.afterEnter(k, $);
3675
3802
  } catch {
3676
3803
  }
3677
3804
  } catch {
3678
3805
  }
3679
3806
  };
3680
- u = async (c) => w(c), m = async (c) => w(c), g = () => {
3807
+ u = async (a) => w(a), m = async (a) => w(a), g = () => {
3681
3808
  };
3682
3809
  }
3683
3810
  return {
@@ -3686,7 +3813,7 @@ function fr(e) {
3686
3813
  replace: m,
3687
3814
  back: g,
3688
3815
  subscribe: o.subscribe,
3689
- matchRoute: (x) => Q(t, x),
3816
+ matchRoute: (v) => Q(t, v),
3690
3817
  getCurrent: () => o.getState(),
3691
3818
  resolveRouteComponent: ur
3692
3819
  };
@@ -3694,68 +3821,68 @@ function fr(e) {
3694
3821
  function zr(e, t) {
3695
3822
  return Q(e, t);
3696
3823
  }
3697
- function Dr(e) {
3824
+ function Ir(e) {
3698
3825
  const t = fr(e);
3699
- return et("router-view", (r = {}, i = {}) => {
3700
- const { onConnected: n } = i;
3701
- if (n && n(() => {
3826
+ return et("router-view", (r = {}, n = {}) => {
3827
+ const { onConnected: i } = n;
3828
+ if (i && i(() => {
3702
3829
  t && typeof t.subscribe == "function" && t.subscribe(() => {
3703
3830
  });
3704
- }), !t) return ce`<div>Router not initialized.</div>`;
3705
- const s = t.getCurrent(), { path: o } = s, a = t.matchRoute(o);
3706
- return a.route ? t.resolveRouteComponent(a.route).then((u) => {
3831
+ }), !t) return ae`<div>Router not initialized.</div>`;
3832
+ const s = t.getCurrent(), { path: o } = s, c = t.matchRoute(o);
3833
+ return c.route ? t.resolveRouteComponent(c.route).then((u) => {
3707
3834
  if (typeof u == "string")
3708
3835
  return { tag: u, props: {}, children: [] };
3709
3836
  if (typeof u == "function") {
3710
3837
  const m = u();
3711
3838
  return (m instanceof Promise ? m : Promise.resolve(m)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
3712
3839
  }
3713
- return ce`<div>Invalid route component</div>`;
3714
- }).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
3715
- }), et("router-link", (r = {}, i = {}) => {
3840
+ return ae`<div>Invalid route component</div>`;
3841
+ }).catch(() => ae`<div>Invalid route component</div>`) : ae`<div>Not found</div>`;
3842
+ }), et("router-link", (r = {}, n = {}) => {
3716
3843
  const {
3717
- to: n = "",
3844
+ to: i = "",
3718
3845
  tag: s = "a",
3719
3846
  replace: o = !1,
3720
- exact: a = !1,
3847
+ exact: c = !1,
3721
3848
  activeClass: u = "active",
3722
3849
  exactActiveClass: m = "exact-active",
3723
3850
  ariaCurrentValue: g = "page",
3724
3851
  disabled: b = !1,
3725
3852
  external: p = !1,
3726
- class: l = ""
3727
- } = r, d = t.getCurrent(), x = d.path === n, w = a ? x : d && typeof d.path == "string" ? d.path.startsWith(n) : !1, c = x ? `aria-current="${g}"` : "", h = (l || "").split(/\s+/).filter(Boolean), y = {};
3728
- for (const C of h) y[C] = !0;
3729
- const k = {
3853
+ class: f = ""
3854
+ } = r, h = t.getCurrent(), v = h.path === i, w = c ? v : h && typeof h.path == "string" ? h.path.startsWith(i) : !1, a = v ? `aria-current="${g}"` : "", l = (f || "").split(/\s+/).filter(Boolean), y = {};
3855
+ for (const C of l) y[C] = !0;
3856
+ const $ = {
3730
3857
  ...y,
3731
3858
  // Also include the configurable names (may duplicate the above)
3732
3859
  [u]: w,
3733
- [m]: x
3734
- }, $ = s === "button", f = b ? $ ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", v = p && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (C) => {
3860
+ [m]: v
3861
+ }, k = s === "button", d = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", x = p && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (C) => {
3735
3862
  if (b) {
3736
3863
  C.preventDefault();
3737
3864
  return;
3738
3865
  }
3739
- p && (s === "a" || !s) || (C.preventDefault(), o ? t.replace(n) : t.push(n));
3866
+ p && (s === "a" || !s) || (C.preventDefault(), o ? t.replace(i) : t.push(i));
3740
3867
  };
3741
- return ce`
3742
- ${ar().when($, ce`
3868
+ return ae`
3869
+ ${ar().when(k, ae`
3743
3870
  <button
3744
3871
  part="button"
3745
- :class="${k}"
3746
- ${c}
3747
- ${f}
3748
- ${v}
3872
+ :class="${$}"
3873
+ ${a}
3874
+ ${d}
3875
+ ${x}
3749
3876
  @click="${A}"
3750
3877
  ><slot></slot></button>
3751
- `).otherwise(ce`
3878
+ `).otherwise(ae`
3752
3879
  <a
3753
3880
  part="link"
3754
- href="${n}"
3755
- :class="${k}"
3756
- ${c}
3757
- ${f}
3758
- ${v}
3881
+ href="${i}"
3882
+ :class="${$}"
3883
+ ${a}
3884
+ ${d}
3885
+ ${x}
3759
3886
  @click="${A}"
3760
3887
  ><slot></slot></a>
3761
3888
  `).done()}
@@ -3763,20 +3890,20 @@ function Dr(e) {
3763
3890
  }), t;
3764
3891
  }
3765
3892
  export {
3766
- de as GlobalEventBus,
3893
+ fe as GlobalEventBus,
3767
3894
  j as anchorBlock,
3768
3895
  et as component,
3769
3896
  hr as computed,
3770
3897
  tt as createStore,
3771
3898
  Pt as css,
3772
- vr as each,
3899
+ xr as each,
3773
3900
  Sr as eachGroup,
3774
3901
  Ar as eachPage,
3775
3902
  _r as eachWhere,
3776
3903
  Lr as emit,
3777
3904
  be as eventBus,
3778
- ce as html,
3779
- Dr as initRouter,
3905
+ ae as html,
3906
+ Ir as initRouter,
3780
3907
  Nr as listen,
3781
3908
  ar as match,
3782
3909
  Q as matchRoute,
@@ -3802,7 +3929,7 @@ export {
3802
3929
  yr as useOnDisconnected,
3803
3930
  wr as useOnError,
3804
3931
  fr as useRouter,
3805
- xr as useStyle,
3932
+ vr as useStyle,
3806
3933
  pr as watch,
3807
3934
  Re as when,
3808
3935
  kr as whenEmpty,