@tempots/dom 19.3.0 → 20.0.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
@@ -2,7 +2,7 @@ var De = Object.defineProperty;
2
2
  var be = (t, e, r) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var l = (t, e, r) => be(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  const Te = (t, e, r) => t + (e - t) * r;
5
- const Ce = (t, e, r) => {
5
+ const Le = (t, e, r) => {
6
6
  const s = Math.max(t.length, e.length);
7
7
  let n = "";
8
8
  for (let o = 0; o < s; o++) {
@@ -12,7 +12,7 @@ const Ce = (t, e, r) => {
12
12
  isNaN(a) && (a = 97), n += String.fromCharCode(i + (a - i) * r);
13
13
  }
14
14
  return n;
15
- }, Le = (t, e, r) => new Date(t.getTime() + (e.getTime() - t.getTime()) * r), Ne = (t, e) => e, Oe = (t) => typeof t == "number" ? Te : typeof t == "string" ? Ce : t instanceof Date ? Le : Ne;
15
+ }, Ce = (t, e, r) => new Date(t.getTime() + (e.getTime() - t.getTime()) * r), Ne = (t, e) => e, Oe = (t) => typeof t == "number" ? Te : typeof t == "string" ? Le : t instanceof Date ? Ce : Ne;
16
16
  class ke {
17
17
  /**
18
18
  * Creates a new instance of `ElementPosition`.
@@ -190,18 +190,9 @@ const p = class p {
190
190
  */
191
191
  l(this, "at", (e) => this.map((r) => r[e]));
192
192
  /**
193
- * Represents a collection of signals for each key in the value of the signal.
194
- * @typeParam T - The type of the signals.
193
+ * @internal
195
194
  */
196
- l(this, "$", new Proxy(this, {
197
- /**
198
- * Retrieves the signal with the specified key.
199
- * @param _ - The target object.
200
- * @param key - The key of the signal.
201
- * @returns The signal associated with the key.
202
- */
203
- get: (e, r) => this.at(r)
204
- }));
195
+ l(this, "_$");
205
196
  l(this, "filter", (e, r) => {
206
197
  let s = r ?? this.get();
207
198
  const n = new E(() => {
@@ -250,7 +241,7 @@ const p = class p {
250
241
  * @returns A property that holds the mapped value and can be observed for changes.
251
242
  */
252
243
  l(this, "mapAsync", (e, r, s, n = (o, i) => o === i) => {
253
- const o = C(r, n);
244
+ const o = L(r, n);
254
245
  let i = 0, a = new AbortController();
255
246
  return o.onDispose(
256
247
  this.on(async (u) => {
@@ -295,7 +286,7 @@ const p = class p {
295
286
  * @param autoDisposeProp - Determines whether the derived property should be automatically disposed.
296
287
  * @returns The derived property.
297
288
  */
298
- l(this, "deriveProp", (e = !0) => this.feedProp(C(this.get()), e));
289
+ l(this, "deriveProp", (e = !0) => this.feedProp(L(this.get()), e));
299
290
  /**
300
291
  * Returns a signal that emits the count of values received so far.
301
292
  * @returns A signal that emits the count of values received so far.
@@ -327,6 +318,15 @@ const p = class p {
327
318
  get value() {
328
319
  return this._value;
329
320
  }
321
+ /**
322
+ * Represents a collection of signals mapping to each key/field in the wrapped value.
323
+ * @typeParam T - The type of the signals.
324
+ */
325
+ get $() {
326
+ return this._$ !== void 0 ? this._$ : this._$ = new Proxy(this, {
327
+ get: (e, r) => this.at(r)
328
+ });
329
+ }
330
330
  };
331
331
  /**
332
332
  * Creates a Signal that holds the result of a Promise.
@@ -450,7 +450,7 @@ class E extends h {
450
450
  return this.get();
451
451
  }
452
452
  }
453
- const V = class V extends h {
453
+ const F = class F extends h {
454
454
  constructor() {
455
455
  super(...arguments);
456
456
  /**
@@ -504,7 +504,7 @@ const V = class V extends h {
504
504
  * @returns A Prop object representing the isomorphism.
505
505
  */
506
506
  l(this, "iso", (r, s, n = (o, i) => o === i) => {
507
- const o = new V(r(this.get()), n);
507
+ const o = new F(r(this.get()), n);
508
508
  return o.onDispose(this.on((i) => o.set(r(i)))), o.on((i) => this._setAndNotify(s(i), !1)), o;
509
509
  });
510
510
  /**
@@ -533,16 +533,16 @@ const V = class V extends h {
533
533
  * @param value - The value to check.
534
534
  * @returns `true` if the value is a Prop, `false` otherwise.
535
535
  */
536
- l(V, "is", (r) => (
536
+ l(F, "is", (r) => (
537
537
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
538
538
  r != null && r.$__prop__ === !0
539
539
  ));
540
- let F = V;
541
- const U = (t, e, r = (s, n) => s === n) => {
540
+ let $ = F;
541
+ const j = (t, e, r = (s, n) => s === n) => {
542
542
  const s = new E(t, r);
543
543
  return e.forEach((n) => n.setDerivative(s)), s;
544
- }, pt = (t, e) => U(t, e).dispose, C = (t, e = (r, s) => r === s) => new F(t, e), mt = (t, e = (r, s) => r === s) => new h(t, e);
545
- class z {
544
+ }, dt = (t, e) => j(t, e).dispose, L = (t, e = (r, s) => r === s) => new $(t, e), pt = (t, e = (r, s) => r === s) => new h(t, e);
545
+ class Q {
546
546
  constructor() {
547
547
  l(this, "_store", /* @__PURE__ */ new Map());
548
548
  /**
@@ -561,7 +561,7 @@ class z {
561
561
  });
562
562
  }
563
563
  }
564
- const Q = ({
564
+ const Y = ({
565
565
  key: t,
566
566
  defaultValue: e,
567
567
  store: r,
@@ -570,42 +570,42 @@ const Q = ({
570
570
  equals: o = (a, u) => a === u,
571
571
  onLoad: i = (a) => a
572
572
  }) => {
573
- const a = r.getItem(t), u = new F(
573
+ const a = r.getItem(t), u = new $(
574
574
  a != null ? i(n(a)) : typeof e == "function" ? e() : e,
575
575
  o
576
576
  );
577
577
  return u.on((f) => {
578
578
  r.setItem(t, s(f));
579
579
  }), u;
580
- }, gt = (t) => Q({
580
+ }, mt = (t) => Y({
581
581
  ...t,
582
- store: (window == null ? void 0 : window.localStorage) ?? new z()
583
- }), _t = (t) => Q({
582
+ store: (window == null ? void 0 : window.localStorage) ?? new Q()
583
+ }), gt = (t) => Y({
584
584
  ...t,
585
- store: (window == null ? void 0 : window.sessionStorage) ?? new z()
585
+ store: (window == null ? void 0 : window.sessionStorage) ?? new Q()
586
586
  });
587
- function X(t) {
587
+ function z(t) {
588
588
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
589
589
  }
590
590
  const Me = (t, e, r, s) => {
591
591
  const n = (s == null ? void 0 : s.duration) ?? 300, o = (s == null ? void 0 : s.easing) ?? ((_) => _), i = (s == null ? void 0 : s.equals) ?? ((_, k) => _ === k);
592
- let a = s == null ? void 0 : s.interpolate, u = t, f = e(), d = performance.now(), A = null, m = !0;
593
- const D = new E(e, i), S = C(t, i);
594
- S.onDispose(() => {
595
- A !== null && cancelAnimationFrame(A);
596
- }), S.onDispose(D.dispose), r.forEach((_) => {
597
- _.setDerivative(D), _.onDispose(S.dispose);
592
+ let a = s == null ? void 0 : s.interpolate, u = t, f = e(), d = performance.now(), S = null, m = !0;
593
+ const D = new E(e, i), A = L(t, i);
594
+ A.onDispose(() => {
595
+ S !== null && cancelAnimationFrame(S);
596
+ }), A.onDispose(D.dispose), r.forEach((_) => {
597
+ _.setDerivative(D), _.onDispose(A.dispose);
598
598
  });
599
599
  const Ee = (_) => {
600
- f = _, d = performance.now(), u = S.value, m && (m = !1, A = X(J));
601
- }, J = () => {
600
+ f = _, d = performance.now(), u = A.value, m && (m = !1, S = z(H));
601
+ }, H = () => {
602
602
  const k = (performance.now() - d) / h.unwrap(n), Pe = o(k);
603
603
  a == null && (a = Oe(u));
604
- let K = a(u, f, Pe);
605
- k >= 1 ? (m = !0, K = f) : A = X(J), S.set(K);
604
+ let X = a(u, f, Pe);
605
+ k >= 1 ? (m = !0, X = f) : S = z(H), A.set(X);
606
606
  };
607
- return D.on(Ee), S;
608
- }, vt = (t, e) => {
607
+ return D.on(Ee), A;
608
+ }, _t = (t, e) => {
609
609
  const { initialValue: r, ...s } = e ?? {};
610
610
  return Me(
611
611
  r ?? t.get(),
@@ -613,13 +613,13 @@ const Me = (t, e, r, s) => {
613
613
  [t],
614
614
  s
615
615
  );
616
- }, yt = (t, e) => {
616
+ }, vt = (t, e) => {
617
617
  const { signals: r, literals: s } = Object.entries(t).reduce(
618
618
  ({ signals: o, literals: i }, [a, u]) => (h.is(u) ? o.push([a, u]) : i[a] = u, { signals: o, literals: i }),
619
619
  { signals: [], literals: {} }
620
620
  ), n = r.map(([, o]) => o);
621
- return U(() => (r.forEach(([o, i]) => s[o] = i.value), e(s)), n);
622
- }, Y = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Z = /* @__PURE__ */ new Set([
621
+ return j(() => (r.forEach(([o, i]) => s[o] = i.value), e(s)), n);
622
+ }, Z = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), K = /* @__PURE__ */ new Set([
623
623
  "rowSpan",
624
624
  "colSpan",
625
625
  "tabIndex",
@@ -639,17 +639,17 @@ const Me = (t, e, r, s) => {
639
639
  const r = e(t);
640
640
  return q.set(t, r), r;
641
641
  }
642
- }, Fe = (t) => (e, r) => {
642
+ }, $e = (t) => (e, r) => {
643
643
  r == null ? e[t] = null : e[t] = !!r;
644
- }, Ve = (t) => (e, r) => {
644
+ }, Fe = (t) => (e, r) => {
645
645
  r == null ? e[t] = null : e[t] = Number(r);
646
- }, $e = (t) => (e, r) => {
646
+ }, Ve = (t) => (e, r) => {
647
647
  r == null ? e[t] = null : e[t] = r;
648
648
  }, qe = (t) => (e, r) => {
649
649
  r == null ? e[t] = null : e[t] = String(r);
650
650
  }, Ie = (t) => (e, r) => {
651
651
  r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
652
- }, te = (t) => Y.has(t) ? b(t, Fe) : Z.has(t) ? b(t, Ve) : x.has(t) ? b(t, $e) : ee.has(t) ? b(t, qe) : b(t, Ie), re = (t) => (e) => Y.has(t) ? !!e[t] : Z.has(t) ? Number(e[t]) : x.has(t) ? e[t] : ee.has(t) ? String(e[t]) : e.getAttribute(t);
652
+ }, te = (t) => Z.has(t) ? b(t, $e) : K.has(t) ? b(t, Fe) : x.has(t) ? b(t, Ve) : ee.has(t) ? b(t, qe) : b(t, Ie), re = (t) => (e) => Z.has(t) ? !!e[t] : K.has(t) ? Number(e[t]) : x.has(t) ? e[t] : ee.has(t) ? String(e[t]) : e.getAttribute(t);
653
653
  class v {
654
654
  /**
655
655
  * Constructs a new `DOMContext` instance.
@@ -795,28 +795,7 @@ class Be extends Error {
795
795
  const g = (t) => {
796
796
  const e = t;
797
797
  e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
798
- }, Ue = (t) => se(t) ? t : t.parentElement, se = (t) => t.nodeType === 1;
799
- function je(t, e, r) {
800
- let s = t.target;
801
- for (; s != null && !(s instanceof HTMLAnchorElement); )
802
- s = s.parentElement;
803
- if (s == null) return !0;
804
- const n = s;
805
- if (t.button !== 0 || t.ctrlKey || t.metaKey || n.target !== "_self" && n.target !== "" || n.getAttribute("download") != null)
806
- return !0;
807
- if (r) {
808
- const { pathname: o, search: i, hash: a } = n, u = o + i + a;
809
- if (n.getAttribute("href") !== u || e === !0 && !/\/[^/.]*$/.test(o) || Array.isArray(e) && !e.some((f) => o.endsWith(f)))
810
- return !0;
811
- }
812
- return !1;
813
- }
814
- const wt = (t, {
815
- checkExtension: e = [".html"],
816
- checkExternalUrl: r = !0
817
- } = {}) => (s) => {
818
- je(s, e, r) || t() && s.preventDefault();
819
- }, ne = (t) => (e) => {
798
+ }, je = (t) => se(t) ? t : t.parentElement, se = (t) => t.nodeType === 1, ne = (t) => (e) => {
820
799
  he(e);
821
800
  const r = e.createText(t);
822
801
  return e.appendOrInsert(r), (s) => {
@@ -830,13 +809,13 @@ const wt = (t, {
830
809
  return (n) => {
831
810
  s(), n && g(r);
832
811
  };
833
- }, At = (t) => h.is(t) ? oe(t) : ne(t), y = (...t) => (e) => {
812
+ }, yt = (t) => h.is(t) ? oe(t) : ne(t), y = (...t) => (e) => {
834
813
  const r = t.map((s) => c(s)(e));
835
814
  return (s) => {
836
815
  r.forEach((n) => n(s));
837
816
  };
838
817
  }, w = () => () => {
839
- }, We = (t) => (e) => (ce(e), e.element.classList.add(...t), (r) => {
818
+ }, Ue = (t) => (e) => (ce(e), e.element.classList.add(...t), (r) => {
840
819
  r && e.element.classList.remove(...t);
841
820
  }), Ge = (t) => (e) => {
842
821
  ce(e);
@@ -848,7 +827,7 @@ const wt = (t, {
848
827
  return (o) => {
849
828
  n(), o && s.forEach((i) => r.classList.remove(i)), s.length = 0;
850
829
  };
851
- }, L = (t, e) => {
830
+ }, C = (t, e) => {
852
831
  const r = te(t), s = re(t);
853
832
  return (n) => {
854
833
  ae(n, t);
@@ -880,17 +859,17 @@ const wt = (t, {
880
859
  * @returns The renderable component for the specified attribute.
881
860
  *
882
861
  */
883
- get: (t, e) => e === "class" ? (r) => h.is(r) ? Ge(r) : We(
862
+ get: (t, e) => e === "class" ? (r) => h.is(r) ? Ge(r) : Ue(
884
863
  (r ?? "").split(" ").filter((s) => s.length > 0)
885
864
  ) : (r) => h.is(r) ? N(
886
865
  e,
887
866
  r
888
- ) : L(
867
+ ) : C(
889
868
  e,
890
869
  r
891
870
  )
892
871
  }
893
- ), St = new Proxy(
872
+ ), wt = new Proxy(
894
873
  {},
895
874
  {
896
875
  /**
@@ -904,9 +883,9 @@ const wt = (t, {
904
883
  get: (t, e) => (r) => h.is(r) ? N(
905
884
  `data-${e}`,
906
885
  r
907
- ) : L(`data-${e}`, r)
886
+ ) : C(`data-${e}`, r)
908
887
  }
909
- ), Et = new Proxy(
888
+ ), St = new Proxy(
910
889
  {},
911
890
  {
912
891
  /**
@@ -920,12 +899,12 @@ const wt = (t, {
920
899
  get: (t, e) => (r) => h.is(r) ? N(
921
900
  `aria-${e}`,
922
901
  r
923
- ) : L(
902
+ ) : C(
924
903
  `aria-${e}`,
925
904
  r
926
905
  )
927
906
  }
928
- ), Pt = new Proxy(
907
+ ), At = new Proxy(
929
908
  {},
930
909
  {
931
910
  /**
@@ -939,12 +918,12 @@ const wt = (t, {
939
918
  get: (t, e) => (r) => h.is(r) ? N(
940
919
  e,
941
920
  r
942
- ) : L(
921
+ ) : C(
943
922
  e,
944
923
  r
945
924
  )
946
925
  }
947
- ), Dt = new Proxy(
926
+ ), Et = new Proxy(
948
927
  {},
949
928
  {
950
929
  /**
@@ -957,7 +936,7 @@ const wt = (t, {
957
936
  get: (t, e) => (r) => h.is(r) ? N(
958
937
  e,
959
938
  r
960
- ) : L(
939
+ ) : C(
961
940
  e,
962
941
  r
963
942
  )
@@ -976,7 +955,7 @@ const wt = (t, {
976
955
  return (i) => {
977
956
  o.forEach((a) => a(!1)), i && g(n);
978
957
  };
979
- }, bt = new Proxy(
958
+ }, Pt = new Proxy(
980
959
  {},
981
960
  {
982
961
  /**
@@ -986,7 +965,7 @@ const wt = (t, {
986
965
  */
987
966
  get: (t, e) => (...r) => ie(e, r.flatMap(c))
988
967
  }
989
- ), Tt = new Proxy(
968
+ ), Dt = new Proxy(
990
969
  {},
991
970
  {
992
971
  /**
@@ -996,7 +975,7 @@ const wt = (t, {
996
975
  */
997
976
  get: (t, e) => (...r) => ie("input", P.type(e), ...r)
998
977
  }
999
- ), He = "http://www.w3.org/2000/svg", Ct = new Proxy(
978
+ ), Je = "http://www.w3.org/2000/svg", bt = new Proxy(
1000
979
  {},
1001
980
  {
1002
981
  /**
@@ -1004,9 +983,9 @@ const wt = (t, {
1004
983
  * @param tagName - The SVG tag name.
1005
984
  * @returns A renderable function that creates and appends the SVG element to the DOM.
1006
985
  */
1007
- get: (t, e) => (...r) => le(e, He, r.flatMap(c))
986
+ get: (t, e) => (...r) => le(e, Je, r.flatMap(c))
1008
987
  }
1009
- ), Je = "http://www.w3.org/1998/Math/MathML", Lt = new Proxy(
988
+ ), We = "http://www.w3.org/1998/Math/MathML", Tt = new Proxy(
1010
989
  {},
1011
990
  {
1012
991
  /**
@@ -1014,9 +993,9 @@ const wt = (t, {
1014
993
  * @param tagName - The Math tag name.
1015
994
  * @returns A renderable function that creates and appends the Math element to the DOM.
1016
995
  */
1017
- get: (t, e) => (...r) => le(e, Je, r.flatMap(c))
996
+ get: (t, e) => (...r) => le(e, We, r.flatMap(c))
1018
997
  }
1019
- ), T = "data-tempo-attr", R = "data-tempo-class", ue = "data-tempo-node", M = "data-tempo-text", Ke = (t, e) => {
998
+ ), T = "data-tempo-attr", R = "data-tempo-class", ue = "data-tempo-node", M = "data-tempo-text", He = (t, e) => {
1020
999
  const r = t.getAttribute(e);
1021
1000
  if (r != null) {
1022
1001
  const s = t.getAttribute(T) ?? "{}", n = { ...JSON.parse(s), name: r };
@@ -1026,7 +1005,7 @@ const wt = (t, {
1026
1005
  );
1027
1006
  }
1028
1007
  }, ae = (t, e) => {
1029
- O() && t.isFirstLevel && Ke(t.element, e);
1008
+ O() && t.isFirstLevel && He(t.element, e);
1030
1009
  }, Xe = (t) => {
1031
1010
  t.querySelectorAll(`[${T}]`).forEach((e) => {
1032
1011
  const r = JSON.parse(
@@ -1057,36 +1036,36 @@ const ce = (t) => {
1057
1036
  t.setAttribute(M, t.textContent ?? "");
1058
1037
  }, he = (t) => {
1059
1038
  O() && t.isFirstLevel && Ze(t.element);
1060
- }, xe = (t) => {
1039
+ }, Ke = (t) => {
1061
1040
  t.querySelectorAll(`[${M}]`).forEach((e) => {
1062
1041
  e.textContent = e.getAttribute(M), e.removeAttribute(M);
1063
1042
  });
1064
- }, et = (t) => {
1065
- Ye(t), Qe(t), Xe(t), xe(t);
1043
+ }, xe = (t) => {
1044
+ Ye(t), Qe(t), Xe(t), Ke(t);
1066
1045
  }, de = () => {
1067
1046
  const t = globalThis;
1068
1047
  return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
1069
1048
  isSSR: !1,
1070
1049
  counter: 0
1071
1050
  }), t.__tempoSSR__;
1072
- }, j = (t, e) => {
1051
+ }, U = (t, e) => {
1073
1052
  const r = de();
1074
1053
  r[t] = e;
1075
1054
  }, pe = (t) => de()[t], I = (t) => {
1076
- j("isSSR", t);
1077
- }, W = () => pe("counter"), tt = () => {
1078
- j("counter", (W() ?? 0) + 1);
1079
- }, rt = () => {
1080
- j("counter", (W() ?? 0) - 1);
1081
- }, Nt = (t = 30) => (I(!0), new Promise((e, r) => {
1055
+ U("isSSR", t);
1056
+ }, G = () => pe("counter"), et = () => {
1057
+ U("counter", (G() ?? 0) + 1);
1058
+ }, tt = () => {
1059
+ U("counter", (G() ?? 0) - 1);
1060
+ }, Lt = (t = 30) => (I(!0), new Promise((e, r) => {
1082
1061
  let s;
1083
1062
  const n = setInterval(() => {
1084
- W() <= 0 && (clearInterval(n), clearTimeout(s), I(!1), e());
1063
+ G() <= 0 && (clearInterval(n), clearTimeout(s), I(!1), e());
1085
1064
  }, 30);
1086
1065
  s = setTimeout(() => {
1087
1066
  clearInterval(n), I(!1), r(new Error("SSR Timeout"));
1088
1067
  }, t * 1e3);
1089
- })), Ot = (t) => (tt(), c(t(rt))), O = () => pe("isSSR"), me = (t, e) => {
1068
+ })), Ct = (t) => (et(), c(t(tt))), O = () => pe("isSSR"), me = (t, e) => {
1090
1069
  if (typeof e == "function")
1091
1070
  return me(t, { then: e });
1092
1071
  const r = e.pending != null ? c(e.pending) : w, s = e.then, n = e.error != null ? (o) => c(e.error(o)) : () => w;
@@ -1106,16 +1085,16 @@ const ce = (t) => {
1106
1085
  i = !1, u(f), f && o.reference && g(o.reference);
1107
1086
  };
1108
1087
  };
1109
- }, kt = (t, e) => me(() => t, e), ge = (t, e) => (r) => (r.element.addEventListener(t, e), (s) => {
1088
+ }, Nt = (t, e) => me(() => t, e), ge = (t, e) => (r) => (r.element.addEventListener(t, e), (s) => {
1110
1089
  s && r.element.removeEventListener(t, e);
1111
- }), st = (t) => ge("click", (e) => {
1090
+ }), rt = (t) => ge("click", (e) => {
1112
1091
  e.preventDefault();
1113
1092
  const r = e.target;
1114
1093
  setTimeout(() => {
1115
1094
  const s = r.ownerDocument != null ? r == null ? void 0 : r.checked : void 0;
1116
1095
  s != null && t(!s);
1117
1096
  }, 0);
1118
- }), $ = new Proxy(
1097
+ }), V = new Proxy(
1119
1098
  {},
1120
1099
  {
1121
1100
  /**
@@ -1125,13 +1104,13 @@ const ce = (t) => {
1125
1104
  */
1126
1105
  get: (t, e) => (r) => ge(e, r)
1127
1106
  }
1128
- ), nt = (t) => (e) => {
1107
+ ), st = (t) => (e) => {
1129
1108
  const r = e.target;
1130
1109
  t(r.value);
1131
- }, ot = (t) => (e) => {
1110
+ }, nt = (t) => (e) => {
1132
1111
  const r = e.target;
1133
1112
  t(r.valueAsNumber);
1134
- }, it = (t) => (e) => {
1113
+ }, ot = (t) => (e) => {
1135
1114
  const r = e.target;
1136
1115
  if (r.value === "")
1137
1116
  return;
@@ -1141,7 +1120,7 @@ const ce = (t) => {
1141
1120
  Number(s[2].substring(0, 2))
1142
1121
  );
1143
1122
  t(n);
1144
- }, lt = (t) => (e) => {
1123
+ }, it = (t) => (e) => {
1145
1124
  const r = e.target;
1146
1125
  if (r.value === "")
1147
1126
  return;
@@ -1151,25 +1130,25 @@ const ce = (t) => {
1151
1130
  Number(n[2])
1152
1131
  ), i = s[1].split(":");
1153
1132
  o.setHours(Number(i[0])), o.setMinutes(Number(i[1])), o.setSeconds(Number(i[2])), t(o);
1154
- }, Rt = (t) => (e) => {
1133
+ }, Ot = (t) => (e) => {
1155
1134
  const r = e.target;
1156
1135
  t(r.checked);
1157
- }, Mt = (t) => (e) => {
1136
+ }, kt = (t) => (e) => {
1158
1137
  e.preventDefault(), t();
1159
- }, Ft = (t) => (e) => {
1138
+ }, Rt = (t) => (e) => {
1160
1139
  e.stopPropagation(), t();
1161
- }, Vt = (t) => (e) => {
1140
+ }, Mt = (t) => (e) => {
1162
1141
  e.stopImmediatePropagation(), t();
1163
1142
  }, $t = (t, e = "input") => y(
1164
1143
  P.valueAsDate(t),
1165
- $[e](it(t.set))
1166
- ), qt = (t, e = "input") => y(
1144
+ V[e](ot(t.set))
1145
+ ), Ft = (t, e = "input") => y(
1167
1146
  P.valueAsDate(t),
1168
- $[e](lt(t.set))
1169
- ), It = (t, e = "input") => y(
1147
+ V[e](it(t.set))
1148
+ ), Vt = (t, e = "input") => y(
1170
1149
  P.valueAsNumber(t),
1171
- $[e](ot(t.set))
1172
- ), Bt = (t, e = "input") => y(P.value(t), $[e](nt(t.set))), Ut = (t) => y(P.checked(t), st(t.set)), G = (t, e) => (r) => {
1150
+ V[e](nt(t.set))
1151
+ ), qt = (t, e = "input") => y(P.value(t), V[e](st(t.set))), It = (t) => y(P.checked(t), rt(t.set)), J = (t, e) => (r) => {
1173
1152
  r = r.makeRef();
1174
1153
  let s, n;
1175
1154
  const o = t.map((u) => Object.keys(u)[0]);
@@ -1184,19 +1163,19 @@ const ce = (t) => {
1184
1163
  return (u) => {
1185
1164
  a(), u && r.reference != null && g(r.reference), s == null || s(!0);
1186
1165
  };
1187
- }, _e = (t, e, r) => G(
1166
+ }, _e = (t, e, r) => J(
1188
1167
  t.map((s) => ({ [s[e]]: s })),
1189
1168
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1190
1169
  r
1191
- ), jt = (t, e) => _e(t, "kind", e), Wt = (t, e) => {
1170
+ ), Bt = (t, e) => _e(t, "kind", e), jt = (t, e) => {
1192
1171
  const r = t.map(([s, n]) => ({ [s]: n }));
1193
- return G(r, e);
1194
- }, Gt = (t, e) => _e(t, "type", e), H = (t, e) => G(
1172
+ return J(r, e);
1173
+ }, Ut = (t, e) => _e(t, "type", e), W = (t, e) => J(
1195
1174
  t.map((r) => ({ [r]: !0 })),
1196
1175
  e
1197
- ), Ht = (t, e = {}) => (r) => {
1176
+ ), Gt = (t, e = {}) => (r) => {
1198
1177
  const s = (e == null ? void 0 : e.firstSeparator) ?? w, n = (e == null ? void 0 : e.lastSeparator) ?? w;
1199
- return H(
1178
+ return W(
1200
1179
  r.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
1201
1180
  {
1202
1181
  first: () => s,
@@ -1222,12 +1201,12 @@ const ce = (t) => {
1222
1201
  return s.push(e(n)(r)), (o) => {
1223
1202
  s.forEach((i) => i(o));
1224
1203
  };
1225
- }, Kt = (t, e) => ve([t], (r) => c(e(r[t]))), Xt = (t, e) => ve(t, (r) => c(e(r))), zt = (t) => (e) => t(e), Qt = (t) => (e) => (e.appendOrInsert(t), (r) => {
1204
+ }, Wt = (t, e) => ve([t], (r) => c(e(r[t]))), Ht = (t, e) => ve(t, (r) => c(e(r))), Xt = (t) => (e) => t(e), zt = (t) => (e) => (e.appendOrInsert(t), (r) => {
1226
1205
  r && g(t);
1227
- }), ut = (t, e, r) => (s) => {
1206
+ }), lt = (t, e, r) => (s) => {
1228
1207
  s = s.makeRef();
1229
1208
  let n = null, o = !1;
1230
- const i = C(null), a = t.on((u) => {
1209
+ const i = L(null), a = t.on((u) => {
1231
1210
  u == null ? (n == null || n(!0), n = c((r == null ? void 0 : r()) ?? w)(s), o = !1) : (i.value = u, o || (n == null || n(!0), n = c(e(i))(s), o = !0));
1232
1211
  });
1233
1212
  return (u) => {
@@ -1238,7 +1217,7 @@ const ce = (t) => {
1238
1217
  return y(
1239
1218
  B(() => n.dispose()),
1240
1219
  c(e(s)),
1241
- H(n, {
1220
+ W(n, {
1242
1221
  last: () => w,
1243
1222
  other: () => r(s)
1244
1223
  })
@@ -1250,13 +1229,13 @@ const ce = (t) => {
1250
1229
  (f) => new ke(f, u)
1251
1230
  )
1252
1231
  ), o = [], i = [], a = n.on((u) => {
1253
- var d, A;
1232
+ var d, S;
1254
1233
  const f = u.length;
1255
1234
  for (; f < o.length; )
1256
- (d = o.pop()) == null || d(!0), (A = i.pop()) == null || A.dispose();
1235
+ (d = o.pop()) == null || d(!0), (S = i.pop()) == null || S.dispose();
1257
1236
  for (let m = 0; m < f; m++)
1258
1237
  if (i[m] == null) {
1259
- i[m] = C(u[m]);
1238
+ i[m] = L(u[m]);
1260
1239
  const D = c(e(i[m]));
1261
1240
  o[m] = D(s);
1262
1241
  } else
@@ -1265,12 +1244,12 @@ const ce = (t) => {
1265
1244
  return (u) => {
1266
1245
  a(), u && s.reference && g(s.reference);
1267
1246
  };
1268
- }, at = (t, e, r) => r != null ? at(t, (s, n) => {
1247
+ }, ut = (t, e, r) => r != null ? ut(t, (s, n) => {
1269
1248
  const o = n.map((i) => i.isLast ? "last" : "other");
1270
1249
  return y([
1271
1250
  B(() => o.dispose()),
1272
1251
  c(e(s, n)),
1273
- H(o, {
1252
+ W(o, {
1274
1253
  last: () => w,
1275
1254
  other: () => r(n)
1276
1255
  })
@@ -1278,7 +1257,7 @@ const ce = (t) => {
1278
1257
  }) : (s) => {
1279
1258
  const n = t.map((o) => o.length);
1280
1259
  return ye(n, (o) => {
1281
- const i = U(
1260
+ const i = j(
1282
1261
  () => t.value[o.value.index],
1283
1262
  [o, t]
1284
1263
  );
@@ -1287,7 +1266,7 @@ const ce = (t) => {
1287
1266
  c(e(i, o))
1288
1267
  );
1289
1268
  })(s);
1290
- }, Yt = (t, e) => (r) => {
1269
+ }, Qt = (t, e) => (r) => {
1291
1270
  r = r.makeRef();
1292
1271
  const s = t.map((i) => c(e(i)));
1293
1272
  let n = () => {
@@ -1298,56 +1277,56 @@ const ce = (t) => {
1298
1277
  return (i) => {
1299
1278
  o(), n(i);
1300
1279
  };
1301
- }, we = (t, e, r) => ut(
1280
+ }, we = (t, e, r) => lt(
1302
1281
  t.map((s) => s ? !0 : null),
1303
1282
  () => e,
1304
1283
  r != null ? () => r : void 0
1305
- ), Zt = (t, e, r) => we(
1284
+ ), Yt = (t, e, r) => we(
1306
1285
  t.map((s) => !s),
1307
1286
  e,
1308
1287
  r
1309
- ), xt = (t, e, r = w) => we(
1288
+ ), Zt = (t, e, r = w) => we(
1310
1289
  t.map((s) => s.length > 0),
1311
1290
  e,
1312
1291
  r
1313
- ), er = (t) => (e) => t(e.element) ?? (() => {
1314
- }), Ae = (t, e) => {
1292
+ ), Kt = (t) => (e) => t(e.element) ?? (() => {
1293
+ }), Se = (t, e) => {
1315
1294
  const r = t(e);
1316
1295
  return () => r(!0);
1317
- }, tr = (t, e, { doc: r, clear: s } = {}) => {
1296
+ }, xt = (t, e, { doc: r, clear: s } = {}) => {
1318
1297
  const n = typeof e == "string" ? (r ?? document).querySelector(e) : e;
1319
1298
  if (n === null)
1320
- throw new ct(
1299
+ throw new at(
1321
1300
  `Cannot find element by selector for render: ${e}`
1322
1301
  );
1323
- s !== !1 && (r ?? n.ownerDocument) != null && et(r ?? n.ownerDocument);
1324
- const o = Ue(n), i = se(n) ? void 0 : n, a = v.of(o, i);
1325
- return Ae(t, a);
1302
+ s !== !1 && (r ?? n.ownerDocument) != null && xe(r ?? n.ownerDocument);
1303
+ const o = je(n), i = se(n) ? void 0 : n, a = v.of(o, i);
1304
+ return Se(t, a);
1326
1305
  };
1327
- class ct extends Error {
1306
+ class at extends Error {
1328
1307
  constructor(e) {
1329
1308
  super(e);
1330
1309
  }
1331
1310
  }
1332
- const rr = (t, e) => (r) => {
1311
+ const er = (t, e) => (r) => {
1333
1312
  const s = r.document.querySelector(t);
1334
1313
  if (s === null)
1335
1314
  throw new Error(`Cannot find element by selector for portal: ${t}`);
1336
- return Ae(
1315
+ return Se(
1337
1316
  c(e),
1338
1317
  r.withElement(s).withFirstLevel()
1339
1318
  );
1340
- }, sr = (t) => Symbol(t), Se = (t, e) => (r) => c(e)(r.withProviders(t)), nr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : c, or = (t, e, r) => Se({ [t]: e }, c(r)), ir = (t, e) => Se(t, c(e)), ft = (t, e) => (r) => {
1319
+ }, tr = (t) => Symbol(t), Ae = (t, e) => (r) => c(e)(r.withProviders(t)), rr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : c, sr = (t, e, r) => Ae({ [t]: e }, c(r)), nr = (t, e) => Ae(t, c(e)), ct = (t, e) => (r) => {
1341
1320
  const s = r.element, n = s.style.getPropertyValue(t);
1342
1321
  return s.style.setProperty(t, e), (o) => {
1343
1322
  o && s.style.setProperty(t, n);
1344
1323
  };
1345
- }, ht = (t, e) => (r) => {
1324
+ }, ft = (t, e) => (r) => {
1346
1325
  const s = r.element, n = s.style.getPropertyValue(t);
1347
1326
  return e.on((o) => s.style.setProperty(t, o)), (o) => {
1348
1327
  o && s.style.setProperty(t, n);
1349
1328
  };
1350
- }, lr = new Proxy(
1329
+ }, or = new Proxy(
1351
1330
  {},
1352
1331
  {
1353
1332
  /**
@@ -1358,60 +1337,60 @@ const rr = (t, e) => (r) => {
1358
1337
  * @returns The renderable component for the specified attribute.
1359
1338
  *
1360
1339
  */
1361
- get: (t, e) => (r) => h.is(r) ? ht(e, r) : ft(e, r)
1340
+ get: (t, e) => (r) => h.is(r) ? ft(e, r) : ct(e, r)
1362
1341
  }
1363
1342
  );
1364
1343
  export {
1365
- kt as Async,
1366
- Ut as BindChecked,
1344
+ Nt as Async,
1345
+ It as BindChecked,
1367
1346
  $t as BindDate,
1368
- qt as BindDateTime,
1369
- It as BindNumber,
1370
- Bt as BindText,
1347
+ Ft as BindDateTime,
1348
+ Vt as BindNumber,
1349
+ qt as BindText,
1371
1350
  E as Computed,
1372
- Ht as Conjunction,
1351
+ Gt as Conjunction,
1373
1352
  v as DOMContext,
1374
- Qt as DOMNode,
1353
+ zt as DOMNode,
1375
1354
  ie as El,
1376
1355
  le as ElNS,
1377
1356
  ke as ElementPosition,
1378
1357
  w as Empty,
1379
- ut as Ensure,
1380
- at as ForEach,
1358
+ lt as Ensure,
1359
+ ut as ForEach,
1381
1360
  y as Fragment,
1382
- Yt as MapSignal,
1383
- z as MemoryStore,
1384
- xt as NotEmpty,
1385
- st as OnChecked,
1386
- zt as OnCtx,
1387
- er as OnMount,
1361
+ Qt as MapSignal,
1362
+ Q as MemoryStore,
1363
+ Zt as NotEmpty,
1364
+ rt as OnChecked,
1365
+ Xt as OnCtx,
1366
+ Kt as OnMount,
1388
1367
  B as OnUnmount,
1389
- G as OneOf,
1368
+ J as OneOf,
1390
1369
  _e as OneOfField,
1391
- jt as OneOfKind,
1392
- Wt as OneOfTuple,
1393
- Gt as OneOfType,
1394
- H as OneOfValue,
1395
- rr as Portal,
1396
- F as Prop,
1397
- nr as Provide,
1370
+ Bt as OneOfKind,
1371
+ jt as OneOfTuple,
1372
+ Ut as OneOfType,
1373
+ W as OneOfValue,
1374
+ er as Portal,
1375
+ $ as Prop,
1376
+ rr as Provide,
1398
1377
  Be as ProviderNotFoundError,
1399
- ct as RenderingError,
1378
+ at as RenderingError,
1400
1379
  ye as Repeat,
1401
1380
  h as Signal,
1402
1381
  me as Task,
1403
- At as TextNode,
1404
- Zt as Unless,
1382
+ yt as TextNode,
1383
+ Yt as Unless,
1405
1384
  Jt as Use,
1406
- Kt as UseProvider,
1407
- Xt as UseProviders,
1408
- Ot as UseSSRDone,
1385
+ Wt as UseProvider,
1386
+ Ht as UseProviders,
1387
+ Ct as UseSSRDone,
1409
1388
  we as When,
1410
- or as WithProvider,
1411
- ir as WithProviders,
1389
+ sr as WithProvider,
1390
+ nr as WithProviders,
1412
1391
  fe as _addNodeTracker,
1413
- et as _clearSSR,
1414
- Ue as _getSelfOrParentElement,
1392
+ xe as _clearSSR,
1393
+ je as _getSelfOrParentElement,
1415
1394
  se as _isElement,
1416
1395
  re as _makeGetter,
1417
1396
  te as _makeSetter,
@@ -1420,52 +1399,51 @@ export {
1420
1399
  he as _maybeAddTextTracker,
1421
1400
  g as _removeDOMNode,
1422
1401
  Ie as _setAttribute,
1423
- Fe as _setBooleanProperty,
1424
- $e as _setDateProperty,
1425
- Ve as _setNumberProperty,
1402
+ $e as _setBooleanProperty,
1403
+ Ve as _setDateProperty,
1404
+ Fe as _setNumberProperty,
1426
1405
  qe as _setStringProperty,
1427
1406
  oe as _signalText,
1428
1407
  ne as _staticText,
1429
- vt as animateSignal,
1408
+ _t as animateSignal,
1430
1409
  Me as animateSignals,
1431
- Et as aria,
1410
+ St as aria,
1432
1411
  P as attr,
1433
- St as dataAttr,
1434
- Rt as emitChecked,
1435
- Mt as emitPreventDefault,
1436
- Vt as emitStopImmediatePropagation,
1437
- Ft as emitStopPropagation,
1438
- nt as emitValue,
1439
- it as emitValueAsDate,
1440
- lt as emitValueAsDateTime,
1441
- ot as emitValueAsNumber,
1412
+ wt as dataAttr,
1413
+ Ot as emitChecked,
1414
+ kt as emitPreventDefault,
1415
+ Mt as emitStopImmediatePropagation,
1416
+ Rt as emitStopPropagation,
1417
+ st as emitValue,
1418
+ ot as emitValueAsDate,
1419
+ it as emitValueAsDateTime,
1420
+ nt as emitValueAsNumber,
1442
1421
  Ne as endInterpolate,
1443
1422
  Oe as guessInterpolate,
1444
- wt as handleAnchorClick,
1445
- bt as html,
1446
- Tt as input,
1447
- Le as interpolateDate,
1423
+ Pt as html,
1424
+ Dt as input,
1425
+ Ce as interpolateDate,
1448
1426
  Te as interpolateNumber,
1449
- Ce as interpolateString,
1427
+ Le as interpolateString,
1450
1428
  O as isSSR,
1451
- gt as localStorageProp,
1452
- U as makeComputed,
1453
- yt as makeComputedRecord,
1454
- pt as makeEffect,
1455
- C as makeProp,
1456
- sr as makeProviderMark,
1457
- mt as makeSignal,
1458
- Lt as math,
1459
- Dt as mathAttr,
1460
- $ as on,
1461
- Nt as prepareSSR,
1462
- xe as removeTextTrackers,
1463
- tr as render,
1464
- Ae as renderWithContext,
1429
+ mt as localStorageProp,
1430
+ j as makeComputed,
1431
+ vt as makeComputedRecord,
1432
+ dt as makeEffect,
1433
+ L as makeProp,
1434
+ tr as makeProviderMark,
1435
+ pt as makeSignal,
1436
+ Tt as math,
1437
+ Et as mathAttr,
1438
+ V as on,
1439
+ Lt as prepareSSR,
1440
+ Ke as removeTextTrackers,
1441
+ xt as render,
1442
+ Se as renderWithContext,
1465
1443
  c as renderableOfTNode,
1466
- _t as sessionStorageProp,
1467
- Q as storedProp,
1468
- lr as style,
1469
- Ct as svg,
1470
- Pt as svgAttr
1444
+ gt as sessionStorageProp,
1445
+ Y as storedProp,
1446
+ or as style,
1447
+ bt as svg,
1448
+ At as svgAttr
1471
1449
  };