@tempots/dom 26.1.0 → 26.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
@@ -1,12 +1,12 @@
1
- var Ne = Object.defineProperty;
1
+ var Oe = Object.defineProperty;
2
2
  var se = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
- var $e = (s, e, t) => e in s ? Ne(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var o = (s, e, t) => $e(s, typeof e != "symbol" ? e + "" : e, t), re = (s, e, t) => e.has(s) || se("Cannot " + t);
5
+ var He = (s, e, t) => e in s ? Oe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
+ var o = (s, e, t) => He(s, typeof e != "symbol" ? e + "" : e, t), re = (s, e, t) => e.has(s) || se("Cannot " + t);
7
7
  var X = (s, e, t) => (re(s, e, "read from private field"), t ? t.call(s) : e.get(s)), ne = (s, e, t) => e.has(s) ? se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), ie = (s, e, t, r) => (re(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
8
- const Ie = (s, e, t) => s + (e - s) * t;
9
- const ke = (s, e, t) => {
8
+ const Ne = (s, e, t) => s + (e - s) * t;
9
+ const $e = (s, e, t) => {
10
10
  const r = Math.max(s.length, e.length);
11
11
  let n = "";
12
12
  for (let i = 0; i < r; i++) {
@@ -16,7 +16,7 @@ const ke = (s, e, t) => {
16
16
  isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) * t);
17
17
  }
18
18
  return n;
19
- }, Re = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), Ve = (s, e) => e, je = (s) => typeof s == "number" ? Ie : typeof s == "string" ? ke : s instanceof Date ? Re : Ve;
19
+ }, Ie = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), ke = (s, e) => e, Re = (s) => typeof s == "number" ? Ne : typeof s == "string" ? $e : s instanceof Date ? Ie : ke;
20
20
  var M;
