@tempots/dom 28.1.4 → 28.2.0

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.
package/index.js CHANGED
@@ -17,7 +17,7 @@ const $e = (s, e, t) => {
17
17
  }
18
18
  return n;
19
19
  }, Ne = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), Ie = (s, e) => e, Re = (s) => typeof s == "number" ? ke : typeof s == "string" ? $e : s instanceof Date ? Ne : Ie;
20
- var w;
20
+ var E;
21
21
  class Q {
22
22
  /**
23
23
  * Creates a new instance of `ElementPosition`.
@@ -44,10 +44,10 @@ class Q {
44
44
  * @returns `true` if the counter is odd, `false` otherwise.
45
45
  */
46
46
  i(this, "isOdd");
47
- ie(this, w);
47
+ ie(this, E);
48
48
  i(this, "dispose", () => {
49
49
  var e;
50
- (e = I(this, w)) == null || e.dispose(), z(this, w, void 0);
50
+ (e = I(this, E)) == null || e.dispose(), z(this, E, void 0);
51
51
  });
52
52
  this.index = e, this.total = t, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
53
53
  }
@@ -56,10 +56,10 @@ class Q {
56
56
  * @returns `true` if the element is the last element, `false` otherwise.
57
57
  */
58
58
  get isLast() {
59
- return I(this, w) == null && z(this, w, this.total.map((e) => this.counter === e)), I(this, w);
59
+ return I(this, E) == null && z(this, E, this.total.map((e) => this.counter === e)), I(this, E);
60
60
  }
61
61
  }
