@tempots/dom 34.2.0 → 35.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.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +411 -354
- package/package.json +2 -2
- package/renderable/iframe.d.ts +8 -4
- package/types/domain.d.ts +4 -2
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const Ge = (t) => Symbol(t);
|
|
2
|
+
function Ke(t, e) {
|
|
3
3
|
return {
|
|
4
4
|
type: t,
|
|
5
5
|
render: e
|
|
@@ -215,7 +215,7 @@ class q {
|
|
|
215
215
|
* @public
|
|
216
216
|
*/
|
|
217
217
|
prop(e, s) {
|
|
218
|
-
const n =
|
|
218
|
+
const n = ce(() => D(e, s));
|
|
219
219
|
return this.track(n), n;
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
@@ -229,7 +229,7 @@ class q {
|
|
|
229
229
|
* @public
|
|
230
230
|
*/
|
|
231
231
|
computed(e, s, n) {
|
|
232
|
-
const r =
|
|
232
|
+
const r = ce(() => ne(e, s, n));
|
|
233
233
|
return this.track(r), r;
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
@@ -243,7 +243,7 @@ class q {
|
|
|
243
243
|
* @public
|
|
244
244
|
*/
|
|
245
245
|
effect(e, s, n) {
|
|
246
|
-
return
|
|
246
|
+
return M(this, () => _e(e, s, n));
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
* Creates a computed signal with curried signature and tracks it in this scope.
|
|
@@ -255,7 +255,7 @@ class q {
|
|
|
255
255
|
*/
|
|
256
256
|
computedOf(...e) {
|
|
257
257
|
return (s, n) => {
|
|
258
|
-
const r =
|
|
258
|
+
const r = ce(() => te(...e)(s, n));
|
|
259
259
|
return this.track(r), r;
|
|
260
260
|
};
|
|
261
261
|
}
|
|
@@ -268,7 +268,7 @@ class q {
|
|
|
268
268
|
* @public
|
|
269
269
|
*/
|
|
270
270
|
effectOf(...e) {
|
|
271
|
-
return (s, n) =>
|
|
271
|
+
return (s, n) => M(this, () => Ze(...e)(s, n));
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
const A = [], et = (t) => {
|
|
@@ -277,7 +277,7 @@ const A = [], et = (t) => {
|
|
|
277
277
|
if (A.length === 0)
|
|
278
278
|
throw new Error("Cannot pop from empty scope stack");
|
|
279
279
|
A.pop();
|
|
280
|
-
},
|
|
280
|
+
}, pe = () => A[A.length - 1] ?? null, ns = () => A, rs = () => A[A.length - 2] ?? null, M = (t, e) => {
|
|
281
281
|
et(t);
|
|
282
282
|
try {
|
|
283
283
|
return e();
|
|
@@ -287,11 +287,11 @@ const A = [], et = (t) => {
|
|
|
287
287
|
}, os = (t) => {
|
|
288
288
|
const e = new q();
|
|
289
289
|
try {
|
|
290
|
-
return
|
|
290
|
+
return M(e, () => t(e));
|
|
291
291
|
} finally {
|
|
292
292
|
e.dispose();
|
|
293
293
|
}
|
|
294
|
-
},
|
|
294
|
+
}, ce = (t) => {
|
|
295
295
|
const e = A.slice();
|
|
296
296
|
A.length = 0;
|
|
297
297
|
try {
|
|
@@ -446,7 +446,7 @@ class y {
|
|
|
446
446
|
const o = this._onValueListeners.indexOf(n);
|
|
447
447
|
o !== -1 && this._onValueListeners.splice(o, 1), s.abortSignal != null && s.abortSignal.removeEventListener("abort", r);
|
|
448
448
|
};
|
|
449
|
-
return s.abortSignal != null && s.abortSignal.addEventListener("abort", r), !s.noAutoDispose &&
|
|
449
|
+
return s.abortSignal != null && s.abortSignal.addEventListener("abort", r), !s.noAutoDispose && pe()?.onDispose(r), r;
|
|
450
450
|
};
|
|
451
451
|
/**
|
|
452
452
|
* Registers a listener function to be called whenever the value of the signal changes.
|
|
@@ -768,7 +768,7 @@ class R extends y {
|
|
|
768
768
|
* @see {@link untracked} - Create signals outside of scope tracking
|
|
769
769
|
*/
|
|
770
770
|
constructor(e, s) {
|
|
771
|
-
super(void 0, s), this._fn = e, this.setDirty(),
|
|
771
|
+
super(void 0, s), this._fn = e, this.setDirty(), pe()?.track(this);
|
|
772
772
|
}
|
|
773
773
|
/**
|
|
774
774
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -929,8 +929,8 @@ const ne = (t, e, s = (n, r) => n === r) => {
|
|
|
929
929
|
return s.abortSignal != null && s.abortSignal.addEventListener("abort", o), o;
|
|
930
930
|
}, D = (t, e = (s, n) => s === n) => {
|
|
931
931
|
const s = new se(t, e);
|
|
932
|
-
return
|
|
933
|
-
}, re = (t, e = (s, n) => s === n) => new y(t, e),
|
|
932
|
+
return pe()?.track(s), s;
|
|
933
|
+
}, re = (t, e = (s, n) => s === n) => new y(t, e), oe = () => (
|
|
934
934
|
/* c8 ignore next */
|
|
935
935
|
typeof window < "u" ? window : void 0
|
|
936
936
|
), nt = (t, e, s) => t + (e - t) * s, we = 97, rt = (t, e, s) => {
|
|
@@ -944,7 +944,7 @@ const ne = (t, e, s = (n, r) => n === r) => {
|
|
|
944
944
|
}
|
|
945
945
|
return r;
|
|
946
946
|
}, ot = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), it = (t, e) => e, lt = (t) => typeof t == "number" ? nt : typeof t == "string" ? rt : t instanceof Date ? ot : it;
|
|
947
|
-
class
|
|
947
|
+
class Te {
|
|
948
948
|
_store = /* @__PURE__ */ new Map();
|
|
949
949
|
/**
|
|
950
950
|
* Retrieves the value associated with the specified key from the memory store.
|
|
@@ -961,8 +961,8 @@ class Ae {
|
|
|
961
961
|
this._store.set(e, s);
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
let
|
|
965
|
-
const at = () => (
|
|
964
|
+
let ue = null, he = null;
|
|
965
|
+
const at = () => (ue || (ue = new Te()), ue), ct = () => (he || (he = new Te()), he), Ae = ({
|
|
966
966
|
key: t,
|
|
967
967
|
defaultValue: e,
|
|
968
968
|
store: s,
|
|
@@ -974,73 +974,73 @@ const at = () => (ce || (ce = new Ae()), ce), ct = () => (ue || (ue = new Ae()),
|
|
|
974
974
|
onKeyChange: a = "load"
|
|
975
975
|
}) => {
|
|
976
976
|
let c = w.get(t);
|
|
977
|
-
const u = s.getItem(c),
|
|
977
|
+
const u = s.getItem(c), d = new se(
|
|
978
978
|
u != null ? i(r(u)) : typeof e == "function" ? e() : e,
|
|
979
979
|
o
|
|
980
|
-
), p =
|
|
981
|
-
let
|
|
982
|
-
const b = (
|
|
983
|
-
if (!
|
|
984
|
-
const I = `tempo:storedProp:${
|
|
985
|
-
const C =
|
|
986
|
-
if (!(C == null || typeof C != "object" || C.key !==
|
|
980
|
+
), p = oe(), h = l && typeof p?.BroadcastChannel == "function";
|
|
981
|
+
let f = !1, v = null, S = null;
|
|
982
|
+
const b = (_) => {
|
|
983
|
+
if (!h) return null;
|
|
984
|
+
const I = `tempo:storedProp:${_}`, L = new p.BroadcastChannel(I), H = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, O = (J) => {
|
|
985
|
+
const C = J.data;
|
|
986
|
+
if (!(C == null || typeof C != "object" || C.key !== _ || typeof C.value != "string" || C.sourceId != null && C.sourceId === H))
|
|
987
987
|
try {
|
|
988
|
-
|
|
989
|
-
const
|
|
990
|
-
|
|
991
|
-
} catch (
|
|
988
|
+
f = !0;
|
|
989
|
+
const ae = i(r(C.value));
|
|
990
|
+
d.set(ae);
|
|
991
|
+
} catch (ae) {
|
|
992
992
|
console.warn(
|
|
993
|
-
`Failed to sync storedProp for key "${
|
|
994
|
-
|
|
993
|
+
`Failed to sync storedProp for key "${_}" via BroadcastChannel`,
|
|
994
|
+
ae
|
|
995
995
|
);
|
|
996
996
|
} finally {
|
|
997
|
-
|
|
997
|
+
f = !1;
|
|
998
998
|
}
|
|
999
999
|
};
|
|
1000
|
-
return
|
|
1001
|
-
|
|
1002
|
-
}), { channel:
|
|
1003
|
-
},
|
|
1004
|
-
|
|
1005
|
-
const U = (
|
|
1000
|
+
return L.addEventListener("message", O), d.onDispose(() => {
|
|
1001
|
+
L?.removeEventListener("message", O), L?.close();
|
|
1002
|
+
}), { channel: L, instanceId: H, handleMessage: O };
|
|
1003
|
+
}, x = b(c);
|
|
1004
|
+
x && (v = x.channel, S = x.instanceId);
|
|
1005
|
+
const U = (_) => {
|
|
1006
1006
|
const I = c;
|
|
1007
|
-
if (I ===
|
|
1008
|
-
const
|
|
1009
|
-
if (s.setItem(I, H), v != null && (v.close(), v = null,
|
|
1010
|
-
const
|
|
1011
|
-
if (
|
|
1007
|
+
if (I === _) return;
|
|
1008
|
+
const L = d.get(), H = n(L);
|
|
1009
|
+
if (s.setItem(I, H), v != null && (v.close(), v = null, S = null), c = _, a === "load") {
|
|
1010
|
+
const J = s.getItem(_);
|
|
1011
|
+
if (J != null)
|
|
1012
1012
|
try {
|
|
1013
|
-
const C = i(r(
|
|
1014
|
-
|
|
1013
|
+
const C = i(r(J));
|
|
1014
|
+
d.set(C);
|
|
1015
1015
|
} catch (C) {
|
|
1016
1016
|
console.warn(
|
|
1017
|
-
`Failed to load storedProp from new key "${
|
|
1017
|
+
`Failed to load storedProp from new key "${_}"`,
|
|
1018
1018
|
C
|
|
1019
1019
|
);
|
|
1020
1020
|
}
|
|
1021
1021
|
else
|
|
1022
|
-
s.setItem(
|
|
1023
|
-
} else a === "migrate" && s.setItem(
|
|
1024
|
-
const O = b(
|
|
1025
|
-
O && (v = O.channel,
|
|
1026
|
-
};
|
|
1027
|
-
return y.is(t) &&
|
|
1028
|
-
const
|
|
1029
|
-
s.setItem(c,
|
|
1022
|
+
s.setItem(_, H);
|
|
1023
|
+
} else a === "migrate" && s.setItem(_, H);
|
|
1024
|
+
const O = b(_);
|
|
1025
|
+
O && (v = O.channel, S = O.instanceId);
|
|
1026
|
+
};
|
|
1027
|
+
return y.is(t) && d.onDispose(t.on(U)), d.on((_, I) => {
|
|
1028
|
+
const L = n(_);
|
|
1029
|
+
s.setItem(c, L), v != null && !f && I !== void 0 && S != null && v.postMessage({
|
|
1030
1030
|
key: c,
|
|
1031
|
-
value:
|
|
1032
|
-
sourceId:
|
|
1031
|
+
value: L,
|
|
1032
|
+
sourceId: S
|
|
1033
1033
|
});
|
|
1034
|
-
}),
|
|
1034
|
+
}), d;
|
|
1035
1035
|
}, is = (t) => {
|
|
1036
|
-
const e =
|
|
1037
|
-
return
|
|
1036
|
+
const e = oe()?.localStorage, s = e && typeof e.getItem == "function" ? e : at();
|
|
1037
|
+
return Ae({
|
|
1038
1038
|
...t,
|
|
1039
1039
|
store: s
|
|
1040
1040
|
});
|
|
1041
1041
|
}, ls = (t) => {
|
|
1042
|
-
const e =
|
|
1043
|
-
return
|
|
1042
|
+
const e = oe()?.sessionStorage, s = e && typeof e.getItem == "function" ? e : ct();
|
|
1043
|
+
return Ae({
|
|
1044
1044
|
...t,
|
|
1045
1045
|
store: s
|
|
1046
1046
|
});
|
|
@@ -1049,23 +1049,23 @@ function ve(t) {
|
|
|
1049
1049
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
1050
1050
|
}
|
|
1051
1051
|
const ut = (t, e, s, n) => {
|
|
1052
|
-
const r = n?.duration ?? 300, o = n?.easing ?? ((b) => b), i = n?.equals ?? ((b,
|
|
1053
|
-
let l = n?.interpolate, a = t, c = e(), u = performance.now(),
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
}),
|
|
1058
|
-
b.setDerivative(
|
|
1052
|
+
const r = n?.duration ?? 300, o = n?.easing ?? ((b) => b), i = n?.equals ?? ((b, x) => b === x);
|
|
1053
|
+
let l = n?.interpolate, a = t, c = e(), u = performance.now(), d = null, p = !0;
|
|
1054
|
+
const h = new R(e, i), f = D(t, i);
|
|
1055
|
+
f.onDispose(() => {
|
|
1056
|
+
d !== null && cancelAnimationFrame(d);
|
|
1057
|
+
}), f.onDispose(h.dispose), s.forEach((b) => {
|
|
1058
|
+
b.setDerivative(h), b.onDispose(f.dispose);
|
|
1059
1059
|
});
|
|
1060
1060
|
const v = (b) => {
|
|
1061
|
-
c = b, u = performance.now(), a =
|
|
1062
|
-
},
|
|
1063
|
-
const b = (performance.now() - u) / w.get(r),
|
|
1061
|
+
c = b, u = performance.now(), a = f.value, p && (p = !1, d = ve(S));
|
|
1062
|
+
}, S = () => {
|
|
1063
|
+
const b = (performance.now() - u) / w.get(r), x = o(b);
|
|
1064
1064
|
l == null && (l = lt(a));
|
|
1065
|
-
let U = l(a, c,
|
|
1066
|
-
b >= 1 ? (p = !0, U = c) :
|
|
1065
|
+
let U = l(a, c, x);
|
|
1066
|
+
b >= 1 ? (p = !0, U = c) : d = ve(S), f.set(U);
|
|
1067
1067
|
};
|
|
1068
|
-
return
|
|
1068
|
+
return h.on(v), f;
|
|
1069
1069
|
}, as = (t, e) => {
|
|
1070
1070
|
const { initialValue: s, ...n } = e ?? {};
|
|
1071
1071
|
return ut(
|
|
@@ -1121,7 +1121,57 @@ function fs(...t) {
|
|
|
1121
1121
|
for (const s of e) if (s != null) return s;
|
|
1122
1122
|
});
|
|
1123
1123
|
}
|
|
1124
|
-
|
|
1124
|
+
const gs = (t, {
|
|
1125
|
+
channel: e,
|
|
1126
|
+
serialize: s = JSON.stringify,
|
|
1127
|
+
deserialize: n = JSON.parse,
|
|
1128
|
+
equals: r = (o, i) => o === i
|
|
1129
|
+
}) => {
|
|
1130
|
+
const o = oe();
|
|
1131
|
+
if (typeof o?.BroadcastChannel != "function")
|
|
1132
|
+
return () => {
|
|
1133
|
+
};
|
|
1134
|
+
const i = new o.BroadcastChannel(
|
|
1135
|
+
`tempo:syncProp:${e}`
|
|
1136
|
+
), l = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
1137
|
+
let a = !1;
|
|
1138
|
+
const c = (p) => {
|
|
1139
|
+
const h = p.data;
|
|
1140
|
+
if (!(h == null || typeof h != "object" || typeof h.value != "string" || h.sourceId != null && h.sourceId === l))
|
|
1141
|
+
try {
|
|
1142
|
+
a = !0;
|
|
1143
|
+
const f = n(h.value);
|
|
1144
|
+
r(t.get(), f) || t.set(f);
|
|
1145
|
+
} catch (f) {
|
|
1146
|
+
console.warn(
|
|
1147
|
+
`Failed to sync prop for channel "${e}" via BroadcastChannel`,
|
|
1148
|
+
f
|
|
1149
|
+
);
|
|
1150
|
+
} finally {
|
|
1151
|
+
a = !1;
|
|
1152
|
+
}
|
|
1153
|
+
};
|
|
1154
|
+
i.addEventListener("message", c);
|
|
1155
|
+
const u = t.on((p, h) => {
|
|
1156
|
+
if (!a && h !== void 0 && !r(p, h))
|
|
1157
|
+
try {
|
|
1158
|
+
const f = s(p);
|
|
1159
|
+
i.postMessage({
|
|
1160
|
+
value: f,
|
|
1161
|
+
sourceId: l
|
|
1162
|
+
});
|
|
1163
|
+
} catch (f) {
|
|
1164
|
+
console.warn(
|
|
1165
|
+
`Failed to serialize prop for channel "${e}" via BroadcastChannel`,
|
|
1166
|
+
f
|
|
1167
|
+
);
|
|
1168
|
+
}
|
|
1169
|
+
}), d = () => {
|
|
1170
|
+
u(), i.removeEventListener("message", c), i.close();
|
|
1171
|
+
};
|
|
1172
|
+
return t.onDispose(d), d;
|
|
1173
|
+
};
|
|
1174
|
+
class de {
|
|
1125
1175
|
/**
|
|
1126
1176
|
* Creates a new instance of `ElementPosition`.
|
|
1127
1177
|
* @param index - The index of the element.
|
|
@@ -1194,11 +1244,11 @@ const Ee = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), Ce = /* @
|
|
|
1194
1244
|
s == null ? e[t] = null : e[t] = String(s);
|
|
1195
1245
|
} : (s) => {
|
|
1196
1246
|
s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
|
|
1197
|
-
}, pt = (t, e) => Ce.has(t) ? () => e.hasAttribute(t) : Ee.has(t) ? () => !!e[t] : De.has(t) ? () => Number(e[t]) : Pe.has(t) ? () => e[t] : xe.has(t) ? () => String(e[t]) : () => e.getAttribute(t),
|
|
1247
|
+
}, pt = (t, e) => Ce.has(t) ? () => e.hasAttribute(t) : Ee.has(t) ? () => !!e[t] : De.has(t) ? () => Number(e[t]) : Pe.has(t) ? () => e[t] : xe.has(t) ? () => String(e[t]) : () => e.getAttribute(t), K = (t) => {
|
|
1198
1248
|
const e = t;
|
|
1199
1249
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentNode && t.parentNode.removeChild(t);
|
|
1200
1250
|
}, ft = (t) => Le(t) || Oe(t) ? t : t.parentElement, Le = (t) => t.nodeType === 1, Oe = (t) => t.nodeType === 11;
|
|
1201
|
-
class
|
|
1251
|
+
class Me extends Error {
|
|
1202
1252
|
constructor(e) {
|
|
1203
1253
|
super(`Provider not found: ${e.description}`);
|
|
1204
1254
|
}
|
|
@@ -1393,12 +1443,12 @@ class j {
|
|
|
1393
1443
|
*/
|
|
1394
1444
|
getProvider = (e) => {
|
|
1395
1445
|
if (this.providers[e] === void 0)
|
|
1396
|
-
throw new
|
|
1446
|
+
throw new Me(e);
|
|
1397
1447
|
const [s, n] = this.providers[e];
|
|
1398
1448
|
return { value: s, onUse: n };
|
|
1399
1449
|
};
|
|
1400
1450
|
clear = (e) => {
|
|
1401
|
-
e && (this.reference !== void 0 ?
|
|
1451
|
+
e && (this.reference !== void 0 ? K(this.reference) : K(this.element));
|
|
1402
1452
|
};
|
|
1403
1453
|
/**
|
|
1404
1454
|
* Adds classes to the element.
|
|
@@ -1474,11 +1524,11 @@ class j {
|
|
|
1474
1524
|
getWindow = () => this.document.defaultView;
|
|
1475
1525
|
}
|
|
1476
1526
|
const B = (t, e) => {
|
|
1477
|
-
const s = new q(), n =
|
|
1527
|
+
const s = new q(), n = M(s, () => t.render(e));
|
|
1478
1528
|
return (r = !0) => {
|
|
1479
1529
|
s.dispose(), n(r);
|
|
1480
1530
|
};
|
|
1481
|
-
},
|
|
1531
|
+
}, ms = (t, e, { doc: s, clear: n, disposeWithParent: r = !0, providers: o = {} } = {}) => {
|
|
1482
1532
|
const i = typeof e == "string" ? (s ?? document).querySelector(e) : e;
|
|
1483
1533
|
if (i === null)
|
|
1484
1534
|
throw new gt(
|
|
@@ -1486,26 +1536,26 @@ const B = (t, e) => {
|
|
|
1486
1536
|
);
|
|
1487
1537
|
n !== !1 && (s ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
|
|
1488
1538
|
const l = ft(i), a = Le(i) || Oe(i) ? void 0 : i, c = j.of(l, a, o), u = B(t, c);
|
|
1489
|
-
let
|
|
1490
|
-
return r && i.parentElement != null && (
|
|
1491
|
-
p[0]?.removedNodes.forEach((
|
|
1492
|
-
|
|
1539
|
+
let d;
|
|
1540
|
+
return r && i.parentElement != null && (d = new MutationObserver((p) => {
|
|
1541
|
+
p[0]?.removedNodes.forEach((h) => {
|
|
1542
|
+
h === i && (d?.disconnect(), u(i.nodeType !== 1));
|
|
1493
1543
|
});
|
|
1494
|
-
}),
|
|
1544
|
+
}), d.observe(i.parentElement, {
|
|
1495
1545
|
childList: !0,
|
|
1496
1546
|
subtree: !1,
|
|
1497
1547
|
attributes: !1
|
|
1498
1548
|
})), () => {
|
|
1499
|
-
|
|
1549
|
+
d?.disconnect(), u(!0);
|
|
1500
1550
|
};
|
|
1501
|
-
},
|
|
1551
|
+
}, ys = (t, {
|
|
1502
1552
|
startUrl: e = "https://example.com",
|
|
1503
1553
|
selector: s,
|
|
1504
1554
|
providers: n = {}
|
|
1505
1555
|
} = {
|
|
1506
1556
|
selector: "body"
|
|
1507
1557
|
}) => {
|
|
1508
|
-
const r = w.toSignal(e).deriveProp(), o = new
|
|
1558
|
+
const r = w.toSignal(e).deriveProp(), o = new Ne(s, void 0), i = new V(o, void 0, { currentURL: r }, n);
|
|
1509
1559
|
return {
|
|
1510
1560
|
clear: B(t(), i),
|
|
1511
1561
|
root: o,
|
|
@@ -1517,8 +1567,8 @@ class gt extends Error {
|
|
|
1517
1567
|
super(e);
|
|
1518
1568
|
}
|
|
1519
1569
|
}
|
|
1520
|
-
const
|
|
1521
|
-
class
|
|
1570
|
+
const ke = "data-tts-node", Y = "data-tts-class", X = "data-tts-style", Q = "data-tts-html", Z = "data-tts-text", ee = "data-tts-attrs";
|
|
1571
|
+
class ws {
|
|
1522
1572
|
/**
|
|
1523
1573
|
* Selects elements from the headless environment.
|
|
1524
1574
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -1603,10 +1653,10 @@ class ys {
|
|
|
1603
1653
|
appendHTML: a,
|
|
1604
1654
|
getInnerHTML: c,
|
|
1605
1655
|
setInnerHTML: u,
|
|
1606
|
-
getInnerText:
|
|
1656
|
+
getInnerText: d,
|
|
1607
1657
|
setInnerText: p
|
|
1608
1658
|
}) {
|
|
1609
|
-
this.select = e, this.getAttribute = s, this.setAttribute = n, this.getClass = r, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = a, this.getInnerHTML = c, this.setInnerHTML = u, this.getInnerText =
|
|
1659
|
+
this.select = e, this.getAttribute = s, this.setAttribute = n, this.getClass = r, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = a, this.getInnerHTML = c, this.setInnerHTML = u, this.getInnerText = d, this.setInnerText = p;
|
|
1610
1660
|
}
|
|
1611
1661
|
/**
|
|
1612
1662
|
* Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
|
|
@@ -1678,7 +1728,7 @@ class ys {
|
|
|
1678
1728
|
};
|
|
1679
1729
|
}
|
|
1680
1730
|
const mt = () => {
|
|
1681
|
-
document.querySelectorAll(`[${
|
|
1731
|
+
document.querySelectorAll(`[${ke}]`).forEach(K);
|
|
1682
1732
|
}, yt = (t) => {
|
|
1683
1733
|
const e = t.getAttribute(Y);
|
|
1684
1734
|
t.removeAttribute(Y), e != null && t.setAttribute("class", e);
|
|
@@ -1694,7 +1744,7 @@ const mt = () => {
|
|
|
1694
1744
|
t.removeAttribute(Z), e != null && (t.innerText = e);
|
|
1695
1745
|
}, _t = () => {
|
|
1696
1746
|
document.querySelectorAll(`[${Z}]`).forEach((e) => St(e));
|
|
1697
|
-
}, Ie = (t) => JSON.parse(t.replace(/"/g, '"')),
|
|
1747
|
+
}, Ie = (t) => JSON.parse(t.replace(/"/g, '"')), Tt = (t) => {
|
|
1698
1748
|
const e = t.getAttribute(X);
|
|
1699
1749
|
if (t.removeAttribute(X), e != null) {
|
|
1700
1750
|
const s = Ie(e);
|
|
@@ -1702,8 +1752,8 @@ const mt = () => {
|
|
|
1702
1752
|
t.style.setProperty(n, r);
|
|
1703
1753
|
});
|
|
1704
1754
|
}
|
|
1705
|
-
},
|
|
1706
|
-
document.querySelectorAll(`[${X}]`).forEach((e) =>
|
|
1755
|
+
}, At = () => {
|
|
1756
|
+
document.querySelectorAll(`[${X}]`).forEach((e) => Tt(e));
|
|
1707
1757
|
}, Et = (t) => {
|
|
1708
1758
|
const e = t.getAttribute(ee);
|
|
1709
1759
|
if (t.removeAttribute(ee), e != null) {
|
|
@@ -1714,10 +1764,10 @@ const mt = () => {
|
|
|
1714
1764
|
}
|
|
1715
1765
|
}, Ct = () => {
|
|
1716
1766
|
document.querySelectorAll(`[${ee}]`).forEach((e) => Et(e));
|
|
1717
|
-
},
|
|
1718
|
-
mt(), wt(), _t(), bt(),
|
|
1719
|
-
},
|
|
1720
|
-
class
|
|
1767
|
+
}, vs = () => {
|
|
1768
|
+
mt(), wt(), _t(), bt(), At(), Ct();
|
|
1769
|
+
}, $ = Symbol("class"), N = Symbol("style"), z = Symbol("handler"), He = () => Math.random().toString(36).substring(2, 15), Dt = (t) => t.replace(/<[^>]*>?/g, "");
|
|
1770
|
+
class $e {
|
|
1721
1771
|
constructor(e) {
|
|
1722
1772
|
this.parent = e;
|
|
1723
1773
|
}
|
|
@@ -1747,10 +1797,10 @@ class Ne {
|
|
|
1747
1797
|
getInnerText = () => this.properties.innerText ?? "";
|
|
1748
1798
|
hasInnerText = () => this.properties.innerText != null;
|
|
1749
1799
|
hasChildren = () => this.children.length > 0;
|
|
1750
|
-
hasClasses = () => this.properties[
|
|
1751
|
-
hasStyles = () => this.properties[
|
|
1800
|
+
hasClasses = () => this.properties[$] != null;
|
|
1801
|
+
hasStyles = () => this.properties[N] != null;
|
|
1752
1802
|
hasAttributes = () => Object.keys(this.properties).length > 0;
|
|
1753
|
-
hasHandlers = () => this.properties[
|
|
1803
|
+
hasHandlers = () => this.properties[z] != null;
|
|
1754
1804
|
hasRenderableProperties = () => this.hasClasses() || this.hasAttributes() || this.hasStyles();
|
|
1755
1805
|
getById = (e) => {
|
|
1756
1806
|
if (this.properties.id === e)
|
|
@@ -1762,26 +1812,26 @@ class Ne {
|
|
|
1762
1812
|
}
|
|
1763
1813
|
};
|
|
1764
1814
|
trigger = (e, s) => {
|
|
1765
|
-
((this.properties[
|
|
1815
|
+
((this.properties[z] ?? {})[e] ?? []).forEach((r) => r(s));
|
|
1766
1816
|
};
|
|
1767
1817
|
click = () => {
|
|
1768
1818
|
this.trigger("click", {});
|
|
1769
1819
|
};
|
|
1770
1820
|
on = (e, s, n, r) => {
|
|
1771
|
-
const o = this.properties[
|
|
1821
|
+
const o = this.properties[z] ??= {}, i = r?.once ? (a) => {
|
|
1772
1822
|
l(), s(a, n);
|
|
1773
1823
|
} : (a) => s(a, n);
|
|
1774
1824
|
o[e] = [...o[e] ?? [], i];
|
|
1775
1825
|
const l = () => {
|
|
1776
1826
|
const a = o[e] ?? [], c = a.indexOf(i);
|
|
1777
|
-
c !== -1 && (a.splice(c, 1), a.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[
|
|
1827
|
+
c !== -1 && (a.splice(c, 1), a.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[z]) : o[e] = a, r?.signal != null && r.signal.removeEventListener("abort", l));
|
|
1778
1828
|
};
|
|
1779
1829
|
return r?.signal != null && r.signal.addEventListener("abort", l), l;
|
|
1780
1830
|
};
|
|
1781
1831
|
addClasses = (e) => {
|
|
1782
1832
|
if (e.length === 0)
|
|
1783
1833
|
return;
|
|
1784
|
-
const s = this.properties[
|
|
1834
|
+
const s = this.properties[$] ??= [];
|
|
1785
1835
|
e.forEach((n) => {
|
|
1786
1836
|
s.includes(n) || s.push(n);
|
|
1787
1837
|
});
|
|
@@ -1789,25 +1839,25 @@ class Ne {
|
|
|
1789
1839
|
removeClasses = (e) => {
|
|
1790
1840
|
if (e.length === 0)
|
|
1791
1841
|
return;
|
|
1792
|
-
const s = this.properties[
|
|
1842
|
+
const s = this.properties[$] ??= [];
|
|
1793
1843
|
e.forEach((n) => {
|
|
1794
1844
|
const r = s.indexOf(n);
|
|
1795
1845
|
r !== -1 && s.splice(r, 1);
|
|
1796
|
-
}), s.length === 0 && delete this.properties[
|
|
1846
|
+
}), s.length === 0 && delete this.properties[$];
|
|
1797
1847
|
};
|
|
1798
|
-
getClasses = () => this.properties[
|
|
1848
|
+
getClasses = () => this.properties[$] ?? [];
|
|
1799
1849
|
getAttributes = () => Object.entries(this.properties).filter(
|
|
1800
1850
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
1801
1851
|
);
|
|
1802
1852
|
getVisibleAttributes = () => Reflect.ownKeys(this.properties).flatMap(
|
|
1803
|
-
(e) => e ===
|
|
1853
|
+
(e) => e === $ ? [["class", this.getClasses()]] : e === N ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
1804
1854
|
);
|
|
1805
1855
|
setStyle = (e, s) => {
|
|
1806
|
-
const n = this.properties[
|
|
1807
|
-
n[e] = s, s === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[
|
|
1856
|
+
const n = this.properties[N] ??= {};
|
|
1857
|
+
n[e] = s, s === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[N]);
|
|
1808
1858
|
};
|
|
1809
|
-
getStyle = (e) => this.properties[
|
|
1810
|
-
getStyles = () => this.properties[
|
|
1859
|
+
getStyle = (e) => this.properties[N]?.[e] ?? "";
|
|
1860
|
+
getStyles = () => this.properties[N] ?? {};
|
|
1811
1861
|
makeAccessors = (e) => {
|
|
1812
1862
|
const s = this.properties;
|
|
1813
1863
|
return {
|
|
@@ -1817,7 +1867,7 @@ class Ne {
|
|
|
1817
1867
|
};
|
|
1818
1868
|
}
|
|
1819
1869
|
const Pt = (t) => t.replace(/"/g, """), xt = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1820
|
-
class Lt extends
|
|
1870
|
+
class Lt extends $e {
|
|
1821
1871
|
constructor(e, s, n) {
|
|
1822
1872
|
super(n), this.tagName = e, this.namespace = s;
|
|
1823
1873
|
}
|
|
@@ -1825,11 +1875,11 @@ class Lt extends Ne {
|
|
|
1825
1875
|
toHTML = (e = !1) => {
|
|
1826
1876
|
const s = this.children.map((l) => l.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1827
1877
|
let r = null;
|
|
1828
|
-
const o = this.getVisibleAttributes().map(([l, a]) => l === "class" ? ` class="${a.join(" ")}"` : l === "style" ? typeof a == "string" ? ` style="${a}"` : ` style="${Object.entries(a).map(([c, u]) => `${c}: ${u};`).join(" ")}"` :
|
|
1829
|
-
return
|
|
1878
|
+
const o = this.getVisibleAttributes().map(([l, a]) => l === "class" ? ` class="${a.join(" ")}"` : l === "style" ? typeof a == "string" ? ` style="${a}"` : ` style="${Object.entries(a).map(([c, u]) => `${c}: ${u};`).join(" ")}"` : Mt.has(l) ? ` ${l}` : l === "innerHTML" ? (r = a, "") : l === "innerText" ? (r = xt(a), "") : ` ${l}="${Pt(a)}"`).join(""), i = e ? ` ${ke}` : "";
|
|
1879
|
+
return kt.has(this.tagName) && s === "" ? `<${this.tagName}${n}${o}${i} />` : `<${this.tagName}${n}${o}${i}>${r ?? s}</${this.tagName}>`;
|
|
1830
1880
|
};
|
|
1831
1881
|
}
|
|
1832
|
-
class
|
|
1882
|
+
class Ne extends $e {
|
|
1833
1883
|
constructor(e, s) {
|
|
1834
1884
|
super(s), this.selector = e;
|
|
1835
1885
|
}
|
|
@@ -1882,7 +1932,7 @@ class V {
|
|
|
1882
1932
|
getText = () => this.reference?.getText() ?? this.element.getText();
|
|
1883
1933
|
makeRef = () => this.makeChildText("");
|
|
1884
1934
|
makePortal = (e) => {
|
|
1885
|
-
const s = new
|
|
1935
|
+
const s = new Ne(e, this.element);
|
|
1886
1936
|
return this.appendOrInsert(s), new V(
|
|
1887
1937
|
s,
|
|
1888
1938
|
void 0,
|
|
@@ -1903,7 +1953,7 @@ class V {
|
|
|
1903
1953
|
});
|
|
1904
1954
|
getProvider = (e) => {
|
|
1905
1955
|
if (this.providers[e] === void 0)
|
|
1906
|
-
throw new
|
|
1956
|
+
throw new Me(e);
|
|
1907
1957
|
const [s, n] = this.providers[e];
|
|
1908
1958
|
return { value: s, onUse: n };
|
|
1909
1959
|
};
|
|
@@ -1922,30 +1972,30 @@ class V {
|
|
|
1922
1972
|
getStyle = (e) => this.element.getStyle(e);
|
|
1923
1973
|
makeAccessors = (e) => this.element.makeAccessors(e);
|
|
1924
1974
|
}
|
|
1925
|
-
const
|
|
1975
|
+
const Mt = /* @__PURE__ */ new Set([
|
|
1926
1976
|
"checked",
|
|
1927
1977
|
"disabled",
|
|
1928
1978
|
"multiple",
|
|
1929
1979
|
"readonly",
|
|
1930
1980
|
"required",
|
|
1931
1981
|
"selected"
|
|
1932
|
-
]),
|
|
1982
|
+
]), kt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), bs = () => (
|
|
1933
1983
|
/* c8 ignore next */
|
|
1934
1984
|
typeof window < "u" ? window : void 0
|
|
1935
|
-
), It = Symbol("DOM_RENDERABLE"), m = (t) =>
|
|
1985
|
+
), It = Symbol("DOM_RENDERABLE"), m = (t) => Ke(It, t), Re = (t) => m((e) => e.makeChildText(t).clear), je = (t) => m((e) => {
|
|
1936
1986
|
const s = e.makeChildText(t.value), n = t.on(s.setText);
|
|
1937
1987
|
return (r) => {
|
|
1938
1988
|
n(), s.clear(r);
|
|
1939
1989
|
};
|
|
1940
|
-
}),
|
|
1941
|
-
const s = t.map((n) =>
|
|
1990
|
+
}), Ss = (t) => y.is(t) ? je(t) : Re(t), E = (...t) => m((e) => {
|
|
1991
|
+
const s = t.map((n) => g(n).render(e));
|
|
1942
1992
|
return (n) => {
|
|
1943
1993
|
s.forEach((r) => r(n));
|
|
1944
1994
|
};
|
|
1945
1995
|
}), P = m(() => () => {
|
|
1946
1996
|
}), Ht = (t) => m((e) => (e.addClasses(t), (s) => {
|
|
1947
1997
|
s && e.removeClasses(t);
|
|
1948
|
-
})),
|
|
1998
|
+
})), $t = (t) => m((e) => {
|
|
1949
1999
|
let s = [];
|
|
1950
2000
|
const n = t.on(
|
|
1951
2001
|
(r) => {
|
|
@@ -1956,7 +2006,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
1956
2006
|
return (r) => {
|
|
1957
2007
|
n(), r && e.removeClasses(s), s.length = 0;
|
|
1958
2008
|
};
|
|
1959
|
-
}),
|
|
2009
|
+
}), Nt = (t, e) => m((s) => {
|
|
1960
2010
|
const { get: n, set: r } = s.makeAccessors(t), o = n();
|
|
1961
2011
|
return r(e), (i) => {
|
|
1962
2012
|
i && r(o);
|
|
@@ -1966,10 +2016,10 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
1966
2016
|
return (l) => {
|
|
1967
2017
|
i(), l && r(o);
|
|
1968
2018
|
};
|
|
1969
|
-
}), F = (t, e) => y.is(e) ? Rt(t, e) :
|
|
2019
|
+
}), F = (t, e) => y.is(e) ? Rt(t, e) : Nt(t, e), jt = (t, e) => t === "class" ? y.is(e) ? $t(e) : Ht(
|
|
1970
2020
|
/* c8 ignore next */
|
|
1971
2021
|
(e ?? "").split(" ").filter((s) => s.length > 0)
|
|
1972
|
-
) : F(t, e),
|
|
2022
|
+
) : F(t, e), T = new Proxy(
|
|
1973
2023
|
{},
|
|
1974
2024
|
{
|
|
1975
2025
|
/**
|
|
@@ -1985,7 +2035,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
1985
2035
|
*/
|
|
1986
2036
|
get: (t, e) => (s) => jt(e, s)
|
|
1987
2037
|
}
|
|
1988
|
-
), Vt = (t, e) => F(`data-${t}`, e),
|
|
2038
|
+
), Vt = (t, e) => F(`data-${t}`, e), _s = new Proxy(
|
|
1989
2039
|
{},
|
|
1990
2040
|
{
|
|
1991
2041
|
/**
|
|
@@ -1998,7 +2048,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
1998
2048
|
*/
|
|
1999
2049
|
get: (t, e) => (s) => Vt(e, s)
|
|
2000
2050
|
}
|
|
2001
|
-
), qt = (t, e) => F(`aria-${t}`, e),
|
|
2051
|
+
), qt = (t, e) => F(`aria-${t}`, e), Ts = new Proxy(
|
|
2002
2052
|
{},
|
|
2003
2053
|
{
|
|
2004
2054
|
/**
|
|
@@ -2024,7 +2074,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2024
2074
|
*/
|
|
2025
2075
|
get: (t, e) => (s) => Bt(e, s)
|
|
2026
2076
|
}
|
|
2027
|
-
), Ft = (t, e) => F(t, e),
|
|
2077
|
+
), Ft = (t, e) => F(t, e), Es = new Proxy(
|
|
2028
2078
|
{},
|
|
2029
2079
|
{
|
|
2030
2080
|
/**
|
|
@@ -2036,11 +2086,11 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2036
2086
|
*/
|
|
2037
2087
|
get: (t, e) => (s) => Ft(e, s)
|
|
2038
2088
|
}
|
|
2039
|
-
),
|
|
2089
|
+
), g = (t) => {
|
|
2040
2090
|
if (t == null)
|
|
2041
2091
|
return P;
|
|
2042
2092
|
if (Array.isArray(t))
|
|
2043
|
-
return
|
|
2093
|
+
return E(...t.map(g));
|
|
2044
2094
|
if (typeof t == "string")
|
|
2045
2095
|
return Re(t);
|
|
2046
2096
|
if (y.is(t))
|
|
@@ -2049,12 +2099,12 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2049
2099
|
return t;
|
|
2050
2100
|
throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
|
|
2051
2101
|
}, Ve = (t, ...e) => m((s) => {
|
|
2052
|
-
const n = s.makeChildElement(t, void 0), r = e.map((o) =>
|
|
2102
|
+
const n = s.makeChildElement(t, void 0), r = e.map((o) => g(o).render(n));
|
|
2053
2103
|
return (o) => {
|
|
2054
2104
|
r.forEach((i) => i(!1)), n.clear(o);
|
|
2055
2105
|
};
|
|
2056
|
-
}),
|
|
2057
|
-
const r = n.makeChildElement(t, e), o = s.map((i) =>
|
|
2106
|
+
}), ie = (t, e, ...s) => m((n) => {
|
|
2107
|
+
const r = n.makeChildElement(t, e), o = s.map((i) => g(i).render(r));
|
|
2058
2108
|
return (i) => {
|
|
2059
2109
|
o.forEach((l) => l(!1)), r.clear(i);
|
|
2060
2110
|
};
|
|
@@ -2066,9 +2116,9 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2066
2116
|
* @param tagName - The HTML tag name.
|
|
2067
2117
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
2068
2118
|
*/
|
|
2069
|
-
get: (t, e) => (...s) => Ve(e, s.flatMap(
|
|
2119
|
+
get: (t, e) => (...s) => Ve(e, s.flatMap(g))
|
|
2070
2120
|
}
|
|
2071
|
-
),
|
|
2121
|
+
), Cs = new Proxy(
|
|
2072
2122
|
{},
|
|
2073
2123
|
{
|
|
2074
2124
|
/**
|
|
@@ -2076,9 +2126,9 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2076
2126
|
* @param type - The input type name.
|
|
2077
2127
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
2078
2128
|
*/
|
|
2079
|
-
get: (t, e) => (...s) => Ve("input",
|
|
2129
|
+
get: (t, e) => (...s) => Ve("input", T.type(e), ...s)
|
|
2080
2130
|
}
|
|
2081
|
-
), qe = "http://www.w3.org/2000/svg",
|
|
2131
|
+
), qe = "http://www.w3.org/2000/svg", Ds = (t, ...e) => ie(t, qe, ...e), Ps = new Proxy(
|
|
2082
2132
|
{},
|
|
2083
2133
|
{
|
|
2084
2134
|
/**
|
|
@@ -2086,9 +2136,9 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2086
2136
|
* @param tagName - The SVG tag name.
|
|
2087
2137
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
2088
2138
|
*/
|
|
2089
|
-
get: (t, e) => (...s) =>
|
|
2139
|
+
get: (t, e) => (...s) => ie(e, qe, s.flatMap(g))
|
|
2090
2140
|
}
|
|
2091
|
-
), Be = "http://www.w3.org/1998/Math/MathML",
|
|
2141
|
+
), Be = "http://www.w3.org/1998/Math/MathML", xs = (t, ...e) => ie(t, Be, ...e), Ls = new Proxy(
|
|
2092
2142
|
{},
|
|
2093
2143
|
{
|
|
2094
2144
|
/**
|
|
@@ -2096,28 +2146,28 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2096
2146
|
* @param tagName - The Math tag name.
|
|
2097
2147
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
2098
2148
|
*/
|
|
2099
|
-
get: (t, e) => (...s) =>
|
|
2149
|
+
get: (t, e) => (...s) => ie(e, Be, s.flatMap(g))
|
|
2100
2150
|
}
|
|
2101
2151
|
), Fe = (t, e) => {
|
|
2102
2152
|
if (typeof e == "function")
|
|
2103
2153
|
return Fe(t, { then: e });
|
|
2104
|
-
const s = e.pending != null ?
|
|
2154
|
+
const s = e.pending != null ? g(e.pending()) : P, n = e.then, r = e.error != null ? (o) => g(e.error(o)) : () => P;
|
|
2105
2155
|
return m((o) => {
|
|
2106
2156
|
let i = !0;
|
|
2107
2157
|
const l = t(), a = o.makeRef();
|
|
2108
|
-
let c =
|
|
2158
|
+
let c = g(s).render(a);
|
|
2109
2159
|
return l.then(
|
|
2110
2160
|
(u) => {
|
|
2111
|
-
i && (c(!0), c =
|
|
2161
|
+
i && (c(!0), c = g(n(u)).render(a));
|
|
2112
2162
|
},
|
|
2113
2163
|
(u) => {
|
|
2114
|
-
i && (c(!0), c =
|
|
2164
|
+
i && (c(!0), c = g(r(u)).render(a));
|
|
2115
2165
|
}
|
|
2116
2166
|
), (u) => {
|
|
2117
2167
|
i = !1, c(u), a.clear(u);
|
|
2118
2168
|
};
|
|
2119
2169
|
});
|
|
2120
|
-
},
|
|
2170
|
+
}, Os = (t, e) => Fe(() => t, e), We = (t, e, s) => m((n) => n.on(t, e, s)), Ut = (t) => We("click", (e, s) => {
|
|
2121
2171
|
e.preventDefault();
|
|
2122
2172
|
const n = e.target;
|
|
2123
2173
|
setTimeout(() => {
|
|
@@ -2134,18 +2184,18 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2134
2184
|
*/
|
|
2135
2185
|
get: (t, e) => (s) => We(e, s)
|
|
2136
2186
|
}
|
|
2137
|
-
),
|
|
2187
|
+
), Jt = (t, e) => (s) => {
|
|
2138
2188
|
e?.preventDefault === !0 && s.preventDefault(), e?.stopPropagation === !0 && s.stopPropagation(), e?.stopImmediatePropagation === !0 && s.stopImmediatePropagation(), t(s);
|
|
2139
|
-
},
|
|
2189
|
+
}, k = (t, e) => Jt((s) => {
|
|
2140
2190
|
const n = s.target;
|
|
2141
2191
|
t(n, s);
|
|
2142
|
-
}, e),
|
|
2192
|
+
}, e), zt = (t, e) => k(
|
|
2143
2193
|
(s, n) => t(s.value, n),
|
|
2144
2194
|
e
|
|
2145
|
-
),
|
|
2195
|
+
), Gt = (t, e) => k(
|
|
2146
2196
|
(s, n) => t(s.valueAsNumber, n),
|
|
2147
2197
|
e
|
|
2148
|
-
),
|
|
2198
|
+
), Kt = (t, e) => k((s, n) => {
|
|
2149
2199
|
if (s.value === "")
|
|
2150
2200
|
return;
|
|
2151
2201
|
const r = s.value.split("-"), o = new Date(
|
|
@@ -2154,7 +2204,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2154
2204
|
Number(r[2].substring(0, 2))
|
|
2155
2205
|
);
|
|
2156
2206
|
t(o, n);
|
|
2157
|
-
}, e),
|
|
2207
|
+
}, e), Ms = (t, e) => k((s, n) => {
|
|
2158
2208
|
if (s.value === "") {
|
|
2159
2209
|
t(null, n);
|
|
2160
2210
|
return;
|
|
@@ -2165,7 +2215,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2165
2215
|
Number(r[2].substring(0, 2))
|
|
2166
2216
|
);
|
|
2167
2217
|
t(o, n);
|
|
2168
|
-
}, e), Yt = (t, e) =>
|
|
2218
|
+
}, e), Yt = (t, e) => k((s, n) => {
|
|
2169
2219
|
if (s.value === "")
|
|
2170
2220
|
return;
|
|
2171
2221
|
const r = s.value.split("T"), o = r[0].split("-"), i = new Date(
|
|
@@ -2174,7 +2224,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2174
2224
|
Number(o[2])
|
|
2175
2225
|
), l = r[1].split(":");
|
|
2176
2226
|
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), t(i, n);
|
|
2177
|
-
}, e), ks = (t, e) =>
|
|
2227
|
+
}, e), ks = (t, e) => k((s, n) => {
|
|
2178
2228
|
if (s.value === "") {
|
|
2179
2229
|
t(null, n);
|
|
2180
2230
|
return;
|
|
@@ -2190,17 +2240,17 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2190
2240
|
Number(o[2])
|
|
2191
2241
|
), l = r[1].split(":");
|
|
2192
2242
|
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), t(i, n);
|
|
2193
|
-
}, e),
|
|
2243
|
+
}, e), Is = (t, e) => k((s, n) => {
|
|
2194
2244
|
t(s.checked, n);
|
|
2195
|
-
}, e),
|
|
2245
|
+
}, e), Hs = (t, e = "input") => E(T.valueAsDate(t), W[e](Kt(t.set))), $s = (t, e = "input") => E(T.valueAsDate(t), W[e](Yt(t.set))), Ns = (t, e = "input") => E(T.valueAsNumber(t), W[e](Gt(t.set))), Rs = (t, e = "input") => E(T.value(t), W[e](zt(t.set))), js = (t) => E(T.checked(t), Ut(t.set)), fe = (t, e, s) => y.is(t) ? e(t) : s(t), Xt = (t, e, s) => {
|
|
2196
2246
|
const n = t.makeRef();
|
|
2197
2247
|
let r = () => {
|
|
2198
2248
|
}, o = null;
|
|
2199
2249
|
const i = e.on(
|
|
2200
2250
|
(l) => {
|
|
2201
|
-
o?.dispose(), r(!0), o = new q(), r =
|
|
2251
|
+
o?.dispose(), r(!0), o = new q(), r = M(
|
|
2202
2252
|
o,
|
|
2203
|
-
() =>
|
|
2253
|
+
() => g(s(l)).render(n)
|
|
2204
2254
|
);
|
|
2205
2255
|
},
|
|
2206
2256
|
{ noAutoDispose: !0 }
|
|
@@ -2208,43 +2258,43 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2208
2258
|
return (l) => {
|
|
2209
2259
|
o?.dispose(), r(l), i(), n.clear(l);
|
|
2210
2260
|
};
|
|
2211
|
-
},
|
|
2261
|
+
}, le = (t, e) => {
|
|
2212
2262
|
function s(r) {
|
|
2213
2263
|
return m((o) => {
|
|
2214
2264
|
const i = o.makeRef();
|
|
2215
2265
|
let l, a;
|
|
2216
2266
|
const c = r.map((p) => Object.keys(p)[0]);
|
|
2217
2267
|
let u;
|
|
2218
|
-
const
|
|
2268
|
+
const d = c.on((p) => {
|
|
2219
2269
|
if (p !== u) {
|
|
2220
|
-
u = p, a?.dispose(), l?.(!0), a = r.map((
|
|
2221
|
-
const
|
|
2222
|
-
l =
|
|
2270
|
+
u = p, a?.dispose(), l?.(!0), a = r.map((f) => f[p]);
|
|
2271
|
+
const h = e[p](a);
|
|
2272
|
+
l = g(h).render(i);
|
|
2223
2273
|
}
|
|
2224
2274
|
});
|
|
2225
2275
|
return (p) => {
|
|
2226
|
-
a?.dispose(),
|
|
2276
|
+
a?.dispose(), d(), i.clear(p), l?.(p);
|
|
2227
2277
|
};
|
|
2228
2278
|
});
|
|
2229
2279
|
}
|
|
2230
2280
|
function n(r) {
|
|
2231
2281
|
const o = Object.keys(r)[0];
|
|
2232
|
-
return
|
|
2282
|
+
return g(e[o](re(r[o])));
|
|
2233
2283
|
}
|
|
2234
2284
|
return fe(t, s, n);
|
|
2235
|
-
}, Ue = (t, e, s) =>
|
|
2285
|
+
}, Ue = (t, e, s) => le(
|
|
2236
2286
|
w.map(t, (n) => ({ [n[e]]: n })),
|
|
2237
2287
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2238
2288
|
s
|
|
2239
|
-
),
|
|
2289
|
+
), Vs = (t, e) => Ue(t, "kind", e), qs = (t, e) => {
|
|
2240
2290
|
const s = w.map(t, ([n, r]) => ({
|
|
2241
2291
|
[n]: r
|
|
2242
2292
|
}));
|
|
2243
|
-
return
|
|
2244
|
-
},
|
|
2293
|
+
return le(s, e);
|
|
2294
|
+
}, Bs = (t, e) => Ue(t, "type", e), Qt = (t, e) => le(
|
|
2245
2295
|
w.map(t, (s) => ({ [s]: !0 })),
|
|
2246
2296
|
e
|
|
2247
|
-
),
|
|
2297
|
+
), Fs = (t, e = {}) => (s) => {
|
|
2248
2298
|
const n = e?.firstSeparator ?? t, r = e?.lastSeparator ?? t;
|
|
2249
2299
|
return Qt(
|
|
2250
2300
|
s.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
@@ -2254,74 +2304,74 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2254
2304
|
other: t
|
|
2255
2305
|
}
|
|
2256
2306
|
);
|
|
2257
|
-
},
|
|
2258
|
-
s &&
|
|
2259
|
-
})),
|
|
2307
|
+
}, Ws = (t) => m((e) => (e.appendOrInsert(t), (s) => {
|
|
2308
|
+
s && K(t);
|
|
2309
|
+
})), Us = (t, e, s) => {
|
|
2260
2310
|
function n(o) {
|
|
2261
2311
|
return m((i) => {
|
|
2262
2312
|
const l = i.makeRef();
|
|
2263
2313
|
let a = () => {
|
|
2264
2314
|
}, c = !1, u = null;
|
|
2265
|
-
const
|
|
2266
|
-
p == null ? (a(!0), a =
|
|
2315
|
+
const d = o.on((p) => {
|
|
2316
|
+
p == null ? (a(!0), a = g(s?.()).render(l), c = !1, u?.dispose(), u = null) : c ? u.set(p) : (u = D(p), a(!0), a = g(
|
|
2267
2317
|
e(u)
|
|
2268
2318
|
).render(l), c = !0);
|
|
2269
2319
|
});
|
|
2270
2320
|
return (p) => {
|
|
2271
|
-
u?.dispose(),
|
|
2321
|
+
u?.dispose(), d(), a?.(p), l.clear(p);
|
|
2272
2322
|
};
|
|
2273
2323
|
});
|
|
2274
2324
|
}
|
|
2275
2325
|
function r(o) {
|
|
2276
2326
|
if (o == null) {
|
|
2277
2327
|
const i = s?.();
|
|
2278
|
-
return i != null ?
|
|
2328
|
+
return i != null ? g(i) : P;
|
|
2279
2329
|
}
|
|
2280
|
-
return
|
|
2330
|
+
return g(e(re(o)));
|
|
2281
2331
|
}
|
|
2282
2332
|
return fe(
|
|
2283
2333
|
t,
|
|
2284
2334
|
n,
|
|
2285
2335
|
r
|
|
2286
2336
|
);
|
|
2287
|
-
},
|
|
2337
|
+
}, Js = (...t) => (e, s) => m((n) => {
|
|
2288
2338
|
const r = n.makeRef();
|
|
2289
2339
|
if (t.some(
|
|
2290
|
-
(
|
|
2340
|
+
(h) => !y.is(h) && h == null
|
|
2291
2341
|
))
|
|
2292
|
-
return (s != null ?
|
|
2342
|
+
return (s != null ? g(s?.()) : P).render(r);
|
|
2293
2343
|
const i = t.map(() => null), l = t.map(
|
|
2294
|
-
(
|
|
2344
|
+
(h) => y.is(h) ? h.value != null : h != null
|
|
2295
2345
|
);
|
|
2296
2346
|
let a = null;
|
|
2297
|
-
const c = D(l.every((
|
|
2298
|
-
if (
|
|
2299
|
-
if (i[
|
|
2300
|
-
const v = D(
|
|
2301
|
-
i[
|
|
2347
|
+
const c = D(l.every((h) => h)), u = (h, f) => {
|
|
2348
|
+
if (h.value != null) {
|
|
2349
|
+
if (i[f] == null) {
|
|
2350
|
+
const v = D(h.value);
|
|
2351
|
+
i[f] = v;
|
|
2302
2352
|
} else
|
|
2303
|
-
i[
|
|
2304
|
-
l[
|
|
2353
|
+
i[f].value = h.value;
|
|
2354
|
+
l[f] = !0;
|
|
2305
2355
|
} else
|
|
2306
|
-
l[
|
|
2356
|
+
l[f] = !1;
|
|
2307
2357
|
};
|
|
2308
|
-
let
|
|
2309
|
-
const p = t.map((
|
|
2310
|
-
if (!y.is(
|
|
2311
|
-
const v = D(
|
|
2312
|
-
return i[
|
|
2358
|
+
let d = t.length - 1;
|
|
2359
|
+
const p = t.map((h, f) => {
|
|
2360
|
+
if (!y.is(h)) {
|
|
2361
|
+
const v = D(h);
|
|
2362
|
+
return i[f] = v, () => {
|
|
2313
2363
|
};
|
|
2314
2364
|
}
|
|
2315
|
-
return
|
|
2316
|
-
u(
|
|
2365
|
+
return h.on(() => {
|
|
2366
|
+
u(h, f), d === 0 ? c.value = l.every((v) => v) : d--;
|
|
2317
2367
|
});
|
|
2318
2368
|
});
|
|
2319
|
-
return c.on((
|
|
2320
|
-
a?.(!0), a = null,
|
|
2321
|
-
}), (
|
|
2322
|
-
i.forEach((
|
|
2369
|
+
return c.on((h) => {
|
|
2370
|
+
a?.(!0), a = null, h ? a = g(e(...i)).render(r) : a = g(s?.() ?? P).render(r);
|
|
2371
|
+
}), (h) => {
|
|
2372
|
+
i.forEach((f) => f?.dispose()), c.dispose(), p.forEach((f) => f()), a?.(h), r.clear(h);
|
|
2323
2373
|
};
|
|
2324
|
-
}),
|
|
2374
|
+
}), Je = (t, e, s) => fe(
|
|
2325
2375
|
t,
|
|
2326
2376
|
(n) => m(
|
|
2327
2377
|
(r) => Xt(
|
|
@@ -2333,24 +2383,24 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2333
2383
|
(n) => {
|
|
2334
2384
|
if (n) {
|
|
2335
2385
|
const r = e();
|
|
2336
|
-
return r != null ?
|
|
2386
|
+
return r != null ? g(r) : P;
|
|
2337
2387
|
}
|
|
2338
|
-
return
|
|
2388
|
+
return g(s?.());
|
|
2339
2389
|
}
|
|
2340
|
-
),
|
|
2390
|
+
), zs = (t, e, s) => Je(
|
|
2341
2391
|
w.map(t, (n) => !n),
|
|
2342
2392
|
e,
|
|
2343
2393
|
s
|
|
2344
|
-
),
|
|
2394
|
+
), ze = (t, e, s) => {
|
|
2345
2395
|
if (s != null)
|
|
2346
|
-
return
|
|
2347
|
-
const r = new
|
|
2396
|
+
return ze(t, (n) => {
|
|
2397
|
+
const r = new de(
|
|
2348
2398
|
n.index,
|
|
2349
2399
|
n.total.map((o) => o - 1)
|
|
2350
2400
|
);
|
|
2351
|
-
return
|
|
2352
|
-
|
|
2353
|
-
|
|
2401
|
+
return E(
|
|
2402
|
+
g(e(n)),
|
|
2403
|
+
Je(
|
|
2354
2404
|
n.isLast,
|
|
2355
2405
|
() => P,
|
|
2356
2406
|
() => s(r)
|
|
@@ -2362,16 +2412,16 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2362
2412
|
const r = t.derive(), o = n.makeRef(), i = [], l = [];
|
|
2363
2413
|
return r.on((a) => {
|
|
2364
2414
|
const c = i.splice(a), u = l.splice(a);
|
|
2365
|
-
for (const
|
|
2366
|
-
|
|
2367
|
-
for (const
|
|
2368
|
-
|
|
2369
|
-
for (let
|
|
2370
|
-
const p = new
|
|
2371
|
-
l.push(
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
() =>
|
|
2415
|
+
for (const d of u)
|
|
2416
|
+
d.dispose();
|
|
2417
|
+
for (const d of c)
|
|
2418
|
+
d(!0);
|
|
2419
|
+
for (let d = i.length; d < a; d++) {
|
|
2420
|
+
const p = new de(d, r), h = new q();
|
|
2421
|
+
l.push(h), i.push(
|
|
2422
|
+
M(
|
|
2423
|
+
h,
|
|
2424
|
+
() => g(e(p)).render(o)
|
|
2375
2425
|
)
|
|
2376
2426
|
);
|
|
2377
2427
|
}
|
|
@@ -2386,20 +2436,20 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2386
2436
|
});
|
|
2387
2437
|
{
|
|
2388
2438
|
const n = re(t);
|
|
2389
|
-
return
|
|
2439
|
+
return E(
|
|
2390
2440
|
...Array.from({ length: t }, (r, o) => o).map((r) => {
|
|
2391
|
-
const o = new
|
|
2392
|
-
return
|
|
2441
|
+
const o = new de(r, n);
|
|
2442
|
+
return g(e(o));
|
|
2393
2443
|
})
|
|
2394
2444
|
);
|
|
2395
2445
|
}
|
|
2396
|
-
},
|
|
2446
|
+
}, Gs = (t, e, s) => {
|
|
2397
2447
|
const n = w.map(t, (o) => o.length), r = w.toSignal(t);
|
|
2398
|
-
return
|
|
2448
|
+
return ze(
|
|
2399
2449
|
n,
|
|
2400
2450
|
(o) => {
|
|
2401
2451
|
const i = r.map((l) => l[o.index]);
|
|
2402
|
-
return
|
|
2452
|
+
return g(e(i, o));
|
|
2403
2453
|
},
|
|
2404
2454
|
s
|
|
2405
2455
|
);
|
|
@@ -2412,7 +2462,7 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2412
2462
|
const s = t;
|
|
2413
2463
|
return m((n) => {
|
|
2414
2464
|
n = n.makeRef();
|
|
2415
|
-
const r = s.map((l) =>
|
|
2465
|
+
const r = s.map((l) => g(e(l)));
|
|
2416
2466
|
let o = () => {
|
|
2417
2467
|
};
|
|
2418
2468
|
const i = r.on((l) => {
|
|
@@ -2423,17 +2473,17 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
2423
2473
|
};
|
|
2424
2474
|
});
|
|
2425
2475
|
}
|
|
2426
|
-
return
|
|
2476
|
+
return g(e(t));
|
|
2427
2477
|
}, me = (t) => m((e) => {
|
|
2428
2478
|
if (e.isBrowser()) {
|
|
2429
2479
|
const s = t(e);
|
|
2430
2480
|
if (s != null)
|
|
2431
|
-
return
|
|
2481
|
+
return g(s).render(e);
|
|
2432
2482
|
}
|
|
2433
2483
|
return () => {
|
|
2434
2484
|
};
|
|
2435
2485
|
});
|
|
2436
|
-
function
|
|
2486
|
+
function Ys({
|
|
2437
2487
|
src: t,
|
|
2438
2488
|
name: e,
|
|
2439
2489
|
width: s,
|
|
@@ -2442,43 +2492,49 @@ function zs({
|
|
|
2442
2492
|
allow: o,
|
|
2443
2493
|
referrerpolicy: i,
|
|
2444
2494
|
loading: l,
|
|
2445
|
-
|
|
2446
|
-
|
|
2495
|
+
iframeChild: a,
|
|
2496
|
+
onLoad: c
|
|
2497
|
+
} = {}, ...u) {
|
|
2447
2498
|
return Wt.iframe(
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2499
|
+
T.src(t),
|
|
2500
|
+
T.name(e),
|
|
2501
|
+
T.width(
|
|
2502
|
+
s != null ? w.map(s, String) : void 0
|
|
2503
|
+
),
|
|
2504
|
+
T.height(
|
|
2505
|
+
n != null ? w.map(n, String) : void 0
|
|
2506
|
+
),
|
|
2507
|
+
T.sandbox(r),
|
|
2508
|
+
T.allow(o),
|
|
2509
|
+
T.referrerpolicy(i),
|
|
2510
|
+
a,
|
|
2511
|
+
me((d) => {
|
|
2512
|
+
const p = d.element;
|
|
2513
|
+
let h, f = !1;
|
|
2514
|
+
const v = () => {
|
|
2515
|
+
if (f) return;
|
|
2516
|
+
f = !0;
|
|
2517
|
+
const S = p.contentDocument;
|
|
2518
|
+
if (S && (c && c(p), u.length > 0)) {
|
|
2519
|
+
const b = S.body;
|
|
2520
|
+
if (b) {
|
|
2521
|
+
const x = d.withElement(b);
|
|
2522
|
+
h = B(E(...u), x);
|
|
2467
2523
|
}
|
|
2468
2524
|
}
|
|
2469
2525
|
};
|
|
2470
|
-
return l != null && w.on(l, (
|
|
2471
|
-
|
|
2472
|
-
}), (
|
|
2473
|
-
|
|
2526
|
+
return l != null && w.on(l, (S) => {
|
|
2527
|
+
p.loading = S;
|
|
2528
|
+
}), (u.length > 0 || c) && (t || setTimeout(v, 0)), E(
|
|
2529
|
+
u.length > 0 || c ? W.load(v) : P,
|
|
2474
2530
|
ge(() => {
|
|
2475
|
-
|
|
2531
|
+
h && h(!1);
|
|
2476
2532
|
})
|
|
2477
2533
|
);
|
|
2478
2534
|
})
|
|
2479
2535
|
);
|
|
2480
2536
|
}
|
|
2481
|
-
const
|
|
2537
|
+
const Xs = (t, e, s = () => P) => le(
|
|
2482
2538
|
w.map(
|
|
2483
2539
|
t,
|
|
2484
2540
|
(n) => n.length > 0 ? { notEmpty: n } : { whenEmpty: null }
|
|
@@ -2487,31 +2543,31 @@ const Ys = (t, e, s = () => P) => ie(
|
|
|
2487
2543
|
notEmpty: (n) => e(n),
|
|
2488
2544
|
whenEmpty: () => s()
|
|
2489
2545
|
}
|
|
2490
|
-
),
|
|
2491
|
-
const n = s.makePortal(t), r = B(
|
|
2546
|
+
), Qs = (t, e) => m((s) => {
|
|
2547
|
+
const n = s.makePortal(t), r = B(g(e), n);
|
|
2492
2548
|
return () => r(!0);
|
|
2493
|
-
}),
|
|
2494
|
-
mark:
|
|
2549
|
+
}), G = /* @__PURE__ */ new Map(), Zt = (t) => ({
|
|
2550
|
+
mark: Ge(`Probe(${t.description})`),
|
|
2495
2551
|
create: ({ callback: e = () => {
|
|
2496
2552
|
}, timeout: s = 10 } = {}) => {
|
|
2497
2553
|
const n = (l) => {
|
|
2498
|
-
clearTimeout(r),
|
|
2554
|
+
clearTimeout(r), G.delete(t), e(l);
|
|
2499
2555
|
};
|
|
2500
|
-
if (
|
|
2556
|
+
if (G.has(t))
|
|
2501
2557
|
throw new Error(`Probe already exists: ${t.description}`);
|
|
2502
2558
|
const r = setTimeout(() => n("timeout"), s), o = { counter: 0, timeoutId: r };
|
|
2503
|
-
return
|
|
2559
|
+
return G.set(t, o), {
|
|
2504
2560
|
value: () => {
|
|
2505
2561
|
clearTimeout(r);
|
|
2506
|
-
const l =
|
|
2562
|
+
const l = G.get(t);
|
|
2507
2563
|
l != null && --l.counter === 0 && n("resolved");
|
|
2508
2564
|
},
|
|
2509
2565
|
dispose: () => n("disposed"),
|
|
2510
2566
|
onUse: () => o.counter++
|
|
2511
2567
|
};
|
|
2512
2568
|
}
|
|
2513
|
-
}),
|
|
2514
|
-
function
|
|
2569
|
+
}), Zs = Zt(Symbol("GlobalProbe"));
|
|
2570
|
+
function en({
|
|
2515
2571
|
mode: t,
|
|
2516
2572
|
delegatesFocus: e,
|
|
2517
2573
|
slotAssignment: s,
|
|
@@ -2521,7 +2577,7 @@ function Zs({
|
|
|
2521
2577
|
return me((i) => {
|
|
2522
2578
|
const l = { mode: t };
|
|
2523
2579
|
e !== void 0 && (l.delegatesFocus = e), s !== void 0 && (l.slotAssignment = s), n !== void 0 && (l.clonable = n), r !== void 0 && (l.serializable = r);
|
|
2524
|
-
const a = i.element.attachShadow(l), c = i.withElement(a), u = B(
|
|
2580
|
+
const a = i.element.attachShadow(l), c = i.withElement(a), u = B(E(...o), c);
|
|
2525
2581
|
return ge(() => u(!0));
|
|
2526
2582
|
});
|
|
2527
2583
|
}
|
|
@@ -2535,7 +2591,7 @@ const es = (t, e) => m((s) => {
|
|
|
2535
2591
|
return (o) => {
|
|
2536
2592
|
r(), o && s.setStyle(t, n);
|
|
2537
2593
|
};
|
|
2538
|
-
}), be = (t, e) => y.is(e) ? ts(t, e) : es(t, e),
|
|
2594
|
+
}), be = (t, e) => y.is(e) ? ts(t, e) : es(t, e), tn = new Proxy({}, {
|
|
2539
2595
|
/**
|
|
2540
2596
|
* Creates a renderable component for the specified `style` property.
|
|
2541
2597
|
*
|
|
@@ -2545,22 +2601,22 @@ const es = (t, e) => m((s) => {
|
|
|
2545
2601
|
*
|
|
2546
2602
|
*/
|
|
2547
2603
|
get: (t, e) => e === "variable" ? (s, n) => be(s, n) : (s) => be(e, s)
|
|
2548
|
-
}),
|
|
2604
|
+
}), sn = (t) => m((e) => {
|
|
2549
2605
|
const s = t(e);
|
|
2550
2606
|
return s == null ? () => {
|
|
2551
|
-
} :
|
|
2552
|
-
}),
|
|
2607
|
+
} : g(s).render(e);
|
|
2608
|
+
}), nn = (t) => me((e) => t(e.element)), rn = (t) => m((e) => {
|
|
2553
2609
|
if (e.isHeadlessDOM()) {
|
|
2554
2610
|
const s = t(e);
|
|
2555
2611
|
if (s)
|
|
2556
|
-
return
|
|
2612
|
+
return g(s).render(e);
|
|
2557
2613
|
}
|
|
2558
2614
|
return () => {
|
|
2559
2615
|
};
|
|
2560
|
-
}),
|
|
2561
|
-
const s = new q(), n =
|
|
2616
|
+
}), on = (t) => m((e) => {
|
|
2617
|
+
const s = new q(), n = M(
|
|
2562
2618
|
s,
|
|
2563
|
-
() =>
|
|
2619
|
+
() => g(t(s)).render(e)
|
|
2564
2620
|
);
|
|
2565
2621
|
return (r) => {
|
|
2566
2622
|
s.dispose(), n(r);
|
|
@@ -2579,154 +2635,155 @@ const es = (t, e) => m((s) => {
|
|
|
2579
2635
|
return c?.(), a;
|
|
2580
2636
|
},
|
|
2581
2637
|
set: ({ mark: l, create: a }, c) => {
|
|
2582
|
-
const { value: u, dispose:
|
|
2583
|
-
o.push(
|
|
2638
|
+
const { value: u, dispose: d, onUse: p } = a(c, n());
|
|
2639
|
+
o.push(d), r(n().setProvider(l, u, p));
|
|
2584
2640
|
}
|
|
2585
2641
|
});
|
|
2586
2642
|
return i == null ? () => {
|
|
2587
|
-
} :
|
|
2588
|
-
|
|
2643
|
+
} : E(
|
|
2644
|
+
g(i),
|
|
2589
2645
|
ge(() => o.forEach((l) => l()))
|
|
2590
2646
|
).render(n());
|
|
2591
|
-
}),
|
|
2647
|
+
}), ln = (t, e, s) => ye(({ set: n }) => (n(t, e), s())), an = (t, e) => ye(({ use: s }) => e(s(t))), cn = (...t) => (e) => ye(({ use: s }) => {
|
|
2592
2648
|
const n = t.map(s);
|
|
2593
2649
|
return e(...n);
|
|
2594
2650
|
});
|
|
2595
2651
|
export {
|
|
2596
2652
|
qt as Aria,
|
|
2597
|
-
|
|
2653
|
+
Os as Async,
|
|
2598
2654
|
jt as Attr,
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2655
|
+
js as BindChecked,
|
|
2656
|
+
Hs as BindDate,
|
|
2657
|
+
$s as BindDateTime,
|
|
2602
2658
|
Ns as BindNumber,
|
|
2603
|
-
|
|
2659
|
+
Rs as BindText,
|
|
2604
2660
|
j as BrowserContext,
|
|
2605
2661
|
Y as CLASS_PLACEHOLDER_ATTR,
|
|
2606
2662
|
R as Computed,
|
|
2607
|
-
|
|
2608
|
-
|
|
2663
|
+
Fs as Conjunction,
|
|
2664
|
+
Ws as DOMNode,
|
|
2609
2665
|
Vt as DataAttr,
|
|
2610
2666
|
q as DisposalScope,
|
|
2611
2667
|
Ve as El,
|
|
2612
|
-
|
|
2613
|
-
|
|
2668
|
+
ie as ElNS,
|
|
2669
|
+
de as ElementPosition,
|
|
2614
2670
|
P as Empty,
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2671
|
+
Us as Ensure,
|
|
2672
|
+
Js as EnsureAll,
|
|
2673
|
+
Gs as ForEach,
|
|
2674
|
+
E as Fragment,
|
|
2675
|
+
Zs as GlobalProbe,
|
|
2676
|
+
ws as HeadlessAdapter,
|
|
2621
2677
|
V as HeadlessContext,
|
|
2622
2678
|
Lt as HeadlessElement,
|
|
2623
|
-
|
|
2679
|
+
Ne as HeadlessPortal,
|
|
2624
2680
|
Ot as HeadlessText,
|
|
2625
|
-
|
|
2681
|
+
Ys as IFrame,
|
|
2626
2682
|
Ks as MapSignal,
|
|
2627
2683
|
Ft as MathAttr,
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2684
|
+
xs as MathEl,
|
|
2685
|
+
Te as MemoryStore,
|
|
2686
|
+
Xs as NotEmpty,
|
|
2631
2687
|
Ut as OnChecked,
|
|
2632
2688
|
ge as OnDispose,
|
|
2633
|
-
|
|
2689
|
+
le as OneOf,
|
|
2634
2690
|
Ue as OneOfField,
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2691
|
+
Vs as OneOfKind,
|
|
2692
|
+
qs as OneOfTuple,
|
|
2693
|
+
Bs as OneOfType,
|
|
2638
2694
|
Qt as OneOfValue,
|
|
2639
|
-
|
|
2695
|
+
Qs as Portal,
|
|
2640
2696
|
se as Prop,
|
|
2641
|
-
|
|
2642
|
-
|
|
2697
|
+
ln as Provide,
|
|
2698
|
+
Me as ProviderNotFoundError,
|
|
2643
2699
|
gt as RenderingError,
|
|
2644
|
-
|
|
2700
|
+
ze as Repeat,
|
|
2645
2701
|
Bt as SVGAttr,
|
|
2646
|
-
|
|
2647
|
-
|
|
2702
|
+
Ds as SVGEl,
|
|
2703
|
+
en as ShadowRoot,
|
|
2648
2704
|
y as Signal,
|
|
2649
2705
|
Fe as Task,
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2706
|
+
Ss as TextNode,
|
|
2707
|
+
zs as Unless,
|
|
2708
|
+
an as Use,
|
|
2709
|
+
cn as UseMany,
|
|
2654
2710
|
w as Value,
|
|
2655
|
-
|
|
2711
|
+
Je as When,
|
|
2656
2712
|
me as WithBrowserCtx,
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2713
|
+
sn as WithCtx,
|
|
2714
|
+
nn as WithElement,
|
|
2715
|
+
rn as WithHeadlessCtx,
|
|
2660
2716
|
ye as WithProvider,
|
|
2661
|
-
|
|
2662
|
-
|
|
2717
|
+
on as WithScope,
|
|
2718
|
+
ke as _NODE_PLACEHOLDER_ATTR,
|
|
2663
2719
|
ft as _getSelfOrParentElement,
|
|
2664
2720
|
Le as _isElement,
|
|
2665
2721
|
Oe as _isFragment,
|
|
2666
2722
|
pt as _makeGetter,
|
|
2667
2723
|
dt as _makeSetter,
|
|
2668
|
-
|
|
2724
|
+
K as _removeDOMNode,
|
|
2669
2725
|
je as _signalText,
|
|
2670
2726
|
Re as _staticText,
|
|
2671
2727
|
as as animateSignal,
|
|
2672
2728
|
ut as animateSignals,
|
|
2673
|
-
|
|
2674
|
-
|
|
2729
|
+
Ts as aria,
|
|
2730
|
+
T as attr,
|
|
2675
2731
|
ps as bind,
|
|
2676
2732
|
fs as coalesce,
|
|
2677
2733
|
ne as computed,
|
|
2678
2734
|
te as computedOf,
|
|
2679
2735
|
ht as computedRecord,
|
|
2680
|
-
|
|
2681
|
-
|
|
2736
|
+
Ke as createRenderable,
|
|
2737
|
+
_s as dataAttr,
|
|
2682
2738
|
us as delaySignal,
|
|
2683
2739
|
_e as effect,
|
|
2684
2740
|
Ze as effectOf,
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2741
|
+
Jt as emit,
|
|
2742
|
+
Is as emitChecked,
|
|
2743
|
+
k as emitTarget,
|
|
2744
|
+
zt as emitValue,
|
|
2745
|
+
Kt as emitValueAsDate,
|
|
2690
2746
|
Yt as emitValueAsDateTime,
|
|
2691
|
-
|
|
2747
|
+
Ms as emitValueAsNullableDate,
|
|
2692
2748
|
ks as emitValueAsNullableDateTime,
|
|
2693
|
-
|
|
2749
|
+
Gt as emitValueAsNumber,
|
|
2694
2750
|
it as endInterpolate,
|
|
2695
|
-
|
|
2751
|
+
pe as getCurrentScope,
|
|
2696
2752
|
rs as getParentScope,
|
|
2697
2753
|
ns as getScopeStack,
|
|
2698
|
-
|
|
2754
|
+
bs as getWindow,
|
|
2699
2755
|
lt as guessInterpolate,
|
|
2700
2756
|
Wt as html,
|
|
2701
|
-
|
|
2757
|
+
Cs as input,
|
|
2702
2758
|
ot as interpolateDate,
|
|
2703
2759
|
nt as interpolateNumber,
|
|
2704
2760
|
rt as interpolateString,
|
|
2705
2761
|
ss as joinSignals,
|
|
2706
2762
|
is as localStorageProp,
|
|
2707
2763
|
Zt as makeProbe,
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2764
|
+
Ge as makeProviderMark,
|
|
2765
|
+
Ls as math,
|
|
2766
|
+
Es as mathAttr,
|
|
2711
2767
|
cs as merge,
|
|
2712
2768
|
W as on,
|
|
2713
2769
|
tt as popScope,
|
|
2714
2770
|
hs as previousSignal,
|
|
2715
2771
|
D as prop,
|
|
2716
2772
|
et as pushScope,
|
|
2717
|
-
|
|
2773
|
+
ms as render,
|
|
2718
2774
|
B as renderWithContext,
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2775
|
+
g as renderableOfTNode,
|
|
2776
|
+
vs as restoreTempoPlaceholders,
|
|
2777
|
+
ys as runHeadless,
|
|
2722
2778
|
os as scoped,
|
|
2723
2779
|
ls as sessionStorageProp,
|
|
2724
2780
|
re as signal,
|
|
2725
2781
|
ds as slidingWindowSignal,
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2782
|
+
Ae as storedProp,
|
|
2783
|
+
tn as style,
|
|
2784
|
+
Ps as svg,
|
|
2729
2785
|
As as svgAttr,
|
|
2730
|
-
|
|
2731
|
-
|
|
2786
|
+
gs as syncProp,
|
|
2787
|
+
ce as untracked,
|
|
2788
|
+
M as withScope
|
|
2732
2789
|
};
|