@tempots/dom 23.0.1 → 23.0.2

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
@@ -59,7 +59,7 @@ class T {
59
59
  }
60
60
  }
61
61
  v = new WeakMap();
62
- const L = class L {
62
+ const C = class C {
63
63
  /**
64
64
  * Represents a signal with a value of type T.
65
65
  *
@@ -340,8 +340,8 @@ const L = class L {
340
340
  * @param equals - A function to compare two values of type O for equality. Defaults to strict equality (===).
341
341
  * @returns - A Signal that represents the result of the Promise.
342
342
  */
343
- u(L, "ofPromise", (e, r, s, n = (o, i) => o === i) => {
344
- const o = new L(r, n);
343
+ u(C, "ofPromise", (e, r, s, n = (o, i) => o === i) => {
344
+ const o = new C(r, n);
345
345
  return e.then((i) => o._setAndNotify(i, !1)).catch((i) => {
346
346
  s != null ? o._setAndNotify(s(i), !1) : console.error(
347
347
  "Unhandled promise rejection in Signal.ofPromise:",
@@ -354,11 +354,11 @@ u(L, "ofPromise", (e, r, s, n = (o, i) => o === i) => {
354
354
  * @param value - The value to check.
355
355
  * @returns `true` if the value is a Signal, `false` otherwise.
356
356
  */
357
- u(L, "is", (e) => (
357
+ u(C, "is", (e) => (
358
358
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
359
359
  e != null && e.$__signal__ === !0
360
360
  ));
361
- let h = L;
361
+ let h = C;
362
362
  const je = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
363
363
  class E extends h {
364
364
  /**
@@ -565,14 +565,14 @@ const X = (t, e, r = (s, n) => s === n) => {
565
565
  dispose: (t) => {
566
566
  h.is(t) && t.dispose();
567
567
  }
568
- }, Dt = (...t) => (e, r) => {
568
+ }, Pt = (...t) => (e, r) => {
569
569
  const s = t.filter((n) => h.is(n));
570
570
  return X(
571
571
  () => e(...t.map((n) => d.get(n))),
572
572
  s,
573
573
  r
574
574
  );
575
- }, bt = (...t) => (e) => {
575
+ }, Dt = (...t) => (e) => {
576
576
  const r = t.filter((s) => h.is(s));
577
577
  Ue(() => e(...t.map(d.get)), r);
578
578
  };
@@ -611,10 +611,10 @@ const ne = ({
611
611
  return a.on((f) => {
612
612
  r.setItem(t, s(f));
613
613
  }), a;
614
- }, Tt = (t) => ne({
614
+ }, bt = (t) => ne({
615
615
  ...t,
616
616
  store: (window == null ? void 0 : window.localStorage) ?? new se()
617
- }), Ct = (t) => ne({
617
+ }), Tt = (t) => ne({
618
618
  ...t,
619
619
  store: (window == null ? void 0 : window.sessionStorage) ?? new se()
620
620
  });
@@ -623,23 +623,23 @@ function re(t) {
623
623
  }
624
624
  const Ge = (t, e, r, s) => {
625
625
  const n = (s == null ? void 0 : s.duration) ?? 300, o = (s == null ? void 0 : s.easing) ?? ((_) => _), i = (s == null ? void 0 : s.equals) ?? ((_, R) => _ === R);
626
- let l = s == null ? void 0 : s.interpolate, a = t, f = e(), g = performance.now(), S = null, U = !0;
626
+ let l = s == null ? void 0 : s.interpolate, a = t, f = e(), g = performance.now(), w = null, U = !0;
627
627
  const G = new E(e, i), A = V(t, i);
628
628
  A.onDispose(() => {
629
- S !== null && cancelAnimationFrame(S);
629
+ w !== null && cancelAnimationFrame(w);
630
630
  }), A.onDispose(G.dispose), r.forEach((_) => {
631
631
  _.setDerivative(G), _.onDispose(A.dispose);
632
632
  });
633
- const ke = (_) => {
634
- f = _, g = performance.now(), a = A.value, U && (U = !1, S = re(Y));
635
- }, Y = () => {
633
+ const Ne = (_) => {
634
+ f = _, g = performance.now(), a = A.value, U && (U = !1, w = re(Z));
635
+ }, Z = () => {
636
636
  const R = (performance.now() - g) / d.get(n), Re = o(R);
637
637
  l == null && (l = Be(a));
638
638
  let K = l(a, f, Re);
639
- R >= 1 ? (U = !0, K = f) : S = re(Y), A.set(K);
639
+ R >= 1 ? (U = !0, K = f) : w = re(Z), A.set(K);
640
640
  };
641
- return G.on(ke), A;
642
- }, Lt = (t, e) => {
641
+ return G.on(Ne), A;
642
+ }, Ot = (t, e) => {
643
643
  const { initialValue: r, ...s } = e ?? {};
644
644
  return Ge(
645
645
  r ?? t.get(),
@@ -647,7 +647,7 @@ const Ge = (t, e, r, s) => {
647
647
  [t],
648
648
  s
649
649
  );
650
- }, Ot = (t, e) => {
650
+ }, Ct = (t, e) => {
651
651
  const { signals: r, literals: s } = Object.entries(t).reduce(
652
652
  ({ signals: o, literals: i }, [l, a]) => (h.is(a) ? o.push([l, a]) : i[l] = a, { signals: o, literals: i }),
653
653
  { signals: [], literals: {} }
@@ -805,7 +805,7 @@ class y {
805
805
  */
806
806
  u(this, "getProvider", (e) => {
807
807
  if (this.providers[e] === void 0)
808
- throw new Ze(e);
808
+ throw new Qe(e);
809
809
  return this.providers[e];
810
810
  });
811
811
  this.document = e, this.element = r, this.reference = s, this.providers = n, this.isFirstLevel = o;
@@ -821,7 +821,7 @@ class y {
821
821
  return new y(e.ownerDocument, e, r, {}, !0);
822
822
  }
823
823
  }
824
- class Ze extends Error {
824
+ class Qe extends Error {
825
825
  constructor(e) {
826
826
  super(`Provider not found: ${e.description}`);
827
827
  }
@@ -829,27 +829,27 @@ class Ze extends Error {
829
829
  const m = (t) => {
830
830
  const e = t;
831
831
  e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
832
- }, Qe = (t) => fe(t) ? t : t.parentElement, fe = (t) => t.nodeType === 1, he = (t) => (e) => {
833
- we(e);
832
+ }, Ye = (t) => fe(t) ? t : t.parentElement, fe = (t) => t.nodeType === 1, he = (t) => (e) => {
833
+ Se(e);
834
834
  const r = e.createText(t);
835
835
  return e.appendOrInsert(r), (s) => {
836
836
  s && m(r);
837
837
  };
838
838
  }, de = (t) => (e) => {
839
- we(e);
839
+ Se(e);
840
840
  const r = e.createText(t.value);
841
841
  e.appendOrInsert(r);
842
842
  const s = t.on((n) => r.data = n);
843
843
  return (n) => {
844
844
  s(), n && m(r);
845
845
  };
846
- }, Nt = (t) => h.is(t) ? de(t) : he(t), p = (...t) => (e) => {
846
+ }, Lt = (t) => h.is(t) ? de(t) : he(t), p = (...t) => (e) => {
847
847
  const r = t.map((s) => c(s)(e));
848
848
  return (s) => {
849
849
  r.forEach((n) => n(s));
850
850
  };
851
- }, w = () => () => {
852
- }, Ye = (t) => (e) => (ye(e), e.element.classList.add(...t), (r) => {
851
+ }, S = () => () => {
852
+ }, Ze = (t) => (e) => (ye(e), e.element.classList.add(...t), (r) => {
853
853
  r && e.element.classList.remove(...t);
854
854
  }), Ke = (t) => (e) => {
855
855
  ye(e);
@@ -861,7 +861,7 @@ const m = (t) => {
861
861
  return (o) => {
862
862
  n(), o && s.forEach((i) => r.classList.remove(i)), s.length = 0;
863
863
  };
864
- }, O = (t, e) => {
864
+ }, L = (t, e) => {
865
865
  const r = ae(t), s = ce(t);
866
866
  return (n) => {
867
867
  _e(n, t);
@@ -870,7 +870,7 @@ const m = (t) => {
870
870
  i && r(n.element, o);
871
871
  };
872
872
  };
873
- }, N = (t, e) => {
873
+ }, k = (t, e) => {
874
874
  const r = ae(t), s = ce(t);
875
875
  return (n) => {
876
876
  _e(n, t);
@@ -893,12 +893,12 @@ const m = (t) => {
893
893
  * @returns The renderable component for the specified attribute.
894
894
  *
895
895
  */
896
- get: (t, e) => e === "class" ? (r) => h.is(r) ? Ke(r) : Ye(
896
+ get: (t, e) => e === "class" ? (r) => h.is(r) ? Ke(r) : Ze(
897
897
  (r ?? "").split(" ").filter((s) => s.length > 0)
898
- ) : (r) => h.is(r) ? N(
898
+ ) : (r) => h.is(r) ? k(
899
899
  e,
900
900
  r
901
- ) : O(
901
+ ) : L(
902
902
  e,
903
903
  r
904
904
  )
@@ -914,12 +914,12 @@ const m = (t) => {
914
914
  * @returns The renderable component for the specified attribute.
915
915
  *
916
916
  */
917
- get: (t, e) => (r) => h.is(r) ? N(
917
+ get: (t, e) => (r) => h.is(r) ? k(
918
918
  `data-${e}`,
919
919
  r
920
- ) : O(`data-${e}`, r)
920
+ ) : L(`data-${e}`, r)
921
921
  }
922
- ), Rt = new Proxy(
922
+ ), Nt = new Proxy(
923
923
  {},
924
924
  {
925
925
  /**
@@ -930,15 +930,15 @@ const m = (t) => {
930
930
  * @returns The renderable component for the specified attribute.
931
931
  *
932
932
  */
933
- get: (t, e) => (r) => h.is(r) ? N(
933
+ get: (t, e) => (r) => h.is(r) ? k(
934
934
  `aria-${e}`,
935
935
  r
936
- ) : O(
936
+ ) : L(
937
937
  `aria-${e}`,
938
938
  r
939
939
  )
940
940
  }
941
- ), xe = (t) => t.replace(/([A-Z])/g, "-$1").toLowerCase(), Mt = new Proxy(
941
+ ), Rt = new Proxy(
942
942
  {},
943
943
  {
944
944
  /**
@@ -949,18 +949,15 @@ const m = (t) => {
949
949
  * @returns The renderable component for the specified attribute.
950
950
  *
951
951
  */
952
- get: (t, e) => (r) => {
953
- const s = xe(e);
954
- return h.is(r) ? N(
955
- s,
956
- r
957
- ) : O(
958
- s,
959
- r
960
- );
961
- }
952
+ get: (t, e) => (r) => h.is(r) ? k(
953
+ e,
954
+ r
955
+ ) : L(
956
+ e,
957
+ r
958
+ )
962
959
  }
963
- ), $t = new Proxy(
960
+ ), Mt = new Proxy(
964
961
  {},
965
962
  {
966
963
  /**
@@ -970,29 +967,29 @@ const m = (t) => {
970
967
  * @returns The renderable component for the specified attribute.
971
968
  *
972
969
  */
973
- get: (t, e) => (r) => h.is(r) ? N(
970
+ get: (t, e) => (r) => h.is(r) ? k(
974
971
  e,
975
972
  r
976
- ) : O(
973
+ ) : L(
977
974
  e,
978
975
  r
979
976
  )
980
977
  }
981
- ), c = (t) => t == null ? w : Array.isArray(t) ? p(...t.map(c)) : typeof t == "string" ? he(t) : h.is(t) ? de(t) : t, pe = (t, ...e) => (r) => {
978
+ ), c = (t) => t == null ? S : Array.isArray(t) ? p(...t.map(c)) : typeof t == "string" ? he(t) : h.is(t) ? de(t) : t, pe = (t, ...e) => (r) => {
982
979
  const s = r.createElement(t, void 0);
983
- r.isFirstLevel && k() && ve(s), r.appendOrInsert(s), r = r.withElement(s);
980
+ r.isFirstLevel && N() && ve(s), r.appendOrInsert(s), r = r.withElement(s);
984
981
  const n = e.map((o) => c(o)(r));
985
982
  return (o) => {
986
983
  n.forEach((i) => i(!1)), o && m(s);
987
984
  };
988
985
  }, me = (t, e, ...r) => (s) => {
989
986
  const n = s.createElement(t, e);
990
- s.isFirstLevel && k() && ve(n), s.appendOrInsert(n), s = s.withElement(n);
987
+ s.isFirstLevel && N() && ve(n), s.appendOrInsert(n), s = s.withElement(n);
991
988
  const o = r.map((i) => c(i)(s));
992
989
  return (i) => {
993
990
  o.forEach((l) => l(!1)), i && m(n);
994
991
  };
995
- }, Ft = new Proxy(
992
+ }, $t = new Proxy(
996
993
  {},
997
994
  {
998
995
  /**
@@ -1002,7 +999,7 @@ const m = (t) => {
1002
999
  */
1003
1000
  get: (t, e) => (...r) => pe(e, r.flatMap(c))
1004
1001
  }
1005
- ), Vt = new Proxy(
1002
+ ), Ft = new Proxy(
1006
1003
  {},
1007
1004
  {
1008
1005
  /**
@@ -1012,7 +1009,7 @@ const m = (t) => {
1012
1009
  */
1013
1010
  get: (t, e) => (...r) => pe("input", P.type(e), ...r)
1014
1011
  }
1015
- ), et = "http://www.w3.org/2000/svg", qt = new Proxy(
1012
+ ), xe = "http://www.w3.org/2000/svg", Vt = new Proxy(
1016
1013
  {},
1017
1014
  {
1018
1015
  /**
@@ -1020,9 +1017,9 @@ const m = (t) => {
1020
1017
  * @param tagName - The SVG tag name.
1021
1018
  * @returns A renderable function that creates and appends the SVG element to the DOM.
1022
1019
  */
1023
- get: (t, e) => (...r) => me(e, et, r.flatMap(c))
1020
+ get: (t, e) => (...r) => me(e, xe, r.flatMap(c))
1024
1021
  }
1025
- ), tt = "http://www.w3.org/1998/Math/MathML", It = new Proxy(
1022
+ ), et = "http://www.w3.org/1998/Math/MathML", qt = new Proxy(
1026
1023
  {},
1027
1024
  {
1028
1025
  /**
@@ -1030,82 +1027,82 @@ const m = (t) => {
1030
1027
  * @param tagName - The Math tag name.
1031
1028
  * @returns A renderable function that creates and appends the Math element to the DOM.
1032
1029
  */
1033
- get: (t, e) => (...r) => me(e, tt, r.flatMap(c))
1030
+ get: (t, e) => (...r) => me(e, et, r.flatMap(c))
1034
1031
  }
1035
- ), C = "data-tempo-attr", M = "data-tempo-class", ge = "data-tempo-node", $ = "data-tempo-text", rt = (t, e) => {
1032
+ ), O = "data-tempo-attr", M = "data-tempo-class", ge = "data-tempo-node", $ = "data-tempo-text", tt = (t, e) => {
1036
1033
  const r = t.getAttribute(e);
1037
1034
  if (r != null) {
1038
- const s = t.getAttribute(C) ?? "{}", n = { ...JSON.parse(s), name: r };
1035
+ const s = t.getAttribute(O) ?? "{}", n = { ...JSON.parse(s), name: r };
1039
1036
  t.setAttribute(
1040
- C,
1037
+ O,
1041
1038
  JSON.stringify(n).replace(/"/g, """)
1042
1039
  );
1043
1040
  }
1044
1041
  }, _e = (t, e) => {
1045
- k() && t.isFirstLevel && rt(t.element, e);
1046
- }, st = (t) => {
1047
- t.querySelectorAll(`[${C}]`).forEach((e) => {
1042
+ N() && t.isFirstLevel && tt(t.element, e);
1043
+ }, rt = (t) => {
1044
+ t.querySelectorAll(`[${O}]`).forEach((e) => {
1048
1045
  const r = JSON.parse(
1049
- (e.getAttribute(C) ?? "{}").replace(/"/g, '"')
1046
+ (e.getAttribute(O) ?? "{}").replace(/"/g, '"')
1050
1047
  );
1051
1048
  for (const [s, n] of Object.entries(r))
1052
1049
  e.setAttribute(s, n);
1053
- e.removeAttribute(C);
1050
+ e.removeAttribute(O);
1054
1051
  });
1055
1052
  };
1056
- function nt(t) {
1053
+ function st(t) {
1057
1054
  t.setAttribute(M, t.className);
1058
1055
  }
1059
1056
  const ye = (t) => {
1060
- k() && t.isFirstLevel && nt(t.element);
1061
- }, ot = (t) => {
1057
+ N() && t.isFirstLevel && st(t.element);
1058
+ }, nt = (t) => {
1062
1059
  t.querySelectorAll(`[${M}]`).forEach((e) => {
1063
1060
  const r = e.getAttribute(M);
1064
1061
  r !== null && (e.className = r, e.removeAttribute(M));
1065
1062
  });
1066
1063
  }, ve = (t) => {
1067
1064
  t.setAttribute(ge, "");
1068
- }, it = (t) => {
1065
+ }, ot = (t) => {
1069
1066
  t.querySelectorAll(`[${ge}]`).forEach((e) => {
1070
1067
  m(e);
1071
1068
  });
1072
- }, lt = (t) => {
1069
+ }, it = (t) => {
1073
1070
  t.setAttribute($, t.textContent ?? "");
1074
- }, we = (t) => {
1075
- k() && t.isFirstLevel && lt(t.element);
1076
- }, ut = (t) => {
1071
+ }, Se = (t) => {
1072
+ N() && t.isFirstLevel && it(t.element);
1073
+ }, lt = (t) => {
1077
1074
  t.querySelectorAll(`[${$}]`).forEach((e) => {
1078
1075
  e.textContent = e.getAttribute($), e.removeAttribute($);
1079
1076
  });
1080
- }, at = (t) => {
1081
- it(t), ot(t), st(t), ut(t);
1082
- }, Se = () => {
1077
+ }, ut = (t) => {
1078
+ ot(t), nt(t), rt(t), lt(t);
1079
+ }, we = () => {
1083
1080
  const t = globalThis;
1084
1081
  return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
1085
1082
  isSSR: !1,
1086
1083
  counter: 0
1087
1084
  }), t.__tempoSSR__;
1088
- }, Z = (t, e) => {
1089
- const r = Se();
1085
+ }, Q = (t, e) => {
1086
+ const r = we();
1090
1087
  r[t] = e;
1091
- }, Ae = (t) => Se()[t], H = (t) => {
1092
- Z("isSSR", t);
1093
- }, Q = () => Ae("counter"), ct = () => {
1094
- Z("counter", (Q() ?? 0) + 1);
1095
- }, ft = () => {
1096
- Z("counter", (Q() ?? 0) - 1);
1097
- }, Bt = (t = 30) => (H(!0), new Promise((e, r) => {
1088
+ }, Ae = (t) => we()[t], H = (t) => {
1089
+ Q("isSSR", t);
1090
+ }, Y = () => Ae("counter"), at = () => {
1091
+ Q("counter", (Y() ?? 0) + 1);
1092
+ }, ct = () => {
1093
+ Q("counter", (Y() ?? 0) - 1);
1094
+ }, It = (t = 30) => (H(!0), new Promise((e, r) => {
1098
1095
  let s;
1099
1096
  const n = setInterval(() => {
1100
- Q() <= 0 && (clearInterval(n), clearTimeout(s), H(!1), e());
1097
+ Y() <= 0 && (clearInterval(n), clearTimeout(s), H(!1), e());
1101
1098
  }, 30);
1102
1099
  s = setTimeout(() => {
1103
1100
  clearInterval(n), H(!1), r(new Error("SSR Timeout"));
1104
1101
  }, t * 1e3);
1105
- })), jt = (t) => (ct(), c(t(ft))), k = () => Ae("isSSR"), Ee = (t, e) => {
1102
+ })), Bt = (t) => (at(), c(t(ct))), N = () => Ae("isSSR"), Ee = (t, e) => {
1106
1103
  if (typeof e == "function")
1107
1104
  return Ee(t, { then: e });
1108
- const r = e.pending != null ? c(e.pending) : w, s = e.then, n = e.error != null ? (o) => c(e.error(o)) : () => w;
1105
+ const r = e.pending != null ? c(e.pending) : S, s = e.then, n = e.error != null ? (o) => c(e.error(o)) : () => S;
1109
1106
  return (o) => {
1110
1107
  let i = !0;
1111
1108
  const l = t();
@@ -1122,9 +1119,9 @@ const ye = (t) => {
1122
1119
  i = !1, a(f), f && o.reference && m(o.reference);
1123
1120
  };
1124
1121
  };
1125
- }, Ut = (t, e) => Ee(() => t, e), Pe = (t, e) => (r) => (r.element.addEventListener(t, e), (s) => {
1122
+ }, jt = (t, e) => Ee(() => t, e), Pe = (t, e) => (r) => (r.element.addEventListener(t, e), (s) => {
1126
1123
  s && r.element.removeEventListener(t, e);
1127
- }), ht = (t) => Pe("click", (e) => {
1124
+ }), ft = (t) => Pe("click", (e) => {
1128
1125
  e.preventDefault();
1129
1126
  const r = e.target;
1130
1127
  setTimeout(() => {
@@ -1141,13 +1138,13 @@ const ye = (t) => {
1141
1138
  */
1142
1139
  get: (t, e) => (r) => Pe(e, r)
1143
1140
  }
1144
- ), dt = (t) => (e) => {
1141
+ ), ht = (t) => (e) => {
1145
1142
  const r = e.target;
1146
1143
  t(r.value);
1147
- }, pt = (t) => (e) => {
1144
+ }, dt = (t) => (e) => {
1148
1145
  const r = e.target;
1149
1146
  t(r.valueAsNumber);
1150
- }, mt = (t) => (e) => {
1147
+ }, pt = (t) => (e) => {
1151
1148
  const r = e.target;
1152
1149
  if (r.value === "")
1153
1150
  return;
@@ -1157,7 +1154,7 @@ const ye = (t) => {
1157
1154
  Number(s[2].substring(0, 2))
1158
1155
  );
1159
1156
  t(n);
1160
- }, gt = (t) => (e) => {
1157
+ }, mt = (t) => (e) => {
1161
1158
  const r = e.target;
1162
1159
  if (r.value === "")
1163
1160
  return;
@@ -1167,25 +1164,25 @@ const ye = (t) => {
1167
1164
  Number(n[2])
1168
1165
  ), i = s[1].split(":");
1169
1166
  o.setHours(Number(i[0])), o.setMinutes(Number(i[1])), o.setSeconds(Number(i[2])), t(o);
1170
- }, Gt = (t) => (e) => {
1167
+ }, Ut = (t) => (e) => {
1171
1168
  const r = e.target;
1172
1169
  t(r.checked);
1173
- }, Jt = (t) => (e) => {
1170
+ }, Gt = (t) => (e) => {
1174
1171
  e.preventDefault(), t();
1175
- }, Wt = (t) => (e) => {
1172
+ }, Jt = (t) => (e) => {
1176
1173
  e.stopPropagation(), t();
1177
- }, Ht = (t) => (e) => {
1174
+ }, Wt = (t) => (e) => {
1178
1175
  e.stopImmediatePropagation(), t();
1179
- }, zt = (t, e = "input") => p(
1176
+ }, Ht = (t, e = "input") => p(
1177
+ P.valueAsDate(t),
1178
+ B[e](pt(t.set))
1179
+ ), zt = (t, e = "input") => p(
1180
1180
  P.valueAsDate(t),
1181
1181
  B[e](mt(t.set))
1182
1182
  ), Xt = (t, e = "input") => p(
1183
- P.valueAsDate(t),
1184
- B[e](gt(t.set))
1185
- ), Zt = (t, e = "input") => p(
1186
1183
  P.valueAsNumber(t),
1187
- B[e](pt(t.set))
1188
- ), Qt = (t, e = "input") => p(P.value(t), B[e](dt(t.set))), Yt = (t) => p(P.checked(t), ht(t.set)), j = (t, e) => {
1184
+ B[e](dt(t.set))
1185
+ ), Qt = (t, e = "input") => p(P.value(t), B[e](ht(t.set))), Yt = (t) => p(P.checked(t), ft(t.set)), j = (t, e) => {
1189
1186
  if (h.is(t))
1190
1187
  return (s) => {
1191
1188
  s = s.makeRef();
@@ -1194,7 +1191,7 @@ const ye = (t) => {
1194
1191
  let l;
1195
1192
  const a = i.on((f) => {
1196
1193
  if (f !== l) {
1197
- o == null || o.dispose(), n == null || n(!0), o = t.map((S) => S[f]);
1194
+ o == null || o.dispose(), n == null || n(!0), o = t.map((w) => w[f]);
1198
1195
  const g = e[f](o);
1199
1196
  n = c(g)(s), l = f;
1200
1197
  }
@@ -1209,15 +1206,15 @@ const ye = (t) => {
1209
1206
  d.map(t, (s) => ({ [s[e]]: s })),
1210
1207
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1211
1208
  r
1212
- ), Kt = (t, e) => De(t, "kind", e), xt = (t, e) => {
1209
+ ), Zt = (t, e) => De(t, "kind", e), Kt = (t, e) => {
1213
1210
  const r = d.map(t, ([s, n]) => ({ [s]: n }));
1214
1211
  return j(r, e);
1215
- }, er = (t, e) => De(t, "type", e), _t = (t, e) => j(
1212
+ }, xt = (t, e) => De(t, "type", e), gt = (t, e) => j(
1216
1213
  d.map(t, (r) => ({ [r]: !0 })),
1217
1214
  e
1218
- ), tr = (t, e = {}) => (r) => {
1215
+ ), er = (t, e = {}) => (r) => {
1219
1216
  const s = (e == null ? void 0 : e.firstSeparator) ?? t, n = (e == null ? void 0 : e.lastSeparator) ?? t;
1220
- return _t(
1217
+ return gt(
1221
1218
  r.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
1222
1219
  {
1223
1220
  first: () => s,
@@ -1233,7 +1230,7 @@ const ye = (t) => {
1233
1230
  return n[o] = i, n;
1234
1231
  }, {});
1235
1232
  return c(e(s))(r);
1236
- }, rr = (t, e) => (r) => {
1233
+ }, tr = (t, e) => (r) => {
1237
1234
  const s = [], n = Object.entries(t).reduce(
1238
1235
  (o, [i, l]) => (s.push(
1239
1236
  l((a) => (Reflect.set(o, i, a), null))(r)
@@ -1243,16 +1240,16 @@ const ye = (t) => {
1243
1240
  return s.push(e(n)(r)), (o) => {
1244
1241
  s.forEach((i) => i(o));
1245
1242
  };
1246
- }, sr = (t, e) => be([t], (r) => c(e(r[t]))), nr = (t, e) => be(t, (r) => c(e(r))), or = (t) => (e) => t(e), ir = (t) => (e) => (e.appendOrInsert(t), (r) => {
1243
+ }, rr = (t, e) => be([t], (r) => c(e(r[t]))), sr = (t, e) => be(t, (r) => c(e(r))), nr = (t) => (e) => t(e), or = (t) => (e) => (e.appendOrInsert(t), (r) => {
1247
1244
  r && m(t);
1248
- }), yt = (t, e, r) => {
1245
+ }), _t = (t, e, r) => {
1249
1246
  if (h.is(t)) {
1250
1247
  const s = t;
1251
1248
  return (n) => {
1252
1249
  n = n.makeRef();
1253
1250
  let o = null, i = !1;
1254
1251
  const l = V(null), a = s.on((f) => {
1255
- f == null ? (o == null || o(!0), o = c((r == null ? void 0 : r()) ?? w)(n), i = !1) : (l.value = f, i || (o == null || o(!0), o = c(e(l))(n), i = !0));
1252
+ f == null ? (o == null || o(!0), o = c((r == null ? void 0 : r()) ?? S)(n), i = !1) : (l.value = f, i || (o == null || o(!0), o = c(e(l))(n), i = !0));
1256
1253
  });
1257
1254
  return (f) => {
1258
1255
  a(), o == null || o(f), f && n.reference && m(n.reference);
@@ -1262,27 +1259,27 @@ const ye = (t) => {
1262
1259
  const s = t;
1263
1260
  if (s == null) {
1264
1261
  const n = r == null ? void 0 : r();
1265
- return n != null ? c(n) : w;
1262
+ return n != null ? c(n) : S;
1266
1263
  }
1267
1264
  return c(e(I(s)));
1268
1265
  }
1269
- }, z = (t) => (e) => (r) => t(r, e), Te = (t, e, r) => Ce(
1266
+ }, z = (t) => (e) => (r) => t(r, e), Te = (t, e, r) => Oe(
1270
1267
  t,
1271
1268
  () => e,
1272
1269
  () => r
1273
- ), Ce = (t, e, r) => yt(
1270
+ ), Oe = (t, e, r) => _t(
1274
1271
  d.map(t, (s) => s ? !0 : null),
1275
1272
  e,
1276
1273
  r ?? void 0
1277
- ), lr = (t, e, r) => vt(
1274
+ ), ir = (t, e, r) => yt(
1278
1275
  t,
1279
1276
  () => e,
1280
1277
  () => r
1281
- ), vt = (t, e, r) => Ce(
1278
+ ), yt = (t, e, r) => Oe(
1282
1279
  d.map(t, (s) => !s),
1283
1280
  e,
1284
1281
  r
1285
- ), Le = (t, e, r) => r != null ? Le(t, (s) => {
1282
+ ), Ce = (t, e, r) => r != null ? Ce(t, (s) => {
1286
1283
  const n = new T(
1287
1284
  s.index,
1288
1285
  s.total.map((o) => o - 1)
@@ -1290,7 +1287,7 @@ const ye = (t) => {
1290
1287
  return p(
1291
1288
  z(n.dispose),
1292
1289
  c(e(s)),
1293
- Te(s.isLast, w, r(n))
1290
+ Te(s.isLast, S, r(n))
1294
1291
  );
1295
1292
  }) : h.is(t) ? (s) => {
1296
1293
  s = s.makeRef();
@@ -1316,9 +1313,9 @@ const ye = (t) => {
1316
1313
  ...Array.from({ length: t }, (s, n) => n).map(
1317
1314
  (s) => c(e(new T(s, I(t))))
1318
1315
  )
1319
- ), wt = (t, e, r) => {
1316
+ ), vt = (t, e, r) => {
1320
1317
  if (r != null)
1321
- return wt(t, (s, n) => {
1318
+ return vt(t, (s, n) => {
1322
1319
  const o = new T(
1323
1320
  n.index,
1324
1321
  n.total.map((i) => i - 1)
@@ -1326,12 +1323,12 @@ const ye = (t) => {
1326
1323
  return p([
1327
1324
  z(o.dispose),
1328
1325
  c(e(s, n)),
1329
- Te(n.isLast, w, r(o))
1326
+ Te(n.isLast, S, r(o))
1330
1327
  ]);
1331
1328
  });
1332
1329
  {
1333
1330
  const s = d.map(t, (o) => o.length), n = d.toSignal(t);
1334
- return Le(s, (o) => {
1331
+ return Ce(s, (o) => {
1335
1332
  const i = n.map((l) => l[o.index]);
1336
1333
  return p(
1337
1334
  z(i.dispose),
@@ -1339,7 +1336,7 @@ const ye = (t) => {
1339
1336
  );
1340
1337
  });
1341
1338
  }
1342
- }, ur = (t, e) => {
1339
+ }, lr = (t, e) => {
1343
1340
  if (h.is(t)) {
1344
1341
  const r = t;
1345
1342
  return (s) => {
@@ -1356,7 +1353,7 @@ const ye = (t) => {
1356
1353
  };
1357
1354
  }
1358
1355
  return c(e(t));
1359
- }, ar = (t, e, r = () => w) => j(
1356
+ }, ur = (t, e, r = () => S) => j(
1360
1357
  d.map(
1361
1358
  t,
1362
1359
  (s) => s.length > 0 ? { notEmpty: s } : { whenEmpty: null }
@@ -1365,44 +1362,44 @@ const ye = (t) => {
1365
1362
  notEmpty: (s) => e(s),
1366
1363
  whenEmpty: () => r()
1367
1364
  }
1368
- ), cr = (t) => (e) => t(e.element) ?? (() => {
1369
- }), Oe = (t, e) => {
1365
+ ), ar = (t) => (e) => t(e.element) ?? (() => {
1366
+ }), Le = (t, e) => {
1370
1367
  const r = t(e);
1371
1368
  return () => r(!0);
1372
- }, fr = (t, e, { doc: r, clear: s } = {}) => {
1369
+ }, cr = (t, e, { doc: r, clear: s } = {}) => {
1373
1370
  const n = typeof e == "string" ? (r ?? document).querySelector(e) : e;
1374
1371
  if (n === null)
1375
1372
  throw new St(
1376
1373
  `Cannot find element by selector for render: ${e}`
1377
1374
  );
1378
- s !== !1 && (r ?? n.ownerDocument) != null && at(r ?? n.ownerDocument);
1379
- const o = Qe(n), i = fe(n) ? void 0 : n, l = y.of(o, i);
1380
- return Oe(t, l);
1375
+ s !== !1 && (r ?? n.ownerDocument) != null && ut(r ?? n.ownerDocument);
1376
+ const o = Ye(n), i = fe(n) ? void 0 : n, l = y.of(o, i);
1377
+ return Le(t, l);
1381
1378
  };
1382
1379
  class St extends Error {
1383
1380
  constructor(e) {
1384
1381
  super(e);
1385
1382
  }
1386
1383
  }
1387
- const hr = (t, e) => (r) => {
1384
+ const fr = (t, e) => (r) => {
1388
1385
  const s = r.document.querySelector(t);
1389
1386
  if (s === null)
1390
1387
  throw new Error(`Cannot find element by selector for portal: ${t}`);
1391
- return Oe(
1388
+ return Le(
1392
1389
  c(e),
1393
1390
  r.withElement(s).withFirstLevel()
1394
1391
  );
1395
- }, dr = (t) => Symbol(t), Ne = (t, e) => (r) => c(e)(r.withProviders(t)), pr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : c, mr = (t, e, r) => Ne({ [t]: e }, c(r)), gr = (t, e) => Ne(t, c(e)), At = (t, e) => (r) => {
1392
+ }, hr = (t) => Symbol(t), ke = (t, e) => (r) => c(e)(r.withProviders(t)), dr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : c, pr = (t, e, r) => ke({ [t]: e }, c(r)), mr = (t, e) => ke(t, c(e)), wt = (t, e) => (r) => {
1396
1393
  const s = r.element, n = s.style.getPropertyValue(t);
1397
1394
  return s.style.setProperty(t, e), (o) => {
1398
1395
  o && s.style.setProperty(t, n);
1399
1396
  };
1400
- }, Et = (t, e) => (r) => {
1397
+ }, At = (t, e) => (r) => {
1401
1398
  const s = r.element, n = s.style.getPropertyValue(t);
1402
1399
  return e.on((o) => s.style.setProperty(t, o)), (o) => {
1403
1400
  o && s.style.setProperty(t, n);
1404
1401
  };
1405
- }, _r = new Proxy(
1402
+ }, gr = new Proxy(
1406
1403
  {},
1407
1404
  {
1408
1405
  /**
@@ -1413,69 +1410,69 @@ const hr = (t, e) => (r) => {
1413
1410
  * @returns The renderable component for the specified attribute.
1414
1411
  *
1415
1412
  */
1416
- get: (t, e) => (r) => h.is(r) ? Et(e, r) : At(e, r)
1413
+ get: (t, e) => (r) => h.is(r) ? At(e, r) : wt(e, r)
1417
1414
  }
1418
1415
  );
1419
1416
  export {
1420
- Ut as Async,
1417
+ jt as Async,
1421
1418
  Yt as BindChecked,
1422
- zt as BindDate,
1423
- Xt as BindDateTime,
1424
- Zt as BindNumber,
1419
+ Ht as BindDate,
1420
+ zt as BindDateTime,
1421
+ Xt as BindNumber,
1425
1422
  Qt as BindText,
1426
1423
  E as Computed,
1427
- tr as Conjunction,
1424
+ er as Conjunction,
1428
1425
  y as DOMContext,
1429
- ir as DOMNode,
1426
+ or as DOMNode,
1430
1427
  pe as El,
1431
1428
  me as ElNS,
1432
1429
  T as ElementPosition,
1433
- w as Empty,
1434
- yt as Ensure,
1435
- wt as ForEach,
1430
+ S as Empty,
1431
+ _t as Ensure,
1432
+ vt as ForEach,
1436
1433
  p as Fragment,
1437
- vt as LazyUnless,
1438
- Ce as LazyWhen,
1439
- ur as MapSignal,
1434
+ yt as LazyUnless,
1435
+ Oe as LazyWhen,
1436
+ lr as MapSignal,
1440
1437
  se as MemoryStore,
1441
- ar as NotEmpty,
1442
- ht as OnChecked,
1443
- or as OnCtx,
1444
- cr as OnMount,
1438
+ ur as NotEmpty,
1439
+ ft as OnChecked,
1440
+ nr as OnCtx,
1441
+ ar as OnMount,
1445
1442
  z as OnUnmount,
1446
1443
  j as OneOf,
1447
1444
  De as OneOfField,
1448
- Kt as OneOfKind,
1449
- xt as OneOfTuple,
1450
- er as OneOfType,
1451
- _t as OneOfValue,
1452
- hr as Portal,
1445
+ Zt as OneOfKind,
1446
+ Kt as OneOfTuple,
1447
+ xt as OneOfType,
1448
+ gt as OneOfValue,
1449
+ fr as Portal,
1453
1450
  F as Prop,
1454
- pr as Provide,
1455
- Ze as ProviderNotFoundError,
1451
+ dr as Provide,
1452
+ Qe as ProviderNotFoundError,
1456
1453
  St as RenderingError,
1457
- Le as Repeat,
1454
+ Ce as Repeat,
1458
1455
  h as Signal,
1459
1456
  Ee as Task,
1460
- Nt as TextNode,
1461
- lr as Unless,
1462
- rr as Use,
1463
- sr as UseProvider,
1464
- nr as UseProviders,
1465
- jt as UseSSRDone,
1457
+ Lt as TextNode,
1458
+ ir as Unless,
1459
+ tr as Use,
1460
+ rr as UseProvider,
1461
+ sr as UseProviders,
1462
+ Bt as UseSSRDone,
1466
1463
  d as Value,
1467
1464
  Te as When,
1468
- mr as WithProvider,
1469
- gr as WithProviders,
1465
+ pr as WithProvider,
1466
+ mr as WithProviders,
1470
1467
  ve as _addNodeTracker,
1471
- at as _clearSSR,
1472
- Qe as _getSelfOrParentElement,
1468
+ ut as _clearSSR,
1469
+ Ye as _getSelfOrParentElement,
1473
1470
  fe as _isElement,
1474
1471
  ce as _makeGetter,
1475
1472
  ae as _makeSetter,
1476
1473
  _e as _maybeAddAttributeTracker,
1477
1474
  ye as _maybeAddClassTracker,
1478
- we as _maybeAddTextTracker,
1475
+ Se as _maybeAddTextTracker,
1479
1476
  m as _removeDOMNode,
1480
1477
  Xe as _setAttribute,
1481
1478
  Je as _setBooleanProperty,
@@ -1484,47 +1481,47 @@ export {
1484
1481
  ze as _setStringProperty,
1485
1482
  de as _signalText,
1486
1483
  he as _staticText,
1487
- Lt as animateSignal,
1484
+ Ot as animateSignal,
1488
1485
  Ge as animateSignals,
1489
- Rt as aria,
1486
+ Nt as aria,
1490
1487
  P as attr,
1491
1488
  kt as dataAttr,
1492
- Gt as emitChecked,
1493
- Jt as emitPreventDefault,
1494
- Ht as emitStopImmediatePropagation,
1495
- Wt as emitStopPropagation,
1496
- dt as emitValue,
1497
- mt as emitValueAsDate,
1498
- gt as emitValueAsDateTime,
1499
- pt as emitValueAsNumber,
1489
+ Ut as emitChecked,
1490
+ Gt as emitPreventDefault,
1491
+ Wt as emitStopImmediatePropagation,
1492
+ Jt as emitStopPropagation,
1493
+ ht as emitValue,
1494
+ pt as emitValueAsDate,
1495
+ mt as emitValueAsDateTime,
1496
+ dt as emitValueAsNumber,
1500
1497
  Ie as endInterpolate,
1501
1498
  Be as guessInterpolate,
1502
- Ft as html,
1503
- Vt as input,
1499
+ $t as html,
1500
+ Ft as input,
1504
1501
  qe as interpolateDate,
1505
1502
  Fe as interpolateNumber,
1506
1503
  Ve as interpolateString,
1507
- k as isSSR,
1508
- Tt as localStorageProp,
1504
+ N as isSSR,
1505
+ bt as localStorageProp,
1509
1506
  X as makeComputed,
1510
- Dt as makeComputedOf,
1511
- Ot as makeComputedRecord,
1507
+ Pt as makeComputedOf,
1508
+ Ct as makeComputedRecord,
1512
1509
  Ue as makeEffect,
1513
- bt as makeEffectOf,
1510
+ Dt as makeEffectOf,
1514
1511
  V as makeProp,
1515
- dr as makeProviderMark,
1512
+ hr as makeProviderMark,
1516
1513
  I as makeSignal,
1517
- It as math,
1518
- $t as mathAttr,
1514
+ qt as math,
1515
+ Mt as mathAttr,
1519
1516
  B as on,
1520
- Bt as prepareSSR,
1521
- ut as removeTextTrackers,
1522
- fr as render,
1523
- Oe as renderWithContext,
1517
+ It as prepareSSR,
1518
+ lt as removeTextTrackers,
1519
+ cr as render,
1520
+ Le as renderWithContext,
1524
1521
  c as renderableOfTNode,
1525
- Ct as sessionStorageProp,
1522
+ Tt as sessionStorageProp,
1526
1523
  ne as storedProp,
1527
- _r as style,
1528
- qt as svg,
1529
- Mt as svgAttr
1524
+ gr as style,
1525
+ Vt as svg,
1526
+ Rt as svgAttr
1530
1527
  };