@jasonshimmy/custom-elements-runtime 1.0.3 → 1.0.4

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.
@@ -5,9 +5,9 @@ class dt {
5
5
  * Schedule an update to be executed in the next microtask
6
6
  * Uses component identity to deduplicate multiple render requests for the same component
7
7
  */
8
- schedule(t, n) {
9
- const r = n || t.toString();
10
- this.pendingUpdates.set(r, 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()));
8
+ schedule(t, r) {
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
@@ -15,11 +15,11 @@ class dt {
15
15
  flush() {
16
16
  const t = Array.from(this.pendingUpdates.values());
17
17
  this.pendingUpdates.clear(), this.isFlushScheduled = !1;
18
- for (const n of t)
18
+ for (const r of t)
19
19
  try {
20
- n();
21
- } catch (r) {
22
- typeof console < "u" && console.error && console.error("Error in batched update:", r);
20
+ r();
21
+ } catch (n) {
22
+ typeof console < "u" && console.error && console.error("Error in batched update:", n);
23
23
  }
24
24
  }
25
25
  /**
@@ -41,13 +41,13 @@ class ht {
41
41
  /**
42
42
  * Get or create a reactive proxy for an object
43
43
  */
44
- static getOrCreateProxy(t, n, r = !1) {
44
+ static getOrCreateProxy(t, r, n = !1) {
45
45
  const i = this.cache.get(t);
46
46
  if (i)
47
47
  return i;
48
- const s = r ? this.getOrCreateArrayHandler(n) : this.getOrCreateObjectHandler(n), o = new Proxy(t, s);
48
+ const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
49
49
  try {
50
- rt.markAsProxy(o);
50
+ nt.markAsProxy(o);
51
51
  } catch {
52
52
  }
53
53
  return this.cache.set(t, o), o;
@@ -57,9 +57,9 @@ class ht {
57
57
  */
58
58
  static getOrCreateArrayHandler(t) {
59
59
  if (!this.arrayHandlerCache.has(t)) {
60
- const n = {
61
- get: (r, i, s) => {
62
- const o = Reflect.get(r, i, s);
60
+ const r = {
61
+ get: (n, i, s) => {
62
+ const o = Reflect.get(n, i, s);
63
63
  return typeof o == "function" && typeof i == "string" && [
64
64
  "push",
65
65
  "pop",
@@ -71,14 +71,14 @@ class ht {
71
71
  "fill",
72
72
  "copyWithin"
73
73
  ].includes(i) ? function(...u) {
74
- const m = o.apply(r, u);
74
+ const m = o.apply(n, u);
75
75
  return t.triggerUpdate(), m;
76
76
  } : o;
77
77
  },
78
- set: (r, i, s) => (r[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
79
- deleteProperty: (r, i) => (delete r[i], 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
- this.arrayHandlerCache.set(t, n);
81
+ this.arrayHandlerCache.set(t, r);
82
82
  }
83
83
  return this.arrayHandlerCache.get(t);
84
84
  }
@@ -87,12 +87,12 @@ class ht {
87
87
  */
88
88
  static getOrCreateObjectHandler(t) {
89
89
  if (!this.objectHandlerCache.has(t)) {
90
- const n = {
91
- get: (r, i, s) => Reflect.get(r, i, s),
92
- set: (r, i, s) => (r[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
93
- deleteProperty: (r, i) => (delete r[i], t.triggerUpdate(), !0)
90
+ const r = {
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
- this.objectHandlerCache.set(t, n);
95
+ this.objectHandlerCache.set(t, r);
96
96
  }
97
97
  return this.objectHandlerCache.get(t);
98
98
  }
@@ -118,7 +118,7 @@ class ht {
118
118
  };
119
119
  }
120
120
  }
121
- class rt {
121
+ class nt {
122
122
  // Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
123
123
  // This allows handler caches in ReactiveProxyCache to reuse handlers
124
124
  // for identical reactive contexts instead of creating a new context object
@@ -127,19 +127,19 @@ class rt {
127
127
  /**
128
128
  * Create an optimized reactive proxy with minimal overhead
129
129
  */
130
- static createReactiveProxy(t, n, r) {
130
+ static createReactiveProxy(t, r, n) {
131
131
  try {
132
132
  if (Fe.has(t)) return t;
133
133
  } catch {
134
134
  }
135
135
  const i = Array.isArray(t);
136
- let s = this.contextCache.get(n);
137
- s || (s = /* @__PURE__ */ new WeakMap(), this.contextCache.set(n, s));
138
- let o = s.get(r);
136
+ let s = this.contextCache.get(r);
137
+ s || (s = /* @__PURE__ */ new WeakMap(), this.contextCache.set(r, s));
138
+ let o = s.get(n);
139
139
  return o || (o = {
140
- triggerUpdate: n,
141
- makeReactiveValue: r
142
- }, s.set(r, o)), ht.getOrCreateProxy(t, o, i);
140
+ triggerUpdate: r,
141
+ makeReactiveValue: n
142
+ }, s.set(n, o)), ht.getOrCreateProxy(t, o, i);
143
143
  }
144
144
  /**
145
145
  * Mark an object as a proxy (for optimization)
@@ -165,8 +165,8 @@ class gt {
165
165
  /**
166
166
  * Set the current component being rendered for dependency tracking
167
167
  */
168
- setCurrentComponent(t, n) {
169
- this.currentComponent = t, this.componentRenderFunctions.set(t, n), this.componentDependencies.has(t) || this.componentDependencies.set(t, /* @__PURE__ */ new Set()), this.stateIndexCounter.set(t, 0);
168
+ setCurrentComponent(t, r) {
169
+ this.currentComponent = t, this.componentRenderFunctions.set(t, r), this.componentDependencies.has(t) || this.componentDependencies.set(t, /* @__PURE__ */ new Set()), this.stateIndexCounter.set(t, 0);
170
170
  }
171
171
  /**
172
172
  * Clear the current component after rendering
@@ -198,19 +198,19 @@ class gt {
198
198
  */
199
199
  shouldEmitRenderWarning() {
200
200
  if (!this.currentComponent) return !0;
201
- const t = this.currentComponent, n = this.lastWarningTime.get(t) || 0, r = Date.now();
202
- return r - n < 1e3 ? !1 : (this.lastWarningTime.set(t, r), !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
206
206
  */
207
207
  withoutTracking(t) {
208
- const n = this.trackingDisabled;
208
+ const r = this.trackingDisabled;
209
209
  this.trackingDisabled = !0;
210
210
  try {
211
211
  return t();
212
212
  } finally {
213
- this.trackingDisabled = n;
213
+ this.trackingDisabled = r;
214
214
  }
215
215
  }
216
216
  /**
@@ -219,8 +219,8 @@ class gt {
219
219
  getOrCreateState(t) {
220
220
  if (!this.currentComponent)
221
221
  return new He(t);
222
- const n = this.currentComponent, r = this.stateIndexCounter.get(n) || 0, i = `${n}:${r}`;
223
- if (this.stateIndexCounter.set(n, r + 1), this.stateStorage.has(i))
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
224
  return this.stateStorage.get(i);
225
225
  const s = new He(t);
226
226
  return this.stateStorage.set(i, s), s;
@@ -235,19 +235,19 @@ class gt {
235
235
  * Trigger updates for all components that depend on a state
236
236
  */
237
237
  triggerUpdate(t) {
238
- t.getDependents().forEach((n) => {
239
- const r = this.componentRenderFunctions.get(n);
240
- r && fe(r, n);
238
+ t.getDependents().forEach((r) => {
239
+ const n = this.componentRenderFunctions.get(r);
240
+ n && fe(n, r);
241
241
  });
242
242
  }
243
243
  /**
244
244
  * Clean up component dependencies when component is destroyed
245
245
  */
246
246
  cleanup(t) {
247
- const n = this.componentDependencies.get(t);
248
- n && (n.forEach((r) => r.removeDependent(t)), this.componentDependencies.delete(t)), this.componentRenderFunctions.delete(t);
249
- for (const r of Array.from(this.stateStorage.keys()))
250
- r.startsWith(t + ":") && this.stateStorage.delete(r);
247
+ const r = this.componentDependencies.get(t);
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
  }
@@ -258,8 +258,8 @@ class He {
258
258
  constructor(t) {
259
259
  this._value = this.makeReactive(t);
260
260
  try {
261
- const n = Symbol.for("@cer/ReactiveState");
262
- Object.defineProperty(this, n, { value: !0, enumerable: !1, configurable: !1 });
261
+ const r = Symbol.for("@cer/ReactiveState");
262
+ Object.defineProperty(this, r, { value: !0, enumerable: !1, configurable: !1 });
263
263
  } catch {
264
264
  }
265
265
  }
@@ -284,14 +284,14 @@ class He {
284
284
  return this.dependents;
285
285
  }
286
286
  makeReactive(t) {
287
- return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : rt.createReactiveProxy(
287
+ return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : nt.createReactiveProxy(
288
288
  t,
289
289
  () => F.triggerUpdate(this),
290
- (n) => this.makeReactive(n)
290
+ (r) => this.makeReactive(r)
291
291
  );
292
292
  }
293
293
  }
294
- function fn(e) {
294
+ function ur(e) {
295
295
  return F.getOrCreateState(e === void 0 ? null : e);
296
296
  }
297
297
  function ee(e) {
@@ -307,7 +307,7 @@ function ee(e) {
307
307
  return !1;
308
308
  }
309
309
  }
310
- function dn(e) {
310
+ function fr(e) {
311
311
  const t = new He(e());
312
312
  return {
313
313
  get value() {
@@ -315,44 +315,44 @@ function dn(e) {
315
315
  }
316
316
  };
317
317
  }
318
- function pn(e, t, n = {}) {
319
- let r = e();
320
- n.immediate && t(r, r);
318
+ function dr(e, t, r = {}) {
319
+ let n = e();
320
+ r.immediate && t(n, n);
321
321
  const i = `watch-${Math.random().toString(36).substr(2, 9)}`, s = () => {
322
322
  F.setCurrentComponent(i, s);
323
323
  const o = e();
324
- F.clearCurrentComponent(), o !== r && (t(o, r), r = o);
324
+ F.clearCurrentComponent(), o !== n && (t(o, n), n = o);
325
325
  };
326
326
  return F.setCurrentComponent(i, s), e(), F.clearCurrentComponent(), () => {
327
327
  F.cleanup(i);
328
328
  };
329
329
  }
330
- const ve = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ue = 500;
331
- function ne(e) {
332
- if (ve.has(e))
333
- return ve.get(e);
334
- const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
335
- return ve.size < Ue && ve.set(e, t), t;
336
- }
337
- function it(e) {
330
+ const xe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ue = 500;
331
+ function re(e) {
338
332
  if (xe.has(e))
339
333
  return xe.get(e);
340
- const t = e.replace(/-([a-z])/g, (n, r) => r.toUpperCase());
334
+ const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
341
335
  return xe.size < Ue && xe.set(e, t), t;
342
336
  }
337
+ function it(e) {
338
+ if (ve.has(e))
339
+ return ve.get(e);
340
+ const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
341
+ return ve.size < Ue && ve.set(e, t), t;
342
+ }
343
343
  function ie(e) {
344
344
  if (typeof e == "string") {
345
345
  if (ke.has(e))
346
346
  return ke.get(e);
347
347
  const t = e.replace(
348
348
  /[&<>"']/g,
349
- (n) => ({
349
+ (r) => ({
350
350
  "&": "&amp;",
351
351
  "<": "&lt;",
352
352
  ">": "&gt;",
353
353
  '"': "&quot;",
354
354
  "'": "&#39;"
355
- })[n]
355
+ })[r]
356
356
  );
357
357
  return t !== e && ke.size < Ue && ke.set(e, t), t;
358
358
  }
@@ -360,16 +360,16 @@ function ie(e) {
360
360
  }
361
361
  function H(e, t) {
362
362
  if (typeof t == "string") {
363
- const n = t.split(".").reduce((r, i) => r?.[i], e);
364
- return ee(n) ? n.value : n;
363
+ const r = t.split(".").reduce((n, i) => n?.[i], e);
364
+ return ee(r) ? r.value : r;
365
365
  }
366
366
  return t;
367
367
  }
368
- function Ee(e, t, n) {
369
- const r = String(t).split("."), i = r.pop();
368
+ function Ee(e, t, r) {
369
+ const n = String(t).split("."), i = n.pop();
370
370
  if (!i) return;
371
- const s = r.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
372
- ee(s[i]) ? s[i].value = n : s[i] = n;
371
+ const s = n.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), 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
375
  function se(e, ...t) {
@@ -378,24 +378,24 @@ function se(e, ...t) {
378
378
  function Oe(e, ...t) {
379
379
  st && console.warn(e, ...t);
380
380
  }
381
- function mt(e, t, n) {
382
- if (n)
383
- for (const [r, i] of Object.entries(n)) {
381
+ function mt(e, t, r) {
382
+ if (r)
383
+ for (const [n, i] of Object.entries(r)) {
384
384
  let s, o = {};
385
- if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(r, {
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, r)
388
+ oldValue: H(e, n)
389
389
  }), o.immediate)
390
390
  try {
391
- const a = H(e, r);
391
+ const a = H(e, n);
392
392
  s(a, void 0, e);
393
393
  } catch (a) {
394
- se(`Error in immediate watcher for "${r}":`, a);
394
+ se(`Error in immediate watcher for "${n}":`, a);
395
395
  }
396
396
  }
397
397
  }
398
- function yt(e, t, n, r) {
398
+ function yt(e, t, r, n) {
399
399
  const i = (o, a) => {
400
400
  if (o === a) return !0;
401
401
  if (typeof o != typeof a || typeof o != "object" || o === null || a === null) return !1;
@@ -403,15 +403,15 @@ function yt(e, t, n, r) {
403
403
  return o.length !== a.length ? !1 : o.every((g, b) => i(g, a[b]));
404
404
  const u = Object.keys(o), m = Object.keys(a);
405
405
  return u.length !== m.length ? !1 : u.every((g) => i(o[g], a[g]));
406
- }, s = t.get(n);
407
- if (s && !i(r, s.oldValue))
406
+ }, s = t.get(r);
407
+ if (s && !i(n, s.oldValue))
408
408
  try {
409
- s.callback(r, s.oldValue, e), s.oldValue = r;
409
+ s.callback(n, s.oldValue, e), s.oldValue = n;
410
410
  } catch (o) {
411
- se(`Error in watcher for "${n}":`, o);
411
+ se(`Error in watcher for "${r}":`, o);
412
412
  }
413
413
  for (const [o, a] of t.entries())
414
- if (a.options.deep && n.startsWith(o + "."))
414
+ if (a.options.deep && r.startsWith(o + "."))
415
415
  try {
416
416
  const u = H(e, o);
417
417
  i(u, a.oldValue) || (a.callback(u, a.oldValue, e), a.oldValue = u);
@@ -422,32 +422,32 @@ function yt(e, t, n, r) {
422
422
  function Ke(e, t) {
423
423
  return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
424
424
  }
425
- function bt(e, t, n) {
426
- t && Object.entries(t).forEach(([r, i]) => {
427
- const s = ne(r), o = e.getAttribute(s);
428
- if (i.type === Function && typeof e[r] == "function")
429
- n[r] = e[r];
430
- else if (typeof e[r] < "u")
425
+ function bt(e, t, r) {
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[r];
433
- i.type === Boolean && typeof a == "boolean" || i.type === Number && typeof a == "number" || i.type === Function && typeof a == "function" ? n[r] = a : n[r] = ie(Ke(String(a), i.type));
432
+ const a = e[n];
433
+ i.type === Boolean && typeof a == "boolean" || i.type === Number && typeof a == "number" || i.type === Function && typeof a == "function" ? r[n] = a : r[n] = ie(Ke(String(a), i.type));
434
434
  } catch {
435
- n[r] = e[r];
435
+ r[n] = e[n];
436
436
  }
437
- else o !== null ? n[r] = ie(Ke(o, i.type)) : "default" in i && i.default !== void 0 && (n[r] = ie(i.default));
437
+ else o !== null ? r[n] = ie(Ke(o, i.type)) : "default" in i && i.default !== void 0 && (r[n] = ie(i.default));
438
438
  });
439
439
  }
440
- function wt(e, t, n) {
441
- t.props && bt(e, t.props, n);
440
+ function wt(e, t, r) {
441
+ t.props && bt(e, t.props, r);
442
442
  }
443
- function vt(e, t, n, r) {
444
- e.onConnected && !n && (e.onConnected(t), r(!0));
443
+ function xt(e, t, r, n) {
444
+ e.onConnected && !r && (e.onConnected(t), n(!0));
445
445
  }
446
- function xt(e, t, n, r, i, s, o, a) {
447
- e.onDisconnected && e.onDisconnected(t), n.forEach((u) => u()), r(), i(), s(!1), o(null), a(!1);
446
+ function vt(e, t, r, n, i, s, o, a) {
447
+ e.onDisconnected && e.onDisconnected(t), r.forEach((u) => u()), n(), i(), s(!1), o(null), a(!1);
448
448
  }
449
- function kt(e, t, n, r, i) {
450
- e.onAttributeChanged && e.onAttributeChanged(t, n, r, i);
449
+ function kt(e, t, r, n, i) {
450
+ e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
451
451
  }
452
452
  class Ct {
453
453
  static cache = /* @__PURE__ */ new Map();
@@ -470,14 +470,14 @@ class Ct {
470
470
  /fetch/i,
471
471
  /XMLHttpRequest/i
472
472
  ];
473
- static evaluate(t, n) {
474
- const r = this.cache.get(t);
475
- if (r) {
476
- if (!r.isSecure) {
473
+ static evaluate(t, r) {
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 r.evaluator(n);
480
+ return n.evaluator(r);
481
481
  }
482
482
  const i = this.createEvaluator(t);
483
483
  if (this.cache.size >= this.maxCacheSize) {
@@ -488,7 +488,7 @@ class Ct {
488
488
  Oe("Blocked dangerous expression:", t);
489
489
  return;
490
490
  }
491
- return i.evaluator(n);
491
+ return i.evaluator(r);
492
492
  }
493
493
  static createEvaluator(t) {
494
494
  if (this.hasDangerousPatterns(t))
@@ -499,28 +499,28 @@ class Ct {
499
499
  }, isSecure: !1 };
500
500
  try {
501
501
  return { evaluator: this.createSafeEvaluator(t), isSecure: !0 };
502
- } catch (n) {
503
- return Oe("Failed to create evaluator for expression:", t, n), { evaluator: () => {
502
+ } catch (r) {
503
+ return Oe("Failed to create evaluator for expression:", t, r), { evaluator: () => {
504
504
  }, isSecure: !1 };
505
505
  }
506
506
  }
507
507
  static hasDangerousPatterns(t) {
508
- return this.dangerousPatterns.some((n) => n.test(t));
508
+ return this.dangerousPatterns.some((r) => r.test(t));
509
509
  }
510
510
  static createSafeEvaluator(t) {
511
511
  if (t.trim().startsWith("{") && t.trim().endsWith("}"))
512
512
  return this.createObjectEvaluator(t);
513
513
  if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
514
- const n = t.trim().slice(4);
515
- return (r) => H(r, n);
514
+ const r = t.trim().slice(4);
515
+ return (n) => H(n, r);
516
516
  }
517
- return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (n) => H(n, t);
517
+ return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => H(r, t);
518
518
  }
519
519
  static createObjectEvaluator(t) {
520
- const n = t.trim().slice(1, -1), r = this.parseObjectProperties(n);
520
+ const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
521
521
  return (i) => {
522
522
  const s = {};
523
- for (const { key: o, value: a } of r)
523
+ for (const { key: o, value: a } of n)
524
524
  try {
525
525
  if (a.startsWith("ctx.")) {
526
526
  const u = a.slice(4);
@@ -534,51 +534,51 @@ class Ct {
534
534
  };
535
535
  }
536
536
  static parseObjectProperties(t) {
537
- const n = [], r = t.split(",");
538
- for (const i of r) {
537
+ const r = [], n = t.split(",");
538
+ for (const i of n) {
539
539
  const s = i.indexOf(":");
540
540
  if (s === -1) continue;
541
541
  const o = i.slice(0, s).trim(), a = i.slice(s + 1).trim(), u = o.replace(/^['"]|['"]$/g, "");
542
- n.push({ key: u, value: a });
542
+ r.push({ key: u, value: a });
543
543
  }
544
- return n;
544
+ return r;
545
545
  }
546
546
  static createSimpleEvaluator(t) {
547
- return (n) => {
547
+ return (r) => {
548
548
  try {
549
- let r = t;
549
+ let n = t;
550
550
  const i = [];
551
- r = r.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
552
- const s = r.match(/ctx\.[\w.]+/g) || [];
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 h = b.slice(4), l = H(n, h);
554
+ const h = b.slice(4), l = H(r, h);
555
555
  if (l === void 0) return;
556
556
  const d = i.push(JSON.stringify(l)) - 1;
557
- r = r.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
557
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
558
558
  }
559
- const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, a = r.match(o) || [];
559
+ const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, a = n.match(o) || [];
560
560
  for (const b of a) {
561
561
  if (b.startsWith("ctx.")) continue;
562
- const h = H(n, b);
562
+ const h = H(r, b);
563
563
  if (h === void 0) return;
564
564
  const l = i.push(JSON.stringify(h)) - 1;
565
- r = r.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
565
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
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(r)) !== 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
- const h = H(n, b);
574
+ const h = H(r, b);
575
575
  if (h === void 0) return;
576
576
  const l = JSON.stringify(h), d = i.push(l) - 1;
577
- b.includes(".") ? r = r.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`) : r = r.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${d}#>>`);
577
+ b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${d}#>>`);
578
578
  }
579
- r = r.replace(/<<#(\d+)#>>/g, (b, h) => i[Number(h)]);
579
+ n = n.replace(/<<#(\d+)#>>/g, (b, h) => i[Number(h)]);
580
580
  try {
581
- return this.evaluateBasicExpression(r);
581
+ return this.evaluateBasicExpression(n);
582
582
  } catch {
583
583
  return;
584
584
  }
@@ -593,13 +593,13 @@ class Ct {
593
593
  * arithmetic (+ - * / %), comparisons, logical && and ||, parentheses, and ternary `a ? b : c`.
594
594
  */
595
595
  static evaluateBasicExpression(t) {
596
- const n = this.tokenize(t);
597
- let r = 0;
596
+ const r = this.tokenize(t);
597
+ let n = 0;
598
598
  function i() {
599
- return n[r];
599
+ return r[n];
600
600
  }
601
601
  function s(c) {
602
- const p = n[r++];
602
+ const p = r[n++];
603
603
  if (c && !p)
604
604
  throw new Error(`Unexpected token EOF, expected ${c}`);
605
605
  if (c && p && p.type !== c && p.value !== c)
@@ -707,9 +707,9 @@ class Ct {
707
707
  return c;
708
708
  }
709
709
  function d() {
710
- return i() && i().value === "!" ? (s("OP"), !d()) : i() && i().value === "-" ? (s("OP"), -d()) : v();
710
+ return i() && i().value === "!" ? (s("OP"), !d()) : i() && i().value === "-" ? (s("OP"), -d()) : x();
711
711
  }
712
- function v() {
712
+ function x() {
713
713
  const c = i();
714
714
  if (c) {
715
715
  if (c.type === "NUMBER")
@@ -736,21 +736,21 @@ class Ct {
736
736
  return o();
737
737
  }
738
738
  static tokenize(t) {
739
- const n = [], r = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
739
+ const r = [], n = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
740
740
  let i;
741
- for (; (i = r.exec(t)) !== null; ) {
741
+ for (; (i = n.exec(t)) !== null; ) {
742
742
  const s = i[1];
743
- s && (/^\d/.test(s) ? n.push({ type: "NUMBER", value: s }) : /^"/.test(s) || /^'/.test(s) ? n.push({ type: "STRING", value: s }) : /^[a-zA-Z_]/.test(s) ? n.push({ type: "IDENT", value: s }) : /^[()?:,\[\]]$/.test(s) ? n.push({ type: "PUNC", value: s }) : n.push({ type: "OP", value: s }));
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
- return n;
745
+ return r;
746
746
  }
747
- static evaluateSimpleValue(t, n) {
747
+ static evaluateSimpleValue(t, r) {
748
748
  if (t === "true") return !0;
749
749
  if (t === "false") return !1;
750
750
  if (!isNaN(Number(t))) return Number(t);
751
751
  if (t.startsWith("ctx.")) {
752
- const r = t.slice(4);
753
- return H(n, r);
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
  }
@@ -766,9 +766,9 @@ class oe {
766
766
  /**
767
767
  * Add an event listener with automatic cleanup tracking
768
768
  */
769
- static addListener(t, n, r, i) {
770
- t.addEventListener(n, r, i);
771
- const o = { event: n, handler: r, options: i, cleanup: () => t.removeEventListener(n, r, i), 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
773
  const a = this.cleanupFunctions.get(t);
774
774
  a.push(o), this.cleanupFunctions.get(t).__metaList = a;
@@ -776,13 +776,13 @@ class oe {
776
776
  /**
777
777
  * Remove a specific event listener
778
778
  */
779
- static removeListener(t, n, r, i) {
780
- t.removeEventListener(n, r, i);
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 === n && u.handler === r && JSON.stringify(u.options) === JSON.stringify(i));
785
+ const a = o.findIndex((u) => u.event === r && u.handler === n && JSON.stringify(u.options) === JSON.stringify(i));
786
786
  if (a >= 0) {
787
787
  try {
788
788
  o[a].cleanup();
@@ -801,8 +801,8 @@ class oe {
801
801
  * Clean up all event listeners for an element
802
802
  */
803
803
  static cleanup(t) {
804
- const n = this.cleanupFunctions.get(t);
805
- n && ((n.__metaList || n).forEach((i) => {
804
+ const r = this.cleanupFunctions.get(t);
805
+ r && ((r.__metaList || r).forEach((i) => {
806
806
  try {
807
807
  typeof i == "function" ? i() : i && typeof i.cleanup == "function" && i.cleanup();
808
808
  } catch (s) {
@@ -824,32 +824,32 @@ class oe {
824
824
  * Check if an element has any tracked event listeners
825
825
  */
826
826
  static hasListeners(t) {
827
- const n = this.cleanupFunctions.get(t), r = n ? n.__metaList || n : void 0;
828
- return !!(r && r.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 n = this.cleanupFunctions.get(t), r = n ? n.__metaList || n : void 0;
835
- return r ? r.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
838
  function ue(e, t) {
839
839
  if (t && e instanceof HTMLElement) {
840
840
  oe.cleanup(e);
841
- for (const n in t)
842
- t[n] === e && delete t[n];
843
- for (const n of Array.from(e.childNodes))
844
- ue(n, t);
841
+ for (const r in t)
842
+ t[r] === e && delete t[r];
843
+ for (const r of Array.from(e.childNodes))
844
+ ue(r, t);
845
845
  }
846
846
  }
847
- function he(e, t, n) {
847
+ function he(e, t, r) {
848
848
  if (typeof e == "string") return;
849
- const r = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
- r ? r.value = t : i && n && (n[i] = 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 _t(e, t, n, r, i, s, o, a) {
852
+ function _t(e, t, r, n, i, s, o, a) {
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", h = () => {
855
855
  if (b) {
@@ -859,17 +859,17 @@ function _t(e, t, n, r, i, s, o, a) {
859
859
  return H(s._state || s, e);
860
860
  }, l = h();
861
861
  let d = "text";
862
- o instanceof HTMLInputElement ? d = r?.type || o.type || "text" : o instanceof HTMLSelectElement ? d = "select" : o instanceof HTMLTextAreaElement && (d = "textarea");
863
- const v = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, c = v ? d === "checkbox" || d === "radio" ? "checked" : "value" : a ?? "modelValue";
862
+ o instanceof HTMLInputElement ? d = n?.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
864
  if (d === "checkbox")
865
865
  if (Array.isArray(l))
866
- n[c] = l.includes(String(o?.getAttribute("value") ?? r?.value ?? ""));
866
+ r[c] = l.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
867
867
  else {
868
868
  const C = o?.getAttribute("true-value") ?? !0;
869
- n[c] = l === C;
869
+ r[c] = l === C;
870
870
  }
871
871
  else if (d === "radio")
872
- n[c] = l === (r?.value ?? "");
872
+ r[c] = l === (n?.value ?? "");
873
873
  else if (d === "select")
874
874
  if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
875
875
  const C = Array.isArray(l) ? l.map(String) : [];
@@ -877,14 +877,14 @@ function _t(e, t, n, r, i, s, o, a) {
877
877
  Array.from(o.options).forEach((k) => {
878
878
  k.selected = C.includes(k.value);
879
879
  });
880
- }, 0), n[c] = Array.isArray(l) ? l : [];
880
+ }, 0), r[c] = Array.isArray(l) ? l : [];
881
881
  } else
882
- n[c] = l;
882
+ r[c] = l;
883
883
  else {
884
- n[c] = l;
884
+ r[c] = l;
885
885
  try {
886
- const C = ne(c);
887
- r && (r[C] = l);
886
+ const C = re(c);
887
+ n && (n[C] = l);
888
888
  } catch {
889
889
  }
890
890
  }
@@ -894,7 +894,7 @@ function _t(e, t, n, r, i, s, o, a) {
894
894
  if (C.isTrusted === !1 && !k) return;
895
895
  const f = C.target;
896
896
  if (!f || f._modelUpdating) return;
897
- let x = f.value;
897
+ let v = f.value;
898
898
  if (d === "checkbox") {
899
899
  const T = h();
900
900
  if (Array.isArray(T)) {
@@ -905,38 +905,38 @@ function _t(e, t, n, r, i, s, o, a) {
905
905
  const P = S.indexOf(R);
906
906
  P > -1 && S.splice(P, 1);
907
907
  }
908
- x = S;
908
+ v = S;
909
909
  } else {
910
910
  const R = f.getAttribute("true-value") ?? !0, S = f.getAttribute("false-value") ?? !1;
911
- x = f.checked ? R : S;
911
+ v = f.checked ? R : S;
912
912
  }
913
913
  } else if (d === "radio")
914
- x = f.getAttribute("value") ?? f.value;
914
+ v = f.getAttribute("value") ?? f.value;
915
915
  else if (d === "select" && f.multiple)
916
- x = Array.from(f.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);
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);
920
920
  }
921
921
  const A = s._state || s, _ = h();
922
- if (Array.isArray(x) && Array.isArray(_) ? JSON.stringify([...x].sort()) !== JSON.stringify([..._].sort()) : x !== _) {
922
+ if (Array.isArray(v) && Array.isArray(_) ? JSON.stringify([...v].sort()) !== JSON.stringify([..._].sort()) : v !== _) {
923
923
  f._modelUpdating = !0;
924
924
  try {
925
925
  if (b)
926
926
  if (a && typeof e.value == "object" && e.value !== null) {
927
927
  const T = { ...e.value };
928
- T[a] = x, e.value = T;
928
+ T[a] = v, e.value = T;
929
929
  } else
930
- e.value = x;
930
+ e.value = v;
931
931
  else
932
- Ee(A, e, x);
932
+ Ee(A, e, v);
933
933
  if (s._requestRender && s._requestRender(), s._triggerWatchers) {
934
934
  const T = b ? "reactiveState" : e;
935
- s._triggerWatchers(T, x);
935
+ s._triggerWatchers(T, v);
936
936
  }
937
937
  if (f) {
938
- const T = `update:${ne(c)}`, R = new CustomEvent(T, {
939
- detail: x,
938
+ const T = `update:${re(c)}`, R = new CustomEvent(T, {
939
+ detail: v,
940
940
  bubbles: !0,
941
941
  composed: !0
942
942
  });
@@ -947,28 +947,28 @@ function _t(e, t, n, r, i, s, o, a) {
947
947
  }
948
948
  }
949
949
  };
950
- if (v) {
950
+ if (x) {
951
951
  if (i[p]) {
952
952
  const C = i[p];
953
953
  o && oe.removeListener(o, p, C);
954
954
  }
955
955
  i[p] = y;
956
956
  } else {
957
- const C = `update:${ne(c)}`;
957
+ const C = `update:${re(c)}`;
958
958
  if (i[C]) {
959
959
  const k = i[C];
960
960
  o && oe.removeListener(o, C, k);
961
961
  }
962
962
  i[C] = (k) => {
963
- const f = s._state || s, x = k.detail !== void 0 ? k.detail : k.target?.value, A = H(f, e);
964
- if (Array.isArray(x) && Array.isArray(A) ? JSON.stringify([...x].sort()) !== JSON.stringify([...A].sort()) : x !== A) {
965
- Ee(f, e, x), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, x);
963
+ const f = s._state || s, v = k.detail !== void 0 ? k.detail : k.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
+ Ee(f, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
966
966
  const $ = k.target;
967
967
  if ($) {
968
- $[c] = x;
968
+ $[c] = v;
969
969
  try {
970
- const T = ne(c);
971
- typeof x == "boolean" ? x ? $.setAttribute(T, "true") : $.setAttribute(T, "false") : $.setAttribute(T, String(x));
970
+ const T = re(c);
971
+ typeof v == "boolean" ? v ? $.setAttribute(T, "true") : $.setAttribute(T, "false") : $.setAttribute(T, String(v));
972
972
  } catch {
973
973
  }
974
974
  queueMicrotask(() => {
@@ -982,7 +982,7 @@ function _t(e, t, n, r, i, s, o, a) {
982
982
  i._isComposing = !1;
983
983
  const k = C.target;
984
984
  k && setTimeout(() => {
985
- const f = k.value, x = s._state || s, A = H(x, e);
985
+ const f = k.value, v = s._state || s, A = H(v, e);
986
986
  let _ = f;
987
987
  if (m && (_ = _.trim()), g) {
988
988
  const T = Number(_);
@@ -991,7 +991,7 @@ function _t(e, t, n, r, i, s, o, a) {
991
991
  if (Array.isArray(_) && Array.isArray(A) ? JSON.stringify([..._].sort()) !== JSON.stringify([...A].sort()) : _ !== A) {
992
992
  k._modelUpdating = !0;
993
993
  try {
994
- Ee(x, e, _), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, _);
994
+ Ee(v, e, _), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, _);
995
995
  } finally {
996
996
  setTimeout(() => k._modelUpdating = !1, 0);
997
997
  }
@@ -1003,38 +1003,38 @@ 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 Et(e, t, n, r) {
1006
+ function Et(e, t, r, n) {
1007
1007
  if (typeof e == "object" && e !== null)
1008
1008
  for (const [i, s] of Object.entries(e))
1009
- i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? n[i] = s : t[i] = s;
1009
+ i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
1010
1010
  else if (typeof e == "string") {
1011
- if (!r) return;
1011
+ if (!n) return;
1012
1012
  try {
1013
- const i = me(e, r);
1013
+ const i = me(e, n);
1014
1014
  if (typeof i == "object" && i !== null) {
1015
1015
  for (const [s, o] of Object.entries(i))
1016
- s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? n[s] = o : t[s] = o;
1016
+ s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? r[s] = o : t[s] = o;
1017
1017
  return;
1018
1018
  } else {
1019
- n[e] = i;
1019
+ r[e] = i;
1020
1020
  return;
1021
1021
  }
1022
1022
  } catch {
1023
- const i = H(r, e);
1024
- n[e] = i;
1023
+ const i = H(n, e);
1024
+ r[e] = i;
1025
1025
  }
1026
1026
  }
1027
1027
  }
1028
- function $t(e, t, n) {
1029
- let r;
1028
+ function $t(e, t, r) {
1029
+ let n;
1030
1030
  if (typeof e == "string") {
1031
- if (!n) return;
1032
- r = me(e, n);
1031
+ if (!r) return;
1032
+ n = me(e, r);
1033
1033
  } else
1034
- r = e;
1034
+ n = e;
1035
1035
  const i = t.style || "";
1036
1036
  let s = i;
1037
- if (r) {
1037
+ if (n) {
1038
1038
  if (i) {
1039
1039
  const o = i.split(";").map((u) => u.trim()).filter(Boolean), a = o.findIndex(
1040
1040
  (u) => u.startsWith("display:")
@@ -1053,31 +1053,31 @@ function $t(e, t, n) {
1053
1053
  function me(e, t) {
1054
1054
  return Ct.evaluate(e, t);
1055
1055
  }
1056
- function St(e, t, n) {
1057
- let r;
1056
+ function St(e, t, r) {
1057
+ let n;
1058
1058
  if (typeof e == "string") {
1059
- if (!n) return;
1060
- r = me(e, n);
1059
+ if (!r) return;
1060
+ n = me(e, r);
1061
1061
  } else
1062
- r = e;
1062
+ n = e;
1063
1063
  let i = [];
1064
- typeof r == "string" ? i = [r] : Array.isArray(r) ? i = r.filter(Boolean) : typeof r == "object" && r !== null && (i = Object.entries(r).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
1064
+ typeof n == "string" ? i = [n] : Array.isArray(n) ? i = n.filter(Boolean) : typeof n == "object" && n !== null && (i = Object.entries(n).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
1065
1065
  const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
1066
1066
  o && (t.class = o);
1067
1067
  }
1068
- function At(e, t, n) {
1069
- let r;
1068
+ function At(e, t, r) {
1069
+ let n;
1070
1070
  if (typeof e == "string") {
1071
- if (!n) return;
1072
- r = me(e, n);
1071
+ if (!r) return;
1072
+ n = me(e, r);
1073
1073
  } else
1074
- r = e;
1074
+ n = e;
1075
1075
  let i = "";
1076
- if (typeof r == "string")
1077
- i = r;
1078
- else if (r && typeof r == "object") {
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(r))
1080
+ for (const [a, u] of Object.entries(n))
1081
1081
  if (u != null && u !== "") {
1082
1082
  const m = a.replace(
1083
1083
  /[A-Z]/g,
@@ -1116,12 +1116,12 @@ function At(e, t, n) {
1116
1116
  const s = t.style || "";
1117
1117
  t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
1118
1118
  }
1119
- function Tt(e, t, n) {
1120
- let r = e;
1121
- typeof e == "string" && n && (r = me(e, n)), ee(r) ? t.reactiveRef = r : t.ref = r;
1119
+ function Tt(e, t, r) {
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, n, r) {
1124
- const i = {}, s = { ...r || {} }, o = {};
1123
+ function at(e, t, r, n) {
1124
+ const i = {}, s = { ...n || {} }, o = {};
1125
1125
  for (const [a, u] of Object.entries(e)) {
1126
1126
  const { value: m, modifiers: g, arg: b } = u;
1127
1127
  if (a === "model" || a.startsWith("model:")) {
@@ -1134,7 +1134,7 @@ function at(e, t, n, r) {
1134
1134
  s,
1135
1135
  o,
1136
1136
  t,
1137
- n,
1137
+ r,
1138
1138
  l
1139
1139
  );
1140
1140
  continue;
@@ -1187,39 +1187,39 @@ function Be(e, t) {
1187
1187
  return Array.isArray(g) && (g = Be(g, u)), { ...o, key: u, children: g };
1188
1188
  });
1189
1189
  }
1190
- const n = e;
1191
- let r = n.props?.key ?? n.key ?? t, i = n.children;
1192
- return Array.isArray(i) && (i = Be(i, r)), { ...n, key: r, children: i };
1190
+ const r = e;
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, n, r) {
1195
- const i = n.directives ?? {}, s = at(
1194
+ function Ve(e, t, r, n) {
1195
+ const i = r.directives ?? {}, s = at(
1196
1196
  i,
1197
- r,
1197
+ n,
1198
1198
  e,
1199
- n.attrs
1199
+ r.attrs
1200
1200
  ), o = {
1201
1201
  ...t.props,
1202
- ...n.props,
1202
+ ...r.props,
1203
1203
  ...s.props
1204
1204
  }, a = {
1205
1205
  ...t.attrs,
1206
- ...n.attrs,
1206
+ ...r.attrs,
1207
1207
  ...s.attrs
1208
- }, u = t.props ?? {}, m = o, g = n?.isCustomElement ?? t?.isCustomElement ?? !1;
1208
+ }, u = t.props ?? {}, m = o, g = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
1209
  let b = !1;
1210
1210
  for (const d in { ...u, ...m }) {
1211
- const v = u[d], w = m[d];
1212
- if (v !== w)
1211
+ const x = u[d], w = m[d];
1212
+ if (x !== w)
1213
1213
  if (b = !0, d === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
1214
  e.value !== w && (e.value = w ?? "");
1215
1215
  else if (d === "checked" && e instanceof HTMLInputElement)
1216
1216
  e.checked = !!w;
1217
1217
  else if (d.startsWith("on") && typeof w == "function") {
1218
1218
  const c = ot(d);
1219
- typeof v == "function" && oe.removeListener(e, c, v), oe.addListener(e, c, w);
1219
+ typeof x == "function" && oe.removeListener(e, c, x), oe.addListener(e, c, w);
1220
1220
  } else if (w == null)
1221
1221
  e.removeAttribute(d);
1222
- else if ((n?.isCustomElement ?? t?.isCustomElement ?? !1) || d in e)
1222
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || d in e)
1223
1223
  try {
1224
1224
  e[d] = w;
1225
1225
  } catch {
@@ -1227,15 +1227,15 @@ function Ve(e, t, n, r) {
1227
1227
  else
1228
1228
  w === !1 && e.removeAttribute(d);
1229
1229
  }
1230
- for (const [d, v] of Object.entries(
1230
+ for (const [d, x] of Object.entries(
1231
1231
  s.listeners || {}
1232
1232
  ))
1233
- oe.addListener(e, d, v);
1233
+ oe.addListener(e, d, x);
1234
1234
  const h = t.attrs ?? {}, l = a;
1235
1235
  for (const d in { ...h, ...l }) {
1236
- const v = h[d], w = l[d];
1237
- let c = v, p = w;
1238
- if (ee(v) && (c = v.value), ee(w) && (p = w.value), c !== p)
1236
+ const x = h[d], w = l[d];
1237
+ let c = x, p = w;
1238
+ if (ee(x) && (c = x.value), ee(w) && (p = w.value), c !== p)
1239
1239
  if (b = !0, p == null || p === !1) {
1240
1240
  if (e.removeAttribute(d), d === "value") {
1241
1241
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
@@ -1327,7 +1327,7 @@ function Ve(e, t, n, r) {
1327
1327
  } catch {
1328
1328
  }
1329
1329
  }
1330
- function X(e, t, n) {
1330
+ function X(e, t, r) {
1331
1331
  if (typeof e == "string")
1332
1332
  return document.createTextNode(e);
1333
1333
  if (e.tag === "#text") {
@@ -1337,80 +1337,80 @@ function X(e, t, n) {
1337
1337
  return e.key != null && (h.key = e.key), h;
1338
1338
  }
1339
1339
  if (e.tag === "#anchor") {
1340
- const h = e, l = Array.isArray(h.children) ? h.children : [], d = document.createTextNode(""), v = document.createTextNode("");
1341
- h.key != null && (d.key = `${h.key}:start`, v.key = `${h.key}:end`), h._startNode = d, h._endNode = v;
1340
+ const h = e, l = Array.isArray(h.children) ? h.children : [], d = document.createTextNode(""), x = document.createTextNode("");
1341
+ h.key != null && (d.key = `${h.key}:start`, x.key = `${h.key}:end`), h._startNode = d, h._endNode = x;
1342
1342
  const w = document.createDocumentFragment();
1343
1343
  w.appendChild(d);
1344
1344
  for (const c of l) {
1345
1345
  const p = X(c, t);
1346
1346
  w.appendChild(p);
1347
1347
  }
1348
- return w.appendChild(v), w;
1348
+ return w.appendChild(x), w;
1349
1349
  }
1350
- const r = document.createElement(e.tag);
1351
- e.key != null && (r.key = e.key);
1352
- const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = at(o, t, r, s), u = {
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 ?? {}, a = at(o, t, n, s), u = {
1353
1353
  ...i,
1354
1354
  ...a.props
1355
1355
  }, m = {
1356
1356
  ...s,
1357
1357
  ...a.attrs
1358
- }, g = r.namespaceURI === "http://www.w3.org/2000/svg";
1358
+ }, g = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
1359
  for (const h in m) {
1360
1360
  const l = m[h];
1361
1361
  if (!(typeof h != "string" || /\[object Object\]/.test(h))) {
1362
1362
  if (typeof l == "boolean")
1363
- l && r.setAttribute(h, "");
1363
+ l && n.setAttribute(h, "");
1364
1364
  else if (l != null)
1365
- if (!g && h === "value" && (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement || r instanceof HTMLProgressElement))
1365
+ if (!g && h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1366
1366
  try {
1367
- r instanceof HTMLProgressElement ? r.value = Number(l) : r.value = l ?? "";
1367
+ n instanceof HTMLProgressElement ? n.value = Number(l) : n.value = l ?? "";
1368
1368
  } catch {
1369
- r.setAttribute(h, String(l));
1369
+ n.setAttribute(h, String(l));
1370
1370
  }
1371
- else if (!g && h === "checked" && r instanceof HTMLInputElement)
1371
+ else if (!g && h === "checked" && n instanceof HTMLInputElement)
1372
1372
  try {
1373
- r.checked = !!l;
1373
+ n.checked = !!l;
1374
1374
  } catch {
1375
- r.setAttribute(h, String(l));
1375
+ n.setAttribute(h, String(l));
1376
1376
  }
1377
- else if (!g && h in r)
1377
+ else if (!g && h in n)
1378
1378
  try {
1379
- r[h] = l;
1379
+ n[h] = l;
1380
1380
  } catch {
1381
- r.setAttribute(h, String(l));
1381
+ n.setAttribute(h, String(l));
1382
1382
  }
1383
1383
  else if ((e.props?.isCustomElement ?? !1) && !g && h.includes("-")) {
1384
- const v = it(h);
1384
+ const x = it(h);
1385
1385
  try {
1386
- r[v] = l;
1386
+ n[x] = l;
1387
1387
  } catch {
1388
- r.setAttribute(h, String(l));
1388
+ n.setAttribute(h, String(l));
1389
1389
  }
1390
1390
  } else
1391
- r.setAttribute(h, String(l));
1391
+ n.setAttribute(h, String(l));
1392
1392
  }
1393
1393
  }
1394
1394
  for (const h in u) {
1395
1395
  const l = u[h];
1396
1396
  if (!(typeof h != "string" || /\[object Object\]/.test(h)))
1397
- if (h === "value" && (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement)) {
1397
+ if (h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
1398
  const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1399
- r.value = d ?? "";
1400
- } else if (h === "checked" && r instanceof HTMLInputElement) {
1399
+ n.value = d ?? "";
1400
+ } else if (h === "checked" && n instanceof HTMLInputElement) {
1401
1401
  const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1402
- r.checked = !!d;
1402
+ n.checked = !!d;
1403
1403
  } else if (h.startsWith("on") && typeof l == "function")
1404
- oe.addListener(r, ot(h), l);
1404
+ oe.addListener(n, ot(h), l);
1405
1405
  else {
1406
1406
  if (h.startsWith("on") && l === void 0)
1407
1407
  continue;
1408
1408
  if (l == null || l === !1)
1409
- r.removeAttribute(h);
1410
- else if ((e.props?.isCustomElement ?? !1) || h in r)
1409
+ n.removeAttribute(h);
1410
+ else if ((e.props?.isCustomElement ?? !1) || h in n)
1411
1411
  try {
1412
- const v = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1413
- r[h] = v;
1412
+ const x = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1413
+ n[h] = x;
1414
1414
  } catch {
1415
1415
  }
1416
1416
  }
@@ -1418,7 +1418,7 @@ function X(e, t, n) {
1418
1418
  for (const [h, l] of Object.entries(
1419
1419
  a.listeners || {}
1420
1420
  ))
1421
- oe.addListener(r, h, l);
1421
+ oe.addListener(n, h, l);
1422
1422
  const b = {
1423
1423
  ...e,
1424
1424
  props: {
@@ -1426,36 +1426,36 @@ function X(e, t, n) {
1426
1426
  ...a.props
1427
1427
  }
1428
1428
  };
1429
- he(b, r, n);
1429
+ he(b, n, r);
1430
1430
  try {
1431
- if (typeof r._applyProps == "function")
1431
+ if (typeof n._applyProps == "function")
1432
1432
  try {
1433
- r._applyProps(r._cfg);
1433
+ n._applyProps(n._cfg);
1434
1434
  } catch {
1435
1435
  }
1436
- typeof r.requestRender == "function" ? r.requestRender() : typeof r._render == "function" && r._render(r._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 h of e.children)
1441
- r.appendChild(X(h, t, n));
1442
- else typeof e.children == "string" && (r.textContent = e.children);
1441
+ n.appendChild(X(h, t, r));
1442
+ else typeof e.children == "string" && (n.textContent = e.children);
1443
1443
  try {
1444
- if (r instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1444
+ if (n instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1445
1445
  try {
1446
- r.value = m.value ?? "";
1446
+ n.value = m.value ?? "";
1447
1447
  } catch {
1448
1448
  }
1449
1449
  } catch {
1450
1450
  }
1451
- return r;
1451
+ return n;
1452
1452
  }
1453
- function Rt(e, t, n, r, i) {
1454
- if (typeof n == "string") {
1455
- e.textContent !== n && (e.textContent = n);
1453
+ function Rt(e, t, r, n, i) {
1454
+ if (typeof r == "string") {
1455
+ e.textContent !== r && (e.textContent = r);
1456
1456
  return;
1457
1457
  }
1458
- if (!Array.isArray(n)) return;
1458
+ if (!Array.isArray(r)) return;
1459
1459
  const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
1460
1460
  for (const l of o)
1461
1461
  l && l.key != null && a.set(l.key, l);
@@ -1467,16 +1467,16 @@ function Rt(e, t, n, r, i) {
1467
1467
  const m = /* @__PURE__ */ new Set();
1468
1468
  let g = e.firstChild;
1469
1469
  function b(l, d) {
1470
- let v = l;
1471
- for (; v && (m.add(v), v !== d); )
1472
- v = v.nextSibling;
1470
+ let x = l;
1471
+ for (; x && (m.add(x), x !== d); )
1472
+ x = x.nextSibling;
1473
1473
  }
1474
- function h(l, d, v, w) {
1474
+ function h(l, d, x, w) {
1475
1475
  const c = [];
1476
1476
  let p = l.nextSibling;
1477
1477
  for (; p && p !== d; )
1478
1478
  c.push(p), p = p.nextSibling;
1479
- const y = Array.isArray(v) ? v : [];
1479
+ const y = Array.isArray(x) ? x : [];
1480
1480
  if (w.some((k) => k && k.key != null) || y.some((k) => k && k.key != null)) {
1481
1481
  const k = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1482
1482
  for (const _ of y)
@@ -1485,7 +1485,7 @@ function Rt(e, t, n, r, i) {
1485
1485
  const $ = _.key;
1486
1486
  $ != null && f.set($, _);
1487
1487
  }
1488
- const x = /* @__PURE__ */ new Set();
1488
+ const v = /* @__PURE__ */ new Set();
1489
1489
  let A = l.nextSibling;
1490
1490
  for (const _ of w) {
1491
1491
  let $;
@@ -1495,121 +1495,121 @@ function Rt(e, t, n, r, i) {
1495
1495
  f.get(_.key),
1496
1496
  T,
1497
1497
  _,
1498
- r
1499
- ), x.add($), $ !== A && e.contains($) && e.insertBefore($, A);
1498
+ n
1499
+ ), v.add($), $ !== A && e.contains($) && e.insertBefore($, A);
1500
1500
  } else
1501
- $ = X(_, r), e.insertBefore($, A), x.add($);
1501
+ $ = X(_, n), e.insertBefore($, A), v.add($);
1502
1502
  A = $.nextSibling;
1503
1503
  }
1504
1504
  for (const _ of c)
1505
- !x.has(_) && e.contains(_) && e.removeChild(_);
1505
+ !v.has(_) && e.contains(_) && e.removeChild(_);
1506
1506
  } else {
1507
1507
  const k = Math.min(
1508
1508
  y.length,
1509
1509
  w.length
1510
1510
  );
1511
1511
  for (let f = 0; f < k; f++) {
1512
- const x = y[f], A = w[f], _ = $e(c[f], x, A, r);
1512
+ const v = y[f], A = w[f], _ = $e(c[f], v, A, n);
1513
1513
  _ !== c[f] && (e.insertBefore(_, c[f]), e.removeChild(c[f]));
1514
1514
  }
1515
1515
  for (let f = k; f < w.length; f++)
1516
- e.insertBefore(X(w[f], r), d);
1516
+ e.insertBefore(X(w[f], n), d);
1517
1517
  for (let f = k; f < c.length; f++)
1518
1518
  e.removeChild(c[f]);
1519
1519
  }
1520
1520
  }
1521
- for (const l of n) {
1521
+ for (const l of r) {
1522
1522
  let d;
1523
1523
  if (l.tag === "#anchor") {
1524
- const v = l.key, w = `${v}:start`, c = `${v}:end`;
1524
+ const x = l.key, w = `${x}:start`, c = `${x}:end`;
1525
1525
  let p = u.get(w), y = u.get(c);
1526
1526
  const C = Array.isArray(l.children) ? l.children : [];
1527
1527
  if (p || (p = document.createTextNode(""), p.key = w), y || (y = document.createTextNode(""), y.key = c), l._startNode = p, l._endNode = y, !e.contains(p) || !e.contains(y)) {
1528
1528
  e.insertBefore(p, g);
1529
1529
  for (const k of C)
1530
- e.insertBefore(X(k, r), g);
1530
+ e.insertBefore(X(k, n), g);
1531
1531
  e.insertBefore(y, g);
1532
1532
  } else
1533
1533
  h(
1534
1534
  p,
1535
1535
  y,
1536
- a.get(v)?.children,
1536
+ a.get(x)?.children,
1537
1537
  C
1538
1538
  );
1539
1539
  b(p, y), g = y.nextSibling;
1540
1540
  continue;
1541
1541
  }
1542
1542
  if (l.key != null && u.has(l.key)) {
1543
- const v = a.get(l.key);
1543
+ const x = a.get(l.key);
1544
1544
  d = $e(
1545
1545
  u.get(l.key),
1546
- v,
1546
+ x,
1547
1547
  l,
1548
- r,
1548
+ n,
1549
1549
  i
1550
1550
  ), m.add(d), d !== g && e.contains(d) && (g && !e.contains(g) && (g = null), e.insertBefore(d, g));
1551
1551
  } else
1552
- d = X(l, r, i), g && !e.contains(g) && (g = null), e.insertBefore(d, g), m.add(d);
1552
+ d = X(l, n, i), g && !e.contains(g) && (g = null), e.insertBefore(d, g), m.add(d);
1553
1553
  g = d.nextSibling;
1554
1554
  }
1555
1555
  for (const l of s)
1556
1556
  !m.has(l) && e.contains(l) && (ue(l, i), e.removeChild(l));
1557
1557
  }
1558
- function $e(e, t, n, r, i) {
1559
- if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === n) return e;
1560
- if (typeof n == "string") {
1558
+ function $e(e, t, r, n, i) {
1559
+ if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === r) return e;
1560
+ if (typeof r == "string") {
1561
1561
  if (e.nodeType === Node.TEXT_NODE)
1562
- return e.textContent !== n && (e.textContent = n), e;
1562
+ return e.textContent !== r && (e.textContent = r), e;
1563
1563
  {
1564
- const o = document.createTextNode(n);
1564
+ const o = document.createTextNode(r);
1565
1565
  return e.parentNode?.replaceChild(o, e), o;
1566
1566
  }
1567
1567
  }
1568
- if (n && typeof n != "string" && n.tag === "#anchor") {
1569
- const o = n, a = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""), m = o._endNode ?? document.createTextNode("");
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("");
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
1573
  for (const b of a) {
1574
- const h = X(b, r);
1574
+ const h = X(b, n);
1575
1575
  g.appendChild(h);
1576
1576
  }
1577
1577
  return g.appendChild(m), e.parentNode?.replaceChild(g, e), u;
1578
1578
  }
1579
- if (!n) {
1579
+ if (!r) {
1580
1580
  ue(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
1585
  ue(e, i);
1586
- const o = X(n, r, i);
1587
- return he(n, o, i), e.parentNode?.replaceChild(o, e), o;
1586
+ const o = X(r, n, i);
1587
+ return he(r, o, i), e.parentNode?.replaceChild(o, e), o;
1588
1588
  }
1589
- if (n.tag === "#anchor") {
1590
- const o = Array.isArray(n.children) ? n.children : [], a = n._startNode ?? document.createTextNode(""), u = n._endNode ?? document.createTextNode("");
1591
- n.key != null && (a.key = `${n.key}:start`, u.key = `${n.key}:end`), n._startNode = a, n._endNode = u;
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;
1592
1592
  const m = document.createDocumentFragment();
1593
1593
  m.appendChild(a);
1594
1594
  for (const g of o)
1595
- m.appendChild(X(g, r));
1595
+ m.appendChild(X(g, n));
1596
1596
  return m.appendChild(u), e.parentNode?.replaceChild(m, e), a;
1597
1597
  }
1598
- if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && t.key === n.key) {
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 || {}, n.props || {}, r), Rt(o, t.children, n.children, r, i), he(n, o, i), o;
1600
+ return Ve(o, t.props || {}, r.props || {}, n), Rt(o, t.children, r.children, n, i), he(r, o, i), o;
1601
1601
  }
1602
- if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && (t.tag && String(t.tag).includes("-") || n.props && n.props.isCustomElement || t.props && t.props.isCustomElement))
1602
+ if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
1603
1603
  try {
1604
1604
  const a = e;
1605
- return Ve(a, t.props || {}, n.props || {}, r), he(n, a, i), a;
1605
+ return Ve(a, t.props || {}, r.props || {}, n), he(r, a, i), a;
1606
1606
  } catch {
1607
1607
  }
1608
1608
  ue(e, i);
1609
- const s = X(n, r, i);
1610
- return he(n, s, i), e.parentNode?.replaceChild(s, e), s;
1609
+ const s = X(r, n, i);
1610
+ return he(r, s, i), e.parentNode?.replaceChild(s, e), s;
1611
1611
  }
1612
- function Ot(e, t, n, r) {
1612
+ function Ot(e, t, r, n) {
1613
1613
  let i;
1614
1614
  Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })) : i = { tag: "div", key: "__root__", children: t } : (i = t, i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })), i && typeof i == "object" && i.tag === "#anchor" && (i = {
1615
1615
  tag: "div",
@@ -1619,11 +1619,11 @@ function Ot(e, t, n, r) {
1619
1619
  }), i = Be(i, String(i.key ?? "root"));
1620
1620
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
1621
1621
  let a;
1622
- s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? a = $e(o, s, i, n, r) : (a = X(i, n, r), e.replaceChild(a, o)) : (a = X(i, n, r), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
1622
+ s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? a = $e(o, s, i, r, n) : (a = X(i, r, n), e.replaceChild(a, o)) : (a = X(i, r, n), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
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, r), u.push(g));
1626
+ g !== a && g.nodeName !== "STYLE" && (ue(g, n), u.push(g));
1627
1627
  }
1628
1628
  u.forEach((m) => e.removeChild(m)), e._prevVNode = i, e._prevDom = a;
1629
1629
  }
@@ -1635,16 +1635,16 @@ function Pe(e) {
1635
1635
  return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Pe).join("");
1636
1636
  let t = "";
1637
1637
  e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${ie(String(s))}"`).join(""));
1638
- let n = "";
1639
- e.props && (n = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${ie(String(s))}"`).join(""));
1640
- const r = 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}${n}>${r}</${e.tag}>`;
1638
+ let r = "";
1639
+ e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${ie(String(s))}"`).join(""));
1640
+ const n = 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}>${n}</${e.tag}>`;
1642
1642
  }
1643
1643
  function Pt(e, ...t) {
1644
- let n = "";
1645
- for (let r = 0; r < e.length; r++)
1646
- n += e[r], r < t.length && (n += t[r]);
1647
- return n;
1644
+ let r = "";
1645
+ for (let n = 0; n < e.length; n++)
1646
+ r += e[n], n < t.length && (r += t[n]);
1647
+ return r;
1648
1648
  }
1649
1649
  function ct(e) {
1650
1650
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
@@ -1814,9 +1814,9 @@ const Mt = Pt`
1814
1814
  Object.entries(jt).map(([e, t]) => [
1815
1815
  e,
1816
1816
  Object.fromEntries(
1817
- Object.entries(t).map(([n, r]) => [
1818
- n,
1819
- `var(--color-${e}${n === "DEFAULT" ? "" : `-${n}`}, ${r})`
1817
+ Object.entries(t).map(([r, n]) => [
1818
+ r,
1819
+ `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${n})`
1820
1820
  ])
1821
1821
  )
1822
1822
  ])
@@ -1850,8 +1850,8 @@ const Mt = Pt`
1850
1850
  "7xl": 320
1851
1851
  }, zt = () => {
1852
1852
  const e = {};
1853
- for (const [t, n] of Object.entries(Wt))
1854
- e[`max-w-${t}`] = `max-width:calc(${le} * ${n});`, e[`min-w-${t}`] = `min-width:calc(${le} * ${n});`, e[`w-${t}`] = `width:calc(${le} * ${n});`, e[`max-h-${t}`] = `max-height:calc(${le} * ${n});`, e[`min-h-${t}`] = `min-height:calc(${le} * ${n});`, e[`h-${t}`] = `height:calc(${le} * ${n});`;
1853
+ for (const [t, r] of Object.entries(Wt))
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});`;
1855
1855
  return e;
1856
1856
  }, Dt = () => {
1857
1857
  const e = {};
@@ -1934,20 +1934,62 @@ const Mt = Pt`
1934
1934
  "text-8xl": "font-size:6rem;line-height:1",
1935
1935
  /* Borders */
1936
1936
  border: "border-width:1px;",
1937
+ "border-t": "border-top-width:1px;",
1938
+ "border-r": "border-right-width:1px;",
1939
+ "border-b": "border-bottom-width:1px;",
1940
+ "border-l": "border-left-width:1px;",
1941
+ "border-x": "border-inline-width:1px;",
1942
+ "border-y": "border-block-width:1px;",
1937
1943
  "border-2": "border-width:2px;",
1938
1944
  "border-4": "border-width:4px;",
1939
1945
  "border-6": "border-width:6px;",
1940
1946
  "border-8": "border-width:8px;",
1941
1947
  "rounded-none": "border-radius:0;",
1942
1948
  "rounded-xs": "border-radius:0.125rem;",
1949
+ "rounded-t-xs": "border-top-left-radius:0.125rem;border-top-right-radius:0.125rem;",
1950
+ "rounded-r-xs": "border-top-right-radius:0.125rem;border-bottom-right-radius:0.125rem;",
1951
+ "rounded-b-xs": "border-bottom-left-radius:0.125rem;border-bottom-right-radius:0.125rem;",
1952
+ "rounded-l-xs": "border-top-left-radius:0.125rem;border-bottom-left-radius:0.125rem;",
1943
1953
  "rounded-sm": "border-radius:0.25rem;",
1954
+ "rounded-t-sm": "border-top-left-radius:0.25rem;border-top-right-radius:0.25rem;",
1955
+ "rounded-r-sm": "border-top-right-radius:0.25rem;border-bottom-right-radius:0.25rem;",
1956
+ "rounded-b-sm": "border-bottom-left-radius:0.25rem;border-bottom-right-radius:0.25rem;",
1957
+ "rounded-l-sm": "border-top-left-radius:0.25rem;border-bottom-left-radius:0.25rem;",
1944
1958
  "rounded-md": "border-radius:0.375rem;",
1959
+ "rounded-t-md": "border-top-left-radius:0.375rem;border-top-right-radius:0.375rem;",
1960
+ "rounded-r-md": "border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem;",
1961
+ "rounded-b-md": "border-bottom-left-radius:0.375rem;border-bottom-right-radius:0.375rem;",
1962
+ "rounded-l-md": "border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem;",
1945
1963
  "rounded-lg": "border-radius:0.5rem;",
1964
+ "rounded-t-lg": "border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;",
1965
+ "rounded-r-lg": "border-top-right-radius:0.5rem;border-bottom-right-radius:0.5rem;",
1966
+ "rounded-b-lg": "border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem;",
1967
+ "rounded-l-lg": "border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem;",
1946
1968
  "rounded-xl": "border-radius:0.75rem;",
1969
+ "rounded-t-xl": "border-top-left-radius:0.75rem;border-top-right-radius:0.75rem;",
1970
+ "rounded-r-xl": "border-top-right-radius:0.75rem;border-bottom-right-radius:0.75rem;",
1971
+ "rounded-b-xl": "border-bottom-left-radius:0.75rem;border-bottom-right-radius:0.75rem;",
1972
+ "rounded-l-xl": "border-top-left-radius:0.75rem;border-bottom-left-radius:0.75rem;",
1947
1973
  "rounded-2xl": "border-radius:1rem;",
1974
+ "rounded-t-2xl": "border-top-left-radius:1rem;border-top-right-radius:1rem;",
1975
+ "rounded-r-2xl": "border-top-right-radius:1rem;border-bottom-right-radius:1rem;",
1976
+ "rounded-b-2xl": "border-bottom-left-radius:1rem;border-bottom-right-radius:1rem;",
1977
+ "rounded-l-2xl": "border-top-left-radius:1rem;border-bottom-left-radius:1rem;",
1948
1978
  "rounded-3xl": "border-radius:1.5rem;",
1979
+ "rounded-t-3xl": "border-top-left-radius:1.5rem;border-top-right-radius:1.5rem;",
1980
+ "rounded-r-3xl": "border-top-right-radius:1.5rem;border-bottom-right-radius:1.5rem;",
1981
+ "rounded-b-3xl": "border-bottom-left-radius:1.5rem;border-bottom-right-radius:1.5rem;",
1982
+ "rounded-l-3xl": "border-top-left-radius:1.5rem;border-bottom-left-radius:1.5rem;",
1949
1983
  "rounded-4xl": "border-radius:2rem;",
1984
+ "rounded-t-4xl": "border-top-left-radius:2rem;border-top-right-radius:2rem;",
1985
+ "rounded-r-4xl": "border-top-right-radius:2rem;border-bottom-right-radius:2rem;",
1986
+ "rounded-b-4xl": "border-bottom-left-radius:2rem;border-bottom-right-radius:2rem;",
1987
+ "rounded-l-4xl": "border-top-left-radius:2rem;border-bottom-left-radius:2rem;",
1950
1988
  "rounded-full": "border-radius:9999px;",
1989
+ "rounded-t-full": "border-top-left-radius:9999px;border-top-right-radius:9999px;",
1990
+ "rounded-r-full": "border-top-right-radius:9999px;border-bottom-right-radius:9999px;",
1991
+ "rounded-b-full": "border-bottom-left-radius:9999px;border-bottom-right-radius:9999px;",
1992
+ "rounded-l-full": "border-top-left-radius:9999px;border-bottom-left-radius:9999px;",
1951
1993
  /* Shadow and effects */
1952
1994
  // Shadows use a CSS variable for color so color utilities can modify --ce-shadow-color
1953
1995
  "shadow-none": "--ce-shadow-color: rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
@@ -2064,14 +2106,14 @@ const Mt = Pt`
2064
2106
  "gap-y": ["row-gap"]
2065
2107
  };
2066
2108
  function G(e, t) {
2067
- let n = 0, r = 0;
2109
+ let r = 0, n = 0;
2068
2110
  for (let i = 0; i < e.length; i++) {
2069
2111
  const s = e[i];
2070
- if (s === "[") n++;
2071
- else if (s === "]" && n > 0) n--;
2072
- else if (s === "(") r++;
2073
- else if (s === ")" && r > 0) r--;
2074
- else if (n === 0 && r === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2112
+ if (s === "[") r++;
2113
+ else if (s === "]" && r > 0) r--;
2114
+ else if (s === "(") n++;
2115
+ else if (s === ")" && n > 0) n--;
2116
+ else if (r === 0 && n === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2075
2117
  return e.slice(0, i) + t + e.slice(i);
2076
2118
  }
2077
2119
  return e + t;
@@ -2110,23 +2152,23 @@ const It = {
2110
2152
  dark: "(prefers-color-scheme: dark)"
2111
2153
  }, je = ["sm", "md", "lg", "xl", "2xl"];
2112
2154
  function Ne(e) {
2113
- const t = e.startsWith("-"), r = (t ? e.slice(1) : e).split("-");
2114
- if (r.length < 2) return null;
2115
- const i = r.slice(0, -1).join("-"), s = r[r.length - 1], o = parseFloat(s);
2155
+ const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
2156
+ if (n.length < 2) return null;
2157
+ const i = n.slice(0, -1).join("-"), s = n[n.length - 1], o = parseFloat(s);
2116
2158
  if (Number.isNaN(o) || !Ze[i]) return null;
2117
2159
  const a = t ? "-" : "";
2118
2160
  return Ze[i].map((u) => `${u}:calc(${a}${le} * ${o});`).join("");
2119
2161
  }
2120
2162
  function Ge(e) {
2121
- const t = e.replace("#", ""), n = parseInt(t, 16), r = n >> 16 & 255, i = n >> 8 & 255, s = n & 255;
2122
- return `${r} ${i} ${s}`;
2163
+ const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, i = r >> 8 & 255, s = r & 255;
2164
+ return `${n} ${i} ${s}`;
2123
2165
  }
2124
2166
  function Ht(e) {
2125
2167
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2126
2168
  if (!t) return null;
2127
- const [, n, r, i = "DEFAULT"] = t, s = Nt[r]?.[i];
2169
+ const [, r, n, i = "DEFAULT"] = t, s = Nt[n]?.[i];
2128
2170
  if (!s) return null;
2129
- if (n === "shadow") return `--ce-shadow-color:${s};`;
2171
+ if (r === "shadow") return `--ce-shadow-color:${s};`;
2130
2172
  const a = {
2131
2173
  bg: "background-color",
2132
2174
  decoration: "text-decoration-color",
@@ -2137,33 +2179,33 @@ function Ht(e) {
2137
2179
  accent: "accent-color",
2138
2180
  fill: "fill",
2139
2181
  stroke: "stroke"
2140
- }[n];
2182
+ }[r];
2141
2183
  return a ? `${a}:${s};` : null;
2142
2184
  }
2143
2185
  function Bt(e) {
2144
- const [t, n] = e.split("/");
2145
- if (!n) return { base: t };
2146
- const r = parseInt(n, 10);
2147
- return isNaN(r) || r < 0 || r > 100 ? { base: t } : { base: t, opacity: r / 100 };
2186
+ const [t, r] = e.split("/");
2187
+ if (!r) return { base: t };
2188
+ const n = parseInt(r, 10);
2189
+ return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
2148
2190
  }
2149
2191
  function We(e) {
2150
- const { base: t, opacity: n } = Bt(e), r = Ht(t);
2151
- if (r) {
2152
- if (n !== void 0) {
2153
- const s = /#([0-9a-f]{6})/i.exec(r);
2192
+ const { base: t, opacity: r } = Bt(e), n = Ht(t);
2193
+ if (n) {
2194
+ if (r !== void 0) {
2195
+ const s = /#([0-9a-f]{6})/i.exec(n);
2154
2196
  if (s) {
2155
2197
  const o = Ge(s[0]);
2156
- return r.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${n})`);
2198
+ return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2157
2199
  }
2158
2200
  }
2159
- return r;
2201
+ return n;
2160
2202
  }
2161
2203
  const i = Se(t);
2162
- if (i && n !== void 0) {
2204
+ if (i && r !== void 0) {
2163
2205
  const s = /#([0-9a-f]{6})/i.exec(i);
2164
2206
  if (s) {
2165
2207
  const o = Ge(s[0]);
2166
- return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${n})`);
2208
+ return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2167
2209
  }
2168
2210
  }
2169
2211
  return i;
@@ -2171,8 +2213,8 @@ function We(e) {
2171
2213
  function ze(e) {
2172
2214
  const t = /^opacity-(\d{1,3})$/.exec(e);
2173
2215
  if (!t) return null;
2174
- const n = parseInt(t[1], 10);
2175
- return n < 0 || n > 100 ? null : `opacity:${n / 100};`;
2216
+ const r = parseInt(t[1], 10);
2217
+ return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
2176
2218
  }
2177
2219
  function Se(e) {
2178
2220
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
@@ -2184,9 +2226,9 @@ function Se(e) {
2184
2226
  }
2185
2227
  return null;
2186
2228
  }
2187
- const t = e.indexOf("-["), n = e.endsWith("]");
2188
- if (t > 0 && n) {
2189
- const r = e.slice(0, t);
2229
+ const t = e.indexOf("-["), r = e.endsWith("]");
2230
+ if (t > 0 && r) {
2231
+ const n = e.slice(0, t);
2190
2232
  let i = e.slice(t + 2, -1);
2191
2233
  i = i.replace(/_/g, " ");
2192
2234
  const s = {
@@ -2205,12 +2247,12 @@ function Se(e) {
2205
2247
  "max-w": "max-width",
2206
2248
  "min-h": "min-height",
2207
2249
  "max-h": "max-height",
2208
- "border-t": "border-top",
2209
- "border-b": "border-bottom",
2210
- "border-l": "border-left",
2211
- "border-r": "border-right",
2212
- "border-x": "border-inline",
2213
- "border-y": "border-block",
2250
+ "border-t": "border-top-width",
2251
+ "border-b": "border-bottom-width",
2252
+ "border-l": "border-left-width",
2253
+ "border-r": "border-right-width",
2254
+ "border-x": "border-inline-width",
2255
+ "border-y": "border-block-width",
2214
2256
  "grid-cols": "grid-template-columns",
2215
2257
  "grid-rows": "grid-template-rows",
2216
2258
  transition: "transition-property",
@@ -2233,22 +2275,22 @@ function Se(e) {
2233
2275
  leading: "line-height",
2234
2276
  z: "z-index"
2235
2277
  };
2236
- if (r === "rotate")
2278
+ if (n === "rotate")
2237
2279
  return `transform:rotate(${i});`;
2238
- const o = s[r] ?? r.replace(/_/g, "-");
2280
+ const o = s[n] ?? n.replace(/_/g, "-");
2239
2281
  if (o && i) return `${o}:${i};`;
2240
2282
  }
2241
2283
  return null;
2242
2284
  }
2243
2285
  function Ut(e) {
2244
2286
  if (e.startsWith("[") && e.endsWith("]")) {
2245
- const n = e.slice(1, -1);
2246
- return n.includes("&") ? n : e;
2287
+ const r = e.slice(1, -1);
2288
+ return r.includes("&") ? r : e;
2247
2289
  }
2248
2290
  const t = e.indexOf("-[");
2249
2291
  if (t > 0 && e.endsWith("]")) {
2250
- const n = e.slice(t + 2, -1).replace(/_/g, "-");
2251
- return n.includes("&") ? n : e.replace(/_/g, "-");
2292
+ const r = e.slice(t + 2, -1).replace(/_/g, "-");
2293
+ return r.includes("&") ? r : e.replace(/_/g, "-");
2252
2294
  }
2253
2295
  return null;
2254
2296
  }
@@ -2256,19 +2298,19 @@ function qt(e) {
2256
2298
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
2257
2299
  }
2258
2300
  function Ft(e) {
2259
- const t = /class\s*=\s*(['"])(.*?)\1/g, n = [];
2260
- let r;
2261
- for (; r = t.exec(e); ) {
2262
- const i = r[2].split(/\s+/).filter(Boolean);
2263
- i.length && n.push(...i);
2301
+ const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
2302
+ let n;
2303
+ for (; n = t.exec(e); ) {
2304
+ const i = n[2].split(/\s+/).filter(Boolean);
2305
+ i.length && r.push(...i);
2264
2306
  }
2265
- return n.filter(Boolean);
2307
+ return r.filter(Boolean);
2266
2308
  }
2267
2309
  const Xe = /* @__PURE__ */ new Map(), Kt = 16;
2268
2310
  function Vt(e) {
2269
- const t = Date.now(), n = Xe.get(e);
2270
- if (n && t - n.timestamp < Kt) return n.css;
2271
- const r = Ft(e), i = new Set(r), s = [], o = [], a = [], u = [], m = {};
2311
+ const t = Date.now(), r = Xe.get(e);
2312
+ if (r && t - r.timestamp < Kt) return r.css;
2313
+ const n = Ft(e), i = new Set(n), s = [], o = [], a = [], u = [], m = {};
2272
2314
  function g(w, c = !1) {
2273
2315
  const p = (c ? "dark|" : "") + w;
2274
2316
  if (p in m) return m[p];
@@ -2325,8 +2367,8 @@ function Vt(e) {
2325
2367
  if (!C) return null;
2326
2368
  const k = C.replace(/^!/, ""), f = Le[k] ?? Ne(k) ?? ze(k) ?? We(k) ?? Se(k);
2327
2369
  if (!f) return null;
2328
- const x = p.indexOf(C);
2329
- let A = x >= 0 ? p.slice(0, x) : [];
2370
+ const v = p.indexOf(C);
2371
+ let A = v >= 0 ? p.slice(0, v) : [];
2330
2372
  c && (A = A.filter((E) => E !== "dark"));
2331
2373
  const _ = `.${qt(w)}`, $ = "__SUBJECT__", T = y ? f.replace(/;$/, " !important;") : f;
2332
2374
  let R = $;
@@ -2404,40 +2446,40 @@ function Vt(e) {
2404
2446
  f && (k === 1 ? s.push(f) : k === 2 ? o.push(f) : k === 3 && a.push(f));
2405
2447
  }
2406
2448
  }
2407
- const v = [...s, ...o, ...a, ...u].join("");
2408
- return Xe.set(e, { css: v, timestamp: t }), v;
2449
+ const x = [...s, ...o, ...a, ...u].join("");
2450
+ return Xe.set(e, { css: x, timestamp: t }), x;
2409
2451
  }
2410
2452
  const ge = [];
2411
- function Jt(e, t, n, r, i, s, o, a) {
2453
+ function Jt(e, t, r, n, i, s, o, a) {
2412
2454
  if (e) {
2413
- ge.push(n);
2455
+ ge.push(r);
2414
2456
  try {
2415
- const u = t.render(n);
2457
+ const u = t.render(r);
2416
2458
  if (u instanceof Promise) {
2417
2459
  s(!0), u.then((m) => {
2418
- s(!1), o(null), Ye(e, m, n, r, i), a(e.innerHTML);
2460
+ s(!1), o(null), Ye(e, m, r, n, i), a(e.innerHTML);
2419
2461
  }).catch((m) => {
2420
2462
  s(!1), o(m);
2421
2463
  });
2422
2464
  return;
2423
2465
  }
2424
- Ye(e, u, n, r, i), a(e.innerHTML);
2466
+ Ye(e, u, r, n, i), a(e.innerHTML);
2425
2467
  } finally {
2426
2468
  ge.pop();
2427
2469
  }
2428
2470
  }
2429
2471
  }
2430
- function Ye(e, t, n, r, i) {
2472
+ function Ye(e, t, r, n, i) {
2431
2473
  e && (Ot(
2432
2474
  e,
2433
2475
  Array.isArray(t) ? t : [t],
2434
- n,
2435
- r
2476
+ r,
2477
+ n
2436
2478
  ), i(e.innerHTML));
2437
2479
  }
2438
- function Zt(e, t, n, r, i, s, o) {
2480
+ function Zt(e, t, r, n, i, s, o) {
2439
2481
  if (s !== null && clearTimeout(s), Date.now() - t < 16) {
2440
- if (i(n + 1), n === 15)
2482
+ if (i(r + 1), r === 15)
2441
2483
  console.warn(
2442
2484
  `⚠️ Component is re-rendering rapidly. This might indicate:
2443
2485
  Common causes:
@@ -2446,7 +2488,7 @@ function Zt(e, t, n, r, i, s, o) {
2446
2488
  • Missing dependencies in computed/watch
2447
2489
  Component rendering will be throttled to prevent browser freeze.`
2448
2490
  );
2449
- else if (n > 20) {
2491
+ else if (r > 20) {
2450
2492
  console.error(
2451
2493
  `🛑 Infinite loop detected in component render:
2452
2494
  • This might be caused by state updates during render
@@ -2458,13 +2500,13 @@ Stopping runaway component render to prevent browser freeze`
2458
2500
  } else
2459
2501
  i(0);
2460
2502
  const m = setTimeout(() => {
2461
- r(Date.now()), e(), o(null);
2462
- }, n > 10 ? 100 : 0);
2503
+ n(Date.now()), e(), o(null);
2504
+ }, r > 10 ? 100 : 0);
2463
2505
  o(m);
2464
2506
  }
2465
- function Gt(e, t, n, r, i) {
2507
+ function Gt(e, t, r, n, i) {
2466
2508
  if (!e) return;
2467
- const s = Vt(n);
2509
+ const s = Vt(r);
2468
2510
  if ((!s || s.trim() === "") && !t._computedStyle) {
2469
2511
  i(null), e.adoptedStyleSheets = [Je()];
2470
2512
  return;
@@ -2475,7 +2517,7 @@ function Gt(e, t, n, r, i) {
2475
2517
  ${s}
2476
2518
  `);
2477
2519
  a = ct(a);
2478
- let u = r;
2520
+ let u = n;
2479
2521
  u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== a) && u.replaceSync(a), e.adoptedStyleSheets = [Je(), u], i(u);
2480
2522
  }
2481
2523
  let N = null;
@@ -2485,11 +2527,11 @@ function Xt(e) {
2485
2527
  function Yt() {
2486
2528
  N = null;
2487
2529
  }
2488
- function hn() {
2530
+ function pr() {
2489
2531
  if (!N)
2490
2532
  throw new Error("useEmit must be called during component render");
2491
2533
  const e = N.emit;
2492
- return (t, n) => e(t, n);
2534
+ return (t, r) => e(t, r);
2493
2535
  }
2494
2536
  function ye(e) {
2495
2537
  e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
@@ -2499,27 +2541,27 @@ function ye(e) {
2499
2541
  configurable: !1
2500
2542
  });
2501
2543
  }
2502
- function gn(e) {
2544
+ function hr(e) {
2503
2545
  if (!N)
2504
2546
  throw new Error("useOnConnected must be called during component render");
2505
2547
  ye(N), N._hookCallbacks.onConnected = e;
2506
2548
  }
2507
- function mn(e) {
2549
+ function gr(e) {
2508
2550
  if (!N)
2509
2551
  throw new Error("useOnDisconnected must be called during component render");
2510
2552
  ye(N), N._hookCallbacks.onDisconnected = e;
2511
2553
  }
2512
- function yn(e) {
2554
+ function mr(e) {
2513
2555
  if (!N)
2514
2556
  throw new Error("useOnAttributeChanged must be called during component render");
2515
2557
  ye(N), N._hookCallbacks.onAttributeChanged = e;
2516
2558
  }
2517
- function bn(e) {
2559
+ function yr(e) {
2518
2560
  if (!N)
2519
2561
  throw new Error("useOnError must be called during component render");
2520
2562
  ye(N), N._hookCallbacks.onError = e;
2521
2563
  }
2522
- function wn(e) {
2564
+ function br(e) {
2523
2565
  if (!N)
2524
2566
  throw new Error("useStyle must be called during component render");
2525
2567
  ye(N);
@@ -2591,33 +2633,33 @@ function Qt(e, t) {
2591
2633
  _templateError = null;
2592
2634
  constructor() {
2593
2635
  super(), this.attachShadow({ mode: "open" }), this._cfg = Te.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2594
- const n = this._initContext(t);
2595
- Object.defineProperty(n, "refs", {
2636
+ const r = this._initContext(t);
2637
+ Object.defineProperty(r, "refs", {
2596
2638
  value: this._refs,
2597
2639
  writable: !1,
2598
2640
  enumerable: !1,
2599
2641
  configurable: !1
2600
- }), Object.defineProperty(n, "requestRender", {
2642
+ }), Object.defineProperty(r, "requestRender", {
2601
2643
  value: () => this.requestRender(),
2602
2644
  writable: !1,
2603
2645
  enumerable: !1,
2604
2646
  configurable: !1
2605
- }), Object.defineProperty(n, "_requestRender", {
2647
+ }), Object.defineProperty(r, "_requestRender", {
2606
2648
  value: () => this._requestRender(),
2607
2649
  writable: !1,
2608
2650
  enumerable: !1,
2609
2651
  configurable: !1
2610
- }), Object.defineProperty(n, "_componentId", {
2652
+ }), Object.defineProperty(r, "_componentId", {
2611
2653
  value: this._componentId,
2612
2654
  writable: !1,
2613
2655
  enumerable: !1,
2614
2656
  configurable: !1
2615
- }), Object.defineProperty(n, "_triggerWatchers", {
2657
+ }), Object.defineProperty(r, "_triggerWatchers", {
2616
2658
  value: (i, s) => this._triggerWatchers(i, s),
2617
2659
  writable: !1,
2618
2660
  enumerable: !1,
2619
2661
  configurable: !1
2620
- }), this.context = n, Object.defineProperty(this.context, "emit", {
2662
+ }), this.context = r, Object.defineProperty(this.context, "emit", {
2621
2663
  value: (i, s, o) => {
2622
2664
  const a = new CustomEvent(i, {
2623
2665
  detail: s,
@@ -2631,11 +2673,11 @@ function Qt(e, t) {
2631
2673
  enumerable: !1,
2632
2674
  configurable: !1
2633
2675
  });
2634
- const r = Te.get(e) || t;
2635
- Object.keys(r).forEach((i) => {
2636
- const s = r[i];
2676
+ const n = Te.get(e) || t;
2677
+ Object.keys(n).forEach((i) => {
2678
+ const s = n[i];
2637
2679
  typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
2638
- }), this._applyComputed(r), r.props && Object.keys(r.props).forEach((i) => {
2680
+ }), this._applyComputed(n), n.props && Object.keys(n.props).forEach((i) => {
2639
2681
  let s = this[i];
2640
2682
  Object.defineProperty(this, i, {
2641
2683
  get() {
@@ -2643,28 +2685,28 @@ function Qt(e, t) {
2643
2685
  },
2644
2686
  set(o) {
2645
2687
  const a = s;
2646
- s = o, this.context[i] = o, this._initializing || (this._applyProps(r), a !== o && this._requestRender());
2688
+ s = o, this.context[i] = o, this._initializing || (this._applyProps(n), a !== o && this._requestRender());
2647
2689
  },
2648
2690
  enumerable: !0,
2649
2691
  configurable: !0
2650
2692
  });
2651
- }), this._initializing = !1, this._initWatchers(r), this._applyProps(r), this._render(r);
2693
+ }), this._initializing = !1, this._initWatchers(n), this._applyProps(n), this._render(n);
2652
2694
  }
2653
2695
  connectedCallback() {
2654
2696
  this._runLogicWithinErrorBoundary(t, () => {
2655
- this._applyProps(t), this._requestRender(), vt(
2697
+ this._applyProps(t), this._requestRender(), xt(
2656
2698
  t,
2657
2699
  this.context,
2658
2700
  this._mounted,
2659
- (n) => {
2660
- this._mounted = n;
2701
+ (r) => {
2702
+ this._mounted = r;
2661
2703
  }
2662
2704
  );
2663
2705
  });
2664
2706
  }
2665
2707
  disconnectedCallback() {
2666
2708
  this._runLogicWithinErrorBoundary(t, () => {
2667
- xt(
2709
+ vt(
2668
2710
  t,
2669
2711
  this.context,
2670
2712
  this._listeners,
@@ -2674,52 +2716,52 @@ function Qt(e, t) {
2674
2716
  () => {
2675
2717
  this._watchers.clear();
2676
2718
  },
2677
- (n) => {
2678
- this._templateLoading = n;
2719
+ (r) => {
2720
+ this._templateLoading = r;
2679
2721
  },
2680
- (n) => {
2681
- this._templateError = n;
2722
+ (r) => {
2723
+ this._templateError = r;
2682
2724
  },
2683
- (n) => {
2684
- this._mounted = n;
2725
+ (r) => {
2726
+ this._mounted = r;
2685
2727
  }
2686
2728
  );
2687
2729
  });
2688
2730
  }
2689
- attributeChangedCallback(n, r, i) {
2731
+ attributeChangedCallback(r, n, i) {
2690
2732
  this._runLogicWithinErrorBoundary(t, () => {
2691
- this._applyProps(t), r !== i && this._requestRender(), kt(
2733
+ this._applyProps(t), n !== i && this._requestRender(), kt(
2692
2734
  t,
2693
- n,
2694
2735
  r,
2736
+ n,
2695
2737
  i,
2696
2738
  this.context
2697
2739
  );
2698
2740
  });
2699
2741
  }
2700
2742
  static get observedAttributes() {
2701
- return t.props ? Object.keys(t.props).map(ne) : [];
2743
+ return t.props ? Object.keys(t.props).map(re) : [];
2702
2744
  }
2703
- _applyComputed(n) {
2745
+ _applyComputed(r) {
2704
2746
  }
2705
2747
  // --- Render ---
2706
- _render(n) {
2707
- this._runLogicWithinErrorBoundary(n, () => {
2748
+ _render(r) {
2749
+ this._runLogicWithinErrorBoundary(r, () => {
2708
2750
  Jt(
2709
2751
  this.shadowRoot,
2710
- n,
2752
+ r,
2711
2753
  this.context,
2712
2754
  this._refs,
2713
- (r) => {
2714
- this._lastHtmlStringForJitCSS = r, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(r);
2755
+ (n) => {
2756
+ this._lastHtmlStringForJitCSS = n, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(n);
2715
2757
  },
2716
- (r) => {
2717
- this._templateLoading = r, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(r);
2758
+ (n) => {
2759
+ this._templateLoading = n, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(n);
2718
2760
  },
2719
- (r) => {
2720
- this._templateError = r, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(r);
2761
+ (n) => {
2762
+ this._templateError = n, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(n);
2721
2763
  },
2722
- (r) => this._applyStyle(n, r)
2764
+ (n) => this._applyStyle(r, n)
2723
2765
  );
2724
2766
  });
2725
2767
  }
@@ -2733,27 +2775,27 @@ function Qt(e, t) {
2733
2775
  () => this._render(this._cfg),
2734
2776
  this._lastRenderTime,
2735
2777
  this._renderCount,
2736
- (n) => {
2737
- this._lastRenderTime = n;
2778
+ (r) => {
2779
+ this._lastRenderTime = r;
2738
2780
  },
2739
- (n) => {
2740
- this._renderCount = n;
2781
+ (r) => {
2782
+ this._renderCount = r;
2741
2783
  },
2742
2784
  this._renderTimeoutId,
2743
- (n) => {
2744
- this._renderTimeoutId = n;
2785
+ (r) => {
2786
+ this._renderTimeoutId = r;
2745
2787
  }
2746
2788
  );
2747
2789
  }, this._componentId);
2748
2790
  });
2749
2791
  }
2750
2792
  // --- Style ---
2751
- _applyStyle(n, r) {
2752
- this._runLogicWithinErrorBoundary(n, () => {
2793
+ _applyStyle(r, n) {
2794
+ this._runLogicWithinErrorBoundary(r, () => {
2753
2795
  Gt(
2754
2796
  this.shadowRoot,
2755
2797
  this.context,
2756
- r,
2798
+ n,
2757
2799
  this._styleSheet,
2758
2800
  (i) => {
2759
2801
  this._styleSheet = i;
@@ -2762,18 +2804,18 @@ function Qt(e, t) {
2762
2804
  });
2763
2805
  }
2764
2806
  // --- Error Boundary function ---
2765
- _runLogicWithinErrorBoundary(n, r) {
2807
+ _runLogicWithinErrorBoundary(r, n) {
2766
2808
  this._hasError && (this._hasError = !1);
2767
2809
  try {
2768
- r();
2810
+ n();
2769
2811
  } catch (i) {
2770
- this._hasError = !0, n.onError && n.onError(i, this.context);
2812
+ this._hasError = !0, r.onError && r.onError(i, this.context);
2771
2813
  }
2772
2814
  }
2773
2815
  // --- State, props, computed ---
2774
- _initContext(n) {
2816
+ _initContext(r) {
2775
2817
  try {
2776
- let r = function(s, o = "") {
2818
+ let n = function(s, o = "") {
2777
2819
  return Array.isArray(s) ? new Proxy(s, {
2778
2820
  get(a, u, m) {
2779
2821
  const g = Reflect.get(a, u, m);
@@ -2789,7 +2831,7 @@ function Qt(e, t) {
2789
2831
  const l = g.apply(a, h);
2790
2832
  if (!i._initializing) {
2791
2833
  const d = o || "root";
2792
- i._triggerWatchers(d, a), fe(() => i._render(n), i._componentId);
2834
+ i._triggerWatchers(d, a), fe(() => i._render(r), i._componentId);
2793
2835
  }
2794
2836
  return l;
2795
2837
  } : g;
@@ -2797,27 +2839,27 @@ function Qt(e, t) {
2797
2839
  set(a, u, m) {
2798
2840
  if (a[u] = m, !i._initializing) {
2799
2841
  const g = o ? `${o}.${String(u)}` : String(u);
2800
- i._triggerWatchers(g, m), fe(() => i._render(n), i._componentId);
2842
+ i._triggerWatchers(g, m), fe(() => i._render(r), i._componentId);
2801
2843
  }
2802
2844
  return !0;
2803
2845
  },
2804
2846
  deleteProperty(a, u) {
2805
2847
  if (delete a[u], !i._initializing) {
2806
2848
  const m = o ? `${o}.${String(u)}` : String(u);
2807
- i._triggerWatchers(m, void 0), fe(() => i._render(n), i._componentId);
2849
+ i._triggerWatchers(m, void 0), fe(() => i._render(r), i._componentId);
2808
2850
  }
2809
2851
  return !0;
2810
2852
  }
2811
2853
  }) : s && typeof s == "object" ? s.constructor && s.constructor.name === "ReactiveState" ? s : (Object.keys(s).forEach((a) => {
2812
2854
  const u = o ? `${o}.${a}` : a;
2813
- s[a] = r(s[a], u);
2855
+ s[a] = n(s[a], u);
2814
2856
  }), new Proxy(s, {
2815
2857
  set(a, u, m) {
2816
2858
  const g = o ? `${o}.${String(u)}` : String(u);
2817
- return a[u] = r(m, g), i._initializing || (i._triggerWatchers(
2859
+ return a[u] = n(m, g), i._initializing || (i._triggerWatchers(
2818
2860
  g,
2819
2861
  a[u]
2820
- ), fe(() => i._render(n), i._componentId)), !0;
2862
+ ), fe(() => i._render(r), i._componentId)), !0;
2821
2863
  },
2822
2864
  get(a, u, m) {
2823
2865
  return Reflect.get(a, u, m);
@@ -2825,19 +2867,19 @@ function Qt(e, t) {
2825
2867
  })) : s;
2826
2868
  };
2827
2869
  const i = this;
2828
- return r({
2870
+ return n({
2829
2871
  // For functional components, state is managed by state() function calls
2830
2872
  // Include prop defaults in initial reactive context so prop updates trigger reactivity
2831
- ...n.props ? Object.fromEntries(
2832
- Object.entries(n.props).map(([s, o]) => [s, o.default])
2873
+ ...r.props ? Object.fromEntries(
2874
+ Object.entries(r.props).map(([s, o]) => [s, o.default])
2833
2875
  ) : {}
2834
2876
  });
2835
2877
  } catch {
2836
2878
  return {};
2837
2879
  }
2838
2880
  }
2839
- _initWatchers(n) {
2840
- this._runLogicWithinErrorBoundary(n, () => {
2881
+ _initWatchers(r) {
2882
+ this._runLogicWithinErrorBoundary(r, () => {
2841
2883
  mt(
2842
2884
  this.context,
2843
2885
  this._watchers,
@@ -2846,24 +2888,24 @@ function Qt(e, t) {
2846
2888
  );
2847
2889
  });
2848
2890
  }
2849
- _triggerWatchers(n, r) {
2850
- yt(this.context, this._watchers, n, r);
2891
+ _triggerWatchers(r, n) {
2892
+ yt(this.context, this._watchers, r, n);
2851
2893
  }
2852
- _applyProps(n) {
2853
- this._runLogicWithinErrorBoundary(n, () => {
2894
+ _applyProps(r) {
2895
+ this._runLogicWithinErrorBoundary(r, () => {
2854
2896
  try {
2855
- wt(this, n, this.context);
2856
- } catch (r) {
2857
- this._hasError = !0, n.onError && n.onError(r, this.context);
2897
+ wt(this, r, this.context);
2898
+ } catch (n) {
2899
+ this._hasError = !0, r.onError && r.onError(n, this.context);
2858
2900
  }
2859
2901
  });
2860
2902
  }
2861
2903
  };
2862
2904
  }
2863
2905
  function et(e, t) {
2864
- let n = ne(e);
2865
- n.includes("-") || (n = `cer-${n}`);
2866
- let r = {};
2906
+ let r = re(e);
2907
+ r.includes("-") || (r = `cer-${r}`);
2908
+ let n = {};
2867
2909
  if (typeof window < "u")
2868
2910
  try {
2869
2911
  const a = t.toString().match(/\(\s*{\s*([^}]+)\s*}/);
@@ -2874,13 +2916,13 @@ function et(e, t) {
2874
2916
  if (b !== -1) {
2875
2917
  const h = g.substring(0, b).trim(), l = g.substring(b + 1).trim();
2876
2918
  try {
2877
- l === "true" ? r[h] = !0 : l === "false" ? r[h] = !1 : l === "[]" ? r[h] = [] : l === "{}" ? r[h] = {} : /^\d+$/.test(l) ? r[h] = parseInt(l) : /^'.*'$/.test(l) || /^".*"$/.test(l) ? r[h] = l.slice(1, -1) : r[h] = l;
2919
+ l === "true" ? n[h] = !0 : l === "false" ? n[h] = !1 : l === "[]" ? n[h] = [] : l === "{}" ? n[h] = {} : /^\d+$/.test(l) ? n[h] = parseInt(l) : /^'.*'$/.test(l) || /^".*"$/.test(l) ? n[h] = l.slice(1, -1) : n[h] = l;
2878
2920
  } catch {
2879
- r[h] = "";
2921
+ n[h] = "";
2880
2922
  }
2881
2923
  } else {
2882
2924
  const h = g.split(":")[0].trim();
2883
- h && !h.includes("}") && (r[h] = "");
2925
+ h && !h.includes("}") && (n[h] = "");
2884
2926
  }
2885
2927
  }
2886
2928
  }
@@ -2890,7 +2932,7 @@ function et(e, t) {
2890
2932
  const s = {
2891
2933
  // Generate props config from defaults
2892
2934
  props: Object.fromEntries(
2893
- Object.entries(r).map(([o, a]) => [o, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
2935
+ Object.entries(n).map(([o, a]) => [o, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
2894
2936
  ),
2895
2937
  // Add lifecycle hooks from the stored functions
2896
2938
  onConnected: (o) => {
@@ -2906,18 +2948,18 @@ function et(e, t) {
2906
2948
  i.onError && o && i.onError(o);
2907
2949
  },
2908
2950
  render: (o) => {
2909
- const a = o._componentId || `${n}-${Math.random().toString(36).substr(2, 9)}`;
2951
+ const a = o._componentId || `${r}-${Math.random().toString(36).substr(2, 9)}`;
2910
2952
  F.setCurrentComponent(a, () => {
2911
2953
  o.requestRender && o.requestRender();
2912
2954
  });
2913
2955
  try {
2914
2956
  Xt(o);
2915
- const u = Object.keys(r).length > 0;
2957
+ const u = Object.keys(n).length > 0;
2916
2958
  let m;
2917
2959
  if (u) {
2918
2960
  const g = {};
2919
- Object.keys(r).forEach((b) => {
2920
- g[b] = o[b] ?? r[b];
2961
+ Object.keys(n).forEach((b) => {
2962
+ g[b] = o[b] ?? n[b];
2921
2963
  }), m = t(g);
2922
2964
  } else
2923
2965
  m = t();
@@ -2931,23 +2973,23 @@ function et(e, t) {
2931
2973
  }
2932
2974
  }
2933
2975
  };
2934
- Te.set(n, s), typeof window < "u" && (customElements.get(n) || customElements.define(n, Qt(n, s)));
2976
+ Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(r, Qt(r, s)));
2935
2977
  }
2936
- class en {
2978
+ class er {
2937
2979
  map = /* @__PURE__ */ new Map();
2938
2980
  maxSize;
2939
2981
  constructor(t) {
2940
2982
  this.maxSize = t;
2941
2983
  }
2942
2984
  get(t) {
2943
- const n = this.map.get(t);
2944
- if (n !== void 0)
2945
- return this.map.delete(t), this.map.set(t, n), n;
2985
+ const r = this.map.get(t);
2986
+ if (r !== void 0)
2987
+ return this.map.delete(t), this.map.set(t, r), r;
2946
2988
  }
2947
- set(t, n) {
2948
- if (this.map.has(t) && this.map.delete(t), this.map.set(t, n), this.map.size > this.maxSize) {
2949
- const r = this.map.keys().next().value;
2950
- r !== void 0 && this.map.delete(r);
2989
+ set(t, r) {
2990
+ if (this.map.has(t) && this.map.delete(t), this.map.set(t, r), this.map.size > this.maxSize) {
2991
+ const n = this.map.keys().next().value;
2992
+ n !== void 0 && this.map.delete(n);
2951
2993
  }
2952
2994
  }
2953
2995
  has(t) {
@@ -2957,8 +2999,8 @@ class en {
2957
2999
  this.map.clear();
2958
3000
  }
2959
3001
  }
2960
- const De = new en(500);
2961
- function tn(e, t) {
3002
+ const De = new er(500);
3003
+ function tr(e, t) {
2962
3004
  if (e == null) {
2963
3005
  console.warn(
2964
3006
  `⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`
@@ -2971,9 +3013,9 @@ function tn(e, t) {
2971
3013
  `💡 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()}"`
2972
3014
  );
2973
3015
  }
2974
- function pe(e, t = {}, n, r) {
2975
- const i = r ?? t.key;
2976
- return { tag: e, key: i, props: t, children: n };
3016
+ function pe(e, t = {}, r, n) {
3017
+ const i = n ?? t.key;
3018
+ return { tag: e, key: i, props: t, children: r };
2977
3019
  }
2978
3020
  function Ae(e) {
2979
3021
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
@@ -2981,11 +3023,11 @@ function Ae(e) {
2981
3023
  function _e(e) {
2982
3024
  return typeof e == "object" && e !== null && "tag" in e && !Ae(e);
2983
3025
  }
2984
- function nn(e, t) {
3026
+ function rr(e, t) {
2985
3027
  return e.key != null ? e : { ...e, key: t };
2986
3028
  }
2987
- function rn(e, t = [], n = {}) {
2988
- const r = {}, i = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3029
+ function nr(e, t = [], r = {}) {
3030
+ const n = {}, i = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
2989
3031
  let u;
2990
3032
  for (; u = a.exec(e); ) {
2991
3033
  const m = u[1], g = u[2], b = (u[4] || u[6]) ?? "", h = b.match(/^{{(\d+)}}$/);
@@ -2993,7 +3035,7 @@ function rn(e, t = [], n = {}) {
2993
3035
  h || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
2994
3036
  const d = ["model", "bind", "show", "class", "style", "ref"];
2995
3037
  if (m === ":") {
2996
- const [v, w] = g.split(":"), [c, ...p] = v.split(".");
3038
+ const [x, w] = g.split(":"), [c, ...p] = x.split(".");
2997
3039
  if (d.includes(c)) {
2998
3040
  const y = [...p], C = c === "model" && w ? `model:${w}` : c;
2999
3041
  s[C] = {
@@ -3006,55 +3048,55 @@ function rn(e, t = [], n = {}) {
3006
3048
  y && ee(y) && (y = y.value), i[g] = y, o.push(g);
3007
3049
  }
3008
3050
  } else if (m === "@") {
3009
- const [v, ...w] = g.split("."), c = w;
3010
- tn(l, v);
3011
- const p = typeof l == "function" ? l : typeof n[l] == "function" ? n[l] : void 0;
3051
+ const [x, ...w] = g.split("."), c = w;
3052
+ tr(l, x);
3053
+ const p = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
3012
3054
  if (p) {
3013
3055
  const y = (k) => {
3014
3056
  if (c.includes("prevent") && k.preventDefault(), c.includes("stop") && k.stopPropagation(), !(c.includes("self") && k.target !== k.currentTarget))
3015
- return c.includes("once") && k.currentTarget?.removeEventListener(v, y), p(k);
3016
- }, C = "on" + v.charAt(0).toUpperCase() + v.slice(1);
3017
- r[C] = y;
3057
+ return c.includes("once") && k.currentTarget?.removeEventListener(x, y), p(k);
3058
+ }, C = "on" + x.charAt(0).toUpperCase() + x.slice(1);
3059
+ n[C] = y;
3018
3060
  }
3019
- } else g === "ref" ? r.ref = l : i[g] = l;
3061
+ } else g === "ref" ? n.ref = l : i[g] = l;
3020
3062
  }
3021
- return { props: r, attrs: i, directives: s, bound: o };
3063
+ return { props: n, attrs: i, directives: s, bound: o };
3022
3064
  }
3023
- function sn(e, t, n) {
3024
- const r = ge.length > 0 ? ge[ge.length - 1] : void 0, i = n ?? r, s = !n && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3065
+ function ir(e, t, r) {
3066
+ 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;
3025
3067
  if (s && o) {
3026
3068
  const f = De.get(o);
3027
3069
  if (f) return f;
3028
3070
  }
3029
- function a(f, x) {
3030
- return pe("#text", {}, f, x);
3071
+ function a(f, v) {
3072
+ return pe("#text", {}, f, v);
3031
3073
  }
3032
3074
  let u = "";
3033
3075
  for (let f = 0; f < e.length; f++)
3034
3076
  u += e[f], f < t.length && (u += `{{${f}}}`);
3035
3077
  const m = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, g = [];
3036
- let b, h = [], l = null, d = {}, v, w = 0, c = [];
3078
+ let b, h = [], l = null, d = {}, x, w = 0, c = [];
3037
3079
  function p(f) {
3038
- !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((x) => {
3039
- if (x === "style" && d.attrs.style) {
3080
+ !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) => {
3081
+ if (v === "style" && d.attrs.style) {
3040
3082
  const A = d.attrs.style.replace(
3041
3083
  /;?\s*$/,
3042
3084
  ""
3043
3085
  ), _ = f.attrs.style.replace(/^;?\s*/, "");
3044
3086
  d.attrs.style = A + "; " + _;
3045
- } else if (x === "class" && d.attrs.class) {
3087
+ } else if (v === "class" && d.attrs.class) {
3046
3088
  const A = d.attrs.class.trim().split(/\s+/).filter(Boolean), _ = f.attrs.class.trim().split(/\s+/).filter(Boolean), $ = [
3047
3089
  .../* @__PURE__ */ new Set([...A, ..._])
3048
3090
  ];
3049
3091
  d.attrs.class = $.join(" ");
3050
3092
  } else
3051
- d.attrs[x] = f.attrs[x];
3093
+ d.attrs[v] = f.attrs[v];
3052
3094
  }))) : (d.props || (d.props = {}), Object.assign(d.props, f)));
3053
3095
  }
3054
- function y(f, x) {
3096
+ function y(f, v) {
3055
3097
  const A = l ? h : c;
3056
3098
  if (Ae(f)) {
3057
- const _ = f.key ?? x;
3099
+ const _ = f.key ?? v;
3058
3100
  let $ = f.children;
3059
3101
  A.push({
3060
3102
  ...f,
@@ -3064,14 +3106,14 @@ function sn(e, t, n) {
3064
3106
  return;
3065
3107
  }
3066
3108
  if (_e(f)) {
3067
- A.push(nn(f, void 0));
3109
+ A.push(rr(f, void 0));
3068
3110
  return;
3069
3111
  }
3070
3112
  if (Array.isArray(f)) {
3071
3113
  if (f.length === 0) return;
3072
3114
  for (let _ = 0; _ < f.length; _++) {
3073
3115
  const $ = f[_];
3074
- Ae($) || _e($) || Array.isArray($) ? y($, `${x}-${_}`) : $ !== null && typeof $ == "object" ? p($) : A.push(a(String($), `${x}-${_}`));
3116
+ Ae($) || _e($) || Array.isArray($) ? y($, `${v}-${_}`) : $ !== null && typeof $ == "object" ? p($) : A.push(a(String($), `${v}-${_}`));
3075
3117
  }
3076
3118
  return;
3077
3119
  }
@@ -3079,7 +3121,7 @@ function sn(e, t, n) {
3079
3121
  p(f);
3080
3122
  return;
3081
3123
  }
3082
- A.push(a(String(f), x));
3124
+ A.push(a(String(f), v));
3083
3125
  }
3084
3126
  const C = /* @__PURE__ */ new Set([
3085
3127
  "area",
@@ -3100,12 +3142,12 @@ function sn(e, t, n) {
3100
3142
  for (; b = m.exec(u); )
3101
3143
  if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
3102
3144
  if (b[1]) {
3103
- const f = b[1], x = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || C.has(f), {
3145
+ const f = b[1], v = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || C.has(f), {
3104
3146
  props: _,
3105
3147
  attrs: $,
3106
3148
  directives: T,
3107
3149
  bound: R
3108
- } = rn(b[2] || "", t, i), S = { props: {}, attrs: {} };
3150
+ } = nr(b[2] || "", t, i), S = { props: {}, attrs: {} };
3109
3151
  for (const P in _) S.props[P] = _[P];
3110
3152
  for (const P in $) S.attrs[P] = $[P];
3111
3153
  if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
@@ -3152,14 +3194,14 @@ function sn(e, t, n) {
3152
3194
  let O;
3153
3195
  typeof z == "string" && i ? O = U(W, z) : (O = z, O && ee(O) && (O = O.value)), S.props[E] = O;
3154
3196
  try {
3155
- const re = ne(E);
3156
- S.attrs || (S.attrs = {}), O !== void 0 && (S.attrs[re] = O);
3197
+ const ne = re(E);
3198
+ S.attrs || (S.attrs = {}), O !== void 0 && (S.attrs[ne] = O);
3157
3199
  } catch {
3158
3200
  }
3159
3201
  S.isCustomElement = !0;
3160
- const qe = `update:${ne(E)}`.replace(/-([a-z])/g, (re, Y) => Y.toUpperCase()), ut = "on" + qe.charAt(0).toUpperCase() + qe.slice(1);
3161
- S.props[ut] = function(re) {
3162
- const Y = re.detail !== void 0 ? re.detail : re.target ? re.target.value : void 0;
3202
+ const qe = `update:${re(E)}`.replace(/-([a-z])/g, (ne, Y) => Y.toUpperCase()), ut = "on" + qe.charAt(0).toUpperCase() + qe.slice(1);
3203
+ S.props[ut] = function(ne) {
3204
+ const Y = ne.detail !== void 0 ? ne.detail : ne.target ? ne.target.value : void 0;
3163
3205
  if (W)
3164
3206
  if (z && ee(z)) {
3165
3207
  const ae = z.value;
@@ -3172,25 +3214,25 @@ function sn(e, t, n) {
3172
3214
  }
3173
3215
  } catch {
3174
3216
  }
3175
- if (Object.keys(T).length > 0 && (S.directives = { ...T }), x) {
3217
+ if (Object.keys(T).length > 0 && (S.directives = { ...T }), v) {
3176
3218
  const P = pe(
3177
3219
  l,
3178
3220
  d,
3179
3221
  h.length === 1 && _e(h[0]) && h[0].tag === "#text" ? typeof h[0].children == "string" ? h[0].children : "" : h.length ? h : void 0,
3180
- v
3222
+ x
3181
3223
  ), B = g.pop();
3182
- B ? (l = B.tag, d = B.props, v = B.key, h = B.children, h.push(P)) : (c.push(P), l = null, d = {}, v = void 0, h = []);
3224
+ B ? (l = B.tag, d = B.props, x = B.key, h = B.children, h.push(P)) : (c.push(P), l = null, d = {}, x = void 0, h = []);
3183
3225
  } else A ? l ? h.push(pe(f, S, void 0, void 0)) : c.push(pe(f, S, void 0, void 0)) : (l && g.push({
3184
3226
  tag: l,
3185
3227
  props: d,
3186
3228
  children: h,
3187
- key: v
3229
+ key: x
3188
3230
  }), l = f, d = S, h = []);
3189
3231
  } else if (typeof b[3] < "u") {
3190
- const f = Number(b[3]), x = t[f], A = `interp-${f}`;
3191
- y(x, A);
3232
+ const f = Number(b[3]), v = t[f], A = `interp-${f}`;
3233
+ y(v, A);
3192
3234
  } else if (b[4]) {
3193
- const f = b[4], x = l ? h : c, A = f.split(/({{\d+}})/);
3235
+ const f = b[4], v = l ? h : c, A = f.split(/({{\d+}})/);
3194
3236
  for (const _ of A) {
3195
3237
  if (!_) continue;
3196
3238
  const $ = _.match(/^{{(\d+)}}$/);
@@ -3199,7 +3241,7 @@ function sn(e, t, n) {
3199
3241
  y(R, S);
3200
3242
  } else {
3201
3243
  const T = `text-${w++}`;
3202
- x.push(a(_, T));
3244
+ v.push(a(_, T));
3203
3245
  }
3204
3246
  }
3205
3247
  }
@@ -3215,94 +3257,94 @@ function sn(e, t, n) {
3215
3257
  return pe("div", {}, "", "fallback-root");
3216
3258
  }
3217
3259
  function ce(e, ...t) {
3218
- const n = t[t.length - 1], r = typeof n == "object" && n && !Array.isArray(n) ? n : void 0;
3219
- return sn(e, t, r);
3260
+ const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3261
+ return ir(e, t, n);
3220
3262
  }
3221
3263
  function Re(e, t) {
3222
3264
  return j(e ? t : [], "when-block");
3223
3265
  }
3224
- function vn(e, t) {
3225
- return e.map((n, r) => {
3226
- const i = typeof n == "object" ? n?.key ?? n?.id ?? `idx-${r}` : String(n);
3227
- return j(t(n, r), `each-${i}`);
3266
+ function wr(e, t) {
3267
+ return e.map((r, n) => {
3268
+ const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
3269
+ return j(t(r, n), `each-${i}`);
3228
3270
  });
3229
3271
  }
3230
- function on() {
3272
+ function sr() {
3231
3273
  const e = [];
3232
3274
  return {
3233
- when(t, n) {
3234
- return e.push([t, n]), this;
3275
+ when(t, r) {
3276
+ return e.push([t, r]), this;
3235
3277
  },
3236
3278
  otherwise(t) {
3237
3279
  return e.push([!0, t]), this;
3238
3280
  },
3239
3281
  done() {
3240
- return an(...e);
3282
+ return or(...e);
3241
3283
  }
3242
3284
  };
3243
3285
  }
3244
- function an(...e) {
3286
+ function or(...e) {
3245
3287
  for (let t = 0; t < e.length; t++) {
3246
- const [n, r] = e[t];
3247
- if (n) return [j(r, `whenChain-branch-${t}`)];
3288
+ const [r, n] = e[t];
3289
+ if (r) return [j(n, `whenChain-branch-${t}`)];
3248
3290
  }
3249
3291
  return [j([], "whenChain-empty")];
3250
3292
  }
3251
3293
  function j(e, t) {
3252
- const n = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
3294
+ const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
3253
3295
  return {
3254
3296
  tag: "#anchor",
3255
3297
  key: t,
3256
- children: n
3298
+ children: r
3257
3299
  };
3258
3300
  }
3259
- function xn(e, t) {
3301
+ function xr(e, t) {
3260
3302
  return Re(!e, t);
3261
3303
  }
3262
- function kn(e, t) {
3263
- const n = !e || e.length === 0;
3264
- return Re(n, t);
3304
+ function vr(e, t) {
3305
+ const r = !e || e.length === 0;
3306
+ return Re(r, t);
3265
3307
  }
3266
- function Cn(e, t) {
3267
- const n = !!(e && e.length > 0);
3268
- return Re(n, t);
3308
+ function kr(e, t) {
3309
+ const r = !!(e && e.length > 0);
3310
+ return Re(r, t);
3269
3311
  }
3270
- function _n(e, t, n) {
3271
- const r = [];
3312
+ function Cr(e, t, r) {
3313
+ const n = [];
3272
3314
  return e.forEach((i, s) => {
3273
- t(i, s) && r.push({ item: i, originalIndex: s });
3274
- }), r.map(({ item: i, originalIndex: s }, o) => {
3315
+ t(i, s) && n.push({ item: i, originalIndex: s });
3316
+ }), n.map(({ item: i, originalIndex: s }, o) => {
3275
3317
  const a = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
3276
- return j(n(i, s, o), `each-where-${a}`);
3318
+ return j(r(i, s, o), `each-where-${a}`);
3277
3319
  });
3278
3320
  }
3279
- function En(e, t) {
3280
- const n = e?.length ?? 0;
3281
- return n === 0 && t.empty ? j(t.empty, "switch-length-empty") : n === 1 && t.one ? j(t.one(e[0]), "switch-length-one") : t.exactly?.[n] ? j(t.exactly[n](e), `switch-length-${n}`) : n > 1 && t.many ? j(t.many(e), "switch-length-many") : j([], "switch-length-fallback");
3321
+ function _r(e, t) {
3322
+ const r = e?.length ?? 0;
3323
+ 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");
3282
3324
  }
3283
- function $n(e, t, n) {
3284
- const r = /* @__PURE__ */ new Map();
3325
+ function Er(e, t, r) {
3326
+ const n = /* @__PURE__ */ new Map();
3285
3327
  return e.forEach((i) => {
3286
3328
  const s = t(i);
3287
- r.has(s) || r.set(s, []), r.get(s).push(i);
3288
- }), Array.from(r.entries()).map(([i, s], o) => j(
3289
- n(i, s, o),
3329
+ n.has(s) || n.set(s, []), n.get(s).push(i);
3330
+ }), Array.from(n.entries()).map(([i, s], o) => j(
3331
+ r(i, s, o),
3290
3332
  `each-group-${i}`
3291
3333
  ));
3292
3334
  }
3293
- function Sn(e, t, n, r) {
3294
- const i = n * t, s = Math.min(i + t, e.length);
3335
+ function $r(e, t, r, n) {
3336
+ const i = r * t, s = Math.min(i + t, e.length);
3295
3337
  return e.slice(i, s).map((a, u) => {
3296
3338
  const m = i + u, g = typeof a == "object" && a != null ? a?.key ?? a?.id ?? `page-${m}` : `page-${m}`;
3297
- return j(r(a, m, u), `each-page-${g}`);
3339
+ return j(n(a, m, u), `each-page-${g}`);
3298
3340
  });
3299
3341
  }
3300
- function An(e, t) {
3342
+ function Sr(e, t) {
3301
3343
  return e.loading && t.loading ? j(t.loading, "promise-loading") : e.error && t.error ? j(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? j(t.success(e.data), "promise-success") : t.idle ? j(t.idle, "promise-idle") : j([], "promise-fallback");
3302
3344
  }
3303
3345
  function q(e, t) {
3304
- const n = typeof window < "u" && window.matchMedia?.(e)?.matches;
3305
- return Re(!!n, t);
3346
+ const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
3347
+ return Re(!!r, t);
3306
3348
  }
3307
3349
  const te = {
3308
3350
  // Responsive breakpoints (matching style.ts)
@@ -3313,7 +3355,7 @@ const te = {
3313
3355
  "2xl": "(min-width:1536px)",
3314
3356
  // Dark mode (matching style.ts)
3315
3357
  dark: "(prefers-color-scheme: dark)"
3316
- }, lt = ["sm", "md", "lg", "xl", "2xl"], cn = {
3358
+ }, lt = ["sm", "md", "lg", "xl", "2xl"], ar = {
3317
3359
  // Breakpoint-based rendering (matching style.ts exactly)
3318
3360
  sm: (e) => q(te.sm, e),
3319
3361
  md: (e) => q(te.md, e),
@@ -3332,44 +3374,44 @@ const te = {
3332
3374
  portrait: (e) => q("(orientation: portrait)", e),
3333
3375
  landscape: (e) => q("(orientation: landscape)", e)
3334
3376
  };
3335
- function Tn(e, t) {
3336
- const n = [];
3337
- e.includes("dark") ? n.push(te.dark) : e.includes("light") && n.push("(prefers-color-scheme: light)");
3338
- const r = e.filter(
3377
+ function Ar(e, t) {
3378
+ const r = [];
3379
+ e.includes("dark") ? r.push(te.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3380
+ const n = e.filter(
3339
3381
  (o) => lt.includes(o)
3340
- ), i = r[r.length - 1];
3341
- i && i in te && n.push(te[i]);
3342
- const s = n.length > 0 ? n.join(" and ") : "all";
3382
+ ), i = n[n.length - 1];
3383
+ i && i in te && r.push(te[i]);
3384
+ const s = r.length > 0 ? r.join(" and ") : "all";
3343
3385
  return q(s, t);
3344
3386
  }
3345
- function Rn(e) {
3387
+ function Tr(e) {
3346
3388
  const t = [];
3347
- return e.base && t.push(j(e.base, "responsive-base")), lt.forEach((n) => {
3348
- const r = e[n];
3349
- r && t.push(cn[n](r));
3389
+ return e.base && t.push(j(e.base, "responsive-base")), lt.forEach((r) => {
3390
+ const n = e[r];
3391
+ n && t.push(ar[r](n));
3350
3392
  }), t;
3351
3393
  }
3352
- function On(e) {
3394
+ function Rr(e) {
3353
3395
  const t = [];
3354
- let n = null;
3396
+ let r = null;
3355
3397
  return {
3356
- case(r, i) {
3357
- const s = typeof r == "function" ? r : (o) => o === r;
3398
+ case(n, i) {
3399
+ const s = typeof n == "function" ? n : (o) => o === n;
3358
3400
  return t.push({ condition: s, content: i }), this;
3359
3401
  },
3360
- when(r, i) {
3361
- return t.push({ condition: r, content: i }), this;
3402
+ when(n, i) {
3403
+ return t.push({ condition: n, content: i }), this;
3362
3404
  },
3363
- otherwise(r) {
3364
- return n = r, this;
3405
+ otherwise(n) {
3406
+ return r = n, this;
3365
3407
  },
3366
3408
  done() {
3367
- for (let r = 0; r < t.length; r++) {
3368
- const { condition: i, content: s } = t[r];
3409
+ for (let n = 0; n < t.length; n++) {
3410
+ const { condition: i, content: s } = t[n];
3369
3411
  if (i(e))
3370
- return j(s, `switch-case-${r}`);
3412
+ return j(s, `switch-case-${n}`);
3371
3413
  }
3372
- return j(n || [], "switch-otherwise");
3414
+ return j(r || [], "switch-otherwise");
3373
3415
  }
3374
3416
  };
3375
3417
  }
@@ -3388,14 +3430,14 @@ class de extends EventTarget {
3388
3430
  * @param eventName - Name of the event
3389
3431
  * @param data - Optional event payload
3390
3432
  */
3391
- emit(t, n) {
3392
- const r = Date.now(), i = this.eventCounters.get(t);
3393
- if (!i || r - i.window > 1e3)
3394
- this.eventCounters.set(t, { count: 1, window: r });
3433
+ emit(t, r) {
3434
+ const n = Date.now(), i = this.eventCounters.get(t);
3435
+ if (!i || n - i.window > 1e3)
3436
+ this.eventCounters.set(t, { count: 1, window: n });
3395
3437
  else if (i.count++, i.count > 50 && i.count > 100)
3396
3438
  return;
3397
3439
  this.dispatchEvent(new CustomEvent(t, {
3398
- detail: n,
3440
+ detail: r,
3399
3441
  bubbles: !1,
3400
3442
  // Global events don't need to bubble
3401
3443
  cancelable: !0
@@ -3403,7 +3445,7 @@ class de extends EventTarget {
3403
3445
  const s = this.handlers[t];
3404
3446
  s && s.forEach((o) => {
3405
3447
  try {
3406
- o(n);
3448
+ o(r);
3407
3449
  } catch (a) {
3408
3450
  se(`Error in global event handler for "${t}":`, a);
3409
3451
  }
@@ -3414,17 +3456,17 @@ class de extends EventTarget {
3414
3456
  * @param eventName - Name of the event
3415
3457
  * @param handler - Handler function
3416
3458
  */
3417
- on(t, n) {
3418
- return this.handlers[t] || (this.handlers[t] = /* @__PURE__ */ new Set()), this.handlers[t].add(n), () => this.off(t, n);
3459
+ on(t, r) {
3460
+ return this.handlers[t] || (this.handlers[t] = /* @__PURE__ */ new Set()), this.handlers[t].add(r), () => this.off(t, r);
3419
3461
  }
3420
3462
  /**
3421
3463
  * Remove a specific handler for a global event.
3422
3464
  * @param eventName - Name of the event
3423
3465
  * @param handler - Handler function to remove
3424
3466
  */
3425
- off(t, n) {
3426
- const r = this.handlers[t];
3427
- r && r.delete(n);
3467
+ off(t, r) {
3468
+ const n = this.handlers[t];
3469
+ n && n.delete(r);
3428
3470
  }
3429
3471
  /**
3430
3472
  * Remove all handlers for a specific event.
@@ -3439,18 +3481,18 @@ class de extends EventTarget {
3439
3481
  * @param handler - CustomEvent handler
3440
3482
  * @param options - AddEventListener options
3441
3483
  */
3442
- listen(t, n, r) {
3443
- return this.addEventListener(t, n, r), () => this.removeEventListener(t, n);
3484
+ listen(t, r, n) {
3485
+ return this.addEventListener(t, r, n), () => this.removeEventListener(t, r);
3444
3486
  }
3445
3487
  /**
3446
3488
  * Register a one-time event handler. Returns a promise that resolves with the event data.
3447
3489
  * @param eventName - Name of the event
3448
3490
  * @param handler - Handler function
3449
3491
  */
3450
- once(t, n) {
3451
- return new Promise((r) => {
3492
+ once(t, r) {
3493
+ return new Promise((n) => {
3452
3494
  const i = this.on(t, (s) => {
3453
- i(), n(s), r(s);
3495
+ i(), r(s), n(s);
3454
3496
  });
3455
3497
  });
3456
3498
  }
@@ -3480,10 +3522,10 @@ class de extends EventTarget {
3480
3522
  */
3481
3523
  getEventStats() {
3482
3524
  const t = {};
3483
- for (const [n, r] of this.eventCounters.entries())
3484
- t[n] = {
3485
- count: r.count,
3486
- handlersCount: this.getHandlerCount(n)
3525
+ for (const [r, n] of this.eventCounters.entries())
3526
+ t[r] = {
3527
+ count: n.count,
3528
+ handlersCount: this.getHandlerCount(r)
3487
3529
  };
3488
3530
  return t;
3489
3531
  }
@@ -3494,12 +3536,12 @@ class de extends EventTarget {
3494
3536
  this.eventCounters.clear();
3495
3537
  }
3496
3538
  }
3497
- const be = de.getInstance(), Pn = (e, t) => be.emit(e, t), Ln = (e, t) => be.on(e, t), Mn = (e, t) => be.off(e, t), jn = (e, t) => be.once(e, t), Nn = (e, t, n) => be.listen(e, t, n);
3539
+ const be = de.getInstance(), Or = (e, t) => be.emit(e, t), Pr = (e, t) => be.on(e, t), Lr = (e, t) => be.off(e, t), Mr = (e, t) => be.once(e, t), jr = (e, t, r) => be.listen(e, t, r);
3498
3540
  function tt(e) {
3499
3541
  let t = { ...e };
3500
- const n = [];
3501
- function r(a) {
3502
- n.push(a), a(t);
3542
+ const r = [];
3543
+ function n(a) {
3544
+ r.push(a), a(t);
3503
3545
  }
3504
3546
  function i() {
3505
3547
  return t;
@@ -3509,23 +3551,23 @@ function tt(e) {
3509
3551
  t = { ...t, ...u }, o();
3510
3552
  }
3511
3553
  function o() {
3512
- n.forEach((a) => a(t));
3554
+ r.forEach((a) => a(t));
3513
3555
  }
3514
- return { subscribe: r, getState: i, setState: s };
3556
+ return { subscribe: n, getState: i, setState: s };
3515
3557
  }
3516
- const nt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Q = (e, t) => {
3517
- for (const n of e) {
3518
- const r = [], i = n.path.replace(/:[^/]+/g, (a) => (r.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3558
+ const rt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Q = (e, t) => {
3559
+ for (const r of e) {
3560
+ const n = [], i = r.path.replace(/:[^/]+/g, (a) => (n.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3519
3561
  if (o) {
3520
3562
  const a = {};
3521
- return r.forEach((u, m) => {
3563
+ return n.forEach((u, m) => {
3522
3564
  a[u] = o[m + 1];
3523
- }), { route: n, params: a };
3565
+ }), { route: r, params: a };
3524
3566
  }
3525
3567
  }
3526
3568
  return { route: null, params: {} };
3527
3569
  }, Ie = {};
3528
- async function ln(e) {
3570
+ async function cr(e) {
3529
3571
  if (e.component) return e.component;
3530
3572
  if (e.load) {
3531
3573
  if (Ie[e.path]) return Ie[e.path];
@@ -3538,41 +3580,41 @@ async function ln(e) {
3538
3580
  }
3539
3581
  throw new Error(`No component or loader defined for route: ${e.path}`);
3540
3582
  }
3541
- function un(e) {
3542
- const { routes: t, base: n = "", initialUrl: r } = e;
3583
+ function lr(e) {
3584
+ const { routes: t, base: r = "", initialUrl: n } = e;
3543
3585
  let i, s, o, a, u, m, g;
3544
- const b = async (v, w) => {
3545
- const c = t.find((p) => Q([p], v.path).route !== null);
3586
+ const b = async (x, w) => {
3587
+ const c = t.find((p) => Q([p], x.path).route !== null);
3546
3588
  if (c?.beforeEnter)
3547
3589
  try {
3548
- const p = await c.beforeEnter(v, w);
3590
+ const p = await c.beforeEnter(x, w);
3549
3591
  return typeof p == "string" ? (await d(p, !0), !1) : p !== !1;
3550
3592
  } catch (p) {
3551
3593
  return se("beforeEnter error", p), !1;
3552
3594
  }
3553
3595
  return !0;
3554
- }, h = async (v, w) => {
3555
- const c = t.find((p) => Q([p], v.path).route !== null);
3596
+ }, h = async (x, w) => {
3597
+ const c = t.find((p) => Q([p], x.path).route !== null);
3556
3598
  if (c?.onEnter)
3557
3599
  try {
3558
- const p = await c.onEnter(v, w);
3600
+ const p = await c.onEnter(x, w);
3559
3601
  return typeof p == "string" ? (await d(p, !0), !1) : p !== !1;
3560
3602
  } catch (p) {
3561
3603
  return se("onEnter error", p), !1;
3562
3604
  }
3563
3605
  return !0;
3564
- }, l = (v, w) => {
3565
- const c = t.find((p) => Q([p], v.path).route !== null);
3606
+ }, l = (x, w) => {
3607
+ const c = t.find((p) => Q([p], x.path).route !== null);
3566
3608
  if (c?.afterEnter)
3567
3609
  try {
3568
- c.afterEnter(v, w);
3610
+ c.afterEnter(x, w);
3569
3611
  } catch (p) {
3570
3612
  se("afterEnter error", p);
3571
3613
  }
3572
- }, d = async (v, w = !1) => {
3614
+ }, d = async (x, w = !1) => {
3573
3615
  try {
3574
3616
  const c = {
3575
- path: v.replace(n, "") || "/",
3617
+ path: x.replace(r, "") || "/",
3576
3618
  query: {}
3577
3619
  }, p = Q(t, c.path);
3578
3620
  if (!p) throw new Error(`No route found for ${c.path}`);
@@ -3582,20 +3624,20 @@ function un(e) {
3582
3624
  query: c.query
3583
3625
  };
3584
3626
  if (!await b(C, y) || !await h(C, y)) return;
3585
- typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", n + v) : window.history.pushState({}, "", n + v)), o.setState(C), l(C, y);
3627
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + x) : window.history.pushState({}, "", r + x)), o.setState(C), l(C, y);
3586
3628
  } catch (c) {
3587
3629
  se("Navigation error:", c);
3588
3630
  }
3589
3631
  };
3590
- if (typeof window < "u" && typeof document < "u" && typeof r > "u") {
3632
+ if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
3591
3633
  i = () => {
3592
- const w = new URL(window.location.href), c = w.pathname.replace(n, "") || "/", p = nt(w.search);
3634
+ const w = new URL(window.location.href), c = w.pathname.replace(r, "") || "/", p = rt(w.search);
3593
3635
  return { path: c, query: p };
3594
3636
  }, s = i();
3595
- const v = Q(t, s.path);
3637
+ const x = Q(t, s.path);
3596
3638
  o = tt({
3597
3639
  path: s.path,
3598
- params: v.params,
3640
+ params: x.params,
3599
3641
  query: s.query
3600
3642
  }), a = async (w = !1) => {
3601
3643
  const c = i();
@@ -3603,13 +3645,13 @@ function un(e) {
3603
3645
  }, window.addEventListener("popstate", () => a(!0)), u = (w) => d(w, !1), m = (w) => d(w, !0), g = () => window.history.back();
3604
3646
  } else {
3605
3647
  i = () => {
3606
- const c = new URL(r || "/", "http://localhost"), p = c.pathname.replace(n, "") || "/", y = nt(c.search);
3648
+ const c = new URL(n || "/", "http://localhost"), p = c.pathname.replace(r, "") || "/", y = rt(c.search);
3607
3649
  return { path: p, query: y };
3608
3650
  }, s = i();
3609
- const v = Q(t, s.path);
3651
+ const x = Q(t, s.path);
3610
3652
  o = tt({
3611
3653
  path: s.path,
3612
- params: v.params,
3654
+ params: x.params,
3613
3655
  query: s.query
3614
3656
  }), a = async () => {
3615
3657
  const c = i();
@@ -3618,7 +3660,7 @@ function un(e) {
3618
3660
  const w = async (c) => {
3619
3661
  try {
3620
3662
  const p = {
3621
- path: c.replace(n, "") || "/",
3663
+ path: c.replace(r, "") || "/",
3622
3664
  query: {}
3623
3665
  }, y = Q(t, p.path);
3624
3666
  if (!y) throw new Error(`No route found for ${p.path}`);
@@ -3626,26 +3668,26 @@ function un(e) {
3626
3668
  path: p.path,
3627
3669
  params: y.params,
3628
3670
  query: p.query
3629
- }, f = t.find((x) => Q([x], k.path).route !== null);
3671
+ }, f = t.find((v) => Q([v], k.path).route !== null);
3630
3672
  if (f?.beforeEnter)
3631
3673
  try {
3632
- const x = await f.beforeEnter(k, C);
3633
- if (typeof x == "string") {
3634
- await w(x);
3674
+ const v = await f.beforeEnter(k, C);
3675
+ if (typeof v == "string") {
3676
+ await w(v);
3635
3677
  return;
3636
3678
  }
3637
- if (x === !1) return;
3679
+ if (v === !1) return;
3638
3680
  } catch {
3639
3681
  return;
3640
3682
  }
3641
3683
  if (f?.onEnter)
3642
3684
  try {
3643
- const x = await f.onEnter(k, C);
3644
- if (typeof x == "string") {
3645
- await w(x);
3685
+ const v = await f.onEnter(k, C);
3686
+ if (typeof v == "string") {
3687
+ await w(v);
3646
3688
  return;
3647
3689
  }
3648
- if (x === !1) return;
3690
+ if (v === !1) return;
3649
3691
  } catch {
3650
3692
  return;
3651
3693
  }
@@ -3666,18 +3708,18 @@ function un(e) {
3666
3708
  replace: m,
3667
3709
  back: g,
3668
3710
  subscribe: o.subscribe,
3669
- matchRoute: (v) => Q(t, v),
3711
+ matchRoute: (x) => Q(t, x),
3670
3712
  getCurrent: () => o.getState(),
3671
- resolveRouteComponent: ln
3713
+ resolveRouteComponent: cr
3672
3714
  };
3673
3715
  }
3674
- function Wn(e, t) {
3716
+ function Nr(e, t) {
3675
3717
  return Q(e, t);
3676
3718
  }
3677
- function zn(e) {
3678
- const t = un(e);
3679
- return et("router-view", (n = {}, r = {}) => {
3680
- const { onConnected: i } = r;
3719
+ function Wr(e) {
3720
+ const t = lr(e);
3721
+ return et("router-view", (r = {}, n = {}) => {
3722
+ const { onConnected: i } = n;
3681
3723
  if (i && i(() => {
3682
3724
  t && typeof t.subscribe == "function" && t.subscribe(() => {
3683
3725
  });
@@ -3692,7 +3734,7 @@ function zn(e) {
3692
3734
  }
3693
3735
  return ce`<div>Invalid route component</div>`;
3694
3736
  }).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
3695
- }), et("router-link", (n = {}, r = {}) => {
3737
+ }), et("router-link", (r = {}, n = {}) => {
3696
3738
  const {
3697
3739
  to: i = "",
3698
3740
  tag: s = "a",
@@ -3704,14 +3746,14 @@ function zn(e) {
3704
3746
  disabled: b = !1,
3705
3747
  external: h = !1,
3706
3748
  class: l = ""
3707
- } = n, d = t.getCurrent(), v = d.path === i, w = a ? v : d && typeof d.path == "string" ? d.path.startsWith(i) : !1, c = v ? `aria-current="${g}"` : "", p = (l || "").split(/\s+/).filter(Boolean), y = {};
3749
+ } = r, d = t.getCurrent(), x = d.path === i, w = a ? x : d && typeof d.path == "string" ? d.path.startsWith(i) : !1, c = x ? `aria-current="${g}"` : "", p = (l || "").split(/\s+/).filter(Boolean), y = {};
3708
3750
  for (const _ of p) y[_] = !0;
3709
3751
  const C = {
3710
3752
  ...y,
3711
3753
  // Also include the configurable names (may duplicate the above)
3712
3754
  [u]: w,
3713
- [m]: v
3714
- }, k = s === "button", f = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", x = h && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (_) => {
3755
+ [m]: x
3756
+ }, k = s === "button", f = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", v = h && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (_) => {
3715
3757
  if (b) {
3716
3758
  _.preventDefault();
3717
3759
  return;
@@ -3719,13 +3761,13 @@ function zn(e) {
3719
3761
  h && (s === "a" || !s) || (_.preventDefault(), o ? t.replace(i) : t.push(i));
3720
3762
  };
3721
3763
  return ce`
3722
- ${on().when(k, ce`
3764
+ ${sr().when(k, ce`
3723
3765
  <button
3724
3766
  part="button"
3725
3767
  :class="${C}"
3726
3768
  ${c}
3727
3769
  ${f}
3728
- ${x}
3770
+ ${v}
3729
3771
  @click="${A}"
3730
3772
  ><slot></slot></button>
3731
3773
  `).otherwise(ce`
@@ -3735,7 +3777,7 @@ function zn(e) {
3735
3777
  :class="${C}"
3736
3778
  ${c}
3737
3779
  ${f}
3738
- ${x}
3780
+ ${v}
3739
3781
  @click="${A}"
3740
3782
  ><slot></slot></a>
3741
3783
  `).done()}
@@ -3746,48 +3788,48 @@ export {
3746
3788
  de as GlobalEventBus,
3747
3789
  j as anchorBlock,
3748
3790
  et as component,
3749
- dn as computed,
3791
+ fr as computed,
3750
3792
  tt as createStore,
3751
3793
  Pt as css,
3752
- vn as each,
3753
- $n as eachGroup,
3754
- Sn as eachPage,
3755
- _n as eachWhere,
3756
- Pn as emit,
3794
+ wr as each,
3795
+ Er as eachGroup,
3796
+ $r as eachPage,
3797
+ Cr as eachWhere,
3798
+ Or as emit,
3757
3799
  be as eventBus,
3758
3800
  ce as html,
3759
- zn as initRouter,
3760
- Nn as listen,
3761
- on as match,
3801
+ Wr as initRouter,
3802
+ jr as listen,
3803
+ sr as match,
3762
3804
  Q as matchRoute,
3763
- Wn as matchRouteSSR,
3805
+ Nr as matchRouteSSR,
3764
3806
  te as mediaVariants,
3765
- Mn as off,
3766
- Ln as on,
3767
- jn as once,
3768
- nt as parseQuery,
3769
- fn as ref,
3807
+ Lr as off,
3808
+ Pr as on,
3809
+ Mr as once,
3810
+ rt as parseQuery,
3811
+ ur as ref,
3770
3812
  Pe as renderToString,
3771
- ln as resolveRouteComponent,
3772
- cn as responsive,
3813
+ cr as resolveRouteComponent,
3814
+ ar as responsive,
3773
3815
  lt as responsiveOrder,
3774
- Rn as responsiveSwitch,
3775
- On as switchOn,
3776
- En as switchOnLength,
3777
- An as switchOnPromise,
3778
- xn as unless,
3779
- hn as useEmit,
3780
- yn as useOnAttributeChanged,
3781
- gn as useOnConnected,
3782
- mn as useOnDisconnected,
3783
- bn as useOnError,
3784
- un as useRouter,
3785
- wn as useStyle,
3786
- pn as watch,
3816
+ Tr as responsiveSwitch,
3817
+ Rr as switchOn,
3818
+ _r as switchOnLength,
3819
+ Sr as switchOnPromise,
3820
+ xr as unless,
3821
+ pr as useEmit,
3822
+ mr as useOnAttributeChanged,
3823
+ hr as useOnConnected,
3824
+ gr as useOnDisconnected,
3825
+ yr as useOnError,
3826
+ lr as useRouter,
3827
+ br as useStyle,
3828
+ dr as watch,
3787
3829
  Re as when,
3788
- kn as whenEmpty,
3830
+ vr as whenEmpty,
3789
3831
  q as whenMedia,
3790
- Cn as whenNotEmpty,
3791
- Tn as whenVariants
3832
+ kr as whenNotEmpty,
3833
+ Ar as whenVariants
3792
3834
  };
3793
3835
  //# sourceMappingURL=custom-elements-runtime.es.js.map