62
- w = new WeakMap();
62
+ E = new WeakMap();
63
63
  const H = class H {
64
64
  /**
65
65
  * Represents a signal with a value of type T.
@@ -298,7 +298,7 @@ const H = class H {
298
298
  * @returns A property that holds the mapped value and can be observed for changes.
299
299
  */
300
300
  i(this, "mapAsync", (e, t, r, n = (o, l) => o === l) => {
301
- const o = E(t, n);
301
+ const o = v(t, n);
302
302
  let l = 0, c = new AbortController();
303
303
  return o.onDispose(
304
304
  this.on(async (a) => {
@@ -348,7 +348,7 @@ const H = class H {
348
348
  i(this, "deriveProp", ({
349
349
  autoDisposeProp: e = !0,
350
350
  equals: t
351
- } = {}) => this.feedProp(E(this.get(), t), e));
351
+ } = {}) => this.feedProp(v(this.get(), t), e));
352
352
  /**
353
353
  * Derives a new signal from the current signal. Useful to create a new signal that emits the same values as the current signal but can be disposed independently.
354
354
  * @returns A new signal that emits the same values as the current signal.
@@ -619,7 +619,10 @@ const Z = (s, e, t = (r, n) => r === n) => {
619
619
  n.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", o);
620
620
  };
621
621
  return t.abortSignal != null && t.abortSignal.addEventListener("abort", o), o;
622
- }, E = (s, e = (t, r) => t === r) => new V(s, e), G = (s, e = (t, r) => t === r) => new d(s, e), le = () => typeof window < "u" ? window : void 0, y = {
622
+ }, v = (s, e = (t, r) => t === r) => new V(s, e), G = (s, e = (t, r) => t === r) => new d(s, e), le = () => (
623
+ /* c8 ignore next */
624
+ typeof window < "u" ? window : void 0
625
+ ), y = {
623
626
  /**
624
627
  * Maps a value or a Signal to a new value.
625
628
  * If the value is a Signal, it returns a new Signal with the mapped value.
@@ -689,7 +692,7 @@ const Z = (s, e, t = (r, n) => r === n) => {
689
692
  deriveProp: (s, {
690
693
  autoDisposeProp: e = !0,
691
694
  equals: t
692
- } = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : E(s, t)
695
+ } = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : v(s, t)
693
696
  }, qe = (...s) => (e, t) => {
694
697
  const r = s.filter((n) => d.is(n));
695
698
  return Z(
@@ -749,12 +752,14 @@ const ae = ({
749
752
  var e;
750
753
  return ae({
751
754
  ...s,
755
+ /* c8 ignore next 3 */
752
756
  store: ((e = le()) == null ? void 0 : e.localStorage) ?? new ce()
753
757
  });
754
758
  }, Mt = (s) => {
755
759
  var e;
756
760
  return ae({
757
761
  ...s,
762
+ /* c8 ignore next 3 */
758
763
  store: ((e = le()) == null ? void 0 : e.sessionStorage) ?? new ce()
759
764
  });
760
765
  };
@@ -762,26 +767,27 @@ function oe(s) {
762
767
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
763
768
  }
764
769
  const Fe = (s, e, t, r) => {
765
- const n = (r == null ? void 0 : r.duration) ?? 300, o = (r == null ? void 0 : r.easing) ?? ((S) => S), l = (r == null ? void 0 : r.equals) ?? ((S, N) => S === N);
766
- let c = r == null ? void 0 : r.interpolate, a = s, u = e(), h = performance.now(), g = null, b = !0;
767
- const p = new P(e, l), m = E(s, l);
770
+ const n = (r == null ? void 0 : r.duration) ?? 300, o = (r == null ? void 0 : r.easing) ?? ((A) => A), l = (r == null ? void 0 : r.equals) ?? ((A, N) => A === N);
771
+ let c = r == null ? void 0 : r.interpolate, a = s, u = e(), h = performance.now(), g = null, T = !0;
772
+ const p = new P(e, l), m = v(s, l);
768
773
  m.onDispose(() => {
769
774
  g !== null && cancelAnimationFrame(g);
770
- }), m.onDispose(p.dispose), t.forEach((S) => {
771
- S.setDerivative(p), S.onDispose(m.dispose);
775
+ }), m.onDispose(p.dispose), t.forEach((A) => {
776
+ A.setDerivative(p), A.onDispose(m.dispose);
772
777
  });
773
- const C = (S) => {
774
- u = S, h = performance.now(), a = m.value, b && (b = !1, g = oe(te));
778
+ const C = (A) => {
779
+ u = A, h = performance.now(), a = m.value, T && (T = !1, g = oe(te));
775
780
  }, te = () => {
776
781
  const N = (performance.now() - h) / y.get(n), Oe = o(N);
777
782
  c == null && (c = Re(a));
778
783
  let se = c(a, u, Oe);
779
- N >= 1 ? (b = !0, se = u) : g = oe(te), m.set(se);
784
+ N >= 1 ? (T = !0, se = u) : g = oe(te), m.set(se);
780
785
  };
781
786
  return p.on(C), m;
782
787
  }, Ht = (s, e) => {
783
788
  const { initialValue: t, ...r } = e ?? {};
784
789
  return Fe(
790
+ /* c8 ignore next 2 */
785
791
  t ?? s.get(),
786
792
  s.get,
787
793
  [s],
@@ -795,7 +801,20 @@ const Fe = (s, e, t, r) => {
795
801
  n[o] = y.get(s[o]);
796
802
  return e(n);
797
803
  }, t);
798
- }, kt = (s) => Be(s, (e) => e), ue = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), he = /* @__PURE__ */ new Set(["selected"]), fe = /* @__PURE__ */ new Set([
804
+ }, kt = (s) => Be(s, (e) => e), $t = (s, e) => {
805
+ const t = v(s.get());
806
+ let r = null;
807
+ return s.on((n) => {
808
+ r != null && clearTimeout(r), r = setTimeout(
809
+ () => {
810
+ r = null, t.set(n);
811
+ },
812
+ typeof e == "function" ? e(n) : e
813
+ );
814
+ }), t.onDispose(() => {
815
+ r != null && clearTimeout(r);
816
+ }), t;
817
+ }, ue = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), he = /* @__PURE__ */ new Set(["selected"]), fe = /* @__PURE__ */ new Set([
799
818
  "rowSpan",
800
819
  "colSpan",
801
820
  "tabIndex",
@@ -1100,7 +1119,7 @@ class L {
1100
1119
  const Ge = (s) => Symbol(s), K = (s, e) => {
1101
1120
  const t = s(e);
1102
1121
  return (r = !0) => t(r);
1103
- }, $t = (s, e, { doc: t, clear: r, disposeWithParent: n = !0, providers: o = {} } = {}) => {
1122
+ }, Nt = (s, e, { doc: t, clear: r, disposeWithParent: n = !0, providers: o = {} } = {}) => {
1104
1123
  const l = typeof e == "string" ? (t ?? document).querySelector(e) : e;
1105
1124
  if (l === null)
1106
1125
  throw new Xe(
@@ -1109,9 +1128,9 @@ const Ge = (s) => Symbol(s), K = (s, e) => {
1109
1128
  r !== !1 && (t ?? l.ownerDocument) != null && l.nodeType === 1 && (l.innerHTML = "");
1110
1129
  const c = Je(l), a = ge(l) ? void 0 : l, u = L.of(c, a, o), h = K(s, u);
1111
1130
  let g;
1112
- return n && (g = new MutationObserver((b) => {
1131
+ return n && (g = new MutationObserver((T) => {
1113
1132
  var p;
1114
- (p = b[0]) == null || p.removedNodes.forEach((m) => {
1133
+ (p = T[0]) == null || p.removedNodes.forEach((m) => {
1115
1134
  m === l && (g == null || g.disconnect(), h(l.nodeType !== 1));
1116
1135
  });
1117
1136
  }), g.observe(l.parentElement, {
@@ -1121,14 +1140,14 @@ const Ge = (s) => Symbol(s), K = (s, e) => {
1121
1140
  })), () => {
1122
1141
  g == null || g.disconnect(), h(!0);
1123
1142
  };
1124
- }, Nt = (s, {
1143
+ }, It = (s, {
1125
1144
  startUrl: e = "https://example.com",
1126
1145
  selector: t,
1127
1146
  providers: r = {}
1128
1147
  } = {
1129
1148
  selector: "body"
1130
1149
  }) => {
1131
- const n = y.toSignal(e).deriveProp(), o = new Se(t, void 0), l = new D(o, void 0, { currentURL: n }, r);
1150
+ const n = y.toSignal(e).deriveProp(), o = new Ae(t, void 0), l = new D(o, void 0, { currentURL: n }, r);
1132
1151
  return {
1133
1152
  clear: K(s(), l),
1134
1153
  root: o,
@@ -1141,7 +1160,7 @@ class Xe extends Error {
1141
1160
  }
1142
1161
  }
1143
1162
  const ye = "data-tts-node", q = "data-tts-class", F = "data-tts-style", B = "data-tts-html", W = "data-tts-text", U = "data-tts-attrs";
1144
- class It {
1163
+ class Rt {
1145
1164
  constructor({
1146
1165
  select: e,
1147
1166
  getAttribute: t,
@@ -1154,7 +1173,7 @@ class It {
1154
1173
  getInnerHTML: u,
1155
1174
  setInnerHTML: h,
1156
1175
  getInnerText: g,
1157
- setInnerText: b
1176
+ setInnerText: T
1158
1177
  }) {
1159
1178
  /**
1160
1179
  * Selects elements from the headless environment.
@@ -1297,7 +1316,7 @@ class It {
1297
1316
  }
1298
1317
  });
1299
1318
  });
1300
- this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = o, this.getStyles = l, this.setStyles = c, this.appendHTML = a, this.getInnerHTML = u, this.setInnerHTML = h, this.getInnerText = g, this.setInnerText = b;
1319
+ this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = o, this.getStyles = l, this.setStyles = c, this.appendHTML = a, this.getInnerHTML = u, this.setInnerHTML = h, this.getInnerText = g, this.setInnerText = T;
1301
1320
  }
1302
1321
  }
1303
1322
  const Ye = () => {
@@ -1317,10 +1336,10 @@ const Ye = () => {
1317
1336
  s.removeAttribute(W), e != null && (s.innerText = e);
1318
1337
  }, tt = () => {
1319
1338
  document.querySelectorAll(`[${W}]`).forEach((e) => et(e));
1320
- }, be = (s) => JSON.parse(s.replace(/&quot;/g, '"')), st = (s) => {
1339
+ }, Te = (s) => JSON.parse(s.replace(/&quot;/g, '"')), st = (s) => {
1321
1340
  const e = s.getAttribute(F);
1322
1341
  if (s.removeAttribute(F), e != null) {
1323
- const t = be(e);
1342
+ const t = Te(e);
1324
1343
  Object.entries(t).forEach(([r, n]) => {
1325
1344
  s.style.setProperty(r, n);
1326
1345
  });
@@ -1330,19 +1349,19 @@ const Ye = () => {
1330
1349
  }, nt = (s) => {
1331
1350
  const e = s.getAttribute(U);
1332
1351
  if (s.removeAttribute(U), e != null) {
1333
- const t = be(e);
1352
+ const t = Te(e);
1334
1353
  Object.entries(t).forEach(([r, n]) => {
1335
1354
  n == null ? s.removeAttribute(r) : s.setAttribute(r, n);
1336
1355
  });
1337
1356
  }
1338
1357
  }, it = () => {
1339
1358
  document.querySelectorAll(`[${U}]`).forEach((e) => nt(e));
1340
- }, Rt = () => {
1359
+ }, Vt = () => {
1341
1360
  Ye(), Qe(), tt(), Ke(), rt(), it();
1342
- }, A = Symbol("class"), _ = Symbol("style"), x = Symbol("handler"), Te = () => Math.random().toString(36).substring(2, 15), ot = (s) => s.replace(/<[^>]*>?/g, "");
1343
- class Ae {
1361
+ }, S = Symbol("class"), w = Symbol("style"), x = Symbol("handler"), be = () => Math.random().toString(36).substring(2, 15), ot = (s) => s.replace(/<[^>]*>?/g, "");
1362
+ class Se {
1344
1363
  constructor(e) {
1345
- i(this, "id", Te());
1364
+ i(this, "id", be());
1346
1365
  i(this, "properties", {});
1347
1366
  i(this, "children", []);
1348
1367
  i(this, "isElement", () => !0);
@@ -1368,8 +1387,8 @@ class Ae {
1368
1387
  i(this, "getInnerText", () => this.properties.innerText ?? "");
1369
1388
  i(this, "hasInnerText", () => this.properties.innerText != null);
1370
1389
  i(this, "hasChildren", () => this.children.length > 0);
1371
- i(this, "hasClasses", () => this.properties[A] != null);
1372
- i(this, "hasStyles", () => this.properties[_] != null);
1390
+ i(this, "hasClasses", () => this.properties[S] != null);
1391
+ i(this, "hasStyles", () => this.properties[w] != null);
1373
1392
  i(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
1374
1393
  i(this, "hasHandlers", () => this.properties[x] != null);
1375
1394
  i(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
@@ -1404,7 +1423,7 @@ class Ae {
1404
1423
  var r;
1405
1424
  if (e.length === 0)
1406
1425
  return;
1407
- const t = (r = this.properties)[A] ?? (r[A] = []);
1426
+ const t = (r = this.properties)[S] ?? (r[S] = []);
1408
1427
  e.forEach((n) => {
1409
1428
  t.includes(n) || t.push(n);
1410
1429
  });
@@ -1413,29 +1432,29 @@ class Ae {
1413
1432
  var r;
1414
1433
  if (e.length === 0)
1415
1434
  return;
1416
- const t = (r = this.properties)[A] ?? (r[A] = []);
1435
+ const t = (r = this.properties)[S] ?? (r[S] = []);
1417
1436
  e.forEach((n) => {
1418
1437
  const o = t.indexOf(n);
1419
1438
  o !== -1 && t.splice(o, 1);
1420
- }), t.length === 0 && delete this.properties[A];
1439
+ }), t.length === 0 && delete this.properties[S];
1421
1440
  });
1422
- i(this, "getClasses", () => this.properties[A] ?? []);
1441
+ i(this, "getClasses", () => this.properties[S] ?? []);
1423
1442
  i(this, "getAttributes", () => Object.entries(this.properties).filter(
1424
1443
  ([e]) => !["innerText", "innerHTML"].includes(e)
1425
1444
  ));
1426
1445
  i(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
1427
- (e) => e === A ? [["class", this.getClasses()]] : e === _ ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1446
+ (e) => e === S ? [["class", this.getClasses()]] : e === w ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1428
1447
  ));
1429
1448
  i(this, "setStyle", (e, t) => {
1430
1449
  var n;
1431
- const r = (n = this.properties)[_] ?? (n[_] = {});
1432
- r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[_]);
1450
+ const r = (n = this.properties)[w] ?? (n[w] = {});
1451
+ r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[w]);
1433
1452
  });
1434
1453
  i(this, "getStyle", (e) => {
1435
1454
  var t;
1436
- return ((t = this.properties[_]) == null ? void 0 : t[e]) ?? "";
1455
+ return ((t = this.properties[w]) == null ? void 0 : t[e]) ?? "";
1437
1456
  });
1438
- i(this, "getStyles", () => this.properties[_] ?? {});
1457
+ i(this, "getStyles", () => this.properties[w] ?? {});
1439
1458
  i(this, "makeAccessors", (e) => {
1440
1459
  const t = this.properties;
1441
1460
  return {
@@ -1447,7 +1466,7 @@ class Ae {
1447
1466
  }
1448
1467
  }
1449
1468
  const lt = (s) => s.replace(/"/g, "&quot;"), ct = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1450
- class at extends Ae {
1469
+ class at extends Se {
1451
1470
  constructor(t, r, n) {
1452
1471
  super(n);
1453
1472
  i(this, "isPortal", () => !1);
@@ -1460,7 +1479,7 @@ class at extends Ae {
1460
1479
  this.tagName = t, this.namespace = r;
1461
1480
  }
1462
1481
  }
1463
- class Se extends Ae {
1482
+ class Ae extends Se {
1464
1483
  constructor(t, r) {
1465
1484
  super(r);
1466
1485
  i(this, "isPortal", () => !0);
@@ -1471,7 +1490,7 @@ class Se extends Ae {
1471
1490
  }
1472
1491
  class ut {
1473
1492
  constructor(e) {
1474
- i(this, "id", Te());
1493
+ i(this, "id", be());
1475
1494
  i(this, "isElement", () => !1);
1476
1495
  i(this, "isText", () => !0);
1477
1496
  i(this, "getText", () => this.text);
@@ -1515,7 +1534,7 @@ class D {
1515
1534
  });
1516
1535
  i(this, "makeRef", () => this.makeChildText(""));
1517
1536
  i(this, "makePortal", (e) => {
1518
- const t = new Se(e, this.element);
1537
+ const t = new Ae(e, this.element);
1519
1538
  return this.appendOrInsert(t), new D(
1520
1539
  t,
1521
1540
  void 0,
@@ -1569,12 +1588,12 @@ const ht = /* @__PURE__ */ new Set([
1569
1588
  return (n) => {
1570
1589
  r(), t.clear(n);
1571
1590
  };
1572
- }, Vt = (s) => d.is(s) ? _e(s) : ve(s), T = (...s) => (e) => {
1591
+ }, jt = (s) => d.is(s) ? _e(s) : ve(s), b = (...s) => (e) => {
1573
1592
  const t = s.map((r) => f(r)(e));
1574
1593
  return (r) => {
1575
1594
  t.forEach((n) => n(r));
1576
1595
  };
1577
- }, v = () => () => {
1596
+ }, _ = () => () => {
1578
1597
  }, dt = (s) => (e) => (e.addClasses(s), (t) => {
1579
1598
  t && e.removeClasses(s);
1580
1599
  }), pt = (s) => (e) => {
@@ -1610,6 +1629,7 @@ const ht = /* @__PURE__ */ new Set([
1610
1629
  *
1611
1630
  */
1612
1631
  get: (s, e) => e === "class" ? (t) => d.is(t) ? pt(t) : dt(
1632
+ /* c8 ignore next */
1613
1633
  (t ?? "").split(" ").filter((r) => r.length > 0)
1614
1634
  ) : (t) => d.is(t) ? $(
1615
1635
  e,
@@ -1619,7 +1639,7 @@ const ht = /* @__PURE__ */ new Set([
1619
1639
  t
1620
1640
  )
1621
1641
  }
1622
- ), jt = new Proxy(
1642
+ ), qt = new Proxy(
1623
1643
  {},
1624
1644
  {
1625
1645
  /**
@@ -1635,7 +1655,7 @@ const ht = /* @__PURE__ */ new Set([
1635
1655
  t
1636
1656
  ) : k(`data-${e}`, t)
1637
1657
  }
1638
- ), qt = new Proxy(
1658
+ ), Ft = new Proxy(
1639
1659
  {},
1640
1660
  {
1641
1661
  /**
@@ -1654,7 +1674,7 @@ const ht = /* @__PURE__ */ new Set([
1654
1674
  t
1655
1675
  )
1656
1676
  }
1657
- ), Ft = new Proxy(
1677
+ ), Bt = new Proxy(
1658
1678
  {},
1659
1679
  {
1660
1680
  /**
@@ -1673,7 +1693,7 @@ const ht = /* @__PURE__ */ new Set([
1673
1693
  t
1674
1694
  )
1675
1695
  }
1676
- ), Bt = new Proxy(
1696
+ ), Wt = new Proxy(
1677
1697
  {},
1678
1698
  {
1679
1699
  /**
@@ -1693,9 +1713,9 @@ const ht = /* @__PURE__ */ new Set([
1693
1713
  }
1694
1714
  ), f = (s) => {
1695
1715
  if (s == null)
1696
- return v;
1716
+ return _;
1697
1717
  if (Array.isArray(s))
1698
- return T(...s.map(f));
1718
+ return b(...s.map(f));
1699
1719
  if (typeof s == "string")
1700
1720
  return ve(s);
1701
1721
  if (d.is(s))
@@ -1713,7 +1733,7 @@ const ht = /* @__PURE__ */ new Set([
1713
1733
  return (l) => {
1714
1734
  o.forEach((c) => c(!1)), n.clear(l);
1715
1735
  };
1716
- }, Wt = new Proxy(
1736
+ }, Ut = new Proxy(
1717
1737
  {},
1718
1738
  {
1719
1739
  /**
@@ -1723,7 +1743,7 @@ const ht = /* @__PURE__ */ new Set([
1723
1743
  */
1724
1744
  get: (s, e) => (...t) => we(e, t.flatMap(f))
1725
1745
  }
1726
- ), Ut = new Proxy(
1746
+ ), Jt = new Proxy(
1727
1747
  {},
1728
1748
  {
1729
1749
  /**
@@ -1733,7 +1753,7 @@ const ht = /* @__PURE__ */ new Set([
1733
1753
  */
1734
1754
  get: (s, e) => (...t) => we("input", O.type(e), ...t)
1735
1755
  }
1736
- ), gt = "http://www.w3.org/2000/svg", Jt = new Proxy(
1756
+ ), gt = "http://www.w3.org/2000/svg", Gt = new Proxy(
1737
1757
  {},
1738
1758
  {
1739
1759
  /**
@@ -1743,7 +1763,7 @@ const ht = /* @__PURE__ */ new Set([
1743
1763
  */
1744
1764
  get: (s, e) => (...t) => Ee(e, gt, t.flatMap(f))
1745
1765
  }
1746
- ), mt = "http://www.w3.org/1998/Math/MathML", Gt = new Proxy(
1766
+ ), mt = "http://www.w3.org/1998/Math/MathML", Xt = new Proxy(
1747
1767
  {},
1748
1768
  {
1749
1769
  /**
@@ -1756,7 +1776,7 @@ const ht = /* @__PURE__ */ new Set([
1756
1776
  ), Ce = (s, e) => {
1757
1777
  if (typeof e == "function")
1758
1778
  return Ce(s, { then: e });
1759
- const t = e.pending != null ? f(e.pending()) : v, r = e.then, n = e.error != null ? (o) => f(e.error(o)) : () => v;
1779
+ const t = e.pending != null ? f(e.pending()) : _, r = e.then, n = e.error != null ? (o) => f(e.error(o)) : () => _;
1760
1780
  return (o) => {
1761
1781
  let l = !0;
1762
1782
  const c = s(), a = o.makeRef();
@@ -1772,7 +1792,7 @@ const ht = /* @__PURE__ */ new Set([
1772
1792
  l = !1, u(h), a.clear(h);
1773
1793
  };
1774
1794
  };
1775
- }, Xt = (s, e) => Ce(() => s, e), xe = (s, e, t) => (r) => r.on(s, e, t), yt = (s) => xe("click", (e, t) => {
1795
+ }, Yt = (s, e) => Ce(() => s, e), xe = (s, e, t) => (r) => r.on(s, e, t), yt = (s) => xe("click", (e, t) => {
1776
1796
  e.preventDefault();
1777
1797
  const r = e.target;
1778
1798
  setTimeout(() => {
@@ -1789,13 +1809,13 @@ const ht = /* @__PURE__ */ new Set([
1789
1809
  */
1790
1810
  get: (s, e) => (t) => xe(e, t)
1791
1811
  }
1792
- ), bt = (s) => (e) => {
1812
+ ), Tt = (s) => (e) => {
1793
1813
  const t = e.target;
1794
1814
  s(t.value);
1795
- }, Tt = (s) => (e) => {
1815
+ }, bt = (s) => (e) => {
1796
1816
  const t = e.target;
1797
1817
  s(t.valueAsNumber);
1798
- }, At = (s) => (e) => {
1818
+ }, St = (s) => (e) => {
1799
1819
  const t = e.target;
1800
1820
  if (t.value === "")
1801
1821
  return;
@@ -1805,7 +1825,7 @@ const ht = /* @__PURE__ */ new Set([
1805
1825
  Number(r[2].substring(0, 2))
1806
1826
  );
1807
1827
  s(n);
1808
- }, Yt = (s) => (e) => {
1828
+ }, zt = (s) => (e) => {
1809
1829
  const t = e.target;
1810
1830
  if (t.value === "") {
1811
1831
  s(null);
@@ -1817,7 +1837,7 @@ const ht = /* @__PURE__ */ new Set([
1817
1837
  Number(r[2].substring(0, 2))
1818
1838
  );
1819
1839
  s(n);
1820
- }, St = (s) => (e) => {
1840
+ }, At = (s) => (e) => {
1821
1841
  const t = e.target;
1822
1842
  if (t.value === "")
1823
1843
  return;
@@ -1827,7 +1847,7 @@ const ht = /* @__PURE__ */ new Set([
1827
1847
  Number(n[2])
1828
1848
  ), l = r[1].split(":");
1829
1849
  o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), s(o);
1830
- }, zt = (s) => (e) => {
1850
+ }, Qt = (s) => (e) => {
1831
1851
  const t = e.target;
1832
1852
  if (t.value === "") {
1833
1853
  s(null);
@@ -1844,16 +1864,16 @@ const ht = /* @__PURE__ */ new Set([
1844
1864
  Number(n[2])
1845
1865
  ), l = r[1].split(":");
1846
1866
  o.setHours(Number(l[0] ?? 0)), o.setMinutes(Number(l[1] ?? 0)), o.setSeconds(Number(l[2] ?? 0)), s(o);
1847
- }, Qt = (s) => (e) => {
1867
+ }, Zt = (s) => (e) => {
1848
1868
  const t = e.target;
1849
1869
  s(t.checked);
1850
- }, Zt = (s) => (e) => {
1851
- e.preventDefault(), s();
1852
1870
  }, Kt = (s) => (e) => {
1853
- e.stopPropagation(), s();
1871
+ e.preventDefault(), s();
1854
1872
  }, es = (s) => (e) => {
1873
+ e.stopPropagation(), s();
1874
+ }, ts = (s) => (e) => {
1855
1875
  e.stopImmediatePropagation(), s();
1856
- }, ts = (s, e = "input") => T(O.valueAsDate(s), X[e](At(s.set))), ss = (s, e = "input") => T(O.valueAsDate(s), X[e](St(s.set))), rs = (s, e = "input") => T(O.valueAsNumber(s), X[e](Tt(s.set))), ns = (s, e = "input") => T(O.value(s), X[e](bt(s.set))), is = (s) => T(O.checked(s), yt(s.set)), Y = (s, e) => {
1876
+ }, ss = (s, e = "input") => b(O.valueAsDate(s), X[e](St(s.set))), rs = (s, e = "input") => b(O.valueAsDate(s), X[e](At(s.set))), ns = (s, e = "input") => b(O.valueAsNumber(s), X[e](bt(s.set))), is = (s, e = "input") => b(O.value(s), X[e](Tt(s.set))), os = (s) => b(O.checked(s), yt(s.set)), Y = (s, e) => {
1857
1877
  if (d.is(s))
1858
1878
  return (r) => {
1859
1879
  const n = r.makeRef();
@@ -1862,7 +1882,7 @@ const ht = /* @__PURE__ */ new Set([
1862
1882
  let a;
1863
1883
  const u = c.on((h) => {
1864
1884
  if (h !== a) {
1865
- a = h, l == null || l.dispose(), o == null || o(!0), l = s.map((b) => b[h]);
1885
+ a = h, l == null || l.dispose(), o == null || o(!0), l = s.map((T) => T[h]);
1866
1886
  const g = e[h](l);
1867
1887
  o = f(g)(n);
1868
1888
  }
@@ -1877,13 +1897,13 @@ const ht = /* @__PURE__ */ new Set([
1877
1897
  y.map(s, (r) => ({ [r[e]]: r })),
1878
1898
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1879
1899
  t
1880
- ), os = (s, e) => Pe(s, "kind", e), ls = (s, e) => {
1900
+ ), ls = (s, e) => Pe(s, "kind", e), cs = (s, e) => {
1881
1901
  const t = y.map(s, ([r, n]) => ({ [r]: n }));
1882
1902
  return Y(t, e);
1883
- }, cs = (s, e) => Pe(s, "type", e), vt = (s, e) => Y(
1903
+ }, as = (s, e) => Pe(s, "type", e), vt = (s, e) => Y(
1884
1904
  y.map(s, (t) => ({ [t]: !0 })),
1885
1905
  e
1886
- ), as = (s, e = {}) => (t) => {
1906
+ ), us = (s, e = {}) => (t) => {
1887
1907
  const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
1888
1908
  return vt(
1889
1909
  t.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
@@ -1893,7 +1913,7 @@ const ht = /* @__PURE__ */ new Set([
1893
1913
  other: s
1894
1914
  }
1895
1915
  );
1896
- }, us = (s) => (e) => (e.appendOrInsert(s), (t) => {
1916
+ }, hs = (s) => (e) => (e.appendOrInsert(s), (t) => {
1897
1917
  t && j(s);
1898
1918
  }), _t = (s, e, t) => {
1899
1919
  if (d.is(s)) {
@@ -1903,7 +1923,7 @@ const ht = /* @__PURE__ */ new Set([
1903
1923
  let l = () => {
1904
1924
  }, c = !1, a = null;
1905
1925
  const u = r.on((h) => {
1906
- h == null ? (l(!0), l = f((t == null ? void 0 : t()) ?? v)(o), c = !1, a == null || a.dispose(), a = null) : (a == null ? a = E(h) : a.value = h, c || (l(!0), l = f(e(a))(
1926
+ h == null ? (l(!0), l = f((t == null ? void 0 : t()) ?? _)(o), c = !1, a == null || a.dispose(), a = null) : (a == null ? a = v(h) : a.value = h, c || (l(!0), l = f(e(a))(
1907
1927
  o
1908
1928
  ), c = !0));
1909
1929
  });
@@ -1915,26 +1935,26 @@ const ht = /* @__PURE__ */ new Set([
1915
1935
  const r = s;
1916
1936
  if (r == null) {
1917
1937
  const n = t == null ? void 0 : t();
1918
- return n != null ? f(n) : v;
1938
+ return n != null ? f(n) : _;
1919
1939
  }
1920
1940
  return f(e(G(r)));
1921
1941
  }
1922
- }, hs = (...s) => (e, t) => (r) => {
1942
+ }, fs = (...s) => (e, t) => (r) => {
1923
1943
  const n = r.makeRef();
1924
1944
  if (s.some(
1925
1945
  (p) => !d.is(p) && p == null
1926
1946
  ))
1927
- return (t != null ? f(t == null ? void 0 : t()) : v)(
1947
+ return (t != null ? f(t == null ? void 0 : t()) : _)(
1928
1948
  n
1929
1949
  );
1930
1950
  const l = s.map(() => null), c = s.map(
1931
1951
  (p) => d.is(p) ? p.value != null : p != null
1932
1952
  );
1933
1953
  let a = null;
1934
- const u = E(c.every((p) => p)), h = (p, m) => {
1954
+ const u = v(c.every((p) => p)), h = (p, m) => {
1935
1955
  if (p.value != null) {
1936
1956
  if (l[m] == null) {
1937
- const C = E(p.value);
1957
+ const C = v(p.value);
1938
1958
  l[m] = C;
1939
1959
  } else
1940
1960
  l[m].value = p.value;
@@ -1943,9 +1963,9 @@ const ht = /* @__PURE__ */ new Set([
1943
1963
  c[m] = !1;
1944
1964
  };
1945
1965
  let g = s.length - 1;
1946
- const b = s.map((p, m) => {
1966
+ const T = s.map((p, m) => {
1947
1967
  if (!d.is(p)) {
1948
- const C = E(p);
1968
+ const C = v(p);
1949
1969
  return l[m] = C, () => {
1950
1970
  };
1951
1971
  }
@@ -1954,15 +1974,15 @@ const ht = /* @__PURE__ */ new Set([
1954
1974
  });
1955
1975
  });
1956
1976
  return u.on((p) => {
1957
- a == null || a(!0), a = null, p ? a = f(e(...l))(n) : a = f((t == null ? void 0 : t()) ?? v)(n);
1977
+ a == null || a(!0), a = null, p ? a = f(e(...l))(n) : a = f((t == null ? void 0 : t()) ?? _)(n);
1958
1978
  }), (p) => {
1959
- l.forEach((m) => m == null ? void 0 : m.dispose()), u.dispose(), b.forEach((m) => m()), a == null || a(p), n.clear(p);
1979
+ l.forEach((m) => m == null ? void 0 : m.dispose()), u.dispose(), T.forEach((m) => m()), a == null || a(p), n.clear(p);
1960
1980
  };
1961
1981
  }, M = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), Le = (s, e, t) => _t(
1962
1982
  y.map(s, (r) => r ? !0 : null),
1963
1983
  e,
1964
1984
  t ?? void 0
1965
- ), fs = (s, e, t) => Le(
1985
+ ), ds = (s, e, t) => Le(
1966
1986
  y.map(s, (r) => !r),
1967
1987
  e,
1968
1988
  t
@@ -1973,12 +1993,12 @@ const ht = /* @__PURE__ */ new Set([
1973
1993
  r.index,
1974
1994
  r.total.map((o) => o - 1)
1975
1995
  );
1976
- return T(
1996
+ return b(
1977
1997
  M(n.dispose),
1978
1998
  f(e(r)),
1979
1999
  Le(
1980
2000
  r.isLast,
1981
- () => v,
2001
+ () => _,
1982
2002
  () => t(n)
1983
2003
  )
1984
2004
  );
@@ -1993,7 +2013,7 @@ const ht = /* @__PURE__ */ new Set([
1993
2013
  for (let u = l.length; u < c; u++) {
1994
2014
  const h = new Q(u, n);
1995
2015
  l.push(
1996
- T(
2016
+ b(
1997
2017
  M(h.dispose),
1998
2018
  f(e(h))
1999
2019
  )(o)
@@ -2008,30 +2028,30 @@ const ht = /* @__PURE__ */ new Set([
2008
2028
  };
2009
2029
  {
2010
2030
  const r = G(s);
2011
- return T(
2031
+ return b(
2012
2032
  ...Array.from({ length: s }, (n, o) => o).map((n) => {
2013
2033
  const o = new Q(n, r);
2014
- return T(
2034
+ return b(
2015
2035
  M(o.dispose),
2016
2036
  f(e(o))
2017
2037
  );
2018
2038
  })
2019
2039
  );
2020
2040
  }
2021
- }, ds = (s, e, t) => {
2041
+ }, ps = (s, e, t) => {
2022
2042
  const r = y.map(s, (o) => o.length), n = y.toSignal(s);
2023
2043
  return De(
2024
2044
  r,
2025
2045
  (o) => {
2026
2046
  const l = n.map((c) => c[o.index]);
2027
- return T(
2047
+ return b(
2028
2048
  M(l.dispose),
2029
2049
  f(e(l, o))
2030
2050
  );
2031
2051
  },
2032
2052
  t
2033
2053
  );
2034
- }, ps = (s, e) => {
2054
+ }, gs = (s, e) => {
2035
2055
  if (d.is(s)) {
2036
2056
  const t = s;
2037
2057
  return (r) => {
@@ -2048,7 +2068,7 @@ const ht = /* @__PURE__ */ new Set([
2048
2068
  };
2049
2069
  }
2050
2070
  return f(e(s));
2051
- }, gs = (s, e, t = () => v) => Y(
2071
+ }, ms = (s, e, t = () => _) => Y(
2052
2072
  y.map(
2053
2073
  s,
2054
2074
  (r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
@@ -2057,9 +2077,9 @@ const ht = /* @__PURE__ */ new Set([
2057
2077
  notEmpty: (r) => e(r),
2058
2078
  whenEmpty: () => t()
2059
2079
  }
2060
- ), ms = (s, e) => (t) => {
2061
- const r = t.makePortal(s);
2062
- return K(f(e), r);
2080
+ ), ys = (s, e) => (t) => {
2081
+ const r = t.makePortal(s), n = K(f(e), r);
2082
+ return () => n(!0);
2063
2083
  }, R = /* @__PURE__ */ new Map(), wt = (s) => ({
2064
2084
  mark: Ge(`Probe(${s.description})`),
2065
2085
  create: ({ callback: e = () => {
@@ -2080,7 +2100,7 @@ const ht = /* @__PURE__ */ new Set([
2080
2100
  onUse: () => o.counter++
2081
2101
  };
2082
2102
  }
2083
- }), ys = wt(Symbol("GlobalProbe")), Et = (s, e) => (t) => {
2103
+ }), Ts = wt(Symbol("GlobalProbe")), Et = (s, e) => (t) => {
2084
2104
  const r = t.getStyle(s);
2085
2105
  return t.setStyle(s, e), (n) => {
2086
2106
  n && t.setStyle(s, r);
@@ -2111,11 +2131,11 @@ const ht = /* @__PURE__ */ new Set([
2111
2131
  }
2112
2132
  return () => {
2113
2133
  };
2114
- }, Ts = (s) => (e) => {
2134
+ }, Ss = (s) => (e) => {
2115
2135
  const t = s(e);
2116
2136
  return t == null ? () => {
2117
2137
  } : f(t)(e);
2118
- }, As = (s) => xt((e) => s(e.element)), Ss = (s) => (e) => {
2138
+ }, As = (s) => xt((e) => s(e.element)), vs = (s) => (e) => {
2119
2139
  if (e.isHeadlessDOM()) {
2120
2140
  const t = s(e);
2121
2141
  if (t)
@@ -2137,74 +2157,74 @@ const ht = /* @__PURE__ */ new Set([
2137
2157
  return u == null || u(), a;
2138
2158
  },
2139
2159
  set: ({ mark: c, create: a }, u) => {
2140
- const { value: h, dispose: g, onUse: b } = a(u, r());
2141
- o.push(g), n(r().setProvider(c, h, b));
2160
+ const { value: h, dispose: g, onUse: T } = a(u, r());
2161
+ o.push(g), n(r().setProvider(c, h, T));
2142
2162
  }
2143
2163
  });
2144
2164
  return l == null ? () => {
2145
- } : T(
2165
+ } : b(
2146
2166
  f(l),
2147
2167
  M(() => o.forEach((c) => c()))
2148
2168
  )(r());
2149
- }, vs = (s, e, t) => ee(({ set: r }) => (r(s, e), t())), _s = (s, e) => ee(({ use: t }) => e(t(s))), ws = (...s) => (e) => ee(({ use: t }) => {
2169
+ }, _s = (s, e, t) => ee(({ set: r }) => (r(s, e), t())), ws = (s, e) => ee(({ use: t }) => e(t(s))), Es = (...s) => (e) => ee(({ use: t }) => {
2150
2170
  const r = s.map(t);
2151
2171
  return e(...r);
2152
2172
  });
2153
2173
  export {
2154
- Xt as Async,
2155
- is as BindChecked,
2156
- ts as BindDate,
2157
- ss as BindDateTime,
2158
- rs as BindNumber,
2159
- ns as BindText,
2174
+ Yt as Async,
2175
+ os as BindChecked,
2176
+ ss as BindDate,
2177
+ rs as BindDateTime,
2178
+ ns as BindNumber,
2179
+ is as BindText,
2160
2180
  L as BrowserContext,
2161
2181
  q as CLASS_PLACEHOLDER_ATTR,
2162
2182
  P as Computed,
2163
- as as Conjunction,
2164
- us as DOMNode,
2183
+ us as Conjunction,
2184
+ hs as DOMNode,
2165
2185
  we as El,
2166
2186
  Ee as ElNS,
2167
2187
  Q as ElementPosition,
2168
- v as Empty,
2188
+ _ as Empty,
2169
2189
  _t as Ensure,
2170
- hs as EnsureAll,
2171
- ds as ForEach,
2172
- T as Fragment,
2173
- ys as GlobalProbe,
2174
- It as HeadlessAdapter,
2190
+ fs as EnsureAll,
2191
+ ps as ForEach,
2192
+ b as Fragment,
2193
+ Ts as GlobalProbe,
2194
+ Rt as HeadlessAdapter,
2175
2195
  D as HeadlessContext,
2176
2196
  at as HeadlessElement,
2177
- Se as HeadlessPortal,
2197
+ Ae as HeadlessPortal,
2178
2198
  ut as HeadlessText,
2179
- ps as MapSignal,
2199
+ gs as MapSignal,
2180
2200
  ce as MemoryStore,
2181
- gs as NotEmpty,
2201
+ ms as NotEmpty,
2182
2202
  yt as OnChecked,
2183
2203
  M as OnDispose,
2184
2204
  Y as OneOf,
2185
2205
  Pe as OneOfField,
2186
- os as OneOfKind,
2187
- ls as OneOfTuple,
2188
- cs as OneOfType,
2206
+ ls as OneOfKind,
2207
+ cs as OneOfTuple,
2208
+ as as OneOfType,
2189
2209
  vt as OneOfValue,
2190
- ms as Portal,
2210
+ ys as Portal,
2191
2211
  V as Prop,
2192
- vs as Provide,
2212
+ _s as Provide,
2193
2213
  me as ProviderNotFoundError,
2194
2214
  Xe as RenderingError,
2195
2215
  De as Repeat,
2196
2216
  d as Signal,
2197
2217
  Ce as Task,
2198
- Vt as TextNode,
2199
- fs as Unless,
2200
- _s as Use,
2201
- ws as UseMany,
2218
+ jt as TextNode,
2219
+ ds as Unless,
2220
+ ws as Use,
2221
+ Es as UseMany,
2202
2222
  y as Value,
2203
2223
  Le as When,
2204
2224
  xt as WithBrowserCtx,
2205
- Ts as WithCtx,
2225
+ Ss as WithCtx,
2206
2226
  As as WithElement,
2207
- Ss as WithHeadlessCtx,
2227
+ vs as WithHeadlessCtx,
2208
2228
  ee as WithProvider,
2209
2229
  ye as _NODE_PLACEHOLDER_ATTR,
2210
2230
  Je as _getSelfOrParentElement,
@@ -2216,29 +2236,30 @@ export {
2216
2236
  ve as _staticText,
2217
2237
  Ht as animateSignal,
2218
2238
  Fe as animateSignals,
2219
- qt as aria,
2239
+ Ft as aria,
2220
2240
  O as attr,
2221
2241
  Z as computed,
2222
2242
  qe as computedOf,
2223
2243
  Be as computedRecord,
2224
- jt as dataAttr,
2244
+ qt as dataAttr,
2245
+ $t as delaySignal,
2225
2246
  je as effect,
2226
2247
  Dt as effectOf,
2227
- Qt as emitChecked,
2228
- Zt as emitPreventDefault,
2229
- es as emitStopImmediatePropagation,
2230
- Kt as emitStopPropagation,
2231
- bt as emitValue,
2232
- At as emitValueAsDate,
2233
- St as emitValueAsDateTime,
2234
- Yt as emitValueAsNullableDate,
2235
- zt as emitValueAsNullableDateTime,
2236
- Tt as emitValueAsNumber,
2248
+ Zt as emitChecked,
2249
+ Kt as emitPreventDefault,
2250
+ ts as emitStopImmediatePropagation,
2251
+ es as emitStopPropagation,
2252
+ Tt as emitValue,
2253
+ St as emitValueAsDate,
2254
+ At as emitValueAsDateTime,
2255
+ zt as emitValueAsNullableDate,
2256
+ Qt as emitValueAsNullableDateTime,
2257
+ bt as emitValueAsNumber,
2237
2258
  Ie as endInterpolate,
2238
2259
  le as getWindow,
2239
2260
  Re as guessInterpolate,
2240
- Wt as html,
2241
- Ut as input,
2261
+ Ut as html,
2262
+ Jt as input,
2242
2263
  Ne as interpolateDate,
2243
2264
  ke as interpolateNumber,
2244
2265
  $e as interpolateString,
@@ -2246,20 +2267,20 @@ export {
2246
2267
  Ot as localStorageProp,
2247
2268
  wt as makeProbe,
2248
2269
  Ge as makeProviderMark,
2249
- Gt as math,
2250
- Bt as mathAttr,
2270
+ Xt as math,
2271
+ Wt as mathAttr,
2251
2272
  kt as merge,
2252
2273
  X as on,
2253
- E as prop,
2254
- $t as render,
2274
+ v as prop,
2275
+ Nt as render,
2255
2276
  K as renderWithContext,
2256
2277
  f as renderableOfTNode,
2257
- Rt as restoreTempoPlaceholders,
2258
- Nt as runHeadless,
2278
+ Vt as restoreTempoPlaceholders,
2279
+ It as runHeadless,
2259
2280
  Mt as sessionStorageProp,
2260
2281
  G as signal,
2261
2282
  ae as storedProp,
2262
2283
  bs as style,
2263
- Jt as svg,
2264
- Ft as svgAttr
2284
+ Gt as svg,
2285
+ Bt as svgAttr
2265
2286
  };