@jasonshimmy/custom-elements-runtime 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- function vt(e, t) {
1
+ function xt(e, t) {
2
2
  return fe(e ? t : [], "when-block");
3
3
  }
4
- function xt(e, t) {
5
- return e.map((r, o) => {
6
- const n = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${o}` : String(r);
7
- return fe(t(r, o), `each-${n}`);
4
+ function kt(e, t) {
5
+ return e.map((r, i) => {
6
+ const n = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${i}` : String(r);
7
+ return fe(t(r, i), `each-${n}`);
8
8
  });
9
9
  }
10
- function Oe() {
10
+ function Pe() {
11
11
  const e = [];
12
12
  return {
13
13
  when(t, r) {
@@ -17,14 +17,14 @@ function Oe() {
17
17
  return e.push([!0, t]), this;
18
18
  },
19
19
  done() {
20
- return Pe(...e);
20
+ return Ne(...e);
21
21
  }
22
22
  };
23
23
  }
24
- function Pe(...e) {
24
+ function Ne(...e) {
25
25
  for (let t = 0; t < e.length; t++) {
26
- const [r, o] = e[t];
27
- if (r) return [fe(o, `whenChain-branch-${t}`)];
26
+ const [r, i] = e[t];
27
+ if (r) return [fe(i, `whenChain-branch-${t}`)];
28
28
  }
29
29
  return [fe([], "whenChain-empty")];
30
30
  }
@@ -52,9 +52,9 @@ class G extends EventTarget {
52
52
  * @param data - Optional event payload
53
53
  */
54
54
  emit(t, r) {
55
- const o = Date.now(), n = this.eventCounters.get(t);
56
- if (!n || o - n.window > 1e3)
57
- this.eventCounters.set(t, { count: 1, window: o });
55
+ const i = Date.now(), n = this.eventCounters.get(t);
56
+ if (!n || i - n.window > 1e3)
57
+ this.eventCounters.set(t, { count: 1, window: i });
58
58
  else if (n.count++, n.count > 50 && n.count > 100)
59
59
  return;
60
60
  this.dispatchEvent(new CustomEvent(t, {
@@ -63,10 +63,10 @@ class G extends EventTarget {
63
63
  // Global events don't need to bubble
64
64
  cancelable: !0
65
65
  }));
66
- const i = this.handlers[t];
67
- i && i.forEach((s) => {
66
+ const s = this.handlers[t];
67
+ s && s.forEach((o) => {
68
68
  try {
69
- s(r);
69
+ o(r);
70
70
  } catch (a) {
71
71
  console.error(`Error in global event handler for "${t}":`, a);
72
72
  }
@@ -86,8 +86,8 @@ class G extends EventTarget {
86
86
  * @param handler - Handler function to remove
87
87
  */
88
88
  off(t, r) {
89
- const o = this.handlers[t];
90
- o && o.delete(r);
89
+ const i = this.handlers[t];
90
+ i && i.delete(r);
91
91
  }
92
92
  /**
93
93
  * Remove all handlers for a specific event.
@@ -102,8 +102,8 @@ class G extends EventTarget {
102
102
  * @param handler - CustomEvent handler
103
103
  * @param options - AddEventListener options
104
104
  */
105
- listen(t, r, o) {
106
- return this.addEventListener(t, r, o), () => this.removeEventListener(t, r);
105
+ listen(t, r, i) {
106
+ return this.addEventListener(t, r, i), () => this.removeEventListener(t, r);
107
107
  }
108
108
  /**
109
109
  * Register a one-time event handler. Returns a promise that resolves with the event data.
@@ -111,9 +111,9 @@ class G extends EventTarget {
111
111
  * @param handler - Handler function
112
112
  */
113
113
  once(t, r) {
114
- return new Promise((o) => {
115
- const n = this.on(t, (i) => {
116
- n(), r(i), o(i);
114
+ return new Promise((i) => {
115
+ const n = this.on(t, (s) => {
116
+ n(), r(s), i(s);
117
117
  });
118
118
  });
119
119
  }
@@ -143,9 +143,9 @@ class G extends EventTarget {
143
143
  */
144
144
  getEventStats() {
145
145
  const t = {};
146
- for (const [r, o] of this.eventCounters.entries())
146
+ for (const [r, i] of this.eventCounters.entries())
147
147
  t[r] = {
148
- count: o.count,
148
+ count: i.count,
149
149
  handlersCount: this.getHandlerCount(r)
150
150
  };
151
151
  return t;
@@ -157,24 +157,24 @@ class G extends EventTarget {
157
157
  this.eventCounters.clear();
158
158
  }
159
159
  }
160
- const re = G.getInstance(), wt = (e, t) => re.emit(e, t), kt = (e, t) => re.on(e, t), $t = (e, t) => re.off(e, t), _t = (e, t) => re.once(e, t), St = (e, t, r) => re.listen(e, t, r);
160
+ const re = G.getInstance(), vt = (e, t) => re.emit(e, t), $t = (e, t) => re.on(e, t), _t = (e, t) => re.off(e, t), St = (e, t) => re.once(e, t), Et = (e, t, r) => re.listen(e, t, r);
161
161
  function $e(e) {
162
162
  let t = { ...e };
163
163
  const r = [];
164
- function o(a) {
164
+ function i(a) {
165
165
  r.push(a), a(t);
166
166
  }
167
167
  function n() {
168
168
  return t;
169
169
  }
170
- function i(a) {
170
+ function s(a) {
171
171
  const f = typeof a == "function" ? a(t) : a;
172
- t = { ...t, ...f }, s();
172
+ t = { ...t, ...f }, o();
173
173
  }
174
- function s() {
174
+ function o() {
175
175
  r.forEach((a) => a(t));
176
176
  }
177
- return { subscribe: o, getState: n, setState: i };
177
+ return { subscribe: i, getState: n, setState: s };
178
178
  }
179
179
  function J(e) {
180
180
  return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
@@ -191,78 +191,78 @@ function H(e) {
191
191
  })[t]
192
192
  ) : e;
193
193
  }
194
- function N(e, t) {
195
- return typeof t == "string" ? t.split(".").reduce((r, o) => r?.[o], e) : t;
194
+ function z(e, t) {
195
+ return typeof t == "string" ? t.split(".").reduce((r, i) => r?.[i], e) : t;
196
196
  }
197
- function se(e, t, r) {
198
- const o = String(t).split("."), n = o.pop();
197
+ function oe(e, t, r) {
198
+ const i = String(t).split("."), n = i.pop();
199
199
  if (!n) return;
200
- const i = o.reduce((s, a) => (s[a] == null && (s[a] = {}), s[a]), e);
201
- i[n] = r;
200
+ const s = i.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
201
+ s[n] = r;
202
202
  }
203
- function Ne(e, t, r) {
203
+ function ze(e, t, r) {
204
204
  if (r)
205
- for (const [o, n] of Object.entries(r)) {
206
- let i, s = {};
207
- if (Array.isArray(n) ? (i = n[0], s = n[1] || {}) : i = n, t.set(o, {
208
- callback: i,
209
- options: s,
210
- oldValue: N(e, o)
211
- }), s.immediate)
205
+ for (const [i, n] of Object.entries(r)) {
206
+ let s, o = {};
207
+ if (Array.isArray(n) ? (s = n[0], o = n[1] || {}) : s = n, t.set(i, {
208
+ callback: s,
209
+ options: o,
210
+ oldValue: z(e, i)
211
+ }), o.immediate)
212
212
  try {
213
- const a = N(e, o);
214
- i(a, void 0, e);
213
+ const a = z(e, i);
214
+ s(a, void 0, e);
215
215
  } catch (a) {
216
- console.error(`Error in immediate watcher for "${o}":`, a);
216
+ console.error(`Error in immediate watcher for "${i}":`, a);
217
217
  }
218
218
  }
219
219
  }
220
- function Me(e, t, r, o) {
221
- const n = (s, a) => {
222
- if (s === a) return !0;
223
- if (typeof s != typeof a || typeof s != "object" || s === null || a === null) return !1;
224
- if (Array.isArray(s) && Array.isArray(a))
225
- return s.length !== a.length ? !1 : s.every((d, m) => n(d, a[m]));
226
- const f = Object.keys(s), u = Object.keys(a);
227
- return f.length !== u.length ? !1 : f.every((d) => n(s[d], a[d]));
228
- }, i = t.get(r);
229
- if (i && !n(o, i.oldValue))
220
+ function Me(e, t, r, i) {
221
+ const n = (o, a) => {
222
+ if (o === a) return !0;
223
+ if (typeof o != typeof a || typeof o != "object" || o === null || a === null) return !1;
224
+ if (Array.isArray(o) && Array.isArray(a))
225
+ return o.length !== a.length ? !1 : o.every((d, y) => n(d, a[y]));
226
+ const f = Object.keys(o), u = Object.keys(a);
227
+ return f.length !== u.length ? !1 : f.every((d) => n(o[d], a[d]));
228
+ }, s = t.get(r);
229
+ if (s && !n(i, s.oldValue))
230
230
  try {
231
- i.callback(o, i.oldValue, e), i.oldValue = o;
232
- } catch (s) {
233
- console.error(`Error in watcher for "${r}":`, s);
231
+ s.callback(i, s.oldValue, e), s.oldValue = i;
232
+ } catch (o) {
233
+ console.error(`Error in watcher for "${r}":`, o);
234
234
  }
235
- for (const [s, a] of t.entries())
236
- if (a.options.deep && r.startsWith(s + "."))
235
+ for (const [o, a] of t.entries())
236
+ if (a.options.deep && r.startsWith(o + "."))
237
237
  try {
238
- const f = N(e, s);
238
+ const f = z(e, o);
239
239
  n(f, a.oldValue) || (a.callback(f, a.oldValue, e), a.oldValue = f);
240
240
  } catch (f) {
241
- console.error(`Error in deep watcher for "${s}":`, f);
241
+ console.error(`Error in deep watcher for "${o}":`, f);
242
242
  }
243
243
  }
244
244
  function We(e, t, r) {
245
245
  if (!t.props) return;
246
- function o(n, i) {
247
- return i === Boolean ? n === "true" : i === Number ? Number(n) : n;
246
+ function i(n, s) {
247
+ return s === Boolean ? n === "true" : s === Number ? Number(n) : n;
248
248
  }
249
- Object.entries(t.props).forEach(([n, i]) => {
250
- if (i.type === Function && typeof e[n] == "function")
249
+ Object.entries(t.props).forEach(([n, s]) => {
250
+ if (s.type === Function && typeof e[n] == "function")
251
251
  r[n] = e[n];
252
252
  else {
253
- const s = e.getAttribute(J(n));
254
- s !== null ? r[n] = H(o(s, i.type)) : "default" in i && i.default !== void 0 && (r[n] = H(i.default));
253
+ const o = e.getAttribute(J(n));
254
+ o !== null ? r[n] = H(i(o, s.type)) : "default" in s && s.default !== void 0 && (r[n] = H(s.default));
255
255
  }
256
256
  });
257
257
  }
258
- function qe(e, t, r, o) {
259
- e.onConnected && !r && (e.onConnected(t), o(!0));
258
+ function qe(e, t, r, i) {
259
+ e.onConnected && !r && (e.onConnected(t), i(!0));
260
260
  }
261
- function De(e, t, r, o, n, i, s, a) {
262
- e.onDisconnected && e.onDisconnected(t), r.forEach((f) => f()), o(), n(), i(!1), s(null), a(!1);
261
+ function De(e, t, r, i, n, s, o, a) {
262
+ e.onDisconnected && e.onDisconnected(t), r.forEach((f) => f()), i(), n(), s(!1), o(null), a(!1);
263
263
  }
264
- function Ie(e, t, r, o, n) {
265
- e.onAttributeChanged && e.onAttributeChanged(t, r, o, n);
264
+ function Ie(e, t, r, i, n) {
265
+ e.onAttributeChanged && e.onAttributeChanged(t, r, i, n);
266
266
  }
267
267
  function V(e, t) {
268
268
  if (t && e instanceof HTMLElement) {
@@ -272,96 +272,96 @@ function V(e, t) {
272
272
  V(r, t);
273
273
  }
274
274
  }
275
- function He(e, t, r, o, n, i, s, a) {
276
- if (!i) return;
277
- const f = t.includes("lazy"), u = t.includes("trim"), d = t.includes("number"), m = () => N(i._state || i, e), l = m();
275
+ function He(e, t, r, i, n, s, o, a) {
276
+ if (!s) return;
277
+ const f = t.includes("lazy"), u = t.includes("trim"), d = t.includes("number"), y = () => z(s._state || s, e), c = y();
278
278
  let h = "text";
279
- s instanceof HTMLInputElement ? h = o?.type || s.type || "text" : s instanceof HTMLSelectElement ? h = "select" : s instanceof HTMLTextAreaElement && (h = "textarea");
280
- const w = s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement || s instanceof HTMLSelectElement, v = w ? h === "checkbox" || h === "radio" ? "checked" : "value" : a ?? "modelValue";
279
+ o instanceof HTMLInputElement ? h = i?.type || o.type || "text" : o instanceof HTMLSelectElement ? h = "select" : o instanceof HTMLTextAreaElement && (h = "textarea");
280
+ const k = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, w = k ? h === "checkbox" || h === "radio" ? "checked" : "value" : a ?? "modelValue";
281
281
  if (h === "checkbox")
282
- if (Array.isArray(l))
283
- r[v] = l.includes(String(s?.getAttribute("value") ?? o?.value ?? ""));
282
+ if (Array.isArray(c))
283
+ r[w] = c.includes(String(o?.getAttribute("value") ?? i?.value ?? ""));
284
284
  else {
285
- const x = s?.getAttribute("true-value") ?? !0;
286
- r[v] = l === x;
285
+ const x = o?.getAttribute("true-value") ?? !0;
286
+ r[w] = c === x;
287
287
  }
288
288
  else if (h === "radio")
289
- r[v] = l === (o?.value ?? "");
289
+ r[w] = c === (i?.value ?? "");
290
290
  else if (h === "select")
291
- if (s && s.hasAttribute("multiple") && s instanceof HTMLSelectElement) {
292
- const x = Array.isArray(l) ? l.map(String) : [];
291
+ if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
292
+ const x = Array.isArray(c) ? c.map(String) : [];
293
293
  setTimeout(() => {
294
- Array.from(s.options).forEach((c) => {
295
- c.selected = x.includes(c.value);
294
+ Array.from(o.options).forEach((l) => {
295
+ l.selected = x.includes(l.value);
296
296
  });
297
- }, 0), r[v] = Array.isArray(l) ? l : [];
297
+ }, 0), r[w] = Array.isArray(c) ? c : [];
298
298
  } else
299
- r[v] = l;
299
+ r[w] = c;
300
300
  else {
301
- r[v] = l;
301
+ r[w] = c;
302
302
  try {
303
- const x = J(v);
304
- o && (o[x] = l);
303
+ const x = J(w);
304
+ i && (i[x] = c);
305
305
  } catch {
306
306
  }
307
307
  }
308
- const b = f || h === "checkbox" || h === "radio" || h === "select" ? "change" : "input", y = (x) => {
308
+ const b = f || h === "checkbox" || h === "radio" || h === "select" ? "change" : "input", m = (x) => {
309
309
  if (x.isComposing || n._isComposing || x.isTrusted === !1) return;
310
- const c = x.target;
311
- if (!c || c._modelUpdating) return;
312
- let g = c.value;
310
+ const l = x.target;
311
+ if (!l || l._modelUpdating) return;
312
+ let g = l.value;
313
313
  if (h === "checkbox") {
314
- const C = m();
315
- if (Array.isArray(C)) {
316
- const S = c.getAttribute("value") ?? "", A = Array.from(C);
317
- if (c.checked)
314
+ const E = y();
315
+ if (Array.isArray(E)) {
316
+ const S = l.getAttribute("value") ?? "", A = Array.from(E);
317
+ if (l.checked)
318
318
  A.includes(S) || A.push(S);
319
319
  else {
320
- const T = A.indexOf(S);
321
- T > -1 && A.splice(T, 1);
320
+ const j = A.indexOf(S);
321
+ j > -1 && A.splice(j, 1);
322
322
  }
323
323
  g = A;
324
324
  } else {
325
- const S = c.getAttribute("true-value") ?? !0, A = c.getAttribute("false-value") ?? !1;
326
- g = c.checked ? S : A;
325
+ const S = l.getAttribute("true-value") ?? !0, A = l.getAttribute("false-value") ?? !1;
326
+ g = l.checked ? S : A;
327
327
  }
328
328
  } else if (h === "radio")
329
- g = c.getAttribute("value") ?? c.value;
330
- else if (h === "select" && c.multiple)
331
- g = Array.from(c.selectedOptions).map((C) => C.value);
329
+ g = l.getAttribute("value") ?? l.value;
330
+ else if (h === "select" && l.multiple)
331
+ g = Array.from(l.selectedOptions).map((E) => E.value);
332
332
  else if (u && typeof g == "string" && (g = g.trim()), d) {
333
- const C = Number(g);
334
- isNaN(C) || (g = C);
333
+ const E = Number(g);
334
+ isNaN(E) || (g = E);
335
335
  }
336
- const p = i._state || i, _ = N(p, e);
336
+ const p = s._state || s, _ = z(p, e);
337
337
  if (Array.isArray(g) && Array.isArray(_) ? JSON.stringify([...g].sort()) !== JSON.stringify([..._].sort()) : g !== _) {
338
- c._modelUpdating = !0;
338
+ l._modelUpdating = !0;
339
339
  try {
340
- se(p, e, g), i._requestRender && i._requestRender();
340
+ oe(p, e, g), s._requestRender && s._requestRender();
341
341
  } finally {
342
- setTimeout(() => c._modelUpdating = !1, 0);
342
+ setTimeout(() => l._modelUpdating = !1, 0);
343
343
  }
344
344
  }
345
345
  };
346
- w ? n[b] = y : n[`update:${J(v)}`] = (x) => {
347
- const c = i._state || i, g = x.detail !== void 0 ? x.detail : x.target?.value, p = N(c, e);
348
- (Array.isArray(g) && Array.isArray(p) ? JSON.stringify([...g].sort()) !== JSON.stringify([...p].sort()) : g !== p) && (se(c, e, g), i._requestRender && i._requestRender());
346
+ k ? n[b] = m : n[`update:${J(w)}`] = (x) => {
347
+ const l = s._state || s, g = x.detail !== void 0 ? x.detail : x.target?.value, p = z(l, e);
348
+ (Array.isArray(g) && Array.isArray(p) ? JSON.stringify([...g].sort()) !== JSON.stringify([...p].sort()) : g !== p) && (oe(l, e, g), s._requestRender && s._requestRender());
349
349
  }, (h === "text" || h === "textarea") && (n.compositionstart = (() => n._isComposing = !0), n.compositionend = (x) => {
350
350
  n._isComposing = !1;
351
- const c = x.target;
352
- c && setTimeout(() => {
353
- const g = c.value, p = i._state || i, _ = N(p, e);
354
- let E = g;
355
- if (u && (E = E.trim()), d) {
356
- const S = Number(E);
357
- isNaN(S) || (E = S);
351
+ const l = x.target;
352
+ l && setTimeout(() => {
353
+ const g = l.value, p = s._state || s, _ = z(p, e);
354
+ let C = g;
355
+ if (u && (C = C.trim()), d) {
356
+ const S = Number(C);
357
+ isNaN(S) || (C = S);
358
358
  }
359
- if (Array.isArray(E) && Array.isArray(_) ? JSON.stringify([...E].sort()) !== JSON.stringify([..._].sort()) : E !== _) {
360
- c._modelUpdating = !0;
359
+ if (Array.isArray(C) && Array.isArray(_) ? JSON.stringify([...C].sort()) !== JSON.stringify([..._].sort()) : C !== _) {
360
+ l._modelUpdating = !0;
361
361
  try {
362
- se(p, e, E), i._requestRender && i._requestRender();
362
+ oe(p, e, C), s._requestRender && s._requestRender();
363
363
  } finally {
364
- setTimeout(() => c._modelUpdating = !1, 0);
364
+ setTimeout(() => l._modelUpdating = !1, 0);
365
365
  }
366
366
  }
367
367
  }, 0);
@@ -371,61 +371,61 @@ function Le(e) {
371
371
  const t = e.slice(2);
372
372
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
373
373
  }
374
- function Fe(e, t, r, o) {
375
- if (o) {
374
+ function Fe(e, t, r, i) {
375
+ if (i) {
376
376
  if (typeof e == "object" && e !== null)
377
- for (const [n, i] of Object.entries(e))
378
- t[n] = i;
377
+ for (const [n, s] of Object.entries(e))
378
+ t[n] = s;
379
379
  else if (typeof e == "string")
380
380
  try {
381
381
  const n = JSON.parse(e);
382
382
  if (typeof n == "object" && n !== null) {
383
- for (const [i, s] of Object.entries(n))
384
- t[i] = s;
383
+ for (const [s, o] of Object.entries(n))
384
+ t[s] = o;
385
385
  return;
386
386
  }
387
387
  } catch {
388
- const n = N(o, e);
388
+ const n = z(i, e);
389
389
  r[e] = n;
390
390
  }
391
391
  }
392
392
  }
393
393
  function Ke(e, t, r) {
394
394
  if (!r) return;
395
- const o = N(r, e), n = t.style || "", i = o ? "" : "none";
395
+ const i = z(r, e), n = t.style || "", s = i ? "" : "none";
396
396
  if (n) {
397
- const s = n.split(";").filter(Boolean), a = s.findIndex(
397
+ const o = n.split(";").filter(Boolean), a = o.findIndex(
398
398
  (f) => f.trim().startsWith("display:")
399
399
  );
400
- a >= 0 ? s[a] = `display: ${i}` : s.push(`display: ${i}`), t.style = s.join("; ");
400
+ a >= 0 ? o[a] = `display: ${s}` : o.push(`display: ${s}`), t.style = o.join("; ");
401
401
  } else
402
- t.style = `display: ${i}`;
402
+ t.style = `display: ${s}`;
403
403
  }
404
404
  function Ue(e, t, r) {
405
405
  if (!r) return;
406
- const o = N(r, e);
406
+ const i = z(r, e);
407
407
  let n = [];
408
- typeof o == "string" ? n = [o] : Array.isArray(o) ? n = o.filter(Boolean) : typeof o == "object" && (n = Object.entries(o).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
409
- const i = t.class || "", s = i ? `${i} ${n.join(" ")}`.trim() : n.join(" ");
410
- s && (t.class = s);
408
+ typeof i == "string" ? n = [i] : Array.isArray(i) ? n = i.filter(Boolean) : typeof i == "object" && (n = Object.entries(i).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
409
+ const s = t.class || "", o = s ? `${s} ${n.join(" ")}`.trim() : n.join(" ");
410
+ o && (t.class = o);
411
411
  }
412
412
  function Ve(e, t, r) {
413
- let o;
413
+ let i;
414
414
  if (typeof e == "string") {
415
415
  if (!r) return;
416
- o = N(r, e);
416
+ i = z(r, e);
417
417
  } else
418
- o = e;
418
+ i = e;
419
419
  let n = "";
420
- if (typeof o == "string")
421
- n = o;
422
- else if (o && typeof o == "object") {
423
- const s = [];
424
- for (const [a, f] of Object.entries(o))
420
+ if (typeof i == "string")
421
+ n = i;
422
+ else if (i && typeof i == "object") {
423
+ const o = [];
424
+ for (const [a, f] of Object.entries(i))
425
425
  if (f != null && f !== "") {
426
426
  const u = a.replace(
427
427
  /[A-Z]/g,
428
- (l) => `-${l.toLowerCase()}`
428
+ (c) => `-${c.toLowerCase()}`
429
429
  ), d = [
430
430
  "width",
431
431
  "height",
@@ -452,26 +452,26 @@ function Ve(e, t, r) {
452
452
  "min-height",
453
453
  "max-height"
454
454
  ];
455
- let m = String(f);
456
- typeof f == "number" && d.includes(u) && (m = `${f}px`), s.push(`${u}: ${m}`);
455
+ let y = String(f);
456
+ typeof f == "number" && d.includes(u) && (y = `${f}px`), o.push(`${u}: ${y}`);
457
457
  }
458
- n = s.join("; ") + (s.length > 0 ? ";" : "");
458
+ n = o.join("; ") + (o.length > 0 ? ";" : "");
459
459
  }
460
- const i = t.style || "";
461
- t.style = i + (i && !i.endsWith(";") ? "; " : "") + n;
460
+ const s = t.style || "";
461
+ t.style = s + (s && !s.endsWith(";") ? "; " : "") + n;
462
462
  }
463
- function Re(e, t, r, o) {
464
- const n = {}, i = { ...o || {} }, s = {};
463
+ function Re(e, t, r, i) {
464
+ const n = {}, s = { ...i || {} }, o = {};
465
465
  for (const [a, f] of Object.entries(e)) {
466
- const { value: u, modifiers: d, arg: m } = f;
466
+ const { value: u, modifiers: d, arg: y } = f;
467
467
  if (a === "model" || a.startsWith("model:")) {
468
- const l = a.split(":"), h = l.length > 1 ? l[1] : m;
468
+ const c = a.split(":"), h = c.length > 1 ? c[1] : y;
469
469
  He(
470
470
  typeof u == "string" ? u : String(u),
471
471
  d,
472
472
  n,
473
- i,
474
473
  s,
474
+ o,
475
475
  t,
476
476
  r,
477
477
  h
@@ -480,330 +480,330 @@ function Re(e, t, r, o) {
480
480
  }
481
481
  switch (a) {
482
482
  case "bind":
483
- Fe(u, n, i, t);
483
+ Fe(u, n, s, t);
484
484
  break;
485
485
  case "show":
486
- Ke(u, i, t);
486
+ Ke(u, s, t);
487
487
  break;
488
488
  case "class":
489
- Ue(u, i, t);
489
+ Ue(u, s, t);
490
490
  break;
491
491
  case "style":
492
- Ve(u, i, t);
492
+ Ve(u, s, t);
493
493
  break;
494
494
  }
495
495
  }
496
- return { props: n, attrs: i, listeners: s };
496
+ return { props: n, attrs: s, listeners: o };
497
497
  }
498
- function ke(e, t) {
498
+ function ve(e, t) {
499
499
  if (Array.isArray(e)) {
500
- const i = /* @__PURE__ */ new Set();
501
- return e.map((s) => {
502
- if (!s || typeof s != "object") return s;
503
- let a = s.props?.key ?? s.key;
500
+ const s = /* @__PURE__ */ new Set();
501
+ return e.map((o) => {
502
+ if (!o || typeof o != "object") return o;
503
+ let a = o.props?.key ?? o.key;
504
504
  if (!a) {
505
- const m = s.tag || "node", l = s.props?.attrs?.id ?? s.props?.attrs?.name ?? s.props?.attrs?.["data-key"] ?? "";
506
- a = l ? `${t}:${m}:${l}` : `${t}:${m}`;
505
+ const y = o.tag || "node", c = o.props?.attrs?.id ?? o.props?.attrs?.name ?? o.props?.attrs?.["data-key"] ?? "";
506
+ a = c ? `${t}:${y}:${c}` : `${t}:${y}`;
507
507
  }
508
508
  let f = a, u = 1;
509
- for (; i.has(f); )
509
+ for (; s.has(f); )
510
510
  f = `${a}#${u++}`;
511
- i.add(f);
512
- let d = s.children;
513
- return Array.isArray(d) && (d = ke(d, f)), { ...s, key: f, children: d };
511
+ s.add(f);
512
+ let d = o.children;
513
+ return Array.isArray(d) && (d = ve(d, f)), { ...o, key: f, children: d };
514
514
  });
515
515
  }
516
516
  const r = e;
517
- let o = r.props?.key ?? r.key ?? t, n = r.children;
518
- return Array.isArray(n) && (n = ke(n, o)), { ...r, key: o, children: n };
517
+ let i = r.props?.key ?? r.key ?? t, n = r.children;
518
+ return Array.isArray(n) && (n = ve(n, i)), { ...r, key: i, children: n };
519
519
  }
520
- function Je(e, t, r, o) {
521
- const n = r.directives ?? {}, i = Re(
520
+ function Je(e, t, r, i) {
521
+ const n = r.directives ?? {}, s = Re(
522
522
  n,
523
- o,
523
+ i,
524
524
  e,
525
525
  r.attrs
526
- ), s = {
526
+ ), o = {
527
527
  ...t.props,
528
528
  ...r.props,
529
- ...i.props
529
+ ...s.props
530
530
  }, a = {
531
531
  ...t.attrs,
532
532
  ...r.attrs,
533
- ...i.attrs
534
- }, f = t.props ?? {}, u = s;
535
- for (const l in { ...f, ...u }) {
536
- const h = f[l], w = u[l];
537
- if (h !== w) {
538
- if (l === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
539
- e.value !== w && (e.value = w ?? "");
540
- else if (l === "checked" && e instanceof HTMLInputElement)
541
- e.checked = !!w;
542
- else if (l.startsWith("on") && typeof w == "function") {
543
- const $ = Le(l);
544
- typeof h == "function" && e.removeEventListener($, h), e.addEventListener($, w);
545
- } else if (w == null || w === !1)
546
- e.removeAttribute(l);
547
- else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || l in e)
533
+ ...s.attrs
534
+ }, f = t.props ?? {}, u = o;
535
+ for (const c in { ...f, ...u }) {
536
+ const h = f[c], k = u[c];
537
+ if (h !== k) {
538
+ if (c === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
539
+ e.value !== k && (e.value = k ?? "");
540
+ else if (c === "checked" && e instanceof HTMLInputElement)
541
+ e.checked = !!k;
542
+ else if (c.startsWith("on") && typeof k == "function") {
543
+ const $ = Le(c);
544
+ typeof h == "function" && e.removeEventListener($, h), e.addEventListener($, k);
545
+ } else if (k == null || k === !1)
546
+ e.removeAttribute(c);
547
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || c in e)
548
548
  try {
549
- e[l] = w;
549
+ e[c] = k;
550
550
  } catch {
551
551
  }
552
552
  }
553
553
  }
554
- for (const [l, h] of Object.entries(
555
- i.listeners || {}
554
+ for (const [c, h] of Object.entries(
555
+ s.listeners || {}
556
556
  ))
557
- e.addEventListener(l, h);
558
- const d = t.attrs ?? {}, m = a;
559
- for (const l in { ...d, ...m }) {
560
- const h = d[l], w = m[l];
561
- h !== w && (w == null || w === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(w)));
557
+ e.addEventListener(c, h);
558
+ const d = t.attrs ?? {}, y = a;
559
+ for (const c in { ...d, ...y }) {
560
+ const h = d[c], k = y[c];
561
+ h !== k && (k == null || k === !1 ? e.removeAttribute(c) : e.setAttribute(c, String(k)));
562
562
  }
563
563
  }
564
564
  function M(e, t, r) {
565
565
  if (typeof e == "string")
566
566
  return document.createTextNode(e);
567
567
  if (e.tag === "#text") {
568
- const m = document.createTextNode(
568
+ const y = document.createTextNode(
569
569
  typeof e.children == "string" ? e.children : ""
570
570
  );
571
- return e.key != null && (m.key = e.key), m;
571
+ return e.key != null && (y.key = e.key), y;
572
572
  }
573
573
  if (e.tag === "#anchor") {
574
- const m = e, l = Array.isArray(m.children) ? m.children : [], h = document.createTextNode(""), w = document.createTextNode("");
575
- m.key != null && (h.key = `${m.key}:start`, w.key = `${m.key}:end`), m._startNode = h, m._endNode = w;
574
+ const y = e, c = Array.isArray(y.children) ? y.children : [], h = document.createTextNode(""), k = document.createTextNode("");
575
+ y.key != null && (h.key = `${y.key}:start`, k.key = `${y.key}:end`), y._startNode = h, y._endNode = k;
576
576
  const $ = document.createDocumentFragment();
577
577
  $.appendChild(h);
578
- for (const v of l) {
579
- const b = M(v, t);
578
+ for (const w of c) {
579
+ const b = M(w, t);
580
580
  $.appendChild(b);
581
581
  }
582
- return $.appendChild(w), $;
582
+ return $.appendChild(k), $;
583
583
  }
584
- const o = document.createElement(e.tag);
585
- e.key != null && (o.key = e.key);
586
- const { props: n = {}, attrs: i = {}, directives: s = {} } = e.props ?? {}, a = Re(s, t, o, i), f = {
584
+ const i = document.createElement(e.tag);
585
+ e.key != null && (i.key = e.key);
586
+ const { props: n = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = Re(o, t, i, s), f = {
587
587
  ...n,
588
588
  ...a.props
589
589
  }, u = {
590
- ...i,
590
+ ...s,
591
591
  ...a.attrs
592
592
  };
593
- for (const m in u) {
594
- const l = u[m];
595
- typeof m != "string" || /\[object Object\]/.test(m) || (typeof l == "boolean" ? l && o.setAttribute(m, "") : l != null && o.setAttribute(m, l));
596
- }
597
- for (const m in f) {
598
- const l = f[m];
599
- if (!(typeof m != "string" || /\[object Object\]/.test(m)))
600
- if (m === "value" && (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement))
601
- o.value = l ?? "";
602
- else if (m === "checked" && o instanceof HTMLInputElement)
603
- o.checked = !!l;
604
- else if (m.startsWith("on") && typeof l == "function")
605
- o.addEventListener(Le(m), l);
593
+ for (const y in u) {
594
+ const c = u[y];
595
+ typeof y != "string" || /\[object Object\]/.test(y) || (typeof c == "boolean" ? c && i.setAttribute(y, "") : c != null && i.setAttribute(y, c));
596
+ }
597
+ for (const y in f) {
598
+ const c = f[y];
599
+ if (!(typeof y != "string" || /\[object Object\]/.test(y)))
600
+ if (y === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement))
601
+ i.value = c ?? "";
602
+ else if (y === "checked" && i instanceof HTMLInputElement)
603
+ i.checked = !!c;
604
+ else if (y.startsWith("on") && typeof c == "function")
605
+ i.addEventListener(Le(y), c);
606
606
  else {
607
- if (m.startsWith("on") && l === void 0)
607
+ if (y.startsWith("on") && c === void 0)
608
608
  continue;
609
- if (l == null || l === !1)
610
- o.removeAttribute(m);
611
- else if ((e.props?.isCustomElement ?? !1) || m in o)
609
+ if (c == null || c === !1)
610
+ i.removeAttribute(y);
611
+ else if ((e.props?.isCustomElement ?? !1) || y in i)
612
612
  try {
613
- o[m] = l;
613
+ i[y] = c;
614
614
  } catch {
615
615
  }
616
616
  }
617
617
  }
618
- for (const [m, l] of Object.entries(
618
+ for (const [y, c] of Object.entries(
619
619
  a.listeners || {}
620
620
  ))
621
- o.addEventListener(m, l);
621
+ i.addEventListener(y, c);
622
622
  const d = e.props?.ref ?? (e.props?.props && e.props.props.ref);
623
- typeof e != "string" && d && r && (r[d] = o);
623
+ typeof e != "string" && d && r && (r[d] = i);
624
624
  try {
625
- if (typeof o._applyProps == "function")
625
+ if (typeof i._applyProps == "function")
626
626
  try {
627
- o._applyProps(o._cfg);
627
+ i._applyProps(i._cfg);
628
628
  } catch {
629
629
  }
630
- typeof o.requestRender == "function" ? o.requestRender() : typeof o._render == "function" && o._render(o._cfg);
630
+ typeof i.requestRender == "function" ? i.requestRender() : typeof i._render == "function" && i._render(i._cfg);
631
631
  } catch {
632
632
  }
633
633
  if (Array.isArray(e.children))
634
- for (const m of e.children)
635
- o.appendChild(M(m, t, r));
636
- else typeof e.children == "string" && (o.textContent = e.children);
637
- return o;
634
+ for (const y of e.children)
635
+ i.appendChild(M(y, t, r));
636
+ else typeof e.children == "string" && (i.textContent = e.children);
637
+ return i;
638
638
  }
639
- function Ze(e, t, r, o, n) {
639
+ function Ze(e, t, r, i, n) {
640
640
  if (typeof r == "string") {
641
641
  e.textContent !== r && (e.textContent = r);
642
642
  return;
643
643
  }
644
644
  if (!Array.isArray(r)) return;
645
- const i = Array.from(e.childNodes), s = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
646
- for (const h of s)
645
+ const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
646
+ for (const h of o)
647
647
  h && h.key != null && a.set(h.key, h);
648
648
  const f = /* @__PURE__ */ new Map();
649
- for (const h of i) {
650
- const w = h.key;
651
- w != null && f.set(w, h);
649
+ for (const h of s) {
650
+ const k = h.key;
651
+ k != null && f.set(k, h);
652
652
  }
653
653
  const u = /* @__PURE__ */ new Set();
654
654
  let d = e.firstChild;
655
- function m(h, w) {
655
+ function y(h, k) {
656
656
  let $ = h;
657
- for (; $ && (u.add($), $ !== w); )
657
+ for (; $ && (u.add($), $ !== k); )
658
658
  $ = $.nextSibling;
659
659
  }
660
- function l(h, w, $, v) {
660
+ function c(h, k, $, w) {
661
661
  const b = [];
662
- let y = h.nextSibling;
663
- for (; y && y !== w; )
664
- b.push(y), y = y.nextSibling;
662
+ let m = h.nextSibling;
663
+ for (; m && m !== k; )
664
+ b.push(m), m = m.nextSibling;
665
665
  const x = Array.isArray($) ? $ : [];
666
- if (v.some((g) => g && g.key != null) || x.some((g) => g && g.key != null)) {
666
+ if (w.some((g) => g && g.key != null) || x.some((g) => g && g.key != null)) {
667
667
  const g = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
668
- for (const C of x)
669
- C && C.key != null && g.set(C.key, C);
670
- for (const C of b) {
671
- const S = C.key;
672
- S != null && p.set(S, C);
668
+ for (const E of x)
669
+ E && E.key != null && g.set(E.key, E);
670
+ for (const E of b) {
671
+ const S = E.key;
672
+ S != null && p.set(S, E);
673
673
  }
674
674
  const _ = /* @__PURE__ */ new Set();
675
- let E = h.nextSibling;
676
- for (const C of v) {
675
+ let C = h.nextSibling;
676
+ for (const E of w) {
677
677
  let S;
678
- if (C.key != null && p.has(C.key)) {
679
- const A = g.get(C.key);
678
+ if (E.key != null && p.has(E.key)) {
679
+ const A = g.get(E.key);
680
680
  S = ae(
681
- p.get(C.key),
681
+ p.get(E.key),
682
682
  A,
683
- C,
684
- o
685
- ), _.add(S), S !== E && e.contains(S) && e.insertBefore(S, E);
683
+ E,
684
+ i
685
+ ), _.add(S), S !== C && e.contains(S) && e.insertBefore(S, C);
686
686
  } else
687
- S = M(C, o), e.insertBefore(S, E), _.add(S);
688
- E = S.nextSibling;
687
+ S = M(E, i), e.insertBefore(S, C), _.add(S);
688
+ C = S.nextSibling;
689
689
  }
690
- for (const C of b)
691
- !_.has(C) && e.contains(C) && e.removeChild(C);
690
+ for (const E of b)
691
+ !_.has(E) && e.contains(E) && e.removeChild(E);
692
692
  } else {
693
693
  const g = Math.min(
694
694
  x.length,
695
- v.length
695
+ w.length
696
696
  );
697
697
  for (let p = 0; p < g; p++) {
698
- const _ = x[p], E = v[p], C = ae(b[p], _, E, o);
699
- C !== b[p] && (e.insertBefore(C, b[p]), e.removeChild(b[p]));
698
+ const _ = x[p], C = w[p], E = ae(b[p], _, C, i);
699
+ E !== b[p] && (e.insertBefore(E, b[p]), e.removeChild(b[p]));
700
700
  }
701
- for (let p = g; p < v.length; p++)
702
- e.insertBefore(M(v[p], o), w);
701
+ for (let p = g; p < w.length; p++)
702
+ e.insertBefore(M(w[p], i), k);
703
703
  for (let p = g; p < b.length; p++)
704
704
  e.removeChild(b[p]);
705
705
  }
706
706
  }
707
707
  for (const h of r) {
708
- let w;
708
+ let k;
709
709
  if (h.tag === "#anchor") {
710
- const $ = h.key, v = `${$}:start`, b = `${$}:end`;
711
- let y = f.get(v), x = f.get(b);
712
- const c = Array.isArray(h.children) ? h.children : [];
713
- if (y || (y = document.createTextNode(""), y.key = v), x || (x = document.createTextNode(""), x.key = b), h._startNode = y, h._endNode = x, !e.contains(y) || !e.contains(x)) {
714
- e.insertBefore(y, d);
715
- for (const g of c)
716
- e.insertBefore(M(g, o), d);
710
+ const $ = h.key, w = `${$}:start`, b = `${$}:end`;
711
+ let m = f.get(w), x = f.get(b);
712
+ const l = Array.isArray(h.children) ? h.children : [];
713
+ if (m || (m = document.createTextNode(""), m.key = w), x || (x = document.createTextNode(""), x.key = b), h._startNode = m, h._endNode = x, !e.contains(m) || !e.contains(x)) {
714
+ e.insertBefore(m, d);
715
+ for (const g of l)
716
+ e.insertBefore(M(g, i), d);
717
717
  e.insertBefore(x, d);
718
718
  } else
719
- l(
720
- y,
719
+ c(
720
+ m,
721
721
  x,
722
722
  a.get($)?.children,
723
- c
723
+ l
724
724
  );
725
- m(y, x), d = x.nextSibling;
725
+ y(m, x), d = x.nextSibling;
726
726
  continue;
727
727
  }
728
728
  if (h.key != null && f.has(h.key)) {
729
729
  const $ = a.get(h.key);
730
- w = ae(
730
+ k = ae(
731
731
  f.get(h.key),
732
732
  $,
733
733
  h,
734
- o,
734
+ i,
735
735
  n
736
- ), u.add(w), w !== d && e.contains(w) && (d && !e.contains(d) && (d = null), e.insertBefore(w, d));
736
+ ), u.add(k), k !== d && e.contains(k) && (d && !e.contains(d) && (d = null), e.insertBefore(k, d));
737
737
  } else
738
- w = M(h, o, n), d && !e.contains(d) && (d = null), e.insertBefore(w, d), u.add(w);
739
- d = w.nextSibling;
738
+ k = M(h, i, n), d && !e.contains(d) && (d = null), e.insertBefore(k, d), u.add(k);
739
+ d = k.nextSibling;
740
740
  }
741
- for (const h of i)
741
+ for (const h of s)
742
742
  !u.has(h) && e.contains(h) && (V(h, n), e.removeChild(h));
743
743
  }
744
- function ae(e, t, r, o, n) {
744
+ function ae(e, t, r, i, n) {
745
745
  if (t && typeof t != "string" && t.props?.ref && n && V(e, n), t === r) return e;
746
746
  if (typeof r == "string") {
747
747
  if (e.nodeType === Node.TEXT_NODE)
748
748
  return e.textContent !== r && (e.textContent = r), e;
749
749
  {
750
- const s = document.createTextNode(r);
751
- return e.parentNode?.replaceChild(s, e), s;
750
+ const o = document.createTextNode(r);
751
+ return e.parentNode?.replaceChild(o, e), o;
752
752
  }
753
753
  }
754
754
  if (r && typeof r != "string" && r.tag === "#anchor") {
755
- const s = r, a = Array.isArray(s.children) ? s.children : [], f = s._startNode ?? document.createTextNode(""), u = s._endNode ?? document.createTextNode("");
756
- s.key != null && (f.key = `${s.key}:start`, u.key = `${s.key}:end`), s._startNode = f, s._endNode = u;
755
+ const o = r, a = Array.isArray(o.children) ? o.children : [], f = o._startNode ?? document.createTextNode(""), u = o._endNode ?? document.createTextNode("");
756
+ o.key != null && (f.key = `${o.key}:start`, u.key = `${o.key}:end`), o._startNode = f, o._endNode = u;
757
757
  const d = document.createDocumentFragment();
758
758
  d.appendChild(f);
759
- for (const m of a) {
760
- const l = M(m, o);
761
- d.appendChild(l);
759
+ for (const y of a) {
760
+ const c = M(y, i);
761
+ d.appendChild(c);
762
762
  }
763
763
  return d.appendChild(u), e.parentNode?.replaceChild(d, e), f;
764
764
  }
765
765
  if (!r) {
766
766
  V(e, n);
767
- const s = document.createComment("removed");
768
- return e.parentNode?.replaceChild(s, e), s;
767
+ const o = document.createComment("removed");
768
+ return e.parentNode?.replaceChild(o, e), o;
769
769
  }
770
770
  if (!t || typeof t == "string") {
771
771
  V(e, n);
772
- const s = M(r, o, n);
773
- return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = s), e.parentNode?.replaceChild(s, e), s;
772
+ const o = M(r, i, n);
773
+ return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = o), e.parentNode?.replaceChild(o, e), o;
774
774
  }
775
775
  if (r.tag === "#anchor") {
776
- const s = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), f = r._endNode ?? document.createTextNode("");
776
+ const o = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), f = r._endNode ?? document.createTextNode("");
777
777
  r.key != null && (a.key = `${r.key}:start`, f.key = `${r.key}:end`), r._startNode = a, r._endNode = f;
778
778
  const u = document.createDocumentFragment();
779
779
  u.appendChild(a);
780
- for (const d of s)
781
- u.appendChild(M(d, o));
780
+ for (const d of o)
781
+ u.appendChild(M(d, i));
782
782
  return u.appendChild(f), e.parentNode?.replaceChild(u, e), a;
783
783
  }
784
784
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
785
- const s = e;
786
- return Je(s, t.props || {}, r.props || {}, o), Ze(s, t.children, r.children, o, n), typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = s), s;
785
+ const o = e;
786
+ return Je(o, t.props || {}, r.props || {}, i), Ze(o, t.children, r.children, i, n), typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = o), o;
787
787
  }
788
788
  V(e, n);
789
- const i = M(r, o, n);
790
- return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = i), e.parentNode?.replaceChild(i, e), i;
789
+ const s = M(r, i, n);
790
+ return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = s), e.parentNode?.replaceChild(s, e), s;
791
791
  }
792
- function Ye(e, t, r, o) {
792
+ function Ye(e, t, r, i) {
793
793
  let n;
794
794
  Array.isArray(t) ? t.length === 1 ? (n = t[0], n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })) : n = { tag: "div", key: "__root__", children: t } : (n = t, n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })), n && typeof n == "object" && n.tag === "#anchor" && (n = {
795
795
  tag: "div",
796
796
  key: "__anchor_root__",
797
797
  props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
798
798
  children: [n]
799
- }), n = ke(n, String(n.key ?? "root"));
800
- const i = e._prevVNode ?? null, s = e._prevDom ?? e.firstChild ?? null;
799
+ }), n = ve(n, String(n.key ?? "root"));
800
+ const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
801
801
  let a;
802
- i && s ? typeof i != "string" && typeof n != "string" && i.tag === n.tag && i.key === n.key ? a = ae(s, i, n, r, o) : (a = M(n, r, o), e.replaceChild(a, s)) : (a = M(n, r, o), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
802
+ s && o ? typeof s != "string" && typeof n != "string" && s.tag === n.tag && s.key === n.key ? a = ae(o, s, n, r, i) : (a = M(n, r, i), e.replaceChild(a, o)) : (a = M(n, r, i), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
803
803
  const f = [];
804
804
  for (let u = 0; u < e.childNodes.length; u++) {
805
805
  const d = e.childNodes[u];
806
- d !== a && d.nodeName !== "STYLE" && (V(d, o), f.push(d));
806
+ d !== a && d.nodeName !== "STYLE" && (V(d, i), f.push(d));
807
807
  }
808
808
  f.forEach((u) => e.removeChild(u)), e._prevVNode = n, e._prevDom = a;
809
809
  }
@@ -814,29 +814,29 @@ function he(e) {
814
814
  if (e.tag === "#anchor")
815
815
  return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(he).join("");
816
816
  let t = "";
817
- e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([n, i]) => ` ${n}="${H(String(i))}"`).join(""));
817
+ e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([n, s]) => ` ${n}="${H(String(s))}"`).join(""));
818
818
  let r = "";
819
- e.props && (r = Object.entries(e.props).filter(([n]) => n !== "attrs" && n !== "directives" && n !== "ref" && n !== "key").map(([n, i]) => ` ${n}="${H(String(i))}"`).join(""));
820
- const o = Array.isArray(e.children) ? e.children.filter(Boolean).map(he).join("") : typeof e.children == "string" ? H(e.children) : e.children ? he(e.children) : "";
821
- return `<${e.tag}${t}${r}>${o}</${e.tag}>`;
819
+ e.props && (r = Object.entries(e.props).filter(([n]) => n !== "attrs" && n !== "directives" && n !== "ref" && n !== "key").map(([n, s]) => ` ${n}="${H(String(s))}"`).join(""));
820
+ const i = Array.isArray(e.children) ? e.children.filter(Boolean).map(he).join("") : typeof e.children == "string" ? H(e.children) : e.children ? he(e.children) : "";
821
+ return `<${e.tag}${t}${r}>${i}</${e.tag}>`;
822
822
  }
823
- function ze(e, ...t) {
823
+ function Oe(e, ...t) {
824
824
  let r = "";
825
- for (let o = 0; o < e.length; o++)
826
- r += e[o], o < t.length && (r += t[o]);
825
+ for (let i = 0; i < e.length; i++)
826
+ r += e[i], i < t.length && (r += t[i]);
827
827
  return r;
828
828
  }
829
829
  function Be(e) {
830
830
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
831
831
  }
832
- let oe = null;
832
+ let ie = null;
833
833
  function _e() {
834
- return oe || (oe = new CSSStyleSheet(), oe.replaceSync(Be(Qe))), oe;
834
+ return ie || (ie = new CSSStyleSheet(), ie.replaceSync(Be(Qe))), ie;
835
835
  }
836
836
  function Ge(e) {
837
837
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
838
838
  }
839
- const Qe = ze`
839
+ const Qe = Oe`
840
840
  :host, *, ::before, ::after {
841
841
  all: isolate;
842
842
  box-sizing: border-box;
@@ -879,8 +879,8 @@ const Qe = ze`
879
879
  ::-webkit-input-placeholder, ::placeholder {
880
880
  color: inherit; opacity: .5;
881
881
  }
882
- *:focus {
883
- outline: 2px solid var(--color-blue-500, #3b82f6);
882
+ *:focus-visible {
883
+ outline: 2px solid var(--color-primary-500, #3b82f6);
884
884
  outline-offset: 2px;
885
885
  }
886
886
  ol, ul { list-style: none }
@@ -895,143 +895,112 @@ const Qe = ze`
895
895
  [disabled], [aria-disabled=true] { cursor: not-allowed }
896
896
  [hidden] { display: none }
897
897
  `, Xe = {
898
- gray: {
899
- 50: "var(--color-gray-50, #f9fafb)",
900
- 100: "var(--color-gray-100, #f3f4f6)",
901
- 200: "var(--color-gray-200, #e5e7eb)",
902
- 300: "var(--color-gray-300, #d1d5db)",
903
- 400: "var(--color-gray-400, #9ca3af)",
904
- 500: "var(--color-gray-500, #6b7280)",
905
- 600: "var(--color-gray-600, #4b5563)",
906
- 700: "var(--color-gray-700, #374151)",
907
- 800: "var(--color-gray-800, #1f2937)",
908
- 900: "var(--color-gray-900, #111827)"
909
- },
910
898
  neutral: {
911
- 50: "var(--color-neutral-50, #fafafa)",
912
- 100: "var(--color-neutral-100, #f5f5f5)",
913
- 200: "var(--color-neutral-200, #e5e5e5)",
914
- 300: "var(--color-neutral-300, #d4d4d4)",
915
- 400: "var(--color-neutral-400, #a3a3a3)",
916
- 500: "var(--color-neutral-500, #737373)",
917
- 600: "var(--color-neutral-600, #525252)",
918
- 700: "var(--color-neutral-700, #404040)",
919
- 800: "var(--color-neutral-800, #262626)",
920
- 900: "var(--color-neutral-900, #171717)"
921
- },
922
- slate: {
923
- 50: "var(--color-slate-50, #f8fafc)",
924
- 100: "var(--color-slate-100, #f1f5f9)",
925
- 200: "var(--color-slate-200, #e2e8f0)",
926
- 300: "var(--color-slate-300, #cbd5e1)",
927
- 400: "var(--color-slate-400, #94a3b8)",
928
- 500: "var(--color-slate-500, #64748b)",
929
- 600: "var(--color-slate-600, #475569)",
930
- 700: "var(--color-slate-700, #334155)",
931
- 800: "var(--color-slate-800, #1e293b)",
932
- 900: "var(--color-slate-900, #0f172a)"
899
+ 50: "#fafafa",
900
+ 100: "#f4f4f5",
901
+ 200: "#e4e4e7",
902
+ 300: "#d4d4d8",
903
+ 400: "#9f9fa9",
904
+ 500: "#71717b",
905
+ 600: "#52525c",
906
+ 700: "#3f3f46",
907
+ 800: "#27272a",
908
+ 900: "#18181b",
909
+ 950: "#09090b"
933
910
  },
934
- zinc: {
935
- 50: "var(--color-zinc-50, #fafafa)",
936
- 100: "var(--color-zinc-100, #f4f4f5)",
937
- 200: "var(--color-zinc-200, #e4e4e7)",
938
- 300: "var(--color-zinc-300, #d4d4d8)",
939
- 400: "var(--color-zinc-400, #a1a1aa)",
940
- 500: "var(--color-zinc-500, #71717a)",
941
- 600: "var(--color-zinc-600, #52525b)",
942
- 700: "var(--color-zinc-700, #3f3f46)",
943
- 800: "var(--color-zinc-800, #27272a)",
944
- 900: "var(--color-zinc-900, #18181b)"
911
+ primary: {
912
+ 50: "#eff6ff",
913
+ 100: "#dbeafe",
914
+ 200: "#bfdbfe",
915
+ 300: "#93c5fd",
916
+ 400: "#60a5fa",
917
+ 500: "#3b82f6",
918
+ 600: "#2563eb",
919
+ 700: "#1d4ed8",
920
+ 800: "#1e40af",
921
+ 900: "#1e3a8a",
922
+ 950: "#172554"
945
923
  },
946
- red: {
947
- 50: "var(--color-red-50, #fef2f2)",
948
- 100: "var(--color-red-100, #fee2e2)",
949
- 200: "var(--color-red-200, #fecaca)",
950
- 300: "var(--color-red-300, #fca5a5)",
951
- 400: "var(--color-red-400, #f87171)",
952
- 500: "var(--color-red-500, #ef4444)",
953
- 600: "var(--color-red-600, #dc2626)",
954
- 700: "var(--color-red-700, #b91c1c)",
955
- 800: "var(--color-red-800, #991b1b)",
956
- 900: "var(--color-red-900, #7f1d1d)"
924
+ secondary: {
925
+ 50: "#eef2ff",
926
+ 100: "#e0e7ff",
927
+ 200: "#c7d2fe",
928
+ 300: "#a5b4fc",
929
+ 400: "#818cf8",
930
+ 500: "#6366f1",
931
+ 600: "#4f46e5",
932
+ 700: "#4338ca",
933
+ 800: "#3730a3",
934
+ 900: "#312e81",
935
+ 950: "#1e1b4b"
957
936
  },
958
- blue: {
959
- 50: "var(--color-blue-50, #eff6ff)",
960
- 100: "var(--color-blue-100, #dbeafe)",
961
- 200: "var(--color-blue-200, #bfdbfe)",
962
- 300: "var(--color-blue-300, #93c5fd)",
963
- 400: "var(--color-blue-400, #60a5fa)",
964
- 500: "var(--color-blue-500, #3b82f6)",
965
- 600: "var(--color-blue-600, #2563eb)",
966
- 700: "var(--color-blue-700, #1d4ed8)",
967
- 800: "var(--color-blue-800, #1e40af)",
968
- 900: "var(--color-blue-900, #1e3a8a)"
937
+ success: {
938
+ 50: "#f0fdf4",
939
+ 100: "#dcfce7",
940
+ 200: "#bbf7d0",
941
+ 300: "#86efac",
942
+ 400: "#4ade80",
943
+ 500: "#22c55e",
944
+ 600: "#16a34a",
945
+ 700: "#15803d",
946
+ 800: "#166534",
947
+ 900: "#14532d",
948
+ 950: "#052e16"
969
949
  },
970
- green: {
971
- 50: "var(--color-green-50, #f0fdf4)",
972
- 100: "var(--color-green-100, #dcfce7)",
973
- 200: "var(--color-green-200, #bbf7d0)",
974
- 300: "var(--color-green-300, #86efac)",
975
- 400: "var(--color-green-400, #4ade80)",
976
- 500: "var(--color-green-500, #22c55e)",
977
- 600: "var(--color-green-600, #16a34a)",
978
- 700: "var(--color-green-700, #15803d)",
979
- 800: "var(--color-green-800, #166534)",
980
- 900: "var(--color-green-900, #14532d)"
950
+ info: {
951
+ 50: "#f0f9ff",
952
+ 100: "#e0f2fe",
953
+ 200: "#bae6fd",
954
+ 300: "#7dd3fc",
955
+ 400: "#38bdf8",
956
+ 500: "#0ea5e9",
957
+ 600: "#0284c7",
958
+ 700: "#0369a1",
959
+ 800: "#075985",
960
+ 900: "#0c4a6e",
961
+ 950: "#082f49"
981
962
  },
982
- amber: {
983
- 50: "var(--color-amber-50, #fffbeb)",
984
- 100: "var(--color-amber-100, #fef3c7)",
985
- 200: "var(--color-amber-200, #fde68a)",
986
- 300: "var(--color-amber-300, #fcd34d)",
987
- 400: "var(--color-amber-400, #fbbf24)",
988
- 500: "var(--color-amber-500, #f59e0b)",
989
- 600: "var(--color-amber-600, #d97706)",
990
- 700: "var(--color-amber-700, #b45309)",
991
- 800: "var(--color-amber-800, #92400e)",
992
- 900: "var(--color-amber-900, #78350f)"
963
+ warning: {
964
+ 50: "#fffbeb",
965
+ 100: "#fef3c7",
966
+ 200: "#fde68a",
967
+ 300: "#fcd34d",
968
+ 400: "#fbbf24",
969
+ 500: "#f59e0b",
970
+ 600: "#d97706",
971
+ 700: "#b45309",
972
+ 800: "#92400e",
973
+ 900: "#78350f",
974
+ 950: "#451a03"
993
975
  },
994
- indigo: {
995
- 50: "var(--color-indigo-50, #eef2ff)",
996
- 100: "var(--color-indigo-100, #e0e7ff)",
997
- 200: "var(--color-indigo-200, #c7d2fe)",
998
- 300: "var(--color-indigo-300, #a5b4fc)",
999
- 400: "var(--color-indigo-400, #818cf8)",
1000
- 500: "var(--color-indigo-500, #6366f1)",
1001
- 600: "var(--color-indigo-600, #4f46e5)",
1002
- 700: "var(--color-indigo-700, #4338ca)",
1003
- 800: "var(--color-indigo-800, #3730a3)",
1004
- 900: "var(--color-indigo-900, #312e81)"
976
+ error: {
977
+ 50: "#fef2f2",
978
+ 100: "#fee2e2",
979
+ 200: "#fecaca",
980
+ 300: "#fca5a5",
981
+ 400: "#f87171",
982
+ 500: "#ef4444",
983
+ 600: "#dc2626",
984
+ 700: "#b91c1c",
985
+ 800: "#991b1b",
986
+ 900: "#7f1d1d",
987
+ 950: "#450a0a"
1005
988
  },
1006
- emerald: {
1007
- 50: "var(--color-emerald-50, #ecfdf5)",
1008
- 100: "var(--color-emerald-100, #d1fae5)",
1009
- 200: "var(--color-emerald-200, #a7f3d0)",
1010
- 300: "var(--color-emerald-300, #6ee7b7)",
1011
- 400: "var(--color-emerald-400, #34d399)",
1012
- 500: "var(--color-emerald-500, #10b981)",
1013
- 600: "var(--color-emerald-600, #059669)",
1014
- 700: "var(--color-emerald-700, #047857)",
1015
- 800: "var(--color-emerald-800, #065f46)",
1016
- 900: "var(--color-emerald-900, #064e3b)"
1017
- },
1018
- rose: {
1019
- 50: "var(--color-rose-50, #fff1f2)",
1020
- 100: "var(--color-rose-100, #ffe4e6)",
1021
- 200: "var(--color-rose-200, #fecdd3)",
1022
- 300: "var(--color-rose-300, #fda4af)",
1023
- 400: "var(--color-rose-400, #fb7185)",
1024
- 500: "var(--color-rose-500, #f43f5e)",
1025
- 600: "var(--color-rose-600, #e11d48)",
1026
- 700: "var(--color-rose-700, #be123c)",
1027
- 800: "var(--color-rose-800, #9f1239)",
1028
- 900: "var(--color-rose-900, #881337)"
1029
- },
1030
- white: { DEFAULT: "var(--color-white, #ffffff)" },
1031
- black: { DEFAULT: "var(--color-black, #000000)" },
1032
- transparent: { DEFAULT: "var(--color-transparent, transparent)" },
1033
- current: { DEFAULT: "var(--color-current, currentColor)" }
1034
- }, ge = {
989
+ white: { DEFAULT: "#ffffff" },
990
+ black: { DEFAULT: "#000000" },
991
+ transparent: { DEFAULT: "transparent" },
992
+ current: { DEFAULT: "currentColor" }
993
+ }, et = Object.fromEntries(
994
+ Object.entries(Xe).map(([e, t]) => [
995
+ e,
996
+ Object.fromEntries(
997
+ Object.entries(t).map(([r, i]) => [
998
+ r,
999
+ `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${i})`
1000
+ ])
1001
+ )
1002
+ ])
1003
+ ), ge = {
1035
1004
  /* Display */
1036
1005
  block: "display:block;",
1037
1006
  inline: "display:inline;",
@@ -1070,12 +1039,23 @@ const Qe = ze`
1070
1039
  "grid-cols-4": "grid-template-columns:repeat(4,minmax(0,1fr));",
1071
1040
  "grid-cols-5": "grid-template-columns:repeat(5,minmax(0,1fr));",
1072
1041
  "grid-cols-6": "grid-template-columns:repeat(6,minmax(0,1fr));",
1042
+ "grid-cols-7": "grid-template-columns:repeat(7,minmax(0,1fr));",
1043
+ "grid-cols-8": "grid-template-columns:repeat(8,minmax(0,1fr));",
1044
+ "grid-cols-9": "grid-template-columns:repeat(9,minmax(0,1fr));",
1045
+ "grid-cols-10": "grid-template-columns:repeat(10,minmax(0,1fr));",
1046
+ "grid-cols-11": "grid-template-columns:repeat(11,minmax(0,1fr));",
1073
1047
  "grid-cols-12": "grid-template-columns:repeat(12,minmax(0,1fr));",
1074
1048
  "grid-rows-1": "grid-template-rows:repeat(1,minmax(0,1fr));",
1075
1049
  "grid-rows-2": "grid-template-rows:repeat(2,minmax(0,1fr));",
1076
1050
  "grid-rows-3": "grid-template-rows:repeat(3,minmax(0,1fr));",
1077
1051
  "grid-rows-4": "grid-template-rows:repeat(4,minmax(0,1fr));",
1052
+ "grid-rows-5": "grid-template-rows:repeat(5,minmax(0,1fr));",
1078
1053
  "grid-rows-6": "grid-template-rows:repeat(6,minmax(0,1fr));",
1054
+ "grid-rows-7": "grid-template-rows:repeat(7,minmax(0,1fr));",
1055
+ "grid-rows-8": "grid-template-rows:repeat(8,minmax(0,1fr));",
1056
+ "grid-rows-9": "grid-template-rows:repeat(9,minmax(0,1fr));",
1057
+ "grid-rows-10": "grid-template-rows:repeat(10,minmax(0,1fr));",
1058
+ "grid-rows-11": "grid-template-rows:repeat(11,minmax(0,1fr));",
1079
1059
  "grid-rows-12": "grid-template-rows:repeat(12,minmax(0,1fr));",
1080
1060
  /* Grid Placement */
1081
1061
  "col-span-1": "grid-column:span 1 / span 1;",
@@ -1084,12 +1064,22 @@ const Qe = ze`
1084
1064
  "col-span-4": "grid-column:span 4 / span 4;",
1085
1065
  "col-span-5": "grid-column:span 5 / span 5;",
1086
1066
  "col-span-6": "grid-column:span 6 / span 6;",
1067
+ "col-span-7": "grid-column:span 7 / span 7;",
1068
+ "col-span-8": "grid-column:span 8 / span 8;",
1069
+ "col-span-9": "grid-column:span 9 / span 9;",
1070
+ "col-span-10": "grid-column:span 10 / span 10;",
1071
+ "col-span-11": "grid-column:span 11 / span 11;",
1087
1072
  "col-span-12": "grid-column:span 12 / span 12;",
1088
1073
  "row-span-1": "grid-row:span 1 / span 1;",
1089
1074
  "row-span-2": "grid-row:span 2 / span 2;",
1090
1075
  "row-span-3": "grid-row:span 3 / span 3;",
1091
1076
  "row-span-4": "grid-row:span 4 / span 4;",
1092
1077
  "row-span-6": "grid-row:span 6 / span 6;",
1078
+ "row-span-7": "grid-row:span 7 / span 7;",
1079
+ "row-span-8": "grid-row:span 8 / span 8;",
1080
+ "row-span-9": "grid-row:span 9 / span 9;",
1081
+ "row-span-10": "grid-row:span 10 / span 10;",
1082
+ "row-span-11": "grid-row:span 11 / span 11;",
1093
1083
  "row-span-12": "grid-row:span 12 / span 12;",
1094
1084
  /* Positioning */
1095
1085
  absolute: "position:absolute;",
@@ -1128,21 +1118,25 @@ const Qe = ze`
1128
1118
  "text-8xl": "font-size:6rem;line-height:1",
1129
1119
  /* Borders */
1130
1120
  border: "border-width:1px;",
1121
+ "border-2": "border-width:2px;",
1122
+ "border-4": "border-width:4px;",
1123
+ "border-6": "border-width:6px;",
1124
+ "border-8": "border-width:8px;",
1131
1125
  "rounded-none": "border-radius:0;",
1132
1126
  "rounded-xs": "border-radius:0.125rem;",
1133
- rounded: "border-radius:0.25rem;",
1134
1127
  "rounded-sm": "border-radius:0.25rem;",
1135
1128
  "rounded-md": "border-radius:0.375rem;",
1136
1129
  "rounded-lg": "border-radius:0.5rem;",
1137
1130
  "rounded-full": "border-radius:9999px;",
1138
1131
  /* Shadow and effects */
1139
- "shadow-none": "box-shadow:0 0 #0000;",
1140
- "shadow-xs": "box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);",
1141
- "shadow-sm": "box-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);",
1142
- "shadow-md": "box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);",
1143
- "shadow-lg": "box-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);",
1144
- "shadow-xl": "box-shadow:0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);",
1145
- "shadow-2xl": "box-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);",
1132
+ // Shadows use a CSS variable for color so color utilities can modify --ce-shadow-color
1133
+ "shadow-none": "--ce-shadow-color: rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
1134
+ "shadow-xs": "--ce-shadow-color: rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
1135
+ "shadow-sm": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1136
+ "shadow-md": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1137
+ "shadow-lg": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1138
+ "shadow-xl": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1139
+ "shadow-2xl": "--ce-shadow-color: rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));",
1146
1140
  /* Text Overflow & Whitespace */
1147
1141
  truncate: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",
1148
1142
  /* Visibility */
@@ -1201,6 +1195,15 @@ const Qe = ze`
1201
1195
  "transition-opacity": "transition-property:opacity;",
1202
1196
  "transition-transform": "transition-property:transform;",
1203
1197
  "transition-none": "transition-property:none;",
1198
+ /* Cursor */
1199
+ "cursor-auto": "cursor:auto;",
1200
+ "cursor-default": "cursor:default;",
1201
+ "cursor-pointer": "cursor:pointer;",
1202
+ "cursor-wait": "cursor:wait;",
1203
+ "cursor-text": "cursor:text;",
1204
+ "cursor-move": "cursor:move;",
1205
+ "cursor-help": "cursor:help;",
1206
+ "cursor-not-allowed": "cursor:not-allowed;",
1204
1207
  /* Z-index */
1205
1208
  "z-0": "z-index:0;",
1206
1209
  "z-10": "z-index:10;",
@@ -1208,7 +1211,7 @@ const Qe = ze`
1208
1211
  "z-30": "z-index:30;",
1209
1212
  "z-40": "z-index:40;",
1210
1213
  "z-50": "z-index:50;"
1211
- }, et = "0.25rem", Se = {
1214
+ }, tt = "0.25rem", Se = {
1212
1215
  m: ["margin"],
1213
1216
  mx: ["margin-inline"],
1214
1217
  my: ["margin-block"],
@@ -1240,34 +1243,34 @@ const Qe = ze`
1240
1243
  "gap-x": ["column-gap"],
1241
1244
  "gap-y": ["row-gap"]
1242
1245
  };
1243
- function P(e, t) {
1244
- let r = 0, o = 0;
1246
+ function N(e, t) {
1247
+ let r = 0, i = 0;
1245
1248
  for (let n = 0; n < e.length; n++) {
1246
- const i = e[n];
1247
- if (i === "[") r++;
1248
- else if (i === "]" && r > 0) r--;
1249
- else if (i === "(") o++;
1250
- else if (i === ")" && o > 0) o--;
1251
- else if (r === 0 && o === 0 && (i === ">" || i === "+" || i === "~" || i === " "))
1249
+ const s = e[n];
1250
+ if (s === "[") r++;
1251
+ else if (s === "]" && r > 0) r--;
1252
+ else if (s === "(") i++;
1253
+ else if (s === ")" && i > 0) i--;
1254
+ else if (r === 0 && i === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
1252
1255
  return e.slice(0, n) + t + e.slice(n);
1253
1256
  }
1254
1257
  return e + t;
1255
1258
  }
1256
- const tt = {
1259
+ const rt = {
1257
1260
  before: (e, t) => `${e}::before{${t}}`,
1258
1261
  after: (e, t) => `${e}::after{${t}}`,
1259
- hover: (e, t) => `${P(e, ":hover")}{${t}}`,
1260
- focus: (e, t) => `${P(e, ":focus")}{${t}}`,
1261
- active: (e, t) => `${P(e, ":active")}{${t}}`,
1262
- disabled: (e, t) => `${P(e, ":disabled")}{${t}}`,
1263
- visited: (e, t) => `${P(e, ":visited")}{${t}}`,
1264
- checked: (e, t) => `${P(e, ":checked")}{${t}}`,
1265
- first: (e, t) => `${P(e, ":first-child")}{${t}}`,
1266
- last: (e, t) => `${P(e, ":last-child")}{${t}}`,
1267
- odd: (e, t) => `${P(e, ":nth-child(odd)")}{${t}}`,
1268
- even: (e, t) => `${P(e, ":nth-child(even)")}{${t}}`,
1269
- "focus-within": (e, t) => `${P(e, ":focus-within")}{${t}}`,
1270
- "focus-visible": (e, t) => `${P(e, ":focus-visible")}{${t}}`,
1262
+ hover: (e, t) => `${N(e, ":hover")}{${t}}`,
1263
+ focus: (e, t) => `${N(e, ":focus")}{${t}}`,
1264
+ active: (e, t) => `${N(e, ":active")}{${t}}`,
1265
+ disabled: (e, t) => `${N(e, ":disabled")}{${t}}`,
1266
+ visited: (e, t) => `${N(e, ":visited")}{${t}}`,
1267
+ checked: (e, t) => `${N(e, ":checked")}{${t}}`,
1268
+ first: (e, t) => `${N(e, ":first-child")}{${t}}`,
1269
+ last: (e, t) => `${N(e, ":last-child")}{${t}}`,
1270
+ odd: (e, t) => `${N(e, ":nth-child(odd)")}{${t}}`,
1271
+ even: (e, t) => `${N(e, ":nth-child(even)")}{${t}}`,
1272
+ "focus-within": (e, t) => `${N(e, ":focus-within")}{${t}}`,
1273
+ "focus-visible": (e, t) => `${N(e, ":focus-visible")}{${t}}`,
1271
1274
  "group-hover": (e, t) => `.group:hover ${e}{${t}}`,
1272
1275
  "group-focus": (e, t) => `.group:focus ${e}{${t}}`,
1273
1276
  "group-active": (e, t) => `.group:active ${e}{${t}}`,
@@ -1276,7 +1279,7 @@ const tt = {
1276
1279
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
1277
1280
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
1278
1281
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
1279
- }, ye = {
1282
+ }, me = {
1280
1283
  // Responsive
1281
1284
  sm: "(min-width:640px)",
1282
1285
  md: "(min-width:768px)",
@@ -1285,61 +1288,62 @@ const tt = {
1285
1288
  "2xl": "(min-width:1536px)",
1286
1289
  // Dark mode (now plain string)
1287
1290
  dark: "(prefers-color-scheme: dark)"
1288
- }, me = ["sm", "md", "lg", "xl", "2xl"];
1291
+ }, ye = ["sm", "md", "lg", "xl", "2xl"];
1289
1292
  function be(e) {
1290
- const t = e.startsWith("-"), o = (t ? e.slice(1) : e).split("-");
1291
- if (o.length < 2) return null;
1292
- const n = o.slice(0, -1).join("-"), i = o[o.length - 1], s = parseFloat(i);
1293
- if (Number.isNaN(s) || !Se[n]) return null;
1293
+ const t = e.startsWith("-"), i = (t ? e.slice(1) : e).split("-");
1294
+ if (i.length < 2) return null;
1295
+ const n = i.slice(0, -1).join("-"), s = i[i.length - 1], o = parseFloat(s);
1296
+ if (Number.isNaN(o) || !Se[n]) return null;
1294
1297
  const a = t ? "-" : "";
1295
- return Se[n].map((f) => `${f}:calc(${a}${et} * ${s});`).join("");
1298
+ return Se[n].map((f) => `${f}:calc(${a}${tt} * ${o});`).join("");
1296
1299
  }
1297
- function Ce(e) {
1298
- const t = e.replace("#", ""), r = parseInt(t, 16), o = r >> 16 & 255, n = r >> 8 & 255, i = r & 255;
1299
- return `${o} ${n} ${i}`;
1300
+ function Ee(e) {
1301
+ const t = e.replace("#", ""), r = parseInt(t, 16), i = r >> 16 & 255, n = r >> 8 & 255, s = r & 255;
1302
+ return `${i} ${n} ${s}`;
1300
1303
  }
1301
- function rt(e) {
1304
+ function nt(e) {
1302
1305
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
1303
1306
  if (!t) return null;
1304
- const [, r, o, n = "DEFAULT"] = t, i = Xe[o]?.[n];
1305
- return i ? `${{
1307
+ const [, r, i, n = "DEFAULT"] = t, s = et[i]?.[n];
1308
+ if (!s) return null;
1309
+ if (r === "shadow") return `--ce-shadow-color:${s};`;
1310
+ const a = {
1306
1311
  bg: "background-color",
1307
1312
  decoration: "text-decoration-color",
1308
1313
  text: "color",
1309
1314
  border: "border-color",
1310
- shadow: "box-shadow",
1311
1315
  outline: "outline-color",
1312
1316
  caret: "caret-color",
1313
1317
  accent: "accent-color",
1314
- placeholder: "placeholder-color",
1315
- fill: "fill-color",
1316
- stroke: "stroke-color"
1317
- }[r]}:${i};` : null;
1318
+ fill: "fill",
1319
+ stroke: "stroke"
1320
+ }[r];
1321
+ return a ? `${a}:${s};` : null;
1318
1322
  }
1319
- function nt(e) {
1323
+ function it(e) {
1320
1324
  const [t, r] = e.split("/");
1321
1325
  if (!r) return { base: t };
1322
- const o = parseInt(r, 10);
1323
- return isNaN(o) || o < 0 || o > 100 ? { base: t } : { base: t, opacity: o / 100 };
1326
+ const i = parseInt(r, 10);
1327
+ return isNaN(i) || i < 0 || i > 100 ? { base: t } : { base: t, opacity: i / 100 };
1324
1328
  }
1325
- function ve(e) {
1326
- const { base: t, opacity: r } = nt(e), o = rt(t);
1327
- if (o) {
1329
+ function we(e) {
1330
+ const { base: t, opacity: r } = it(e), i = nt(t);
1331
+ if (i) {
1328
1332
  if (r !== void 0) {
1329
- const i = /#([0-9a-f]{6})/i.exec(o);
1330
- if (i) {
1331
- const s = Ce(i[0]);
1332
- return o.replace(/#([0-9a-f]{6})/i, `rgb(${s} / ${r})`);
1333
+ const s = /#([0-9a-f]{6})/i.exec(i);
1334
+ if (s) {
1335
+ const o = Ee(s[0]);
1336
+ return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
1333
1337
  }
1334
1338
  }
1335
- return o;
1339
+ return i;
1336
1340
  }
1337
- const n = le(t);
1341
+ const n = ce(t);
1338
1342
  if (n && r !== void 0) {
1339
- const i = /#([0-9a-f]{6})/i.exec(n);
1340
- if (i) {
1341
- const s = Ce(i[0]);
1342
- return n.replace(/#([0-9a-f]{6})/i, `rgb(${s} / ${r})`);
1343
+ const s = /#([0-9a-f]{6})/i.exec(n);
1344
+ if (s) {
1345
+ const o = Ee(s[0]);
1346
+ return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
1343
1347
  }
1344
1348
  }
1345
1349
  return n;
@@ -1350,22 +1354,22 @@ function xe(e) {
1350
1354
  const r = parseInt(t[1], 10);
1351
1355
  return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
1352
1356
  }
1353
- function le(e) {
1357
+ function ce(e) {
1354
1358
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
1355
1359
  const n = e.slice(1, -1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);
1356
1360
  if (n) {
1357
- const i = n[1].trim();
1358
- let s = n[2].trim();
1359
- return s = s.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), s = s.replace(/^'([^']*)'$/g, '"$1"'), `${i}:${s};`;
1361
+ const s = n[1].trim();
1362
+ let o = n[2].trim();
1363
+ return o = o.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), o = o.replace(/^'([^']*)'$/g, '"$1"'), `${s}:${o};`;
1360
1364
  }
1361
1365
  return null;
1362
1366
  }
1363
1367
  const t = e.indexOf("-["), r = e.endsWith("]");
1364
1368
  if (t > 0 && r) {
1365
- const o = e.slice(0, t);
1369
+ const i = e.slice(0, t);
1366
1370
  let n = e.slice(t + 2, -1);
1367
1371
  n = n.replace(/_/g, " ");
1368
- const i = {
1372
+ const s = {
1369
1373
  bg: "background-color",
1370
1374
  text: "color",
1371
1375
  shadow: "box-shadow",
@@ -1407,14 +1411,14 @@ function le(e) {
1407
1411
  leading: "line-height",
1408
1412
  z: "z-index"
1409
1413
  };
1410
- if (o === "rotate")
1414
+ if (i === "rotate")
1411
1415
  return `transform:rotate(${n});`;
1412
- const s = i[o] ?? o.replace(/_/g, "-");
1413
- if (s && n) return `${s}:${n};`;
1416
+ const o = s[i] ?? i.replace(/_/g, "-");
1417
+ if (o && n) return `${o}:${n};`;
1414
1418
  }
1415
1419
  return null;
1416
1420
  }
1417
- function ot(e) {
1421
+ function st(e) {
1418
1422
  if (e.startsWith("[") && e.endsWith("]")) {
1419
1423
  const r = e.slice(1, -1);
1420
1424
  return r.includes("&") ? r : e;
@@ -1426,44 +1430,44 @@ function ot(e) {
1426
1430
  }
1427
1431
  return null;
1428
1432
  }
1429
- function it(e) {
1433
+ function ot(e) {
1430
1434
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
1431
1435
  }
1432
- function st(e) {
1436
+ function at(e) {
1433
1437
  const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
1434
- let o;
1435
- for (; o = t.exec(e); ) {
1436
- const n = o[2].split(/\s+/).filter(Boolean);
1438
+ let i;
1439
+ for (; i = t.exec(e); ) {
1440
+ const n = i[2].split(/\s+/).filter(Boolean);
1437
1441
  n.length && r.push(...n);
1438
1442
  }
1439
1443
  return r.filter(Boolean);
1440
1444
  }
1441
- const Ee = /* @__PURE__ */ new Map(), at = 16;
1445
+ const Ce = /* @__PURE__ */ new Map(), ct = 16;
1442
1446
  function lt(e) {
1443
- const t = Date.now(), r = Ee.get(e);
1444
- if (r && t - r.timestamp < at) return r.css;
1445
- const o = st(e), n = new Set(o), i = [], s = [], a = [], f = [], u = {};
1446
- function d(v, b = !1) {
1447
- const y = (b ? "dark|" : "") + v;
1448
- if (y in u) return u[y];
1449
- const x = w(v, b);
1450
- return u[y] = x, x;
1451
- }
1452
- function m(v) {
1453
- const b = v.some((x) => me.includes(x)), y = v.includes("dark");
1454
- return v.length === 0 ? 1 : !b && !y ? 2 : b && !y ? 3 : 4;
1455
- }
1456
- function l(v) {
1447
+ const t = Date.now(), r = Ce.get(e);
1448
+ if (r && t - r.timestamp < ct) return r.css;
1449
+ const i = at(e), n = new Set(i), s = [], o = [], a = [], f = [], u = {};
1450
+ function d(w, b = !1) {
1451
+ const m = (b ? "dark|" : "") + w;
1452
+ if (m in u) return u[m];
1453
+ const x = k(w, b);
1454
+ return u[m] = x, x;
1455
+ }
1456
+ function y(w) {
1457
+ const b = w.some((x) => ye.includes(x)), m = w.includes("dark");
1458
+ return w.length === 0 ? 1 : !b && !m ? 2 : b && !m ? 3 : 4;
1459
+ }
1460
+ function c(w) {
1457
1461
  const b = [];
1458
- let y = "", x = 0, c = 0;
1459
- for (let g = 0; g < v.length; g++) {
1460
- const p = v[g];
1461
- p === "[" ? x++ : p === "]" && x > 0 ? x-- : p === "(" ? c++ : p === ")" && c > 0 && c--, p === ":" && x === 0 && c === 0 ? (b.push(y), y = "") : y += p;
1462
+ let m = "", x = 0, l = 0;
1463
+ for (let g = 0; g < w.length; g++) {
1464
+ const p = w[g];
1465
+ p === "[" ? x++ : p === "]" && x > 0 ? x-- : p === "(" ? l++ : p === ")" && l > 0 && l--, p === ":" && x === 0 && l === 0 ? (b.push(m), m = "") : m += p;
1462
1466
  }
1463
- return y && b.push(y), b;
1467
+ return m && b.push(m), b;
1464
1468
  }
1465
- function h(v) {
1466
- switch (v) {
1469
+ function h(w) {
1470
+ switch (w) {
1467
1471
  case "hover":
1468
1472
  return ":hover";
1469
1473
  case "focus":
@@ -1492,210 +1496,210 @@ function lt(e) {
1492
1496
  return null;
1493
1497
  }
1494
1498
  }
1495
- function w(v, b = !1) {
1496
- const y = l(v);
1499
+ function k(w, b = !1) {
1500
+ const m = c(w);
1497
1501
  let x = !1;
1498
- const c = y.find((k) => (k.startsWith("!") && (x = !0, k = k.slice(1)), ge[k] || be(k) || xe(k) || ve(k) || le(k)));
1499
- if (!c) return null;
1500
- const g = c.replace(/^!/, ""), p = ge[g] ?? be(g) ?? xe(g) ?? ve(g) ?? le(g);
1502
+ const l = m.find((v) => (v.startsWith("!") && (x = !0, v = v.slice(1)), ge[v] || be(v) || xe(v) || we(v) || ce(v)));
1503
+ if (!l) return null;
1504
+ const g = l.replace(/^!/, ""), p = ge[g] ?? be(g) ?? xe(g) ?? we(g) ?? ce(g);
1501
1505
  if (!p) return null;
1502
- const _ = y.indexOf(c);
1503
- let E = _ >= 0 ? y.slice(0, _) : [];
1504
- b && (E = E.filter((k) => k !== "dark"));
1505
- const C = `.${it(v)}`, S = "__SUBJECT__", A = x ? p.replace(/;$/, " !important;") : p;
1506
- let T = S;
1506
+ const _ = m.indexOf(l);
1507
+ let C = _ >= 0 ? m.slice(0, _) : [];
1508
+ b && (C = C.filter((v) => v !== "dark"));
1509
+ const E = `.${ot(w)}`, S = "__SUBJECT__", A = x ? p.replace(/;$/, " !important;") : p;
1510
+ let j = S;
1507
1511
  const Q = [];
1508
- for (const k of E)
1509
- k.startsWith("group-") ? (T = `.group:${k.slice(6)} ${T}`, Q.push(k)) : k.startsWith("peer-") && (T = T.replace(S, `.peer:${k.slice(5)}~${S}`), Q.push(k));
1510
- E = E.filter((k) => !Q.includes(k));
1512
+ for (const v of C)
1513
+ v.startsWith("group-") ? (j = `.group:${v.slice(6)} ${j}`, Q.push(v)) : v.startsWith("peer-") && (j = j.replace(S, `.peer:${v.slice(5)}~${S}`), Q.push(v));
1514
+ C = C.filter((v) => !Q.includes(v));
1511
1515
  const X = [], de = [];
1512
1516
  let q = null;
1513
- for (const k of E) {
1514
- if (k === "dark" || me.includes(k)) continue;
1515
- const B = ot(k);
1517
+ for (const v of C) {
1518
+ if (v === "dark" || ye.includes(v)) continue;
1519
+ const B = st(v);
1516
1520
  if (B) {
1517
1521
  q = B;
1518
1522
  continue;
1519
1523
  }
1520
- const z = h(k);
1521
- if (z) {
1522
- q ? de.push(z) : X.push(z);
1524
+ const O = h(v);
1525
+ if (O) {
1526
+ q ? de.push(O) : X.push(O);
1523
1527
  continue;
1524
1528
  }
1525
- const O = tt[k];
1526
- typeof O == "function" && (T = O(T, A).split("{")[0]);
1529
+ const P = rt[v];
1530
+ typeof P == "function" && (j = P(j, A).split("{")[0]);
1527
1531
  }
1528
- function I(k, B) {
1529
- if (!B) return k;
1530
- let z = 0, O = 0;
1531
- if (k.length && (k[0] === ">" || k[0] === "+" || k[0] === "~" || k[0] === " ")) {
1532
- let j = 1;
1533
- for (; j < k.length && k[j] === " "; ) j++;
1534
- for (; j < k.length; j++) {
1535
- const R = k[j];
1536
- if (R === "[" ? z++ : R === "]" && z > 0 ? z-- : R === "(" ? O++ : R === ")" && O > 0 && O--, z === 0 && O === 0 && (k[j] === ">" || k[j] === "+" || k[j] === "~" || k[j] === " "))
1537
- return k.slice(0, j) + B + k.slice(j);
1532
+ function I(v, B) {
1533
+ if (!B) return v;
1534
+ let O = 0, P = 0;
1535
+ if (v.length && (v[0] === ">" || v[0] === "+" || v[0] === "~" || v[0] === " ")) {
1536
+ let T = 1;
1537
+ for (; T < v.length && v[T] === " "; ) T++;
1538
+ for (; T < v.length; T++) {
1539
+ const R = v[T];
1540
+ if (R === "[" ? O++ : R === "]" && O > 0 ? O-- : R === "(" ? P++ : R === ")" && P > 0 && P--, O === 0 && P === 0 && (v[T] === ">" || v[T] === "+" || v[T] === "~" || v[T] === " "))
1541
+ return v.slice(0, T) + B + v.slice(T);
1538
1542
  }
1539
- return k + B;
1543
+ return v + B;
1540
1544
  }
1541
- for (let j = 0; j < k.length; j++) {
1542
- const R = k[j];
1543
- if (R === "[" ? z++ : R === "]" && z > 0 ? z-- : R === "(" ? O++ : R === ")" && O > 0 && O--, z === 0 && O === 0 && (R === ">" || R === "+" || R === "~" || R === " "))
1544
- return k.slice(0, j) + B + k.slice(j);
1545
+ for (let T = 0; T < v.length; T++) {
1546
+ const R = v[T];
1547
+ if (R === "[" ? O++ : R === "]" && O > 0 ? O-- : R === "(" ? P++ : R === ")" && P > 0 && P--, O === 0 && P === 0 && (R === ">" || R === "+" || R === "~" || R === " "))
1548
+ return v.slice(0, T) + B + v.slice(T);
1545
1549
  }
1546
- return k + B;
1550
+ return v + B;
1547
1551
  }
1548
1552
  const Z = X.join(""), F = de.join("");
1549
1553
  if (q)
1550
1554
  if (q.includes("&")) {
1551
- const k = q.indexOf("&"), B = q.slice(0, k), z = q.slice(k + 1), O = S + Z, j = T;
1555
+ const v = q.indexOf("&"), B = q.slice(0, v), O = q.slice(v + 1), P = S + Z, T = j;
1552
1556
  if (X.length === 0)
1553
- T = j.replace(S, B + O + F + z);
1557
+ j = T.replace(S, B + P + F + O);
1554
1558
  else {
1555
- const R = I(z, F);
1556
- T = j.replace(S, B + O + R);
1559
+ const R = I(O, F);
1560
+ j = T.replace(S, B + P + R);
1557
1561
  }
1558
1562
  } else
1559
- T = T.replace(S, `${q}${S + Z}`), F && (T = T.replace(S, `${S}${F}`));
1563
+ j = j.replace(S, `${q}${S + Z}`), F && (j = j.replace(S, `${S}${F}`));
1560
1564
  else
1561
- T = S + Z + F;
1562
- T = T.replace(new RegExp(S, "g"), C);
1563
- let L = `${T}{${A}}`;
1564
- const K = E.filter((k) => me.includes(k)), D = K.length ? K[K.length - 1] : null, ne = E.includes("dark");
1565
- return b && D ? L = `@media (prefers-color-scheme: dark) and ${ye[D]}{${L}}` : b ? L = `@media (prefers-color-scheme: dark){${L}}` : ne && D ? L = `@media (prefers-color-scheme: dark) and ${ye[D]}{${L}}` : ne ? L = `@media (prefers-color-scheme: dark){${L}}` : D && (L = `@media ${ye[D]}{${L}}`), L;
1566
- }
1567
- for (const v of n) {
1568
- const b = l(v), y = b.find(
1569
- (p) => ge[p] || be(p) || xe(p) || ve(p) || le(p)
1565
+ j = S + Z + F;
1566
+ j = j.replace(new RegExp(S, "g"), E);
1567
+ let L = `${j}{${A}}`;
1568
+ const K = C.filter((v) => ye.includes(v)), D = K.length ? K[K.length - 1] : null, ne = C.includes("dark");
1569
+ return b && D ? L = `@media (prefers-color-scheme: dark) and ${me[D]}{${L}}` : b ? L = `@media (prefers-color-scheme: dark){${L}}` : ne && D ? L = `@media (prefers-color-scheme: dark) and ${me[D]}{${L}}` : ne ? L = `@media (prefers-color-scheme: dark){${L}}` : D && (L = `@media ${me[D]}{${L}}`), L;
1570
+ }
1571
+ for (const w of n) {
1572
+ const b = c(w), m = b.find(
1573
+ (p) => ge[p] || be(p) || xe(p) || we(p) || ce(p)
1570
1574
  );
1571
- if (!y) continue;
1572
- const x = b.indexOf(y), c = x >= 0 ? b.slice(0, x) : [], g = m(c);
1575
+ if (!m) continue;
1576
+ const x = b.indexOf(m), l = x >= 0 ? b.slice(0, x) : [], g = y(l);
1573
1577
  if (g === 4) {
1574
- const p = d(v, !0);
1578
+ const p = d(w, !0);
1575
1579
  p && f.push(p);
1576
1580
  } else {
1577
- const p = d(v);
1578
- p && (g === 1 ? i.push(p) : g === 2 ? s.push(p) : g === 3 && a.push(p));
1581
+ const p = d(w);
1582
+ p && (g === 1 ? s.push(p) : g === 2 ? o.push(p) : g === 3 && a.push(p));
1579
1583
  }
1580
1584
  }
1581
- const $ = [...i, ...s, ...a, ...f].join("");
1582
- return Ee.set(e, { css: $, timestamp: t }), $;
1585
+ const $ = [...s, ...o, ...a, ...f].join("");
1586
+ return Ce.set(e, { css: $, timestamp: t }), $;
1583
1587
  }
1584
1588
  const te = [];
1585
- function ct(e, t, r, o, n, i, s, a) {
1589
+ function ft(e, t, r, i, n, s, o, a) {
1586
1590
  if (e) {
1587
1591
  te.push(r);
1588
1592
  try {
1589
1593
  if (t.loadingTemplate && r.isLoading) {
1590
- Y(e, t.loadingTemplate(r), r, o, n);
1594
+ Y(e, t.loadingTemplate(r), r, i, n);
1591
1595
  return;
1592
1596
  }
1593
1597
  if (t.errorTemplate && r.hasError) {
1594
- r.error instanceof Error && Y(e, t.errorTemplate(r.error, r), r, o, n);
1598
+ r.error instanceof Error && Y(e, t.errorTemplate(r.error, r), r, i, n);
1595
1599
  return;
1596
1600
  }
1597
1601
  const f = t.render(r);
1598
1602
  if (f instanceof Promise) {
1599
- i(!0), f.then((u) => {
1600
- i(!1), s(null), Y(e, u, r, o, n), a(e.innerHTML);
1603
+ s(!0), f.then((u) => {
1604
+ s(!1), o(null), Y(e, u, r, i, n), a(e.innerHTML);
1601
1605
  }).catch((u) => {
1602
- i(!1), s(u), t.errorTemplate && Y(e, t.errorTemplate(u, r), r, o, n);
1603
- }), t.loadingTemplate && Y(e, t.loadingTemplate(r), r, o, n);
1606
+ s(!1), o(u), t.errorTemplate && Y(e, t.errorTemplate(u, r), r, i, n);
1607
+ }), t.loadingTemplate && Y(e, t.loadingTemplate(r), r, i, n);
1604
1608
  return;
1605
1609
  }
1606
- Y(e, f, r, o, n), a(e.innerHTML);
1610
+ Y(e, f, r, i, n), a(e.innerHTML);
1607
1611
  } finally {
1608
1612
  te.pop();
1609
1613
  }
1610
1614
  }
1611
1615
  }
1612
- function Y(e, t, r, o, n) {
1616
+ function Y(e, t, r, i, n) {
1613
1617
  e && (Ye(
1614
1618
  e,
1615
1619
  Array.isArray(t) ? t : [t],
1616
1620
  r,
1617
- o
1621
+ i
1618
1622
  ), n(e.innerHTML));
1619
1623
  }
1620
- function ft(e, t, r, o, n, i, s) {
1621
- if (i !== null && clearTimeout(i), Date.now() - t < 16) {
1624
+ function ut(e, t, r, i, n, s, o) {
1625
+ if (s !== null && clearTimeout(s), Date.now() - t < 16) {
1622
1626
  if (n(r + 1), r > 10) {
1623
- s(null);
1627
+ o(null);
1624
1628
  return;
1625
1629
  }
1626
1630
  } else
1627
1631
  n(0);
1628
1632
  const f = setTimeout(() => {
1629
- o(Date.now()), e(), s(null);
1633
+ i(Date.now()), e(), o(null);
1630
1634
  }, 0);
1631
- s(f);
1635
+ o(f);
1632
1636
  }
1633
- function ut(e, t, r, o, n, i) {
1637
+ function dt(e, t, r, i, n, s) {
1634
1638
  if (!e) return;
1635
- const s = lt(o);
1636
- if (!t.style && (!s || s.trim() === "")) {
1637
- i(null), e.adoptedStyleSheets = [_e()];
1639
+ const o = lt(i);
1640
+ if (!t.style && (!o || o.trim() === "")) {
1641
+ s(null), e.adoptedStyleSheets = [_e()];
1638
1642
  return;
1639
1643
  }
1640
1644
  let a = "";
1641
1645
  t.style && (typeof t.style == "string" ? a = t.style : typeof t.style == "function" && (a = t.style(r)));
1642
1646
  let f = Ge(`${a}
1643
- ${s}
1647
+ ${o}
1644
1648
  `);
1645
1649
  f = Be(f);
1646
1650
  let u = n;
1647
- u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== f) && u.replaceSync(f), e.adoptedStyleSheets = [_e(), u], i(u);
1651
+ u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== f) && u.replaceSync(f), e.adoptedStyleSheets = [_e(), u], s(u);
1648
1652
  }
1649
1653
  const ue = /* @__PURE__ */ new Map(), Ae = Symbol.for("cer.registry");
1650
1654
  if (typeof window < "u") {
1651
1655
  const e = globalThis;
1652
1656
  e[Ae] || (e[Ae] = ue);
1653
1657
  }
1654
- function Te(e, t, r) {
1655
- let o = J(e);
1656
- o.includes("-") || (o = `cer-${o}`);
1658
+ function je(e, t, r) {
1659
+ let i = J(e);
1660
+ i.includes("-") || (i = `cer-${i}`);
1657
1661
  let n;
1658
- typeof t == "function" ? n = { ...r, render: t } : n = t, typeof n.onError != "function" && (n.onError = (i, s) => {
1659
- console.error(`[${o}] Error:`, i, s);
1662
+ typeof t == "function" ? n = { ...r, render: t } : n = t, typeof n.onError != "function" && (n.onError = (s, o) => {
1663
+ console.error(`[${i}] Error:`, s, o);
1660
1664
  });
1661
1665
  try {
1662
- const i = /* @__PURE__ */ new Set([
1666
+ const s = /* @__PURE__ */ new Set([
1663
1667
  "refs",
1664
1668
  "requestRender",
1665
1669
  "error",
1666
1670
  "hasError",
1667
1671
  "isLoading",
1668
1672
  "emit"
1669
- ]), s = [];
1673
+ ]), o = [];
1670
1674
  if (n.state && typeof n.state == "object" && Object.keys(n.state).forEach((a) => {
1671
- i.has(a) && s.push(a);
1675
+ s.has(a) && o.push(a);
1672
1676
  }), n.props && typeof n.props == "object" && Object.keys(n.props).forEach((a) => {
1673
- i.has(a) && s.push(a);
1677
+ s.has(a) && o.push(a);
1674
1678
  }), n.computed && typeof n.computed == "object" && Object.keys(n.computed).forEach((a) => {
1675
- i.has(a) && s.push(a);
1676
- }), s.length > 0) {
1677
- const a = Array.from(new Set(s));
1679
+ s.has(a) && o.push(a);
1680
+ }), o.length > 0) {
1681
+ const a = Array.from(new Set(o));
1678
1682
  console.warn(
1679
- `[${o}] Reserved runtime context keys used in component config: ${a.join(", ")}. These names are provided by the runtime (for example: refs, error, emit). Rename your state/prop/computed keys (e.g. 'error' -> 'errorMessage') to avoid collisions and TypeScript type conflicts.`
1683
+ `[${i}] Reserved runtime context keys used in component config: ${a.join(", ")}. These names are provided by the runtime (for example: refs, error, emit). Rename your state/prop/computed keys (e.g. 'error' -> 'errorMessage') to avoid collisions and TypeScript type conflicts.`
1680
1684
  );
1681
1685
  }
1682
1686
  } catch {
1683
1687
  }
1684
- if (ue.set(o, n), typeof window < "u")
1685
- if (!customElements.get(o))
1686
- customElements.define(o, dt(o, n));
1688
+ if (ue.set(i, n), typeof window < "u")
1689
+ if (!customElements.get(i))
1690
+ customElements.define(i, pt(i, n));
1687
1691
  else
1688
1692
  try {
1689
- document.querySelectorAll(o).forEach((i) => {
1693
+ document.querySelectorAll(i).forEach((s) => {
1690
1694
  try {
1691
- typeof i._cfg < "u" && (i._cfg = n), typeof i._render == "function" && i._render(n);
1695
+ typeof s._cfg < "u" && (s._cfg = n), typeof s._render == "function" && s._render(n);
1692
1696
  } catch {
1693
1697
  }
1694
1698
  });
1695
1699
  } catch {
1696
1700
  }
1697
1701
  }
1698
- function dt(e, t) {
1702
+ function pt(e, t) {
1699
1703
  if (!t.render)
1700
1704
  throw new Error(
1701
1705
  "Component must have a render function"
@@ -1752,12 +1756,12 @@ function dt(e, t) {
1752
1756
  enumerable: !1,
1753
1757
  configurable: !1
1754
1758
  }), this.context = r, Object.defineProperty(this.context, "emit", {
1755
- value: (n, i, s) => {
1759
+ value: (n, s, o) => {
1756
1760
  const a = new CustomEvent(n, {
1757
- detail: i,
1761
+ detail: s,
1758
1762
  bubbles: !0,
1759
1763
  composed: !0,
1760
- ...s || {}
1764
+ ...o || {}
1761
1765
  });
1762
1766
  return this.dispatchEvent(a), !a.defaultPrevented;
1763
1767
  },
@@ -1765,11 +1769,11 @@ function dt(e, t) {
1765
1769
  enumerable: !1,
1766
1770
  configurable: !1
1767
1771
  });
1768
- const o = ue.get(e) || t;
1769
- Object.keys(o).forEach((n) => {
1770
- const i = o[n];
1771
- typeof i == "function" && (this.context[n] = (...s) => i(...s, this.context));
1772
- }), this._applyComputed(o), this._initializing = !1, this._initWatchers(o), this._render(o);
1772
+ const i = ue.get(e) || t;
1773
+ Object.keys(i).forEach((n) => {
1774
+ const s = i[n];
1775
+ typeof s == "function" && (this.context[n] = (...o) => s(...o, this.context));
1776
+ }), this._applyComputed(i), this._initializing = !1, this._initWatchers(i), this._render(i);
1773
1777
  }
1774
1778
  connectedCallback() {
1775
1779
  this._runLogicWithinErrorBoundary(t, () => {
@@ -1807,12 +1811,12 @@ function dt(e, t) {
1807
1811
  );
1808
1812
  });
1809
1813
  }
1810
- attributeChangedCallback(r, o, n) {
1814
+ attributeChangedCallback(r, i, n) {
1811
1815
  this._runLogicWithinErrorBoundary(t, () => {
1812
1816
  this._applyProps(t), Ie(
1813
1817
  t,
1814
1818
  r,
1815
- o,
1819
+ i,
1816
1820
  n,
1817
1821
  this.context
1818
1822
  );
@@ -1823,11 +1827,11 @@ function dt(e, t) {
1823
1827
  }
1824
1828
  _applyComputed(r) {
1825
1829
  this._runLogicWithinErrorBoundary(t, () => {
1826
- r.computed && Object.entries(r.computed).forEach(([o, n]) => {
1827
- Object.defineProperty(this.context, o, {
1830
+ r.computed && Object.entries(r.computed).forEach(([i, n]) => {
1831
+ Object.defineProperty(this.context, i, {
1828
1832
  get: () => {
1829
- const i = n(this.context);
1830
- return H(i);
1833
+ const s = n(this.context);
1834
+ return H(s);
1831
1835
  },
1832
1836
  enumerable: !0
1833
1837
  });
@@ -1837,21 +1841,21 @@ function dt(e, t) {
1837
1841
  // --- Render ---
1838
1842
  _render(r) {
1839
1843
  this._runLogicWithinErrorBoundary(r, () => {
1840
- ct(
1844
+ ft(
1841
1845
  this.shadowRoot,
1842
1846
  r,
1843
1847
  this.context,
1844
1848
  this._refs,
1845
- (o) => {
1846
- this._lastHtmlStringForJitCSS = o, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(o);
1849
+ (i) => {
1850
+ this._lastHtmlStringForJitCSS = i, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(i);
1847
1851
  },
1848
- (o) => {
1849
- this._templateLoading = o, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(o);
1852
+ (i) => {
1853
+ this._templateLoading = i, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(i);
1850
1854
  },
1851
- (o) => {
1852
- this._templateError = o, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(o);
1855
+ (i) => {
1856
+ this._templateError = i, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(i);
1853
1857
  },
1854
- (o) => this._applyStyle(r, o)
1858
+ (i) => this._applyStyle(r, i)
1855
1859
  );
1856
1860
  });
1857
1861
  }
@@ -1860,7 +1864,7 @@ function dt(e, t) {
1860
1864
  }
1861
1865
  _requestRender() {
1862
1866
  this._runLogicWithinErrorBoundary(this._cfg, () => {
1863
- ft(
1867
+ ut(
1864
1868
  () => this._render(this._cfg),
1865
1869
  this._lastRenderTime,
1866
1870
  this._renderCount,
@@ -1878,13 +1882,13 @@ function dt(e, t) {
1878
1882
  });
1879
1883
  }
1880
1884
  // --- Style ---
1881
- _applyStyle(r, o) {
1885
+ _applyStyle(r, i) {
1882
1886
  this._runLogicWithinErrorBoundary(r, () => {
1883
- ut(
1887
+ dt(
1884
1888
  this.shadowRoot,
1885
1889
  r,
1886
1890
  this.context,
1887
- o,
1891
+ i,
1888
1892
  this._styleSheet,
1889
1893
  (n) => {
1890
1894
  this._styleSheet = n;
@@ -1893,10 +1897,10 @@ function dt(e, t) {
1893
1897
  });
1894
1898
  }
1895
1899
  // --- Error Boundary function ---
1896
- _runLogicWithinErrorBoundary(r, o) {
1900
+ _runLogicWithinErrorBoundary(r, i) {
1897
1901
  this._hasError && (this._hasError = !1);
1898
1902
  try {
1899
- o();
1903
+ i();
1900
1904
  } catch (n) {
1901
1905
  this._hasError = !0, r.onError && r.onError(n, this.context), r.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = r.errorFallback(
1902
1906
  n,
@@ -1907,8 +1911,8 @@ function dt(e, t) {
1907
1911
  // --- State, props, computed ---
1908
1912
  _initContext(r) {
1909
1913
  try {
1910
- let o = function(i, s = "") {
1911
- return Array.isArray(i) ? new Proxy(i, {
1914
+ let i = function(s, o = "") {
1915
+ return Array.isArray(s) ? new Proxy(s, {
1912
1916
  get(a, f, u) {
1913
1917
  const d = Reflect.get(a, f, u);
1914
1918
  return typeof d == "function" && typeof f == "string" && [
@@ -1919,36 +1923,36 @@ function dt(e, t) {
1919
1923
  "splice",
1920
1924
  "sort",
1921
1925
  "reverse"
1922
- ].includes(f) ? function(...l) {
1923
- const h = d.apply(a, l);
1926
+ ].includes(f) ? function(...c) {
1927
+ const h = d.apply(a, c);
1924
1928
  if (!n._initializing) {
1925
- const w = s || "root";
1926
- n._triggerWatchers(w, a), n._render(r);
1929
+ const k = o || "root";
1930
+ n._triggerWatchers(k, a), n._render(r);
1927
1931
  }
1928
1932
  return h;
1929
1933
  } : d;
1930
1934
  },
1931
1935
  set(a, f, u) {
1932
1936
  if (a[f] = u, !n._initializing) {
1933
- const d = s ? `${s}.${String(f)}` : String(f);
1937
+ const d = o ? `${o}.${String(f)}` : String(f);
1934
1938
  n._triggerWatchers(d, u), n._render(r);
1935
1939
  }
1936
1940
  return !0;
1937
1941
  },
1938
1942
  deleteProperty(a, f) {
1939
1943
  if (delete a[f], !n._initializing) {
1940
- const u = s ? `${s}.${String(f)}` : String(f);
1944
+ const u = o ? `${o}.${String(f)}` : String(f);
1941
1945
  n._triggerWatchers(u, void 0), n._render(r);
1942
1946
  }
1943
1947
  return !0;
1944
1948
  }
1945
- }) : i && typeof i == "object" ? (Object.keys(i).forEach((a) => {
1946
- const f = s ? `${s}.${a}` : a;
1947
- i[a] = o(i[a], f);
1948
- }), new Proxy(i, {
1949
+ }) : s && typeof s == "object" ? (Object.keys(s).forEach((a) => {
1950
+ const f = o ? `${o}.${a}` : a;
1951
+ s[a] = i(s[a], f);
1952
+ }), new Proxy(s, {
1949
1953
  set(a, f, u) {
1950
- const d = s ? `${s}.${String(f)}` : String(f);
1951
- return a[f] = o(u, d), n._initializing || (n._triggerWatchers(
1954
+ const d = o ? `${o}.${String(f)}` : String(f);
1955
+ return a[f] = i(u, d), n._initializing || (n._triggerWatchers(
1952
1956
  d,
1953
1957
  a[f]
1954
1958
  ), n._render(r)), !0;
@@ -1956,134 +1960,134 @@ function dt(e, t) {
1956
1960
  get(a, f, u) {
1957
1961
  return Reflect.get(a, f, u);
1958
1962
  }
1959
- })) : i;
1963
+ })) : s;
1960
1964
  };
1961
1965
  const n = this;
1962
- return o({ ...r.state });
1966
+ return i({ ...r.state });
1963
1967
  } catch {
1964
1968
  return {};
1965
1969
  }
1966
1970
  }
1967
1971
  _initWatchers(r) {
1968
1972
  this._runLogicWithinErrorBoundary(r, () => {
1969
- Ne(
1973
+ ze(
1970
1974
  this.context,
1971
1975
  this._watchers,
1972
1976
  r.watch || {}
1973
1977
  );
1974
1978
  });
1975
1979
  }
1976
- _triggerWatchers(r, o) {
1977
- Me(this.context, this._watchers, r, o);
1980
+ _triggerWatchers(r, i) {
1981
+ Me(this.context, this._watchers, r, i);
1978
1982
  }
1979
1983
  _applyProps(r) {
1980
1984
  this._runLogicWithinErrorBoundary(r, () => {
1981
1985
  try {
1982
1986
  We(this, r, this.context);
1983
- } catch (o) {
1984
- this._hasError = !0, r.onError && r.onError(o, this.context), r.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = r.errorFallback(o, this.context));
1987
+ } catch (i) {
1988
+ this._hasError = !0, r.onError && r.onError(i, this.context), r.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = r.errorFallback(i, this.context));
1985
1989
  }
1986
1990
  });
1987
1991
  }
1988
1992
  };
1989
1993
  }
1990
- function ee(e, t = {}, r, o) {
1991
- const n = o ?? t.key;
1994
+ function ee(e, t = {}, r, i) {
1995
+ const n = i ?? t.key;
1992
1996
  return { tag: e, key: n, props: t, children: r };
1993
1997
  }
1994
- function ce(e) {
1998
+ function le(e) {
1995
1999
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
1996
2000
  }
1997
- function ie(e) {
1998
- return typeof e == "object" && e !== null && "tag" in e && !ce(e);
2001
+ function se(e) {
2002
+ return typeof e == "object" && e !== null && "tag" in e && !le(e);
1999
2003
  }
2000
- function pt(e, t) {
2004
+ function ht(e, t) {
2001
2005
  return e.key != null ? e : { ...e, key: t };
2002
2006
  }
2003
- function ht(e, t = [], r = {}) {
2004
- const o = {}, n = {}, i = {}, s = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
2007
+ function gt(e, t = [], r = {}) {
2008
+ const i = {}, n = {}, s = {}, o = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
2005
2009
  let a;
2006
- for (; a = s.exec(e); ) {
2007
- const f = a[1], u = a[2], d = (a[4] || a[6]) ?? "", m = d.match(/^{{(\d+)}}$/);
2008
- let l = m ? t[Number(m[1])] ?? null : d;
2009
- m || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
2010
+ for (; a = o.exec(e); ) {
2011
+ const f = a[1], u = a[2], d = (a[4] || a[6]) ?? "", y = d.match(/^{{(\d+)}}$/);
2012
+ let c = y ? t[Number(y[1])] ?? null : d;
2013
+ y || (c === "true" ? c = !0 : c === "false" ? c = !1 : c === "null" ? c = null : isNaN(Number(c)) || (c = Number(c)));
2010
2014
  const h = ["model", "bind", "show", "class", "style"];
2011
2015
  if (f === ":") {
2012
- const [w, $] = u.split(":"), [v, ...b] = w.split(".");
2013
- if (h.includes(v)) {
2014
- const y = [...b], x = v === "model" && $ ? `model:${$}` : v;
2015
- i[x] = {
2016
- value: l,
2017
- modifiers: y,
2016
+ const [k, $] = u.split(":"), [w, ...b] = k.split(".");
2017
+ if (h.includes(w)) {
2018
+ const m = [...b], x = w === "model" && $ ? `model:${$}` : w;
2019
+ s[x] = {
2020
+ value: c,
2021
+ modifiers: m,
2018
2022
  arg: $
2019
2023
  };
2020
2024
  } else
2021
- n[u] = l;
2025
+ n[u] = c;
2022
2026
  } else if (f === "@") {
2023
- const w = "on" + u.charAt(0).toUpperCase() + u.slice(1);
2024
- o[w] = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
2025
- } else u === "ref" ? o.ref = l : n[u] = l;
2027
+ const k = "on" + u.charAt(0).toUpperCase() + u.slice(1);
2028
+ i[k] = typeof c == "function" ? c : typeof r[c] == "function" ? r[c] : void 0;
2029
+ } else u === "ref" ? i.ref = c : n[u] = c;
2026
2030
  }
2027
- return { props: o, attrs: n, directives: i };
2031
+ return { props: i, attrs: n, directives: s };
2028
2032
  }
2029
- function gt(e, t, r) {
2030
- const o = te.length > 0 ? te[te.length - 1] : void 0, n = r ?? o;
2031
- function i(c, g) {
2032
- return ee("#text", {}, c, g);
2033
+ function mt(e, t, r) {
2034
+ const i = te.length > 0 ? te[te.length - 1] : void 0, n = r ?? i;
2035
+ function s(l, g) {
2036
+ return ee("#text", {}, l, g);
2033
2037
  }
2034
- let s = "";
2035
- for (let c = 0; c < e.length; c++)
2036
- s += e[c], c < t.length && (s += `{{${c}}}`);
2038
+ let o = "";
2039
+ for (let l = 0; l < e.length; l++)
2040
+ o += e[l], l < t.length && (o += `{{${l}}}`);
2037
2041
  const a = /<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, f = [];
2038
- let u, d = [], m = null, l = {}, h, w = 0, $ = [];
2039
- function v(c) {
2040
- !c || typeof c != "object" || ce(c) || (c.props || c.attrs ? (c.props && (l.props || (l.props = {}), Object.assign(l.props, c.props)), c.attrs && (l.attrs || (l.attrs = {}), Object.keys(c.attrs).forEach((g) => {
2041
- if (g === "style" && l.attrs.style) {
2042
- const p = l.attrs.style.replace(
2042
+ let u, d = [], y = null, c = {}, h, k = 0, $ = [];
2043
+ function w(l) {
2044
+ !l || typeof l != "object" || le(l) || (l.props || l.attrs ? (l.props && (c.props || (c.props = {}), Object.assign(c.props, l.props)), l.attrs && (c.attrs || (c.attrs = {}), Object.keys(l.attrs).forEach((g) => {
2045
+ if (g === "style" && c.attrs.style) {
2046
+ const p = c.attrs.style.replace(
2043
2047
  /;?\s*$/,
2044
2048
  ""
2045
- ), _ = c.attrs.style.replace(/^;?\s*/, "");
2046
- l.attrs.style = p + "; " + _;
2047
- } else if (g === "class" && l.attrs.class) {
2048
- const p = l.attrs.class.trim().split(/\s+/).filter(Boolean), _ = c.attrs.class.trim().split(/\s+/).filter(Boolean), E = [
2049
+ ), _ = l.attrs.style.replace(/^;?\s*/, "");
2050
+ c.attrs.style = p + "; " + _;
2051
+ } else if (g === "class" && c.attrs.class) {
2052
+ const p = c.attrs.class.trim().split(/\s+/).filter(Boolean), _ = l.attrs.class.trim().split(/\s+/).filter(Boolean), C = [
2049
2053
  .../* @__PURE__ */ new Set([...p, ..._])
2050
2054
  ];
2051
- l.attrs.class = E.join(" ");
2055
+ c.attrs.class = C.join(" ");
2052
2056
  } else
2053
- l.attrs[g] = c.attrs[g];
2054
- }))) : (l.props || (l.props = {}), Object.assign(l.props, c)));
2055
- }
2056
- function b(c, g) {
2057
- const p = m ? d : $;
2058
- if (ce(c)) {
2059
- const _ = c.key ?? g;
2060
- let E = c.children;
2057
+ c.attrs[g] = l.attrs[g];
2058
+ }))) : (c.props || (c.props = {}), Object.assign(c.props, l)));
2059
+ }
2060
+ function b(l, g) {
2061
+ const p = y ? d : $;
2062
+ if (le(l)) {
2063
+ const _ = l.key ?? g;
2064
+ let C = l.children;
2061
2065
  p.push({
2062
- ...c,
2066
+ ...l,
2063
2067
  key: _,
2064
- children: E
2068
+ children: C
2065
2069
  });
2066
2070
  return;
2067
2071
  }
2068
- if (ie(c)) {
2069
- p.push(pt(c, void 0));
2072
+ if (se(l)) {
2073
+ p.push(ht(l, void 0));
2070
2074
  return;
2071
2075
  }
2072
- if (Array.isArray(c)) {
2073
- if (c.length === 0) return;
2074
- for (let _ = 0; _ < c.length; _++) {
2075
- const E = c[_];
2076
- ce(E) || ie(E) || Array.isArray(E) ? b(E, `${g}-${_}`) : E !== null && typeof E == "object" ? v(E) : p.push(i(String(E), `${g}-${_}`));
2076
+ if (Array.isArray(l)) {
2077
+ if (l.length === 0) return;
2078
+ for (let _ = 0; _ < l.length; _++) {
2079
+ const C = l[_];
2080
+ le(C) || se(C) || Array.isArray(C) ? b(C, `${g}-${_}`) : C !== null && typeof C == "object" ? w(C) : p.push(s(String(C), `${g}-${_}`));
2077
2081
  }
2078
2082
  return;
2079
2083
  }
2080
- if (c !== null && typeof c == "object") {
2081
- v(c);
2084
+ if (l !== null && typeof l == "object") {
2085
+ w(l);
2082
2086
  return;
2083
2087
  }
2084
- p.push(i(String(c), g));
2088
+ p.push(s(String(l), g));
2085
2089
  }
2086
- const y = /* @__PURE__ */ new Set([
2090
+ const m = /* @__PURE__ */ new Set([
2087
2091
  "area",
2088
2092
  "base",
2089
2093
  "br",
@@ -2099,197 +2103,197 @@ function gt(e, t, r) {
2099
2103
  "track",
2100
2104
  "wbr"
2101
2105
  ]);
2102
- for (; u = a.exec(s); )
2106
+ for (; u = a.exec(o); )
2103
2107
  if (u[1]) {
2104
- const c = u[1], g = u[0][1] === "/", p = u[0][u[0].length - 2] === "/" || y.has(c), {
2108
+ const l = u[1], g = u[0][1] === "/", p = u[0][u[0].length - 2] === "/" || m.has(l), {
2105
2109
  props: _,
2106
- attrs: E,
2107
- directives: C
2108
- } = ht(u[2] || "", t, n), S = { props: {}, attrs: {} };
2110
+ attrs: C,
2111
+ directives: E
2112
+ } = gt(u[2] || "", t, n), S = { props: {}, attrs: {} };
2109
2113
  for (const A in _) S.props[A] = _[A];
2110
- for (const A in E) S.attrs[A] = E[A];
2111
- if (C && Object.keys(C).some((A) => A === "model" || A.startsWith("model:")))
2114
+ for (const A in C) S.attrs[A] = C[A];
2115
+ if (E && Object.keys(E).some((A) => A === "model" || A.startsWith("model:")))
2112
2116
  try {
2113
- const A = Symbol.for("cer.registry"), T = globalThis[A], Q = !!(T && typeof T.has == "function" && T.has(c)), X = !!(n && (n.__customElements instanceof Set && n.__customElements.has(c) || Array.isArray(n.__isCustomElements) && n.__isCustomElements.includes(c)));
2114
- if (!!(c.includes("-") || X || Q))
2115
- for (const I of Object.keys(C)) {
2117
+ const A = Symbol.for("cer.registry"), j = globalThis[A], Q = !!(j && typeof j.has == "function" && j.has(l)), X = !!(n && (n.__customElements instanceof Set && n.__customElements.has(l) || Array.isArray(n.__isCustomElements) && n.__isCustomElements.includes(l)));
2118
+ if (!!(l.includes("-") || X || Q))
2119
+ for (const I of Object.keys(E)) {
2116
2120
  if (I !== "model" && !I.startsWith("model:")) continue;
2117
- const Z = C[I], F = Z.arg ?? (I.includes(":") ? I.split(":", 2)[1] : void 0), L = Z.value, K = F ?? "modelValue", D = N, ne = se, k = n ? n._state || n : void 0;
2121
+ const Z = E[I], F = Z.arg ?? (I.includes(":") ? I.split(":", 2)[1] : void 0), L = Z.value, K = F ?? "modelValue", D = z, ne = oe, v = n ? n._state || n : void 0;
2118
2122
  let B;
2119
- typeof L == "string" && n ? B = D(k, L) : B = L, S.props[K] = B;
2123
+ typeof L == "string" && n ? B = D(v, L) : B = L, S.props[K] = B;
2120
2124
  try {
2121
- const j = J(K);
2122
- S.attrs || (S.attrs = {}), B !== void 0 && (S.attrs[j] = B);
2125
+ const T = J(K);
2126
+ S.attrs || (S.attrs = {}), B !== void 0 && (S.attrs[T] = B);
2123
2127
  } catch {
2124
2128
  }
2125
2129
  S.isCustomElement = !0;
2126
- const z = `update:${J(K)}`, O = "on" + z.charAt(0).toUpperCase() + z.slice(1);
2127
- S.props[O] = function(j) {
2128
- const R = j.detail !== void 0 ? j.detail : j.target ? j.target.value : void 0;
2129
- if (!k) return;
2130
- const pe = D(k, typeof L == "string" ? L : String(L));
2131
- (Array.isArray(R) && Array.isArray(pe) ? JSON.stringify([...R].sort()) !== JSON.stringify([...pe].sort()) : R !== pe) && (ne(k, typeof L == "string" ? L : String(L), R), n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
2132
- }, delete C[I];
2130
+ const O = `update:${J(K)}`, P = "on" + O.charAt(0).toUpperCase() + O.slice(1);
2131
+ S.props[P] = function(T) {
2132
+ const R = T.detail !== void 0 ? T.detail : T.target ? T.target.value : void 0;
2133
+ if (!v) return;
2134
+ const pe = D(v, typeof L == "string" ? L : String(L));
2135
+ (Array.isArray(R) && Array.isArray(pe) ? JSON.stringify([...R].sort()) !== JSON.stringify([...pe].sort()) : R !== pe) && (ne(v, typeof L == "string" ? L : String(L), R), n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
2136
+ }, delete E[I];
2133
2137
  }
2134
2138
  } catch {
2135
2139
  }
2136
- if (Object.keys(C).length > 0 && (S.directives = { ...C }), g) {
2140
+ if (Object.keys(E).length > 0 && (S.directives = { ...E }), g) {
2137
2141
  const A = ee(
2138
- m,
2139
- l,
2140
- d.length === 1 && ie(d[0]) && d[0].tag === "#text" ? typeof d[0].children == "string" ? d[0].children : "" : d.length ? d : void 0,
2142
+ y,
2143
+ c,
2144
+ d.length === 1 && se(d[0]) && d[0].tag === "#text" ? typeof d[0].children == "string" ? d[0].children : "" : d.length ? d : void 0,
2141
2145
  h
2142
- ), T = f.pop();
2143
- T ? (m = T.tag, l = T.props, h = T.key, d = T.children, d.push(A)) : ($.push(A), m = null, l = {}, h = void 0, d = []);
2144
- } else p ? m ? d.push(ee(c, S, void 0, void 0)) : $.push(ee(c, S, void 0, void 0)) : (m && f.push({
2145
- tag: m,
2146
- props: l,
2146
+ ), j = f.pop();
2147
+ j ? (y = j.tag, c = j.props, h = j.key, d = j.children, d.push(A)) : ($.push(A), y = null, c = {}, h = void 0, d = []);
2148
+ } else p ? y ? d.push(ee(l, S, void 0, void 0)) : $.push(ee(l, S, void 0, void 0)) : (y && f.push({
2149
+ tag: y,
2150
+ props: c,
2147
2151
  children: d,
2148
2152
  key: h
2149
- }), m = c, l = S, d = []);
2153
+ }), y = l, c = S, d = []);
2150
2154
  } else if (typeof u[3] < "u") {
2151
- const c = Number(u[3]), g = t[c], p = `interp-${c}`;
2155
+ const l = Number(u[3]), g = t[l], p = `interp-${l}`;
2152
2156
  b(g, p);
2153
2157
  } else if (u[4]) {
2154
- const c = u[4], g = m ? d : $, p = c.split(/({{\d+}})/);
2158
+ const l = u[4], g = y ? d : $, p = l.split(/({{\d+}})/);
2155
2159
  for (const _ of p) {
2156
2160
  if (!_) continue;
2157
- const E = _.match(/^{{(\d+)}}$/);
2158
- if (E) {
2159
- const C = Number(E[1]), S = t[C], A = `interp-${C}`;
2161
+ const C = _.match(/^{{(\d+)}}$/);
2162
+ if (C) {
2163
+ const E = Number(C[1]), S = t[E], A = `interp-${E}`;
2160
2164
  b(S, A);
2161
2165
  } else {
2162
- const C = `text-${w++}`;
2163
- g.push(i(_, C));
2166
+ const E = `text-${k++}`;
2167
+ g.push(s(_, E));
2164
2168
  }
2165
2169
  }
2166
2170
  }
2167
- const x = $.filter((c) => ie(c) && c.tag === "#text" ? typeof c.children == "string" && c.children.trim() !== "" : !0);
2171
+ const x = $.filter((l) => se(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0);
2168
2172
  return x.length === 1 ? x[0] : x.length > 1 ? x : ee("div", {}, "", "fallback-root");
2169
2173
  }
2170
2174
  function U(e, ...t) {
2171
- const r = t[t.length - 1], o = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
2172
- return gt(e, t, o);
2175
+ const r = t[t.length - 1], i = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
2176
+ return mt(e, t, i);
2173
2177
  }
2174
- const je = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, W = (e, t) => {
2178
+ const Te = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, W = (e, t) => {
2175
2179
  for (const r of e) {
2176
- const o = [], n = r.path.replace(/:[^/]+/g, (a) => (o.push(a.slice(1)), "([^/]+)")), i = new RegExp(`^${n}$`), s = t.match(i);
2177
- if (s) {
2180
+ const i = [], n = r.path.replace(/:[^/]+/g, (a) => (i.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${n}$`), o = t.match(s);
2181
+ if (o) {
2178
2182
  const a = {};
2179
- return o.forEach((f, u) => {
2180
- a[f] = s[u + 1];
2183
+ return i.forEach((f, u) => {
2184
+ a[f] = o[u + 1];
2181
2185
  }), { route: r, params: a };
2182
2186
  }
2183
2187
  }
2184
2188
  return { route: null, params: {} };
2185
- }, we = {};
2189
+ }, ke = {};
2186
2190
  async function yt(e) {
2187
2191
  if (e.component) return e.component;
2188
2192
  if (e.load) {
2189
- if (we[e.path]) return we[e.path];
2193
+ if (ke[e.path]) return ke[e.path];
2190
2194
  try {
2191
2195
  const t = await e.load();
2192
- return we[e.path] = t.default, t.default;
2196
+ return ke[e.path] = t.default, t.default;
2193
2197
  } catch {
2194
2198
  throw new Error(`Failed to load component for route: ${e.path}`);
2195
2199
  }
2196
2200
  }
2197
2201
  throw new Error(`No component or loader defined for route: ${e.path}`);
2198
2202
  }
2199
- function mt(e) {
2200
- const { routes: t, base: r = "", initialUrl: o } = e;
2201
- let n, i, s, a, f, u, d;
2202
- const m = async ($, v) => {
2203
- const b = t.find((y) => W([y], $.path).route !== null);
2203
+ function bt(e) {
2204
+ const { routes: t, base: r = "", initialUrl: i } = e;
2205
+ let n, s, o, a, f, u, d;
2206
+ const y = async ($, w) => {
2207
+ const b = t.find((m) => W([m], $.path).route !== null);
2204
2208
  if (b?.beforeEnter)
2205
2209
  try {
2206
- const y = await b.beforeEnter($, v);
2207
- return typeof y == "string" ? (await w(y, !0), !1) : y !== !1;
2208
- } catch (y) {
2209
- return console.error("beforeEnter error", y), !1;
2210
+ const m = await b.beforeEnter($, w);
2211
+ return typeof m == "string" ? (await k(m, !0), !1) : m !== !1;
2212
+ } catch (m) {
2213
+ return console.error("beforeEnter error", m), !1;
2210
2214
  }
2211
2215
  return !0;
2212
- }, l = async ($, v) => {
2213
- const b = t.find((y) => W([y], $.path).route !== null);
2216
+ }, c = async ($, w) => {
2217
+ const b = t.find((m) => W([m], $.path).route !== null);
2214
2218
  if (b?.onEnter)
2215
2219
  try {
2216
- const y = await b.onEnter($, v);
2217
- return typeof y == "string" ? (await w(y, !0), !1) : y !== !1;
2218
- } catch (y) {
2219
- return console.error("onEnter error", y), !1;
2220
+ const m = await b.onEnter($, w);
2221
+ return typeof m == "string" ? (await k(m, !0), !1) : m !== !1;
2222
+ } catch (m) {
2223
+ return console.error("onEnter error", m), !1;
2220
2224
  }
2221
2225
  return !0;
2222
- }, h = ($, v) => {
2223
- const b = t.find((y) => W([y], $.path).route !== null);
2226
+ }, h = ($, w) => {
2227
+ const b = t.find((m) => W([m], $.path).route !== null);
2224
2228
  if (b?.afterEnter)
2225
2229
  try {
2226
- b.afterEnter($, v);
2227
- } catch (y) {
2228
- console.error("afterEnter error", y);
2230
+ b.afterEnter($, w);
2231
+ } catch (m) {
2232
+ console.error("afterEnter error", m);
2229
2233
  }
2230
- }, w = async ($, v = !1) => {
2234
+ }, k = async ($, w = !1) => {
2231
2235
  try {
2232
2236
  const b = {
2233
2237
  path: $.replace(r, "") || "/",
2234
2238
  query: {}
2235
- }, y = W(t, b.path);
2236
- if (!y) throw new Error(`No route found for ${b.path}`);
2237
- const x = s.getState(), c = {
2239
+ }, m = W(t, b.path);
2240
+ if (!m) throw new Error(`No route found for ${b.path}`);
2241
+ const x = o.getState(), l = {
2238
2242
  path: b.path,
2239
- params: y.params,
2243
+ params: m.params,
2240
2244
  query: b.query
2241
2245
  };
2242
- if (!await m(c, x) || !await l(c, x)) return;
2243
- typeof window < "u" && typeof document < "u" && (v ? window.history.replaceState({}, "", r + $) : window.history.pushState({}, "", r + $)), s.setState(c), h(c, x);
2246
+ if (!await y(l, x) || !await c(l, x)) return;
2247
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + $) : window.history.pushState({}, "", r + $)), o.setState(l), h(l, x);
2244
2248
  } catch (b) {
2245
2249
  console.error("Navigation error:", b);
2246
2250
  }
2247
2251
  };
2248
2252
  if (typeof window < "u" && typeof document < "u") {
2249
2253
  n = () => {
2250
- const v = new URL(window.location.href), b = v.pathname.replace(r, "") || "/", y = je(v.search);
2251
- return { path: b, query: y };
2252
- }, i = n();
2253
- const $ = W(t, i.path);
2254
- s = $e({
2255
- path: i.path,
2254
+ const w = new URL(window.location.href), b = w.pathname.replace(r, "") || "/", m = Te(w.search);
2255
+ return { path: b, query: m };
2256
+ }, s = n();
2257
+ const $ = W(t, s.path);
2258
+ o = $e({
2259
+ path: s.path,
2256
2260
  params: $.params,
2257
- query: i.query
2258
- }), a = async (v = !1) => {
2261
+ query: s.query
2262
+ }), a = async (w = !1) => {
2259
2263
  const b = n();
2260
- await w(b.path, v);
2261
- }, window.addEventListener("popstate", () => a(!0)), f = (v) => w(v, !1), u = (v) => w(v, !0), d = () => window.history.back();
2264
+ await k(b.path, w);
2265
+ }, window.addEventListener("popstate", () => a(!0)), f = (w) => k(w, !1), u = (w) => k(w, !0), d = () => window.history.back();
2262
2266
  } else {
2263
2267
  n = () => {
2264
- const b = new URL(o || "/", "http://localhost"), y = b.pathname.replace(r, "") || "/", x = je(b.search);
2265
- return { path: y, query: x };
2266
- }, i = n();
2267
- const $ = W(t, i.path);
2268
- s = $e({
2269
- path: i.path,
2268
+ const b = new URL(i || "/", "http://localhost"), m = b.pathname.replace(r, "") || "/", x = Te(b.search);
2269
+ return { path: m, query: x };
2270
+ }, s = n();
2271
+ const $ = W(t, s.path);
2272
+ o = $e({
2273
+ path: s.path,
2270
2274
  params: $.params,
2271
- query: i.query
2275
+ query: s.query
2272
2276
  }), a = async () => {
2273
2277
  const b = n();
2274
- await v(b.path);
2278
+ await w(b.path);
2275
2279
  };
2276
- const v = async (b) => {
2280
+ const w = async (b) => {
2277
2281
  try {
2278
- const y = {
2282
+ const m = {
2279
2283
  path: b.replace(r, "") || "/",
2280
2284
  query: {}
2281
- }, x = W(t, y.path);
2282
- if (!x) throw new Error(`No route found for ${y.path}`);
2283
- const c = s.getState(), g = {
2284
- path: y.path,
2285
+ }, x = W(t, m.path);
2286
+ if (!x) throw new Error(`No route found for ${m.path}`);
2287
+ const l = o.getState(), g = {
2288
+ path: m.path,
2285
2289
  params: x.params,
2286
- query: y.query
2290
+ query: m.query
2287
2291
  }, p = t.find((_) => W([_], g.path).route !== null);
2288
2292
  if (p?.beforeEnter)
2289
2293
  try {
2290
- const _ = await p.beforeEnter(g, c);
2294
+ const _ = await p.beforeEnter(g, l);
2291
2295
  if (typeof _ == "string") {
2292
- await v(_);
2296
+ await w(_);
2293
2297
  return;
2294
2298
  }
2295
2299
  if (_ === !1) return;
@@ -2298,53 +2302,53 @@ function mt(e) {
2298
2302
  }
2299
2303
  if (p?.onEnter)
2300
2304
  try {
2301
- const _ = await p.onEnter(g, c);
2305
+ const _ = await p.onEnter(g, l);
2302
2306
  if (typeof _ == "string") {
2303
- await v(_);
2307
+ await w(_);
2304
2308
  return;
2305
2309
  }
2306
2310
  if (_ === !1) return;
2307
2311
  } catch {
2308
2312
  return;
2309
2313
  }
2310
- if (s.setState(g), p?.afterEnter)
2314
+ if (o.setState(g), p?.afterEnter)
2311
2315
  try {
2312
- p.afterEnter(g, c);
2316
+ p.afterEnter(g, l);
2313
2317
  } catch {
2314
2318
  }
2315
2319
  } catch {
2316
2320
  }
2317
2321
  };
2318
- f = async (b) => v(b), u = async (b) => v(b), d = () => {
2322
+ f = async (b) => w(b), u = async (b) => w(b), d = () => {
2319
2323
  };
2320
2324
  }
2321
2325
  return {
2322
- store: s,
2326
+ store: o,
2323
2327
  push: f,
2324
2328
  replace: u,
2325
2329
  back: d,
2326
- subscribe: s.subscribe,
2330
+ subscribe: o.subscribe,
2327
2331
  matchRoute: ($) => W(t, $),
2328
- getCurrent: () => s.getState(),
2332
+ getCurrent: () => o.getState(),
2329
2333
  resolveRouteComponent: yt
2330
2334
  };
2331
2335
  }
2332
2336
  function Ct(e, t) {
2333
2337
  return W(e, t);
2334
2338
  }
2335
- function Et(e) {
2336
- const t = mt(e);
2337
- return Te("router-view", {
2339
+ function At(e) {
2340
+ const t = bt(e);
2341
+ return je("router-view", {
2338
2342
  async render() {
2339
2343
  if (!t) return U`<div>Router not initialized.</div>`;
2340
- const r = t.getCurrent(), { path: o } = r, n = t.matchRoute(o);
2344
+ const r = t.getCurrent(), { path: i } = r, n = t.matchRoute(i);
2341
2345
  if (!n.route) return U`<div>Not found</div>`;
2342
2346
  try {
2343
- const i = await t.resolveRouteComponent(n.route);
2344
- if (typeof i == "string")
2345
- return { tag: i, props: {}, children: [] };
2346
- if (typeof i == "function") {
2347
- const s = i(), a = s instanceof Promise ? await s : s;
2347
+ const s = await t.resolveRouteComponent(n.route);
2348
+ if (typeof s == "string")
2349
+ return { tag: s, props: {}, children: [] };
2350
+ if (typeof s == "function") {
2351
+ const o = s(), a = o instanceof Promise ? await o : o;
2348
2352
  return typeof a == "string" ? { tag: a, props: {}, children: [] } : a;
2349
2353
  }
2350
2354
  return U`<div>Invalid route component</div>`;
@@ -2357,7 +2361,7 @@ function Et(e) {
2357
2361
  typeof r.requestRender == "function" && r.requestRender();
2358
2362
  });
2359
2363
  }
2360
- }), Te("router-link", {
2364
+ }), je("router-link", {
2361
2365
  state: {},
2362
2366
  props: {
2363
2367
  to: { type: String, default: "" },
@@ -2370,7 +2374,7 @@ function Et(e) {
2370
2374
  disabled: { type: Boolean, default: !1 },
2371
2375
  external: { type: Boolean, default: !1 },
2372
2376
  class: { type: String, default: "" },
2373
- style: { type: String, default: ze`
2377
+ style: { type: String, default: Oe`
2374
2378
  [aria-disabled="true"] {
2375
2379
  pointer-events: none;
2376
2380
  opacity: 0.5;
@@ -2379,22 +2383,22 @@ function Et(e) {
2379
2383
  },
2380
2384
  style: (r) => r.style,
2381
2385
  render: (r) => {
2382
- const o = t.getCurrent(), n = r.to, i = r.exact, s = r.exactActiveClass, a = r.activeClass, f = r.ariaCurrentValue, u = r.tag, d = r.disabled, m = r.external, l = o.path === n, h = i ? l : o && typeof o.path == "string" ? o.path.startsWith(n) : !1, w = l ? `aria-current="${f}"` : "", $ = (r.class || "").split(/\s+/).filter(Boolean), v = {};
2383
- for (const g of $) v[g] = !0;
2386
+ const i = t.getCurrent(), n = r.to, s = r.exact, o = r.exactActiveClass, a = r.activeClass, f = r.ariaCurrentValue, u = r.tag, d = r.disabled, y = r.external, c = i.path === n, h = s ? c : i && typeof i.path == "string" ? i.path.startsWith(n) : !1, k = c ? `aria-current="${f}"` : "", $ = (r.class || "").split(/\s+/).filter(Boolean), w = {};
2387
+ for (const g of $) w[g] = !0;
2384
2388
  const b = {
2385
- ...v,
2389
+ ...w,
2386
2390
  // Also include the configurable names (may duplicate the above)
2387
2391
  [a]: h,
2388
- [s]: l
2389
- }, y = u === "button", x = d ? y ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", c = m && (u === "a" || !u) ? 'target="_blank" rel="noopener noreferrer"' : "";
2392
+ [o]: c
2393
+ }, m = u === "button", x = d ? m ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", l = y && (u === "a" || !u) ? 'target="_blank" rel="noopener noreferrer"' : "";
2390
2394
  return U`
2391
- ${Oe().when(y, U`
2395
+ ${Pe().when(m, U`
2392
2396
  <button
2393
2397
  part="button"
2394
2398
  :class="${b}"
2395
- ${w}
2399
+ ${k}
2396
2400
  ${x}
2397
- ${c}
2401
+ ${l}
2398
2402
  @click="navigate"
2399
2403
  ><slot></slot></button>
2400
2404
  `).otherwise(U`
@@ -2402,44 +2406,44 @@ function Et(e) {
2402
2406
  part="link"
2403
2407
  href="${n}"
2404
2408
  :class="${b}"
2405
- ${w}
2409
+ ${k}
2406
2410
  ${x}
2407
- ${c}
2411
+ ${l}
2408
2412
  @click="navigate"
2409
2413
  ><slot></slot></a>
2410
2414
  `).done()}
2411
2415
  `;
2412
2416
  },
2413
- navigate: (r, o) => {
2414
- if (o.disabled) {
2417
+ navigate: (r, i) => {
2418
+ if (i.disabled) {
2415
2419
  r.preventDefault();
2416
2420
  return;
2417
2421
  }
2418
- o.external && (o.tag === "a" || !o.tag) || (r.preventDefault(), o.replace ? t.replace(o.to) : t.push(o.to));
2422
+ i.external && (i.tag === "a" || !i.tag) || (r.preventDefault(), i.replace ? t.replace(i.to) : t.push(i.to));
2419
2423
  }
2420
2424
  }), t;
2421
2425
  }
2422
2426
  export {
2423
2427
  G as GlobalEventBus,
2424
- Te as component,
2428
+ je as component,
2425
2429
  $e as createStore,
2426
- ze as css,
2427
- xt as each,
2428
- wt as emit,
2430
+ Oe as css,
2431
+ kt as each,
2432
+ vt as emit,
2429
2433
  re as eventBus,
2430
2434
  U as html,
2431
- Et as initRouter,
2432
- St as listen,
2433
- Oe as match,
2435
+ At as initRouter,
2436
+ Et as listen,
2437
+ Pe as match,
2434
2438
  W as matchRoute,
2435
2439
  Ct as matchRouteSSR,
2436
- $t as off,
2437
- kt as on,
2438
- _t as once,
2439
- je as parseQuery,
2440
+ _t as off,
2441
+ $t as on,
2442
+ St as once,
2443
+ Te as parseQuery,
2440
2444
  he as renderToString,
2441
2445
  yt as resolveRouteComponent,
2442
- mt as useRouter,
2443
- vt as when
2446
+ bt as useRouter,
2447
+ xt as when
2444
2448
  };
2445
2449
  //# sourceMappingURL=custom-elements-runtime.es.js.map