21
21
  class Y {
22
22
  /**
@@ -161,7 +161,7 @@ const H = class H {
161
161
  * @returns - A new Computed instance with the mapped value.
162
162
  */
163
163
  o(this, "map", (e, t = (r, n) => r === n) => {
164
- const r = new x(() => {
164
+ const r = new L(() => {
165
165
  try {
166
166
  return e(this.get());
167
167
  } catch (n) {
@@ -181,7 +181,7 @@ const H = class H {
181
181
  * @returns A new Signal that emits the values of the resulting Signal.
182
182
  */
183
183
  o(this, "flatMap", (e, t = (r, n) => r === n) => {
184
- const r = new x(() => {
184
+ const r = new L(() => {
185
185
  try {
186
186
  return e(this.get()).get();
187
187
  } catch (n) {
@@ -210,7 +210,7 @@ const H = class H {
210
210
  o(this, "_$");
211
211
  o(this, "filter", (e, t) => {
212
212
  let r = t ?? this.get();
213
- const n = new x(() => {
213
+ const n = new L(() => {
214
214
  try {
215
215
  const i = this.get();
216
216
  return r = e(i) ? i : r;
@@ -232,7 +232,7 @@ const H = class H {
232
232
  */
233
233
  o(this, "filterMap", (e, t, r = (n, i) => n === i) => {
234
234
  let n = t;
235
- const i = new x(() => {
235
+ const i = new L(() => {
236
236
  try {
237
237
  const l = this.get(), c = e(l);
238
238
  return n = c ?? n;
@@ -382,8 +382,8 @@ o(H, "is", (e) => (
382
382
  e != null && e.$__signal__ === !0
383
383
  ));
384
384
  let d = H;
385
- const qe = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
386
- class x extends d {
385
+ const Ve = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
386
+ class L extends d {
387
387
  /**
388
388
  * Represents a Signal object.
389
389
  * @param _fn - The function that returns the value of the signal.
@@ -418,7 +418,7 @@ class x extends d {
418
418
  */
419
419
  o(this, "_scheduleNotify", () => {
420
420
  const t = ++this._scheduleCount;
421
- qe(() => {
421
+ Ve(() => {
422
422
  this._scheduleCount !== t || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
423
423
  });
424
424
  });
@@ -529,9 +529,9 @@ o(W, "is", (t) => (
529
529
  ));
530
530
  let k = W;
531
531
  const z = (s, e, t = (r, n) => r === n) => {
532
- const r = new x(s, t);
532
+ const r = new L(s, t);
533
533
  return e.forEach((n) => n.setDerivative(r)), r;
534
- }, Fe = (s, e, t = {}) => {
534
+ }, je = (s, e, t = {}) => {
535
535
  let r = t.once ? () => {
536
536
  i(), s();
537
537
  } : s;
@@ -617,21 +617,21 @@ const z = (s, e, t = (r, n) => r === n) => {
617
617
  autoDisposeProp: e = !0,
618
618
  equals: t
619
619
  } = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : w(s, t)
620
- }, Be = (...s) => (e, t) => {
620
+ }, qe = (...s) => (e, t) => {
621
621
  const r = s.filter((n) => d.is(n));
622
622
  return z(
623
623
  () => e(...s.map((n) => y.get(n))),
624
624
  r,
625
625
  t
626
626
  );
627
- }, Ht = (s) => {
627
+ }, xt = (s) => {
628
628
  const e = Object.keys(s);
629
- return Be(...Object.values(s))(
629
+ return qe(...Object.values(s))(
630
630
  (...t) => Object.fromEntries(e.map((r, n) => [r, t[n]]))
631
631
  );
632
- }, Nt = (...s) => (e, t = {}) => {
632
+ }, Lt = (...s) => (e, t = {}) => {
633
633
  const r = s.filter((n) => d.is(n));
634
- return Fe(
634
+ return je(
635
635
  () => e(...s.map(y.get)),
636
636
  r,
637
637
  t
@@ -672,13 +672,13 @@ const ue = ({
672
672
  return u.on((h) => {
673
673
  t.setItem(s, r(h));
674
674
  }), u;
675
- }, $t = (s) => {
675
+ }, Pt = (s) => {
676
676
  var e;
677
677
  return ue({
678
678
  ...s,
679
679
  store: ((e = le()) == null ? void 0 : e.localStorage) ?? new ce()
680
680
  });
681
- }, It = (s) => {
681
+ }, Dt = (s) => {
682
682
  var e;
683
683
  return ue({
684
684
  ...s,
@@ -688,33 +688,33 @@ const ue = ({
688
688
  function oe(s) {
689
689
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
690
690
  }
691
- const We = (s, e, t, r) => {
691
+ const Fe = (s, e, t, r) => {
692
692
  const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((S) => S), l = (r == null ? void 0 : r.equals) ?? ((S, I) => S === I);
693
- let c = r == null ? void 0 : r.interpolate, u = s, h = e(), a = performance.now(), m = null, b = !0;
694
- const p = new x(e, l), g = w(s, l);
693
+ let c = r == null ? void 0 : r.interpolate, u = s, h = e(), a = performance.now(), m = null, T = !0;
694
+ const p = new L(e, l), g = w(s, l);
695
695
  g.onDispose(() => {
696
696
  m !== null && cancelAnimationFrame(m);
697
697
  }), g.onDispose(p.dispose), t.forEach((S) => {
698
698
  S.setDerivative(p), S.onDispose(g.dispose);
699
699
  });
700
700
  const C = (S) => {
701
- h = S, a = performance.now(), u = g.value, b && (b = !1, m = oe(ee));
701
+ h = S, a = performance.now(), u = g.value, T && (T = !1, m = oe(ee));
702
702
  }, ee = () => {
703
- const I = (performance.now() - a) / y.get(n), He = i(I);
704
- c == null && (c = je(u));
705
- let te = c(u, h, He);
706
- I >= 1 ? (b = !0, te = h) : m = oe(ee), g.set(te);
703
+ const I = (performance.now() - a) / y.get(n), Me = i(I);
704
+ c == null && (c = Re(u));
705
+ let te = c(u, h, Me);
706
+ I >= 1 ? (T = !0, te = h) : m = oe(ee), g.set(te);
707
707
  };
708
708
  return p.on(C), g;
709
- }, kt = (s, e) => {
709
+ }, Mt = (s, e) => {
710
710
  const { initialValue: t, ...r } = e ?? {};
711
- return We(
711
+ return Fe(
712
712
  t ?? s.get(),
713
713
  s.get,
714
714
  [s],
715
715
  r
716
716
  );
717
- }, Rt = (s, e) => {
717
+ }, Ot = (s, e) => {
718
718
  const { signals: t, literals: r } = Object.entries(s).reduce(
719
719
  ({ signals: i, literals: l }, [c, u]) => (d.is(u) ? i.push([c, u]) : l[c] = u, { signals: i, literals: l }),
720
720
  { signals: [], literals: {} }
@@ -733,7 +733,7 @@ const We = (s, e, t, r) => {
733
733
  "outerHTML",
734
734
  "className",
735
735
  "classList"
736
- ]), Ue = (s, e) => he.has(s) ? (t) => {
736
+ ]), Be = (s, e) => he.has(s) ? (t) => {
737
737
  t == null || t !== !0 ? e.removeAttribute(s) : e.setAttribute(s, "");
738
738
  } : ae.has(s) ? (t) => {
739
739
  t == null ? e[s] = null : e[s] = !!t;
@@ -745,16 +745,16 @@ const We = (s, e, t, r) => {
745
745
  t == null ? e[s] = null : e[s] = String(t);
746
746
  } : (t) => {
747
747
  t == null ? e.removeAttribute(s) : e.setAttribute(s, t);
748
- }, Je = (s, e) => he.has(s) ? () => e.hasAttribute(s) : ae.has(s) ? () => !!e[s] : fe.has(s) ? () => Number(e[s]) : de.has(s) ? () => e[s] : pe.has(s) ? () => String(e[s]) : () => e.getAttribute(s), R = (s) => {
748
+ }, We = (s, e) => he.has(s) ? () => e.hasAttribute(s) : ae.has(s) ? () => !!e[s] : fe.has(s) ? () => Number(e[s]) : de.has(s) ? () => e[s] : pe.has(s) ? () => String(e[s]) : () => e.getAttribute(s), R = (s) => {
749
749
  const e = s;
750
750
  e && e.onblur && (e.onblur = null), !(!s || s.ownerDocument === void 0) && s.parentElement && s.parentElement.removeChild(s);
751
- }, Ge = (s) => ge(s) ? s : s.parentElement, ge = (s) => s.nodeType === 1;
751
+ }, Ue = (s) => ge(s) ? s : s.parentElement, ge = (s) => s.nodeType === 1;
752
752
  class me extends Error {
753
753
  constructor(e) {
754
754
  super(`Provider not found: ${e.description}`);
755
755
  }
756
756
  }
757
- class L {
757
+ class P {
758
758
  /**
759
759
  * Constructs a new `DOMContext` instance.
760
760
  *
@@ -836,7 +836,7 @@ class L {
836
836
  * @param element - The DOM element to use in the new `DOMContext` instance.
837
837
  * @returns A new `DOMContext` instance with the provided `element`.
838
838
  */
839
- o(this, "withElement", (e) => new L(this.document, e, void 0, this.providers));
839
+ o(this, "withElement", (e) => new P(this.document, e, void 0, this.providers));
840
840
  /**
841
841
  * Creates a new `DOMContext` instance with a reference to a DOM element selected by the provided `selector`.
842
842
  * @param selector - The CSS selector for the target DOM element.
@@ -854,7 +854,7 @@ class L {
854
854
  * @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
855
855
  * @returns A new `DOMContext` instance with the specified reference.
856
856
  */
857
- o(this, "withReference", (e) => new L(this.document, this.element, e, this.providers));
857
+ o(this, "withReference", (e) => new P(this.document, this.element, e, this.providers));
858
858
  /**
859
859
  * Sets a provider for the given provider mark.
860
860
  *
@@ -862,9 +862,9 @@ class L {
862
862
  * @param value - The provider to set for the given mark.
863
863
  * @returns A new `DOMContext` instance with the specified provider.
864
864
  */
865
- o(this, "setProvider", (e, t) => new L(this.document, this.element, this.reference, {
865
+ o(this, "setProvider", (e, t, r) => new P(this.document, this.element, this.reference, {
866
866
  ...this.providers,
867
- [e]: t
867
+ [e]: [t, r]
868
868
  }));
869
869
  /**
870
870
  * Retrieves a provider for the given provider mark.
@@ -950,9 +950,10 @@ class L {
950
950
  */
951
951
  o(this, "getStyle", (e) => this.element.style[e]);
952
952
  o(this, "makeAccessors", (e) => ({
953
- get: Je(e, this.element),
954
- set: Ue(e, this.element)
953
+ get: We(e, this.element),
954
+ set: Be(e, this.element)
955
955
  }));
956
+ o(this, "getWindow", () => this.document.defaultView);
956
957
  this.document = e, this.element = t, this.reference = r, this.providers = n;
957
958
  }
958
959
  /**
@@ -963,24 +964,24 @@ class L {
963
964
  * @returns A new `DOMContext` instance.
964
965
  */
965
966
  static of(e, t) {
966
- return new L(e.ownerDocument, e, t, {});
967
+ return new P(e.ownerDocument, e, t, {});
967
968
  }
968
969
  }
969
- const Xe = (s) => Symbol(s), Q = (s, e) => {
970
+ const Je = (s) => Symbol(s), Q = (s, e) => {
970
971
  const t = s(e);
971
972
  return (r = !0) => t(r);
972
- }, Vt = (s, e, { doc: t, clear: r, disposeWithParent: n = !0 } = {}) => {
973
+ }, Ht = (s, e, { doc: t, clear: r, disposeWithParent: n = !0 } = {}) => {
973
974
  const i = typeof e == "string" ? (t ?? document).querySelector(e) : e;
974
975
  if (i === null)
975
- throw new Ye(
976
+ throw new Ge(
976
977
  `Cannot find element by selector for render: ${e}`
977
978
  );
978
979
  r !== !1 && (t ?? i.ownerDocument) != null && i.nodeType === 1 && (i.innerHTML = "");
979
- const l = Ge(i), c = ge(i) ? void 0 : i, u = L.of(l, c), h = Q(s, u);
980
+ const l = Ue(i), c = ge(i) ? void 0 : i, u = P.of(l, c), h = Q(s, u);
980
981
  let a;
981
982
  return n && (a = new MutationObserver((m) => {
982
- var b;
983
- (b = m[0]) == null || b.removedNodes.forEach((p) => {
983
+ var T;
984
+ (T = m[0]) == null || T.removedNodes.forEach((p) => {
984
985
  p === i && (h(i.nodeType !== Node.ELEMENT_NODE), a == null || a.disconnect());
985
986
  });
986
987
  }), a.observe(i.parentElement, {
@@ -990,7 +991,7 @@ const Xe = (s) => Symbol(s), Q = (s, e) => {
990
991
  })), () => {
991
992
  a == null || a.disconnect(), h(!0);
992
993
  };
993
- }, jt = (s, {
994
+ }, Nt = (s, {
994
995
  startUrl: e = "https://example.com",
995
996
  selector: t = ":root"
996
997
  } = {}) => {
@@ -1001,13 +1002,13 @@ const Xe = (s) => Symbol(s), Q = (s, e) => {
1001
1002
  currentURL: r
1002
1003
  };
1003
1004
  };
1004
- class Ye extends Error {
1005
+ class Ge extends Error {
1005
1006
  constructor(e) {
1006
1007
  super(e);
1007
1008
  }
1008
1009
  }
1009
1010
  const ye = "data-tts-node", V = "data-tts-class", j = "data-tts-style", q = "data-tts-html", F = "data-tts-text", B = "data-tts-attrs";
1010
- class qt {
1011
+ class $t {
1011
1012
  constructor({
1012
1013
  select: e,
1013
1014
  getAttribute: t,
@@ -1020,7 +1021,7 @@ class qt {
1020
1021
  getInnerHTML: h,
1021
1022
  setInnerHTML: a,
1022
1023
  getInnerText: m,
1023
- setInnerText: b
1024
+ setInnerText: T
1024
1025
  }) {
1025
1026
  /**
1026
1027
  * Selects elements from the headless environment.
@@ -1162,57 +1163,57 @@ class qt {
1162
1163
  }
1163
1164
  });
1164
1165
  });
1165
- this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = u, this.getInnerHTML = h, this.setInnerHTML = a, this.getInnerText = m, this.setInnerText = b;
1166
+ this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = u, this.getInnerHTML = h, this.setInnerHTML = a, this.getInnerText = m, this.setInnerText = T;
1166
1167
  }
1167
1168
  }
1168
- const ze = () => {
1169
+ const Xe = () => {
1169
1170
  document.querySelectorAll(`[${ye}]`).forEach(R);
1170
- }, Qe = (s) => {
1171
+ }, Ye = (s) => {
1171
1172
  const e = s.getAttribute(V);
1172
1173
  s.removeAttribute(V), e != null && s.setAttribute("class", e);
1173
- }, Ze = () => {
1174
- document.querySelectorAll(`[${V}]`).forEach((e) => Qe(e));
1175
- }, Ke = (s) => {
1174
+ }, ze = () => {
1175
+ document.querySelectorAll(`[${V}]`).forEach((e) => Ye(e));
1176
+ }, Qe = (s) => {
1176
1177
  const e = s.getAttribute(q);
1177
1178
  s.removeAttribute(q), e != null && (s.innerHTML = e);
1178
- }, et = () => {
1179
- document.querySelectorAll(`[${q}]`).forEach((e) => Ke(e));
1180
- }, tt = (s) => {
1179
+ }, Ze = () => {
1180
+ document.querySelectorAll(`[${q}]`).forEach((e) => Qe(e));
1181
+ }, Ke = (s) => {
1181
1182
  const e = s.getAttribute(F);
1182
1183
  s.removeAttribute(F), e != null && (s.innerText = e);
1183
- }, st = () => {
1184
- document.querySelectorAll(`[${F}]`).forEach((e) => tt(e));
1185
- }, be = (s) => JSON.parse(s.replace(/&quot;/g, '"')), rt = (s) => {
1184
+ }, et = () => {
1185
+ document.querySelectorAll(`[${F}]`).forEach((e) => Ke(e));
1186
+ }, Te = (s) => JSON.parse(s.replace(/&quot;/g, '"')), tt = (s) => {
1186
1187
  const e = s.getAttribute(j);
1187
1188
  if (s.removeAttribute(j), e != null) {
1188
- const t = be(e);
1189
+ const t = Te(e);
1189
1190
  Object.entries(t).forEach(([r, n]) => {
1190
1191
  s.style.setProperty(r, n);
1191
1192
  });
1192
1193
  }
1193
- }, nt = () => {
1194
- document.querySelectorAll(`[${j}]`).forEach((e) => rt(e));
1195
- }, it = (s) => {
1194
+ }, st = () => {
1195
+ document.querySelectorAll(`[${j}]`).forEach((e) => tt(e));
1196
+ }, rt = (s) => {
1196
1197
  const e = s.getAttribute(B);
1197
1198
  if (s.removeAttribute(B), e != null) {
1198
- const t = be(e);
1199
+ const t = Te(e);
1199
1200
  Object.entries(t).forEach(([r, n]) => {
1200
1201
  n == null ? s.removeAttribute(r) : s.setAttribute(r, n);
1201
1202
  });
1202
1203
  }
1203
- }, ot = () => {
1204
- document.querySelectorAll(`[${B}]`).forEach((e) => it(e));
1205
- }, Ft = () => {
1206
- ze(), Ze(), st(), et(), nt(), ot();
1207
- }, T = Symbol("class"), E = Symbol("style"), P = Symbol("handler"), Te = () => Math.random().toString(36).substring(2, 15), lt = (s) => s.replace(/<[^>]*>?/g, "");
1208
- class Ae {
1204
+ }, nt = () => {
1205
+ document.querySelectorAll(`[${B}]`).forEach((e) => rt(e));
1206
+ }, It = () => {
1207
+ Xe(), ze(), et(), Ze(), st(), nt();
1208
+ }, A = Symbol("class"), _ = Symbol("style"), v = Symbol("handler"), Ae = () => Math.random().toString(36).substring(2, 15), it = (s) => s.replace(/<[^>]*>?/g, "");
1209
+ class be {
1209
1210
  constructor(e) {
1210
- o(this, "id", Te());
1211
+ o(this, "id", Ae());
1211
1212
  o(this, "properties", {});
1212
1213
  o(this, "children", []);
1213
1214
  o(this, "isElement", () => !0);
1214
1215
  o(this, "isText", () => !1);
1215
- o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? lt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
1216
+ o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? it(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
1216
1217
  o(this, "removeChild", (e) => {
1217
1218
  const t = this.children.indexOf(e);
1218
1219
  t !== -1 && this.children.splice(t, 1);
@@ -1233,10 +1234,10 @@ class Ae {
1233
1234
  o(this, "getInnerText", () => this.properties.innerText ?? "");
1234
1235
  o(this, "hasInnerText", () => this.properties.innerText != null);
1235
1236
  o(this, "hasChildren", () => this.children.length > 0);
1236
- o(this, "hasClasses", () => this.properties[T] != null);
1237
- o(this, "hasStyles", () => this.properties[E] != null);
1237
+ o(this, "hasClasses", () => this.properties[A] != null);
1238
+ o(this, "hasStyles", () => this.properties[_] != null);
1238
1239
  o(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
1239
- o(this, "hasHandlers", () => this.properties[P] != null);
1240
+ o(this, "hasHandlers", () => this.properties[v] != null);
1240
1241
  o(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
1241
1242
  o(this, "getById", (e) => {
1242
1243
  if (this.properties.id === e)
@@ -1248,20 +1249,20 @@ class Ae {
1248
1249
  }
1249
1250
  });
1250
1251
  o(this, "trigger", (e, t) => {
1251
- ((this.properties[P] ?? {})[e] ?? []).forEach((n) => n(t));
1252
+ ((this.properties[v] ?? {})[e] ?? []).forEach((n) => n(t));
1252
1253
  });
1253
1254
  o(this, "click", () => {
1254
1255
  this.trigger("click", {});
1255
1256
  });
1256
1257
  o(this, "on", (e, t, r) => {
1257
1258
  var c;
1258
- const n = (c = this.properties)[P] ?? (c[P] = {}), i = r != null && r.once ? (u) => {
1259
+ const n = (c = this.properties)[v] ?? (c[v] = {}), i = r != null && r.once ? (u) => {
1259
1260
  l(), t(u);
1260
1261
  } : (u) => t(u);
1261
1262
  n[e] = [...n[e] ?? [], i];
1262
1263
  const l = () => {
1263
1264
  const u = n[e] ?? [], h = u.indexOf(i);
1264
- h !== -1 && (u.splice(h, 1), u.length === 0 ? (delete n[e], Object.keys(n).length === 0 && delete this.properties[P]) : n[e] = u, (r == null ? void 0 : r.signal) != null && r.signal.removeEventListener("abort", l));
1265
+ h !== -1 && (u.splice(h, 1), u.length === 0 ? (delete n[e], Object.keys(n).length === 0 && delete this.properties[v]) : n[e] = u, (r == null ? void 0 : r.signal) != null && r.signal.removeEventListener("abort", l));
1265
1266
  };
1266
1267
  return (r == null ? void 0 : r.signal) != null && r.signal.addEventListener("abort", l), l;
1267
1268
  });
@@ -1269,7 +1270,7 @@ class Ae {
1269
1270
  var r;
1270
1271
  if (e.length === 0)
1271
1272
  return;
1272
- const t = (r = this.properties)[T] ?? (r[T] = []);
1273
+ const t = (r = this.properties)[A] ?? (r[A] = []);
1273
1274
  e.forEach((n) => {
1274
1275
  t.includes(n) || t.push(n);
1275
1276
  });
@@ -1278,29 +1279,29 @@ class Ae {
1278
1279
  var r;
1279
1280
  if (e.length === 0)
1280
1281
  return;
1281
- const t = (r = this.properties)[T] ?? (r[T] = []);
1282
+ const t = (r = this.properties)[A] ?? (r[A] = []);
1282
1283
  e.forEach((n) => {
1283
1284
  const i = t.indexOf(n);
1284
1285
  i !== -1 && t.splice(i, 1);
1285
- }), t.length === 0 && delete this.properties[T];
1286
+ }), t.length === 0 && delete this.properties[A];
1286
1287
  });
1287
- o(this, "getClasses", () => this.properties[T] ?? []);
1288
+ o(this, "getClasses", () => this.properties[A] ?? []);
1288
1289
  o(this, "getAttributes", () => Object.entries(this.properties).filter(
1289
1290
  ([e]) => !["innerText", "innerHTML"].includes(e)
1290
1291
  ));
1291
1292
  o(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
1292
- (e) => e === T ? [["class", this.getClasses()]] : e === E ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1293
+ (e) => e === A ? [["class", this.getClasses()]] : e === _ ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1293
1294
  ));
1294
1295
  o(this, "setStyle", (e, t) => {
1295
1296
  var n;
1296
- const r = (n = this.properties)[E] ?? (n[E] = {});
1297
- r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[E]);
1297
+ const r = (n = this.properties)[_] ?? (n[_] = {});
1298
+ r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[_]);
1298
1299
  });
1299
1300
  o(this, "getStyle", (e) => {
1300
1301
  var t;
1301
- return ((t = this.properties[E]) == null ? void 0 : t[e]) ?? "";
1302
+ return ((t = this.properties[_]) == null ? void 0 : t[e]) ?? "";
1302
1303
  });
1303
- o(this, "getStyles", () => this.properties[E] ?? {});
1304
+ o(this, "getStyles", () => this.properties[_] ?? {});
1304
1305
  o(this, "makeAccessors", (e) => {
1305
1306
  const t = this.properties;
1306
1307
  return {
@@ -1311,21 +1312,21 @@ class Ae {
1311
1312
  this.parent = e;
1312
1313
  }
1313
1314
  }
1314
- const ct = (s) => s.replace(/"/g, "&quot;"), ut = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1315
- class at extends Ae {
1315
+ const ot = (s) => s.replace(/"/g, "&quot;"), lt = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1316
+ class ct extends be {
1316
1317
  constructor(t, r, n) {
1317
1318
  super(n);
1318
1319
  o(this, "isPortal", () => !1);
1319
1320
  o(this, "toHTML", (t = !1) => {
1320
1321
  const r = this.children.map((u) => u.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
1321
1322
  let i = null;
1322
- const l = this.getVisibleAttributes().map(([u, h]) => u === "class" ? ` class="${h.join(" ")}"` : u === "style" ? typeof h == "string" ? ` style="${h}"` : ` style="${Object.entries(h).map(([a, m]) => `${a}: ${m};`).join(" ")}"` : ft.has(u) ? ` ${u}` : u === "innerHTML" ? (i = h, "") : u === "innerText" ? (i = ut(h), "") : ` ${u}="${ct(h)}"`).join(""), c = t ? ` ${ye}` : "";
1323
- return dt.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
1323
+ const l = this.getVisibleAttributes().map(([u, h]) => u === "class" ? ` class="${h.join(" ")}"` : u === "style" ? typeof h == "string" ? ` style="${h}"` : ` style="${Object.entries(h).map(([a, m]) => `${a}: ${m};`).join(" ")}"` : at.has(u) ? ` ${u}` : u === "innerHTML" ? (i = h, "") : u === "innerText" ? (i = lt(h), "") : ` ${u}="${ot(h)}"`).join(""), c = t ? ` ${ye}` : "";
1324
+ return ht.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
1324
1325
  });
1325
1326
  this.tagName = t, this.namespace = r;
1326
1327
  }
1327
1328
  }
1328
- class Se extends Ae {
1329
+ class Se extends be {
1329
1330
  constructor(t, r) {
1330
1331
  super(r);
1331
1332
  o(this, "isPortal", () => !0);
@@ -1334,9 +1335,9 @@ class Se extends Ae {
1334
1335
  this.selector = t;
1335
1336
  }
1336
1337
  }
1337
- class ht {
1338
+ class ut {
1338
1339
  constructor(e) {
1339
- o(this, "id", Te());
1340
+ o(this, "id", Ae());
1340
1341
  o(this, "isElement", () => !1);
1341
1342
  o(this, "isText", () => !0);
1342
1343
  o(this, "getText", () => this.text);
@@ -1354,7 +1355,7 @@ class D {
1354
1355
  this.element.children.push(e);
1355
1356
  });
1356
1357
  o(this, "makeChildElement", (e, t) => {
1357
- const r = new at(e, t, this.element);
1358
+ const r = new ct(e, t, this.element);
1358
1359
  return this.appendOrInsert(r), new D(
1359
1360
  r,
1360
1361
  void 0,
@@ -1363,7 +1364,7 @@ class D {
1363
1364
  );
1364
1365
  });
1365
1366
  o(this, "makeChildText", (e) => {
1366
- const t = new ht(e);
1367
+ const t = new ut(e);
1367
1368
  return this.appendOrInsert(t), new D(
1368
1369
  this.element,
1369
1370
  t,
@@ -1395,9 +1396,9 @@ class D {
1395
1396
  * @param value - The provider to set for the given mark.
1396
1397
  * @returns A new `DOMContext` instance with the specified provider.
1397
1398
  */
1398
- o(this, "setProvider", (e, t) => new D(this.element, this.reference, this.container, {
1399
+ o(this, "setProvider", (e, t, r) => new D(this.element, this.reference, this.container, {
1399
1400
  ...this.providers,
1400
- [e]: t
1401
+ [e]: [t, r]
1401
1402
  }));
1402
1403
  o(this, "getProvider", (e) => {
1403
1404
  if (this.providers[e] === void 0)
@@ -1421,27 +1422,27 @@ class D {
1421
1422
  this.element = e, this.reference = t, this.container = r, this.providers = n;
1422
1423
  }
1423
1424
  }
1424
- const ft = /* @__PURE__ */ new Set([
1425
+ const at = /* @__PURE__ */ new Set([
1425
1426
  "checked",
1426
1427
  "disabled",
1427
1428
  "multiple",
1428
1429
  "readonly",
1429
1430
  "required",
1430
1431
  "selected"
1431
- ]), dt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), _e = (s) => (e) => e.makeChildText(s).clear, Ee = (s) => (e) => {
1432
+ ]), ht = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Ee = (s) => (e) => e.makeChildText(s).clear, _e = (s) => (e) => {
1432
1433
  const t = e.makeChildText(s.value), r = s.on(t.setText);
1433
1434
  return (n) => {
1434
1435
  r(), t.clear(n);
1435
1436
  };
1436
- }, Bt = (s) => d.is(s) ? Ee(s) : _e(s), A = (...s) => (e) => {
1437
+ }, kt = (s) => d.is(s) ? _e(s) : Ee(s), b = (...s) => (e) => {
1437
1438
  const t = s.map((r) => f(r)(e));
1438
1439
  return (r) => {
1439
1440
  t.forEach((n) => n(r));
1440
1441
  };
1441
- }, _ = () => () => {
1442
- }, pt = (s) => (e) => (e.addClasses(s), (t) => {
1442
+ }, E = () => () => {
1443
+ }, ft = (s) => (e) => (e.addClasses(s), (t) => {
1443
1444
  t && e.removeClasses(s);
1444
- }), gt = (s) => (e) => {
1445
+ }), dt = (s) => (e) => {
1445
1446
  let t = [];
1446
1447
  const r = s.on((n) => {
1447
1448
  e.removeClasses(t), t = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(t);
@@ -1473,7 +1474,7 @@ const ft = /* @__PURE__ */ new Set([
1473
1474
  * @returns The renderable component for the specified attribute.
1474
1475
  *
1475
1476
  */
1476
- get: (s, e) => e === "class" ? (t) => d.is(t) ? gt(t) : pt(
1477
+ get: (s, e) => e === "class" ? (t) => d.is(t) ? dt(t) : ft(
1477
1478
  (t ?? "").split(" ").filter((r) => r.length > 0)
1478
1479
  ) : (t) => d.is(t) ? $(
1479
1480
  e,
@@ -1483,7 +1484,7 @@ const ft = /* @__PURE__ */ new Set([
1483
1484
  t
1484
1485
  )
1485
1486
  }
1486
- ), Wt = new Proxy(
1487
+ ), Rt = new Proxy(
1487
1488
  {},
1488
1489
  {
1489
1490
  /**
@@ -1499,7 +1500,7 @@ const ft = /* @__PURE__ */ new Set([
1499
1500
  t
1500
1501
  ) : N(`data-${e}`, t)
1501
1502
  }
1502
- ), Ut = new Proxy(
1503
+ ), Vt = new Proxy(
1503
1504
  {},
1504
1505
  {
1505
1506
  /**
@@ -1518,7 +1519,7 @@ const ft = /* @__PURE__ */ new Set([
1518
1519
  t
1519
1520
  )
1520
1521
  }
1521
- ), Jt = new Proxy(
1522
+ ), jt = new Proxy(
1522
1523
  {},
1523
1524
  {
1524
1525
  /**
@@ -1537,7 +1538,7 @@ const ft = /* @__PURE__ */ new Set([
1537
1538
  t
1538
1539
  )
1539
1540
  }
1540
- ), Gt = new Proxy(
1541
+ ), qt = new Proxy(
1541
1542
  {},
1542
1543
  {
1543
1544
  /**
@@ -1557,13 +1558,13 @@ const ft = /* @__PURE__ */ new Set([
1557
1558
  }
1558
1559
  ), f = (s) => {
1559
1560
  if (s == null)
1560
- return _;
1561
+ return E;
1561
1562
  if (Array.isArray(s))
1562
- return A(...s.map(f));
1563
+ return b(...s.map(f));
1563
1564
  if (typeof s == "string")
1564
- return _e(s);
1565
- if (d.is(s))
1566
1565
  return Ee(s);
1566
+ if (d.is(s))
1567
+ return _e(s);
1567
1568
  if (typeof s == "function")
1568
1569
  return s;
1569
1570
  throw new Error(`Unknown type: '${typeof s}' for child: ${s}`);
@@ -1577,7 +1578,7 @@ const ft = /* @__PURE__ */ new Set([
1577
1578
  return (l) => {
1578
1579
  i.forEach((c) => c(!1)), n.clear(l);
1579
1580
  };
1580
- }, Xt = new Proxy(
1581
+ }, Ft = new Proxy(
1581
1582
  {},
1582
1583
  {
1583
1584
  /**
@@ -1587,7 +1588,7 @@ const ft = /* @__PURE__ */ new Set([
1587
1588
  */
1588
1589
  get: (s, e) => (...t) => we(e, t.flatMap(f))
1589
1590
  }
1590
- ), Yt = new Proxy(
1591
+ ), Bt = new Proxy(
1591
1592
  {},
1592
1593
  {
1593
1594
  /**
@@ -1597,7 +1598,7 @@ const ft = /* @__PURE__ */ new Set([
1597
1598
  */
1598
1599
  get: (s, e) => (...t) => we("input", O.type(e), ...t)
1599
1600
  }
1600
- ), mt = "http://www.w3.org/2000/svg", zt = new Proxy(
1601
+ ), pt = "http://www.w3.org/2000/svg", Wt = new Proxy(
1601
1602
  {},
1602
1603
  {
1603
1604
  /**
@@ -1605,9 +1606,9 @@ const ft = /* @__PURE__ */ new Set([
1605
1606
  * @param tagName - The SVG tag name.
1606
1607
  * @returns A renderable function that creates and appends the SVG element to the DOM.
1607
1608
  */
1608
- get: (s, e) => (...t) => Ce(e, mt, t.flatMap(f))
1609
+ get: (s, e) => (...t) => Ce(e, pt, t.flatMap(f))
1609
1610
  }
1610
- ), yt = "http://www.w3.org/1998/Math/MathML", Qt = new Proxy(
1611
+ ), gt = "http://www.w3.org/1998/Math/MathML", Ut = new Proxy(
1611
1612
  {},
1612
1613
  {
1613
1614
  /**
@@ -1615,12 +1616,12 @@ const ft = /* @__PURE__ */ new Set([
1615
1616
  * @param tagName - The Math tag name.
1616
1617
  * @returns A renderable function that creates and appends the Math element to the DOM.
1617
1618
  */
1618
- get: (s, e) => (...t) => Ce(e, yt, t.flatMap(f))
1619
+ get: (s, e) => (...t) => Ce(e, gt, t.flatMap(f))
1619
1620
  }
1620
- ), Pe = (s, e) => {
1621
+ ), ve = (s, e) => {
1621
1622
  if (typeof e == "function")
1622
- return Pe(s, { then: e });
1623
- const t = e.pending != null ? f(e.pending()) : _, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => _;
1623
+ return ve(s, { then: e });
1624
+ const t = e.pending != null ? f(e.pending()) : E, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => E;
1624
1625
  return (i) => {
1625
1626
  let l = !0;
1626
1627
  const c = s(), u = i.makeRef();
@@ -1636,7 +1637,7 @@ const ft = /* @__PURE__ */ new Set([
1636
1637
  l = !1, h(a), u.clear(a);
1637
1638
  };
1638
1639
  };
1639
- }, Zt = (s, e) => Pe(() => s, e), ve = (s, e, t) => (r) => r.on(s, e, t), bt = (s) => ve("click", (e) => {
1640
+ }, Jt = (s, e) => ve(() => s, e), xe = (s, e, t) => (r) => r.on(s, e, t), mt = (s) => xe("click", (e) => {
1640
1641
  e.preventDefault();
1641
1642
  const t = e.target;
1642
1643
  setTimeout(() => {
@@ -1651,15 +1652,15 @@ const ft = /* @__PURE__ */ new Set([
1651
1652
  * @param fn - The function to call when the event is triggered.
1652
1653
  * @returns A `Renderable` function that adds the event listener to the element.
1653
1654
  */
1654
- get: (s, e) => (t) => ve(e, t)
1655
+ get: (s, e) => (t) => xe(e, t)
1655
1656
  }
1656
- ), Tt = (s) => (e) => {
1657
+ ), yt = (s) => (e) => {
1657
1658
  const t = e.target;
1658
1659
  s(t.value);
1659
- }, At = (s) => (e) => {
1660
+ }, Tt = (s) => (e) => {
1660
1661
  const t = e.target;
1661
1662
  s(t.valueAsNumber);
1662
- }, St = (s) => (e) => {
1663
+ }, At = (s) => (e) => {
1663
1664
  const t = e.target;
1664
1665
  if (t.value === "")
1665
1666
  return;
@@ -1669,7 +1670,7 @@ const ft = /* @__PURE__ */ new Set([
1669
1670
  Number(r[2].substring(0, 2))
1670
1671
  );
1671
1672
  s(n);
1672
- }, Kt = (s) => (e) => {
1673
+ }, Gt = (s) => (e) => {
1673
1674
  const t = e.target;
1674
1675
  if (t.value === "") {
1675
1676
  s(null);
@@ -1681,7 +1682,7 @@ const ft = /* @__PURE__ */ new Set([
1681
1682
  Number(r[2].substring(0, 2))
1682
1683
  );
1683
1684
  s(n);
1684
- }, _t = (s) => (e) => {
1685
+ }, bt = (s) => (e) => {
1685
1686
  const t = e.target;
1686
1687
  if (t.value === "")
1687
1688
  return;
@@ -1691,7 +1692,7 @@ const ft = /* @__PURE__ */ new Set([
1691
1692
  Number(n[2])
1692
1693
  ), l = r[1].split(":");
1693
1694
  i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), s(i);
1694
- }, es = (s) => (e) => {
1695
+ }, Xt = (s) => (e) => {
1695
1696
  const t = e.target;
1696
1697
  if (t.value === "") {
1697
1698
  s(null);
@@ -1708,16 +1709,16 @@ const ft = /* @__PURE__ */ new Set([
1708
1709
  Number(n[2])
1709
1710
  ), l = r[1].split(":");
1710
1711
  i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), s(i);
1711
- }, ts = (s) => (e) => {
1712
+ }, Yt = (s) => (e) => {
1712
1713
  const t = e.target;
1713
1714
  s(t.checked);
1714
- }, ss = (s) => (e) => {
1715
+ }, zt = (s) => (e) => {
1715
1716
  e.preventDefault(), s();
1716
- }, rs = (s) => (e) => {
1717
+ }, Qt = (s) => (e) => {
1717
1718
  e.stopPropagation(), s();
1718
- }, ns = (s) => (e) => {
1719
+ }, Zt = (s) => (e) => {
1719
1720
  e.stopImmediatePropagation(), s();
1720
- }, is = (s, e = "input") => A(O.valueAsDate(s), J[e](St(s.set))), os = (s, e = "input") => A(O.valueAsDate(s), J[e](_t(s.set))), ls = (s, e = "input") => A(O.valueAsNumber(s), J[e](At(s.set))), cs = (s, e = "input") => A(O.value(s), J[e](Tt(s.set))), us = (s) => A(O.checked(s), bt(s.set)), G = (s, e) => {
1721
+ }, Kt = (s, e = "input") => b(O.valueAsDate(s), J[e](At(s.set))), es = (s, e = "input") => b(O.valueAsDate(s), J[e](bt(s.set))), ts = (s, e = "input") => b(O.valueAsNumber(s), J[e](Tt(s.set))), ss = (s, e = "input") => b(O.value(s), J[e](yt(s.set))), rs = (s) => b(O.checked(s), mt(s.set)), G = (s, e) => {
1721
1722
  if (d.is(s))
1722
1723
  return (r) => {
1723
1724
  const n = r.makeRef();
@@ -1726,7 +1727,7 @@ const ft = /* @__PURE__ */ new Set([
1726
1727
  let u;
1727
1728
  const h = c.on((a) => {
1728
1729
  if (a !== u) {
1729
- u = a, l == null || l.dispose(), i == null || i(!0), l = s.map((b) => b[a]);
1730
+ u = a, l == null || l.dispose(), i == null || i(!0), l = s.map((T) => T[a]);
1730
1731
  const m = e[a](l);
1731
1732
  i = f(m)(n);
1732
1733
  }
@@ -1737,19 +1738,19 @@ const ft = /* @__PURE__ */ new Set([
1737
1738
  };
1738
1739
  const t = Object.keys(s)[0];
1739
1740
  return f(e[t](U(s[t])));
1740
- }, xe = (s, e, t) => G(
1741
+ }, Le = (s, e, t) => G(
1741
1742
  y.map(s, (r) => ({ [r[e]]: r })),
1742
1743
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1743
1744
  t
1744
- ), as = (s, e) => xe(s, "kind", e), hs = (s, e) => {
1745
+ ), ns = (s, e) => Le(s, "kind", e), is = (s, e) => {
1745
1746
  const t = y.map(s, ([r, n]) => ({ [r]: n }));
1746
1747
  return G(t, e);
1747
- }, fs = (s, e) => xe(s, "type", e), Et = (s, e) => G(
1748
+ }, os = (s, e) => Le(s, "type", e), St = (s, e) => G(
1748
1749
  y.map(s, (t) => ({ [t]: !0 })),
1749
1750
  e
1750
- ), ds = (s, e = {}) => (t) => {
1751
+ ), ls = (s, e = {}) => (t) => {
1751
1752
  const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
1752
- return Et(
1753
+ return St(
1753
1754
  t.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
1754
1755
  {
1755
1756
  first: r,
@@ -1757,9 +1758,9 @@ const ft = /* @__PURE__ */ new Set([
1757
1758
  other: s
1758
1759
  }
1759
1760
  );
1760
- }, ps = (s) => (e) => (e.appendOrInsert(s), (t) => {
1761
+ }, cs = (s) => (e) => (e.appendOrInsert(s), (t) => {
1761
1762
  t && R(s);
1762
- }), wt = (s, e, t) => {
1763
+ }), Et = (s, e, t) => {
1763
1764
  if (d.is(s)) {
1764
1765
  const r = s;
1765
1766
  return (n) => {
@@ -1767,7 +1768,7 @@ const ft = /* @__PURE__ */ new Set([
1767
1768
  let l = () => {
1768
1769
  }, c = !1, u = null;
1769
1770
  const h = r.on((a) => {
1770
- a == null ? (l(!0), l = f((t == null ? void 0 : t()) ?? _)(i), c = !1, u == null || u.dispose(), u = null) : (u == null ? u = w(a) : u.value = a, c || (l(!0), l = f(e(u))(
1771
+ a == null ? (l(!0), l = f((t == null ? void 0 : t()) ?? E)(i), c = !1, u == null || u.dispose(), u = null) : (u == null ? u = w(a) : u.value = a, c || (l(!0), l = f(e(u))(
1771
1772
  i
1772
1773
  ), c = !0));
1773
1774
  });
@@ -1779,16 +1780,16 @@ const ft = /* @__PURE__ */ new Set([
1779
1780
  const r = s;
1780
1781
  if (r == null) {
1781
1782
  const n = t == null ? void 0 : t();
1782
- return n != null ? f(n) : _;
1783
+ return n != null ? f(n) : E;
1783
1784
  }
1784
1785
  return f(e(U(r)));
1785
1786
  }
1786
- }, gs = (...s) => (e, t) => (r) => {
1787
+ }, us = (...s) => (e, t) => (r) => {
1787
1788
  const n = r.makeRef();
1788
1789
  if (s.some(
1789
1790
  (p) => !d.is(p) && p == null
1790
1791
  ))
1791
- return (t != null ? f(t == null ? void 0 : t()) : _)(
1792
+ return (t != null ? f(t == null ? void 0 : t()) : E)(
1792
1793
  n
1793
1794
  );
1794
1795
  const l = s.map(() => null), c = s.map(
@@ -1807,7 +1808,7 @@ const ft = /* @__PURE__ */ new Set([
1807
1808
  c[g] = !1;
1808
1809
  };
1809
1810
  let m = s.length - 1;
1810
- const b = s.map((p, g) => {
1811
+ const T = s.map((p, g) => {
1811
1812
  if (!d.is(p)) {
1812
1813
  const C = w(p);
1813
1814
  return l[g] = C, () => {
@@ -1818,15 +1819,15 @@ const ft = /* @__PURE__ */ new Set([
1818
1819
  });
1819
1820
  });
1820
1821
  return h.on((p) => {
1821
- u == null || u(!0), u = null, p ? u = f(e(...l))(n) : u = f((t == null ? void 0 : t()) ?? _)(n);
1822
+ u == null || u(!0), u = null, p ? u = f(e(...l))(n) : u = f((t == null ? void 0 : t()) ?? E)(n);
1822
1823
  }), (p) => {
1823
- l.forEach((g) => g == null ? void 0 : g.dispose()), h.dispose(), b.forEach((g) => g()), u == null || u(p), n.clear(p);
1824
+ l.forEach((g) => g == null ? void 0 : g.dispose()), h.dispose(), T.forEach((g) => g()), u == null || u(p), n.clear(p);
1824
1825
  };
1825
- }, Z = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), Le = (s, e, t) => wt(
1826
+ }, Z = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), Pe = (s, e, t) => Et(
1826
1827
  y.map(s, (r) => r ? !0 : null),
1827
1828
  e,
1828
1829
  t ?? void 0
1829
- ), ms = (s, e, t) => Le(
1830
+ ), as = (s, e, t) => Pe(
1830
1831
  y.map(s, (r) => !r),
1831
1832
  e,
1832
1833
  t
@@ -1835,12 +1836,12 @@ const ft = /* @__PURE__ */ new Set([
1835
1836
  r.index,
1836
1837
  r.total.map((i) => i - 1)
1837
1838
  );
1838
- return A(
1839
+ return b(
1839
1840
  Z(n.dispose),
1840
1841
  f(e(r)),
1841
- Le(
1842
+ Pe(
1842
1843
  r.isLast,
1843
- () => _,
1844
+ () => E,
1844
1845
  () => t(n)
1845
1846
  )
1846
1847
  );
@@ -1860,24 +1861,24 @@ const ft = /* @__PURE__ */ new Set([
1860
1861
  u(c);
1861
1862
  i.length = 0, n.clear(c);
1862
1863
  };
1863
- } : A(
1864
+ } : b(
1864
1865
  ...Array.from({ length: s }, (r, n) => n).map(
1865
1866
  (r) => f(e(new Y(r, U(s))))
1866
1867
  )
1867
- ), ys = (s, e, t) => {
1868
+ ), hs = (s, e, t) => {
1868
1869
  const r = y.map(s, (i) => i.length), n = y.toSignal(s);
1869
1870
  return De(
1870
1871
  r,
1871
1872
  (i) => {
1872
1873
  const l = n.map((c) => c[i.index]);
1873
- return A(
1874
+ return b(
1874
1875
  Z(l.dispose),
1875
1876
  f(e(l, i))
1876
1877
  );
1877
1878
  },
1878
1879
  t
1879
1880
  );
1880
- }, bs = (s, e) => {
1881
+ }, fs = (s, e) => {
1881
1882
  if (d.is(s)) {
1882
1883
  const t = s;
1883
1884
  return (r) => {
@@ -1894,7 +1895,7 @@ const ft = /* @__PURE__ */ new Set([
1894
1895
  };
1895
1896
  }
1896
1897
  return f(e(s));
1897
- }, Ts = (s, e, t = () => _) => G(
1898
+ }, ds = (s, e, t = () => E) => G(
1898
1899
  y.map(
1899
1900
  s,
1900
1901
  (r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
@@ -1903,63 +1904,43 @@ const ft = /* @__PURE__ */ new Set([
1903
1904
  notEmpty: (r) => e(r),
1904
1905
  whenEmpty: () => t()
1905
1906
  }
1906
- ), As = (s, e) => (t) => {
1907
+ ), ps = (s, e) => (t) => {
1907
1908
  const r = t.makePortal(s);
1908
1909
  return Q(f(e), r);
1909
- }, K = (s) => (e) => {
1910
- let t = e;
1911
- const r = s({
1912
- use: e.getProvider,
1913
- set: (n, i) => t = t.setProvider(n, i)
1914
- });
1915
- return r == null ? () => {
1916
- } : f(r)(t);
1917
- }, Ct = (s, e, t) => K(({ set: r }) => (r(s, e), t(e))), Pt = (s, e) => K(({ use: t }) => e(t(s))), Ss = (...s) => (e) => K(({ use: t }) => {
1918
- const r = s.map((n) => t(n));
1919
- return e(...r);
1920
- }), Me = Xe("Probe"), v = /* @__PURE__ */ new Map(), vt = ({
1921
- identifier: s,
1922
- callback: e = () => {
1923
- },
1924
- child: t,
1925
- timeout: r = 10
1926
- }) => {
1927
- if (v.has(s))
1928
- throw new Error(`Probe already exists: ${s.description}`);
1929
- const n = setTimeout(() => e("timeout"), r);
1930
- v.set(s, {
1931
- counter: 0,
1932
- timeoutId: n
1933
- });
1934
- const i = (l) => {
1935
- clearTimeout(n);
1936
- const c = v.get(l);
1937
- if (c == null)
1938
- throw new Error(`Probe not found: ${l.description}`);
1939
- --c.counter === 0 ? (e("resolved"), v.delete(l)) : v.set(l, c);
1940
- };
1941
- return A(
1942
- Z(() => clearTimeout(n)),
1943
- Ct(Me, i, () => t)
1944
- );
1945
- }, xt = (s, e) => Pt(Me, (t) => {
1946
- const r = v.get(s);
1947
- return r == null ? e(() => {
1948
- }) : (clearTimeout(r.timeoutId), r.counter++, e(() => t(s)));
1949
- }), Oe = Symbol("globalProbe"), _s = ({
1950
- callback: s,
1951
- timeout: e
1952
- }, t) => vt({ identifier: Oe, callback: s, child: t, timeout: e }), Es = (s) => xt(Oe, s), Lt = (s, e) => (t) => {
1910
+ }, x = /* @__PURE__ */ new Map(), gs = (s) => ({
1911
+ mark: Je(`Probe(${s.description})`),
1912
+ create: ({ callback: e = () => {
1913
+ }, timeout: t = 10 } = {}) => {
1914
+ if (x.has(s))
1915
+ throw new Error(`Probe already exists: ${s.description}`);
1916
+ const r = setTimeout(() => e("timeout"), t), n = { counter: 0, timeoutId: r };
1917
+ return x.set(s, n), {
1918
+ value: () => {
1919
+ clearTimeout(r);
1920
+ const l = x.get(s);
1921
+ if (l == null)
1922
+ throw new Error(`Probe not found: ${s.description}`);
1923
+ --l.counter === 0 ? (e("resolved"), x.delete(s)) : x.set(s, l);
1924
+ },
1925
+ dispose: () => {
1926
+ clearTimeout(r), x.delete(s);
1927
+ },
1928
+ onUse: () => {
1929
+ n.counter++;
1930
+ }
1931
+ };
1932
+ }
1933
+ }), _t = (s, e) => (t) => {
1953
1934
  const r = t.getStyle(s);
1954
1935
  return t.setStyle(s, e), (n) => {
1955
1936
  n && t.setStyle(s, r);
1956
1937
  };
1957
- }, Dt = (s, e) => (t) => {
1938
+ }, wt = (s, e) => (t) => {
1958
1939
  const r = t.getStyle(s);
1959
1940
  return e.on((n) => t.setStyle(s, n)), (n) => {
1960
1941
  n && t.setStyle(s, r);
1961
1942
  };
1962
- }, ws = new Proxy(
1943
+ }, ms = new Proxy(
1963
1944
  {},
1964
1945
  {
1965
1946
  /**
@@ -1970,9 +1951,9 @@ const ft = /* @__PURE__ */ new Set([
1970
1951
  * @returns The renderable component for the specified attribute.
1971
1952
  *
1972
1953
  */
1973
- get: (s, e) => (t) => d.is(t) ? Dt(e, t) : Lt(e, t)
1954
+ get: (s, e) => (t) => d.is(t) ? wt(e, t) : _t(e, t)
1974
1955
  }
1975
- ), Mt = (s) => (e) => {
1956
+ ), Ct = (s) => (e) => {
1976
1957
  if (e.isBrowser()) {
1977
1958
  const t = s(e);
1978
1959
  if (t != null)
@@ -1980,11 +1961,11 @@ const ft = /* @__PURE__ */ new Set([
1980
1961
  }
1981
1962
  return () => {
1982
1963
  };
1983
- }, Cs = (s) => (e) => {
1964
+ }, ys = (s) => (e) => {
1984
1965
  const t = s(e);
1985
1966
  return t == null ? () => {
1986
1967
  } : f(t)(e);
1987
- }, Ps = (s) => Mt((e) => s(e.element)), vs = (s) => (e) => {
1968
+ }, Ts = (s) => Ct((e) => s(e.element)), As = (s) => (e) => {
1988
1969
  if (e.isHeadlessDOM()) {
1989
1970
  const t = s(e);
1990
1971
  if (t)
@@ -1992,119 +1973,139 @@ const ft = /* @__PURE__ */ new Set([
1992
1973
  }
1993
1974
  return () => {
1994
1975
  };
1995
- };
1976
+ }, K = (s) => (e) => {
1977
+ let t = e;
1978
+ const r = [], n = s({
1979
+ use: ({ mark: i }) => {
1980
+ const [l, c] = t.getProvider(i);
1981
+ return c == null || c(), l;
1982
+ },
1983
+ set: ({ mark: i, create: l }, c) => {
1984
+ const { value: u, dispose: h, onUse: a } = l(c, t);
1985
+ r.push(h), t = t.setProvider(i, u, a);
1986
+ }
1987
+ });
1988
+ return n == null ? () => {
1989
+ } : b(
1990
+ f(n),
1991
+ Z(() => r.forEach((i) => i()))
1992
+ )(t);
1993
+ }, bs = (s, e, t) => K(({ set: r, use: n }) => {
1994
+ r(s, e);
1995
+ const i = n(s);
1996
+ return t(i);
1997
+ }), Ss = (s, e) => K(({ use: t }) => e(t(s))), Es = (...s) => (e) => K(({ use: t }) => {
1998
+ const r = s.map(t);
1999
+ return e(...r);
2000
+ });
1996
2001
  export {
1997
- Zt as Async,
1998
- us as BindChecked,
1999
- is as BindDate,
2000
- os as BindDateTime,
2001
- ls as BindNumber,
2002
- cs as BindText,
2003
- L as BrowserContext,
2002
+ Jt as Async,
2003
+ rs as BindChecked,
2004
+ Kt as BindDate,
2005
+ es as BindDateTime,
2006
+ ts as BindNumber,
2007
+ ss as BindText,
2008
+ P as BrowserContext,
2004
2009
  V as CLASS_PLACEHOLDER_ATTR,
2005
- x as Computed,
2006
- ds as Conjunction,
2007
- ps as DOMNode,
2010
+ L as Computed,
2011
+ ls as Conjunction,
2012
+ cs as DOMNode,
2008
2013
  we as El,
2009
2014
  Ce as ElNS,
2010
2015
  Y as ElementPosition,
2011
- _ as Empty,
2012
- wt as Ensure,
2013
- gs as EnsureAll,
2014
- ys as ForEach,
2015
- A as Fragment,
2016
- qt as HeadlessAdapter,
2016
+ E as Empty,
2017
+ Et as Ensure,
2018
+ us as EnsureAll,
2019
+ hs as ForEach,
2020
+ b as Fragment,
2021
+ $t as HeadlessAdapter,
2017
2022
  D as HeadlessContext,
2018
- at as HeadlessElement,
2023
+ ct as HeadlessElement,
2019
2024
  Se as HeadlessPortal,
2020
- ht as HeadlessText,
2021
- bs as MapSignal,
2025
+ ut as HeadlessText,
2026
+ fs as MapSignal,
2022
2027
  ce as MemoryStore,
2023
- Ts as NotEmpty,
2024
- bt as OnChecked,
2028
+ ds as NotEmpty,
2029
+ mt as OnChecked,
2025
2030
  Z as OnDispose,
2026
2031
  G as OneOf,
2027
- xe as OneOfField,
2028
- as as OneOfKind,
2029
- hs as OneOfTuple,
2030
- fs as OneOfType,
2031
- Et as OneOfValue,
2032
- As as Portal,
2032
+ Le as OneOfField,
2033
+ ns as OneOfKind,
2034
+ is as OneOfTuple,
2035
+ os as OneOfType,
2036
+ St as OneOfValue,
2037
+ ps as Portal,
2033
2038
  k as Prop,
2034
- _s as ProvideGlobalProbe,
2035
- vt as ProvideProbe,
2039
+ bs as Provide,
2036
2040
  me as ProviderNotFoundError,
2037
- Ye as RenderingError,
2041
+ Ge as RenderingError,
2038
2042
  De as Repeat,
2039
- Ct as SetProvider,
2040
2043
  d as Signal,
2041
- Pe as Task,
2042
- Bt as TextNode,
2043
- ms as Unless,
2044
- Es as UseGlobalProbe,
2045
- xt as UseProbe,
2046
- Pt as UseProvider,
2047
- Ss as UseProviders,
2044
+ ve as Task,
2045
+ kt as TextNode,
2046
+ as as Unless,
2047
+ Ss as Use,
2048
+ Es as UseMany,
2048
2049
  y as Value,
2049
- Le as When,
2050
- Mt as WithBrowserCtx,
2051
- Cs as WithCtx,
2052
- Ps as WithElement,
2053
- vs as WithHeadlessCtx,
2050
+ Pe as When,
2051
+ Ct as WithBrowserCtx,
2052
+ ys as WithCtx,
2053
+ Ts as WithElement,
2054
+ As as WithHeadlessCtx,
2054
2055
  K as WithProvider,
2055
2056
  ye as _NODE_PLACEHOLDER_ATTR,
2056
- Ge as _getSelfOrParentElement,
2057
+ Ue as _getSelfOrParentElement,
2057
2058
  ge as _isElement,
2058
- Je as _makeGetter,
2059
- Ue as _makeSetter,
2059
+ We as _makeGetter,
2060
+ Be as _makeSetter,
2060
2061
  R as _removeDOMNode,
2061
- Ee as _signalText,
2062
- _e as _staticText,
2063
- kt as animateSignal,
2064
- We as animateSignals,
2065
- Ut as aria,
2062
+ _e as _signalText,
2063
+ Ee as _staticText,
2064
+ Mt as animateSignal,
2065
+ Fe as animateSignals,
2066
+ Vt as aria,
2066
2067
  O as attr,
2067
2068
  z as computed,
2068
- Be as computedOf,
2069
- Rt as computedRecord,
2070
- Wt as dataAttr,
2071
- Fe as effect,
2072
- Nt as effectOf,
2073
- ts as emitChecked,
2074
- ss as emitPreventDefault,
2075
- ns as emitStopImmediatePropagation,
2076
- rs as emitStopPropagation,
2077
- Tt as emitValue,
2078
- St as emitValueAsDate,
2079
- _t as emitValueAsDateTime,
2080
- Kt as emitValueAsNullableDate,
2081
- es as emitValueAsNullableDateTime,
2082
- At as emitValueAsNumber,
2083
- Ve as endInterpolate,
2069
+ qe as computedOf,
2070
+ Ot as computedRecord,
2071
+ Rt as dataAttr,
2072
+ je as effect,
2073
+ Lt as effectOf,
2074
+ Yt as emitChecked,
2075
+ zt as emitPreventDefault,
2076
+ Zt as emitStopImmediatePropagation,
2077
+ Qt as emitStopPropagation,
2078
+ yt as emitValue,
2079
+ At as emitValueAsDate,
2080
+ bt as emitValueAsDateTime,
2081
+ Gt as emitValueAsNullableDate,
2082
+ Xt as emitValueAsNullableDateTime,
2083
+ Tt as emitValueAsNumber,
2084
+ ke as endInterpolate,
2084
2085
  le as getWindow,
2085
- je as guessInterpolate,
2086
- Xt as html,
2087
- Yt as input,
2088
- Re as interpolateDate,
2089
- Ie as interpolateNumber,
2090
- ke as interpolateString,
2091
- Ht as joinSignals,
2092
- $t as localStorageProp,
2093
- Xe as makeProviderMark,
2094
- Qt as math,
2095
- Gt as mathAttr,
2086
+ Re as guessInterpolate,
2087
+ Ft as html,
2088
+ Bt as input,
2089
+ Ie as interpolateDate,
2090
+ Ne as interpolateNumber,
2091
+ $e as interpolateString,
2092
+ xt as joinSignals,
2093
+ Pt as localStorageProp,
2094
+ gs as makeProbe,
2095
+ Je as makeProviderMark,
2096
+ Ut as math,
2097
+ qt as mathAttr,
2096
2098
  J as on,
2097
- Me as probeMarker,
2098
2099
  w as prop,
2099
- Vt as render,
2100
+ Ht as render,
2100
2101
  Q as renderWithContext,
2101
2102
  f as renderableOfTNode,
2102
- Ft as restoreTempoPlaceholders,
2103
- jt as runHeadless,
2104
- It as sessionStorageProp,
2103
+ It as restoreTempoPlaceholders,
2104
+ Nt as runHeadless,
2105
+ Dt as sessionStorageProp,
2105
2106
  U as signal,
2106
2107
  ue as storedProp,
2107
- ws as style,
2108
- zt as svg,
2109
- Jt as svgAttr
2108
+ ms as style,
2109
+ Wt as svg,
2110
+ jt as svgAttr
2110
2111
  };